@fusion.dev/helix-headless 0.164.0 → 0.166.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 +837 -64
- package/dist/callout/root/callout-root.d.ts +8 -2
- package/dist/callout/root/callout-root.js +14 -1
- package/dist/code-block/root/code-block-root.d.ts +63 -0
- package/dist/code-block/root/code-block-root.js +117 -6
- package/dist/date-input/root/date-input-root.d.ts +3 -3
- package/dist/date-input/root/date-input-root.js +8 -5
- package/dist/element-events.generated.js +15 -2
- package/dist/filter-input/menu/filter-menu.d.ts +1 -0
- package/dist/filter-input/menu/filter-menu.js +1 -1
- package/dist/format-date/root/format-date-root.d.ts +3 -1
- package/dist/format-date/root/format-date-root.js +4 -1
- package/dist/lightbox/item/lightbox-item.js +3 -1
- package/dist/lightbox/root/lightbox-root.d.ts +28 -0
- package/dist/lightbox/root/lightbox-root.js +21 -2
- package/dist/listbox/root/listbox-root.js +2 -5
- package/dist/menu/item/menu-item.d.ts +20 -0
- package/dist/menu/item/menu-item.js +53 -20
- package/dist/menu/root/menu-root.d.ts +84 -1
- package/dist/menu/root/menu-root.js +187 -44
- package/dist/number-input/root/number-input-root.d.ts +32 -9
- package/dist/number-input/root/number-input-root.js +53 -9
- package/dist/object-inspector/root/object-inspector-root.d.ts +5 -0
- package/dist/object-inspector/root/object-inspector-root.js +5 -0
- package/dist/option/root/index.d.ts +1 -0
- package/dist/option/root/index.js +1 -0
- package/dist/steps/root/steps-root.d.ts +7 -0
- package/dist/steps/root/steps-root.js +7 -0
- package/dist/tag/root/index.d.ts +1 -0
- package/dist/tag/root/index.js +1 -0
- package/dist/time-input/root/time-input-root.d.ts +4 -3
- package/dist/time-input/root/time-input-root.js +5 -4
- package/dist/time-picker/root/time-picker-root.d.ts +1 -1
- package/dist/time-picker/root/time-picker-root.js +5 -2
- package/dist/video/root/video-root.d.ts +2 -0
- package/dist/video/root/video-root.js +4 -2
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +1 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +1 -1
- package/dist/video-playlist/root/video-playlist-root.js +15 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +310 -44
- package/types/vue.d.ts +68 -11
- package/types/words.d.ts +18 -0
package/types/vue.d.ts
CHANGED
|
@@ -201,14 +201,14 @@ import type {
|
|
|
201
201
|
HelixHistoryEvent,
|
|
202
202
|
HelixPinEvent,
|
|
203
203
|
HelixBeforeToggleEvent,
|
|
204
|
-
HelixToggleEvent,
|
|
205
204
|
HelixCopyEvent,
|
|
205
|
+
HelixCopyErrorEvent,
|
|
206
|
+
HelixToggleEvent,
|
|
206
207
|
HelixSampleEndEvent,
|
|
207
208
|
HelixSampleStartEvent,
|
|
208
209
|
HelixCreateEvent,
|
|
209
210
|
HelixFilterEvent,
|
|
210
211
|
HelixLoadMoreEvent,
|
|
211
|
-
HelixCopyErrorEvent,
|
|
212
212
|
HelixBeforeReorderEvent,
|
|
213
213
|
HelixExpandEvent,
|
|
214
214
|
HelixFilteredEvent,
|
|
@@ -3152,9 +3152,18 @@ export type HelixHeadlessCodeBlockElementEvent<E = Event> = TypedEvent<
|
|
|
3152
3152
|
HelixHeadlessCodeBlock,
|
|
3153
3153
|
E
|
|
3154
3154
|
>;
|
|
3155
|
+
/** `helix-before-change` event type */
|
|
3156
|
+
export type HelixHeadlessCodeBlockHelixBeforeChangeElementEvent =
|
|
3157
|
+
HelixHeadlessCodeBlockElementEvent<HelixBeforeChangeEvent>;
|
|
3155
3158
|
/** `helix-before-toggle` event type */
|
|
3156
3159
|
export type HelixHeadlessCodeBlockHelixBeforeToggleElementEvent =
|
|
3157
3160
|
HelixHeadlessCodeBlockElementEvent<HelixBeforeToggleEvent>;
|
|
3161
|
+
/** `helix-copy` event type */
|
|
3162
|
+
export type HelixHeadlessCodeBlockHelixCopyElementEvent =
|
|
3163
|
+
HelixHeadlessCodeBlockElementEvent<HelixCopyEvent>;
|
|
3164
|
+
/** `helix-copy-error` event type */
|
|
3165
|
+
export type HelixHeadlessCodeBlockHelixCopyErrorElementEvent =
|
|
3166
|
+
HelixHeadlessCodeBlockElementEvent<HelixCopyErrorEvent>;
|
|
3158
3167
|
/** `helix-toggle` event type */
|
|
3159
3168
|
export type HelixHeadlessCodeBlockHelixToggleElementEvent =
|
|
3160
3169
|
HelixHeadlessCodeBlockElementEvent<HelixToggleEvent>;
|
|
@@ -3226,6 +3235,15 @@ block lays out. Not for a diff, whose files each scroll on their own. */
|
|
|
3226
3235
|
"expand-label"?: (HelixHeadlessCodeBlock["expandLabel"]) | undefined;
|
|
3227
3236
|
/** The expand button's words while the cap hides lines. */
|
|
3228
3237
|
expandLabel?: (HelixHeadlessCodeBlock["expandLabel"]) | undefined;
|
|
3238
|
+
/** The name of the file shown, where the block holds several Code Blocks:
|
|
3239
|
+
the `label` of one, or its `language` without one.
|
|
3240
|
+
|
|
3241
|
+
Unset, or a name no file has, shows the first. */
|
|
3242
|
+
file?: (HelixHeadlessCodeBlock["file"]) | undefined;
|
|
3243
|
+
/** The name of the file tabs, read by screen readers. */
|
|
3244
|
+
"files-label"?: (HelixHeadlessCodeBlock["filesLabel"]) | undefined;
|
|
3245
|
+
/** The name of the file tabs, read by screen readers. */
|
|
3246
|
+
filesLabel?: (HelixHeadlessCodeBlock["filesLabel"]) | undefined;
|
|
3229
3247
|
/** The words of a button that hides a run of unchanged lines it showed, in a
|
|
3230
3248
|
diff with `context-lines`. `{count}` is how many, and each language
|
|
3231
3249
|
writes the forms it has. */
|
|
@@ -3362,8 +3380,16 @@ read, nor for a diff. */
|
|
|
3362
3380
|
};
|
|
3363
3381
|
|
|
3364
3382
|
export type HelixHeadlessCodeBlockVueEvents = {
|
|
3383
|
+
/** A file tab showed its file, whose name `file` now holds. */
|
|
3384
|
+
change: HelixHeadlessCodeBlockElementEvent;
|
|
3385
|
+
/** A file tab is about to show its file, with the file's name in `detail.value`. Cancelable: cancel it to keep the file shown. */
|
|
3386
|
+
"helix-before-change": HelixHeadlessCodeBlockHelixBeforeChangeElementEvent;
|
|
3365
3387
|
/** The wrap button was pressed, with the `wrap` it asks for in `detail.checked`. Cancelable: cancel it to keep the lines as they are. */
|
|
3366
3388
|
"helix-before-toggle": HelixHeadlessCodeBlockHelixBeforeToggleElementEvent;
|
|
3389
|
+
/** The copy button put the code on the clipboard, with the text in `detail.value`. */
|
|
3390
|
+
"helix-copy": HelixHeadlessCodeBlockHelixCopyElementEvent;
|
|
3391
|
+
/** A press on the copy button put nothing on the clipboard: the browser did not allow the write, or there was no code. */
|
|
3392
|
+
"helix-copy-error": HelixHeadlessCodeBlockHelixCopyErrorElementEvent;
|
|
3367
3393
|
/** Fired after the wrap button changed `wrap`, with the new value in `detail.checked`. */
|
|
3368
3394
|
"helix-toggle": HelixHeadlessCodeBlockHelixToggleElementEvent;
|
|
3369
3395
|
};
|
|
@@ -7349,7 +7375,9 @@ place of the date: `long` ("3 hours ago"), `short` ("3 hr. ago") or
|
|
|
7349
7375
|
`narrow` ("3h ago").
|
|
7350
7376
|
|
|
7351
7377
|
The reading refreshes as it goes stale, as `elapsed` does, and the whole
|
|
7352
|
-
date is its title. `elapsed` wins where both are set.
|
|
7378
|
+
date is its title. `elapsed` wins where both are set. Written with no
|
|
7379
|
+
value, as `elapsed` is, or with a style `Intl` does not know, it reads
|
|
7380
|
+
`long`. */
|
|
7353
7381
|
relative?: (HelixHeadlessFormatDate["relative"]) | undefined;
|
|
7354
7382
|
/** How the second is written, where a time of day is shown. */
|
|
7355
7383
|
second?: (HelixHeadlessFormatDate["second"]) | undefined;
|
|
@@ -10683,6 +10711,9 @@ export type HelixHeadlessMenuHelixBeforeCloseElementEvent =
|
|
|
10683
10711
|
/** `helix-before-open` event type */
|
|
10684
10712
|
export type HelixHeadlessMenuHelixBeforeOpenElementEvent =
|
|
10685
10713
|
HelixHeadlessMenuElementEvent<HelixBeforeOpenEvent>;
|
|
10714
|
+
/** `helix-filter` event type */
|
|
10715
|
+
export type HelixHeadlessMenuHelixFilterElementEvent =
|
|
10716
|
+
HelixHeadlessMenuElementEvent<HelixFilterEvent>;
|
|
10686
10717
|
/** `helix-select` event type */
|
|
10687
10718
|
export type HelixHeadlessMenuHelixSelectElementEvent =
|
|
10688
10719
|
HelixHeadlessMenuElementEvent<HelixSelectEvent>;
|
|
@@ -10710,6 +10741,18 @@ Ark UI's `closeOnSelect` does. A row's own `close-on-select` wins over this. */
|
|
|
10710
10741
|
/** Whether the menu is the trigger's context menu: it opens where the reader
|
|
10711
10742
|
asks for one, with a right-click, a long press, Shift+F10 or the menu key. */
|
|
10712
10743
|
context?: (HelixHeadlessMenu["context"]) | undefined;
|
|
10744
|
+
/** The text the rows are filtered by, which the filter field holds.
|
|
10745
|
+
|
|
10746
|
+
Cleared as the menu closes and as a submenu opens or closes, so each page
|
|
10747
|
+
starts with every row showing. */
|
|
10748
|
+
filter?: (HelixHeadlessMenu["filter"]) | undefined;
|
|
10749
|
+
/** Whether the menu shows a field above its rows that narrows them as the
|
|
10750
|
+
reader types, with focus staying in the field. */
|
|
10751
|
+
filterable?: (HelixHeadlessMenu["filterable"]) | undefined;
|
|
10752
|
+
/** The filter field's name and placeholder. */
|
|
10753
|
+
"filter-label"?: (HelixHeadlessMenu["filterLabel"]) | undefined;
|
|
10754
|
+
/** The filter field's name and placeholder. */
|
|
10755
|
+
filterLabel?: (HelixHeadlessMenu["filterLabel"]) | undefined;
|
|
10713
10756
|
/** Accessible name for the surface.
|
|
10714
10757
|
|
|
10715
10758
|
Empty by default, which names the surface by its trigger, so a menu opened
|
|
@@ -10722,6 +10765,10 @@ to open the menu. Translate it with the rest of your interface. */
|
|
|
10722
10765
|
/** The description a trigger gives under `open-on="long-press"`, saying how
|
|
10723
10766
|
to open the menu. Translate it with the rest of your interface. */
|
|
10724
10767
|
longPressLabel?: (HelixHeadlessMenu["longPressLabel"]) | undefined;
|
|
10768
|
+
/** The text shown when the filter keeps no rows. */
|
|
10769
|
+
"no-results-text"?: (HelixHeadlessMenu["noResultsText"]) | undefined;
|
|
10770
|
+
/** The text shown when the filter keeps no rows. */
|
|
10771
|
+
noResultsText?: (HelixHeadlessMenu["noResultsText"]) | undefined;
|
|
10725
10772
|
/** Space between the trigger and the surface, in pixels. */
|
|
10726
10773
|
offset?: (HelixHeadlessMenu["offset"]) | undefined;
|
|
10727
10774
|
/** What opens the menu from its trigger. `long-press` leaves a press to the
|
|
@@ -10770,6 +10817,13 @@ hydration, or diffed by a framework, it comes back holding whatever the
|
|
|
10770
10817
|
last reader did rather than what the author wrote. `:state(open)` carries
|
|
10771
10818
|
the resolved state for stylesheets, which is what the mirror is for. */
|
|
10772
10819
|
open?: (HelixHeadlessMenu["open"]) | undefined;
|
|
10820
|
+
/** Whether a row is kept by the filter: a function given the row's words and
|
|
10821
|
+
the filter, trimmed, that returns `true` to keep it showing, as React
|
|
10822
|
+
Aria's `Autocomplete` takes `filter`. See Listbox's `filterMatch`.
|
|
10823
|
+
|
|
10824
|
+
Absent, a row is kept where its words hold the filter, in any case. A
|
|
10825
|
+
property only, there being no way to write a function in markup. */
|
|
10826
|
+
filterMatch?: (HelixHeadlessMenu["filterMatch"]) | undefined;
|
|
10773
10827
|
};
|
|
10774
10828
|
|
|
10775
10829
|
export type HelixHeadlessMenuVueEvents = {
|
|
@@ -10777,6 +10831,8 @@ export type HelixHeadlessMenuVueEvents = {
|
|
|
10777
10831
|
"helix-before-close": HelixHeadlessMenuHelixBeforeCloseElementEvent;
|
|
10778
10832
|
/** The menu is about to open. Cancelable: cancel it to keep it closed. */
|
|
10779
10833
|
"helix-before-open": HelixHeadlessMenuHelixBeforeOpenElementEvent;
|
|
10834
|
+
/** The text in the filter field changed, with the new text in `detail.value`. Cancelable: cancel it to keep every row showing and narrow the rows yourself. */
|
|
10835
|
+
"helix-filter": HelixHeadlessMenuHelixFilterElementEvent;
|
|
10780
10836
|
/** An item was chosen. Cancelable: cancel it to keep the menu open. */
|
|
10781
10837
|
"helix-select": HelixHeadlessMenuHelixSelectElementEvent;
|
|
10782
10838
|
/** The menu opened or closed. The event carries `newState` and `oldState`. */
|
|
@@ -11354,10 +11410,11 @@ one they already know. */
|
|
|
11354
11410
|
invalid, as it is in a native number field.
|
|
11355
11411
|
|
|
11356
11412
|
Unset, a step moves by one, or by one percent under a percent format, and
|
|
11357
|
-
a typed number is rounded to the smallest amount
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
the
|
|
11413
|
+
a typed number is rounded to the smallest amount the format shows, as
|
|
11414
|
+
React Aria's NumberField does: a field showing dollars keeps the cents
|
|
11415
|
+
typed into it, and one with no `format-options` keeps three decimal
|
|
11416
|
+
places. `any` puts the number on no grid, as it does in a native number
|
|
11417
|
+
field: a step moves by one, and any number in range is valid. */
|
|
11361
11418
|
step?: (HelixHeadlessNumberInput["step"]) | undefined;
|
|
11362
11419
|
/** The message the browser shows when the number is off the step grid, with
|
|
11363
11420
|
`{below}` and `{above}` filled in with the nearest valid values, written in
|
|
@@ -18853,7 +18910,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
18853
18910
|
HelixHeadlessCheckboxVueProps,
|
|
18854
18911
|
HelixHeadlessCheckboxVueEvents
|
|
18855
18912
|
>;
|
|
18856
|
-
/** Renders a '<pre><code>' pair: 'pre' keeps the whitespace, and 'code' marks it as code. Long lines scroll inside the block and do not wrap, because a line break can be significant in code. A copy button is on by default. Set 'no-copy' to remove it. The button copies the slotted text, so there is no second copy of the code to keep in sync. For a fragment of code inside a sentence, use 'Code'. Set 'line-numbers' to number the lines in a gutter beside the code, hidden from the accessibility tree and left out of a copy. Set 'mark-lines' to mark lines a reader should look at, such as '2, 4-6': the block draws a band behind each run, placed where the lines are laid out, so it follows a highlighter's markup and lines that wrap. Set 'wrap' to wrap long lines rather than scroll them; a gutter then numbers each line where it starts. Set 'wrappable' for a button in the header that turns 'wrap' on and off, pressed while the lines wrap. The header holds the name, the 'actions' slot, and the copy button. Slot a control into 'actions', such as a button that sets 'wrap' or one that opens the code in an editor, and the block draws a header for it even with no name. 'copy-icon' and 'copied-icon' replace the copy button's two icons. Set 'highlight' to a function that turns the code into highlighted markup, such as one wrapping Shiki or Prism, and the block draws what it returns; it is handed the block's 'language', so one function serves every block. The code stays in the slot, so the copy button and the page's own text are the code as written. Set 'expandable' on a block whose height is capped, such as by '--code-block-max-block-size', and a button under it shows every line and then fewer again, as a docs site's long example does. The button is drawn only while the cap hides something, says whether the block is expanded with 'aria-expanded', names the block it opens with 'aria-controls', and the block carries ':state(expanded)' while it is. Set 'diff' to show a change. Put a unified diff, the output of 'git diff' or 'diff -u', in the same slot, and the block draws the lines it added and removed. The block never computes a diff itself. Line numbers come from the hunk headers and are hidden from the accessibility tree. Changed lines are '<ins>' and '<del>' with the '+' and '-' kept as text, so the change does not depend on color. Where a removed line is paired with the added line that replaced it, the words each does not share with the other are the 'changed' part, so the eye goes to what changed within the line. Each file in the patch is its own block under its own name, and its copy button copies the new version of the file. 'variant="split"' shows the old version beside the new, each removal opposite its replacement. 'context-lines' folds each long run of unchanged lines, keeping that many beside each change, behind a button that shows them and hides them again, as a code host draws a diff written with more context than a reader needs. **A block that scrolls is a tab stop.** While its lines run past its width or its cap, the scroller is a region named for the block, such as "Code, app.ts", that Tab reaches, so a keyboard scrolls it with the arrow keys in every browser. Chromium and Firefox make a scrolling box focusable on their own, and Safari does not. A block that fits is no stop at all. **The code the block draws is marked untranslated**, 'translate="no"' on its '<pre>', so a page translator leaves highlighted lines and a diff as written. Code in the slot takes its translation mode from the element, which writes nothing onto itself, so set 'translate="no"' on the element to keep a translator off plain code too. On the server, the slot renders as ordinary code, so a diff first appears as the patch text in a '<pre>'. The client makes the same first render, which keeps hydration clean, and draws the diff once it can read the content. Diff mode is experimental. The rest of the family is stable. */
|
|
18913
|
+
/** Renders a '<pre><code>' pair: 'pre' keeps the whitespace, and 'code' marks it as code. Long lines scroll inside the block and do not wrap, because a line break can be significant in code. A copy button is on by default. Set 'no-copy' to remove it. The button copies the slotted text, so there is no second copy of the code to keep in sync. For a fragment of code inside a sentence, use 'Code'. Set 'line-numbers' to number the lines in a gutter beside the code, hidden from the accessibility tree and left out of a copy. Set 'mark-lines' to mark lines a reader should look at, such as '2, 4-6': the block draws a band behind each run, placed where the lines are laid out, so it follows a highlighter's markup and lines that wrap. Set 'wrap' to wrap long lines rather than scroll them; a gutter then numbers each line where it starts. Set 'wrappable' for a button in the header that turns 'wrap' on and off, pressed while the lines wrap. The header holds the name, the 'actions' slot, and the copy button. Slot a control into 'actions', such as a button that sets 'wrap' or one that opens the code in an editor, and the block draws a header for it even with no name. 'copy-icon' and 'copied-icon' replace the copy button's two icons. Set 'highlight' to a function that turns the code into highlighted markup, such as one wrapping Shiki or Prism, and the block draws what it returns; it is handed the block's 'language', so one function serves every block. The code stays in the slot, so the copy button and the page's own text are the code as written. Set 'expandable' on a block whose height is capped, such as by '--code-block-max-block-size', and a button under it shows every line and then fewer again, as a docs site's long example does. The button is drawn only while the cap hides something, says whether the block is expanded with 'aria-expanded', names the block it opens with 'aria-controls', and the block carries ':state(expanded)' while it is. Set 'diff' to show a change. Put a unified diff, the output of 'git diff' or 'diff -u', in the same slot, and the block draws the lines it added and removed. The block never computes a diff itself. Line numbers come from the hunk headers and are hidden from the accessibility tree. Changed lines are '<ins>' and '<del>' with the '+' and '-' kept as text, so the change does not depend on color. Where a removed line is paired with the added line that replaced it, the words each does not share with the other are the 'changed' part, so the eye goes to what changed within the line. Each file in the patch is its own block under its own name, and its copy button copies the new version of the file. 'variant="split"' shows the old version beside the new, each removal opposite its replacement. 'context-lines' folds each long run of unchanged lines, keeping that many beside each change, behind a button that shows them and hides them again, as a code host draws a diff written with more context than a reader needs. **A block that scrolls is a tab stop.** While its lines run past its width or its cap, the scroller is a region named for the block, such as "Code, app.ts", that Tab reaches, so a keyboard scrolls it with the arrow keys in every browser. Chromium and Firefox make a scrolling box focusable on their own, and Safari does not. A block that fits is no stop at all. **The code the block draws is marked untranslated**, 'translate="no"' on its '<pre>', so a page translator leaves highlighted lines and a diff as written. Code in the slot takes its translation mode from the element, which writes nothing onto itself, so set 'translate="no"' on the element to keep a translator off plain code too. On the server, the slot renders as ordinary code, so a diff first appears as the patch text in a '<pre>'. The client makes the same first render, which keeps hydration clean, and draws the diff once it can read the content. Diff mode is experimental. The rest of the family is stable. **Several blocks are files**, one shown at a time under a row of tabs, as Sandbox shows its source panes. Put Code Blocks in the default slot of a Code Block, and each is a file named on its tab by its 'label' or, without one, its 'language'. 'file' holds the name of the file shown. The tabs are a tab list: the arrow keys move to a tab and show its file, the two swapping on a right-to-left page, and Home and End go to the first and the last. Choosing one sends 'helix-before-change' with the file's name, which you can cancel, and 'change' once 'file' holds it. The files not shown carry 'hidden', and the one shown draws no name of its own, its tab naming it. One block draws no tabs. A server cannot see the blocks inside, so the client draws the tabs once it upgrades. */
|
|
18857
18914
|
"helix-headless-code-block": DefineCustomElement<
|
|
18858
18915
|
HelixHeadlessCodeBlock,
|
|
18859
18916
|
HelixHeadlessCodeBlockVueProps,
|
|
@@ -19171,13 +19228,13 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
19171
19228
|
HelixHeadlessMegamenuVueProps,
|
|
19172
19229
|
HelixHeadlessMegamenuVueEvents
|
|
19173
19230
|
>;
|
|
19174
|
-
/** One element covers three kinds of row, and what you give it decides which: - Content in the 'submenu' slot makes the row open a submenu page. - 'checked' makes the row a choice. - With neither, the row is a command. The role follows the kind. A row with 'checkable' or 'checked' is 'menuitemcheckbox' with 'aria-checked', and an 'exclusive' row is 'menuitemradio', for a set where only one can be on. A row that opens a page keeps 'menuitem' and sets 'aria-haspopup'. Choosing a choice row checks or unchecks it before 'helix-select' is sent, so a listener reads the new 'checked'. An 'exclusive' row turns on and turns off the 'exclusive' rows next to it. Cancel 'helix-before-toggle' to keep a row as it is and set 'checked' yourself. Space on a choice row changes it and leaves the menu open, so a reader can set several in a row, as the APG's menu does. Enter and a press change it and close the menu. 'close-on-select="false"' on the row keeps the menu open after any choice of it, and 'close-on-select' on the row closes it after a Space as well. The menu sets whether the row's page is showing as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. 'shortcut' shows a row's keyboard shortcut after its label, drawn by 'Kbd' in the platform's glyphs, and gives the row 'aria-keyshortcuts'. It binds nothing: the shortcut is the page's to bind. Other trailing words, such as a count, go in the 'end' slot. The row is named by its label alone. Words in 'description', a line under the label, and in 'end' describe it instead, through 'aria-describedby', as React Aria's menu item does with its description: a reader hears "Copy", then "Copies the selection". A development build warns when a row has no words to be named by, such as a row holding only an icon with no label. The check mark and the caret are the fallbacks of the 'check' and 'chevron' slots, so a mark of your own replaces either by being slotted. Neither is read as part of the row's name. */
|
|
19231
|
+
/** One element covers three kinds of row, and what you give it decides which: - Content in the 'submenu' slot makes the row open a submenu page. - 'checked' makes the row a choice. - With neither, the row is a command. The role follows the kind. A row with 'checkable' or 'checked' is 'menuitemcheckbox' with 'aria-checked', and an 'exclusive' row is 'menuitemradio', for a set where only one can be on. A row that opens a page keeps 'menuitem' and sets 'aria-haspopup'. Choosing a choice row checks or unchecks it before 'helix-select' is sent, so a listener reads the new 'checked'. An 'exclusive' row turns on and turns off the 'exclusive' rows next to it. Cancel 'helix-before-toggle' to keep a row as it is and set 'checked' yourself. Space on a choice row changes it and leaves the menu open, so a reader can set several in a row, as the APG's menu does. Enter and a press change it and close the menu. 'close-on-select="false"' on the row keeps the menu open after any choice of it, and 'close-on-select' on the row closes it after a Space as well. The menu sets whether the row's page is showing as a property, never as an attribute. An attribute written onto your element after it upgrades causes a hydration mismatch. 'shortcut' shows a row's keyboard shortcut after its label, drawn by 'Kbd' in the platform's glyphs, and gives the row 'aria-keyshortcuts'. It binds nothing: the shortcut is the page's to bind. Other trailing words, such as a count, go in the 'end' slot. The row is named by its label alone. Words in 'description', a line under the label, and in 'end' describe it instead, through 'aria-describedby', as React Aria's menu item does with its description: a reader hears "Copy", then "Copies the selection". A development build warns when a row has no words to be named by, such as a row holding only an icon with no label. The check mark and the caret are the fallbacks of the 'check' and 'chevron' slots, so a mark of your own replaces either by being slotted. Neither is read as part of the row's name. In a menu with 'filterable', focus stays in the menu's filter field and the row the arrow keys reach is highlighted: the field names it with 'aria-activedescendant', the row carries its role on its host so the field can point at it, and ':state(highlighted)' says which row it is. A row with an 'href' then follows its link without an anchor, as 'Option' does. */
|
|
19175
19232
|
"helix-headless-menu-item": DefineCustomElement<
|
|
19176
19233
|
HelixHeadlessMenuItem,
|
|
19177
19234
|
HelixHeadlessMenuItemVueProps,
|
|
19178
19235
|
HelixHeadlessMenuItemVueEvents
|
|
19179
19236
|
>;
|
|
19180
|
-
/** 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 (Space on a choice row changes it and leaves the menu open), 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. */
|
|
19237
|
+
/** 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 (Space on a choice row changes it and leaves the menu open), 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. **A filter field.** With 'filterable', the menu opens with focus in a field above its rows, and typing narrows the rows of the page the keys move in, as React Aria's 'Autocomplete' around a 'Menu' does. A row is kept where its words hold the filter, in any case, or where 'filterMatch' says so. Each page starts unfiltered, and the filter is cleared as the menu closes. Where typing keeps no row, the menu shows 'no-results-text'. Focus stays in the field: Up and Down Arrow move the highlight through the rows that are left, Enter chooses the highlighted row, Right Arrow opens its submenu, Left Arrow on a submenu goes back, and Escape clears the filter and then closes the menu. Home, End and the other keys move the caret and type. The field names the highlighted row with 'aria-activedescendant', and the rows are a 'menu' after the field. Cancel 'helix-filter' to keep every row showing and narrow the rows yourself, such as by replacing them with rows from a server. */
|
|
19181
19238
|
"helix-headless-menu": DefineCustomElement<
|
|
19182
19239
|
HelixHeadlessMenu,
|
|
19183
19240
|
HelixHeadlessMenuVueProps,
|
|
@@ -19219,7 +19276,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
19219
19276
|
HelixHeadlessNotificationsVueProps,
|
|
19220
19277
|
HelixHeadlessNotificationsVueEvents
|
|
19221
19278
|
>;
|
|
19222
|
-
/** 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
|
|
19279
|
+
/** 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 an 'inputmode' for a number. 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' keeps a numeric keypad on phones, chosen as React Aria's NumberField chooses it: a keypad with a minus key where the number can be negative, and one with a decimal separator where the format shows a fraction. An iPhone has no keypad with a minus key, so a field that can be negative takes the full keyboard there. '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'. */
|
|
19223
19280
|
"helix-headless-number-input": DefineCustomElement<
|
|
19224
19281
|
HelixHeadlessNumberInput,
|
|
19225
19282
|
HelixHeadlessNumberInputVueProps,
|
package/types/words.d.ts
CHANGED
|
@@ -623,6 +623,12 @@ declare module '@fusion.dev/helix-core' {
|
|
|
623
623
|
* English: `Show all lines`
|
|
624
624
|
*/
|
|
625
625
|
expandLabel: Message
|
|
626
|
+
/**
|
|
627
|
+
* The name of the file tabs, read by screen readers.
|
|
628
|
+
*
|
|
629
|
+
* English: `Files`
|
|
630
|
+
*/
|
|
631
|
+
filesLabel: Message
|
|
626
632
|
/**
|
|
627
633
|
* The words of a button that hides a run of unchanged lines it showed, in a
|
|
628
634
|
* diff with `context-lines`. `{count}` is how many, and each language
|
|
@@ -2312,6 +2318,12 @@ declare module '@fusion.dev/helix-core' {
|
|
|
2312
2318
|
* English: `Nothing to show`
|
|
2313
2319
|
*/
|
|
2314
2320
|
emptyText: Message
|
|
2321
|
+
/**
|
|
2322
|
+
* The filter field's name and placeholder.
|
|
2323
|
+
*
|
|
2324
|
+
* English: `Filter`
|
|
2325
|
+
*/
|
|
2326
|
+
filterLabel: Message
|
|
2315
2327
|
/**
|
|
2316
2328
|
* The text shown and announced while the rows load.
|
|
2317
2329
|
*
|
|
@@ -2325,6 +2337,12 @@ declare module '@fusion.dev/helix-core' {
|
|
|
2325
2337
|
* English: `Long press or press Alt+Down to show the menu`
|
|
2326
2338
|
*/
|
|
2327
2339
|
longPressLabel: Message
|
|
2340
|
+
/**
|
|
2341
|
+
* The text shown when the filter keeps no rows.
|
|
2342
|
+
*
|
|
2343
|
+
* English: `No matches`
|
|
2344
|
+
*/
|
|
2345
|
+
noResultsText: Message
|
|
2328
2346
|
}
|
|
2329
2347
|
'helix-meter': {
|
|
2330
2348
|
/**
|