mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
chore: v11 Search
This commit is contained in:
parent
a583453436
commit
019f9773a8
7 changed files with 18 additions and 18 deletions
|
@ -3102,7 +3102,7 @@ None.
|
||||||
| ref | No | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
| ref | No | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
||||||
| expanded | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true to expand the search input |
|
| expanded | No | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true to expand the search input |
|
||||||
| value | No | <code>let</code> | Yes | <code>any</code> | <code>""</code> | Specify the value of the search input |
|
| value | No | <code>let</code> | Yes | <code>any</code> | <code>""</code> | Specify the value of the search input |
|
||||||
| size | No | <code>let</code> | No | <code>"sm" | "lg" | "xl"</code> | <code>"xl"</code> | Specify the size of the search input |
|
| size | No | <code>let</code> | No | <code>"sm" | "md" | "lg"</code> | <code>"md"</code> | Specify the size of the search input |
|
||||||
| searchClass | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the class name passed to the outer div element |
|
| searchClass | No | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the class name passed to the outer div element |
|
||||||
| skeleton | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to display the skeleton state |
|
| skeleton | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to display the skeleton state |
|
||||||
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
| light | No | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
||||||
|
@ -3147,7 +3147,7 @@ None.
|
||||||
|
|
||||||
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Required | Kind | Reactive | Type | Default value | Description |
|
||||||
| :-------- | :------- | :--------------- | :------- | ----------------------------------------- | ----------------- | ------------------------------------ |
|
| :-------- | :------- | :--------------- | :------- | ----------------------------------------- | ----------------- | ------------------------------------ |
|
||||||
| size | No | <code>let</code> | No | <code>"sm" | "lg" | "xl"</code> | <code>"xl"</code> | Specify the size of the search input |
|
| size | No | <code>let</code> | No | <code>"sm" | "md" | "lg"</code> | <code>"md"</code> | Specify the size of the search input |
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
|
|
@ -9926,8 +9926,8 @@
|
||||||
"name": "size",
|
"name": "size",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
"description": "Specify the size of the search input",
|
"description": "Specify the size of the search input",
|
||||||
"type": "\"sm\" | \"lg\" | \"xl\"",
|
"type": "\"sm\" | \"md\" | \"lg\"",
|
||||||
"value": "\"xl\"",
|
"value": "\"md\"",
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"isFunctionDeclaration": false,
|
"isFunctionDeclaration": false,
|
||||||
"isRequired": false,
|
"isRequired": false,
|
||||||
|
@ -10150,8 +10150,8 @@
|
||||||
"name": "size",
|
"name": "size",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
"description": "Specify the size of the search input",
|
"description": "Specify the size of the search input",
|
||||||
"type": "\"sm\" | \"lg\" | \"xl\"",
|
"type": "\"sm\" | \"md\" | \"lg\"",
|
||||||
"value": "\"xl\"",
|
"value": "\"md\"",
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"isFunctionDeclaration": false,
|
"isFunctionDeclaration": false,
|
||||||
"isRequired": false,
|
"isRequired": false,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
## Default
|
## Default
|
||||||
|
|
||||||
The `Search` component size is extra-large by default. There are [large](#large-size) and [small](#small-size) size variants.
|
The `Search` component size is medium by default. There are [large](#large-size) and [small](#small-size) size variants.
|
||||||
|
|
||||||
<Search />
|
<Search />
|
||||||
|
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the size of the search input
|
* Specify the size of the search input
|
||||||
* @type {"sm" | "lg" | "xl"}
|
* @type {"sm" | "md" | "lg"}
|
||||||
*/
|
*/
|
||||||
export let size = "xl";
|
export let size = "md";
|
||||||
|
|
||||||
/** Specify the class name passed to the outer div element */
|
/** Specify the class name passed to the outer div element */
|
||||||
export let searchClass = "";
|
export let searchClass = "";
|
||||||
|
@ -96,8 +96,8 @@
|
||||||
class:bx--search--light="{light}"
|
class:bx--search--light="{light}"
|
||||||
class:bx--search--disabled="{disabled}"
|
class:bx--search--disabled="{disabled}"
|
||||||
class:bx--search--sm="{size === 'sm'}"
|
class:bx--search--sm="{size === 'sm'}"
|
||||||
|
class:bx--search--md="{size === 'md'}"
|
||||||
class:bx--search--lg="{size === 'lg'}"
|
class:bx--search--lg="{size === 'lg'}"
|
||||||
class:bx--search--xl="{size === 'xl'}"
|
|
||||||
class:bx--search--expandable="{expandable}"
|
class:bx--search--expandable="{expandable}"
|
||||||
class:bx--search--expanded="{expanded}"
|
class:bx--search--expanded="{expanded}"
|
||||||
class="{searchClass}"
|
class="{searchClass}"
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
dispatch('clear');
|
dispatch('clear');
|
||||||
}}"
|
}}"
|
||||||
>
|
>
|
||||||
<svelte:component this="{Close}" size="{size === 'xl' ? 20 : 16}" />
|
<Close />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* Specify the size of the search input
|
* Specify the size of the search input
|
||||||
* @type {"sm" | "lg" | "xl"}
|
* @type {"sm" | "md" | "lg"}
|
||||||
*/
|
*/
|
||||||
export let size = "xl";
|
export let size = "md";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
<!-- svelte-ignore a11y-mouse-events-have-key-events -->
|
||||||
|
@ -11,8 +11,8 @@
|
||||||
<div
|
<div
|
||||||
class:bx--skeleton="{true}"
|
class:bx--skeleton="{true}"
|
||||||
class:bx--search--sm="{size === 'sm'}"
|
class:bx--search--sm="{size === 'sm'}"
|
||||||
|
class:bx--search--md="{size === 'md'}"
|
||||||
class:bx--search--lg="{size === 'lg'}"
|
class:bx--search--lg="{size === 'lg'}"
|
||||||
class:bx--search--xl="{size === 'xl'}"
|
|
||||||
{...$$restProps}
|
{...$$restProps}
|
||||||
on:click
|
on:click
|
||||||
on:mouseover
|
on:mouseover
|
||||||
|
|
4
types/Search/Search.svelte.d.ts
vendored
4
types/Search/Search.svelte.d.ts
vendored
|
@ -12,9 +12,9 @@ export interface SearchProps extends RestProps {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the size of the search input
|
* Specify the size of the search input
|
||||||
* @default "xl"
|
* @default "md"
|
||||||
*/
|
*/
|
||||||
size?: "sm" | "lg" | "xl";
|
size?: "sm" | "md" | "lg";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the class name passed to the outer div element
|
* Specify the class name passed to the outer div element
|
||||||
|
|
4
types/Search/SearchSkeleton.svelte.d.ts
vendored
4
types/Search/SearchSkeleton.svelte.d.ts
vendored
|
@ -6,9 +6,9 @@ type RestProps = SvelteHTMLElements["div"];
|
||||||
export interface SearchSkeletonProps extends RestProps {
|
export interface SearchSkeletonProps extends RestProps {
|
||||||
/**
|
/**
|
||||||
* Specify the size of the search input
|
* Specify the size of the search input
|
||||||
* @default "xl"
|
* @default "md"
|
||||||
*/
|
*/
|
||||||
size?: "sm" | "lg" | "xl";
|
size?: "sm" | "md" | "lg";
|
||||||
|
|
||||||
[key: `data-${string}`]: any;
|
[key: `data-${string}`]: any;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue