@fusion.dev/helix-headless 0.143.0 → 0.144.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 (191) hide show
  1. package/custom-elements.json +8551 -375
  2. package/dist/area-chart/root/area-chart-root.d.ts +12 -4
  3. package/dist/area-chart/root/area-chart-root.js +24 -7
  4. package/dist/avatar/root/avatar-root.d.ts +14 -0
  5. package/dist/avatar/root/avatar-root.js +23 -9
  6. package/dist/badge/root/badge-root.d.ts +11 -7
  7. package/dist/badge/root/badge-root.js +1 -1
  8. package/dist/bar-chart/root/bar-chart-root.d.ts +12 -3
  9. package/dist/bar-chart/root/bar-chart-root.js +17 -10
  10. package/dist/button/root/button-root.d.ts +47 -1
  11. package/dist/button/root/button-root.js +38 -4
  12. package/dist/callout/root/callout-root.d.ts +18 -1
  13. package/dist/callout/root/callout-root.js +15 -4
  14. package/dist/card/root/card-root.d.ts +30 -1
  15. package/dist/card/root/card-root.js +38 -5
  16. package/dist/checkbox/root/checkbox-root.js +2 -0
  17. package/dist/checkbox-group/root/checkbox-group-root.d.ts +53 -3
  18. package/dist/checkbox-group/root/checkbox-group-root.js +71 -22
  19. package/dist/code-block/lines.d.ts +13 -0
  20. package/dist/code-block/lines.js +2 -0
  21. package/dist/code-block/root/code-block-root.d.ts +30 -0
  22. package/dist/code-block/root/code-block-root.js +23 -2
  23. package/dist/color-input/root/color-input-root.d.ts +34 -1
  24. package/dist/color-input/root/color-input-root.js +23 -4
  25. package/dist/color-picker/channels.d.ts +26 -0
  26. package/dist/color-picker/channels.js +84 -0
  27. package/dist/color-picker/root/color-picker-root.d.ts +81 -5
  28. package/dist/color-picker/root/color-picker-root.js +103 -10
  29. package/dist/combobox/root/combobox-root.d.ts +38 -3
  30. package/dist/combobox/root/combobox-root.js +64 -2
  31. package/dist/command/root/command-root.d.ts +30 -4
  32. package/dist/command/root/command-root.js +33 -3
  33. package/dist/copy-button/from.d.ts +22 -0
  34. package/dist/copy-button/from.js +28 -0
  35. package/dist/copy-button/root/copy-button-root.d.ts +27 -1
  36. package/dist/copy-button/root/copy-button-root.js +43 -7
  37. package/dist/date-input/root/date-input-root.d.ts +73 -4
  38. package/dist/date-input/root/date-input-root.js +93 -43
  39. package/dist/date-picker/root/date-picker-root.d.ts +145 -1
  40. package/dist/date-picker/root/date-picker-root.js +239 -48
  41. package/dist/dialog/description.d.ts +9 -0
  42. package/dist/dialog/description.js +14 -0
  43. package/dist/dialog/root/dialog-root.d.ts +64 -1
  44. package/dist/dialog/root/dialog-root.js +49 -23
  45. package/dist/donut-chart/root/donut-chart-root.d.ts +25 -4
  46. package/dist/donut-chart/root/donut-chart-root.js +21 -6
  47. package/dist/drawer/root/drawer-root.d.ts +63 -2
  48. package/dist/drawer/root/drawer-root.js +95 -19
  49. package/dist/drawer/swipe-start.d.ts +9 -0
  50. package/dist/drawer/swipe-start.js +12 -0
  51. package/dist/element-events.generated.js +8 -5
  52. package/dist/empty/root/empty-root.d.ts +1 -1
  53. package/dist/file-input/root/file-input-root.d.ts +47 -0
  54. package/dist/file-input/root/file-input-root.js +60 -22
  55. package/dist/file-input/screen.d.ts +35 -0
  56. package/dist/file-input/screen.js +49 -0
  57. package/dist/filter-input/root/filter-input-root.d.ts +38 -4
  58. package/dist/filter-input/root/filter-input-root.js +67 -3
  59. package/dist/filter-input/suggest.d.ts +17 -0
  60. package/dist/filter-input/suggest.js +23 -0
  61. package/dist/format-date/options.d.ts +33 -0
  62. package/dist/format-date/options.js +42 -0
  63. package/dist/format-date/root/format-date-root.d.ts +51 -0
  64. package/dist/format-date/root/format-date-root.js +58 -38
  65. package/dist/heatmap/root/heatmap-root.d.ts +23 -6
  66. package/dist/heatmap/root/heatmap-root.js +24 -13
  67. package/dist/icon/index.d.ts +2 -0
  68. package/dist/icon/index.js +2 -0
  69. package/dist/icon/registry.d.ts +37 -0
  70. package/dist/icon/registry.js +83 -0
  71. package/dist/icon/root/icon-root.d.ts +30 -4
  72. package/dist/icon/root/icon-root.js +41 -6
  73. package/dist/icon/root/index.d.ts +2 -0
  74. package/dist/icon/root/index.js +2 -0
  75. package/dist/icon/set.d.ts +1 -0
  76. package/dist/icon/set.js +3 -0
  77. package/dist/image/root/image-root.d.ts +14 -0
  78. package/dist/image/root/image-root.js +15 -2
  79. package/dist/input/root/input-root.d.ts +11 -0
  80. package/dist/input/root/input-root.js +15 -0
  81. package/dist/kbd/root/kbd-root.d.ts +20 -13
  82. package/dist/kbd/root/kbd-root.js +35 -37
  83. package/dist/kbd/shortcut.d.ts +18 -0
  84. package/dist/kbd/shortcut.js +35 -0
  85. package/dist/legend/hidden-series.d.ts +8 -0
  86. package/dist/legend/hidden-series.js +13 -0
  87. package/dist/legend/root/legend-root.d.ts +56 -0
  88. package/dist/legend/root/legend-root.js +54 -5
  89. package/dist/lightbox/item/lightbox-item.d.ts +15 -0
  90. package/dist/lightbox/item/lightbox-item.js +10 -1
  91. package/dist/lightbox/root/lightbox-root.d.ts +61 -1
  92. package/dist/lightbox/root/lightbox-root.js +94 -4
  93. package/dist/line-chart/root/line-chart-root.d.ts +11 -3
  94. package/dist/line-chart/root/line-chart-root.js +19 -5
  95. package/dist/listbox/range.d.ts +17 -0
  96. package/dist/listbox/range.js +5 -0
  97. package/dist/listbox/root/listbox-root.d.ts +74 -3
  98. package/dist/listbox/root/listbox-root.js +87 -9
  99. package/dist/loader/busy.d.ts +17 -0
  100. package/dist/loader/busy.js +24 -0
  101. package/dist/loader/root/loader-root.d.ts +37 -0
  102. package/dist/loader/root/loader-root.js +52 -3
  103. package/dist/meter/root/meter-root.d.ts +7 -0
  104. package/dist/meter/root/meter-root.js +6 -3
  105. package/dist/notifications/feed-keys.d.ts +10 -0
  106. package/dist/notifications/feed-keys.js +14 -0
  107. package/dist/notifications/notification/notification.d.ts +17 -0
  108. package/dist/notifications/notification/notification.js +21 -2
  109. package/dist/notifications/root/notifications-root.d.ts +42 -0
  110. package/dist/notifications/root/notifications-root.js +60 -1
  111. package/dist/number-input/root/number-input-root.d.ts +47 -0
  112. package/dist/number-input/root/number-input-root.js +58 -22
  113. package/dist/object-inspector/root/object-inspector-root.d.ts +1 -0
  114. package/dist/object-inspector/root/object-inspector-root.js +1 -1
  115. package/dist/option/root/option-root.d.ts +54 -5
  116. package/dist/option/root/option-root.js +34 -5
  117. package/dist/pin-input/format.d.ts +7 -0
  118. package/dist/pin-input/format.js +16 -0
  119. package/dist/pin-input/root/pin-input-root.d.ts +21 -0
  120. package/dist/pin-input/root/pin-input-root.js +29 -2
  121. package/dist/popover/root/popover-root.d.ts +62 -4
  122. package/dist/popover/root/popover-root.js +53 -5
  123. package/dist/progress/root/progress-root.d.ts +7 -0
  124. package/dist/progress/root/progress-root.js +9 -3
  125. package/dist/qr-code/export.d.ts +31 -0
  126. package/dist/qr-code/export.js +10 -0
  127. package/dist/qr-code/root/qr-code-root.d.ts +26 -0
  128. package/dist/qr-code/root/qr-code-root.js +49 -2
  129. package/dist/radio/group/radio-group.d.ts +23 -0
  130. package/dist/radio/group/radio-group.js +18 -0
  131. package/dist/rating/root/rating-root.d.ts +25 -0
  132. package/dist/rating/root/rating-root.js +45 -3
  133. package/dist/scatter-chart/root/scatter-chart-root.d.ts +17 -3
  134. package/dist/scatter-chart/root/scatter-chart-root.js +25 -7
  135. package/dist/select/root/select-root.d.ts +24 -0
  136. package/dist/select/root/select-root.js +20 -6
  137. package/dist/skeleton/root/skeleton-root.d.ts +25 -0
  138. package/dist/skeleton/root/skeleton-root.js +17 -2
  139. package/dist/slider/root/slider-root.d.ts +39 -0
  140. package/dist/slider/root/slider-root.js +45 -9
  141. package/dist/stat/root/stat-root.d.ts +2 -0
  142. package/dist/stat/root/stat-root.js +1 -1
  143. package/dist/steps/step/step.d.ts +1 -0
  144. package/dist/steps/step/step.js +1 -1
  145. package/dist/switch/root/switch-root.d.ts +12 -2
  146. package/dist/switch/root/switch-root.js +6 -1
  147. package/dist/tag/group/tag-group.d.ts +107 -0
  148. package/dist/tag/group/tag-group.js +157 -0
  149. package/dist/tag/index.d.ts +1 -0
  150. package/dist/tag/index.js +1 -0
  151. package/dist/tag/root/tag-root.d.ts +60 -0
  152. package/dist/tag/root/tag-root.js +74 -18
  153. package/dist/tag/selection.d.ts +10 -0
  154. package/dist/tag/selection.js +12 -0
  155. package/dist/textarea/grow.d.ts +22 -0
  156. package/dist/textarea/grow.js +20 -0
  157. package/dist/textarea/root/textarea-root.d.ts +9 -0
  158. package/dist/textarea/root/textarea-root.js +9 -1
  159. package/dist/time-input/root/time-input-root.d.ts +44 -5
  160. package/dist/time-input/root/time-input-root.js +69 -39
  161. package/dist/time-picker/root/time-picker-root.d.ts +54 -8
  162. package/dist/time-picker/root/time-picker-root.js +121 -91
  163. package/dist/toast/hotkey.d.ts +22 -0
  164. package/dist/toast/hotkey.js +23 -0
  165. package/dist/toast/item/toast-item.d.ts +16 -1
  166. package/dist/toast/item/toast-item.js +41 -13
  167. package/dist/toast/root/toast-root.d.ts +42 -8
  168. package/dist/toast/root/toast-root.js +64 -4
  169. package/dist/toggle/group/toggle-group.d.ts +57 -15
  170. package/dist/toggle/group/toggle-group.js +69 -9
  171. package/dist/toggle/root/toggle-root.d.ts +12 -1
  172. package/dist/toggle/root/toggle-root.js +11 -3
  173. package/dist/tooltip/focus-target.d.ts +6 -0
  174. package/dist/tooltip/focus-target.js +9 -0
  175. package/dist/tooltip/root/tooltip-root.d.ts +42 -17
  176. package/dist/tooltip/root/tooltip-root.js +50 -9
  177. package/dist/tour/naming.d.ts +30 -0
  178. package/dist/tour/naming.js +10 -0
  179. package/dist/tour/root/tour-root.d.ts +35 -0
  180. package/dist/tour/root/tour-root.js +56 -5
  181. package/dist/tour/stop/tour-stop.d.ts +53 -8
  182. package/dist/tour/stop/tour-stop.js +45 -15
  183. package/dist/tour/wait.d.ts +11 -0
  184. package/dist/tour/wait.js +19 -0
  185. package/dist/trend/root/trend-root.d.ts +13 -0
  186. package/dist/trend/root/trend-root.js +14 -9
  187. package/lint.json +1 -1
  188. package/package.json +5 -5
  189. package/types/jsx.d.ts +4862 -254
  190. package/types/svelte.d.ts +1 -0
  191. package/types/vue.d.ts +1149 -67
