@fusion.dev/helix-headless 0.12.2 → 0.13.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 +1424 -76
- package/dist/combobox/root/combobox-root.d.ts +9 -16
- package/dist/combobox/root/combobox-root.js +10 -18
- package/dist/element-events.generated.js +1 -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 +537 -76
- package/types/svelte.d.ts +1 -0
- package/types/vue.d.ts +96 -26
package/types/svelte.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ declare module 'svelte/elements' {
|
|
|
46
46
|
'helix-headless-drilldown': CustomElements['helix-headless-drilldown']
|
|
47
47
|
'helix-headless-empty': CustomElements['helix-headless-empty']
|
|
48
48
|
'helix-headless-file-input': CustomElements['helix-headless-file-input']
|
|
49
|
+
'helix-headless-filter-input': CustomElements['helix-headless-filter-input']
|
|
49
50
|
'helix-headless-format-date': CustomElements['helix-headless-format-date']
|
|
50
51
|
'helix-headless-heatmap': CustomElements['helix-headless-heatmap']
|
|
51
52
|
'helix-headless-icon-button': CustomElements['helix-headless-icon-button']
|
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,
|
|
@@ -1577,32 +1578,6 @@ message belongs. */
|
|
|
1577
1578
|
"loading-text"?: (HelixHeadlessCombobox["loadingText"]) | undefined;
|
|
1578
1579
|
/** What the list says while they are on their way. */
|
|
1579
1580
|
loadingText?: (HelixHeadlessCombobox["loadingText"]) | undefined;
|
|
1580
|
-
/** How many tags to draw before the rest become a count. `multiple` only.
|
|
1581
|
-
|
|
1582
|
-
`0` is all of them, and is the default: a cap that guesses is worse than no
|
|
1583
|
-
cap, because the number that fits depends on the width of the field and the
|
|
1584
|
-
length of what is in it, neither of which this element knows. What a cap is
|
|
1585
|
-
genuinely for is a field in a row or a table cell, where a set of twelve
|
|
1586
|
-
choices would push everything below it down a line at a time.
|
|
1587
|
-
|
|
1588
|
-
The remainder is counted rather than hidden. `+3` is a fact a reader can act
|
|
1589
|
-
on, where a row that silently stops is a field that appears to have lost
|
|
1590
|
-
what was put in it. Date Input and Time Input carry the same property and
|
|
1591
|
-
the same reasoning. */
|
|
1592
|
-
"max-tags"?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
1593
|
-
/** How many tags to draw before the rest become a count. `multiple` only.
|
|
1594
|
-
|
|
1595
|
-
`0` is all of them, and is the default: a cap that guesses is worse than no
|
|
1596
|
-
cap, because the number that fits depends on the width of the field and the
|
|
1597
|
-
length of what is in it, neither of which this element knows. What a cap is
|
|
1598
|
-
genuinely for is a field in a row or a table cell, where a set of twelve
|
|
1599
|
-
choices would push everything below it down a line at a time.
|
|
1600
|
-
|
|
1601
|
-
The remainder is counted rather than hidden. `+3` is a fact a reader can act
|
|
1602
|
-
on, where a row that silently stops is a field that appears to have lost
|
|
1603
|
-
what was put in it. Date Input and Time Input carry the same property and
|
|
1604
|
-
the same reasoning. */
|
|
1605
|
-
maxTags?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
1606
1581
|
/** Whether more than one option can be chosen.
|
|
1607
1582
|
|
|
1608
1583
|
The list already does the work: `value` comes apart on commas, a press
|
|
@@ -1642,6 +1617,10 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
1642
1617
|
"default-open"?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
1643
1618
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
1644
1619
|
defaultOpen?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
1620
|
+
/** How many tokens to show before the rest become a count. */
|
|
1621
|
+
"max-tags"?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
1622
|
+
/** How many tokens to show before the rest become a count. */
|
|
1623
|
+
maxTags?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
1645
1624
|
/** The value the markup declared, which is where a reset returns to. */
|
|
1646
1625
|
"default-value"?: (HelixHeadlessCombobox["defaultValue"]) | undefined;
|
|
1647
1626
|
/** The value the markup declared, which is where a reset returns to. */
|
|
@@ -2973,6 +2952,91 @@ export type HelixHeadlessFileInputVueEvents = {
|
|
|
2973
2952
|
"helix-before-change": HelixHeadlessFileInputHelixBeforeChangeElementEvent;
|
|
2974
2953
|
};
|
|
2975
2954
|
|
|
2955
|
+
/** `HelixHeadlessFilterInput` component event */
|
|
2956
|
+
export type HelixHeadlessFilterInputElementEvent<E = Event> = TypedEvent<
|
|
2957
|
+
HelixHeadlessFilterInput,
|
|
2958
|
+
E
|
|
2959
|
+
>;
|
|
2960
|
+
/** `helix-before-change` event type */
|
|
2961
|
+
export type HelixHeadlessFilterInputHelixBeforeChangeElementEvent =
|
|
2962
|
+
HelixHeadlessFilterInputElementEvent<HelixBeforeChangeEvent>;
|
|
2963
|
+
|
|
2964
|
+
export type HelixHeadlessFilterInputVueProps = {
|
|
2965
|
+
/** Whether the field offers a button that empties it.
|
|
2966
|
+
|
|
2967
|
+
The text only. The tokens are the consumer's markup and this element is not
|
|
2968
|
+
entitled to take them out of the document, which is the same reason
|
|
2969
|
+
`hideOverflow` marks the ones over the cap `hidden` rather than removing
|
|
2970
|
+
them. */
|
|
2971
|
+
clearable?: (HelixHeadlessFilterInput["clearable"]) | undefined;
|
|
2972
|
+
/** What the clear button is called, since an icon has no name of its own. */
|
|
2973
|
+
"clear-label"?: (HelixHeadlessFilterInput["clearLabel"]) | undefined;
|
|
2974
|
+
/** What the clear button is called, since an icon has no name of its own. */
|
|
2975
|
+
clearLabel?: (HelixHeadlessFilterInput["clearLabel"]) | undefined;
|
|
2976
|
+
/** Shown while the field is empty.
|
|
2977
|
+
|
|
2978
|
+
Not a label: it goes when typing starts. */
|
|
2979
|
+
placeholder?: (HelixHeadlessFilterInput["placeholder"]) | undefined;
|
|
2980
|
+
/** How many tokens to show before the rest become a count. */
|
|
2981
|
+
"max-tags"?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
2982
|
+
/** How many tokens to show before the rest become a count. */
|
|
2983
|
+
maxTags?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
2984
|
+
/** The value the markup declared, which is where a reset returns to. */
|
|
2985
|
+
"default-value"?: (HelixHeadlessFilterInput["defaultValue"]) | undefined;
|
|
2986
|
+
/** The value the markup declared, which is where a reset returns to. */
|
|
2987
|
+
defaultValue?: (HelixHeadlessFilterInput["defaultValue"]) | undefined;
|
|
2988
|
+
/** What the control holds now, and what its form submits.
|
|
2989
|
+
|
|
2990
|
+
One property, not two, so `input.value` answers the question anyone
|
|
2991
|
+
asking it meant. Writing always applies; `<helix-input value="x">` is the
|
|
2992
|
+
same statement in markup, and `default-value` is how markup seeds a value
|
|
2993
|
+
a reset should return to. */
|
|
2994
|
+
value?: (HelixHeadlessFilterInput["value"]) | undefined;
|
|
2995
|
+
/** What is wrong, in the reader's words rather than the browser's. */
|
|
2996
|
+
feedback?: (HelixHeadlessFilterInput["feedback"]) | undefined;
|
|
2997
|
+
/** Help under the control, shown while there is nothing wrong. */
|
|
2998
|
+
hint?: (HelixHeadlessFilterInput["hint"]) | undefined;
|
|
2999
|
+
/** The accessible name, and the fallback for the `label` slot. */
|
|
3000
|
+
label?: (HelixHeadlessFilterInput["label"]) | undefined;
|
|
3001
|
+
/** Whether the form refuses to submit without it. */
|
|
3002
|
+
required?: (HelixHeadlessFilterInput["required"]) | undefined;
|
|
3003
|
+
/** Whether the control is non-interactive.
|
|
3004
|
+
|
|
3005
|
+
Reflected, because the styled tier selects on it, and mirrored to
|
|
3006
|
+
`aria-disabled` rather than removing the element from the accessibility
|
|
3007
|
+
tree, so a screen reader can still announce that the control exists.
|
|
3008
|
+
|
|
3009
|
+
The mirror itself is in `willUpdate` below, here rather than in each
|
|
3010
|
+
control, because here is where `disabled` is. */
|
|
3011
|
+
disabled?: (HelixHeadlessFilterInput["disabled"]) | undefined;
|
|
3012
|
+
/** Name submitted with the form.
|
|
3013
|
+
|
|
3014
|
+
**Reflected, and it is the exception to "reflect only what CSS selects
|
|
3015
|
+
on".** The platform builds a form's entry list from the `name` *content
|
|
3016
|
+
attribute*, not from the property, so a control named through the property
|
|
3017
|
+
submitted under no name at all and was silently dropped. Measured: two
|
|
3018
|
+
inputs in one form, one named by attribute and one by property, and the
|
|
3019
|
+
form carried a single entry.
|
|
3020
|
+
|
|
3021
|
+
Safe for a React consumer, which is what the rule is protecting: React
|
|
3022
|
+
renders a custom element's props as attributes on the server, so the name
|
|
3023
|
+
is already in the markup being hydrated and reflecting it writes what is
|
|
3024
|
+
there. It is only a change to the markup when a consumer assigns it
|
|
3025
|
+
imperatively later, and nothing is hydrating by then.
|
|
3026
|
+
|
|
3027
|
+
Here rather than on each control. */
|
|
3028
|
+
name?: (HelixHeadlessFilterInput["name"]) | undefined;
|
|
3029
|
+
};
|
|
3030
|
+
|
|
3031
|
+
export type HelixHeadlessFilterInputVueEvents = {
|
|
3032
|
+
/** Relayed from the input once the reader has finished. */
|
|
3033
|
+
change: HelixHeadlessFilterInputElementEvent;
|
|
3034
|
+
/** Fired as the text changes, and cancelable. */
|
|
3035
|
+
"helix-before-change": HelixHeadlessFilterInputHelixBeforeChangeElementEvent;
|
|
3036
|
+
/** Announced once the text has moved. */
|
|
3037
|
+
input: HelixHeadlessFilterInputElementEvent;
|
|
3038
|
+
};
|
|
3039
|
+
|
|
2976
3040
|
export type HelixHeadlessFormatDateVueProps = {
|
|
2977
3041
|
/** The timestamp, as anything `Date` parses.
|
|
2978
3042
|
|
|
@@ -8244,6 +8308,12 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
8244
8308
|
HelixHeadlessFileInputVueProps,
|
|
8245
8309
|
HelixHeadlessFileInputVueEvents
|
|
8246
8310
|
>;
|
|
8311
|
+
/** **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. */
|
|
8312
|
+
"helix-headless-filter-input": DefineCustomElement<
|
|
8313
|
+
HelixHeadlessFilterInput,
|
|
8314
|
+
HelixHeadlessFilterInputVueProps,
|
|
8315
|
+
HelixHeadlessFilterInputVueEvents
|
|
8316
|
+
>;
|
|
8247
8317
|
/** 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". */
|
|
8248
8318
|
"helix-headless-format-date": DefineCustomElement<
|
|
8249
8319
|
HelixHeadlessFormatDate,
|