@boxcustodia/library 0.0.7 → 0.0.8

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 (272) hide show
  1. package/dist/index.d.ts +6 -1
  2. package/dist/index.es100.js +4 -4
  3. package/dist/index.es101.js +4 -14
  4. package/dist/index.es102.js +3 -4
  5. package/dist/index.es103.js +14 -57
  6. package/dist/index.es104.js +5 -29
  7. package/dist/index.es105.js +57 -12
  8. package/dist/index.es106.js +29 -11
  9. package/dist/index.es111.js +243 -1046
  10. package/dist/index.es112.js +12 -4
  11. package/dist/index.es113.js +11 -4
  12. package/dist/index.es114.js +7 -7
  13. package/dist/index.es117.js +14 -14
  14. package/dist/index.es118.js +813 -55
  15. package/dist/index.es119.js +9 -822
  16. package/dist/index.es120.js +5 -3
  17. package/dist/index.es121.js +64 -11
  18. package/dist/index.es122.js +88 -11
  19. package/dist/index.es123.js +11 -88
  20. package/dist/index.es124.js +4 -216
  21. package/dist/index.es127.js +5 -5
  22. package/dist/index.es128.js +216 -4
  23. package/dist/index.es129.js +2 -2
  24. package/dist/index.es134.js +1 -1
  25. package/dist/index.es137.js +20 -11
  26. package/dist/index.es138.js +37 -205
  27. package/dist/index.es139.js +10 -10
  28. package/dist/index.es140.js +11 -20
  29. package/dist/index.es141.js +205 -37
  30. package/dist/index.es142.js +10 -10
  31. package/dist/index.es143.js +5 -6
  32. package/dist/index.es144.js +2 -65
  33. package/dist/index.es145.js +44 -11
  34. package/dist/index.es146.js +5 -123
  35. package/dist/index.es147.js +58 -128
  36. package/dist/index.es148.js +11 -14
  37. package/dist/index.es149.js +122 -30
  38. package/dist/index.es150.js +134 -14
  39. package/dist/index.es151.js +12 -7
  40. package/dist/index.es152.js +32 -49
  41. package/dist/index.es153.js +14 -5
  42. package/dist/index.es154.js +9 -2
  43. package/dist/index.es155.js +48 -648
  44. package/dist/index.es156.js +5 -5
  45. package/dist/index.es157.js +649 -3
  46. package/dist/index.es158.js +4 -4
  47. package/dist/index.es159.js +3 -45
  48. package/dist/index.es160.js +45 -7
  49. package/dist/index.es161.js +7 -5
  50. package/dist/index.es162.js +6 -28
  51. package/dist/index.es163.js +27 -43
  52. package/dist/index.es164.js +3 -3
  53. package/dist/index.es166.js +5 -5
  54. package/dist/index.es168.js +2 -2
  55. package/dist/index.es179.js +1 -1
  56. package/dist/index.es180.js +1 -1
  57. package/dist/index.es181.js +2 -2
  58. package/dist/index.es182.js +1 -1
  59. package/dist/index.es184.js +1 -1
  60. package/dist/index.es207.js +1 -1
  61. package/dist/index.es240.js +1 -1
  62. package/dist/index.es241.js +24 -177
  63. package/dist/index.es242.js +5 -5
  64. package/dist/index.es243.js +2 -2
  65. package/dist/index.es246.js +1 -1
  66. package/dist/index.es247.js +1 -1
  67. package/dist/index.es248.js +3 -3
  68. package/dist/index.es249.js +178 -2
  69. package/dist/index.es250.js +25 -397
  70. package/dist/index.es251.js +4 -722
  71. package/dist/index.es252.js +7 -282
  72. package/dist/index.es253.js +13 -60
  73. package/dist/index.es254.js +13 -9
  74. package/dist/index.es255.js +134 -28
  75. package/dist/index.es256.js +32 -199
  76. package/dist/index.es257.js +462 -25
  77. package/dist/index.es258.js +131 -4
  78. package/dist/index.es259.js +27 -8
  79. package/dist/index.es260.js +4 -13
  80. package/dist/index.es261.js +26 -13
  81. package/dist/index.es262.js +7 -134
  82. package/dist/index.es263.js +11 -31
  83. package/dist/index.es264.js +26 -460
  84. package/dist/index.es265.js +47 -130
  85. package/dist/index.es266.js +31 -27
  86. package/dist/index.es267.js +43 -4
  87. package/dist/index.es268.js +158 -26
  88. package/dist/index.es269.js +32 -6
  89. package/dist/index.es27.js +1 -1
  90. package/dist/index.es270.js +2 -12
  91. package/dist/index.es271.js +77 -26
  92. package/dist/index.es272.js +18 -48
  93. package/dist/index.es273.js +2 -31
  94. package/dist/index.es274.js +397 -43
  95. package/dist/index.es275.js +715 -151
  96. package/dist/index.es276.js +278 -29
  97. package/dist/index.es277.js +61 -2
  98. package/dist/index.es278.js +8 -78
  99. package/dist/index.es279.js +28 -18
  100. package/dist/index.es28.js +3 -3
  101. package/dist/index.es280.js +199 -25
  102. package/dist/index.es281.js +15 -16
  103. package/dist/index.es282.js +3 -8
  104. package/dist/index.es283.js +16 -4
  105. package/dist/index.es284.js +8 -14
  106. package/dist/index.es285.js +4 -15
  107. package/dist/index.es286.js +14 -15
  108. package/dist/index.es287.js +15 -3
  109. package/dist/index.es29.js +6 -6
  110. package/dist/index.es31.js +2 -2
  111. package/dist/index.es32.js +2 -2
  112. package/dist/index.es322.js +3 -3
  113. package/dist/index.es323.js +3 -3
  114. package/dist/index.es325.js +1 -1
  115. package/dist/index.es326.js +5 -5
  116. package/dist/index.es327.js +1 -1
  117. package/dist/index.es336.js +6 -2
  118. package/dist/index.es337.js +34 -2
  119. package/dist/index.es338.js +26 -6
  120. package/dist/index.es339.js +18 -34
  121. package/dist/index.es34.js +5 -5
  122. package/dist/index.es340.js +4 -25
  123. package/dist/index.es341.js +231 -18
  124. package/dist/index.es342.js +100 -5
  125. package/dist/index.es343.js +26 -229
  126. package/dist/index.es344.js +35 -80
  127. package/dist/index.es345.js +2 -28
  128. package/dist/index.es346.js +2 -55
  129. package/dist/index.es347.js +334 -2
  130. package/dist/index.es348.js +31 -106
  131. package/dist/index.es349.js +16 -75
  132. package/dist/index.es35.js +2 -2
  133. package/dist/index.es350.js +29 -35
  134. package/dist/index.es351.js +3 -64
  135. package/dist/index.es352.js +107 -34
  136. package/dist/index.es353.js +71 -60
  137. package/dist/index.es354.js +34 -111
  138. package/dist/index.es355.js +60 -90
  139. package/dist/index.es356.js +32 -41
  140. package/dist/index.es357.js +66 -3
  141. package/dist/index.es358.js +113 -3
  142. package/dist/index.es359.js +94 -3
  143. package/dist/index.es360.js +43 -3
  144. package/dist/index.es361.js +2 -2
  145. package/dist/index.es362.js +2 -2
  146. package/dist/index.es363.js +2 -2
  147. package/dist/index.es364.js +2 -2
  148. package/dist/index.es365.js +2 -2
  149. package/dist/index.es366.js +4 -241
  150. package/dist/index.es367.js +4 -384
  151. package/dist/index.es368.js +4 -169
  152. package/dist/index.es369.js +4 -153
  153. package/dist/index.es370.js +187 -88
  154. package/dist/index.es371.js +384 -4
  155. package/dist/index.es372.js +169 -4
  156. package/dist/index.es373.js +153 -4
  157. package/dist/index.es374.js +142 -4
  158. package/dist/index.es375.js +2 -2
  159. package/dist/index.es376.js +2 -2
  160. package/dist/index.es377.js +2 -334
  161. package/dist/index.es378.js +2 -31
  162. package/dist/index.es379.js +2 -17
  163. package/dist/index.es38.js +51 -46
  164. package/dist/index.es380.js +2 -29
  165. package/dist/index.es381.js +2 -2
  166. package/dist/index.es382.js +1 -1
  167. package/dist/index.es384.js +1 -1
  168. package/dist/index.es385.js +1 -1
  169. package/dist/index.es39.js +2 -2
  170. package/dist/index.es394.js +68 -5
  171. package/dist/index.es395.js +31 -3
  172. package/dist/index.es396.js +16 -24
  173. package/dist/index.es397.js +141 -110
  174. package/dist/index.es398.js +113 -15
  175. package/dist/index.es399.js +5 -6
  176. package/dist/index.es40.js +3 -3
  177. package/dist/index.es400.js +3 -2
  178. package/dist/index.es401.js +23 -7
  179. package/dist/index.es402.js +108 -325
  180. package/dist/index.es403.js +15 -49
  181. package/dist/index.es404.js +518 -3
  182. package/dist/index.es405.js +113 -505
  183. package/dist/index.es406.js +120 -121
  184. package/dist/index.es407.js +5 -125
  185. package/dist/index.es408.js +2 -68
  186. package/dist/index.es409.js +8 -31
  187. package/dist/index.es41.js +1 -1
  188. package/dist/index.es410.js +327 -16
  189. package/dist/index.es411.js +48 -139
  190. package/dist/index.es412.js +4 -114
  191. package/dist/index.es416.js +1 -1
  192. package/dist/index.es418.js +1 -1
  193. package/dist/index.es419.js +4 -4
  194. package/dist/index.es42.js +1 -1
  195. package/dist/index.es437.js +21 -271
  196. package/dist/index.es438.js +10 -79
  197. package/dist/index.es439.js +31 -164
  198. package/dist/index.es44.js +1 -1
  199. package/dist/index.es440.js +29 -24
  200. package/dist/index.es441.js +11 -10
  201. package/dist/index.es442.js +274 -32
  202. package/dist/index.es443.js +79 -29
  203. package/dist/index.es444.js +165 -11
  204. package/dist/index.es448.js +2 -2
  205. package/dist/index.es45.js +1 -1
  206. package/dist/index.es454.js +1 -1
  207. package/dist/index.es455.js +1 -1
  208. package/dist/index.es461.js +1 -1
  209. package/dist/index.es476.js +1 -1
  210. package/dist/index.es477.js +1 -1
  211. package/dist/index.es50.js +2 -2
  212. package/dist/index.es51.js +1 -1
  213. package/dist/index.es52.js +4 -4
  214. package/dist/index.es55.js +1 -1
  215. package/dist/index.es56.js +1 -1
  216. package/dist/index.es57.js +2 -2
  217. package/dist/index.es59.js +2 -2
  218. package/dist/index.es62.js +1 -1
  219. package/dist/index.es63.js +1 -1
  220. package/dist/index.es65.js +2 -2
  221. package/dist/index.es66.js +2 -2
  222. package/dist/index.es754.js +13 -21
  223. package/dist/index.es755.js +18 -79
  224. package/dist/index.es756.js +82 -13
  225. package/dist/index.es757.js +14 -2
  226. package/dist/index.es758.js +60 -2
  227. package/dist/index.es759.js +2 -14
  228. package/dist/index.es760.js +2 -60
  229. package/dist/index.es768.js +2 -5
  230. package/dist/index.es769.js +2 -17
  231. package/dist/index.es770.js +5 -2
  232. package/dist/index.es771.js +17 -2
  233. package/dist/index.es772.js +1 -1
  234. package/dist/index.es773.js +2 -2
  235. package/dist/index.es78.js +1 -1
  236. package/dist/index.es781.js +1 -1
  237. package/dist/index.es784.js +1 -1
  238. package/dist/index.es787.js +56 -26
  239. package/dist/index.es788.js +10 -3
  240. package/dist/index.es789.js +14 -57
  241. package/dist/index.es79.js +1 -1
  242. package/dist/index.es790.js +3 -6
  243. package/dist/index.es791.js +28 -15
  244. package/dist/index.es792.js +3 -7
  245. package/dist/index.es808.js +1 -1
  246. package/dist/index.es811.js +5 -5
  247. package/dist/index.es812.js +2 -2
  248. package/dist/index.es813.js +1 -1
  249. package/dist/index.es815.js +2 -2
  250. package/dist/index.es827.js +64 -15
  251. package/dist/index.es828.js +11 -7
  252. package/dist/index.es829.js +38 -61
  253. package/dist/index.es830.js +54 -7
  254. package/dist/index.es831.js +16 -40
  255. package/dist/index.es832.js +17 -57
  256. package/dist/index.es833.js +7 -20
  257. package/dist/index.es834.js +1 -1
  258. package/dist/index.es86.js +55 -33
  259. package/dist/index.es87.js +53 -44
  260. package/dist/index.es88.js +89 -29
  261. package/dist/index.es89.js +37 -30
  262. package/dist/index.es90.js +24 -9
  263. package/dist/index.es91.js +30 -55
  264. package/dist/index.es92.js +31 -53
  265. package/dist/index.es93.js +46 -90
  266. package/dist/index.es94.js +29 -36
  267. package/dist/index.es95.js +29 -23
  268. package/dist/index.es96.js +9 -30
  269. package/dist/index.es97.js +12 -259
  270. package/dist/index.es98.js +1062 -12
  271. package/dist/index.es99.js +2 -2
  272. package/package.json +1 -1
