@editora/ui-core 0.1.20 → 0.1.22

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 (290) hide show
  1. package/dist/accordion.cjs.js +3 -3
  2. package/dist/accordion.esm.js +3 -3
  3. package/dist/alert-dialog.cjs.js +32 -32
  4. package/dist/alert-dialog.esm.js +95 -75
  5. package/dist/alert.cjs.js +6 -6
  6. package/dist/alert.esm.js +6 -6
  7. package/dist/animated-list.cjs.js +4 -4
  8. package/dist/animated-list.esm.js +4 -4
  9. package/dist/animated-text.cjs.js +4 -4
  10. package/dist/animated-text.esm.js +4 -4
  11. package/dist/app-header.cjs.js +3 -3
  12. package/dist/app-header.esm.js +3 -3
  13. package/dist/aspect-ratio.cjs.js +3 -3
  14. package/dist/aspect-ratio.esm.js +3 -3
  15. package/dist/avatar.cjs.js +14 -14
  16. package/dist/avatar.esm.js +31 -29
  17. package/dist/badge.cjs.js +4 -4
  18. package/dist/badge.esm.js +4 -4
  19. package/dist/block-controls.cjs.js +4 -4
  20. package/dist/block-controls.esm.js +4 -4
  21. package/dist/box.cjs.js +2 -2
  22. package/dist/box.esm.js +2 -2
  23. package/dist/breadcrumb.cjs.js +5 -5
  24. package/dist/breadcrumb.esm.js +5 -5
  25. package/dist/button.cjs.js +1 -1
  26. package/dist/button.esm.js +1 -1
  27. package/dist/{calendar-DLY4acgn.mjs → calendar-DbxYRdlv.mjs} +227 -183
  28. package/dist/{calendar-Dkof-FTK.js → calendar-Qa-cFOp3.js} +74 -35
  29. package/dist/calendar.cjs.js +1 -1
  30. package/dist/calendar.esm.js +1 -1
  31. package/dist/card.cjs.js +8 -8
  32. package/dist/card.esm.js +63 -20
  33. package/dist/chart.cjs.js +4 -4
  34. package/dist/chart.esm.js +6 -6
  35. package/dist/checkbox.cjs.js +2 -2
  36. package/dist/checkbox.esm.js +2 -2
  37. package/dist/collapsible.cjs.js +7 -7
  38. package/dist/collapsible.esm.js +7 -7
  39. package/dist/collection.cjs.js +1 -1
  40. package/dist/collection.esm.js +27 -23
  41. package/dist/color-picker.cjs.js +34 -14
  42. package/dist/color-picker.esm.js +89 -67
  43. package/dist/combobox.cjs.js +29 -27
  44. package/dist/combobox.esm.js +51 -45
  45. package/dist/command.cjs.js +2 -2
  46. package/dist/command.esm.js +2 -2
  47. package/dist/components/ui-alert-dialog.d.ts +1 -0
  48. package/dist/components/ui-alert-dialog.d.ts.map +1 -1
  49. package/dist/components/ui-avatar.d.ts +1 -0
  50. package/dist/components/ui-avatar.d.ts.map +1 -1
  51. package/dist/components/ui-button.d.ts +1 -0
  52. package/dist/components/ui-button.d.ts.map +1 -1
  53. package/dist/components/ui-calendar.d.ts.map +1 -1
  54. package/dist/components/ui-card.d.ts +3 -0
  55. package/dist/components/ui-card.d.ts.map +1 -1
  56. package/dist/components/ui-checkbox.d.ts.map +1 -1
  57. package/dist/components/ui-collection.d.ts.map +1 -1
  58. package/dist/components/ui-color-picker.d.ts.map +1 -1
  59. package/dist/components/ui-combobox.d.ts.map +1 -1
  60. package/dist/components/ui-data-table.d.ts.map +1 -1
  61. package/dist/components/ui-date-field.d.ts.map +1 -1
  62. package/dist/components/ui-date-picker.d.ts.map +1 -1
  63. package/dist/components/ui-date-range-picker.d.ts.map +1 -1
  64. package/dist/components/ui-date-range-time-picker.d.ts.map +1 -1
  65. package/dist/components/ui-date-time-picker.d.ts.map +1 -1
  66. package/dist/components/ui-dock.d.ts +1 -0
  67. package/dist/components/ui-dock.d.ts.map +1 -1
  68. package/dist/components/ui-drawer.d.ts.map +1 -1
  69. package/dist/components/ui-dropdown.d.ts.map +1 -1
  70. package/dist/components/ui-field.d.ts.map +1 -1
  71. package/dist/components/ui-file-upload.d.ts.map +1 -1
  72. package/dist/components/ui-gantt.d.ts.map +1 -1
  73. package/dist/components/ui-input.d.ts.map +1 -1
  74. package/dist/components/ui-menu.d.ts.map +1 -1
  75. package/dist/components/ui-multi-select.d.ts.map +1 -1
  76. package/dist/components/ui-number-field.d.ts.map +1 -1
  77. package/dist/components/ui-password-field.d.ts.map +1 -1
  78. package/dist/components/ui-pin-input.d.ts +1 -0
  79. package/dist/components/ui-pin-input.d.ts.map +1 -1
  80. package/dist/components/ui-placement-grid.d.ts.map +1 -1
  81. package/dist/components/ui-portal.d.ts.map +1 -1
  82. package/dist/components/ui-positioner.d.ts.map +1 -1
  83. package/dist/components/ui-progress.d.ts.map +1 -1
  84. package/dist/components/ui-radio.d.ts.map +1 -1
  85. package/dist/components/ui-rating.d.ts +1 -0
  86. package/dist/components/ui-rating.d.ts.map +1 -1
  87. package/dist/components/ui-select.d.ts.map +1 -1
  88. package/dist/components/ui-sortable.d.ts +8 -0
  89. package/dist/components/ui-sortable.d.ts.map +1 -1
  90. package/dist/components/ui-switch.d.ts.map +1 -1
  91. package/dist/components/ui-table.d.ts.map +1 -1
  92. package/dist/components/ui-tabs.d.ts +1 -0
  93. package/dist/components/ui-tabs.d.ts.map +1 -1
  94. package/dist/components/ui-tags-input.d.ts +1 -0
  95. package/dist/components/ui-tags-input.d.ts.map +1 -1
  96. package/dist/components/ui-textarea.d.ts.map +1 -1
  97. package/dist/components/ui-time-field.d.ts.map +1 -1
  98. package/dist/components/ui-toggle-group.d.ts.map +1 -1
  99. package/dist/components/ui-toggle.d.ts.map +1 -1
  100. package/dist/components/ui-tree.d.ts.map +1 -1
  101. package/dist/components/ui-wizard.d.ts.map +1 -1
  102. package/dist/context-menu.cjs.js +3 -3
  103. package/dist/context-menu.esm.js +4 -4
  104. package/dist/control-name-BmoI1m3a.js +1 -0
  105. package/dist/control-name-Bpj7F34X.mjs +48 -0
  106. package/dist/data-table.cjs.js +5 -2
  107. package/dist/data-table.esm.js +145 -142
  108. package/dist/date-field.cjs.js +5 -5
  109. package/dist/date-field.esm.js +34 -31
  110. package/dist/date-picker.cjs.js +16 -16
  111. package/dist/date-picker.esm.js +48 -44
  112. package/dist/date-range-picker.cjs.js +5 -5
  113. package/dist/date-range-picker.esm.js +120 -118
  114. package/dist/date-range-time-picker.cjs.js +22 -22
  115. package/dist/date-range-time-picker.esm.js +88 -84
  116. package/dist/date-time-picker.cjs.js +26 -26
  117. package/dist/date-time-picker.esm.js +105 -101
  118. package/dist/{date-time-utils-Dmost5Ee.js → date-time-utils-BzfTpeU-.js} +1 -1
  119. package/dist/{date-time-utils-y1N2gvG2.mjs → date-time-utils-Cps2aSu2.mjs} +1 -1
  120. package/dist/description.cjs.js +3 -3
  121. package/dist/description.esm.js +3 -3
  122. package/dist/dialog.cjs.js +2 -2
  123. package/dist/dialog.esm.js +2 -2
  124. package/dist/dock.cjs.js +12 -12
  125. package/dist/dock.esm.js +72 -74
  126. package/dist/drawer.cjs.js +19 -19
  127. package/dist/drawer.esm.js +58 -58
  128. package/dist/dropdown.cjs.js +13 -13
  129. package/dist/dropdown.esm.js +49 -48
  130. package/dist/empty-state.cjs.js +3 -3
  131. package/dist/empty-state.esm.js +3 -3
  132. package/dist/field-error.cjs.js +1 -1
  133. package/dist/field-error.esm.js +1 -1
  134. package/dist/field.cjs.js +12 -12
  135. package/dist/field.esm.js +84 -75
  136. package/dist/fieldset.cjs.js +4 -4
  137. package/dist/fieldset.esm.js +4 -4
  138. package/dist/file-upload.cjs.js +3 -3
  139. package/dist/file-upload.esm.js +5 -3
  140. package/dist/floating-toolbar.cjs.js +8 -8
  141. package/dist/floating-toolbar.esm.js +9 -9
  142. package/dist/form.cjs.js +11 -11
  143. package/dist/form.esm.js +11 -11
  144. package/dist/gantt.cjs.js +43 -32
  145. package/dist/gantt.esm.js +99 -88
  146. package/dist/icon-cloud.cjs.js +3 -3
  147. package/dist/icon-cloud.esm.js +3 -3
  148. package/dist/icon.cjs.js +1 -1
  149. package/dist/icon.esm.js +1 -1
  150. package/dist/index.cjs.js +1 -1
  151. package/dist/index.esm.js +121 -118
  152. package/dist/inline-edit.cjs.js +1 -1
  153. package/dist/inline-edit.esm.js +1 -1
  154. package/dist/input.cjs.js +14 -14
  155. package/dist/input.esm.js +39 -32
  156. package/dist/label.cjs.js +3 -3
  157. package/dist/label.esm.js +3 -3
  158. package/dist/{listbox-B6QgECax.js → listbox-CTpRpuF7.js} +1 -1
  159. package/dist/{listbox-DJamVeFj.mjs → listbox-hMVOhKHC.mjs} +1 -1
  160. package/dist/listbox.cjs.js +1 -1
  161. package/dist/listbox.esm.js +1 -1
  162. package/dist/marquee.cjs.js +3 -3
  163. package/dist/marquee.esm.js +3 -3
  164. package/dist/{menu-item-styles-CbNUEwP2.js → menu-item-styles-B4onAr4C.js} +3 -3
  165. package/dist/{menu-item-styles-CZiPwPwl.mjs → menu-item-styles-IGSFLAHu.mjs} +3 -3
  166. package/dist/menu.cjs.js +7 -7
  167. package/dist/menu.esm.js +29 -28
  168. package/dist/menubar.cjs.js +1 -1
  169. package/dist/menubar.esm.js +2 -2
  170. package/dist/meter.cjs.js +1 -1
  171. package/dist/meter.esm.js +1 -1
  172. package/dist/multi-select.cjs.js +18 -18
  173. package/dist/multi-select.esm.js +82 -66
  174. package/dist/navigation-menu.cjs.js +1 -1
  175. package/dist/navigation-menu.esm.js +1 -1
  176. package/dist/number-field.cjs.js +11 -13
  177. package/dist/number-field.esm.js +29 -27
  178. package/dist/number-ticker.cjs.js +4 -4
  179. package/dist/number-ticker.esm.js +4 -4
  180. package/dist/odometer.cjs.js +2 -2
  181. package/dist/odometer.esm.js +2 -2
  182. package/dist/orbiter.cjs.js +3 -3
  183. package/dist/orbiter.esm.js +3 -3
  184. package/dist/pagination.cjs.js +1 -1
  185. package/dist/pagination.esm.js +1 -1
  186. package/dist/password-field.cjs.js +23 -23
  187. package/dist/password-field.esm.js +48 -47
  188. package/dist/pin-input.cjs.js +8 -6
  189. package/dist/pin-input.esm.js +21 -15
  190. package/dist/placement-grid.cjs.js +4 -4
  191. package/dist/placement-grid.esm.js +58 -58
  192. package/dist/plugin-panel.cjs.js +1 -1
  193. package/dist/plugin-panel.esm.js +1 -1
  194. package/dist/popover.cjs.js +5 -5
  195. package/dist/popover.esm.js +4 -4
  196. package/dist/portal.cjs.js +3 -3
  197. package/dist/portal.esm.js +11 -10
  198. package/dist/positioner.cjs.js +2 -2
  199. package/dist/positioner.esm.js +15 -14
  200. package/dist/primitives/auto-scroll.d.ts +9 -0
  201. package/dist/primitives/auto-scroll.d.ts.map +1 -0
  202. package/dist/primitives/control-name.d.ts +30 -0
  203. package/dist/primitives/control-name.d.ts.map +1 -0
  204. package/dist/primitives/selector.d.ts +4 -0
  205. package/dist/primitives/selector.d.ts.map +1 -0
  206. package/dist/primitives/trigger.d.ts +2 -0
  207. package/dist/primitives/trigger.d.ts.map +1 -0
  208. package/dist/progress.cjs.js +4 -4
  209. package/dist/progress.esm.js +20 -18
  210. package/dist/quick-actions.cjs.js +3 -3
  211. package/dist/quick-actions.esm.js +3 -3
  212. package/dist/radio-group.cjs.js +1 -1
  213. package/dist/radio-group.esm.js +1 -1
  214. package/dist/radio.cjs.js +2 -2
  215. package/dist/radio.esm.js +2 -2
  216. package/dist/rating.cjs.js +17 -16
  217. package/dist/rating.esm.js +91 -92
  218. package/dist/{runtime-D1gFh1fS.mjs → runtime-CFnK53iC.mjs} +133 -94
  219. package/dist/runtime-DwE-tizc.js +1 -0
  220. package/dist/runtime.cjs.js +1 -1
  221. package/dist/runtime.d.ts +1 -1
  222. package/dist/runtime.d.ts.map +1 -1
  223. package/dist/runtime.esm.js +29 -26
  224. package/dist/select.cjs.js +20 -19
  225. package/dist/select.esm.js +36 -32
  226. package/dist/selection-popup.cjs.js +2 -2
  227. package/dist/selection-popup.esm.js +2 -2
  228. package/dist/selector-BvAh35ve.js +1 -0
  229. package/dist/selector-WI8pD7YO.mjs +18 -0
  230. package/dist/separator.cjs.js +7 -7
  231. package/dist/separator.esm.js +7 -7
  232. package/dist/sidebar.cjs.js +7 -7
  233. package/dist/sidebar.esm.js +7 -7
  234. package/dist/skeleton.cjs.js +7 -7
  235. package/dist/skeleton.esm.js +7 -7
  236. package/dist/slider.cjs.js +3 -3
  237. package/dist/slider.esm.js +3 -3
  238. package/dist/slot.cjs.js +3 -3
  239. package/dist/slot.esm.js +3 -3
  240. package/dist/sortable.cjs.js +61 -48
  241. package/dist/sortable.esm.js +636 -554
  242. package/dist/spinning-text.cjs.js +3 -3
  243. package/dist/spinning-text.esm.js +3 -3
  244. package/dist/split-button.cjs.js +1 -1
  245. package/dist/split-button.esm.js +1 -1
  246. package/dist/stepper.cjs.js +1 -1
  247. package/dist/stepper.esm.js +1 -1
  248. package/dist/switch.cjs.js +10 -12
  249. package/dist/switch.esm.js +10 -12
  250. package/dist/table.cjs.js +9 -6
  251. package/dist/table.esm.js +46 -43
  252. package/dist/tabs.cjs.js +22 -23
  253. package/dist/tabs.esm.js +116 -112
  254. package/dist/tags-input.cjs.js +9 -9
  255. package/dist/tags-input.esm.js +32 -25
  256. package/dist/textarea.cjs.js +13 -13
  257. package/dist/textarea.esm.js +46 -31
  258. package/dist/theme.d.ts +18 -0
  259. package/dist/theme.d.ts.map +1 -1
  260. package/dist/time-field.cjs.js +5 -5
  261. package/dist/time-field.esm.js +21 -18
  262. package/dist/time-picker.cjs.js +4 -4
  263. package/dist/time-picker.esm.js +5 -5
  264. package/dist/timeline.cjs.js +2 -2
  265. package/dist/timeline.esm.js +4 -4
  266. package/dist/toast.cjs.js +6 -6
  267. package/dist/toast.esm.js +13 -13
  268. package/dist/toggle-group.cjs.js +5 -6
  269. package/dist/toggle-group.esm.js +63 -60
  270. package/dist/toggle.cjs.js +18 -18
  271. package/dist/toggle.esm.js +32 -31
  272. package/dist/tooltip.cjs.js +4 -4
  273. package/dist/tooltip.esm.js +4 -4
  274. package/dist/transfer-list.cjs.js +32 -32
  275. package/dist/transfer-list.esm.js +57 -57
  276. package/dist/tree-7qbVnpGp.js +39 -0
  277. package/dist/{tree-B3kE8ESs.mjs → tree-Deoft-kO.mjs} +34 -33
  278. package/dist/tree.cjs.js +1 -1
  279. package/dist/tree.esm.js +1 -1
  280. package/dist/trigger-BjnxLCeQ.mjs +9 -0
  281. package/dist/trigger-DkPsKxsP.js +1 -0
  282. package/dist/{ui-button-rXQOS9QJ.js → ui-button-BInsgSbr.js} +27 -26
  283. package/dist/{ui-button-Q0GNNWKC.mjs → ui-button-rfiuUnUD.mjs} +65 -48
  284. package/dist/{ui-icon-YI6lyuqU.mjs → ui-icon-BSi_GtqO.mjs} +2 -2
  285. package/dist/{ui-icon-BzVNC_lr.js → ui-icon-Bvt9oIIR.js} +5 -5
  286. package/dist/wizard.cjs.js +12 -13
  287. package/dist/wizard.esm.js +17 -15
  288. package/package.json +1 -1
  289. package/dist/runtime-CTaOSmBj.js +0 -1
  290. package/dist/tree-Dx_kv_ih.js +0 -39
