@editora/ui-core 0.1.19 → 0.1.20

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 (299) hide show
  1. package/dist/{ElementBase-1b301e7f.js → ElementBase-EV6mVBUV.js} +1 -1
  2. package/dist/{ElementBase-909688f3.mjs → ElementBase-YlTLMsGk.mjs} +3 -3
  3. package/dist/accordion.cjs.js +3 -3
  4. package/dist/accordion.esm.js +39 -62
  5. package/dist/alert-dialog.cjs.js +19 -19
  6. package/dist/alert-dialog.esm.js +69 -87
  7. package/dist/alert.cjs.js +1 -1
  8. package/dist/alert.esm.js +4 -7
  9. package/dist/anchor.cjs.js +2 -2
  10. package/dist/anchor.esm.js +3 -3
  11. package/dist/animated-beam.cjs.js +83 -83
  12. package/dist/animated-beam.esm.js +250 -277
  13. package/dist/animated-list.cjs.js +4 -4
  14. package/dist/animated-list.esm.js +47 -61
  15. package/dist/animated-text.cjs.js +2 -2
  16. package/dist/animated-text.esm.js +13 -24
  17. package/dist/app-header.cjs.js +3 -3
  18. package/dist/app-header.esm.js +11 -13
  19. package/dist/aspect-ratio.cjs.js +1 -1
  20. package/dist/aspect-ratio.esm.js +4 -7
  21. package/dist/avatar.cjs.js +1 -1
  22. package/dist/avatar.esm.js +7 -13
  23. package/dist/badge.cjs.js +1 -1
  24. package/dist/badge.esm.js +4 -7
  25. package/dist/block-controls.cjs.js +2 -2
  26. package/dist/block-controls.esm.js +19 -35
  27. package/dist/box.cjs.js +1 -1
  28. package/dist/box.esm.js +8 -15
  29. package/dist/breadcrumb.cjs.js +2 -2
  30. package/dist/breadcrumb.esm.js +20 -37
  31. package/dist/button.cjs.js +1 -521
  32. package/dist/button.esm.js +2 -671
  33. package/dist/{calendar-2c11b824.mjs → calendar-DLY4acgn.mjs} +293 -342
  34. package/dist/{calendar-a8735e40.js → calendar-Dkof-FTK.js} +25 -25
  35. package/dist/calendar.cjs.js +1 -1
  36. package/dist/calendar.esm.js +8 -9
  37. package/dist/card.cjs.js +4 -4
  38. package/dist/card.esm.js +13 -19
  39. package/dist/chart.cjs.js +64 -64
  40. package/dist/chart.esm.js +223 -254
  41. package/dist/checkbox.cjs.js +1 -1
  42. package/dist/checkbox.esm.js +2 -3
  43. package/dist/collapsible.cjs.js +1 -1
  44. package/dist/collapsible.esm.js +5 -9
  45. package/dist/{collection-a1aac0c6.mjs → collection-C7URGjEI.mjs} +8 -14
  46. package/dist/collection.cjs.js +1 -1
  47. package/dist/collection.esm.js +4 -7
  48. package/dist/color-picker.cjs.js +9 -9
  49. package/dist/color-picker.esm.js +189 -252
  50. package/dist/combobox.cjs.js +13 -13
  51. package/dist/combobox.esm.js +93 -126
  52. package/dist/command-palette.cjs.js +3 -3
  53. package/dist/command-palette.esm.js +19 -30
  54. package/dist/command.cjs.js +4 -4
  55. package/dist/command.esm.js +41 -53
  56. package/dist/components/ui-orbiter.d.ts.map +1 -1
  57. package/dist/components/ui-skeleton.d.ts.map +1 -1
  58. package/dist/components/ui-split-button.d.ts +1 -0
  59. package/dist/components/ui-split-button.d.ts.map +1 -1
  60. package/dist/components/ui-time-picker.d.ts.map +1 -1
  61. package/dist/container.cjs.js +2 -2
  62. package/dist/container.esm.js +2 -3
  63. package/dist/context-menu.cjs.js +8 -8
  64. package/dist/context-menu.esm.js +157 -219
  65. package/dist/control-group.cjs.js +1 -1
  66. package/dist/control-group.esm.js +2 -3
  67. package/dist/data-table.cjs.js +4 -4
  68. package/dist/data-table.esm.js +299 -381
  69. package/dist/date-field.cjs.js +3 -3
  70. package/dist/date-field.esm.js +68 -80
  71. package/dist/date-picker.cjs.js +9 -9
  72. package/dist/date-picker.esm.js +69 -97
  73. package/dist/date-range-picker.cjs.js +3 -3
  74. package/dist/date-range-picker.esm.js +32 -56
  75. package/dist/date-range-time-picker.cjs.js +9 -9
  76. package/dist/date-range-time-picker.esm.js +111 -140
  77. package/dist/date-time-picker.cjs.js +4 -4
  78. package/dist/date-time-picker.esm.js +112 -144
  79. package/dist/date-time-utils-Dmost5Ee.js +1 -0
  80. package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
  81. package/dist/description.cjs.js +1 -1
  82. package/dist/description.esm.js +3 -5
  83. package/dist/dialog.cjs.js +12 -12
  84. package/dist/dialog.esm.js +44 -63
  85. package/dist/direction-provider.cjs.js +1 -1
  86. package/dist/direction-provider.esm.js +2 -3
  87. package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
  88. package/dist/dismissable-layer-DNfrKA20.js +1 -0
  89. package/dist/dismissable-layer.cjs.js +2 -2
  90. package/dist/dismissable-layer.esm.js +4 -6
  91. package/dist/dock.cjs.js +5 -5
  92. package/dist/dock.esm.js +134 -155
  93. package/dist/drawer.cjs.js +2 -2
  94. package/dist/drawer.esm.js +18 -35
  95. package/dist/dropdown.cjs.js +2 -2
  96. package/dist/dropdown.esm.js +119 -149
  97. package/dist/dropzone.cjs.js +1 -1
  98. package/dist/dropzone.esm.js +0 -1
  99. package/dist/empty-state.cjs.js +1 -1
  100. package/dist/empty-state.esm.js +1 -1
  101. package/dist/field-error.cjs.js +1 -1
  102. package/dist/field-error.esm.js +3 -5
  103. package/dist/field.cjs.js +5 -5
  104. package/dist/field.esm.js +27 -34
  105. package/dist/fieldset.cjs.js +4 -4
  106. package/dist/fieldset.esm.js +19 -24
  107. package/dist/file-upload.cjs.js +4 -4
  108. package/dist/file-upload.esm.js +69 -93
  109. package/dist/flex.cjs.js +1 -1
  110. package/dist/flex.esm.js +5 -9
  111. package/dist/floating-toolbar.cjs.js +4 -4
  112. package/dist/floating-toolbar.esm.js +60 -85
  113. package/dist/focus-scope-Bwug2gDv.js +1 -0
  114. package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
  115. package/dist/focus-scope.cjs.js +2 -2
  116. package/dist/focus-scope.esm.js +15 -20
  117. package/dist/form.cjs.js +2 -2
  118. package/dist/form.esm.js +26 -53
  119. package/dist/gantt.cjs.js +43 -43
  120. package/dist/gantt.esm.js +295 -322
  121. package/dist/grid.cjs.js +1 -1
  122. package/dist/grid.esm.js +5 -9
  123. package/dist/hover-card.cjs.js +4 -4
  124. package/dist/hover-card.esm.js +22 -28
  125. package/dist/icon-cloud.cjs.js +7 -7
  126. package/dist/icon-cloud.esm.js +48 -62
  127. package/dist/icon.cjs.js +1 -1
  128. package/dist/icon.esm.js +2 -4
  129. package/dist/index.cjs.js +1 -1
  130. package/dist/index.esm.js +378 -390
  131. package/dist/inline-edit.cjs.js +11 -11
  132. package/dist/inline-edit.esm.js +32 -36
  133. package/dist/input.cjs.js +17 -17
  134. package/dist/input.esm.js +50 -63
  135. package/dist/label.cjs.js +2 -2
  136. package/dist/label.esm.js +8 -17
  137. package/dist/layout.cjs.js +2 -2
  138. package/dist/layout.esm.js +20 -26
  139. package/dist/listbox-B6QgECax.js +46 -0
  140. package/dist/listbox-DJamVeFj.mjs +200 -0
  141. package/dist/listbox.cjs.js +1 -1
  142. package/dist/listbox.esm.js +2 -4
  143. package/dist/marquee.cjs.js +5 -5
  144. package/dist/marquee.esm.js +33 -50
  145. package/dist/masonry-grid.cjs.js +1 -1
  146. package/dist/masonry-grid.esm.js +5 -9
  147. package/dist/menu.cjs.js +3 -3
  148. package/dist/menu.esm.js +106 -126
  149. package/dist/menubar.cjs.js +5 -5
  150. package/dist/menubar.esm.js +118 -164
  151. package/dist/meter.cjs.js +2 -2
  152. package/dist/meter.esm.js +4 -4
  153. package/dist/multi-select.cjs.js +4 -4
  154. package/dist/multi-select.esm.js +120 -140
  155. package/dist/navigation-menu.cjs.js +4 -4
  156. package/dist/navigation-menu.esm.js +44 -55
  157. package/dist/number-field.cjs.js +2 -2
  158. package/dist/number-field.esm.js +73 -98
  159. package/dist/number-ticker.cjs.js +3 -3
  160. package/dist/number-ticker.esm.js +22 -43
  161. package/dist/odometer.cjs.js +1 -1
  162. package/dist/odometer.esm.js +5 -9
  163. package/dist/orbiter.cjs.js +13 -13
  164. package/dist/orbiter.esm.js +79 -90
  165. package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
  166. package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
  167. package/dist/pagination.cjs.js +2 -2
  168. package/dist/pagination.esm.js +14 -18
  169. package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
  170. package/dist/panel-group-CaD0_KQf.js +36 -0
  171. package/dist/panel-group.cjs.js +1 -1
  172. package/dist/panel-group.esm.js +2 -5
  173. package/dist/panel.cjs.js +4 -4
  174. package/dist/panel.esm.js +8 -10
  175. package/dist/password-field.cjs.js +9 -9
  176. package/dist/password-field.esm.js +62 -82
  177. package/dist/pin-input.cjs.js +3 -3
  178. package/dist/pin-input.esm.js +33 -39
  179. package/dist/placement-grid.cjs.js +4 -4
  180. package/dist/placement-grid.esm.js +108 -131
  181. package/dist/plugin-panel.cjs.js +7 -7
  182. package/dist/plugin-panel.esm.js +13 -15
  183. package/dist/popover.cjs.js +2 -2
  184. package/dist/popover.esm.js +21 -31
  185. package/dist/portal-DgpQ3Jo1.js +1 -0
  186. package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
  187. package/dist/portal.cjs.js +2 -2
  188. package/dist/portal.esm.js +10 -19
  189. package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
  190. package/dist/positioner-D_fqyx_j.js +1 -0
  191. package/dist/positioner.cjs.js +2 -2
  192. package/dist/positioner.esm.js +11 -18
  193. package/dist/presence.cjs.js +1 -1
  194. package/dist/presence.esm.js +7 -13
  195. package/dist/progress.cjs.js +1 -1
  196. package/dist/progress.esm.js +5 -9
  197. package/dist/quick-actions.cjs.js +6 -6
  198. package/dist/quick-actions.esm.js +52 -62
  199. package/dist/radio-group.cjs.js +13 -13
  200. package/dist/radio-group.esm.js +39 -51
  201. package/dist/radio.cjs.js +1 -1
  202. package/dist/radio.esm.js +5 -9
  203. package/dist/rating.cjs.js +1 -1
  204. package/dist/rating.esm.js +12 -23
  205. package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
  206. package/dist/roving-focus-group.cjs.js +1 -1
  207. package/dist/roving-focus-group.esm.js +3 -5
  208. package/dist/runtime-CTaOSmBj.js +1 -0
  209. package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
  210. package/dist/runtime.cjs.js +1 -1
  211. package/dist/runtime.esm.js +6 -6
  212. package/dist/scroll-area.cjs.js +3 -3
  213. package/dist/scroll-area.esm.js +38 -46
  214. package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
  215. package/dist/section.cjs.js +1 -1
  216. package/dist/section.esm.js +1 -1
  217. package/dist/select.cjs.js +7 -7
  218. package/dist/select.esm.js +67 -97
  219. package/dist/selection-popup.cjs.js +1 -1
  220. package/dist/selection-popup.esm.js +8 -15
  221. package/dist/separator.cjs.js +1 -1
  222. package/dist/separator.esm.js +1 -1
  223. package/dist/sidebar.cjs.js +18 -18
  224. package/dist/sidebar.esm.js +117 -139
  225. package/dist/skeleton.cjs.js +11 -11
  226. package/dist/skeleton.esm.js +27 -24
  227. package/dist/slider.cjs.js +1 -1
  228. package/dist/slider.esm.js +6 -11
  229. package/dist/slot.cjs.js +4 -4
  230. package/dist/slot.esm.js +16 -19
  231. package/dist/sortable.cjs.js +45 -45
  232. package/dist/sortable.esm.js +421 -524
  233. package/dist/spinning-text.cjs.js +12 -12
  234. package/dist/spinning-text.esm.js +80 -92
  235. package/dist/split-button.cjs.js +4 -4
  236. package/dist/split-button.esm.js +77 -62
  237. package/dist/splitter.cjs.js +1 -1
  238. package/dist/splitter.esm.js +1 -1
  239. package/dist/stepper.cjs.js +8 -8
  240. package/dist/stepper.esm.js +32 -52
  241. package/dist/switch.cjs.js +7 -7
  242. package/dist/switch.esm.js +23 -31
  243. package/dist/table.cjs.js +2 -2
  244. package/dist/table.esm.js +46 -56
  245. package/dist/tabs.cjs.js +3 -3
  246. package/dist/tabs.esm.js +35 -55
  247. package/dist/tags-input.cjs.js +4 -4
  248. package/dist/tags-input.esm.js +45 -62
  249. package/dist/textarea.cjs.js +6 -6
  250. package/dist/textarea.esm.js +32 -41
  251. package/dist/time-field.cjs.js +4 -4
  252. package/dist/time-field.esm.js +70 -84
  253. package/dist/time-picker.cjs.js +22 -22
  254. package/dist/time-picker.esm.js +88 -110
  255. package/dist/timeline.cjs.js +1 -1
  256. package/dist/timeline.esm.js +3 -5
  257. package/dist/toast.cjs.js +2 -2
  258. package/dist/toast.esm.js +33 -47
  259. package/dist/toggle-group.cjs.js +6 -6
  260. package/dist/toggle-group.esm.js +85 -105
  261. package/dist/toggle.cjs.js +1 -1
  262. package/dist/toggle.esm.js +3 -5
  263. package/dist/toolbar.cjs.js +1 -1
  264. package/dist/toolbar.esm.js +13 -24
  265. package/dist/tooltip.cjs.js +2 -2
  266. package/dist/tooltip.esm.js +31 -42
  267. package/dist/transfer-list.cjs.js +19 -19
  268. package/dist/transfer-list.esm.js +98 -111
  269. package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
  270. package/dist/tree-Dx_kv_ih.js +39 -0
  271. package/dist/tree-item.cjs.js +2 -2
  272. package/dist/tree-item.esm.js +2 -3
  273. package/dist/tree.cjs.js +1 -1
  274. package/dist/tree.esm.js +2 -5
  275. package/dist/ui-button-Q0GNNWKC.mjs +665 -0
  276. package/dist/ui-button-rXQOS9QJ.js +521 -0
  277. package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
  278. package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
  279. package/dist/visually-hidden.cjs.js +1 -1
  280. package/dist/visually-hidden.esm.js +1 -1
  281. package/dist/wizard.cjs.js +14 -14
  282. package/dist/wizard.esm.js +85 -105
  283. package/package.json +2 -2
  284. package/dist/date-time-utils-66480de4.js +0 -1
  285. package/dist/date-time-utils-a2c7af25.mjs +0 -307
  286. package/dist/dismissable-layer-193e3bed.js +0 -1
  287. package/dist/focus-scope-2b12b4e7.js +0 -1
  288. package/dist/listbox-308789a0.mjs +0 -210
  289. package/dist/listbox-ef2f708e.js +0 -46
  290. package/dist/panel-group-40254cdd.js +0 -36
  291. package/dist/portal-c69756c0.js +0 -1
  292. package/dist/positioner-33529bb8.js +0 -1
  293. package/dist/runtime-3f13807b.js +0 -1
  294. package/dist/tree-0a7a8d05.js +0 -39
  295. /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
  296. /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
  297. /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
  298. /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
  299. /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
