@fusion.dev/helix-headless 0.30.1 → 0.31.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 (86) hide show
  1. package/custom-elements.json +2129 -146
  2. package/dist/accordion/item/accordion-item.d.ts +2 -0
  3. package/dist/app-header/root/app-header-root.d.ts +2 -0
  4. package/dist/area-chart/root/area-chart-root.d.ts +1 -0
  5. package/dist/bar-chart/root/bar-chart-root.d.ts +2 -0
  6. package/dist/bar-chart/root/bar-chart-root.js +4 -1
  7. package/dist/carousel/root/carousel-root.d.ts +1 -0
  8. package/dist/carousel/root/carousel-root.js +8 -5
  9. package/dist/chat/root/chat-root.d.ts +12 -0
  10. package/dist/chat/root/chat-root.js +4 -0
  11. package/dist/checkbox/root/checkbox-root.d.ts +6 -0
  12. package/dist/checkbox/root/checkbox-root.js +4 -1
  13. package/dist/checkbox-group/root/checkbox-group-root.d.ts +2 -0
  14. package/dist/color-input/root/color-input-root.d.ts +3 -0
  15. package/dist/combobox/root/combobox-root.d.ts +3 -0
  16. package/dist/command/root/command-root.d.ts +2 -0
  17. package/dist/data-table/root/data-table-root.d.ts +16 -0
  18. package/dist/data-table/root/data-table-root.js +13 -5
  19. package/dist/date-input/root/date-input-root.d.ts +10 -0
  20. package/dist/date-input/root/date-input-root.js +6 -2
  21. package/dist/date-picker/root/date-picker-root.d.ts +7 -0
  22. package/dist/date-picker/root/date-picker-root.js +12 -6
  23. package/dist/dialog/root/dialog-root.d.ts +2 -0
  24. package/dist/donut-chart/root/donut-chart-root.d.ts +2 -0
  25. package/dist/donut-chart/root/donut-chart-root.js +3 -2
  26. package/dist/drawer/root/drawer-root.d.ts +2 -0
  27. package/dist/file-input/root/file-input-root.d.ts +2 -0
  28. package/dist/filter-input/menu/filter-menu.d.ts +16 -0
  29. package/dist/filter-input/menu/filter-menu.js +30 -4
  30. package/dist/filter-input/root/filter-input-root.d.ts +3 -0
  31. package/dist/heatmap/root/heatmap-root.d.ts +1 -0
  32. package/dist/input/root/input-root.d.ts +3 -0
  33. package/dist/input/root/input-root.js +1 -1
  34. package/dist/line-chart/root/line-chart-root.d.ts +1 -0
  35. package/dist/listbox/root/listbox-root.d.ts +2 -0
  36. package/dist/megamenu/root/megamenu-root.d.ts +2 -0
  37. package/dist/menu/root/menu-root.d.ts +5 -0
  38. package/dist/menu/root/menu-root.js +1 -0
  39. package/dist/meter/root/meter-root.d.ts +12 -4
  40. package/dist/meter/root/meter-root.js +10 -6
  41. package/dist/notifications/group/notification-group.d.ts +2 -0
  42. package/dist/notifications/notification/notification.d.ts +4 -0
  43. package/dist/notifications/root/notifications-root.d.ts +2 -0
  44. package/dist/number-input/root/number-input-root.d.ts +2 -0
  45. package/dist/object-inspector/root/object-inspector-root.d.ts +1 -0
  46. package/dist/object-inspector/root/object-inspector-root.js +5 -4
  47. package/dist/option/root/option-root.d.ts +4 -0
  48. package/dist/option/root/option-root.js +4 -1
  49. package/dist/pagination/root/pagination-root.d.ts +5 -0
  50. package/dist/pagination/root/pagination-root.js +2 -2
  51. package/dist/pagination/size/pagination-size.d.ts +27 -3
  52. package/dist/pagination/size/pagination-size.js +16 -2
  53. package/dist/pin-input/root/pin-input-root.d.ts +2 -0
  54. package/dist/popover/root/popover-root.d.ts +2 -0
  55. package/dist/radio/group/radio-group.d.ts +2 -0
  56. package/dist/radio/root/radio-root.d.ts +2 -0
  57. package/dist/rating/root/rating-root.d.ts +2 -0
  58. package/dist/scatter-chart/root/scatter-chart-root.d.ts +2 -0
  59. package/dist/scatter-chart/root/scatter-chart-root.js +1 -1
  60. package/dist/scroll-area/root/scroll-area-root.d.ts +6 -0
  61. package/dist/scroll-area/root/scroll-area-root.js +4 -3
  62. package/dist/select/root/select-root.d.ts +3 -0
  63. package/dist/slider/root/slider-root.d.ts +2 -0
  64. package/dist/speed-dial/root/speed-dial-root.d.ts +2 -0
  65. package/dist/switch/root/switch-root.d.ts +3 -0
  66. package/dist/table/column/table-column.d.ts +3 -0
  67. package/dist/table/column/table-column.js +2 -6
  68. package/dist/tabs/panel/tab-panel.d.ts +2 -0
  69. package/dist/tabs/tab/tab.d.ts +2 -0
  70. package/dist/textarea/root/textarea-root.d.ts +2 -0
  71. package/dist/time-input/root/time-input-root.d.ts +6 -0
  72. package/dist/time-input/root/time-input-root.js +2 -0
  73. package/dist/time-picker/root/time-picker-root.d.ts +20 -5
  74. package/dist/time-picker/root/time-picker-root.js +30 -11
  75. package/dist/toggle/group/toggle-group.d.ts +2 -0
  76. package/dist/toggle/root/toggle-root.d.ts +2 -0
  77. package/dist/tooltip/root/tooltip-root.d.ts +2 -0
  78. package/dist/tour/stop/tour-stop.js +4 -0
  79. package/dist/tree/item/tree-item.d.ts +4 -1
  80. package/dist/video/root/video-root.d.ts +1 -0
  81. package/dist/video/root/video-root.js +1 -1
  82. package/dist/video-playlist/item/video-playlist-item.d.ts +1 -0
  83. package/dist/video-playlist/item/video-playlist-item.js +1 -1
  84. package/package.json +5 -5
  85. package/types/jsx.d.ts +1935 -25
  86. package/types/vue.d.ts +5 -3
