@fusion.dev/helix-headless 0.0.0-dev → 0.0.2
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 +4513 -4483
- package/dist/accordion/item/accordion-item.d.ts +13 -15
- package/dist/accordion/item/accordion-item.js +15 -17
- package/dist/announcement/root/announcement-root.d.ts +7 -25
- package/dist/announcement/root/announcement-root.js +7 -20
- package/dist/app-header/root/app-header-root.d.ts +10 -17
- package/dist/app-header/root/app-header-root.js +9 -18
- package/dist/avatar/group/avatar-group.d.ts +10 -19
- package/dist/avatar/group/avatar-group.js +12 -17
- package/dist/avatar/root/avatar-root.d.ts +8 -8
- package/dist/avatar/root/avatar-root.js +19 -20
- package/dist/badge/root/badge-root.d.ts +6 -6
- package/dist/badge/root/badge-root.js +13 -13
- package/dist/bar-chart/root/bar-chart-root.d.ts +21 -29
- package/dist/bar-chart/root/bar-chart-root.js +42 -57
- package/dist/breadcrumbs/breadcrumb/breadcrumb.d.ts +12 -18
- package/dist/breadcrumbs/breadcrumb/breadcrumb.js +13 -16
- package/dist/breadcrumbs/root/breadcrumbs-root.d.ts +9 -28
- package/dist/breadcrumbs/root/breadcrumbs-root.js +9 -28
- package/dist/button/root/button-root.d.ts +84 -94
- package/dist/button/root/button-root.js +82 -92
- package/dist/callout/root/callout-root.d.ts +4 -5
- package/dist/carousel/root/carousel-root.d.ts +59 -71
- package/dist/carousel/root/carousel-root.js +73 -101
- package/dist/chat/composer/chat-composer.d.ts +29 -33
- package/dist/chat/composer/chat-composer.js +40 -44
- package/dist/chat/message/chat-message.d.ts +25 -25
- package/dist/chat/message/chat-message.js +26 -26
- package/dist/chat/root/chat-root.d.ts +28 -41
- package/dist/chat/root/chat-root.js +27 -40
- package/dist/checkbox/root/checkbox-root.d.ts +10 -12
- package/dist/checkbox/root/checkbox-root.js +29 -35
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +32 -45
- package/dist/checkbox-group/root/checkbox-group-root.js +53 -79
- package/dist/code-block/root/code-block-root.d.ts +3 -4
- package/dist/code-block/root/code-block-root.js +8 -12
- package/dist/color-input/root/color-input-root.d.ts +36 -37
- package/dist/color-input/root/color-input-root.js +29 -34
- package/dist/color-picker/color.d.ts +7 -8
- package/dist/color-picker/color.js +7 -8
- package/dist/color-picker/root/color-picker-root.d.ts +55 -57
- package/dist/color-picker/root/color-picker-root.js +60 -64
- package/dist/combobox/root/combobox-root.d.ts +53 -58
- package/dist/combobox/root/combobox-root.js +85 -94
- package/dist/command/root/command-root.d.ts +8 -8
- package/dist/command/root/command-root.js +29 -33
- package/dist/copy-button/root/copy-button-root.d.ts +21 -24
- package/dist/copy-button/root/copy-button-root.js +25 -35
- package/dist/data-table/root/data-table-root.d.ts +77 -76
- package/dist/data-table/root/data-table-root.js +95 -84
- package/dist/data-table/root/order.d.ts +2 -2
- package/dist/data-table/root/order.js +1 -3
- package/dist/date-input/root/date-input-root.d.ts +88 -93
- package/dist/date-input/root/date-input-root.js +147 -158
- package/dist/date-picker/root/date-picker-root.d.ts +75 -83
- package/dist/date-picker/root/date-picker-root.js +120 -143
- package/dist/dialog/root/dialog-root.d.ts +41 -24
- package/dist/dialog/root/dialog-root.js +47 -24
- package/dist/divider/root/divider-root.d.ts +5 -6
- package/dist/divider/root/divider-root.js +4 -5
- package/dist/donut-chart/root/donut-chart-root.d.ts +22 -25
- package/dist/donut-chart/root/donut-chart-root.js +37 -51
- package/dist/drawer/root/drawer-root.d.ts +24 -29
- package/dist/drawer/root/drawer-root.js +15 -22
- package/dist/drilldown/item/drilldown-item.d.ts +14 -14
- package/dist/drilldown/item/drilldown-item.js +24 -26
- package/dist/drilldown/root/drilldown-root.d.ts +8 -10
- package/dist/drilldown/root/drilldown-root.js +6 -7
- package/dist/element-events.generated.js +1 -1
- package/dist/file-input/root/file-input-root.d.ts +20 -24
- package/dist/file-input/root/file-input-root.js +42 -57
- package/dist/format-date/root/format-date-root.js +1 -1
- package/dist/heatmap/root/buckets.d.ts +8 -8
- package/dist/heatmap/root/buckets.js +8 -8
- package/dist/heatmap/root/heatmap-root.d.ts +57 -63
- package/dist/heatmap/root/heatmap-root.js +72 -83
- package/dist/icon/root/icon-root.d.ts +4 -4
- package/dist/icon/root/icon-root.js +9 -9
- package/dist/icon-button/root/icon-button-root.d.ts +4 -6
- package/dist/icon-button/root/icon-button-root.js +4 -6
- package/dist/image/root/image-root.d.ts +49 -59
- package/dist/image/root/image-root.js +55 -65
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5 -5
- package/dist/input/root/input-root.d.ts +61 -85
- package/dist/input/root/input-root.js +79 -106
- package/dist/kbd/root/kbd-root.d.ts +8 -7
- package/dist/kbd/root/kbd-root.js +71 -11
- package/dist/legend/root/legend-root.d.ts +1 -1
- package/dist/legend/root/legend-root.js +4 -5
- package/dist/line-chart/root/line-chart-root.d.ts +26 -30
- package/dist/line-chart/root/line-chart-root.js +10 -10
- package/dist/list/item/list-item.d.ts +14 -18
- package/dist/list/item/list-item.js +18 -22
- package/dist/list/root/list-root.d.ts +4 -4
- package/dist/list/root/list-root.js +3 -3
- package/dist/listbox/root/listbox-root.d.ts +31 -58
- package/dist/listbox/root/listbox-root.js +66 -109
- package/dist/megamenu/root/megamenu-root.d.ts +34 -35
- package/dist/megamenu/root/megamenu-root.js +53 -58
- package/dist/menu/item/menu-item.d.ts +39 -53
- package/dist/menu/item/menu-item.js +50 -64
- package/dist/menu/root/menu-root.d.ts +30 -40
- package/dist/menu/root/menu-root.js +49 -82
- package/dist/meter/root/meter-root.d.ts +49 -53
- package/dist/meter/root/meter-root.js +22 -27
- package/dist/navigation/root/navigation-root.js +11 -19
- package/dist/notifications/notification/notification.d.ts +16 -22
- package/dist/notifications/notification/notification.js +21 -27
- package/dist/notifications/root/notifications-root.d.ts +31 -39
- package/dist/notifications/root/notifications-root.js +41 -52
- package/dist/number-input/root/number-input-root.d.ts +31 -33
- package/dist/number-input/root/number-input-root.js +37 -39
- package/dist/option/root/option-root.d.ts +73 -74
- package/dist/option/root/option-root.js +62 -64
- package/dist/outline/root/outline-root.d.ts +38 -44
- package/dist/outline/root/outline-root.js +66 -82
- package/dist/pagination/root/pagination-root.d.ts +87 -92
- package/dist/pagination/root/pagination-root.js +116 -123
- package/dist/pagination/size/pagination-size.d.ts +31 -50
- package/dist/pagination/size/pagination-size.js +35 -55
- package/dist/pagination/summary/pagination-summary.d.ts +12 -12
- package/dist/pagination/summary/pagination-summary.js +18 -18
- package/dist/pin-input/root/pin-input-root.d.ts +53 -70
- package/dist/pin-input/root/pin-input-root.js +74 -94
- package/dist/popover/root/popover-root.d.ts +15 -20
- package/dist/popover/root/popover-root.js +19 -36
- package/dist/progress/root/progress-root.d.ts +12 -14
- package/dist/progress/root/progress-root.js +22 -25
- package/dist/qr-code/root/qr-code-root.d.ts +11 -11
- package/dist/qr-code/root/qr-code-root.js +12 -14
- package/dist/radio/group/radio-group.js +19 -26
- package/dist/radio/root/radio-root.d.ts +12 -13
- package/dist/radio/root/radio-root.js +12 -13
- package/dist/rating/root/rating-root.d.ts +25 -30
- package/dist/rating/root/rating-root.js +43 -50
- package/dist/scroll-area/root/scroll-area-root.d.ts +11 -14
- package/dist/scroll-area/root/scroll-area-root.js +39 -33
- package/dist/select/root/select-root.d.ts +7 -12
- package/dist/select/root/select-root.js +40 -55
- package/dist/slider/root/slider-root.d.ts +53 -60
- package/dist/slider/root/slider-root.js +74 -85
- package/dist/sparkline/root/sparkline-root.d.ts +43 -47
- package/dist/sparkline/root/sparkline-root.js +23 -32
- package/dist/speed-dial/item/speed-dial-item.d.ts +6 -6
- package/dist/speed-dial/item/speed-dial-item.js +9 -9
- package/dist/speed-dial/root/speed-dial-root.d.ts +21 -25
- package/dist/speed-dial/root/speed-dial-root.js +32 -40
- package/dist/splitter/root/splitter-root.d.ts +98 -111
- package/dist/splitter/root/splitter-root.js +96 -123
- package/dist/stat/root/stat-root.d.ts +2 -7
- package/dist/stat/root/stat-root.js +0 -5
- package/dist/steps/step/step.d.ts +19 -24
- package/dist/steps/step/step.js +27 -32
- package/dist/switch/root/switch-root.js +2 -2
- package/dist/table/column/table-column.d.ts +54 -60
- package/dist/table/column/table-column.js +95 -68
- package/dist/table/root/table-root.d.ts +5 -6
- package/dist/table/root/table-root.js +7 -10
- package/dist/tabs/panel/tab-panel.d.ts +21 -25
- package/dist/tabs/panel/tab-panel.js +25 -29
- package/dist/tabs/root/tabs-root.d.ts +25 -34
- package/dist/tabs/root/tabs-root.js +22 -28
- package/dist/tabs/tab/tab.d.ts +12 -12
- package/dist/tabs/tab/tab.js +19 -20
- package/dist/textarea/root/textarea-root.d.ts +36 -36
- package/dist/textarea/root/textarea-root.js +43 -47
- package/dist/time-input/root/time-input-root.d.ts +58 -68
- package/dist/time-input/root/time-input-root.js +62 -77
- package/dist/time-picker/root/time-picker-root.d.ts +73 -79
- package/dist/time-picker/root/time-picker-root.js +72 -84
- package/dist/timeline/item/timeline-item.d.ts +8 -11
- package/dist/timeline/item/timeline-item.js +8 -11
- package/dist/timeline/root/timeline-root.d.ts +5 -7
- package/dist/timeline/root/timeline-root.js +5 -7
- package/dist/toast/item/toast-item.d.ts +9 -27
- package/dist/toast/item/toast-item.js +19 -41
- package/dist/toast/root/toast-root.d.ts +10 -14
- package/dist/toast/root/toast-root.js +4 -5
- package/dist/toggle/group/toggle-group.d.ts +6 -15
- package/dist/toggle/group/toggle-group.js +21 -36
- package/dist/toggle/root/toggle-root.d.ts +26 -27
- package/dist/toggle/root/toggle-root.js +30 -31
- package/dist/toolbar/root/toolbar-root.d.ts +7 -10
- package/dist/toolbar/root/toolbar-root.js +10 -14
- package/dist/tooltip/root/tooltip-root.d.ts +52 -59
- package/dist/tooltip/root/tooltip-root.js +98 -93
- package/dist/tour/root/tour-root.d.ts +19 -23
- package/dist/tour/root/tour-root.js +31 -41
- package/dist/tour/stop/tour-stop.d.ts +14 -15
- package/dist/tour/stop/tour-stop.js +31 -34
- package/dist/tree/item/tree-item.d.ts +30 -35
- package/dist/tree/item/tree-item.js +43 -55
- package/dist/tree/root/tree-root.d.ts +7 -10
- package/dist/tree/root/tree-root.js +33 -42
- package/dist/trend/root/trend-root.d.ts +3 -5
- package/dist/trend/root/trend-root.js +5 -9
- package/dist/video/root/video-root.d.ts +100 -124
- package/dist/video/root/video-root.js +142 -176
- package/dist/video-playlist/item/video-playlist-item.d.ts +16 -16
- package/dist/video-playlist/item/video-playlist-item.js +24 -24
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +5 -8
- package/dist/video-playlist/menu/video-playlist-menu.js +20 -29
- package/dist/video-playlist/root/video-playlist-root.d.ts +16 -11
- package/dist/video-playlist/root/video-playlist-root.js +21 -25
- package/dist/virtual-list/root/virtual-list-root.d.ts +8 -12
- package/dist/virtual-list/root/virtual-list-root.js +11 -16
- package/jsx.d.ts +9797 -12561
- package/package.json +6 -6
- package/vue.d.ts +2684 -3228
|
@@ -6,13 +6,10 @@ import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
|
6
6
|
* @description
|
|
7
7
|
* Layout and semantics, and deliberately not a target.
|
|
8
8
|
*
|
|
9
|
-
* **`href` makes the row itself the link.**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* it is not true of the component's: an `<a part="row">` wraps this component's
|
|
14
|
-
* own layout perfectly well. `Tree.Item` does exactly that, and the two were
|
|
15
|
-
* refusing and accepting `href` on the same argument.
|
|
9
|
+
* **`href` makes the row itself the link.** A whole-row target needs the anchor
|
|
10
|
+
* to wrap the layout, which a *consumer's* anchor cannot do for slots it does not
|
|
11
|
+
* own. The component's can: an `<a part="row">` wraps this component's own layout
|
|
12
|
+
* perfectly well, which is what `Tree.Item` does.
|
|
16
13
|
*
|
|
17
14
|
* What the anchor buys is what the row could not fake: the whole row is a
|
|
18
15
|
* target, Enter follows it, middle click opens a tab, the status bar shows the
|
|
@@ -49,15 +46,15 @@ export declare class HelixHeadlessListItem extends HelixElement {
|
|
|
49
46
|
* to the current page on every row a consumer never asked to be one.
|
|
50
47
|
*/
|
|
51
48
|
href: string;
|
|
52
|
-
/**
|
|
53
|
-
* Where the link opens, for the rare row that leaves the site.
|
|
54
|
-
*/
|
|
55
|
-
target: string;
|
|
56
49
|
/**
|
|
57
50
|
* What the link declares about where it goes. The consumer's decision rather
|
|
58
51
|
* than one derived from `target`, for the reason `Tree.Item` gives.
|
|
59
52
|
*/
|
|
60
53
|
rel: string;
|
|
54
|
+
/**
|
|
55
|
+
* Where the link opens, for the rare row that leaves the site.
|
|
56
|
+
*/
|
|
57
|
+
target: string;
|
|
61
58
|
protected willUpdate(changed: PropertyValues): void;
|
|
62
59
|
/**
|
|
63
60
|
* The cell before the row's content, which this tier leaves empty.
|
|
@@ -69,13 +66,12 @@ export declare class HelixHeadlessListItem extends HelixElement {
|
|
|
69
66
|
* sit in a track has to be a box in that track.
|
|
70
67
|
*
|
|
71
68
|
* **The box belongs to the styled tier, which is why this returns `nothing`.**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* and the one the toast had before it.
|
|
69
|
+
* Rendering it here puts an unstyled empty box in front of every headless row,
|
|
70
|
+
* and a row styled with `display: flex` and a `gap` draws that gap beside the
|
|
71
|
+
* empty child: measured on this tier's own example, which is exactly such a
|
|
72
|
+
* row, 1384 pixels moved and every label sat half a rem further in. The styled
|
|
73
|
+
* row's own comment records the same fault about a column gap beside a
|
|
74
|
+
* zero-width column.
|
|
79
75
|
*
|
|
80
76
|
* A tier that ships no CSS cannot make a box it renders cost nothing, so it
|
|
81
77
|
* does not render one. `marker="rail"` is a styled-tier attribute for the same
|
|
@@ -13,13 +13,10 @@ import { property } from 'lit/decorators.js';
|
|
|
13
13
|
* @description
|
|
14
14
|
* Layout and semantics, and deliberately not a target.
|
|
15
15
|
*
|
|
16
|
-
* **`href` makes the row itself the link.**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* it is not true of the component's: an `<a part="row">` wraps this component's
|
|
21
|
-
* own layout perfectly well. `Tree.Item` does exactly that, and the two were
|
|
22
|
-
* refusing and accepting `href` on the same argument.
|
|
16
|
+
* **`href` makes the row itself the link.** A whole-row target needs the anchor
|
|
17
|
+
* to wrap the layout, which a *consumer's* anchor cannot do for slots it does not
|
|
18
|
+
* own. The component's can: an `<a part="row">` wraps this component's own layout
|
|
19
|
+
* perfectly well, which is what `Tree.Item` does.
|
|
23
20
|
*
|
|
24
21
|
* What the anchor buys is what the row could not fake: the whole row is a
|
|
25
22
|
* target, Enter follows it, middle click opens a tab, the status bar shows the
|
|
@@ -58,15 +55,15 @@ let HelixHeadlessListItem = class HelixHeadlessListItem extends HelixElement {
|
|
|
58
55
|
* to the current page on every row a consumer never asked to be one.
|
|
59
56
|
*/
|
|
60
57
|
this.href = '';
|
|
61
|
-
/**
|
|
62
|
-
* Where the link opens, for the rare row that leaves the site.
|
|
63
|
-
*/
|
|
64
|
-
this.target = '';
|
|
65
58
|
/**
|
|
66
59
|
* What the link declares about where it goes. The consumer's decision rather
|
|
67
60
|
* than one derived from `target`, for the reason `Tree.Item` gives.
|
|
68
61
|
*/
|
|
69
62
|
this.rel = '';
|
|
63
|
+
/**
|
|
64
|
+
* Where the link opens, for the rare row that leaves the site.
|
|
65
|
+
*/
|
|
66
|
+
this.target = '';
|
|
70
67
|
}
|
|
71
68
|
willUpdate(changed) {
|
|
72
69
|
super.willUpdate(changed);
|
|
@@ -82,13 +79,12 @@ let HelixHeadlessListItem = class HelixHeadlessListItem extends HelixElement {
|
|
|
82
79
|
* sit in a track has to be a box in that track.
|
|
83
80
|
*
|
|
84
81
|
* **The box belongs to the styled tier, which is why this returns `nothing`.**
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* and the one the toast had before it.
|
|
82
|
+
* Rendering it here puts an unstyled empty box in front of every headless row,
|
|
83
|
+
* and a row styled with `display: flex` and a `gap` draws that gap beside the
|
|
84
|
+
* empty child: measured on this tier's own example, which is exactly such a
|
|
85
|
+
* row, 1384 pixels moved and every label sat half a rem further in. The styled
|
|
86
|
+
* row's own comment records the same fault about a column gap beside a
|
|
87
|
+
* zero-width column.
|
|
92
88
|
*
|
|
93
89
|
* A tier that ships no CSS cannot make a box it renders cost nothing, so it
|
|
94
90
|
* does not render one. `marker="rail"` is a styled-tier attribute for the same
|
|
@@ -106,8 +102,8 @@ let HelixHeadlessListItem = class HelixHeadlessListItem extends HelixElement {
|
|
|
106
102
|
rule. That rule is about optional *regions*, which generate an empty box
|
|
107
103
|
when nothing fills them; this is a single always-present container whose
|
|
108
104
|
job is to hold the layout somewhere other than the host.
|
|
109
|
-
|
|
110
|
-
|
|
105
|
+
|
|
106
|
+
The host has to be free for `display: list-item`, which is how an ordered
|
|
111
107
|
or unordered list gets its marker: native numbering, native counters,
|
|
112
108
|
native RTL, and nothing written by script or counted on the server. But
|
|
113
109
|
`list-item` cannot combine with `grid`, so a row whose host carried the
|
|
@@ -138,10 +134,10 @@ __decorate([
|
|
|
138
134
|
], HelixHeadlessListItem.prototype, "href", void 0);
|
|
139
135
|
__decorate([
|
|
140
136
|
property()
|
|
141
|
-
], HelixHeadlessListItem.prototype, "
|
|
137
|
+
], HelixHeadlessListItem.prototype, "rel", void 0);
|
|
142
138
|
__decorate([
|
|
143
139
|
property()
|
|
144
|
-
], HelixHeadlessListItem.prototype, "
|
|
140
|
+
], HelixHeadlessListItem.prototype, "target", void 0);
|
|
145
141
|
HelixHeadlessListItem = __decorate([
|
|
146
142
|
customElement('helix-headless-list-item')
|
|
147
143
|
], HelixHeadlessListItem);
|
|
@@ -17,10 +17,6 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
17
17
|
* @slot - The rows.
|
|
18
18
|
*/
|
|
19
19
|
export declare class HelixHeadlessList extends HelixElement {
|
|
20
|
-
/**
|
|
21
|
-
* Accessible name for the set.
|
|
22
|
-
*/
|
|
23
|
-
label: string;
|
|
24
20
|
/**
|
|
25
21
|
* What kind of list this is, which is a fact about the content.
|
|
26
22
|
*
|
|
@@ -44,6 +40,10 @@ export declare class HelixHeadlessList extends HelixElement {
|
|
|
44
40
|
* `List.Term` element would be a second row shape for one attribute's sake.
|
|
45
41
|
*/
|
|
46
42
|
kind?: 'default' | 'description' | 'ordered' | 'unordered';
|
|
43
|
+
/**
|
|
44
|
+
* Accessible name for the set.
|
|
45
|
+
*/
|
|
46
|
+
label: string;
|
|
47
47
|
/**
|
|
48
48
|
* Which markers an ordered list draws, in `<ol type>`'s own five values.
|
|
49
49
|
*
|
|
@@ -46,12 +46,12 @@ let HelixHeadlessList = class HelixHeadlessList extends HelixElement {
|
|
|
46
46
|
return html `<slot></slot>`;
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
-
__decorate([
|
|
50
|
-
property()
|
|
51
|
-
], HelixHeadlessList.prototype, "label", void 0);
|
|
52
49
|
__decorate([
|
|
53
50
|
property({ reflect: true })
|
|
54
51
|
], HelixHeadlessList.prototype, "kind", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
property()
|
|
54
|
+
], HelixHeadlessList.prototype, "label", void 0);
|
|
55
55
|
__decorate([
|
|
56
56
|
property({ reflect: true })
|
|
57
57
|
], HelixHeadlessList.prototype, "type", void 0);
|
|
@@ -25,25 +25,14 @@ declare const HelixHeadlessListbox_base: (new (...args: any[]) => import("@fusio
|
|
|
25
25
|
* chooses, because a reader passing over four options on the way to the fifth
|
|
26
26
|
* did not mean to pick all five.
|
|
27
27
|
*
|
|
28
|
-
* **This does not use `KeyboardNavigationController`, and the reason
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* The real one is where focus lives. `NavigableItem.focusItem()` moves DOM
|
|
38
|
-
* focus to the item, because the controller's model is a roving tab stop. A
|
|
39
|
-
* filterable list cannot do that: focus has to stay in the field or typing
|
|
40
|
-
* stops, so what moves is a virtual cursor and `aria-activedescendant` is what
|
|
41
|
-
* says where it is. Those two disagree about the one thing neither can
|
|
42
|
-
* abstract, and no flag reconciles them.
|
|
43
|
-
*
|
|
44
|
-
* Worth keeping the distinction sharp, because the old wording invites the
|
|
45
|
-
* wrong fix: someone reading it would add `origin` to the controller, find it
|
|
46
|
-
* already there, and conclude this component could adopt it.
|
|
28
|
+
* **This does not use `KeyboardNavigationController`, and the reason is where
|
|
29
|
+
* focus lives rather than whether moving chooses.** The controller already
|
|
30
|
+
* separates those, taking `origin: 'focus' | 'selection'`. What it cannot do is
|
|
31
|
+
* leave focus alone: `NavigableItem.focusItem()` moves DOM focus to the item,
|
|
32
|
+
* its model being a roving tab stop. A filterable list cannot have that, focus
|
|
33
|
+
* having to stay in the field or typing stops, so what moves is a virtual
|
|
34
|
+
* cursor and `aria-activedescendant` is what says where it is. No flag
|
|
35
|
+
* reconciles the two.
|
|
47
36
|
*
|
|
48
37
|
* **Filtering hides rather than removes.** An option the filter has hidden is
|
|
49
38
|
* still the consumer's element in the consumer's order, so a filter that clears
|
|
@@ -96,8 +85,6 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
96
85
|
* the list is still the consumer's own elements in their own order. Reading
|
|
97
86
|
* gives what is being filtered on; writing declares it theirs, and
|
|
98
87
|
* `default-filter` seeds one the list owns.
|
|
99
|
-
*
|
|
100
|
-
*
|
|
101
88
|
*/
|
|
102
89
|
get filter(): string;
|
|
103
90
|
set filter(next: string);
|
|
@@ -107,15 +94,22 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
107
94
|
defaultFilter: string;
|
|
108
95
|
/** What the list is narrowed to, whoever set it. */
|
|
109
96
|
private filterState;
|
|
97
|
+
/**
|
|
98
|
+
* What is shown when a filter has hidden every option.
|
|
99
|
+
*
|
|
100
|
+
* From `MixinCollection`, which every collection in the library now shares,
|
|
101
|
+
* and re-declared here only to keep this list's own wording: "No matches" is
|
|
102
|
+
* about a filter, and the mixin's "Nothing to show" is about a list that was
|
|
103
|
+
* never given anything.
|
|
104
|
+
*/
|
|
105
|
+
emptyText: string;
|
|
110
106
|
/**
|
|
111
107
|
* Whether the list renders a field for narrowing itself.
|
|
112
108
|
*
|
|
113
109
|
* The field lives here rather than in whatever frames the list, because the
|
|
114
110
|
* filtering already does: `filter`, the empty state and the keyboard are all
|
|
115
|
-
* this component's. A select
|
|
116
|
-
*
|
|
117
|
-
* would a command palette, which is the fault the three-family split exists
|
|
118
|
-
* to prevent.
|
|
111
|
+
* this component's. A select, a combobox and a command palette drawing their
|
|
112
|
+
* own search boxes would be three copies of one field.
|
|
119
113
|
*/
|
|
120
114
|
filterable: boolean;
|
|
121
115
|
/**
|
|
@@ -126,15 +120,6 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
126
120
|
* Whether more than one option can be the answer.
|
|
127
121
|
*/
|
|
128
122
|
multiple: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* What is shown when a filter has hidden every option.
|
|
131
|
-
*
|
|
132
|
-
* From `MixinCollection`, which every collection in the library now shares,
|
|
133
|
-
* and re-declared here only to keep this list's own wording: "No matches" is
|
|
134
|
-
* about a filter, and the mixin's "Nothing to show" is about a list that was
|
|
135
|
-
* never given anything.
|
|
136
|
-
*/
|
|
137
|
-
emptyText: string;
|
|
138
123
|
/**
|
|
139
124
|
* Which option the keyboard is on, which is not what is chosen.
|
|
140
125
|
*/
|
|
@@ -153,10 +138,9 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
153
138
|
*
|
|
154
139
|
* Counting during render reads the hiding from the *previous* pass, because
|
|
155
140
|
* hiding happens in `updated` against options that are the consumer's
|
|
156
|
-
* elements rather than this component's markup
|
|
157
|
-
*
|
|
158
|
-
*
|
|
159
|
-
* instead, which schedules the one further render that shows it.
|
|
141
|
+
* elements rather than this component's markup, so a filter matching nothing
|
|
142
|
+
* leaves an empty box with no message in it. Written to state instead, which
|
|
143
|
+
* schedules the one further render that shows it.
|
|
160
144
|
*/
|
|
161
145
|
private hasMatches;
|
|
162
146
|
/**
|
|
@@ -202,17 +186,11 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
202
186
|
/**
|
|
203
187
|
* Walks the tree, and walks *through* a slot when it meets one.
|
|
204
188
|
*
|
|
205
|
-
* Descendants rather than children, because a group puts a level between the
|
|
206
|
-
* list and its options and the keyboard has to move through a grouped list
|
|
207
|
-
* exactly as it moves through a flat one.
|
|
208
|
-
*
|
|
209
189
|
* Through a slot because that is how this gets composed. `Select` renders a
|
|
210
190
|
* listbox in its own shadow root with a slot inside it, so the options are
|
|
211
191
|
* the *select's* light DOM and the listbox's only child is the slot: a plain
|
|
212
192
|
* `querySelectorAll` finds the slot and no options at all, and the whole
|
|
213
|
-
* component comes up empty.
|
|
214
|
-
* which is the argument for building the pieces separately rather than
|
|
215
|
-
* discovering it inside a finished Select.
|
|
193
|
+
* component comes up empty.
|
|
216
194
|
*/
|
|
217
195
|
private collect;
|
|
218
196
|
/** The groups, found the same way and for the same reason. */
|
|
@@ -242,9 +220,8 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
242
220
|
*
|
|
243
221
|
* A combobox keeps focus in its text field, because that is the whole of what
|
|
244
222
|
* a combobox is, and still has to move this list with the arrows. Without
|
|
245
|
-
* this it would
|
|
246
|
-
* disabled options and the seeding from the current value
|
|
247
|
-
* copy would drift from this one the first time either changed.
|
|
223
|
+
* this it would reimplement the moving, the wrapping, the skipping of
|
|
224
|
+
* disabled options and the seeding from the current value.
|
|
248
225
|
*
|
|
249
226
|
* Public and taking the event rather than a direction, so a caller forwards
|
|
250
227
|
* what it received and this decides what the key means. `preventDefault` is
|
|
@@ -265,8 +242,8 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
265
242
|
* A method rather than something this does on its own, because a listbox
|
|
266
243
|
* opening on its answer usually wants it merely *visible* and the browser
|
|
267
244
|
* already manages that: centering is what a caller wants when the list is being
|
|
268
|
-
* read as a dial rather than scanned as a list, which is what Time Picker's
|
|
269
|
-
*
|
|
245
|
+
* read as a dial rather than scanned as a list, which is what Time Picker's
|
|
246
|
+
* wheels do with three of these.
|
|
270
247
|
*
|
|
271
248
|
* A delta from the two boxes rather than `offsetTop`. An option is a slotted
|
|
272
249
|
* light DOM child, so its `offsetParent` is whatever is positioned above it,
|
|
@@ -290,12 +267,9 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
290
267
|
* Seeding from the value means the first press moves from what the reader can
|
|
291
268
|
* see is selected.
|
|
292
269
|
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
* was told the list and its selection, and nothing about where the cursor
|
|
297
|
-
* was, until a key moved it. Both read this now, so the thing announced and
|
|
298
|
-
* the thing the arrows move from cannot disagree.
|
|
270
|
+
* Read by `linkActive` as well as by the keys, so the option announced and
|
|
271
|
+
* the option the arrows move from cannot disagree: asking for `activeValue`
|
|
272
|
+
* alone points `aria-activedescendant` at nothing until a key has moved it.
|
|
299
273
|
*/
|
|
300
274
|
private get currentValue();
|
|
301
275
|
private linkActive;
|
|
@@ -305,8 +279,7 @@ export declare class HelixHeadlessListbox extends HelixHeadlessListbox_base {
|
|
|
305
279
|
*
|
|
306
280
|
* `helix-filter` and not `helix-change`, because nothing about the value
|
|
307
281
|
* changes: the options are hidden rather than removed, and telling a consumer
|
|
308
|
-
* their answer moved when it did not is worse than telling them nothing.
|
|
309
|
-
* told them nothing before this.
|
|
282
|
+
* their answer moved when it did not is worse than telling them nothing.
|
|
310
283
|
*/
|
|
311
284
|
private readonly handleFilter;
|
|
312
285
|
/** Requests a narrowing, and reports whether the request stood. */
|