@@ -1,22 +1,20 @@
1
- import { E as x } from "./ElementBase-909688f3.mjs";
2
- import { c as E } from "./dismissable-layer-9c7e6b58.mjs";
3
- import { r as k } from "./calendar-2c11b824.mjs";
4
- import { r as w, e as S, i as m, s as C, q as b, t as B, w as v, l as O, c as I } from "./date-time-utils-a2c7af25.mjs";
5
- import "./scroll-lock-31da444f.mjs";
6
- import "./positioner-e9770c66.mjs";
7
- const A = `
1
+ import { E } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { c as k } from "./dismissable-layer-BmPIoK80.mjs";
3
+ import { r as w } from "./calendar-DLY4acgn.mjs";
4
+ import { r as S, e as C, i as b, s as B, q as f, t as O, w as y, l as I, c as A } from "./date-time-utils-y1N2gvG2.mjs";
5
+ const D = `
8
6
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
9
7
  <path d="M10 2.4a7.6 7.6 0 1 1 0 15.2A7.6 7.6 0 0 1 10 2.4Zm0 1.4a6.2 6.2 0 1 0 0 12.4 6.2 6.2 0 0 0 0-12.4Zm.7 2.4a.7.7 0 0 0-1.4 0v4.1c0 .2.1.4.2.5l2.6 2.5a.7.7 0 1 0 1-1l-2.4-2.3v-3.8Z" fill="currentColor"/>
