@syware/jlib 0.17.1 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/all.js +5 -3
- package/dist/base/jl-combobox-base.css.js +3 -0
- package/dist/base/jl-combobox-base.d.ts +202 -0
- package/dist/base/jl-combobox-base.js +632 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -2
- package/dist/lib/combobox.d.ts +12 -0
- package/dist/lib/combobox.js +22 -0
- package/dist/lib/option-filter.d.ts +6 -4
- package/dist/lib/option-filter.js +63 -33
- package/dist/lib/table.d.ts +24 -3
- package/dist/lib/table.js +58 -2
- package/dist/lib/texts-de.d.ts +3 -0
- package/dist/lib/texts-de.js +3 -0
- package/dist/lib/texts-fr.d.ts +3 -0
- package/dist/lib/texts-fr.js +3 -0
- package/dist/lib/texts.d.ts +3 -0
- package/dist/lib/texts.js +3 -0
- package/dist/molecules/jl-combobox.d.ts +15 -123
- package/dist/molecules/jl-combobox.js +24 -461
- package/dist/molecules/jl-multi-combobox.css.js +3 -0
- package/dist/molecules/jl-multi-combobox.d.ts +50 -0
- package/dist/molecules/jl-multi-combobox.js +176 -0
- package/dist/organisms/jl-table.css.js +1 -1
- package/dist/organisms/jl-table.d.ts +77 -5
- package/dist/organisms/jl-table.js +223 -23
- package/dist/types/jl-combobox.types.d.ts +5 -0
- package/dist/types/jl-table.types.d.ts +22 -0
- package/package.json +2 -1
- package/dist/molecules/jl-combobox.css.js +0 -3
package/dist/all.js
CHANGED
|
@@ -43,6 +43,7 @@ import { CARD_PADDINGS, JlCard } from "./molecules/jl-card.js";
|
|
|
43
43
|
import { JlChipGroup } from "./molecules/jl-chip-group.js";
|
|
44
44
|
import { JlCopyButton } from "./molecules/jl-copy-button.js";
|
|
45
45
|
import { CODE_LANGUAGES, JlCodeBlock } from "./molecules/jl-code-block.js";
|
|
46
|
+
import { COMBOBOX_FILTERS } from "./base/jl-combobox-base.js";
|
|
46
47
|
import { JlCombobox } from "./molecules/jl-combobox.js";
|
|
47
48
|
import { JlDatePicker } from "./molecules/jl-date-picker.js";
|
|
48
49
|
import { EMPTY_SIZES, JlEmpty } from "./molecules/jl-empty.js";
|
|
@@ -54,6 +55,7 @@ import { JlListItem } from "./molecules/jl-list-item.js";
|
|
|
54
55
|
import { JlLoadMore } from "./molecules/jl-load-more.js";
|
|
55
56
|
import { JlLoadState, LOAD_SKELETONS, LOAD_STATES } from "./molecules/jl-load-state.js";
|
|
56
57
|
import { JlMenu } from "./molecules/jl-menu.js";
|
|
58
|
+
import { JlMultiCombobox } from "./molecules/jl-multi-combobox.js";
|
|
57
59
|
import { JlNumberInput } from "./molecules/jl-number-input.js";
|
|
58
60
|
import { JlPagination } from "./molecules/jl-pagination.js";
|
|
59
61
|
import { JlPopover } from "./molecules/jl-popover.js";
|
|
@@ -79,7 +81,7 @@ import { JlPageHeader } from "./organisms/jl-page-header.js";
|
|
|
79
81
|
import { JlPageOutlet } from "./organisms/jl-page-outlet.js";
|
|
80
82
|
import { JlSideNav, SIDE_NAV_COLLAPSIBLES } from "./organisms/jl-side-nav.js";
|
|
81
83
|
import { JlTabBar } from "./organisms/jl-tab-bar.js";
|
|
82
|
-
import { JlTable, TABLE_EXPANSIONS, TABLE_SORT_DIRECTIONS } from "./organisms/jl-table.js";
|
|
84
|
+
import { JlTable, TABLE_EXPANSIONS, TABLE_SORT_DIRECTIONS, TABLE_SORT_MODES } from "./organisms/jl-table.js";
|
|
83
85
|
import { JlToaster, TOASTER_PLACEMENTS, download, downloadTexts, toast } from "./organisms/jl-toaster.js";
|
|
84
86
|
import { JlTree } from "./organisms/jl-tree.js";
|
|
85
87
|
import { JlAppShell } from "./templates/jl-app-shell.js";
|
|
@@ -89,5 +91,5 @@ import { JlSplitView, SPLIT_ORIENTATIONS, SPLIT_PANES } from "./templates/jl-spl
|
|
|
89
91
|
import { JlStack, STACK_GAPS } from "./templates/jl-stack.js";
|
|
90
92
|
// src/all.ts
|
|
91
93
|
registerIcons(COMMON_ICONS);
|
|
92
|
-
define(JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadingBar, JlLoadMore, JlLoadState, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPageOutlet, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStack, JlStat, JlSteps, JlSwitch, JlTabBar, JlTable, JlTabPanel, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree);
|
|
93
|
-
export { ACCORDION_VARIANTS, AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, BASE_STYLES, BUTTON_TYPES, BUTTON_VARIANTS, CARD_PADDINGS, CHIP_SIZES, CODE_LANGUAGES, COMMON_ICONS, CONFIRM_TONES, CONTROL_SIZES, CONTROL_STYLES, DEFAULT_TEXTS, DIALOG_SIZES, DIVIDER_ALIGNS, DRAWER_PLACEMENTS, DRAWER_SIZES, EMPTY_SIZES, FACTS_ORIENTATIONS, FIELD_ORIENTATIONS, FLOATING_STYLES, INPUT_TYPES, JL_LANGUAGES, JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlElement, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlFormControl, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadMore, JlLoadState, JlLoadingBar, JlMenu, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPageOutlet, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStack, JlStat, JlSteps, JlSwitch, JlTabBar, JlTabPanel, JlTable, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree, LINK_VARIANTS, LOAD_SKELETONS, LOAD_STATES, PAGE_WIDTHS, PLACEMENTS, PROGRESS_SIZES, PROGRESS_TONES, RADIO_GROUP_ORIENTATIONS, RADIO_GROUP_VARIANTS, SIDE_NAV_COLLAPSIBLES, SKELETON_SHAPES, SPLIT_ORIENTATIONS, SPLIT_PANES, STACK_GAPS, STAT_TRENDS, STEPS_ORIENTATIONS, SWITCH_SIZES, TABLE_EXPANSIONS, TABLE_SORT_DIRECTIONS, TAB_VARIANTS, TOASTER_PLACEMENTS, TOAST_TONES, TOKEN_STYLES, TONES, TONE_ICONS, TONE_ICON_FILLED, adoptTokens, cellOf, clampedNumber, computePosition, confirmDialog, define, download, downloadTexts, followAnchor, formatDuration, formatRelativeTime, guardLeave, hasIcon, iconElement, iconNames, jlText, jlTexts, jsonOf, oneOf, placeFloating, registerIcons, setFavicon, toast };
|
|
94
|
+
define(JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadingBar, JlLoadMore, JlLoadState, JlMenu, JlMultiCombobox, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPageOutlet, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStack, JlStat, JlSteps, JlSwitch, JlTabBar, JlTable, JlTabPanel, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree);
|
|
95
|
+
export { ACCORDION_VARIANTS, AVATAR_SHAPES, AVATAR_SIZES, AVATAR_STATUSES, BASE_STYLES, BUTTON_TYPES, BUTTON_VARIANTS, CARD_PADDINGS, CHIP_SIZES, CODE_LANGUAGES, COMBOBOX_FILTERS, COMMON_ICONS, CONFIRM_TONES, CONTROL_SIZES, CONTROL_STYLES, DEFAULT_TEXTS, DIALOG_SIZES, DIVIDER_ALIGNS, DRAWER_PLACEMENTS, DRAWER_SIZES, EMPTY_SIZES, FACTS_ORIENTATIONS, FIELD_ORIENTATIONS, FLOATING_STYLES, INPUT_TYPES, JL_LANGUAGES, JlAccordion, JlAccordionItem, JlAccountButton, JlAlert, JlAppIcon, JlAppShell, JlAuthLayout, JlAvatar, JlAvatarGroup, JlBadge, JlBreadcrumb, JlButton, JlCalendar, JlCard, JlCheckbox, JlChip, JlChipGroup, JlCodeBlock, JlCombobox, JlCommandPalette, JlConfirm, JlCopyButton, JlDatePicker, JlDialog, JlDivider, JlDrawer, JlElement, JlEmpty, JlFacts, JlField, JlFileDrop, JlFlow, JlFormControl, JlIcon, JlInput, JlInputList, JlKbd, JlLink, JlListItem, JlLoadMore, JlLoadState, JlLoadingBar, JlMenu, JlMultiCombobox, JlNavbar, JlNumberInput, JlPage, JlPageHeader, JlPageOutlet, JlPagination, JlPopover, JlProgress, JlProgressRing, JlRadioGroup, JlRating, JlSearch, JlSearchButton, JlSegmented, JlSelect, JlSideNav, JlSkeleton, JlSlider, JlSpinner, JlSplitView, JlStack, JlStat, JlSteps, JlSwitch, JlTabBar, JlTabPanel, JlTable, JlTabs, JlTagInput, JlTextarea, JlTimeline, JlToast, JlToaster, JlTooltip, JlTree, LINK_VARIANTS, LOAD_SKELETONS, LOAD_STATES, PAGE_WIDTHS, PLACEMENTS, PROGRESS_SIZES, PROGRESS_TONES, RADIO_GROUP_ORIENTATIONS, RADIO_GROUP_VARIANTS, SIDE_NAV_COLLAPSIBLES, SKELETON_SHAPES, SPLIT_ORIENTATIONS, SPLIT_PANES, STACK_GAPS, STAT_TRENDS, STEPS_ORIENTATIONS, SWITCH_SIZES, TABLE_EXPANSIONS, TABLE_SORT_DIRECTIONS, TABLE_SORT_MODES, TAB_VARIANTS, TOASTER_PLACEMENTS, TOAST_TONES, TOKEN_STYLES, TONES, TONE_ICONS, TONE_ICON_FILLED, adoptTokens, cellOf, clampedNumber, computePosition, confirmDialog, define, download, downloadTexts, followAnchor, formatDuration, formatRelativeTime, guardLeave, hasIcon, iconElement, iconNames, jlText, jlTexts, jsonOf, oneOf, placeFloating, registerIcons, setFavicon, toast };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
// src/base/jl-combobox-base.css?inline
|
|
2
|
+
var jl_combobox_base_default = ":host{min-width:0;display:block}.entry{flex-wrap:wrap;flex:1;align-items:center;gap:4px;min-width:0;display:flex}.toggle jl-icon{transition:transform var(--jl-fast) var(--jl-ease)}:host([open]) .toggle jl-icon{transform:rotate(180deg)}.toggle:disabled{cursor:not-allowed}.popup{padding:4px}.listbox{max-height:min(264px, var(--room,100dvh) - 10px);margin:0;padding:0;list-style:none;position:relative;overflow-y:auto}.option{border-radius:var(--jl-radius-xs);min-height:34px;color:var(--jl-text);font-size:var(--jl-font-md);cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;gap:10px;padding:6px 10px;line-height:1.35;display:flex}.option.active{background:var(--jl-surface-3)}.option-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.option.chosen .option-label{font-weight:600}.option[aria-disabled=true]{color:var(--jl-faint);cursor:not-allowed}.text{flex:1;gap:1px;min-width:0;display:grid}.description{color:var(--jl-muted);font-size:var(--jl-font-xs)}.check{color:var(--jl-accent);visibility:hidden}.option.chosen .check{visibility:visible}mark{color:var(--jl-accent);background:0 0;font-weight:700}.empty{color:var(--jl-muted);font-size:var(--jl-font-sm);padding:8px 10px}.loading{color:var(--jl-muted);font-size:var(--jl-font-sm);align-items:center;gap:8px;padding:8px 10px;display:flex}.spinner{display:inline-flex}";
|
|
3
|
+
export { jl_combobox_base_default as default };
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
import { JlFormControl } from './jl-form-control';
|
|
2
|
+
import type { ComboboxFilter, ComboboxOption } from '../types/jl-combobox.types';
|
|
3
|
+
import type { ControlSize } from '../types/options.types';
|
|
4
|
+
export declare const COMBOBOX_FILTERS: readonly ComboboxFilter[];
|
|
5
|
+
/**
|
|
6
|
+
* What `jl-combobox` (one value, a `string`) and `jl-multi-combobox` (several, a `string[]`) share: the text field,
|
|
7
|
+
* the list that narrows as people type or that the page fills (`filter="none"`, `loading`, `debounce`), the keys,
|
|
8
|
+
* and the labels kept with the values. Each says what its value is, what a choice and typed text do to it, and what
|
|
9
|
+
* the field shows.
|
|
10
|
+
*/
|
|
11
|
+
export declare abstract class JlComboboxBase<Value extends string | string[]> extends JlFormControl {
|
|
12
|
+
readonly events: Readonly<import("@jadis/core").UseEventsHandler<{
|
|
13
|
+
change: Value;
|
|
14
|
+
input: string;
|
|
15
|
+
}>>;
|
|
16
|
+
readonly options: Readonly<Readonly<{
|
|
17
|
+
get(): ComboboxOption[];
|
|
18
|
+
set(setter: ComboboxOption[] | ((prevState: ComboboxOption[]) => ComboboxOption[])): void;
|
|
19
|
+
}>>;
|
|
20
|
+
readonly value: Readonly<Readonly<{
|
|
21
|
+
get(): Value;
|
|
22
|
+
set(setter: Value | ((prevState: Value) => Value)): void;
|
|
23
|
+
}>>;
|
|
24
|
+
readonly placeholder: Readonly<Readonly<{
|
|
25
|
+
get(): string;
|
|
26
|
+
set(setter: string | ((prevState: string) => string)): void;
|
|
27
|
+
}>>;
|
|
28
|
+
/** The field's name for screen readers, when no visible label names it. */
|
|
29
|
+
readonly label: Readonly<Readonly<{
|
|
30
|
+
get(): string;
|
|
31
|
+
set(setter: string | ((prevState: string) => string)): void;
|
|
32
|
+
}>>;
|
|
33
|
+
/**
|
|
34
|
+
* Who narrows the options to what was typed: the combobox (`local`), or the page (`none`), which hears `input`
|
|
35
|
+
* and gives the options it found, shown as they are.
|
|
36
|
+
*/
|
|
37
|
+
readonly filter: Readonly<Readonly<{
|
|
38
|
+
get(): ComboboxFilter;
|
|
39
|
+
set(setter: ((prevState: ComboboxFilter) => ComboboxFilter) | ComboboxFilter): void;
|
|
40
|
+
}>>;
|
|
41
|
+
/** The page is finding options: the open list says so, above the options it holds, until the page sets new ones. */
|
|
42
|
+
readonly loading: Readonly<Readonly<{
|
|
43
|
+
get(): boolean;
|
|
44
|
+
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
45
|
+
}>>;
|
|
46
|
+
/** What the list says while loading; jlib's own when empty. */
|
|
47
|
+
readonly loadingText: Readonly<Readonly<{
|
|
48
|
+
get(): string;
|
|
49
|
+
set(setter: string | ((prevState: string) => string)): void;
|
|
50
|
+
}>>;
|
|
51
|
+
/** How long people stop typing, in milliseconds, before `input` fires; 0 fires it at every keystroke. */
|
|
52
|
+
readonly debounce: Readonly<Readonly<{
|
|
53
|
+
get(): number;
|
|
54
|
+
set(setter: number | ((prevState: number) => number)): void;
|
|
55
|
+
}>>;
|
|
56
|
+
/** Takes the typed text as a value when no option has it as its label. */
|
|
57
|
+
readonly allowCustom: Readonly<Readonly<{
|
|
58
|
+
get(): boolean;
|
|
59
|
+
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
60
|
+
}>>;
|
|
61
|
+
/** Shows a button that empties the field while it holds something. */
|
|
62
|
+
readonly clearable: Readonly<Readonly<{
|
|
63
|
+
get(): boolean;
|
|
64
|
+
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
65
|
+
}>>;
|
|
66
|
+
/** What the list says when no option matches; jlib's own when empty. */
|
|
67
|
+
readonly emptyText: Readonly<Readonly<{
|
|
68
|
+
get(): string;
|
|
69
|
+
set(setter: string | ((prevState: string) => string)): void;
|
|
70
|
+
}>>;
|
|
71
|
+
readonly required: Readonly<Readonly<{
|
|
72
|
+
get(): boolean;
|
|
73
|
+
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
74
|
+
}>>;
|
|
75
|
+
readonly disabled: Readonly<Readonly<{
|
|
76
|
+
get(): boolean;
|
|
77
|
+
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
78
|
+
}>>;
|
|
79
|
+
/** Draws the field in the danger colour, for an error the page found itself. */
|
|
80
|
+
readonly invalid: Readonly<Readonly<{
|
|
81
|
+
get(): boolean;
|
|
82
|
+
set(setter: boolean | ((prevState: boolean) => boolean)): void;
|
|
83
|
+
}>>;
|
|
84
|
+
readonly size: Readonly<Readonly<{
|
|
85
|
+
get(): ControlSize;
|
|
86
|
+
set(setter: ((prevState: ControlSize) => ControlSize) | ControlSize): void;
|
|
87
|
+
}>>;
|
|
88
|
+
private readonly _listId;
|
|
89
|
+
private readonly _state;
|
|
90
|
+
private readonly _items;
|
|
91
|
+
private readonly _refs;
|
|
92
|
+
/** The value of a list of values held. */
|
|
93
|
+
protected abstract shaped(values: string[]): Value;
|
|
94
|
+
/** The value of its `value` attribute. */
|
|
95
|
+
protected abstract parseValue(text: string | null): Value;
|
|
96
|
+
/** What choosing an option does to the value; its label is already kept. */
|
|
97
|
+
protected abstract chooseOption(option: ComboboxOption): void;
|
|
98
|
+
/** What text typed and left, or confirmed with Enter, does to the value; the list is closed already. */
|
|
99
|
+
protected abstract commitTyped(text: string): void;
|
|
100
|
+
/** What the field shows while nobody types. */
|
|
101
|
+
protected abstract fieldText(): string;
|
|
102
|
+
/** What the form gets. */
|
|
103
|
+
protected abstract renderFormValue(): void;
|
|
104
|
+
focus(options?: FocusOptions): void;
|
|
105
|
+
templateHtml(): Node;
|
|
106
|
+
templateCss(): string;
|
|
107
|
+
onConnect(): void;
|
|
108
|
+
onDisconnect(): void;
|
|
109
|
+
protected resetValue(): void;
|
|
110
|
+
protected setDisabledByForm(disabled: boolean): void;
|
|
111
|
+
/** Disabled by its own input, or by a `<fieldset disabled>` around it. */
|
|
112
|
+
protected isOff(): boolean;
|
|
113
|
+
/** What stands in the field before its text: nothing, or the values held as chips. */
|
|
114
|
+
protected entryStart(): Node | null;
|
|
115
|
+
/** Backspace in the field: whether the combobox used it. */
|
|
116
|
+
protected onBackspace(): boolean;
|
|
117
|
+
/** Tab takes the option the arrows reached, and lets the focus move on. */
|
|
118
|
+
protected onTab(): boolean;
|
|
119
|
+
/** The active option is the one the arrows reached: it is marked, and alone `aria-selected`. */
|
|
120
|
+
protected markActive(previous: HTMLElement | null, item: HTMLElement | null): void;
|
|
121
|
+
/** Whether an option's value is held, which its check shows. */
|
|
122
|
+
protected drawHeld(item: HTMLElement, held: boolean): void;
|
|
123
|
+
/** Whether the placeholder shows while the field's text is empty. */
|
|
124
|
+
protected placeholderShown(): boolean;
|
|
125
|
+
/** Whether the clear button has something to clear. */
|
|
126
|
+
protected isFilled(): boolean;
|
|
127
|
+
protected drawTexts(): void;
|
|
128
|
+
/** The values held, as a list. */
|
|
129
|
+
protected held(): string[];
|
|
130
|
+
/** A value's label: its option's, the one kept from when it was chosen, or the value itself as free text. */
|
|
131
|
+
protected displayOf(value: string): string;
|
|
132
|
+
protected rememberLabel(option: ComboboxOption): void;
|
|
133
|
+
protected optionWithLabel(text: string): ComboboxOption | undefined;
|
|
134
|
+
/** Holds the values as people chose them, and says so when they changed. */
|
|
135
|
+
protected commitValues(values: string[]): void;
|
|
136
|
+
/** Empties the field's text, as after a choice. */
|
|
137
|
+
protected clearTyped(): void;
|
|
138
|
+
/** Makes an option the active one, as after a choice that keeps the list open. */
|
|
139
|
+
protected activate(option: ComboboxOption): void;
|
|
140
|
+
protected announce(message: string): void;
|
|
141
|
+
/** The field's text (unless people are typing), the placeholder, the form's value, the validity, the clear button. */
|
|
142
|
+
protected renderValue(): void;
|
|
143
|
+
/** Without the attribute: the form says its state before the `disabled` input has taken the attribute's change. */
|
|
144
|
+
protected drawDisabled(): void;
|
|
145
|
+
private renderEmptyText;
|
|
146
|
+
private renderLoadingText;
|
|
147
|
+
private loadingLabel;
|
|
148
|
+
private isOpen;
|
|
149
|
+
private onType;
|
|
150
|
+
/** Says what was typed: at once, or once the typing pauses for `debounce` milliseconds. */
|
|
151
|
+
private tellInput;
|
|
152
|
+
/** A choice made before the typing paused: the text it would have told is gone. */
|
|
153
|
+
private cancelInput;
|
|
154
|
+
private onKey;
|
|
155
|
+
/** Down opens the list or moves down it; Alt + Down opens it as it is, Alt + Up closes it. */
|
|
156
|
+
private onArrow;
|
|
157
|
+
private toggleWithAlt;
|
|
158
|
+
/** Enter chooses the active option; with free text allowed, it takes the text. It submits the form otherwise. */
|
|
159
|
+
private onEnter;
|
|
160
|
+
/** Escape closes the list, then a second one puts away unfinished typing. */
|
|
161
|
+
private onEscape;
|
|
162
|
+
private toggleList;
|
|
163
|
+
/**
|
|
164
|
+
* Opens the list, or refreshes it, for what was typed. While typing, the first match is active, so Enter takes
|
|
165
|
+
* it; otherwise the first option held is. With free text allowed and nothing matching, the list stays closed,
|
|
166
|
+
* unless the page is still finding options.
|
|
167
|
+
*/
|
|
168
|
+
protected openList(typing: boolean): void;
|
|
169
|
+
private showPopup;
|
|
170
|
+
protected closeList(): void;
|
|
171
|
+
/** The first option held among those shown. */
|
|
172
|
+
private chosenIndex;
|
|
173
|
+
private activateEdgeIfNone;
|
|
174
|
+
private moveActive;
|
|
175
|
+
private optionAt;
|
|
176
|
+
private hover;
|
|
177
|
+
private choose;
|
|
178
|
+
/** Leaving the field, or Enter on typed text. */
|
|
179
|
+
private commitText;
|
|
180
|
+
private clearValue;
|
|
181
|
+
/** What screen readers hear as the list shows: how many options match, or that none does. */
|
|
182
|
+
private countText;
|
|
183
|
+
/** New options: the field may now show the value's label, and an open list (or one being typed in) refreshes. */
|
|
184
|
+
private renderOptionsChange;
|
|
185
|
+
private refreshList;
|
|
186
|
+
private renderLoading;
|
|
187
|
+
/**
|
|
188
|
+
* The options to show for what was typed, in their order: elements already made are moved, not made again. While
|
|
189
|
+
* the page finds options, the list says so above them, and says nothing of an empty answer yet.
|
|
190
|
+
*/
|
|
191
|
+
private renderOptions;
|
|
192
|
+
/** The option's element, made once, with where it now sits, whether it is held, and the typed text marked. */
|
|
193
|
+
private drawOption;
|
|
194
|
+
private optionNode;
|
|
195
|
+
/** aria-activedescendant follows the option the arrows reached. */
|
|
196
|
+
private renderActive;
|
|
197
|
+
private revealActive;
|
|
198
|
+
private renderPlaceholder;
|
|
199
|
+
private renderValidity;
|
|
200
|
+
private renderClear;
|
|
201
|
+
private renderDisabled;
|
|
202
|
+
}
|