@revolist/ui 4.0.5-rc → 4.0.6-rc

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 (153) hide show
  1. package/MIGRATION.md +36 -0
  2. package/OWNERSHIP.md +10 -10
  3. package/README.md +6 -4
  4. package/_chunks/{calendar-DsXIhybL.js → calendar-QWDyYzdo.js} +1 -1
  5. package/_chunks/{chart-frame-CuZABXVI.js → chart-frame-hcOlnQ1K.js} +13 -9
  6. package/_chunks/{choice-chips-BhP8MZjs.js → choice-chips-A6WR-WJe.js} +1 -1
  7. package/_chunks/{color-picker-B4TQvxxB.js → color-picker-BK4W1nd6.js} +1 -1
  8. package/_chunks/{component-qKctqdzk.js → component-CMkF17YZ.js} +5 -5
  9. package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-BKd7U8OW.js} +0 -8
  10. package/_chunks/{configurator-actions-C19O1rda.js → configurator-actions-By8WSL2m.js} +3 -3
  11. package/_chunks/{control-BkWukVt9.js → control-mlH7l0Uq.js} +30 -5
  12. package/_chunks/{controls-BLQnWEd7.js → controls-FUU-MUKC.js} +26 -33
  13. package/_chunks/{date-control-Cgw5PwlZ.js → date-control-Dup_P3w5.js} +1 -1
  14. package/_chunks/{date-time-B8rK5gpC.js → date-time-9z6pAG5T.js} +304 -281
  15. package/_chunks/dialog.parts-Bi7YbXqS.js +131 -0
  16. package/_chunks/{duration-DwFXonEV.js → duration-D7oRjsmP.js} +5 -2
  17. package/_chunks/{editor-popup-BaaxL89T.js → editor-popup-ByU7qiub.js} +8 -7
  18. package/_chunks/{field-configurator-1eQP0tKy.js → field-configurator-BCINdXpU.js} +1 -1
  19. package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-Bk4O_T7T.js} +1 -1
  20. package/_chunks/{icon-toolbar-xbqa0hu9.js → icon-toolbar-DSjOdwM7.js} +39 -33
  21. package/_chunks/mount-Cw2zk58T.js +266 -0
  22. package/_chunks/{native.view-ByyZ1CT5.js → native-Blr3byjO.js} +1 -1
  23. package/_chunks/{native-control-DO0d1kgx.js → native-control-pFMuHf3G.js} +106 -98
  24. package/_chunks/{number-input-s9ddPwX6.js → number-input-DqXV6vgP.js} +2 -2
  25. package/_chunks/{picker-AY05b41W.js → picker-gEGTu1Ki.js} +2 -2
  26. package/_chunks/{popup-UXGCiv3n.js → popup-C35Isk7p.js} +19 -8
  27. package/_chunks/{rating-choice-BEs_QFZC.js → rating-choice-DbxdUJr-.js} +1 -1
  28. package/_chunks/{reorder-list-A49l172e.js → reorder-list-B0_13Sja.js} +1 -1
  29. package/_chunks/{request-trail-DCOfa5zw.js → request-trail-CCSK6TJA.js} +2 -2
  30. package/_chunks/{rich-text-xfMWadGi.js → rich-text-5rnc8lpI.js} +3 -3
  31. package/_variables.scss +33 -32
  32. package/ai/index.js +2 -2
  33. package/ai/results/_style.scss +3 -0
  34. package/assignee/assignee.scss +5 -1
  35. package/assignee/index.js +2 -2
  36. package/avatar/index.d.ts +25 -2
  37. package/avatar/index.js +1 -1
  38. package/brush-range/component.d.ts +1 -3
  39. package/brush-range/component.js +8 -9
  40. package/buttons/remove-button.d.ts +1 -1
  41. package/buttons/remove-button.style.scss +1 -1
  42. package/buttons/svg-button.js +1 -1
  43. package/calendar/calendar.js +1 -1
  44. package/calendar/index.js +2 -2
  45. package/checkbox/checkbox.scss +1 -22
  46. package/choice-chips/index.js +1 -1
  47. package/color-palette/color-picker.js +1 -1
  48. package/color-palette/common-palettes.d.ts +1 -1
  49. package/color-palette/common-palettes.js +1 -1
  50. package/color-palette/native.d.ts +15 -2
  51. package/component-catalog.d.ts +3 -6
  52. package/configurator-actions.js +1 -1
  53. package/configurator-aggregation-list.js +1 -1
  54. package/configurator-drop-zone.d.ts +1 -1
  55. package/configurator-drop-zone.js +1 -1
  56. package/control-presentation.d.ts +8 -2
  57. package/control-presentation.js +1 -1
  58. package/controls.js +1 -1
  59. package/core/editor-popup-position.d.ts +6 -2
  60. package/core/editor-popup.d.ts +4 -0
  61. package/core/editor-popup.js +1 -1
  62. package/date-time/attach.d.ts +1 -1
  63. package/date-time/field.d.ts +3 -2
  64. package/date-time/index.js +1 -1
  65. package/date-time/style.scss +16 -2
  66. package/date-time/types.d.ts +5 -1
  67. package/dialog/dialog-action-footer.d.ts +17 -2
  68. package/dialog/dialog.dom.d.ts +15 -2
  69. package/dialog/dialog.dom.js +3 -3
  70. package/dialog/dialog.parts.d.ts +1 -1
  71. package/dialog/dialog.parts.js +1 -1
  72. package/distribution-chart/_distribution-chart.scss +14 -0
  73. package/distribution-chart/area-chart.js +1 -1
  74. package/distribution-chart/bar-chart.js +1 -1
  75. package/distribution-chart/index.d.ts +1 -1
  76. package/distribution-chart/line-chart.js +1 -1
  77. package/dropdown/content.js +1 -1
  78. package/dropdown/control.js +1 -1
  79. package/dropdown/editor-dropdown.style.scss +5 -0
  80. package/dropdown/index.js +2 -2
  81. package/dropdown/lookup-field.d.ts +5 -0
  82. package/dropdown/lookup-field.js +1 -1
  83. package/dropdown/popup.js +1 -1
  84. package/duration/index.js +1 -1
  85. package/editor-actions.js +1 -1
  86. package/field-configurator.d.ts +8 -0
  87. package/field-configurator.js +1 -1
  88. package/filter/filters/slider/_slider.scss +8 -8
  89. package/filter/filters/slider/single.js +1 -1
  90. package/filter-badge.js +1 -1
  91. package/filter-controls.d.ts +0 -1
  92. package/filter-controls.js +5 -6
  93. package/form-controls/index.d.ts +10 -2
  94. package/form-controls/index.js +3 -3
  95. package/formatting/index.d.ts +1 -1
  96. package/formatting/index.js +1 -1
  97. package/framework.js +202 -205
  98. package/icon-toolbar.d.ts +5 -1
  99. package/icon-toolbar.js +1 -1
  100. package/masked-input/index.js +1 -1
  101. package/native-control.js +1 -1
  102. package/native-controls.d.ts +54 -2
  103. package/native-styles.css +1 -1
  104. package/native.js +29 -29
  105. package/number-input/index.js +1 -1
  106. package/package.json +1 -1
  107. package/pagination.js +11 -11
  108. package/pdf-viewer/index.js +1 -1
  109. package/preact.d.ts +1 -6
  110. package/preact.js +60 -60
  111. package/rating-choice.js +1 -1
  112. package/react-control.d.ts +2 -0
  113. package/react-control.js +2 -2
  114. package/react.d.ts +0 -6
  115. package/react.js +54 -54
  116. package/reorder-list.js +1 -1
  117. package/resource-picker/resource-picker-popup.js +1 -1
  118. package/rich-text/index.js +1 -1
  119. package/search-input/index.js +1 -1
  120. package/search-input/native.d.ts +21 -2
  121. package/select.js +1 -1
  122. package/styles/_alert.scss +18 -4
  123. package/styles/_editor-slider.scss +0 -2
  124. package/styles/_field-configurator.scss +2 -1
  125. package/styles/_fields-grid.scss +2 -0
  126. package/styles/_palette.scss +0 -24
  127. package/styles/_primitives.scss +3 -1
  128. package/styles.css +1 -1
  129. package/styles.scss +2 -2
  130. package/surfaces.d.ts +34 -3
  131. package/surfaces.js +2 -2
  132. package/svelte.js +3 -3
  133. package/switch/index.js +1 -1
  134. package/time-grid.d.ts +0 -1
  135. package/time-grid.js +4 -4
  136. package/timeline-track/index.js +1 -1
  137. package/ui.css +1 -1
  138. package/vue.d.ts +2 -21
  139. package/vue.js +83 -89
  140. package/_chunks/dialog.parts-BSbvnEwX.js +0 -134
  141. package/_chunks/mount-D1i5DLRn.js +0 -266
  142. package/avatar/index.view.d.ts +0 -25
  143. package/color-palette/native.view.d.ts +0 -15
  144. package/control-presentation.view.d.ts +0 -8
  145. package/dialog/dialog-action-footer.view.d.ts +0 -20
  146. package/dialog/dialog.dom.view.d.ts +0 -15
  147. package/form-controls/index.view.d.ts +0 -10
  148. package/formatting/control-tooltip.d.ts +0 -2
  149. package/native-controls.view.d.ts +0 -54
  150. package/search-input/native.view.d.ts +0 -21
  151. package/surfaces.view.d.ts +0 -33
  152. /package/styles/{legacy-pagination.css → pagination.css} +0 -0
  153. /package/styles/{legacy-rating.css → rating.css} +0 -0
