@gradio/upload 0.14.8 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/src/Upload.svelte +5 -1
- package/dist/src/Upload.svelte.d.ts +1 -0
- package/package.json +5 -5
- package/src/Upload.svelte +5 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# @gradio/upload
|
2
2
|
|
3
|
+
## 0.15.1
|
4
|
+
|
5
|
+
### Dependency updates
|
6
|
+
|
7
|
+
- @gradio/atoms@0.13.2
|
8
|
+
- @gradio/utils@0.10.1
|
9
|
+
- @gradio/client@1.12.0
|
10
|
+
- @gradio/wasm@0.17.3
|
11
|
+
|
12
|
+
## 0.15.0
|
13
|
+
|
14
|
+
### Features
|
15
|
+
|
16
|
+
- [#10478](https://github.com/gradio-app/gradio/pull/10478) [`afb96c6`](https://github.com/gradio-app/gradio/commit/afb96c64451e5a282bfee89445d831d1c87f9746) - Improve dataframe's upload accessibility. Thanks @hannahblair!
|
17
|
+
|
18
|
+
### Dependency updates
|
19
|
+
|
20
|
+
- @gradio/client@1.11.0
|
21
|
+
|
3
22
|
## 0.14.8
|
4
23
|
|
5
24
|
### Dependency updates
|
package/dist/src/Upload.svelte
CHANGED
@@ -20,6 +20,7 @@ export let upload;
|
|
20
20
|
export let stream_handler;
|
21
21
|
export let icon_upload = false;
|
22
22
|
export let height = void 0;
|
23
|
+
export let aria_label = void 0;
|
23
24
|
let upload_id;
|
24
25
|
let file_data;
|
25
26
|
let accept_file_types;
|
@@ -228,6 +229,7 @@ async function loadFilesFromDrop(e) {
|
|
228
229
|
: "100%"}
|
229
230
|
tabindex={hidden ? -1 : 0}
|
230
231
|
on:click={paste_clipboard}
|
232
|
+
aria-label={aria_label || "Paste from clipboard"}
|
231
233
|
>
|
232
234
|
<slot />
|
233
235
|
</button>
|
@@ -262,10 +264,12 @@ async function loadFilesFromDrop(e) {
|
|
262
264
|
on:drop={loadFilesFromDrop}
|
263
265
|
on:dragenter={updateDragging}
|
264
266
|
on:dragleave={updateDragging}
|
267
|
+
aria-label={aria_label || "Click to upload or drop files"}
|
268
|
+
aria-dropeffect="copy"
|
265
269
|
>
|
266
270
|
<slot />
|
267
271
|
<input
|
268
|
-
aria-label="
|
272
|
+
aria-label="File upload"
|
269
273
|
data-testid="file-upload"
|
270
274
|
type="file"
|
271
275
|
bind:this={hidden_upload}
|
@@ -21,6 +21,7 @@ declare const __propDef: {
|
|
21
21
|
stream_handler: Client["stream"];
|
22
22
|
icon_upload?: boolean | undefined;
|
23
23
|
height?: number | string | undefined;
|
24
|
+
aria_label?: string | undefined;
|
24
25
|
paste_clipboard?: (() => void) | undefined;
|
25
26
|
open_file_upload?: (() => void) | undefined;
|
26
27
|
load_files?: ((files: File[] | Blob[]) => Promise<(FileData | null)[] | void>) | undefined;
|
package/package.json
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/upload",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.15.1",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"main": "src/index.ts",
|
7
7
|
"author": "",
|
8
8
|
"license": "ISC",
|
9
9
|
"dependencies": {
|
10
|
-
"@gradio/atoms": "^0.13.
|
10
|
+
"@gradio/atoms": "^0.13.2",
|
11
11
|
"@gradio/icons": "^0.10.0",
|
12
|
-
"@gradio/
|
13
|
-
"@gradio/
|
14
|
-
"@gradio/wasm": "^0.17.
|
12
|
+
"@gradio/utils": "^0.10.1",
|
13
|
+
"@gradio/client": "^1.12.0",
|
14
|
+
"@gradio/wasm": "^0.17.3"
|
15
15
|
},
|
16
16
|
"main_changeset": true,
|
17
17
|
"exports": {
|
package/src/Upload.svelte
CHANGED
@@ -23,6 +23,7 @@
|
|
23
23
|
export let stream_handler: Client["stream"];
|
24
24
|
export let icon_upload = false;
|
25
25
|
export let height: number | string | undefined = undefined;
|
26
|
+
export let aria_label: string | undefined = undefined;
|
26
27
|
|
27
28
|
let upload_id: string;
|
28
29
|
let file_data: FileData[];
|
@@ -277,6 +278,7 @@
|
|
277
278
|
: "100%"}
|
278
279
|
tabindex={hidden ? -1 : 0}
|
279
280
|
on:click={paste_clipboard}
|
281
|
+
aria-label={aria_label || "Paste from clipboard"}
|
280
282
|
>
|
281
283
|
<slot />
|
282
284
|
</button>
|
@@ -311,10 +313,12 @@
|
|
311
313
|
on:drop={loadFilesFromDrop}
|
312
314
|
on:dragenter={updateDragging}
|
313
315
|
on:dragleave={updateDragging}
|
316
|
+
aria-label={aria_label || "Click to upload or drop files"}
|
317
|
+
aria-dropeffect="copy"
|
314
318
|
>
|
315
319
|
<slot />
|
316
320
|
<input
|
317
|
-
aria-label="
|
321
|
+
aria-label="File upload"
|
318
322
|
data-testid="file-upload"
|
319
323
|
type="file"
|
320
324
|
bind:this={hidden_upload}
|