@fusion.dev/helix-headless 0.30.2 → 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 +2127 -144
  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 +3 -0
  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 +1932 -22
  86. package/types/vue.d.ts +4 -2
@@ -156,6 +156,7 @@ let HelixHeadlessMenu = class HelixHeadlessMenu extends MixinCollection(MixinCon
156
156
  }
157
157
  this.mark(item, this.drilldown.atRoot);
158
158
  }
159
+ this.toggleState('drilled', !this.drilldown.atRoot);
159
160
  this.markColumns();
160
161
  }
161
162
  markColumns() {
@@ -25,6 +25,11 @@ export type MeterBand = 'fair' | 'good' | 'poor';
25
25
  *
26
26
  * @csspart groove - The unfilled circle, in `ring` and `arc`.
27
27
  * @csspart indicator - The part of it the value fills.
28
+ * @csspart indicator-fair - The fill while the reading is in a band beside the good one, beside `indicator`.
29
+ * @csspart indicator-good - The fill while the reading is in the good band, beside `indicator`.
30
+ * @csspart indicator-over - The fill while the value is past the top, beside `indicator`.
31
+ * @csspart indicator-poor - The fill while the reading is two bands from the good one, beside `indicator`.
32
+ * @csspart indicator-under - The fill while the value is below the floor, beside `indicator`.
28
33
  * @csspart tick - A mark at `low` or at `high`.
29
34
  * @csspart track - The whole range, or the drawing in `ring` and `arc`.
30
35
  * @csspart value - The reading, under `show-value`.
@@ -58,8 +63,10 @@ export declare class HelixHeadlessMeter extends HelixElement {
58
63
  * again is a worse API than letting them say it.
59
64
  *
60
65
  * Not reflected. Nothing selects on it: the band reaches the stylesheet as
61
- * `data-band` on the fill, because that is the element being colored, so
62
- * reflecting here would write an attribute onto the host for no reader.
66
+ * `data-band` on the fill, because that is the element being colored, and a
67
+ * stylesheet outside as `indicator-good`, `-fair` or `-poor` among the fill's
68
+ * part names, so reflecting here would write an attribute onto the host for
69
+ * no reader.
63
70
  */
64
71
  band?: MeterBand;
65
72
  /**
@@ -156,8 +163,9 @@ export declare class HelixHeadlessMeter extends HelixElement {
156
163
  * "you are over" is worse than no meter for the one case anybody checks it in.
157
164
  *
158
165
  * The bar still stops at its end, because that is what an end is. The words
159
- * and the accessible reading carry the truth, and `data-beyond` is on the fill
160
- * so a consumer can say more about it.
166
+ * and the accessible reading carry the truth, and the fill carries
167
+ * `indicator-over` or `indicator-under` among its part names so a consumer can
168
+ * say more about it.
161
169
  */
162
170
  private get ratio();
163
171
  /** Whether the value is past an end, which the bar itself cannot show. */
@@ -78,6 +78,8 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
78
78
  }
79
79
  renderRound() {
80
80
  const bounds = this.thresholds;
81
+ const band = this.computedBand;
82
+ const beyond = this.beyond;
81
83
  const { max, min } = this.span;
82
84
  const sweep = this.shape === 'arc' ? 75 : 100;
83
85
  const along = (value) => ((value - min) / (max - min)) * sweep;
@@ -92,16 +94,18 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
92
94
  <circle part="tick" pathLength="100" style="--meter-along: ${along(bounds.high)}" />`
93
95
  : nothing}
94
96
  <circle
95
- part="indicator"
97
+ part="indicator${band ? { fair: ' indicator-fair', good: ' indicator-good', poor: ' indicator-poor' }[band] : ''}${beyond ? { over: ' indicator-over', under: ' indicator-under' }[beyond] : ''}"
96
98
  pathLength="100"
97
- data-band=${this.computedBand ?? nothing}
98
- data-beyond=${this.beyond ?? nothing}
99
+ data-band=${band ?? nothing}
100
+ data-beyond=${beyond ?? nothing}
99
101
  style="--meter-along: ${this.fraction * sweep}"
100
102
  />
101
103
  </svg>`;
102
104
  }
103
105
  render() {
104
106
  const bounds = this.thresholds;
107
+ const band = this.computedBand;
108
+ const beyond = this.beyond;
105
109
  const { max, min } = this.span;
106
110
  const at = (value) => `${((value - min) / (max - min)) * 100}%`;
107
111
  return html `${this.shape
@@ -112,9 +116,9 @@ let HelixHeadlessMeter = class HelixHeadlessMeter extends HelixElement {
112
116
  <span part="tick" style="--meter-at: ${at(bounds.high)}"></span>`
113
117
  : nothing}
114
118
  <div
115
- part="indicator"
116
- data-band=${this.computedBand ?? nothing}
117
- data-beyond=${this.beyond ?? nothing}
119
+ part="indicator${band ? { fair: ' indicator-fair', good: ' indicator-good', poor: ' indicator-poor' }[band] : ''}${beyond ? { over: ' indicator-over', under: ' indicator-under' }[beyond] : ''}"
120
+ data-band=${band ?? nothing}
121
+ data-beyond=${beyond ?? nothing}
118
122
  style="--meter-fraction: ${this.fraction}"
119
123
  ></div>
120
124
  </div>`}
@@ -45,6 +45,8 @@ declare const HelixHeadlessNotificationGroup_base: (new (...args: any[]) => impo
45
45
  * @csspart items - The region holding the notifications.
46
46
  * @csspart label - What the group is called.
47
47
  * @csspart trigger - The control that collapses and expands, where collapsible.
48
+ *
49
+ * @cssstate open - While the group shows every notification in it rather than the first.
48
50
  */
49
51
  export declare class HelixHeadlessNotificationGroup extends HelixHeadlessNotificationGroup_base {
50
52
  /**
@@ -59,6 +59,10 @@ import '../../format-date/index.js';
59
59
  * @csspart media - The leading slot's box.
60
60
  * @csspart time - When it happened, read the way a person reads one.
61
61
  * @csspart trailing - The column holding the time and the controls.
62
+ *
63
+ * @cssstate actions - While the actions slot holds something, so the words above make room for it.
64
+ * @cssstate controls - While it can be dismissed, so the time makes way for the control under a pointer.
65
+ * @cssstate read - While it has been read.
62
66
  */
63
67
  export declare class HelixHeadlessNotification extends HelixElement {
64
68
  /**
@@ -43,6 +43,8 @@ declare const HelixHeadlessNotifications_base: (new (...args: any[]) => import("
43
43
  * @csspart list - The list itself.
44
44
  * @csspart loading - Shown while the feed is still on its way.
45
45
  * @csspart mark-all - The control that marks everything read.
46
+ *
47
+ * @cssstate media - While a notification in the list holds something in its media slot, so every row keeps that column.
46
48
  */
47
49
  export declare class HelixHeadlessNotifications extends HelixHeadlessNotifications_base {
48
50
  /**
@@ -53,6 +53,8 @@ declare const HelixHeadlessNumberInput_base: (new (...args: any[]) => import("@f
53
53
  * @csspart increment - The control that steps up.
54
54
  * @csspart increment-mark - The glyph on the step up control.
55
55
  * @csspart label - The name over the field, which is also the scrub grip.
56
+ *
57
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
56
58
  */
57
59
  export declare class HelixHeadlessNumberInput extends HelixHeadlessNumberInput_base {
58
60
  protected readonly aria: AriaForwardController;
@@ -77,6 +77,7 @@ interface Row {
77
77
  * @csspart null - A `null`.
78
78
  * @csspart number - A number.
79
79
  * @csspart row - One entry, a tree item.
80
+ * @csspart row-active - The entry the keyboard is on, beside `row`.
80
81
  * @csspart string - A string, in quotes.
81
82
  * @csspart summary - The brackets standing for a branch's contents.
82
83
  * @csspart toggle - The caret on a branch: down when open, across when closed.
@@ -32,7 +32,7 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
32
32
  count: () => this.rows.length,
33
33
  estimate: () => 24,
34
34
  measured: () => this.windowed,
35
- rows: () => [...(this.renderRoot?.querySelectorAll('[part="row"]') ?? [])].map((element) => ({ element, index: Number(element.dataset.index) })),
35
+ rows: () => [...(this.renderRoot?.querySelectorAll('[part~="row"]') ?? [])].map((element) => ({ element, index: Number(element.dataset.index) })),
36
36
  });
37
37
  this.rows = [];
38
38
  this.copier = new CopyController(this);
@@ -189,7 +189,7 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
189
189
  scrollItemIntoView(row);
190
190
  return;
191
191
  }
192
- const drawn = [...(tree?.querySelectorAll('[part="row"]') ?? [])];
192
+ const drawn = [...(tree?.querySelectorAll('[part~="row"]') ?? [])];
193
193
  const first = drawn[0];
194
194
  const last = drawn.at(-1);
195
195
  if (!tree || !this.windowed || !first || !last || attempts === 0) {
@@ -255,12 +255,13 @@ let HelixHeadlessObjectInspector = class HelixHeadlessObjectInspector extends He
255
255
  return html `<span part="string">${String(value)}</span>`;
256
256
  }
257
257
  renderRow(row, index) {
258
+ const active = index === this.active;
258
259
  return html `<div
259
- part="row"
260
+ part="row${active ? ' row-active' : ''}"
260
261
  role="treeitem"
261
262
  id=${`row-${index}`}
262
263
  data-index=${index}
263
- ?data-active=${index === this.active}
264
+ ?data-active=${active}
264
265
  aria-level=${row.depth + 1}
265
266
  aria-posinset=${row.position}
266
267
  aria-setsize=${row.siblings}
@@ -54,8 +54,12 @@ export declare const optionsAmong: (elements: readonly Element[]) => HelixHeadle
54
54
  *
55
55
  * @csspart description - The caption under the words, when there is one.
56
56
  * @csspart item - The row.
57
+ * @csspart item-active - The row the keyboard is on, beside `item`.
58
+ * @csspart item-selected - The row of a chosen option, beside `item`.
57
59
  * @csspart label - The words.
58
60
  * @csspart text - The words and the caption under them, as one column.
61
+ *
62
+ * @cssstate selected - While the option is chosen.
59
63
  */
60
64
  export declare class HelixHeadlessOption extends HelixElement {
61
65
  /**
@@ -52,7 +52,10 @@ let HelixHeadlessOption = class HelixHeadlessOption extends HelixElement {
52
52
  this.internals.ariaDisabled = this.disabled ? 'true' : null;
53
53
  this.internals.ariaDescription =
54
54
  this.alternate !== '' && this.alternateLabel !== '' ? this.alternateLabel : null;
55
- return html `<div part="item" @click=${() => this.select()}>
55
+ return html `<div
56
+ part="item${this.selected ? ' item-selected' : ''}${this.active ? ' item-active' : ''}"
57
+ @click=${() => this.select()}
58
+ >
56
59
  <slot name="start"></slot>
57
60
  <span part="text">
58
61
  <span part="label"><slot></slot></span>
@@ -55,8 +55,11 @@ import { type PropertyValues, type TemplateResult } from 'lit';
55
55
  * @csspart mark - The glyph on a first, previous, next or last control, where none is slotted.
56
56
  * @csspart next - The control that moves forward one page.
57
57
  * @csspart page - The control for one page.
58
+ * @csspart page-current - The page you are on, beside `page`.
58
59
  * @csspart previous - The control that moves back one page.
59
60
  * @csspart status - The reading of where you are, in `compact`.
61
+ *
62
+ * @cssstate empty - While there is one page or none, which is nothing to page through.
60
63
  */
61
64
  export declare class HelixHeadlessPagination extends HelixElement {
62
65
  /**
@@ -277,6 +280,8 @@ export declare class HelixHeadlessPagination extends HelixElement {
277
280
  * `aria-current="page"` is what says which one you are on, and it stays a
278
281
  * control rather than becoming text: a reader who tabs into the run and finds
279
282
  * the current page missing from it has lost the only landmark in the row.
283
+ * `page-current` says the same to a stylesheet, which the attribute cannot:
284
+ * nothing can follow `::part()` to read it.
280
285
  */
281
286
  private renderPage;
282
287
  /**
@@ -136,7 +136,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
136
136
  return html `<li part="item">
137
137
  ${this.href
138
138
  ? html `<a
139
- part="page"
139
+ part="page${current ? ' page-current' : ''}"
140
140
  href=${fill(this.href, page, this.count)}
141
141
  aria-current=${current ? 'page' : nothing}
142
142
  aria-label=${name}
@@ -144,7 +144,7 @@ let HelixHeadlessPagination = class HelixHeadlessPagination extends HelixElement
144
144
  >${shown}</a
145
145
  >`
146
146
  : html `<button
147
- part="page"
147
+ part="page${current ? ' page-current' : ''}"
148
148
  type="button"
149
149
  aria-current=${current ? 'page' : nothing}
150
150
  aria-label=${name}
@@ -40,9 +40,33 @@ import '../../select/index.js';
40
40
  * @event {HelixBeforeChangeEvent} helix-before-change - Fired before the size changes, and cancelable. The only way to refuse one.
41
41
  *
42
42
  * @csspart control - The select.
43
- * @csspart label - The words beside the number, forwarded from the select.
44
- * @csspart trigger - The closed control, forwarded from the select.
45
- * @csspart value - The chosen size inside the trigger, forwarded from the select.
43
+ * @csspart control-feedback - What is wrong with it.
44
+ * @csspart control-hint - Help under the trigger.
45
+ * @csspart control-indicator - The caret saying the control opens.
46
+ * @csspart control-label - The words beside the number.
47
+ * @csspart control-listbox - The list inside it.
48
+ * @csspart control-listbox-empty - Shown when a filter has hidden everything.
49
+ * @csspart control-listbox-feedback - What is wrong with the list.
50
+ * @csspart control-listbox-filter-icon - The mark beside the filter field.
51
+ * @csspart control-listbox-filter-mark - The glyph beside the filter field, where none is slotted.
52
+ * @csspart control-listbox-hint - Help under the list.
53
+ * @csspart control-listbox-items - The list itself.
54
+ * @csspart control-listbox-label - The question, over the list.
55
+ * @csspart control-listbox-loading - Shown while the options are still on their way.
56
+ * @csspart control-listbox-search - The region holding the field that narrows the list.
57
+ * @csspart control-listbox-search-field - The field itself.
58
+ * @csspart control-surface - The floating panel.
59
+ * @csspart control-trigger - The closed control, which says what size is chosen.
60
+ * @csspart control-value - The chosen size inside the trigger.
61
+ * @csspart option - One size on offer.
62
+ * @csspart option-description - The caption under the number, when there is one.
63
+ * @csspart option-item - The row.
64
+ * @csspart option-item-active - The row the keyboard is on.
65
+ * @csspart option-item-selected - The row of the size chosen.
66
+ * @csspart option-label - The number.
67
+ * @csspart option-text - The number and the caption, as one column.
68
+ *
69
+ * @cssstate empty - While there are no sizes to offer.
46
70
  */
47
71
  export declare class HelixHeadlessPaginationSize extends HelixElement {
48
72
  /**
@@ -72,12 +72,26 @@ let HelixHeadlessPaginationSize = class HelixHeadlessPaginationSize extends Heli
72
72
  const option = this.tag('option');
73
73
  return html `<${select}
74
74
  part="control"
75
- exportparts="label, trigger, value"
75
+ exportparts="feedback: control-feedback, hint: control-hint, indicator: control-indicator,
76
+ label: control-label, listbox: control-listbox, listbox-empty: control-listbox-empty,
77
+ listbox-feedback: control-listbox-feedback, listbox-filter-icon: control-listbox-filter-icon,
78
+ listbox-filter-mark: control-listbox-filter-mark, listbox-hint: control-listbox-hint,
79
+ listbox-items: control-listbox-items, listbox-label: control-listbox-label,
80
+ listbox-loading: control-listbox-loading, listbox-search: control-listbox-search,
81
+ listbox-search-field: control-listbox-search-field, surface: control-surface,
82
+ trigger: control-trigger, value: control-value"
76
83
  label=${this.label}
77
84
  .value=${String(this.current)}
78
85
  @helix-before-change=${this.handleChange}
79
86
  >
80
- ${this.options.map((size) => html `<${option} value=${String(size)}>${this.numbers(size)}</${option}>`)}
87
+ ${this.options.map((size) => html `<${option}
88
+ part="option"
89
+ exportparts="description: option-description, item: option-item,
90
+ item-active: option-item-active, item-selected: option-item-selected,
91
+ label: option-label, text: option-text"
92
+ value=${String(size)}
93
+ >${this.numbers(size)}</${option}
94
+ >`)}
81
95
  </${select}>`;
82
96
  }
83
97
  render() {
@@ -43,6 +43,8 @@ declare const HelixHeadlessPinInput_base: (new (...args: any[]) => import("@fusi
43
43
  * @csspart field - The row of boxes.
44
44
  * @csspart hint - Help under the boxes, while nothing is wrong.
45
45
  * @csspart label - The question, over the boxes.
46
+ *
47
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
46
48
  */
47
49
  export declare class HelixHeadlessPinInput extends HelixHeadlessPinInput_base {
48
50
  protected readonly aria: AriaForwardController;
@@ -41,6 +41,8 @@ declare const HelixHeadlessPopover_base: (new (...args: any[]) => import("@fusio
41
41
  *
42
42
  * @csspart content - The scrolling region inside the panel.
43
43
  * @csspart popover - The panel.
44
+ *
45
+ * @cssstate open - While the popover is open.
44
46
  */
45
47
  export declare class HelixHeadlessPopover extends HelixHeadlessPopover_base {
46
48
  /**
@@ -43,6 +43,8 @@ declare const HelixHeadlessRadioGroup_base: (new (...args: any[]) => import("@fu
43
43
  * @csspart hint - Help under the set.
44
44
  * @csspart items - The choices, which is what `orientation` lays out.
45
45
  * @csspart label - The question, over the set.
46
+ *
47
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
46
48
  */
47
49
  export declare class HelixHeadlessRadioGroup extends HelixHeadlessRadioGroup_base {
48
50
  /**
@@ -38,6 +38,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
38
38
  * @csspart item - The button, which is the whole row.
39
39
  * @csspart label - The words beside it.
40
40
  * @csspart mark - The dot inside it.
41
+ *
42
+ * @cssstate selected - While it is the one chosen.
41
43
  */
42
44
  export declare class HelixHeadlessRadio extends HelixElement {
43
45
  /**
@@ -42,6 +42,8 @@ declare const HelixHeadlessRating_base: (new (...args: any[]) => import("@fusion
42
42
  * @cssproperty --rating-part - How much of the next mark is filled, 0 to 1.
43
43
  * @cssproperty --rating-step - The width of one step, as a fraction of a mark.
44
44
  * @cssproperty --rating-steps - How many steps one mark is divided into.
45
+ *
46
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
45
47
  */
46
48
  export declare class HelixHeadlessRating extends HelixHeadlessRating_base {
47
49
  protected readonly announcesInput = false;
@@ -56,10 +56,12 @@ declare const HelixHeadlessScatterChart_base: typeof HelixElement & (new (...arg
56
56
  * @csspart mark - The invisible point the tooltip is anchored to.
57
57
  * @csspart plot - The drawing.
58
58
  * @csspart point - One row, as a point.
59
+ * @csspart point-active - A point of the row a pointer is asking about, beside `point`.
59
60
  * @csspart summary - How strongly the measures relate, for a reader who cannot see the points.
60
61
  * @csspart svg - The drawing surface the rules sit on.
61
62
  * @csspart tooltip - The bubble, forwarded from `Tooltip`.
62
63
  * @csspart tooltip-anchor - The `Tooltip` element itself.
64
+ * @csspart tooltip-arrow - The bubble's point, forwarded from `Tooltip`.
63
65
  * @csspart tooltip-cell - One column's name and value inside the tooltip.
64
66
  * @csspart tooltip-label - The row's own name inside the tooltip.
65
67
  * @csspart tooltip-name - A column's name inside the tooltip.
@@ -160,7 +160,7 @@ let HelixHeadlessScatterChart = class HelixHeadlessScatterChart extends MixinCha
160
160
  return html `<span
161
161
  data-series=${index}
162
162
  ?data-active=${point.row === at}
163
- part="point"
163
+ part="point${point.row === at ? ' point-active' : ''}"
164
164
  style=${`--chart-series: var(--chart-series-${index}); --chart-point-x: ${point.x}%; --chart-point-y: ${point.y}%`}
165
165
  ></span>`;
166
166
  })}
@@ -36,6 +36,12 @@ declare const EDGES: readonly ['block-start', 'block-end', 'inline-start', 'inli
36
36
  *
37
37
  * @csspart edges - Where the sideways edge cues are drawn.
38
38
  * @csspart viewport - The scrolling box.
39
+ *
40
+ * @cssstate more-block-end - While there is more to scroll to past the block end.
41
+ * @cssstate more-block-start - While there is more to scroll back to before the block start.
42
+ * @cssstate more-inline-end - While there is more to scroll to past the inline end.
43
+ * @cssstate more-inline-start - While there is more to scroll back to before the inline start.
44
+ * @cssstate scrolls - While the content is larger than the viewport, on either axis.
39
45
  */
40
46
  export declare class HelixHeadlessScrollArea extends HelixElement {
41
47
  /**
@@ -79,9 +79,10 @@ let HelixHeadlessScrollArea = class HelixHeadlessScrollArea extends HelixElement
79
79
  updated(changed) {
80
80
  super.updated?.(changed);
81
81
  this.toggleState('scrolls', this.scrolls);
82
- for (const edge of EDGES) {
83
- this.toggleState(`more-${edge}`, this.more.includes(edge));
84
- }
82
+ this.toggleState('more-block-start', this.more.includes('block-start'));
83
+ this.toggleState('more-block-end', this.more.includes('block-end'));
84
+ this.toggleState('more-inline-start', this.more.includes('inline-start'));
85
+ this.toggleState('more-inline-end', this.more.includes('inline-end'));
85
86
  }
86
87
  render() {
87
88
  return html `<div
@@ -58,6 +58,9 @@ declare const HelixHeadlessSelect_base: (new (...args: any[]) => import("@fusion
58
58
  * @csspart surface - The floating panel.
59
59
  * @csspart trigger - The closed control, which says what is chosen.
60
60
  * @csspart value - The chosen option's text inside the trigger.
61
+ *
62
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
63
+ * @cssstate open - While the list is open.
61
64
  */
62
65
  export declare class HelixHeadlessSelect extends HelixHeadlessSelect_base {
63
66
  protected readonly aria: AriaForwardController;
@@ -47,6 +47,8 @@ declare const HelixHeadlessSlider_base: (new (...args: any[]) => import("@fusion
47
47
  * @cssproperty --slider-from - Where the filled span starts, as a percentage of the track.
48
48
  * @cssproperty --slider-marker-at - Where one marker sits, as a percentage of the track.
49
49
  * @cssproperty --slider-to - Where the filled span ends, as a percentage of the track.
50
+ *
51
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
50
52
  */
51
53
  export declare class HelixHeadlessSlider extends HelixHeadlessSlider_base {
52
54
  protected readonly aria: AriaForwardController;
@@ -43,6 +43,8 @@ declare const HelixHeadlessSpeedDial_base: (new (...args: any[]) => import("@fus
43
43
  *
44
44
  * @csspart actions - The region the actions are drawn in.
45
45
  * @csspart trigger - The default trigger, where none was slotted.
46
+ *
47
+ * @cssstate open - While the actions are out.
46
48
  */
47
49
  export declare class HelixHeadlessSpeedDial extends HelixHeadlessSpeedDial_base {
48
50
  /**
@@ -40,6 +40,9 @@ declare const HelixHeadlessSwitch_base: (new (...args: any[]) => import("@fusion
40
40
  * @csspart label - The words beside it.
41
41
  * @csspart thumb - The part that moves.
42
42
  * @csspart track - The groove the thumb travels in.
43
+ *
44
+ * @cssstate checked - While it is on.
45
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
43
46
  */
44
47
  export declare class HelixHeadlessSwitch extends HelixHeadlessSwitch_base {
45
48
  protected readonly aria: AriaForwardController;
@@ -69,6 +69,9 @@ export declare const at: (row: Readonly<Record<string, unknown>>, path: string)
69
69
  * @csspart grip-mark - The glyph on it.
70
70
  * @csspart resizer - The edge a reader drags to change the width, where the column allows it.
71
71
  * @csspart sort - The button a sortable heading is.
72
+ *
73
+ * @cssstate sorted-ascending - While the table is sorted by this column, smallest first.
74
+ * @cssstate sorted-descending - While the table is sorted by this column, largest first.
72
75
  */
73
76
  export declare class HelixHeadlessTableColumn extends HelixElement {
74
77
  /**
@@ -95,12 +95,8 @@ let HelixHeadlessTableColumn = class HelixHeadlessTableColumn extends HelixEleme
95
95
  super.willUpdate(changed);
96
96
  hostAria(this.internals, { role: 'columnheader' });
97
97
  this.internals.ariaSort = this.canSort ? (this.sorted ?? 'none') : null;
98
- for (const [name, on] of [
99
- ['sorted-ascending', this.sorted === 'ascending'],
100
- ['sorted-descending', this.sorted === 'descending'],
101
- ]) {
102
- this.toggleState(name, on);
103
- }
98
+ this.toggleState('sorted-ascending', this.sorted === 'ascending');
99
+ this.toggleState('sorted-descending', this.sorted === 'descending');
104
100
  }
105
101
  get name() {
106
102
  return this.textContent?.trim() ?? '';
@@ -16,6 +16,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
16
16
  * @slot - The panel's content.
17
17
  *
18
18
  * @csspart panel - The panel container.
19
+ *
20
+ * @cssstate selected - While its tab is the one selected.
19
21
  */
20
22
  export declare class HelixHeadlessTabPanel extends HelixElement {
21
23
  /**
@@ -21,6 +21,8 @@ import { type PropertyValues, type TemplateResult } from 'lit';
21
21
  * @event {HelixSelectEvent} helix-select - Fired when the tab is chosen. Cancelable: refusing it takes the decision and nothing moves.
22
22
  *
23
23
  * @csspart tab - The tab itself.
24
+ *
25
+ * @cssstate selected - While it is the tab selected.
24
26
  */
25
27
  export declare class HelixHeadlessTab extends HelixElement {
26
28
  /**
@@ -35,6 +35,8 @@ declare const HelixHeadlessTextarea_base: (new (...args: any[]) => import("@fusi
35
35
  * @csspart field - The box holding the control.
36
36
  * @csspart hint - Help under the field, while nothing is wrong.
37
37
  * @csspart label - The question, over the field.
38
+ *
39
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
38
40
  */
39
41
  export declare class HelixHeadlessTextarea extends HelixHeadlessTextarea_base {
40
42
  protected readonly aria: AriaForwardController;
@@ -72,8 +72,11 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
72
72
  * @csspart picker-list-search - The region holding the field that narrows the list.
73
73
  * @csspart picker-list-search-field - The field itself.
74
74
  * @csspart picker-option - One time in it. Carries `data-between` inside a range.
75
+ * @csspart picker-option-between - A time inside a chosen range, short of either end, beside `picker-option`.
75
76
  * @csspart picker-option-description - The caption under the words, when there is one.
76
77
  * @csspart picker-option-item - The row.
78
+ * @csspart picker-option-item-active - The row the keyboard is on.
79
+ * @csspart picker-option-item-selected - The row of a chosen time: the one time, or either end of a range.
77
80
  * @csspart picker-option-label - The words.
78
81
  * @csspart picker-option-text - The words and the caption, as one column.
79
82
  * @csspart rest - How many times are held beyond the ones shown. A `<button>` with `expandable`, a `<span>` without it.
@@ -85,6 +88,9 @@ declare const HelixHeadlessTimeInput_base: (new (...args: any[]) => import("@fus
85
88
  * @csspart time-prefix - The category before the label.
86
89
  * @csspart trigger - The control that opens the list.
87
90
  * @csspart trigger-icon - The mark on the button that opens the clock.
91
+ *
92
+ * @cssstate invalid - While there is feedback to show: the platform's verdict, or the consumer's `feedback`.
93
+ * @cssstate open - While the clock is open.
88
94
  */
89
95
  export declare class HelixHeadlessTimeInput extends HelixHeadlessTimeInput_base {
90
96
  protected readonly aria: AriaForwardController;
@@ -147,6 +147,8 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
147
147
  list-hint: picker-list-hint, list-items: picker-list-items, list-label: picker-list-label,
148
148
  list-loading: picker-list-loading, list-search: picker-list-search,
149
149
  list-search-field: picker-list-search-field, option: picker-option,
150
+ option-between: picker-option-between, option-item-active: picker-option-item-active,
151
+ option-item-selected: picker-option-item-selected,
150
152
  option-description: picker-option-description, option-item: picker-option-item,
151
153
  option-label: picker-option-label, option-text: picker-option-text"
152
154
  ?invalid=${this.resolvedFeedback !== ''}
@@ -77,8 +77,11 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
77
77
  * @csspart list-search - The region holding the field that narrows the list.
78
78
  * @csspart list-search-field - The field itself.
79
79
  * @csspart option - One time in it. Carries `data-between` inside a range.
80
+ * @csspart option-between - A time inside a chosen range, short of either end, beside `option`.
80
81
  * @csspart option-description - The caption under the words, when there is one.
81
82
  * @csspart option-item - The row.
83
+ * @csspart option-item-active - The row the keyboard is on.
84
+ * @csspart option-item-selected - The row of a chosen time: the one time, or either end of a range.
82
85
  * @csspart option-label - The words.
83
86
  * @csspart option-text - The words and the caption, as one column.
84
87
  */
@@ -226,15 +229,22 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
226
229
  /** Every minute offered within the hour currently shown. */
227
230
  private get minutes();
228
231
  /**
229
- * Each wheel comes to rest on its own answer.
232
+ * Each wheel comes to rest on its own answer, and the list on the time it
233
+ * holds.
230
234
  *
231
235
  * A dial that opens at midnight when it holds ten in the evening is a dial
232
236
  * showing the wrong thing, and CSS cannot fix it: `scroll-snap-type` chooses a
233
237
  * snap point when something scrolls, and nothing has. Measured before this,
234
- * with the value at 22:00, the hour wheel sat 288 pixels above its answer.
238
+ * with the value at 22:00, the hour wheel sat 288 pixels above its answer. The
239
+ * list had the same fault: holding 09:30 it opened on 12:00 AM with the answer
240
+ * 38 rows down and out of sight, flat on a page and in every Time Input panel.
241
+ * A list holding several, a range or a set, is left where it is, having no
242
+ * one row to come to rest on.
235
243
  *
236
- * On every update rather than on the first, because the columns re-render as
237
- * the value moves and the minute column's contents change with the hour.
244
+ * The wheels on every update, because the columns re-render as the value
245
+ * moves and the minute column's contents change with the hour. The list on
246
+ * the first only, where it is flat on a page: centering it on every choice
247
+ * would move the row out from under the pointer that chose it.
238
248
  *
239
249
  * **And it is public, because an update is not the only moment that matters.**
240
250
  * Inside a panel this element renders while the panel is still
@@ -310,7 +320,7 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
310
320
  */
311
321
  private report;
312
322
  /**
313
- * Reveals once the wheels have rendered themselves.
323
+ * Reveals once the wheels, or the list and its rows, have rendered themselves.
314
324
  *
315
325
  * `updated` is this element's own moment, and each wheel is a `helix-listbox`
316
326
  * that was created during this very render: its first update has been
@@ -329,6 +339,11 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
329
339
  * scrolling a wheel changes no property and so schedules no update.
330
340
  */
331
341
  private revealWhenSettled;
342
+ /**
343
+ * Whether the list has brought itself to its answer yet. It does that once,
344
+ * and after that only whatever opens a panel calls `reveal`.
345
+ */
346
+ private listRevealed;
332
347
  protected willUpdate(changed: PropertyValues): void;
333
348
  protected updated(changed: PropertyValues): void;
334
349
  /** Puts the keyboard on the list, which is the only control here. */