Skip to content

Commit 6d72748

Browse files
committed
chore: v11 FileUploader
For better compatibility with existing codebases sizes `field` and `small` are still supported. Note that flagship implementation does the same thing.
1 parent 2d8b407 commit 6d72748

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

COMPONENT_INDEX.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ None.
13551355
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
13561356
| :-------------- | :------- | :--------------- | :------- | -------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------ |
13571357
| status | No | <code>let</code> | No | <code>"uploading" &#124; "edit" &#124; "complete"</code> | <code>"uploading"</code> | Specify the file uploader status |
1358-
| size | No | <code>let</code> | No | <code>"default" &#124; "field" &#124; "small"</code> | <code>"default"</code> | Specify the size of button skeleton |
1358+
| size | No | <code>let</code> | No | <code>"sm" &#124; "md" &#124; "lg"</code> | <code>"lg"</code> | Specify the size of button skeleton |
13591359
| iconDescription | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the ARIA label used for the status icons |
13601360
| invalid | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to indicate an invalid state |
13611361
| errorSubject | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the error subject text |

docs/src/COMPONENT_API.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4220,8 +4220,8 @@
42204220
"name": "size",
42214221
"kind": "let",
42224222
"description": "Specify the size of button skeleton",
4223-
"type": "\"default\" | \"field\" | \"small\"",
4224-
"value": "\"default\"",
4223+
"type": "\"sm\" | \"md\" | \"lg\"",
4224+
"value": "\"lg\"",
42254225
"isFunction": false,
42264226
"isFunctionDeclaration": false,
42274227
"isRequired": false,

docs/src/pages/components/FileUploader.svx

+4-4
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,11 @@ Use the `errorSubject` and `errorBody` props to customize the error message.
8080

8181
## Item sizes
8282

83-
The default `FileUploaderItem` size is "default".
83+
The default `FileUploaderItem` size is "lg".
8484

85-
<FileUploaderItem size="default" name="README.md" status="uploading" />
86-
<FileUploaderItem size="field" name="README.md" status="uploading" />
87-
<FileUploaderItem size="small" name="README.md" status="uploading" />
85+
<FileUploaderItem size="lg" name="README.md" status="uploading" />
86+
<FileUploaderItem size="md" name="README.md" status="uploading" />
87+
<FileUploaderItem size="sm" name="README.md" status="uploading" />
8888

8989
## Drop container
9090

src/FileUploader/FileUploaderItem.svelte

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
1212
/**
1313
* Specify the size of button skeleton
14-
* @type {"default" | "field" | "small"}
14+
* @type {"sm" | "md" | "lg"}
1515
*/
16-
export let size = "default";
16+
export let size = "lg";
1717
1818
/** Specify the ARIA label used for the status icons */
1919
export let iconDescription = "";
@@ -44,8 +44,8 @@
4444
id="{id}"
4545
class:bx--file__selected-file="{true}"
4646
class:bx--file__selected-file--invalid="{invalid}"
47-
class:bx--file__selected-file--md="{size === 'field'}"
48-
class:bx--file__selected-file--sm="{size === 'small'}"
47+
class:bx--file__selected-file--md="{size === 'md' || size === 'field'}"
48+
class:bx--file__selected-file--sm="{size === 'sm' || size === 'small'}"
4949
{...$$restProps}
5050
on:mouseover
5151
on:mouseenter

types/FileUploader/FileUploaderItem.svelte.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export interface FileUploaderItemProps
1111

1212
/**
1313
* Specify the size of button skeleton
14-
* @default "default"
14+
* @default "lg"
1515
*/
16-
size?: "default" | "field" | "small";
16+
size?: "sm" | "md" | "lg";
1717

1818
/**
1919
* Specify the ARIA label used for the status icons

0 commit comments

Comments
 (0)