@revolist/ui 4.0.3-rc → 4.0.3

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 (314) hide show
  1. package/MIGRATION.md +36 -0
  2. package/OWNERSHIP.md +32 -32
  3. package/README.md +136 -78
  4. package/_button.scss +6 -2
  5. package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
  6. package/_chunks/calculator-CDWOuAcp.js +4 -0
  7. package/_chunks/{calendar-xpZ0v3xf.js → calendar-CgXQgkga.js} +19 -19
  8. package/_chunks/chart-frame-hcOlnQ1K.js +145 -0
  9. package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
  10. package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
  11. package/_chunks/choice-chips-SkllS5Kl.js +126 -0
  12. package/_chunks/{color-palette-D8vyPfld.js → color-palette-DMJUChWC.js} +20 -22
  13. package/_chunks/color-picker-BpCTuIdm.js +143 -0
  14. package/_chunks/{component-C_T2VN5u.js → component-CfeHXgIw.js} +279 -264
  15. package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
  16. package/_chunks/configurator-actions-DnStE6Yl.js +155 -0
  17. package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
  18. package/_chunks/{control-AHKXD5Eu.js → control-Dcrjsunl.js} +42 -17
  19. package/_chunks/controls-B_6NJarZ.js +650 -0
  20. package/_chunks/{date-control-DrVFX13g.js → date-control-C4h4m75W.js} +1 -1
  21. package/_chunks/{date-time-qIhp5vaX.js → date-time-CTOSbzb0.js} +317 -278
  22. package/_chunks/dialog.parts-3w5FR06n.js +131 -0
  23. package/_chunks/{duration-CL68Em0o.js → duration-Bf2OS1V5.js} +5 -5
  24. package/_chunks/editor-popup-ByU7qiub.js +82 -0
  25. package/_chunks/field-configurator-D5dZRhDe.js +288 -0
  26. package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
  27. package/_chunks/icon-toolbar-DSjOdwM7.js +134 -0
  28. package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
  29. package/_chunks/minus-BOAR3A1C.js +4 -0
  30. package/_chunks/mount-BRdcG60g.js +267 -0
  31. package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
  32. package/_chunks/native-control-B_fVA5bL.js +649 -0
  33. package/_chunks/{number-input-BKwA5FnM.js → number-input-CmM6_2vR.js} +7 -7
  34. package/_chunks/{picker-h1P5RUgp.js → picker-DTqET-2W.js} +2 -2
  35. package/_chunks/plus-CbGRkIGl.js +4 -0
  36. package/_chunks/popover-controller-D-AvKQ7B.js +102 -0
  37. package/_chunks/{popup-CT2uD3go.js → popup-C35Isk7p.js} +115 -104
  38. package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-C-6wcb9U.js} +1 -1
  39. package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-DIl1gkV6.js} +1 -1
  40. package/_chunks/request-trail-DrhdpWiH.js +762 -0
  41. package/_chunks/rich-text-BnilBbhU.js +842 -0
  42. package/_chunks/rotate-left-BF6G883o.js +4 -0
  43. package/_chunks/selection-list-tooltips-C5oMJe26.js +42 -0
  44. package/_chunks/title-tooltip-Cw6LOZhb.js +11 -0
  45. package/_chunks/tooltip-D4xkio5G.js +54 -0
  46. package/_chunks/tooltip-owner-DjdvqKzz.js +19 -0
  47. package/_chunks/tooltip-session-B6X6x8G_.js +110 -0
  48. package/_chunks/tooltip-text-BXsUEmBH.js +12 -0
  49. package/_chunks/top-layer-popup-CNSDdfJV.js +59 -0
  50. package/_dialog.scss +57 -22
  51. package/_form.scss +71 -21
  52. package/_legend.scss +25 -7
  53. package/_shared/data-query/index.d.ts +2 -2
  54. package/_shared/data-query/load-options.d.ts +2 -2
  55. package/_variables.scss +34 -32
  56. package/_view-switcher.scss +6 -0
  57. package/activity-message.d.ts +1 -1
  58. package/ai/_chat.scss +35 -3
  59. package/ai/_style.scss +76 -16
  60. package/ai/chat.d.ts +3 -1
  61. package/ai/components.d.ts +16 -3
  62. package/ai/index.d.ts +1 -0
  63. package/ai/index.js +3 -3
  64. package/ai/mount.d.ts +30 -6
  65. package/ai/request-trail.d.ts +9 -3
  66. package/ai/results/_style.scss +83 -0
  67. package/ai/results/index.d.ts +11 -0
  68. package/ai/results/metrics.d.ts +5 -0
  69. package/ai/results/table.d.ts +5 -0
  70. package/ai/results/text.d.ts +5 -0
  71. package/ai/results/types.d.ts +29 -0
  72. package/ai/transcript.d.ts +2 -0
  73. package/ai/translations.d.ts +1 -1
  74. package/angular/angular.d.ts +1 -1
  75. package/angular/angular.js +13 -7
  76. package/assignee/assignee.scss +28 -6
  77. package/assignee/index.js +2 -2
  78. package/avatar/avatar.style.scss +23 -6
  79. package/avatar/index.d.ts +25 -2
  80. package/avatar/index.js +33 -32
  81. package/badge.d.ts +1 -1
  82. package/badge.view.d.ts +8 -0
  83. package/brush-range/_brush-range.scss +55 -49
  84. package/brush-range/component.d.ts +1 -3
  85. package/brush-range/component.js +27 -27
  86. package/buttons/delete-button.style.scss +6 -2
  87. package/buttons/remove-button.d.ts +1 -1
  88. package/buttons/remove-button.style.scss +1 -1
  89. package/buttons/svg-button.d.ts +1 -1
  90. package/buttons/svg-button.js +16 -16
  91. package/calendar/_calendar.scss +21 -25
  92. package/calendar/calendar.js +1 -1
  93. package/calendar/header.js +1 -2
  94. package/calendar/index.js +2 -2
  95. package/cell-input.scss +3 -7
  96. package/cell-visuals/badge.style.scss +6 -3
  97. package/cell-visuals/bar-chart.style.scss +2 -1
  98. package/cell-visuals/column-type.style.css +12 -0
  99. package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
  100. package/cell-visuals/progress-line.style.scss +1 -4
  101. package/cell-visuals/sparkline.style.scss +2 -1
  102. package/cell-visuals/timeline.style.css +4 -2
  103. package/checkbox/checkbox.scss +6 -24
  104. package/choice-chips/index.d.ts +3 -1
  105. package/choice-chips/index.js +1 -1
  106. package/color-palette/color-palette.js +1 -1
  107. package/color-palette/color-palette.style.scss +88 -25
  108. package/color-palette/color-picker.js +2 -2
  109. package/color-palette/color-picker.style.scss +23 -10
  110. package/color-palette/common-palettes.d.ts +1 -1
  111. package/color-palette/common-palettes.js +1 -1
  112. package/color-palette/native.d.ts +15 -2
  113. package/component-catalog.d.ts +9 -7
  114. package/configurator-actions.d.ts +67 -0
  115. package/configurator-actions.js +1 -0
  116. package/configurator-aggregation-list.d.ts +14 -0
  117. package/configurator-aggregation-list.js +63 -0
  118. package/configurator-drop-zone.d.ts +39 -0
  119. package/configurator-drop-zone.js +66 -0
  120. package/configurator-field-icon.d.ts +10 -0
  121. package/configurator-field-icon.js +1 -0
  122. package/configurator-focus.d.ts +4 -0
  123. package/configurator-focus.js +39 -0
  124. package/configurator-sections.d.ts +42 -0
  125. package/configurator-sections.js +71 -0
  126. package/control-presentation.d.ts +8 -2
  127. package/control-presentation.js +25 -20
  128. package/controls.d.ts +12 -2
  129. package/controls.js +4 -3
  130. package/core/editor-popup-position.d.ts +6 -2
  131. package/core/editor-popup.d.ts +4 -0
  132. package/core/editor-popup.js +1 -1
  133. package/core/popover-controller.d.ts +35 -0
  134. package/core/popup-ownership.d.ts +2 -0
  135. package/core/selection-list-tooltips.d.ts +2 -0
  136. package/core/title-tooltip.d.ts +2 -0
  137. package/core/tooltip-session.d.ts +29 -0
  138. package/core/tooltip-surface.d.ts +13 -0
  139. package/core/tooltip-text.d.ts +6 -0
  140. package/core/tooltip.d.ts +35 -0
  141. package/core/top-layer-popup.d.ts +4 -0
  142. package/core/top-layer-popup.js +1 -23
  143. package/date-time/attach.d.ts +1 -1
  144. package/date-time/date-control.d.ts +1 -1
  145. package/date-time/field.d.ts +3 -2
  146. package/date-time/index.js +1 -1
  147. package/date-time/style.scss +239 -36
  148. package/date-time/time-selection.d.ts +3 -1
  149. package/date-time/types.d.ts +5 -1
  150. package/dialog/dialog-action-footer.d.ts +17 -2
  151. package/dialog/dialog.dom.d.ts +15 -2
  152. package/dialog/dialog.dom.js +9 -9
  153. package/dialog/dialog.parts.d.ts +1 -1
  154. package/dialog/dialog.parts.js +1 -1
  155. package/distribution-chart/_distribution-chart.scss +113 -77
  156. package/distribution-chart/area-chart.js +1 -1
  157. package/distribution-chart/bar-chart.js +1 -1
  158. package/distribution-chart/chart-frame.d.ts +1 -1
  159. package/distribution-chart/index.d.ts +1 -1
  160. package/distribution-chart/line-chart.js +1 -1
  161. package/dropdown/content.js +1 -1
  162. package/dropdown/control.js +1 -1
  163. package/dropdown/dropdown.types.d.ts +1 -1
  164. package/dropdown/editor-dropdown.style.scss +19 -9
  165. package/dropdown/index.js +2 -2
  166. package/dropdown/lookup-field.d.ts +5 -0
  167. package/dropdown/lookup-field.js +2 -1
  168. package/dropdown/popup.d.ts +2 -2
  169. package/dropdown/popup.js +1 -1
  170. package/duration/index.js +1 -1
  171. package/editor-actions.js +1 -1
  172. package/editor-layout/index.d.ts +4 -4
  173. package/editor-layout/index.js +39 -34
  174. package/editor-layout/style.scss +82 -18
  175. package/field-configurator.d.ts +39 -1
  176. package/field-configurator.js +4 -170
  177. package/field-expansion.d.ts +9 -0
  178. package/filter/filters/slider/_single-slider.scss +57 -38
  179. package/filter/filters/slider/_slider.scss +41 -33
  180. package/filter/filters/slider/control.js +2 -0
  181. package/filter/filters/slider/runtime.js +49 -22
  182. package/filter/filters/slider/single.js +1 -1
  183. package/filter-badge.js +1 -1
  184. package/filter-controls.d.ts +0 -1
  185. package/filter-controls.js +5 -6
  186. package/form-controls/index.d.ts +10 -2
  187. package/form-controls/index.js +7 -7
  188. package/form-controls/presentation.d.ts +1 -1
  189. package/form-controls/presentation.js +12 -12
  190. package/formatting/index.d.ts +1 -1
  191. package/formatting/index.js +22 -21
  192. package/formatting/styles.scss +14 -57
  193. package/framework.js +227 -224
  194. package/history-controls.js +27 -1
  195. package/icon-toolbar.d.ts +62 -0
  196. package/icon-toolbar.js +1 -0
  197. package/icons/icon.d.ts +1 -1
  198. package/legend.d.ts +1 -1
  199. package/masked-input/index.js +1 -1
  200. package/native-control.d.ts +1 -2
  201. package/native-control.js +1 -1
  202. package/native-controls.d.ts +54 -2
  203. package/native-styles.css +1 -1
  204. package/native-styles.scss +6 -2
  205. package/native.d.ts +3 -3
  206. package/native.js +46 -43
  207. package/number-input/index.d.ts +1 -1
  208. package/number-input/index.js +1 -1
  209. package/package.json +71 -2
  210. package/pagination.js +11 -11
  211. package/pdf-viewer/header.d.ts +1 -1
  212. package/pdf-viewer/index.d.ts +2 -2
  213. package/pdf-viewer/index.js +1 -1
  214. package/pdf-viewer/search-bar.d.ts +1 -1
  215. package/pdf-viewer/status.d.ts +1 -1
  216. package/pdf-viewer/style.scss +203 -42
  217. package/pickers.d.ts +5 -1
  218. package/preact-mount.js +1 -1
  219. package/preact.d.ts +13 -10
  220. package/preact.js +109 -64
  221. package/progress/_bar.scss +9 -3
  222. package/progress/_circular.scss +2 -1
  223. package/rating-choice.js +1 -1
  224. package/react-adapter.d.ts +4 -2
  225. package/react-control.d.ts +2 -0
  226. package/react-control.js +2 -2
  227. package/react.d.ts +7 -8
  228. package/react.js +67 -66
  229. package/reorder-list.d.ts +1 -1
  230. package/reorder-list.js +1 -1
  231. package/reorder-list.scss +59 -17
  232. package/resource-picker/resource-picker-popup.js +1 -1
  233. package/resource-picker/resource-picker.js +74 -72
  234. package/resource-picker/resource-picker.scss +62 -34
  235. package/rich-text/engine.d.ts +1 -0
  236. package/rich-text/format-html.d.ts +2 -0
  237. package/rich-text/index.d.ts +4 -0
  238. package/rich-text/index.js +1 -1
  239. package/rich-text/model.d.ts +2 -0
  240. package/rich-text/style.scss +293 -44
  241. package/rich-text/syntax.d.ts +5 -0
  242. package/rich-text/toolbar.d.ts +1 -1
  243. package/rich-text/translations.d.ts +2 -0
  244. package/search-input/index.js +1 -1
  245. package/search-input/native.d.ts +21 -2
  246. package/select.d.ts +3 -1
  247. package/select.js +1 -1
  248. package/selection-list.d.ts +1 -0
  249. package/selection-list.js +3 -1
  250. package/status-feedback/exit-snapshot.js +4 -4
  251. package/status-feedback/popover.js +4 -4
  252. package/status-feedback/status-feedback.scss +124 -35
  253. package/styles/_activity-message.scss +24 -7
  254. package/styles/_alert.scss +78 -17
  255. package/styles/_cell-editor-frame.scss +11 -0
  256. package/styles/_compositions.scss +400 -80
  257. package/styles/_control.scss +30 -8
  258. package/styles/_disclosure.scss +15 -5
  259. package/styles/_editor-counter.scss +16 -6
  260. package/styles/_editor-slider.scss +8 -4
  261. package/styles/_field-configurator.scss +321 -23
  262. package/styles/_fields-grid.scss +49 -0
  263. package/styles/_filter-controls.scss +10 -2
  264. package/styles/_icon-action.scss +48 -15
  265. package/styles/_loading.scss +12 -3
  266. package/styles/_motion.scss +32 -9
  267. package/styles/_palette.scss +0 -24
  268. package/styles/_primitives.scss +369 -110
  269. package/styles/_theme.scss +130 -86
  270. package/styles/_thresholds.scss +28 -25
  271. package/styles/_time-grid.scss +8 -3
  272. package/styles/_tokens.scss +6 -1
  273. package/styles/configurator-actions.scss +241 -0
  274. package/styles/pagination.css +213 -0
  275. package/styles/{legacy-rating.css → rating.css} +8 -3
  276. package/styles.css +1 -1
  277. package/styles.scss +3 -5
  278. package/surfaces.d.ts +38 -2
  279. package/surfaces.js +37 -134
  280. package/svelte/UiComponent.svelte +44 -11
  281. package/svelte.d.ts +1 -1
  282. package/svelte.js +3 -3
  283. package/switch/index.js +15 -14
  284. package/time-grid.d.ts +0 -1
  285. package/time-grid.js +38 -37
  286. package/timeline-track/_style.scss +96 -24
  287. package/timeline-track/index.js +2 -2
  288. package/ui.css +1 -1
  289. package/view-switcher.d.ts +23 -0
  290. package/vue.d.ts +29 -32
  291. package/vue.js +116 -121
  292. package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
  293. package/_chunks/choice-chips-CHQTUdLs.js +0 -110
  294. package/_chunks/color-picker-CudqPYZo.js +0 -138
  295. package/_chunks/control-tooltip-uscKfAnV.js +0 -100
  296. package/_chunks/controls-DsNi8V8I.js +0 -630
  297. package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
  298. package/_chunks/editor-popup-WDdtVDNA.js +0 -81
  299. package/_chunks/history-controls-B3u3INEK.js +0 -27
  300. package/_chunks/mount-DQ1cpppK.js +0 -257
  301. package/_chunks/native-control-C_yok8_-.js +0 -605
  302. package/_chunks/request-trail-DSlFix6i.js +0 -618
  303. package/_chunks/rich-text-CH7gIqOS.js +0 -636
  304. package/avatar/index.view.d.ts +0 -25
  305. package/color-palette/native.view.d.ts +0 -15
  306. package/control-presentation.view.d.ts +0 -8
  307. package/dialog/dialog-action-footer.view.d.ts +0 -20
  308. package/dialog/dialog.dom.view.d.ts +0 -15
  309. package/form-controls/index.view.d.ts +0 -10
  310. package/formatting/control-tooltip.d.ts +0 -27
  311. package/native-controls.view.d.ts +0 -54
  312. package/search-input/native.view.d.ts +0 -21
  313. package/styles/legacy-pagination.css +0 -112
  314. package/surfaces.view.d.ts +0 -63
