@boxcustodia/library 0.2.0 → 0.2.2

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 (373) hide show
  1. package/dist/index.d.ts +2 -2
  2. package/dist/index.es10.js +1 -1
  3. package/dist/index.es100.js +4 -14
  4. package/dist/index.es101.js +14 -5
  5. package/dist/index.es102.js +4 -56
  6. package/dist/index.es103.js +55 -257
  7. package/dist/index.es104.js +3 -6
  8. package/dist/index.es108.js +11 -21
  9. package/dist/index.es109.js +21 -12
  10. package/dist/index.es110.js +5 -4
  11. package/dist/index.es111.js +4 -4
  12. package/dist/index.es112.js +4 -5
  13. package/dist/index.es113.js +12 -240
  14. package/dist/index.es114.js +224 -11
  15. package/dist/index.es115.js +11 -224
  16. package/dist/index.es116.js +41 -11
  17. package/dist/index.es117.js +821 -40
  18. package/dist/index.es118.js +9 -64
  19. package/dist/index.es119.js +11 -822
  20. package/dist/index.es120.js +64 -9
  21. package/dist/index.es121.js +240 -11
  22. package/dist/index.es124.js +1 -1
  23. package/dist/index.es125.js +1 -1
  24. package/dist/index.es126.js +5 -5
  25. package/dist/index.es13.js +1 -1
  26. package/dist/index.es131.js +13 -11
  27. package/dist/index.es132.js +196 -11
  28. package/dist/index.es133.js +41 -204
  29. package/dist/index.es134.js +12 -10
  30. package/dist/index.es135.js +11 -20
  31. package/dist/index.es136.js +205 -37
  32. package/dist/index.es137.js +10 -10
  33. package/dist/index.es138.js +20 -14
  34. package/dist/index.es139.js +34 -194
  35. package/dist/index.es14.js +1 -1
  36. package/dist/index.es140.js +9 -40
  37. package/dist/index.es141.js +6 -5
  38. package/dist/index.es142.js +65 -2
  39. package/dist/index.es143.js +10 -6
  40. package/dist/index.es144.js +118 -58
  41. package/dist/index.es145.js +134 -10
  42. package/dist/index.es146.js +13 -124
  43. package/dist/index.es147.js +31 -133
  44. package/dist/index.es148.js +14 -13
  45. package/dist/index.es149.js +9 -33
  46. package/dist/index.es150.js +50 -15
  47. package/dist/index.es151.js +6 -9
  48. package/dist/index.es152.js +2 -50
  49. package/dist/index.es153.js +1 -1
  50. package/dist/index.es154.js +625 -193
  51. package/dist/index.es156.js +193 -625
  52. package/dist/index.es158.js +3 -3
  53. package/dist/index.es161.js +1 -1
  54. package/dist/index.es162.js +3 -3
  55. package/dist/index.es164.js +5 -5
  56. package/dist/index.es165.js +2 -2
  57. package/dist/index.es166.js +6 -6
  58. package/dist/index.es173.js +1 -1
  59. package/dist/index.es174.js +1 -1
  60. package/dist/index.es175.js +3 -3
  61. package/dist/index.es176.js +2 -2
  62. package/dist/index.es177.js +1 -1
  63. package/dist/index.es178.js +1 -1
  64. package/dist/index.es182.js +21 -8
  65. package/dist/index.es183.js +9 -6
  66. package/dist/index.es184.js +38 -5
  67. package/dist/index.es185.js +18 -18
  68. package/dist/index.es186.js +7 -5
  69. package/dist/index.es187.js +5 -5
  70. package/dist/index.es188.js +4 -8
  71. package/dist/index.es189.js +18 -6
  72. package/dist/index.es190.js +5 -6
  73. package/dist/index.es191.js +5 -15
  74. package/dist/index.es192.js +8 -13
  75. package/dist/index.es193.js +6 -14
  76. package/dist/index.es194.js +6 -6
  77. package/dist/index.es195.js +15 -6
  78. package/dist/index.es196.js +13 -6
  79. package/dist/index.es197.js +13 -4
  80. package/dist/index.es198.js +6 -515
  81. package/dist/index.es199.js +7 -50
  82. package/dist/index.es200.js +6 -17
  83. package/dist/index.es201.js +4 -9
  84. package/dist/index.es202.js +513 -16
  85. package/dist/index.es203.js +50 -9
  86. package/dist/index.es204.js +17 -7
  87. package/dist/index.es205.js +9 -7
  88. package/dist/index.es206.js +19 -6
  89. package/dist/index.es207.js +8 -6
  90. package/dist/index.es208.js +7 -9
  91. package/dist/index.es209.js +7 -5
  92. package/dist/index.es210.js +5 -8
  93. package/dist/index.es211.js +6 -12
  94. package/dist/index.es212.js +9 -9
  95. package/dist/index.es213.js +5 -8
  96. package/dist/index.es214.js +8 -10
  97. package/dist/index.es215.js +12 -14
  98. package/dist/index.es216.js +9 -6
  99. package/dist/index.es217.js +8 -6
  100. package/dist/index.es218.js +10 -6
  101. package/dist/index.es219.js +14 -6
  102. package/dist/index.es22.js +2 -2
  103. package/dist/index.es220.js +6 -6
  104. package/dist/index.es221.js +6 -9
  105. package/dist/index.es222.js +6 -84
  106. package/dist/index.es223.js +7 -65
  107. package/dist/index.es224.js +6 -37
  108. package/dist/index.es225.js +9 -9
  109. package/dist/index.es226.js +84 -8
  110. package/dist/index.es227.js +65 -8
  111. package/dist/index.es228.js +37 -10
  112. package/dist/index.es229.js +9 -7
  113. package/dist/index.es230.js +8 -7
  114. package/dist/index.es231.js +7 -6
  115. package/dist/index.es232.js +10 -5
  116. package/dist/index.es233.js +7 -15
  117. package/dist/index.es234.js +7 -11
  118. package/dist/index.es235.js +6 -200
  119. package/dist/index.es236.js +6 -22
  120. package/dist/index.es237.js +15 -24
  121. package/dist/index.es238.js +10 -369
  122. package/dist/index.es239.js +176 -19
  123. package/dist/index.es240.js +25 -9
  124. package/dist/index.es241.js +19 -38
  125. package/dist/index.es242.js +53 -17
  126. package/dist/index.es243.js +15 -24
  127. package/dist/index.es244.js +200 -18
  128. package/dist/index.es245.js +19 -51
  129. package/dist/index.es246.js +25 -16
  130. package/dist/index.es247.js +364 -171
  131. package/dist/index.es248.js +26 -2
  132. package/dist/index.es249.js +4 -397
  133. package/dist/index.es250.js +7 -722
  134. package/dist/index.es251.js +13 -282
  135. package/dist/index.es252.js +13 -60
  136. package/dist/index.es253.js +134 -9
  137. package/dist/index.es254.js +31 -28
  138. package/dist/index.es255.js +459 -195
  139. package/dist/index.es256.js +131 -25
  140. package/dist/index.es257.js +27 -5
  141. package/dist/index.es258.js +4 -7
  142. package/dist/index.es259.js +25 -12
  143. package/dist/index.es260.js +7 -13
  144. package/dist/index.es261.js +11 -134
  145. package/dist/index.es262.js +27 -30
  146. package/dist/index.es263.js +46 -460
  147. package/dist/index.es264.js +28 -129
  148. package/dist/index.es265.js +43 -26
  149. package/dist/index.es266.js +158 -4
  150. package/dist/index.es267.js +30 -23
  151. package/dist/index.es268.js +2 -8
  152. package/dist/index.es269.js +77 -9
  153. package/dist/index.es27.js +1 -1
  154. package/dist/index.es270.js +18 -28
  155. package/dist/index.es271.js +2 -49
  156. package/dist/index.es272.js +395 -28
  157. package/dist/index.es273.js +722 -43
  158. package/dist/index.es274.js +281 -157
  159. package/dist/index.es275.js +54 -27
  160. package/dist/index.es276.js +10 -2
  161. package/dist/index.es277.js +28 -79
  162. package/dist/index.es278.js +199 -19
  163. package/dist/index.es279.js +4 -16
  164. package/dist/index.es28.js +1 -1
  165. package/dist/index.es280.js +14 -8
  166. package/dist/index.es281.js +15 -4
  167. package/dist/index.es282.js +16 -14
  168. package/dist/index.es283.js +8 -15
  169. package/dist/index.es29.js +3 -3
  170. package/dist/index.es290.js +2 -2
  171. package/dist/index.es291.js +2 -2
  172. package/dist/index.es297.js +2 -2
  173. package/dist/index.es298.js +2 -2
  174. package/dist/index.es30.js +6 -6
  175. package/dist/index.es301.js +1 -1
  176. package/dist/index.es302.js +1 -1
  177. package/dist/index.es303.js +1 -1
  178. package/dist/index.es304.js +1 -1
  179. package/dist/index.es315.js +2 -2
  180. package/dist/index.es316.js +2 -2
  181. package/dist/index.es317.js +1 -1
  182. package/dist/index.es318.js +1 -1
  183. package/dist/index.es32.js +2 -2
  184. package/dist/index.es322.js +10 -2
  185. package/dist/index.es323.js +5 -2
  186. package/dist/index.es324.js +13 -10
  187. package/dist/index.es325.js +4 -4
  188. package/dist/index.es326.js +7 -13
  189. package/dist/index.es327.js +333 -4
  190. package/dist/index.es328.js +19 -7
  191. package/dist/index.es329.js +3 -333
  192. package/dist/index.es33.js +2 -2
  193. package/dist/index.es330.js +5 -19
  194. package/dist/index.es331.js +3 -4
  195. package/dist/index.es332.js +71 -4
  196. package/dist/index.es333.js +4 -3
  197. package/dist/index.es334.js +6 -72
  198. package/dist/index.es335.js +34 -4
  199. package/dist/index.es336.js +26 -6
  200. package/dist/index.es337.js +18 -34
  201. package/dist/index.es338.js +4 -25
  202. package/dist/index.es339.js +231 -18
  203. package/dist/index.es34.js +6 -6
  204. package/dist/index.es340.js +100 -5
  205. package/dist/index.es341.js +26 -229
  206. package/dist/index.es342.js +35 -80
  207. package/dist/index.es343.js +2 -28
  208. package/dist/index.es344.js +2 -55
  209. package/dist/index.es345.js +334 -2
  210. package/dist/index.es346.js +31 -106
  211. package/dist/index.es347.js +16 -75
  212. package/dist/index.es348.js +29 -35
  213. package/dist/index.es349.js +3 -64
  214. package/dist/index.es35.js +2 -2
  215. package/dist/index.es350.js +107 -34
  216. package/dist/index.es351.js +71 -60
  217. package/dist/index.es352.js +34 -111
  218. package/dist/index.es353.js +60 -90
  219. package/dist/index.es354.js +32 -41
  220. package/dist/index.es355.js +66 -3
  221. package/dist/index.es356.js +113 -3
  222. package/dist/index.es357.js +94 -3
  223. package/dist/index.es358.js +43 -3
  224. package/dist/index.es359.js +2 -2
  225. package/dist/index.es360.js +2 -2
  226. package/dist/index.es361.js +2 -2
  227. package/dist/index.es362.js +2 -2
  228. package/dist/index.es363.js +2 -2
  229. package/dist/index.es364.js +4 -241
  230. package/dist/index.es365.js +4 -384
  231. package/dist/index.es366.js +4 -169
  232. package/dist/index.es367.js +4 -153
  233. package/dist/index.es368.js +187 -88
  234. package/dist/index.es369.js +384 -4
  235. package/dist/index.es370.js +169 -4
  236. package/dist/index.es371.js +153 -4
  237. package/dist/index.es372.js +142 -4
  238. package/dist/index.es373.js +2 -2
  239. package/dist/index.es374.js +2 -2
  240. package/dist/index.es375.js +2 -334
  241. package/dist/index.es376.js +2 -31
  242. package/dist/index.es377.js +2 -17
  243. package/dist/index.es378.js +2 -29
  244. package/dist/index.es379.js +1 -1
  245. package/dist/index.es38.js +2 -2
  246. package/dist/index.es380.js +2 -2
  247. package/dist/index.es382.js +2 -2
  248. package/dist/index.es383.js +2 -2
  249. package/dist/index.es389.js +1 -1
  250. package/dist/index.es390.js +1 -1
  251. package/dist/index.es393.js +1 -1
  252. package/dist/index.es395.js +4 -4
  253. package/dist/index.es397.js +66 -517
  254. package/dist/index.es398.js +30 -126
  255. package/dist/index.es399.js +16 -126
  256. package/dist/index.es400.js +135 -62
  257. package/dist/index.es401.js +108 -25
  258. package/dist/index.es402.js +6 -16
  259. package/dist/index.es403.js +2 -141
  260. package/dist/index.es404.js +8 -114
  261. package/dist/index.es405.js +326 -5
  262. package/dist/index.es406.js +50 -2
  263. package/dist/index.es407.js +3 -7
  264. package/dist/index.es408.js +497 -305
  265. package/dist/index.es409.js +125 -48
  266. package/dist/index.es41.js +1 -1
  267. package/dist/index.es410.js +125 -3
  268. package/dist/index.es411.js +1 -1
  269. package/dist/index.es412.js +6 -6
  270. package/dist/index.es416.js +1 -1
  271. package/dist/index.es417.js +5 -5
  272. package/dist/index.es420.js +2 -2
  273. package/dist/index.es43.js +1 -1
  274. package/dist/index.es435.js +21 -271
  275. package/dist/index.es436.js +10 -79
  276. package/dist/index.es437.js +31 -164
  277. package/dist/index.es438.js +29 -24
  278. package/dist/index.es439.js +11 -10
  279. package/dist/index.es44.js +4 -4
  280. package/dist/index.es440.js +2 -33
  281. package/dist/index.es441.js +2 -30
  282. package/dist/index.es442.js +274 -11
  283. package/dist/index.es443.js +80 -3
  284. package/dist/index.es444.js +163 -104
  285. package/dist/index.es445.js +3 -2
  286. package/dist/index.es446.js +107 -2
  287. package/dist/index.es45.js +1 -1
  288. package/dist/index.es451.js +65 -69
  289. package/dist/index.es452.js +68 -8
  290. package/dist/index.es453.js +9 -14
  291. package/dist/index.es454.js +14 -60
  292. package/dist/index.es455.js +59 -64
  293. package/dist/index.es46.js +5 -5
  294. package/dist/index.es465.js +44 -7
  295. package/dist/index.es466.js +63 -2
  296. package/dist/index.es467.js +17 -41
  297. package/dist/index.es468.js +5 -63
  298. package/dist/index.es469.js +41 -17
  299. package/dist/index.es47.js +1 -1
  300. package/dist/index.es470.js +5 -5
  301. package/dist/index.es471.js +7 -44
  302. package/dist/index.es472.js +2 -5
  303. package/dist/index.es474.js +1 -1
  304. package/dist/index.es475.js +1 -1
  305. package/dist/index.es49.js +2 -2
  306. package/dist/index.es50.js +1 -1
  307. package/dist/index.es51.js +4 -4
  308. package/dist/index.es54.js +1 -1
  309. package/dist/index.es55.js +48 -55
  310. package/dist/index.es56.js +22 -22
  311. package/dist/index.es57.js +3 -3
  312. package/dist/index.es59.js +1 -1
  313. package/dist/index.es62.js +1 -1
  314. package/dist/index.es63.js +1 -1
  315. package/dist/index.es65.js +2 -2
  316. package/dist/index.es66.js +3 -3
  317. package/dist/index.es67.js +2 -2
  318. package/dist/index.es69.js +1 -1
  319. package/dist/index.es7.js +1 -1
  320. package/dist/index.es752.js +13 -21
  321. package/dist/index.es753.js +18 -79
  322. package/dist/index.es754.js +82 -13
  323. package/dist/index.es766.js +2 -24
  324. package/dist/index.es767.js +2 -8
  325. package/dist/index.es768.js +21 -64
  326. package/dist/index.es769.js +8 -52
  327. package/dist/index.es770.js +56 -60
  328. package/dist/index.es771.js +52 -2
  329. package/dist/index.es772.js +71 -2
  330. package/dist/index.es777.js +56 -20
  331. package/dist/index.es778.js +26 -49
  332. package/dist/index.es779.js +9 -34
  333. package/dist/index.es780.js +18 -9
  334. package/dist/index.es781.js +8 -18
  335. package/dist/index.es782.js +12 -8
  336. package/dist/index.es783.js +56 -11
  337. package/dist/index.es784.js +9 -57
  338. package/dist/index.es785.js +14 -9
  339. package/dist/index.es786.js +6 -14
  340. package/dist/index.es787.js +21 -6
  341. package/dist/index.es788.js +1 -1
  342. package/dist/index.es799.js +1 -1
  343. package/dist/index.es802.js +1 -1
  344. package/dist/index.es809.js +5 -5
  345. package/dist/index.es810.js +2 -2
  346. package/dist/index.es811.js +1 -1
  347. package/dist/index.es813.js +2 -2
  348. package/dist/index.es825.js +15 -64
  349. package/dist/index.es826.js +7 -11
  350. package/dist/index.es827.js +61 -38
  351. package/dist/index.es828.js +7 -54
  352. package/dist/index.es829.js +40 -16
  353. package/dist/index.es83.js +305 -31
  354. package/dist/index.es830.js +57 -17
  355. package/dist/index.es831.js +20 -7
  356. package/dist/index.es832.js +1 -1
  357. package/dist/index.es84.js +12 -35
  358. package/dist/index.es85.js +33 -46
  359. package/dist/index.es86.js +34 -29
  360. package/dist/index.es87.js +42 -26
  361. package/dist/index.es88.js +30 -55
  362. package/dist/index.es89.js +28 -53
  363. package/dist/index.es90.js +55 -90
  364. package/dist/index.es91.js +55 -37
  365. package/dist/index.es92.js +88 -22
  366. package/dist/index.es93.js +36 -29
  367. package/dist/index.es94.js +22 -305
  368. package/dist/index.es95.js +30 -12
  369. package/dist/index.es96.js +259 -9
  370. package/dist/index.es97.js +5 -5
  371. package/dist/index.es98.js +10 -3672
  372. package/dist/index.es99.js +3673 -3
  373. package/package.json +1 -1
