import { LitElement, PropertyValues } from "lit"; export type SkyChipVariant = "solid" | "flat" | "shadow" | "bordered" | "faded" | "light" | "dot"; export type SkyChipRemovedEventDetail = { label: string; }; /** * @element sky-chip * * @summary Customizable chip for tags or selections with icon support, removable action, loading state, and visual variants. * * @status stable * @since 1.0.0 * * @documentation https://sky-ui.com/components/chip * @dependency sky-icon * * @slot - Default slot for the chip label or any other content. * @slot prefix - Optional prefix content that can be placed before the label. * @slot suffix - Optional suffix content that can be placed after the label. * * @csspart chip - The visual representation of the chip component. * @csspart icon - The icons displayed within the chip. * @csspart close-button - The button for removing the chip. * @csspart loading-spinner - The spinner that appears during loading. * @csspart error-message - The error message displayed for invalid chips. * * @property {string} label - The label displayed on the chip. Default: `""`. * @property {boolean} removable - Whether the chip can be removed by the user. Default: `false`. * @property {string} color - The background color of the chip, can accept tokens or custom CSS color. Default: `"primary"`. * @property {string} radius - The border radius of the chip. Default: `"full"`. * @property {string} size - The size of the chip, which affects padding and font size. Default: `"md"`. * @property {string} iconL - Left icon; shown only when the `prefix` slot is empty. Default: `null`. * @property {string} iconR - Right icon; shown only when the `suffix` slot is empty. Default: `null`. * @property {boolean} loading - Whether the chip is in a loading state. Default: `false`. * @property {boolean} disabled - Whether the chip is disabled. Default: `false`. * @property {SkyChipVariant} variant - Visual style variant. Default: `"flat"`. * @property {string} preset - Named prop preset from nearest `sky-config-provider`. Default: `""`. * @method removeChip Dispatches `chip-removed` and removes the chip from the DOM. * * @fires {CustomEvent} chip-removed - Fired when the chip is removed by user action. * * @Behavior * - Uses default slot content when present, otherwise falls back to `label`. * - `iconL` / `iconR` render only when `prefix` / `suffix` slots have no meaningful content. * - Emits `chip-removed` and removes itself when removable close action is triggered. * - Resolves color tokens and radius/size presets to CSS values at render time. * * @example * ```html * * ``` * ```vue * * ``` * ```jsx * export default function Demo() { * return ; * } * ``` */ export declare class SkyChip extends LitElement { static dependencies: Record; label: string; removable: boolean; /** Accepts preset tokens OR any valid CSS color (e.g., #0af, rgb(), var(--x)) */ color: string; /** Radius can be any CSS radius value */ radius: string; /** Size controls padding + font-size (xs, sm, md, lg, xl or numeric like "14px") */ size: string; iconL: string | null; iconR: string | null; loading: boolean; disabled: boolean; variant: SkyChipVariant; /** Named prop preset from nearest `sky-config-provider`. */ preset: string; private _presets; static styles: import("lit").CSSResult[]; private _prefixFilled; private _suffixFilled; private _defaultFilled; private _slotFlagsSeeded; /** Updates host CSS variables from current color token/value. */ protected updated(changed: PropertyValues): void; /** Size resolver similar to button: controls padding + font-size */ private _resolveSize; /** * Dispatches `chip-removed` and removes the chip from the DOM. * * @returns {void} */ removeChip(): void; private _slotHasMeaningfulContent; /** Light DOM check works before the shadow tree exists (first render). */ private _hasPrefixSlotContent; private _hasSuffixSlotContent; private _hasDefaultSlotContent; private _seedSlotFlagsFromLightDom; willUpdate(): void; private _onSlotChange; render(): import("lit-html").TemplateResult<1>; }