@@ -1,57 +1,32 @@
1
- import { useControllableState as b } from "./index.es89.js";
2
- import { l as o } from "./index.es99.js";
3
- import { createContext as h } from "react";
4
- import { isDateRange as f } from "./index.es100.js";
5
- import w from "./index.es140.js";
6
- import y from "./index.es141.js";
7
- import A from "./index.es142.js";
8
- import { isDate as u } from "./index.es102.js";
9
- const B = h({
10
- defaultStartDate: /* @__PURE__ */ new Date(),
11
- mode: "single",
12
- isSingleMode: !1,
13
- isRangeMode: !1,
14
- selected: void 0,
15
- selectDate: () => {
16
- },
17
- isSelected: () => !1,
18
- isFirstDayFromRange: () => !1,
19
- isLastDayFromRange: () => !1,
20
- isInRange: () => !1
21
- });
22
- function G(d) {
23
- const { mode: r, value: c, defaultValue: g, onChange: m, disabled: p } = d, a = r === "single", s = r === "range", l = r === "multiple", [e, n] = b({
24
- prop: c,
25
- onChange: m,
26
- defaultProp: g
27
- }), { selectSingleDate: D, isSingleSelected: S } = A(
28
- u(e) ? e : void 0,
29
- n
30
- ), { selectRangeDate: C, isInRange: i, ...M } = y(
31
- f(e) ? e : void 0,
32
- n,
33
- p
34
- ), { selectMultipleDate: R, isMultipleSelected: v } = w(
35
- o.isArray(e) ? e : void 0,
36
- n
37
- ), x = (t) => {
38
- if (a) return D(t);
39
- if (s) return C(t);
40
- if (l) return R(t);
41
- }, F = (t) => a ? S(t) : s ? i(t) : l ? v(t) : !1;
42
- return {
43
- defaultStartDate: u(e) ? e : o.isArray(e) ? e[0] : f(e) && e.start ? e.start : /* @__PURE__ */ new Date(),
44
- isSingleMode: a,
45
- isRangeMode: s,
46
- selected: e,
47
- isSelected: F,
48
- selectDate: x,
49
- isInRange: i,
50
- mode: r,
51
- ...M
52
- };
53
- }
1
+ import { j as o } from "./index.es82.js";
2
+ import { useMemo as c } from "react";
3
+ import { setYear as d } from "./index.es236.js";
4
+ import { Button as f } from "./index.es27.js";
5
+ import { formatDate as a } from "./index.es105.js";
6
+ import { eachYearOfInterval as p } from "./index.es199.js";
7
+ import { startOfDecade as u } from "./index.es237.js";
8
+ import { endOfDecade as y } from "./index.es200.js";
9
+ const l = ({ value: r, onChange: s }) => {
10
+ const i = () => p({
11
+ start: u(r),
12
+ end: y(r)
13
+ }), m = (t) => {
14
+ const e = d(r, parseInt(a(t, "yyyy")));
15
+ s(e);
16
+ }, n = c(i, [r]);
17
+ return /* @__PURE__ */ o.jsx("div", { className: "ui-grid ui-grid-cols-3 ui-grow", children: n.map((t, e) => /* @__PURE__ */ o.jsx(
18
+ f,
19
+ {
20
+ onClick: () => m(t),
21
+ className: "ui-h-full ui-rounded-none",
22
+ type: "button",
23
+ variant: "ghost",
24
+ children: a(t, "yyyy")
25
+ },
26
+ e
27
+ )) });
28
+ };
29
+ l.displayName = "DecadeView";
54
30
  export {
55
- B as CalendarContext,
56
- G as default
31
+ l as DecadeView
57
32
  };
