@fusion.dev/helix-headless 0.52.0 → 0.53.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 +680 -283
- package/dist/announcement/root/announcement-root.js +2 -5
- package/dist/area-chart/root/area-chart-root.d.ts +7 -0
- package/dist/area-chart/root/area-chart-root.js +10 -12
- package/dist/bar-chart/root/bar-chart-root.js +4 -5
- package/dist/blockquote/root/blockquote-root.js +2 -5
- package/dist/chat/composer/chat-composer.js +2 -5
- package/dist/chat/message/chat-message.js +4 -11
- package/dist/chat/root/chat-root.js +1 -1
- package/dist/checkbox-group/root/checkbox-group-root.js +1 -1
- package/dist/color-input/root/color-input-root.js +1 -1
- package/dist/combobox/root/combobox-root.js +1 -1
- package/dist/data-table/root/data-table-root.d.ts +0 -10
- package/dist/data-table/root/data-table-root.js +4 -10
- package/dist/date-input/root/date-input-root.js +1 -1
- package/dist/divider/root/divider-root.js +2 -5
- package/dist/donut-chart/root/donut-chart-root.js +5 -6
- package/dist/drilldown/item/drilldown-item.d.ts +18 -0
- package/dist/drilldown/item/drilldown-item.js +3 -0
- package/dist/drilldown/root/drilldown-root.d.ts +20 -1
- package/dist/drilldown/root/drilldown-root.js +6 -13
- package/dist/file-input/root/file-input-root.js +2 -2
- package/dist/filter-input/root/filter-input-root.js +1 -1
- package/dist/heatmap/root/buckets.d.ts +2 -2
- package/dist/heatmap/root/buckets.js +3 -4
- package/dist/heatmap/root/heatmap-root.d.ts +0 -10
- package/dist/heatmap/root/heatmap-root.js +2 -8
- package/dist/input/root/input-root.js +1 -1
- package/dist/line-chart/root/line-chart-root.d.ts +6 -0
- package/dist/line-chart/root/line-chart-root.js +15 -17
- package/dist/listbox/root/listbox-root.js +1 -1
- package/dist/menu/item/menu-item.js +2 -2
- package/dist/notifications/notification/notification.d.ts +3 -9
- package/dist/notifications/notification/notification.js +3 -11
- package/dist/notifications/root/notifications-root.d.ts +0 -10
- package/dist/notifications/root/notifications-root.js +3 -9
- package/dist/number-input/root/number-input-root.js +2 -2
- package/dist/qr-code/root/qr-code-root.d.ts +8 -6
- package/dist/qr-code/root/qr-code-root.js +2 -3
- package/dist/radio/root/radio-root.d.ts +4 -36
- package/dist/radio/root/radio-root.js +2 -27
- package/dist/scatter-chart/root/scatter-chart-root.js +10 -11
- package/dist/select/root/select-root.js +1 -1
- package/dist/slider/root/slider-root.js +1 -1
- package/dist/sparkline/root/sparkline-root.d.ts +6 -0
- package/dist/sparkline/root/sparkline-root.js +10 -12
- package/dist/switch/root/switch-root.js +2 -5
- package/dist/tabs/tab/tab.d.ts +5 -34
- package/dist/tabs/tab/tab.js +3 -28
- package/dist/textarea/root/textarea-root.js +1 -1
- package/dist/time-input/root/time-input-root.js +1 -1
- package/dist/toggle/root/toggle-root.d.ts +4 -40
- package/dist/toggle/root/toggle-root.js +2 -27
- package/dist/tree/item/tree-item.js +2 -2
- package/dist/video/root/video-root.js +7 -14
- package/package.json +5 -5
- package/types/jsx.d.ts +302 -100
- package/types/vue.d.ts +65 -24
package/dist/tabs/tab/tab.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
-
import { type
|
|
2
|
+
import { type TemplateResult } from 'lit';
|
|
3
|
+
declare const HelixHeadlessTab_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinSelectableItemInterface) & typeof HelixElement;
|
|
3
4
|
/**
|
|
4
5
|
* @summary One tab in a tab list.
|
|
5
6
|
*
|
|
@@ -24,39 +25,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
24
25
|
*
|
|
25
26
|
* @cssstate selected - While it is the tab selected.
|
|
26
27
|
*/
|
|
27
|
-
export declare class HelixHeadlessTab extends
|
|
28
|
-
|
|
29
|
-
* Whether the tab can be chosen.
|
|
30
|
-
*/
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Whether this tab is the current one.
|
|
34
|
-
*/
|
|
35
|
-
selected: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Identifies the tab, and pairs it with the panel of the same value.
|
|
38
|
-
*/
|
|
39
|
-
value: string;
|
|
40
|
-
/** Moves focus to this tab, for the list's arrow keys. */
|
|
41
|
-
focusItem(): void;
|
|
42
|
-
/** Selects this tab and announces it. */
|
|
43
|
-
select(): void;
|
|
44
|
-
/**
|
|
45
|
-
* Mirrors the chosen state where a stylesheet can select on it.
|
|
46
|
-
*
|
|
47
|
-
* **A custom state, not a reflected `selected` attribute.** The parent writes
|
|
48
|
-
* this: a listbox choosing a row, a tab strip moving the tab, a radio group
|
|
49
|
-
* answering for its set. Reflected, it puts the element's own bookkeeping onto
|
|
50
|
-
* markup a consumer wrote and a consumer's server never sent, which React
|
|
51
|
-
* reconciles and reports as a mismatch, and which a serialized element pasted
|
|
52
|
-
* back declares as a choice nobody made. `ElementInternals` holds it instead,
|
|
53
|
-
* where it is not in the DOM at all.
|
|
54
|
-
*
|
|
55
|
-
* Reading `selected` is unaffected and so is writing it: the attribute still
|
|
56
|
-
* seeds the property, which is what `<helix-tab selected>` in a consumer's
|
|
57
|
-
* markup means. What stops is the write back.
|
|
58
|
-
*/
|
|
59
|
-
protected willUpdate(changed: PropertyValues): void;
|
|
28
|
+
export declare class HelixHeadlessTab extends HelixHeadlessTab_base {
|
|
29
|
+
protected itemPart: string;
|
|
60
30
|
protected render(): TemplateResult;
|
|
61
31
|
}
|
|
62
32
|
declare global {
|
|
@@ -64,3 +34,4 @@ declare global {
|
|
|
64
34
|
'helix-headless-tab': HelixHeadlessTab;
|
|
65
35
|
}
|
|
66
36
|
}
|
|
37
|
+
export {};
|
package/dist/tabs/tab/tab.js
CHANGED
|
@@ -4,28 +4,12 @@ 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,
|
|
7
|
+
import { customElement, HelixElement, MixinSelectableItem } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html } from 'lit';
|
|
9
|
-
|
|
10
|
-
let HelixHeadlessTab = class HelixHeadlessTab extends HelixElement {
|
|
9
|
+
let HelixHeadlessTab = class HelixHeadlessTab extends MixinSelectableItem(HelixElement) {
|
|
11
10
|
constructor() {
|
|
12
11
|
super(...arguments);
|
|
13
|
-
this.
|
|
14
|
-
this.selected = false;
|
|
15
|
-
this.value = '';
|
|
16
|
-
}
|
|
17
|
-
focusItem() {
|
|
18
|
-
this.partNamed('tab')?.focus();
|
|
19
|
-
}
|
|
20
|
-
select() {
|
|
21
|
-
if (this.disabled) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
this.dispatchEvent(new HelixSelectEvent({ value: this.value }));
|
|
25
|
-
}
|
|
26
|
-
willUpdate(changed) {
|
|
27
|
-
super.willUpdate(changed);
|
|
28
|
-
this.toggleState('selected', this.selected);
|
|
12
|
+
this.itemPart = 'tab';
|
|
29
13
|
}
|
|
30
14
|
render() {
|
|
31
15
|
return html `<button
|
|
@@ -41,15 +25,6 @@ let HelixHeadlessTab = class HelixHeadlessTab extends HelixElement {
|
|
|
41
25
|
</button>`;
|
|
42
26
|
}
|
|
43
27
|
};
|
|
44
|
-
__decorate([
|
|
45
|
-
property({ reflect: true, type: Boolean })
|
|
46
|
-
], HelixHeadlessTab.prototype, "disabled", void 0);
|
|
47
|
-
__decorate([
|
|
48
|
-
property({ type: Boolean })
|
|
49
|
-
], HelixHeadlessTab.prototype, "selected", void 0);
|
|
50
|
-
__decorate([
|
|
51
|
-
property()
|
|
52
|
-
], HelixHeadlessTab.prototype, "value", void 0);
|
|
53
28
|
HelixHeadlessTab = __decorate([
|
|
54
29
|
customElement('helix-headless-tab')
|
|
55
30
|
], HelixHeadlessTab);
|
|
@@ -157,7 +157,7 @@ let HelixHeadlessTextarea = class HelixHeadlessTextarea extends MixinControllerV
|
|
|
157
157
|
<div part="field">
|
|
158
158
|
<textarea
|
|
159
159
|
part="control"
|
|
160
|
-
id
|
|
160
|
+
id=${this.controlId}
|
|
161
161
|
.value=${this.value}
|
|
162
162
|
rows=${this.rows}
|
|
163
163
|
cols=${this.cols ?? nothing}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { HelixElement } from '@fusion.dev/helix-core';
|
|
2
|
-
import { type
|
|
2
|
+
import { type TemplateResult } from 'lit';
|
|
3
|
+
declare const HelixHeadlessToggle_base: (new (...args: any[]) => import("@fusion.dev/helix-core").MixinSelectableItemInterface) & typeof HelixElement;
|
|
3
4
|
/**
|
|
4
5
|
* @summary One option in a toggle group.
|
|
5
6
|
*
|
|
@@ -24,11 +25,7 @@ import { type PropertyValues, type TemplateResult } from 'lit';
|
|
|
24
25
|
*
|
|
25
26
|
* @cssstate selected - While it is on.
|
|
26
27
|
*/
|
|
27
|
-
export declare class HelixHeadlessToggle extends
|
|
28
|
-
/**
|
|
29
|
-
* Whether the item can be chosen.
|
|
30
|
-
*/
|
|
31
|
-
disabled: boolean;
|
|
28
|
+
export declare class HelixHeadlessToggle extends HelixHeadlessToggle_base {
|
|
32
29
|
/**
|
|
33
30
|
* Whether the markup declared this one chosen, which is what a reset returns to.
|
|
34
31
|
*
|
|
@@ -68,40 +65,6 @@ export declare class HelixHeadlessToggle extends HelixElement {
|
|
|
68
65
|
* hydration reports and does not patch up.
|
|
69
66
|
*/
|
|
70
67
|
focusable: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Whether this item is the current one.
|
|
73
|
-
*/
|
|
74
|
-
selected: boolean;
|
|
75
|
-
/**
|
|
76
|
-
* Moves focus to this item's own control.
|
|
77
|
-
*
|
|
78
|
-
* The group drives arrow-key navigation and cannot reach the control itself,
|
|
79
|
-
* which is inside this shadow root. Exposing the intent as a method keeps the
|
|
80
|
-
* group out of the child's internals.
|
|
81
|
-
*/
|
|
82
|
-
focusItem(): void;
|
|
83
|
-
/** Chooses this item and announces it. */
|
|
84
|
-
select(): void;
|
|
85
|
-
/**
|
|
86
|
-
* Identifies the item to the group.
|
|
87
|
-
*/
|
|
88
|
-
value: string;
|
|
89
|
-
/**
|
|
90
|
-
* Mirrors the chosen state where a stylesheet can select on it.
|
|
91
|
-
*
|
|
92
|
-
* **A custom state rather than the `selected` attribute.** The parent writes
|
|
93
|
-
* this: a listbox choosing a row, a tab strip moving the tab, a radio group
|
|
94
|
-
* answering for its set. Reflected, that puts the element's own bookkeeping
|
|
95
|
-
* onto markup a consumer wrote and a consumer's server never sent, which
|
|
96
|
-
* React reconciles and reports as a mismatch, and which a serialized element
|
|
97
|
-
* pasted back declares as a choice nobody made. `ElementInternals` holds it
|
|
98
|
-
* instead, where it is not in the DOM at all.
|
|
99
|
-
*
|
|
100
|
-
* Reading `selected` is unaffected and so is writing it: the attribute still
|
|
101
|
-
* seeds the property, which is what `<helix-toggle selected>` in a consumer's
|
|
102
|
-
* markup means. There is no write back.
|
|
103
|
-
*/
|
|
104
|
-
protected willUpdate(changed: PropertyValues): void;
|
|
105
68
|
protected render(): TemplateResult;
|
|
106
69
|
}
|
|
107
70
|
declare global {
|
|
@@ -109,3 +72,4 @@ declare global {
|
|
|
109
72
|
'helix-headless-toggle': HelixHeadlessToggle;
|
|
110
73
|
}
|
|
111
74
|
}
|
|
75
|
+
export {};
|
|
@@ -4,16 +4,13 @@ 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,
|
|
7
|
+
import { customElement, HelixElement, MixinSelectableItem } from '@fusion.dev/helix-core';
|
|
8
8
|
import { html } from 'lit';
|
|
9
9
|
import { property } from 'lit/decorators.js';
|
|
10
|
-
let HelixHeadlessToggle = class HelixHeadlessToggle extends HelixElement {
|
|
10
|
+
let HelixHeadlessToggle = class HelixHeadlessToggle extends MixinSelectableItem(HelixElement) {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(...arguments);
|
|
13
|
-
this.disabled = false;
|
|
14
13
|
this.focusable = false;
|
|
15
|
-
this.selected = false;
|
|
16
|
-
this.value = '';
|
|
17
14
|
}
|
|
18
15
|
get defaultSelected() {
|
|
19
16
|
return this.hasAttribute('selected');
|
|
@@ -21,19 +18,6 @@ let HelixHeadlessToggle = class HelixHeadlessToggle extends HelixElement {
|
|
|
21
18
|
set defaultSelected(next) {
|
|
22
19
|
this.toggleAttribute('selected', next);
|
|
23
20
|
}
|
|
24
|
-
focusItem() {
|
|
25
|
-
this.partNamed('item')?.focus();
|
|
26
|
-
}
|
|
27
|
-
select() {
|
|
28
|
-
if (this.disabled) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
this.dispatchEvent(new HelixSelectEvent({ value: this.value }));
|
|
32
|
-
}
|
|
33
|
-
willUpdate(changed) {
|
|
34
|
-
super.willUpdate(changed);
|
|
35
|
-
this.toggleState('selected', this.selected);
|
|
36
|
-
}
|
|
37
21
|
render() {
|
|
38
22
|
return html `<button
|
|
39
23
|
part="item"
|
|
@@ -48,18 +32,9 @@ let HelixHeadlessToggle = class HelixHeadlessToggle extends HelixElement {
|
|
|
48
32
|
</button>`;
|
|
49
33
|
}
|
|
50
34
|
};
|
|
51
|
-
__decorate([
|
|
52
|
-
property({ reflect: true, type: Boolean })
|
|
53
|
-
], HelixHeadlessToggle.prototype, "disabled", void 0);
|
|
54
35
|
__decorate([
|
|
55
36
|
property({ attribute: false })
|
|
56
37
|
], HelixHeadlessToggle.prototype, "focusable", void 0);
|
|
57
|
-
__decorate([
|
|
58
|
-
property({ type: Boolean })
|
|
59
|
-
], HelixHeadlessToggle.prototype, "selected", void 0);
|
|
60
|
-
__decorate([
|
|
61
|
-
property()
|
|
62
|
-
], HelixHeadlessToggle.prototype, "value", void 0);
|
|
63
38
|
HelixHeadlessToggle = __decorate([
|
|
64
39
|
customElement('helix-headless-toggle')
|
|
65
40
|
], HelixHeadlessToggle);
|
|
@@ -97,8 +97,8 @@ let HelixHeadlessTreeItem = class HelixHeadlessTreeItem extends MixinControllerO
|
|
|
97
97
|
willUpdate(changed) {
|
|
98
98
|
super.willUpdate(changed);
|
|
99
99
|
this.toggleState('selected', this.selected);
|
|
100
|
-
if (this.
|
|
101
|
-
this.branch =
|
|
100
|
+
if (this.childrenKnown) {
|
|
101
|
+
this.branch = this.knownChildren.some((child) => child.slot === 'children');
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
render() {
|
|
@@ -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 { customElement, drawIcon, HelixElement, HelixNextEvent, HelixPreviousEvent, onUnlessFalse, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, drawIcon, HelixElement, HelixNextEvent, HelixPreviousEvent, onUnlessFalse, writtenList, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { airplay, arrowClockwise, arrowCounterClockwise, closedCaptioning, cornersIn, cornersOut, dotsThreeVertical, download, gauge, pause, pictureInPicture, play, skipBack, skipForward, speakerHigh, speakerX, } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -250,17 +250,11 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
250
250
|
return one === 'speed';
|
|
251
251
|
}
|
|
252
252
|
get extras() {
|
|
253
|
-
return this.extraControls
|
|
254
|
-
.split(/\s+/)
|
|
255
|
-
.filter(Boolean)
|
|
256
|
-
.filter((one) => this.offers(one));
|
|
253
|
+
return writtenList(this.extraControls).filter((one) => this.offers(one));
|
|
257
254
|
}
|
|
258
255
|
get overflow() {
|
|
259
256
|
const onBar = new Set(this.extras);
|
|
260
|
-
return this.overflowControls
|
|
261
|
-
.split(/\s+/)
|
|
262
|
-
.filter(Boolean)
|
|
263
|
-
.filter((one) => !onBar.has(one) && this.offers(one));
|
|
257
|
+
return writtenList(this.overflowControls).filter((one) => !onBar.has(one) && this.offers(one));
|
|
264
258
|
}
|
|
265
259
|
get currentSrc() {
|
|
266
260
|
return this.video?.currentSrc ?? '';
|
|
@@ -398,7 +392,7 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
398
392
|
});
|
|
399
393
|
}
|
|
400
394
|
claimSession() {
|
|
401
|
-
const skips = `${this.extraControls} ${this.overflowControls}
|
|
395
|
+
const skips = writtenList(`${this.extraControls} ${this.overflowControls}`);
|
|
402
396
|
this.session.claim({ artwork: this.poster, title: this.label }, {
|
|
403
397
|
next: skips.includes('next') ? () => this.skip(false) : null,
|
|
404
398
|
previous: skips.includes('previous') ? () => this.skip(true) : null,
|
|
@@ -430,8 +424,7 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
430
424
|
this.dispatchEvent(back ? new HelixPreviousEvent() : new HelixNextEvent());
|
|
431
425
|
}
|
|
432
426
|
cycleSpeed() {
|
|
433
|
-
const speeds = this.speeds
|
|
434
|
-
.split(/\s+/)
|
|
427
|
+
const speeds = writtenList(this.speeds)
|
|
435
428
|
.map(Number)
|
|
436
429
|
.filter((one) => one > 0);
|
|
437
430
|
const video = this.video;
|
|
@@ -456,9 +449,9 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
|
|
|
456
449
|
}
|
|
457
450
|
willUpdate(changed) {
|
|
458
451
|
super.willUpdate(changed);
|
|
459
|
-
if (!this.mediaRead && this.
|
|
452
|
+
if (!this.mediaRead && this.childrenKnown) {
|
|
460
453
|
this.mediaRead = true;
|
|
461
|
-
this.media = this.copiesOf(
|
|
454
|
+
this.media = this.copiesOf(this.knownChildren.filter((child) => child.slot === ''));
|
|
462
455
|
}
|
|
463
456
|
if (changed.has('media')) {
|
|
464
457
|
this.captions = captionsAmong(this.media);
|
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.53.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.53.0",
|
|
50
|
+
"@fusion.dev/helix-icons": "0.53.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.53.0",
|
|
56
|
+
"@fusion.dev/helix-testing": "0.53.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",
|