@fusion.dev/helix-headless 0.13.2 → 0.15.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 +676 -44
- package/dist/combobox/root/combobox-root.d.ts +1 -1
- package/dist/combobox/root/combobox-root.js +2 -1
- package/dist/element-events.generated.js +8 -1
- package/dist/filter-input/root/filter-input-root.d.ts +146 -3
- package/dist/filter-input/root/filter-input-root.js +173 -4
- package/package.json +5 -5
- package/types/jsx.d.ts +226 -4
- package/types/vue.d.ts +50 -1
package/types/jsx.d.ts
CHANGED
|
@@ -3065,6 +3065,16 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
3065
3065
|
"default-open"?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
3066
3066
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
3067
3067
|
defaultOpen?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
3068
|
+
/** What the control says once everything is showing. */
|
|
3069
|
+
"collapse-label"?: (HelixHeadlessCombobox["collapseLabel"]) | undefined;
|
|
3070
|
+
/** What the control says once everything is showing. */
|
|
3071
|
+
collapseLabel?: (HelixHeadlessCombobox["collapseLabel"]) | undefined;
|
|
3072
|
+
/** Whether the count is a control that shows the rest. */
|
|
3073
|
+
expandable?: (HelixHeadlessCombobox["expandable"]) | undefined;
|
|
3074
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
3075
|
+
"expand-label"?: (HelixHeadlessCombobox["expandLabel"]) | undefined;
|
|
3076
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
3077
|
+
expandLabel?: (HelixHeadlessCombobox["expandLabel"]) | undefined;
|
|
3068
3078
|
/** How many tokens to show before the rest become a count. */
|
|
3069
3079
|
"max-tags"?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
3070
3080
|
/** How many tokens to show before the rest become a count. */
|
|
@@ -3221,6 +3231,16 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
3221
3231
|
"bool:default-open"?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
3222
3232
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
3223
3233
|
"prop:defaultOpen"?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
3234
|
+
/** What the control says once everything is showing. */
|
|
3235
|
+
"attr:collapse-label"?: (HelixHeadlessCombobox["collapseLabel"]) | undefined;
|
|
3236
|
+
/** What the control says once everything is showing. */
|
|
3237
|
+
"prop:collapseLabel"?: (HelixHeadlessCombobox["collapseLabel"]) | undefined;
|
|
3238
|
+
/** Whether the count is a control that shows the rest. */
|
|
3239
|
+
"prop:expandable"?: (HelixHeadlessCombobox["expandable"]) | undefined;
|
|
3240
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
3241
|
+
"attr:expand-label"?: (HelixHeadlessCombobox["expandLabel"]) | undefined;
|
|
3242
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
3243
|
+
"prop:expandLabel"?: (HelixHeadlessCombobox["expandLabel"]) | undefined;
|
|
3224
3244
|
/** How many tokens to show before the rest become a count. */
|
|
3225
3245
|
"attr:max-tags"?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
3226
3246
|
/** How many tokens to show before the rest become a count. */
|
|
@@ -5780,6 +5800,12 @@ export type HelixHeadlessFilterInputElementEvent<E = Event> = TypedEvent<
|
|
|
5780
5800
|
/** `helix-before-change` event type */
|
|
5781
5801
|
export type HelixHeadlessFilterInputHelixBeforeChangeElementEvent =
|
|
5782
5802
|
HelixHeadlessFilterInputElementEvent<HelixBeforeChangeEvent>;
|
|
5803
|
+
/** `helix-before-close` event type */
|
|
5804
|
+
export type HelixHeadlessFilterInputHelixBeforeCloseElementEvent =
|
|
5805
|
+
HelixHeadlessFilterInputElementEvent<HelixBeforeCloseEvent>;
|
|
5806
|
+
/** `helix-before-open` event type */
|
|
5807
|
+
export type HelixHeadlessFilterInputHelixBeforeOpenElementEvent =
|
|
5808
|
+
HelixHeadlessFilterInputElementEvent<HelixBeforeOpenEvent>;
|
|
5783
5809
|
|
|
5784
5810
|
export type HelixHeadlessFilterInputProps = {
|
|
5785
5811
|
/** Whether the field offers a button that empties it.
|
|
@@ -5797,6 +5823,33 @@ them. */
|
|
|
5797
5823
|
|
|
5798
5824
|
Not a label: it goes when typing starts. */
|
|
5799
5825
|
placeholder?: (HelixHeadlessFilterInput["placeholder"]) | undefined;
|
|
5826
|
+
/** Whether the element is open.
|
|
5827
|
+
|
|
5828
|
+
One property, not two, so `dialog.open` answers the question anyone
|
|
5829
|
+
asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
5830
|
+
same statement in markup.
|
|
5831
|
+
|
|
5832
|
+
**Not reflected, and that is required rather than tidy.** Reflection
|
|
5833
|
+
writes the resolved state back as an attribute, so an element that opened
|
|
5834
|
+
itself would put `open` on its own host: cloned, serialized for
|
|
5835
|
+
hydration, or diffed by a framework, it comes back holding whatever the
|
|
5836
|
+
last reader did rather than what the author wrote. `:state(open)` carries
|
|
5837
|
+
the resolved state for stylesheets, which is what the mirror is for. */
|
|
5838
|
+
open?: (HelixHeadlessFilterInput["open"]) | undefined;
|
|
5839
|
+
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
5840
|
+
"default-open"?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
|
|
5841
|
+
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
5842
|
+
defaultOpen?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
|
|
5843
|
+
/** What the control says once everything is showing. */
|
|
5844
|
+
"collapse-label"?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
|
|
5845
|
+
/** What the control says once everything is showing. */
|
|
5846
|
+
collapseLabel?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
|
|
5847
|
+
/** Whether the count is a control that shows the rest. */
|
|
5848
|
+
expandable?: (HelixHeadlessFilterInput["expandable"]) | undefined;
|
|
5849
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
5850
|
+
"expand-label"?: (HelixHeadlessFilterInput["expandLabel"]) | undefined;
|
|
5851
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
5852
|
+
expandLabel?: (HelixHeadlessFilterInput["expandLabel"]) | undefined;
|
|
5800
5853
|
/** How many tokens to show before the rest become a count. */
|
|
5801
5854
|
"max-tags"?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
5802
5855
|
/** How many tokens to show before the rest become a count. */
|
|
@@ -5853,8 +5906,18 @@ Here rather than on each control. */
|
|
|
5853
5906
|
"onhelix-before-change"?: ((
|
|
5854
5907
|
e: HelixHeadlessFilterInputHelixBeforeChangeElementEvent,
|
|
5855
5908
|
) => void) | undefined;
|
|
5909
|
+
/** Fired before the suggestions go, and cancelable. */
|
|
5910
|
+
"onhelix-before-close"?: ((
|
|
5911
|
+
e: HelixHeadlessFilterInputHelixBeforeCloseElementEvent,
|
|
5912
|
+
) => void) | undefined;
|
|
5913
|
+
/** Fired before the suggestions show, and cancelable. */
|
|
5914
|
+
"onhelix-before-open"?: ((
|
|
5915
|
+
e: HelixHeadlessFilterInputHelixBeforeOpenElementEvent,
|
|
5916
|
+
) => void) | undefined;
|
|
5856
5917
|
/** Announced once the text has moved. */
|
|
5857
5918
|
oninput?: ((e: HelixHeadlessFilterInputElementEvent) => void) | undefined;
|
|
5919
|
+
/** Says the panel moved, carrying `newState` and `oldState`. */
|
|
5920
|
+
ontoggle?: ((e: HelixHeadlessFilterInputElementEvent) => void) | undefined;
|
|
5858
5921
|
};
|
|
5859
5922
|
|
|
5860
5923
|
export type HelixHeadlessFilterInputSolidJsProps = {
|
|
@@ -5873,6 +5936,33 @@ them. */
|
|
|
5873
5936
|
|
|
5874
5937
|
Not a label: it goes when typing starts. */
|
|
5875
5938
|
"prop:placeholder"?: (HelixHeadlessFilterInput["placeholder"]) | undefined;
|
|
5939
|
+
/** Whether the element is open.
|
|
5940
|
+
|
|
5941
|
+
One property, not two, so `dialog.open` answers the question anyone
|
|
5942
|
+
asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
5943
|
+
same statement in markup.
|
|
5944
|
+
|
|
5945
|
+
**Not reflected, and that is required rather than tidy.** Reflection
|
|
5946
|
+
writes the resolved state back as an attribute, so an element that opened
|
|
5947
|
+
itself would put `open` on its own host: cloned, serialized for
|
|
5948
|
+
hydration, or diffed by a framework, it comes back holding whatever the
|
|
5949
|
+
last reader did rather than what the author wrote. `:state(open)` carries
|
|
5950
|
+
the resolved state for stylesheets, which is what the mirror is for. */
|
|
5951
|
+
"prop:open"?: (HelixHeadlessFilterInput["open"]) | undefined;
|
|
5952
|
+
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
5953
|
+
"bool:default-open"?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
|
|
5954
|
+
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
5955
|
+
"prop:defaultOpen"?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
|
|
5956
|
+
/** What the control says once everything is showing. */
|
|
5957
|
+
"attr:collapse-label"?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
|
|
5958
|
+
/** What the control says once everything is showing. */
|
|
5959
|
+
"prop:collapseLabel"?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
|
|
5960
|
+
/** Whether the count is a control that shows the rest. */
|
|
5961
|
+
"prop:expandable"?: (HelixHeadlessFilterInput["expandable"]) | undefined;
|
|
5962
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
5963
|
+
"attr:expand-label"?: (HelixHeadlessFilterInput["expandLabel"]) | undefined;
|
|
5964
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
5965
|
+
"prop:expandLabel"?: (HelixHeadlessFilterInput["expandLabel"]) | undefined;
|
|
5876
5966
|
/** How many tokens to show before the rest become a count. */
|
|
5877
5967
|
"attr:max-tags"?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
5878
5968
|
/** How many tokens to show before the rest become a count. */
|
|
@@ -5928,8 +6018,18 @@ Here rather than on each control. */
|
|
|
5928
6018
|
"on:helix-before-change"?: ((
|
|
5929
6019
|
e: HelixHeadlessFilterInputHelixBeforeChangeElementEvent,
|
|
5930
6020
|
) => void) | undefined;
|
|
6021
|
+
/** Fired before the suggestions go, and cancelable. */
|
|
6022
|
+
"on:helix-before-close"?: ((
|
|
6023
|
+
e: HelixHeadlessFilterInputHelixBeforeCloseElementEvent,
|
|
6024
|
+
) => void) | undefined;
|
|
6025
|
+
/** Fired before the suggestions show, and cancelable. */
|
|
6026
|
+
"on:helix-before-open"?: ((
|
|
6027
|
+
e: HelixHeadlessFilterInputHelixBeforeOpenElementEvent,
|
|
6028
|
+
) => void) | undefined;
|
|
5931
6029
|
/** Announced once the text has moved. */
|
|
5932
6030
|
"on:input"?: ((e: HelixHeadlessFilterInputElementEvent) => void) | undefined;
|
|
6031
|
+
/** Says the panel moved, carrying `newState` and `oldState`. */
|
|
6032
|
+
"on:toggle"?: ((e: HelixHeadlessFilterInputElementEvent) => void) | undefined;
|
|
5933
6033
|
|
|
5934
6034
|
/** Set the innerHTML of the element */
|
|
5935
6035
|
innerHTML?: (string) | undefined;
|
|
@@ -18374,6 +18474,9 @@ export type CustomElements = {
|
|
|
18374
18474
|
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
18375
18475
|
* the resolved state for stylesheets, which is what the mirror is for.
|
|
18376
18476
|
* - `default-open`/`defaultOpen`: Initial open state for uncontrolled use, where nothing declared one.
|
|
18477
|
+
* - `collapse-label`/`collapseLabel`: What the control says once everything is showing.
|
|
18478
|
+
* - `expandable`: Whether the count is a control that shows the rest.
|
|
18479
|
+
* - `expand-label`/`expandLabel`: What the collapsed count is called, since `+3` names nothing.
|
|
18377
18480
|
* - `max-tags`/`maxTags`: How many tokens to show before the rest become a count.
|
|
18378
18481
|
* - `default-value`/`defaultValue`: The value the markup declared, which is where a reset returns to.
|
|
18379
18482
|
* - `value`: What the control holds now, and what its form submits.
|
|
@@ -18545,7 +18648,7 @@ export type CustomElements = {
|
|
|
18545
18648
|
* - `listbox-loading`: Shown while the options are still on their way.
|
|
18546
18649
|
* - `listbox-search`: The region holding the field that narrows the list.
|
|
18547
18650
|
* - `listbox-search-field`: The field itself.
|
|
18548
|
-
* - `rest`: The count of choices held beyond `max-tags`.
|
|
18651
|
+
* - `rest`: The count of choices held beyond `max-tags`. A `<button>` with `expandable`, a `<span>` without it.
|
|
18549
18652
|
* - `surface`: The floating panel.
|
|
18550
18653
|
* - `tag`: One chosen option.
|
|
18551
18654
|
* - `tag-dismiss`: The remove button, when `dismissible`.
|
|
@@ -20524,6 +20627,20 @@ export type CustomElements = {
|
|
|
20524
20627
|
* `helix-dismiss` its own remove control fires, so a consumer who handled the
|
|
20525
20628
|
* pointer has already handled the keyboard.
|
|
20526
20629
|
*
|
|
20630
|
+
* **It can suggest what to type next, and it never learns the grammar.** Slot
|
|
20631
|
+
* `helix-option` elements into `suggestions` and the field shows them, moves
|
|
20632
|
+
* through them with the arrows, and lets Enter press one; the option fires its
|
|
20633
|
+
* own `helix-select` and the consumer decides what choosing meant. Deciding
|
|
20634
|
+
* *what* to suggest is theirs too: keys before a colon and values after it are
|
|
20635
|
+
* the same panel with different contents, which is all a two-level filter is,
|
|
20636
|
+
* and the parse that tells them apart belongs where the domain does.
|
|
20637
|
+
*
|
|
20638
|
+
* **The panel opens when there is something in it and closes when there is
|
|
20639
|
+
* not**, rather than on a choice. A reader who picks a key wants its values
|
|
20640
|
+
* next, and closing on the choice would shut the panel between two renders. Use
|
|
20641
|
+
* `selectionStart` and `setSelectionRange` to write a completion back and put
|
|
20642
|
+
* the caret after it, or the next parse reads the wrong term.
|
|
20643
|
+
*
|
|
20527
20644
|
* ## Attributes & Properties
|
|
20528
20645
|
*
|
|
20529
20646
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -20538,6 +20655,22 @@ export type CustomElements = {
|
|
|
20538
20655
|
* - `placeholder`: Shown while the field is empty.
|
|
20539
20656
|
*
|
|
20540
20657
|
* Not a label: it goes when typing starts.
|
|
20658
|
+
* - `open`: Whether the element is open.
|
|
20659
|
+
*
|
|
20660
|
+
* One property, not two, so `dialog.open` answers the question anyone
|
|
20661
|
+
* asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
20662
|
+
* same statement in markup.
|
|
20663
|
+
*
|
|
20664
|
+
* **Not reflected, and that is required rather than tidy.** Reflection
|
|
20665
|
+
* writes the resolved state back as an attribute, so an element that opened
|
|
20666
|
+
* itself would put `open` on its own host: cloned, serialized for
|
|
20667
|
+
* hydration, or diffed by a framework, it comes back holding whatever the
|
|
20668
|
+
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
20669
|
+
* the resolved state for stylesheets, which is what the mirror is for.
|
|
20670
|
+
* - `default-open`/`defaultOpen`: Initial open state for uncontrolled use, where nothing declared one.
|
|
20671
|
+
* - `collapse-label`/`collapseLabel`: What the control says once everything is showing.
|
|
20672
|
+
* - `expandable`: Whether the count is a control that shows the rest.
|
|
20673
|
+
* - `expand-label`/`expandLabel`: What the collapsed count is called, since `+3` names nothing.
|
|
20541
20674
|
* - `max-tags`/`maxTags`: How many tokens to show before the rest become a count.
|
|
20542
20675
|
* - `default-value`/`defaultValue`: The value the markup declared, which is where a reset returns to.
|
|
20543
20676
|
* - `value`: What the control holds now, and what its form submits.
|
|
@@ -20574,6 +20707,20 @@ export type CustomElements = {
|
|
|
20574
20707
|
* imperatively later, and nothing is hydrating by then.
|
|
20575
20708
|
*
|
|
20576
20709
|
* Here rather than on each control.
|
|
20710
|
+
* - `selectionDirection`: The caret and the selection, under the platform's own names.
|
|
20711
|
+
*
|
|
20712
|
+
* **Published for the reason `Input` publishes them, and this element needs
|
|
20713
|
+
* them more.** The `<input>` is inside this shadow root, so a consumer has no
|
|
20714
|
+
* way to ask where the caret is: `querySelector` does not cross the boundary.
|
|
20715
|
+
* A grammar that completes what is being typed cannot work without it, because
|
|
20716
|
+
* "what is being typed" is the term the caret is in, and after writing a
|
|
20717
|
+
* completion back the caret has to be put after it or the next parse reads the
|
|
20718
|
+
* wrong term.
|
|
20719
|
+
*
|
|
20720
|
+
* Zero before there is a control, which is where an empty field's caret would
|
|
20721
|
+
* be anyway. (property only) (readonly)
|
|
20722
|
+
* - `selectionEnd`: Where the selection ends, which is the caret when nothing is selected. (property only) (readonly)
|
|
20723
|
+
* - `selectionStart`: Where the selection starts, which is the caret when nothing is selected. (property only) (readonly)
|
|
20577
20724
|
* - `form`: The form this control belongs to, if any. (property only) (readonly)
|
|
20578
20725
|
* - `labels`: Labels associated with this control. (property only) (readonly)
|
|
20579
20726
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
@@ -20601,7 +20748,10 @@ export type CustomElements = {
|
|
|
20601
20748
|
*
|
|
20602
20749
|
* - `change`: Relayed from the input once the reader has finished.
|
|
20603
20750
|
* - `helix-before-change`: Fired as the text changes, and cancelable.
|
|
20751
|
+
* - `helix-before-close`: Fired before the suggestions go, and cancelable.
|
|
20752
|
+
* - `helix-before-open`: Fired before the suggestions show, and cancelable.
|
|
20604
20753
|
* - `input`: Announced once the text has moved.
|
|
20754
|
+
* - `toggle`: Says the panel moved, carrying `newState` and `oldState`.
|
|
20605
20755
|
*
|
|
20606
20756
|
* ## Slots
|
|
20607
20757
|
*
|
|
@@ -20609,13 +20759,23 @@ export type CustomElements = {
|
|
|
20609
20759
|
*
|
|
20610
20760
|
* - `end`: After the text, for a count or a control.
|
|
20611
20761
|
* - `start`: Before the text, for a search icon.
|
|
20762
|
+
* - `suggestions`: What could be typed next, as `Option`s, and `Option.Group`s of them.
|
|
20612
20763
|
* - `tags`: What is already narrowing the results, as `Tag`s.
|
|
20613
20764
|
*
|
|
20614
20765
|
* ## Methods
|
|
20615
20766
|
*
|
|
20616
20767
|
* Methods that can be called to access component functionality.
|
|
20617
20768
|
*
|
|
20769
|
+
* - `setSelectionRange(start: number, end: number, direction?: 'backward' | 'forward' | 'none') => void`: Moves the caret, or selects a run of the text.
|
|
20618
20770
|
* - `focus(options?: FocusOptions) => void`: Puts the caret in the field, the way a label pointing at one would.
|
|
20771
|
+
* - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
|
|
20772
|
+
*
|
|
20773
|
+
* Announces before it acts, so `preventDefault()` on the `helix-before-open` or
|
|
20774
|
+
* `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
|
|
20775
|
+
* element opens or closes itself, whether or not a consumer declared
|
|
20776
|
+
* `open`: a declared property is a seed and a correction, and a consumer
|
|
20777
|
+
* who wants the decision for themselves refuses it and assigns their own.
|
|
20778
|
+
* - `toggleOpen() => boolean`: Requests the opposite of the current state.
|
|
20619
20779
|
* - `requestValue(next: string) => boolean`: Requests a new value, and reports whether the request stood.
|
|
20620
20780
|
*
|
|
20621
20781
|
* Announces before it acts, so `preventDefault()` on the `helix-before-change` is
|
|
@@ -20677,7 +20837,8 @@ export type CustomElements = {
|
|
|
20677
20837
|
* - `field`: The box holding everything.
|
|
20678
20838
|
* - `hint`: Help under the field, while nothing is wrong.
|
|
20679
20839
|
* - `label`: The question, over the field.
|
|
20680
|
-
* - `rest`: How many tokens did not fit.
|
|
20840
|
+
* - `rest`: How many tokens did not fit. A `<button>` with `expandable`, a `<span>` without it.
|
|
20841
|
+
* - `surface`: The floating panel the suggestions sit in.
|
|
20681
20842
|
* - `tags`: The row the tokens sit in.
|
|
20682
20843
|
*/
|
|
20683
20844
|
"helix-headless-filter-input": Partial<
|
|
@@ -32774,6 +32935,9 @@ export type CustomElementsSolidJs = {
|
|
|
32774
32935
|
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
32775
32936
|
* the resolved state for stylesheets, which is what the mirror is for.
|
|
32776
32937
|
* - `default-open`/`defaultOpen`: Initial open state for uncontrolled use, where nothing declared one.
|
|
32938
|
+
* - `collapse-label`/`collapseLabel`: What the control says once everything is showing.
|
|
32939
|
+
* - `expandable`: Whether the count is a control that shows the rest.
|
|
32940
|
+
* - `expand-label`/`expandLabel`: What the collapsed count is called, since `+3` names nothing.
|
|
32777
32941
|
* - `max-tags`/`maxTags`: How many tokens to show before the rest become a count.
|
|
32778
32942
|
* - `default-value`/`defaultValue`: The value the markup declared, which is where a reset returns to.
|
|
32779
32943
|
* - `value`: What the control holds now, and what its form submits.
|
|
@@ -32945,7 +33109,7 @@ export type CustomElementsSolidJs = {
|
|
|
32945
33109
|
* - `listbox-loading`: Shown while the options are still on their way.
|
|
32946
33110
|
* - `listbox-search`: The region holding the field that narrows the list.
|
|
32947
33111
|
* - `listbox-search-field`: The field itself.
|
|
32948
|
-
* - `rest`: The count of choices held beyond `max-tags`.
|
|
33112
|
+
* - `rest`: The count of choices held beyond `max-tags`. A `<button>` with `expandable`, a `<span>` without it.
|
|
32949
33113
|
* - `surface`: The floating panel.
|
|
32950
33114
|
* - `tag`: One chosen option.
|
|
32951
33115
|
* - `tag-dismiss`: The remove button, when `dismissible`.
|
|
@@ -34958,6 +35122,20 @@ export type CustomElementsSolidJs = {
|
|
|
34958
35122
|
* `helix-dismiss` its own remove control fires, so a consumer who handled the
|
|
34959
35123
|
* pointer has already handled the keyboard.
|
|
34960
35124
|
*
|
|
35125
|
+
* **It can suggest what to type next, and it never learns the grammar.** Slot
|
|
35126
|
+
* `helix-option` elements into `suggestions` and the field shows them, moves
|
|
35127
|
+
* through them with the arrows, and lets Enter press one; the option fires its
|
|
35128
|
+
* own `helix-select` and the consumer decides what choosing meant. Deciding
|
|
35129
|
+
* *what* to suggest is theirs too: keys before a colon and values after it are
|
|
35130
|
+
* the same panel with different contents, which is all a two-level filter is,
|
|
35131
|
+
* and the parse that tells them apart belongs where the domain does.
|
|
35132
|
+
*
|
|
35133
|
+
* **The panel opens when there is something in it and closes when there is
|
|
35134
|
+
* not**, rather than on a choice. A reader who picks a key wants its values
|
|
35135
|
+
* next, and closing on the choice would shut the panel between two renders. Use
|
|
35136
|
+
* `selectionStart` and `setSelectionRange` to write a completion back and put
|
|
35137
|
+
* the caret after it, or the next parse reads the wrong term.
|
|
35138
|
+
*
|
|
34961
35139
|
* ## Attributes & Properties
|
|
34962
35140
|
*
|
|
34963
35141
|
* Component attributes and properties that can be applied to the element or by using JavaScript.
|
|
@@ -34972,6 +35150,22 @@ export type CustomElementsSolidJs = {
|
|
|
34972
35150
|
* - `placeholder`: Shown while the field is empty.
|
|
34973
35151
|
*
|
|
34974
35152
|
* Not a label: it goes when typing starts.
|
|
35153
|
+
* - `open`: Whether the element is open.
|
|
35154
|
+
*
|
|
35155
|
+
* One property, not two, so `dialog.open` answers the question anyone
|
|
35156
|
+
* asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
35157
|
+
* same statement in markup.
|
|
35158
|
+
*
|
|
35159
|
+
* **Not reflected, and that is required rather than tidy.** Reflection
|
|
35160
|
+
* writes the resolved state back as an attribute, so an element that opened
|
|
35161
|
+
* itself would put `open` on its own host: cloned, serialized for
|
|
35162
|
+
* hydration, or diffed by a framework, it comes back holding whatever the
|
|
35163
|
+
* last reader did rather than what the author wrote. `:state(open)` carries
|
|
35164
|
+
* the resolved state for stylesheets, which is what the mirror is for.
|
|
35165
|
+
* - `default-open`/`defaultOpen`: Initial open state for uncontrolled use, where nothing declared one.
|
|
35166
|
+
* - `collapse-label`/`collapseLabel`: What the control says once everything is showing.
|
|
35167
|
+
* - `expandable`: Whether the count is a control that shows the rest.
|
|
35168
|
+
* - `expand-label`/`expandLabel`: What the collapsed count is called, since `+3` names nothing.
|
|
34975
35169
|
* - `max-tags`/`maxTags`: How many tokens to show before the rest become a count.
|
|
34976
35170
|
* - `default-value`/`defaultValue`: The value the markup declared, which is where a reset returns to.
|
|
34977
35171
|
* - `value`: What the control holds now, and what its form submits.
|
|
@@ -35008,6 +35202,20 @@ export type CustomElementsSolidJs = {
|
|
|
35008
35202
|
* imperatively later, and nothing is hydrating by then.
|
|
35009
35203
|
*
|
|
35010
35204
|
* Here rather than on each control.
|
|
35205
|
+
* - `selectionDirection`: The caret and the selection, under the platform's own names.
|
|
35206
|
+
*
|
|
35207
|
+
* **Published for the reason `Input` publishes them, and this element needs
|
|
35208
|
+
* them more.** The `<input>` is inside this shadow root, so a consumer has no
|
|
35209
|
+
* way to ask where the caret is: `querySelector` does not cross the boundary.
|
|
35210
|
+
* A grammar that completes what is being typed cannot work without it, because
|
|
35211
|
+
* "what is being typed" is the term the caret is in, and after writing a
|
|
35212
|
+
* completion back the caret has to be put after it or the next parse reads the
|
|
35213
|
+
* wrong term.
|
|
35214
|
+
*
|
|
35215
|
+
* Zero before there is a control, which is where an empty field's caret would
|
|
35216
|
+
* be anyway. (property only) (readonly)
|
|
35217
|
+
* - `selectionEnd`: Where the selection ends, which is the caret when nothing is selected. (property only) (readonly)
|
|
35218
|
+
* - `selectionStart`: Where the selection starts, which is the caret when nothing is selected. (property only) (readonly)
|
|
35011
35219
|
* - `form`: The form this control belongs to, if any. (property only) (readonly)
|
|
35012
35220
|
* - `labels`: Labels associated with this control. (property only) (readonly)
|
|
35013
35221
|
* - `whenSettled`: Resolves a frame after the first update, when transitions are switched on.
|
|
@@ -35035,7 +35243,10 @@ export type CustomElementsSolidJs = {
|
|
|
35035
35243
|
*
|
|
35036
35244
|
* - `change`: Relayed from the input once the reader has finished.
|
|
35037
35245
|
* - `helix-before-change`: Fired as the text changes, and cancelable.
|
|
35246
|
+
* - `helix-before-close`: Fired before the suggestions go, and cancelable.
|
|
35247
|
+
* - `helix-before-open`: Fired before the suggestions show, and cancelable.
|
|
35038
35248
|
* - `input`: Announced once the text has moved.
|
|
35249
|
+
* - `toggle`: Says the panel moved, carrying `newState` and `oldState`.
|
|
35039
35250
|
*
|
|
35040
35251
|
* ## Slots
|
|
35041
35252
|
*
|
|
@@ -35043,13 +35254,23 @@ export type CustomElementsSolidJs = {
|
|
|
35043
35254
|
*
|
|
35044
35255
|
* - `end`: After the text, for a count or a control.
|
|
35045
35256
|
* - `start`: Before the text, for a search icon.
|
|
35257
|
+
* - `suggestions`: What could be typed next, as `Option`s, and `Option.Group`s of them.
|
|
35046
35258
|
* - `tags`: What is already narrowing the results, as `Tag`s.
|
|
35047
35259
|
*
|
|
35048
35260
|
* ## Methods
|
|
35049
35261
|
*
|
|
35050
35262
|
* Methods that can be called to access component functionality.
|
|
35051
35263
|
*
|
|
35264
|
+
* - `setSelectionRange(start: number, end: number, direction?: 'backward' | 'forward' | 'none') => void`: Moves the caret, or selects a run of the text.
|
|
35052
35265
|
* - `focus(options?: FocusOptions) => void`: Puts the caret in the field, the way a label pointing at one would.
|
|
35266
|
+
* - `requestOpen(next: boolean) => boolean`: Requests an open-state change, and reports whether it was applied.
|
|
35267
|
+
*
|
|
35268
|
+
* Announces before it acts, so `preventDefault()` on the `helix-before-open` or
|
|
35269
|
+
* `helix-before-close` is a refusal and nothing moves. Nobody refusing means the
|
|
35270
|
+
* element opens or closes itself, whether or not a consumer declared
|
|
35271
|
+
* `open`: a declared property is a seed and a correction, and a consumer
|
|
35272
|
+
* who wants the decision for themselves refuses it and assigns their own.
|
|
35273
|
+
* - `toggleOpen() => boolean`: Requests the opposite of the current state.
|
|
35053
35274
|
* - `requestValue(next: string) => boolean`: Requests a new value, and reports whether the request stood.
|
|
35054
35275
|
*
|
|
35055
35276
|
* Announces before it acts, so `preventDefault()` on the `helix-before-change` is
|
|
@@ -35111,7 +35332,8 @@ export type CustomElementsSolidJs = {
|
|
|
35111
35332
|
* - `field`: The box holding everything.
|
|
35112
35333
|
* - `hint`: Help under the field, while nothing is wrong.
|
|
35113
35334
|
* - `label`: The question, over the field.
|
|
35114
|
-
* - `rest`: How many tokens did not fit.
|
|
35335
|
+
* - `rest`: How many tokens did not fit. A `<button>` with `expandable`, a `<span>` without it.
|
|
35336
|
+
* - `surface`: The floating panel the suggestions sit in.
|
|
35115
35337
|
* - `tags`: The row the tokens sit in.
|
|
35116
35338
|
*/
|
|
35117
35339
|
"helix-headless-filter-input": Partial<
|
package/types/vue.d.ts
CHANGED
|
@@ -1620,6 +1620,16 @@ the resolved state for stylesheets, which is what the mirror is for. */
|
|
|
1620
1620
|
"default-open"?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
1621
1621
|
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
1622
1622
|
defaultOpen?: (HelixHeadlessCombobox["defaultOpen"]) | undefined;
|
|
1623
|
+
/** What the control says once everything is showing. */
|
|
1624
|
+
"collapse-label"?: (HelixHeadlessCombobox["collapseLabel"]) | undefined;
|
|
1625
|
+
/** What the control says once everything is showing. */
|
|
1626
|
+
collapseLabel?: (HelixHeadlessCombobox["collapseLabel"]) | undefined;
|
|
1627
|
+
/** Whether the count is a control that shows the rest. */
|
|
1628
|
+
expandable?: (HelixHeadlessCombobox["expandable"]) | undefined;
|
|
1629
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
1630
|
+
"expand-label"?: (HelixHeadlessCombobox["expandLabel"]) | undefined;
|
|
1631
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
1632
|
+
expandLabel?: (HelixHeadlessCombobox["expandLabel"]) | undefined;
|
|
1623
1633
|
/** How many tokens to show before the rest become a count. */
|
|
1624
1634
|
"max-tags"?: (HelixHeadlessCombobox["maxTags"]) | undefined;
|
|
1625
1635
|
/** How many tokens to show before the rest become a count. */
|
|
@@ -2965,6 +2975,12 @@ export type HelixHeadlessFilterInputElementEvent<E = Event> = TypedEvent<
|
|
|
2965
2975
|
/** `helix-before-change` event type */
|
|
2966
2976
|
export type HelixHeadlessFilterInputHelixBeforeChangeElementEvent =
|
|
2967
2977
|
HelixHeadlessFilterInputElementEvent<HelixBeforeChangeEvent>;
|
|
2978
|
+
/** `helix-before-close` event type */
|
|
2979
|
+
export type HelixHeadlessFilterInputHelixBeforeCloseElementEvent =
|
|
2980
|
+
HelixHeadlessFilterInputElementEvent<HelixBeforeCloseEvent>;
|
|
2981
|
+
/** `helix-before-open` event type */
|
|
2982
|
+
export type HelixHeadlessFilterInputHelixBeforeOpenElementEvent =
|
|
2983
|
+
HelixHeadlessFilterInputElementEvent<HelixBeforeOpenEvent>;
|
|
2968
2984
|
|
|
2969
2985
|
export type HelixHeadlessFilterInputVueProps = {
|
|
2970
2986
|
/** Whether the field offers a button that empties it.
|
|
@@ -2982,6 +2998,33 @@ them. */
|
|
|
2982
2998
|
|
|
2983
2999
|
Not a label: it goes when typing starts. */
|
|
2984
3000
|
placeholder?: (HelixHeadlessFilterInput["placeholder"]) | undefined;
|
|
3001
|
+
/** Whether the element is open.
|
|
3002
|
+
|
|
3003
|
+
One property, not two, so `dialog.open` answers the question anyone
|
|
3004
|
+
asking it meant. Writing always applies; `<helix-dialog open>` is the
|
|
3005
|
+
same statement in markup.
|
|
3006
|
+
|
|
3007
|
+
**Not reflected, and that is required rather than tidy.** Reflection
|
|
3008
|
+
writes the resolved state back as an attribute, so an element that opened
|
|
3009
|
+
itself would put `open` on its own host: cloned, serialized for
|
|
3010
|
+
hydration, or diffed by a framework, it comes back holding whatever the
|
|
3011
|
+
last reader did rather than what the author wrote. `:state(open)` carries
|
|
3012
|
+
the resolved state for stylesheets, which is what the mirror is for. */
|
|
3013
|
+
open?: (HelixHeadlessFilterInput["open"]) | undefined;
|
|
3014
|
+
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
3015
|
+
"default-open"?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
|
|
3016
|
+
/** Initial open state for uncontrolled use, where nothing declared one. */
|
|
3017
|
+
defaultOpen?: (HelixHeadlessFilterInput["defaultOpen"]) | undefined;
|
|
3018
|
+
/** What the control says once everything is showing. */
|
|
3019
|
+
"collapse-label"?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
|
|
3020
|
+
/** What the control says once everything is showing. */
|
|
3021
|
+
collapseLabel?: (HelixHeadlessFilterInput["collapseLabel"]) | undefined;
|
|
3022
|
+
/** Whether the count is a control that shows the rest. */
|
|
3023
|
+
expandable?: (HelixHeadlessFilterInput["expandable"]) | undefined;
|
|
3024
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
3025
|
+
"expand-label"?: (HelixHeadlessFilterInput["expandLabel"]) | undefined;
|
|
3026
|
+
/** What the collapsed count is called, since `+3` names nothing. */
|
|
3027
|
+
expandLabel?: (HelixHeadlessFilterInput["expandLabel"]) | undefined;
|
|
2985
3028
|
/** How many tokens to show before the rest become a count. */
|
|
2986
3029
|
"max-tags"?: (HelixHeadlessFilterInput["maxTags"]) | undefined;
|
|
2987
3030
|
/** How many tokens to show before the rest become a count. */
|
|
@@ -3038,8 +3081,14 @@ export type HelixHeadlessFilterInputVueEvents = {
|
|
|
3038
3081
|
change: HelixHeadlessFilterInputElementEvent;
|
|
3039
3082
|
/** Fired as the text changes, and cancelable. */
|
|
3040
3083
|
"helix-before-change": HelixHeadlessFilterInputHelixBeforeChangeElementEvent;
|
|
3084
|
+
/** Fired before the suggestions go, and cancelable. */
|
|
3085
|
+
"helix-before-close": HelixHeadlessFilterInputHelixBeforeCloseElementEvent;
|
|
3086
|
+
/** Fired before the suggestions show, and cancelable. */
|
|
3087
|
+
"helix-before-open": HelixHeadlessFilterInputHelixBeforeOpenElementEvent;
|
|
3041
3088
|
/** Announced once the text has moved. */
|
|
3042
3089
|
input: HelixHeadlessFilterInputElementEvent;
|
|
3090
|
+
/** Says the panel moved, carrying `newState` and `oldState`. */
|
|
3091
|
+
toggle: HelixHeadlessFilterInputElementEvent;
|
|
3043
3092
|
};
|
|
3044
3093
|
|
|
3045
3094
|
export type HelixHeadlessFormatDateVueProps = {
|
|
@@ -8313,7 +8362,7 @@ export interface WcToolkitVueGlobalComponents {
|
|
|
8313
8362
|
HelixHeadlessFileInputVueProps,
|
|
8314
8363
|
HelixHeadlessFileInputVueEvents
|
|
8315
8364
|
>;
|
|
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. */
|
|
8365
|
+
/** **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. **It can suggest what to type next, and it never learns the grammar.** Slot 'helix-option' elements into 'suggestions' and the field shows them, moves through them with the arrows, and lets Enter press one; the option fires its own 'helix-select' and the consumer decides what choosing meant. Deciding *what* to suggest is theirs too: keys before a colon and values after it are the same panel with different contents, which is all a two-level filter is, and the parse that tells them apart belongs where the domain does. **The panel opens when there is something in it and closes when there is not**, rather than on a choice. A reader who picks a key wants its values next, and closing on the choice would shut the panel between two renders. Use 'selectionStart' and 'setSelectionRange' to write a completion back and put the caret after it, or the next parse reads the wrong term. */
|
|
8317
8366
|
"helix-headless-filter-input": DefineCustomElement<
|
|
8318
8367
|
HelixHeadlessFilterInput,
|
|
8319
8368
|
HelixHeadlessFilterInputVueProps,
|