10
8
  </svg>
11
- `, D = `
9
+ `, $ = `
12
10
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
13
11
  <path d="m6 6 8 8M14 6l-8 8" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round"/>
14
12
  </svg>
15
- `, $ = `
13
+ `, M = `
16
14
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
17
15
  <path d="m5.6 7.6 4.4 4.6 4.4-4.6" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/>
18
16
  </svg>
19
- `, M = `
17
+ `, z = `
20
18
  :host {
21
19
  --ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
22
20
  --ui-dp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
@@ -145,7 +143,7 @@ const A = `
145
143
  outline-color: Highlight;
146
144
  }
147
145
  }
148
- `, z = `
146
+ `, L = `
149
147
  .ui-time-picker-overlay-host {
150
148
  --ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
151
149
  --ui-dp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 72%, transparent);
@@ -260,17 +258,20 @@ const A = `
260
258
  }
261
259
  }
262
260
  `;
263
- function h(p) {
264
- return String(p).padStart(2, "0");
261
+ function _(d) {
262
+ return String(d).padStart(2, "0");
265
263
  }
266
- function _(p, t, e, i) {
267
- const s = h(p), n = h(t);
268
- return i ? `${s}:${n}:${h(e)}` : `${s}:${n}`;
264
+ function c(d) {
265
+ return d.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
269
266
  }
270
- class L extends x {
267
+ function m(d, t, e, i) {
268
+ const s = _(d), n = _(t);
269
+ return i ? `${s}:${n}:${_(e)}` : `${s}:${n}`;
270
+ }
271
+ class T extends E {
271
272
  constructor() {
272
- super(...arguments), this._value = null, this._pending = null, this._draft = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._dismissableLayer = null, this._releaseScrollLock = null, this._isInitialized = !1, this._hasView = !1, this._restoreFocusEl = null, this._overlayKey = null, this._fieldEl = null, this._labelEl = null, this._labelTextEl = null, this._requiredEl = null, this._inputEl = null, this._clearBtn = null, this._toggleBtn = null, this._hintEl = null, this._errorEl = null, this._hiddenInputEl = null, this._schedulePosition = w(() => this._positionOverlay()), this._onRootClickBound = (t) => this._onRootClick(t), this._onRootInputBound = (t) => this._onRootInput(t), this._onRootBlurBound = (t) => this._onRootBlur(t), this._onRootKeyDownBound = (t) => this._onRootKeyDown(t), this._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayChangeBound = (t) => this._onOverlayChange(t), this._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (t) => {
273
- S(t, [this._overlay]) || this._schedulePosition.run();
273
+ super(...arguments), this._value = null, this._pending = null, this._draft = "", this._inlineError = "", this._open = !1, this._syncing = !1, this._overlay = null, this._dismissableLayer = null, this._releaseScrollLock = null, this._isInitialized = !1, this._hasView = !1, this._restoreFocusEl = null, this._overlayKey = null, this._fieldEl = null, this._labelEl = null, this._labelTextEl = null, this._requiredEl = null, this._inputEl = null, this._clearBtn = null, this._toggleBtn = null, this._hintEl = null, this._errorEl = null, this._hiddenInputEl = null, this._schedulePosition = S(() => this._positionOverlay()), this._onRootClickBound = (t) => this._onRootClick(t), this._onRootInputBound = (t) => this._onRootInput(t), this._onRootBlurBound = (t) => this._onRootBlur(t), this._onRootKeyDownBound = (t) => this._onRootKeyDown(t), this._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayChangeBound = (t) => this._onOverlayChange(t), this._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (t) => {
274
+ C(t, [this._overlay]) || this._schedulePosition.run();
274
275
  };
275
276
  }
276
277
  static get observedAttributes() {
@@ -303,7 +304,7 @@ class L extends x {
303
304
  connectedCallback() {
304
305
  if (super.connectedCallback(), this.root.addEventListener("click", this._onRootClickBound), this.root.addEventListener("input", this._onRootInputBound), this.root.addEventListener("focusout", this._onRootBlurBound), this.root.addEventListener("keydown", this._onRootKeyDownBound), this._hasView && !this._inputEl && this._cacheDomRefs(), !this._isInitialized) {
305
306
  const t = this._normalizeCanonical(this.getAttribute("value") || this.getAttribute("default-value"));
306
- this._value = t, this._pending = t, this._draft = this._formatDisplay(t), this._open = this.hasAttribute("open") || m(this.getAttribute("default-open")), this._isInitialized = !0;
307
+ this._value = t, this._pending = t, this._draft = this._formatDisplay(t), this._open = this.hasAttribute("open") || b(this.getAttribute("default-open")), this._isInitialized = !0;
307
308
  }
308
309
  this._open && !this._isInlineMode() && this._ensureOverlay();
309
310
  }
@@ -323,7 +324,7 @@ class L extends x {
323
324
  return (this.getAttribute("mode") || "popover") === "inline";
324
325
  }
325
326
  _isMobileSheet() {
326
- return C(this.getAttribute("mode"));
327
+ return B(this.getAttribute("mode"));
327
328
  }
328
329
  _isDisabled() {
329
330
  return this.hasAttribute("disabled");
@@ -332,10 +333,10 @@ class L extends x {
332
333
  return this.hasAttribute("readonly");
333
334
  }
334
335
  _allowInput() {
335
- return m(this.getAttribute("allow-input"), !0);
336
+ return b(this.getAttribute("allow-input"), !0);
336
337
  }
337
338
  _clearable() {
338
- return m(this.getAttribute("clearable"), !0);
339
+ return b(this.getAttribute("clearable"), !0);
339
340
  }
340
341
  _withSeconds() {
341
342
  return this.hasAttribute("seconds");
@@ -352,16 +353,15 @@ class L extends x {
352
353
  return !Number.isFinite(t) || t < 1 ? 1 : Math.min(60, Math.trunc(t));
353
354
  }
354
355
  _translations() {
355
- return k(
356
+ return w(
356
357
  this.getAttribute("locale"),
357
358
  this.getAttribute("translations")
358
359
  );
359
360
  }
360
361
  _normalizeCanonical(t) {
361
- if (!t)
362
- return null;
363
- const e = b(t, !0);
364
- return e ? _(e.hours, e.minutes, e.seconds, this._withSeconds()) : null;
362
+ if (!t) return null;
363
+ const e = f(t);
364
+ return e ? m(e.hours, e.minutes, e.seconds, this._withSeconds()) : null;
365
365
  }
366
366
  _minTime() {
367
367
  return this._normalizeCanonical(this.getAttribute("min"));
@@ -370,7 +370,7 @@ class L extends x {
370
370
  return this._normalizeCanonical(this.getAttribute("max"));
371
371
  }
372
372
  _formatDisplay(t) {
373
- return t ? this._is12h() ? B(t, this.getAttribute("locale") || "en-US") : t : "";
373
+ return t ? this._is12h() ? O(t, this.getAttribute("locale") || "en-US") : t : "";
374
374
  }
375
375
  _syncOpenAttribute(t) {
376
376
  this._syncing = !0;
@@ -400,15 +400,13 @@ class L extends x {
400
400
  this.dispatchEvent(new CustomEvent("invalid", { detail: { raw: t, reason: e }, bubbles: !0, composed: !0 }));
401
401
  }
402
402
  _clampToBounds(t) {
403
- if (!t)
404
- return null;
403
+ if (!t) return null;
405
404
  const e = this._minTime(), i = this._maxTime();
406
405
  let s = t;
407
- return e && v(s, e) < 0 && (s = e), i && v(s, i) > 0 && (s = i), s;
406
+ return e && y(s, e) < 0 && (s = e), i && y(s, i) > 0 && (s = i), s;
408
407
  }
409
408
  _commit(t, e) {
410
- if (this._isDisabled() || this._isReadonly())
411
- return;
409
+ if (this._isDisabled() || this._isReadonly()) return;
412
410
  const i = this._clampToBounds(this._normalizeCanonical(t));
413
411
  this._value = i, this._pending = i, this._draft = this._formatDisplay(i), this._inlineError = "", this._syncValueAttribute(i), this._emitInput(e), this._emitChange(e), this._updateHostState();
414
412
  }
@@ -433,42 +431,35 @@ class L extends x {
433
431
  }
434
432
  }
435
433
  _ensureOverlay() {
436
- if (this._overlay || typeof document > "u")
437
- return;
434
+ if (this._overlay || typeof document > "u") return;
438
435
  const t = document.createElement("div");
439
- t.className = "ui-time-picker-overlay-host", t.style.position = "fixed", t.style.left = "0", t.style.top = "0", t.style.pointerEvents = "none", t.addEventListener("click", this._onOverlayClickBound), t.addEventListener("change", this._onOverlayChangeBound), document.body.appendChild(t), this._overlay = t, this._syncOverlayHostZIndex(), document.addEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.addEventListener("keydown", this._onDocumentKeyDownBound), window.addEventListener("resize", this._onWindowResizeBound), window.addEventListener("scroll", this._onWindowScrollBound, { passive: !0, capture: !0 }), this._isMobileSheet() && (this._releaseScrollLock = O());
436
+ t.className = "ui-time-picker-overlay-host", t.style.position = "fixed", t.style.left = "0", t.style.top = "0", t.style.pointerEvents = "none", t.addEventListener("click", this._onOverlayClickBound), t.addEventListener("change", this._onOverlayChangeBound), document.body.appendChild(t), this._overlay = t, this._syncOverlayHostZIndex(), document.addEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.addEventListener("keydown", this._onDocumentKeyDownBound), window.addEventListener("resize", this._onWindowResizeBound), window.addEventListener("scroll", this._onWindowScrollBound, { passive: !0, capture: !0 }), this._isMobileSheet() && (this._releaseScrollLock = I());
440
437
  }
441
438
  _syncOverlayHostZIndex() {
442
- if (!this._overlay || typeof window > "u")
443
- return;
439
+ if (!this._overlay || typeof window > "u") return;
444
440
  const t = window.getComputedStyle(this).getPropertyValue("--ui-dp-z").trim();
445
441
  this._overlay.style.zIndex = t || "1600";
446
442
  }
447
443
  _destroyOverlay() {
448
- var t;
449
- (t = this._dismissableLayer) == null || t.destroy(), this._dismissableLayer = null, this._overlay && (this._schedulePosition.cancel(), document.removeEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.removeEventListener("keydown", this._onDocumentKeyDownBound), window.removeEventListener("resize", this._onWindowResizeBound), window.removeEventListener("scroll", this._onWindowScrollBound, !0), this._overlay.removeEventListener("click", this._onOverlayClickBound), this._overlay.removeEventListener("change", this._onOverlayChangeBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayKey = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
444
+ this._dismissableLayer?.destroy(), this._dismissableLayer = null, this._overlay && (this._schedulePosition.cancel(), document.removeEventListener("pointerdown", this._onDocumentPointerDownBound, !0), document.removeEventListener("keydown", this._onDocumentKeyDownBound), window.removeEventListener("resize", this._onWindowResizeBound), window.removeEventListener("scroll", this._onWindowScrollBound, !0), this._overlay.removeEventListener("click", this._onOverlayClickBound), this._overlay.removeEventListener("change", this._onOverlayChangeBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayKey = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
450
445
  }
451
446
  _syncDismissableLayer() {
452
- var e;
453
- if ((e = this._dismissableLayer) == null || e.destroy(), this._dismissableLayer = null, !this._open || !this._overlay)
454
- return;
447
+ if (this._dismissableLayer?.destroy(), this._dismissableLayer = null, !this._open || !this._overlay) return;
455
448
  const t = this._overlay.querySelector(".panel, .sheet");
456
- t && (this._dismissableLayer = E({
449
+ t && (this._dismissableLayer = k({
457
450
  node: t,
458
451
  trigger: this._fieldEl,
459
452
  closeOnEscape: !0,
460
453
  closeOnPointerOutside: !0,
461
454
  closeOnFocusOutside: !1,
462
- onBeforeDismiss: (i) => i === "escape-key" ? (this._setOpen(!1, "escape"), !1) : (i === "outside-pointer" && this._setOpen(!1, "outside"), !1)
455
+ onBeforeDismiss: (e) => e === "escape-key" ? (this._setOpen(!1, "escape"), !1) : (e === "outside-pointer" && this._setOpen(!1, "outside"), !1)
463
456
  }));
464
457
  }
465
458
  _positionOverlay() {
466
- if (!this._overlay || !this._open || this._isMobileSheet())
467
- return;
459
+ if (!this._overlay || !this._open || this._isMobileSheet()) return;
468
460
  const t = this._fieldEl, e = this._overlay.querySelector(".panel");
469
- if (!t || !e)
470
- return;
471
- const i = e.getAttribute("data-placement"), s = I(
461
+ if (!t || !e) return;
462
+ const i = e.getAttribute("data-placement"), s = A(
472
463
  t.getBoundingClientRect(),
473
464
  e.getBoundingClientRect(),
474
465
  8,
@@ -478,7 +469,7 @@ class L extends x {
478
469
  e.style.position = "absolute", e.style.top = `${Math.round(s.top)}px`, e.style.left = `${Math.round(s.left)}px`, e.setAttribute("data-placement", s.placement);
479
470
  }
480
471
  _timeParts(t) {
481
- const e = b(t || "00:00", !0) || { hours: 0, minutes: 0, seconds: 0 }, i = e.hours >= 12 ? "pm" : "am";
472
+ const e = f(t || "00:00") || { hours: 0, minutes: 0, seconds: 0 }, i = e.hours >= 12 ? "pm" : "am";
482
473
  return {
483
474
  hours: e.hours,
484
475
  minutes: e.minutes,
@@ -487,33 +478,33 @@ class L extends x {
487
478
  };
488
479
  }
489
480
  _buildOverlayContent(t) {
490
- const e = this._translations(), i = this._timeParts(this._pending), s = this._is12h(), n = this._withSeconds(), r = s ? i.hours % 12 || 12 : i.hours, o = this._minuteStep(), l = this._secondStep(), a = Array.from({ length: s ? 12 : 24 }, (f, c) => {
491
- const u = s ? c + 1 : c;
492
- return `<option value="${u}" ${u === r ? "selected" : ""}>${h(u)}</option>`;
493
- }).join(""), d = Array.from({ length: Math.ceil(60 / o) }, (f, c) => {
494
- const u = Math.min(59, c * o);
495
- return `<option value="${u}" ${u === i.minutes ? "selected" : ""}>${h(u)}</option>`;
496
- }).join(""), y = Array.from({ length: Math.ceil(60 / l) }, (f, c) => {
497
- const u = Math.min(59, c * l);
498
- return `<option value="${u}" ${u === i.seconds ? "selected" : ""}>${h(u)}</option>`;
499
- }).join(""), g = `
481
+ const e = this._translations(), i = this._timeParts(this._pending), s = this._is12h(), n = this._withSeconds(), r = s ? i.hours % 12 || 12 : i.hours, o = this._minuteStep(), l = this._secondStep(), a = Array.from({ length: s ? 12 : 24 }, (v, p) => {
482
+ const u = s ? p + 1 : p;
483
+ return `<option value="${u}" ${u === r ? "selected" : ""}>${_(u)}</option>`;
484
+ }).join(""), h = Array.from({ length: Math.ceil(60 / o) }, (v, p) => {
485
+ const u = Math.min(59, p * o);
486
+ return `<option value="${u}" ${u === i.minutes ? "selected" : ""}>${_(u)}</option>`;
487
+ }).join(""), g = Array.from({ length: Math.ceil(60 / l) }, (v, p) => {
488
+ const u = Math.min(59, p * l);
489
+ return `<option value="${u}" ${u === i.seconds ? "selected" : ""}>${_(u)}</option>`;
490
+ }).join(""), x = `
500
491
  <div class="pickers" data-seconds="${n ? "true" : "false"}" data-ampm="${s ? "true" : "false"}">
501
- <div class="picker"><label>${e.hour}</label><select data-segment="hours">${a}</select></div>
502
- <div class="picker"><label>${e.minute}</label><select data-segment="minutes">${d}</select></div>
503
- ${n ? `<div class="picker"><label>${e.second}</label><select data-segment="seconds">${y}</select></div>` : ""}
504
- ${s ? `<div class="picker"><label>${e.meridiem}</label><select data-segment="meridiem"><option value="am" ${i.meridiem === "am" ? "selected" : ""}>${e.am}</option><option value="pm" ${i.meridiem === "pm" ? "selected" : ""}>${e.pm}</option></select></div>` : ""}
492
+ <div class="picker"><label>${c(e.hour)}</label><select data-segment="hours">${a}</select></div>
493
+ <div class="picker"><label>${c(e.minute)}</label><select data-segment="minutes">${h}</select></div>
494
+ ${n ? `<div class="picker"><label>${c(e.second)}</label><select data-segment="seconds">${g}</select></div>` : ""}
495
+ ${s ? `<div class="picker"><label>${c(e.meridiem)}</label><select data-segment="meridiem"><option value="am" ${i.meridiem === "am" ? "selected" : ""}>${c(e.am)}</option><option value="pm" ${i.meridiem === "pm" ? "selected" : ""}>${c(e.pm)}</option></select></div>` : ""}
505
496
  </div>
506
497
  `;
