import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; type $RestProps = SvelteHTMLElements["button"]; type $Props = { /** * Set to `true` to select the tag. * @default false */ selected?: boolean; /** * Specify the type of tag. * @default undefined */ type?: | "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | "outline"; /** * @default "default" */ size?: "sm" | "default"; /** * Set to `true` to disable the tag * @default false */ disabled?: boolean; /** * Specify the icon to render. * @default undefined */ icon?: Icon; /** * Set an id for the tag * @default `ccs-${Math.random().toString(36)}` */ id?: string; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type SelectableTagProps = Omit< $RestProps, keyof $Props > & $Props; export default class SelectableTag extends SvelteComponentTyped< SelectableTagProps, { change: CustomEvent<{ selected: boolean }>; click: WindowEventMap["click"]; keydown: WindowEventMap["keydown"]; mouseenter: WindowEventMap["mouseenter"]; mouseleave: WindowEventMap["mouseleave"]; mouseover: WindowEventMap["mouseover"]; }, { default: Record; icon: Record } > {}