@fusion.dev/helix-headless 0.30.2 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +2171 -152
- package/dist/accordion/item/accordion-item.d.ts +2 -0
- package/dist/app-header/root/app-header-root.d.ts +2 -0
- package/dist/area-chart/root/area-chart-root.d.ts +1 -0
- package/dist/bar-chart/root/bar-chart-root.d.ts +2 -0
- package/dist/bar-chart/root/bar-chart-root.js +4 -1
- package/dist/carousel/root/carousel-root.d.ts +1 -0
- package/dist/carousel/root/carousel-root.js +14 -9
- package/dist/chat/root/chat-root.d.ts +12 -0
- package/dist/chat/root/chat-root.js +4 -0
- package/dist/checkbox/root/checkbox-root.d.ts +6 -0
- package/dist/checkbox/root/checkbox-root.js +4 -1
- package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
- package/dist/color-input/root/color-input-root.d.ts +3 -0
- package/dist/combobox/root/combobox-root.d.ts +3 -0
- package/dist/command/root/command-root.d.ts +2 -0
- package/dist/data-table/root/data-table-root.d.ts +16 -0
- package/dist/data-table/root/data-table-root.js +13 -5
- package/dist/date-input/root/date-input-root.d.ts +10 -0
- package/dist/date-input/root/date-input-root.js +6 -2
- package/dist/date-picker/root/date-picker-root.d.ts +7 -0
- package/dist/date-picker/root/date-picker-root.js +12 -6
- package/dist/dialog/root/dialog-root.d.ts +2 -0
- package/dist/donut-chart/root/donut-chart-root.d.ts +2 -0
- package/dist/donut-chart/root/donut-chart-root.js +3 -2
- package/dist/drawer/root/drawer-root.d.ts +2 -0
- package/dist/drilldown/item/drilldown-item.d.ts +36 -1
- package/dist/drilldown/item/drilldown-item.js +30 -3
- package/dist/file-input/root/file-input-root.d.ts +2 -0
- package/dist/filter-input/menu/filter-menu.d.ts +16 -0
- package/dist/filter-input/menu/filter-menu.js +30 -4
- package/dist/filter-input/root/filter-input-root.d.ts +3 -0
- package/dist/heatmap/root/heatmap-root.d.ts +1 -0
- package/dist/input/root/input-root.d.ts +3 -0
- package/dist/input/root/input-root.js +1 -1
- package/dist/line-chart/root/line-chart-root.d.ts +1 -0
- package/dist/listbox/root/listbox-root.d.ts +2 -0
- package/dist/megamenu/root/megamenu-root.d.ts +2 -0
- package/dist/menu/root/menu-root.d.ts +5 -0
- package/dist/menu/root/menu-root.js +1 -0
- package/dist/meter/root/meter-root.d.ts +12 -4
- package/dist/meter/root/meter-root.js +10 -6
- package/dist/notifications/group/notification-group.d.ts +2 -0
- package/dist/notifications/notification/notification.d.ts +4 -0
- package/dist/notifications/root/notifications-root.d.ts +2 -0
- package/dist/number-input/root/number-input-root.d.ts +2 -0
- package/dist/object-inspector/root/object-inspector-root.d.ts +1 -0
- package/dist/object-inspector/root/object-inspector-root.js +5 -4
- package/dist/option/root/option-root.d.ts +4 -0
- package/dist/option/root/option-root.js +4 -1
- package/dist/pagination/root/pagination-root.d.ts +5 -0
- package/dist/pagination/root/pagination-root.js +2 -2
- package/dist/pagination/size/pagination-size.d.ts +27 -3
- package/dist/pagination/size/pagination-size.js +16 -2
- package/dist/pin-input/root/pin-input-root.d.ts +2 -0
- package/dist/popover/root/popover-root.d.ts +2 -0
- package/dist/radio/group/radio-group.d.ts +2 -0
- package/dist/radio/root/radio-root.d.ts +2 -0
- package/dist/rating/root/rating-root.d.ts +2 -0
- package/dist/scatter-chart/root/scatter-chart-root.d.ts +2 -0
- package/dist/scatter-chart/root/scatter-chart-root.js +1 -1
- package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
- package/dist/scroll-area/root/scroll-area-root.js +4 -3
- package/dist/select/root/select-root.d.ts +3 -0
- package/dist/slider/root/slider-root.d.ts +2 -0
- package/dist/speed-dial/root/speed-dial-root.d.ts +2 -0
- package/dist/switch/root/switch-root.d.ts +3 -0
- package/dist/table/column/table-column.d.ts +16 -2
- package/dist/table/column/table-column.js +3 -8
- package/dist/tabs/panel/tab-panel.d.ts +2 -0
- package/dist/tabs/tab/tab.d.ts +2 -0
- package/dist/textarea/root/textarea-root.d.ts +2 -0
- package/dist/time-input/root/time-input-root.d.ts +6 -0
- package/dist/time-input/root/time-input-root.js +2 -0
- package/dist/time-picker/root/time-picker-root.d.ts +20 -5
- package/dist/time-picker/root/time-picker-root.js +30 -11
- package/dist/toggle/group/toggle-group.d.ts +2 -0
- package/dist/toggle/root/toggle-root.d.ts +2 -0
- package/dist/tooltip/root/tooltip-root.d.ts +2 -0
- package/dist/tour/stop/tour-stop.d.ts +5 -0
- package/dist/tour/stop/tour-stop.js +11 -0
- package/dist/tree/item/tree-item.d.ts +3 -0
- package/dist/video/root/video-root.d.ts +1 -0
- package/dist/video/root/video-root.js +1 -1
- package/dist/video-playlist/item/video-playlist-item.d.ts +1 -0
- package/dist/video-playlist/item/video-playlist-item.js +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +2000 -26
- package/types/vue.d.ts +17 -4
|
@@ -69,6 +69,9 @@ export declare const at: (row: Readonly<Record<string, unknown>>, path: string)
|
|
|
69
69
|
* @csspart grip-mark - The glyph on it.
|
|
70
70
|
* @csspart resizer - The edge a reader drags to change the width, where the column allows it.
|
|
71
71
|
* @csspart sort - The button a sortable heading is.
|
|
72
|
+
*
|
|
73
|
+
* @cssstate sorted-ascending - While the table is sorted by this column, smallest first.
|
|
74
|
+
* @cssstate sorted-descending - While the table is sorted by this column, largest first.
|
|
72
75
|
*/
|
|
73
76
|
export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
74
77
|
/**
|
|
@@ -76,9 +79,20 @@ export declare class HelixHeadlessTableColumn extends HelixElement {
|
|
|
76
79
|
*
|
|
77
80
|
* `end` is what a column of numbers wants, so digits of the same magnitude sit
|
|
78
81
|
* above each other. Left unset the cell inherits the table's own alignment,
|
|
79
|
-
* which is `start` for text in either writing direction.
|
|
82
|
+
* which is `start` for text in either writing direction. `helix-data-table`
|
|
83
|
+
* aligns the cells it draws; a `helix-table`'s cells are markup the consumer
|
|
84
|
+
* wrote, and align as the consumer styles them. The heading is this element's
|
|
85
|
+
* own, and `@fusion.dev/helix` sets it to the same edge in either table.
|
|
86
|
+
*
|
|
87
|
+
* **Reflected, because the heading is drawn by a stylesheet and has no other
|
|
88
|
+
* way to learn it.** Set as a property, which is how React sets it, an
|
|
89
|
+
* unreflected `align` left no attribute to select on, so the heading stayed at
|
|
90
|
+
* the start over a column of digits set to the end. It is the author's
|
|
91
|
+
* declaration and nothing moves it afterwards, so an attribute cannot come to
|
|
92
|
+
* disagree with the element, which is the reason `open` records a custom
|
|
93
|
+
* state instead. No default, so an unset column writes nothing onto its host.
|
|
80
94
|
*/
|
|
81
|
-
align
|
|
95
|
+
align?: 'center' | 'end' | 'start';
|
|
82
96
|
/**
|
|
83
97
|
* How to read the cell, where the field alone will not do.
|
|
84
98
|
*
|
|
@@ -29,7 +29,6 @@ export const at = (row, path) => {
|
|
|
29
29
|
let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixElement {
|
|
30
30
|
constructor() {
|
|
31
31
|
super(...arguments);
|
|
32
|
-
this.align = '';
|
|
33
32
|
this.cell = undefined;
|
|
34
33
|
this.compare = undefined;
|
|
35
34
|
this.field = '';
|
|
@@ -95,12 +94,8 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
|
|
|
95
94
|
super.willUpdate(changed);
|
|
96
95
|
hostAria(this.internals, { role: 'columnheader' });
|
|
97
96
|
this.internals.ariaSort = this.canSort ? (this.sorted ?? 'none') : null;
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
['sorted-descending', this.sorted === 'descending'],
|
|
101
|
-
]) {
|
|
102
|
-
this.toggleState(name, on);
|
|
103
|
-
}
|
|
97
|
+
this.toggleState('sorted-ascending', this.sorted === 'ascending');
|
|
98
|
+
this.toggleState('sorted-descending', this.sorted === 'descending');
|
|
104
99
|
}
|
|
105
100
|
get name() {
|
|
106
101
|
return this.textContent?.trim() ?? '';
|
|
@@ -176,7 +171,7 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
|
|
|
176
171
|
}
|
|
177
172
|
};
|
|
178
173
|
__decorate([
|
|
179
|
-
property()
|
|
174
|
+
property({ reflect: true })
|
|
180
175
|
], HelixHeadlessTableColumn.prototype, "align", void 0);
|
|
181
176
|
__decorate([
|
|
182
177
|
property({ attribute: false })
|
|
@@ -16,6 +16,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
16
16
|
* @slot - The panel's content.
|
|
17
17
|
*
|
|
18
18
|
* @csspart panel - The panel container.
|
|
19
|
+
*
|
|
20
|
+
* @cssstate selected - While its tab is the one selected.
|
|
19
21
|
*/
|
|
20
22
|
export declare class HelixHeadlessTabPanel extends HelixElement {
|
|
21
23
|
/**
|
package/dist/tabs/tab/tab.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
21
21
|
* @event {HelixSelectEvent} helix-select - Fired when the tab is chosen. Cancelable: refusing it takes the decision and nothing moves.
|
|
22
22
|
*
|
|
23
23
|
* @csspart tab - The tab itself.
|
|
24
|
+
*
|
|
25
|
+
* @cssstate selected - While it is the tab selected.
|
|
24
26
|
*/
|
|
25
27
|
export declare class HelixHeadlessTab extends HelixElement {
|
|
26
28
|
/**
|
|
@@ -35,6 +35,8 @@ declare const HelixHeadlessTextarea_base: (new (...args: any[]) => import("@fusi
|
|
|
35
35
|
* @csspart field - The box holding the control.
|
|
36
36
|
* @csspart hint - Help under the field, while nothing is wrong.
|
|
37
37
|
* @csspart label - The question, over the field.
|
|
38
|
+
*
|
|
39
|
+
* @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
|
|
38
40
|
*/
|
|
39
41
|
export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
|
|
40
42
|
protected readonly aria: AriaForwardController;
|
|
@@ -72,8 +72,11 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
|
|
|
72
72
|
* @csspart picker-list-search - The region holding the field that narrows the list.
|
|
73
73
|
* @csspart picker-list-search-field - The field itself.
|
|
74
74
|
* @csspart picker-option - One time in it. Carries `data-between` inside a range.
|
|
75
|
+
* @csspart picker-option-between - A time inside a chosen range, short of either end, beside `picker-option`.
|
|
75
76
|
* @csspart picker-option-description - The caption under the words, when there is one.
|
|
76
77
|
* @csspart picker-option-item - The row.
|
|
78
|
+
* @csspart picker-option-item-active - The row the keyboard is on.
|
|
79
|
+
* @csspart picker-option-item-selected - The row of a chosen time: the one time, or either end of a range.
|
|
77
80
|
* @csspart picker-option-label - The words.
|
|
78
81
|
* @csspart picker-option-text - The words and the caption, as one column.
|
|
79
82
|
* @csspart rest - How many times are held beyond the ones shown. A `<button>` with `expandable`, a `<span>` without it.
|
|
@@ -85,6 +88,9 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
|
|
|
85
88
|
* @csspart time-prefix - The category before the label.
|
|
86
89
|
* @csspart trigger - The control that opens the list.
|
|
87
90
|
* @csspart trigger-icon - The mark on the button that opens the clock.
|
|
91
|
+
*
|
|
92
|
+
* @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
|
|
93
|
+
* @cssstate open - While the clock is open.
|
|
88
94
|
*/
|
|
89
95
|
export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base {
|
|
90
96
|
protected readonly aria: AriaForwardController;
|
|
@@ -147,6 +147,8 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
|
|
|
147
147
|
list-hint: picker-list-hint, list-items: picker-list-items, list-label: picker-list-label,
|
|
148
148
|
list-loading: picker-list-loading, list-search: picker-list-search,
|
|
149
149
|
list-search-field: picker-list-search-field, option: picker-option,
|
|
150
|
+
option-between: picker-option-between, option-item-active: picker-option-item-active,
|
|
151
|
+
option-item-selected: picker-option-item-selected,
|
|
150
152
|
option-description: picker-option-description, option-item: picker-option-item,
|
|
151
153
|
option-label: picker-option-label, option-text: picker-option-text"
|
|
152
154
|
?invalid=${this.resolvedFeedback !== ''}
|
|
@@ -77,8 +77,11 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
|
|
|
77
77
|
* @csspart list-search - The region holding the field that narrows the list.
|
|
78
78
|
* @csspart list-search-field - The field itself.
|
|
79
79
|
* @csspart option - One time in it. Carries `data-between` inside a range.
|
|
80
|
+
* @csspart option-between - A time inside a chosen range, short of either end, beside `option`.
|
|
80
81
|
* @csspart option-description - The caption under the words, when there is one.
|
|
81
82
|
* @csspart option-item - The row.
|
|
83
|
+
* @csspart option-item-active - The row the keyboard is on.
|
|
84
|
+
* @csspart option-item-selected - The row of a chosen time: the one time, or either end of a range.
|
|
82
85
|
* @csspart option-label - The words.
|
|
83
86
|
* @csspart option-text - The words and the caption, as one column.
|
|
84
87
|
*/
|
|
@@ -226,15 +229,22 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
|
|
|
226
229
|
/** Every minute offered within the hour currently shown. */
|
|
227
230
|
private get minutes();
|
|
228
231
|
/**
|
|
229
|
-
* Each wheel comes to rest on its own answer
|
|
232
|
+
* Each wheel comes to rest on its own answer, and the list on the time it
|
|
233
|
+
* holds.
|
|
230
234
|
*
|
|
231
235
|
* A dial that opens at midnight when it holds ten in the evening is a dial
|
|
232
236
|
* showing the wrong thing, and CSS cannot fix it: `scroll-snap-type` chooses a
|
|
233
237
|
* snap point when something scrolls, and nothing has. Measured before this,
|
|
234
|
-
* with the value at 22:00, the hour wheel sat 288 pixels above its answer.
|
|
238
|
+
* with the value at 22:00, the hour wheel sat 288 pixels above its answer. The
|
|
239
|
+
* list had the same fault: holding 09:30 it opened on 12:00 AM with the answer
|
|
240
|
+
* 38 rows down and out of sight, flat on a page and in every Time Input panel.
|
|
241
|
+
* A list holding several, a range or a set, is left where it is, having no
|
|
242
|
+
* one row to come to rest on.
|
|
235
243
|
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
244
|
+
* The wheels on every update, because the columns re-render as the value
|
|
245
|
+
* moves and the minute column's contents change with the hour. The list on
|
|
246
|
+
* the first only, where it is flat on a page: centering it on every choice
|
|
247
|
+
* would move the row out from under the pointer that chose it.
|
|
238
248
|
*
|
|
239
249
|
* **And it is public, because an update is not the only moment that matters.**
|
|
240
250
|
* Inside a panel this element renders while the panel is still
|
|
@@ -310,7 +320,7 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
|
|
|
310
320
|
*/
|
|
311
321
|
private report;
|
|
312
322
|
/**
|
|
313
|
-
* Reveals once the wheels have rendered themselves.
|
|
323
|
+
* Reveals once the wheels, or the list and its rows, have rendered themselves.
|
|
314
324
|
*
|
|
315
325
|
* `updated` is this element's own moment, and each wheel is a `helix-listbox`
|
|
316
326
|
* that was created during this very render: its first update has been
|
|
@@ -329,6 +339,11 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
|
|
|
329
339
|
* scrolling a wheel changes no property and so schedules no update.
|
|
330
340
|
*/
|
|
331
341
|
private revealWhenSettled;
|
|
342
|
+
/**
|
|
343
|
+
* Whether the list has brought itself to its answer yet. It does that once,
|
|
344
|
+
* and after that only whatever opens a panel calls `reveal`.
|
|
345
|
+
*/
|
|
346
|
+
private listRevealed;
|
|
332
347
|
protected willUpdate(changed: PropertyValues): void;
|
|
333
348
|
protected updated(changed: PropertyValues): void;
|
|
334
349
|
/** Puts the keyboard on the list, which is the only control here. */
|
|
@@ -99,6 +99,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
99
99
|
this.requestValue(whole);
|
|
100
100
|
};
|
|
101
101
|
this.step = 15;
|
|
102
|
+
this.listRevealed = false;
|
|
102
103
|
}
|
|
103
104
|
get times() {
|
|
104
105
|
const from = toMinutes(this.min) ?? 0;
|
|
@@ -153,7 +154,11 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
153
154
|
return this.times.filter((at) => Math.floor(at / 60) === hour).map((at) => at % 60);
|
|
154
155
|
}
|
|
155
156
|
reveal() {
|
|
156
|
-
if (this.
|
|
157
|
+
if (this.mode !== undefined) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (this.variant !== 'wheels') {
|
|
161
|
+
this.partNamed('list')?.reveal?.();
|
|
157
162
|
return;
|
|
158
163
|
}
|
|
159
164
|
for (const column of this.renderRoot?.querySelectorAll('[part="column"]') ?? []) {
|
|
@@ -194,10 +199,10 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
194
199
|
this.internals.setFormValue(data);
|
|
195
200
|
}
|
|
196
201
|
async revealWhenSettled() {
|
|
197
|
-
const
|
|
198
|
-
...(this.renderRoot?.querySelectorAll('[part="column"]') ?? []),
|
|
202
|
+
const settling = [
|
|
203
|
+
...(this.renderRoot?.querySelectorAll('[part="column"], [part="list"], [part~="option"]') ?? []),
|
|
199
204
|
];
|
|
200
|
-
await Promise.all(
|
|
205
|
+
await Promise.all(settling.map((one) => one.updateComplete));
|
|
201
206
|
this.reveal();
|
|
202
207
|
}
|
|
203
208
|
willUpdate(changed) {
|
|
@@ -208,8 +213,14 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
208
213
|
updated(changed) {
|
|
209
214
|
super.updated(changed);
|
|
210
215
|
this.reportRequired();
|
|
211
|
-
this.
|
|
212
|
-
|
|
216
|
+
if (this.variant === 'wheels') {
|
|
217
|
+
this.reveal();
|
|
218
|
+
void this.revealWhenSettled();
|
|
219
|
+
}
|
|
220
|
+
else if (!this.listRevealed) {
|
|
221
|
+
this.listRevealed = true;
|
|
222
|
+
void this.revealWhenSettled();
|
|
223
|
+
}
|
|
213
224
|
}
|
|
214
225
|
focus(options) {
|
|
215
226
|
this.partNamed('list')?.focus(options);
|
|
@@ -230,8 +241,13 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
230
241
|
}}
|
|
231
242
|
@input=${this.handleListInput}
|
|
232
243
|
>
|
|
233
|
-
${values.map((one) => html `<${this.tag('option')}
|
|
234
|
-
|
|
244
|
+
${values.map((one) => html `<${this.tag('option')}
|
|
245
|
+
part="option"
|
|
246
|
+
exportparts="description: option-description, item: option-item,
|
|
247
|
+
item-active: option-item-active, item-selected: option-item-selected,
|
|
248
|
+
label: option-label, text: option-text"
|
|
249
|
+
value=${one}
|
|
250
|
+
?disabled=${barred(one)}
|
|
235
251
|
>${written(one)}</${this.tag('option')}
|
|
236
252
|
>`)}
|
|
237
253
|
</${this.tag('listbox')}>`;
|
|
@@ -267,12 +283,15 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
|
|
|
267
283
|
>
|
|
268
284
|
${this.times.map((minutes) => {
|
|
269
285
|
const at = fromMinutes(minutes);
|
|
286
|
+
const between = this.between(at);
|
|
270
287
|
return html `<${this.tag('option')}
|
|
271
|
-
part="option"
|
|
272
|
-
|
|
288
|
+
part="option${between ? ' option-between' : ''}"
|
|
289
|
+
exportparts="description: option-description, item: option-item,
|
|
290
|
+
item-active: option-item-active, item-selected: option-item-selected,
|
|
291
|
+
label: option-label, text: option-text"
|
|
273
292
|
value=${at}
|
|
274
293
|
?disabled=${this.barred(at)}
|
|
275
|
-
data-between=${
|
|
294
|
+
data-between=${between ? '' : nothing}
|
|
276
295
|
>${writeTime(at, this.locale)}</${this.tag('option')}
|
|
277
296
|
>`;
|
|
278
297
|
})}
|
|
@@ -34,6 +34,8 @@ declare const HelixHeadlessToggleGroup_base: (new (...args: any[]) => import("@f
|
|
|
34
34
|
* @csspart label - The question, over the row.
|
|
35
35
|
* @csspart row - The line the track sits on, with whatever flanks it.
|
|
36
36
|
* @csspart track - The bar the items sit in.
|
|
37
|
+
*
|
|
38
|
+
* @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
|
|
37
39
|
*/
|
|
38
40
|
export declare class HelixHeadlessToggleGroup extends HelixHeadlessToggleGroup_base {
|
|
39
41
|
/** Marks the chosen item, separately from placing the indicator. */
|
|
@@ -21,6 +21,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
21
21
|
* @event {HelixSelectEvent} helix-select - Fired when the item is chosen. Cancelable: refusing it takes the decision and nothing moves.
|
|
22
22
|
*
|
|
23
23
|
* @csspart item - The radio button.
|
|
24
|
+
*
|
|
25
|
+
* @cssstate selected - While it is on.
|
|
24
26
|
*/
|
|
25
27
|
export declare class HelixHeadlessToggle extends HelixElement {
|
|
26
28
|
/**
|
|
@@ -53,6 +53,8 @@ declare const HelixHeadlessTooltip_base: (new (...args: any[]) => import("@fusio
|
|
|
53
53
|
*
|
|
54
54
|
* @csspart arrow - The point, resting against the trigger.
|
|
55
55
|
* @csspart tooltip - The bubble.
|
|
56
|
+
*
|
|
57
|
+
* @cssstate open - While the tooltip shows.
|
|
56
58
|
*/
|
|
57
59
|
export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
|
|
58
60
|
/**
|
|
@@ -54,6 +54,11 @@ import '../../button/index.js';
|
|
|
54
54
|
* @csspart next-button - The inner control.
|
|
55
55
|
* @csspart skip - The control that leaves the tour.
|
|
56
56
|
* @csspart skip-button - The inner control.
|
|
57
|
+
*
|
|
58
|
+
* @cssstate placed-bottom - While the panel sits below its target.
|
|
59
|
+
* @cssstate placed-left - While the panel sits to the left of its target.
|
|
60
|
+
* @cssstate placed-right - While the panel sits to the right of its target.
|
|
61
|
+
* @cssstate placed-top - While the panel sits above its target.
|
|
57
62
|
*/
|
|
58
63
|
export declare class HelixHeadlessTourStop extends HelixElement {
|
|
59
64
|
/**
|
|
@@ -23,7 +23,18 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
|
|
|
23
23
|
this.floating = new PopoverController(this, {
|
|
24
24
|
anchor: () => this.target,
|
|
25
25
|
arrow: () => this.partNamed('arrow'),
|
|
26
|
+
offset: () => {
|
|
27
|
+
const tour = this.parentElement;
|
|
28
|
+
return ((tour?.spotlightPadding ?? 0) + (this.partNamed('arrow')?.offsetWidth ?? 0) / Math.SQRT2);
|
|
29
|
+
},
|
|
26
30
|
onDismiss: () => { },
|
|
31
|
+
onPlace: (placement) => {
|
|
32
|
+
const side = placement.split('-')[0];
|
|
33
|
+
this.toggleState('placed-bottom', side === 'bottom');
|
|
34
|
+
this.toggleState('placed-left', side === 'left');
|
|
35
|
+
this.toggleState('placed-right', side === 'right');
|
|
36
|
+
this.toggleState('placed-top', side === 'top');
|
|
37
|
+
},
|
|
27
38
|
placement: () => this.placement,
|
|
28
39
|
surface: () => this.partNamed('bubble'),
|
|
29
40
|
});
|
|
@@ -45,6 +45,9 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
|
|
|
45
45
|
* @csspart toggle - The expand and collapse control.
|
|
46
46
|
*
|
|
47
47
|
* @cssproperty --tree-level - How deep this row sits, counting from one as `aria-level` does, for the indent.
|
|
48
|
+
*
|
|
49
|
+
* @cssstate open - While its children are shown.
|
|
50
|
+
* @cssstate selected - While it is selected.
|
|
48
51
|
*/
|
|
49
52
|
export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
|
|
50
53
|
/**
|
|
@@ -86,6 +86,7 @@ import '../../menu/index.js';
|
|
|
86
86
|
* @csspart poster - What covers it before it plays.
|
|
87
87
|
* @csspart previous - Asks for the previous one.
|
|
88
88
|
* @csspart remote - Play on another device, where one is available.
|
|
89
|
+
* @csspart remote-pressed - The remote control while the picture is on another device, beside `remote`.
|
|
89
90
|
* @csspart rewind - The control that goes back ten seconds.
|
|
90
91
|
* @csspart scrubber - Where it is, and where to go.
|
|
91
92
|
* @csspart sound - The speaker and its level, which are one control.
|
|
@@ -489,7 +489,7 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
489
489
|
renderExtra(one) {
|
|
490
490
|
if (one === 'remote') {
|
|
491
491
|
return html `<button
|
|
492
|
-
part="remote"
|
|
492
|
+
part="remote${this.remoteConnected ? ' remote-pressed' : ''}"
|
|
493
493
|
type="button"
|
|
494
494
|
aria-label="Play on another device"
|
|
495
495
|
aria-pressed=${this.remoteConnected ? 'true' : 'false'}
|
|
@@ -35,6 +35,7 @@ import { type TemplateResult } from 'lit';
|
|
|
35
35
|
*
|
|
36
36
|
* @csspart container - The `listitem`, which the button sits in.
|
|
37
37
|
* @csspart item - The row, which is a button.
|
|
38
|
+
* @csspart item-current - The row of the entry the player is on, beside `item`.
|
|
38
39
|
* @csspart label - The name and whatever follows it.
|
|
39
40
|
* @csspart media - The leading column.
|
|
40
41
|
* @csspart thumbnail - The image `poster` falls back to.
|
|
@@ -37,7 +37,7 @@ let HelixHeadlessVideoPlaylistItem = class HelixHeadlessVideoPlaylistItem extend
|
|
|
37
37
|
render() {
|
|
38
38
|
return html `<div part="container" role="listitem">
|
|
39
39
|
<button
|
|
40
|
-
part="item"
|
|
40
|
+
part="item${this.current ? ' item-current' : ''}"
|
|
41
41
|
type="button"
|
|
42
42
|
aria-current=${this.current ? 'true' : nothing}
|
|
43
43
|
?disabled=${this.disabled}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fusion.dev/helix-headless",
|
|
3
3
|
"description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.32.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ross Sheppard <ross.sheppard@fusion.dev>",
|
|
7
7
|
"repository": {
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"bugs": "https://github.com/project-fusion/fusion/issues",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@fusion.dev/helix-core": "0.
|
|
50
|
-
"@fusion.dev/helix-icons": "0.
|
|
49
|
+
"@fusion.dev/helix-core": "0.32.0",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.32.0",
|
|
51
51
|
"uqr": "^0.1.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
55
|
-
"@fusion.dev/helix-cem": "0.
|
|
56
|
-
"@fusion.dev/helix-testing": "0.
|
|
55
|
+
"@fusion.dev/helix-cem": "0.32.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.32.0",
|
|
57
57
|
"@fusion.dev/scripts": "0.0.0-dev",
|
|
58
58
|
"@happy-dom/global-registrator": "^20.0.0",
|
|
59
59
|
"@lit-labs/ssr": "^4.1.0",
|