@@ -1,21 +1,22 @@
1
- import { E as tt } from "./ElementBase-YlTLMsGk.mjs";
2
- import { c as et } from "./dismissable-layer-BmPIoK80.mjs";
3
- import { r as it, c as N } from "./calendar-DLY4acgn.mjs";
4
- import { r as rt, e as nt, i as m, s as st, b as at, p as K, f as Z, a as j, l as W, c as ot, d as w, g as lt, h as dt, n as L } from "./date-time-utils-y1N2gvG2.mjs";
5
- let ut = 0;
6
- const ct = `
1
+ import { E as et } from "./ElementBase-YlTLMsGk.mjs";
2
+ import { s as D, a as E } from "./control-name-Bpj7F34X.mjs";
3
+ import { c as it } from "./dismissable-layer-BmPIoK80.mjs";
4
+ import { r as nt, c as K } from "./calendar-DbxYRdlv.mjs";
5
+ import { r as rt, e as st, i as m, s as at, b as ot, p as Z, f as W, a as Y, l as j, c as lt, d as k, g as dt, h as ut, n as L } from "./date-time-utils-Cps2aSu2.mjs";
6
+ let ct = 0;
7
+ const pt = `
7
8
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
8
9
  <path d="M6 2a1 1 0 0 1 1 1v1h6V3a1 1 0 1 1 2 0v1h.5A2.5 2.5 0 0 1 18 6.5v9A2.5 2.5 0 0 1 15.5 18h-11A2.5 2.5 0 0 1 2 15.5v-9A2.5 2.5 0 0 1 4.5 4H5V3a1 1 0 0 1 1-1Zm10 7H4v6.5c0 .276.224.5.5.5h11a.5.5 0 0 0 .5-.5V9ZM4.5 6a.5.5 0 0 0-.5.5V7h12v-.5a.5.5 0 0 0-.5-.5h-11Z" fill="currentColor"/>
