@fusion.dev/helix-headless 0.103.2 → 0.104.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.
Files changed (107) hide show
  1. package/custom-elements.json +9259 -712
  2. package/dist/announcement/root/announcement-root.d.ts +9 -2
  3. package/dist/announcement/root/announcement-root.js +9 -6
  4. package/dist/badge/root/badge-root.js +2 -3
  5. package/dist/canvas/edge/canvas-edge.d.ts +112 -0
  6. package/dist/canvas/edge/canvas-edge.js +66 -0
  7. package/dist/canvas/index.d.ts +4 -0
  8. package/dist/canvas/index.js +3 -0
  9. package/dist/canvas/node/canvas-node.d.ts +211 -0
  10. package/dist/canvas/node/canvas-node.js +148 -0
  11. package/dist/canvas/root/canvas-document.d.ts +215 -0
  12. package/dist/canvas/root/canvas-document.js +284 -0
  13. package/dist/canvas/root/canvas-root.d.ts +912 -0
  14. package/dist/canvas/root/canvas-root.js +1814 -0
  15. package/dist/carousel/root/carousel-root.d.ts +53 -16
  16. package/dist/carousel/root/carousel-root.js +46 -11
  17. package/dist/chat/root/chat-root.d.ts +4 -0
  18. package/dist/chat/root/chat-root.js +11 -7
  19. package/dist/checkbox/root/checkbox-root.js +1 -0
  20. package/dist/checkbox-group/root/checkbox-group-root.d.ts +10 -0
  21. package/dist/checkbox-group/root/checkbox-group-root.js +5 -0
  22. package/dist/color-input/root/color-input-root.js +21 -5
  23. package/dist/color-picker/root/color-picker-root.d.ts +55 -0
  24. package/dist/color-picker/root/color-picker-root.js +61 -12
  25. package/dist/combobox/root/combobox-root.d.ts +21 -2
  26. package/dist/combobox/root/combobox-root.js +23 -9
  27. package/dist/command/root/command-root.d.ts +1 -0
  28. package/dist/command/root/command-root.js +1 -1
  29. package/dist/data-table/root/data-table-root.d.ts +43 -42
  30. package/dist/data-table/root/data-table-root.js +35 -34
  31. package/dist/date-input/root/date-input-root.d.ts +27 -0
  32. package/dist/date-input/root/date-input-root.js +38 -9
  33. package/dist/date-picker/root/date-picker-root.d.ts +28 -16
  34. package/dist/date-picker/root/date-picker-root.js +17 -15
  35. package/dist/drilldown/root/drilldown-root.d.ts +1 -0
  36. package/dist/drilldown/root/drilldown-root.js +5 -2
  37. package/dist/element-events.generated.js +15 -0
  38. package/dist/empty/root/empty-root.d.ts +12 -7
  39. package/dist/empty/root/empty-root.js +13 -10
  40. package/dist/file-input/root/file-input-root.d.ts +5 -1
  41. package/dist/file-input/root/file-input-root.js +6 -4
  42. package/dist/filter-input/menu/filter-menu.d.ts +1 -0
  43. package/dist/filter-input/menu/filter-menu.js +1 -1
  44. package/dist/filter-input/root/filter-input-root.js +5 -0
  45. package/dist/index.d.ts +1 -0
  46. package/dist/index.js +1 -0
  47. package/dist/input/root/input-root.js +1 -1
  48. package/dist/lightbox/root/lightbox-root.d.ts +9 -1
  49. package/dist/lightbox/root/lightbox-root.js +17 -7
  50. package/dist/listbox/root/listbox-root.d.ts +16 -14
  51. package/dist/listbox/root/listbox-root.js +24 -15
  52. package/dist/map/root/map-root.d.ts +19 -127
  53. package/dist/map/root/map-root.js +10 -138
  54. package/dist/menu/root/menu-root.d.ts +1 -0
  55. package/dist/menu/root/menu-root.js +1 -1
  56. package/dist/notifications/group/notification-group.js +5 -4
  57. package/dist/notifications/notification/notification.d.ts +10 -10
  58. package/dist/notifications/notification/notification.js +3 -3
  59. package/dist/notifications/root/notifications-root.d.ts +1 -0
  60. package/dist/notifications/root/notifications-root.js +1 -0
  61. package/dist/number-input/root/number-input-root.d.ts +17 -0
  62. package/dist/number-input/root/number-input-root.js +22 -6
  63. package/dist/object-inspector/root/object-inspector-root.d.ts +10 -0
  64. package/dist/object-inspector/root/object-inspector-root.js +10 -2
  65. package/dist/outline/root/outline-root.d.ts +15 -0
  66. package/dist/outline/root/outline-root.js +12 -7
  67. package/dist/pagination/root/pagination-root.d.ts +18 -18
  68. package/dist/pagination/root/pagination-root.js +5 -5
  69. package/dist/pagination/size/pagination-size.d.ts +10 -9
  70. package/dist/pagination/size/pagination-size.js +4 -4
  71. package/dist/pagination/summary/pagination-summary.js +6 -5
  72. package/dist/pin-input/root/pin-input-root.d.ts +5 -0
  73. package/dist/pin-input/root/pin-input-root.js +10 -6
  74. package/dist/rating/root/rating-root.js +3 -2
  75. package/dist/select/root/select-root.d.ts +1 -0
  76. package/dist/select/root/select-root.js +8 -3
  77. package/dist/slider/root/slider-root.d.ts +12 -0
  78. package/dist/slider/root/slider-root.js +13 -1
  79. package/dist/splitter/root/splitter-root.d.ts +44 -35
  80. package/dist/splitter/root/splitter-root.js +27 -22
  81. package/dist/switch/root/switch-root.js +1 -0
  82. package/dist/table/column/table-column.d.ts +17 -0
  83. package/dist/table/column/table-column.js +16 -4
  84. package/dist/table/root/table-root.d.ts +1 -0
  85. package/dist/table/root/table-root.js +1 -1
  86. package/dist/textarea/root/textarea-root.js +1 -1
  87. package/dist/time-input/root/time-input-root.d.ts +29 -0
  88. package/dist/time-input/root/time-input-root.js +31 -10
  89. package/dist/time-picker/root/time-picker-root.d.ts +14 -0
  90. package/dist/time-picker/root/time-picker-root.js +16 -14
  91. package/dist/toast/item/toast-item.d.ts +12 -11
  92. package/dist/toast/item/toast-item.js +11 -5
  93. package/dist/toolbar/root/toolbar-root.js +2 -16
  94. package/dist/tooltip/root/tooltip-root.d.ts +1 -0
  95. package/dist/tooltip/root/tooltip-root.js +6 -0
  96. package/dist/tour/root/tour-root.d.ts +10 -10
  97. package/dist/tour/root/tour-root.js +5 -5
  98. package/dist/tree/root/tree-root.d.ts +1 -0
  99. package/dist/tree/root/tree-root.js +1 -1
  100. package/dist/video/root/video-root.d.ts +84 -0
  101. package/dist/video/root/video-root.js +116 -41
  102. package/dist/video-playlist/menu/video-playlist-menu.d.ts +1 -0
  103. package/dist/video-playlist/menu/video-playlist-menu.js +4 -3
  104. package/package.json +5 -5
  105. package/types/jsx.d.ts +5753 -1076
  106. package/types/svelte.d.ts +3 -0
  107. package/types/vue.d.ts +1668 -282
