mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
chore: v11 ComboBox
Size `xl` changed to `lg`. For better compatibility with existing codebases size `xl` is still supported.
This commit is contained in:
parent
cafa258896
commit
8cf61bd0f7
8 changed files with 12 additions and 12 deletions
|
@ -662,7 +662,7 @@ export interface ComboBoxItem {
|
|||
| items | No | <code>let</code> | No | <code>ReadonlyArray<ComboBoxItem></code> | <code>[]</code> | Set the combobox items |
|
||||
| itemToString | No | <code>let</code> | No | <code>(item: ComboBoxItem) => string</code> | <code>(item) => item.text || item.id</code> | Override the display of a combobox item |
|
||||
| direction | No | <code>let</code> | No | <code>"bottom" | "top"</code> | <code>"bottom"</code> | Specify the direction of the combobox dropdown menu |
|
||||
| size | No | <code>let</code> | No | <code>"sm" | "xl"</code> | <code>undefined</code> | Set the size of the combobox |
|
||||
| size | No | <code>let</code> | No | <code>"sm" | "lg" </code> | <code>undefined</code> | Set the size of the combobox |
|
||||
| disabled | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the combobox |
|
||||
| titleText | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the title text of the combobox |
|
||||
| placeholder | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the placeholder text |
|
||||
|
@ -1991,7 +1991,7 @@ None.
|
|||
|
||||
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
|
||||
| :---------- | :------- | :--------------- | :------- | -------------------------------------- | ---------------------- | ------------------------------------------ |
|
||||
| size | No | <code>let</code> | No | <code>"sm" | "xl"</code> | <code>undefined</code> | Set the size of the list box |
|
||||
| size | No | <code>let</code> | No | <code>"sm" | "lg" </code> | <code>undefined</code> | Set the size of the list box |
|
||||
| type | No | <code>let</code> | No | <code>"default" | "inline"</code> | <code>"default"</code> | Set the type of the list box |
|
||||
| open | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to open the list box |
|
||||
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
||||
|
|
|
@ -1515,7 +1515,7 @@
|
|||
"name": "size",
|
||||
"kind": "let",
|
||||
"description": "Set the size of the combobox",
|
||||
"type": "\"sm\" | \"xl\"",
|
||||
"type": "\"sm\" | \"lg\" ",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
|
@ -5863,7 +5863,7 @@
|
|||
"name": "size",
|
||||
"kind": "let",
|
||||
"description": "Set the size of the list box",
|
||||
"type": "\"sm\" | \"xl\"",
|
||||
"type": "\"sm\" | \"lg\" ",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
|
|
|
@ -80,10 +80,10 @@ items={[
|
|||
{id: "2", text: "Fax"}
|
||||
]} />
|
||||
|
||||
## Extra-large size
|
||||
## Large size
|
||||
|
||||
<ComboBox titleText="Contact" placeholder="Select contact method"
|
||||
size="xl"
|
||||
size="lg"
|
||||
items={[
|
||||
{id: "0", text: "Slack"},
|
||||
{id: "1", text: "Email"},
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
/**
|
||||
* Set the size of the combobox
|
||||
* @type {"sm" | "xl"}
|
||||
* @type {"sm" | "lg" }
|
||||
*/
|
||||
export let size = undefined;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script>
|
||||
/**
|
||||
* Set the size of the list box
|
||||
* @type {"sm" | "xl"}
|
||||
* @type {"sm" | "lg" }
|
||||
*/
|
||||
export let size = undefined;
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
|||
data-invalid="{invalid || undefined}"
|
||||
class:bx--list-box="{true}"
|
||||
class:bx--list-box--sm="{size === 'sm'}"
|
||||
class:bx--list-box--xl="{size === 'xl'}"
|
||||
class:bx--list-box--lg="{size === 'lg' || size === 'xl'}"
|
||||
class:bx--list-box--inline="{type === 'inline'}"
|
||||
class:bx--list-box--disabled="{disabled}"
|
||||
class:bx--list-box--expanded="{open}"
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
<ComboBox
|
||||
titleText="Contact"
|
||||
placeholder="Select contact method"
|
||||
size="xl"
|
||||
size="lg"
|
||||
items="{items}"
|
||||
/>
|
||||
|
||||
|
|
2
types/ComboBox/ComboBox.svelte.d.ts
vendored
2
types/ComboBox/ComboBox.svelte.d.ts
vendored
|
@ -46,7 +46,7 @@ export interface ComboBoxProps extends RestProps {
|
|||
* Set the size of the combobox
|
||||
* @default undefined
|
||||
*/
|
||||
size?: "sm" | "xl";
|
||||
size?: "sm" | "lg";
|
||||
|
||||
/**
|
||||
* Set to `true` to disable the combobox
|
||||
|
|
2
types/ListBox/ListBox.svelte.d.ts
vendored
2
types/ListBox/ListBox.svelte.d.ts
vendored
|
@ -8,7 +8,7 @@ export interface ListBoxProps extends RestProps {
|
|||
* Set the size of the list box
|
||||
* @default undefined
|
||||
*/
|
||||
size?: "sm" | "xl";
|
||||
size?: "sm" | "lg";
|
||||
|
||||
/**
|
||||
* Set the type of the list box
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue