Skip to content

Commit d7685f9

Browse files
committed
chore: v11 Select
Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.
1 parent 6b98e1a commit d7685f9

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

COMPONENT_INDEX.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3152,7 +3152,7 @@ None.
31523152
| :---------- | :------- | :--------------- | :------- | ------------------------------------------ | ------------------------------------------------ | ----------------------------------------------- |
31533153
| ref | No | <code>let</code> | Yes | <code>null &#124; HTMLSelectElement</code> | <code>null</code> | Obtain a reference to the select HTML element |
31543154
| selected | No | <code>let</code> | Yes | <code>string &#124; number</code> | <code>undefined</code> | Specify the selected item value |
3155-
| size | No | <code>let</code> | No | <code>"sm" &#124; "xl"</code> | <code>undefined</code> | Set the size of the select input |
3155+
| size | No | <code>let</code> | No | <code>"sm" &#124; "lg"</code> | <code>undefined</code> | Set the size of the select input |
31563156
| inline | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to use the inline variant |
31573157
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
31583158
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the select element |

docs/src/COMPONENT_API.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10059,7 +10059,7 @@
1005910059
"name": "size",
1006010060
"kind": "let",
1006110061
"description": "Set the size of the select input",
10062-
"type": "\"sm\" | \"xl\"",
10062+
"type": "\"sm\" | \"lg\"",
1006310063
"isFunction": false,
1006410064
"isFunctionDeclaration": false,
1006510065
"isRequired": false,

docs/src/pages/components/Select.svx

+2-2
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ The `selected` prop is reactive and supports two-way binding.
104104
<SelectItem value="g100" text="Gray 100" />
105105
</Select>
106106

107-
## Extra-large size
107+
## Large size
108108

109-
<Select size="xl" labelText="Carbon theme" selected="g10" >
109+
<Select size="lg" labelText="Carbon theme" selected="g10" >
110110
<SelectItem value="white" text="White" />
111111
<SelectItem value="g10" text="Gray 10" />
112112
<SelectItem value="g80" text="Gray 80" />

src/Select/Select.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
1212
/**
1313
* Set the size of the select input
14-
* @type {"sm" | "xl"}
14+
* @type {"sm" | "lg"}
1515
*/
1616
export let size = undefined;
1717
@@ -161,7 +161,7 @@
161161
name="{name}"
162162
class:bx--select-input="{true}"
163163
class:bx--select-input--sm="{size === 'sm'}"
164-
class:bx--select-input--xl="{size === 'xl'}"
164+
class:bx--select-input--lg="{size === 'lg' || size === 'xl'}"
165165
on:change="{handleChange}"
166166
on:change
167167
on:input
@@ -205,7 +205,7 @@
205205
aria-invalid="{invalid || undefined}"
206206
class:bx--select-input="{true}"
207207
class:bx--select-input--sm="{size === 'sm'}"
208-
class:bx--select-input--xl="{size === 'xl'}"
208+
class:bx--select-input--lg="{size === 'lg' || size === 'xl'}"
209209
on:change="{handleChange}"
210210
on:change
211211
on:input

tests/Select.test.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<SelectItem value="g100" text="Gray 100" />
4141
</Select>
4242

43-
<Select size="xl" labelText="Carbon theme" selected="g10">
43+
<Select size="lg" labelText="Carbon theme" selected="g10">
4444
<SelectItem value="white" text="White" />
4545
<SelectItem value="g10" text="Gray 10" />
4646
<SelectItem value="g90" text="Gray 90" />

types/Select/Select.svelte.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export interface SelectProps
1313
* Set the size of the select input
1414
* @default undefined
1515
*/
16-
size?: "sm" | "xl";
16+
size?: "sm" | "lg";
1717

1818
/**
1919
* Set to `true` to use the inline variant

0 commit comments

Comments
 (0)