mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
Upgrade sveld to v0.10 (#856)
* chore(deps-dev): upgrade sveld to v0.10.2 * feat(types): regenerate types using sveld@0.10.2 * fix(types): update @extends to use .svelte extension
This commit is contained in:
parent
c6fc8548d3
commit
3203e7a61f
190 changed files with 345 additions and 263 deletions
61
types/UIShell/HeaderSearch.svelte.d.ts
vendored
Normal file
61
types/UIShell/HeaderSearch.svelte.d.ts
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
/// <reference types="svelte" />
|
||||
import { SvelteComponentTyped } from "svelte";
|
||||
|
||||
export interface HeaderSearchResult {
|
||||
href: string;
|
||||
text: string;
|
||||
description?: string;
|
||||
}
|
||||
|
||||
export interface HeaderSearchProps
|
||||
extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["input"]> {
|
||||
/**
|
||||
* Specify the search input value
|
||||
* @default ""
|
||||
*/
|
||||
value?: string;
|
||||
|
||||
/**
|
||||
* Set to `true` to activate and focus the search bar
|
||||
* @default false
|
||||
*/
|
||||
active?: boolean;
|
||||
|
||||
/**
|
||||
* Obtain a reference to the input HTML element
|
||||
* @default null
|
||||
*/
|
||||
ref?: null | HTMLInputElement;
|
||||
|
||||
/**
|
||||
* Render a list of search results
|
||||
* @default []
|
||||
*/
|
||||
results?: HeaderSearchResult[];
|
||||
|
||||
/**
|
||||
* Specify the selected result index
|
||||
* @default 0
|
||||
*/
|
||||
selectedResultIndex?: number;
|
||||
}
|
||||
|
||||
export default class HeaderSearch extends SvelteComponentTyped<
|
||||
HeaderSearchProps,
|
||||
{
|
||||
active: CustomEvent<any>;
|
||||
inactive: CustomEvent<any>;
|
||||
clear: CustomEvent<any>;
|
||||
select: CustomEvent<{
|
||||
value: string;
|
||||
selectedResultIndex: number;
|
||||
selectedResult: HeaderSearchResult;
|
||||
}>;
|
||||
change: WindowEventMap["change"];
|
||||
input: WindowEventMap["input"];
|
||||
focus: WindowEventMap["focus"];
|
||||
blur: WindowEventMap["blur"];
|
||||
keydown: WindowEventMap["keydown"];
|
||||
},
|
||||
{ default: { result: HeaderSearchResult; index: number } }
|
||||
> {}
|
Loading…
Add table
Add a link
Reference in a new issue