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. */ type?: "red" | "magenta" | "purple" | "blue" | "cyan" | "teal" | "green" | "gray" | "cool-gray" | "warm-gray" | "high-contrast" | "outline" | undefined; /** * Specify the size of the tag. * Defaults to `"default"`, or to the `size` of a parent `TagSet`. * Also accepts Carbon v11's `"md"` (`"default"`). */ size?: "xs" | "sm" | "default" | "lg" | "md" | undefined; /** * Set to `true` to disable the tag * @default false */ disabled?: boolean; /** * Specify the icon to render. */ icon?: Icon | undefined; /** * Specify a value that identifies the tag inside a `TagSet`. * Returned as `tag.value` in the set's `close:tag` event. */ value?: string | number | undefined; /** * Set an id for the tag * @default uniqueId() */ 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; } > {}