@@ -1,18 +1,19 @@
1
1
  import { i as e } from "./preact.module-BBM36DnO.js";
2
- import { c as t, i as n, n as r, r as i, t as a } from "./hooks.module-CG3gN83z.js";
2
+ import { a as t, i as n, n as r, r as i, t as a } from "./hooks.module-CG3gN83z.js";
3
3
  import { t as o } from "./jsxRuntime.module-F6UFnpT-.js";
4
- import { SvgIcon as s } from "../icons/icon.js";
5
- import { n as c } from "./native-control-C_yok8_-.js";
6
- import { createPreactElement as l, releasePreactElement as u } from "../preact-mount.js";
7
- import { R as d, n as f } from "./controls-DsNi8V8I.js";
8
- import { createControlId as p } from "../core/control-id.js";
4
+ import { createPreactElement as s, releasePreactElement as c } from "../preact-mount.js";
5
+ import { createControlId as l } from "../core/control-id.js";
6
+ import { SvgIcon as u } from "../icons/icon.js";
7
+ import { n as d } from "./native-control-B_fVA5bL.js";
8
+ import "./chevron-down-GbplLa6s.js";
9
+ import { R as f, t as p } from "./controls-B_6NJarZ.js";
9
10
  import { EditorList as m, EditorListItem as h } from "../editor-layout/index.js";