9
10
  </svg>
10
- `, pt = `
11
+ `, ht = `
11
12
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
12
13
  <path d="M5.23 7.21a.75.75 0 0 1 1.06.02L10 11.12l3.71-3.9a.75.75 0 1 1 1.08 1.04l-4.25 4.47a.75.75 0 0 1-1.08 0L5.2 8.27a.75.75 0 0 1 .02-1.06Z" fill="currentColor"/>
13
14
  </svg>
14
- `, ht = `
15
+ `, ft = `
15
16
  <svg viewBox="0 0 20 20" class="icon-svg" aria-hidden="true" focusable="false">
16
17
  <path d="M5.22 5.22a.75.75 0 0 1 1.06 0L10 8.94l3.72-3.72a.75.75 0 1 1 1.06 1.06L11.06 10l3.72 3.72a.75.75 0 1 1-1.06 1.06L10 11.06l-3.72 3.72a.75.75 0 1 1-1.06-1.06L8.94 10 5.22 6.28a.75.75 0 0 1 0-1.06Z" fill="currentColor"/>
17
18
  </svg>
18
- `, ft = `
19
+ `, _t = `
19
20
  :host {
20
21
  --ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
21
22
  --ui-dp-surface: linear-gradient(
@@ -25,7 +26,7 @@ const ct = `
25
26
  );
26
27
  --ui-dp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 76%, transparent);
27
28
  --ui-dp-text: var(--ui-color-text, #0f172a);
28
- --ui-dp-muted: var(--ui-color-muted, #64748b);
29
+ --ui-dp-muted: var(--ui-color-muted, #526175);
29
30
  --ui-dp-accent: var(--ui-color-primary, #2563eb);
30
31
  --ui-dp-success: var(--ui-color-success, #15803d);
31
32
  --ui-dp-radius: 12px;
@@ -321,7 +322,7 @@ const ct = `
321
322
  transform: rotate(360deg);
322
323
  }
323
324
  }
324
- `, _t = `
325
+ `, bt = `
325
326
  .ui-date-range-picker-overlay-host {
326
327
  --ui-dp-bg: color-mix(in srgb, var(--ui-color-surface, #ffffff) 96%, transparent);
327
328
  --ui-dp-surface: linear-gradient(
@@ -331,7 +332,7 @@ const ct = `
331
332
  );
332
333
  --ui-dp-border: color-mix(in srgb, var(--ui-color-border, #cbd5e1) 76%, transparent);
333
334
  --ui-dp-text: var(--ui-color-text, #0f172a);
334
- --ui-dp-muted: var(--ui-color-muted, #64748b);
335
+ --ui-dp-muted: var(--ui-color-muted, #526175);
335
336
  --ui-dp-accent: var(--ui-color-primary, #2563eb);
336
337
  --ui-dp-success: var(--ui-color-success, #15803d);
337
338
  --ui-dp-radius: 12px;
@@ -420,7 +421,7 @@ const ct = `
420
421
  to { opacity: 1; transform: translateY(0); }
421
422
  }
422
423
  `;
423
- function Y(c) {
424
+ function J(c) {
424
425
  if (!c) return { start: null, end: null };
425
426
  try {
426
427
  const t = JSON.parse(c), e = L(t?.start || null), i = L(t?.end || null);
@@ -429,7 +430,7 @@ function Y(c) {
429
430
  return { start: null, end: null };
430
431
  }
431
432
  }
432
- function J(c) {
433
+ function G(c) {
433
434
  return !c.start && !c.end ? null : JSON.stringify({
434
435
  ...c.start ? { start: c.start } : {},
435
436
  ...c.end ? { end: c.end } : {}
@@ -438,24 +439,27 @@ function J(c) {
438
439
  function _(c) {
439
440
  return c.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
440
441
  }
441
- function bt(c, t) {
442
+ function yt(c, t) {
442
443
  const e = c.trim();
443
444
  if (!e) return { start: null, end: null };
444
- const i = e.split(/\s(?:—|–|to)\s/i).map((n) => n.trim()).filter(Boolean);
445
+ const i = e.split(/\s(?:—|–|to)\s/i).map((r) => r.trim()).filter(Boolean);
445
446
  if (i.length > 1) {
446
- const n = w(i[0] || "", t), d = w(i[1] || "", t);
447
- return { start: n, end: d };
447
+ const r = k(i[0] || "", t), d = k(i[1] || "", t);
448
+ return { start: r, end: d };
448
449
  }
449
- return { start: w(e, t), end: null };
450
+ return { start: k(e, t), end: null };
450
451
  }
451
- class yt extends tt {
452
+ class gt extends et {
452
453
  constructor() {
453
- super(...arguments), this._value = { start: null, end: null }, this._pending = { start: null, end: null }, this._draftStart = "", this._draftEnd = "", this._draftSingle = "", 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._overlayMode = null, this._uid = `ui-drp-${++ut}`, this._singleId = `${this._uid}-single`, this._startId = `${this._uid}-start`, this._endId = `${this._uid}-end`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._panelTitleId = `${this._uid}-panel-title`, this._overlayFocusedOnOpen = !1, this._inlineCalendarFramePending = !1, this._inlineCalendarUpgradePending = !1, this._schedulePosition = rt(() => 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._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (t) => {
454
- nt(t, [this._overlay]) || this._schedulePosition.run();
454
+ super(...arguments), this._value = { start: null, end: null }, this._pending = { start: null, end: null }, this._draftStart = "", this._draftEnd = "", this._draftSingle = "", 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._overlayMode = null, this._uid = `ui-drp-${++ct}`, this._singleId = `${this._uid}-single`, this._startId = `${this._uid}-start`, this._endId = `${this._uid}-end`, this._labelId = `${this._uid}-label`, this._hintId = `${this._uid}-hint`, this._errorId = `${this._uid}-error`, this._panelId = `${this._uid}-panel`, this._panelTitleId = `${this._uid}-panel-title`, this._overlayFocusedOnOpen = !1, this._inlineCalendarFramePending = !1, this._inlineCalendarUpgradePending = !1, this._schedulePosition = rt(() => 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._onDocumentPointerDownBound = (t) => this._onDocumentPointerDown(t), this._onDocumentKeyDownBound = (t) => this._onDocumentKeyDown(t), this._onWindowResizeBound = () => this._schedulePosition.run(), this._onWindowScrollBound = (t) => {
455
+ st(t, [this._overlay]) || this._schedulePosition.run();
455
456
  }, this._onOverlayClickBound = (t) => this._onOverlayClick(t), this._onOverlayCalendarBound = (t) => this._onOverlayCalendarChange(t);
456
457
  }
457
458
  static get observedAttributes() {
458
459
  return [
460
+ "aria-label",
461
+ "aria-description",
462
+ "aria-describedby",
459
463
  "open",
460
464
  "default-open",
461
465
  "value",
@@ -490,7 +494,7 @@ class yt extends tt {
490
494
  }
491
495
  connectedCallback() {
492
496
  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._isInitialized) {
493
- const t = Y(this.getAttribute("value") || this.getAttribute("default-value")), e = this._normalizePending(t);
497
+ const t = J(this.getAttribute("value") || this.getAttribute("default-value")), e = this._normalizePending(t);
494
498
  this._value = e, this._pending = { ...e }, this._refreshDraftFromValue(), this._open = this.hasAttribute("open") || m(this.getAttribute("default-open")), this._isInitialized = !0;
495
499
  }
496
500
  this._open && !this._isInlineMode() && this._ensureOverlay(), this._isInlineMode() && this._scheduleInlineCalendarSync();
@@ -499,7 +503,7 @@ class yt extends tt {
499
503
  this.root.removeEventListener("click", this._onRootClickBound), this.root.removeEventListener("input", this._onRootInputBound), this.root.removeEventListener("focusout", this._onRootBlurBound), this.root.removeEventListener("keydown", this._onRootKeyDownBound), this._destroyOverlay(), super.disconnectedCallback();
500
504
  }
501
505
  attributeChangedCallback(t, e, i) {
502
- if (e !== i && (t === "value" && !this._syncing && (this._value = this._normalizePending(Y(i)), this._pending = { ...this._value }, this._refreshDraftFromValue(), this._inlineError = "", this._syncValueAttribute(this._value)), 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 === "min" || t === "max") && !this._syncing && (this._value = this._normalizePending(this._value), this._pending = this._normalizePending(this._pending), this._syncValueAttribute(this._value), this._refreshDraftFromValue()), t === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected)) {
506
+ if (e !== i && (t === "value" && !this._syncing && (this._value = this._normalizePending(J(i)), this._pending = { ...this._value }, this._refreshDraftFromValue(), this._inlineError = "", this._syncValueAttribute(this._value)), 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 === "min" || t === "max") && !this._syncing && (this._value = this._normalizePending(this._value), this._pending = this._normalizePending(this._pending), this._syncValueAttribute(this._value), this._refreshDraftFromValue()), t === "state" && this._state() === "loading" && this._setOpen(!1, "outside"), !!this.isConnected)) {
503
507
  if (!this._hasView) {
504
508
  this.requestRender();
505
509
  return;
@@ -511,7 +515,7 @@ class yt extends tt {
511
515
  return (this.getAttribute("mode") || "popover") === "inline";
512
516
  }
513
517
  _isMobileSheet() {
514
- return st(this.getAttribute("mode"));
518
+ return at(this.getAttribute("mode"));
515
519
  }
516
520
  _isDisabled() {
517
521
  return this.hasAttribute("disabled");
@@ -548,10 +552,10 @@ class yt extends tt {
548
552
  return m(this.getAttribute("allow-same-day"), !0);
549
553
  }
550
554
  _locale() {
551
- return at(this.getAttribute("locale"));
555
+ return ot(this.getAttribute("locale"));
552
556
  }
553
557
  _translations() {
554
- return it(
558
+ return nt(
555
559
  this.getAttribute("locale"),
556
560
  this.getAttribute("translations")
557
561
  );
@@ -560,10 +564,10 @@ class yt extends tt {
560
564
  return (this.getAttribute("range-variant") || "two-fields") === "single-field" ? "single-field" : "two-fields";
561
565
  }
562
566
  _minIso() {
563
- return K(this.getAttribute("min"));
567
+ return Z(this.getAttribute("min"));
564
568
  }
565
569
  _maxIso() {
566
- return K(this.getAttribute("max"));
570
+ return Z(this.getAttribute("max"));
567
571
  }
568
572
  _todayIso() {
569
573
  const t = /* @__PURE__ */ new Date(), e = String(t.getMonth() + 1).padStart(2, "0"), i = String(t.getDate()).padStart(2, "0");
@@ -571,14 +575,14 @@ class yt extends tt {
571
575
  }
572
576
  _resolvedBounds() {
573
577
  let t = this._minIso(), e = this._maxIso();
574
- if (t && e && N(t, e) > 0) {
578
+ if (t && e && K(t, e) > 0) {
575
579
  const i = t;
576
580
  t = e, e = i;
577
581
  }
578
582
  return { min: t, max: e };
579
583
  }
580
584
  _refreshDraftFromValue() {
581
- const t = Z(this._value.start, this._locale(), "locale", null), e = Z(this._value.end, this._locale(), "locale", null);
585
+ const t = W(this._value.start, this._locale(), "locale", null), e = W(this._value.end, this._locale(), "locale", null);
582
586
  this._draftStart = t, this._draftEnd = e, this._draftSingle = [t, e].filter(Boolean).join(" — ");
583
587
  }
584
588
  _syncOpenAttribute(t) {
@@ -590,7 +594,7 @@ class yt extends tt {
590
594
  }
591
595
  }
592
596
  _syncValueAttribute(t) {
593
- const e = J(t);
597
+ const e = G(t);
594
598
  this._syncing = !0;
595
599
  try {
596
600
  e ? this.getAttribute("value") !== e && this.setAttribute("value", e) : this.hasAttribute("value") && this.removeAttribute("value");
@@ -622,8 +626,8 @@ class yt extends tt {
622
626
  this.dispatchEvent(new CustomEvent("invalid", { detail: { raw: t, reason: e }, bubbles: !0, composed: !0 }));
623
627
  }
624
628
  _normalizePending(t) {
625
- const { min: e, max: i } = this._resolvedBounds(), r = t.start ? j(t.start, e, i) : null, n = t.end ? j(t.end, e, i) : null;
626
- return !r || !n ? { start: r, end: n } : N(r, n) > 0 ? { start: n, end: r } : { start: r, end: n };
629
+ const { min: e, max: i } = this._resolvedBounds(), n = t.start ? Y(t.start, e, i) : null, r = t.end ? Y(t.end, e, i) : null;
630
+ return !n || !r ? { start: n, end: r } : K(n, r) > 0 ? { start: r, end: n } : { start: n, end: r };
627
631
  }
628
632
  _canCommit(t) {
629
633
  return !t.start && !t.end ? !0 : !(!this._allowPartial() && (!t.start || !t.end) || t.start && t.end && !this._allowSameDay() && t.start === t.end);
@@ -660,7 +664,7 @@ class yt extends tt {
660
664
  _ensureOverlay() {
661
665
  if (this._overlay || typeof document > "u") return;
662
666
  const t = document.createElement("div");
663
- t.className = "ui-date-range-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("select", this._onOverlayCalendarBound), 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 = W());
667
+ t.className = "ui-date-range-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("select", this._onOverlayCalendarBound), 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 = j());
664
668
  }
665
669
  _syncOverlayHostZIndex() {
666
670
  if (!this._overlay || typeof window > "u") return;
@@ -673,7 +677,7 @@ class yt extends tt {
673
677
  _syncDismissableLayer() {
674
678
  if (this._dismissableLayer?.destroy(), this._dismissableLayer = null, !this._open || !this._overlay) return;
675
679
  const t = this._overlay.querySelector(".panel, .sheet"), e = this.root.querySelector(".fields");
676
- t && (this._dismissableLayer = et({
680
+ t && (this._dismissableLayer = it({
677
681
  node: t,
678
682
  trigger: e,
679
683
  closeOnEscape: !0,
@@ -688,18 +692,18 @@ class yt extends tt {
688
692
  if (!t || !e) return;
689
693
  const i = t.getBoundingClientRect();
690
694
  e.style.setProperty("--ui-drp-panel-width", `${Math.round(i.width)}px`);
691
- const r = e.getBoundingClientRect(), n = e.getAttribute("data-placement"), d = ot(
695
+ const n = e.getBoundingClientRect(), r = e.getAttribute("data-placement"), d = lt(
692
696
  i,
693
- r,
697
+ n,
694
698
  8,
695
699
  8,
696
- n === "top" ? "top" : n === "bottom" ? "bottom" : null
700
+ r === "top" ? "top" : r === "bottom" ? "bottom" : null
697
701
  );
698
702
  e.style.position = "absolute", e.style.top = `${Math.round(d.top)}px`, e.style.left = `${Math.round(d.left)}px`, e.setAttribute("data-placement", d.placement);
699
703
  }
700
704
  _renderPanelInner(t) {
701
- const e = this._translations(), i = (this.getAttribute("label") || "").trim(), r = !!i || t, n = t ? "true" : "false", d = `
702
- <header class="header" part="header" ${r ? "" : "hidden"}>
705
+ const e = this._translations(), i = (this.getAttribute("label") || "").trim(), n = !!i || t, r = t ? "true" : "false", d = `
706
+ <header class="header" part="header" ${n ? "" : "hidden"}>
703
707
  <p class="title" id="${this._panelTitleId}" ${i ? "" : "hidden"}>${_(i)}</p>
704
708
  ${t ? `<button type="button" class="action" data-action="cancel">${_(e.cancel)}</button>` : ""}
705
709
  </header>
@@ -716,9 +720,9 @@ class yt extends tt {
716
720
  </footer>
717
721
  `;
718
722
  return `
719
- <style>${_t}</style>
723
+ <style>${bt}</style>
720
724
  ${t ? '<div class="sheet-backdrop" data-action="backdrop"></div>' : ""}
721
- <section class="${t ? "sheet" : "panel"}" id="${this._panelId}" role="dialog" aria-modal="${n}" aria-labelledby="${this._panelTitleId}" part="${t ? "sheet" : "popover"}">${d}</section>
725
+ <section class="${t ? "sheet" : "panel"}" id="${this._panelId}" role="dialog" aria-modal="${r}" aria-labelledby="${this._panelTitleId}" part="${t ? "sheet" : "popover"}">${d}</section>
722
726
  `;
723
727
  }
724
728
  _syncCalendar(t) {
@@ -728,12 +732,12 @@ class yt extends tt {
728
732
  return;
729
733
  }
730
734
  t.getAttribute(h) !== u && t.setAttribute(h, u);
731
- }, i = J(this._pending), { min: r, max: n } = this._resolvedBounds();
732
- e("selection", "range"), e("value", i), e("min", r), e("max", n), e("locale", this.getAttribute("locale")), e("translations", this.getAttribute("translations")), e("week-start", this.getAttribute("week-start"));
733
- const l = this.getAttribute("size") || "sm";
734
- e("size", l === "lg" ? "md" : "sm"), e("variant", this.getAttribute("variant")), e("outside-click", this.getAttribute("outside-click"));
735
+ }, i = G(this._pending), { min: n, max: r } = this._resolvedBounds();
736
+ e("selection", "range"), e("value", i), e("min", n), e("max", r), e("locale", this.getAttribute("locale")), e("translations", this.getAttribute("translations")), e("week-start", this.getAttribute("week-start"));
737
+ const a = this.getAttribute("size") || "sm";
738
+ e("size", a === "lg" ? "md" : "sm"), e("variant", this.getAttribute("variant")), e("outside-click", this.getAttribute("outside-click"));
735
739
  const p = t.classList.contains("inline-calendar");
736
- l === "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")), p ? (t.style.setProperty("--ui-calendar-day-height", l === "lg" ? "2.1em" : "1.92em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.08em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.14em"), t.style.setProperty("--ui-calendar-frame-padding", "0.28em"), t.style.setProperty("--ui-calendar-week-gap", "0.16em"), t.style.setProperty("--ui-calendar-control-height", "1.64em"), t.style.setProperty("--ui-calendar-gap", "0.2em"), t.style.setProperty("--ui-calendar-day-font-size", l === "lg" ? "0.76em" : "0.68em"), t.style.setProperty("--ui-calendar-weekday-font-size", l === "lg" ? "0.66em" : "0.58em"), t.style.setProperty("--ui-calendar-title-font-size", l === "lg" ? "0.84em" : "0.76em")) : (t.style.removeProperty("--ui-calendar-frame-padding"), t.style.removeProperty("--ui-calendar-week-gap"), t.style.removeProperty("--ui-calendar-control-height")), this._isReadonly() ? e("readonly", "") : e("readonly", null), this._isInteractionBlocked() ? e("disabled", "") : e("disabled", null), this._isBare() ? e("bare", "") : e("bare", null), e("tabindex", "-1"), e("aria-label", this.getAttribute("label") || this._translations().selectDateRange);
740
+ a === "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")), p ? (t.style.setProperty("--ui-calendar-day-height", a === "lg" ? "2.1em" : "1.92em"), t.style.setProperty("--ui-calendar-day-padding-block", "0.08em"), t.style.setProperty("--ui-calendar-day-padding-inline", "0.14em"), t.style.setProperty("--ui-calendar-frame-padding", "0.28em"), t.style.setProperty("--ui-calendar-week-gap", "0.16em"), t.style.setProperty("--ui-calendar-control-height", "1.64em"), t.style.setProperty("--ui-calendar-gap", "0.2em"), t.style.setProperty("--ui-calendar-day-font-size", a === "lg" ? "0.76em" : "0.68em"), t.style.setProperty("--ui-calendar-weekday-font-size", a === "lg" ? "0.66em" : "0.58em"), t.style.setProperty("--ui-calendar-title-font-size", a === "lg" ? "0.84em" : "0.76em")) : (t.style.removeProperty("--ui-calendar-frame-padding"), t.style.removeProperty("--ui-calendar-week-gap"), t.style.removeProperty("--ui-calendar-control-height")), this._isReadonly() ? e("readonly", "") : e("readonly", null), this._isInteractionBlocked() ? e("disabled", "") : e("disabled", null), this._isBare() ? e("bare", "") : e("bare", null), e("tabindex", "-1"), e("aria-label", this.getAttribute("label") || this._translations().selectDateRange);
737
741
  }
