@rpcbase/ui 0.161.0 → 0.162.0

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 (363) hide show
  1. package/dist/components/DayPickerField/index.d.ts.map +1 -1
  2. package/dist/index10.js +1 -1
  3. package/dist/index11.js +97 -89
  4. package/dist/index11.js.map +1 -1
  5. package/dist/index112.js +36 -36
  6. package/dist/index113.js +1 -1
  7. package/dist/index12.js +1 -1
  8. package/dist/index124.js +6 -6
  9. package/dist/index127.js +10 -10
  10. package/dist/index129.js +2 -2
  11. package/dist/index13.js +2 -2
  12. package/dist/index130.js +3 -3
  13. package/dist/index131.js +1 -1
  14. package/dist/index133.js +2 -2
  15. package/dist/index135.js +1 -1
  16. package/dist/index14.js +4 -4
  17. package/dist/index15.js +1 -1
  18. package/dist/index158.js +2 -2
  19. package/dist/index159.js +2 -2
  20. package/dist/index16.js +1 -1
  21. package/dist/index160.js +2 -2
  22. package/dist/index161.js +3 -3
  23. package/dist/index163.js +1 -1
  24. package/dist/index164.js +5 -5
  25. package/dist/index165.js +2 -2
  26. package/dist/index166.js +1 -1
  27. package/dist/index167.js +1 -1
  28. package/dist/index169.js +1 -1
  29. package/dist/index17.js +1 -1
  30. package/dist/index170.js +1 -1
  31. package/dist/index176.js +1 -1
  32. package/dist/index177.js +599 -40
  33. package/dist/index177.js.map +1 -1
  34. package/dist/index178.js +41 -200
  35. package/dist/index178.js.map +1 -1
  36. package/dist/index179.js +204 -20
  37. package/dist/index179.js.map +1 -1
  38. package/dist/index18.js +236 -236
  39. package/dist/index18.js.map +1 -1
  40. package/dist/index180.js +22 -25
  41. package/dist/index180.js.map +1 -1
  42. package/dist/index181.js +23 -398
  43. package/dist/index181.js.map +1 -1
  44. package/dist/index182.js +383 -589
  45. package/dist/index182.js.map +1 -1
  46. package/dist/index184.js +4 -4
  47. package/dist/index189.js +1 -1
  48. package/dist/index19.js +7 -7
  49. package/dist/index190.js +1 -1
  50. package/dist/index197.js +1 -1
  51. package/dist/index198.js +6 -6
  52. package/dist/index20.js +2 -2
  53. package/dist/index200.js +4 -4
  54. package/dist/index202.js +1 -1
  55. package/dist/index205.js +1 -1
  56. package/dist/index206.js +1 -1
  57. package/dist/index21.js +1 -1
  58. package/dist/index211.js +3 -16
  59. package/dist/index211.js.map +1 -1
  60. package/dist/index212.js +57 -4
  61. package/dist/index212.js.map +1 -1
  62. package/dist/index213.js +8 -5
  63. package/dist/index213.js.map +1 -1
  64. package/dist/index214.js +55 -47
  65. package/dist/index214.js.map +1 -1
  66. package/dist/index215.js +17 -64
  67. package/dist/index215.js.map +1 -1
  68. package/dist/index216.js +16 -6
  69. package/dist/index216.js.map +1 -1
  70. package/dist/index217.js +5 -4
  71. package/dist/index217.js.map +1 -1
  72. package/dist/index218.js +5 -7
  73. package/dist/index218.js.map +1 -1
  74. package/dist/index219.js +6 -17
  75. package/dist/index219.js.map +1 -1
  76. package/dist/index22.js +1 -1
  77. package/dist/index220.js +4 -5
  78. package/dist/index220.js.map +1 -1
  79. package/dist/index221.js +7 -5
  80. package/dist/index221.js.map +1 -1
  81. package/dist/index222.js +17 -13
  82. package/dist/index222.js.map +1 -1
  83. package/dist/index223.js +5 -10
  84. package/dist/index223.js.map +1 -1
  85. package/dist/index224.js +5 -14
  86. package/dist/index224.js.map +1 -1
  87. package/dist/index225.js +13 -14
  88. package/dist/index225.js.map +1 -1
  89. package/dist/index226.js +10 -5
  90. package/dist/index226.js.map +1 -1
  91. package/dist/index227.js +14 -6
  92. package/dist/index227.js.map +1 -1
  93. package/dist/index228.js +14 -7
  94. package/dist/index228.js.map +1 -1
  95. package/dist/index229.js +5 -6
  96. package/dist/index229.js.map +1 -1
  97. package/dist/index23.js +1 -1
  98. package/dist/index230.js +6 -9
  99. package/dist/index230.js.map +1 -1
  100. package/dist/index231.js +7 -5
  101. package/dist/index231.js.map +1 -1
  102. package/dist/index232.js +6 -5
  103. package/dist/index232.js.map +1 -1
  104. package/dist/index233.js +8 -8
  105. package/dist/index233.js.map +1 -1
  106. package/dist/index234.js +5 -5
  107. package/dist/index234.js.map +1 -1
  108. package/dist/index235.js +5 -5
  109. package/dist/index235.js.map +1 -1
  110. package/dist/index236.js +9 -4
  111. package/dist/index236.js.map +1 -1
  112. package/dist/index237.js +5 -11
  113. package/dist/index237.js.map +1 -1
  114. package/dist/index238.js +5 -10
  115. package/dist/index238.js.map +1 -1
  116. package/dist/index239.js +4 -10
  117. package/dist/index239.js.map +1 -1
  118. package/dist/index24.js +1 -1
  119. package/dist/index240.js +11 -11
  120. package/dist/index240.js.map +1 -1
  121. package/dist/index241.js +10 -11
  122. package/dist/index241.js.map +1 -1
  123. package/dist/index242.js +10 -10
  124. package/dist/index242.js.map +1 -1
  125. package/dist/index243.js +11 -7
  126. package/dist/index243.js.map +1 -1
  127. package/dist/index244.js +11 -6
  128. package/dist/index244.js.map +1 -1
  129. package/dist/index245.js +10 -5
  130. package/dist/index245.js.map +1 -1
  131. package/dist/index246.js +7 -6
  132. package/dist/index246.js.map +1 -1
  133. package/dist/index247.js +6 -7
  134. package/dist/index247.js.map +1 -1
  135. package/dist/index248.js +5 -6
  136. package/dist/index248.js.map +1 -1
  137. package/dist/index249.js +6 -55
  138. package/dist/index249.js.map +1 -1
  139. package/dist/index250.js +7 -8
  140. package/dist/index250.js.map +1 -1
  141. package/dist/index251.js +6 -19
  142. package/dist/index251.js.map +1 -1
  143. package/dist/index252.js +53 -21
  144. package/dist/index252.js.map +1 -1
  145. package/dist/index253.js +22 -15
  146. package/dist/index253.js.map +1 -1
  147. package/dist/index254.js +16 -7
  148. package/dist/index254.js.map +1 -1
  149. package/dist/index255.js +7 -10
  150. package/dist/index255.js.map +1 -1
  151. package/dist/index256.js +9 -9
  152. package/dist/index256.js.map +1 -1
  153. package/dist/index257.js +10 -21
  154. package/dist/index257.js.map +1 -1
  155. package/dist/index258.js +21 -10
  156. package/dist/index258.js.map +1 -1
  157. package/dist/index259.js +10 -9
  158. package/dist/index259.js.map +1 -1
  159. package/dist/index260.js +6 -6
  160. package/dist/index260.js.map +1 -1
  161. package/dist/index261.js +9 -4
  162. package/dist/index261.js.map +1 -1
  163. package/dist/index262.js +4 -5
  164. package/dist/index262.js.map +1 -1
  165. package/dist/index263.js +5 -16
  166. package/dist/index263.js.map +1 -1
  167. package/dist/index264.js +16 -9
  168. package/dist/index264.js.map +1 -1
  169. package/dist/index265.js +9 -18
  170. package/dist/index265.js.map +1 -1
  171. package/dist/index266.js +15 -12
  172. package/dist/index266.js.map +1 -1
  173. package/dist/index267.js +12 -9
  174. package/dist/index267.js.map +1 -1
  175. package/dist/index268.js +12 -29
  176. package/dist/index268.js.map +1 -1
  177. package/dist/index269.js +62 -10
  178. package/dist/index269.js.map +1 -1
  179. package/dist/index27.js +3 -37
  180. package/dist/index27.js.map +1 -1
  181. package/dist/index270.js +48 -25
  182. package/dist/index270.js.map +1 -1
  183. package/dist/index271.js +39 -5
  184. package/dist/index271.js.map +1 -1
  185. package/dist/index272.js +98 -62
  186. package/dist/index272.js.map +1 -1
  187. package/dist/index273.js +96 -47
  188. package/dist/index273.js.map +1 -1
  189. package/dist/index274.js +88 -28
  190. package/dist/index274.js.map +1 -1
  191. package/dist/index275.js +29 -100
  192. package/dist/index275.js.map +1 -1
  193. package/dist/index276.js +12 -97
  194. package/dist/index276.js.map +1 -1
  195. package/dist/index277.js +23 -97
  196. package/dist/index277.js.map +1 -1
  197. package/dist/index278.js +5 -3
  198. package/dist/index278.js.map +1 -1
  199. package/dist/index279.js +65 -22
  200. package/dist/index279.js.map +1 -1
  201. package/dist/index28.js +125 -3
  202. package/dist/index28.js.map +1 -1
  203. package/dist/index280.js +179 -27
  204. package/dist/index280.js.map +1 -1
  205. package/dist/index281.js +47 -5
  206. package/dist/index281.js.map +1 -1
  207. package/dist/index282.js +22 -65
  208. package/dist/index282.js.map +1 -1
  209. package/dist/index283.js +27 -179
  210. package/dist/index283.js.map +1 -1
  211. package/dist/index284.js +5 -47
  212. package/dist/index284.js.map +1 -1
  213. package/dist/index285.js +31 -2
  214. package/dist/index285.js.map +1 -1
  215. package/dist/index286.js +10 -2
  216. package/dist/index286.js.map +1 -1
  217. package/dist/index287.js +46 -12
  218. package/dist/index287.js.map +1 -1
  219. package/dist/index288.js +10 -153
  220. package/dist/index288.js.map +1 -1
  221. package/dist/index289.js +42 -28
  222. package/dist/index289.js.map +1 -1
  223. package/dist/index29.js +47 -124
  224. package/dist/index29.js.map +1 -1
  225. package/dist/index290.js +95 -9
  226. package/dist/index290.js.map +1 -1
  227. package/dist/index291.js +82 -43
  228. package/dist/index291.js.map +1 -1
  229. package/dist/index292.js +104 -10
  230. package/dist/index292.js.map +1 -1
  231. package/dist/index293.js +50 -42
  232. package/dist/index293.js.map +1 -1
  233. package/dist/index294.js +12 -94
  234. package/dist/index294.js.map +1 -1
  235. package/dist/index295.js +10 -85
  236. package/dist/index295.js.map +1 -1
  237. package/dist/index296.js +28 -96
  238. package/dist/index296.js.map +1 -1
  239. package/dist/index297.js +8 -52
  240. package/dist/index297.js.map +1 -1
  241. package/dist/index298.js +153 -10
  242. package/dist/index298.js.map +1 -1
  243. package/dist/index299.js +110 -31
  244. package/dist/index299.js.map +1 -1
  245. package/dist/index30.js +219 -47
  246. package/dist/index30.js.map +1 -1
  247. package/dist/index300.js +17 -8
  248. package/dist/index300.js.map +1 -1
  249. package/dist/index301.js +13 -114
  250. package/dist/index301.js.map +1 -1
  251. package/dist/index302.js +3 -17
  252. package/dist/index302.js.map +1 -1
  253. package/dist/index303.js +33 -12
  254. package/dist/index303.js.map +1 -1
  255. package/dist/index304.js +20 -3
  256. package/dist/index304.js.map +1 -1
  257. package/dist/index305.js +9 -36
  258. package/dist/index305.js.map +1 -1
  259. package/dist/index306.js +8 -20
  260. package/dist/index306.js.map +1 -1
  261. package/dist/index307.js +19 -9
  262. package/dist/index307.js.map +1 -1
  263. package/dist/index308.js +28 -8
  264. package/dist/index308.js.map +1 -1
  265. package/dist/index309.js +15 -18
  266. package/dist/index309.js.map +1 -1
  267. package/dist/index31.js +40 -216
  268. package/dist/index31.js.map +1 -1
  269. package/dist/index310.js +2 -29
  270. package/dist/index310.js.map +1 -1
  271. package/dist/index311.js +2 -17
  272. package/dist/index311.js.map +1 -1
  273. package/dist/index318.js +1 -1
  274. package/dist/index319.js +1 -1
  275. package/dist/index32.js +38 -41
  276. package/dist/index32.js.map +1 -1
  277. package/dist/index33.js +24 -36
  278. package/dist/index33.js.map +1 -1
  279. package/dist/index331.js +2 -2
  280. package/dist/index334.js +1 -1
  281. package/dist/index335.js +2 -2
  282. package/dist/index337.js +1 -1
  283. package/dist/index338.js +1 -1
  284. package/dist/index339.js +1 -1
  285. package/dist/index34.js +38 -21
  286. package/dist/index34.js.map +1 -1
  287. package/dist/index340.js +1 -1
  288. package/dist/index341.js +1 -1
  289. package/dist/index342.js +1 -1
  290. package/dist/index345.js +1 -1
  291. package/dist/index35.js +30 -44
  292. package/dist/index35.js.map +1 -1
  293. package/dist/index359.js +11 -21
  294. package/dist/index359.js.map +1 -1
  295. package/dist/index36.js +26 -30
  296. package/dist/index36.js.map +1 -1
  297. package/dist/index360.js +26 -11
  298. package/dist/index360.js.map +1 -1
  299. package/dist/index361.js +4 -27
  300. package/dist/index361.js.map +1 -1
  301. package/dist/index362.js +22 -4
  302. package/dist/index362.js.map +1 -1
  303. package/dist/index37.js +23 -28
  304. package/dist/index37.js.map +1 -1
  305. package/dist/index38.js +123 -17
  306. package/dist/index38.js.map +1 -1
  307. package/dist/index39.js +230 -127
  308. package/dist/index39.js.map +1 -1
  309. package/dist/index40.js +49 -230
  310. package/dist/index40.js.map +1 -1
  311. package/dist/index41.js +2640 -50
  312. package/dist/index41.js.map +1 -1
  313. package/dist/index42.js +351 -2598
  314. package/dist/index42.js.map +1 -1
  315. package/dist/index43.js +214 -375
  316. package/dist/index43.js.map +1 -1
  317. package/dist/index44.js +19 -230
  318. package/dist/index44.js.map +1 -1
  319. package/dist/index45.js +138 -18
  320. package/dist/index45.js.map +1 -1
  321. package/dist/index46.js +170 -125
  322. package/dist/index46.js.map +1 -1
  323. package/dist/index47.js +64 -174
  324. package/dist/index47.js.map +1 -1
  325. package/dist/index48.js +88 -74
  326. package/dist/index48.js.map +1 -1
  327. package/dist/index49.js +5 -90
  328. package/dist/index49.js.map +1 -1
  329. package/dist/index5.js +1 -1
  330. package/dist/index50.js +843 -5
  331. package/dist/index50.js.map +1 -1
  332. package/dist/index51.js +54 -832
  333. package/dist/index51.js.map +1 -1
  334. package/dist/index52.js +37 -66
  335. package/dist/index52.js.map +1 -1
  336. package/dist/index55.js +1 -1
  337. package/dist/index56.js +1 -1
  338. package/dist/index57.js +2 -2
  339. package/dist/index59.js +1 -1
  340. package/dist/index64.js +2 -2
  341. package/dist/index65.js +1 -1
  342. package/dist/index66.js +1 -1
  343. package/dist/index68.js +1 -1
  344. package/dist/index70.js +5 -5
  345. package/dist/index71.js +1 -1
  346. package/dist/index72.js +1 -1
  347. package/dist/index76.js +1 -1
  348. package/dist/index78.js +3 -3
  349. package/dist/index79.js +53 -5
  350. package/dist/index79.js.map +1 -1
  351. package/dist/index8.js +1 -1
  352. package/dist/index80.js +2 -8
  353. package/dist/index80.js.map +1 -1
  354. package/dist/index81.js +2 -6
  355. package/dist/index81.js.map +1 -1
  356. package/dist/index82.js +5 -53
  357. package/dist/index82.js.map +1 -1
  358. package/dist/index83.js +8 -2
  359. package/dist/index83.js.map +1 -1
  360. package/dist/index84.js +6 -2
  361. package/dist/index84.js.map +1 -1
  362. package/dist/index9.js +1 -1
  363. package/package.json +1 -1