@@ -1,57 +1,35 @@
1
- import { useState as m, useMemo as f } from "react";
2
- import { parse as D } from "./index.es228.js";
3
- import { startOfToday as M } from "./index.es238.js";
4
- import { addMonths as y } from "./index.es191.js";
5
- import { addYears as a } from "./index.es192.js";
6
- import { formatDate as s } from "./index.es103.js";
7
- function w(i = M()) {
8
- const [o, c] = m({
9
- month: s(i, "MM"),
10
- year: s(i, "yyyy")
11
- }), e = f(
12
- () => D(`${o.month}-${o.year}`, "MM-yyyy", /* @__PURE__ */ new Date()),
13
- [o]
14
- ), n = (t) => {
15
- c({
16
- ...o,
17
- month: s(t, "MM")
18
- });
19
- }, r = (t) => {
20
- c({
21
- ...o,
22
- year: s(t, "yyyy")
23
- });
24
- };
25
- return {
26
- navigationDate: e,
27
- setMonth: n,
28
- setYear: r,
29
- previousMonth: () => {
30
- const t = y(e, -1);
31
- n(t);
1
+ import { cva as i } from "./index.es85.js";
2
+ const u = i(
3
+ [
4
+ "ui-inline-flex ui-items-center ui-justify-center ui-gap-2",
5
+ "ui-text-sm ui-font-medium ui-transition-all",
6
+ "ui-rounded-md ui-ring-offset-background",
7
+ "focus-visible:ui-outline-none focus-visible:ui-ring-2 focus-visible:ui-ring-ring focus-visible:ui-ring-offset-2",
8
+ "disabled:ui-pointer-events-none disabled:ui-opacity-50"
9
+ ],
10
+ {
11
+ variants: {
12
+ variant: {
13
+ default: "ui-bg-primary ui-text-primary-foreground hover:ui-bg-primary/90",
14
+ error: "ui-bg-error ui-text-error-foreground hover:ui-bg-error/90",
15
+ outline: "ui-border ui-border-input ui-bg-background hover:ui-bg-accent hover:ui-text-accent-foreground",
16
+ secondary: "ui-bg-secondary ui-text-secondary-foreground hover:ui-bg-secondary/80",
17
+ ghost: "hover:ui-bg-accent hover:ui-text-accent-foreground",
18
+ link: "ui-text-primary ui-underline-offset-4 hover:ui-underline"
19
+ },
20
+ size: {
21
+ default: "ui-h-10 ui-px-4 ui-py-2",
22
+ sm: "ui-h-9 ui-rounded-md ui-px-3",
23
+ lg: "ui-h-11 ui-rounded-md ui-px-8",
24
+ icon: "ui-w-10 ui-aspect-square ui-rounded-full"
25
+ }
32
26
  },
33
- nextMonth: () => {
34
- const t = y(e, 1);
35
- n(t);
36
- },
37
- previousYear: () => {
38
- const t = a(e, -1);
39
- r(t);
40
- },
41
- nextYear: () => {
42
- const t = a(e, 1);
43
- r(t);
44
- },
45
- previousDecade: () => {
46
- const t = a(e, -10);
47
- r(t);
48
- },
49
- nextDecade: () => {
50
- const t = a(e, 10);
51
- r(t);
27
+ defaultVariants: {
28
+ variant: "default",
29
+ size: "default"
52
30
  }
53
- };
54
- }
31
+ }
32
+ );
55
33
  export {
56
- w as default
34
+ u as buttonVariants
57
35
  };
@@ -1,92 +1,48 @@
1
- import { j as t } from "./index.es82.js";
2
- import { l as m } from "./index.es99.js";
3
- import { useMemo as L } from "react";
4
- import I from "./index.es122.js";
5
- import O from "./index.es109.js";
6
- import { formatDate as a } from "./index.es103.js";
7
- import { eachYearOfInterval as B } from "./index.es199.js";
8
- import { startOfDecade as E } from "./index.es237.js";
9
- import { endOfDecade as R } from "./index.es200.js";
10
- import { es as $ } from "./index.es242.js";
11
- import { Button as l } from "./index.es27.js";
12
- import { cn as F } from "./index.es72.js";
13
- const Y = ({
14
- view: e,
15
- setView: s,
16
- value: r,
17
- previousMonth: f,
18
- nextMonth: u,
19
- previousYear: d,
20
- nextYear: y,
21
- previousDecade: x,
22
- nextDecade: p,
23
- goBackProps: h,
24
- goNextProps: j,
25
- changeViewProps: i
26
- }) => {
27
- const b = e === "month", n = e === "year", o = e === "decade", g = () => {
28
- if (o) return x();
29
- if (n) return d();
30
- f();
31
- }, N = () => {
32
- if (o) return p();
33
- if (n) return y();
34
- u();
35
- }, C = () => {
36
- if (b) return s("year");
37
- if (n) return s("decade");
38
- }, D = () => o ? z() : n ? a(r, "yyyy") : a(r, "MMMM yyyy", { locale: $ }), z = () => {
39
- if (!r) return "";
40
- const c = B({
41
- start: E(r),
42
- end: R(r)
43
- }), k = m.first(c), v = m.last(c);
44
- return `${a(k, "yyyy")} - ${a(v, "yyyy")}`;
45
- }, M = L(D, [r, e]);
46
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: "ui-flex ui-items-center ui-justify-center", children: [
47
- /* @__PURE__ */ t.jsxs(
48
- l,
49
- {
50
- onClick: g,
51
- size: "icon",
52
- variant: "ghost",
53
- ...h,
54
- children: [
55
- /* @__PURE__ */ t.jsx(I, { size: 14 }),
56
- /* @__PURE__ */ t.jsx("span", { className: "ui-sr-only", children: "Ir a anterior" })
57
- ]
58
- }
59
- ),
60
- /* @__PURE__ */ t.jsx(
61
- "button",
62
- {
63
- onClick: C,
64
- disabled: o,
65
- ...i,
66
- type: "button",
67
- className: F(
68
- "ui-font-semibold ui-pb-px ui-text-gray-900 ui-text-lg ui-text-blue-bell ui-select-none ui-min-w-[60%] ui-capitalize",
69
- i == null ? void 0 : i.className
70
- ),
71
- children: M
72
- }
73
- ),
74
- /* @__PURE__ */ t.jsxs(
75
- l,
76
- {
77
- onClick: N,
78
- size: "icon",
79
- variant: "ghost",
80
- ...j,
81
- children: [
82
- /* @__PURE__ */ t.jsx(O, { size: 14 }),
83
- /* @__PURE__ */ t.jsx("span", { className: "ui-sr-only", children: "Ir a siguiente" })
84
- ]
85
- }
86
- )
87
- ] }) });
88
- };
89
- Y.displayName = "CalendarNavigation";
1
+ import * as l from "react";
2
+ import { composeRefs as u } from "./index.es140.js";
3
+ import { j as c } from "./index.es82.js";
4
+ var d = l.forwardRef((e, n) => {
5
+ const { children: r, ...t } = e, o = l.Children.toArray(r), i = o.find(g);
6
+ if (i) {
7
+ const s = i.props.children, a = o.map((p) => p === i ? l.Children.count(s) > 1 ? l.Children.only(null) : l.isValidElement(s) ? s.props.children : null : p);
8
+ return /* @__PURE__ */ c.jsx(f, { ...t, ref: n, children: l.isValidElement(s) ? l.cloneElement(s, void 0, a) : null });
9
+ }
10
+ return /* @__PURE__ */ c.jsx(f, { ...t, ref: n, children: r });
11
+ });
12
+ d.displayName = "Slot";
13
+ var f = l.forwardRef((e, n) => {
14
+ const { children: r, ...t } = e;
15
+ if (l.isValidElement(r)) {
16
+ const o = h(r);
17
+ return l.cloneElement(r, {
18
+ ...y(t, r.props),
19
+ // @ts-ignore
20
+ ref: n ? u(n, o) : o
21
+ });
22
+ }
23
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
24
+ });
25
+ f.displayName = "SlotClone";
26
+ var m = ({ children: e }) => /* @__PURE__ */ c.jsx(c.Fragment, { children: e });
27
+ function g(e) {
28
+ return l.isValidElement(e) && e.type === m;
29
+ }
30
+ function y(e, n) {
31
+ const r = { ...n };
32
+ for (const t in n) {
33
+ const o = e[t], i = n[t];
34
+ /^on[A-Z]/.test(t) ? o && i ? r[t] = (...a) => {
35
+ i(...a), o(...a);
36
+ } : o && (r[t] = o) : t === "style" ? r[t] = { ...o, ...i } : t === "className" && (r[t] = [o, i].filter(Boolean).join(" "));
37
+ }
38
+ return { ...e, ...r };
39
+ }
40
+ function h(e) {
41
+ var t, o;
42
+ let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, r = n && "isReactWarning" in n && n.isReactWarning;
43
+ return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
44
+ }
90
45
  export {
91
- Y as CalendarNavigation
46
+ d as Slot,
47
+ m as Slottable
92
48
  };
