@fusion.dev/helix-headless 0.157.0 → 0.158.0
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/custom-elements.json +178 -22
- package/dist/command/root/command-root.d.ts +19 -5
- package/dist/command/root/command-root.js +14 -4
- package/dist/data-table/root/data-table-root.js +5 -2
- package/dist/list/item/list-item.d.ts +15 -1
- package/dist/list/item/list-item.js +20 -1
- package/dist/list/root/list-root.d.ts +29 -1
- package/dist/list/root/list-root.js +44 -10
- package/dist/listbox/root/listbox-root.d.ts +19 -2
- package/dist/listbox/root/listbox-root.js +16 -8
- package/dist/map/root/map-root.d.ts +4 -0
- package/dist/map/root/map-root.js +1 -1
- package/dist/menu/item/menu-item.js +1 -1
- package/dist/menu/root/menu-root.d.ts +6 -2
- package/dist/menu/root/menu-root.js +9 -2
- package/dist/number-input/root/number-input-root.d.ts +7 -4
- package/dist/number-input/root/number-input-root.js +3 -3
- package/dist/progress/root/progress-root.js +1 -1
- package/dist/select/root/select-root.d.ts +8 -1
- package/dist/select/root/select-root.js +8 -5
- package/dist/skeleton/root/skeleton-root.d.ts +2 -1
- package/dist/skeleton/root/skeleton-root.js +1 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +208 -40
- package/types/vue.d.ts +48 -9
package/types/vue.d.ts
CHANGED
|
@@ -4391,6 +4391,13 @@ hydration, or diffed by a framework, it comes back holding whatever the
|
|
|
4391
4391
|
last reader did rather than what the author wrote. `:state(open)` carries
|
|
4392
4392
|
the resolved state for stylesheets, which is what the mirror is for. */
|
|
4393
4393
|
open?: (HelixHeadlessCommand["open"]) | undefined;
|
|
4394
|
+
/** Whether a command is kept by the filter: a function given the command's
|
|
4395
|
+
words and the filter, trimmed, that returns `true` to keep it showing, as
|
|
4396
|
+
React Aria's `Autocomplete` takes `filter`. See Listbox's `filterMatch`.
|
|
4397
|
+
|
|
4398
|
+
Absent, a command is kept where its words hold the filter, in any case. A
|
|
4399
|
+
property only, there being no way to write a function in markup. */
|
|
4400
|
+
filterMatch?: (HelixHeadlessCommand["filterMatch"]) | undefined;
|
|
4394
4401
|
/** The commands as data, for a palette too long to draw whole: each a value,
|
|
4395
4402
|
which is also its words, or a record with a `value`, a `label` and
|
|
4396
4403
|
`disabled`. Handed to the list, which draws only the commands in sight and
|
|
@@ -8894,7 +8901,9 @@ Not reflected, as a state never is. `row-current` is the part a
|
|
|
8894
8901
|
stylesheet draws it from. */
|
|
8895
8902
|
current?: (HelixHeadlessListItem["current"]) | undefined;
|
|
8896
8903
|
/** Takes the row out of reach in a list with `selection-mode`: the arrow keys
|
|
8897
|
-
pass over it and it cannot be selected or acted on.
|
|
8904
|
+
pass over it and it cannot be selected or acted on. In a list with
|
|
8905
|
+
`disabled-behavior="selection"`, it cannot be selected and is reached and
|
|
8906
|
+
acted on as any row is. */
|
|
8898
8907
|
disabled?: (HelixHeadlessListItem["disabled"]) | undefined;
|
|
8899
8908
|
/** The URL the row links to. Leave it empty for a row that is not a link.
|
|
8900
8909
|
|
|
@@ -8930,6 +8939,10 @@ being moved, or the one the drop indicator is beside. Unset otherwise. */
|
|
|
8930
8939
|
Written by the list from its own `value`, and unset where nothing can be
|
|
8931
8940
|
selected, which keeps `aria-selected` off a list that does not select. */
|
|
8932
8941
|
selected?: (HelixHeadlessListItem["selected"]) | undefined;
|
|
8942
|
+
/** Whether `disabled` takes the row out of selection alone, written by a list
|
|
8943
|
+
with `disabled-behavior="selection"`. No attribute: it is coordination
|
|
8944
|
+
between elements, as `focusable` is. */
|
|
8945
|
+
selectionOnly?: (HelixHeadlessListItem["selectionOnly"]) | undefined;
|
|
8933
8946
|
};
|
|
8934
8947
|
|
|
8935
8948
|
export type HelixHeadlessListItemVueEvents = {
|
|
@@ -8965,6 +8978,20 @@ refused, in a `reorderable` list. */
|
|
|
8965
8978
|
/** What screen readers hear when a held row is put back, or a move is
|
|
8966
8979
|
refused, in a `reorderable` list. */
|
|
8967
8980
|
canceledLabel?: (HelixHeadlessList["canceledLabel"]) | undefined;
|
|
8981
|
+
/** What `disabled` takes from a row, in a list that selects: `all`, which
|
|
8982
|
+
passes over the row, or `selection`, which keeps the row out of the
|
|
8983
|
+
selection and lets the keys reach it and Enter or a press act on it, as
|
|
8984
|
+
React Aria's GridList takes `disabledBehavior`.
|
|
8985
|
+
|
|
8986
|
+
Absent is `all`. */
|
|
8987
|
+
"disabled-behavior"?: (HelixHeadlessList["disabledBehavior"]) | undefined;
|
|
8988
|
+
/** What `disabled` takes from a row, in a list that selects: `all`, which
|
|
8989
|
+
passes over the row, or `selection`, which keeps the row out of the
|
|
8990
|
+
selection and lets the keys reach it and Enter or a press act on it, as
|
|
8991
|
+
React Aria's GridList takes `disabledBehavior`.
|
|
8992
|
+
|
|
8993
|
+
Absent is `all`. */
|
|
8994
|
+
disabledBehavior?: (HelixHeadlessList["disabledBehavior"]) | undefined;
|
|
8968
8995
|
/** What screen readers hear when a row is dropped, in a `reorderable` list. */
|
|
8969
8996
|
"dropped-label"?: (HelixHeadlessList["droppedLabel"]) | undefined;
|
|
8970
8997
|
/** What screen readers hear when a row is dropped, in a `reorderable` list. */
|
|
@@ -9348,6 +9375,14 @@ imperatively later, and nothing is hydrating by then.
|
|
|
9348
9375
|
|
|
9349
9376
|
Here rather than on each control. */
|
|
9350
9377
|
name?: (HelixHeadlessListbox["name"]) | undefined;
|
|
9378
|
+
/** Whether an option is kept by the filter: a function given the option's
|
|
9379
|
+
words and the filter, trimmed, that returns `true` to keep it showing, as
|
|
9380
|
+
React Aria's `Autocomplete` takes `filter`. For matching that ignores
|
|
9381
|
+
accents, matches the start of each word, or matches out of order.
|
|
9382
|
+
|
|
9383
|
+
Absent, an option is kept where its words hold the filter, in any case. A
|
|
9384
|
+
property only, there being no way to write a function in markup. */
|
|
9385
|
+
filterMatch?: (HelixHeadlessListbox["filterMatch"]) | undefined;
|
|
9351
9386
|
/** The options as data, for a list too long to draw whole: each a value,
|
|
9352
9387
|
which is also its words, or a record with a `value`, a `label` and
|
|
9353
9388
|
`disabled`. Set, the list draws only the options in sight, and the ones
|
|
@@ -11194,8 +11229,11 @@ imperatively later, and nothing is hydrating by then.
|
|
|
11194
11229
|
|
|
11195
11230
|
Here rather than on each control. */
|
|
11196
11231
|
name?: (HelixHeadlessNumberInput["name"]) | undefined;
|
|
11197
|
-
/** The value as a number, or `NaN` while the control is empty
|
|
11232
|
+
/** The value as a number, or `NaN` while the control is empty or does not
|
|
11233
|
+
hold a number.
|
|
11198
11234
|
|
|
11235
|
+
Read in the locale and the format, as the form reads it, so `1,5` typed
|
|
11236
|
+
in a locale with a decimal comma is 1.5 here while the form holds 1.5.
|
|
11199
11237
|
`NaN` and not zero, which is the trap the platform already avoids: `Number('')`
|
|
11200
11238
|
is zero, so an empty control would report a number it does not hold and a
|
|
11201
11239
|
form would submit it. */
|
|
@@ -13315,7 +13353,8 @@ export type HelixHeadlessSkeletonVueProps = {
|
|
|
13315
13353
|
/** What is loading, read out as the placeholder's name, such as "Loading
|
|
13316
13354
|
profile".
|
|
13317
13355
|
|
|
13318
|
-
Absent hides the placeholder from screen readers.
|
|
13356
|
+
Absent hides the placeholder from screen readers. Around content, the name
|
|
13357
|
+
is read while `loading` is set, and the loaded content is read as it is. */
|
|
13319
13358
|
label?: (HelixHeadlessSkeleton["label"]) | undefined;
|
|
13320
13359
|
/** Whether the content inside is still loading, which keeps it inert and
|
|
13321
13360
|
draws the placeholder over it.
|
|
@@ -18291,7 +18330,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18291
18330
|
HelixHeadlessComboboxVueProps,
|
|
18292
18331
|
HelixHeadlessComboboxVueEvents
|
|
18293
18332
|
>;
|
|
18294
|
-
/** The list is a 'Listbox', which handles filtering, the empty state, the match highlight, 'aria-activedescendant', scrolling an option into view, and moving between options with the keyboard. The palette adds a dialog and a hotkey that opens it. The palette keeps no value. It is not a form control and submits nothing. Choosing an option dispatches 'helix-select' once. To remember the last command, store it yourself. An option with 'href' is a link to a page, which the browser follows once the palette has closed. The hotkey listener is on the document, so the hotkey works from anywhere on the page, including inside another control's text field, whether or not the palette is open. 'mod' means Command on a Mac and Control elsewhere, so you write one binding. With 'inline', the palette is drawn in the page with no dialog, as a search over a list that is always shown. **Pages.** A command can open a page of commands of its own, as a palette offers "Change theme" and then the themes. Give the option 'opens' with a name, and slot the page's commands as 'page:' and that name: '''html <helix-command> <helix-option value="theme" opens="theme">Change theme</helix-option> <helix-option value="dark" slot="page:theme">Dark</helix-option> <helix-option value="light" slot="page:theme">Light</helix-option> </helix-command> ''' Choosing the opener says 'helix-select' with its value, and canceling it keeps the page that is shown. The list then shows the page, named by the opener's words, and Backspace in an empty filter goes back. 'page' says which page is shown. The filter is cleared when the palette closes, so each opening starts from the full list. Combobox and Select do the same. As typing narrows the list, a screen reader hears how many commands are left, such as "3 commands". **Keyboard.** Focus goes to the filter field as the palette opens, and the highlight moves through the commands while you type. | Key | What it does | |---|---| | 'hotkey', Command or Control with K by default | Opens the palette from anywhere on the page, or closes it. With 'inline', puts focus in its filter field. | | Down, Up | Moves the highlight to the next or the previous command, round from the last to the first. | | Page Down, Page Up | Moves the highlight by as many commands as the list shows at once. | | Home, End, Left, Right | Move the caret in the filter field. | | Enter | Runs the highlighted command, or follows it where it is a link, and closes the palette. On a command with 'opens', shows its page. | | Command or Control with Enter | Takes the highlighted command's 'alternate' destination, where it has one. | | Backspace | In an empty filter on a page, goes back to the page before. | | Escape | Clears the filter. With the filter empty, closes the palette and puts focus back where it was. | | Tab | Stays in the palette, which is modal. With 'inline', moves on through the page. | **ARIA.** The palette is a modal 'dialog' named by 'label', or with 'inline' no dialog at all. Inside it the filter field is a '
|
|
18333
|
+
/** The list is a 'Listbox', which handles filtering, the empty state, the match highlight, 'aria-activedescendant', scrolling an option into view, and moving between options with the keyboard. The palette adds a dialog and a hotkey that opens it. The palette keeps no value. It is not a form control and submits nothing. Choosing an option dispatches 'helix-select' once. To remember the last command, store it yourself. An option with 'href' is a link to a page, which the browser follows once the palette has closed. The hotkey listener is on the document, so the hotkey works from anywhere on the page, including inside another control's text field, whether or not the palette is open. 'mod' means Command on a Mac and Control elsewhere, so you write one binding. With 'inline', the palette is drawn in the page with no dialog, as a search over a list that is always shown. **Pages.** A command can open a page of commands of its own, as a palette offers "Change theme" and then the themes. Give the option 'opens' with a name, and slot the page's commands as 'page:' and that name: '''html <helix-command> <helix-option value="theme" opens="theme">Change theme</helix-option> <helix-option value="dark" slot="page:theme">Dark</helix-option> <helix-option value="light" slot="page:theme">Light</helix-option> </helix-command> ''' Choosing the opener says 'helix-select' with its value, and canceling it keeps the page that is shown. The list then shows the page, named by the opener's words, and a screen reader hears those words. Backspace in an empty filter goes back, and a screen reader hears the name of the page it goes back to. 'page' says which page is shown. The filter is cleared when the palette closes, so each opening starts from the full list. Combobox and Select do the same. As typing narrows the list, a screen reader hears how many commands are left, such as "3 commands". **Keyboard.** Focus goes to the filter field as the palette opens, and the highlight moves through the commands while you type. | Key | What it does | |---|---| | 'hotkey', Command or Control with K by default | Opens the palette from anywhere on the page, or closes it. With 'inline', puts focus in its filter field. | | Down, Up | Moves the highlight to the next or the previous command, round from the last to the first. | | Page Down, Page Up | Moves the highlight by as many commands as the list shows at once. | | Home, End, Left, Right | Move the caret in the filter field. | | Enter | Runs the highlighted command, or follows it where it is a link, and closes the palette. On a command with 'opens', shows its page. | | Command or Control with Enter | Takes the highlighted command's 'alternate' destination, where it has one. | | Backspace | In an empty filter on a page, goes back to the page before. | | Escape | Clears the filter. With the filter empty, closes the palette and puts focus back where it was. | | Tab | Stays in the palette, which is modal. With 'inline', moves on through the page. | **ARIA.** The palette is a modal 'dialog' named by 'label', or with 'inline' no dialog at all. Inside it the filter field is a text field with 'aria-autocomplete="list"', 'aria-controls' on the list, and 'aria-activedescendant' on the highlighted command, as the field of React Aria's 'Autocomplete' is. The commands are a 'listbox' of 'option's. How many commands typing left, the empty text and the loading text are said in a polite live region. */
|
|
18295
18334
|
"helix-headless-command": DefineCustomElement<
|
|
18296
18335
|
HelixHeadlessCommand,
|
|
18297
18336
|
HelixHeadlessCommandVueProps,
|
|
@@ -18489,13 +18528,13 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18489
18528
|
HelixHeadlessListItemVueProps,
|
|
18490
18529
|
HelixHeadlessListItemVueEvents
|
|
18491
18530
|
>;
|
|
18492
|
-
/** Sets 'role="list"' on the host, so a screen reader counts the rows and announces each one's position, such as "1 of 7". **'selection-mode' makes the list interactive**, in the way of a grid list: a grid of rows that is one tab stop. 'single' selects one row at a time and 'multiple' any number, and 'value' holds the selected rows' values, separated by commas. A change asks with 'helix-before-change' and tells with 'change'. 'none' selects nothing, so a press acts on the row. A 'disabled' row is passed over. Each row is named by its label and described by its description, so the words of the controls in 'end' are not read as part of its name. 'selection-behavior' says what a press does to the rows already selected. 'toggle', the default, adds or takes out the row. 'replace' selects the row alone, as a file list does, and the arrow keys carry the selection with them. Control or Command with a press then adds or takes out one row. | Key | What it does | |---|---| | Down, Up | Moves to the next or the previous row. Under 'replace', selects it. | | Home, End | Moves to the first or the last row. Under 'replace', selects it. | | Page Down, Page Up | Moves a box's height of rows, so the row at one edge lands at the other. Under 'replace', selects the row it lands on. | | A letter or a word | Moves to the next row whose words start with what you typed. | | Left, Right | Moves between the row and the controls in its 'end' slot. | | Space | Selects the row, or lets it go. | | Shift with Down, Up, Home, End, Page Down, Page Up or Space | Selects every row from the last one pressed, in 'multiple'. | | Control or Command with Down, Up, Home, End, Page Down or Page Up | Moves without selecting, under 'replace'. | | Control or Command with A | Selects every row, in 'multiple'. | | Escape | Lets go of every selected row, asking first, and keeps the key from the dialog or menu around the list. With nothing selected, the key goes on to them. | | Enter | Acts on the row: follows its link, or sends 'helix-action' from it. | A press with Shift selects every row from the last one pressed, and a press with Control or Command adds or takes out one row under 'replace'. **Leave 'selection-mode' unset for a list a reader reads**, and set it for one a reader chooses from or acts on. The rows of an interactive list are grid rows, which hold controls as a list box option cannot. Give a control in 'end' 'tabindex="-1"' to leave it to the arrow keys and out of the tab order. **'reorderable' lets you move rows.** Each row gets a grip after its 'end' slot, named by 'move-label'. Drag a grip to move its row, and the list scrolls near an edge. Or press a grip with Space, Enter, or a click to pick up its row, move it with the arrow keys, and press the grip again to drop it. A click on another row drops it there, and Escape puts it back. The list says each step in its 'live' region. A drop sends 'helix-before-reorder', which you can refuse, and then 'helix-reorder', whose 'keys' hold every row's value in the new order. **You move the rows**: the list moves no element of yours, so your framework keeps the order it rendered. | Key, on a held row's grip | What it does | |---|---| | Down, Up | Moves the row one place. | | Home, End | Moves the row to the top or the bottom. | | Space, Enter | Drops the row. | | Escape | Puts the row back where it was. | 'start' and 'reversed' number an ordered list as '<ol>' does. The list writes where the numbers start and which way they run as '--list-first' and '--list-step' on its slot, which the styled tier counts from. Reversed with no 'start' counts down from the number of rows, which a server cannot know, so served markup counts from one until the list runs. **An empty list.** Set 'empty-label', or put your own content in the 'empty' slot, for a row shown while the list has no rows and none are loading, such as "No files yet" and a link to add one. Without either, an empty list shows nothing. The list takes the 'empty' state while it has no rows, whatever it shows. **Loading more.** 'load-more' sends 'helix-load-more' once the end of the list comes within a screen of view, in the box that scrolls it or the page, once for each number of rows: add rows and it can send it again. While you fetch, set 'loading': the list is busy, and a row after the last says "Loading more" ('loading-label', or your own content in the 'loading' slot). The list asks for nothing while 'loading' is set. An interactive list with no name is reported once in a development build, since a screen reader announces it as a grid and nothing more. Name it with 'label' or 'aria-label'. */
|
|
18531
|
+
/** Sets 'role="list"' on the host, so a screen reader counts the rows and announces each one's position, such as "1 of 7". **'selection-mode' makes the list interactive**, in the way of a grid list: a grid of rows that is one tab stop. 'single' selects one row at a time and 'multiple' any number, and 'value' holds the selected rows' values, separated by commas. A change asks with 'helix-before-change' and tells with 'change'. 'none' selects nothing, so a press acts on the row. A 'disabled' row is passed over. With 'disabled-behavior="selection"', a 'disabled' row cannot be selected, and is reached and acted on as any row is, as React Aria's GridList has it. Each row is named by its label and described by its description, so the words of the controls in 'end' are not read as part of its name. 'selection-behavior' says what a press does to the rows already selected. 'toggle', the default, adds or takes out the row. 'replace' selects the row alone, as a file list does, and the arrow keys carry the selection with them. Control or Command with a press then adds or takes out one row. | Key | What it does | |---|---| | Down, Up | Moves to the next or the previous row. Under 'replace', selects it. | | Home, End | Moves to the first or the last row. Under 'replace', selects it. | | Page Down, Page Up | Moves a box's height of rows, so the row at one edge lands at the other. Under 'replace', selects the row it lands on. | | A letter or a word | Moves to the next row whose words start with what you typed. | | Left, Right | Moves between the row and the controls in its 'end' slot. | | Space | Selects the row, or lets it go. | | Shift with Down, Up, Home, End, Page Down, Page Up or Space | Selects every row from the last one pressed, in 'multiple'. | | Control or Command with Down, Up, Home, End, Page Down or Page Up | Moves without selecting, under 'replace'. | | Control or Command with A | Selects every row, in 'multiple'. | | Escape | Lets go of every selected row, asking first, and keeps the key from the dialog or menu around the list. With nothing selected, the key goes on to them. | | Enter | Acts on the row: follows its link, or sends 'helix-action' from it. | A press with Shift selects every row from the last one pressed, and a press with Control or Command adds or takes out one row under 'replace'. **Leave 'selection-mode' unset for a list a reader reads**, and set it for one a reader chooses from or acts on. The rows of an interactive list are grid rows, which hold controls as a list box option cannot. Give a control in 'end' 'tabindex="-1"' to leave it to the arrow keys and out of the tab order. **'reorderable' lets you move rows.** Each row gets a grip after its 'end' slot, named by 'move-label'. Drag a grip to move its row, and the list scrolls near an edge. Or press a grip with Space, Enter, or a click to pick up its row, move it with the arrow keys, and press the grip again to drop it. A click on another row drops it there, and Escape puts it back. The list says each step in its 'live' region. A drop sends 'helix-before-reorder', which you can refuse, and then 'helix-reorder', whose 'keys' hold every row's value in the new order. **You move the rows**: the list moves no element of yours, so your framework keeps the order it rendered. | Key, on a held row's grip | What it does | |---|---| | Down, Up | Moves the row one place. | | Home, End | Moves the row to the top or the bottom. | | Space, Enter | Drops the row. | | Escape | Puts the row back where it was. | 'start' and 'reversed' number an ordered list as '<ol>' does. The list writes where the numbers start and which way they run as '--list-first' and '--list-step' on its slot, which the styled tier counts from. Reversed with no 'start' counts down from the number of rows, which a server cannot know, so served markup counts from one until the list runs. **An empty list.** Set 'empty-label', or put your own content in the 'empty' slot, for a row shown while the list has no rows and none are loading, such as "No files yet" and a link to add one. Without either, an empty list shows nothing. The list takes the 'empty' state while it has no rows, whatever it shows. **Loading more.** 'load-more' sends 'helix-load-more' once the end of the list comes within a screen of view, in the box that scrolls it or the page, once for each number of rows: add rows and it can send it again. While you fetch, set 'loading': the list is busy, and a row after the last says "Loading more" ('loading-label', or your own content in the 'loading' slot). The list asks for nothing while 'loading' is set. An interactive list with no name is reported once in a development build, since a screen reader announces it as a grid and nothing more. Name it with 'label' or 'aria-label'. */
|
|
18493
18532
|
"helix-headless-list": DefineCustomElement<
|
|
18494
18533
|
HelixHeadlessList,
|
|
18495
18534
|
HelixHeadlessListVueProps,
|
|
18496
18535
|
HelixHeadlessListVueEvents
|
|
18497
18536
|
>;
|
|
18498
|
-
/** The listbox is the control, and options are its items. A Select is a listbox with a trigger in front of it, a Combobox is a listbox with a text input, and a command palette is a listbox in a dialog. They differ only in what opens the list and what filters it. With 'multiple' set, 'value' is a comma-separated string, like 'Checkbox.Group''s, because 'MixinControllerValue' holds a string. The form receives one entry per selected option, as a native '<select multiple>' sends it, so your server does not split on commas. Selected and active are separate. The selected option is the value. The active option is where the keyboard is: the arrow keys move it, and 'aria-activedescendant' points to it while focus stays on the list. **Keyboard.** The list is one tab stop, or its filter field is where there is one. In a single-choice list the highlight is the choice unless 'manual' is set; then Enter, Space or a click chooses. | Key | What it does | |---|---| | Down, Up | Moves the highlight to the next or the previous option, round from the last to the first. With 'layout="grid"', to the option below or above, stopping at the edge. | | Right, Left | With 'layout="grid"', moves to the next or the previous option, mirrored right to left. In a filter field, moves the caret. | | Home, End | Moves to the first or the last option. In a filter field, moves the caret. | | Page Down, Page Up | Moves by as many options as the list shows at once. | | A letter or a word | Moves to the next option whose words start with what you typed. In a filter field, types it. | | Enter | Chooses the highlighted option, or follows it where it is a link. | | Space | Chooses the highlighted option, or with 'multiple' toggles it. In a filter field, types a space. | | Shift with Down or Up | With 'multiple', adds the option the highlight moves to. In a filter field, moves the highlight and leaves the value. | | Shift with Space | With 'multiple', adds every option from the one last chosen to the highlighted one. In a filter field, types a space. | | Shift with Home or End | With 'multiple', adds every option from the highlight to that end. In a filter field, hold Control as well. | | Control or Command with A | With 'multiple', chooses every option, or none where all are chosen. In a filter field, selects the text. | | Escape | In a filter field, clears the filter. | | Alt with Up or Down | In a 'reorderable' list, moves the highlighted option a place. Alt with Home or End moves it to either end. | **ARIA.** The 'items' part is the 'listbox', named by the label and described by the hint and the message, with 'aria-multiselectable' under 'multiple', 'aria-required', 'aria-invalid', and 'aria-busy' while loading. Each option is an 'option' with 'aria-selected'. The list, or its filter field, points 'aria-activedescendant' at the highlighted option; the field is 'aria-autocomplete="list"' and controls the list. An option with 'href' is a link: Enter or a press follows it and selects nothing, and moving onto it with the arrows does not follow it. As a filter narrows the list, a screen reader hears how many options are left, such as "3 results", from 'result-label' and 'results-label'. A filter that leaves none says 'empty-text'. **Moving options** is a separate import, '@fusion.dev/helix/listbox/reorder', so a list that never moves options carries none of its code. With it imported, 'reorderable' lets a reader move options: - Alt with Up or Down moves the highlighted option a place, and Alt with Home or End moves it to either end, as the APG's rearrangeable listbox does. The highlight stays on it. - A pointer drags an option, with a drop indicator, and the list scrolls near an edge. A press that does not travel still chooses the option. - A drop sends 'helix-before-reorder', which you can refuse, and then 'helix-reorder', whose 'keys' hold every value in the new order. **You move the options**, or set 'items' in the new order: the list moves no element of yours. - The list says each move in its 'live' region. The words are the 'moved-label', 'canceled-label', 'dropped-label', and 'picked-up-label' attributes, which the import reads. - An option in a group moves within its group. Options do not move while a filter narrows the list, under 'layout="grid"', or while the list is disabled. */
|
|
18537
|
+
/** The listbox is the control, and options are its items. A Select is a listbox with a trigger in front of it, a Combobox is a listbox with a text input, and a command palette is a listbox in a dialog. They differ only in what opens the list and what filters it. With 'multiple' set, 'value' is a comma-separated string, like 'Checkbox.Group''s, because 'MixinControllerValue' holds a string. The form receives one entry per selected option, as a native '<select multiple>' sends it, so your server does not split on commas. An option's value may hold a comma: a run of the string that is an option's value is read as that one value, and the form sends it as one entry. Selected and active are separate. The selected option is the value. The active option is where the keyboard is: the arrow keys move it, and 'aria-activedescendant' points to it while focus stays on the list. **Keyboard.** The list is one tab stop, or its filter field is where there is one. In a single-choice list the highlight is the choice unless 'manual' is set; then Enter, Space or a click chooses. | Key | What it does | |---|---| | Down, Up | Moves the highlight to the next or the previous option, round from the last to the first. With 'layout="grid"', to the option below or above, stopping at the edge. | | Right, Left | With 'layout="grid"', moves to the next or the previous option, mirrored right to left. In a filter field, moves the caret. | | Home, End | Moves to the first or the last option. In a filter field, moves the caret. | | Page Down, Page Up | Moves by as many options as the list shows at once. | | A letter or a word | Moves to the next option whose words start with what you typed. In a filter field, types it. | | Enter | Chooses the highlighted option, or follows it where it is a link. | | Space | Chooses the highlighted option, or with 'multiple' toggles it. In a filter field, types a space. | | Shift with Down or Up | With 'multiple', adds the option the highlight moves to. In a filter field, moves the highlight and leaves the value. | | Shift with Space | With 'multiple', adds every option from the one last chosen to the highlighted one. In a filter field, types a space. | | Shift with Home or End | With 'multiple', adds every option from the highlight to that end. In a filter field, hold Control as well. | | Control or Command with A | With 'multiple', chooses every option, or none where all are chosen. In a filter field, selects the text. | | Escape | In a filter field, clears the filter. | | Alt with Up or Down | In a 'reorderable' list, moves the highlighted option a place. Alt with Home or End moves it to either end. | **ARIA.** The 'items' part is the 'listbox', named by the label and described by the hint and the message, with 'aria-multiselectable' under 'multiple', 'aria-required', 'aria-invalid', and 'aria-busy' while loading. Each option is an 'option' with 'aria-selected'. The list, or its filter field, points 'aria-activedescendant' at the highlighted option; the field is 'aria-autocomplete="list"' and controls the list. An option with 'href' is a link: Enter or a press follows it and selects nothing, and moving onto it with the arrows does not follow it. As a filter narrows the list, a screen reader hears how many options are left, such as "3 results", from 'result-label' and 'results-label'. A filter that leaves none says 'empty-text'. **Moving options** is a separate import, '@fusion.dev/helix/listbox/reorder', so a list that never moves options carries none of its code. With it imported, 'reorderable' lets a reader move options: - Alt with Up or Down moves the highlighted option a place, and Alt with Home or End moves it to either end, as the APG's rearrangeable listbox does. The highlight stays on it. - A pointer drags an option, with a drop indicator, and the list scrolls near an edge. A press that does not travel still chooses the option. - A drop sends 'helix-before-reorder', which you can refuse, and then 'helix-reorder', whose 'keys' hold every value in the new order. **You move the options**, or set 'items' in the new order: the list moves no element of yours. - The list says each move in its 'live' region. The words are the 'moved-label', 'canceled-label', 'dropped-label', and 'picked-up-label' attributes, which the import reads. - An option in a group moves within its group. Options do not move while a filter narrows the list, under 'layout="grid"', or while the list is disabled. */
|
|
18499
18538
|
"helix-headless-listbox": DefineCustomElement<
|
|
18500
18539
|
HelixHeadlessListbox,
|
|
18501
18540
|
HelixHeadlessListboxVueProps,
|
|
@@ -18585,7 +18624,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18585
18624
|
HelixHeadlessMenuItemVueProps,
|
|
18586
18625
|
HelixHeadlessMenuItemVueEvents
|
|
18587
18626
|
>;
|
|
18588
|
-
/** The trigger is slotted and stays your own element, as with the tooltip. The menu renders its surface in the top layer with the popover API, so an ancestor with 'overflow: hidden' does not clip it and it needs no 'z-index'. Slot a 'helix-button' or 'helix-icon-button' as the trigger, and the menu tells it that it opens a menu and whether the menu is open, inside its own shadow root. On a plain element, such as a '<button>', the menu writes 'aria-haspopup="menu"' and 'aria-expanded', from a frame after its own first render, so a server's markup is never changed while a framework hydrates it. It never writes 'aria-expanded' where you wrote it yourself. Submenus drill down by default. A submenu replaces the panel's content, and a back row returns to the previous page. One panel stays inside a narrow window, and works on touch screens, which have no hover. **'submenus="flyout"' opens each submenu in a panel of its own beside its row**, as React Aria's 'SubmenuTrigger' and Radix's 'Sub' do. Resting the pointer on the row opens it, and a pointer crossing toward the open panel over the rows between keeps it open, as Radix's grace area does. Right Arrow opens a row's submenu on its first row, and Left Arrow or Escape closes it and returns focus to the row, the two arrows swapping on a right-to-left page. The row says 'aria-expanded', and the panel is a 'menu' named by the row. The root holds which page is open, because only one page shows at a time. It sets this on items as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. Group rows under a heading with 'Menu.Section', which is a 'group' named by its heading. Between runs of rows, a '<helix-divider>' is a separator a screen reader announces. Keys: Enter, Space or Down Arrow on the trigger opens the menu on its first row, and Up Arrow on its last. In the menu, Up and Down Arrow move between rows, Home and End go to the first and the last, a typed letter moves to the next row whose name starts with it, Enter and Space choose, Right Arrow opens a row's submenu and Left Arrow goes back, the two swapping on a right-to-left page
|
|
18627
|
+
/** The trigger is slotted and stays your own element, as with the tooltip. The menu renders its surface in the top layer with the popover API, so an ancestor with 'overflow: hidden' does not clip it and it needs no 'z-index'. Slot a 'helix-button' or 'helix-icon-button' as the trigger, and the menu tells it that it opens a menu and whether the menu is open, inside its own shadow root. On a plain element, such as a '<button>', the menu writes 'aria-haspopup="menu"' and 'aria-expanded', from a frame after its own first render, so a server's markup is never changed while a framework hydrates it. It never writes 'aria-expanded' where you wrote it yourself. Submenus drill down by default. A submenu replaces the panel's content, and a back row returns to the previous page. One panel stays inside a narrow window, and works on touch screens, which have no hover. **'submenus="flyout"' opens each submenu in a panel of its own beside its row**, as React Aria's 'SubmenuTrigger' and Radix's 'Sub' do. Resting the pointer on the row opens it, and a pointer crossing toward the open panel over the rows between keeps it open, as Radix's grace area does. Right Arrow opens a row's submenu on its first row, and Left Arrow or Escape closes it and returns focus to the row, the two arrows swapping on a right-to-left page. The row says 'aria-expanded', and the panel is a 'menu' named by the row. The root holds which page is open, because only one page shows at a time. It sets this on items as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. Group rows under a heading with 'Menu.Section', which is a 'group' named by its heading. Between runs of rows, a '<helix-divider>' is a separator a screen reader announces. Keys: Enter, Space or Down Arrow on the trigger opens the menu on its first row, and Up Arrow on its last. In the menu, Up and Down Arrow move between rows, Home and End go to the first and the last, a typed letter moves to the next row whose name starts with it, Enter and Space choose, Right Arrow opens a row's submenu and Left Arrow goes back, the two swapping on a right-to-left page. Left Arrow on the top page does nothing. Escape closes the menu and returns focus to the trigger. Tab closes it and moves on. While it is open, the surface carries the trigger's width as '--floating-anchor-inline-size' and the room left below it as '--floating-available-block-size', as Radix's dropdown menu publishes its trigger's width, for a menu as wide as its trigger: 'helix-menu::part(surface) { min-inline-size: var(--floating-anchor-inline-size) }'. With 'context', the trigger is an area and the menu is its context menu: a right-click, a long press, Shift+F10 or the menu key over the area opens it at the pointer, or at the area's corner from the keyboard, as Radix's context menu does. A press on the area does not open it, and closing it returns focus to where it was. A touch or a pen held still on the area opens it too, on every browser, since iOS sends no 'contextmenu' for one. **A trigger with its own action.** With 'open-on="long-press"', a press on the trigger is the trigger's own, and a press held for half a second opens the menu, as React Aria's 'trigger="longPress"' does. Alt+Down or Alt+Up opens it from the keyboard, and the trigger is described by 'long-press-label', which says so. */
|
|
18589
18628
|
"helix-headless-menu": DefineCustomElement<
|
|
18590
18629
|
HelixHeadlessMenu,
|
|
18591
18630
|
HelixHeadlessMenuVueProps,
|
|
@@ -18627,7 +18666,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18627
18666
|
HelixHeadlessNotificationsVueProps,
|
|
18628
18667
|
HelixHeadlessNotificationsVueEvents
|
|
18629
18668
|
>;
|
|
18630
|
-
/** A separate family from 'Input''s 'type="number"'. It renders two buttons, binds four keys 'Input' does not, and handles clamping and stepping. The field is 'type="text"' with 'inputmode="decimal"'. Tested in a real browser, 'type="number"' fails in three ways: - Typing '12e' gives a '.value' of '""', so the element cannot see what you typed. A 'type="text"' field keeps '"12e"'. - The mouse wheel over a focused field changes the value, for example from 5 to 4, when you only meant to scroll the page. - 'selectionStart' is 'null', so the caret cannot be managed. 'inputmode="decimal"' keeps the numeric keypad on phones. 'format-options' shows the number with 'Intl.NumberFormat' in 'locale', as a currency, a percent or a unit, while the field is not being edited. Focus shows the number itself, and a typed '$1,200' or '25%' is read back with the same options. The value stays the plain number: '1200', or '0.25' for 25%. The locale's group separators are read in every field, so '1,234' is a number in 'en-US'. The field and its two buttons sit in a 'role="group"', and the field carries 'role-label', "number field" in English, as its 'aria-roledescription', as React Aria's NumberField does. On iOS and iPadOS the field is a plain text field, with no 'role="spinbutton"', which VoiceOver reads as a slider you cannot type in, and no role description, so VoiceOver says the field is required. React Aria's NumberField does the same. Validity follows the platform's rules: 'min', 'max', and 'step' are checked and reported through the host's own 'setValidity', under the platform's flag names. Stepping is separate from typing, so a number is not corrected while you type it. While you type, the form holds the number the text reads as, so a field showing '$2,500.50' gives the form 2500.5, and text that is not a number gives it nothing, as a native number field does. Holding a stepper button down steps once, then again after 400 milliseconds, then every 60 milliseconds until you let go, as React Aria's NumberField does. **Keyboard.** The field is one tab stop, and the stepper buttons are not in the tab order. | Key | What it does | |---|---| | Up, Down | Steps the value up or down by 'step'. | | Page Up, Page Down | Steps by 'large-step' steps, ten by default. | | Home, End | Goes to 'min' or 'max', where there is one. Without one, moves the caret. | | Enter | Commits the typed number and submits the form, as a native field does. | The field has 'role="spinbutton"' with 'aria-valuenow', 'aria-valuemin', 'aria-valuemax', and the formatted text in 'aria-valuetext'. */
|
|
18669
|
+
/** A separate family from 'Input''s 'type="number"'. It renders two buttons, binds four keys 'Input' does not, and handles clamping and stepping. The field is 'type="text"' with 'inputmode="decimal"'. Tested in a real browser, 'type="number"' fails in three ways: - Typing '12e' gives a '.value' of '""', so the element cannot see what you typed. A 'type="text"' field keeps '"12e"'. - The mouse wheel over a focused field changes the value, for example from 5 to 4, when you only meant to scroll the page. - 'selectionStart' is 'null', so the caret cannot be managed. 'inputmode="decimal"' keeps the numeric keypad on phones. 'format-options' shows the number with 'Intl.NumberFormat' in 'locale', as a currency, a percent or a unit, while the field is not being edited. Focus shows the number itself, and a typed '$1,200' or '25%' is read back with the same options. The value stays the plain number: '1200', or '0.25' for 25%. The locale's group separators are read in every field, so '1,234' is a number in 'en-US'. The field and its two buttons sit in a 'role="group"' named by the label, and the field carries 'role-label', "number field" in English, as its 'aria-roledescription', as React Aria's NumberField does. On iOS and iPadOS the field is a plain text field, with no 'role="spinbutton"', which VoiceOver reads as a slider you cannot type in, and no role description, so VoiceOver says the field is required. React Aria's NumberField does the same. Validity follows the platform's rules: 'min', 'max', and 'step' are checked and reported through the host's own 'setValidity', under the platform's flag names. Stepping is separate from typing, so a number is not corrected while you type it. While you type, the form holds the number the text reads as, so a field showing '$2,500.50' gives the form 2500.5, and text that is not a number gives it nothing, as a native number field does. Holding a stepper button down steps once, then again after 400 milliseconds, then every 60 milliseconds until you let go, as React Aria's NumberField does. **Keyboard.** The field is one tab stop, and the stepper buttons are not in the tab order. | Key | What it does | |---|---| | Up, Down | Steps the value up or down by 'step'. | | Page Up, Page Down | Steps by 'large-step' steps, ten by default. | | Home, End | Goes to 'min' or 'max', where there is one. Without one, moves the caret. | | Enter | Commits the typed number and submits the form, as a native field does. | The field has 'role="spinbutton"' with 'aria-valuenow', 'aria-valuemin', 'aria-valuemax', and the formatted text in 'aria-valuetext'. */
|
|
18631
18670
|
"helix-headless-number-input": DefineCustomElement<
|
|
18632
18671
|
HelixHeadlessNumberInput,
|
|
18633
18672
|
HelixHeadlessNumberInputVueProps,
|
|
@@ -18741,7 +18780,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18741
18780
|
HelixHeadlessScrollAreaVueProps,
|
|
18742
18781
|
HelixHeadlessScrollAreaVueEvents
|
|
18743
18782
|
>;
|
|
18744
|
-
/** A trigger that opens a 'Listbox'. The list is the same element you can use on its own, with the same keyboard behavior, filtering, and multi-select rules. Select adds a trigger that shows what is chosen, a floating surface, and a place for focus to return to when the list closes. Your options stay in your light DOM and are slotted through into the listbox, so the listbox looks through slots to find them. For a list too long to draw whole, set 'items' instead: the list draws only the options in sight, as Listbox's 'items' does, and the trigger, its keys and the form read the whole set. 'Select' owns the value, passes it down to the listbox, and takes changes back, so the value lives in one place. Set 'valueContent' to draw the trigger's content from the chosen options, and several chosen options are written as a list in the reader's language. **Keyboard.** On the closed trigger: | Key | What it does | |---|---| | Down, Enter, Space | Opens the list on the chosen option, or the first. | | Up | Opens the list on the chosen option, or the last. | | Home, End | Opens the list on the first or the last option. | | Left, Right | Chooses the option before or after the chosen one without opening, as React Aria's Select does, in either direction of text. | | A letter or a word | Chooses the option whose words start with what you typed, as a native '<select>' does. With 'multiple', opens the list on it. | In the open list, which is a 'Listbox': | Key | What it does | |---|---| | Down, Up, Home, End, Page Down, Page Up | Moves the highlight. | | A letter or a word | Moves the highlight to the next option whose words start with what you typed. | | Enter, Space | Chooses the highlighted option and closes the list. With 'multiple', toggles it and leaves the list open. | | Escape | Closes the list and puts focus back on the trigger. | | Tab | Closes the list and moves on. | A choice made on the closed trigger is said aloud on Apple devices, where VoiceOver does not read the trigger's new name. **ARIA.** The trigger is a 'button' with 'aria-haspopup="listbox"' and 'aria-expanded', named by the label and then the chosen words, as a native '<select>' is. The list is the listbox 'Listbox' describes, named by the label, or by 'list-label' where there is none. Set 'autocomplete' to let a browser's autofill choose, as a native '<select>' with the same attribute would. */
|
|
18783
|
+
/** A trigger that opens a 'Listbox'. The list is the same element you can use on its own, with the same keyboard behavior, filtering, and multi-select rules. Select adds a trigger that shows what is chosen, a floating surface, and a place for focus to return to when the list closes. Your options stay in your light DOM and are slotted through into the listbox, so the listbox looks through slots to find them. For a list too long to draw whole, set 'items' instead: the list draws only the options in sight, as Listbox's 'items' does, and the trigger, its keys and the form read the whole set. 'Select' owns the value, passes it down to the listbox, and takes changes back, so the value lives in one place. With 'multiple', the value is the chosen values joined with commas, and the form receives one entry for each. An option's value may hold a comma, and it is read as one value. Set 'valueContent' to draw the trigger's content from the chosen options, and several chosen options are written as a list in the reader's language. **Keyboard.** On the closed trigger: | Key | What it does | |---|---| | Down, Enter, Space | Opens the list on the chosen option, or the first. | | Up | Opens the list on the chosen option, or the last. | | Home, End | Opens the list on the first or the last option. | | Left, Right | Chooses the option before or after the chosen one without opening, as React Aria's Select does, in either direction of text. | | A letter or a word | Chooses the option whose words start with what you typed, as a native '<select>' does. With 'multiple', opens the list on it. | In the open list, which is a 'Listbox': | Key | What it does | |---|---| | Down, Up, Home, End, Page Down, Page Up | Moves the highlight. | | A letter or a word | Moves the highlight to the next option whose words start with what you typed. | | Enter, Space | Chooses the highlighted option and closes the list. With 'multiple', toggles it and leaves the list open. | | Escape | Closes the list and puts focus back on the trigger. | | Tab | Closes the list and moves on. | A choice made on the closed trigger is said aloud on Apple devices, where VoiceOver does not read the trigger's new name. **ARIA.** The trigger is a 'button' with 'aria-haspopup="listbox"' and 'aria-expanded', named by the label and then the chosen words, as a native '<select>' is. The list is the listbox 'Listbox' describes, named by the label, or by 'list-label' where there is none. Set 'autocomplete' to let a browser's autofill choose, as a native '<select>' with the same attribute would. */
|
|
18745
18784
|
"helix-headless-select": DefineCustomElement<
|
|
18746
18785
|
HelixHeadlessSelect,
|
|
18747
18786
|
HelixHeadlessSelectVueProps,
|