package/dist/index18.js CHANGED
@@ -1,8 +1,9 @@
1
- import { j as c } from "./index28.js";
2
- import { Check as ae, ChevronDown as se, ChevronUp as fe } from "lucide-react";
1
+ import { j as c } from "./index27.js";
2
+ import { Check as ae, ChevronDown as oe, ChevronUp as fe } from "lucide-react";
3
3
  import * as n from "react";
4
- import { DismissableLayerBranch as de } from "./index29.js";
4
+ import { DismissableLayerBranch as de } from "./index28.js";
5
5
  import { createPortal as me } from "react-dom";
6
+ import "./index29.js";
6
7
  import "./index30.js";
7
8
  import "./index31.js";
8
9
  import "./index32.js";
@@ -10,10 +11,9 @@ import "./index33.js";
10
11
  import "./index34.js";
11
12
  import "./index35.js";
12
13
  import "./index36.js";
13
- import "./index37.js";
14
- import pe from "./index38.js";
15
- import "./index39.js";
16
- import { Select as he, SelectTrigger as be, SelectValue as ve, SelectContent as ge, SelectItem as xe } from "./index20.js";
14
+ import pe from "./index37.js";
15
+ import "./index38.js";
16
+ import { Select as he, SelectTrigger as be, SelectValue as ge, SelectContent as ve, SelectItem as xe } from "./index20.js";
17
17
  import { useIsTouchDevice as we } from "./index4.js";
