import { PropertyValues } from 'lit'; import { SlotPresenceController } from '../../controllers/slot-presence-controller/index.js'; import { SlotTextController } from '../../controllers/slot-text-controller/index.js'; import { SpectrumElement } from '../../element/index.js'; import { BadgeSize, BadgeVariant, FixedValues } from './Badge.types.js'; declare const BadgeBase_base: typeof SpectrumElement & { new (...args: any[]): import('../../mixins/index.js').SizedElementInterface; prototype: import('../../mixins/index.js').SizedElementInterface; } & import('../../mixins/index.js').SizedElementConstructor; /** * A badge component that displays short, descriptive information about an element. * Badges are typically used to indicate status, categories, or provide supplementary information. * * @attribute {ElementSize} size - The size of the badge. * * @slot - Text label of the badge. * @slot icon - Optional icon that appears to the left of the label */ export declare abstract class BadgeBase extends BadgeBase_base { /** * The size of the badge. * * @default s */ size: BadgeSize; /** * @internal * * A readonly array of the valid color variants for the badge. * * This is an actual internal property, intended not for customer use * but for use in internal validation logic, stories, tests, etc. * * Because S1 and S2 support different color variants, the value of this * property must be set in each subclass. */ static readonly VARIANTS_COLOR: readonly string[]; /** * @internal * * A readonly array of all valid variants for the badge. * * This is an actual internal property, intended not for customer use * but for use in internal validation logic, stories, tests, etc. * * Because S1 and S2 support different variants, the value of this * property must be set in each subclass. */ static readonly VARIANTS: readonly string[]; /** * @internal * * The variant of the badge. * * This is a public property, but its valid values vary between S1 and S2, * so the property (and its docs) need to be redefined in each subclass. * * The type declared here is a union of the valid values for S1 and S2, * and should be narrowed in each subclass. */ variant: BadgeVariant; /** * @internal */ static readonly FIXED_VALUES: readonly string[]; /** * @internal */ static readonly VARIANTS_SEMANTIC: readonly string[]; /** * The fixed position of the badge. */ fixed?: FixedValues; /** * Whether the badge is subtle. */ subtle: boolean; /** * Whether the badge is outlined. * * Can only be used with semantic variants. */ outline: boolean; /** * Observes whether an icon is slotted into `[slot="icon"]`. * * @internal */ protected slotPresence: SlotPresenceController; /** * Observes whether the default slot has meaningful text content. The default * slot must bind `@slotchange=${this.slotText.handleSlotChange}` for changes * after the first render to be tracked. * * @internal */ protected slotText: SlotTextController; /** * @internal * * Used for rendering gap when the badge has an icon. */ protected get hasIcon(): boolean; /** * Whether the default slot has meaningful text content. Consumed by the * concrete element's `render()` to toggle icon-only presentation (the * `swc-Badge--no-label` class and its icon-only padding tokens). * * @internal */ protected get slotHasContent(): boolean; protected update(changedProperties: PropertyValues): void; } export {};