@@ -50,17 +50,6 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
50
50
  * restart a message the reader is already partway through.
51
51
  */
52
52
  duration?: number;
53
- /**
54
- * What kind of message it is, which picks the mark and its name.
55
- *
56
- * A subset of the tone axis: a toast reports a status and never a brand role.
57
- */
58
- tone?: 'danger' | 'info' | 'success' | 'warning';
59
- /** When the current run of the timer began, or nothing while it is paused. */
60
- private startedAt;
61
- /** What is left of the duration, so resuming continues rather than restarts. */
62
- private remaining;
63
- private timer;
64
53
  /**
65
54
  * Whether the message is still showing.
66
55
  *
@@ -76,6 +65,17 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
76
65
  */
77
66
  get open(): boolean;
78
67
  set open(next: boolean);
68
+ /** When the current run of the timer began, or nothing while it is paused. */
69
+ private startedAt;
70
+ /** What is left of the duration, so resuming continues rather than restarts. */
71
+ private remaining;
72
+ private timer;
73
+ /**
74
+ * What kind of message it is, which picks the mark and its name.
75
+ *
76
+ * A subset of the tone axis: a toast reports a status and never a brand role.
77
+ */
78
+ tone?: 'danger' | 'info' | 'success' | 'warning';
79
79
  /** Whether it is showing, whoever said so, and `undefined` until somebody has. */