@@ -1,39 +1,32 @@
1
- import { j as r } from "./index.es82.js";
2
- import { useMemo as a } from "react";
3
- import { Day as c } from "./index.es243.js";
4
- import { WeekDays as h } from "./index.es244.js";
5
- import { startOfWeek as x } from "./index.es219.js";
6
- import { endOfWeek as l } from "./index.es202.js";
7
- import { endOfMonth as u } from "./index.es201.js";
8
- import { eachDayOfInterval as j } from "./index.es198.js";
9
- const M = ({
10
- navigationDate: t,
11
- disabled: e,
12
- weekDaysClassName: o,
13
- weekDaysProps: s,
14
- dayClassName: n,
15
- dayProps: f
16
- }) => {
17
- const i = a(() => j({
18
- start: x(t, { weekStartsOn: 1 }),
19
- end: l(u(t), { weekStartsOn: 1 })
20
- }), [t]);
21
- return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
22
- /* @__PURE__ */ r.jsx(h, { className: o, ...s }),
23
- /* @__PURE__ */ r.jsx("div", { className: "ui-grid ui-grid-cols-7 ui-mt-2 ui-text-sm", children: i.map((m, p) => /* @__PURE__ */ r.jsx(
24
- c,
25
- {
26
- day: m,
27
- className: n,
28
- ...f,
29
- navigationDate: t,
30
- disabled: e == null ? void 0 : e(m)
31
- },
32
- p
33
- )) })
34
- ] });
1
+ import { j as o } from "./index.es82.js";
2
+ import { useRef as r } from "react";
3
+ import i from "./index.es141.js";
4
+ import a from "./index.es113.js";
5
+ import { cn as m } from "./index.es72.js";
6
+ const s = ({ loading: e, ...t }) => {
7
+ const n = r(null);
8
+ return /* @__PURE__ */ o.jsx(
9
+ i,
10
+ {
11
+ unmountOnExit: !0,
12
+ mountOnEnter: !0,
13
+ timeout: 200,
14
+ in: e,
15
+ classNames: "btn-loader",
16
+ nodeRef: n,
17
+ children: /* @__PURE__ */ o.jsx(
18
+ a,
19
+ {
20
+ ...t,
21
+ ref: n,
22
+ "data-testid": "btn-loader",
23
+ className: m("ui-animate-spin", t.className)
24
+ }
25
+ )
26
+ }
27
+ );
35
28
  };
