import { SvelteComponentTyped } from "svelte"; import type { SvelteHTMLElements } from "svelte/elements"; export type CarbonAILabelHostContext = { size: import("svelte/store").Writable; state: { set: (value: undefined | "active" | "revert") => void }; /** Set the size an `AILabel` renders at, or derive it from the label variant. */ labelSize: string | ((variant: "default" | "inline") => string); /** Force the variant of an `AILabel`. */ labelVariant: undefined | "default" | "inline"; /** Set the default alignment of the explanation. */ labelAlign: "start" | "center" | "end"; }; type $RestProps = SvelteHTMLElements["div"]; type $Props = { /** * Receives the state of an `AILabel` in the slot. */ state: { set: (value: undefined | "active" | "revert") => void }; /** * Set the host's size, which sizes the revert button in extra-small fields. */ size?: undefined | string; /** * Set the size an `AILabel` renders at, or derive it from the label variant. * @default "mini" */ labelSize?: string | ((variant: "default" | "inline") => string); /** * Force the variant of an `AILabel`. */ labelVariant?: undefined | "default" | "inline"; /** * Set the default alignment of the explanation. * @default "end" */ labelAlign?: "start" | "center" | "end"; children?: (this: void) => void; [key: `data-${string}`]: unknown; }; export type DecoratorProps = Omit<$RestProps, keyof $Props> & $Props; export default class Decorator extends SvelteComponentTyped< DecoratorProps, Record, { default: Record } > {}