80
80
  private openState;
81
81
  /**
@@ -104,6 +104,7 @@ export declare class HelixHeadlessToastItem extends HelixHeadlessToastItem_base
104
104
  private holds;
105
105
  private readonly handlePause;
106
106
  private readonly handleResume;
107
+ connectedCallback(): void;
107
108
  disconnectedCallback(): void;
108
109
  protected willUpdate(changed: PropertyValues): void;
109
110
  protected firstUpdated(changed: PropertyValues): void;
@@ -71,10 +71,16 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
71
71
  this.dismiss();
72
72
  }, this.remaining);
73
73
  }
74
+ connectedCallback() {
75
+ super.connectedCallback();
76
+ if (this.hasUpdated && this.open) {
77
+ this.resume();
78
+ }
79
+ }
74
80
  disconnectedCallback() {
75
81
  super.disconnectedCallback();
76
- clearTimeout(this.timer);
77
- this.timer = undefined;
82
+ this.pause();
83
+ this.holds = 0;
78
84
  }
79
85
  willUpdate(changed) {
80
86
  super.willUpdate(changed);
@@ -146,12 +152,12 @@ let HelixHeadlessToastItem = class HelixHeadlessToastItem extends MixinDismissib
146
152
  __decorate([
147
153
  property({ type: Number })
148
154
  ], HelixHeadlessToastItem.prototype, "duration", void 0);
149
- __decorate([
150
- property({ reflect: true })
151
- ], HelixHeadlessToastItem.prototype, "tone", void 0);
152
155
  __decorate([
153
156
  property({ type: Boolean })
154
157
  ], HelixHeadlessToastItem.prototype, "open", null);
158
+ __decorate([
159
+ property({ reflect: true })
160
+ ], HelixHeadlessToastItem.prototype, "tone", void 0);
155
161
  HelixHeadlessToastItem = __decorate([
156
162
  customElement('helix-headless-toast-item')
157
163
  ], HelixHeadlessToastItem);
@@ -4,25 +4,11 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { customElement, HelixElement, inlineStep } from '@fusion.dev/helix-core';
7
+ import { customElement, HelixElement, inlineStep, keyClaimed } from '@fusion.dev/helix-core';
8
8
  import { html } from 'lit';
9
9
  import { property } from 'lit/decorators.js';
10
10
  const KEYS = new Set(['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End']);
11
11
  const ownsTabStop = (node) => 'focusable' in node;
12
- const CARETLESS = new Set(['button', 'checkbox', 'color', 'file', 'image', 'reset', 'submit']);
13
- const claimed = (event) => {
14
- if (event.defaultPrevented) {
15
- return true;
16
- }
17
- const inner = event.composedPath()[0];
18
- if (!(inner instanceof HTMLElement)) {
19
- return false;
20
- }
21
- if (inner.isContentEditable || inner.localName === 'textarea' || inner.localName === 'select') {
22
- return true;
23
- }
24
- return inner.localName === 'input' && !CARETLESS.has(inner.type);
25
- };
26
12
  let HelixHeadlessToolbar = class HelixHeadlessToolbar extends HelixElement {
27
13
  constructor() {
28
14
  super(...arguments);
@@ -41,7 +27,7 @@ let HelixHeadlessToolbar = class HelixHeadlessToolbar extends HelixElement {
41
27
  }
42
28
  };
43
29
  this.handleKeydown = (event) => {
44
- if (!KEYS.has(event.key) || claimed(event)) {
30
+ if (!KEYS.has(event.key) || keyClaimed(event)) {
45
31
  return;
46
32
  }
47
33
  const along = inlineStep(this, event.key);
@@ -348,6 +348,7 @@ export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
348
348
  * this should not be the thing to settle it.
349
349
  */