738
742
  _ensureOverlayContent(t) {
739
743
  if (!this._overlay) return;
@@ -744,31 +748,31 @@ class yt extends tt {
744
748
  if (!this._overlay) return;
745
749
  this._syncOverlayHostZIndex();
746
750
  const t = this._isMobileSheet();
747
- t && !this._releaseScrollLock ? this._releaseScrollLock = W() : !t && this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null), this._ensureOverlayContent(t);
751
+ t && !this._releaseScrollLock ? this._releaseScrollLock = j() : !t && this._releaseScrollLock && (this._releaseScrollLock(), this._releaseScrollLock = null), this._ensureOverlayContent(t);
748
752
  const e = this._overlay.querySelector(".title"), i = this._overlay.querySelector(".panel, .sheet");
749
753
  this._syncDismissableLayer();
750
- const r = this._overlay.querySelector(".header"), n = this._overlay.querySelector(".presets"), d = this._overlay.querySelector(".footer"), l = this._translations();
751
- i && (i.dataset.bare = this._isBare() ? "true" : "false"), r && (r.hidden = !(this.getAttribute("label") || "").trim() && !t);
754
+ const n = this._overlay.querySelector(".header"), r = this._overlay.querySelector(".presets"), d = this._overlay.querySelector(".footer"), a = this._translations();
755
+ i && (i.dataset.bare = this._isBare() ? "true" : "false"), n && (n.hidden = !(this.getAttribute("label") || "").trim() && !t);
752
756
  const p = this._showFooter();
753
- if (n && (n.hidden = !p), d && (d.hidden = !p), e) {
757
+ if (r && (r.hidden = !p), d && (d.hidden = !p), e) {
754
758
  const y = (this.getAttribute("label") || "").trim();
755
759
  e.textContent = y, e.hidden = !y;
756
760
  }
757
761
  const h = this._overlay.querySelector('[data-action="preset-today"]');
758
- h && (h.textContent = l.today);
762
+ h && (h.textContent = a.today);
759
763
  const u = this._overlay.querySelector('[data-action="preset-last7"]');
760
- u && (u.textContent = l.last7Days);
764
+ u && (u.textContent = a.last7Days);
761
765
  const b = this._overlay.querySelector('[data-action="preset-month"]');
762
- b && (b.textContent = l.thisMonth);
763
- const A = this._overlay.querySelector('[data-action="clear"]');
764
- A && (A.textContent = l.clear);
766
+ b && (b.textContent = a.thisMonth);
767
+ const S = this._overlay.querySelector('[data-action="clear"]');
768
+ S && (S.textContent = a.clear);
765
769
  const I = this._overlay.querySelector('[data-action="cancel"]');
766
- I && (I.textContent = l.cancel);
770
+ I && (I.textContent = a.cancel);
767
771
  const f = this._overlay.querySelector('[data-action="apply"]');
768
- f && (f.textContent = l.apply);
769
- const a = this._overlay.querySelectorAll(".action"), o = this._isInteractionBlocked() || this._isReadonly();
770
- a.forEach((y) => {
771
- y.disabled = o;
772
+ f && (f.textContent = a.apply);
773
+ const o = this._overlay.querySelectorAll(".action"), l = this._isInteractionBlocked() || this._isReadonly();
774
+ o.forEach((y) => {
775
+ y.disabled = l;
772
776
  });
773
777
  const s = this._overlay.querySelector(".drp-calendar");
774
778
  s && (this._syncCalendar(s), this._open && !this._overlayFocusedOnOpen && (this._overlayFocusedOnOpen = !0, requestAnimationFrame(() => {
@@ -800,28 +804,26 @@ class yt extends tt {
800
804
  }
801
805
  _updateHostState() {
802
806
  if (!this._hasView) return;
803
- const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", r = this._inlineError || i, n = this._translations(), d = r ? "error" : this._state(), l = this._rangeVariant(), p = this._isInlineMode(), h = !!(this._value.start || this._value.end || this._pending.start || this._pending.end), u = this._isInteractionBlocked(), b = this.root.querySelector(".label"), A = this.root.querySelector(".label-text"), I = this.root.querySelector(".required"), f = this.root.querySelector(".fields"), a = this.root.querySelector(".single"), o = this.root.querySelector(".start"), s = this.root.querySelector(".end"), y = this.root.querySelector(".sep"), k = this.root.querySelector('.btn[data-action="clear"]'), v = this.root.querySelector('.btn[data-action="toggle"]'), x = this.root.querySelector(".hint"), C = this.root.querySelector(".error"), g = this.root.querySelector(".inline-panel"), E = this.root.querySelector(".inline-panel .presets"), q = this.root.querySelector(".inline-panel .footer"), O = this.root.querySelector(".hidden-range"), z = this.root.querySelector(".hidden-start"), P = this.root.querySelector(".hidden-end"), G = this.root.querySelectorAll(".inline-panel .action");
804
- b && (b.hidden = !t, b.id = this._labelId, b.setAttribute("for", l === "single-field" ? this._singleId : this._startId)), A && (A.textContent = t), I && (I.hidden = !this.hasAttribute("required")), f && (f.dataset.single = l === "single-field" ? "true" : "false", f.dataset.invalid = r ? "true" : "false", f.dataset.open = this._open && !p ? "true" : "false", f.dataset.state = d, f.setAttribute("aria-disabled", u ? "true" : "false")), a && (a.value !== this._draftSingle && (a.value = this._draftSingle), a.id = this._singleId, a.hidden = l !== "single-field", a.readOnly = this._isReadonly() || u, a.disabled = u, a.required = this.hasAttribute("required"), a.placeholder = n.startEnd, a.autocomplete = "off", a.setAttribute("role", "combobox"), a.setAttribute("aria-haspopup", "dialog"), a.setAttribute("aria-controls", this._panelId), a.setAttribute("aria-expanded", p ? "false" : String(this._open)), a.setAttribute("aria-invalid", r ? "true" : "false"), t ? a.setAttribute("aria-labelledby", this._labelId) : a.removeAttribute("aria-labelledby")), o && (o.value !== this._draftStart && (o.value = this._draftStart), o.id = this._startId, o.hidden = l === "single-field", o.readOnly = this._isReadonly() || u, o.disabled = u, o.required = this.hasAttribute("required"), o.placeholder = n.startDate, o.autocomplete = "off", o.setAttribute("role", "combobox"), o.setAttribute("aria-haspopup", "dialog"), o.setAttribute("aria-controls", this._panelId), o.setAttribute("aria-expanded", p ? "false" : String(this._open)), o.setAttribute("aria-invalid", r ? "true" : "false"), t ? o.setAttribute("aria-labelledby", this._labelId) : o.removeAttribute("aria-labelledby")), s && (s.value !== this._draftEnd && (s.value = this._draftEnd), s.id = this._endId, s.hidden = l === "single-field", s.readOnly = this._isReadonly() || u, s.disabled = u, s.required = this.hasAttribute("required"), s.placeholder = n.endDate, s.autocomplete = "off", s.setAttribute("role", "combobox"), s.setAttribute("aria-haspopup", "dialog"), s.setAttribute("aria-controls", this._panelId), s.setAttribute("aria-expanded", p ? "false" : String(this._open)), s.setAttribute("aria-invalid", r ? "true" : "false"), t ? s.setAttribute("aria-labelledby", this._labelId) : s.removeAttribute("aria-labelledby")), y && (y.hidden = l === "single-field"), k && (k.hidden = !(this._clearable() && h), k.disabled = u, k.setAttribute("aria-label", n.clearDateRange)), v && (v.hidden = p, v.disabled = u, v.setAttribute("aria-expanded", p ? "false" : String(this._open)), v.setAttribute("aria-controls", this._panelId), v.setAttribute("aria-label", n.toggleCalendar)), x && (x.id = this._hintId, x.hidden = !e, x.textContent = e), C && (C.id = this._errorId, C.hidden = !r, C.textContent = r);
805
- const D = [];
806
- e && x && !x.hidden && D.push(this._hintId), r && D.push(this._errorId);
807
- const S = D.join(" ");
808
- a && (S ? a.setAttribute("aria-describedby", S) : a.removeAttribute("aria-describedby")), o && (S ? o.setAttribute("aria-describedby", S) : o.removeAttribute("aria-describedby")), s && (S ? s.setAttribute("aria-describedby", S) : s.removeAttribute("aria-describedby")), g && (g.hidden = !p, g.id = this._panelId, g.dataset.bare = this._isBare() ? "true" : "false", g.setAttribute("role", "dialog"), g.setAttribute("aria-modal", "false"), g.setAttribute("aria-label", t || n.selectDateRange));
809
- const R = this._showFooter();
810
- E && (E.hidden = !R), q && (q.hidden = !R), G.forEach((X) => {
811
- X.disabled = u || this._isReadonly();
807
+ const t = this.getAttribute("label") || "", e = this.getAttribute("hint") || "", i = this.getAttribute("error") || "", n = this._inlineError || i, r = this._translations(), d = n ? "error" : this._state(), a = this._rangeVariant(), p = this._isInlineMode(), h = !!(this._value.start || this._value.end || this._pending.start || this._pending.end), u = this._isInteractionBlocked(), b = this.root.querySelector(".label"), S = this.root.querySelector(".label-text"), I = this.root.querySelector(".required"), f = this.root.querySelector(".fields"), o = this.root.querySelector(".single"), l = this.root.querySelector(".start"), s = this.root.querySelector(".end"), y = this.root.querySelector(".sep"), A = this.root.querySelector('.btn[data-action="clear"]'), v = this.root.querySelector('.btn[data-action="toggle"]'), x = this.root.querySelector(".hint"), C = this.root.querySelector(".error"), g = this.root.querySelector(".inline-panel"), q = this.root.querySelector(".inline-panel .presets"), R = this.root.querySelector(".inline-panel .footer"), O = this.root.querySelector(".hidden-range"), z = this.root.querySelector(".hidden-start"), P = this.root.querySelector(".hidden-end"), Q = this.root.querySelectorAll(".inline-panel .action");
808
+ b && (b.hidden = !t, b.id = this._labelId, b.setAttribute("for", a === "single-field" ? this._singleId : this._startId)), S && (S.textContent = t), I && (I.hidden = !this.hasAttribute("required")), f && (f.dataset.single = a === "single-field" ? "true" : "false", f.dataset.invalid = n ? "true" : "false", f.dataset.open = this._open && !p ? "true" : "false", f.dataset.state = d, f.setAttribute("aria-disabled", u ? "true" : "false")), o && (o.value !== this._draftSingle && (o.value = this._draftSingle), o.id = this._singleId, o.hidden = a !== "single-field", o.readOnly = this._isReadonly() || u, o.disabled = u, o.required = this.hasAttribute("required"), o.placeholder = r.startEnd, o.autocomplete = "off", o.setAttribute("role", "combobox"), o.setAttribute("aria-haspopup", "dialog"), o.setAttribute("aria-controls", this._panelId), o.setAttribute("aria-expanded", p ? "false" : String(this._open)), o.setAttribute("aria-invalid", n ? "true" : "false"), D(o, this, t ? this._labelId : null, r.startEnd)), l && (l.value !== this._draftStart && (l.value = this._draftStart), l.id = this._startId, l.hidden = a === "single-field", l.readOnly = this._isReadonly() || u, l.disabled = u, l.required = this.hasAttribute("required"), l.placeholder = r.startDate, l.autocomplete = "off", l.setAttribute("role", "combobox"), l.setAttribute("aria-haspopup", "dialog"), l.setAttribute("aria-controls", this._panelId), l.setAttribute("aria-expanded", p ? "false" : String(this._open)), l.setAttribute("aria-invalid", n ? "true" : "false"), D(l, this, t ? this._labelId : null, r.startDate)), s && (s.value !== this._draftEnd && (s.value = this._draftEnd), s.id = this._endId, s.hidden = a === "single-field", s.readOnly = this._isReadonly() || u, s.disabled = u, s.required = this.hasAttribute("required"), s.placeholder = r.endDate, s.autocomplete = "off", s.setAttribute("role", "combobox"), s.setAttribute("aria-haspopup", "dialog"), s.setAttribute("aria-controls", this._panelId), s.setAttribute("aria-expanded", p ? "false" : String(this._open)), s.setAttribute("aria-invalid", n ? "true" : "false"), D(s, this, t ? this._labelId : null, r.endDate)), y && (y.hidden = a === "single-field"), A && (A.hidden = !(this._clearable() && h), A.disabled = u, A.setAttribute("aria-label", r.clearDateRange)), v && (v.hidden = p, v.disabled = u, v.setAttribute("aria-expanded", p ? "false" : String(this._open)), v.setAttribute("aria-controls", this._panelId), v.setAttribute("aria-label", r.toggleCalendar)), x && (x.id = this._hintId, x.hidden = !e, x.textContent = e), C && (C.id = this._errorId, C.hidden = !n, C.textContent = n);
809
+ const w = [];
810
+ e && x && !x.hidden && w.push(this._hintId), n && w.push(this._errorId), E(o, this, `${this._uid}-single`, w), E(l, this, `${this._uid}-start`, w), E(s, this, `${this._uid}-end`, w), g && (g.hidden = !p, g.id = this._panelId, g.dataset.bare = this._isBare() ? "true" : "false", g.setAttribute("role", "dialog"), g.setAttribute("aria-modal", "false"), g.setAttribute("aria-label", t || r.selectDateRange));
811
+ const $ = this._showFooter();
812
+ q && (q.hidden = !$), R && (R.hidden = !$), Q.forEach((tt) => {
813
+ tt.disabled = u || this._isReadonly();
812
814
  });
813
- const $ = this.root.querySelector('.inline-panel [data-action="preset-today"]');
814
- $ && ($.textContent = n.today);
815
- const M = this.root.querySelector('.inline-panel [data-action="preset-last7"]');
816
- M && (M.textContent = n.last7Days);
817
- const F = this.root.querySelector('.inline-panel [data-action="preset-month"]');
818
- F && (F.textContent = n.thisMonth);
819
- const V = this.root.querySelector('.inline-panel [data-action="clear"]');
820
- V && (V.textContent = n.clear);
821
- const H = this.root.querySelector('.inline-panel [data-action="apply"]');
822
- H && (H.textContent = n.apply);
823
- const B = this.getAttribute("name") || "", T = this.getAttribute("name-start") || "", U = this.getAttribute("name-end") || "", Q = this._value.start && this._value.end ? `${this._value.start}..${this._value.end}` : "";
824
- if (O && (O.disabled = !B, O.name = B, O.value = Q), z && (z.disabled = !!B || !T, z.name = T, z.value = this._value.start || ""), P && (P.disabled = !!B || !U, P.name = U, P.value = this._value.end || ""), p) {
815
+ const M = this.root.querySelector('.inline-panel [data-action="preset-today"]');
816
+ M && (M.textContent = r.today);
817
+ const F = this.root.querySelector('.inline-panel [data-action="preset-last7"]');
818
+ F && (F.textContent = r.last7Days);
819
+ const V = this.root.querySelector('.inline-panel [data-action="preset-month"]');
820
+ V && (V.textContent = r.thisMonth);
821
+ const H = this.root.querySelector('.inline-panel [data-action="clear"]');
822
+ H && (H.textContent = r.clear);
823
+ const T = this.root.querySelector('.inline-panel [data-action="apply"]');
824
+ T && (T.textContent = r.apply);
825
+ const B = this.getAttribute("name") || "", U = this.getAttribute("name-start") || "", N = this.getAttribute("name-end") || "", X = this._value.start && this._value.end ? `${this._value.start}..${this._value.end}` : "";
826
+ if (O && (O.disabled = !B, O.name = B, O.value = X), z && (z.disabled = !!B || !U, z.name = U, z.value = this._value.start || ""), P && (P.disabled = !!B || !N, P.name = N, P.value = this._value.end || ""), p) {
825
827
  this._scheduleInlineCalendarSync(), this._destroyOverlay();
826
828
  return;
827
829
  }
@@ -830,21 +832,21 @@ class yt extends tt {
830
832
  _onRootClick(t) {
831
833
  const e = t.target;
832
834
  if (!e) return;
833
- const i = e.closest("[data-action]"), r = i?.getAttribute("data-action");
834
- if (r && !this._isInteractionBlocked()) {
835
- if (r === "toggle") {
835
+ const i = e.closest("[data-action]"), n = i?.getAttribute("data-action");
836
+ if (n && !this._isInteractionBlocked()) {
837
+ if (n === "toggle") {
836
838
  this._restoreFocusEl = i, this._setOpen(!this._open, "toggle");
837
839
  return;
838
840
  }
839
- if (r === "clear") {
841
+ if (n === "clear") {
840
842
  this._commit({ start: null, end: null }, "clear");
841
843
  return;
842
844
  }
843
- if (r === "apply") {
845
+ if (n === "apply") {
844
846
  this._commit(this._pending, "apply"), this._isInlineMode() || this._setOpen(!1, "apply");
845
847
  return;
846
848
  }
847
- r === "cancel" && (this._pending = { ...this._value }, this._isInlineMode() || this._setOpen(!1, "cancel"), this._updateHostState());
849
+ n === "cancel" && (this._pending = { ...this._value }, this._isInlineMode() || this._setOpen(!1, "cancel"), this._updateHostState());
848
850
  }
849
851
  }
850
852
  _onRootInput(t) {
@@ -858,21 +860,21 @@ class yt extends tt {
858
860
  }
859
861
  _commitFromDraft(t) {
860
862
  if (this._rangeVariant() === "single-field") {
861
- const n = this._draftSingle.trim();
862
- if (!n)
863
+ const r = this._draftSingle.trim();
864
+ if (!r)
863
865
  return this._pending = { start: null, end: null }, this._commit(this._pending, t), !0;
864
- const d = bt(n, this._locale());
865
- return !d.start || !d.end && !this._allowPartial() ? (this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(n, "parse"), this._updateHostState(), !1) : (this._pending = this._normalizePending({ start: d.start, end: d.end || null }), this._commit(this._pending, t), !0);
866
+ const d = yt(r, this._locale());
867
+ return !d.start || !d.end && !this._allowPartial() ? (this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(r, "parse"), this._updateHostState(), !1) : (this._pending = this._normalizePending({ start: d.start, end: d.end || null }), this._commit(this._pending, t), !0);
866
868
  }
867
- const i = this._draftStart ? w(this._draftStart, this._locale()) : null, r = this._draftEnd ? w(this._draftEnd, this._locale()) : null;
868
- return this._draftStart && !i || this._draftEnd && !r ? (this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(`${this._draftStart} ${this._draftEnd}`.trim(), "parse"), this._updateHostState(), !1) : (this._pending = this._normalizePending({ start: i, end: r }), this._commit(this._pending, t), !0);
869
+ const i = this._draftStart ? k(this._draftStart, this._locale()) : null, n = this._draftEnd ? k(this._draftEnd, this._locale()) : null;
870
+ return this._draftStart && !i || this._draftEnd && !n ? (this._inlineError = this.getAttribute("error") || this._translations().invalidRange, this._emitInvalid(`${this._draftStart} ${this._draftEnd}`.trim(), "parse"), this._updateHostState(), !1) : (this._pending = this._normalizePending({ start: i, end: n }), this._commit(this._pending, t), !0);
869
871
  }
870
872
  _onRootBlur(t) {
871
873
  if (this._isInteractionBlocked() || this._isReadonly()) return;
872
874
  const e = t, i = e.target;
873
875
  if (!(i instanceof HTMLInputElement)) return;
874
- const r = e.relatedTarget;
875
- r && this._overlay?.contains(r) || this._open && !this._isInlineMode() || (i.classList.contains("single") || i.classList.contains("start") || i.classList.contains("end")) && (i.classList.contains("single") && (this._draftSingle = i.value), i.classList.contains("start") && (this._draftStart = i.value), i.classList.contains("end") && (this._draftEnd = i.value), this._commitFromDraft("blur"));
876
+ const n = e.relatedTarget;
877
+ n && this._overlay?.contains(n) || this._open && !this._isInlineMode() || (i.classList.contains("single") || i.classList.contains("start") || i.classList.contains("end")) && (i.classList.contains("single") && (this._draftSingle = i.value), i.classList.contains("start") && (this._draftStart = i.value), i.classList.contains("end") && (this._draftEnd = i.value), this._commitFromDraft("blur"));
876
878
  }
877
879
  _onRootKeyDown(t) {
878
880
  const e = t;
@@ -902,37 +904,37 @@ class yt extends tt {
902
904
  _onOverlayClick(t) {
903
905
  const e = t.target;
904
906
  if (!e) return;
905
- const r = e.closest("[data-action]")?.getAttribute("data-action");
906
- if (r && !(this._isInteractionBlocked() || this._isReadonly())) {
907
- if (r === "backdrop") {
907
+ const n = e.closest("[data-action]")?.getAttribute("data-action");
908
+ if (n && !(this._isInteractionBlocked() || this._isReadonly())) {
909
+ if (n === "backdrop") {
908
910
  this._setOpen(!1, "outside");
909
911
  return;
910
912
  }
911
- if (r === "clear") {
913
+ if (n === "clear") {
912
914
  this._pending = { start: null, end: null }, this._emitInput("clear"), this._renderOverlay();
913
915
  return;
914
916
  }
915
- if (r === "cancel") {
917
+ if (n === "cancel") {
916
918
  this._pending = { ...this._value }, this._setOpen(!1, "cancel");
917
919
  return;
918
920
  }
919
- if (r === "apply") {
921
+ if (n === "apply") {
920
922
  this._commit(this._pending, "apply"), this._setOpen(!1, "apply");
921
923
  return;
922
924
  }
923
- if (r === "preset-today") {
924
- const n = this._todayIso();
925
- this._pending = this._normalizePending({ start: n, end: n }), this._emitInput("preset-today"), this._renderOverlay();
925
+ if (n === "preset-today") {
926
+ const r = this._todayIso();
927
+ this._pending = this._normalizePending({ start: r, end: r }), this._emitInput("preset-today"), this._renderOverlay();
926
928
  return;
927
929
  }
928
- if (r === "preset-last7") {
929
- const n = this._todayIso();
930
- this._pending = this._normalizePending(lt(n, 7)), this._emitInput("preset-last7"), this._renderOverlay();
930
+ if (n === "preset-last7") {
931
+ const r = this._todayIso();
932
+ this._pending = this._normalizePending(dt(r, 7)), this._emitInput("preset-last7"), this._renderOverlay();
931
933
  return;
932
934
  }
933
- if (r === "preset-month") {
934
- const n = this._todayIso();
935
- this._pending = this._normalizePending(dt(n)), this._emitInput("preset-month"), this._renderOverlay();
935
+ if (n === "preset-month") {
936
+ const r = this._todayIso();
937
+ this._pending = this._normalizePending(ut(r)), this._emitInput("preset-month"), this._renderOverlay();
936
938
  }
937
939
  }
938
940
  }
@@ -954,21 +956,21 @@ class yt extends tt {
954
956
  }
955
957
  render() {
956
958
  this._hasView || (this.setContent(`
957
- <style>${ft}</style>
959
+ <style>${_t}</style>
958
960
  <div class="root">
959
961
  <label class="label" part="label" id="${this._labelId}">
960
962
  <span class="label-text"></span>
961
963
  <span class="required">*</span>
962
964
  </label>
963
965
  <div class="fields" part="field input" data-single="false">
964
- <span class="icon" part="icon" aria-hidden="true">${ct}</span>
966
+ <span class="icon" part="icon" aria-hidden="true">${pt}</span>
965
967
  <input class="input single" id="${this._singleId}" part="input" />
966
968
  <input class="input start" id="${this._startId}" part="input" />
967
969
  <span class="sep">—</span>
968
970
  <input class="input end" id="${this._endId}" part="input" />
969
- <button type="button" class="btn" part="clear" data-action="clear">${ht}</button>
971
+ <button type="button" class="btn" part="clear" data-action="clear">${ft}</button>
970
972
  <button type="button" class="btn" part="toggle" data-action="toggle">
971
- <span class="toggle-icon">${pt}</span>
973
+ <span class="toggle-icon">${ht}</span>
972
974
  <span class="spinner" aria-hidden="true"></span>
973
975
  </button>
974
976
  </div>
@@ -996,7 +998,7 @@ class yt extends tt {
996
998
  return !1;
997
999
  }
998
1000
  }
999
- typeof customElements < "u" && !customElements.get("ui-date-range-picker") && customElements.define("ui-date-range-picker", yt);
1001
+ typeof customElements < "u" && !customElements.get("ui-date-range-picker") && customElements.define("ui-date-range-picker", gt);
1000
1002
  export {
1001
- yt as UIDateRangePicker
1003
+ gt as UIDateRangePicker
1002
1004
  };