import { RadiantElement } from '@ecopages/radiant'; import type { EventEmitter } from '@ecopages/radiant/tools/event-emitter'; export type RuiTagGroupSelectionMode = 'single' | 'multiple'; export type RuiTagGroupItem = { value: string; label: string; }; export type RuiTagGroupProps = { value?: string; label?: string; disabled?: boolean; selectionMode?: RuiTagGroupSelectionMode; /** Disables selection when the parent component owns the selected values. */ embedded?: boolean; }; export type RuiTagGroupChangeDetail = { value: string; }; export type RuiTagGroupRemoveDetail = { value: string; }; /** * `` — a focusable list of tags with optional selection and removal. * * Compose with `data-tag` items and optional `data-tag-remove` buttons inside each tag. * Use inside `RuiSelectValue` to display multi-select chips. * * @see https://react-aria.adobe.com/TagGroup * @element rui-tag-group * @attr {string} value - Comma-separated selected values. * @attr {string} label - Accessible name for the tag list. * @attr {boolean} disabled - Disable selection and removal. Default: `false`. * @attr {('single'|'multiple')} selection-mode - Allow one or many selected tags. Default: `multiple`. * @attr {boolean} embedded - Disables selection when the parent component owns the selected values. Default: `false`. * @fires rui-change - Emitted when the selected `value` changes; `detail.value` is the comma-separated value. * @fires rui-remove - Emitted when a tag is removed; `detail.value` is the removed tag's value. * @cssclass rui-tag-group - Root wrapper around the tag list. */ export declare class RuiTagGroup extends RadiantElement { value: string; label: string; disabled: boolean; selectionMode: RuiTagGroupSelectionMode; embedded: boolean; changeEvent: EventEmitter; removeEvent: EventEmitter; private readonly uid; private managedItems; private isMultiple; private getSelectedValues; private setSelectedValues; private getList; private getTags; private getVisibleTags; private getTagValue; private getTagLabel; private ensureTagIds; private syncList; private syncTags; private selectTag; private removeTag; private initialize; protected onConnected(): void; onPropsUpdated(): void; resync(): void; setItems(items: RuiTagGroupItem[]): void; /** * Imperative twin of the view's `RuiTag` / `RuiTagRemove` markup for * CE-managed items (same `data-*` hooks, classes, and remove glyph). */ private createManagedTag; private syncManagedList; onTagClick(event: Event): void; onRemoveClick(event: Event): void; onTagKeydown(event: KeyboardEvent): void; }