350
350
  private auditDescription;
351
+ connectedCallback(): void;
351
352
  disconnectedCallback(): void;
352
353
  protected firstUpdated(changed: PropertyValues): void;
353
354
  protected updated(changed: PropertyValues): void;
@@ -199,6 +199,12 @@ let HelixHeadlessTooltip = class HelixHeadlessTooltip extends MixinControllerOpe
199
199
  '`aria-describedby="<that id>"` to the element it names. Written in your own markup ' +
200
200
  'it survives server rendering, which is why this element will not write it for you.');
201
201
  }
202
+ connectedCallback() {
203
+ super.connectedCallback();
204
+ if (this.hasUpdated) {
205
+ this.bind();
206
+ }
207
+ }
202
208
  disconnectedCallback() {
203
209
  super.disconnectedCallback();
204
210
  this.unbind();
@@ -40,6 +40,16 @@ export declare class HelixHeadlessTour extends HelixElement {
40
40
  * Label for the control that goes back, handed to every stop.
41
41
  */
42
42
  backLabel: string;
43
+ /**
44
+ * Stop to start on, where nothing declared one.
45
+ */
46
+ defaultIndex: number;
47
+ /**
48
+ * Label for the control that goes on from the last stop.
49
+ */
50
+ doneLabel: string;
51
+ /** The stop being shown, whoever set it, and `undefined` until somebody has. */
52
+ private indexState;
43
53
  /**
44
54
  * Which stop the reader is on.
45
55
  *
@@ -54,16 +64,6 @@ export declare class HelixHeadlessTour extends HelixElement {
54
64
  */
55
65
  get index(): number;
56
66
  set index(next: number);
57
- /**
58
- * Stop to start on, where nothing declared one.
59
- */
60
- defaultIndex: number;
61
- /** The stop being shown, whoever set it, and `undefined` until somebody has. */
62
- private indexState;
63
- /**
64
- * Label for the control that goes on from the last stop.
65
- */
66
- doneLabel: string;
67
67
  /**
68
68
  * Accessible name for the run, such as "Getting started".
69
69
  */
@@ -12,8 +12,8 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
12
12
  super(...arguments);
13
13
  this.backLabel = '';
14
14
  this.defaultIndex = 0;
15
- this.indexState = undefined;
16
15
  this.doneLabel = '';
16
+ this.indexState = undefined;
17
17
  this.label = '';
18
18
  this.nextLabel = '';
19
19
  this.open = false;
@@ -34,7 +34,7 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
34
34
  }
35
35
  };