10
11
  import { t as g } from "./clock-BOhPNlW3.js";
11
12
  import { i as _, s as v } from "./iso-B0YHBK7m.js";
12
13
  import { f as y, h as b, m as x, p as S } from "./model-mPO2tG2f.js";
13
- import { n as C, t as w } from "./date-control-DrVFX13g.js";
14
- import { t as T } from "./picker-h1P5RUgp.js";
15
- import { t as E } from "./editor-popup-WDdtVDNA.js";
14
+ import { n as C, t as w } from "./date-control-C4h4m75W.js";
15
+ import { t as T } from "./picker-DTqET-2W.js";
16
+ import { t as E } from "./editor-popup-ByU7qiub.js";
16
17
  import { n as D } from "./editor-commit-Bq3wSgvr.js";
17
18
  import { EditorActions as O } from "../editor-actions.js";
18
19
  //#region ../dates/src/date-controls.ts
@@ -82,20 +83,20 @@ function B(e, t, n) {
82
83
  function V(e, t, n) {
83
84
  return n === "datetime" ? `${R(e)}T${t}` : t;
84
85
  }
85
- function H(e, t) {
86
+ function ee(e, t) {
86
87
  return e === "date" ? v(t) : e === "datetime" ? !!L(t.replace(/(\d{2}:\d{2}:\d{2})\.\d{1,3}$/, "$1")) : !!N(e, t);
87
88
  }
88
- function U(e) {
89
+ function H(e) {
89
90
  let t = N("time", e);
90
91
  return t ? t.getHours() * 3600 + t.getMinutes() * 60 + t.getSeconds() : void 0;
91
92
  }
92
- function W(e, t) {
93
- let n = U(e);
93
+ function U(e, t) {
94
+ let n = H(e);
94
95
  if (n === void 0) return !1;
95
- let r = t.min ? U(t.min) : void 0, i = t.max ? U(t.max) : void 0;
96
+ let r = t.min ? H(t.min) : void 0, i = t.max ? H(t.max) : void 0;
96
97
  return (r === void 0 || n >= r) && (i === void 0 || n <= i) && (t.step === void 0 || t.step > 0 && (n - (r ?? 0)) % t.step === 0);
97
98
  }
98
- function G(e, t, n = "minute", r) {
99
+ function W(e, t, n = "minute", r) {
99
100
  let i = N("time", e);
100
101
  return i ? new Intl.DateTimeFormat(r ?? (t === "12h" ? "en-US" : "en-GB"), {
101
102
  hour: "2-digit",
@@ -104,7 +105,7 @@ function G(e, t, n = "minute", r) {
104
105
  hourCycle: t === "12h" ? "h12" : "h23"
105
106
  }).format(i) : e;
106
107
  }
107
- function K(e, t = "minute", n) {
108
+ function G(e, t = "minute", n) {
108
109
  if (e = e.replace(/[\u200e\u200f\u061c]/g, "").trim(), n) {
109
110
  let t = new Intl.NumberFormat(n, { useGrouping: !1 });
110
111
  for (let n = 0; n < 10; n++) e = e.split(t.format(n)).join(String(n));
@@ -136,18 +137,18 @@ function K(e, t = "minute", n) {
136
137
  }
137
138
  //#endregion
138
139
  //#region ../dates/src/time-selection.ts
139
- function q(e) {
140
- let t = e.min ? U(e.min) : void 0, n = e.max ? U(e.max) : void 0, r = e.step ?? (e.precision === "second" ? 1 : 60);
140
+ function K(e) {
141
+ let t = e.min ? H(e.min) : void 0, n = e.max ? H(e.max) : void 0, r = e.step ?? (e.precision === "second" ? 1 : 60);
141
142
  if (!Number.isFinite(r) || r <= 0) return [];
142
143
  let i = e.precision === "second" ? 1 : 60, a = [];
143
144
  for (let e = 0; e < 86400; e += i) (t === void 0 || e >= t) && (n === void 0 || e <= n) && (e - (t ?? 0)) % r === 0 && a.push(e);
144
145
  return a;
145
146
  }
146
- function J(e, t = "minute") {
147
+ function q(e, t = "minute") {
147
148
  let n = (e) => String(e).padStart(2, "0");
148
149
  return `${n(Math.floor(e / 3600))}:${n(Math.floor(e / 60) % 60)}${t === "second" ? `:${n(e % 60)}` : ""}`;
149
150
  }
150
- function ee(e, t) {
151
+ function J(e, t) {
151
152
  return e === "12h" || e === "locale" && !!new Intl.DateTimeFormat(t, { hour: "numeric" }).resolvedOptions().hour12;
152
153
  }
153
154
  function te(e, t) {
@@ -157,7 +158,7 @@ function te(e, t) {
157
158
  }).formatToParts(new Date(2e3, 0, 1, e ? 13 : 1)).find((e) => e.type === "dayPeriod")?.value ?? (e ? "PM" : "AM");
158
159
  }
159
160
  function ne(e, t, n) {
160
- let r = U(t), i = r ?? e[0] ?? 0, a = Math.floor(i / 3600), o = Math.floor(i / 60) % 60, s = i % 60, c = {
161
+ let r = H(t), i = r ?? e[0] ?? 0, a = Math.floor(i / 3600), o = Math.floor(i / 60) % 60, s = i % 60, c = {
161
162
  hour: /* @__PURE__ */ new Map(),
162
163
  minute: /* @__PURE__ */ new Map(),
163
164
  second: /* @__PURE__ */ new Map(),
@@ -207,15 +208,15 @@ var Y = {
207
208
  chooseTime: "Choose time"
208
209
  };
209
210
  function X(e, t) {
210
- return (e === "time" ? t?.chooseTime ?? t?.chooseDate : t?.chooseDate) ?? (e === "time" ? Y.chooseTime : Y.chooseDate);
211
+ return (e === "time" ? t?.chooseTime : t?.chooseDate) ?? (e === "time" ? Y.chooseTime : Y.chooseDate);
211
212
  }
212
213
  //#endregion
213
214
  //#region src/date-time/validation.ts
214
- function Z(e, t, n = "") {
215
+ function re(e, t, n = "") {
215
216
  let { kind: r = "date", selection: i = "single", value: a, calendar: o = {} } = e, s = {
216
217
  ...Y,
217
218
  ...e.text
218
- }, c = a && !Array.isArray(a) && typeof a == "object" ? a : void 0, l = typeof a == "string" ? a : "", u = c?.from ?? "", d = c?.to ?? "", f = e.required ?? o.required ?? !1, p = c ? [u, d] : Array.isArray(a) ? a : l ? [l] : [], m = (e) => v(e) && (!o.minDate || e >= o.minDate) && (!o.maxDate || e <= o.maxDate) && !o.isDateDisabled?.(e) && !o.isMonthDisabled?.(y(e, o.calendarSystem)), h = (t) => H(r, t) && (r === "time" || m(R(t))) && (r === "date" || W(z(t), {
219
+ }, c = a && !Array.isArray(a) && typeof a == "object" ? a : void 0, l = typeof a == "string" ? a : "", u = c?.from ?? "", d = c?.to ?? "", f = e.required ?? o.required ?? !1, p = c ? [u, d] : Array.isArray(a) ? a : l ? [l] : [], m = (e) => v(e) && (!o.minDate || e >= o.minDate) && (!o.maxDate || e <= o.maxDate) && !o.isDateDisabled?.(e) && !o.isMonthDisabled?.(y(e, o.calendarSystem)), h = (t) => ee(r, t) && (r === "time" || m(R(t))) && (r === "date" || U(z(t), {
219
220
  min: e.minTime,
220
221
  max: e.maxTime,
221
222
  step: e.timeStep
@@ -249,26 +250,26 @@ function Z(e, t, n = "") {
249
250
  }
250
251
  //#endregion
251
252
  //#region src/date-time/time-control.tsx
252
- function re({ value: e, label: t, format: r = "locale", precision: i = "minute", locale: a, min: s, max: l, step: u, onChange: d }) {
253
+ function ie({ value: e, label: t, format: r = "locale", precision: i = "minute", locale: a, min: s, max: c, step: l, onChange: u }) {
253
254
  let [f, p] = n(!1), [m, h] = n("");
254
- if (r === "locale") return /* @__PURE__ */ o(c, {
255
+ if (r === "locale") return /* @__PURE__ */ o(d, {
255
256
  type: "time",
256
257
  "aria-label": t,
257
258
  value: e,
258
259
  min: s,
259
- max: l,
260
- step: u ?? (i === "second" ? 1 : 60),
261
- onInput: (e) => d(e.currentTarget.value)
260
+ max: c,
261
+ step: l ?? (i === "second" ? 1 : 60),
262
+ onInput: (e) => u(e.currentTarget.value)
262
263
  });
263
- let g = G(e, r, i, a);
264
- return /* @__PURE__ */ o(c, {
264
+ let g = W(e, r, i, a);
265
+ return /* @__PURE__ */ o(d, {
265
266
  type: "text",
266
267
  "aria-label": t,
267
268
  value: f ? m : g,
268
- "aria-invalid": !!e && !W(e, {
269
+ "aria-invalid": !!e && !U(e, {
269
270
  min: s,
270
- max: l,
271
- step: u
271
+ max: c,
272
+ step: l
272
273
  }),
273
274
  placeholder: r === "12h" ? "09:00 AM" : "09:00",
274
275
  onFocus: () => {
@@ -277,13 +278,13 @@ function re({ value: e, label: t, format: r = "locale", precision: i = "minute",
277
278
  onBlur: () => p(!1),
278
279
  onInput: (e) => {
279
280
  let t = e.currentTarget.value;
280
- h(t), d(t ? K(t, i, a) ?? t : "");
281
+ h(t), u(t ? G(t, i, a) ?? t : "");
281
282
  }
282
283
  });
283
284
  }
284
285
  //#endregion
285
286
  //#region src/date-time/time-selection.tsx
286
- function ie({ label: e, accessibleLabel: t, values: n, selected: r, choices: s, display: c, onSelect: l }) {
287
+ function ae({ label: e, accessibleLabel: t, values: n, selected: r, choices: s, display: c, onSelect: l }) {
287
288
  let u = a(null), d = r !== void 0 && s.has(r), f = d ? r : n.find((e) => s.has(e));
288
289
  i(() => {
289
290
  let e = u.current;
@@ -302,7 +303,7 @@ function ie({ label: e, accessibleLabel: t, values: n, selected: r, choices: s,
302
303
  };
303
304
  return /* @__PURE__ */ o("div", {
304
305
  class: "rv-time-selection__column",
305
- children: [/* @__PURE__ */ o("span", {
306
+ children: [e && /* @__PURE__ */ o("span", {
306
307
  class: "rv-time-selection__label",
307
308
  children: e
308
309
  }), /* @__PURE__ */ o(m, {
@@ -322,286 +323,301 @@ function ie({ label: e, accessibleLabel: t, values: n, selected: r, choices: s,
322
323
  })]
323
324
  });
324
325
  }
325
- function Q({ value: e, label: t, text: n, onChange: i, format: a = "locale", precision: s = "minute", locale: c, min: l, max: u, step: d }) {
326
- let f = ee(a, c), p = r(() => q({
327
- min: l,
328
- max: u,
329
- step: d,
330
- precision: s
326
+ function Z({ value: e, label: i, text: a, onChange: s, format: c = "locale", precision: l = "minute", locale: d, min: f, max: m, step: h, collapsible: g = !1 }) {
327
+ let [_, v] = n(!1), y = t(), b = J(c, d), x = r(() => K({
328
+ min: f,
329
+ max: m,
330
+ step: h,
331
+ precision: l
331
332
  }), [
332
- l,
333
- u,
334
- d,
335
- s
336
- ]), m = r(() => ne(p, e, f), [
337
- p,
333
+ f,
334
+ m,
335
+ h,
336
+ l
337
+ ]), S = r(() => ne(x, e, b), [
338
+ x,
338
339
  e,
339
- f
340
- ]), h = r(() => new Intl.NumberFormat(c, {
340
+ b
341
+ ]), C = r(() => new Intl.NumberFormat(d, {
341
342
  minimumIntegerDigits: 2,
342
343
  useGrouping: !1
343
- }), [c]), g = (e) => i(J(e, s)), _ = (e, n, r, i = (e) => h.format(e)) => /* @__PURE__ */ o(ie, {
344
- label: n,
345
- accessibleLabel: `${t}: ${n}`,
346
- values: r,
347
- selected: m.hasValue ? m[e] : void 0,
348
- choices: m.columns[e],
349
- display: i,
350
- onSelect: g
351
- }), v = (e, t = 0) => Array.from({ length: e }, (e, n) => t + n);
344
+ }), [d]), w = (e) => s(q(e, l)), T = (e, t, n, r = (e) => C.format(e)) => /* @__PURE__ */ o(ae, {
345
+ label: e === "period" ? void 0 : t,
346
+ accessibleLabel: `${i}: ${t}`,
347
+ values: n,
348
+ selected: S.hasValue ? S[e] : void 0,
349
+ choices: S.columns[e],
350
+ display: r,
351
+ onSelect: w
352
+ }), E = (e, t = 0) => Array.from({ length: e }, (e, n) => t + n);
352
353
  return /* @__PURE__ */ o("section", {
353
354
  class: "rv-time-selection",
354
- children: [
355
- /* @__PURE__ */ o("label", {
355
+ children: [/* @__PURE__ */ o("div", {
356
+ class: "rv-time-selection__entry-row",
357
+ children: [/* @__PURE__ */ o("label", {
356
358
  class: "rv-time-selection__entry",
357
- children: [/* @__PURE__ */ o("span", { children: t }), /* @__PURE__ */ o(re, {
359
+ children: [/* @__PURE__ */ o("span", { children: i }), /* @__PURE__ */ o(ie, {
358
360
  value: e,
359
- label: t,
360
- format: a,
361
- precision: s,
362
- locale: c,
363
- min: l,
364
- max: u,
365
- step: d,
366
- onChange: i
361
+ label: i,
362
+ format: c,
363
+ precision: l,
364
+ locale: d,
365
+ min: f,
366
+ max: m,
367
+ step: h,
368
+ onChange: s
367
369
  })]
368
- }),
369
- /* @__PURE__ */ o("div", {
370
- class: `rv-time-selection__columns${s === "second" ? " rv-time-selection__columns--seconds" : ""}`,
371
- children: [
372
- _("hour", n.hours, v(f ? 12 : 24, f ? m.period * 12 : 0), (e) => h.format(f ? e % 12 || 12 : e)),
373
- _("minute", n.minutes, v(60)),
374
- s === "second" && _("second", n.seconds, v(60))
375
- ]
376
- }),
377
- f && /* @__PURE__ */ o("div", {
378
- class: "rv-time-selection__period",
379
- children: _("period", n.dayPeriod, [0, 1], (e) => te(e, c))
380
- }),
381
- !p.length && /* @__PURE__ */ o("p", {
382
- class: "rv-time-selection__empty",
383
- role: "status",
384
- children: n.noTimes
385
- })
386
- ]
370
+ }), g && /* @__PURE__ */ o(p, {
371
+ variant: "ghost",
372
+ className: "rv-time-selection__toggle",
373
+ "aria-label": a.chooseTime ?? a.time,
374
+ "aria-expanded": _,
375
+ "aria-controls": _ ? y : void 0,
376
+ onClick: () => v(!_),
377
+ children: /* @__PURE__ */ o(u, { svg: "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><!--! Font Awesome Free 7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2026 Fonticons, Inc. --><path fill=\"currentColor\" d=\"M201.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 338.7 54.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z\"/></svg>" })
378
+ })]
379
+ }), (!g || _) && /* @__PURE__ */ o("div", {
380
+ id: y,
381
+ class: "rv-time-selection__clock",
382
+ children: [
383
+ /* @__PURE__ */ o("div", {
384
+ class: `rv-time-selection__columns${l === "second" ? " rv-time-selection__columns--seconds" : ""}`,
385
+ children: [
386
+ T("hour", a.hours, E(b ? 12 : 24, b ? S.period * 12 : 0), (e) => C.format(b ? e % 12 || 12 : e)),
387
+ T("minute", a.minutes, E(60)),
388
+ l === "second" && T("second", a.seconds, E(60))
389
+ ]
390
+ }),
391
+ b && /* @__PURE__ */ o("div", {
392
+ class: "rv-time-selection__period",
393
+ children: T("period", a.dayPeriod, [0, 1], (e) => te(e, d))
394
+ }),
395
+ !x.length && /* @__PURE__ */ o("p", {
396
+ class: "rv-time-selection__empty",
397
+ role: "status",
398
+ children: a.noTimes
399
+ })
400
+ ]
401
+ })]
387
402
  });
388
403
  }
389
404
  //#endregion
390
405
  //#region src/date-time/picker.tsx
391
- function ae(r) {
392
- let { kind: i = "date", selection: a = "single", value: s, onChange: c, calendar: l = {} } = r, u = {
406
+ function oe(t) {
407
+ let { kind: r = "date", selection: a = "single", value: s, onChange: c, calendar: u = {} } = t, d = (u.numberOfMonths ?? 1) >= 2, m = {
393
408
  ...Y,
394
- ...r.text
395
- }, [m] = n(() => p("rv-date-error")), h = (e) => i === "date" ? e : R(e), g = {
396
- locale: l.locale,
397
- ...typeof r.dateInput == "object" ? r.dateInput : {}
398
- }, [_, x] = n(r.endpoint === "to" ? "to" : void 0), [S, C] = n(""), E = s && !Array.isArray(s) && typeof s == "object" ? s : void 0, D = typeof s == "string" ? s : "", O = Array.isArray(s) ? s : [], k = E?.from ?? "", A = E?.to ?? "", j = R(i === "time" ? b() : r.endpoint === "to" ? A : k || D || O[0] || ""), [M, N] = n(() => l.defaultMonth ?? y(v(j) ? j : b(), l.calendarSystem)), P = r.required ?? l.required ?? !1, { valid: F, errorMessage: I, validDate: L } = Z(r, M, S);
399
- t(() => r.onValidityChange?.(!!F), [F]);
400
- let H = (e) => {
401
- C(""), c(e);
402
- }, U = (e) => {
403
- H(e), i === "date" && a !== "multiple" && Z({
404
- ...r,
409
+ ...t.text
410
+ }, [h] = n(() => l("rv-date-error")), g = (e) => r === "date" ? e : R(e), _ = {
411
+ locale: u.locale,
412
+ ...typeof t.dateInput == "object" ? t.dateInput : {}
413
+ }, [x, S] = n(t.endpoint === "to" ? "to" : void 0), [C, E] = n(""), D = s && !Array.isArray(s) && typeof s == "object" ? s : void 0, O = typeof s == "string" ? s : "", k = Array.isArray(s) ? s : [], A = D?.from ?? "", j = D?.to ?? "", M = R(r === "time" ? b() : t.endpoint === "to" ? j : A || O || k[0] || ""), [N, P] = n(() => u.defaultMonth ?? y(v(M) ? M : b(), u.calendarSystem)), F = t.required ?? u.required ?? !1, { valid: I, errorMessage: L, validDate: ee } = re(t, N, C);
414
+ i(() => t.onValidityChange?.(!!I), [I]);
415
+ let H = (e, n = !1) => {
416
+ E(""), c(e), (t.onValidChange || n) && re({
417
+ ...t,
405
418
  value: e
406
- }, M).valid && r.onSelectionComplete?.(e);
419
+ }, N).valid && (t.onValidChange?.(e), n && t.onSelectionComplete?.(e));
420
+ }, U = (e) => {
421
+ H(e, r === "date" && a !== "multiple");
407
422
  }, W = (e) => {
408
- if (!L(e)) return;
409
- let t = y(e, l.calendarSystem);
410
- t !== (l.month ?? M) && (N(t), l.onMonthChange?.(t));
423
+ if (!ee(e)) return;
424
+ let t = y(e, u.calendarSystem);
425
+ t !== (u.month ?? N) && (P(t), u.onMonthChange?.(t));
411
426
  }, G = (e, t) => {
412
427
  if (typeof t != "string") return;
413
428
  W(t);
414
429
  let n = {
415
- from: k,
416
- to: A,
417
- [e]: t ? B(t, e === "from" ? k : A, i) : ""
430
+ from: A,
431
+ to: j,
432
+ [e]: t ? B(t, e === "from" ? A : j, r) : ""
418
433
  };
419
434
  H(!n.from && !n.to ? null : n);
420
- }, K = (e, t, n, i = !0) => /* @__PURE__ */ o("label", {
435
+ }, K = (e, n, r, i = !0) => /* @__PURE__ */ o("label", {
421
436
  class: `rv-temporal-picker__time${i ? "" : " rv-temporal-picker__time--single"}`,
422
- children: [i && /* @__PURE__ */ o("span", { children: t }), /* @__PURE__ */ o(re, {
423
- label: t,
437
+ children: [i && /* @__PURE__ */ o("span", { children: n }), /* @__PURE__ */ o(ie, {
438
+ label: n,
424
439
  value: e ? z(e) : "",
425
- min: r.minTime,
426
- max: r.maxTime,
427
- step: r.timeStep,
428
- precision: r.precision,
429
- format: r.timeFormat,
430
- locale: l.locale,
431
- onChange: n
440
+ min: t.minTime,
441
+ max: t.maxTime,
442
+ step: t.timeStep,
443
+ precision: t.precision,
444
+ format: t.timeFormat,
445
+ locale: u.locale,
446
+ onChange: r
432
447
  })]
433
448
  }), q = {
434
- ...l,
435
- month: l.month ?? M,
449
+ ...u,
450
+ month: u.month ?? N,
436
451
  onMonthChange: (e) => {
437
- N(e), l.onMonthChange?.(e);
452
+ P(e), u.onMonthChange?.(e);
438
453
  },
439
- required: P,
454
+ required: F,
440
455
  onInvalidSelection: (e, t) => {
441
- C(e || u.invalid), l.onInvalidSelection?.(e, t);
456
+ E(e || m.invalid), u.onInvalidSelection?.(e, t);
442
457
  }
443
458
  }, J;
444
459
  if (a === "multiple") J = {
445
460
  ...q,
446
461
  mode: "multiple",
447
- selected: O.filter(v),
462
+ selected: k.filter(v),
448
463
  onSelectionChange: (e) => U([...e])
449
464
  };
450
- else if (a === "range" && !_) J = {
465
+ else if (a === "range" && !x) J = {
451
466
  ...q,
452
467
  mode: "range",
453
- selected: k && v(R(k)) ? {
454
- from: R(k),
455
- ...A && v(R(A)) ? { to: R(A) } : {}
468
+ selected: A && v(R(A)) ? {
469
+ from: R(A),
470
+ ...j && v(R(j)) ? { to: R(j) } : {}
456
471
  } : void 0,
457
472
  onSelectionChange: (e) => U(e ? {
458
- from: B(e.from, k, i),
459
- ...e.to ? { to: B(e.to, A, i) } : {}
473
+ from: B(e.from, A, r),
474
+ ...e.to ? { to: B(e.to, j, r) } : {}
460
475
  } : null)
461
476
  };
462
477
  else {
463
- let e = a === "range" ? _ === "to" ? A : k : D;
478
+ let e = a === "range" ? x === "to" ? j : A : O;
464
479
  J = {
465
480
  ...q,
466
481
  mode: "single",
467
482
  selected: e && v(R(e)) ? R(e) : void 0,
468
483
  onSelectionChange: (t) => {
469
484
  U(a === "range" ? t ? {
470
- from: k,
471
- to: A,
472
- [_ ?? "from"]: B(t, e, i)
473
- } : null : t ? B(t, D, i) : null);
485
+ from: A,
486
+ to: j,
487
+ [x ?? "from"]: B(t, e, r)
488
+ } : null : t ? B(t, O, r) : null);
474
489
  }
475
490
  };
476
491
  }
477
492
  return /* @__PURE__ */ o("div", {
478
- class: `rv-temporal-picker rv-temporal-picker--${i}`,
493
+ class: `rv-temporal-picker rv-temporal-picker--${r}${d ? " rv-temporal-picker--multi-month" : ""}`,
479
494
  children: [
480
- r.dateInput === !1 && a === "range" && i !== "time" && /* @__PURE__ */ o("div", {
481
- class: `rv-temporal-picker__endpoints ${r.classNames?.endpoints ?? ""}`,
482
- children: [/* @__PURE__ */ o(f, {
483
- "aria-label": `${u.startDate}: ${k}`,
484
- "aria-pressed": _ !== "to",
495
+ t.dateInput === !1 && a === "range" && r !== "time" && /* @__PURE__ */ o("div", {
496
+ class: `rv-temporal-picker__endpoints ${t.classNames?.endpoints ?? ""}`,
497
+ children: [/* @__PURE__ */ o(p, {
498
+ "aria-label": `${m.startDate}: ${A}`,
499
+ "aria-pressed": x !== "to",
485
500
  onClick: () => {
486
- x(void 0), k && N(y(R(k), l.calendarSystem)), C("");
501
+ S(void 0), A && P(y(R(A), u.calendarSystem)), E("");
487
502
  },
488
- children: k ? R(k) : "—"
489
- }), /* @__PURE__ */ o(f, {
490
- "aria-label": `${u.endDate}: ${A}`,
491
- "aria-pressed": _ === "to",
503
+ children: A ? R(A) : "—"
504
+ }), /* @__PURE__ */ o(p, {
505
+ "aria-label": `${m.endDate}: ${j}`,
506
+ "aria-pressed": x === "to",
492
507
  onClick: () => {
493
- x("to"), A && N(y(R(A), l.calendarSystem)), C("");
508
+ S("to"), j && P(y(R(j), u.calendarSystem)), E("");
494
509
  },
495
- children: A ? R(A) : "—"
510
+ children: j ? R(j) : "—"
496
511
  })]
497
512
  }),
498
513
  /* @__PURE__ */ o("div", {
499
514
  class: "rv-temporal-picker__header",
500
- children: i !== "time" && r.dateInput !== !1 && /* @__PURE__ */ o("div", {
501
- class: `rv-temporal-picker__dates ${a === "range" ? `rv-temporal-picker__endpoints ${r.classNames?.endpoints ?? ""}` : ""}`,
515
+ children: r !== "time" && t.dateInput !== !1 && /* @__PURE__ */ o("div", {
516
+ class: `rv-temporal-picker__dates ${a === "range" ? `rv-temporal-picker__endpoints ${t.classNames?.endpoints ?? ""}` : ""}`,
502
517
  children: a === "range" ? /* @__PURE__ */ o(e, { children: [/* @__PURE__ */ o("div", {
503
518
  class: "rv-temporal-picker__endpoint",
504
519
  role: "group",
505
- "aria-label": u.startDate,
520
+ "aria-label": m.startDate,
506
521
  children: [/* @__PURE__ */ o(w, {
507
- label: u.startDate,
508
- value: h(k),
509
- options: g,
510
- invalid: !F,
511
- errorId: m,
512
- onFocus: () => x(void 0),
522
+ label: m.startDate,
523
+ value: g(A),
524
+ options: _,
525
+ invalid: !I,
526
+ errorId: h,
527
+ onFocus: () => S(void 0),
513
528
  onChange: (e) => G("from", e)
514
- }), i === "datetime" && K(k, u.startTime, (e) => H({
515
- from: V(k, e, i),
516
- ...A ? { to: A } : {}
529
+ }), r === "datetime" && K(A, m.startTime, (e) => H({
530
+ from: V(A, e, r),
531
+ ...j ? { to: j } : {}
517
532
  }), !1)]
518
533
  }), /* @__PURE__ */ o("div", {
519
534
  class: "rv-temporal-picker__endpoint",
520
535
  role: "group",
521
- "aria-label": u.endDate,
536
+ "aria-label": m.endDate,
522
537
  children: [/* @__PURE__ */ o(w, {
523
- label: u.endDate,
524
- value: h(A),
525
- options: g,
526
- invalid: !F,
527
- errorId: m,
528
- onFocus: () => x("to"),
538
+ label: m.endDate,
539
+ value: g(j),
540
+ options: _,
541
+ invalid: !I,
542
+ errorId: h,
543
+ onFocus: () => S("to"),
529
544
  onChange: (e) => G("to", e)
530
- }), i === "datetime" && K(A, u.endTime, (e) => H({
531
- from: k,
532
- to: V(A, e, i)
545
+ }), r === "datetime" && K(j, m.endTime, (e) => H({
546
+ from: A,
547
+ to: V(j, e, r)
533
548
  }), !1)]
534
549
  })] }) : /* @__PURE__ */ o(w, {
535
- label: a === "multiple" ? u.dates : u.date,
536
- value: a === "multiple" ? O : h(D),
550
+ label: a === "multiple" ? m.dates : m.date,
551
+ value: a === "multiple" ? k : g(O),
537
552
  multiple: a === "multiple",
538
- options: g,
539
- invalid: !F,
540
- errorId: m,
553
+ options: _,
554
+ invalid: !I,
555
+ errorId: h,
541
556
  onChange: (e) => {
542
- typeof e == "string" && W(e), H(Array.isArray(e) ? e : e ? B(e, D, i) : null);
557
+ typeof e == "string" && W(e), H(Array.isArray(e) ? e : e ? B(e, O, r) : null);
543
558
  }
544
559
  })
545
560
  })
546
561
  }),
547
562
  /* @__PURE__ */ o("div", {
548
563
  class: "rv-temporal-picker__body",
549
- children: [i !== "time" && /* @__PURE__ */ o(T, { ...J }), i !== "date" && a !== "range" && /* @__PURE__ */ o(Q, {
550
- value: z(D),
551
- label: u.time,
552
- text: u,
553
- format: r.timeFormat,
554
- precision: r.precision,
555
- locale: l.locale,
556
- min: r.minTime,
557
- max: r.maxTime,
558
- step: r.timeStep,
559
- onChange: (e) => H(V(D, e, i))
564
+ children: [r !== "time" && /* @__PURE__ */ o(T, { ...J }), r !== "date" && a !== "range" && /* @__PURE__ */ o(Z, {
565
+ collapsible: r === "datetime" && d,
566
+ value: z(O),
567
+ label: m.time,
568
+ text: m,
569
+ format: t.timeFormat,
570
+ precision: t.precision,
571
+ locale: u.locale,
572
+ min: t.minTime,
573
+ max: t.maxTime,
574
+ step: t.timeStep,
575
+ onChange: (e) => H(V(O, e, r))
560
576
  })]
561
577
  }),
562
- i !== "date" && a === "range" && (i === "time" || r.dateInput === !1) && /* @__PURE__ */ o("div", {
578
+ r !== "date" && a === "range" && (r === "time" || t.dateInput === !1) && /* @__PURE__ */ o("div", {
563
579
  class: "rv-temporal-picker__times",
564
- children: [i === "time" ? /* @__PURE__ */ o(Q, {
565
- value: z(k),
566
- label: u.startTime,
567
- text: u,
568
- format: r.timeFormat,
569
- precision: r.precision,
570
- locale: l.locale,
571
- min: r.minTime,
572
- max: r.maxTime,
573
- step: r.timeStep,
580
+ children: [r === "time" ? /* @__PURE__ */ o(Z, {
581
+ value: z(A),
582
+ label: m.startTime,
583
+ text: m,
584
+ format: t.timeFormat,
585
+ precision: t.precision,
586
+ locale: u.locale,
587
+ min: t.minTime,
588
+ max: t.maxTime,
589
+ step: t.timeStep,
574
590
  onChange: (e) => H({
575
591
  from: e,
576
- ...A ? { to: A } : {}
592
+ ...j ? { to: j } : {}
577
593
  })
578
- }) : K(k, u.startTime, (e) => H({
579
- from: V(k, e, i),
580
- ...A ? { to: A } : {}
581
- })), i === "time" ? /* @__PURE__ */ o(Q, {
582
- value: z(A),
583
- label: u.endTime,
584
- text: u,
585
- format: r.timeFormat,
586
- precision: r.precision,
587
- locale: l.locale,
588
- min: r.minTime,
589
- max: r.maxTime,
590
- step: r.timeStep,
594
+ }) : K(A, m.startTime, (e) => H({
595
+ from: V(A, e, r),
596
+ ...j ? { to: j } : {}
597
+ })), r === "time" ? /* @__PURE__ */ o(Z, {
598
+ value: z(j),
599
+ label: m.endTime,
600
+ text: m,
601
+ format: t.timeFormat,
602
+ precision: t.precision,
603
+ locale: u.locale,
604
+ min: t.minTime,
605
+ max: t.maxTime,
606
+ step: t.timeStep,
591
607
  onChange: (e) => H({
592
- from: k,
608
+ from: A,
593
609
  to: e
594
610
  })
595
- }) : K(A, u.endTime, (e) => H({
596
- from: k,
597
- to: V(A, e, i)
611
+ }) : K(j, m.endTime, (e) => H({
612
+ from: A,
613
+ to: V(j, e, r)
598
614
  }))]
599
615
  }),
600
- !F && /* @__PURE__ */ o(d, {
616
+ !I && /* @__PURE__ */ o(f, {
601
617
  tone: "danger",
602
618
  children: /* @__PURE__ */ o("span", {
603
- id: m,
604
- children: I
619
+ id: h,
620
+ children: L
605
621
  })
606
622
  })
607
623
  ]
@@ -609,111 +625,130 @@ function ae(r) {
609
625
  }
610
626
  //#endregion
611
627
  //#region src/date-time/field.tsx
612
- function $({ value: e, options: t, apply: r, cancel: i, clearable: a = !0 }) {
613
- let [s, c] = n(e), [l, u] = n(!1), [f, p] = n(""), m = (e) => {
614
- c(e), p("");
615
- }, h = t.autoApply !== !1, g = JSON.stringify(s) !== JSON.stringify(e), _ = (e) => {
628
+ function Q({ value: e, options: t, apply: r, cancel: i, onValidChange: a, clearable: s = !0 }) {
629
+ let [c, l] = n(e), [u, d] = n(!1), [p, m] = n(""), h = (e) => {
630
+ l(e), m("");
631
+ }, g = t.autoApply !== !1, _ = JSON.stringify(c) !== JSON.stringify(e), v = (e) => {
616
632
  let t = r(e) || "";
617
- return p(t), !t;
618
- }, v = () => l ? _(s) : !1;
619
- return D(() => !g || v(), h), /* @__PURE__ */ o("div", {
633
+ return m(t), !t;
634
+ }, y = () => u ? v(c) : !1;
635
+ return D(() => !_ || y(), g), /* @__PURE__ */ o("div", {
620
636
  class: `rv-temporal-draft${t.kind === "time" ? " rv-temporal-draft--time" : ""}`,
621
637
  onKeyDown: (e) => {
622
- e.key === "Enter" && !e.isComposing && (e.ctrlKey || e.metaKey || h && e.target instanceof HTMLInputElement) && (e.preventDefault(), v());
638
+ e.key === "Enter" && !e.isComposing && (e.ctrlKey || e.metaKey || g && e.target instanceof HTMLInputElement) && (e.preventDefault(), y());
623
639
  },
624
640
  children: [
625
- /* @__PURE__ */ o(ae, {
641
+ /* @__PURE__ */ o(oe, {
626
642
  ...t,
627
- value: s,
628
- onChange: m,
629
- onValidityChange: u,
630
- onSelectionComplete: h ? _ : void 0
643
+ value: c,
644
+ onChange: h,
645
+ onValidChange: a,
646
+ onValidityChange: d,
647
+ onSelectionComplete: g ? v : void 0
631
648
  }),
632
- f && /* @__PURE__ */ o(d, {
649
+ p && /* @__PURE__ */ o(f, {
633
650
  tone: "danger",
634
- children: f
651
+ children: p
635
652
  }),
636
653
  /* @__PURE__ */ o(O, {
637
654
  text: t.actions,
638
- showConfirm: t.showActions ?? !h,
639
- disabled: !l,
640
- apply: v,
655
+ showConfirm: t.showActions ?? !g,
656
+ disabled: !u,
657
+ apply: y,
641
658
  cancel: i,
642
- clear: !a || (t.required ?? t.calendar?.required) ? void 0 : () => {
659
+ clear: !s || (t.required ?? t.calendar?.required) ? void 0 : () => {
643
660
  let e = t.selection === "multiple" ? [] : null;
644
- m(e), h && _(e);
661
+ h(e), g && v(e);
645
662
  }
646
663
  })
647
664
  ]
648
665
  });
649
666
  }
650
- function oe({ value: e, kind: t = "date", picker: n, onValueChange: r, onInput: l, formatValue: u, parseValue: d, ...p }) {
651
- let m = a(null), h = a(), _ = a({
667
+ function se({ value: e, kind: t = "date", picker: n, livePickerUpdates: r, onValueChange: s, onInput: c, formatValue: l, parseValue: f, ...m }) {
668
+ let h = a(null), _ = a(), v = a({
652
669
  value: e,
653
670
  kind: t,
654
671
  picker: n,
655
- onValueChange: r,
656
- input: p
672
+ onValueChange: s,
673
+ input: m
657
674
  });
658
- return _.current = {
675
+ return v.current = {
659
676
  value: e,
660
677
  kind: t,
661
678
  picker: n,
662
- onValueChange: r,
663
- input: p
664
- }, i(() => () => h.current?.close(), []), i(() => {
665
- (p.disabled || p.readOnly) && h.current?.close();
666
- }, [p.disabled, p.readOnly]), /* @__PURE__ */ o("span", {
679
+ onValueChange: s,
680
+ input: m
681
+ }, i(() => () => _.current?.close(), []), i(() => {
682
+ (m.disabled || m.readOnly) && _.current?.close();
683
+ }, [m.disabled, m.readOnly]), /* @__PURE__ */ o("span", {
667
684
  class: "rv-date-time-field",
668
- children: [/* @__PURE__ */ o(c, {
669
- ...p,
685
+ children: [/* @__PURE__ */ o(d, {
686
+ ...m,
670
687
  type: "text",
671
- value: u?.(e) ?? e,
672
- placeholder: p.placeholder ?? (t === "date" ? "YYYY-MM-DD" : t === "time" ? "HH:mm" : "YYYY-MM-DDTHH:mm"),
688
+ value: l?.(e) ?? e,
689
+ placeholder: m.placeholder ?? (t === "date" ? "YYYY-MM-DD" : t === "time" ? "HH:mm" : "YYYY-MM-DDTHH:mm"),
673
690
  onInput: (e) => {
674
- l?.(e);
675
- let t = d ? d(e.currentTarget.value) : e.currentTarget.value;
676
- t !== void 0 && r?.(t);
691
+ c?.(e);
692
+ let t = f ? f(e.currentTarget.value) : e.currentTarget.value;
693
+ t !== void 0 && s?.(t);
677
694
  }
678
- }), /* @__PURE__ */ o(f, {
679
- ref: m,
695
+ }), /* @__PURE__ */ o(p, {
696
+ ref: h,
680
697
  variant: "ghost",
681
698
  "aria-label": X(t, n?.text),
682
- disabled: p.disabled || p.readOnly,
699
+ disabled: m.disabled || m.readOnly,
683
700
  onClick: () => {
684
- m.current && !h.current && (h.current = E(m.current, (r) => /* @__PURE__ */ o($, {
701
+ if (!h.current) return;
702
+ if (_.current) {
703
+ _.current.close();
704
+ return;
705
+ }
706
+ let i, a = (e) => {
707
+ let t = typeof e == "string" ? e : "";
708
+ t === i || v.current.input.disabled || v.current.input.readOnly || (i = t, v.current.onValueChange?.(t));
709
+ };
710
+ _.current = E(h.current, (i) => /* @__PURE__ */ o(Q, {
685
711
  value: e || null,
686
712
  options: {
687
713
  ...n,
688
- required: n?.required ?? p.required,
714
+ calendar: {
715
+ fixedWeeks: !0,
716
+ ...n?.calendar
717
+ },
718
+ required: n?.required ?? m.required,
689
719
  kind: t,
690
720
  selection: "single"
691
721
  },
692
- cancel: r,
722
+ cancel: i,
723
+ onValidChange: r && n?.autoApply !== !1 ? a : void 0,
693
724
  apply: (e) => {
694
- !_.current.input.disabled && !_.current.input.readOnly && _.current.onValueChange?.(typeof e == "string" ? e : ""), r();
725
+ a(e), i();
695
726
  }
696
727
  }), {
697
728
  label: X(t, n?.text),
729
+ fitViewport: t === "datetime",
698
730
  className: t === "time" ? "rv-editor-popup--time" : t === "datetime" ? "rv-editor-popup--datetime" : void 0,
699
731
  onClose: () => {
700
- h.current = void 0;
732
+ _.current = void 0;
701
733
  }
702
- }));
734
+ });
703
735
  },
704
- children: /* @__PURE__ */ o(s, { svg: t === "time" ? g : C })
736
+ children: /* @__PURE__ */ o(u, { svg: t === "time" ? g : C })
705
737
  })]
706
738
  });
707
739
  }
708
740
  //#endregion
709
741
  //#region src/date-time/attach.tsx
710
- function se(e, t, n) {
711
- let r, i = l(e.ownerDocument, /* @__PURE__ */ o(f, {
742
+ var $ = /* @__PURE__ */ new WeakMap();
743
+ function ce(e, t, n) {
744
+ $.get(e)?.();
745
+ let r, i = s(e.ownerDocument, /* @__PURE__ */ o(p, {
746
+ className: "rv-temporal-picker-trigger",
712
747
  variant: "ghost",
713
748
  disabled: e.disabled || e.readOnly,
714
749
  "aria-label": X(t.kind ?? "date", t.text),
715
750
  onClick: () => {
716
- e.disabled || e.readOnly || r || (r = E(e, (r) => /* @__PURE__ */ o($, {
751
+ e.disabled || e.readOnly || (r ? r.close() : r = E(e, (r) => /* @__PURE__ */ o(Q, {
717
752
  value: e.value || null,
718
753
  options: {
719
754
  ...t,
@@ -725,29 +760,33 @@ function se(e, t, n) {
725
760
  !e.disabled && !e.readOnly && n(typeof t == "string" ? t : ""), r();
726
761
  }
727
762
  }), {
763
+ fitViewport: t.kind === "datetime",
728
764
  className: t.kind === "time" ? "rv-editor-popup--time" : t.kind === "datetime" ? "rv-editor-popup--datetime" : void 0,
729
765
  label: X(t.kind ?? "date", t.text),
766
+ trigger: i,
730
767
  onClose: () => {
731
768
  r = void 0;
732
769
  }
733
770
  }));
734
771
  },
735
- children: /* @__PURE__ */ o(s, { svg: t.kind === "time" ? g : C })
772
+ children: /* @__PURE__ */ o(u, { svg: t.kind === "time" ? g : C })
736
773
  }));
737
774
  e.after(i);
738
- let a = e.ownerDocument.defaultView?.MutationObserver, c = a ? new a(() => {
775
+ let a = e.ownerDocument.defaultView?.MutationObserver, l = a ? new a(() => {
739
776
  i.disabled = e.disabled || e.readOnly, i.disabled && r?.close();
740
777
  }) : void 0;
741
- return c?.observe(e, {
778
+ l?.observe(e, {
742
779
  attributes: !0,
743
780
  attributeFilter: ["disabled", "readonly"]
744
- }), () => {
745
- c?.disconnect(), r?.close(), u(i), i.remove();
781
+ });
782
+ let d = () => {
783
+ $.get(e) === d && ($.delete(e), l?.disconnect(), r?.close(), c(i), i.remove());
746
784
  };
785
+ return $.set(e, d), d;
747
786
  }
748
787
  //#endregion
749
788
  //#region src/date-time/value.tsx
750
- function ce(e, t) {
789
+ function le(e, t) {
751
790
  let n = Number.isFinite(t.maxVisibleDates) ? Math.max(1, Math.floor(t.maxVisibleDates)) : 2, r = t.multiple ? t.values.slice(0, n) : t.values, i = t.values.length - r.length;
752
791
  return e("span", {
753
792
  class: "rv-temporal-value",
@@ -765,4 +804,4 @@ function ce(e, t) {
765
804
  }, `+${i}`) : null]);
766
805
  }
767
806
  //#endregion
768
- export { ae as a, $ as i, se as n, Y as o, oe as r, X as s, ce as t };
807
+ export { oe as a, Q as i, ce as n, Y as o, se as r, X as s, le as t };