@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
|
@@ -66,22 +66,6 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
66
66
|
* Whether the carousel advances on its own.
|
|
67
67
|
*/
|
|
68
68
|
autoplay: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* The slide in view, counted from zero.
|
|
71
|
-
*
|
|
72
|
-
* Reading gives the real slide. Writing always applies, the way a script
|
|
73
|
-
* assigning to a native control does, and is a seed and a correction rather
|
|
74
|
-
* than a claim of ownership: a consumer who wants the decision refuses the
|
|
75
|
-
* `helix-select`. `default-index` is where the carousel starts until
|
|
76
|
-
* something moves it.
|
|
77
|
-
*
|
|
78
|
-
* The same contract the four mixins carry, written out here rather than
|
|
79
|
-
* extracted, because a slide is addressed by position and every one of those
|
|
80
|
-
* mixins is keyed by a name. One consumer is not a mixin: if a second numeric
|
|
81
|
-
* state turns up, this is what it is extracted from.
|
|
82
|
-
*/
|
|
83
|
-
get index(): number;
|
|
84
|
-
set index(next: number);
|
|
85
69
|
/**
|
|
86
70
|
* Whether the previous and next controls are shown.
|
|
87
71
|
*
|
|
@@ -112,6 +96,34 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
112
96
|
* Slide to start on, where nothing declared one.
|
|
113
97
|
*/
|
|
114
98
|
defaultIndex: number;
|
|
99
|
+
/**
|
|
100
|
+
* The slide in view, counted from zero.
|
|
101
|
+
*
|
|
102
|
+
* Reading gives the real slide. Writing always applies, the way a script
|
|
103
|
+
* assigning to a native control does, and is a seed and a correction rather
|
|
104
|
+
* than a claim of ownership: a consumer who wants the decision refuses the
|
|
105
|
+
* `helix-select`. `default-index` is where the carousel starts until
|
|
106
|
+
* something moves it.
|
|
107
|
+
*
|
|
108
|
+
* The same contract the four mixins carry, written out here rather than
|
|
109
|
+
* extracted, because a slide is addressed by position and every one of those
|
|
110
|
+
* mixins is keyed by a name. One consumer is not a mixin: if a second numeric
|
|
111
|
+
* state turns up, this is what it is extracted from.
|
|
112
|
+
*/
|
|
113
|
+
get index(): number;
|
|
114
|
+
set index(next: number);
|
|
115
|
+
/**
|
|
116
|
+
* What one indicator is called, with `{index}` filled in.
|
|
117
|
+
*
|
|
118
|
+
* **Every word the carousel speaks is a property**, so a page in another
|
|
119
|
+
* language hears its own: only `label` was, and the controls around it
|
|
120
|
+
* read out in English.
|
|
121
|
+
*/
|
|
122
|
+
indicatorLabel: string;
|
|
123
|
+
/**
|
|
124
|
+
* What the row of indicators is called, with the carousel's `{label}` filled in.
|
|
125
|
+
*/
|
|
126
|
+
indicatorsLabel: string;
|
|
115
127
|
/**
|
|
116
128
|
* How long each slide is held, in milliseconds.
|
|
117
129
|
*/
|
|
@@ -128,6 +140,10 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
128
140
|
* Whether moving past either end wraps to the other.
|
|
129
141
|
*/
|
|
130
142
|
loop: boolean;
|
|
143
|
+
/**
|
|
144
|
+
* What the control that moves forward is called.
|
|
145
|
+
*/
|
|
146
|
+
nextLabel: string;
|
|
131
147
|
/**
|
|
132
148
|
* Which way the track runs.
|
|
133
149
|
*
|
|
@@ -212,6 +228,27 @@ export declare class HelixHeadlessCarousel extends HelixElement {
|
|
|
212
228
|
* case is the absent attribute, and the styles read it that way.
|
|
213
229
|
*/
|
|
214
230
|
perView?: number | 'auto';
|
|
231
|
+
/**
|
|
232
|
+
* What the control that moves back is called.
|
|
233
|
+
*/
|
|
234
|
+
previousLabel: string;
|
|
235
|
+
/**
|
|
236
|
+
* What each slide is called, with `{index}` and `{count}` filled in.
|
|
237
|
+
*/
|
|
238
|
+
slideLabel: string;
|
|
239
|
+
/**
|
|
240
|
+
* What a slide is, read out in place of its role: `aria-roledescription`,
|
|
241
|
+
* which is a word a reader hears and so a word to translate.
|
|
242
|
+
*/
|
|
243
|
+
slideRoleLabel: string;
|
|
244
|
+
/**
|
|
245
|
+
* What the rotation control is called while it would start rotation.
|
|
246
|
+
*/
|
|
247
|
+
startLabel: string;
|
|
248
|
+
/**
|
|
249
|
+
* And while it would stop it.
|
|
250
|
+
*/
|
|
251
|
+
stopLabel: string;
|
|
215
252
|
/**
|
|
216
253
|
* A declared `perView` as both tiers use it: a whole number, one at least.
|
|
217
254
|
*
|
|
@@ -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, HelixElement, HelixSelectEvent, hostAria, inlineStep, isRtl, requestChange, } from '@fusion.dev/helix-core';
|
|
7
|
+
import { customElement, fillTemplate, HelixElement, HelixSelectEvent, hostAria, inlineStep, isRtl, requestChange, } from '@fusion.dev/helix-core';
|
|
8
8
|
import { caretLeft, caretRight, play, stop } from '@fusion.dev/helix-icons';
|
|
9
9
|
import { html, nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
@@ -23,12 +23,20 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
23
23
|
super(...arguments);
|
|
24
24
|
this.autoplay = false;
|
|
25
25
|
this.defaultIndex = 0;
|
|
26
|
+
this.indicatorLabel = 'Slide {index}';
|
|
27
|
+
this.indicatorsLabel = '{label} slides';
|
|
26
28
|
this.interval = 5000;
|
|
27
29
|
this.indexState = undefined;
|
|
28
30
|
this.scrolledFor = 0;
|
|
29
31
|
this.label = 'Carousel';
|
|
30
32
|
this.loop = false;
|
|
33
|
+
this.nextLabel = 'Next slide';
|
|
31
34
|
this.rotating = false;
|
|
35
|
+
this.previousLabel = 'Previous slide';
|
|
36
|
+
this.slideLabel = '{index} of {count}';
|
|
37
|
+
this.slideRoleLabel = 'slide';
|
|
38
|
+
this.startLabel = 'Start slide rotation';
|
|
39
|
+
this.stopLabel = 'Stop slide rotation';
|
|
32
40
|
this.readFit = () => {
|
|
33
41
|
const fitted = this.measure();
|
|
34
42
|
if (fitted === undefined || fitted === this.fitted) {
|
|
@@ -259,6 +267,9 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
259
267
|
this.watcher = new MutationObserver(() => this.requestUpdate());
|
|
260
268
|
this.watcher.observe(this, { childList: true });
|
|
261
269
|
this.watchPane();
|
|
270
|
+
if (this.hasUpdated) {
|
|
271
|
+
this.runTimer();
|
|
272
|
+
}
|
|
262
273
|
}
|
|
263
274
|
disconnectedCallback() {
|
|
264
275
|
super.disconnectedCallback();
|
|
@@ -340,7 +351,7 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
340
351
|
? html `<button
|
|
341
352
|
part="rotation"
|
|
342
353
|
type="button"
|
|
343
|
-
aria-label=${rotating ?
|
|
354
|
+
aria-label=${rotating ? this.stopLabel : this.startLabel}
|
|
344
355
|
@click=${() => (rotating ? this.stop() : this.start())}
|
|
345
356
|
>
|
|
346
357
|
<svg part="rotation-mark"
|
|
@@ -357,7 +368,7 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
357
368
|
: html `<button
|
|
358
369
|
part="previous"
|
|
359
370
|
type="button"
|
|
360
|
-
aria-label
|
|
371
|
+
aria-label=${this.previousLabel}
|
|
361
372
|
@click=${() => this.goTo(this.index - 1)}
|
|
362
373
|
>
|
|
363
374
|
<svg part="previous-mark" data-mirror fill="currentColor" viewBox=${caretLeft.viewBox} aria-hidden="true">
|
|
@@ -367,7 +378,7 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
367
378
|
<button
|
|
368
379
|
part="next"
|
|
369
380
|
type="button"
|
|
370
|
-
aria-label
|
|
381
|
+
aria-label=${this.nextLabel}
|
|
371
382
|
@click=${() => this.goTo(this.index + 1)}
|
|
372
383
|
>
|
|
373
384
|
<svg part="next-mark" data-mirror fill="currentColor" viewBox=${caretRight.viewBox} aria-hidden="true">
|
|
@@ -388,8 +399,8 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
388
399
|
${this.slides.map((_, index) => html `<div
|
|
389
400
|
part="slide"
|
|
390
401
|
role="group"
|
|
391
|
-
aria-roledescription
|
|
392
|
-
aria-label=${
|
|
402
|
+
aria-roledescription=${this.slideRoleLabel}
|
|
403
|
+
aria-label=${fillTemplate(this.slideLabel, { count: this.slides.length, index: index + 1 })}
|
|
393
404
|
style=${index === last ? this.runEnd() : nothing}
|
|
394
405
|
>
|
|
395
406
|
<slot
|
|
@@ -399,14 +410,14 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
399
410
|
</div>`)}
|
|
400
411
|
</div>
|
|
401
412
|
${this.slides.length > 1 && this.across !== undefined
|
|
402
|
-
? html `<div part="indicators" role="group" aria-label=${
|
|
413
|
+
? html `<div part="indicators" role="group" aria-label=${fillTemplate(this.indicatorsLabel, { label: this.label })}>
|
|
403
414
|
${''}
|
|
404
415
|
${Array.from({ length: this.positions }).map((_place, at) => {
|
|
405
416
|
const current = at === (this.showing ?? this.index);
|
|
406
417
|
return html `<button
|
|
407
418
|
part="indicator${current ? ' indicator-current' : ''}"
|
|
408
419
|
type="button"
|
|
409
|
-
aria-label=${
|
|
420
|
+
aria-label=${fillTemplate(this.indicatorLabel, { index: at + 1 })}
|
|
410
421
|
aria-current=${at === this.index ? 'true' : nothing}
|
|
411
422
|
tabindex=${at === this.index ? '0' : '-1'}
|
|
412
423
|
?data-current=${current}
|
|
@@ -421,15 +432,21 @@ let HelixHeadlessCarousel = class HelixHeadlessCarousel extends HelixElement {
|
|
|
421
432
|
__decorate([
|
|
422
433
|
property({ type: Boolean })
|
|
423
434
|
], HelixHeadlessCarousel.prototype, "autoplay", void 0);
|
|
424
|
-
__decorate([
|
|
425
|
-
property({ type: Number })
|
|
426
|
-
], HelixHeadlessCarousel.prototype, "index", null);
|
|
427
435
|
__decorate([
|
|
428
436
|
property({ reflect: true })
|
|
429
437
|
], HelixHeadlessCarousel.prototype, "controls", void 0);
|
|
430
438
|
__decorate([
|
|
431
439
|
property({ attribute: 'default-index', type: Number })
|
|
432
440
|
], HelixHeadlessCarousel.prototype, "defaultIndex", void 0);
|
|
441
|
+
__decorate([
|
|
442
|
+
property({ type: Number })
|
|
443
|
+
], HelixHeadlessCarousel.prototype, "index", null);
|
|
444
|
+
__decorate([
|
|
445
|
+
property({ attribute: 'indicator-label' })
|
|
446
|
+
], HelixHeadlessCarousel.prototype, "indicatorLabel", void 0);
|
|
447
|
+
__decorate([
|
|
448
|
+
property({ attribute: 'indicators-label' })
|
|
449
|
+
], HelixHeadlessCarousel.prototype, "indicatorsLabel", void 0);
|
|
433
450
|
__decorate([
|
|
434
451
|
property({ type: Number })
|
|
435
452
|
], HelixHeadlessCarousel.prototype, "interval", void 0);
|
|
@@ -439,6 +456,9 @@ __decorate([
|
|
|
439
456
|
__decorate([
|
|
440
457
|
property({ type: Boolean })
|
|
441
458
|
], HelixHeadlessCarousel.prototype, "loop", void 0);
|
|
459
|
+
__decorate([
|
|
460
|
+
property({ attribute: 'next-label' })
|
|
461
|
+
], HelixHeadlessCarousel.prototype, "nextLabel", void 0);
|
|
442
462
|
__decorate([
|
|
443
463
|
property({ reflect: true })
|
|
444
464
|
], HelixHeadlessCarousel.prototype, "orientation", void 0);
|
|
@@ -448,6 +468,21 @@ __decorate([
|
|
|
448
468
|
__decorate([
|
|
449
469
|
property({ attribute: 'per-view', converter: COUNT_OR_AUTO, reflect: true })
|
|
450
470
|
], HelixHeadlessCarousel.prototype, "perView", void 0);
|
|
471
|
+
__decorate([
|
|
472
|
+
property({ attribute: 'previous-label' })
|
|
473
|
+
], HelixHeadlessCarousel.prototype, "previousLabel", void 0);
|
|
474
|
+
__decorate([
|
|
475
|
+
property({ attribute: 'slide-label' })
|
|
476
|
+
], HelixHeadlessCarousel.prototype, "slideLabel", void 0);
|
|
477
|
+
__decorate([
|
|
478
|
+
property({ attribute: 'slide-role-label' })
|
|
479
|
+
], HelixHeadlessCarousel.prototype, "slideRoleLabel", void 0);
|
|
480
|
+
__decorate([
|
|
481
|
+
property({ attribute: 'start-label' })
|
|
482
|
+
], HelixHeadlessCarousel.prototype, "startLabel", void 0);
|
|
483
|
+
__decorate([
|
|
484
|
+
property({ attribute: 'stop-label' })
|
|
485
|
+
], HelixHeadlessCarousel.prototype, "stopLabel", void 0);
|
|
451
486
|
__decorate([
|
|
452
487
|
state()
|
|
453
488
|
], HelixHeadlessCarousel.prototype, "fitted", void 0);
|
|
@@ -134,6 +134,10 @@ export declare class HelixHeadlessChat extends HelixHeadlessChat_base {
|
|
|
134
134
|
static readonly ESTIMATE = 72;
|
|
135
135
|
/**
|
|
136
136
|
* Whether to open pinned, where nothing declared it.
|
|
137
|
+
*
|
|
138
|
+
* `default-pinned="false"` opens away from the bottom. A plain boolean
|
|
139
|
+
* attribute could not say that: it is true by being there, whatever it holds,
|
|
140
|
+
* so a default of true had no attribute that turned it off.
|
|
137
141
|
*/
|
|
138
142
|
defaultPinned: boolean;
|
|
139
143
|
/**
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
var HelixHeadlessChat_1;
|
|
8
|
-
import { customElement, HelixBeforePinEvent, HelixElement, HelixHistoryEvent, hostAria, MixinCollection, requestChange, VirtualizeController, } from '@fusion.dev/helix-core';
|
|
8
|
+
import { customElement, HelixBeforePinEvent, HelixElement, HelixHistoryEvent, hostAria, MixinCollection, onUnlessFalse, requestChange, VirtualizeController, } from '@fusion.dev/helix-core';
|
|
9
9
|
import { nothing } from 'lit';
|
|
10
10
|
import { property, state } from 'lit/decorators.js';
|
|
11
11
|
import { keyed } from 'lit/directives/keyed.js';
|
|
@@ -343,7 +343,9 @@ let HelixHeadlessChat = class HelixHeadlessChat extends MixinCollection(HelixEle
|
|
|
343
343
|
this.opening = true;
|
|
344
344
|
requestAnimationFrame(() => {
|
|
345
345
|
this.opening = false;
|
|
346
|
-
this.
|
|
346
|
+
if (this.isConnected) {
|
|
347
|
+
this.reachHistory();
|
|
348
|
+
}
|
|
347
349
|
});
|
|
348
350
|
}
|
|
349
351
|
disconnectedCallback() {
|
|
@@ -361,6 +363,10 @@ let HelixHeadlessChat = class HelixHeadlessChat extends MixinCollection(HelixEle
|
|
|
361
363
|
this.countRegions();
|
|
362
364
|
if (changed.has('history')) {
|
|
363
365
|
this.asked = false;
|
|
366
|
+
if (this.history === 'loading' && changed.get('history') !== undefined) {
|
|
367
|
+
this.announcement = this.historyText;
|
|
368
|
+
this.said += 1;
|
|
369
|
+
}
|
|
364
370
|
}
|
|
365
371
|
if (changed.has('turns')) {
|
|
366
372
|
this.follow(changed.get('turns'));
|
|
@@ -433,9 +439,7 @@ let HelixHeadlessChat = class HelixHeadlessChat extends MixinCollection(HelixEle
|
|
|
433
439
|
?data-windowed=${fed}
|
|
434
440
|
@scroll=${this.handleScroll}
|
|
435
441
|
>
|
|
436
|
-
${this.history === 'loading'
|
|
437
|
-
? html `<p part="history" role="status">${this.historyText}</p>`
|
|
438
|
-
: nothing}
|
|
442
|
+
${this.history === 'loading' ? html `<p part="history">${this.historyText}</p>` : nothing}
|
|
439
443
|
${fed ? this.renderTurns() : nothing}
|
|
440
444
|
<slot name="messages" @slotchange=${this.handleSlotChange}></slot>
|
|
441
445
|
${this.renderStatus(fed || this.messages.length > 0 || !this.childrenKnown)}
|
|
@@ -444,7 +448,7 @@ let HelixHeadlessChat = class HelixHeadlessChat extends MixinCollection(HelixEle
|
|
|
444
448
|
<div part="resume" ?hidden=${!away || !this.has('resume')} @click=${this.handleResume}>
|
|
445
449
|
<slot name="resume"></slot>
|
|
446
450
|
</div>
|
|
447
|
-
<div part="status" role="status" ?
|
|
451
|
+
<div part="status" role="status" ?data-empty=${!this.has('status')}>
|
|
448
452
|
<slot name="status"></slot>
|
|
449
453
|
</div>
|
|
450
454
|
<div part="composer" ?hidden=${!this.has('composer')}>
|
|
@@ -453,7 +457,7 @@ let HelixHeadlessChat = class HelixHeadlessChat extends MixinCollection(HelixEle
|
|
|
453
457
|
}
|
|
454
458
|
};
|
|
455
459
|
__decorate([
|
|
456
|
-
property({ attribute: 'default-pinned',
|
|
460
|
+
property({ attribute: 'default-pinned', converter: onUnlessFalse })
|
|
457
461
|
], HelixHeadlessChat.prototype, "defaultPinned", void 0);
|
|
458
462
|
__decorate([
|
|
459
463
|
property()
|
|
@@ -37,6 +37,7 @@ let HelixHeadlessCheckbox = class HelixHeadlessCheckbox extends MixinControllerC
|
|
|
37
37
|
this.reportRequired(!this.checked, 'Tick this box to continue.', 'control');
|
|
38
38
|
}
|
|
39
39
|
formResetCallback() {
|
|
40
|
+
super.formResetCallback();
|
|
40
41
|
this.indeterminate = false;
|
|
41
42
|
this.resetChecked();
|
|
42
43
|
}
|
|
@@ -116,6 +116,16 @@ export declare class HelixHeadlessCheckboxGroup extends HelixHeadlessCheckboxGro
|
|
|
116
116
|
disconnectedCallback(): void;
|
|
117
117
|
protected willUpdate(changed: PropertyValues): void;
|
|
118
118
|
protected firstUpdated(changed: PropertyValues): void;
|
|
119
|
+
/**
|
|
120
|
+
* Goes back to the set the markup started with.
|
|
121
|
+
*
|
|
122
|
+
* **Seeded again rather than cleared.** The form resets each box too, in the
|
|
123
|
+
* same task and after this, so by the next update the boxes are back to
|
|
124
|
+
* what they declared and the seed reads them. Without this the group kept
|
|
125
|
+
* the reader's set, reported valid over boxes the reset had emptied, and
|
|
126
|
+
* ticked them again the next time anything updated it.
|
|
127
|
+
*/
|
|
128
|
+
formResetCallback(): void;
|
|
119
129
|
/**
|
|
120
130
|
* Refuses an empty set where one was required.
|
|
121
131
|
*
|
|
@@ -97,6 +97,11 @@ let HelixHeadlessCheckboxGroup = class HelixHeadlessCheckboxGroup extends MixinF
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
+
formResetCallback() {
|
|
101
|
+
super.formResetCallback();
|
|
102
|
+
this.value = this.getAttribute('value') ?? '';
|
|
103
|
+
this.seeded = false;
|
|
104
|
+
}
|
|
100
105
|
validate() {
|
|
101
106
|
this.reportRequired(this.value === '', 'Choose at least one to continue.', 'items');
|
|
102
107
|
}
|
|
@@ -57,13 +57,13 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
57
57
|
}
|
|
58
58
|
const control = this.control;
|
|
59
59
|
if (this.value !== '' && parseColor(this.value) === null) {
|
|
60
|
-
this.internals.setValidity({ badInput: true }, 'Enter a color, like #ff0000, rgb(255 0 0) or hsl(0 100% 50%).', anchor);
|
|
60
|
+
this.internals.setValidity({ badInput: true }, this.badInputMessage || 'Enter a color, like #ff0000, rgb(255 0 0) or hsl(0 100% 50%).', anchor);
|
|
61
61
|
}
|
|
62
62
|
else if (control) {
|
|
63
|
-
this.
|
|
63
|
+
this.copyValidity(control);
|
|
64
64
|
}
|
|
65
65
|
else {
|
|
66
|
-
this.internals.setValidity(this.required && this.value === '' ? { valueMissing: true } : {}, this.required && this.value === '' ? 'Choose a color.' : '', anchor);
|
|
66
|
+
this.internals.setValidity(this.required && this.value === '' ? { valueMissing: true } : {}, this.required && this.value === '' ? this.valueMissingMessage || 'Choose a color.' : '', anchor);
|
|
67
67
|
}
|
|
68
68
|
this.refreshFeedback();
|
|
69
69
|
}
|
|
@@ -137,7 +137,12 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
137
137
|
aria-controls="surface"
|
|
138
138
|
aria-expanded=${this.open ? 'true' : 'false'}
|
|
139
139
|
aria-haspopup="dialog"
|
|
140
|
-
aria-label=${this.triggerLabel}
|
|
140
|
+
aria-label=${this.variant === 'swatch' ? nothing : this.triggerLabel}
|
|
141
|
+
aria-labelledby=${this.variant === 'swatch'
|
|
142
|
+
? this.labeled
|
|
143
|
+
? `${this.labelId} swatch-value`
|
|
144
|
+
: 'swatch-value'
|
|
145
|
+
: nothing}
|
|
141
146
|
?disabled=${this.isDisabled}
|
|
142
147
|
@click=${() => this.toggleOpen()}
|
|
143
148
|
>
|
|
@@ -146,10 +151,21 @@ let HelixHeadlessColorInput = class HelixHeadlessColorInput extends MixinPickerF
|
|
|
146
151
|
style="--color-input-swatch: ${this.value === '' ? 'transparent' : this.painted}"
|
|
147
152
|
></span>
|
|
148
153
|
<slot name="trigger"></slot>
|
|
154
|
+
${this.variant === 'swatch'
|
|
155
|
+
? html `<span id="swatch-value" hidden>${this.value || this.triggerLabel}</span>`
|
|
156
|
+
: nothing}
|
|
149
157
|
</button>
|
|
150
158
|
</div>
|
|
151
159
|
|
|
152
|
-
|
|
160
|
+
${''}
|
|
161
|
+
<div
|
|
162
|
+
part="surface"
|
|
163
|
+
id="surface"
|
|
164
|
+
role="dialog"
|
|
165
|
+
aria-label=${this.triggerLabel}
|
|
166
|
+
popover="manual"
|
|
167
|
+
?hidden=${!this.open}
|
|
168
|
+
>
|
|
153
169
|
${this.renderPicker()}
|
|
154
170
|
</div>
|
|
155
171
|
${this.renderHint()}${this.renderFeedback()}`;
|
|
@@ -90,6 +90,25 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
90
90
|
* ramps. A consumer who wants autofill can still ask.
|
|
91
91
|
*/
|
|
92
92
|
autocomplete: string;
|
|
93
|
+
/**
|
|
94
|
+
* What the square's vertical ramp is called.
|
|
95
|
+
*
|
|
96
|
+
* **Every word the picker speaks is a property**, so a page in another
|
|
97
|
+
* language hears its own rather than English between its own labels.
|
|
98
|
+
*/
|
|
99
|
+
brightnessLabel: string;
|
|
100
|
+
/**
|
|
101
|
+
* What the sample says for a moment after it copied the value.
|
|
102
|
+
*/
|
|
103
|
+
copiedLabel: string;
|
|
104
|
+
/**
|
|
105
|
+
* What the sample is called, which copies the value, with `{value}` filled in.
|
|
106
|
+
*/
|
|
107
|
+
copyLabel: string;
|
|
108
|
+
/**
|
|
109
|
+
* What the eyedropper is called.
|
|
110
|
+
*/
|
|
111
|
+
eyedropperLabel: string;
|
|
93
112
|
/**
|
|
94
113
|
* The syntax the value is written in: `hex`, `rgb` or `hsl`.
|
|
95
114
|
*
|
|
@@ -97,6 +116,14 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
97
116
|
* `hex` still takes an `rgb()` handed to it and stores the hex for it.
|
|
98
117
|
*/
|
|
99
118
|
format?: ColorFormat;
|
|
119
|
+
/**
|
|
120
|
+
* What the syntax toggle is called, with `{format}` filled in.
|
|
121
|
+
*/
|
|
122
|
+
formatLabel: string;
|
|
123
|
+
/**
|
|
124
|
+
* What the hue channel is called.
|
|
125
|
+
*/
|
|
126
|
+
hueLabel: string;
|
|
100
127
|
/**
|
|
101
128
|
* Whether the current selection fails validation.
|
|
102
129
|
*
|
|
@@ -130,6 +157,14 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
130
157
|
* would then be unreadable and unpasteable without opening a panel.
|
|
131
158
|
*/
|
|
132
159
|
noValue: boolean;
|
|
160
|
+
/**
|
|
161
|
+
* What the opacity channel is called, where `alpha` offers one.
|
|
162
|
+
*/
|
|
163
|
+
opacityLabel: string;
|
|
164
|
+
/**
|
|
165
|
+
* What the row of `swatches` is called.
|
|
166
|
+
*/
|
|
167
|
+
presetsLabel: string;
|
|
133
168
|
/**
|
|
134
169
|
* Whether the control refuses changes while still submitting its value.
|
|
135
170
|
*
|
|
@@ -182,10 +217,30 @@ export declare class HelixHeadlessColorPicker extends HelixHeadlessColorPicker_b
|
|
|
182
217
|
* typed into.
|
|
183
218
|
*/
|
|
184
219
|
required: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* What the square's horizontal ramp is called.
|
|
222
|
+
*/
|
|
223
|
+
saturationLabel: string;
|
|
185
224
|
/**
|
|
186
225
|
* Colors offered under the picker, as a comma-separated list.
|
|
187
226
|
*/
|
|
188
227
|
swatches: string;
|
|
228
|
+
/**
|
|
229
|
+
* What the group holding the eyedropper and the syntax toggle is called.
|
|
230
|
+
*/
|
|
231
|
+
toolsLabel: string;
|
|
232
|
+
/**
|
|
233
|
+
* What the text field holding the value is called.
|
|
234
|
+
*/
|
|
235
|
+
valueLabel: string;
|
|
236
|
+
/**
|
|
237
|
+
* What a reader is told when a color is required and none is chosen.
|
|
238
|
+
*
|
|
239
|
+
* **Every sentence a control raises in the browser's bubble is a property**,
|
|
240
|
+
* named for the validity flag it reports, so a form in another language
|
|
241
|
+
* speaks it. Absent is the control's own sentence, in English.
|
|
242
|
+
*/
|
|
243
|
+
valueMissingMessage?: string;
|
|
189
244
|
/**
|
|
190
245
|
* The color the reader has moved to, or nothing while they have moved none.
|
|
191
246
|
*
|