@fusion.dev/helix-headless 0.103.3 → 0.104.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +9260 -880
- package/dist/announcement/root/announcement-root.d.ts +9 -2
- package/dist/announcement/root/announcement-root.js +9 -6
- package/dist/badge/root/badge-root.js +2 -3
- package/dist/canvas/edge/canvas-edge.d.ts +112 -0
- package/dist/canvas/edge/canvas-edge.js +66 -0
- package/dist/canvas/index.d.ts +4 -0
- package/dist/canvas/index.js +3 -0
- package/dist/canvas/node/canvas-node.d.ts +211 -0
- package/dist/canvas/node/canvas-node.js +148 -0
- package/dist/canvas/root/canvas-document.d.ts +215 -0
- package/dist/canvas/root/canvas-document.js +284 -0
- package/dist/canvas/root/canvas-root.d.ts +924 -0
- package/dist/canvas/root/canvas-root.js +1831 -0
- package/dist/carousel/root/carousel-root.d.ts +53 -16
- package/dist/carousel/root/carousel-root.js +46 -11
- package/dist/chat/root/chat-root.d.ts +4 -0
- package/dist/chat/root/chat-root.js +11 -7
- package/dist/checkbox/root/checkbox-root.js +1 -0
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +10 -0
- package/dist/checkbox-group/root/checkbox-group-root.js +5 -0
- package/dist/color-input/root/color-input-root.js +21 -5
- package/dist/color-picker/root/color-picker-root.d.ts +55 -0
- package/dist/color-picker/root/color-picker-root.js +61 -12
- package/dist/combobox/root/combobox-root.d.ts +21 -2
- package/dist/combobox/root/combobox-root.js +23 -9
- package/dist/command/root/command-root.d.ts +1 -0
- package/dist/command/root/command-root.js +1 -1
- package/dist/data-table/root/data-table-root.d.ts +43 -42
- package/dist/data-table/root/data-table-root.js +35 -34
- package/dist/date-input/root/date-input-root.d.ts +27 -0
- package/dist/date-input/root/date-input-root.js +38 -9
- package/dist/date-picker/root/date-picker-root.d.ts +28 -16
- package/dist/date-picker/root/date-picker-root.js +17 -15
- package/dist/drilldown/root/drilldown-root.d.ts +1 -0
- package/dist/drilldown/root/drilldown-root.js +5 -2
- package/dist/element-events.generated.js +15 -0
- package/dist/empty/root/empty-root.d.ts +12 -7
- package/dist/empty/root/empty-root.js +13 -10
- package/dist/file-input/root/file-input-root.d.ts +5 -1
- package/dist/file-input/root/file-input-root.js +6 -4
- package/dist/filter-input/menu/filter-menu.d.ts +1 -0
- package/dist/filter-input/menu/filter-menu.js +1 -1
- package/dist/filter-input/root/filter-input-root.js +5 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/input/root/input-root.js +1 -1
- package/dist/lightbox/root/lightbox-root.d.ts +9 -1
- package/dist/lightbox/root/lightbox-root.js +17 -7
- package/dist/listbox/root/listbox-root.d.ts +16 -14
- package/dist/listbox/root/listbox-root.js +24 -15
- package/dist/map/root/map-root.d.ts +6 -3
- package/dist/map/root/map-root.js +8 -2
- package/dist/menu/root/menu-root.d.ts +1 -0
- package/dist/menu/root/menu-root.js +1 -1
- package/dist/notifications/group/notification-group.js +5 -4
- package/dist/notifications/notification/notification.d.ts +10 -10
- package/dist/notifications/notification/notification.js +3 -3
- package/dist/notifications/root/notifications-root.d.ts +1 -0
- package/dist/notifications/root/notifications-root.js +1 -0
- package/dist/number-input/root/number-input-root.d.ts +17 -0
- package/dist/number-input/root/number-input-root.js +22 -6
- package/dist/object-inspector/root/object-inspector-root.d.ts +10 -0
- package/dist/object-inspector/root/object-inspector-root.js +10 -2
- package/dist/outline/root/outline-root.d.ts +15 -0
- package/dist/outline/root/outline-root.js +12 -7
- package/dist/pagination/root/pagination-root.d.ts +18 -18
- package/dist/pagination/root/pagination-root.js +5 -5
- package/dist/pagination/size/pagination-size.d.ts +10 -9
- package/dist/pagination/size/pagination-size.js +4 -4
- package/dist/pagination/summary/pagination-summary.js +6 -5
- package/dist/pin-input/root/pin-input-root.d.ts +5 -0
- package/dist/pin-input/root/pin-input-root.js +10 -6
- package/dist/rating/root/rating-root.js +3 -2
- package/dist/select/root/select-root.d.ts +1 -0
- package/dist/select/root/select-root.js +8 -3
- package/dist/slider/root/slider-root.d.ts +12 -0
- package/dist/slider/root/slider-root.js +13 -1
- package/dist/splitter/root/splitter-root.d.ts +44 -35
- package/dist/splitter/root/splitter-root.js +27 -22
- package/dist/switch/root/switch-root.js +1 -0
- package/dist/table/column/table-column.d.ts +17 -0
- package/dist/table/column/table-column.js +16 -4
- package/dist/table/root/table-root.d.ts +1 -0
- package/dist/table/root/table-root.js +1 -1
- package/dist/textarea/root/textarea-root.js +1 -1
- package/dist/time-input/root/time-input-root.d.ts +29 -0
- package/dist/time-input/root/time-input-root.js +31 -10
- package/dist/time-picker/root/time-picker-root.d.ts +14 -0
- package/dist/time-picker/root/time-picker-root.js +16 -14
- package/dist/toast/item/toast-item.d.ts +12 -11
- package/dist/toast/item/toast-item.js +11 -5
- package/dist/toolbar/root/toolbar-root.js +2 -16
- package/dist/tooltip/root/tooltip-root.d.ts +1 -0
- package/dist/tooltip/root/tooltip-root.js +6 -0
- package/dist/tour/root/tour-root.d.ts +10 -10
- package/dist/tour/root/tour-root.js +5 -5
- package/dist/tree/root/tree-root.d.ts +1 -0
- package/dist/tree/root/tree-root.js +1 -1
- package/dist/video/root/video-root.d.ts +84 -0
- package/dist/video/root/video-root.js +116 -41
- package/dist/video-playlist/menu/video-playlist-menu.d.ts +1 -0
- package/dist/video-playlist/menu/video-playlist-menu.js +4 -3
- package/package.json +5 -5
- package/types/jsx.d.ts +5419 -716
- package/types/svelte.d.ts +3 -0
- package/types/vue.d.ts +1607 -213
|
@@ -31,6 +31,7 @@ declare const HelixHeadlessTable_base: (new (...args: any[]) => import("@fusion.
|
|
|
31
31
|
*
|
|
32
32
|
* @csspart empty - Shown when there are no rows to show.
|
|
33
33
|
* @csspart head - The row the column headings sit in. `display: contents`, so it takes no space.
|
|
34
|
+
* @csspart live - The empty and loading lines again, in a region a screen reader hears when they change. Visually hidden in the styled tier.
|
|
34
35
|
* @csspart loading - Shown while the rows are still on their way.
|
|
35
36
|
* @csspart table - The grid.
|
|
36
37
|
*
|
|
@@ -108,7 +108,7 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
108
108
|
if (!control) {
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
|
-
this.
|
|
111
|
+
this.copyValidity(control);
|
|
112
112
|
this.refreshFeedback();
|
|
113
113
|
}
|
|
114
114
|
connectedCallback() {
|
|
@@ -56,6 +56,7 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
|
|
|
56
56
|
* @csspart picker-column-hint - Help under the list.
|
|
57
57
|
* @csspart picker-column-items - The list itself.
|
|
58
58
|
* @csspart picker-column-label - The question, over the list.
|
|
59
|
+
* @csspart picker-column-live - The inner column's `live`, the region a screen reader hears its empty and loading lines from.
|
|
59
60
|
* @csspart picker-column-loading - Shown while the options are still on their way.
|
|
60
61
|
* @csspart picker-column-search - The region holding the field that narrows the list.
|
|
61
62
|
* @csspart picker-column-search-field - The field itself.
|
|
@@ -68,6 +69,7 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
|
|
|
68
69
|
* @csspart picker-list-hint - Help under the list.
|
|
69
70
|
* @csspart picker-list-items - The list itself.
|
|
70
71
|
* @csspart picker-list-label - The question, over the list.
|
|
72
|
+
* @csspart picker-list-live - The inner list's `live`, the region a screen reader hears its empty and loading lines from.
|
|
71
73
|
* @csspart picker-list-loading - Shown while the options are still on their way.
|
|
72
74
|
* @csspart picker-list-search - The region holding the field that narrows the list.
|
|
73
75
|
* @csspart picker-list-search-field - The field itself.
|
|
@@ -128,6 +130,31 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
128
130
|
* What the field says before a time is in it.
|
|
129
131
|
*/
|
|
130
132
|
placeholder: string;
|
|
133
|
+
/**
|
|
134
|
+
* What a reader is told when a range holds more than two times.
|
|
135
|
+
*
|
|
136
|
+
* **Every sentence a control raises in the browser's bubble is a property**,
|
|
137
|
+
* so a form in another language speaks it. Absent is the control's own
|
|
138
|
+
* sentence, in English.
|
|
139
|
+
*/
|
|
140
|
+
rangeLengthMessage?: string;
|
|
141
|
+
/**
|
|
142
|
+
* What a reader is told when a time is after `max`, with `{max}` filled in
|
|
143
|
+
* as the field writes it.
|
|
144
|
+
*/
|
|
145
|
+
rangeOverflowMessage?: string;
|
|
146
|
+
/**
|
|
147
|
+
* What a reader is told when a time is before `min`, with `{min}` filled
|
|
148
|
+
* in as the field writes it.
|
|
149
|
+
*/
|
|
150
|
+
rangeUnderflowMessage?: string;
|
|
151
|
+
/**
|
|
152
|
+
* What the control removing one time is called, with `{name}` filled in.
|
|
153
|
+
*
|
|
154
|
+
* **The name goes in**, so a row of them is heard as which one each
|
|
155
|
+
* removes rather than as "Remove" said once per time.
|
|
156
|
+
*/
|
|
157
|
+
removeLabel: string;
|
|
131
158
|
/**
|
|
132
159
|
* How far apart the offered times are, in minutes.
|
|
133
160
|
*/
|
|
@@ -177,6 +204,8 @@ export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base
|
|
|
177
204
|
private get picked();
|
|
178
205
|
private readonly handleInput;
|
|
179
206
|
private readonly handlePicked;
|
|
207
|
+
/** Each time, where `mode` holds several, sent one entry each. */
|
|
208
|
+
protected get answers(): readonly string[] | undefined;
|
|
180
209
|
/** What is wrong with the times, which the text input cannot say. */
|
|
181
210
|
protected validate(): string;
|
|
182
211
|
/**
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { AriaForwardController, valueAsTime as asTime, customElement, timeAsValue as fromTime, HelixFormElement, isTimeValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinTokens, valueAsMinutes, writeTime, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { AriaForwardController, valueAsTime as asTime, customElement, fillTemplate, timeAsValue as fromTime, HelixFormElement, isTimeValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinTokens, valueAsMinutes, writeTime, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { clock } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -24,6 +24,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
|
|
|
24
24
|
this.max = '23:59';
|
|
25
25
|
this.min = '00:00';
|
|
26
26
|
this.placeholder = 'HH:mm';
|
|
27
|
+
this.removeLabel = 'Remove {name}';
|
|
27
28
|
this.step = 15;
|
|
28
29
|
this.timeStyle = 'local';
|
|
29
30
|
this.triggerLabel = 'Choose a time';
|
|
@@ -106,23 +107,31 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
|
|
|
106
107
|
const held = this.held;
|
|
107
108
|
return held.length > 0 && held.every(isTimeValue) ? held.join(',') : '';
|
|
108
109
|
}
|
|
110
|
+
get answers() {
|
|
111
|
+
return this.mode === undefined ? undefined : this.held;
|
|
112
|
+
}
|
|
109
113
|
validate() {
|
|
110
114
|
const held = this.held;
|
|
111
115
|
const floor = valueAsMinutes(this.min) ?? 0;
|
|
112
116
|
const ceiling = valueAsMinutes(this.max) ?? 1439;
|
|
113
117
|
if (held.length > 0 && !held.every(isTimeValue)) {
|
|
114
|
-
return this.
|
|
115
|
-
|
|
116
|
-
|
|
118
|
+
return (this.badInputMessage ||
|
|
119
|
+
(this.mode === undefined
|
|
120
|
+
? 'Enter a time as HH:mm.'
|
|
121
|
+
: 'Enter times as HH:mm, separated by commas.'));
|
|
117
122
|
}
|
|
118
123
|
if (held.some((one) => (valueAsMinutes(one) ?? 0) < floor)) {
|
|
119
|
-
return
|
|
124
|
+
return fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
|
|
125
|
+
min: writeTime(this.min, this.locale),
|
|
126
|
+
});
|
|
120
127
|
}
|
|
121
128
|
if (held.some((one) => (valueAsMinutes(one) ?? 0) > ceiling)) {
|
|
122
|
-
return
|
|
129
|
+
return fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
|
|
130
|
+
max: writeTime(this.max, this.locale),
|
|
131
|
+
});
|
|
123
132
|
}
|
|
124
133
|
if (this.mode === 'range' && held.length > 2) {
|
|
125
|
-
return 'A range is two times.';
|
|
134
|
+
return this.rangeLengthMessage || 'A range is two times.';
|
|
126
135
|
}
|
|
127
136
|
return '';
|
|
128
137
|
}
|
|
@@ -139,12 +148,12 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
|
|
|
139
148
|
column-feedback: picker-column-feedback, column-filter-icon: picker-column-filter-icon,
|
|
140
149
|
column-filter-mark: picker-column-filter-mark, column-hint: picker-column-hint,
|
|
141
150
|
column-items: picker-column-items, column-label: picker-column-label,
|
|
142
|
-
column-loading: picker-column-loading, column-search: picker-column-search,
|
|
151
|
+
column-live: picker-column-live, column-loading: picker-column-loading, column-search: picker-column-search,
|
|
143
152
|
column-search-field: picker-column-search-field, columns: picker-columns, list: picker-list,
|
|
144
153
|
list-empty: picker-list-empty, list-feedback: picker-list-feedback,
|
|
145
154
|
list-filter-icon: picker-list-filter-icon, list-filter-mark: picker-list-filter-mark,
|
|
146
155
|
list-hint: picker-list-hint, list-items: picker-list-items, list-label: picker-list-label,
|
|
147
|
-
list-loading: picker-list-loading, list-search: picker-list-search,
|
|
156
|
+
list-live: picker-list-live, list-loading: picker-list-loading, list-search: picker-list-search,
|
|
148
157
|
list-search-field: picker-list-search-field, option: picker-option,
|
|
149
158
|
option-between: picker-option-between, option-item-active: picker-option-item-active,
|
|
150
159
|
option-item-selected: picker-option-item-selected,
|
|
@@ -169,7 +178,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
|
|
|
169
178
|
part="time"
|
|
170
179
|
exportparts="dismiss: time-dismiss, dismiss-mark: time-dismiss-mark, start: time-start"
|
|
171
180
|
dismissible
|
|
172
|
-
dismiss-label=${
|
|
181
|
+
dismiss-label=${fillTemplate(this.removeLabel, { name: this.written(at) })}
|
|
173
182
|
?disabled=${this.isDisabled}
|
|
174
183
|
@helix-dismiss=${(event) => {
|
|
175
184
|
event.stopPropagation();
|
|
@@ -256,6 +265,18 @@ __decorate([
|
|
|
256
265
|
__decorate([
|
|
257
266
|
property()
|
|
258
267
|
], HelixHeadlessTimeInput.prototype, "placeholder", void 0);
|
|
268
|
+
__decorate([
|
|
269
|
+
property({ attribute: 'range-length-message' })
|
|
270
|
+
], HelixHeadlessTimeInput.prototype, "rangeLengthMessage", void 0);
|
|
271
|
+
__decorate([
|
|
272
|
+
property({ attribute: 'range-overflow-message' })
|
|
273
|
+
], HelixHeadlessTimeInput.prototype, "rangeOverflowMessage", void 0);
|
|
274
|
+
__decorate([
|
|
275
|
+
property({ attribute: 'range-underflow-message' })
|
|
276
|
+
], HelixHeadlessTimeInput.prototype, "rangeUnderflowMessage", void 0);
|
|
277
|
+
__decorate([
|
|
278
|
+
property({ attribute: 'remove-label' })
|
|
279
|
+
], HelixHeadlessTimeInput.prototype, "removeLabel", void 0);
|
|
259
280
|
__decorate([
|
|
260
281
|
property({ type: Number })
|
|
261
282
|
], HelixHeadlessTimeInput.prototype, "step", void 0);
|
|
@@ -57,6 +57,7 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
|
|
|
57
57
|
* @csspart column-hint - Help under the list.
|
|
58
58
|
* @csspart column-items - The list itself.
|
|
59
59
|
* @csspart column-label - The question, over the list.
|
|
60
|
+
* @csspart column-live - The inner list's `live`, the region a screen reader hears its empty and loading lines from.
|
|
60
61
|
* @csspart column-loading - Shown while the options are still on their way.
|
|
61
62
|
* @csspart column-search - The region holding the field that narrows the list.
|
|
62
63
|
* @csspart column-search-field - The field itself.
|
|
@@ -69,6 +70,7 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
|
|
|
69
70
|
* @csspart list-hint - Help under the list.
|
|
70
71
|
* @csspart list-items - The list itself.
|
|
71
72
|
* @csspart list-label - The question, over the list.
|
|
73
|
+
* @csspart list-live - The inner list's `live`, the region a screen reader hears its empty and loading lines from.
|
|
72
74
|
* @csspart list-loading - Shown while the options are still on their way.
|
|
73
75
|
* @csspart list-search - The region holding the field that narrows the list.
|
|
74
76
|
* @csspart list-search-field - The field itself.
|
|
@@ -82,6 +84,14 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
|
|
|
82
84
|
* @csspart option-text - The words and the caption, as one column.
|
|
83
85
|
*/
|
|
84
86
|
export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_base {
|
|
87
|
+
/**
|
|
88
|
+
* What a reader is told when the value holds something that is not a time.
|
|
89
|
+
*
|
|
90
|
+
* **Every sentence a control raises in the browser's bubble is a property**,
|
|
91
|
+
* named for the validity flag it reports, so a form in another language
|
|
92
|
+
* speaks it. Absent is the control's own sentence, in English.
|
|
93
|
+
*/
|
|
94
|
+
badInputMessage?: string;
|
|
85
95
|
/**
|
|
86
96
|
* Times that cannot be chosen, comma separated, as `HH:mm`.
|
|
87
97
|
*
|
|
@@ -261,6 +271,10 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
|
|
|
261
271
|
step: number;
|
|
262
272
|
/** Refuses every change while read-only. See `readOnly`. */
|
|
263
273
|
requestValue(next: string): boolean;
|
|
274
|
+
/**
|
|
275
|
+
* What a reader is told when a time is required and none is chosen.
|
|
276
|
+
*/
|
|
277
|
+
valueMissingMessage?: string;
|
|
264
278
|
/**
|
|
265
279
|
* Whether the times are one list or a column each.
|
|
266
280
|
*
|
|
@@ -4,7 +4,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { valueAsTime as asTime, customElement, timeAsValue as fromTime, HelixFormElement, MixinControllerValue, minutesAsValue, valueAsMinutes, writeTime, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { valueAsTime as asTime, customElement, timeAsValue as fromTime, HelixFormElement, MixinControllerValue, minutesAsValue, reportValues, valueAsMinutes, writeTime, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { nothing } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
import { html } from 'lit/static-html.js';
|
|
@@ -151,29 +151,25 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
151
151
|
reportRequired() {
|
|
152
152
|
const anchor = this.partNamed('list') ?? undefined;
|
|
153
153
|
if (this.required && this.value === '') {
|
|
154
|
-
this.internals.setValidity({ valueMissing: true }, 'Choose a time.', anchor);
|
|
154
|
+
this.internals.setValidity({ valueMissing: true }, this.valueMissingMessage || 'Choose a time.', anchor);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
157
|
const held = this.held;
|
|
158
158
|
if (held.length > 0 && held.some((one) => asTime(one) === null)) {
|
|
159
|
-
this.internals.setValidity({ badInput: true }, this.
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
this.internals.setValidity({ badInput: true }, this.badInputMessage ||
|
|
160
|
+
(this.mode === undefined
|
|
161
|
+
? 'Enter a time as HH:mm.'
|
|
162
|
+
: 'Enter times as HH:mm, separated by commas.'), anchor);
|
|
162
163
|
return;
|
|
163
164
|
}
|
|
164
165
|
this.internals.setValidity({});
|
|
165
166
|
}
|
|
166
167
|
report() {
|
|
167
|
-
|
|
168
|
-
if (this.name === '' || this.disabled || times.length === 0) {
|
|
168
|
+
if (this.disabled) {
|
|
169
169
|
this.internals.setFormValue(null);
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
|
|
173
|
-
for (const time of times) {
|
|
174
|
-
data.append(this.name, time);
|
|
175
|
-
}
|
|
176
|
-
this.internals.setFormValue(data);
|
|
172
|
+
reportValues(this.internals, this.name, this.held);
|
|
177
173
|
}
|
|
178
174
|
async revealWhenSettled() {
|
|
179
175
|
const settling = [
|
|
@@ -208,7 +204,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
208
204
|
data-column=${part}
|
|
209
205
|
exportparts="empty: column-empty, feedback: column-feedback, filter-icon: column-filter-icon,
|
|
210
206
|
filter-mark: column-filter-mark, hint: column-hint, items: column-items, label: column-label,
|
|
211
|
-
loading: column-loading, search: column-search, search-field: column-search-field"
|
|
207
|
+
live: column-live, loading: column-loading, search: column-search, search-field: column-search-field"
|
|
212
208
|
aria-label=${label}
|
|
213
209
|
?disabled=${this.isDisabled}
|
|
214
210
|
.value=${value}
|
|
@@ -250,7 +246,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
250
246
|
part="list"
|
|
251
247
|
exportparts="empty: list-empty, feedback: list-feedback, filter-icon: list-filter-icon,
|
|
252
248
|
filter-mark: list-filter-mark, hint: list-hint, items: list-items, label: list-label,
|
|
253
|
-
loading: list-loading, search: list-search, search-field: list-search-field"
|
|
249
|
+
live: list-live, loading: list-loading, search: list-search, search-field: list-search-field"
|
|
254
250
|
aria-label=${this.label}
|
|
255
251
|
data-unset=${this.value === '' ? '' : nothing}
|
|
256
252
|
?disabled=${this.isDisabled}
|
|
@@ -295,6 +291,9 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
295
291
|
this.value = Number.isNaN(ms) ? '' : fromTime(new Date(ms));
|
|
296
292
|
}
|
|
297
293
|
};
|
|
294
|
+
__decorate([
|
|
295
|
+
property({ attribute: 'bad-input-message' })
|
|
296
|
+
], HelixHeadlessTimePicker.prototype, "badInputMessage", void 0);
|
|
298
297
|
__decorate([
|
|
299
298
|
property({ attribute: 'disable-times' })
|
|
300
299
|
], HelixHeadlessTimePicker.prototype, "disableTimes", void 0);
|
|
@@ -325,6 +324,9 @@ __decorate([
|
|
|
325
324
|
__decorate([
|
|
326
325
|
property({ type: Number })
|
|
327
326
|
], HelixHeadlessTimePicker.prototype, "step", void 0);
|
|
327
|
+
__decorate([
|
|
328
|
+
property({ attribute: 'value-missing-message' })
|
|
329
|
+
], HelixHeadlessTimePicker.prototype, "valueMissingMessage", void 0);
|
|
328
330
|
__decorate([
|
|
329
331
|
property({ reflect: true })
|
|
330
332
|
], HelixHeadlessTimePicker.prototype, "variant", void 0);
|
|
@@ -50,17 +50,6 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
|
|
|
50
50
|
* restart a message the reader is already partway through.
|
|
51
51
|
*/
|
|
52
52
|
duration?: number;
|
|
53
|
-
/**
|
|
54
|
-
* What kind of message it is, which picks the mark and its name.
|
|
55
|
-
*
|
|
56
|
-
* A subset of the tone axis: a toast reports a status and never a brand role.
|
|
57
|
-
*/
|
|
58
|
-
tone?: 'danger' | 'info' | 'success' | 'warning';
|
|
59
|
-
/** When the current run of the timer began, or nothing while it is paused. */
|
|
60
|
-
private startedAt;
|
|
61
|
-
/** What is left of the duration, so resuming continues rather than restarts. */
|
|
62
|
-
private remaining;
|
|
63
|
-
private timer;
|
|
64
53
|
/**
|
|
65
54
|
* Whether the message is still showing.
|
|
66
55
|
*
|
|
@@ -76,6 +65,17 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
|
|
|
76
65
|
*/
|
|
77
66
|
get open(): boolean;
|
|
78
67
|
set open(next: boolean);
|
|
68
|
+
/** When the current run of the timer began, or nothing while it is paused. */
|
|
69
|
+
private startedAt;
|
|
70
|
+
/** What is left of the duration, so resuming continues rather than restarts. */
|
|
71
|
+
private remaining;
|
|
72
|
+
private timer;
|
|
73
|
+
/**
|
|
74
|
+
* What kind of message it is, which picks the mark and its name.
|
|
75
|
+
*
|
|
76
|
+
* A subset of the tone axis: a toast reports a status and never a brand role.
|
|
77
|
+
*/
|
|
78
|
+
tone?: 'danger' | 'info' | 'success' | 'warning';
|
|
79
79
|
/** Whether it is showing, whoever said so, and `undefined` until somebody has. */
|
|
80
80
|
private openState;
|
|
81
81
|
/**
|
|
@@ -104,6 +104,7 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
|
|
|
104
104
|
private holds;
|
|
105
105
|
private readonly handlePause;
|
|
106
106
|
private readonly handleResume;
|
|
107
|
+
connectedCallback(): void;
|
|
107
108
|
disconnectedCallback(): void;
|
|
108
109
|
protected willUpdate(changed: PropertyValues): void;
|
|
109
110
|
protected firstUpdated(changed: PropertyValues): void;
|
|
@@ -71,10 +71,16 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
|
|
|
71
71
|
this.dismiss();
|
|
72
72
|
}, this.remaining);
|
|
73
73
|
}
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
super.connectedCallback();
|
|
76
|
+
if (this.hasUpdated && this.open) {
|
|
77
|
+
this.resume();
|
|
78
|
+
}
|
|
79
|
+
}
|
|
74
80
|
disconnectedCallback() {
|
|
75
81
|
super.disconnectedCallback();
|
|
76
|
-
|
|
77
|
-
this.
|
|
82
|
+
this.pause();
|
|
83
|
+
this.holds = 0;
|
|
78
84
|
}
|
|
79
85
|
willUpdate(changed) {
|
|
80
86
|
super.willUpdate(changed);
|
|
@@ -146,12 +152,12 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
|
|
|
146
152
|
__decorate([
|
|
147
153
|
property({ type: Number })
|
|
148
154
|
], HelixHeadlessToastItem.prototype, "duration", void 0);
|
|
149
|
-
__decorate([
|
|
150
|
-
property({ reflect: true })
|
|
151
|
-
], HelixHeadlessToastItem.prototype, "tone", void 0);
|
|
152
155
|
__decorate([
|
|
153
156
|
property({ type: Boolean })
|
|
154
157
|
], HelixHeadlessToastItem.prototype, "open", null);
|
|
158
|
+
__decorate([
|
|
159
|
+
property({ reflect: true })
|
|
160
|
+
], HelixHeadlessToastItem.prototype, "tone", void 0);
|
|
155
161
|
HelixHeadlessToastItem = __decorate([
|
|
156
162
|
customElement('helix-headless-toast-item')
|
|
157
163
|
], HelixHeadlessToastItem);
|
|
@@ -4,25 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { customElement, HelixElement, inlineStep } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, HelixElement, inlineStep, keyClaimed } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
10
|
const KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']);
|
|
11
11
|
const ownsTabStop = (node) => 'focusable' in node;
|
|
12
|
-
const CARETLESS = new Set(['button', 'checkbox', 'color', 'file', 'image', 'reset', 'submit']);
|
|
13
|
-
const claimed = (event) => {
|
|
14
|
-
if (event.defaultPrevented) {
|
|
15
|
-
return true;
|
|
16
|
-
}
|
|
17
|
-
const inner = event.composedPath()[0];
|
|
18
|
-
if (!(inner instanceof HTMLElement)) {
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
if (inner.isContentEditable || inner.localName === 'textarea' || inner.localName === 'select') {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
return inner.localName === 'input' && !CARETLESS.has(inner.type);
|
|
25
|
-
};
|
|
26
12
|
let HelixHeadlessToolbar = class HelixHeadlessToolbar extends HelixElement {
|
|
27
13
|
constructor() {
|
|
28
14
|
super(...arguments);
|
|
@@ -41,7 +27,7 @@ let HelixHeadlessToolbar = class HelixHeadlessToolbar extends HelixElement {
|
|
|
41
27
|
}
|
|
42
28
|
};
|
|
43
29
|
this.handleKeydown = (event) => {
|
|
44
|
-
if (!KEYS.has(event.key) ||
|
|
30
|
+
if (!KEYS.has(event.key) || keyClaimed(event)) {
|
|
45
31
|
return;
|
|
46
32
|
}
|
|
47
33
|
const along = inlineStep(this, event.key);
|
|
@@ -348,6 +348,7 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
|
|
|
348
348
|
* this should not be the thing to settle it.
|
|
349
349
|
*/
|
|
350
350
|
private auditDescription;
|
|
351
|
+
connectedCallback(): void;
|
|
351
352
|
disconnectedCallback(): void;
|
|
352
353
|
protected firstUpdated(changed: PropertyValues): void;
|
|
353
354
|
protected updated(changed: PropertyValues): void;
|
|
@@ -199,6 +199,12 @@ let HelixHeadlessTooltip = class HelixHeadlessTooltip extends MixinControllerOpe
|
|
|
199
199
|
'`aria-describedby="<that id>"` to the element it names. Written in your own markup ' +
|
|
200
200
|
'it survives server rendering, which is why this element will not write it for you.');
|
|
201
201
|
}
|
|
202
|
+
connectedCallback() {
|
|
203
|
+
super.connectedCallback();
|
|
204
|
+
if (this.hasUpdated) {
|
|
205
|
+
this.bind();
|
|
206
|
+
}
|
|
207
|
+
}
|
|
202
208
|
disconnectedCallback() {
|
|
203
209
|
super.disconnectedCallback();
|
|
204
210
|
this.unbind();
|
|
@@ -40,6 +40,16 @@ export declare class HelixHeadlessTour extends HelixElement {
|
|
|
40
40
|
* Label for the control that goes back, handed to every stop.
|
|
41
41
|
*/
|
|
42
42
|
backLabel: string;
|
|
43
|
+
/**
|
|
44
|
+
* Stop to start on, where nothing declared one.
|
|
45
|
+
*/
|
|
46
|
+
defaultIndex: number;
|
|
47
|
+
/**
|
|
48
|
+
* Label for the control that goes on from the last stop.
|
|
49
|
+
*/
|
|
50
|
+
doneLabel: string;
|
|
51
|
+
/** The stop being shown, whoever set it, and `undefined` until somebody has. */
|
|
52
|
+
private indexState;
|
|
43
53
|
/**
|
|
44
54
|
* Which stop the reader is on.
|
|
45
55
|
*
|
|
@@ -54,16 +64,6 @@ export declare class HelixHeadlessTour extends HelixElement {
|
|
|
54
64
|
*/
|
|
55
65
|
get index(): number;
|
|
56
66
|
set index(next: number);
|
|
57
|
-
/**
|
|
58
|
-
* Stop to start on, where nothing declared one.
|
|
59
|
-
*/
|
|
60
|
-
defaultIndex: number;
|
|
61
|
-
/** The stop being shown, whoever set it, and `undefined` until somebody has. */
|
|
62
|
-
private indexState;
|
|
63
|
-
/**
|
|
64
|
-
* Label for the control that goes on from the last stop.
|
|
65
|
-
*/
|
|
66
|
-
doneLabel: string;
|
|
67
67
|
/**
|
|
68
68
|
* Accessible name for the run, such as "Getting started".
|
|
69
69
|
*/
|
|
@@ -12,8 +12,8 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
12
12
|
super(...arguments);
|
|
13
13
|
this.backLabel = '';
|
|
14
14
|
this.defaultIndex = 0;
|
|
15
|
-
this.indexState = undefined;
|
|
16
15
|
this.doneLabel = '';
|
|
16
|
+
this.indexState = undefined;
|
|
17
17
|
this.label = '';
|
|
18
18
|
this.nextLabel = '';
|
|
19
19
|
this.open = false;
|
|
@@ -34,7 +34,7 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
this.handleKeydown = (event) => {
|
|
37
|
-
if (this.open && event.key === 'Escape') {
|
|
37
|
+
if (this.open && event.key === 'Escape' && !event.defaultPrevented) {
|
|
38
38
|
event.preventDefault();
|
|
39
39
|
this.skip();
|
|
40
40
|
}
|
|
@@ -200,15 +200,15 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
|
|
|
200
200
|
__decorate([
|
|
201
201
|
property({ attribute: 'back-label' })
|
|
202
202
|
], HelixHeadlessTour.prototype, "backLabel", void 0);
|
|
203
|
-
__decorate([
|
|
204
|
-
property({ type: Number })
|
|
205
|
-
], HelixHeadlessTour.prototype, "index", null);
|
|
206
203
|
__decorate([
|
|
207
204
|
property({ attribute: 'default-index', type: Number })
|
|
208
205
|
], HelixHeadlessTour.prototype, "defaultIndex", void 0);
|
|
209
206
|
__decorate([
|
|
210
207
|
property({ attribute: 'done-label' })
|
|
211
208
|
], HelixHeadlessTour.prototype, "doneLabel", void 0);
|
|
209
|
+
__decorate([
|
|
210
|
+
property({ type: Number })
|
|
211
|
+
], HelixHeadlessTour.prototype, "index", null);
|
|
212
212
|
__decorate([
|
|
213
213
|
property()
|
|
214
214
|
], HelixHeadlessTour.prototype, "label", void 0);
|
|
@@ -26,6 +26,7 @@ declare const HelixHeadlessTree_base: (new (...args: any[]) => import("@fusion.d
|
|
|
26
26
|
* @event {HelixSelectEvent} helix-select - Fired when an item is chosen. Dispatched by the item and listened for here, because the tree is what a consumer holds a reference to. Cancelable: refusing it takes the decision and nothing moves.
|
|
27
27
|
*
|
|
28
28
|
* @csspart empty - Shown when there are no rows to show.
|
|
29
|
+
* @csspart live - The empty and loading lines again, in a region a screen reader hears when they change. Visually hidden in the styled tier.
|
|
29
30
|
* @csspart loading - Shown while the rows are still on their way.
|
|
30
31
|
* @csspart tree - The tree container.
|
|
31
32
|
*/
|