mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
chore: rebuild types, docs
This commit is contained in:
parent
12fcb881da
commit
3585b9ca48
3 changed files with 14 additions and 8 deletions
|
@ -1626,7 +1626,7 @@ export interface HeaderSearchResult {
|
|||
|
||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||
| :------------------ | :--------------- | :------- | :---------------------------------------- | ------------------ | -------------------------------------------------- |
|
||||
| selectedResultIndex | <code>let</code> | Yes | <code>number</code> | <code>-1</code> | Specify the selected result index |
|
||||
| selectedResultIndex | <code>let</code> | Yes | <code>number</code> | <code>0</code> | Specify the selected result index |
|
||||
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
||||
| active | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to activate and focus the search bar |
|
||||
| value | <code>let</code> | Yes | <code>string</code> | <code>""</code> | Specify the search input value |
|
||||
|
@ -1634,14 +1634,16 @@ export interface HeaderSearchResult {
|
|||
|
||||
### Slots
|
||||
|
||||
| Slot name | Default | Props | Fallback |
|
||||
| :-------- | :------ | :---------------------------- | :------------------------------------------------------------------------------------------------------------ |
|
||||
| -- | Yes | <code>{ result: any } </code> | <code>{result.text}<br /> {#if result.description}<span>– {result.description}</span>{/if}</code> |
|
||||
| Slot name | Default | Props | Fallback |
|
||||
| :-------- | :------ | :---------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------ |
|
||||
| -- | Yes | <code>{ result: HeaderSearchResult; index: number } </code> | <code>{result.text}<br /> {#if result.description}<span>– {result.description}</span>{/if}</code> |
|
||||
|
||||
### Events
|
||||
|
||||
| Event name | Type | Detail |
|
||||
| :--------- | :--------- | :---------------------------------------------------------------------------------------------- |
|
||||
| active | dispatched | <code>any</code> |
|
||||
| inactive | dispatched | <code>any</code> |
|
||||
| clear | dispatched | <code>any</code> |
|
||||
| select | dispatched | <code>{ value: string; selectedResultIndex: number; selectedResult: HeaderSearchResult }</code> |
|
||||
| change | forwarded | -- |
|
||||
|
|
|
@ -10307,7 +10307,7 @@
|
|||
"kind": "let",
|
||||
"description": "Specify the selected result index",
|
||||
"type": "number",
|
||||
"value": "-1",
|
||||
"value": "0",
|
||||
"isFunction": false,
|
||||
"constant": false,
|
||||
"reactive": true
|
||||
|
@ -10318,10 +10318,12 @@
|
|||
"name": "__default__",
|
||||
"default": true,
|
||||
"fallback": "{result.text}\n {#if result.description}<span>– {result.description}</span>{/if}",
|
||||
"slot_props": "{ result: any }"
|
||||
"slot_props": "{ result: HeaderSearchResult; index: number }"
|
||||
}
|
||||
],
|
||||
"events": [
|
||||
{ "type": "dispatched", "name": "active", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "inactive", "detail": "any" },
|
||||
{ "type": "dispatched", "name": "clear", "detail": "any" },
|
||||
{
|
||||
"type": "dispatched",
|
||||
|
|
6
types/UIShell/HeaderSearch.d.ts
vendored
6
types/UIShell/HeaderSearch.d.ts
vendored
|
@ -33,7 +33,7 @@ export interface HeaderSearchProps extends svelte.JSX.HTMLAttributes<HTMLElement
|
|||
|
||||
/**
|
||||
* Specify the selected result index
|
||||
* @default -1
|
||||
* @default 0
|
||||
*/
|
||||
selectedResultIndex?: number;
|
||||
}
|
||||
|
@ -41,9 +41,11 @@ export interface HeaderSearchProps extends svelte.JSX.HTMLAttributes<HTMLElement
|
|||
export default class HeaderSearch {
|
||||
$$prop_def: HeaderSearchProps;
|
||||
$$slot_def: {
|
||||
default: { result: any };
|
||||
default: { result: HeaderSearchResult; index: number };
|
||||
};
|
||||
|
||||
$on(eventname: "active", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: "inactive", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(eventname: "clear", cb: (event: CustomEvent<any>) => void): () => void;
|
||||
$on(
|
||||
eventname: "select",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue