@editora/ui-core 0.1.18 → 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 (307) 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 -669
  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-button.d.ts +1 -0
  57. package/dist/components/ui-button.d.ts.map +1 -1
  58. package/dist/components/ui-date-picker.d.ts.map +1 -1
  59. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  60. package/dist/components/ui-date-range-time-picker.d.ts +1 -0
  61. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  62. package/dist/components/ui-date-time-picker.d.ts +1 -0
  63. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  64. package/dist/components/ui-orbiter.d.ts.map +1 -1
  65. package/dist/components/ui-skeleton.d.ts.map +1 -1
  66. package/dist/components/ui-split-button.d.ts +1 -0
  67. package/dist/components/ui-split-button.d.ts.map +1 -1
  68. package/dist/components/ui-time-picker.d.ts.map +1 -1
  69. package/dist/container.cjs.js +2 -2
  70. package/dist/container.esm.js +2 -3
  71. package/dist/context-menu.cjs.js +8 -8
  72. package/dist/context-menu.esm.js +157 -219
  73. package/dist/control-group.cjs.js +1 -1
  74. package/dist/control-group.esm.js +2 -3
  75. package/dist/data-table.cjs.js +4 -4
  76. package/dist/data-table.esm.js +299 -381
  77. package/dist/date-field.cjs.js +3 -3
  78. package/dist/date-field.esm.js +68 -80
  79. package/dist/date-picker.cjs.js +30 -9
  80. package/dist/date-picker.esm.js +90 -97
  81. package/dist/date-range-picker.cjs.js +22 -3
  82. package/dist/date-range-picker.esm.js +103 -108
  83. package/dist/date-range-time-picker.cjs.js +28 -12
  84. package/dist/date-range-time-picker.esm.js +137 -150
  85. package/dist/date-time-picker.cjs.js +25 -9
  86. package/dist/date-time-picker.esm.js +139 -155
  87. package/dist/date-time-utils-Dmost5Ee.js +1 -0
  88. package/dist/date-time-utils-y1N2gvG2.mjs +268 -0
  89. package/dist/description.cjs.js +1 -1
  90. package/dist/description.esm.js +3 -5
  91. package/dist/dialog.cjs.js +12 -12
  92. package/dist/dialog.esm.js +44 -63
  93. package/dist/direction-provider.cjs.js +1 -1
  94. package/dist/direction-provider.esm.js +2 -3
  95. package/dist/{dismissable-layer-9c7e6b58.mjs → dismissable-layer-BmPIoK80.mjs} +29 -33
  96. package/dist/dismissable-layer-DNfrKA20.js +1 -0
  97. package/dist/dismissable-layer.cjs.js +2 -2
  98. package/dist/dismissable-layer.esm.js +4 -6
  99. package/dist/dock.cjs.js +5 -5
  100. package/dist/dock.esm.js +134 -155
  101. package/dist/drawer.cjs.js +2 -2
  102. package/dist/drawer.esm.js +18 -35
  103. package/dist/dropdown.cjs.js +2 -2
  104. package/dist/dropdown.esm.js +119 -149
  105. package/dist/dropzone.cjs.js +1 -1
  106. package/dist/dropzone.esm.js +0 -1
  107. package/dist/empty-state.cjs.js +1 -1
  108. package/dist/empty-state.esm.js +1 -1
  109. package/dist/field-error.cjs.js +1 -1
  110. package/dist/field-error.esm.js +3 -5
  111. package/dist/field.cjs.js +5 -5
  112. package/dist/field.esm.js +27 -34
  113. package/dist/fieldset.cjs.js +4 -4
  114. package/dist/fieldset.esm.js +19 -24
  115. package/dist/file-upload.cjs.js +4 -4
  116. package/dist/file-upload.esm.js +69 -93
  117. package/dist/flex.cjs.js +1 -1
  118. package/dist/flex.esm.js +5 -9
  119. package/dist/floating-toolbar.cjs.js +4 -4
  120. package/dist/floating-toolbar.esm.js +60 -85
  121. package/dist/focus-scope-Bwug2gDv.js +1 -0
  122. package/dist/{focus-scope-103833ee.mjs → focus-scope-CmEsG5UZ.mjs} +39 -48
  123. package/dist/focus-scope.cjs.js +2 -2
  124. package/dist/focus-scope.esm.js +15 -20
  125. package/dist/form.cjs.js +2 -2
  126. package/dist/form.esm.js +26 -53
  127. package/dist/gantt.cjs.js +43 -43
  128. package/dist/gantt.esm.js +295 -322
  129. package/dist/grid.cjs.js +1 -1
  130. package/dist/grid.esm.js +5 -9
  131. package/dist/hover-card.cjs.js +4 -4
  132. package/dist/hover-card.esm.js +22 -28
  133. package/dist/icon-cloud.cjs.js +7 -7
  134. package/dist/icon-cloud.esm.js +48 -62
  135. package/dist/icon.cjs.js +1 -1
  136. package/dist/icon.esm.js +2 -4
  137. package/dist/index.cjs.js +1 -1
  138. package/dist/index.esm.js +378 -390
  139. package/dist/inline-edit.cjs.js +11 -11
  140. package/dist/inline-edit.esm.js +32 -36
  141. package/dist/input.cjs.js +17 -17
  142. package/dist/input.esm.js +50 -63
  143. package/dist/label.cjs.js +2 -2
  144. package/dist/label.esm.js +8 -17
  145. package/dist/layout.cjs.js +2 -2
  146. package/dist/layout.esm.js +20 -26
  147. package/dist/listbox-B6QgECax.js +46 -0
  148. package/dist/listbox-DJamVeFj.mjs +200 -0
  149. package/dist/listbox.cjs.js +1 -1
  150. package/dist/listbox.esm.js +2 -4
  151. package/dist/marquee.cjs.js +5 -5
  152. package/dist/marquee.esm.js +33 -50
  153. package/dist/masonry-grid.cjs.js +1 -1
  154. package/dist/masonry-grid.esm.js +5 -9
  155. package/dist/menu.cjs.js +3 -3
  156. package/dist/menu.esm.js +106 -126
  157. package/dist/menubar.cjs.js +5 -5
  158. package/dist/menubar.esm.js +118 -164
  159. package/dist/meter.cjs.js +2 -2
  160. package/dist/meter.esm.js +4 -4
  161. package/dist/multi-select.cjs.js +4 -4
  162. package/dist/multi-select.esm.js +120 -140
  163. package/dist/navigation-menu.cjs.js +4 -4
  164. package/dist/navigation-menu.esm.js +44 -55
  165. package/dist/number-field.cjs.js +2 -2
  166. package/dist/number-field.esm.js +73 -98
  167. package/dist/number-ticker.cjs.js +3 -3
  168. package/dist/number-ticker.esm.js +22 -43
  169. package/dist/odometer.cjs.js +1 -1
  170. package/dist/odometer.esm.js +5 -9
  171. package/dist/orbiter.cjs.js +13 -13
  172. package/dist/orbiter.esm.js +79 -90
  173. package/dist/{overlayManager-5bbd4dc3.mjs → overlayManager-BJjU1VA8.mjs} +4 -5
  174. package/dist/{overlayManager-0eda4e08.js → overlayManager-CSy3fJmJ.js} +1 -1
  175. package/dist/pagination.cjs.js +2 -2
  176. package/dist/pagination.esm.js +14 -18
  177. package/dist/{panel-group-a376cc5e.mjs → panel-group-8sVNnGxg.mjs} +24 -46
  178. package/dist/panel-group-CaD0_KQf.js +36 -0
  179. package/dist/panel-group.cjs.js +1 -1
  180. package/dist/panel-group.esm.js +2 -5
  181. package/dist/panel.cjs.js +4 -4
  182. package/dist/panel.esm.js +8 -10
  183. package/dist/password-field.cjs.js +9 -9
  184. package/dist/password-field.esm.js +62 -82
  185. package/dist/pin-input.cjs.js +3 -3
  186. package/dist/pin-input.esm.js +33 -39
  187. package/dist/placement-grid.cjs.js +4 -4
  188. package/dist/placement-grid.esm.js +108 -131
  189. package/dist/plugin-panel.cjs.js +7 -7
  190. package/dist/plugin-panel.esm.js +13 -15
  191. package/dist/popover.cjs.js +2 -2
  192. package/dist/popover.esm.js +21 -31
  193. package/dist/portal-DgpQ3Jo1.js +1 -0
  194. package/dist/{portal-fe73e5cc.mjs → portal-bR42gHvG.mjs} +43 -48
  195. package/dist/portal.cjs.js +2 -2
  196. package/dist/portal.esm.js +10 -19
  197. package/dist/{positioner-e9770c66.mjs → positioner-D0VGxtYU.mjs} +189 -209
  198. package/dist/positioner-D_fqyx_j.js +1 -0
  199. package/dist/positioner.cjs.js +2 -2
  200. package/dist/positioner.esm.js +11 -18
  201. package/dist/presence.cjs.js +1 -1
  202. package/dist/presence.esm.js +7 -13
  203. package/dist/progress.cjs.js +1 -1
  204. package/dist/progress.esm.js +5 -9
  205. package/dist/quick-actions.cjs.js +6 -6
  206. package/dist/quick-actions.esm.js +52 -62
  207. package/dist/radio-group.cjs.js +13 -13
  208. package/dist/radio-group.esm.js +39 -51
  209. package/dist/radio.cjs.js +1 -1
  210. package/dist/radio.esm.js +5 -9
  211. package/dist/rating.cjs.js +1 -1
  212. package/dist/rating.esm.js +12 -23
  213. package/dist/{roving-focus-group-4350c9a7.mjs → roving-focus-group-Dbm1Jko_.mjs} +3 -6
  214. package/dist/roving-focus-group.cjs.js +1 -1
  215. package/dist/roving-focus-group.esm.js +3 -5
  216. package/dist/runtime-CTaOSmBj.js +1 -0
  217. package/dist/{runtime-161f68a2.mjs → runtime-D1gFh1fS.mjs} +338 -366
  218. package/dist/runtime.cjs.js +1 -1
  219. package/dist/runtime.esm.js +6 -6
  220. package/dist/scroll-area.cjs.js +3 -3
  221. package/dist/scroll-area.esm.js +38 -46
  222. package/dist/{scroll-lock-31da444f.mjs → scroll-lock-LfqXXqsu.mjs} +5 -9
  223. package/dist/section.cjs.js +1 -1
  224. package/dist/section.esm.js +1 -1
  225. package/dist/select.cjs.js +7 -7
  226. package/dist/select.esm.js +67 -97
  227. package/dist/selection-popup.cjs.js +1 -1
  228. package/dist/selection-popup.esm.js +8 -15
  229. package/dist/separator.cjs.js +1 -1
  230. package/dist/separator.esm.js +1 -1
  231. package/dist/sidebar.cjs.js +18 -18
  232. package/dist/sidebar.esm.js +117 -139
  233. package/dist/skeleton.cjs.js +11 -11
  234. package/dist/skeleton.esm.js +27 -24
  235. package/dist/slider.cjs.js +1 -1
  236. package/dist/slider.esm.js +6 -11
  237. package/dist/slot.cjs.js +4 -4
  238. package/dist/slot.esm.js +16 -19
  239. package/dist/sortable.cjs.js +45 -45
  240. package/dist/sortable.esm.js +421 -524
  241. package/dist/spinning-text.cjs.js +12 -12
  242. package/dist/spinning-text.esm.js +80 -92
  243. package/dist/split-button.cjs.js +4 -4
  244. package/dist/split-button.esm.js +77 -62
  245. package/dist/splitter.cjs.js +1 -1
  246. package/dist/splitter.esm.js +1 -1
  247. package/dist/stepper.cjs.js +8 -8
  248. package/dist/stepper.esm.js +32 -52
  249. package/dist/switch.cjs.js +7 -7
  250. package/dist/switch.esm.js +23 -31
  251. package/dist/table.cjs.js +2 -2
  252. package/dist/table.esm.js +46 -56
  253. package/dist/tabs.cjs.js +3 -3
  254. package/dist/tabs.esm.js +35 -55
  255. package/dist/tags-input.cjs.js +4 -4
  256. package/dist/tags-input.esm.js +45 -62
  257. package/dist/textarea.cjs.js +6 -6
  258. package/dist/textarea.esm.js +32 -41
  259. package/dist/time-field.cjs.js +4 -4
  260. package/dist/time-field.esm.js +70 -84
  261. package/dist/time-picker.cjs.js +29 -21
  262. package/dist/time-picker.esm.js +96 -110
  263. package/dist/timeline.cjs.js +1 -1
  264. package/dist/timeline.esm.js +3 -5
  265. package/dist/toast.cjs.js +2 -2
  266. package/dist/toast.esm.js +33 -47
  267. package/dist/toggle-group.cjs.js +6 -6
  268. package/dist/toggle-group.esm.js +85 -105
  269. package/dist/toggle.cjs.js +1 -1
  270. package/dist/toggle.esm.js +3 -5
  271. package/dist/toolbar.cjs.js +1 -1
  272. package/dist/toolbar.esm.js +13 -24
  273. package/dist/tooltip.cjs.js +2 -2
  274. package/dist/tooltip.esm.js +31 -42
  275. package/dist/transfer-list.cjs.js +19 -19
  276. package/dist/transfer-list.esm.js +98 -111
  277. package/dist/{tree-dcd74a4a.mjs → tree-B3kE8ESs.mjs} +55 -62
  278. package/dist/tree-Dx_kv_ih.js +39 -0
  279. package/dist/tree-item.cjs.js +2 -2
  280. package/dist/tree-item.esm.js +2 -3
  281. package/dist/tree.cjs.js +1 -1
  282. package/dist/tree.esm.js +2 -5
  283. package/dist/ui-button-Q0GNNWKC.mjs +665 -0
  284. package/dist/ui-button-rXQOS9QJ.js +521 -0
  285. package/dist/{icon-9e9da03b.js → ui-icon-BzVNC_lr.js} +4 -4
  286. package/dist/{icon-e2a85cc1.mjs → ui-icon-YI6lyuqU.mjs} +58 -65
  287. package/dist/visually-hidden.cjs.js +1 -1
  288. package/dist/visually-hidden.esm.js +1 -1
  289. package/dist/wizard.cjs.js +14 -14
  290. package/dist/wizard.esm.js +85 -105
  291. package/package.json +3 -3
  292. package/dist/date-time-utils-66480de4.js +0 -1
  293. package/dist/date-time-utils-a2c7af25.mjs +0 -307
  294. package/dist/dismissable-layer-193e3bed.js +0 -1
  295. package/dist/focus-scope-2b12b4e7.js +0 -1
  296. package/dist/listbox-308789a0.mjs +0 -210
  297. package/dist/listbox-ef2f708e.js +0 -46
  298. package/dist/panel-group-40254cdd.js +0 -36
  299. package/dist/portal-c69756c0.js +0 -1
  300. package/dist/positioner-33529bb8.js +0 -1
  301. package/dist/runtime-3f13807b.js +0 -1
  302. package/dist/tree-0a7a8d05.js +0 -39
  303. /package/dist/{collection-a2969ad2.js → collection-qv8A8rq4.js} +0 -0
  304. /package/dist/{menu-item-styles-27fdbac4.mjs → menu-item-styles-CZiPwPwl.mjs} +0 -0
  305. /package/dist/{menu-item-styles-83ad1e22.js → menu-item-styles-CbNUEwP2.js} +0 -0
  306. /package/dist/{roving-focus-group-5c059bf9.js → roving-focus-group-BdJ_4Njm.js} +0 -0
  307. /package/dist/{scroll-lock-d7b0df21.js → scroll-lock-BX6e3Ced.js} +0 -0
@@ -1,9 +1,7 @@
1
- import { E as tt } from "./ElementBase-909688f3.mjs";
2
- import { c as et } from "./dismissable-layer-9c7e6b58.mjs";
3
- import { r as it } from "./calendar-2c11b824.mjs";
4
- import { r as rt, e as st, i as C, s as nt, b as at, j as D, k, f as ot, m as I, o as P, l as lt, c as dt, q as A, g as ut, h as ct } from "./date-time-utils-a2c7af25.mjs";
5
- import "./scroll-lock-31da444f.mjs";
6
- import "./positioner-e9770c66.mjs";
1
+ import { E as tt } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { c as et } from "./dismissable-layer-BmPIoK80.mjs";
3
+ import { r as it } from "./calendar-DLY4acgn.mjs";
4
+ import { r as rt, e as st, i as C, s as nt, b as at, j as D, k as A, f as ot, m as I, o as P, l as lt, c as dt, q as k, g as ut, h as ct } from "./date-time-utils-y1N2gvG2.mjs";
7
5
  let pt = 0;
8
6
  const ht = `
9
7
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
@@ -21,7 +19,7 @@ const ht = `
21
19
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
22
20
  <path d="M10 2a8 8 0 1 1 0 16 8 8 0 0 1 0-16Zm0 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13Zm.75 2.75a.75.75 0 0 0-1.5 0v3.88c0 .2.08.4.22.54l2.5 2.5a.75.75 0 1 0 1.06-1.06l-2.28-2.28V6.25Z" fill="currentColor"/>
23
21
  </svg>
24
- `, gt = `
22
+ `, ft = `
25
23
  :host {
26
24
  --ui-drtp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
27
25
  --ui-drtp-surface: linear-gradient(
@@ -272,7 +270,23 @@ const ht = `
272
270
  outline-color: Highlight;
273
271
  }
274
272
  }
275
- `, ft = `
273
+ `, gt = `
274
+ .ui-date-range-time-picker-overlay-host {
275
+ --ui-drtp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
276
+ --ui-drtp-surface: linear-gradient(
277
+ 180deg,
278
+ color-mix(in srgb, var(--ui-color-surface, #ffffff) 98%, transparent),
279
+ color-mix(in srgb, var(--ui-color-surface, #ffffff) 90%, var(--ui-color-surface-alt, #f8fafc))
280
+ );
281
+ --ui-drtp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 78%, transparent);
282
+ --ui-dp-text: var(--ui-color-text, #0f172a);
283
+ --ui-dp-muted: var(--ui-color-muted, #64748b);
284
+ --ui-drtp-accent: var(--ui-color-primary, #2563eb);
285
+ --ui-drtp-panel-radius: 14px;
286
+ --ui-drtp-shadow: none;
287
+ --ui-drtp-duration: 160ms;
288
+ --ui-drtp-ease: cubic-bezier(0.2, 0.9, 0.24, 1);
289
+ }
276
290
  .overlay { position: fixed; z-index: var(--ui-drtp-z, 1600); pointer-events: none; }
277
291
  .panel {
278
292
  pointer-events: auto;
@@ -511,10 +525,9 @@ const ht = `
511
525
  }
512
526
  `;
513
527
  function Q(h) {
514
- if (!h)
515
- return { start: null, end: null };
528
+ if (!h) return { start: null, end: null };
516
529
  try {
517
- const t = JSON.parse(h), e = typeof (t == null ? void 0 : t.start) == "string" ? t.start : null, i = typeof (t == null ? void 0 : t.end) == "string" ? t.end : null;
530
+ const t = JSON.parse(h), e = typeof t?.start == "string" ? t.start : null, i = typeof t?.end == "string" ? t.end : null;
518
531
  return { start: e, end: i };
519
532
  } catch {
520
533
  return { start: null, end: null };
@@ -526,25 +539,24 @@ function X(h) {
526
539
  ...h.end ? { end: h.end } : {}
527
540
  });
528
541
  }
529
- function S(h) {
542
+ function w(h) {
530
543
  return String(h).padStart(2, "0");
531
544
  }
532
545
  function c(h) {
533
546
  return h.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
534
547
  }
535
- function w(h) {
536
- var n, s;
537
- const t = /* @__PURE__ */ new Date(), e = `${S(t.getHours())}:${S(t.getMinutes())}`, i = `${S((t.getHours() + 1) % 24)}:${S(t.getMinutes())}`, r = k(h.start || null), o = k(h.end || null);
548
+ function x(h) {
549
+ const t = /* @__PURE__ */ new Date(), e = `${w(t.getHours())}:${w(t.getMinutes())}`, i = `${w((t.getHours() + 1) % 24)}:${w(t.getMinutes())}`, r = A(h.start || null), l = A(h.end || null);
538
550
  return {
539
- startDate: (r == null ? void 0 : r.date) || null,
540
- endDate: (o == null ? void 0 : o.date) || null,
541
- startTime: ((n = r == null ? void 0 : r.time) == null ? void 0 : n.slice(0, 5)) || e,
542
- endTime: ((s = o == null ? void 0 : o.time) == null ? void 0 : s.slice(0, 5)) || i
551
+ startDate: r?.date || null,
552
+ endDate: l?.date || null,
553
+ startTime: r?.time?.slice(0, 5) || e,
554
+ endTime: l?.time?.slice(0, 5) || i
543
555
  };
544
556
  }
545
557
  class _t extends tt {
546
558
  constructor() {
547
- super(...arguments), this._value = { start: null, end: null }, this._pending = w({ start: null, end: null }), this._display = "", 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._uid = `ui-drtp-${++pt}`, this._inputId = `${this._uid}-input`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._schedulePosition = rt(() => this._positionOverlay()), this._onRootClickBound = (t) => this._onRootClick(t), this._onRootChangeBound = (t) => this._onRootChange(t), this._onRootKeyDownBound = (t) => this._onRootKeyDown(t), this._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayChangeBound = (t) => this._onOverlayChange(t), this._onOverlayCalendarBound = (t) => this._onOverlayCalendar(t), this._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (t) => {
559
+ super(...arguments), this._value = { start: null, end: null }, this._pending = x({ start: null, end: null }), this._display = "", 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._uid = `ui-drtp-${++pt}`, this._inputId = `${this._uid}-input`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._schedulePosition = rt(() => this._positionOverlay()), this._onRootClickBound = (t) => this._onRootClick(t), this._onRootChangeBound = (t) => this._onRootChange(t), this._onRootKeyDownBound = (t) => this._onRootKeyDown(t), this._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayChangeBound = (t) => this._onOverlayChange(t), this._onOverlayCalendarBound = (t) => this._onOverlayCalendar(t), this._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (t) => {
548
560
  st(t, [this._overlay]) || this._schedulePosition.run();
549
561
  };
550
562
  }
@@ -583,7 +595,7 @@ class _t extends tt {
583
595
  connectedCallback() {
584
596
  if (super.connectedCallback(), this.root.addEventListener("click", this._onRootClickBound), this.root.addEventListener("change", this._onRootChangeBound), this.root.addEventListener("keydown", this._onRootKeyDownBound), !this._isInitialized) {
585
597
  const t = Q(this.getAttribute("value") || this.getAttribute("default-value"));
586
- this._value = t, this._pending = w(t), this._display = this._formatDisplay(), this._open = this.hasAttribute("open") || C(this.getAttribute("default-open")), this._isInitialized = !0;
598
+ this._value = t, this._pending = x(t), this._display = this._formatDisplay(), this._open = this.hasAttribute("open") || C(this.getAttribute("default-open")), this._isInitialized = !0;
587
599
  }
588
600
  this._open && !this._isInlineMode() && this._ensureOverlay();
589
601
  }
@@ -591,7 +603,7 @@ class _t extends tt {
591
603
  this.root.removeEventListener("click", this._onRootClickBound), this.root.removeEventListener("change", this._onRootChangeBound), this.root.removeEventListener("keydown", this._onRootKeyDownBound), this._destroyOverlay(), super.disconnectedCallback();
592
604
  }
593
605
  attributeChangedCallback(t, e, i) {
594
- if (e !== i && (t === "value" && !this._syncing && (this._value = Q(i), this._pending = w(this._value), this._display = this._formatDisplay(), this._inlineError = ""), t === "open" && !this._syncing && (this._open = this.hasAttribute("open"), this._syncOverlay("attribute")), t === "mode" && this._syncOverlay("attribute"), t === "disabled" && this.hasAttribute("disabled") && this._setOpen(!1, "outside"), t === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected)) {
606
+ if (e !== i && (t === "value" && !this._syncing && (this._value = Q(i), this._pending = x(this._value), this._display = this._formatDisplay(), this._inlineError = ""), t === "open" && !this._syncing && (this._open = this.hasAttribute("open"), this._syncOverlay("attribute")), t === "mode" && this._syncOverlay("attribute"), t === "disabled" && this.hasAttribute("disabled") && this._setOpen(!1, "outside"), t === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected)) {
595
607
  if (!this._hasView) {
596
608
  this.requestRender();
597
609
  return;
@@ -696,7 +708,7 @@ class _t extends tt {
696
708
  };
697
709
  }
698
710
  _formatDateTimeDisplay(t) {
699
- const e = k(t);
711
+ const e = A(t);
700
712
  return e ? `${ot(e.date, this._locale(), "locale", null)} ${e.time}` : t || "";
701
713
  }
702
714
  _formatDisplay() {
@@ -704,30 +716,28 @@ class _t extends tt {
704
716
  return !t && !e ? "" : t && e ? `${this._formatDateTimeDisplay(t)} — ${this._formatDateTimeDisplay(e)}` : this._formatDateTimeDisplay(t || e);
705
717
  }
706
718
  _normalizePendingState(t) {
707
- var p, m;
708
719
  let e = D(t.startDate, t.startTime), i = D(t.endDate, t.endTime);
709
720
  if (e && i && I(e, i) > 0 && this._autoNormalize()) {
710
- const g = e;
711
- e = i, i = g;
721
+ const p = e;
722
+ e = i, i = p;
712
723
  }
713
- const r = P(this.getAttribute("min")), o = P(this.getAttribute("max"));
714
- let n = r ? `${r.date}T${r.time}` : null, s = o ? `${o.date}T${o.time}` : null;
724
+ const r = P(this.getAttribute("min")), l = P(this.getAttribute("max"));
725
+ let n = r ? `${r.date}T${r.time}` : null, s = l ? `${l.date}T${l.time}` : null;
715
726
  if (n && s && I(n, s) > 0) {
716
- const g = n;
717
- n = s, s = g;
727
+ const p = n;
728
+ n = s, s = p;
718
729
  }
719
730
  e && n && I(e, n) < 0 && (e = n), e && s && I(e, s) > 0 && (e = s), i && n && I(i, n) < 0 && (i = n), i && s && I(i, s) > 0 && (i = s);
720
- const a = k(e || ""), l = k(i || "");
731
+ const a = A(e || ""), u = A(i || "");
721
732
  return {
722
- startDate: (a == null ? void 0 : a.date) || null,
723
- endDate: (l == null ? void 0 : l.date) || null,
724
- startTime: ((p = a == null ? void 0 : a.time) == null ? void 0 : p.slice(0, 5)) || t.startTime,
725
- endTime: ((m = l == null ? void 0 : l.time) == null ? void 0 : m.slice(0, 5)) || t.endTime
733
+ startDate: a?.date || null,
734
+ endDate: u?.date || null,
735
+ startTime: a?.time?.slice(0, 5) || t.startTime,
736
+ endTime: u?.time?.slice(0, 5) || t.endTime
726
737
  };
727
738
  }
728
739
  _commit(t, e) {
729
- if (this._isInteractionBlocked() || this._isReadonly())
730
- return;
740
+ if (this._isInteractionBlocked() || this._isReadonly()) return;
731
741
  const i = this._normalizePendingState(t), r = {
732
742
  start: D(i.startDate, i.startTime),
733
743
  end: D(i.endDate, i.endTime)
@@ -763,25 +773,20 @@ class _t extends tt {
763
773
  }
764
774
  }
765
775
  _ensureOverlay() {
766
- if (this._overlay || typeof document > "u")
767
- return;
776
+ if (this._overlay || typeof document > "u") return;
768
777
  const t = document.createElement("div");
769
- 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), t.addEventListener("change", this._onOverlayCalendarBound), 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 = lt());
778
+ t.className = "ui-date-range-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), t.addEventListener("change", this._onOverlayCalendarBound), 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 = lt());
770
779
  }
771
780
  _syncOverlayHostZIndex() {
772
- if (!this._overlay || typeof window > "u")
773
- return;
781
+ if (!this._overlay || typeof window > "u") return;
774
782
  const t = window.getComputedStyle(this).getPropertyValue("--ui-drtp-z").trim();
775
783
  this._overlay.style.zIndex = t || "1600";
776
784
  }
777
785
  _destroyOverlay() {
778
- var t;
779
- (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.removeEventListener("change", this._onOverlayCalendarBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayKey = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
786
+ 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.removeEventListener("change", this._onOverlayCalendarBound), this._overlay.parentElement && this._overlay.parentElement.removeChild(this._overlay), this._overlay = null, this._overlayKey = null, this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null));
780
787
  }
781
788
  _syncDismissableLayer() {
782
- var i;
783
- if ((i = this._dismissableLayer) == null || i.destroy(), this._dismissableLayer = null, !this._open || !this._overlay)
784
- return;
789
+ if (this._dismissableLayer?.destroy(), this._dismissableLayer = null, !this._open || !this._overlay) return;
785
790
  const t = this._overlay.querySelector(".panel, .sheet"), e = this.root.querySelector(".field");
786
791
  t && (this._dismissableLayer = et({
787
792
  node: t,
@@ -789,15 +794,13 @@ class _t extends tt {
789
794
  closeOnEscape: !0,
790
795
  closeOnPointerOutside: !0,
791
796
  closeOnFocusOutside: !1,
792
- onBeforeDismiss: (r) => r === "escape-key" ? (this._setOpen(!1, "escape"), !1) : (r === "outside-pointer" && this._setOpen(!1, "outside"), !1)
797
+ onBeforeDismiss: (i) => i === "escape-key" ? (this._setOpen(!1, "escape"), !1) : (i === "outside-pointer" && this._setOpen(!1, "outside"), !1)
793
798
  }));
794
799
  }
795
800
  _positionOverlay() {
796
- if (!this._overlay || !this._open || this._isMobileSheet())
797
- return;
801
+ if (!this._overlay || !this._open || this._isMobileSheet()) return;
798
802
  const t = this.root.querySelector(".field"), e = this._overlay.querySelector(".panel");
799
- if (!t || !e)
800
- return;
803
+ if (!t || !e) return;
801
804
  const i = e.getAttribute("data-placement"), r = dt(
802
805
  t.getBoundingClientRect(),
803
806
  e.getBoundingClientRect(),
@@ -808,14 +811,14 @@ class _t extends tt {
808
811
  e.style.position = "absolute", e.style.top = `${Math.round(r.top)}px`, e.style.left = `${Math.round(r.left)}px`, e.setAttribute("data-placement", r.placement);
809
812
  }
810
813
  _timeOptions(t) {
811
- const e = A(t, !0) || { hours: 0, minutes: 0, seconds: 0 }, i = this._step(), r = Array.from({ length: 24 }, (n, s) => `<option value="${s}" ${s === e.hours ? "selected" : ""}>${S(s)}</option>`).join(""), o = Array.from({ length: Math.ceil(60 / i) }, (n, s) => {
814
+ const e = k(t) || { hours: 0, minutes: 0 }, i = this._step(), r = Array.from({ length: 24 }, (n, s) => `<option value="${s}" ${s === e.hours ? "selected" : ""}>${w(s)}</option>`).join(""), l = Array.from({ length: Math.ceil(60 / i) }, (n, s) => {
812
815
  const a = Math.min(59, s * i);
813
- return `<option value="${a}" ${a === e.minutes ? "selected" : ""}>${S(a)}</option>`;
816
+ return `<option value="${a}" ${a === e.minutes ? "selected" : ""}>${w(a)}</option>`;
814
817
  }).join("");
815
- return { hours: r, minutes: o };
818
+ return { hours: r, minutes: l };
816
819
  }
817
820
  _renderSurfaceInner(t, e = !1) {
818
- const i = this._translations(), r = this._timeOptions(this._pending.startTime), o = this._timeOptions(this._pending.endTime), n = (this.getAttribute("label") || "").trim(), s = c(n), a = c(n || i.selectDateRange), l = this._valueFromPending(), p = l.start && l.end ? `${this._formatDateTimeDisplay(l.start)} — ${this._formatDateTimeDisplay(l.end)}` : i.selectDateRange, m = c(`${i.startTime} ${i.hour}`), g = c(`${i.startTime} ${i.minute}`), v = c(`${i.endTime} ${i.hour}`), d = c(`${i.endTime} ${i.minute}`), f = `
821
+ const i = this._translations(), r = this._timeOptions(this._pending.startTime), l = this._timeOptions(this._pending.endTime), n = (this.getAttribute("label") || "").trim(), s = c(n), a = c(n || i.selectDateRange), u = this._valueFromPending(), p = u.start && u.end ? `${this._formatDateTimeDisplay(u.start)} — ${this._formatDateTimeDisplay(u.end)}` : i.selectDateRange, g = c(`${i.startTime} ${i.hour}`), S = c(`${i.startTime} ${i.minute}`), y = c(`${i.endTime} ${i.hour}`), o = c(`${i.endTime} ${i.minute}`), b = `
819
822
  <header class="head">
820
823
  <div>
821
824
  <p class="head-title" ${n ? "" : "hidden"}>${s}</p>
@@ -835,13 +838,13 @@ class _t extends tt {
835
838
  </div>
836
839
  <div class="time-row">
837
840
  <p class="time-row-label"><span class="icon-inline">${B}</span>${c(i.startTime)}</p>
838
- <select data-time="start" data-segment="hours" aria-label="${m}">${r.hours}</select>
839
- <select data-time="start" data-segment="minutes" aria-label="${g}">${r.minutes}</select>
841
+ <select data-time="start" data-segment="hours" aria-label="${g}">${r.hours}</select>
842
+ <select data-time="start" data-segment="minutes" aria-label="${S}">${r.minutes}</select>
840
843
  </div>
841
844
  <div class="time-row">
842
845
  <p class="time-row-label"><span class="icon-inline">${B}</span>${c(i.endTime)}</p>
843
- <select data-time="end" data-segment="hours" aria-label="${v}">${o.hours}</select>
844
- <select data-time="end" data-segment="minutes" aria-label="${d}">${o.minutes}</select>
846
+ <select data-time="end" data-segment="hours" aria-label="${y}">${l.hours}</select>
847
+ <select data-time="end" data-segment="minutes" aria-label="${o}">${l.minutes}</select>
845
848
  </div>
846
849
  </div>
847
850
  </div>
@@ -858,28 +861,28 @@ class _t extends tt {
858
861
  <button type="button" class="action" data-action="apply" data-tone="primary">${c(i.apply)}</button>
859
862
  </footer>
860
863
  `;
861
- return e ? f : `
862
- <style>${ft}</style>
864
+ return e ? b : `
865
+ <style>${gt}</style>
863
866
  ${t ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
864
- <section class="${t ? "sheet" : "panel"}" id="${this._panelId}" role="dialog" aria-modal="${t ? "true" : "false"}" aria-label="${a}" part="${t ? "sheet" : "popover"}">${f}</section>
867
+ <section class="${t ? "sheet" : "panel"}" id="${this._panelId}" role="dialog" aria-modal="${t ? "true" : "false"}" aria-label="${a}" part="${t ? "sheet" : "popover"}">${b}</section>
865
868
  `;
866
869
  }
867
870
  _syncCalendar(t) {
868
- const e = (l, p) => {
871
+ const e = (u, p) => {
869
872
  if (p == null || p === "") {
870
- t.hasAttribute(l) && t.removeAttribute(l);
873
+ t.hasAttribute(u) && t.removeAttribute(u);
871
874
  return;
872
875
  }
873
- t.getAttribute(l) !== p && t.setAttribute(l, p);
874
- }, i = (l, p) => {
875
- p ? e(l, "") : e(l, null);
876
+ t.getAttribute(u) !== p && t.setAttribute(u, p);
877
+ }, i = (u, p) => {
878
+ p ? e(u, "") : e(u, null);
876
879
  };
877
880
  e("selection", "range"), e("value", JSON.stringify({
878
881
  ...this._pending.startDate ? { start: this._pending.startDate } : {},
879
882
  ...this._pending.endDate ? { end: this._pending.endDate } : {}
880
883
  }));
881
- const r = P(this.getAttribute("min")), o = P(this.getAttribute("max"));
882
- e("min", (r == null ? void 0 : r.date) || null), e("max", (o == null ? void 0 : o.date) || null), e("locale", this.getAttribute("locale")), e("translations", this.getAttribute("translations")), e("week-start", this.getAttribute("week-start"));
884
+ const r = P(this.getAttribute("min")), l = P(this.getAttribute("max"));
885
+ e("min", r?.date || null), e("max", l?.date || null), e("locale", this.getAttribute("locale")), e("translations", this.getAttribute("translations")), e("week-start", this.getAttribute("week-start"));
883
886
  const s = this.getAttribute("size") || "sm", a = t.classList.contains("drtp-calendar-inline");
884
887
  e("size", s === "lg" ? "md" : "sm"), e("variant", this.getAttribute("variant")), i("readonly", this._isReadonly()), i("disabled", this._isInteractionBlocked()), i("bare", this._isBare()), e("tabindex", "-1"), s === "lg" ? (t.style.setProperty("--ui-calendar-day-height", "1.95em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.2em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.26em"), t.style.setProperty("--ui-calendar-gap", "0.42em"), t.style.setProperty("--ui-calendar-day-font-size", "0.78em"), t.style.setProperty("--ui-calendar-weekday-font-size", "0.7em"), t.style.setProperty("--ui-calendar-title-font-size", "0.88em")) : (t.style.setProperty("--ui-calendar-day-height", "2.4em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.14em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.22em"), t.style.setProperty("--ui-calendar-gap", "0.34em"), t.style.setProperty("--ui-calendar-day-font-size", "0.72em"), t.style.setProperty("--ui-calendar-weekday-font-size", "0.64em"), t.style.setProperty("--ui-calendar-title-font-size", "0.8em")), a ? (t.style.setProperty("--ui-calendar-frame-padding", "0.32em"), t.style.setProperty("--ui-calendar-week-gap", "0.18em"), t.style.setProperty("--ui-calendar-control-height", "1.72em"), t.style.setProperty("--ui-calendar-gap", "0.24em")) : (t.style.removeProperty("--ui-calendar-frame-padding"), t.style.removeProperty("--ui-calendar-week-gap"), t.style.removeProperty("--ui-calendar-control-height")), e("aria-label", this.getAttribute("label") || this._translations().selectDateRange);
885
888
  }
@@ -893,62 +896,56 @@ class _t extends tt {
893
896
  ].join(":");
894
897
  }
895
898
  _ensureOverlayContent(t) {
896
- if (!this._overlay)
897
- return;
899
+ if (!this._overlay) return;
898
900
  const e = this._overlaySignature(t);
899
901
  this._overlayKey === e && this._overlay.querySelector(".drtp-calendar") || (this._overlayKey = e, this._overlay.innerHTML = t ? `<div class="sheet-wrap">${this._renderSurfaceInner(!0)}</div>` : `<div class="overlay">${this._renderSurfaceInner(!1)}</div>`);
900
902
  }
901
903
  _setClosestOptionValue(t, e) {
902
904
  const i = Array.from(t.options).map((n) => Number(n.value)).filter((n) => Number.isFinite(n));
903
- if (!i.length)
904
- return;
905
- let r = i[0], o = Math.abs(r - e);
905
+ if (!i.length) return;
906
+ let r = i[0], l = Math.abs(r - e);
906
907
  for (let n = 1; n < i.length; n += 1) {
907
908
  const s = i[n], a = Math.abs(s - e);
908
- a < o && (r = s, o = a);
909
+ a < l && (r = s, l = a);
909
910
  }
910
911
  t.value = String(r);
911
912
  }
912
913
  _syncOverlayState() {
913
- if (!this._overlay)
914
- return;
914
+ if (!this._overlay) return;
915
915
  this._syncOverlayHostZIndex();
916
916
  const t = this._isMobileSheet();
917
917
  this._ensureOverlayContent(t), this._syncDismissableLayer();
918
- const e = this._translations(), i = this._overlay.querySelector(".panel, .sheet"), r = this._overlay.querySelector(".presets"), o = this._overlay.querySelector(".footer");
918
+ const e = this._translations(), i = this._overlay.querySelector(".panel, .sheet"), r = this._overlay.querySelector(".presets"), l = this._overlay.querySelector(".footer");
919
919
  i && (i.dataset.bare = this._isBare() ? "true" : "false");
920
920
  const n = this._showFooter();
921
- r && (r.hidden = !n), o && (o.hidden = !n);
921
+ r && (r.hidden = !n), l && (l.hidden = !n);
922
922
  const s = this._overlay.querySelector(".head-title");
923
923
  if (s) {
924
- const b = (this.getAttribute("label") || "").trim();
925
- s.textContent = b, s.hidden = !b;
924
+ const m = (this.getAttribute("label") || "").trim();
925
+ s.textContent = m, s.hidden = !m;
926
926
  }
927
- const a = this._overlay.querySelector(".head-meta"), l = this._valueFromPending();
928
- a && (a.textContent = l.start && l.end ? `${this._formatDateTimeDisplay(l.start)} — ${this._formatDateTimeDisplay(l.end)}` : e.selectDateRange);
927
+ const a = this._overlay.querySelector(".head-meta"), u = this._valueFromPending();
928
+ a && (a.textContent = u.start && u.end ? `${this._formatDateTimeDisplay(u.start)} — ${this._formatDateTimeDisplay(u.end)}` : e.selectDateRange);
929
929
  const p = this._overlay.querySelector(".drtp-calendar");
930
930
  p && this._syncCalendar(p);
931
- const m = A(this._pending.startTime, !0) || { hours: 0, minutes: 0, seconds: 0 }, g = A(this._pending.endTime, !0) || { hours: 0, minutes: 0, seconds: 0 }, v = this._overlay.querySelector('select[data-time="start"][data-segment="hours"]'), d = this._overlay.querySelector('select[data-time="start"][data-segment="minutes"]'), f = this._overlay.querySelector('select[data-time="end"][data-segment="hours"]'), _ = this._overlay.querySelector('select[data-time="end"][data-segment="minutes"]');
932
- v && this._setClosestOptionValue(v, m.hours), d && this._setClosestOptionValue(d, m.minutes), f && this._setClosestOptionValue(f, g.hours), _ && this._setClosestOptionValue(_, g.minutes);
933
- const y = this._isInteractionBlocked() || this._isReadonly();
934
- [v, d, f, _].forEach((b) => {
935
- b && (b.disabled = y);
936
- }), this._overlay.querySelectorAll(".action, .preset").forEach((b) => {
937
- b.disabled = y;
931
+ const g = k(this._pending.startTime) || { hours: 0, minutes: 0 }, S = k(this._pending.endTime) || { hours: 0, minutes: 0 }, y = this._overlay.querySelector('select[data-time="start"][data-segment="hours"]'), o = this._overlay.querySelector('select[data-time="start"][data-segment="minutes"]'), b = this._overlay.querySelector('select[data-time="end"][data-segment="hours"]'), f = this._overlay.querySelector('select[data-time="end"][data-segment="minutes"]');
932
+ y && this._setClosestOptionValue(y, g.hours), o && this._setClosestOptionValue(o, g.minutes), b && this._setClosestOptionValue(b, S.hours), f && this._setClosestOptionValue(f, S.minutes);
933
+ const _ = this._isInteractionBlocked() || this._isReadonly();
934
+ [y, o, b, f].forEach((m) => {
935
+ m && (m.disabled = _);
936
+ }), this._overlay.querySelectorAll(".action, .preset").forEach((m) => {
937
+ m.disabled = _;
938
938
  }), t || this._schedulePosition.run();
939
939
  }
940
940
  _renderOverlay() {
941
941
  this._syncOverlayState();
942
942
  }
943
943
  _applyTimeFromOverlay(t) {
944
- var a, l;
945
- const e = t.getAttribute("data-time"), i = (a = this._overlay) == null ? void 0 : a.querySelector(`select[data-time="${e}"][data-segment="hours"]`), r = (l = this._overlay) == null ? void 0 : l.querySelector(`select[data-time="${e}"][data-segment="minutes"]`);
946
- if (!e || !i || !r)
947
- return;
948
- const o = Number(i.value), n = Number(r.value);
949
- if (!Number.isFinite(o) || !Number.isFinite(n))
950
- return;
951
- const s = `${S(o)}:${S(n)}`;
944
+ const e = t.getAttribute("data-time"), i = this._overlay?.querySelector(`select[data-time="${e}"][data-segment="hours"]`), r = this._overlay?.querySelector(`select[data-time="${e}"][data-segment="minutes"]`);
945
+ if (!e || !i || !r) return;
946
+ const l = Number(i.value), n = Number(r.value);
947
+ if (!Number.isFinite(l) || !Number.isFinite(n)) return;
948
+ const s = `${w(l)}:${w(n)}`;
952
949
  e === "start" && (this._pending.startTime = s), e === "end" && (this._pending.endTime = s), this._pending = this._normalizePendingState(this._pending), this._emitInput("time");
953
950
  }
954
951
  _todayIso() {
@@ -970,18 +967,16 @@ class _t extends tt {
970
967
  this._pending.startDate = i.start, this._pending.endDate = i.end, this._pending = this._normalizePendingState(this._pending), this._emitInput("preset-month");
971
968
  }
972
969
  _onRootClick(t) {
973
- var r;
974
970
  const e = t.target;
975
- if (!e)
976
- return;
977
- const i = (r = e.closest("[data-action]")) == null ? void 0 : r.getAttribute("data-action");
971
+ if (!e) return;
972
+ const i = e.closest("[data-action]")?.getAttribute("data-action");
978
973
  if (i && !this._isInteractionBlocked() && !(this._isReadonly() && i !== "toggle")) {
979
974
  if (i === "toggle") {
980
975
  this._restoreFocusEl = e, this._setOpen(!this._open, "toggle");
981
976
  return;
982
977
  }
983
978
  if (i === "clear") {
984
- this._isInlineMode() ? (this._pending = w({ start: null, end: null }), this._emitInput("clear"), this._updateHostState()) : (this._pending = w({ start: null, end: null }), this._commit(this._pending, "clear"));
979
+ this._isInlineMode() ? (this._pending = x({ start: null, end: null }), this._emitInput("clear"), this._updateHostState()) : (this._pending = x({ start: null, end: null }), this._commit(this._pending, "clear"));
985
980
  return;
986
981
  }
987
982
  if (this._isInlineMode() && (i === "preset-today" || i === "preset-last7" || i === "preset-month")) {
@@ -989,15 +984,14 @@ class _t extends tt {
989
984
  return;
990
985
  }
991
986
  if (this._isInlineMode() && i === "cancel") {
992
- this._pending = w(this._value), this._updateHostState();
987
+ this._pending = x(this._value), this._updateHostState();
993
988
  return;
994
989
  }
995
990
  this._isInlineMode() && i === "apply" && this._commit(this._pending, "apply");
996
991
  }
997
992
  }
998
993
  _onRootChange(t) {
999
- if (!this._isInlineMode())
1000
- return;
994
+ if (!this._isInlineMode()) return;
1001
995
  const e = t.target;
1002
996
  if (e) {
1003
997
  if (e.tagName.toLowerCase() === "ui-calendar") {
@@ -1005,8 +999,7 @@ class _t extends tt {
1005
999
  return;
1006
1000
  }
1007
1001
  if (e instanceof HTMLSelectElement && e.closest(".inline-panel")) {
1008
- if (!e.matches("select[data-time][data-segment]") || this._isInteractionBlocked() || this._isReadonly())
1009
- return;
1002
+ if (!e.matches("select[data-time][data-segment]") || this._isInteractionBlocked() || this._isReadonly()) return;
1010
1003
  if (this._applyTimeFromOverlay(e), this._shouldAutoCommit()) {
1011
1004
  const i = this._valueFromPending();
1012
1005
  if (i.start && i.end) {
@@ -1029,22 +1022,20 @@ class _t extends tt {
1029
1022
  }
1030
1023
  }
1031
1024
  _onOverlayClick(t) {
1032
- var r;
1033
1025
  const e = t.target;
1034
- if (!e)
1035
- return;
1036
- const i = (r = e.closest("[data-action]")) == null ? void 0 : r.getAttribute("data-action");
1026
+ if (!e) return;
1027
+ const i = e.closest("[data-action]")?.getAttribute("data-action");
1037
1028
  if (i && !(this._isInteractionBlocked() || this._isReadonly())) {
1038
1029
  if (i === "backdrop") {
1039
1030
  this._setOpen(!1, "outside");
1040
1031
  return;
1041
1032
  }
1042
1033
  if (i === "cancel") {
1043
- this._pending = w(this._value), this._setOpen(!1, "cancel");
1034
+ this._pending = x(this._value), this._setOpen(!1, "cancel");
1044
1035
  return;
1045
1036
  }
1046
1037
  if (i === "clear") {
1047
- this._pending = w({ start: null, end: null }), this._emitInput("clear"), this._renderOverlay();
1038
+ this._pending = x({ start: null, end: null }), this._emitInput("clear"), this._renderOverlay();
1048
1039
  return;
1049
1040
  }
1050
1041
  if (i === "preset-today" || i === "preset-last7" || i === "preset-month") {
@@ -1062,11 +1053,9 @@ class _t extends tt {
1062
1053
  }
1063
1054
  }
1064
1055
  _onOverlayCalendar(t) {
1065
- if (this._isInteractionBlocked() || this._isReadonly())
1066
- return;
1056
+ if (this._isInteractionBlocked() || this._isReadonly()) return;
1067
1057
  const e = t.target;
1068
- if (!e || e.tagName.toLowerCase() !== "ui-calendar")
1069
- return;
1058
+ if (!e || e.tagName.toLowerCase() !== "ui-calendar") return;
1070
1059
  const i = t.detail;
1071
1060
  if (!(!i || i.mode !== "range")) {
1072
1061
  if (this._pending.startDate = i.start || null, this._pending.endDate = i.end || null, this._pending = this._normalizePendingState(this._pending), this._emitInput("calendar"), this._shouldAutoCommit() && this._pending.startDate && this._pending.endDate) {
@@ -1077,8 +1066,7 @@ class _t extends tt {
1077
1066
  }
1078
1067
  }
1079
1068
  _onDocumentPointerDown(t) {
1080
- if (!this._open || !this._overlay)
1081
- return;
1069
+ if (!this._open || !this._overlay) return;
1082
1070
  const e = t.composedPath();
1083
1071
  e.includes(this) || e.includes(this._overlay) || this._setOpen(!1, "outside");
1084
1072
  }
@@ -1086,46 +1074,45 @@ class _t extends tt {
1086
1074
  this._open && t.key === "Escape" && (t.preventDefault(), this._setOpen(!1, "escape"));
1087
1075
  }
1088
1076
  _updateHostState() {
1089
- if (!this._hasView)
1090
- return;
1091
- const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", r = this._inlineError || i, o = !!(this._value.start || this._value.end), n = this.getAttribute("name") || "", s = this._isInlineMode(), a = this._translations(), l = r ? "error" : this._state(), p = this._formatDisplay();
1077
+ if (!this._hasView) return;
1078
+ const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", r = this._inlineError || i, l = !!(this._value.start || this._value.end), n = this.getAttribute("name") || "", s = this._isInlineMode(), a = this._translations(), u = r ? "error" : this._state(), p = this._formatDisplay();
1092
1079
  this._display = p, this._state() === "loading" ? this.setAttribute("aria-busy", "true") : this.removeAttribute("aria-busy");
1093
- const m = this.root.querySelector(".label"), g = this.root.querySelector(".label-text"), v = this.root.querySelector(".required"), d = this.root.querySelector(".input"), f = this.root.querySelector('.btn[data-action="clear"]'), _ = this.root.querySelector('.btn[data-action="toggle"]'), y = this.root.querySelector(".hint"), b = this.root.querySelector(".error"), $ = this.root.querySelector(".hidden-input");
1094
- if (m && (m.hidden = !t, m.id = this._labelId, m.setAttribute("for", this._inputId)), g && (g.textContent = t), v && (v.hidden = !this.hasAttribute("required")), d && (d.value !== p && (d.value = p), d.id = this._inputId, d.placeholder = a.dateRangeTimePlaceholder, d.readOnly = !0, d.disabled = this._isInteractionBlocked(), d.required = this.hasAttribute("required"), d.autocomplete = "off", d.setAttribute("role", "combobox"), d.setAttribute("aria-haspopup", "dialog"), d.setAttribute("aria-expanded", s ? "false" : String(this._open)), d.setAttribute("aria-controls", this._panelId), d.setAttribute("aria-invalid", r ? "true" : "false"), t ? d.setAttribute("aria-labelledby", this._labelId) : d.removeAttribute("aria-labelledby")), f && (f.hidden = !(this._clearable() && o), f.setAttribute("aria-label", a.clearDateRange), f.disabled = this._isInteractionBlocked()), _ && (_.hidden = s, _.setAttribute("aria-label", a.toggleCalendar), _.setAttribute("aria-expanded", s ? "false" : String(this._open)), _.setAttribute("aria-controls", this._panelId), _.disabled = this._isInteractionBlocked()), y && (y.id = this._hintId, y.hidden = !e, y.textContent = e), b && (b.id = this._errorId, b.hidden = !r, b.textContent = r), d) {
1095
- const x = [];
1096
- e && y && !y.hidden && x.push(this._hintId), r && x.push(this._errorId), x.length ? d.setAttribute("aria-describedby", x.join(" ")) : d.removeAttribute("aria-describedby");
1080
+ const g = this.root.querySelector(".label"), S = this.root.querySelector(".label-text"), y = this.root.querySelector(".required"), o = this.root.querySelector(".input"), b = this.root.querySelector('.btn[data-action="clear"]'), f = this.root.querySelector('.btn[data-action="toggle"]'), _ = this.root.querySelector(".hint"), m = this.root.querySelector(".error"), $ = this.root.querySelector(".hidden-input");
1081
+ if (g && (g.hidden = !t, g.id = this._labelId, g.setAttribute("for", this._inputId)), S && (S.textContent = t), y && (y.hidden = !this.hasAttribute("required")), o && (o.value !== p && (o.value = p), o.id = this._inputId, o.placeholder = a.dateRangeTimePlaceholder, o.readOnly = !0, o.disabled = this._isInteractionBlocked(), o.required = this.hasAttribute("required"), o.autocomplete = "off", o.setAttribute("role", "combobox"), o.setAttribute("aria-haspopup", "dialog"), o.setAttribute("aria-expanded", s ? "false" : String(this._open)), o.setAttribute("aria-controls", this._panelId), o.setAttribute("aria-invalid", r ? "true" : "false"), t ? o.setAttribute("aria-labelledby", this._labelId) : o.removeAttribute("aria-labelledby")), b && (b.hidden = !(this._clearable() && l), b.setAttribute("aria-label", a.clearDateRange), b.disabled = this._isInteractionBlocked()), f && (f.hidden = s, f.setAttribute("aria-label", a.toggleCalendar), f.setAttribute("aria-expanded", s ? "false" : String(this._open)), f.setAttribute("aria-controls", this._panelId), f.disabled = this._isInteractionBlocked()), _ && (_.id = this._hintId, _.hidden = !e, _.textContent = e), m && (m.id = this._errorId, m.hidden = !r, m.textContent = r), o) {
1082
+ const v = [];
1083
+ e && _ && !_.hidden && v.push(this._hintId), r && v.push(this._errorId), v.length ? o.setAttribute("aria-describedby", v.join(" ")) : o.removeAttribute("aria-describedby");
1097
1084
  }
1098
1085
  $ && ($.disabled = !n, $.name = n, $.value = X(this._value) || "");
1099
1086
  const O = this.root.querySelector(".field");
1100
- O && (O.dataset.open = this._open && !s ? "true" : "false", O.dataset.invalid = r ? "true" : "false", O.dataset.state = l);
1101
- const u = this.root.querySelector(".inline-panel");
1102
- if (u) {
1103
- u.hidden = !s, u.id = this._panelId, u.dataset.bare = this._isBare() ? "true" : "false", u.setAttribute("role", "dialog"), u.setAttribute("aria-modal", "false"), u.setAttribute("aria-label", t || a.selectDateRange);
1104
- const x = u.querySelector(".panel-title");
1105
- x && (x.textContent = t, x.hidden = !t);
1106
- const R = u.querySelector(".head-title");
1087
+ O && (O.dataset.open = this._open && !s ? "true" : "false", O.dataset.invalid = r ? "true" : "false", O.dataset.state = u);
1088
+ const d = this.root.querySelector(".inline-panel");
1089
+ if (d) {
1090
+ d.hidden = !s, d.id = this._panelId, d.dataset.bare = this._isBare() ? "true" : "false", d.setAttribute("role", "dialog"), d.setAttribute("aria-modal", "false"), d.setAttribute("aria-label", t || a.selectDateRange);
1091
+ const v = d.querySelector(".panel-title");
1092
+ v && (v.textContent = t, v.hidden = !t);
1093
+ const R = d.querySelector(".head-title");
1107
1094
  R && (R.textContent = t, R.hidden = !t);
1108
- const H = u.querySelector(".head-meta"), T = this._valueFromPending();
1109
- H && (H.textContent = T.start && T.end ? `${this._formatDateTimeDisplay(T.start)} — ${this._formatDateTimeDisplay(T.end)}` : a.selectDateRange);
1110
- const V = u.querySelector(".drtp-calendar-inline");
1095
+ const H = d.querySelector(".head-meta"), z = this._valueFromPending();
1096
+ H && (H.textContent = z.start && z.end ? `${this._formatDateTimeDisplay(z.start)} — ${this._formatDateTimeDisplay(z.end)}` : a.selectDateRange);
1097
+ const V = d.querySelector(".drtp-calendar-inline");
1111
1098
  V && this._syncCalendar(V);
1112
- const L = u.querySelector('select[data-time="start"][data-segment="hours"]'), q = u.querySelector('select[data-time="start"][data-segment="minutes"]'), E = u.querySelector('select[data-time="end"][data-segment="hours"]'), M = u.querySelector('select[data-time="end"][data-segment="minutes"]'), F = A(this._pending.startTime, !0) || { hours: 0, minutes: 0, seconds: 0 }, N = A(this._pending.endTime, !0) || { hours: 0, minutes: 0, seconds: 0 };
1113
- L && this._setClosestOptionValue(L, F.hours), q && this._setClosestOptionValue(q, F.minutes), E && this._setClosestOptionValue(E, N.hours), M && this._setClosestOptionValue(M, N.minutes), [L, q, E, M].forEach((z) => {
1114
- z && (z.disabled = this._isInteractionBlocked() || this._isReadonly());
1099
+ const L = d.querySelector('select[data-time="start"][data-segment="hours"]'), q = d.querySelector('select[data-time="start"][data-segment="minutes"]'), E = d.querySelector('select[data-time="end"][data-segment="hours"]'), M = d.querySelector('select[data-time="end"][data-segment="minutes"]'), F = k(this._pending.startTime) || { hours: 0, minutes: 0 }, N = k(this._pending.endTime) || { hours: 0, minutes: 0 };
1100
+ L && this._setClosestOptionValue(L, F.hours), q && this._setClosestOptionValue(q, F.minutes), E && this._setClosestOptionValue(E, N.hours), M && this._setClosestOptionValue(M, N.minutes), [L, q, E, M].forEach((T) => {
1101
+ T && (T.disabled = this._isInteractionBlocked() || this._isReadonly());
1115
1102
  });
1116
- const K = u.querySelector('[data-action="preset-today"]');
1103
+ const K = d.querySelector('[data-action="preset-today"]');
1117
1104
  K && (K.textContent = a.today);
1118
- const U = u.querySelector('[data-action="preset-last7"]');
1105
+ const U = d.querySelector('[data-action="preset-last7"]');
1119
1106
  U && (U.textContent = a.last7Days);
1120
- const Z = u.querySelector('[data-action="preset-month"]');
1107
+ const Z = d.querySelector('[data-action="preset-month"]');
1121
1108
  Z && (Z.textContent = a.thisMonth);
1122
- const j = u.querySelector('[data-action="clear"]');
1109
+ const j = d.querySelector('[data-action="clear"]');
1123
1110
  j && (j.textContent = a.clear);
1124
- const W = u.querySelector('[data-action="apply"]');
1111
+ const W = d.querySelector('[data-action="apply"]');
1125
1112
  W && (W.textContent = a.apply);
1126
- const J = u.querySelector(".presets"), Y = u.querySelector(".footer"), G = this._showFooter();
1127
- J && (J.hidden = !G), Y && (Y.hidden = !G), u.querySelectorAll(".action, .preset").forEach((z) => {
1128
- z.disabled = this._isInteractionBlocked() || this._isReadonly();
1113
+ const J = d.querySelector(".presets"), Y = d.querySelector(".footer"), G = this._showFooter();
1114
+ J && (J.hidden = !G), Y && (Y.hidden = !G), d.querySelectorAll(".action, .preset").forEach((T) => {
1115
+ T.disabled = this._isInteractionBlocked() || this._isReadonly();
1129
1116
  });
1130
1117
  }
1131
1118
  !s && this._open && this._syncOverlayState(), s && this._destroyOverlay();
@@ -1134,7 +1121,7 @@ class _t extends tt {
1134
1121
  if (!this._hasView) {
1135
1122
  const t = this._translations();
1136
1123
  this.setContent(`
1137
- <style>${gt}</style>
1124
+ <style>${ft}</style>
1138
1125
  <div class="root">
1139
1126
  <label class="label" part="label" id="${this._labelId}">
1140
1127
  <span class="label-text"></span>