import { UiElement } from '../shared/element.js'; /** * Carbon-style select. Wraps a native `` * and kept in sync with a MutationObserver. * * `readonly` keeps the value (and submits it) but blocks mouse and keyboard changes; * Tab still moves through. `warn` shows a non-blocking warning. * `inline` puts the label beside a compact, borderless select (toolbars, pagination). * * State on the host for app styles: `data-show-error` / `data-show-warn` while the error / warning * line shows, `data-placeholder` while the placeholder is the shown choice * (e.g. `ui-select[data-show-error]::part(base)`). * * @cssstate show-error - While its error message shows (also `[data-show-error]`) * @cssstate show-warn - While its warning message shows (also `[data-show-warn]`) * @cssstate placeholder - While the placeholder is the shown choice (also `[data-placeholder]`) * @fires change - When the user picks an option * @slot label - Label content with markup; the `label` attribute is the plain-text fallback * @slot helper-text - Helper text with markup (links, bold); overrides `helper-text` * @slot warn-text - Warning text shown while `warn`; overrides `warn-text` * @slot invalid-text - Error text shown while invalid; overrides `invalid-text` * @csspart base - The field box * @csspart label - The label * @csspart input - The native select * @csspart chevron - The arrow icon * @csspart status-icon - The error / warning icon * @csspart helper-text - The helper line * @csspart warning-text - The warning line * @csspart warn-text - Same line as `warning-text` (named after the `warn-text` attribute / slot) * @csspart error-text - The error line * @csspart invalid-text - Same line as `error-text` (named after the `invalid-text` attribute / slot) * @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-inline-border-color - Border colour of the `inline` variant (default: no underline) * @cssprop --ui-field-radius - Corner radius of the box (default 0; Kanok: 6px) * @cssprop --ui-select-appearance - `base-select` opens the list in the menu look of the dropdowns (`--ui-menu-*`) where the browser supports a customizable select (Chrome 135+); default `none`, the native list (Kanok: base-select) * @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-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-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) */ export declare class UiSelect 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; /** Shown as an empty first choice; with `required` the user must pick something else. */ placeholder: string; value: string; /** Reflected: form-associated elements submit under the `name` attribute. */ name: string; /** Field height: sm 32px, md 40px, lg 48px (tokens `--ui-field-height-*`). */ size: 'sm' | 'md' | 'lg'; /** Disables the control; a disabled `
` ancestor does the same. */ disabled: boolean; /** Blocks form submission while the field is empty. */ required: boolean; /** Shows and submits the value but blocks changes. */ readonly: boolean; /** Carbon `FluidSelect`: the label inside a 64px box, an error / warning inside it. `` sets it for every field inside. */ fluid: boolean; /** Label beside a compact, borderless select. */ inline: boolean; private entries; private touched; /** Disabled, reset defaults, validation on submit and the name given from outside (shared by the form fields). */ private readonly formControl; private readonly select; private readonly localize; /** * Kind of the message line as last rendered. Recorded, not recomputed: render reads the native * select's validity before the new options commit, so recomputing in updated() could disagree. */ private shownMessageKind; /** Message from `setCustomValidity()`; '' = none. */ private customValidityMessage; /** Like `.setCustomValidity()`: a non-empty message makes the field invalid (and is shown as its error once touched) until cleared with ''. */ setCustomValidity(message: string): void; private readonly selectId; /** Created on connect: there is no MutationObserver when Lit renders on the server. */ private observer?; private defaultValue; protected willUpdate(): void; connectedCallback(): void; disconnectedCallback(): void; get form(): HTMLFormElement | null; get validationMessage(): string; /** Whether the field takes part in constraint validation (not while disabled), as natively. */ get willValidate(): boolean; /** The `