@@ -1,56 +1,56 @@
1
1
  import { i as e } from "./preact.module-BBM36DnO.js";
2
- import { a as t, c as n, i as r, n as i, r as a, t as o } from "./hooks.module-CG3gN83z.js";
3
- import { t as s } from "./jsxRuntime.module-F6UFnpT-.js";
4
- import { createPreactElement as c, releasePreactElement as l } from "../preact-mount.js";
5
- import { createControlId as u } from "../core/control-id.js";
6
- import { SvgIcon as d } from "../icons/icon.js";
7
- import { n as f } from "./native-control-DO0d1kgx.js";
2
+ import { a as t, i as n, n as r, r as i, t as a } from "./hooks.module-CG3gN83z.js";
3
+ import { t as o } from "./jsxRuntime.module-F6UFnpT-.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-pFMuHf3G.js";
8
8
  import "./chevron-down-GbplLa6s.js";
9
- import { L as p, t as m } from "./controls-BLQnWEd7.js";
10
- import { EditorList as h, EditorListItem as g } from "../editor-layout/index.js";
11
- import { t as _ } from "./clock-BOhPNlW3.js";
12
- import { i as v, s as y } from "./iso-B0YHBK7m.js";
13
- import { f as b, h as x, m as S, p as C } from "./model-mPO2tG2f.js";
14
- import { n as w, t as T } from "./date-control-Cgw5PwlZ.js";
15
- import { t as E } from "./picker-AY05b41W.js";
16
- import { t as D } from "./editor-popup-BaaxL89T.js";
17
- import { n as O } from "./editor-commit-Bq3wSgvr.js";
18
- import { EditorActions as k } from "../editor-actions.js";
9
+ import { L as f, t as p } from "./controls-FUU-MUKC.js";
10
+ import { EditorList as m, EditorListItem as h } from "../editor-layout/index.js";
11
+ import { t as g } from "./clock-BOhPNlW3.js";
12
+ import { i as _, s as v } from "./iso-B0YHBK7m.js";
13
+ import { f as y, h as b, m as x, p as S } from "./model-mPO2tG2f.js";
14
+ import { n as C, t as w } from "./date-control-Dup_P3w5.js";
15
+ import { t as T } from "./picker-gEGTu1Ki.js";
16
+ import { t as E } from "./editor-popup-ByU7qiub.js";
17
+ import { n as D } from "./editor-commit-Bq3wSgvr.js";
18
+ import { EditorActions as O } from "../editor-actions.js";
19
19
  //#region ../dates/src/date-controls.ts
