import { EventEmitter } from '../../stencil-public-runtime'; import { BackgroundColorsTokenType, BreakpointsTokenType, TextColorsTokenType } from '../../types/design-token.type'; import { ResponsiveType } from '../../types/ui.type'; import { VegaChipIconAlign, VegaChipSize, VegaChipType, VegaChipVariant } from './types'; import { GlobalSlimmers } from '../../vega-slimmer/vega-slimmer-core'; import { PageResizeObserverSlimmer } from '../../helpers/slimmers/page-resize-observer-slimmer'; import { EventEmitSlimmerBase } from '../../helpers/event-manager/slimmers/event-emit-slimmer'; import { ChildNodesEventPreventSlimmer } from '../../helpers/event-manager/slimmers/child-nodes-event-prevent-slimmer'; import { VegaComponentUsageRuntimeMetricsSlimmer } from '../../helpers/slimmers/component-usage-runtime-metrics'; /** * @vegaVersion 1.11.0 */ export declare class VegaChip { private static readonly iconSizeMap; private static readonly closeIconSizeMap; protected readonly globalSlimmers: GlobalSlimmers; /** * The below method is e2e-test covered in * @see{module:vega-chip-resize-e2e} */ protected readonly pageResizeObserverSlimmer: PageResizeObserverSlimmer; protected flexEventPrevent: ChildNodesEventPreventSlimmer; protected closeEventEmit: EventEmitSlimmerBase; protected clickEventEmit: EventEmitSlimmerBase; protected vegaComponentUsageRuntimeMetricsSlimmer: VegaComponentUsageRuntimeMetricsSlimmer; private vegaFlexRef; host: HTMLVegaChipElement; currentBreakpoint: BreakpointsTokenType; currentSize: VegaChipSize; /** * Specifies the label or title for the chip. * * It provides descriptive text that helps identify * the purpose or category of the chip. * * @vegaVersion 1.11.0 */ text: string; /** * Specifies whether the chip is clickable. * * @vegaVersion 1.11.0 */ clickable: boolean; /** * Determines the rendering style for the chip. * * @vegaVersion 1.11.0 */ variant: VegaChipVariant; /** * Specifies the size of the chip. * * @vegaVersion 1.11.0 */ size: ResponsiveType; watchSize(): void; /** * Specifies the background color of the chip. * * This property is only applicable when using the `filled-background` variant, * which is a specific style option for the chip. * * @vegaVersion 1.11.0 */ bgColor: BackgroundColorsTokenType; /** * Specifies the color of the text displayed within the chip. * * @vegaVersion 1.11.0 */ textColor: TextColorsTokenType; /** * Specifies the color of the status dot when * the chip's type is set to `status`. * * @vegaVersion 1.11.0 */ statusColor: BackgroundColorsTokenType; /** * Specifies the type of the chip, * determining its visual appearance and behavior. * * There are two available options: `status` and `label`: * - When `chipType` is set to `status`, the chip will display a dot as a prefix. * This style is commonly used to indicate a specific status * or state associated with the chip. * The `icon` and `iconAlign` properties are disabled in this mode. * - On the other hand, when `chipType` is set to `label`, * the chip allows for more flexibility in positioning the icon. * You can choose to have the icon as a prefix or a suffix to the label text. * This type is commonly used when the chip represents a label or category. * * @vegaVersion 1.11.0 */ chipType: VegaChipType; /** * Controls the visibility of a close button within the chip. * * @vegaVersion 1.11.0 */ showCloseIcon: boolean; /** * Displays an icon in the chip. This property is applicable only when * the chip's type is set to `label`. * * @vegaVersion 1.11.0 */ icon: string; /** * Specifies the placement or alignment of the icon within * the chip in relation to the chip's text. * * @vegaVersion 1.11.0 */ iconAlign: VegaChipIconAlign; /** * Specifies the color of the icon displayed within the chip. * * This property is applicable only when the chip's type is set to `label` * and an `icon` is provided. * * @vegaVersion 2.81.0 */ iconColor: TextColorsTokenType; /** * An event emitter notifying the click event of the close button of the chip. * * This event is only dispatched when the `showCloseIcon` property is set to `true`. * * @vegaVersion 1.11.0 */ vegaClose: EventEmitter; /** * An event emitter notifying the click event of the close button of the chip. * * @eventSemantics namespace:native * @vegaVersion 2.0.0 */ close: EventEmitter; /** * An event emitter notifying the click event of the chip. * * This event is only dispatched when the `clickable` property is set to `true`. * * @vegaVersion 1.11.0 */ vegaClick: EventEmitter; /** * An event emitter notifying the click event of the chip. * * @eventSemantics namespace:native * @vegaVersion 2.0.0 */ click: EventEmitter; componentWillLoad(): void; render(): VegaChip; private renderChip; private renderLabelChip; private renderButtonChip; private renderContent; private renderPrefixIcon; private renderSuffixIcon; private renderCloseIcon; private renderIcon; private renderDot; private renderText; private setCurrentSize; private closeChip; private clickChip; private getFlexGap; private getChipClasses; }