@fusion.dev/helix-headless 0.241.2 → 0.242.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/api.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/chat/composer/chat-composer.d.ts +8 -1
- package/dist/chat/composer/chat-composer.js +15 -1
- package/dist/chat/message/chat-message.d.ts +12 -0
- package/dist/chat/message/chat-message.js +8 -0
- package/dist/chat/root/chat-root.d.ts +9 -0
- package/dist/chat/root/chat-root.js +13 -1
- package/dist/code-editor/root/code-editor-root.d.ts +1 -0
- package/dist/code-editor/root/code-editor-root.js +1 -1
- package/dist/column-manager/root/column-manager-root.d.ts +30 -2
- package/dist/column-manager/root/column-manager-root.js +73 -9
- package/dist/combobox/root/combobox-root.d.ts +8 -1
- package/dist/combobox/root/combobox-root.js +19 -2
- package/dist/data-table/binding.d.ts +22 -0
- package/dist/data-table/binding.js +52 -7
- package/dist/data-table/root/data-table-root.d.ts +34 -6
- package/dist/data-table/root/data-table-root.js +42 -7
- package/dist/date-input/root/date-input-root.d.ts +8 -1
- package/dist/date-input/root/date-input-root.js +19 -2
- package/dist/date-picker/root/date-picker-root.d.ts +5 -0
- package/dist/date-picker/root/date-picker-root.js +3 -0
- package/dist/editor/root/editor-root.d.ts +1 -0
- package/dist/editor/root/editor-root.js +1 -1
- package/dist/element-events.generated.js +2 -0
- package/dist/file-input/root/file-input-root.d.ts +8 -1
- package/dist/file-input/root/file-input-root.js +19 -2
- package/dist/filter-input/root/filter-input-root.d.ts +8 -1
- package/dist/filter-input/root/filter-input-root.js +13 -1
- package/dist/find/root/find-root.d.ts +1 -0
- package/dist/find/root/find-root.js +4 -4
- package/dist/hover-card/index.d.ts +1 -0
- package/dist/hover-card/index.js +1 -0
- package/dist/hover-card/root/hover-card-root.d.ts +122 -0
- package/dist/hover-card/root/hover-card-root.js +185 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/line-chart/root/line-chart-root.d.ts +7 -1
- package/dist/line-chart/root/line-chart-root.js +6 -0
- package/dist/list/root/list-root.d.ts +12 -1
- package/dist/list/root/list-root.js +11 -1
- package/dist/log/line/log-line.d.ts +11 -0
- package/dist/log/line/log-line.js +8 -0
- package/dist/log/root/log-root.d.ts +9 -0
- package/dist/log/root/log-root.js +13 -1
- package/dist/meter/root/meter-root.d.ts +12 -1
- package/dist/meter/root/meter-root.js +31 -2
- package/dist/navigation/root/navigation-root.d.ts +5 -1
- package/dist/navigation/root/navigation-root.js +13 -1
- package/dist/notifications/root/notifications-root.d.ts +10 -1
- package/dist/notifications/root/notifications-root.js +12 -1
- package/dist/object-inspector/root/object-inspector-root.js +6 -6
- package/dist/pagination/root/pagination-root.d.ts +16 -1
- package/dist/pagination/root/pagination-root.js +19 -1
- package/dist/popover/root/popover-root.d.ts +6 -0
- package/dist/popover/root/popover-root.js +2 -0
- package/dist/progress/root/progress-root.d.ts +11 -1
- package/dist/progress/root/progress-root.js +29 -2
- package/dist/sparkline/root/sparkline-root.d.ts +3 -1
- package/dist/sparkline/root/sparkline-root.js +8 -1
- package/dist/stat/root/stat-root.d.ts +22 -1
- package/dist/stat/root/stat-root.js +27 -4
- package/dist/table/root/table-root.d.ts +22 -5
- package/dist/table/root/table-root.js +13 -1
- package/dist/tabs/root/tabs-root.d.ts +6 -1
- package/dist/tabs/root/tabs-root.js +12 -1
- package/dist/tag/group/tag-group.d.ts +13 -1
- package/dist/tag/group/tag-group.js +12 -1
- package/dist/terminal/root/terminal-root.d.ts +1 -0
- package/dist/terminal/root/terminal-root.js +1 -1
- package/dist/theme-toggle/index.d.ts +1 -0
- package/dist/theme-toggle/index.js +1 -0
- package/dist/theme-toggle/root/theme-toggle-root.d.ts +98 -0
- package/dist/theme-toggle/root/theme-toggle-root.js +68 -0
- package/dist/time-input/root/time-input-root.d.ts +8 -1
- package/dist/time-input/root/time-input-root.js +19 -2
- package/dist/timeline/root/timeline-root.d.ts +10 -1
- package/dist/timeline/root/timeline-root.js +11 -1
- package/dist/toggle/group/toggle-group.d.ts +5 -1
- package/dist/toggle/group/toggle-group.js +12 -2
- package/dist/tree/root/tree-root.d.ts +13 -1
- package/dist/tree/root/tree-root.js +11 -1
- package/dist/trend/root/trend-root.d.ts +14 -1
- package/dist/trend/root/trend-root.js +20 -2
- package/examples.json +1 -1
- package/lint.json +1 -1
- package/package.json +5 -5
- package/types/jsx.d.ts +425 -10
- package/types/svelte.d.ts +2 -0
- package/types/vue.d.ts +249 -8
- package/types/words.d.ts +8 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement, deepContains, elementById, HelixElement, MixinControllerOpen, numberConverter, OpenPhaseController, PopoverController, sideOf, timeConverter, } from '@fusion.dev/helix-core';
|
|
3
|
+
import { css, html } from 'lit';
|
|
4
|
+
import { property, state } from 'lit/decorators.js';
|
|
5
|
+
let HelixHeadlessHoverCard = class HelixHeadlessHoverCard extends MixinControllerOpen(HelixElement) {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.delay = 600;
|
|
9
|
+
this.delayOut = 300;
|
|
10
|
+
this.for = '';
|
|
11
|
+
this.offset = 8;
|
|
12
|
+
this.placement = 'bottom';
|
|
13
|
+
this.holds = new Set();
|
|
14
|
+
this.layer = new PopoverController(this, {
|
|
15
|
+
anchor: () => this.trigger,
|
|
16
|
+
boundary: () => [this, this.trigger],
|
|
17
|
+
hints: 'keep',
|
|
18
|
+
offset: () => this.offset,
|
|
19
|
+
onDismiss: () => {
|
|
20
|
+
this.holds.clear();
|
|
21
|
+
this.hide();
|
|
22
|
+
},
|
|
23
|
+
onPlace: (placement) => {
|
|
24
|
+
const side = sideOf(placement);
|
|
25
|
+
this.toggleState('placed-bottom', side === 'bottom');
|
|
26
|
+
this.toggleState('placed-left', side === 'left');
|
|
27
|
+
this.toggleState('placed-right', side === 'right');
|
|
28
|
+
this.toggleState('placed-top', side === 'top');
|
|
29
|
+
this.side = side;
|
|
30
|
+
},
|
|
31
|
+
placement: () => this.placement,
|
|
32
|
+
surface: () => this.partNamed('surface'),
|
|
33
|
+
});
|
|
34
|
+
this.phases = new OpenPhaseController(this, {
|
|
35
|
+
mark: {
|
|
36
|
+
entering: (on) => this.toggleState('entering', on),
|
|
37
|
+
exiting: (on) => this.toggleState('exiting', on),
|
|
38
|
+
},
|
|
39
|
+
open: () => this.open,
|
|
40
|
+
surface: () => this.partNamed('surface'),
|
|
41
|
+
});
|
|
42
|
+
this.enter = () => {
|
|
43
|
+
this.holds.add('pointer');
|
|
44
|
+
clearTimeout(this.timer);
|
|
45
|
+
if (!this.open) {
|
|
46
|
+
this.timer = setTimeout(() => this.show(), this.delay);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
this.leave = () => {
|
|
50
|
+
this.holds.delete('pointer');
|
|
51
|
+
this.release();
|
|
52
|
+
};
|
|
53
|
+
this.focusIn = (event) => {
|
|
54
|
+
const focused = event.composedPath()[0];
|
|
55
|
+
const inCard = focused instanceof Node && deepContains(this, focused);
|
|
56
|
+
if (!inCard && focused instanceof Element && !focused.matches(':focus-visible')) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
this.holds.add('focus');
|
|
60
|
+
this.show();
|
|
61
|
+
};
|
|
62
|
+
this.focusOut = (event) => {
|
|
63
|
+
const next = event.relatedTarget;
|
|
64
|
+
const trigger = this.trigger;
|
|
65
|
+
if (next instanceof Node &&
|
|
66
|
+
(deepContains(this, next) || (trigger && deepContains(trigger, next)))) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.holds.delete('focus');
|
|
70
|
+
this.release();
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
static { this.styles = css `
|
|
74
|
+
:host {
|
|
75
|
+
display: contents;
|
|
76
|
+
}
|
|
77
|
+
`; }
|
|
78
|
+
get trigger() {
|
|
79
|
+
return this.for === '' ? null : elementById(this, this.for);
|
|
80
|
+
}
|
|
81
|
+
show() {
|
|
82
|
+
clearTimeout(this.timer);
|
|
83
|
+
if (!this.open) {
|
|
84
|
+
this.requestOpen(true);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
hide() {
|
|
88
|
+
clearTimeout(this.timer);
|
|
89
|
+
if (this.open && this.requestOpen(false)) {
|
|
90
|
+
this.layer.hide();
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
release() {
|
|
94
|
+
clearTimeout(this.timer);
|
|
95
|
+
if (this.holds.size === 0) {
|
|
96
|
+
this.timer = setTimeout(() => this.hide(), this.delayOut);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
bind() {
|
|
100
|
+
const trigger = this.trigger;
|
|
101
|
+
if (this.bound === trigger) {
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this.unbind();
|
|
105
|
+
if (!trigger) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
trigger.addEventListener('pointerenter', this.enter);
|
|
109
|
+
trigger.addEventListener('pointerleave', this.leave);
|
|
110
|
+
trigger.addEventListener('focusin', this.focusIn);
|
|
111
|
+
trigger.addEventListener('focusout', this.focusOut);
|
|
112
|
+
this.bound = trigger;
|
|
113
|
+
}
|
|
114
|
+
unbind() {
|
|
115
|
+
this.bound?.removeEventListener('pointerenter', this.enter);
|
|
116
|
+
this.bound?.removeEventListener('pointerleave', this.leave);
|
|
117
|
+
this.bound?.removeEventListener('focusin', this.focusIn);
|
|
118
|
+
this.bound?.removeEventListener('focusout', this.focusOut);
|
|
119
|
+
this.bound = undefined;
|
|
120
|
+
}
|
|
121
|
+
connectedCallback() {
|
|
122
|
+
super.connectedCallback();
|
|
123
|
+
this.addEventListener('focusin', this.focusIn);
|
|
124
|
+
this.addEventListener('focusout', this.focusOut);
|
|
125
|
+
if (this.hasUpdated) {
|
|
126
|
+
this.bind();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
disconnectedCallback() {
|
|
130
|
+
clearTimeout(this.timer);
|
|
131
|
+
this.removeEventListener('focusin', this.focusIn);
|
|
132
|
+
this.removeEventListener('focusout', this.focusOut);
|
|
133
|
+
this.unbind();
|
|
134
|
+
super.disconnectedCallback();
|
|
135
|
+
}
|
|
136
|
+
firstUpdated(changed) {
|
|
137
|
+
super.firstUpdated(changed);
|
|
138
|
+
this.bind();
|
|
139
|
+
}
|
|
140
|
+
updated(changed) {
|
|
141
|
+
super.updated(changed);
|
|
142
|
+
if (changed.has('for')) {
|
|
143
|
+
this.bind();
|
|
144
|
+
}
|
|
145
|
+
if (changed.has('open')) {
|
|
146
|
+
if (this.open) {
|
|
147
|
+
this.layer.show();
|
|
148
|
+
}
|
|
149
|
+
else if (changed.get('open') !== undefined) {
|
|
150
|
+
this.layer.hide();
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
render() {
|
|
155
|
+
const side = this.side;
|
|
156
|
+
return html `<div
|
|
157
|
+
part="surface${side ? { bottom: ' surface-bottom', left: ' surface-left', right: ' surface-right', top: ' surface-top' }[side] : ''}"
|
|
158
|
+
popover="manual"
|
|
159
|
+
@pointerenter=${this.enter}
|
|
160
|
+
@pointerleave=${this.leave}
|
|
161
|
+
><slot></slot></div>`;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
__decorate([
|
|
165
|
+
property({ attribute: 'delay', converter: timeConverter('delay', 600) })
|
|
166
|
+
], HelixHeadlessHoverCard.prototype, "delay", void 0);
|
|
167
|
+
__decorate([
|
|
168
|
+
property({ attribute: 'delay-out', converter: timeConverter('delay-out', 300) })
|
|
169
|
+
], HelixHeadlessHoverCard.prototype, "delayOut", void 0);
|
|
170
|
+
__decorate([
|
|
171
|
+
property()
|
|
172
|
+
], HelixHeadlessHoverCard.prototype, "for", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
property({ converter: numberConverter('offset', 8, 'pixels') })
|
|
175
|
+
], HelixHeadlessHoverCard.prototype, "offset", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
property()
|
|
178
|
+
], HelixHeadlessHoverCard.prototype, "placement", void 0);
|
|
179
|
+
__decorate([
|
|
180
|
+
state()
|
|
181
|
+
], HelixHeadlessHoverCard.prototype, "side", void 0);
|
|
182
|
+
HelixHeadlessHoverCard = __decorate([
|
|
183
|
+
customElement('helix-headless-hover-card')
|
|
184
|
+
], HelixHeadlessHoverCard);
|
|
185
|
+
export { HelixHeadlessHoverCard };
|
package/dist/index.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export * from './find/index.js';
|
|
|
56
56
|
export * from './format-date/index.js';
|
|
57
57
|
export * from './graph/index.js';
|
|
58
58
|
export * from './heatmap/index.js';
|
|
59
|
+
export * from './hover-card/index.js';
|
|
59
60
|
export * from './icon/index.js';
|
|
60
61
|
export * from './icon-button/index.js';
|
|
61
62
|
export * from './image/index.js';
|
|
@@ -116,6 +117,7 @@ export * from './tabs/index.js';
|
|
|
116
117
|
export * from './tag/index.js';
|
|
117
118
|
export * from './terminal/index.js';
|
|
118
119
|
export * from './textarea/index.js';
|
|
120
|
+
export * from './theme-toggle/index.js';
|
|
119
121
|
export * from './time-input/index.js';
|
|
120
122
|
export * from './time-picker/index.js';
|
|
121
123
|
export * from './timeline/index.js';
|
package/dist/index.js
CHANGED
|
@@ -47,6 +47,7 @@ export * from './find/index.js';
|
|
|
47
47
|
export * from './format-date/index.js';
|
|
48
48
|
export * from './graph/index.js';
|
|
49
49
|
export * from './heatmap/index.js';
|
|
50
|
+
export * from './hover-card/index.js';
|
|
50
51
|
export * from './icon/index.js';
|
|
51
52
|
export * from './icon-button/index.js';
|
|
52
53
|
export * from './image/index.js';
|
|
@@ -107,6 +108,7 @@ export * from './tabs/index.js';
|
|
|
107
108
|
export * from './tag/index.js';
|
|
108
109
|
export * from './terminal/index.js';
|
|
109
110
|
export * from './textarea/index.js';
|
|
111
|
+
export * from './theme-toggle/index.js';
|
|
110
112
|
export * from './time-input/index.js';
|
|
111
113
|
export * from './time-picker/index.js';
|
|
112
114
|
export * from './timeline/index.js';
|
|
@@ -109,7 +109,7 @@ declare const HelixHeadlessLineChart_base: typeof HelixElement & (new (...args:
|
|
|
109
109
|
* @csspart svg - The drawing surface the lines and areas sit on.
|
|
110
110
|
* @csspart table - The readings as a table, for a screen reader, rendered only where they were drawn from `data`, a page of them at a time past a few hundred. Hide it visually.
|
|
111
111
|
* @csspart table-pages - Which readings a page of the `table` holds, and the buttons that show the previous and the next page, rendered only while it holds a page. Hide it visually.
|
|
112
|
-
* @csspart terminus - The mark on one series' last reading.
|
|
112
|
+
* @csspart terminus - The mark on one series' last reading. It carries `data-jumped` for the drawing where its line took a new shape at once, with a reading more or fewer, so a stylesheet moving the mark can move it at once too.
|
|
113
113
|
* @csspart tick - One number on the axis, placed with `inset-block-start` at its level.
|
|
114
114
|
* @csspart tooltip-anchor - The `Tooltip` element itself.
|
|
115
115
|
* @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
|
|
@@ -325,6 +325,11 @@ export declare class HelixHeadlessLineChart extends HelixHeadlessLineChart_base
|
|
|
325
325
|
* near the top of the box.
|
|
326
326
|
*/
|
|
327
327
|
zero: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* How many readings each series' line was last drawn with, so a terminus
|
|
330
|
+
* can tell a line that moves to its new shape from one that jumps to it.
|
|
331
|
+
*/
|
|
332
|
+
private readonly drawnCounts;
|
|
328
333
|
/**
|
|
329
334
|
* Where each series ends, as percentages of the drawing's own box.
|
|
330
335
|
*
|
|
@@ -401,6 +406,7 @@ export declare class HelixHeadlessLineChart extends HelixHeadlessLineChart_base
|
|
|
401
406
|
*/
|
|
402
407
|
protected renderTermini(ends: Array<{
|
|
403
408
|
index: number;
|
|
409
|
+
jumped: boolean;
|
|
404
410
|
x: number;
|
|
405
411
|
y: number;
|
|
406
412
|
}>): TemplateResult | typeof nothing;
|
|
@@ -15,6 +15,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
|
|
|
15
15
|
this.slots = new WeakMap();
|
|
16
16
|
this.names = new CategoryAxisController(this);
|
|
17
17
|
this.zero = false;
|
|
18
|
+
this.drawnCounts = new Map();
|
|
18
19
|
}
|
|
19
20
|
static { this.markRules = [MIRROR_RULE]; }
|
|
20
21
|
static { this.words = 'helix-line-chart'; }
|
|
@@ -106,6 +107,9 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
|
|
|
106
107
|
}
|
|
107
108
|
ends(series, x, y) {
|
|
108
109
|
return series.flatMap((one, depth) => {
|
|
110
|
+
const before = this.drawnCounts.get(one.name);
|
|
111
|
+
this.drawnCounts.set(one.name, one.points.length);
|
|
112
|
+
const jumped = before !== undefined && before !== one.points.length;
|
|
109
113
|
const last = one.points.at(-1);
|
|
110
114
|
if (!this.showsSeries(one.name)) {
|
|
111
115
|
return [];
|
|
@@ -116,6 +120,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
|
|
|
116
120
|
return [
|
|
117
121
|
{
|
|
118
122
|
index: seriesIndex(depth),
|
|
123
|
+
jumped,
|
|
119
124
|
x: (x(last.at) / PLOT_WIDTH) * 100,
|
|
120
125
|
y: (y(last.value) / PLOT_HEIGHT) * 100,
|
|
121
126
|
},
|
|
@@ -229,6 +234,7 @@ let HelixHeadlessLineChart = class HelixHeadlessLineChart extends MixinChartStat
|
|
|
229
234
|
}
|
|
230
235
|
return html `${ends.map((end) => html `<span
|
|
231
236
|
aria-hidden="true"
|
|
237
|
+
?data-jumped=${end.jumped}
|
|
232
238
|
part="terminus"
|
|
233
239
|
style=${`--chart-series: var(--chart-series-${end.index}); --chart-terminus-x: ${end.x}%; --chart-terminus-y: ${end.y}%`}
|
|
234
240
|
></span>`)}`;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HelixElement, KeyboardNavigationController, UpgradeController } from '@fusion.dev/helix-core';
|
|
1
|
+
import { HelixElement, KeyboardNavigationController, LayoutMotionController, UpgradeController } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import { HelixHeadlessListItem } from '../item/list-item.js';
|
|
4
4
|
import { type ListSelectionBehavior, type ListSelectionMode } from '../selection.js';
|
|
@@ -65,6 +65,13 @@ import { type ListSelectionBehavior, type ListSelectionMode } from '../selection
|
|
|
65
65
|
* | Space, Enter | Drops the row. |
|
|
66
66
|
* | Escape | Puts the row back where it was. |
|
|
67
67
|
*
|
|
68
|
+
* **Rows slide to their places.** When you sort, add, remove or hide rows,
|
|
69
|
+
* each one moves from where it was drawn to where it is now, and a row you
|
|
70
|
+
* add fades in. The list times it from `--list-move-duration` and
|
|
71
|
+
* `--list-move-easing`, which the styled tier sets from the duration and
|
|
72
|
+
* easing tokens. Here neither is set, so nothing moves until you set them.
|
|
73
|
+
* Under reduced motion nothing moves, whatever they say.
|
|
74
|
+
*
|
|
68
75
|
* `start` and `reversed` number an ordered list as `<ol>` does. The list
|
|
69
76
|
* writes where the numbers start and which way they run as `--list-first` and
|
|
70
77
|
* `--list-step` on its slot, which the styled tier counts from. Reversed with
|
|
@@ -113,6 +120,8 @@ import { type ListSelectionBehavior, type ListSelectionMode } from '../selection
|
|
|
113
120
|
* @csspart loading - The row after the last while `loading` is set. A grid row with one cell in a list that selects.
|
|
114
121
|
*
|
|
115
122
|
* @cssproperty --list-first - The number of the first row, written where `start` or `reversed` moves it.
|
|
123
|
+
* @cssproperty --list-move-duration - How long a row takes to slide to its new place, or to fade in. Unset, nothing moves.
|
|
124
|
+
* @cssproperty --list-move-easing - The curve a row slides and fades in along.
|
|
116
125
|
* @cssproperty --list-step - What each row adds to the number before it: `1`, or `-1` where `reversed`.
|
|
117
126
|
*
|
|
118
127
|
* @cssstate empty - While the list has no rows.
|
|
@@ -304,6 +313,8 @@ export declare class HelixHeadlessList extends HelixElement {
|
|
|
304
313
|
* page's, so a drop asks the page to move them.
|
|
305
314
|
*/
|
|
306
315
|
private readonly reorder;
|
|
316
|
+
/** Sliding each row to its new place when the page sorts, adds, removes or hides rows. */
|
|
317
|
+
protected readonly motion: LayoutMotionController;
|
|
307
318
|
/** Whether the list is a grid a reader moves through. */
|
|
308
319
|
private get interactive();
|
|
309
320
|
/** The rows the list holds, in order. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { auditName, commaList, customElement, deepActiveElement, drawStatus, focusItemOf, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, inlineStep, inRowOrder, internalsOf, KeyboardNavigationController, numberConverter, placeKey, pressedOwnControl, ReorderController, requestReorder, requestValue, rovingStop, StatusController, scrollingAncestor, scrollRoom, selectsAll, typeaheadByWords, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
|
|
2
|
+
import { auditName, commaList, customElement, deepActiveElement, drawStatus, focusItemOf, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, inlineStep, inRowOrder, internalsOf, KeyboardNavigationController, LayoutMotionController, numberConverter, placeKey, pressedOwnControl, ReorderController, requestReorder, requestValue, rovingStop, StatusController, scrollingAncestor, scrollRoom, selectsAll, typeaheadByWords, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
|
|
3
3
|
import { html, nothing } from 'lit';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
5
|
import { HelixActionEvent } from '../events/index.js';
|
|
@@ -59,6 +59,16 @@ let HelixHeadlessList = class HelixHeadlessList extends HelixElement {
|
|
|
59
59
|
return first ? scrollingAncestor(first, { axis: 'y', overflowing: true }) : null;
|
|
60
60
|
},
|
|
61
61
|
});
|
|
62
|
+
this.motion = new LayoutMotionController(this, {
|
|
63
|
+
items: () => this.rows,
|
|
64
|
+
timing: () => {
|
|
65
|
+
const style = getComputedStyle(this);
|
|
66
|
+
return {
|
|
67
|
+
duration: style.getPropertyValue('--list-move-duration'),
|
|
68
|
+
easing: style.getPropertyValue('--list-move-easing'),
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
});
|
|
62
72
|
this.rowsChanged = false;
|
|
63
73
|
this.handleKeyCapture = (event) => {
|
|
64
74
|
this.moving = { extend: event.shiftKey, toggle: event.ctrlKey || event.metaKey };
|
|
@@ -47,9 +47,20 @@ export type LogTimes = 'absolute' | 'relative';
|
|
|
47
47
|
* @cssproperty --log-run-background-color - Written on a `run` with a background, in the same form as `--log-run-color`.
|
|
48
48
|
* @cssproperty --log-run-color - Written on a `run` with a text color: one of the sixteen `--log-ansi-*` colors the log publishes, or the color itself.
|
|
49
49
|
*
|
|
50
|
+
* @cssstate arriving - The line was written at the end of a log already drawn.
|
|
50
51
|
* @cssstate filtered - The log's `query` does not match the line, or its `level` is quieter than the log shows, so it draws nothing.
|
|
51
52
|
*/
|
|
52
53
|
export declare class HelixHeadlessLogLine extends HelixElement {
|
|
54
|
+
/**
|
|
55
|
+
* **Arriving, where it joins the end of a log already drawn**:
|
|
56
|
+
* `:state(arriving)`, which a stylesheet can bring it in by. Not where it
|
|
57
|
+
* was there as the log first drew, which is what the page came with, not
|
|
58
|
+
* history loaded above, and not inside a log that draws its lines from
|
|
59
|
+
* data, which marks its own.
|
|
60
|
+
*/
|
|
61
|
+
connectedCallback(): void;
|
|
62
|
+
/** Whether it joined one already drawn, as `:state(arriving)` says, for the tier above to bring it in by. */
|
|
63
|
+
protected arriving: boolean;
|
|
53
64
|
/** The key this family's words are registered under, its styled tag. */
|
|
54
65
|
static words: string;
|
|
55
66
|
/** When the line was written: milliseconds since the epoch, or anything `Date` parses. */
|
|
@@ -15,6 +15,7 @@ const elapsed = (seconds) => {
|
|
|
15
15
|
let HelixHeadlessLogLine = class HelixHeadlessLogLine extends HelixElement {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
|
+
this.arriving = false;
|
|
18
19
|
this.at = '';
|
|
19
20
|
this.levelWords = {
|
|
20
21
|
debug: 'Debug:',
|
|
@@ -45,6 +46,13 @@ let HelixHeadlessLogLine = class HelixHeadlessLogLine extends HelixElement {
|
|
|
45
46
|
}
|
|
46
47
|
};
|
|
47
48
|
}
|
|
49
|
+
connectedCallback() {
|
|
50
|
+
super.connectedCallback();
|
|
51
|
+
const parent = this.parentElement;
|
|
52
|
+
const later = (one) => one !== null && (one.localName === this.localName || later(one.nextElementSibling));
|
|
53
|
+
this.arriving = parent?.hasUpdated === true && !later(this.nextElementSibling);
|
|
54
|
+
this.toggleState('arriving', this.arriving);
|
|
55
|
+
}
|
|
48
56
|
static { this.words = 'helix-log'; }
|
|
49
57
|
willUpdate(changed) {
|
|
50
58
|
super.willUpdate(changed);
|
|
@@ -552,6 +552,15 @@ export declare class HelixHeadlessLog extends HelixHeadlessLog_base {
|
|
|
552
552
|
private get digits();
|
|
553
553
|
/** The rows drawn from data, a window of them, between the room the rest would take. */
|
|
554
554
|
private renderRows;
|
|
555
|
+
/** The highest line number drawn at the last render, to tell a line written since. */
|
|
556
|
+
private lastLine;
|
|
557
|
+
/**
|
|
558
|
+
* The line number after which the lines are new this render, or none: a
|
|
559
|
+
* line written since the last render, not one scrolled back into view.
|
|
560
|
+
* Those take `data-arriving` for this render, which a stylesheet can bring
|
|
561
|
+
* them in by.
|
|
562
|
+
*/
|
|
563
|
+
private arrivingAfter;
|
|
555
564
|
/**
|
|
556
565
|
* The `resume` slot, with the way back drawn where nothing is slotted, behind
|
|
557
566
|
* a seam: the slot answers a page, and this answers the tier above.
|
|
@@ -858,10 +858,22 @@ let HelixHeadlessLog = class HelixHeadlessLog extends MixinCollection(HelixEleme
|
|
|
858
858
|
.slice(first, last)
|
|
859
859
|
.flatMap((row) => (row.kind === 'line' ? [row.number] : []));
|
|
860
860
|
const stop = this.interactive ? this.stopAmong(drawn) : 0;
|
|
861
|
+
const arriving = this.arrivingAfter();
|
|
861
862
|
return html `<div part="before" role="presentation" style="block-size: ${before}px; flex: none"></div>
|
|
862
|
-
${repeat(this.view.rows.slice(first, last), (row) => (row.kind === 'group' ? `group:${row.group.id}` : `line:${row.number}`), (row, offset) => html `<div part="row" data-index=${first + offset}>${this.renderRow(row, marks, start, stop)}</div>`)}
|
|
863
|
+
${repeat(this.view.rows.slice(first, last), (row) => (row.kind === 'group' ? `group:${row.group.id}` : `line:${row.number}`), (row, offset) => html `<div part="row" data-index=${first + offset} ?data-arriving=${row.kind === 'line' && row.number > arriving}>${this.renderRow(row, marks, start, stop)}</div>`)}
|
|
863
864
|
<div part="after" role="presentation" style="block-size: ${after}px; flex: none"></div>`;
|
|
864
865
|
}
|
|
866
|
+
arrivingAfter() {
|
|
867
|
+
let highest = 0;
|
|
868
|
+
for (const row of this.view.rows) {
|
|
869
|
+
if (row.kind === 'line' && row.number > highest) {
|
|
870
|
+
highest = row.number;
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
const was = this.lastLine;
|
|
874
|
+
this.lastLine = highest;
|
|
875
|
+
return this.hasUpdated && was !== undefined && was > 0 ? was : Number.POSITIVE_INFINITY;
|
|
876
|
+
}
|
|
865
877
|
renderResume() {
|
|
866
878
|
return html `<slot name="resume"
|
|
867
879
|
><button part="resume-button" type="button">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HelixElement } from '@fusion.dev/helix-core';
|
|
1
|
+
import { CountController, HelixElement } from '@fusion.dev/helix-core';
|
|
2
2
|
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
/** Which band a value falls in, once `optimum` has said which end is good. */
|
|
4
4
|
export type MeterBand = 'fair' | 'good' | 'poor';
|
|
@@ -52,6 +52,8 @@ export type MeterBand = 'fair' | 'good' | 'poor';
|
|
|
52
52
|
*
|
|
53
53
|
* @cssproperty --meter-along - Where a bound sits on the arc, as a length along it.
|
|
54
54
|
* @cssproperty --meter-at - Where a bound sits on a linear track, as a percentage.
|
|
55
|
+
* @cssproperty --meter-count-duration - How long the number shown under `show-value` takes to count to a new value. Unset, it changes at once.
|
|
56
|
+
* @cssproperty --meter-count-easing - The curve the number shown counts along.
|
|
55
57
|
* @cssproperty --meter-fraction - The value as a fraction of the range, 0 to 1.
|
|
56
58
|
* @cssproperty --meter-span - How much the range holds, `max` less `min`, which a segment divides its own value by to find its width.
|
|
57
59
|
* @cssproperty --meter-sweep - How much of the circle the arc covers, as a path length.
|
|
@@ -63,6 +65,7 @@ export type MeterBand = 'fair' | 'good' | 'poor';
|
|
|
63
65
|
* @cssstate under - The value is below `min`.
|
|
64
66
|
*/
|
|
65
67
|
export declare class HelixHeadlessMeter extends HelixElement {
|
|
68
|
+
protected static markRules: string[];
|
|
66
69
|
/**
|
|
67
70
|
* The key this family's words are registered under, its styled tag:
|
|
68
71
|
* `registerWords('de', { 'helix-meter': { liveLabel: '{reading}, {band}' } })`.
|
|
@@ -286,6 +289,14 @@ export declare class HelixHeadlessMeter extends HelixElement {
|
|
|
286
289
|
* keeps an unbanded meter from being painted as good news.
|
|
287
290
|
*/
|
|
288
291
|
private get computedBand();
|
|
292
|
+
/**
|
|
293
|
+
* Counting the number shown under `show-value` from the one before, so it
|
|
294
|
+
* keeps pace with the fill. While it counts, the passing numbers are hidden
|
|
295
|
+
* from screen readers and the new reading is read in their place.
|
|
296
|
+
*/
|
|
297
|
+
protected readonly count: CountController;
|
|
298
|
+
/** The number drawn while a count runs. */
|
|
299
|
+
private get countingText();
|
|
289
300
|
/**
|
|
290
301
|
* What the reading says: the consumer's words, or the reading in
|
|
291
302
|
* `format-options`, a share of the range for a percent and the value for
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { auditName, customElement, drawStatus, formatWords, HelixElement, hostAria, internalsOf, numberConverter, readingText, StatusController, slottedWords, words, wordsConverter, wordsLocale, } from '@fusion.dev/helix-core';
|
|
2
|
+
import { auditName, CountController, customElement, drawStatus, formatWords, HelixElement, hostAria, internalsOf, numberConverter, readingText, SPOKEN_RULE, StatusController, slottedWords, words, wordsConverter, wordsLocale, } from '@fusion.dev/helix-core';
|
|
3
3
|
import { html, nothing, svg } from 'lit';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
5
|
import { HelixBandEvent } from '../events/index.js';
|
|
@@ -17,10 +17,20 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
|
17
17
|
this.value = 0;
|
|
18
18
|
this.valueText = '';
|
|
19
19
|
this.status = new StatusController(this);
|
|
20
|
+
this.count = new CountController(this, {
|
|
21
|
+
timing: () => {
|
|
22
|
+
const style = getComputedStyle(this);
|
|
23
|
+
return {
|
|
24
|
+
duration: style.getPropertyValue('--meter-count-duration'),
|
|
25
|
+
easing: style.getPropertyValue('--meter-count-easing'),
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
});
|
|
20
29
|
this.renamed = () => {
|
|
21
30
|
this.requestUpdate();
|
|
22
31
|
};
|
|
23
32
|
}
|
|
33
|
+
static { this.markRules = [SPOKEN_RULE]; }
|
|
24
34
|
static { this.words = 'helix-meter'; }
|
|
25
35
|
get segments() {
|
|
26
36
|
return this.knownChildren.filter((child) => child.localName.endsWith('meter-segment'));
|
|
@@ -81,12 +91,25 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
|
81
91
|
const distance = Math.abs(which(this.reading) - which(optimum));
|
|
82
92
|
return distance === 0 ? 'good' : distance === 1 ? 'fair' : 'poor';
|
|
83
93
|
}
|
|
94
|
+
get countingText() {
|
|
95
|
+
const { max, min } = this.span;
|
|
96
|
+
const counting = this.count.counting ?? this.amount;
|
|
97
|
+
return readingText(counting, (counting - min) / (max - min), wordsLocale(this), this.formatOptions);
|
|
98
|
+
}
|
|
84
99
|
get text() {
|
|
85
100
|
return (this.valueText ||
|
|
86
101
|
readingText(Number.isFinite(this.amount) ? this.amount : this.span.min, this.ratio, wordsLocale(this), this.formatOptions));
|
|
87
102
|
}
|
|
88
103
|
willUpdate(changed) {
|
|
89
104
|
super.willUpdate(changed);
|
|
105
|
+
const was = changed.get('value');
|
|
106
|
+
if (changed.has('value') &&
|
|
107
|
+
this.hasUpdated &&
|
|
108
|
+
was !== undefined &&
|
|
109
|
+
this.showValue &&
|
|
110
|
+
!this.valueText) {
|
|
111
|
+
this.count.start(was, this.value);
|
|
112
|
+
}
|
|
90
113
|
const { max, min } = this.span;
|
|
91
114
|
hostAria(internalsOf(this), {
|
|
92
115
|
label: slottedWords(this, ['label']) || this.label,
|
|
@@ -170,7 +193,13 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
|
|
|
170
193
|
style="--meter-fraction: ${this.fraction}"
|
|
171
194
|
></div>`}
|
|
172
195
|
</div>`}
|
|
173
|
-
${this.showValue
|
|
196
|
+
${this.showValue
|
|
197
|
+
? this.count.counting === undefined
|
|
198
|
+
? html `<span part="value">${this.text}</span>`
|
|
199
|
+
: html `<span part="value" aria-hidden="true">${this.countingText}</span><span data-spoken
|
|
200
|
+
>${this.text}</span
|
|
201
|
+
>`
|
|
202
|
+
: nothing}${drawStatus(this.status)}`;
|
|
174
203
|
}
|
|
175
204
|
};
|
|
176
205
|
__decorate([
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AriaForwardController, HelixElement, KeyboardNavigationController } from '@fusion.dev/helix-core';
|
|
1
|
+
import { AriaForwardController, HelixElement, HoverMarkController, KeyboardNavigationController } from '@fusion.dev/helix-core';
|
|
2
2
|
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import '../../menu/index.js';
|
|
4
4
|
/**
|
|
@@ -73,6 +73,7 @@ import '../../menu/index.js';
|
|
|
73
73
|
* @slot menu-icon - Replaces the glyph on the overflow button where it is too narrow for words.
|
|
74
74
|
* @slot more-icon - Replaces the caret on the button that opens the overflow menu.
|
|
75
75
|
*
|
|
76
|
+
* @csspart highlight - The wash under the pointer, which glides from destination to destination while a mouse or pen moves along them. It carries the destination's place and size as the indicator does, `data-placed` while it is over one, and `data-gliding` from the frame after it arrives. Hidden until a stylesheet shows it, so the headless tier lays out as it did without it.
|
|
76
77
|
* @csspart indicator - The marker that moves to the current destination. It carries the destination's place and size as `--indicator-x`, `--indicator-y`, `--indicator-inline-size` and `--indicator-block-size`, and `data-placed` once it has been placed.
|
|
77
78
|
* @csspart more - The button that opens the overflow menu, drawn after the last destination on the row while any has folded.
|
|
78
79
|
* @csspart more-current - The current destination's name on the button, while every destination has folded.
|
|
@@ -102,6 +103,7 @@ import '../../menu/index.js';
|
|
|
102
103
|
* @csspart overflow-title - The name of the submenu that is showing.
|
|
103
104
|
*
|
|
104
105
|
* @cssstate folded - While any destination has folded into the overflow menu.
|
|
106
|
+
* @cssstate gliding - While a mouse or pen is over a destination, so the highlight draws the hover wash in place of each destination's own.
|
|
105
107
|
* @cssstate open - While a megamenu or another disclosure among the destinations is open.
|
|
106
108
|
*/
|
|
107
109
|
export declare class HelixHeadlessNavigation extends HelixElement {
|
|
@@ -111,6 +113,8 @@ export declare class HelixHeadlessNavigation extends HelixElement {
|
|
|
111
113
|
*/
|
|
112
114
|
static words: string;
|
|
113
115
|
private readonly indicator;
|
|
116
|
+
/** Moves the hover wash to whichever destination is under the pointer. */
|
|
117
|
+
protected readonly highlight: HoverMarkController;
|
|
114
118
|
/**
|
|
115
119
|
* Whether the arrow keys move focus between the destinations.
|
|
116
120
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { AriaForwardController, customElement, focusableElements, focusItemOf, formatWords, HelixElement, IndicatorController, insideBox, KeyboardNavigationController, OverflowController, reportRuntime, untilReactHydrated, words, } from '@fusion.dev/helix-core';
|
|
2
|
+
import { AriaForwardController, customElement, focusableElements, focusItemOf, formatWords, HelixElement, HoverMarkController, IndicatorController, insideBox, KeyboardNavigationController, OverflowController, reportRuntime, untilReactHydrated, words, } from '@fusion.dev/helix-core';
|
|
3
3
|
import { caretDown, list } from '@fusion.dev/helix-icons';
|
|
4
4
|
import { nothing } from 'lit';
|
|
5
5
|
import { property } from 'lit/decorators.js';
|
|
@@ -50,6 +50,17 @@ let HelixHeadlessNavigation = class HelixHeadlessNavigation extends HelixElement
|
|
|
50
50
|
observe: () => [...this.items, ...[this.partNamed('more')].filter((one) => one !== null)],
|
|
51
51
|
surface: () => this.partNamed('nav'),
|
|
52
52
|
});
|
|
53
|
+
this.highlight = new HoverMarkController(this, {
|
|
54
|
+
gliding: (on) => this.toggleState('gliding', on),
|
|
55
|
+
item: (under) => {
|
|
56
|
+
const more = this.partNamed('more');
|
|
57
|
+
const items = this.items;
|
|
58
|
+
return under.find((one) => one instanceof HTMLElement && (one === more || items.includes(one)));
|
|
59
|
+
},
|
|
60
|
+
mark: () => this.partNamed('highlight'),
|
|
61
|
+
observe: () => this.items,
|
|
62
|
+
surface: () => this.partNamed('nav'),
|
|
63
|
+
});
|
|
53
64
|
this.arrows = false;
|
|
54
65
|
this.currentLabel = '{name}, more destinations';
|
|
55
66
|
this.fallbackLabel = 'Main';
|
|
@@ -336,6 +347,7 @@ let HelixHeadlessNavigation = class HelixHeadlessNavigation extends HelixElement
|
|
|
336
347
|
}
|
|
337
348
|
render() {
|
|
338
349
|
return html `<nav part="nav" aria-label=${this.label || this.fallbackLabel}>
|
|
350
|
+
<div part="highlight" aria-hidden="true" hidden></div>
|
|
339
351
|
<div part="indicator" aria-hidden="true"><slot name="indicator"></slot></div>
|
|
340
352
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
341
353
|
${this.renderOverflow()}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChildrenController, HelixElement, UpgradeController } from '@fusion.dev/helix-core';
|
|
1
|
+
import { ChildrenController, HelixElement, LayoutMotionController, UpgradeController } from '@fusion.dev/helix-core';
|
|
2
2
|
import { nothing, type PropertyValues, type TemplateResult } from 'lit';
|
|
3
3
|
import type { HelixHeadlessNotificationGroup } from '../group/notification-group.js';
|
|
4
4
|
import type { HelixHeadlessNotification } from '../notification/notification.js';
|
|
@@ -86,6 +86,9 @@ declare const HelixHeadlessNotifications_base: (new (...args: any[]) => import("
|
|
|
86
86
|
* @csspart mark-all - The control that marks everything read.
|
|
87
87
|
* @csspart more - The button after the list that asks for more, while `load-more` is set. It is `aria-disabled` while the feed is loading.
|
|
88
88
|
*
|
|
89
|
+
* @cssproperty --notifications-move-duration - How long a row or a group takes to slide to its new place when one before it arrives or goes, or to fade in. Unset, nothing moves.
|
|
90
|
+
* @cssproperty --notifications-move-easing - The curve a row slides and fades in along.
|
|
91
|
+
*
|
|
89
92
|
* @cssstate empty - While the feed holds no notification and is not loading, and `error-text` is not set. Never on the server, which cannot count the rows.
|
|
90
93
|
* @cssstate error - While `error-text` is set.
|
|
91
94
|
* @cssstate loading - While `loading` is set.
|
|
@@ -197,6 +200,12 @@ export declare class HelixHeadlessNotifications extends HelixHeadlessNotificatio
|
|
|
197
200
|
* feed a flat list again.
|
|
198
201
|
*/
|
|
199
202
|
get rows(): Element[];
|
|
203
|
+
/**
|
|
204
|
+
* Slides the rows and groups to their places when one arrives or goes, and
|
|
205
|
+
* fades in a row that arrives, as `List` does, timed from
|
|
206
|
+
* `--notifications-move-duration` and `--notifications-move-easing`.
|
|
207
|
+
*/
|
|
208
|
+
protected readonly motion: LayoutMotionController;
|
|
200
209
|
/**
|
|
201
210
|
* The groups written into the feed, in the order they are written.
|
|
202
211
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { assignSlots, ChildrenController, customElement, DelayController, deepContains, focusableElements, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, internalsOf, MixinCollection, markRegion, numberConverter, rovingStop, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
|
|
2
|
+
import { assignSlots, ChildrenController, customElement, DelayController, deepContains, focusableElements, formatWords, HelixElement, HelixLoadMoreEvent, hostAria, internalsOf, LayoutMotionController, MixinCollection, markRegion, numberConverter, rovingStop, UpgradeController, whenHydrated, words, } from '@fusion.dev/helix-core';
|
|
3
3
|
import { html, nothing } from 'lit';
|
|
4
4
|
import { property } from 'lit/decorators.js';
|
|
5
5
|
import { HelixBeforeReadEvent, HelixReadEvent } from '../events/index.js';
|
|
@@ -15,6 +15,17 @@ let HelixHeadlessNotifications = class HelixHeadlessNotifications extends MixinC
|
|
|
15
15
|
this.loadMoreLabel = 'Load more';
|
|
16
16
|
this.markAll = false;
|
|
17
17
|
this.markAllLabel = 'Mark all as read';
|
|
18
|
+
this.motion = new LayoutMotionController(this, {
|
|
19
|
+
items: () => this.rows.filter((row) => row instanceof HTMLElement),
|
|
20
|
+
leaving: () => this.partNamed('list'),
|
|
21
|
+
timing: () => {
|
|
22
|
+
const style = getComputedStyle(this);
|
|
23
|
+
return {
|
|
24
|
+
duration: style.getPropertyValue('--notifications-move-duration'),
|
|
25
|
+
easing: style.getPropertyValue('--notifications-move-easing'),
|
|
26
|
+
};
|
|
27
|
+
},
|
|
28
|
+
});
|
|
18
29
|
this.handleSlotChange = () => {
|
|
19
30
|
this.assign();
|
|
20
31
|
this.requestUpdate();
|