@fusion.dev/helix-headless 0.12.3 → 0.13.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/custom-elements.json +1376 -125
- package/dist/combobox/root/combobox-root.d.ts +1 -0
- package/dist/combobox/root/combobox-root.js +6 -2
- package/dist/element-events.generated.js +2 -0
- package/dist/filter-input/index.d.ts +1 -0
- package/dist/filter-input/index.js +1 -0
- package/dist/filter-input/root/filter-input-root.d.ts +129 -0
- package/dist/filter-input/root/filter-input-root.js +140 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +5 -5
- package/types/jsx.d.ts +536 -0
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +97 -0
package/types/vue.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ import type {
|
|
|
40
40
|
HelixHeadlessDrilldown,
|
|
41
41
|
HelixHeadlessEmpty,
|
|
42
42
|
HelixHeadlessFileInput,
|
|
43
|
+
HelixHeadlessFilterInput,
|
|
43
44
|
HelixHeadlessFormatDate,
|
|
44
45
|
HelixHeadlessHeatmap,
|
|
45
46
|
HelixHeadlessIconButton,
|
|
@@ -1540,6 +1541,9 @@ export type HelixHeadlessComboboxHelixBeforeOpenElementEvent =
|
|
|
1540
1541
|
/** `helix-create` event type */
|
|
1541
1542
|
export type HelixHeadlessComboboxHelixCreateElementEvent =
|
|
1542
1543
|
HelixHeadlessComboboxElementEvent<HelixCreateEvent>;
|
|
1544
|
+
/** `helix-filter` event type */
|
|
1545
|
+
export type HelixHeadlessComboboxHelixFilterElementEvent =
|
|
1546
|
+
HelixHeadlessComboboxElementEvent<HelixFilterEvent>;
|
|
1543
1547
|
|
|
1544
1548
|
export type HelixHeadlessComboboxVueProps = {
|
|
1545
1549
|
/** What the browser may autofill in the text field, as a platform token.
|
|
@@ -1685,6 +1689,8 @@ export type HelixHeadlessComboboxVueEvents = {
|
|
|
1685
1689
|
"helix-before-open": HelixHeadlessComboboxHelixBeforeOpenElementEvent;
|
|
1686
1690
|
/** Fired when the reader asks for something the list does not hold, and cancelable. */
|
|
1687
1691
|
"helix-create": HelixHeadlessComboboxHelixCreateElementEvent;
|
|
1692
|
+
/** Fired as the reader types, carrying the text the list is being narrowed to. Cancelable: refusing it leaves the list whole, and is how a consumer takes the filtering for themselves. */
|
|
1693
|
+
"helix-filter": HelixHeadlessComboboxHelixFilterElementEvent;
|
|
1688
1694
|
/** Announced once the value has moved. */
|
|
1689
1695
|
input: HelixHeadlessComboboxElementEvent;
|
|
1690
1696
|
/** Says the state moved, carrying `newState` and `oldState`. */
|
|
@@ -2951,6 +2957,91 @@ export type HelixHeadlessFileInputVueEvents = {
|
|
|
2951
2957
|
"helix-before-change": HelixHeadlessFileInputHelixBeforeChangeElementEvent;
|
|
2952
2958
|
};
|
|
2953
2959
|
|
|
2960
|
+
/** `HelixHeadlessFilterInput` component event */
|
|
2961
|
+
export type HelixHeadlessFilterInputElementEvent<E = Event> = TypedEvent<
|
|
2962
|
+
HelixHeadlessFilterInput,
|
|
2963
|
+
E
|
|
2964
|
+
>;
|
|
2965
|
+
/** `helix-before-change` event type */
|
|
2966
|
+
export type HelixHeadlessFilterInputHelixBeforeChangeElementEvent =
|
|
2967
|
+
HelixHeadlessFilterInputElementEvent<HelixBeforeChangeEvent>;
|
|
2968
|
+
|
|
2969
|
+
export type HelixHeadlessFilterInputVueProps = {
|
|
2970
|
+
/** Whether the field offers a button that empties it.
|
|
2971
|
+
|
|
2972
|
+
The text only. The tokens are the consumer's markup and this element is not
|
|
2973
|
+
entitled to take them out of the document, which is the same reason
|
|
2974
|
+
`hideOverflow` marks the ones over the cap `hidden` rather than removing
|
|
2975
|
+
them. */
|
|
2976
|
+
clearable?: (HelixHeadlessFilterInput["clearable"]) | undefined;
|
|
2977
|
+
/** What the clear button is called, since an icon has no name of its own. */
|
|
2978
|
+
"clear-label"?: (HelixHeadlessFilterInput["clearLabel"]) | undefined;
|
|
2979
|
+
/** What the clear button is called, since an icon has no name of its own. */
|
|
2980
|
+
clearLabel?: (HelixHeadlessFilterInput["clearLabel"]) | undefined;
|
|
2981
|
+
/** Shown while the field is empty.
|
|
2982
|
+
|
|
2983
|
+
Not a label: it goes when typing starts. */
|
|
2984
|
+
placeholder?: (HelixHeadlessFilterInput["placeholder"]) | undefined;
|
|
2985
|
+
/** How many tokens to show before the rest become a count. */
|
|
2986
|
+
"max-tags"?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
2987
|
+
/** How many tokens to show before the rest become a count. */
|
|
2988
|
+
maxTags?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
2989
|
+
/** The value the markup declared, which is where a reset returns to. */
|
|
2990
|
+
"default-value"?: (HelixHeadlessFilterInput["defaultValue"]) | undefined;
|
|
2991
|
+
/** The value the markup declared, which is where a reset returns to. */
|
|
2992
|
+
defaultValue?: (HelixHeadlessFilterInput["defaultValue"]) | undefined;
|
|
2993
|
+
/** What the control holds now, and what its form submits.
|
|
2994
|
+
|
|
2995
|
+
One property, not two, so `input.value` answers the question anyone
|
|
2996
|
+
asking it meant. Writing always applies; `<helix-input value="x">` is the
|
|
2997
|
+
same statement in markup, and `default-value` is how markup seeds a value
|
|
2998
|
+
a reset should return to. */
|
|
2999
|
+
value?: (HelixHeadlessFilterInput["value"]) | undefined;
|
|
3000
|
+
/** What is wrong, in the reader's words rather than the browser's. */
|
|
3001
|
+
feedback?: (HelixHeadlessFilterInput["feedback"]) | undefined;
|
|
3002
|
+
/** Help under the control, shown while there is nothing wrong. */
|
|
3003
|
+
hint?: (HelixHeadlessFilterInput["hint"]) | undefined;
|
|
3004
|
+
/** The accessible name, and the fallback for the `label` slot. */
|
|
3005
|
+
label?: (HelixHeadlessFilterInput["label"]) | undefined;
|
|
3006
|
+
/** Whether the form refuses to submit without it. */
|
|
3007
|
+
required?: (HelixHeadlessFilterInput["required"]) | undefined;
|
|
3008
|
+
/** Whether the control is non-interactive.
|
|
3009
|
+
|
|
3010
|
+
Reflected, because the styled tier selects on it, and mirrored to
|
|
3011
|
+
`aria-disabled` rather than removing the element from the accessibility
|
|
3012
|
+
tree, so a screen reader can still announce that the control exists.
|
|
3013
|
+
|
|
3014
|
+
The mirror itself is in `willUpdate` below, here rather than in each
|
|
3015
|
+
control, because here is where `disabled` is. */
|
|
3016
|
+
disabled?: (HelixHeadlessFilterInput["disabled"]) | undefined;
|
|
3017
|
+
/** Name submitted with the form.
|
|
3018
|
+
|
|
3019
|
+
**Reflected, and it is the exception to "reflect only what CSS selects
|
|
3020
|
+
on".** The platform builds a form's entry list from the `name` *content
|
|
3021
|
+
attribute*, not from the property, so a control named through the property
|
|
3022
|
+
submitted under no name at all and was silently dropped. Measured: two
|
|
3023
|
+
inputs in one form, one named by attribute and one by property, and the
|
|
3024
|
+
form carried a single entry.
|
|
3025
|
+
|
|
3026
|
+
Safe for a React consumer, which is what the rule is protecting: React
|
|
3027
|
+
renders a custom element's props as attributes on the server, so the name
|
|
3028
|
+
is already in the markup being hydrated and reflecting it writes what is
|
|
3029
|
+
there. It is only a change to the markup when a consumer assigns it
|
|
3030
|
+
imperatively later, and nothing is hydrating by then.
|
|
3031
|
+
|
|
3032
|
+
Here rather than on each control. */
|
|
3033
|
+
name?: (HelixHeadlessFilterInput["name"]) | undefined;
|
|
3034
|
+
};
|
|
3035
|
+
|
|
3036
|
+
export type HelixHeadlessFilterInputVueEvents = {
|
|
3037
|
+
/** Relayed from the input once the reader has finished. */
|
|
3038
|
+
change: HelixHeadlessFilterInputElementEvent;
|
|
3039
|
+
/** Fired as the text changes, and cancelable. */
|
|
3040
|
+
"helix-before-change": HelixHeadlessFilterInputHelixBeforeChangeElementEvent;
|
|
3041
|
+
/** Announced once the text has moved. */
|
|
3042
|
+
input: HelixHeadlessFilterInputElementEvent;
|
|
3043
|
+
};
|
|
3044
|
+
|
|
2954
3045
|
export type HelixHeadlessFormatDateVueProps = {
|
|
2955
3046
|
/** The timestamp, as anything `Date` parses.
|
|
2956
3047
|
|
|
@@ -8222,6 +8313,12 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
8222
8313
|
HelixHeadlessFileInputVueProps,
|
|
8223
8314
|
HelixHeadlessFileInputVueEvents
|
|
8224
8315
|
>;
|
|
8316
|
+
/** **The tokens are the consumer's own elements, slotted.** What a filter narrows by belongs to the consumer's model rather than to this element: a facet with a prefix, a saved query, a range. So they are slotted rather than rendered from a list of strings, and removing one is a request this element makes rather than a change it applies. Combobox is the other way round, and that is the difference between the two: its tokens are a view of a selection it owns, drawn from options it was handed. **'value' is the text being typed, not the tokens**, which is what makes this a field a consumer can listen to. Every keystroke announces 'input' with the text on the element, so a table narrows as the reader types. The tokens need no reporting back, being markup the consumer already holds. Backspace on an empty field asks the last token to go, through the same 'helix-dismiss' its own remove control fires, so a consumer who handled the pointer has already handled the keyboard. */
|
|
8317
|
+
"helix-headless-filter-input": DefineCustomElement<
|
|
8318
|
+
HelixHeadlessFilterInput,
|
|
8319
|
+
HelixHeadlessFilterInputVueProps,
|
|
8320
|
+
HelixHeadlessFilterInputVueEvents
|
|
8321
|
+
>;
|
|
8225
8322
|
/** A date in a page is almost never wanted as an ISO string, and formatting one in the consumer's own code means every consumer ships a copy of the same 'Intl' call and a different set of options. This is that call, as an element, so a date is written where it is shown. **'elapsed' is the mode a feed wants, and it stops being relative on purpose.** "42m", "3h", "1d" is what a row of activity reads as, and past a week the compact form is a lie: 'Intl.NumberFormat' narrow renders both 'minute' and 'month' as 'm' in en-US, so "3m" is three minutes at the top of a feed and three months further down it. Past six days this shows a date, which is shorter to read and impossible to misread. 'elapsedTime' in 'helix/core' carries the measurement. **The reading refreshes itself, from one timer the page shares.** A relative timestamp is correct for as long as its unit lasts and wrong afterwards, and a page left open is exactly where that shows. Each element asks to be woken when its own reading expires rather than polling, and an element showing a date asks for nothing at all: fifty rows and fifty intervals is fifty wakeups a second where one will do, and a feed of last month's notifications should cost nothing to leave open. **'<time datetime>' whatever the text says**, so a screen reader, a copy and paste, and anything parsing the page all get the real instant rather than "yesterday". */
|
|
8226
8323
|
"helix-headless-format-date": DefineCustomElement<
|
|
8227
8324
|
HelixHeadlessFormatDate,
|