18
18
  import { cn as q } from "./index2.js";
19
19
  function U(a) {
@@ -22,53 +22,53 @@ function U(a) {
22
22
  function ke(a) {
23
23
  const u = a.trim();
24
24
  if (!u) return null;
25
- const t = /^(\d{1,2}):(\d{2})$/.exec(u);
26
- if (!t)
25
+ const r = /^(\d{1,2}):(\d{2})$/.exec(u);
26
+ if (!r)
27
27
  return null;
28
- const o = Number(t[1]), s = Number(t[2]);
29
- return !Number.isFinite(o) || !Number.isFinite(s) || o < 0 || o > 23 || s < 0 || s > 59 ? null : `${U(o)}:${U(s)}`;
28
+ const l = Number(r[1]), o = Number(r[2]);
29
+ return !Number.isFinite(l) || !Number.isFinite(o) || l < 0 || l > 23 || o < 0 || o > 59 ? null : `${U(l)}:${U(o)}`;
30
30
  }
31
31
  function Z(a, u) {
32
- const t = ke(a);
33
- if (!t) return null;
34
- const o = u.find((s) => s.value === t);
35
- return B(o) ? { parsed: t, selectableValue: t } : { parsed: t, selectableValue: null };
32
+ const r = ke(a);
33
+ if (!r) return null;
34
+ const l = u.find((o) => o.value === r);
35
+ return B(l) ? { parsed: r, selectableValue: r } : { parsed: r, selectableValue: null };
36
36
  }
37
37
  function ee(a) {
38
38
  const u = /^(\d{2}):(\d{2})$/.exec(a);
39
39
  if (!u)
40
40
  return null;
41
- const t = Number(u[1]), o = Number(u[2]);
42
- return !Number.isFinite(t) || !Number.isFinite(o) ? null : t * 60 + o;
41
+ const r = Number(u[1]), l = Number(u[2]);
42
+ return !Number.isFinite(r) || !Number.isFinite(l) ? null : r * 60 + l;
43
43
  }
44
44
  function B(a) {
45
45
  return a ? !a.disabled : !1;
46
46
  }
47
47
  function re(a, u) {
48
- let t = null, o = Number.POSITIVE_INFINITY, s = Number.NEGATIVE_INFINITY;
48
+ let r = null, l = Number.POSITIVE_INFINITY, o = Number.NEGATIVE_INFINITY;
49
49
  for (const p of u) {
50
50
  if (!B(p)) continue;
51
51
  const N = ee(p.value);
52
52
  if (N == null) continue;
53
53
  const h = Math.abs(N - a);
54
- (h < o || h === o && N > s) && (t = p, o = h, s = N);
54
+ (h < l || h === l && N > o) && (r = p, l = h, o = N);
55
55
  }
56
- return t;
56
+ return r;
57
57
  }
58
58
  function ne({
59
59
  direction: a,
60
60
  viewportRef: u,
61
- speed: t = 400,
62
- className: o
61
+ speed: r = 400,
62
+ className: l
63
63
  }) {
64
- const [s, p] = n.useState(!0), N = n.useRef(void 0), h = n.useRef(void 0), P = n.useRef(!1), m = n.useCallback(() => {
64
+ const [o, p] = n.useState(!0), N = n.useRef(void 0), h = n.useRef(void 0), H = n.useRef(!1), m = n.useCallback(() => {
65
65
  const x = u.current;
66
66
  if (!x) {
67
67
  p(!0);
68
68
  return;
69
69
  }
70
- const { scrollTop: k, scrollHeight: y, clientHeight: d } = x, E = 2, M = k > E, S = k < y - d - E;
71
- if (!(y > d + E)) {
70
+ const { scrollTop: k, scrollHeight: y, clientHeight: d } = x, D = 2, M = k > D, S = k < y - d - D;
71
+ if (!(y > d + D)) {
72
72
  p(!0);
73
73
  return;
74
74
  }
@@ -82,69 +82,69 @@ function ne({
82
82
  x.addEventListener("scroll", k, { passive: !0 });
83
83
  const d = new ResizeObserver(y);
84
84
  d.observe(x);
85
- const E = new MutationObserver(y);
86
- return E.observe(x, { childList: !0, subtree: !0 }), () => {
87
- x.removeEventListener("scroll", k), d.disconnect(), E.disconnect();
85
+ const D = new MutationObserver(y);
86
+ return D.observe(x, { childList: !0, subtree: !0 }), () => {
87
+ x.removeEventListener("scroll", k), d.disconnect(), D.disconnect();
88
88
  };
89
89
  }, [u, m]);
90
- const g = n.useCallback(() => {
91
- N.current && (cancelAnimationFrame(N.current), N.current = void 0), P.current = !1, h.current = void 0;
90
+ const b = n.useCallback(() => {
91
+ N.current && (cancelAnimationFrame(N.current), N.current = void 0), H.current = !1, h.current = void 0;
92
92
  }, []), I = n.useCallback(
93
93
  (x) => {
94
94
  const k = u.current;
95
- if (!k || s || !P.current) {
96
- g();
95
+ if (!k || o || !H.current) {
96
+ b();
97
97
  return;
98
98
  }
99
99
  h.current || (h.current = x);
100
- const y = x - h.current, d = t * y / 1e3;
100
+ const y = x - h.current, d = r * y / 1e3;
101
101
  if (d < 0.1) {
102
102
  N.current = requestAnimationFrame(I);
103
103
  return;
104
104
  }
105
- const E = k.scrollTop, M = k.scrollHeight - k.clientHeight;
105
+ const D = k.scrollTop, M = k.scrollHeight - k.clientHeight;
106
106
  let S;
107
- a === "up" ? S = Math.max(0, E - d) : S = Math.min(M, E + d), k.scrollTop = S, h.current = x;
107
+ a === "up" ? S = Math.max(0, D - d) : S = Math.min(M, D + d), k.scrollTop = S, h.current = x;
108
108
  const C = 1;
109
- (a === "up" ? S > C : S < M - C) && Math.abs(S - E) > 0.01 ? N.current = requestAnimationFrame(I) : (g(), setTimeout(m, 16));
109
+ (a === "up" ? S > C : S < M - C) && Math.abs(S - D) > 0.01 ? N.current = requestAnimationFrame(I) : (b(), setTimeout(m, 16));
110
110
  },
111
- [m, a, s, t, g, u]
111
+ [m, a, o, r, b, u]
112
112
  ), F = n.useCallback(() => {
113
- s || !u.current || P.current || (P.current = !0, h.current = void 0, N.current = requestAnimationFrame(I));
114
- }, [s, I, u]);
115
- return n.useEffect(() => g, [g]), /* @__PURE__ */ c.jsx(
113
+ o || !u.current || H.current || (H.current = !0, h.current = void 0, N.current = requestAnimationFrame(I));
114
+ }, [o, I, u]);
115
+ return n.useEffect(() => b, [b]), /* @__PURE__ */ c.jsx(
116
116
  "div",
117
117
  {
118
118
  className: q(
119
119
  "flex items-center justify-center py-1 select-none",
120
- s ? "cursor-default opacity-40" : "cursor-pointer opacity-100 hover:bg-accent/20",
121
- o
120
+ o ? "cursor-default opacity-40" : "cursor-pointer opacity-100 hover:bg-accent/20",
121
+ l
122
122
  ),
123
123
  onPointerEnter: () => {
124
- s || F();
124
+ o || F();
125
125
  },
126
126
  onPointerMove: () => {
127
- !s && !P.current && F();
127
+ !o && !H.current && F();
128
128
  },
129
129
  onPointerLeave: () => {
130
- g();
130
+ b();
131
131
  },
132
- children: a === "up" ? /* @__PURE__ */ c.jsx(fe, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) : /* @__PURE__ */ c.jsx(se, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" })
132
+ children: a === "up" ? /* @__PURE__ */ c.jsx(fe, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" }) : /* @__PURE__ */ c.jsx(oe, { "aria-hidden": !0, className: "h-4 w-4 opacity-50" })
133
133
  }
134
134
  );
135
135
  }
136
- function ie({
136
+ function se({
137
137
  id: a,
138
138
  value: u,
139
- onChange: t,
140
- onValueUpdate: o,
141
- options: s,
139
+ onChange: r,
140
+ onValueUpdate: l,
141
+ options: o,
142
142
  placeholder: p = "Select time",
143
143
  autoComplete: N,
144
144
  className: h,
145
- inputClassName: P,
145
+ inputClassName: H,
146
146
  disabled: m,
147
- readOnly: g,
147
+ readOnly: b,
148
148
  open: I,
149
149
  onOpenChange: F,
150
150
  autoScroll: x = "firstEnabledWithContext",
@@ -152,113 +152,113 @@ function ie({
152
152
  contentTestId: y,
153
153
  isHydrated: d
154
154
  }) {
155
- const E = n.useId(), M = a ?? `hours-picker-${E}`, S = n.useRef(null), C = n.useRef(null), z = n.useRef(null), L = n.useRef(!1), [O, j] = n.useState(null), J = n.useRef(null), G = n.useRef(null), r = n.useRef(null), [l, b] = n.useState(() => ({
155
+ const D = n.useId(), M = a ?? `hours-picker-${D}`, S = n.useRef(null), C = n.useRef(null), z = n.useRef(null), L = n.useRef(!1), [O, j] = n.useState(null), J = n.useRef(null), Y = n.useRef(null), t = n.useRef(null), [i, g] = n.useState(() => ({
156
156
  left: 0,
157
157
  top: 0,
158
158
  width: 0
159
- })), [w, A] = n.useState(!1), D = I ?? w, Y = F ?? A, oe = typeof window > "u" ? n.useEffect : n.useLayoutEffect, W = n.useCallback((e) => {
159
+ })), [w, A] = n.useState(!1), E = I ?? w, _ = F ?? A, ie = typeof window > "u" ? n.useEffect : n.useLayoutEffect, W = n.useCallback((e) => {
160
160
  z.current = e, j(e);
161
161
  }, []), le = n.useCallback(() => {
162
162
  L.current = !0;
163
163
  }, []);
164
164
  n.useEffect(() => {
165
- if (!D) return;
166
- const e = s.find((f) => f.value === u);
165
+ if (!E) return;
166
+ const e = o.find((f) => f.value === u);
167
167
  if (e && B(e)) {
168
168
  W(e.value);
169
169
  return;
170
170
  }
171
- const i = s.find((f) => B(f));
172
- W(i?.value ?? null);
173
- }, [D, s, W, u]);
171
+ const s = o.find((f) => B(f));
172
+ W(s?.value ?? null);
173
+ }, [E, o, W, u]);
174
174
  const ce = n.useCallback(
175
175
  (e) => {
176
176
  if (e === null) {
177
- if (o) {
178
- o(null);
177
+ if (l) {
178
+ l(null);
179
179
  return;
180
180
  }
181
- t(null);
181
+ r(null);
182
182
  return;
183
183
  }
184
- const i = s.find((f) => f.value === e);
185
- if (B(i)) {
186
- if (o) {
187
- o(e);
184
+ const s = o.find((f) => f.value === e);
185
+ if (B(s)) {
186
+ if (l) {
187
+ l(e);
188
188
  return;
189
189
  }
190
- t(e);
190
+ r(e);
191
191
  }
192
192
  },
193
- [t, o, s]
193
+ [r, l, o]
194
194
  ), te = n.useCallback(
195
195
  (e) => {
196
196
  if (e === null) {
197
- o && o(null), t(null);
197
+ l && l(null), r(null);
198
198
  return;
199
199
  }
200
- const i = s.find((f) => f.value === e);
201
- B(i) && (o && o(e), t(e));
200
+ const s = o.find((f) => f.value === e);
201
+ B(s) && (l && l(e), r(e));
202
202
  },
203
- [t, o, s]
203
+ [r, l, o]
204
204
  );
205
205
  n.useEffect(() => {
206
- if (!D) return;
207
- const e = (i) => {
208
- const f = i.target;
206
+ if (!E) return;
207
+ const e = (s) => {
208
+ const f = s.target;
209
209
  if (!(f instanceof Node))
210
210
  return;
211
211
  const v = J.current;
212
- !v || v.contains(f) || G.current?.contains(f) || Y(!1);
212
+ !v || v.contains(f) || Y.current?.contains(f) || _(!1);
213
213
  };
214
214
  return document.addEventListener("pointerdown", e, !0), () => {
215
215
  document.removeEventListener("pointerdown", e, !0);
216
216
  };
217
- }, [D, Y]), n.useEffect(() => {
218
- if (!D || I !== void 0 && !F || typeof window > "u" || !("IntersectionObserver" in window))
217
+ }, [E, _]), n.useEffect(() => {
218
+ if (!E || I !== void 0 && !F || typeof window > "u" || !("IntersectionObserver" in window))
219
219
  return;
220
220
  const e = S.current;
221
221
  if (!(e instanceof HTMLElement))
222
222
  return;
223
- let i = !0;
223
+ let s = !0;
224
224
  const f = new IntersectionObserver((v) => {
225
- if (!i)
225
+ if (!s)
226
226
  return;
227
227
  const R = v[0];
228
- R && !R.isIntersecting && Y(!1);
228
+ R && !R.isIntersecting && _(!1);
229
229
  });
230
230
  return f.observe(e), () => {
231
- i = !1, f.disconnect();
231
+ s = !1, f.disconnect();
232
232
  };
233
- }, [F, D, I, Y]);
233
+ }, [F, E, I, _]);
234
234
  const $ = n.useCallback(() => {
235
235
  if (typeof window > "u") return;
236
- const e = S.current, i = G.current;
237
- if (!(e instanceof HTMLElement) || !i) return;
238
- const f = e.getBoundingClientRect(), v = i.offsetHeight, R = window.innerWidth ?? 0, V = window.innerHeight ?? 0, T = 8, Q = f.width;
239
- let _ = f.left;
240
- _ + Q > R - T && (_ = Math.max(T, R - Q - T)), _ < T && (_ = T);
241
- let H = f.bottom + T;
242
- const K = H + v > V - T, X = f.top - v - T;
243
- K && X >= T && (H = X), H < T && (H = T), H + v > V - T && (H = Math.max(T, V - v - T)), b({ left: _, top: H, width: Q });
236
+ const e = S.current, s = Y.current;
237
+ if (!(e instanceof HTMLElement) || !s) return;
238
+ const f = e.getBoundingClientRect(), v = s.offsetHeight, R = window.innerWidth ?? 0, V = window.innerHeight ?? 0, T = 8, Q = f.width;
239
+ let K = f.left;
240
+ K + Q > R - T && (K = Math.max(T, R - Q - T)), K < T && (K = T);
241
+ let P = f.bottom + T;
242
+ const G = P + v > V - T, X = f.top - v - T;
243
+ G && X >= T && (P = X), P < T && (P = T), P + v > V - T && (P = Math.max(T, V - v - T)), g({ left: K, top: P, width: Q });
244
244
  }, []);
245
- return oe(() => {
246
- if (!D || m || typeof window > "u") return;
245
+ return ie(() => {
246
+ if (!E || m || typeof window > "u") return;
247
247
  $();
248
248
  const e = window.requestAnimationFrame($);
249
249
  return window.addEventListener("scroll", $, !0), window.addEventListener("resize", $), () => {
250
250
  window.cancelAnimationFrame(e), window.removeEventListener("scroll", $, !0), window.removeEventListener("resize", $);
251
251
  };
252
- }, [m, D, $]), n.useEffect(() => {
253
- if (!D || !x) return;
254
- const e = r.current;
252
+ }, [m, E, $]), n.useEffect(() => {
253
+ if (!E || !x) return;
254
+ const e = t.current;
255
255
  if (!e) return;
256
256
  const f = requestAnimationFrame(() => {
257
257
  const v = e.querySelector('[role="option"][data-state="checked"]');
258
258
  if (v instanceof HTMLElement) {
259
- const K = v.offsetTop - 8, X = v.offsetTop + v.offsetHeight + 8;
260
- if (K < e.scrollTop) {
261
- e.scrollTop = Math.max(0, K);
259
+ const G = v.offsetTop - 8, X = v.offsetTop + v.offsetHeight + 8;
260
+ if (G < e.scrollTop) {
261
+ e.scrollTop = Math.max(0, G);
262
262
  return;
263
263
  }
264
264
  const ue = e.scrollTop + e.clientHeight;
@@ -268,32 +268,32 @@ function ie({
268
268
  const R = Array.from(e.querySelectorAll('[role="option"]'));
269
269
  if (!R.length) return;
270
270
  let V, T;
271
- for (const H of R) {
272
- if (!H.hasAttribute("data-disabled")) {
273
- V = H;
271
+ for (const P of R) {
272
+ if (!P.hasAttribute("data-disabled")) {
273
+ V = P;
274
274
  break;
275
275
  }
276
- T = H;
276
+ T = P;
277
277
  }
278
278
  if (!V) return;
279
- const _ = Math.max(0, (x === "firstEnabledWithContext" && T ? T : V).offsetTop - 8);
280
- e.scrollTop = _;
279
+ const K = Math.max(0, (x === "firstEnabledWithContext" && T ? T : V).offsetTop - 8);
280
+ e.scrollTop = K;
281
281
  });
282
282
  return () => cancelAnimationFrame(f);
283
- }, [x, D, s]), n.useEffect(() => {
284
- if (!D || !O || !L.current) return;
285
- const e = r.current;
283
+ }, [x, E, o]), n.useEffect(() => {
284
+ if (!E || !O || !L.current) return;
285
+ const e = t.current;
286
286
  if (!e) return;
287
- const i = e.querySelector(`[role="option"][data-value="${O}"]`);
288
- if (!(i instanceof HTMLElement)) return;
289
- const f = 8, v = i.offsetTop - f, R = i.offsetTop + i.offsetHeight + f;
287
+ const s = e.querySelector(`[role="option"][data-value="${O}"]`);
288
+ if (!(s instanceof HTMLElement)) return;
289
+ const f = 8, v = s.offsetTop - f, R = s.offsetTop + s.offsetHeight + f;
290
290
  if (v < e.scrollTop) {
291
291
  e.scrollTop = Math.max(0, v);
292
292
  return;
293
293
  }
294
294
  const V = e.scrollTop + e.clientHeight;
295
295
  R > V && (e.scrollTop = Math.max(0, R - e.clientHeight));
296
- }, [O, D]), /* @__PURE__ */ c.jsx(
296
+ }, [O, E]), /* @__PURE__ */ c.jsx(
297
297
  "div",
298
298
  {
299
299
  "data-slot": "hours-picker-input",
@@ -308,13 +308,13 @@ function ie({
308
308
  value: u,
309
309
  onValueUpdate: ce,
310
310
  onCommit: te,
311
- options: s,
311
+ options: o,
312
312
  autoComplete: N,
313
313
  disabled: m,
314
- readOnly: g,
315
- open: D,
316
- setOpen: Y,
317
- inputClassName: P,
314
+ readOnly: b,
315
+ open: E,
316
+ setOpen: _,
317
+ inputClassName: H,
318
318
  triggerTestId: k,
319
319
  isHydrated: d,
320
320
  highlightedValueRef: z,
@@ -326,11 +326,11 @@ function ie({
326
326
  setDraftValueRef: C
327
327
  }
328
328
  ),
329
- D ? (() => {
329
+ E ? (() => {
330
330
  const e = /* @__PURE__ */ c.jsx(de, { children: /* @__PURE__ */ c.jsxs(
331
331
  "div",
332
332
  {
333
- ref: G,
333
+ ref: Y,
334
334
  "data-testid": y,
335
335
  "data-state": "open",
336
336
  className: q(
@@ -338,60 +338,60 @@ function ie({
338
338
  "data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95"
339
339
  ),
340
340
  style: {
341
- left: l.left,
342
- top: l.top,
343
- width: l.width
341
+ left: i.left,
342
+ top: i.top,
343
+ width: i.width
344
344
  },
345
345
  children: [
346
346
  /* @__PURE__ */ c.jsx(
347
347
  ne,
348
348
  {
349
349
  direction: "up",
350
- viewportRef: r
350
+ viewportRef: t
351
351
  }
352
352
  ),
353
353
  /* @__PURE__ */ c.jsx(
354
354
  "div",
355
355
  {
356
- ref: r,
356
+ ref: t,
357
357
  role: "listbox",
358
- className: "max-h-64 overflow-y-auto p-1 [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
359
- children: s.map((i) => {
360
- const f = i.value === u;
358
+ className: "max-h-64 overflow-y-auto p-1 [overscroll-behavior:contain] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden",
359
+ children: o.map((s) => {
360
+ const f = s.value === u;
361
361
  return /* @__PURE__ */ c.jsxs(
362
362
  "div",
363
363
  {
364
364
  role: "option",
365
365
  "aria-selected": f,
366
- "data-value": i.value,
366
+ "data-value": s.value,
367
367
  "data-state": f ? "checked" : "unchecked",
368
- "data-disabled": i.disabled ? "" : void 0,
368
+ "data-disabled": s.disabled ? "" : void 0,
369
369
  className: q(
370
370
  "relative flex w-full select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none cursor-pointer",
371
- i.disabled && "pointer-events-none opacity-50",
372
- O === i.value && "bg-accent text-accent-foreground"
371
+ s.disabled && "pointer-events-none opacity-50",
372
+ O === s.value && "bg-accent text-accent-foreground"
373
373
  ),
374
374
  onMouseDown: (v) => {
375
375
  v.preventDefault();
376
376
  },
377
377
  onClick: () => {
378
- i.disabled || (C.current?.(i.value), W(i.value), S.current?.focus({ preventScroll: !0 }), te(i.value), Y(!1));
378
+ s.disabled || (C.current?.(s.value), W(s.value), S.current?.focus({ preventScroll: !0 }), te(s.value), _(!1));
379
379
  },
380
380
  onPointerEnter: () => {
381
- L.current || (L.current = !1, W(i.value));
381
+ L.current || (L.current = !1, W(s.value));
382
382
  },
383
383
  onPointerMove: (v) => {
384
- L.current && v.movementX === 0 && v.movementY === 0 || (L.current = !1, W(i.value));
384
+ L.current && v.movementX === 0 && v.movementY === 0 || (L.current = !1, W(s.value));
385
385
  },
386
386
  children: [
387
387
  /* @__PURE__ */ c.jsx("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: f ? /* @__PURE__ */ c.jsx(ae, { "aria-hidden": !0, className: "h-4 w-4" }) : null }),
388
388
  /* @__PURE__ */ c.jsxs("div", { className: "flex flex-col", children: [
389
- /* @__PURE__ */ c.jsx("span", { children: i.label }),
390
- i.description != null ? /* @__PURE__ */ c.jsx("span", { "data-slot": "description", className: "text-xs text-muted-foreground", children: i.description }) : null
389
+ /* @__PURE__ */ c.jsx("span", { children: s.label }),
390
+ s.description != null ? /* @__PURE__ */ c.jsx("span", { "data-slot": "description", className: "text-xs text-muted-foreground", children: s.description }) : null
391
391
  ] })
392
392
  ]
393
393
  },
394
- i.value
394
+ s.value
395
395
  );
396
396
  })
397
397
  }
@@ -400,7 +400,7 @@ function ie({
400
400
  ne,
401
401
  {
402
402
  direction: "down",
403
- viewportRef: r
403
+ viewportRef: t
404
404
  }
405
405
  )
406
406
  ]
@@ -412,19 +412,19 @@ function ie({
412
412
  }
413
413
  );
414
414
  }
415
- ie.displayName = "HourPickerInput";
415
+ se.displayName = "HourPickerInput";
416
416
  function ye({
417
417
  id: a,
418
418
  value: u,
419
- onChange: t,
420
- onValueUpdate: o,
421
- options: s,
419
+ onChange: r,
420
+ onValueUpdate: l,
421
+ options: o,
422
422
  placeholder: p = "Select time",
423
423
  className: N,
424
424
  inputClassName: h,
425
- disabled: P,
425
+ disabled: H,
426
426
  open: m,
427
- onOpenChange: g,
427
+ onOpenChange: b,
428
428
  autoScroll: I = "firstEnabledWithContext",
429
429
  triggerTestId: F,
430
430
  contentTestId: x,
@@ -432,17 +432,17 @@ function ye({
432
432
  }) {
433
433
  const y = n.useCallback(
434
434
  (d) => {
435
- const E = s.find((M) => M.value === d);
436
- B(E) && (o && o(d), t(d));
435
+ const D = o.find((M) => M.value === d);
436
+ B(D) && (l && l(d), r(d));
437
437
  },
438
- [t, o, s]
438
+ [r, l, o]
439
439
  );
440
440
  return /* @__PURE__ */ c.jsx("div", { "data-slot": "hours-picker-field", className: q("w-[150px]", N), children: /* @__PURE__ */ c.jsxs(
441
441
  he,
442
442
  {
443
- disabled: P,
443
+ disabled: H,
444
444
  open: m,
445
- onOpenChange: g,
445
+ onOpenChange: b,
446
446
  value: u ?? "",
447
447
  onValueChange: (d) => y(d),
448
448
  children: [
@@ -459,16 +459,16 @@ function ye({
459
459
  "[&_[data-slot='description']]:hidden",
460
460
  h
461
461
  ),
462
- children: /* @__PURE__ */ c.jsx(ve, { placeholder: p })
462
+ children: /* @__PURE__ */ c.jsx(ge, { placeholder: p })
463
463
  }
464
464
  ),
465
465
  /* @__PURE__ */ c.jsx(
466
- ge,
466
+ ve,
467
467
  {
468
468
  "data-testid": x,
469
469
  autoScroll: I,
470
470
  className: "max-h-64 overflow-y-auto",
471
- children: s.map((d) => /* @__PURE__ */ c.jsxs(
471
+ children: o.map((d) => /* @__PURE__ */ c.jsxs(
472
472
  xe,
473
473
  {
474
474
  value: d.value,
@@ -487,55 +487,55 @@ function ye({
487
487
  ) });
488
488
  }
489
489
  function Te(a) {
490
- return we() ? /* @__PURE__ */ c.jsx(ye, { ...a }) : /* @__PURE__ */ c.jsx(ie, { ...a });
490
+ return we() ? /* @__PURE__ */ c.jsx(ye, { ...a }) : /* @__PURE__ */ c.jsx(se, { ...a });
491
491
  }
492
492
  Te.displayName = "HourPickerField";
493
493
  function Ne({
494
494
  id: a,
495
495
  placeholder: u,
496
- value: t,
497
- onValueUpdate: o,
498
- onCommit: s,
496
+ value: r,
497
+ onValueUpdate: l,
498
+ onCommit: o,
499
499
  options: p,
500
500
  autoComplete: N,
501
501
  disabled: h,
502
- readOnly: P,
502
+ readOnly: H,
503
503
  open: m,
504
- setOpen: g,
504
+ setOpen: b,
505
505
  inputClassName: I,
506
506
  triggerTestId: F,
507
507
  isHydrated: x,
508
508
  highlightedValueRef: k,
509
509
  setHighlightedValue: y,
510
510
  markKeyboardNavigation: d,
511
- inputRef: E,
511
+ inputRef: D,
512
512
  setDraftValueRef: M
513
513
  }) {
514
- const S = n.useRef(!1), C = n.useRef(!1), z = n.useRef(!1), L = n.useRef(null), [O, j] = n.useState(() => t || "");
515
- n.useEffect(() => (M.current = (r) => {
516
- j(r);
514
+ const S = n.useRef(!1), C = n.useRef(!1), z = n.useRef(!1), L = n.useRef(null), [O, j] = n.useState(() => r || "");
515
+ n.useEffect(() => (M.current = (t) => {
516
+ j(t);
517
517
  }, () => {
518
518
  M.current = null;
519
519
  }), [M]);
520
520
  const J = n.useCallback(
521
- (r) => {
522
- const l = k.current ?? t ?? "";
523
- let b = p.findIndex((w) => w.value === l);
524
- b === -1 && (b = r === 1 ? -1 : p.length);
525
- for (let w = b + r; w >= 0 && w < p.length; w += r) {
521
+ (t) => {
522
+ const i = k.current ?? r ?? "";
523
+ let g = p.findIndex((w) => w.value === i);
524
+ g === -1 && (g = t === 1 ? -1 : p.length);
525
+ for (let w = g + t; w >= 0 && w < p.length; w += t) {
526
526
  const A = p[w];
527
527
  if (B(A)) {
528
- y(A.value), L.current = A.value, j(A.value), o(A.value);
528
+ y(A.value), L.current = A.value, j(A.value), l(A.value);
529
529
  return;
530
530
  }
531
531
  }
532
532
  },
533
- [k, o, p, y, t]
533
+ [k, l, p, y, r]
534
534
  );
535
535
  n.useEffect(() => {
536
- S.current || j(t || "");
537
- }, [t]);
538
- const G = q(
536
+ S.current || j(r || "");
537
+ }, [r]);
538
+ const Y = q(
539
539
  "flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 pr-10 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
540
540
  "transition-colors group-hover:bg-accent group-hover:text-accent-foreground",
541
541
  !O && "text-muted-foreground",
@@ -552,121 +552,121 @@ function Ne({
552
552
  "data-hydrated": x ? "true" : void 0,
553
553
  type: "text",
554
554
  disabled: h,
555
- readOnly: P,
556
- inputRef: E,
555
+ readOnly: H,
556
+ inputRef: D,
557
557
  autoComplete: N ?? "off",
558
558
  mask: [
559
559
  { mask: "00:00", lazy: !0 },
560
560
  { mask: "0:00", lazy: !0 }
561
561
  ],
562
- dispatch: (r, l) => {
563
- const b = (l.value + r).replace(/\D/g, "");
564
- if (b.length <= 2 || b.length >= 4) return l.compiledMasks[0];
565
- const w = U(Number(b.slice(0, 2)));
566
- return p.some((D) => D.value.startsWith(`${w}:`)) ? l.compiledMasks[0] : l.compiledMasks[1];
562
+ dispatch: (t, i) => {
563
+ const g = (i.value + t).replace(/\D/g, "");
564
+ if (g.length <= 2 || g.length >= 4) return i.compiledMasks[0];
565
+ const w = U(Number(g.slice(0, 2)));
566
+ return p.some((E) => E.value.startsWith(`${w}:`)) ? i.compiledMasks[0] : i.compiledMasks[1];
567
567
  },
568
568
  placeholder: u,
569
569
  value: O,
570
- className: G,
571
- onAccept: (r) => {
572
- const l = typeof r == "string" ? r : String(r ?? "");
573
- j(l), l.replace(/\D/g, "").length === 0 && t && s(null);
570
+ className: Y,
571
+ onAccept: (t) => {
572
+ const i = typeof t == "string" ? t : String(t ?? "");
573
+ j(i), i.replace(/\D/g, "").length === 0 && r && o(null);
574
574
  },
575
- onComplete: (r) => {
576
- const l = typeof r == "string" ? r : String(r ?? "");
577
- if (L.current === l) {
575
+ onComplete: (t) => {
576
+ const i = typeof t == "string" ? t : String(t ?? "");
577
+ if (L.current === i) {
578
578
  L.current = null;
579
579
  return;
580
580
  }
581
- const b = Z(l, p);
582
- if (!b)
581
+ const g = Z(i, p);
582
+ if (!g)
583
583
  return;
584
- if (b.selectableValue) {
585
- if (y(b.selectableValue), j(b.selectableValue), t === b.selectableValue)
584
+ if (g.selectableValue) {
585
+ if (y(g.selectableValue), j(g.selectableValue), r === g.selectableValue)
586
586
  return;
587
- s(b.selectableValue);
587
+ o(g.selectableValue);
588
588
  return;
589
589
  }
590
- const w = ee(b.parsed);
590
+ const w = ee(g.parsed);
591
591
  if (w == null)
592
592
  return;
593
593
  const A = re(w, p);
594
594
  A && y(A.value);
595
595
  },
596
596
  onPointerDown: () => {
597
- C.current = !0, !h && (m || g(!0));
597
+ C.current = !0, !h && (m || b(!0));
598
598
  },
599
- onMouseDown: (r) => {
600
- C.current = !0, z.current = typeof document < "u" && document.activeElement === r.currentTarget, !h && (m || g(!0));
599
+ onMouseDown: (t) => {
600
+ C.current = !0, z.current = typeof document < "u" && document.activeElement === t.currentTarget, !h && (m || b(!0));
601
601
  },
602
602
  onClick: () => {
603
- h || m || g(!0);
603
+ h || m || b(!0);
604
604
  },
605
- onKeyDown: (r) => {
605
+ onKeyDown: (t) => {
606
606
  if (!h) {
607
- if (r.key === "Tab" && m && !r.defaultPrevented) {
608
- g(!1);
607
+ if (t.key === "Tab" && m && !t.defaultPrevented) {
608
+ b(!1);
609
609
  return;
610
610
  }
611
- if (r.key === "Escape") {
611
+ if (t.key === "Escape") {
612
612
  if (!m)
613
613
  return;
614
- r.preventDefault(), g(!1);
614
+ t.preventDefault(), b(!1);
615
615
  return;
616
616
  }
617
- if (r.key === "ArrowDown" || r.key === "ArrowUp") {
618
- if (d(), r.preventDefault(), !m) {
619
- g(!0);
617
+ if (!m && !t.defaultPrevented && (t.key.length === 1 || t.key === "Backspace" || t.key === "Delete") && !t.ctrlKey && !t.metaKey && !t.altKey && b(!0), t.key === "ArrowDown" || t.key === "ArrowUp") {
618
+ if (d(), t.preventDefault(), !m) {
619
+ b(!0);
620
620
  return;
621
621
  }
622
- J(r.key === "ArrowDown" ? 1 : -1);
622
+ J(t.key === "ArrowDown" ? 1 : -1);
623
623
  return;
624
624
  }
625
- if (r.key === "Enter") {
625
+ if (t.key === "Enter") {
626
626
  d();
627
- const l = Z(O, p);
628
- if (!l)
627
+ const i = Z(O, p);
628
+ if (!i)
629
629
  return;
630
- if (l.selectableValue) {
631
- r.preventDefault(), y(l.selectableValue), j(l.selectableValue), t !== l.selectableValue && s(l.selectableValue), g(!1);
630
+ if (i.selectableValue) {
631
+ t.preventDefault(), y(i.selectableValue), j(i.selectableValue), r !== i.selectableValue && o(i.selectableValue), b(!1);
632
632
  return;
633
633
  }
634
- const b = ee(l.parsed);
635
- if (b == null)
634
+ const g = ee(i.parsed);
635
+ if (g == null)
636
636
  return;
637
- const w = re(b, p);
637
+ const w = re(g, p);
638
638
  if (!w)
639
639
  return;
640
- r.preventDefault(), y(w.value), j(w.value), t !== w.value && s(w.value), g(!1);
640
+ t.preventDefault(), y(w.value), j(w.value), r !== w.value && o(w.value), b(!1);
641
641
  return;
642
642
  }
643
643
  }
644
644
  },
645
- onFocus: (r) => {
646
- const l = !C.current || !z.current;
647
- if (C.current = !1, z.current = !1, S.current = !0, l) {
648
- const b = r.currentTarget;
649
- requestAnimationFrame(() => b.select());
645
+ onFocus: (t) => {
646
+ const i = !C.current || !z.current;
647
+ if (C.current = !1, z.current = !1, S.current = !0, i) {
648
+ const g = t.currentTarget;
649
+ requestAnimationFrame(() => g.select());
650
650
  }
651
- h || m || g(!0);
651
+ h || m || b(!0);
652
652
  },
653
653
  onBlur: () => {
654
654
  S.current = !1;
655
- const r = O.trim();
656
- if (!r) {
657
- j(t || "");
655
+ const t = O.trim();
656
+ if (!t) {
657
+ j(r || "");
658
658
  return;
659
659
  }
660
- const l = Z(r, p);
661
- if (!l) {
662
- j(t || "");
660
+ const i = Z(t, p);
661
+ if (!i) {
662
+ j(r || "");
663
663
  return;
664
664
  }
665
- if (!l.selectableValue) {
666
- j(t || "");
665
+ if (!i.selectableValue) {
666
+ j(r || "");
667
667
  return;
668
668
  }
669
- j(l.selectableValue), t !== l.selectableValue && s(l.selectableValue);
669
+ j(i.selectableValue), r !== i.selectableValue && o(i.selectableValue);
670
670
  }
671
671
  }
672
672
  ),
@@ -681,22 +681,22 @@ function Ne({
681
681
  "absolute right-1 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-md text-muted-foreground transition-colors hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
682
682
  ),
683
683
  "aria-label": m ? "Close time picker" : "Open time picker",
684
- onPointerDown: (r) => {
685
- r.preventDefault();
684
+ onPointerDown: (t) => {
685
+ t.preventDefault();
686
686
  },
687
- onMouseDown: (r) => {
688
- r.preventDefault();
687
+ onMouseDown: (t) => {
688
+ t.preventDefault();
689
689
  },
690
690
  onClick: () => {
691
- h || g(!m);
691
+ h || b(!m);
692
692
  },
693
- children: /* @__PURE__ */ c.jsx(se, { "aria-hidden": !0, className: "size-4" })
693
+ children: /* @__PURE__ */ c.jsx(oe, { "aria-hidden": !0, className: "size-4" })
694
694
  }
695
695
  )
696
696
  ] });
697
697
  }
698
698
  export {
699
699
  Te as HourPickerField,
700
- ie as HourPickerInput
700
+ se as HourPickerInput
701
701
  };
702
702
  //# sourceMappingURL=index18.js.map