@@ -99,6 +99,7 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
99
99
  this.requestValue(whole);
100
100
  };
101
101
  this.step = 15;
102
+ this.listRevealed = false;
102
103
  }
103
104
  get times() {
104
105
  const from = toMinutes(this.min) ?? 0;
@@ -153,7 +154,11 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
153
154
  return this.times.filter((at) => Math.floor(at / 60) === hour).map((at) => at % 60);
154
155
  }
155
156
  reveal() {
156
- if (this.variant !== 'wheels' || this.mode !== undefined) {
157
+ if (this.mode !== undefined) {
158
+ return;
159
+ }
160
+ if (this.variant !== 'wheels') {
161
+ this.partNamed('list')?.reveal?.();
157
162
  return;
158
163
  }
159
164
  for (const column of this.renderRoot?.querySelectorAll('[part="column"]') ?? []) {
@@ -194,10 +199,10 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
194
199
  this.internals.setFormValue(data);
195
200
  }
196
201
  async revealWhenSettled() {
197
- const columns = [
198
- ...(this.renderRoot?.querySelectorAll('[part="column"]') ?? []),
202
+ const settling = [
203
+ ...(this.renderRoot?.querySelectorAll('[part="column"], [part="list"], [part~="option"]') ?? []),
199
204
  ];
200
- await Promise.all(columns.map((column) => column.updateComplete));
205
+ await Promise.all(settling.map((one) => one.updateComplete));
201
206
  this.reveal();
202
207
  }
203
208
  willUpdate(changed) {
@@ -208,8 +213,14 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
208
213
  updated(changed) {
209
214
  super.updated(changed);
210
215
  this.reportRequired();
211
- this.reveal();
212
- void this.revealWhenSettled();
216
+ if (this.variant === 'wheels') {
217
+ this.reveal();
218
+ void this.revealWhenSettled();
219
+ }
220
+ else if (!this.listRevealed) {
221
+ this.listRevealed = true;
222
+ void this.revealWhenSettled();
223
+ }
213
224
  }
214
225
  focus(options) {
215
226
  this.partNamed('list')?.focus(options);
@@ -230,8 +241,13 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
230
241
  }}
231
242
  @input=${this.handleListInput}
232
243
  >
233
- ${values.map((one) => html `<${this.tag('option')} part="option"
234
- exportparts="description: option-description, item: option-item, label: option-label, text: option-text" value=${one} ?disabled=${barred(one)}
244
+ ${values.map((one) => html `<${this.tag('option')}
245
+ part="option"
246
+ exportparts="description: option-description, item: option-item,
247
+ item-active: option-item-active, item-selected: option-item-selected,
248
+ label: option-label, text: option-text"
249
+ value=${one}
250
+ ?disabled=${barred(one)}
235
251
  >${written(one)}</${this.tag('option')}
236
252
  >`)}
237
253
  </${this.tag('listbox')}>`;
@@ -267,12 +283,15 @@ let HelixHeadlessTimePicker = class HelixHeadlessTimePicker extends MixinControl
267
283
  >
268
284
  ${this.times.map((minutes) => {
269
285
  const at = fromMinutes(minutes);
286
+ const between = this.between(at);
270
287
  return html `<${this.tag('option')}
271
- part="option"
272
- exportparts="description: option-description, item: option-item, label: option-label, text: option-text"
288
+ part="option${between ? ' option-between' : ''}"
289
+ exportparts="description: option-description, item: option-item,
290
+ item-active: option-item-active, item-selected: option-item-selected,
291
+ label: option-label, text: option-text"
273
292
  value=${at}
274
293
  ?disabled=${this.barred(at)}
275
- data-between=${this.between(at) ? '' : nothing}
294
+ data-between=${between ? '' : nothing}
276
295
  >${writeTime(at, this.locale)}</${this.tag('option')}
277
296
  >`;
278
297
  })}
@@ -34,6 +34,8 @@ declare const HelixHeadlessToggleGroup_base: (new (...args: any[]) => import("@f
34
34
  * @csspart label - The question, over the row.
35
35
  * @csspart row - The line the track sits on, with whatever flanks it.
36
36
  * @csspart track - The bar the items sit in.
37
+ *
38
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
37
39
  */
38
40
  export declare class HelixHeadlessToggleGroup extends HelixHeadlessToggleGroup_base {
39
41
  /** Marks the chosen item, separately from placing the indicator. */
@@ -21,6 +21,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
21
21
  * @event {HelixSelectEvent} helix-select - Fired when the item is chosen. Cancelable: refusing it takes the decision and nothing moves.
22
22
  *
23
23
  * @csspart item - The radio button.
24
+ *
25
+ * @cssstate selected - While it is on.
24
26
  */
25
27
  export declare class HelixHeadlessToggle extends HelixElement {
26
28
  /**
@@ -53,6 +53,8 @@ declare const HelixHeadlessTooltip_base: (new (...args: any[]) => import("@fusio
53
53
  *
54
54
  * @csspart arrow - The point, resting against the trigger.
55
55
  * @csspart tooltip - The bubble.
56
+ *
57
+ * @cssstate open - While the tooltip shows.
56
58
  */
57
59
  export declare class HelixHeadlessTooltip extends HelixHeadlessTooltip_base {
58
60
  /**
@@ -23,6 +23,10 @@ let HelixHeadlessTourStop = class HelixHeadlessTourStop extends HelixElement {
23
23
  this.floating = new PopoverController(this, {
24
24
  anchor: () => this.target,
25
25
  arrow: () => this.partNamed('arrow'),
26
+ offset: () => {
27
+ const tour = this.parentElement;
28
+ return ((tour?.spotlightPadding ?? 0) + (this.partNamed('arrow')?.offsetWidth ?? 0) / Math.SQRT2);
29
+ },
26
30
  onDismiss: () => { },
27
31
  placement: () => this.placement,
28
32
  surface: () => this.partNamed('bubble'),
@@ -44,7 +44,10 @@ declare const HelixHeadlessTreeItem_base: (new (...args: any[]) => import("@fusi
44
44
  * @csspart row - The clickable label row, which is an `<a>` where `href` is set.
45
45
  * @csspart toggle - The expand and collapse control.
46
46
  *
47
- * @cssproperty --tree-level - How deep this row sits, counting from zero, for the indent.
47
+ * @cssproperty --tree-level - How deep this row sits, counting from one as `aria-level` does, for the indent.
48
+ *
49
+ * @cssstate open - While its children are shown.
50
+ * @cssstate selected - While it is selected.
48
51
  */
49
52
  export declare class HelixHeadlessTreeItem extends HelixHeadlessTreeItem_base {
50
53
  /**
@@ -86,6 +86,7 @@ import '../../menu/index.js';
86
86
  * @csspart poster - What covers it before it plays.
87
87
  * @csspart previous - Asks for the previous one.
88
88
  * @csspart remote - Play on another device, where one is available.
89
+ * @csspart remote-pressed - The remote control while the picture is on another device, beside `remote`.
89
90
  * @csspart rewind - The control that goes back ten seconds.
90
91
  * @csspart scrubber - Where it is, and where to go.
91
92
  * @csspart sound - The speaker and its level, which are one control.
@@ -489,7 +489,7 @@ let HelixHeadlessVideo = class HelixHeadlessVideo extends HelixElement {
489
489
  renderExtra(one) {
490
490
  if (one === 'remote') {
491
491
  return html `<button
492
- part="remote"
492
+ part="remote${this.remoteConnected ? ' remote-pressed' : ''}"
493
493
  type="button"
494
494
  aria-label="Play on another device"
495
495
  aria-pressed=${this.remoteConnected ? 'true' : 'false'}
@@ -35,6 +35,7 @@ import { type TemplateResult } from 'lit';
35
35
  *
36
36
  * @csspart container - The `listitem`, which the button sits in.
37
37
  * @csspart item - The row, which is a button.
38
+ * @csspart item-current - The row of the entry the player is on, beside `item`.
38
39
  * @csspart label - The name and whatever follows it.
39
40
  * @csspart media - The leading column.
40
41
  * @csspart thumbnail - The image `poster` falls back to.
@@ -37,7 +37,7 @@ let HelixHeadlessVideoPlaylistItem = class HelixHeadlessVideoPlaylistItem extend
37
37
  render() {
38
38
  return html `<div part="container" role="listitem">
39
39
  <button
40
- part="item"
40
+ part="item${this.current ? ' item-current' : ''}"
41
41
  type="button"
42
42
  aria-current=${this.current ? 'true' : nothing}
43
43
  ?disabled=${this.disabled}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-headless",
3
3
  "description": "Headless component tier. Structure, accessibility, state, and form participation. No styling.",
4
- "version": "0.30.1",
4
+ "version": "0.31.0",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -46,14 +46,14 @@
46
46
  },
47
47
  "bugs": "https://github.com/project-fusion/fusion/issues",
48
48
  "dependencies": {
49
- "@fusion.dev/helix-core": "0.30.1",
50
- "@fusion.dev/helix-icons": "0.30.1",
49
+ "@fusion.dev/helix-core": "0.31.0",
50
+ "@fusion.dev/helix-icons": "0.31.0",
51
51
  "uqr": "^0.1.3"
52
52
  },
53
53
  "devDependencies": {
54
54
  "@custom-elements-manifest/analyzer": "^0.11.0",
55
- "@fusion.dev/helix-cem": "0.30.1",
56
- "@fusion.dev/helix-testing": "0.30.1",
55
+ "@fusion.dev/helix-cem": "0.31.0",
56
+ "@fusion.dev/helix-testing": "0.31.0",
57
57
  "@fusion.dev/scripts": "0.0.0-dev",
58
58
  "@happy-dom/global-registrator": "^20.0.0",
59
59
  "@lit-labs/ssr": "^4.1.0",