@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
|
@@ -91,27 +91,31 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
91
91
|
* What the browser may autofill here, as one of the platform's own tokens.
|
|
92
92
|
*
|
|
93
93
|
* Empty leaves the attribute off, which is the browser's default and is what
|
|
94
|
-
* lets autofill work at all.
|
|
95
|
-
* could never have a birthday or a postal code filled in for them and a
|
|
96
|
-
* consumer had no way to ask for it. See 295.
|
|
94
|
+
* lets autofill work at all.
|
|
97
95
|
*/
|
|
98
96
|
autocomplete: string;
|
|
99
97
|
/**
|
|
100
|
-
*
|
|
98
|
+
* Language tag the times are written in.
|
|
101
99
|
*
|
|
102
|
-
*
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
100
|
+
* Absent uses the runtime's own.
|
|
101
|
+
*/
|
|
102
|
+
locale: string;
|
|
103
|
+
/**
|
|
104
|
+
* Latest time that can be chosen, as `HH:mm`.
|
|
105
|
+
*/
|
|
106
|
+
max: string;
|
|
107
|
+
/**
|
|
108
|
+
* How many times are shown as tags before the rest are counted, in `multiple`.
|
|
106
109
|
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* not touch, and React reads that as a hydration mismatch. The absent
|
|
111
|
-
* attribute *is* the list, which the stylesheet reads as the base rule, so
|
|
112
|
-
* only the departure has to be named.
|
|
110
|
+
* `0` is all of them, and is the default, for the reason Date Input gives: how
|
|
111
|
+
* many fit depends on the width of the field and the length of what is in it,
|
|
112
|
+
* and this element knows neither.
|
|
113
113
|
*/
|
|
114
|
-
|
|
114
|
+
maxTags: number;
|
|
115
|
+
/**
|
|
116
|
+
* Earliest time that can be chosen, as `HH:mm`.
|
|
117
|
+
*/
|
|
118
|
+
min: string;
|
|
115
119
|
/**
|
|
116
120
|
* How many times can be held at once.
|
|
117
121
|
*
|
|
@@ -122,25 +126,27 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
122
126
|
*/
|
|
123
127
|
mode?: 'multiple' | 'range';
|
|
124
128
|
/**
|
|
125
|
-
*
|
|
129
|
+
* What the field says before a time is in it.
|
|
130
|
+
*/
|
|
131
|
+
placeholder: string;
|
|
132
|
+
/**
|
|
133
|
+
* Whether the control refuses changes while still submitting its value.
|
|
126
134
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
* and
|
|
135
|
+
* **Enforced by refusing every request in one place**, which is the seam this
|
|
136
|
+
* component already has: `requestValue` is what every path here comes through,
|
|
137
|
+
* and gating it once is what stops the next call site from being written
|
|
138
|
+
* without the check.
|
|
139
|
+
*
|
|
140
|
+
* Not `disabled`, which is the confusion worth naming: a disabled control
|
|
141
|
+
* submits nothing and leaves the tab order, and a read-only one submits its
|
|
142
|
+
* value and stays reachable, which is what a form showing a value somebody
|
|
143
|
+
* else set needs.
|
|
130
144
|
*/
|
|
131
|
-
|
|
145
|
+
readOnly: boolean;
|
|
132
146
|
/**
|
|
133
147
|
* How far apart the offered times are, in minutes.
|
|
134
148
|
*/
|
|
135
149
|
step: number;
|
|
136
|
-
/**
|
|
137
|
-
* Earliest time that can be chosen, as `HH:mm`.
|
|
138
|
-
*/
|
|
139
|
-
min: string;
|
|
140
|
-
/**
|
|
141
|
-
* Latest time that can be chosen, as `HH:mm`.
|
|
142
|
-
*/
|
|
143
|
-
max: string;
|
|
144
150
|
/**
|
|
145
151
|
* Whether the field writes the time out, or holds the value as it is.
|
|
146
152
|
*
|
|
@@ -150,16 +156,6 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
150
156
|
* never something this element would refuse to read back.
|
|
151
157
|
*/
|
|
152
158
|
timeStyle: 'iso' | 'local';
|
|
153
|
-
/**
|
|
154
|
-
* Language tag the times are written in.
|
|
155
|
-
*
|
|
156
|
-
* Absent uses the runtime's own.
|
|
157
|
-
*/
|
|
158
|
-
locale: string;
|
|
159
|
-
/**
|
|
160
|
-
* What the field says before a time is in it.
|
|
161
|
-
*/
|
|
162
|
-
placeholder: string;
|
|
163
159
|
/**
|
|
164
160
|
* Accessible name for the control that opens the list.
|
|
165
161
|
*/
|
|
@@ -217,10 +213,9 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
217
213
|
* the focus and it is the only thing that can know so. Cleared synchronously,
|
|
218
214
|
* since `focus()` dispatches before it returns.
|
|
219
215
|
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* exercised from either.
|
|
216
|
+
* The path cannot be exercised from a spec: `focus()` dispatches no event in
|
|
217
|
+
* an unfocused document, which is what both the test runtime and the browser
|
|
218
|
+
* pane here are.
|
|
224
219
|
*/
|
|
225
220
|
private returning;
|
|
226
221
|
private returnFocus;
|
|
@@ -240,19 +235,21 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
240
235
|
/** Escape shuts the list without moving the time. */
|
|
241
236
|
private readonly handleKeydown;
|
|
242
237
|
/**
|
|
243
|
-
* Whether the
|
|
238
|
+
* Whether the panel is one list of times or a column each.
|
|
244
239
|
*
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
240
|
+
* `list` offers whole times, which is what a product with slots or opening
|
|
241
|
+
* hours has. `wheels` splits them into an hour, a minute and a meridiem where
|
|
242
|
+
* the locale uses one, which is the only way to reach `23:45` without
|
|
243
|
+
* scrolling most of a day. `helix-time-picker` carries the longer note on the trade.
|
|
249
244
|
*
|
|
250
|
-
*
|
|
251
|
-
*
|
|
252
|
-
*
|
|
253
|
-
*
|
|
245
|
+
* **Optional rather than defaulted, which is not a style preference.** A
|
|
246
|
+
* reflecting property with a default writes its attribute onto every host the
|
|
247
|
+
* moment the element upgrades, including the ones a consumer rendered and did
|
|
248
|
+
* not touch, and React reads that as a hydration mismatch. The absent
|
|
249
|
+
* attribute *is* the list, which the stylesheet reads as the base rule, so
|
|
250
|
+
* only the departure has to be named.
|
|
254
251
|
*/
|
|
255
|
-
|
|
252
|
+
variant?: 'list' | 'wheels';
|
|
256
253
|
/** Refuses every change while read-only. See `readOnly`. */
|
|
257
254
|
requestValue(next: string): boolean;
|
|
258
255
|
protected firstUpdated(changed: PropertyValues): void;
|
|
@@ -262,23 +259,17 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
262
259
|
/**
|
|
263
260
|
* The clock the field opens, behind a seam the styled tier can move.
|
|
264
261
|
*
|
|
265
|
-
* A method rather than
|
|
266
|
-
* wrap
|
|
267
|
-
*
|
|
268
|
-
* interpolated rather than written, so `tier` resolves it: this renders the
|
|
269
|
-
* headless element, and a styled subclass that sets `tier` renders the styled one
|
|
270
|
-
* from the same template.
|
|
262
|
+
* A method rather than an inline fragment, so a tier above can replace or
|
|
263
|
+
* wrap it without reimplementing the template. The tag is interpolated rather
|
|
264
|
+
* than written, so `tier` resolves it to this tier's own element.
|
|
271
265
|
*/
|
|
272
266
|
protected renderPicker(): TemplateResult;
|
|
273
267
|
/**
|
|
274
268
|
* One chosen time, as a tag, behind a seam the styled tier can move.
|
|
275
269
|
*
|
|
276
|
-
* A method rather than
|
|
277
|
-
* wrap
|
|
278
|
-
*
|
|
279
|
-
* interpolated rather than written, so `tier` resolves it: this renders the
|
|
280
|
-
* headless element, and a styled subclass that sets `tier` renders the styled one
|
|
281
|
-
* from the same template.
|
|
270
|
+
* A method rather than an inline fragment, so a tier above can replace or
|
|
271
|
+
* wrap it without reimplementing the template. The tag is interpolated rather
|
|
272
|
+
* than written, so `tier` resolves it to this tier's own element.
|
|
282
273
|
*/
|
|
283
274
|
protected renderTag(at: string): TemplateResult;
|
|
284
275
|
/**
|
|
@@ -287,15 +278,14 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
287
278
|
* Slot fallback, so a consumer replaces it by slotting; and a method, so the
|
|
288
279
|
* tier above replaces it by overriding.
|
|
289
280
|
*
|
|
290
|
-
* **A named import rather than `<helix-icon
|
|
291
|
-
* element looked like the tidier of the two and loses on three counts.
|
|
281
|
+
* **A named import rather than `<helix-icon>`**, on three counts.
|
|
292
282
|
* `helix-icon` indexes the whole icon map at runtime, `icons[this.name]`, and
|
|
293
283
|
* no bundler can shake a runtime lookup, so every consumer of any component
|
|
294
284
|
* that renders one ships all 50kB of path data; a named import ships one
|
|
295
285
|
* path. The import is checked when the package compiles, where a `name`
|
|
296
|
-
* string is checked only
|
|
286
|
+
* string is checked only by a later name lookup. And `helix-icon` is not
|
|
297
287
|
* registered on the headless tier at all, which registers `helix-headless-icon`,
|
|
298
|
-
* so a headless consumer
|
|
288
|
+
* so a headless consumer gets an inert unknown element and no mark whatsoever.
|
|
299
289
|
*/
|
|
300
290
|
protected renderTrigger(): TemplateResult;
|
|
301
291
|
protected render(): TemplateResult;
|
|
@@ -113,11 +113,19 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
113
113
|
* What the browser may autofill here, as one of the platform's own tokens.
|
|
114
114
|
*
|
|
115
115
|
* Empty leaves the attribute off, which is the browser's default and is what
|
|
116
|
-
* lets autofill work at all.
|
|
117
|
-
* could never have a birthday or a postal code filled in for them and a
|
|
118
|
-
* consumer had no way to ask for it. See 295.
|
|
116
|
+
* lets autofill work at all.
|
|
119
117
|
*/
|
|
120
118
|
this.autocomplete = '';
|
|
119
|
+
/**
|
|
120
|
+
* Language tag the times are written in.
|
|
121
|
+
*
|
|
122
|
+
* Absent uses the runtime's own.
|
|
123
|
+
*/
|
|
124
|
+
this.locale = '';
|
|
125
|
+
/**
|
|
126
|
+
* Latest time that can be chosen, as `HH:mm`.
|
|
127
|
+
*/
|
|
128
|
+
this.max = '23:59';
|
|
121
129
|
/**
|
|
122
130
|
* How many times are shown as tags before the rest are counted, in `multiple`.
|
|
123
131
|
*
|
|
@@ -126,18 +134,32 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
126
134
|
* and this element knows neither.
|
|
127
135
|
*/
|
|
128
136
|
this.maxTags = 0;
|
|
129
|
-
/**
|
|
130
|
-
* How far apart the offered times are, in minutes.
|
|
131
|
-
*/
|
|
132
|
-
this.step = 15;
|
|
133
137
|
/**
|
|
134
138
|
* Earliest time that can be chosen, as `HH:mm`.
|
|
135
139
|
*/
|
|
136
140
|
this.min = '00:00';
|
|
137
141
|
/**
|
|
138
|
-
*
|
|
142
|
+
* What the field says before a time is in it.
|
|
139
143
|
*/
|
|
140
|
-
this.
|
|
144
|
+
this.placeholder = 'HH:mm';
|
|
145
|
+
/**
|
|
146
|
+
* Whether the control refuses changes while still submitting its value.
|
|
147
|
+
*
|
|
148
|
+
* **Enforced by refusing every request in one place**, which is the seam this
|
|
149
|
+
* component already has: `requestValue` is what every path here comes through,
|
|
150
|
+
* and gating it once is what stops the next call site from being written
|
|
151
|
+
* without the check.
|
|
152
|
+
*
|
|
153
|
+
* Not `disabled`, which is the confusion worth naming: a disabled control
|
|
154
|
+
* submits nothing and leaves the tab order, and a read-only one submits its
|
|
155
|
+
* value and stays reachable, which is what a form showing a value somebody
|
|
156
|
+
* else set needs.
|
|
157
|
+
*/
|
|
158
|
+
this.readOnly = false;
|
|
159
|
+
/**
|
|
160
|
+
* How far apart the offered times are, in minutes.
|
|
161
|
+
*/
|
|
162
|
+
this.step = 15;
|
|
141
163
|
/**
|
|
142
164
|
* Whether the field writes the time out, or holds the value as it is.
|
|
143
165
|
*
|
|
@@ -147,16 +169,6 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
147
169
|
* never something this element would refuse to read back.
|
|
148
170
|
*/
|
|
149
171
|
this.timeStyle = 'local';
|
|
150
|
-
/**
|
|
151
|
-
* Language tag the times are written in.
|
|
152
|
-
*
|
|
153
|
-
* Absent uses the runtime's own.
|
|
154
|
-
*/
|
|
155
|
-
this.locale = '';
|
|
156
|
-
/**
|
|
157
|
-
* What the field says before a time is in it.
|
|
158
|
-
*/
|
|
159
|
-
this.placeholder = 'HH:mm';
|
|
160
172
|
/**
|
|
161
173
|
* Accessible name for the control that opens the list.
|
|
162
174
|
*/
|
|
@@ -174,13 +186,8 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
174
186
|
* part of it, and a press on it is not a press outside. Scoped to the
|
|
175
187
|
* surface alone, `pointerdown` on the trigger closed the panel and the
|
|
176
188
|
* trigger's own `toggleOpen` reopened it on the `click` that followed, so
|
|
177
|
-
* the panel could never be closed by the button that opened it.
|
|
178
|
-
*
|
|
179
|
-
* already named their invoker; this one and its three siblings did not, and
|
|
180
|
-
* all four stayed open on a second press where Menu closed.
|
|
181
|
-
*
|
|
182
|
-
* `DismissController` documents this exact failure and takes a list for it.
|
|
183
|
-
* The list was the fix; using it was the part that did not happen here. */
|
|
189
|
+
* the panel could never be closed by the button that opened it.
|
|
190
|
+
* `DismissController` documents this failure and takes a list for it. */
|
|
184
191
|
boundary: () => [
|
|
185
192
|
this.renderRoot?.querySelector('[part="surface"]'),
|
|
186
193
|
this.renderRoot?.querySelector('[part="trigger"]'),
|
|
@@ -268,10 +275,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
268
275
|
* the focus and it is the only thing that can know so. Cleared synchronously,
|
|
269
276
|
* since `focus()` dispatches before it returns.
|
|
270
277
|
*
|
|
271
|
-
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
* exercised from either.
|
|
278
|
+
* The path cannot be exercised from a spec: `focus()` dispatches no event in
|
|
279
|
+
* an unfocused document, which is what both the test runtime and the browser
|
|
280
|
+
* pane here are.
|
|
275
281
|
*/
|
|
276
282
|
this.returning = false;
|
|
277
283
|
this.handleBlur = () => {
|
|
@@ -309,20 +315,6 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
309
315
|
this.returnFocus();
|
|
310
316
|
}
|
|
311
317
|
};
|
|
312
|
-
/**
|
|
313
|
-
* Whether the control refuses changes while still submitting its value.
|
|
314
|
-
*
|
|
315
|
-
* **Enforced by refusing every request in one place**, which is the seam this
|
|
316
|
-
* component already has: `requestValue` is what every path here comes through,
|
|
317
|
-
* and gating it once is what stops the next call site from being written
|
|
318
|
-
* without the check.
|
|
319
|
-
*
|
|
320
|
-
* Not `disabled`, which is the confusion worth naming: a disabled control
|
|
321
|
-
* submits nothing and leaves the tab order, and a read-only one submits its
|
|
322
|
-
* value and stays reachable, which is what a form showing a value somebody
|
|
323
|
-
* else set needs.
|
|
324
|
-
*/
|
|
325
|
-
this.readOnly = false;
|
|
326
318
|
}
|
|
327
319
|
get control() {
|
|
328
320
|
if (typeof this.renderRoot?.querySelector !== 'function') {
|
|
@@ -437,7 +429,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
437
429
|
updated(changed) {
|
|
438
430
|
super.updated(changed);
|
|
439
431
|
// Every update, not only the ones that name `value`: see the note on
|
|
440
|
-
// `ColorInput.updated
|
|
432
|
+
// `ColorInput.updated`.
|
|
441
433
|
this.sync();
|
|
442
434
|
/* Driven from here rather than from the toggle, because `open` is a property
|
|
443
435
|
a consumer may set directly and the panel has to follow either way. The
|
|
@@ -467,12 +459,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
467
459
|
/**
|
|
468
460
|
* The clock the field opens, behind a seam the styled tier can move.
|
|
469
461
|
*
|
|
470
|
-
* A method rather than
|
|
471
|
-
* wrap
|
|
472
|
-
*
|
|
473
|
-
* interpolated rather than written, so `tier` resolves it: this renders the
|
|
474
|
-
* headless element, and a styled subclass that sets `tier` renders the styled one
|
|
475
|
-
* from the same template.
|
|
462
|
+
* A method rather than an inline fragment, so a tier above can replace or
|
|
463
|
+
* wrap it without reimplementing the template. The tag is interpolated rather
|
|
464
|
+
* than written, so `tier` resolves it to this tier's own element.
|
|
476
465
|
*/
|
|
477
466
|
renderPicker() {
|
|
478
467
|
return html `<${this.tag('time-picker')}
|
|
@@ -507,12 +496,9 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
507
496
|
/**
|
|
508
497
|
* One chosen time, as a tag, behind a seam the styled tier can move.
|
|
509
498
|
*
|
|
510
|
-
* A method rather than
|
|
511
|
-
* wrap
|
|
512
|
-
*
|
|
513
|
-
* interpolated rather than written, so `tier` resolves it: this renders the
|
|
514
|
-
* headless element, and a styled subclass that sets `tier` renders the styled one
|
|
515
|
-
* from the same template.
|
|
499
|
+
* A method rather than an inline fragment, so a tier above can replace or
|
|
500
|
+
* wrap it without reimplementing the template. The tag is interpolated rather
|
|
501
|
+
* than written, so `tier` resolves it to this tier's own element.
|
|
516
502
|
*/
|
|
517
503
|
renderTag(at) {
|
|
518
504
|
return html `<${this.tag('tag')}
|
|
@@ -534,15 +520,14 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinControlle
|
|
|
534
520
|
* Slot fallback, so a consumer replaces it by slotting; and a method, so the
|
|
535
521
|
* tier above replaces it by overriding.
|
|
536
522
|
*
|
|
537
|
-
* **A named import rather than `<helix-icon
|
|
538
|
-
* element looked like the tidier of the two and loses on three counts.
|
|
523
|
+
* **A named import rather than `<helix-icon>`**, on three counts.
|
|
539
524
|
* `helix-icon` indexes the whole icon map at runtime, `icons[this.name]`, and
|
|
540
525
|
* no bundler can shake a runtime lookup, so every consumer of any component
|
|
541
526
|
* that renders one ships all 50kB of path data; a named import ships one
|
|
542
527
|
* path. The import is checked when the package compiles, where a `name`
|
|
543
|
-
* string is checked only
|
|
528
|
+
* string is checked only by a later name lookup. And `helix-icon` is not
|
|
544
529
|
* registered on the headless tier at all, which registers `helix-headless-icon`,
|
|
545
|
-
* so a headless consumer
|
|
530
|
+
* so a headless consumer gets an inert unknown element and no mark whatsoever.
|
|
546
531
|
*/
|
|
547
532
|
renderTrigger() {
|
|
548
533
|
return html `<slot name="trigger"><svg aria-hidden="true" fill="currentColor" part="trigger-icon" viewBox=${clock.viewBox}>
|
|
@@ -617,32 +602,32 @@ __decorate([
|
|
|
617
602
|
property()
|
|
618
603
|
], HelixHeadlessTimeInput.prototype, "autocomplete", void 0);
|
|
619
604
|
__decorate([
|
|
620
|
-
property(
|
|
621
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
605
|
+
property()
|
|
606
|
+
], HelixHeadlessTimeInput.prototype, "locale", void 0);
|
|
622
607
|
__decorate([
|
|
623
|
-
property(
|
|
624
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
608
|
+
property()
|
|
609
|
+
], HelixHeadlessTimeInput.prototype, "max", void 0);
|
|
625
610
|
__decorate([
|
|
626
611
|
property({ attribute: 'max-tags', type: Number })
|
|
627
612
|
], HelixHeadlessTimeInput.prototype, "maxTags", void 0);
|
|
628
|
-
__decorate([
|
|
629
|
-
property({ type: Number })
|
|
630
|
-
], HelixHeadlessTimeInput.prototype, "step", void 0);
|
|
631
613
|
__decorate([
|
|
632
614
|
property()
|
|
633
615
|
], HelixHeadlessTimeInput.prototype, "min", void 0);
|
|
616
|
+
__decorate([
|
|
617
|
+
property({ reflect: true })
|
|
618
|
+
], HelixHeadlessTimeInput.prototype, "mode", void 0);
|
|
634
619
|
__decorate([
|
|
635
620
|
property()
|
|
636
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
621
|
+
], HelixHeadlessTimeInput.prototype, "placeholder", void 0);
|
|
637
622
|
__decorate([
|
|
638
|
-
property({ attribute: '
|
|
639
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
623
|
+
property({ attribute: 'readonly', reflect: true, type: Boolean })
|
|
624
|
+
], HelixHeadlessTimeInput.prototype, "readOnly", void 0);
|
|
640
625
|
__decorate([
|
|
641
|
-
property()
|
|
642
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
626
|
+
property({ type: Number })
|
|
627
|
+
], HelixHeadlessTimeInput.prototype, "step", void 0);
|
|
643
628
|
__decorate([
|
|
644
|
-
property()
|
|
645
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
629
|
+
property({ attribute: 'time-style' })
|
|
630
|
+
], HelixHeadlessTimeInput.prototype, "timeStyle", void 0);
|
|
646
631
|
__decorate([
|
|
647
632
|
property({ attribute: 'trigger-label' })
|
|
648
633
|
], HelixHeadlessTimeInput.prototype, "triggerLabel", void 0);
|
|
@@ -653,8 +638,8 @@ __decorate([
|
|
|
653
638
|
state()
|
|
654
639
|
], HelixHeadlessTimeInput.prototype, "draft", void 0);
|
|
655
640
|
__decorate([
|
|
656
|
-
property({
|
|
657
|
-
], HelixHeadlessTimeInput.prototype, "
|
|
641
|
+
property({ reflect: true })
|
|
642
|
+
], HelixHeadlessTimeInput.prototype, "variant", void 0);
|
|
658
643
|
HelixHeadlessTimeInput = __decorate([
|
|
659
644
|
customElement('helix-headless-time-input')
|
|
660
645
|
], HelixHeadlessTimeInput);
|