36
- M.displayName = "MonthView";
29
+ s.displayName = "LoadingIcon";
37
30
  export {
38
- M as MonthView
31
+ s as LoadingIcon
39
32
  };
@@ -1,26 +1,32 @@
1
- import { j as t } from "./index.es82.js";
2
- import { monthNames as o } from "./index.es30.js";
3
- import { setMonth as m } from "./index.es234.js";
4
- import { Button as n } from "./index.es27.js";
5
- import { formatDate as l } from "./index.es103.js";
6
- const c = ({ value: i, onChange: e }) => {
7
- const a = (r) => {
8
- const s = m(i, r);
9
- e(s);
10
- };
11
- return /* @__PURE__ */ t.jsx("div", { className: "ui-grid ui-grid-cols-3 ui-grow", children: o.map((r) => /* @__PURE__ */ t.jsx(
12
- n,
13
- {
14
- type: "button",
15
- className: "ui-h-full ui-rounded",
16
- onClick: () => a(o.indexOf(r)),
17
- variant: "ghost",
18
- children: /* @__PURE__ */ t.jsx("abbr", { "aria-label": `${r} ${l(i, "yyyy")}`, children: r })
1
+ import * as l from "react";
2
+ import { useCallbackRef as f } from "./index.es142.js";
3
+ function R({
4
+ prop: t,
5
+ defaultProp: r,
6
+ onChange: s = () => {
7
+ }
8
+ }) {
9
+ const [e, n] = v({ defaultProp: r, onChange: s }), o = t !== void 0, i = o ? t : e, u = f(s), d = l.useCallback(
10
+ (c) => {
11
+ if (o) {
12
+ const a = typeof c == "function" ? c(t) : c;
13
+ a !== t && u(a);
14
+ } else
15
+ n(c);
19
16
  },
20
- r
21
- )) });
22
- };
23
- c.displayName = "YearView";
17
+ [o, t, n, u]
18
+ );
19
+ return [i, d];
20
+ }
21
+ function v({
22
+ defaultProp: t,
23
+ onChange: r
24
+ }) {
25
+ const s = l.useState(t), [e] = s, n = l.useRef(e), o = f(r);
26
+ return l.useEffect(() => {
27
+ n.current !== e && (o(e), n.current = e);
28
+ }, [e, n, o]), s;
29
+ }
24
30
  export {
25
- c as YearView
31
+ R as useControllableState
26
32
  };
@@ -1,32 +1,11 @@
1
- import { j as o } from "./index.es82.js";
2
- import { useMemo as c } from "react";
3
- import { setYear as d } from "./index.es236.js";
4
- import { Button as f } from "./index.es27.js";
5
- import { formatDate as a } from "./index.es103.js";
6
- import { eachYearOfInterval as p } from "./index.es199.js";
7
- import { startOfDecade as u } from "./index.es237.js";
8
- import { endOfDecade as y } from "./index.es200.js";
9
- const l = ({ value: r, onChange: s }) => {
10
- const i = () => p({
11
- start: u(r),
12
- end: y(r)
13
- }), m = (t) => {
14
- const e = d(r, parseInt(a(t, "yyyy")));
15
- s(e);
16
- }, n = c(i, [r]);
17
- return /* @__PURE__ */ o.jsx("div", { className: "ui-grid ui-grid-cols-3 ui-grow", children: n.map((t, e) => /* @__PURE__ */ o.jsx(
18
- f,
19
- {
20
- onClick: () => m(t),
21
- className: "ui-h-full ui-rounded-none",
22
- type: "button",
23
- variant: "ghost",
24
- children: a(t, "yyyy")
25
- },
26
- e
27
- )) });
28
- };
29
- l.displayName = "DecadeView";
1
+ import e from "./index.es171.js";
2
+ /**
3
+ * @license lucide-react v0.379.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const t = e("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
30
9
  export {
31
- l as DecadeView
10
+ t as default
32
11
  };