507
498
  return `
508
- <style>${z}</style>
499
+ <style>${L}</style>
509
500
  ${t ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
510
501
  <section class="${t ? "sheet" : "panel"}" part="${t ? "sheet" : "popover"}">
511
- ${g}
502
+ ${x}
512
503
  <footer class="footer" part="footer">
513
- <button type="button" class="action" data-action="now">${e.now}</button>
514
- <button type="button" class="action" data-action="clear" part="clear">${e.clear}</button>
515
- <button type="button" class="action" data-action="cancel" part="cancel">${e.cancel}</button>
516
- <button type="button" class="action" data-action="apply" data-tone="primary" part="apply">${e.apply}</button>
504
+ <button type="button" class="action" data-action="now">${c(e.now)}</button>
505
+ <button type="button" class="action" data-action="clear" part="clear">${c(e.clear)}</button>
506
+ <button type="button" class="action" data-action="cancel" part="cancel">${c(e.cancel)}</button>
507
+ <button type="button" class="action" data-action="apply" data-tone="primary" part="apply">${c(e.apply)}</button>
517
508
  </footer>
518
509
  </section>
519
510
  `;
@@ -529,15 +520,13 @@ class L extends x {
529
520
  ].join(":");
530
521
  }
531
522
  _ensureOverlayContent(t) {
532
- if (!this._overlay)
533
- return;
523
+ if (!this._overlay) return;
534
524
  const e = this._overlaySignature(t);
535
525
  this._overlayKey !== e && (this._overlayKey = e, this._overlay.innerHTML = t ? `<div class="sheet-wrap">${this._buildOverlayContent(!0)}</div>` : `<div class="overlay">${this._buildOverlayContent(!1)}</div>`);
536
526
  }