@@ -1,199 +1,39 @@
1
- import i from "./index.es169.js";
2
- import { forwardRef as f, createElement as s, useRef as $, useEffect as F, Fragment as M, useCallback as y, Children as N } from "react";
3
- import { composeEventHandlers as g } from "./index.es170.js";
4
- import { useComposedRefs as C } from "./index.es171.js";
5
- import { createContextScope as T } from "./index.es172.js";
6
- import { useId as _ } from "./index.es173.js";
7
- import { useControllableState as S } from "./index.es174.js";
8
- import { DismissableLayer as L } from "./index.es175.js";
9
- import { FocusScope as k } from "./index.es176.js";
10
- import { Portal as w } from "./index.es177.js";
11
- import { Presence as x } from "./index.es178.js";
12
- import { Primitive as D } from "./index.es140.js";
13
- import { useFocusGuards as j } from "./index.es179.js";
14
- import G from "./index.es180.js";
15
- import { hideOthers as H } from "./index.es152.js";
16
- import { Slot as K } from "./index.es181.js";
17
- const O = "Dialog", [P, De] = T(O), [U, d] = P(O), V = (e) => {
18
- const { __scopeDialog: r, children: t, open: c, defaultOpen: n, onOpenChange: o, modal: a = !0 } = e, l = $(null), u = $(null), [b = !1, m] = S({
19
- prop: c,
20
- defaultProp: n,
21
- onChange: o
22
- });
23
- return /* @__PURE__ */ s(U, {
24
- scope: r,
25
- triggerRef: l,
26
- contentRef: u,
27
- contentId: _(),
28
- titleId: _(),
29
- descriptionId: _(),
30
- open: b,
31
- onOpenChange: m,
32
- onOpenToggle: y(
33
- () => m(
34
- (I) => !I
35
- ),
36
- [
37
- m
38
- ]
39
- ),
40
- modal: a
41
- }, t);
42
- }, R = "DialogPortal", [Y, h] = P(R, {
43
- forceMount: void 0
44
- }), Z = (e) => {
45
- const { __scopeDialog: r, forceMount: t, children: c, container: n } = e, o = d(R, r);
46
- return /* @__PURE__ */ s(Y, {
47
- scope: r,
48
- forceMount: t
49
- }, N.map(
50
- c,
51
- (a) => /* @__PURE__ */ s(x, {
52
- present: t || o.open
53
- }, /* @__PURE__ */ s(w, {
54
- asChild: !0,
55
- container: n
56
- }, a))
57
- ));
58
- }, v = "DialogOverlay", q = /* @__PURE__ */ f((e, r) => {
59
- const t = h(v, e.__scopeDialog), { forceMount: c = t.forceMount, ...n } = e, o = d(v, e.__scopeDialog);
60
- return o.modal ? /* @__PURE__ */ s(x, {
61
- present: c || o.open
62
- }, /* @__PURE__ */ s(z, i({}, n, {
63
- ref: r
64
- }))) : null;
65
- }), z = /* @__PURE__ */ f((e, r) => {
66
- const { __scopeDialog: t, ...c } = e, n = d(v, t);
67
- return (
68
- // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
69
- // ie. when `Overlay` and `Content` are siblings
70
- /* @__PURE__ */ s(G, {
71
- as: K,
72
- allowPinchZoom: !0,
73
- shards: [
74
- n.contentRef
75
- ]
76
- }, /* @__PURE__ */ s(D.div, i({
77
- "data-state": A(n.open)
78
- }, c, {
79
- ref: r,
80
- style: {
81
- pointerEvents: "auto",
82
- ...c.style
1
+ import { isDateRange as f } from "./index.es100.js";
2
+ import { isBefore as R } from "./index.es220.js";
3
+ import { eachDayOfInterval as l } from "./index.es196.js";
4
+ import { startOfDay as o } from "./index.es194.js";
5
+ import { isWithinInterval as y } from "./index.es225.js";
6
+ import { isSameDay as e } from "./index.es221.js";
7
+ function w(r, i, u) {
8
+ const D = (n) => {
9
+ if (r == null ? void 0 : r.start) {
10
+ const { start: t, end: s } = r;
11
+ if (R(n, t) || t && s) {
12
+ i({ start: n, end: void 0 });
13
+ return;
83
14
  }
84
- })))
85
- );
86
- }), p = "DialogContent", B = /* @__PURE__ */ f((e, r) => {
87
- const t = h(p, e.__scopeDialog), { forceMount: c = t.forceMount, ...n } = e, o = d(p, e.__scopeDialog);
88
- return /* @__PURE__ */ s(x, {
89
- present: c || o.open
90
- }, o.modal ? /* @__PURE__ */ s(J, i({}, n, {
91
- ref: r
92
- })) : /* @__PURE__ */ s(Q, i({}, n, {
93
- ref: r
94
- })));
95
- }), J = /* @__PURE__ */ f((e, r) => {
96
- const t = d(p, e.__scopeDialog), c = $(null), n = C(r, t.contentRef, c);
97
- return F(() => {
98
- const o = c.current;
99
- if (o) return H(o);
100
- }, []), /* @__PURE__ */ s(E, i({}, e, {
101
- ref: n,
102
- trapFocus: t.open,
103
- disableOutsidePointerEvents: !0,
104
- onCloseAutoFocus: g(e.onCloseAutoFocus, (o) => {
105
- var a;
106
- o.preventDefault(), (a = t.triggerRef.current) === null || a === void 0 || a.focus();
107
- }),
108
- onPointerDownOutside: g(e.onPointerDownOutside, (o) => {
109
- const a = o.detail.originalEvent, l = a.button === 0 && a.ctrlKey === !0;
110
- (a.button === 2 || l) && o.preventDefault();
111
- }),
112
- onFocusOutside: g(
113
- e.onFocusOutside,
114
- (o) => o.preventDefault()
115
- )
116
- }));
117
- }), Q = /* @__PURE__ */ f((e, r) => {
118
- const t = d(p, e.__scopeDialog), c = $(!1), n = $(!1);
119
- return /* @__PURE__ */ s(E, i({}, e, {
120
- ref: r,
121
- trapFocus: !1,
122
- disableOutsidePointerEvents: !1,
123
- onCloseAutoFocus: (o) => {
124
- var a;
125
- if ((a = e.onCloseAutoFocus) === null || a === void 0 || a.call(e, o), !o.defaultPrevented) {
126
- var l;
127
- c.current || (l = t.triggerRef.current) === null || l === void 0 || l.focus(), o.preventDefault();
128
- }
129
- c.current = !1, n.current = !1;
15
+ if (g(t, n)) return;
16
+ i({
17
+ start: t,
18
+ end: n
19
+ });
20
+ } else
21
+ i({ start: n, end: void 0 });
22
+ }, g = (n, a) => !u || !n || !a ? !1 : l({ start: o(n), end: a }).some((m) => u(m));
23
+ return {
24
+ selectRangeDate: D,
25
+ isInRange: (n) => {
26
+ if (!f(r) || !r) return !1;
27
+ const { start: a, end: t } = r;
28
+ return a && !t ? e(n, a) : !a || !t ? !1 : y(n, {
29
+ start: o(a),
30
+ end: o(t)
31
+ });
130
32
  },
131
- onInteractOutside: (o) => {
132
- var a, l;
133
- (a = e.onInteractOutside) === null || a === void 0 || a.call(e, o), o.defaultPrevented || (c.current = !0, o.detail.originalEvent.type === "pointerdown" && (n.current = !0));
134
- const u = o.target;
135
- ((l = t.triggerRef.current) === null || l === void 0 ? void 0 : l.contains(u)) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && n.current && o.preventDefault();
136
- }
137
- }));
138
- }), E = /* @__PURE__ */ f((e, r) => {
139
- const { __scopeDialog: t, trapFocus: c, onOpenAutoFocus: n, onCloseAutoFocus: o, ...a } = e, l = d(p, t), u = $(null), b = C(r, u);
140
- return j(), /* @__PURE__ */ s(M, null, /* @__PURE__ */ s(k, {
141
- asChild: !0,
142
- loop: !0,
143
- trapped: c,
144
- onMountAutoFocus: n,
145
- onUnmountAutoFocus: o
146
- }, /* @__PURE__ */ s(L, i({
147
- role: "dialog",
148
- id: l.contentId,
149
- "aria-describedby": l.descriptionId,
150
- "aria-labelledby": l.titleId,
151
- "data-state": A(l.open)
152
- }, a, {
153
- ref: b,
154
- onDismiss: () => l.onOpenChange(!1)
155
- }))), !1);
156
- }), W = "DialogTitle", me = /* @__PURE__ */ f((e, r) => {
157
- const { __scopeDialog: t, ...c } = e, n = d(W, t);
158
- return /* @__PURE__ */ s(D.h2, i({
159
- id: n.titleId
160
- }, c, {
161
- ref: r
162
- }));
163
- }), X = "DialogDescription", _e = /* @__PURE__ */ f((e, r) => {
164
- const { __scopeDialog: t, ...c } = e, n = d(X, t);
165
- return /* @__PURE__ */ s(D.p, i({
166
- id: n.descriptionId
167
- }, c, {
168
- ref: r
169
- }));
170
- }), ee = "DialogClose", ve = /* @__PURE__ */ f((e, r) => {
171
- const { __scopeDialog: t, ...c } = e, n = d(ee, t);
172
- return /* @__PURE__ */ s(D.button, i({
173
- type: "button"
174
- }, c, {
175
- ref: r,
176
- onClick: g(
177
- e.onClick,
178
- () => n.onOpenChange(!1)
179
- )
180
- }));
181
- });
182
- function A(e) {
183
- return e ? "open" : "closed";
33
+ isFirstDayFromRange: (n) => !r || !f(r) || !r.start ? !1 : e(n, r.start),
34
+ isLastDayFromRange: (n) => !r || !f(r) || !r.end ? !1 : e(n, r.end)
35
+ };
184
36
  }
185
- const xe = V, Ce = Z, Oe = q, Pe = B;
186
37
  export {
187
- Pe as Content,
188
- V as Dialog,
189
- ve as DialogClose,
190
- B as DialogContent,
191
- _e as DialogDescription,
192
- q as DialogOverlay,
193
- Z as DialogPortal,
194
- me as DialogTitle,
195
- Oe as Overlay,
196
- Ce as Portal,
197
- xe as Root,
198
- De as createDialogScope
38
+ w as default
199
39
  };
@@ -1,4 +1,4 @@
1
- import { l as o } from "./index.es98.js";
1
+ import { l as o } from "./index.es99.js";
2
2
  import { useState as i, useCallback as r } from "react";
3
3
  function O(e) {
4
4
  const [u, n] = i(e), f = r(() => n(e), [e]), b = r(
@@ -1,44 +1,13 @@
1
- import s from "./index.es169.js";
2
- import { forwardRef as m, useEffect as n, createElement as p } from "react";
3
- import { flushSync as d } from "react-dom";
4
- import { Slot as $ } from "./index.es181.js";
5
- const l = [
6
- "a",
7
- "button",
8
- "div",
9
- "form",
10
- "h2",
11
- "h3",
12
- "img",
13
- "input",
14
- "label",
15
- "li",
16
- "nav",
17
- "ol",
18
- "p",
19
- "span",
20
- "svg",
21
- "ul"
22
- ], E = l.reduce((e, t) => {
23
- const r = /* @__PURE__ */ m((i, o) => {
24
- const { asChild: c, ...f } = i, a = c ? $ : t;
25
- return n(() => {
26
- window[Symbol.for("radix-ui")] = !0;
27
- }, []), /* @__PURE__ */ p(a, s({}, f, {
28
- ref: o
29
- }));
30
- });
31
- return r.displayName = `Primitive.${t}`, {
32
- ...e,
33
- [t]: r
1
+ import { isDate as n } from "./index.es102.js";
2
+ import { isSameDay as l } from "./index.es221.js";
3
+ function S(t, i) {
4
+ return {
5
+ selectSingleDate: (e) => {
6
+ i(e);
7
+ },
8
+ isSingleSelected: (e) => n(t) && l(e, t)
34
9
  };
35
- }, {});
36
- function b(e, t) {
37
- e && d(
38
- () => e.dispatchEvent(t)
39
- );
40
10
  }
41
11
  export {
42
- E as Primitive,
43
- b as dispatchDiscreteCustomEvent
12
+ S as default
44
13
  };
@@ -1,8 +1,9 @@
1
- var o = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function l(e) {
3
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
1
+ function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
2
+ return function(s) {
3
+ if (f == null || f(s), p === !1 || !s.defaultPrevented)
4
+ return c == null ? void 0 : c(s);
5
+ };
4
6
  }
5
7
  export {
6
- o as commonjsGlobal,
7
- l as getDefaultExportFromCjs
8
+ h as composeEventHandlers
8
9
  };
@@ -1,4 +1,67 @@
1
- var o = { exports: {} };
1
+ import * as u from "react";
2
+ import { j as C } from "./index.es82.js";
3
+ function $(e, c) {
4
+ const o = u.createContext(c);
5
+ function a(r) {
6
+ const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
7
+ return /* @__PURE__ */ C.jsx(o.Provider, { value: s, children: t });
8
+ }
9
+ function i(r) {
10
+ const t = u.useContext(o);
11
+ if (t) return t;
12
+ if (c !== void 0) return c;
13
+ throw new Error(`\`${r}\` must be used within \`${e}\``);
14
+ }
15
+ return a.displayName = e + "Provider", [a, i];
16
+ }
17
+ function j(e, c = []) {
18
+ let o = [];
19
+ function a(r, t) {
20
+ const n = u.createContext(t), s = o.length;
21
+ o = [...o, t];
22
+ function d(m) {
23
+ const { scope: x, children: f, ...p } = m, S = (x == null ? void 0 : x[e][s]) || n, h = u.useMemo(() => p, Object.values(p));
24
+ return /* @__PURE__ */ C.jsx(S.Provider, { value: h, children: f });
25
+ }
26
+ function v(m, x) {
27
+ const f = (x == null ? void 0 : x[e][s]) || n, p = u.useContext(f);
28
+ if (p) return p;
29
+ if (t !== void 0) return t;
30
+ throw new Error(`\`${m}\` must be used within \`${r}\``);
31
+ }
32
+ return d.displayName = r + "Provider", [d, v];
33
+ }
34
+ const i = () => {
35
+ const r = o.map((t) => u.createContext(t));
36
+ return function(n) {
37
+ const s = (n == null ? void 0 : n[e]) || r;
38
+ return u.useMemo(
39
+ () => ({ [`__scope${e}`]: { ...n, [e]: s } }),
40
+ [n, s]
41
+ );
42
+ };
43
+ };
44
+ return i.scopeName = e, [a, P(i, ...c)];
45
+ }
46
+ function P(...e) {
47
+ const c = e[0];
48
+ if (e.length === 1) return c;
49
+ const o = () => {
50
+ const a = e.map((i) => ({
51
+ useScope: i(),
52
+ scopeName: i.scopeName
53
+ }));
54
+ return function(r) {
55
+ const t = a.reduce((n, { useScope: s, scopeName: d }) => {
56
+ const m = s(r)[`__scope${d}`];
57
+ return { ...n, ...m };
58
+ }, {});
59
+ return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
60
+ };
61
+ };
62
+ return o.scopeName = c.scopeName, o;
63
+ }
2
64
  export {
3
- o as __module
65
+ $ as createContext,
66
+ j as createContextScope
4
67
  };
@@ -1,9 +1,13 @@
1
- function h(f, c, { checkForDefaultPrevented: p = !0 } = {}) {
2
- return function(s) {
3
- if (f == null || f(s), p === !1 || !s.defaultPrevented)
4
- return c == null ? void 0 : c(s);
5
- };
1
+ import * as e from "react";
2
+ import { useLayoutEffect as a } from "./index.es155.js";
3
+ var s = e.useId || (() => {
4
+ }), i = 0;
5
+ function d(o) {
6
+ const [t, r] = e.useState(s());
7
+ return a(() => {
8
+ r((u) => u ?? String(i++));
9
+ }, [o]), t ? `radix-${t}` : "";
6
10
  }
7
11
  export {
8
- h as composeEventHandlers
12
+ d as useId
9
13
  };
@@ -1,67 +1,127 @@
1
- import * as u from "react";
2
- import { j as C } from "./index.es82.js";
3
- function $(e, c) {
4
- const o = u.createContext(c);
5
- function a(r) {
6
- const { children: t, ...n } = r, s = u.useMemo(() => n, Object.values(n));
7
- return /* @__PURE__ */ C.jsx(o.Provider, { value: s, children: t });
1
+ import * as n from "react";
2
+ import { composeEventHandlers as m } from "./index.es141.js";
3
+ import { Primitive as R, dispatchDiscreteCustomEvent as k } from "./index.es147.js";
4
+ import { useComposedRefs as g } from "./index.es135.js";
5
+ import { useCallbackRef as w } from "./index.es137.js";
6
+ import { useEscapeKeydown as U } from "./index.es238.js";
7
+ import { j as x } from "./index.es82.js";
8
+ var j = "DismissableLayer", p = "dismissableLayer.update", z = "dismissableLayer.pointerDownOutside", H = "dismissableLayer.focusOutside", L, T = n.createContext({
9
+ layers: /* @__PURE__ */ new Set(),
10
+ layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
11
+ branches: /* @__PURE__ */ new Set()
12
+ }), M = n.forwardRef(
13
+ (r, e) => {
14
+ const {
15
+ disableOutsidePointerEvents: i = !1,
16
+ onEscapeKeyDown: o,
17
+ onPointerDownOutside: t,
18
+ onFocusOutside: a,
19
+ onInteractOutside: l,
20
+ onDismiss: d,
21
+ ...v
22
+ } = r, c = n.useContext(T), [u, S] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = n.useState({}), W = g(e, (s) => S(s)), y = Array.from(c.layers), [A] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), N = y.indexOf(A), b = u ? y.indexOf(u) : -1, I = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= N, _ = q((s) => {
23
+ const E = s.target, C = [...c.branches].some((h) => h.contains(E));
24
+ !P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
25
+ }, f), D = G((s) => {
26
+ const E = s.target;
27
+ [...c.branches].some((h) => h.contains(E)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
28
+ }, f);
29
+ return U((s) => {
30
+ b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
31
+ }, f), n.useEffect(() => {
32
+ if (u)
33
+ return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
34
+ i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
35
+ };
36
+ }, [u, f, i, c]), n.useEffect(() => () => {
37
+ u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
38
+ }, [u, c]), n.useEffect(() => {
39
+ const s = () => F({});
40
+ return document.addEventListener(p, s), () => document.removeEventListener(p, s);
41
+ }, []), /* @__PURE__ */ x.jsx(
42
+ R.div,
43
+ {
44
+ ...v,
45
+ ref: W,
46
+ style: {
47
+ pointerEvents: I ? P ? "auto" : "none" : void 0,
48
+ ...r.style
49
+ },
50
+ onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
51
+ onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
52
+ onPointerDownCapture: m(
53
+ r.onPointerDownCapture,
54
+ _.onPointerDownCapture
55
+ )
56
+ }
57
+ );
8
58
  }
9
- function i(r) {
10
- const t = u.useContext(o);
11
- if (t) return t;
12
- if (c !== void 0) return c;
13
- throw new Error(`\`${r}\` must be used within \`${e}\``);
14
- }
15
- return a.displayName = e + "Provider", [a, i];
16
- }
17
- function j(e, c = []) {
18
- let o = [];
19
- function a(r, t) {
20
- const n = u.createContext(t), s = o.length;
21
- o = [...o, t];
22
- function d(m) {
23
- const { scope: x, children: f, ...p } = m, S = (x == null ? void 0 : x[e][s]) || n, h = u.useMemo(() => p, Object.values(p));
24
- return /* @__PURE__ */ C.jsx(S.Provider, { value: h, children: f });
25
- }
26
- function v(m, x) {
27
- const f = (x == null ? void 0 : x[e][s]) || n, p = u.useContext(f);
28
- if (p) return p;
29
- if (t !== void 0) return t;
30
- throw new Error(`\`${m}\` must be used within \`${r}\``);
31
- }
32
- return d.displayName = r + "Provider", [d, v];
33
- }
34
- const i = () => {
35
- const r = o.map((t) => u.createContext(t));
36
- return function(n) {
37
- const s = (n == null ? void 0 : n[e]) || r;
38
- return u.useMemo(
39
- () => ({ [`__scope${e}`]: { ...n, [e]: s } }),
40
- [n, s]
41
- );
59
+ );
60
+ M.displayName = j;
61
+ var X = "DismissableLayerBranch", Y = n.forwardRef((r, e) => {
62
+ const i = n.useContext(T), o = n.useRef(null), t = g(e, o);
63
+ return n.useEffect(() => {
64
+ const a = o.current;
65
+ if (a)
66
+ return i.branches.add(a), () => {
67
+ i.branches.delete(a);
68
+ };
69
+ }, [i.branches]), /* @__PURE__ */ x.jsx(R.div, { ...r, ref: t });
70
+ });
71
+ Y.displayName = X;
72
+ function q(r, e = globalThis == null ? void 0 : globalThis.document) {
73
+ const i = w(r), o = n.useRef(!1), t = n.useRef(() => {
74
+ });
75
+ return n.useEffect(() => {
76
+ const a = (d) => {
77
+ if (d.target && !o.current) {
78
+ let v = function() {
79
+ B(
80
+ z,
81
+ i,
82
+ c,
83
+ { discrete: !0 }
84
+ );
85
+ };
86
+ const c = { originalEvent: d };
87
+ d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = v, e.addEventListener("click", t.current, { once: !0 })) : v();
88
+ } else
89
+ e.removeEventListener("click", t.current);
90
+ o.current = !1;
91
+ }, l = window.setTimeout(() => {
92
+ e.addEventListener("pointerdown", a);
93
+ }, 0);
94
+ return () => {
95
+ window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
42
96
  };
97
+ }, [e, i]), {
98
+ // ensures we check React component tree (not just DOM tree)
99
+ onPointerDownCapture: () => o.current = !0
43
100
  };
44
- return i.scopeName = e, [a, P(i, ...c)];
45
101
  }
46
- function P(...e) {
47
- const c = e[0];
48
- if (e.length === 1) return c;
49
- const o = () => {
50
- const a = e.map((i) => ({
51
- useScope: i(),
52
- scopeName: i.scopeName
53
- }));
54
- return function(r) {
55
- const t = a.reduce((n, { useScope: s, scopeName: d }) => {
56
- const m = s(r)[`__scope${d}`];
57
- return { ...n, ...m };
58
- }, {});
59
- return u.useMemo(() => ({ [`__scope${c.scopeName}`]: t }), [t]);
102
+ function G(r, e = globalThis == null ? void 0 : globalThis.document) {
103
+ const i = w(r), o = n.useRef(!1);
104
+ return n.useEffect(() => {
105
+ const t = (a) => {
106
+ a.target && !o.current && B(H, i, { originalEvent: a }, {
107
+ discrete: !1
108
+ });
60
109
  };
110
+ return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
111
+ }, [e, i]), {
112
+ onFocusCapture: () => o.current = !0,
113
+ onBlurCapture: () => o.current = !1
61
114
  };
62
- return o.scopeName = c.scopeName, o;
115
+ }
116
+ function O() {
117
+ const r = new CustomEvent(p);
118
+ document.dispatchEvent(r);
119
+ }
120
+ function B(r, e, i, { discrete: o }) {
121
+ const t = i.originalEvent.target, a = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: i });
122
+ e && t.addEventListener(r, e, { once: !0 }), o ? k(t, a) : t.dispatchEvent(a);
63
123
  }
64
124
  export {
65
- $ as createContext,
66
- j as createContextScope
125
+ M as DismissableLayer,
126
+ Y as DismissableLayerBranch
67
127
  };