20
- var A = /^(\d{4})-(\d{2})-(\d{2})$/, j = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/, M = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
21
- function N(e, t, n = "minute") {
20
+ var k = /^(\d{4})-(\d{2})-(\d{2})$/, A = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?$/, j = /^(\d{2}):(\d{2})(?::(\d{2}))?$/;
21
+ function M(e, t, n = "minute") {
22
22
  if (Number.isNaN(t.getTime())) return "";
23
- let r = `${F(t.getHours())}:${F(t.getMinutes())}${n === "second" ? `:${F(t.getSeconds())}` : ""}`;
23
+ let r = `${P(t.getHours())}:${P(t.getMinutes())}${n === "second" ? `:${P(t.getSeconds())}` : ""}`;
24
24
  if (e === "time") return r;
25
- let i = v(t);
25
+ let i = _(t);
26
26
  return e === "date" ? i : `${i}T${r}`;
27
27
  }
28
- function P(e, t, n = /* @__PURE__ */ new Date()) {
28
+ function N(e, t, n = /* @__PURE__ */ new Date()) {
29
29
  if (e === "time") {
30
- let e = M.exec(t);
30
+ let e = j.exec(t);
31
31
  if (!e) return;
32
32
  let r = Number(e[1]), i = Number(e[2]), a = Number(e[3] ?? 0);
33
33
  if (r > 23 || i > 59 || a > 59 || Number.isNaN(n.getTime())) return;
34
34
  let o = new Date(n.getTime());
35
35
  return o.setHours(r, i, a, 0), o;
36
36
  }
37
- let r = e === "date" ? A.exec(t) : j.exec(t);
37
+ let r = e === "date" ? k.exec(t) : A.exec(t);
38
38
  if (!r) return;
39
39
  let i = Number(r[1]), a = Number(r[2]), o = Number(r[3]), s = Number(r[4] ?? 0), c = Number(r[5] ?? 0), l = Number(r[6] ?? 0), u = Number((r[7] ?? "").padEnd(3, "0")), d = /* @__PURE__ */ new Date(0);
40
40
  if (d.setFullYear(i, a - 1, o), d.setHours(s, c, l, u), !(a < 1 || a > 12 || o < 1 || d.getFullYear() !== i || d.getMonth() !== a - 1 || d.getDate() !== o || d.getHours() !== s || d.getMinutes() !== c || d.getSeconds() !== l || d.getMilliseconds() !== u)) return d;
41
41
  }
42
- function F(e) {
42
+ function P(e) {
43
43
  return String(e).padStart(2, "0");
44
44
  }
45
45
  //#endregion
46
46
  //#region ../dates/src/civil-time.ts
47
- var I = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/;
48
- function L(e) {
47
+ var F = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})(?::(\d{2}))?$/;
48
+ function I(e) {
49
49
  let t = /* @__PURE__ */ new Date(0);
50
50
  return t.setUTCFullYear(e.year, e.month - 1, e.day), t.setUTCHours(e.hour, e.minute, e.second, 0), t.getTime();
51
51
  }
52
- function R(e) {
53
- let t = I.exec(e);
52
+ function L(e) {
53
+ let t = F.exec(e);
54
54
  if (!t) return;
55
55
  let n = {
56
56
  year: Number(t[1]),
@@ -59,7 +59,7 @@ function R(e) {
59
59
  hour: Number(t[4]),
60
60
  minute: Number(t[5]),
61
61
  second: Number(t[6] ?? 0)
62
- }, r = new Date(L(n)), i = {
62
+ }, r = new Date(I(n)), i = {
63
63
  year: r.getUTCFullYear(),
64
64
  month: r.getUTCMonth() + 1,
65
65
  day: r.getUTCDate(),
@@ -71,33 +71,33 @@ function R(e) {
71
71
  }
72
72
  //#endregion
73
73
  //#region ../dates/src/temporal-controls.ts
74
- function z(e) {
74
+ function R(e) {
75
75
  return e.split("T")[0];
76
76
  }
77
- function B(e) {
77
+ function z(e) {
78
78
  return e.includes("T") ? e.split("T")[1] : e;
79
79
  }
80
- function V(e, t, n) {
81
- return n === "datetime" ? `${e}T${t.includes("T") ? B(t) : "00:00"}` : e;
80
+ function B(e, t, n) {
81
+ return n === "datetime" ? `${e}T${t.includes("T") ? z(t) : "00:00"}` : e;
82
82
  }
83
- function H(e, t, n) {
84
- return n === "datetime" ? `${z(e)}T${t}` : t;
83
+ function V(e, t, n) {
84
+ return n === "datetime" ? `${R(e)}T${t}` : t;
85
85
  }
86
- function U(e, t) {
87
- return e === "date" ? y(t) : e === "datetime" ? !!R(t.replace(/(\d{2}:\d{2}:\d{2})\.\d{1,3}$/, "$1")) : !!P(e, t);
86
+ function ee(e, t) {
87
+ return e === "date" ? v(t) : e === "datetime" ? !!L(t.replace(/(\d{2}:\d{2}:\d{2})\.\d{1,3}$/, "$1")) : !!N(e, t);
88
88
  }
89
- function W(e) {
90
- let t = P("time", e);
89
+ function H(e) {
90
+ let t = N("time", e);
91
91
  return t ? t.getHours() * 3600 + t.getMinutes() * 60 + t.getSeconds() : void 0;
92
92
  }
93
- function G(e, t) {
94
- let n = W(e);
93
+ function U(e, t) {
94
+ let n = H(e);
95
95
  if (n === void 0) return !1;
96
- let r = t.min ? W(t.min) : void 0, i = t.max ? W(t.max) : void 0;
96
+ let r = t.min ? H(t.min) : void 0, i = t.max ? H(t.max) : void 0;
97
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);
98
98
  }
99
- function K(e, t, n = "minute", r) {
100
- let i = P("time", e);
99
+ function W(e, t, n = "minute", r) {
100
+ let i = N("time", e);
101
101
  return i ? new Intl.DateTimeFormat(r ?? (t === "12h" ? "en-US" : "en-GB"), {
102
102
  hour: "2-digit",
103
103
  minute: "2-digit",
@@ -105,7 +105,7 @@ function K(e, t, n = "minute", r) {
105
105
  hourCycle: t === "12h" ? "h12" : "h23"
106
106
  }).format(i) : e;
107
107
  }
108
- function q(e, t = "minute", n) {
108
+ function G(e, t = "minute", n) {
109
109
  if (e = e.replace(/[\u200e\u200f\u061c]/g, "").trim(), n) {
110
110
  let t = new Intl.NumberFormat(n, { useGrouping: !1 });
111
111
  for (let n = 0; n < 10; n++) e = e.split(t.format(n)).join(String(n));
@@ -126,29 +126,29 @@ function q(e, t = "minute", n) {
126
126
  for (let t of i) t.type === "literal" && t.value.trim() && (e = e.split(t.value).join(":"));
127
127
  e = e.replace(/^\s*(AM|PM)\s*(.*)$/i, "$2 $1");
128
128
  }
129
- let r = P("time", e.trim());
130
- if (r) return N("time", r, t);
129
+ let r = N("time", e.trim());
130
+ if (r) return M("time", r, t);
131
131
  let i = /^(\d{1,2}):(\d{2})(?::(\d{2}))?\s*([ap])\.?m\.?$/i.exec(e.trim());
132
132
  if (!i) return;
133
133
  let a = Number(i[1]);
134
134
  if (a < 1 || a > 12) return;
135
- let o = P("time", `${String(a % 12 + (i[4].toLowerCase() === "p" ? 12 : 0)).padStart(2, "0")}:${i[2]}:${i[3] ?? "00"}`);
136
- return o ? N("time", o, t) : void 0;
135
+ let o = N("time", `${String(a % 12 + (i[4].toLowerCase() === "p" ? 12 : 0)).padStart(2, "0")}:${i[2]}:${i[3] ?? "00"}`);
136
+ return o ? M("time", o, t) : void 0;
137
137
  }
138
138
  //#endregion
139
139
  //#region ../dates/src/time-selection.ts
140
- function J(e) {
141
- let t = e.min ? W(e.min) : void 0, n = e.max ? W(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);
142
142
  if (!Number.isFinite(r) || r <= 0) return [];
143
143
  let i = e.precision === "second" ? 1 : 60, a = [];
144
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);
145
145
  return a;
146
146
  }
147
- function Y(e, t = "minute") {
147
+ function q(e, t = "minute") {
148
148
  let n = (e) => String(e).padStart(2, "0");
149
149
  return `${n(Math.floor(e / 3600))}:${n(Math.floor(e / 60) % 60)}${t === "second" ? `:${n(e % 60)}` : ""}`;
150
150
  }
151
- function ee(e, t) {
151
+ function J(e, t) {
152
152
  return e === "12h" || e === "locale" && !!new Intl.DateTimeFormat(t, { hour: "numeric" }).resolvedOptions().hour12;
153
153
  }
154
154
  function te(e, t) {
@@ -158,7 +158,7 @@ function te(e, t) {
158
158
  }).formatToParts(new Date(2e3, 0, 1, e ? 13 : 1)).find((e) => e.type === "dayPeriod")?.value ?? (e ? "PM" : "AM");
159
159
  }
160
160
  function ne(e, t, n) {
161
- let r = W(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 = {
162
162
  hour: /* @__PURE__ */ new Map(),
163
163
  minute: /* @__PURE__ */ new Map(),
164
164
  second: /* @__PURE__ */ new Map(),
@@ -184,7 +184,7 @@ function ne(e, t, n) {
184
184
  }
185
185
  //#endregion
186
186
  //#region src/date-time/types.ts
187
- var X = {
187
+ var Y = {
188
188
  date: "Date",
189
189
  dates: "Dates",
190
190
  invalidDate: "Enter a valid date in the indicated format.",
@@ -207,86 +207,86 @@ var X = {
207
207
  chooseDate: "Choose date",
208
208
  chooseTime: "Choose time"
209
209
  };
210
- function Z(e, t) {
211
- return (e === "time" ? t?.chooseTime ?? t?.chooseDate : t?.chooseDate) ?? (e === "time" ? X.chooseTime : X.chooseDate);
210
+ function X(e, t) {
211
+ return (e === "time" ? t?.chooseTime : t?.chooseDate) ?? (e === "time" ? Y.chooseTime : Y.chooseDate);
212
212
  }
213
213
  //#endregion
214
214
  //#region src/date-time/validation.ts
215
215
  function re(e, t, n = "") {
216
216
  let { kind: r = "date", selection: i = "single", value: a, calendar: o = {} } = e, s = {
217
- ...X,
217
+ ...Y,
218
218
  ...e.text
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) => y(e) && (!o.minDate || e >= o.minDate) && (!o.maxDate || e <= o.maxDate) && !o.isDateDisabled?.(e) && !o.isMonthDisabled?.(b(e, o.calendarSystem)), h = (t) => U(r, t) && (r === "time" || m(z(t))) && (r === "date" || G(B(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), {
220
220
  min: e.minTime,
221
221
  max: e.maxTime,
222
222
  step: e.timeStep
223
- })), g = c && d ? S(z(u), z(d)) : 0, _ = i === "multiple" ? p.length : g, v = !p.length && !f || i === "single" || (!o.min || _ >= o.min) && (o.max === void 0 || _ <= o.max), x = (() => {
223
+ })), g = c && d ? x(R(u), R(d)) : 0, _ = i === "multiple" ? p.length : g, b = !p.length && !f || i === "single" || (!o.min || _ >= o.min) && (o.max === void 0 || _ <= o.max), C = (() => {
224
224
  if (r === "time" || !c?.to || !o.excludeDisabled || !p.every(h)) return !0;
225
225
  if (g > 366e3) return !1;
226
- for (let e = z(u); e <= z(d); e = C(e, 1)) if (!m(e)) return !1;
226
+ for (let e = R(u); e <= R(d); e = S(e, 1)) if (!m(e)) return !1;
227
227
  return !0;
228
228
  })(), w = "", T = r === "time" || p.every((e) => {
229
- let n = z(e);
230
- if (!y(n)) return !1;
229
+ let n = R(e);
230
+ if (!v(n)) return !1;
231
231
  let r = o.validateSelection?.(n, {
232
232
  month: o.month ?? t,
233
233
  view: o.defaultView ?? "month",
234
234
  referenceDate: o.referenceDate,
235
235
  selection: c ? {
236
- from: z(u),
237
- to: z(d || u)
236
+ from: R(u),
237
+ to: R(d || u)
238
238
  } : {
239
239
  from: n,
240
240
  to: n
241
241
  }
242
242
  });
243
243
  return typeof r == "string" && (w = r), r !== !1 && typeof r != "string";
244
- }), E = !n && v && T && x && (!f || p.length > 0) && p.every(h) && (i !== "multiple" || new Set(p).size === p.length) && (!c || !!d && u <= d) && (i !== "multiple" || r === "date"), D = (t) => e.text?.[t] ?? e.text?.invalid ?? s[t] ?? s.invalid, O = r === "time" ? [] : p.map(z);
244
+ }), E = !n && b && T && C && (!f || p.length > 0) && p.every(h) && (i !== "multiple" || new Set(p).size === p.length) && (!c || !!d && u <= d) && (i !== "multiple" || r === "date"), D = (t) => e.text?.[t] ?? e.text?.invalid ?? s[t] ?? s.invalid, O = r === "time" ? [] : p.map(R);
245
245
  return {
246
246
  valid: E,
247
- errorMessage: n || w || (!p.length && f ? D("requiredValue") : c && (!u || !d) ? D("invalidRange") : O.some((e) => !y(e)) ? D("invalidDate") : O.some((e) => o.minDate && e < o.minDate || o.maxDate && e > o.maxDate) ? D("outOfRange") : O.some((e) => !m(e)) || !x ? D("disabledDate") : c && (!d || u > d) ? D("invalidRange") : !v || i === "multiple" && new Set(p).size !== p.length ? D("selectionCount") : s.invalid),
247
+ errorMessage: n || w || (!p.length && f ? D("requiredValue") : c && (!u || !d) ? D("invalidRange") : O.some((e) => !v(e)) ? D("invalidDate") : O.some((e) => o.minDate && e < o.minDate || o.maxDate && e > o.maxDate) ? D("outOfRange") : O.some((e) => !m(e)) || !C ? D("disabledDate") : c && (!d || u > d) ? D("invalidRange") : !b || i === "multiple" && new Set(p).size !== p.length ? D("selectionCount") : s.invalid),
248
248
  validDate: m
249
249
  };
250
250
  }
251
251
  //#endregion
252
252
  //#region src/date-time/time-control.tsx
253
- function ie({ value: e, label: t, format: n = "locale", precision: i = "minute", locale: a, min: o, max: c, step: l, onChange: u }) {
254
- let [d, p] = r(!1), [m, h] = r("");
255
- if (n === "locale") return /* @__PURE__ */ s(f, {
253
+ function ie({ value: e, label: t, format: r = "locale", precision: i = "minute", locale: a, min: s, max: c, step: l, onChange: u }) {
254
+ let [f, p] = n(!1), [m, h] = n("");
255
+ if (r === "locale") return /* @__PURE__ */ o(d, {
256
256
  type: "time",
257
257
  "aria-label": t,
258
258
  value: e,
259
- min: o,
259
+ min: s,
260
260
  max: c,
261
261
  step: l ?? (i === "second" ? 1 : 60),
262
262
  onInput: (e) => u(e.currentTarget.value)
263
263
  });
264
- let g = K(e, n, i, a);
265
- return /* @__PURE__ */ s(f, {
264
+ let g = W(e, r, i, a);
265
+ return /* @__PURE__ */ o(d, {
266
266
  type: "text",
267
267
  "aria-label": t,
268
- value: d ? m : g,
269
- "aria-invalid": !!e && !G(e, {
270
- min: o,
268
+ value: f ? m : g,
269
+ "aria-invalid": !!e && !U(e, {
270
+ min: s,
271
271
  max: c,
272
272
  step: l
273
273
  }),
274
- placeholder: n === "12h" ? "09:00 AM" : "09:00",
274
+ placeholder: r === "12h" ? "09:00 AM" : "09:00",
275
275
  onFocus: () => {
276
276
  p(!0), h(g);
277
277
  },
278
278
  onBlur: () => p(!1),
279
279
  onInput: (e) => {
280
280
  let t = e.currentTarget.value;
281
- h(t), u(t ? q(t, i, a) ?? t : "");
281
+ h(t), u(t ? G(t, i, a) ?? t : "");
282
282
  }
283
283
  });
284
284
  }
285
285
  //#endregion
286
286
  //#region src/date-time/time-selection.tsx
287
- function ae({ label: e, accessibleLabel: t, values: n, selected: r, choices: i, display: c, onSelect: l }) {
288
- let u = o(null), d = r !== void 0 && i.has(r), f = d ? r : n.find((e) => i.has(e));
289
- a(() => {
287
+ function ae({ label: e, accessibleLabel: t, values: n, selected: r, choices: s, display: c, onSelect: l }) {
288
+ let u = a(null), d = r !== void 0 && s.has(r), f = d ? r : n.find((e) => s.has(e));
289
+ i(() => {
290
290
  let e = u.current;
291
291
  if (!e) return;
292
292
  let t = () => {
@@ -298,24 +298,24 @@ function ae({ label: e, accessibleLabel: t, values: n, selected: r, choices: i,
298
298
  return n.observe(e), () => n.disconnect();
299
299
  }, [r, f]);
300
300
  let p = (e) => {
301
- let t = i.get(Number(e));
301
+ let t = s.get(Number(e));
302
302
  t !== void 0 && l(t);
303
303
  };
304
- return /* @__PURE__ */ s("div", {
304
+ return /* @__PURE__ */ o("div", {
305
305
  class: "rv-time-selection__column",
306
- children: [/* @__PURE__ */ s("span", {
306
+ children: [e && /* @__PURE__ */ o("span", {
307
307
  class: "rv-time-selection__label",
308
308
  children: e
309
- }), /* @__PURE__ */ s(h, {
309
+ }), /* @__PURE__ */ o(m, {
310
310
  label: t,
311
311
  listRef: u,
312
312
  variant: "plain",
313
313
  className: "rv-time-selection__list",
314
314
  onSelect: p,
315
- children: n.map((e) => /* @__PURE__ */ s(g, {
315
+ children: n.map((e) => /* @__PURE__ */ o(h, {
316
316
  value: String(e),
317
317
  selected: r === e && d,
318
- disabled: !i.has(e),
318
+ disabled: !s.has(e),
319
319
  tabIndex: e === f ? 0 : -1,
320
320
  onClick: () => p(String(e)),
321
321
  children: c(e)
@@ -323,64 +323,64 @@ function ae({ label: e, accessibleLabel: t, values: n, selected: r, choices: i,
323
323
  })]
324
324
  });
325
325
  }
326
- function Q({ value: e, label: n, text: a, onChange: o, format: c = "locale", precision: l = "minute", locale: u, min: f, max: p, step: h, collapsible: g = !1 }) {
327
- let [_, v] = r(!1), y = t(), b = ee(c, u), x = i(() => J({
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
328
  min: f,
329
- max: p,
329
+ max: m,
330
330
  step: h,
331
331
  precision: l
332
332
  }), [
333
333
  f,
334
- p,
334
+ m,
335
335
  h,
336
336
  l
337
- ]), S = i(() => ne(x, e, b), [
337
+ ]), S = r(() => ne(x, e, b), [
338
338
  x,
339
339
  e,
340
340
  b
341
- ]), C = i(() => new Intl.NumberFormat(u, {
341
+ ]), C = r(() => new Intl.NumberFormat(d, {
342
342
  minimumIntegerDigits: 2,
343
343
  useGrouping: !1
344
- }), [u]), w = (e) => o(Y(e, l)), T = (e, t, r, i = (e) => C.format(e)) => /* @__PURE__ */ s(ae, {
345
- label: t,
346
- accessibleLabel: `${n}: ${t}`,
347
- values: r,
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
348
  selected: S.hasValue ? S[e] : void 0,
349
349
  choices: S.columns[e],
350
- display: i,
350
+ display: r,
351
351
  onSelect: w
352
352
  }), E = (e, t = 0) => Array.from({ length: e }, (e, n) => t + n);
353
- return /* @__PURE__ */ s("section", {
353
+ return /* @__PURE__ */ o("section", {
354
354
  class: "rv-time-selection",
355
- children: [/* @__PURE__ */ s("div", {
355
+ children: [/* @__PURE__ */ o("div", {
356
356
  class: "rv-time-selection__entry-row",
357
- children: [/* @__PURE__ */ s("label", {
357
+ children: [/* @__PURE__ */ o("label", {
358
358
  class: "rv-time-selection__entry",
359
- children: [/* @__PURE__ */ s("span", { children: n }), /* @__PURE__ */ s(ie, {
359
+ children: [/* @__PURE__ */ o("span", { children: i }), /* @__PURE__ */ o(ie, {
360
360
  value: e,
361
- label: n,
361
+ label: i,
362
362
  format: c,
363
363
  precision: l,
364
- locale: u,
364
+ locale: d,
365
365
  min: f,
366
- max: p,
366
+ max: m,
367
367
  step: h,
368
- onChange: o
368
+ onChange: s
369
369
  })]
370
- }), g && /* @__PURE__ */ s(m, {
370
+ }), g && /* @__PURE__ */ o(p, {
371
371
  variant: "ghost",
372
372
  className: "rv-time-selection__toggle",
373
373
  "aria-label": a.chooseTime ?? a.time,
374
374
  "aria-expanded": _,
375
375
  "aria-controls": _ ? y : void 0,
376
376
  onClick: () => v(!_),
377
- children: /* @__PURE__ */ s(d, { 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>" })
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
378
  })]
379
- }), (!g || _) && /* @__PURE__ */ s("div", {
379
+ }), (!g || _) && /* @__PURE__ */ o("div", {
380
380
  id: y,
381
381
  class: "rv-time-selection__clock",
382
382
  children: [
383
- /* @__PURE__ */ s("div", {
383
+ /* @__PURE__ */ o("div", {
384
384
  class: `rv-time-selection__columns${l === "second" ? " rv-time-selection__columns--seconds" : ""}`,
385
385
  children: [
386
386
  T("hour", a.hours, E(b ? 12 : 24, b ? S.period * 12 : 0), (e) => C.format(b ? e % 12 || 12 : e)),
@@ -388,11 +388,11 @@ function Q({ value: e, label: n, text: a, onChange: o, format: c = "locale", pre
388
388
  l === "second" && T("second", a.seconds, E(60))
389
389
  ]
390
390
  }),
391
- b && /* @__PURE__ */ s("div", {
391
+ b && /* @__PURE__ */ o("div", {
392
392
  class: "rv-time-selection__period",
393
- children: T("period", a.dayPeriod, [0, 1], (e) => te(e, u))
393
+ children: T("period", a.dayPeriod, [0, 1], (e) => te(e, d))
394
394
  }),
395
- !x.length && /* @__PURE__ */ s("p", {
395
+ !x.length && /* @__PURE__ */ o("p", {
396
396
  class: "rv-time-selection__empty",
397
397
  role: "status",
398
398
  children: a.noTimes
@@ -404,218 +404,218 @@ function Q({ value: e, label: n, text: a, onChange: o, format: c = "locale", pre
404
404
  //#endregion
405
405
  //#region src/date-time/picker.tsx
406
406
  function oe(t) {
407
- let { kind: i = "date", selection: a = "single", value: o, onChange: c, calendar: l = {} } = t, d = (l.numberOfMonths ?? 1) >= 2, f = {
408
- ...X,
407
+ let { kind: r = "date", selection: a = "single", value: s, onChange: c, calendar: u = {} } = t, d = (u.numberOfMonths ?? 1) >= 2, m = {
408
+ ...Y,
409
409
  ...t.text
410
- }, [h] = r(() => u("rv-date-error")), g = (e) => i === "date" ? e : z(e), _ = {
411
- locale: l.locale,
410
+ }, [h] = n(() => l("rv-date-error")), g = (e) => r === "date" ? e : R(e), _ = {
411
+ locale: u.locale,
412
412
  ...typeof t.dateInput == "object" ? t.dateInput : {}
413
- }, [v, S] = r(t.endpoint === "to" ? "to" : void 0), [C, w] = r(""), D = o && !Array.isArray(o) && typeof o == "object" ? o : void 0, O = typeof o == "string" ? o : "", k = Array.isArray(o) ? o : [], A = D?.from ?? "", j = D?.to ?? "", M = z(i === "time" ? x() : t.endpoint === "to" ? j : A || O || k[0] || ""), [N, P] = r(() => l.defaultMonth ?? b(y(M) ? M : x(), l.calendarSystem)), F = t.required ?? l.required ?? !1, { valid: I, errorMessage: L, validDate: R } = re(t, N, C);
414
- n(() => t.onValidityChange?.(!!I), [I]);
415
- let U = (e) => {
416
- w(""), c(e);
417
- }, W = (e) => {
418
- U(e), i === "date" && a !== "multiple" && re({
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({
419
417
  ...t,
420
418
  value: e
421
- }, N).valid && t.onSelectionComplete?.(e);
422
- }, G = (e) => {
423
- if (!R(e)) return;
424
- let t = b(e, l.calendarSystem);
425
- t !== (l.month ?? N) && (P(t), l.onMonthChange?.(t));
426
- }, K = (e, t) => {
419
+ }, N).valid && (t.onValidChange?.(e), n && t.onSelectionComplete?.(e));
420
+ }, U = (e) => {
421
+ H(e, r === "date" && a !== "multiple");
422
+ }, W = (e) => {
423
+ if (!ee(e)) return;
424
+ let t = y(e, u.calendarSystem);
425
+ t !== (u.month ?? N) && (P(t), u.onMonthChange?.(t));
426
+ }, G = (e, t) => {
427
427
  if (typeof t != "string") return;
428
- G(t);
428
+ W(t);
429
429
  let n = {
430
430
  from: A,
431
431
  to: j,
432
- [e]: t ? V(t, e === "from" ? A : j, i) : ""
432
+ [e]: t ? B(t, e === "from" ? A : j, r) : ""
433
433
  };
434
- U(!n.from && !n.to ? null : n);
435
- }, q = (e, n, r, i = !0) => /* @__PURE__ */ s("label", {
434
+ H(!n.from && !n.to ? null : n);
435
+ }, K = (e, n, r, i = !0) => /* @__PURE__ */ o("label", {
436
436
  class: `rv-temporal-picker__time${i ? "" : " rv-temporal-picker__time--single"}`,
437
- children: [i && /* @__PURE__ */ s("span", { children: n }), /* @__PURE__ */ s(ie, {
437
+ children: [i && /* @__PURE__ */ o("span", { children: n }), /* @__PURE__ */ o(ie, {
438
438
  label: n,
439
- value: e ? B(e) : "",
439
+ value: e ? z(e) : "",
440
440
  min: t.minTime,
441
441
  max: t.maxTime,
442
442
  step: t.timeStep,
443
443
  precision: t.precision,
444
444
  format: t.timeFormat,
445
- locale: l.locale,
445
+ locale: u.locale,
446
446
  onChange: r
447
447
  })]
448
- }), J = {
449
- ...l,
450
- month: l.month ?? N,
448
+ }), q = {
449
+ ...u,
450
+ month: u.month ?? N,
451
451
  onMonthChange: (e) => {
452
- P(e), l.onMonthChange?.(e);
452
+ P(e), u.onMonthChange?.(e);
453
453
  },
454
454
  required: F,
455
455
  onInvalidSelection: (e, t) => {
456
- w(e || f.invalid), l.onInvalidSelection?.(e, t);
456
+ E(e || m.invalid), u.onInvalidSelection?.(e, t);
457
457
  }
458
- }, Y;
459
- if (a === "multiple") Y = {
460
- ...J,
458
+ }, J;
459
+ if (a === "multiple") J = {
460
+ ...q,
461
461
  mode: "multiple",
462
- selected: k.filter(y),
463
- onSelectionChange: (e) => W([...e])
462
+ selected: k.filter(v),
463
+ onSelectionChange: (e) => U([...e])
464
464
  };
465
- else if (a === "range" && !v) Y = {
466
- ...J,
465
+ else if (a === "range" && !x) J = {
466
+ ...q,
467
467
  mode: "range",
468
- selected: A && y(z(A)) ? {
469
- from: z(A),
470
- ...j && y(z(j)) ? { to: z(j) } : {}
468
+ selected: A && v(R(A)) ? {
469
+ from: R(A),
470
+ ...j && v(R(j)) ? { to: R(j) } : {}
471
471
  } : void 0,
472
- onSelectionChange: (e) => W(e ? {
473
- from: V(e.from, A, i),
474
- ...e.to ? { to: V(e.to, j, i) } : {}
472
+ onSelectionChange: (e) => U(e ? {
473
+ from: B(e.from, A, r),
474
+ ...e.to ? { to: B(e.to, j, r) } : {}
475
475
  } : null)
476
476
  };
477
477
  else {
478
- let e = a === "range" ? v === "to" ? j : A : O;
479
- Y = {
480
- ...J,
478
+ let e = a === "range" ? x === "to" ? j : A : O;
479
+ J = {
480
+ ...q,
481
481
  mode: "single",
482
- selected: e && y(z(e)) ? z(e) : void 0,
482
+ selected: e && v(R(e)) ? R(e) : void 0,
483
483
  onSelectionChange: (t) => {
484
- W(a === "range" ? t ? {
484
+ U(a === "range" ? t ? {
485
485
  from: A,
486
486
  to: j,
487
- [v ?? "from"]: V(t, e, i)
488
- } : null : t ? V(t, O, i) : null);
487
+ [x ?? "from"]: B(t, e, r)
488
+ } : null : t ? B(t, O, r) : null);
489
489
  }
490
490
  };
491
491
  }
492
- return /* @__PURE__ */ s("div", {
493
- class: `rv-temporal-picker rv-temporal-picker--${i}${d ? " rv-temporal-picker--multi-month" : ""}`,
492
+ return /* @__PURE__ */ o("div", {
493
+ class: `rv-temporal-picker rv-temporal-picker--${r}${d ? " rv-temporal-picker--multi-month" : ""}`,
494
494
  children: [
495
- t.dateInput === !1 && a === "range" && i !== "time" && /* @__PURE__ */ s("div", {
495
+ t.dateInput === !1 && a === "range" && r !== "time" && /* @__PURE__ */ o("div", {
496
496
  class: `rv-temporal-picker__endpoints ${t.classNames?.endpoints ?? ""}`,
497
- children: [/* @__PURE__ */ s(m, {
498
- "aria-label": `${f.startDate}: ${A}`,
499
- "aria-pressed": v !== "to",
497
+ children: [/* @__PURE__ */ o(p, {
498
+ "aria-label": `${m.startDate}: ${A}`,
499
+ "aria-pressed": x !== "to",
500
500
  onClick: () => {
501
- S(void 0), A && P(b(z(A), l.calendarSystem)), w("");
501
+ S(void 0), A && P(y(R(A), u.calendarSystem)), E("");
502
502
  },
503
- children: A ? z(A) : "—"
504
- }), /* @__PURE__ */ s(m, {
505
- "aria-label": `${f.endDate}: ${j}`,
506
- "aria-pressed": v === "to",
503
+ children: A ? R(A) : "—"
504
+ }), /* @__PURE__ */ o(p, {
505
+ "aria-label": `${m.endDate}: ${j}`,
506
+ "aria-pressed": x === "to",
507
507
  onClick: () => {
508
- S("to"), j && P(b(z(j), l.calendarSystem)), w("");
508
+ S("to"), j && P(y(R(j), u.calendarSystem)), E("");
509
509
  },
510
- children: j ? z(j) : "—"
510
+ children: j ? R(j) : "—"
511
511
  })]
512
512
  }),
513
- /* @__PURE__ */ s("div", {
513
+ /* @__PURE__ */ o("div", {
514
514
  class: "rv-temporal-picker__header",
515
- children: i !== "time" && t.dateInput !== !1 && /* @__PURE__ */ s("div", {
515
+ children: r !== "time" && t.dateInput !== !1 && /* @__PURE__ */ o("div", {
516
516
  class: `rv-temporal-picker__dates ${a === "range" ? `rv-temporal-picker__endpoints ${t.classNames?.endpoints ?? ""}` : ""}`,
517
- children: a === "range" ? /* @__PURE__ */ s(e, { children: [/* @__PURE__ */ s("div", {
517
+ children: a === "range" ? /* @__PURE__ */ o(e, { children: [/* @__PURE__ */ o("div", {
518
518
  class: "rv-temporal-picker__endpoint",
519
519
  role: "group",
520
- "aria-label": f.startDate,
521
- children: [/* @__PURE__ */ s(T, {
522
- label: f.startDate,
520
+ "aria-label": m.startDate,
521
+ children: [/* @__PURE__ */ o(w, {
522
+ label: m.startDate,
523
523
  value: g(A),
524
524
  options: _,
525
525
  invalid: !I,
526
526
  errorId: h,
527
527
  onFocus: () => S(void 0),
528
- onChange: (e) => K("from", e)
529
- }), i === "datetime" && q(A, f.startTime, (e) => U({
530
- from: H(A, e, i),
528
+ onChange: (e) => G("from", e)
529
+ }), r === "datetime" && K(A, m.startTime, (e) => H({
530
+ from: V(A, e, r),
531
531
  ...j ? { to: j } : {}
532
532
  }), !1)]
533
- }), /* @__PURE__ */ s("div", {
533
+ }), /* @__PURE__ */ o("div", {
534
534
  class: "rv-temporal-picker__endpoint",
535
535
  role: "group",
536
- "aria-label": f.endDate,
537
- children: [/* @__PURE__ */ s(T, {
538
- label: f.endDate,
536
+ "aria-label": m.endDate,
537
+ children: [/* @__PURE__ */ o(w, {
538
+ label: m.endDate,
539
539
  value: g(j),
540
540
  options: _,
541
541
  invalid: !I,
542
542
  errorId: h,
543
543
  onFocus: () => S("to"),
544
- onChange: (e) => K("to", e)
545
- }), i === "datetime" && q(j, f.endTime, (e) => U({
544
+ onChange: (e) => G("to", e)
545
+ }), r === "datetime" && K(j, m.endTime, (e) => H({
546
546
  from: A,
547
- to: H(j, e, i)
547
+ to: V(j, e, r)
548
548
  }), !1)]
549
- })] }) : /* @__PURE__ */ s(T, {
550
- label: a === "multiple" ? f.dates : f.date,
549
+ })] }) : /* @__PURE__ */ o(w, {
550
+ label: a === "multiple" ? m.dates : m.date,
551
551
  value: a === "multiple" ? k : g(O),
552
552
  multiple: a === "multiple",
553
553
  options: _,
554
554
  invalid: !I,
555
555
  errorId: h,
556
556
  onChange: (e) => {
557
- typeof e == "string" && G(e), U(Array.isArray(e) ? e : e ? V(e, O, i) : null);
557
+ typeof e == "string" && W(e), H(Array.isArray(e) ? e : e ? B(e, O, r) : null);
558
558
  }
559
559
  })
560
560
  })
561
561
  }),
562
- /* @__PURE__ */ s("div", {
562
+ /* @__PURE__ */ o("div", {
563
563
  class: "rv-temporal-picker__body",
564
- children: [i !== "time" && /* @__PURE__ */ s(E, { ...Y }), i !== "date" && a !== "range" && /* @__PURE__ */ s(Q, {
565
- collapsible: i === "datetime" && d,
566
- value: B(O),
567
- label: f.time,
568
- text: f,
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
569
  format: t.timeFormat,
570
570
  precision: t.precision,
571
- locale: l.locale,
571
+ locale: u.locale,
572
572
  min: t.minTime,
573
573
  max: t.maxTime,
574
574
  step: t.timeStep,
575
- onChange: (e) => U(H(O, e, i))
575
+ onChange: (e) => H(V(O, e, r))
576
576
  })]
577
577
  }),
578
- i !== "date" && a === "range" && (i === "time" || t.dateInput === !1) && /* @__PURE__ */ s("div", {
578
+ r !== "date" && a === "range" && (r === "time" || t.dateInput === !1) && /* @__PURE__ */ o("div", {
579
579
  class: "rv-temporal-picker__times",
580
- children: [i === "time" ? /* @__PURE__ */ s(Q, {
581
- value: B(A),
582
- label: f.startTime,
583
- text: f,
580
+ children: [r === "time" ? /* @__PURE__ */ o(Z, {
581
+ value: z(A),
582
+ label: m.startTime,
583
+ text: m,
584
584
  format: t.timeFormat,
585
585
  precision: t.precision,
586
- locale: l.locale,
586
+ locale: u.locale,
587
587
  min: t.minTime,
588
588
  max: t.maxTime,
589
589
  step: t.timeStep,
590
- onChange: (e) => U({
590
+ onChange: (e) => H({
591
591
  from: e,
592
592
  ...j ? { to: j } : {}
593
593
  })
594
- }) : q(A, f.startTime, (e) => U({
595
- from: H(A, e, i),
594
+ }) : K(A, m.startTime, (e) => H({
595
+ from: V(A, e, r),
596
596
  ...j ? { to: j } : {}
597
- })), i === "time" ? /* @__PURE__ */ s(Q, {
598
- value: B(j),
599
- label: f.endTime,
600
- text: f,
597
+ })), r === "time" ? /* @__PURE__ */ o(Z, {
598
+ value: z(j),
599
+ label: m.endTime,
600
+ text: m,
601
601
  format: t.timeFormat,
602
602
  precision: t.precision,
603
- locale: l.locale,
603
+ locale: u.locale,
604
604
  min: t.minTime,
605
605
  max: t.maxTime,
606
606
  step: t.timeStep,
607
- onChange: (e) => U({
607
+ onChange: (e) => H({
608
608
  from: A,
609
609
  to: e
610
610
  })
611
- }) : q(j, f.endTime, (e) => U({
611
+ }) : K(j, m.endTime, (e) => H({
612
612
  from: A,
613
- to: H(j, e, i)
613
+ to: V(j, e, r)
614
614
  }))]
615
615
  }),
616
- !I && /* @__PURE__ */ s(p, {
616
+ !I && /* @__PURE__ */ o(f, {
617
617
  tone: "danger",
618
- children: /* @__PURE__ */ s("span", {
618
+ children: /* @__PURE__ */ o("span", {
619
619
  id: h,
620
620
  children: L
621
621
  })
@@ -625,111 +625,130 @@ function oe(t) {
625
625
  }
626
626
  //#endregion
627
627
  //#region src/date-time/field.tsx
628
- function $({ value: e, options: t, apply: n, cancel: i, clearable: a = !0 }) {
629
- let [o, c] = r(e), [l, u] = r(!1), [d, f] = r(""), m = (e) => {
630
- c(e), f("");
631
- }, h = t.autoApply !== !1, g = JSON.stringify(o) !== JSON.stringify(e), _ = (e) => {
632
- let t = n(e) || "";
633
- return f(t), !t;
634
- }, v = () => l ? _(o) : !1;
635
- return O(() => !g || v(), h), /* @__PURE__ */ s("div", {
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) => {
632
+ let t = r(e) || "";
633
+ return m(t), !t;
634
+ }, y = () => u ? v(c) : !1;
635
+ return D(() => !_ || y(), g), /* @__PURE__ */ o("div", {
636
636
  class: `rv-temporal-draft${t.kind === "time" ? " rv-temporal-draft--time" : ""}`,
637
637
  onKeyDown: (e) => {
638
- 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());
639
639
  },
640
640
  children: [
641
- /* @__PURE__ */ s(oe, {
641
+ /* @__PURE__ */ o(oe, {
642
642
  ...t,
643
- value: o,
644
- onChange: m,
645
- onValidityChange: u,
646
- onSelectionComplete: h ? _ : void 0
643
+ value: c,
644
+ onChange: h,
645
+ onValidChange: a,
646
+ onValidityChange: d,
647
+ onSelectionComplete: g ? v : void 0
647
648
  }),
648
- d && /* @__PURE__ */ s(p, {
649
+ p && /* @__PURE__ */ o(f, {
649
650
  tone: "danger",
650
- children: d
651
+ children: p
651
652
  }),
652
- /* @__PURE__ */ s(k, {
653
+ /* @__PURE__ */ o(O, {
653
654
  text: t.actions,
654
- showConfirm: t.showActions ?? !h,
655
- disabled: !l,
656
- apply: v,
655
+ showConfirm: t.showActions ?? !g,
656
+ disabled: !u,
657
+ apply: y,
657
658
  cancel: i,
658
- clear: !a || (t.required ?? t.calendar?.required) ? void 0 : () => {
659
+ clear: !s || (t.required ?? t.calendar?.required) ? void 0 : () => {
659
660
  let e = t.selection === "multiple" ? [] : null;
660
- m(e), h && _(e);
661
+ h(e), g && v(e);
661
662
  }
662
663
  })
663
664
  ]
664
665
  });
665
666
  }
666
- function se({ value: e, kind: t = "date", picker: n, onValueChange: r, onInput: i, formatValue: c, parseValue: l, ...u }) {
667
- let p = o(null), h = o(), g = o({
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({
668
669
  value: e,
669
670
  kind: t,
670
671
  picker: n,
671
- onValueChange: r,
672
- input: u
672
+ onValueChange: s,
673
+ input: m
673
674
  });
674
- return g.current = {
675
+ return v.current = {
675
676
  value: e,
676
677
  kind: t,
677
678
  picker: n,
678
- onValueChange: r,
679
- input: u
680
- }, a(() => () => h.current?.close(), []), a(() => {
681
- (u.disabled || u.readOnly) && h.current?.close();
682
- }, [u.disabled, u.readOnly]), /* @__PURE__ */ s("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", {
683
684
  class: "rv-date-time-field",
684
- children: [/* @__PURE__ */ s(f, {
685
- ...u,
685
+ children: [/* @__PURE__ */ o(d, {
686
+ ...m,
686
687
  type: "text",
687
- value: c?.(e) ?? e,
688
- placeholder: u.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"),
689
690
  onInput: (e) => {
690
- i?.(e);
691
- let t = l ? l(e.currentTarget.value) : e.currentTarget.value;
692
- 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);
693
694
  }
694
- }), /* @__PURE__ */ s(m, {
695
- ref: p,
695
+ }), /* @__PURE__ */ o(p, {
696
+ ref: h,
696
697
  variant: "ghost",
697
- "aria-label": Z(t, n?.text),
698
- disabled: u.disabled || u.readOnly,
698
+ "aria-label": X(t, n?.text),
699
+ disabled: m.disabled || m.readOnly,
699
700
  onClick: () => {
700
- p.current && !h.current && (h.current = D(p.current, (r) => /* @__PURE__ */ s($, {
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, {
701
711
  value: e || null,
702
712
  options: {
703
713
  ...n,
704
- required: n?.required ?? u.required,
714
+ calendar: {
715
+ fixedWeeks: !0,
716
+ ...n?.calendar
717
+ },
718
+ required: n?.required ?? m.required,
705
719
  kind: t,
706
720
  selection: "single"
707
721
  },
708
- cancel: r,
722
+ cancel: i,
723
+ onValidChange: r && n?.autoApply !== !1 ? a : void 0,
709
724
  apply: (e) => {
710
- !g.current.input.disabled && !g.current.input.readOnly && g.current.onValueChange?.(typeof e == "string" ? e : ""), r();
725
+ a(e), i();
711
726
  }
712
727
  }), {
713
- label: Z(t, n?.text),
728
+ label: X(t, n?.text),
729
+ fitViewport: t === "datetime",
714
730
  className: t === "time" ? "rv-editor-popup--time" : t === "datetime" ? "rv-editor-popup--datetime" : void 0,
715
731
  onClose: () => {
716
- h.current = void 0;
732
+ _.current = void 0;
717
733
  }
718
- }));
734
+ });
719
735
  },
720
- children: /* @__PURE__ */ s(d, { svg: t === "time" ? _ : w })
736
+ children: /* @__PURE__ */ o(u, { svg: t === "time" ? g : C })
721
737
  })]
722
738
  });
723
739
  }
724
740
  //#endregion
725
741
  //#region src/date-time/attach.tsx
742
+ var $ = /* @__PURE__ */ new WeakMap();
726
743
  function ce(e, t, n) {
727
- let r, i = c(e.ownerDocument, /* @__PURE__ */ s(m, {
744
+ $.get(e)?.();
745
+ let r, i = s(e.ownerDocument, /* @__PURE__ */ o(p, {
746
+ className: "rv-temporal-picker-trigger",
728
747
  variant: "ghost",
729
748
  disabled: e.disabled || e.readOnly,
730
- "aria-label": Z(t.kind ?? "date", t.text),
749
+ "aria-label": X(t.kind ?? "date", t.text),
731
750
  onClick: () => {
732
- e.disabled || e.readOnly || r || (r = D(e, (r) => /* @__PURE__ */ s($, {
751
+ e.disabled || e.readOnly || (r ? r.close() : r = E(e, (r) => /* @__PURE__ */ o(Q, {
733
752
  value: e.value || null,
734
753
  options: {
735
754
  ...t,
@@ -741,25 +760,29 @@ function ce(e, t, n) {
741
760
  !e.disabled && !e.readOnly && n(typeof t == "string" ? t : ""), r();
742
761
  }
743
762
  }), {
763
+ fitViewport: t.kind === "datetime",
744
764
  className: t.kind === "time" ? "rv-editor-popup--time" : t.kind === "datetime" ? "rv-editor-popup--datetime" : void 0,
745
- label: Z(t.kind ?? "date", t.text),
765
+ label: X(t.kind ?? "date", t.text),
766
+ trigger: i,
746
767
  onClose: () => {
747
768
  r = void 0;
748
769
  }
749
770
  }));
750
771
  },
751
- children: /* @__PURE__ */ s(d, { svg: t.kind === "time" ? _ : w })
772
+ children: /* @__PURE__ */ o(u, { svg: t.kind === "time" ? g : C })
752
773
  }));
753
774
  e.after(i);
754
- let a = e.ownerDocument.defaultView?.MutationObserver, o = a ? new a(() => {
775
+ let a = e.ownerDocument.defaultView?.MutationObserver, l = a ? new a(() => {
755
776
  i.disabled = e.disabled || e.readOnly, i.disabled && r?.close();
756
777
  }) : void 0;
757
- return o?.observe(e, {
778
+ l?.observe(e, {
758
779
  attributes: !0,
759
780
  attributeFilter: ["disabled", "readonly"]
760
- }), () => {
761
- o?.disconnect(), r?.close(), l(i), i.remove();
781
+ });
782
+ let d = () => {
783
+ $.get(e) === d && ($.delete(e), l?.disconnect(), r?.close(), c(i), i.remove());
762
784
  };
785
+ return $.set(e, d), d;
763
786
  }
764
787
  //#endregion
765
788
  //#region src/date-time/value.tsx
@@ -781,4 +804,4 @@ function le(e, t) {
781
804
  }, `+${i}`) : null]);
782
805
  }
783
806
  //#endregion
784
- export { oe as a, $ as i, ce as n, X as o, se as r, Z as s, le 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 };