36
36
  this.handleKeydown = (event) => {
37
- if (this.open && event.key === 'Escape') {
37
+ if (this.open && event.key === 'Escape' && !event.defaultPrevented) {
38
38
  event.preventDefault();
39
39
  this.skip();
40
40
  }
@@ -200,15 +200,15 @@ let HelixHeadlessTour = class HelixHeadlessTour extends HelixElement {
200
200
  __decorate([
201
201
  property({ attribute: 'back-label' })
202
202
  ], HelixHeadlessTour.prototype, "backLabel", void 0);
203
- __decorate([
204
- property({ type: Number })
205
- ], HelixHeadlessTour.prototype, "index", null);
206
203
  __decorate([
207
204
  property({ attribute: 'default-index', type: Number })
208
205
  ], HelixHeadlessTour.prototype, "defaultIndex", void 0);
209
206
  __decorate([
210
207
  property({ attribute: 'done-label' })
211
208
  ], HelixHeadlessTour.prototype, "doneLabel", void 0);
209
+ __decorate([
210
+ property({ type: Number })
211
+ ], HelixHeadlessTour.prototype, "index", null);
212
212
  __decorate([
213
213
  property()
214
214
  ], HelixHeadlessTour.prototype, "label", void 0);
@@ -26,6 +26,7 @@ declare const HelixHeadlessTree_base: (new (...args: any[]) => import("@fusion.d
26
26
  * @event {HelixSelectEvent} helix-select - Fired when an item is chosen. Dispatched by the item and listened for here, because the tree is what a consumer holds a reference to. Cancelable: refusing it takes the decision and nothing moves.
27
27
  *
28
28
  * @csspart empty - Shown when there are no rows to show.
29
+ * @csspart live - The empty and loading lines again, in a region a screen reader hears when they change. Visually hidden in the styled tier.
29
30
  * @csspart loading - Shown while the rows are still on their way.
30
31
  * @csspart tree - The tree container.
31
32
  */
@@ -176,7 +176,7 @@ let HelixHeadlessTree = class HelixHeadlessTree extends MixinCollection(MixinCon
176
176
  }}
177
177
  ></slot>
178
178
  ${this.renderStatus(this.hasRows)}
179
- </div>`;
179
+ </div>${this.renderLive(this.hasRows)}`;
180
180
  }
181
181
  };
182
182
  __decorate([
@@ -54,6 +54,7 @@ import '../../menu/index.js';
54
54
  * @csspart captions-menu-back-mark - The glyph on the back control of a submenu.
55
55
  * @csspart captions-menu-empty - Shown when there are no items to show.
56
56
  * @csspart captions-menu-header - The bar above a submenu, holding the way back and its name.
57
+ * @csspart captions-menu-live - The inner menu's `live`, the region a screen reader hears its empty and loading lines from.
57
58
  * @csspart captions-menu-loading - Shown while the items are still on their way.
58
59
  * @csspart captions-menu-surface - The floating panel the menu is drawn on.
59
60
  * @csspart captions-menu-title - The name of the submenu that is showing.
@@ -68,6 +69,7 @@ import '../../menu/index.js';
68
69
  * @csspart forward - The control that goes on ten seconds.
69
70
  * @csspart fullscreen - The whole screen, and back.
70
71
  * @csspart header - The region top left, for a heading and a way out of a set.
72
+ * @csspart live - What the loading line says, in a region a screen reader hears when it changes. Visually hidden in the styled tier.
71
73
  * @csspart loading - What is said while the picture waits for more of itself.
72
74
  * The part of that which spins is drawn on it, which is `::part(loading)::before`
73
75
  * from a consumer's sheet: this tier ships no CSS, so a box it renders for one to
@@ -81,6 +83,7 @@ import '../../menu/index.js';
81
83
  * @csspart overflow-back-mark - The glyph on the back control of a submenu.
82
84
  * @csspart overflow-empty - Shown when there are no items to show.
83
85
  * @csspart overflow-header - The bar above a submenu, holding the way back and its name.
86
+ * @csspart overflow-live - The inner menu's `live`, the region a screen reader hears its empty and loading lines from.
84
87
  * @csspart overflow-loading - Shown while the items are still on their way.
85
88
  * @csspart overflow-surface - The floating panel the menu is drawn on.
86
89
  * @csspart overflow-title - The name of the submenu that is showing.
@@ -115,6 +118,18 @@ export declare class HelixHeadlessVideo extends HelixElement {
115
118
  * start control, which is the correct thing to be looking at.
116
119
  */
117
120
  autoplay: boolean;
121
+ /**
122
+ * What the captions control is called where the video has one track, which it switches on and off.
123
+ *
124
+ * **Every word this player speaks is a property**, so a page in another
125
+ * language hears its own: the play, pause, loading and error labels were,
126
+ * and the rest of the bar read out in English beside them.
127
+ */
128
+ captionsLabel: string;
129
+ /**
130
+ * The row that turns captions off, where the video has several tracks to choose from.
131
+ */
132
+ captionsOffLabel: string;
118
133
  /**
119
134
  * Whether the browser draws the controls instead of this element.
120
135
  *
@@ -146,6 +161,10 @@ export declare class HelixHeadlessVideo extends HelixElement {
146
161
  * Whether the browser may offer playback on a remote device.
147
162
  */
148
163
  disableRemotePlayback: boolean;
164
+ /**
165
+ * What the control that saves the file is called.
166
+ */
167
+ downloadLabel: string;
149
168
  /**
150
169
  * And what they are told when it will not play at all.
151
170
  */
@@ -182,6 +201,18 @@ export declare class HelixHeadlessVideo extends HelixElement {
182
201
  * and not something a player can work around.
183
202
  */
184
203
  extraControls: string;
204
+ /**
205
+ * What the control that skips ahead is called, with `{seconds}` filled in.
206
+ */
207
+ forwardLabel: string;
208
+ /**
209
+ * What the control that fills the screen is called.
210
+ *
211
+ * **One name, pressed or not**, since the button says which with
212
+ * `aria-pressed`: a name that changed as well read out "Exit fullscreen,
213
+ * pressed", which is two answers to one question.
214
+ */
215
+ fullscreenLabel: string;
185
216
  /**
186
217
  * How long the bar waits after the pointer stops before it goes, in ms.
187
218
  *
@@ -206,6 +237,18 @@ export declare class HelixHeadlessVideo extends HelixElement {
206
237
  * Whether it starts again at the end.
207
238
  */
208
239
  loop: boolean;
240
+ /**
241
+ * What the button that opens `overflow-controls` is called.
242
+ */
243
+ moreLabel: string;
244
+ /**
245
+ * What the control that silences the video is called, pressed while it is silent.
246
+ */
247
+ muteLabel: string;
248
+ /**
249
+ * What the control that asks for the next video is called.
250
+ */
251
+ nextLabel: string;
209
252
  /**
210
253
  * Controls that go behind one button instead of onto the bar, named the same
211
254
  * way.
@@ -228,6 +271,14 @@ export declare class HelixHeadlessVideo extends HelixElement {
228
271
  * And while it would stop it.
229
272
  */
230
273
  pauseLabel: string;
274
+ /**
275
+ * How the volume is read out, with `{percent}` filled in.
276
+ */
277
+ percentLabel: string;
278
+ /**
279
+ * What the control that floats the video over other windows is called.
280
+ */
281
+ pipLabel: string;
231
282
  /**
232
283
  * What the play control is called while it would start the video.
233
284
  */
@@ -244,6 +295,26 @@ export declare class HelixHeadlessVideo extends HelixElement {
244
295
  * How much to fetch before anything is asked for.
245
296
  */
246
297
  preload: 'auto' | 'metadata' | 'none';
298
+ /**
299
+ * What the control that asks for the previous video is called.
300
+ */
301
+ previousLabel: string;
302
+ /**
303
+ * What the control that casts the video to another device is called.
304
+ */
305
+ remoteLabel: string;
306
+ /**
307
+ * What the control that skips back is called, with `{seconds}` filled in.
308
+ */
309
+ rewindLabel: string;
310
+ /**
311
+ * What the scrubber is called.
312
+ */
313
+ seekLabel: string;
314
+ /**
315
+ * What the control that changes the speed is called.
316
+ */
317
+ speedLabel: string;
247
318
  /**
248
319
  * The speeds offered, slowest first, as multipliers of normal.
249
320
  */
@@ -270,6 +341,19 @@ export declare class HelixHeadlessVideo extends HelixElement {
270
341
  * negation.
271
342
  */
272
343
  startControl?: 'none';
344
+ /**
345
+ * What the menu of tracks is called, where the video has several.
346
+ */
347
+ subtitlesLabel: string;
348
+ /**
349
+ * How the scrubber reads out where the video is, with `{position}` and
350
+ * `{duration}` filled in.
351
+ */
352
+ timeLabel: string;
353
+ /**
354
+ * What the volume slider is called.
355
+ */
356
+ volumeLabel: string;
273
357
  /**
274
358
  * Whether playback has stopped to wait for data.
275
359
  *