UNPKG

vira

Version:

A simple and highly versatile design system using element-vir.

45 lines (44 loc) 1.86 kB
import { type PartialWithUndefined } from '@augment-vir/common'; import { type AttributeValues } from 'element-vir'; import { type ViraIconSvg } from '../icons/index.js'; import { type ViraSelectOption, type ViraSelectOptionGroup } from '../util/vira-select-option.js'; /** * Similar to {@link ViraDropdown} but is, instead, simply a wrapper for `<select>` and nothing more. * * @category Dropdown * @category Elements * @see https://electrovir.github.io/vira/book/elements/vira-select */ export declare const ViraSelect: import("element-vir").DeclarativeElementDefinition<"vira-select", { options: ReadonlyArray<Readonly<ViraSelectOption> | Readonly<ViraSelectOptionGroup>>; /** The currently selected option value. */ value: undefined | string; } & PartialWithUndefined<{ icon: Readonly<ViraIconSvg>; placeholder: string; label: string; /** If set to `true`, only minimal styles are applied. */ rawSelect: boolean; disabled: boolean; /** * When `true`, the currently selected option's label is rendered as plain text with no * wrapper, border, or focus styles. */ isReadonly: boolean; attributePassthrough: Readonly<PartialWithUndefined<{ label: AttributeValues; select: AttributeValues; option: AttributeValues; }>>; hasError: boolean; }>, { /** * Used to couple the label and select together. This is not applied if no label is * provided. */ randomId: string; /** Removes event listeners registered during init. */ cleanupListeners: undefined | (() => void); }, { valueChange: import("element-vir").DefineEvent<string>; }, "vira-select-disabled" | "vira-select-error" | "vira-select-not-raw", "vira-select-padding-horizontal" | "vira-select-padding-vertical" | "vira-select-icon-padding", readonly [], readonly []>;