@llselect/core
Version:
Low-level select: a minimal, flexible, framework-agnostic replacement for the native HTML select element.
76 lines • 3.2 kB
TypeScript
/**
* Options accepted by the built-in icon helpers.
* @group Icons
* @category Shared
*/
export interface LLSelectIconOptions {
/** Width and height of the SVG in pixels. Default 16. */
size?: number;
}
/**
* Solid filled triangle pointing down. Sized to roughly match the chevron's
* visual weight (MDI's `arrow_drop_down` path occupies a small portion of
* its 24x24 viewBox and looks too small next to other icons).
* @group Icons
* @category Arrows
*/
export declare function createTriangleDownSvgEl(opts?: LLSelectIconOptions): SVGElement;
/**
* Material Design `expand_more` chevron pointing down (filled outline).
* @group Icons
* @category Arrows
*/
export declare function createChevronDownSvgEl(opts?: LLSelectIconOptions): SVGElement;
/**
* Standalone checkmark (no box). Useful as a "selected" indicator in single
* mode, or as a lightweight chosen marker in multi mode.
* @group Icons
* @category Checkmarks & checkboxes
*/
export declare function createCheckmarkSvgEl(opts?: LLSelectIconOptions): SVGElement;
/**
* Visual state of {@link createOutlinedCheckboxSvgEl} / {@link createFilledCheckboxSvgEl}.
* `indeterminate` is the "mixed" / partial state used by a choose-all control
* (`aria-checked="mixed"`).
* @group Icons
* @category Checkmarks & checkboxes
*/
export type LLSelectCheckboxState = 'unchecked' | 'checked' | 'indeterminate';
/**
* Options accepted by {@link createOutlinedCheckboxSvgEl} and
* {@link createFilledCheckboxSvgEl}.
* @group Icons
* @category Checkmarks & checkboxes
*/
export interface LLSelectCheckboxIconOptions extends LLSelectIconOptions {
/**
* Which checkbox state to draw. Accepts the icon vocabulary
* (`'unchecked' | 'checked' | 'indeterminate'`) or, as a convenience, the
* choose-all row's chosen-state vocabulary (`'none'` -> unchecked,
* `'some'` -> indeterminate, `'all'` -> checked), so
* `createChooseAllRowContentElFn` can pass its state straight through.
* Default `'unchecked'`.
*/
state?: LLSelectCheckboxState | 'none' | 'some' | 'all';
}
/**
* Outlined checkbox icon: box border with the tick (`checked`) / dash
* (`indeterminate`) drawn inside, all in `currentColor`; the filled twin is
* {@link createFilledCheckboxSvgEl}. Intended for multi-select item rows and
* the choose-all control. Decorative only (`aria-hidden`); the real state is
* carried by `aria-selected` on the item or `aria-checked` on the control.
* @group Icons
* @category Checkmarks & checkboxes
*/
export declare function createOutlinedCheckboxSvgEl(opts?: LLSelectCheckboxIconOptions): SVGElement;
/**
* Material-look checkbox icon: a solid rounded box with the tick (`checked`)
* / dash (`indeterminate`) cut out; `unchecked` draws the same outline box as
* {@link createOutlinedCheckboxSvgEl}. Same options, including the chosen-state
* vocabulary. Decorative only (`aria-hidden`); the real state is carried by
* `aria-selected` on the item or `aria-checked` on the control.
* @group Icons
* @category Checkmarks & checkboxes
*/
export declare function createFilledCheckboxSvgEl(opts?: LLSelectCheckboxIconOptions): SVGElement;
//# sourceMappingURL=icons.d.ts.map