537
527
  _setClosestOptionValue(t, e) {
538
528
  const i = Array.from(t.options).map((r) => Number(r.value)).filter((r) => Number.isFinite(r));
539
- if (!i.length)
540
- return;
529
+ if (!i.length) return;
541
530
  let s = i[0], n = Math.abs(s - e);
542
531
  for (let r = 1; r < i.length; r += 1) {
543
532
  const o = i[r], l = Math.abs(o - e);
@@ -546,8 +535,7 @@ class L extends x {
546
535
  t.value = String(s);
547
536
  }
548
537
  _syncOverlayState() {
549
- if (!this._overlay)
550
- return;
538
+ if (!this._overlay) return;
551
539
  this._syncOverlayHostZIndex();
552
540
  const t = this._isMobileSheet();
553
541
  this._ensureOverlayContent(t), this._syncDismissableLayer();
@@ -564,26 +552,22 @@ class L extends x {
564
552
  this._syncOverlayState();
565
553
  }
566
554
  _applySegmentsFromOverlay() {
567
- if (!this._overlay)
568
- return;
555
+ if (!this._overlay) return;
569
556
  const t = this._overlay.querySelector('select[data-segment="hours"]'), e = this._overlay.querySelector('select[data-segment="minutes"]'), i = this._overlay.querySelector('select[data-segment="seconds"]'), s = this._overlay.querySelector('select[data-segment="meridiem"]');
570
- if (!t || !e)
571
- return;
557
+ if (!t || !e) return;
572
558
  let n = Number(t.value);
573
559
  const r = Number(e.value), o = i ? Number(i.value) : 0;
574
560
  if (this._is12h() && s) {
575
561
  const a = s.value === "pm" ? "pm" : "am";
576
562
  a === "pm" && n < 12 && (n += 12), a === "am" && n === 12 && (n = 0);
577
563
  }
578
- const l = _(n, r, o, this._withSeconds());
564
+ const l = m(n, r, o, this._withSeconds());
579
565
  this._pending = this._clampToBounds(l), this._emitInput("picker");
580
566
  }
581
567
  _onRootClick(t) {
582
- var s;
583
568
  const e = t.target;
584
- if (!e)
585
- return;
586
- const i = (s = e.closest("[data-action]")) == null ? void 0 : s.getAttribute("data-action");
569
+ if (!e) return;
570
+ const i = e.closest("[data-action]")?.getAttribute("data-action");
587
571
  if (i) {
588
572
  if (i === "toggle") {
589
573
  this._restoreFocusEl = e, this._setOpen(!this._open, "toggle");
@@ -594,16 +578,14 @@ class L extends x {
594
578
  }
595
579
  _onRootInput(t) {
596
580
  const e = t.target;
597
- if (!(e instanceof HTMLInputElement) || !e.classList.contains("input") || !this._allowInput())
598
- return;
581
+ if (!(e instanceof HTMLInputElement) || !e.classList.contains("input") || !this._allowInput()) return;
599
582
  this._draft = e.value, this._inlineError = "";
600
583
  const i = this._normalizeCanonical(e.value);
601
584
  this._pending = i, this._emitInput("typing");
602
585
  }
603
586
  _onRootBlur(t) {
604
587
  const e = t.target;
605
- if (!(e instanceof HTMLInputElement) || !e.classList.contains("input") || !this._allowInput())
606
- return;
588
+ if (!(e instanceof HTMLInputElement) || !e.classList.contains("input") || !this._allowInput()) return;
607
589
  if (!this._draft.trim()) {
608
590
  this._commit(null, "blur");
609
591
  return;
@@ -616,7 +598,7 @@ class L extends x {
616
598
  this._commit(i, "blur");
617
599
  }
618
600
  _stepBy(t) {
619
- const e = b(this._pending || this._value || "00:00", !0) || { hours: 0, minutes: 0, seconds: 0 }, i = this._minuteStep() * t, s = ((e.hours * 60 + e.minutes + i) % (24 * 60) + 24 * 60) % (24 * 60), n = Math.floor(s / 60), r = s % 60, o = _(n, r, e.seconds, this._withSeconds());
601
+ const e = f(this._pending || this._value || "00:00") || { hours: 0, minutes: 0, seconds: 0 }, i = this._minuteStep() * t, s = ((e.hours * 60 + e.minutes + i) % 1440 + 1440) % 1440, n = Math.floor(s / 60), r = s % 60, o = m(n, r, e.seconds, this._withSeconds());
620
602
  this._pending = this._clampToBounds(o), this._emitInput("keyboard-step"), this._updateHostState();
621
603
  }
622
604
  _onRootKeyDown(t) {
@@ -648,11 +630,9 @@ class L extends x {
648
630
  }
649
631
  }
650
632
  _onOverlayClick(t) {
651
- var s;
652
633
  const e = t.target;
653
- if (!e)
654
- return;
655
- const i = (s = e.closest("[data-action]")) == null ? void 0 : s.getAttribute("data-action");
634
+ if (!e) return;
635
+ const i = e.closest("[data-action]")?.getAttribute("data-action");
656
636
  if (i) {
657
637
  if (i === "backdrop") {
658
638
  this._setOpen(!1, "outside");
@@ -667,8 +647,8 @@ class L extends x {
667
647
  return;
668
648
  }
669
649
  if (i === "now") {
670
- const n = /* @__PURE__ */ new Date(), r = _(n.getHours(), n.getMinutes(), n.getSeconds(), this._withSeconds());
671
- this._pending = this._clampToBounds(r), this._emitInput("now"), this._renderOverlay();
650
+ const s = /* @__PURE__ */ new Date(), n = m(s.getHours(), s.getMinutes(), s.getSeconds(), this._withSeconds());
651
+ this._pending = this._clampToBounds(n), this._emitInput("now"), this._renderOverlay();
672
652
  return;
673
653
  }
674
654
  i === "apply" && (this._commit(this._pending, "apply"), this._setOpen(!1, "apply"));
@@ -679,8 +659,7 @@ class L extends x {
679
659
  e instanceof HTMLSelectElement && e.matches("select[data-segment]") && this._applySegmentsFromOverlay();
680
660
  }
681
661
  _onDocumentPointerDown(t) {
682
- if (!this._open || !this._overlay)
683
- return;
662
+ if (!this._open || !this._overlay) return;
684
663
  const e = t.composedPath();
685
664
  e.includes(this) || e.includes(this._overlay) || this._setOpen(!1, "outside");
686
665
  }
@@ -691,24 +670,23 @@ class L extends x {
691
670
  this._labelEl = this.root.querySelector(".label"), this._labelTextEl = this.root.querySelector(".label-text"), this._requiredEl = this.root.querySelector(".required"), this._fieldEl = this.root.querySelector(".field"), this._inputEl = this.root.querySelector(".input"), this._clearBtn = this.root.querySelector('.btn[data-action="clear"]'), this._toggleBtn = this.root.querySelector('.btn[data-action="toggle"]'), this._hintEl = this.root.querySelector(".hint"), this._errorEl = this.root.querySelector(".error"), this._hiddenInputEl = this.root.querySelector(".hidden-input");
692
671
  }
693
672
  _updateHostState() {
694
- if (!this._hasView)
695
- return;
696
- const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", s = this._inlineError || i, n = !!this._value, r = this.getAttribute("name") || "", o = this._allowInput() ? this._draft : this._formatDisplay(this._value), l = this._isInlineMode(), a = this._isDisabled(), d = this._translations();
697
- this._labelEl && (this._labelEl.hidden = !t), this._labelTextEl && (this._labelTextEl.textContent = t), this._requiredEl && (this._requiredEl.hidden = !this.hasAttribute("required")), this._inputEl && (this._inputEl.value !== o && (this._inputEl.value = o), this._inputEl.placeholder = this._withSeconds() ? d.timePlaceholderSeconds : d.timePlaceholder, this._inputEl.readOnly = !this._allowInput() || this._isReadonly(), this._inputEl.disabled = a, this._inputEl.required = this.hasAttribute("required")), this._clearBtn && (this._clearBtn.hidden = !(this._clearable() && n), this._clearBtn.disabled = a || this._isReadonly(), this._clearBtn.setAttribute("aria-label", d.clear)), this._toggleBtn && (this._toggleBtn.hidden = l, this._toggleBtn.disabled = a || this._isReadonly(), this._toggleBtn.setAttribute("aria-label", d.toggleCalendar)), this._hintEl && (this._hintEl.hidden = !e, this._hintEl.textContent = e), this._errorEl && (this._errorEl.hidden = !s, this._errorEl.textContent = s), this._hiddenInputEl && (this._hiddenInputEl.disabled = !r, this._hiddenInputEl.name = r, this._hiddenInputEl.value = this._value || ""), !l && this._open && this._syncOverlayState();
673
+ if (!this._hasView) return;
674
+ const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", s = this._inlineError || i, n = !!this._value, r = this.getAttribute("name") || "", o = this._allowInput() ? this._draft : this._formatDisplay(this._value), l = this._isInlineMode(), a = this._isDisabled(), h = this._translations();
675
+ this._labelEl && (this._labelEl.hidden = !t), this._labelTextEl && (this._labelTextEl.textContent = t), this._requiredEl && (this._requiredEl.hidden = !this.hasAttribute("required")), this._inputEl && (this._inputEl.value !== o && (this._inputEl.value = o), this._inputEl.placeholder = this._withSeconds() ? h.timePlaceholderSeconds : h.timePlaceholder, this._inputEl.readOnly = !this._allowInput() || this._isReadonly(), this._inputEl.disabled = a, this._inputEl.required = this.hasAttribute("required")), this._clearBtn && (this._clearBtn.hidden = !(this._clearable() && n), this._clearBtn.disabled = a || this._isReadonly(), this._clearBtn.setAttribute("aria-label", h.clear)), this._toggleBtn && (this._toggleBtn.hidden = l, this._toggleBtn.disabled = a || this._isReadonly(), this._toggleBtn.setAttribute("aria-label", h.toggleCalendar)), this._hintEl && (this._hintEl.hidden = !e, this._hintEl.textContent = e), this._errorEl && (this._errorEl.hidden = !s, this._errorEl.textContent = s), this._hiddenInputEl && (this._hiddenInputEl.disabled = !r, this._hiddenInputEl.name = r, this._hiddenInputEl.value = this._value || ""), !l && this._open && this._syncOverlayState();
698
676
  }
699
677
  render() {
700
678
  this._hasView || (this.setContent(`
701
- <style>${M}</style>
679
+ <style>${z}</style>
702
680
  <div class="root">
703
681
  <label class="label" part="label">
704
682
  <span class="label-text"></span>
705
683
  <span class="required">*</span>
706
684
  </label>
707
685
  <div class="field" part="field input">
708
- <span class="icon" part="icon">${A}</span>
686
+ <span class="icon" part="icon">${D}</span>
709
687
  <input class="input" part="input" />
710
- <button type="button" class="btn" part="clear" data-action="clear">${D}</button>
711
- <button type="button" class="btn" part="toggle" data-action="toggle">${$}</button>
688
+ <button type="button" class="btn" part="clear" data-action="clear">${$}</button>
689
+ <button type="button" class="btn" part="toggle" data-action="toggle">${M}</button>
712
690
  </div>
713
691
  <div class="hint" part="hint"></div>
714
692
  <div class="error" part="error" role="alert"></div>
@@ -720,7 +698,7 @@ class L extends x {
720
698
  return !1;
721
699
  }
722
700
  }
723
- typeof customElements < "u" && !customElements.get("ui-time-picker") && customElements.define("ui-time-picker", L);
701
+ typeof customElements < "u" && !customElements.get("ui-time-picker") && customElements.define("ui-time-picker", T);
724
702
  export {
725
- L as UITimePicker
703
+ T as UITimePicker
726
704
  };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-1b301e7f.js"),m=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const d=require("./ElementBase-EV6mVBUV.js"),m=`
2
2
  :host {
3
3
  --ui-timeline-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 95%, transparent);
4
4
  --ui-timeline-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 76%, transparent);
@@ -1,4 +1,4 @@
1
- import { E as c } from "./ElementBase-909688f3.mjs";
1
+ import { E as c } from "./ElementBase-YlTLMsGk.mjs";
2
2
  const d = `
3
3
  :host {
4
4
  --ui-timeline-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 95%, transparent);
@@ -193,13 +193,11 @@ function a(n) {
193
193
  return n.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
194
194
  }
195
195
  function m(n) {
196
- if (!n)
197
- return [];
196
+ if (!n) return [];
198
197
  try {
199
198
  const t = JSON.parse(n);
200
199
  return Array.isArray(t) ? t.map((e) => {
201
- if (!e || typeof e != "object")
202
- return null;
200
+ if (!e || typeof e != "object") return null;
203
201
  const r = String(e.title || "").trim();
204
202
  return r ? {
205
203
  title: r,
package/dist/toast.cjs.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./ElementBase-1b301e7f.js"),c=3200,d=170,h=`
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("./ElementBase-EV6mVBUV.js"),c=3200,d=170,h=`
2
2
  :host {
3
3
  display: block;
4
4
  color-scheme: light dark;
@@ -210,7 +210,7 @@
210
210
  border: 1px solid CanvasText;
211
211
  }
212
212
  }
213
- `;let p=0;function m(a){return String(a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function g(a){const t=String(a||"").toLowerCase();return t==="success"||t==="warning"||t==="error"||t==="loading"||t==="neutral"?t:"info"}function f(a){const t=Number(a);return Number.isFinite(t)?Math.max(0,Math.trunc(t)):c}function b(a){const t=String(a||"polite").toLowerCase();return t==="off"||t==="assertive"?t:"polite"}class l extends u.ElementBase{constructor(){super(),this._toasts=[],this._timerMap=new Map,this._exitMap=new Map,this._onRootClick=this._handleRootClick.bind(this),this._onRootMouseEnter=this._handleRootMouseEnter.bind(this),this._onRootMouseLeave=this._handleRootMouseLeave.bind(this),this._onRootFocusIn=this._handleRootFocusIn.bind(this),this._onRootFocusOut=this._handleRootFocusOut.bind(this)}static get observedAttributes(){return["headless","position","max-visible"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-live","polite"),this.setAttribute("role","region"),this.root.addEventListener("click",this._onRootClick),this.root.addEventListener("mouseenter",this._onRootMouseEnter,!0),this.root.addEventListener("mouseleave",this._onRootMouseLeave,!0),this.root.addEventListener("focusin",this._onRootFocusIn),this.root.addEventListener("focusout",this._onRootFocusOut)}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClick),this.root.removeEventListener("mouseenter",this._onRootMouseEnter,!0),this.root.removeEventListener("mouseleave",this._onRootMouseLeave,!0),this.root.removeEventListener("focusin",this._onRootFocusIn),this.root.removeEventListener("focusout",this._onRootFocusOut),this._clearAllTimers(),super.disconnectedCallback()}get headless(){return this.hasAttribute("headless")}set headless(t){t?this.setAttribute("headless",""):this.removeAttribute("headless")}show(t,e={}){const o=++p,s=g(e.type),i=f(e.duration),r=b(e.ariaLive),n={id:o,message:String(t??""),duration:i,tone:s,ariaLive:r,createdAt:Date.now(),closing:!1};return this._toasts.push(n),this._trimVisibleToasts(),this.requestRender(),this.dispatchEvent(new CustomEvent("show",{detail:{id:o,message:n.message,type:s},bubbles:!0})),this._scheduleAutoHide(o,i),o}hide(t){const e=this._toasts.find(i=>i.id===t);if(!e||e.closing)return;e.closing=!0,this._clearToastTimer(t),this.requestRender();const o=this._exitMap.get(t);o&&clearTimeout(o);const s=setTimeout(()=>{this._exitMap.delete(t);const i=this._toasts.length;this._toasts=this._toasts.filter(r=>r.id!==t),this._toasts.length!==i&&(this.requestRender(),this.dispatchEvent(new CustomEvent("hide",{detail:{id:t},bubbles:!0})))},d);this._exitMap.set(t,s)}_maxVisible(){const t=Number(this.getAttribute("max-visible"));return Number.isFinite(t)?Math.max(1,Math.trunc(t)):5}_trimVisibleToasts(){const t=this._toasts.filter(s=>!s.closing),e=this._maxVisible();if(t.length<=e)return;[...t].sort((s,i)=>s.createdAt-i.createdAt).slice(0,t.length-e).forEach(s=>this.hide(s.id))}_scheduleAutoHide(t,e){if(this._clearToastTimer(t),e<=0)return;const o=Date.now(),s=setTimeout(()=>{this._timerMap.delete(t),this.hide(t)},e);this._timerMap.set(t,{timeout:s,startedAt:o,remaining:e,paused:!1})}_pauseToast(t){const e=this._timerMap.get(t);if(!e||e.paused)return;clearTimeout(e.timeout);const o=Date.now()-e.startedAt;e.remaining=Math.max(0,e.remaining-o),e.paused=!0,this._timerMap.set(t,e)}_resumeToast(t){const e=this._timerMap.get(t);if(!e||!e.paused)return;const o=Math.max(0,e.remaining);this._scheduleAutoHide(t,o)}_clearToastTimer(t){const e=this._timerMap.get(t);e&&(clearTimeout(e.timeout),this._timerMap.delete(t));const o=this._exitMap.get(t);o&&(clearTimeout(o),this._exitMap.delete(t))}_clearAllTimers(){for(const t of this._timerMap.values())clearTimeout(t.timeout);this._timerMap.clear();for(const t of this._exitMap.values())clearTimeout(t);this._exitMap.clear()}_closestToastId(t){const e=t instanceof HTMLElement?t:null,o=e==null?void 0:e.closest(".toast[data-toast-id]");if(!o)return null;const s=Number(o.getAttribute("data-toast-id"));return Number.isFinite(s)?s:null}_handleRootClick(t){const e=t.target;if(!e)return;const o=e.closest("button.close[data-toast-id]");if(!o)return;t.preventDefault();const s=Number(o.getAttribute("data-toast-id"));Number.isNaN(s)||this.hide(s)}_handleRootMouseEnter(t){const e=this._closestToastId(t.target);e!=null&&this._pauseToast(e)}_handleRootMouseLeave(t){var i;const e=this._closestToastId(t.target);if(e==null)return;const o=(i=t.target)==null?void 0:i.closest(".toast[data-toast-id]"),s=t.relatedTarget;s&&(o!=null&&o.contains(s))||this._resumeToast(e)}_handleRootFocusIn(t){const e=this._closestToastId(t.target);e!=null&&this._pauseToast(e)}_handleRootFocusOut(t){var i;const e=this._closestToastId(t.target);if(e==null)return;const o=t.relatedTarget,s=(i=t.target)==null?void 0:i.closest(".toast[data-toast-id]");o&&(s!=null&&s.contains(o))||this._resumeToast(e)}render(){this.setContent(`
213
+ `;let p=0;function m(i){return String(i).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function g(i){const t=String(i||"").toLowerCase();return t==="success"||t==="warning"||t==="error"||t==="loading"||t==="neutral"?t:"info"}function f(i){const t=Number(i);return Number.isFinite(t)?Math.max(0,Math.trunc(t)):c}function b(i){const t=String(i||"polite").toLowerCase();return t==="off"||t==="assertive"?t:"polite"}class l extends u.ElementBase{constructor(){super(),this._toasts=[],this._timerMap=new Map,this._exitMap=new Map,this._onRootClick=this._handleRootClick.bind(this),this._onRootMouseEnter=this._handleRootMouseEnter.bind(this),this._onRootMouseLeave=this._handleRootMouseLeave.bind(this),this._onRootFocusIn=this._handleRootFocusIn.bind(this),this._onRootFocusOut=this._handleRootFocusOut.bind(this)}static get observedAttributes(){return["headless","position","max-visible"]}connectedCallback(){super.connectedCallback(),this.setAttribute("aria-live","polite"),this.setAttribute("role","region"),this.root.addEventListener("click",this._onRootClick),this.root.addEventListener("mouseenter",this._onRootMouseEnter,!0),this.root.addEventListener("mouseleave",this._onRootMouseLeave,!0),this.root.addEventListener("focusin",this._onRootFocusIn),this.root.addEventListener("focusout",this._onRootFocusOut)}disconnectedCallback(){this.root.removeEventListener("click",this._onRootClick),this.root.removeEventListener("mouseenter",this._onRootMouseEnter,!0),this.root.removeEventListener("mouseleave",this._onRootMouseLeave,!0),this.root.removeEventListener("focusin",this._onRootFocusIn),this.root.removeEventListener("focusout",this._onRootFocusOut),this._clearAllTimers(),super.disconnectedCallback()}get headless(){return this.hasAttribute("headless")}set headless(t){t?this.setAttribute("headless",""):this.removeAttribute("headless")}show(t,e={}){const o=++p,s=g(e.type),a=f(e.duration),r=b(e.ariaLive),n={id:o,message:String(t??""),duration:a,tone:s,ariaLive:r,createdAt:Date.now(),closing:!1};return this._toasts.push(n),this._trimVisibleToasts(),this.requestRender(),this.dispatchEvent(new CustomEvent("show",{detail:{id:o,message:n.message,type:s},bubbles:!0})),this._scheduleAutoHide(o,a),o}hide(t){const e=this._toasts.find(a=>a.id===t);if(!e||e.closing)return;e.closing=!0,this._clearToastTimer(t),this.requestRender();const o=this._exitMap.get(t);o&&clearTimeout(o);const s=setTimeout(()=>{this._exitMap.delete(t);const a=this._toasts.length;this._toasts=this._toasts.filter(r=>r.id!==t),this._toasts.length!==a&&(this.requestRender(),this.dispatchEvent(new CustomEvent("hide",{detail:{id:t},bubbles:!0})))},d);this._exitMap.set(t,s)}_maxVisible(){const t=Number(this.getAttribute("max-visible"));return Number.isFinite(t)?Math.max(1,Math.trunc(t)):5}_trimVisibleToasts(){const t=this._toasts.filter(s=>!s.closing),e=this._maxVisible();if(t.length<=e)return;[...t].sort((s,a)=>s.createdAt-a.createdAt).slice(0,t.length-e).forEach(s=>this.hide(s.id))}_scheduleAutoHide(t,e){if(this._clearToastTimer(t),e<=0)return;const o=Date.now(),s=setTimeout(()=>{this._timerMap.delete(t),this.hide(t)},e);this._timerMap.set(t,{timeout:s,startedAt:o,remaining:e,paused:!1})}_pauseToast(t){const e=this._timerMap.get(t);if(!e||e.paused)return;clearTimeout(e.timeout);const o=Date.now()-e.startedAt;e.remaining=Math.max(0,e.remaining-o),e.paused=!0,this._timerMap.set(t,e)}_resumeToast(t){const e=this._timerMap.get(t);if(!e||!e.paused)return;const o=Math.max(0,e.remaining);this._scheduleAutoHide(t,o)}_clearToastTimer(t){const e=this._timerMap.get(t);e&&(clearTimeout(e.timeout),this._timerMap.delete(t));const o=this._exitMap.get(t);o&&(clearTimeout(o),this._exitMap.delete(t))}_clearAllTimers(){for(const t of this._timerMap.values())clearTimeout(t.timeout);this._timerMap.clear();for(const t of this._exitMap.values())clearTimeout(t);this._exitMap.clear()}_closestToastId(t){const o=(t instanceof HTMLElement?t:null)?.closest(".toast[data-toast-id]");if(!o)return null;const s=Number(o.getAttribute("data-toast-id"));return Number.isFinite(s)?s:null}_handleRootClick(t){const e=t.target;if(!e)return;const o=e.closest("button.close[data-toast-id]");if(!o)return;t.preventDefault();const s=Number(o.getAttribute("data-toast-id"));Number.isNaN(s)||this.hide(s)}_handleRootMouseEnter(t){const e=this._closestToastId(t.target);e!=null&&this._pauseToast(e)}_handleRootMouseLeave(t){const e=this._closestToastId(t.target);if(e==null)return;const o=t.target?.closest(".toast[data-toast-id]"),s=t.relatedTarget;s&&o?.contains(s)||this._resumeToast(e)}_handleRootFocusIn(t){const e=this._closestToastId(t.target);e!=null&&this._pauseToast(e)}_handleRootFocusOut(t){const e=this._closestToastId(t.target);if(e==null)return;const o=t.relatedTarget,s=t.target?.closest(".toast[data-toast-id]");o&&s?.contains(o)||this._resumeToast(e)}render(){this.setContent(`
214
214
  <style>${h}</style>
215
215
  <div class="toast-list" aria-live="polite" part="list">
216
216
  ${this._toasts.map(t=>{const e=t.ariaLive==="assertive"||t.tone==="error"?"alert":"status",o=t.duration>0?'<span class="meta" part="meta">Auto-dismiss</span>':'<span class="meta" part="meta">Persistent</span>';return`