import type { OpenDetail } from '../shared/events.js'; import { UiElement } from '../shared/element.js'; /** When chosen options move to the top of the list (Carbon `selectionFeedback`). */ export type SelectionFeedback = 'top-after-reopen' | 'top' | 'fixed'; /** How the text of a `filterable` multi select narrows the list; `none` leaves it to a server search. */ export type MultiSelectFilter = 'contains' | 'starts-with' | 'none'; /** * Carbon-style multi select (Carbon `MultiSelect`, downshift useSelect + useMultipleSelection): * a field that always shows its placeholder text, a count tag with a clear button once something * is chosen, and a list of checkbox rows that stays open while choosing. * * - Options are ``s the groups stay as authored and nothing moves. * - `select-all` adds a first row that checks / unchecks every enabled option (indeterminate in between). * - `filterable` (Carbon `FilterableMultiSelect` / `cds-multi-select filterable`): the field is a text box * that narrows the list as you type (`filter`: `contains`, Carbon's rule, or `starts-with`) and * highlights the first row; × clears the text. Choosing keeps the text and the list open; Enter * toggles the highlight (Space types a space), Esc closes and, on a closed list, clears the * choices and the text; leaving the field clears the text. "Select all" acts on the rows shown. * Clicking the text box opens the list but never closes it, and no match shows a "No matching * items" row — both as ui-combobox (Carbon closes, and shows an empty list; user's choice). * For a server search set `filter="none"`, listen to `ui-input`, fetch with its `value`, replace * the options and toggle `loading`; keep chosen `` heading * @cssprop --ui-field-border - Border on every side of the box (default none: Carbon's underline only; Kanok: a 1px outline) * @cssprop --ui-field-disabled-border-color - Border colour when disabled (default: the underline transparent) * @cssprop --ui-field-readonly-border-color - Border colour when read-only (default: a hairline underline) * @cssprop --ui-field-radius - Corner radius of the box (default 0; Kanok: 6px) * @cssprop --ui-field-background - Fill of the box (default `--ui-surface-1`; Kanok: transparent) * @cssprop --ui-label-font - Font of the label (default `--ui-font-caption`; Kanok: 14px semibold) * @cssprop --ui-label-color - Colour of the label (default `--ui-ink-muted`; Kanok: `--ui-ink`) * @cssprop --ui-menu-radius - Corner radius of the open list (default 0; Kanok: 8px) * @cssprop --ui-menu-border - Border around the list (default none; Kanok: a hairline) * @cssprop --ui-menu-shadow - `box-shadow` of the list (default Carbon's 0 2px 6px) * @cssprop --ui-menu-padding - Padding of the open list (default 0; Kanok: 4px, rows inset) * @cssprop --ui-menu-item-radius - Corner radius of a row (default 0; Kanok: 6px) * @cssprop --ui-menu-item-ink - Text of a row at rest (default `--ui-ink-muted`; Kanok: `--ui-ink`) * @cssprop --ui-menu-divider - Rule between rows (default `--ui-row-divider`; Kanok: none) * @cssprop --ui-menu-item-selected - Fill of the chosen row (default `--ui-surface-2`; Kanok: `--ui-highlight`) * @cssprop --ui-menu-item-selected-hover - The chosen row under the pointer (default `--ui-layer-selected-hover`; Kanok: the highlight a shade deeper) * @cssprop --ui-field-readonly-background - The box's fill when read-only (default transparent; Kanok: a faint ink tint, so read-only reads as set and never weaker than disabled) * @cssprop --ui-field-open-background - The box's fill while its list is open (default the field's hover fill; Kanok: transparent) * @cssprop --ui-fluid-background / --ui-fluid-gap - A fluid box's fill and the space under it (default the layer's fill, 0: boxes that touch; Kanok: transparent, 8px) * @cssprop --ui-menu-item-active-outline / --ui-menu-item-active-background - The keyboard-highlighted row: its ring and its fill (default focus, transparent) * @cssprop --ui-option-box-align / --ui-option-box-offset - A two-line row's checkbox: `align-self` and top margin (default auto, 0: centred; Kanok: beside the label line) * @cssprop --ui-icon-control-radius - Corners of its small icon buttons, their hover fill and ring (default 0; Kanok: round) * @cssprop --ui-menu-item-pressed - Fill of a pressed option (default `--ui-surface-2`; Kanok: the 20% pressed tint) * @cssprop --ui-focus-offset - `outline-offset` of its focus ring (default -2px: inside; Kanok: 2px outside) */ export declare class UiMultiSelect extends UiElement { static hostStates: readonly string[]; static readonly formAssociated = true; static readonly shadowRootOptions: ShadowRootInit; static readonly styles: import("lit").CSSResult[]; /** Visible label text; the `label` slot replaces it when markup is needed. */ label: string; /** Keep the label for screen readers but don't show it. */ hideLabel: boolean; /** Helper text under the field, shown while there is no error or warning. */ helperText: string; /** Error text shown while `invalid` or while the field fails validation. */ invalidText: string; /** Forces the error state, e.g. after server-side validation. */ invalid: boolean; /** Non-blocking warning; shown when there is no error. */ warn: boolean; /** Text of the warning shown while `warn`. */ warnText: string; /** Text always shown in the field (Carbon's `label`), e.g. "Choose options". */ placeholder: string; /** Chosen option values. Initial choices can also come from `