Skip to content

Commit 5bdf1c2

Browse files
authored
Merge pull request #273 from silinternational/feature/fix-warnings
CVR-788 fix warnings
2 parents 2216e81 + ca3778e commit 5bdf1c2

File tree

5 files changed

+123
-115
lines changed

5 files changed

+123
-115
lines changed

components/custom/FileDropArea/FileDropArea.svelte

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,36 +73,35 @@ form > * {
7373
}
7474
</style>
7575

76-
<div
76+
<form
7777
id="drop-area"
78-
class="br-8px {$$props.class || ''}"
78+
class="br-8px flex justify-between align-items-center py-1 px-1 {$$props.class || ''}"
7979
class:highlighted
8080
on:dragenter|preventDefault|stopPropagation={highlight}
8181
on:dragleave|preventDefault|stopPropagation={unhighlight}
8282
on:dragover|preventDefault|stopPropagation={highlight}
8383
on:drop|preventDefault|stopPropagation={handleDrop}
84+
class:column={!isAboveMobile()}
8485
>
85-
<form class="flex justify-between align-items-center my-1 px-1" class:column={!isAboveMobile()}>
86-
{#if !uploading}
87-
<input
88-
bind:this={fileInput}
89-
type="file"
90-
id="fileElem"
91-
multiple
92-
accept={mimeType}
93-
disabled={uploading}
94-
on:change={() => handleFiles(fileInput.files)}
95-
/>
96-
{/if}
97-
<label
98-
class="mdc-button m-8px"
99-
for="fileElem"
100-
class:custom-text-button={raised}
101-
class:mdc-button--outlined={outlined}
102-
class:disabled={uploading}
103-
class:mdc-button--raised={raised}>Choose files</label
104-
>
105-
<div class="m-8px">or drop files here</div>
106-
<i class="material-icons icon m-8px" id="upload-icon">cloud_upload</i>
107-
</form>
108-
</div>
86+
{#if !uploading}
87+
<input
88+
bind:this={fileInput}
89+
type="file"
90+
id="fileElem"
91+
multiple
92+
accept={mimeType}
93+
disabled={uploading}
94+
on:change={() => handleFiles(fileInput.files)}
95+
/>
96+
{/if}
97+
<label
98+
class="mdc-button m-8px"
99+
for="fileElem"
100+
class:custom-text-button={raised}
101+
class:mdc-button--outlined={outlined}
102+
class:disabled={uploading}
103+
class:mdc-button--raised={raised}>Choose files</label
104+
>
105+
<div class="m-8px">or drop files here</div>
106+
<i class="material-icons icon m-8px" id="upload-icon">cloud_upload</i>
107+
</form>

components/mdc/Card/Card.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ $: tabindex = isClickable ? 0 : undefined
3131
</style>
3232

3333
<div
34+
role="button"
3435
{tabindex}
3536
class="mdc-card mdc-typography {$$props.class || ''}"
3637
style="background-color: {color}"

components/mdc/List/Item.svelte

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -51,35 +51,32 @@ img {
5151
class:mdc-deprecated-list-item--activated={activated}
5252
class:mdc-deprecated-list-item--disabled={nonInteractive}
5353
data-mdc-dialog-action={$$props['data-mdc-dialog-action']}
54-
on:click
55-
on:keydown
56-
on:keypress
57-
on:keyup
58-
{tabindex}
5954
>
60-
{#if graphicURL}
61-
<div class="mdc-deprecated-list-item__graphic">
62-
<img class="br-50" alt={graphicAlt} src={graphicURL} />
63-
</div>
64-
{:else if icon}
65-
<i class="material-icons mdc-deprecated-list-item__graphic" aria-hidden="true">{icon}</i>
66-
{/if}
55+
<div role="button" {tabindex} on:click on:keydown on:keypress on:keyup>
56+
{#if graphicURL}
57+
<div class="mdc-deprecated-list-item__graphic">
58+
<img class="br-50" alt={graphicAlt} src={graphicURL} />
59+
</div>
60+
{:else if icon}
61+
<i class="material-icons mdc-deprecated-list-item__graphic" aria-hidden="true">{icon}</i>
62+
{/if}
6763

68-
<span class="mdc-deprecated-list-item__ripple" />
64+
<span class="mdc-deprecated-list-item__ripple" />
6965

70-
<span class="mdc-deprecated-list-item__text" class:nonInteractive>
71-
{#if primary || secondary}
72-
<span class="mdc-deprecated-list-item__primary-text">{primary}</span>
73-
<span class="mdc-deprecated-list-item__secondary-text">{secondary}</span>
74-
{:else}
75-
{text}
76-
<slot />
77-
{/if}
78-
</span>
66+
<span class="mdc-deprecated-list-item__text" class:nonInteractive>
67+
{#if primary || secondary}
68+
<span class="mdc-deprecated-list-item__primary-text">{primary}</span>
69+
<span class="mdc-deprecated-list-item__secondary-text">{secondary}</span>
70+
{:else}
71+
{text}
72+
<slot />
73+
{/if}
74+
</span>
7975

80-
<div class="mdc-deprecated-list-item__meta">
81-
{meta}
82-
<slot name="meta" />
76+
<div class="mdc-deprecated-list-item__meta">
77+
{meta}
78+
<slot name="meta" />
79+
</div>
8380
</div>
8481
</li>
8582

0 commit comments

Comments
 (0)