@@ -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 { AriaForwardController, valueAsTime as asTime, customElement, fillTemplate, timeAsValue as fromTime, HelixFormElement, isTimeValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinTokens, valueAsMinutes, writeTime, writtenList, } from '@fusion.dev/helix-core';
7
+ import { AriaForwardController, valueAsTime as asTime, clockLocale, customElement, fillTemplate, timeAsValue as fromTime, HelixFormElement, isClockValue, MixinControllerOpen, MixinControllerValue, MixinField, MixinPickerEditing, MixinPickerField, MixinSegmentedField, MixinTokens, timeFault, writeClock, } from '@fusion.dev/helix-core';
8
8
  import { clock } from '@fusion.dev/helix-icons';
9
9
  import { nothing } from 'lit';
10
10
  import { property, state } from 'lit/decorators.js';
@@ -12,11 +12,11 @@ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
12
12
  import { html } from 'lit/static-html.js';
13
13
  import '../../tag/index.js';
14
14
  import '../../time-picker/index.js';
15
- let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEditing(MixinPickerField(MixinControllerOpen(MixinTokens(MixinControllerValue(MixinField(HelixFormElement)))))) {
15
+ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinSegmentedField(MixinPickerEditing(MixinPickerField(MixinControllerOpen(MixinTokens(MixinControllerValue(MixinField(HelixFormElement))))))) {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  this.aria = new AriaForwardController(this, {
19
- target: () => this.partNamed('control'),
19
+ target: () => this.partNamed('control') ?? this.segmentGroup,
20
20
  });
21
21
  this.autocomplete = '';
22
22
  this.announcesInput = true;
@@ -26,6 +26,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
26
26
  this.min = '00:00';
27
27
  this.placeholder = 'HH:mm';
28
28
  this.removeLabel = 'Remove {name}';
29
+ this.seconds = false;
29
30
  this.step = 15;
30
31
  this.timeStyle = 'local';
31
32
  this.triggerLabel = 'Choose a time';
@@ -35,7 +36,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
35
36
  return;
36
37
  }
37
38
  const held = this.held;
38
- if (event.key === 'Enter' && isTimeValue(this.draft)) {
39
+ if (event.key === 'Enter' && this.isTime(this.draft)) {
39
40
  event.preventDefault();
40
41
  if (!held.includes(this.draft)) {
41
42
  this.requestPicked([...held, this.draft].sort().join(','));
@@ -62,7 +63,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
62
63
  .split(',')
63
64
  .map((one) => one.trim())
64
65
  .filter(Boolean);
65
- const whole = held.length > 0 && held.every(isTimeValue);
66
+ const whole = held.length > 0 && held.every((one) => this.isTime(one));
66
67
  this.requestValue(whole ? held.join(',') : typed);
67
68
  this.restore();
68
69
  };
@@ -94,8 +95,25 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
94
95
  .map((one) => one.trim())
95
96
  .filter(Boolean);
96
97
  }
98
+ get segmentable() {
99
+ return this.mode === undefined;
100
+ }
101
+ get segmentedKind() {
102
+ return 'time';
103
+ }
104
+ get segmentLocale() {
105
+ return this.locale;
106
+ }
107
+ get segmentOptions() {
108
+ return { hourCycle: this.hourCycle, seconds: this.seconds };
109
+ }
110
+ isTime(at) {
111
+ return isClockValue(at, this.seconds);
112
+ }
97
113
  written(at) {
98
- return this.timeStyle === 'iso' || !isTimeValue(at) ? at : writeTime(at, this.locale);
114
+ return this.timeStyle === 'iso' || !this.isTime(at)
115
+ ? at
116
+ : writeClock(at, clockLocale(this.locale, this.hourCycle), this.seconds);
99
117
  }
100
118
  get display() {
101
119
  if (this.mode === 'multiple') {
@@ -117,33 +135,33 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
117
135
  }
118
136
  get picked() {
119
137
  const held = this.held;
120
- return held.length > 0 && held.every(isTimeValue) ? held.join(',') : '';
138
+ return held.length > 0 && held.every((one) => this.isTime(one)) ? held.join(',') : '';
121
139
  }
122
140
  get answers() {
123
141
  return this.mode === undefined ? undefined : this.held;
124
142
  }
125
143
  validate() {
126
144
  const held = this.held;
127
- const floor = valueAsMinutes(this.min) ?? 0;
128
- const ceiling = valueAsMinutes(this.max) ?? 1439;
129
- if (held.length > 0 && !held.every(isTimeValue)) {
145
+ const shape = this.seconds ? 'HH:mm:ss' : 'HH:mm';
146
+ if (held.length > 0 && !held.every((one) => this.isTime(one))) {
130
147
  return (this.badInputMessage ||
131
148
  (this.mode === undefined
132
- ? 'Enter a time as HH:mm.'
133
- : 'Enter times as HH:mm, separated by commas.'));
149
+ ? `Enter a time as ${shape}.`
150
+ : `Enter times as ${shape}, separated by commas.`));
134
151
  }
135
- if (held.some((one) => (valueAsMinutes(one) ?? 0) < floor)) {
152
+ const rules = { disableTimes: this.disableTimes, max: this.max, min: this.min };
153
+ const faults = held.map((one) => timeFault(one, rules));
154
+ if (faults.includes('rangeUnderflow')) {
136
155
  return fillTemplate(this.rangeUnderflowMessage || 'Choose a time at or after {min}.', {
137
- min: writeTime(this.min, this.locale),
156
+ min: writeClock(this.min, clockLocale(this.locale, this.hourCycle), this.seconds),
138
157
  });
139
158
  }
140
- if (held.some((one) => (valueAsMinutes(one) ?? 0) > ceiling)) {
159
+ if (faults.includes('rangeOverflow')) {
141
160
  return fillTemplate(this.rangeOverflowMessage || 'Choose a time at or before {max}.', {
142
- max: writeTime(this.max, this.locale),
161
+ max: writeClock(this.max, clockLocale(this.locale, this.hourCycle), this.seconds),
143
162
  });
144
163
  }
145
- const barred = writtenList(this.disableTimes);
146
- if (held.some((one) => barred.includes(one))) {
164
+ if (faults.includes('unavailable')) {
147
165
  return this.unavailableMessage || 'Choose a time that is available.';
148
166
  }
149
167
  if (this.mode === 'range' && held.length > 2) {
@@ -181,9 +199,11 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
181
199
  disable-times=${this.disableTimes || nothing}
182
200
  manual
183
201
  label=${this.label || 'Time'}
202
+ hour-cycle=${this.hourCycle ?? nothing}
184
203
  locale=${this.locale || nothing}
185
204
  max=${this.max}
186
205
  min=${this.min}
206
+ ?seconds=${this.seconds}
187
207
  step=${this.step}
188
208
  .value=${this.picked}
189
209
  @helix-before-change=${this.handlePicked}
@@ -194,7 +214,7 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
194
214
  renderTag(at) {
195
215
  return html `<${this.tag('tag')}
196
216
  part="time"
197
- exportparts="dismiss: time-dismiss, dismiss-mark: time-dismiss-mark, label: time-label, start: time-start"
217
+ exportparts="cell: time-cell, dismiss: time-dismiss, dismiss-mark: time-dismiss-mark, label: time-label, link: time-link, start: time-start"
198
218
  dismissible
199
219
  dismiss-label=${fillTemplate(this.removeLabel, { name: this.written(at) })}
200
220
  ?disabled=${this.isDisabled}
@@ -216,26 +236,30 @@ let HelixHeadlessTimeInput = class HelixHeadlessTimeInput extends MixinPickerEdi
216
236
  ${this.mode === 'multiple'
217
237
  ? this.renderTokenRow(this.shownTimes.map((at) => this.renderTag(at)), this.restCount)
218
238
  : nothing}
219
- <input
220
- part="control"
221
- id=${this.controlId}
222
- type="text"
223
- .value=${this.display}
224
- name=${this.name || nothing}
225
- placeholder=${this.mode === 'multiple' && this.held.length > 0 ? nothing : this.placeholder || nothing}
226
- autocomplete=${this.autocomplete || nothing}
227
- aria-describedby=${this.describedBy ?? nothing}
228
- aria-invalid=${this.invalidity ?? nothing}
229
- ?disabled=${this.isDisabled}
230
- ?readonly=${this.readOnly}
231
- ?required=${this.required}
232
- @blur=${this.handleBlur}
233
- @change=${this.handleCommit}
234
- @focus=${this.handleFocus}
235
- @input=${this.handleInput}
236
- @keydown=${this.handleDraftKey}
237
- @keypress=${this.handleKeypress}
238
- />
239
+ ${this.segmentsShown
240
+ ? this.renderSegments()
241
+ : html `<input
242
+ part="control"
243
+ id=${this.controlId}
244
+ type="text"
245
+ .value=${this.display}
246
+ name=${this.name || nothing}
247
+ placeholder=${this.mode === 'multiple' && this.held.length > 0
248
+ ? nothing
249
+ : this.placeholder || nothing}
250
+ autocomplete=${this.autocomplete || nothing}
251
+ aria-describedby=${this.describedBy ?? nothing}
252
+ aria-invalid=${this.invalidity ?? nothing}
253
+ ?disabled=${this.isDisabled}
254
+ ?readonly=${this.readOnly}
255
+ ?required=${this.required}
256
+ @blur=${this.handleBlur}
257
+ @change=${this.handleCommit}
258
+ @focus=${this.handleFocus}
259
+ @input=${this.handleInput}
260
+ @keydown=${this.handleDraftKey}
261
+ @keypress=${this.handleKeypress}
262
+ />`}
239
263
  <button
240
264
  part="trigger"
241
265
  type="button"
@@ -284,6 +308,9 @@ __decorate([
284
308
  __decorate([
285
309
  property({ attribute: 'disable-times' })
286
310
  ], HelixHeadlessTimeInput.prototype, "disableTimes", void 0);
311
+ __decorate([
312
+ property({ attribute: 'hour-cycle' })
313
+ ], HelixHeadlessTimeInput.prototype, "hourCycle", void 0);
287
314
  __decorate([
288
315
  property()
289
316
  ], HelixHeadlessTimeInput.prototype, "locale", void 0);
@@ -311,6 +338,9 @@ __decorate([
311
338
  __decorate([
312
339
  property({ attribute: 'remove-label' })
313
340
  ], HelixHeadlessTimeInput.prototype, "removeLabel", void 0);
341
+ __decorate([
342
+ property({ type: Boolean })
343
+ ], HelixHeadlessTimeInput.prototype, "seconds", void 0);
314
344
  __decorate([
315
345
  property({ type: Number })
316
346
  ], HelixHeadlessTimeInput.prototype, "step", void 0);
@@ -1,4 +1,4 @@
1
- import { HelixFormElement } from '@fusion.dev/helix-core';
1
+ import { HelixFormElement, type HourCycle } from '@fusion.dev/helix-core';
2
2
  import { type PropertyValues, type TemplateResult } from 'lit';
3
3
  import '../../listbox/index.js';
4
4
  import '../../option/index.js';
@@ -10,14 +10,19 @@ declare const HelixHeadlessTimePicker_base: (new (...args: any[]) => import("@fu
10
10
  * Shows the times at each `step` as a `Listbox`, which provides the keyboard
11
11
  * behavior, typeahead, scrolling into view, and announcements for a set of
12
12
  * options. `variant="wheels"` shows a column each for the hour, the minute, and
13
- * the meridiem.
13
+ * the meridiem, and one for the second with `seconds`. Left and Right move
14
+ * between the wheels, and Tab does too.
15
+ *
16
+ * `hour-cycle` writes every time on a twelve or a twenty-four hour clock
17
+ * whatever the locale, and `seconds` holds times to the second.
14
18
  *
15
19
  * The step keeps the list usable. At the default of 15 minutes a day is 96
16
20
  * rows, which people can scroll or type into. At 1 minute it is 1,440. Use the
17
21
  * list for the times your product offers, and Time Input for any time, the same
18
22
  * way Date Input separates typing a date from picking one on the calendar.
19
23
  *
20
- * The value is always `HH:mm` on a 24-hour clock. A form submits that shape,
24
+ * The value is always `HH:mm` on a 24-hour clock, or `HH:mm:ss` with
25
+ * `seconds`. A form submits that shape,
21
26
  * `min` and `max` compare against it, and it sorts as a string. Each row's text
22
27
  * follows the person's own conventions, from `Intl`.
23
28
  *
@@ -96,6 +101,15 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
96
101
  * reached honestly rather than by handing over an empty range.
97
102
  */
98
103
  disableTimes: string;
104
+ /**
105
+ * The clock the times are written on: `h12` for twelve hours with a
106
+ * meridiem, `h23` for twenty-four.
107
+ *
108
+ * Absent is the locale's own, which is right for a reader's own form. Set it
109
+ * where every reader must see the same clock whatever their language, as a
110
+ * timetable does. The value is `HH:mm` on twenty-four hours either way.
111
+ */
112
+ hourCycle?: HourCycle;
99
113
  /**
100
114
  * What the wheel of hours is called, read by screen readers.
101
115
  */
@@ -178,15 +192,19 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
178
192
  */
179
193
  rangeUnderflowMessage?: string;
180
194
  /**
181
- * Every time on offer, as minutes since midnight.
195
+ * Every time on offer, as seconds since midnight.
182
196
  *
183
197
  * Built from `min` upward rather than from midnight, so a list that starts at
184
198
  * `09:00` steps from nine rather than offering `09:15` because that is where
185
199
  * the quarter hours from midnight happen to land. A step that does not divide
186
200
  * the hour is a real thing to want, twenty minutes being the obvious one, and
187
- * this is the reading that makes it behave.
201
+ * this is the reading that makes it behave. See `offeredTimes`.
188
202
  */
189
203
  private get times();
204
+ /** The locale with the clock `hour-cycle` asks for. */
205
+ private get clock();
206
+ /** A time as the value writes it, to the second where `seconds` asks. */
207
+ private valueFor;
190
208
  /**
191
209
  * Whether a time is barred by name.
192
210
  *
@@ -199,6 +217,8 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
199
217
  * outside the bounds is absent rather than present and refused.
200
218
  */
201
219
  private barred;
220
+ /** The same question of seconds since midnight, matching `09:30` and `09:30:00` alike. */
221
+ private barredAt;
202
222
  /**
203
223
  * The offered time nearest to one the wheels built, which keeps them inside
204
224
  * `min`, `max` and `step`.
@@ -243,7 +263,7 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
243
263
  private readonly handleChange;
244
264
  /** Whether a time falls inside a range, which is what gets banded. */
245
265
  private between;
246
- /** The three readings a wheel shows, from the value or from `min`. */
266
+ /** The readings the wheels show, from the value or from `min`. */
247
267
  private get parts();
248
268
  /** Puts a changed column back together into a whole time. */
249
269
  private readonly moveColumn;
@@ -251,6 +271,8 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
251
271
  private get hours();
252
272
  /** Every minute offered within the hour currently shown. */
253
273
  private get minutes();
274
+ /** Every second offered within the minute currently shown. */
275
+ private get secondsShown();
254
276
  /**
255
277
  * Scrolls each wheel to its selected value, and the list to its selected
256
278
  * time.
@@ -299,7 +321,22 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
299
321
  */
300
322
  required: boolean;
301
323
  /**
302
- * How far apart the offered times are, in minutes.
324
+ * What the wheel of seconds is called, read by screen readers.
325
+ */
326
+ secondLabel: string;
327
+ /**
328
+ * Whether times carry their seconds.
329
+ *
330
+ * The value becomes `HH:mm:ss`, each time is written with its seconds, the
331
+ * wheels take a column of seconds, and `step` counts seconds, the unit
332
+ * `<input type="time">` counts in. A list at a step of one second is 86,400
333
+ * rows, so give `seconds` a `step` and bounds that keep it a list, or use
334
+ * the wheels.
335
+ */
336
+ seconds: boolean;
337
+ /**
338
+ * How far apart the offered times are, in minutes, or in seconds with
339
+ * `seconds`.
303
340
  *
304
341
  * Fifteen, which is four rows an hour and ninety-six in a day: enough that a
305
342
  * reader scrolls rather than hunts, and few enough that the list is a list.
@@ -446,7 +483,16 @@ export declare class HelixHeadlessTimePicker extends HelixHeadlessTimePicker_bas
446
483
  * barred only when every minute in it is, since one free minute is a reason to
447
484
  * open the wheel rather than to close it.
448
485
  */
449
- protected renderColumn(part: 'hour' | 'meridiem' | 'minute', label: string, values: string[], written: (one: string) => string, value: string, barred?: (one: string) => boolean): TemplateResult;
486
+ protected renderColumn(part: 'hour' | 'meridiem' | 'minute' | 'second', label: string, values: string[], written: (one: string) => string, value: string, barred?: (one: string) => boolean): TemplateResult;
487
+ /**
488
+ * Left and Right move between the wheels, as Web Awesome's columns do, and
489
+ * Tab still does.
490
+ *
491
+ * A wheel is a listbox and takes Up and Down, so the horizontal pair was
492
+ * free. Along the line of text, which runs from the right on a right-to-left
493
+ * page, and stopping at the first and last wheel.
494
+ */
495
+ private readonly handleColumnsKeydown;
450
496
  private renderSpinner;
451
497
  /**
452
498
  * The flat list of times, for the variant that is not wheels, behind a seam the styled tier can move.