feat(search)!: integrate Search with v11 (#1970)

This commit is contained in:
Eric Liu 2024-05-05 13:31:26 -07:00 committed by GitHub
commit cf41756cf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 105 additions and 189 deletions

View file

@ -22,12 +22,6 @@ export interface SearchProps extends RestProps {
*/
searchClass?: string;
/**
* Set to `true` to display the skeleton state
* @default false
*/
skeleton?: boolean;
/**
* Set to `true` to enable the light variant
* @default false
@ -109,10 +103,6 @@ export default class Search extends SvelteComponentTyped<
{
expand: CustomEvent<null>;
collapse: CustomEvent<null>;
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
change: WindowEventMap["change"];
input: WindowEventMap["input"];
focus: WindowEventMap["focus"];
@ -120,6 +110,7 @@ export default class Search extends SvelteComponentTyped<
keydown: WindowEventMap["keydown"];
keyup: WindowEventMap["keyup"];
paste: DocumentAndElementEventHandlersEventMap["paste"];
click: WindowEventMap["click"];
clear: CustomEvent<null>;
},
{ labelText: {} }

View file

@ -1,25 +1,15 @@
import type { SvelteComponentTyped } from "svelte";
import type { SvelteHTMLElements } from "svelte/elements";
type RestProps = SvelteHTMLElements["div"];
export interface SearchSkeletonProps extends RestProps {
export interface SearchSkeletonProps {
/**
* Specify the size of the search input
* @default "md"
*/
size?: "sm" | "md" | "lg";
[key: `data-${string}`]: any;
}
export default class SearchSkeleton extends SvelteComponentTyped<
SearchSkeletonProps,
{
click: WindowEventMap["click"];
mouseover: WindowEventMap["mouseover"];
mouseenter: WindowEventMap["mouseenter"];
mouseleave: WindowEventMap["mouseleave"];
},
Record<string, any>,
{}
> {}