@dimasbaguspm/versaur 0.0.14 → 0.0.16
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.
- package/dist/js/bottom-sheet-Difan0U1.js +340 -0
- package/dist/js/{calendar-B9rIZCdo.js → calendar-CUjVZ7Ap.js} +18 -19
- package/dist/js/enforce-subpath-import.js +1 -0
- package/dist/js/feedbacks/index.js +1 -1
- package/dist/js/{form-layout-PLH-7bWq.js → form-layout-4ASWdXn8.js} +11 -12
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{cn-BKwT3erk.js → index-DOdDlCoL.js} +788 -463
- package/dist/js/index.js +30 -29
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/{menu-oRrbZAAy.js → menu-Bm-yPIMN.js} +5 -6
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +15 -14
- package/dist/js/{skeleton-Ma-Fcs06.js → skeleton-BNZyaRjo.js} +5 -6
- package/dist/js/{switch-input-o8oO4Rf4.js → switch-input-Bx6_2zG9.js} +3 -4
- package/dist/js/{tabs-DSeR5XxX.js → tabs-BbOkYchB.js} +5 -6
- package/dist/js/{tile-8hqVMf2m.js → tile-BjhJ5Mvl.js} +160 -113
- package/dist/types/overlays/bottom-sheet/index.d.ts +1 -1
- package/dist/types/primitive/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/js/bottom-sheet-CBLNEX4F.js +0 -281
- package/dist/js/bottom-sheet.atoms-DFMOaMsU.js +0 -78
- package/dist/js/index-Dmu_fHni.js +0 -329
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
import { c as d, j as o, a as l } from "./index-DOdDlCoL.js";
|
|
2
|
+
import u, { createContext as y, useContext as j, forwardRef as i, useCallback as k, useEffect as w } from "react";
|
|
3
|
+
const p = y(null);
|
|
4
|
+
function m() {
|
|
5
|
+
const t = j(p);
|
|
6
|
+
if (!t)
|
|
7
|
+
throw new Error(
|
|
8
|
+
"Drawer components must be used within a DrawerRoot component"
|
|
9
|
+
);
|
|
10
|
+
return t;
|
|
11
|
+
}
|
|
12
|
+
const B = d(
|
|
13
|
+
"fixed inset-0 z-50 transition-opacity duration-300 bg-black/30 backdrop-blur-md",
|
|
14
|
+
{
|
|
15
|
+
variants: {
|
|
16
|
+
state: {
|
|
17
|
+
open: "opacity-100",
|
|
18
|
+
closed: "opacity-0 pointer-events-none"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
state: "closed"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
), V = d("fixed z-50 shadow-xl flex flex-col", {
|
|
26
|
+
variants: {
|
|
27
|
+
position: {
|
|
28
|
+
left: "left-0 top-0 bottom-0 border-r",
|
|
29
|
+
right: "right-0 top-0 bottom-0 border-l"
|
|
30
|
+
},
|
|
31
|
+
size: {
|
|
32
|
+
sm: "w-80",
|
|
33
|
+
md: "w-96",
|
|
34
|
+
lg: "w-[28rem]",
|
|
35
|
+
xl: "w-[32rem]",
|
|
36
|
+
"3/4": "w-[75vw]",
|
|
37
|
+
full: "w-full"
|
|
38
|
+
},
|
|
39
|
+
variant: {
|
|
40
|
+
default: "bg-white border-gray-200",
|
|
41
|
+
glass: "bg-white/10 backdrop-blur-lg border-white/20"
|
|
42
|
+
},
|
|
43
|
+
transitionType: {
|
|
44
|
+
slide: "transition-transform duration-300 ease-in-out",
|
|
45
|
+
fade: "transition-opacity duration-300 ease-in-out"
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
position: "right",
|
|
50
|
+
size: "md",
|
|
51
|
+
variant: "default",
|
|
52
|
+
transitionType: "slide"
|
|
53
|
+
}
|
|
54
|
+
}), N = d("flex-shrink-0 px-6", {
|
|
55
|
+
variants: {
|
|
56
|
+
variant: {
|
|
57
|
+
default: "bg-white",
|
|
58
|
+
glass: "bg-transparent "
|
|
59
|
+
},
|
|
60
|
+
tab: {
|
|
61
|
+
true: "pt-4 pb-2",
|
|
62
|
+
false: "border-b border-border py-4 "
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
defaultVariants: {
|
|
66
|
+
variant: "default",
|
|
67
|
+
tab: !1
|
|
68
|
+
}
|
|
69
|
+
}), D = d("flex-1 overflow-y-auto px-6 py-4", {
|
|
70
|
+
variants: {
|
|
71
|
+
variant: {
|
|
72
|
+
default: "bg-white",
|
|
73
|
+
glass: "bg-transparent"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
defaultVariants: {
|
|
77
|
+
variant: "default"
|
|
78
|
+
}
|
|
79
|
+
}), S = d("flex-shrink-0 px-6 py-4 border-t", {
|
|
80
|
+
variants: {
|
|
81
|
+
variant: {
|
|
82
|
+
default: "bg-white border-gray-200",
|
|
83
|
+
glass: "bg-transparent border-white/10"
|
|
84
|
+
},
|
|
85
|
+
responsiveFlex: {
|
|
86
|
+
true: "flex flex-row gap-3 sm:justify-end [&>*]:sm:flex-grow-0 [&>*]:flex-grow",
|
|
87
|
+
false: "flex gap-2"
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
variant: "default",
|
|
92
|
+
responsiveFlex: !0
|
|
93
|
+
}
|
|
94
|
+
}), E = u.forwardRef(({ className: t, ...e }, a) => {
|
|
95
|
+
const { isOpen: r, onClose: n } = m(), s = () => {
|
|
96
|
+
n();
|
|
97
|
+
};
|
|
98
|
+
return /* @__PURE__ */ o.jsx(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
ref: a,
|
|
102
|
+
onClick: s,
|
|
103
|
+
className: l(
|
|
104
|
+
B({
|
|
105
|
+
state: r ? "open" : "closed"
|
|
106
|
+
}),
|
|
107
|
+
t
|
|
108
|
+
),
|
|
109
|
+
...e
|
|
110
|
+
}
|
|
111
|
+
);
|
|
112
|
+
}), R = u.forwardRef(
|
|
113
|
+
({ children: t, className: e, hasTab: a, ...r }, n) => {
|
|
114
|
+
const { variant: s } = m();
|
|
115
|
+
return /* @__PURE__ */ o.jsx(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
ref: n,
|
|
119
|
+
className: l(
|
|
120
|
+
N({ variant: s, tab: !!a }),
|
|
121
|
+
e
|
|
122
|
+
),
|
|
123
|
+
...r,
|
|
124
|
+
children: t
|
|
125
|
+
}
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
), C = i(
|
|
129
|
+
({ children: t, className: e, ...a }, r) => /* @__PURE__ */ o.jsx("div", { ref: r, className: l("[&>div]:px-6", e), ...a, children: t })
|
|
130
|
+
), F = u.forwardRef(
|
|
131
|
+
({ children: t, className: e, ...a }, r) => {
|
|
132
|
+
const { variant: n } = m();
|
|
133
|
+
return /* @__PURE__ */ o.jsx(
|
|
134
|
+
"div",
|
|
135
|
+
{
|
|
136
|
+
ref: r,
|
|
137
|
+
className: l(D({ variant: n }), e),
|
|
138
|
+
...a,
|
|
139
|
+
children: t
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
), z = u.forwardRef(
|
|
144
|
+
({ children: t, className: e, responsiveFlex: a = !0, ...r }, n) => {
|
|
145
|
+
const { variant: s } = m();
|
|
146
|
+
return /* @__PURE__ */ o.jsx(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
ref: n,
|
|
150
|
+
className: l(
|
|
151
|
+
S({ variant: s, responsiveFlex: a }),
|
|
152
|
+
e
|
|
153
|
+
),
|
|
154
|
+
...r,
|
|
155
|
+
children: t
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
}
|
|
159
|
+
), H = ({
|
|
160
|
+
children: t,
|
|
161
|
+
isOpen: e,
|
|
162
|
+
onClose: a,
|
|
163
|
+
position: r = "right",
|
|
164
|
+
size: n = "md",
|
|
165
|
+
variant: s = "default",
|
|
166
|
+
transitionType: c = "slide",
|
|
167
|
+
className: f,
|
|
168
|
+
...b
|
|
169
|
+
}) => {
|
|
170
|
+
const x = k(() => {
|
|
171
|
+
a(!1);
|
|
172
|
+
}, [a]), h = {
|
|
173
|
+
isOpen: e,
|
|
174
|
+
onClose: x,
|
|
175
|
+
position: r,
|
|
176
|
+
size: n,
|
|
177
|
+
variant: s,
|
|
178
|
+
transitionType: c
|
|
179
|
+
};
|
|
180
|
+
return w(() => {
|
|
181
|
+
const v = (g) => {
|
|
182
|
+
g.key === "Escape" && e && x();
|
|
183
|
+
};
|
|
184
|
+
return e && (document.addEventListener("keydown", v), document.body.style.overflow = "hidden"), () => {
|
|
185
|
+
document.removeEventListener("keydown", v), document.body.style.overflow = "unset";
|
|
186
|
+
};
|
|
187
|
+
}, [e, x]), /* @__PURE__ */ o.jsx(p.Provider, { value: h, children: /* @__PURE__ */ o.jsxs(
|
|
188
|
+
"div",
|
|
189
|
+
{
|
|
190
|
+
className: l(
|
|
191
|
+
"fixed z-50 inset-0 pointer-events-none",
|
|
192
|
+
e && "pointer-events-auto"
|
|
193
|
+
),
|
|
194
|
+
children: [
|
|
195
|
+
/* @__PURE__ */ o.jsx(E, {}),
|
|
196
|
+
/* @__PURE__ */ o.jsx(
|
|
197
|
+
"div",
|
|
198
|
+
{
|
|
199
|
+
role: e ? "dialog" : void 0,
|
|
200
|
+
"aria-modal": e ? "true" : void 0,
|
|
201
|
+
className: l(
|
|
202
|
+
V({
|
|
203
|
+
position: r,
|
|
204
|
+
size: n,
|
|
205
|
+
variant: s,
|
|
206
|
+
transitionType: c
|
|
207
|
+
}),
|
|
208
|
+
c === "slide" ? [
|
|
209
|
+
!e && r === "left" && "-translate-x-full",
|
|
210
|
+
!e && r === "right" && "translate-x-full"
|
|
211
|
+
] : [
|
|
212
|
+
"left-0 right-0 top-0 bottom-0",
|
|
213
|
+
e ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
214
|
+
],
|
|
215
|
+
f
|
|
216
|
+
),
|
|
217
|
+
...b,
|
|
218
|
+
children: e && t
|
|
219
|
+
}
|
|
220
|
+
)
|
|
221
|
+
]
|
|
222
|
+
}
|
|
223
|
+
) });
|
|
224
|
+
}, U = Object.assign(H, {
|
|
225
|
+
Header: R,
|
|
226
|
+
Tab: C,
|
|
227
|
+
Body: F,
|
|
228
|
+
Footer: z
|
|
229
|
+
}), T = d(
|
|
230
|
+
[
|
|
231
|
+
"fixed left-0 bottom-0 z-50 w-full max-h-[90dvh] bg-background rounded-t-xl shadow-lg border-t border-border rounded-lg",
|
|
232
|
+
"transition-transform duration-300 ease-in-out will-change-transform"
|
|
233
|
+
],
|
|
234
|
+
{
|
|
235
|
+
variants: {
|
|
236
|
+
open: {
|
|
237
|
+
true: "translate-y-0",
|
|
238
|
+
false: "translate-y-full"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
defaultVariants: {
|
|
242
|
+
open: !1
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
), L = d(
|
|
246
|
+
["fixed inset-0 z-40 duration-300"],
|
|
247
|
+
{
|
|
248
|
+
variants: {
|
|
249
|
+
open: {
|
|
250
|
+
true: "backdrop-blur-md bg-foreground/30",
|
|
251
|
+
false: "pointer-events-none"
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
defaultVariants: {
|
|
255
|
+
open: !1
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
), I = d("px-4 pt-4 pb-2"), _ = d("px-4 py-2"), P = d("px-4 pt-2 pb-4"), q = i(function({ className: e, ...a }, r) {
|
|
259
|
+
return /* @__PURE__ */ o.jsx(
|
|
260
|
+
"h2",
|
|
261
|
+
{
|
|
262
|
+
ref: r,
|
|
263
|
+
className: ["text-lg font-semibold text-foreground", e].filter(Boolean).join(" "),
|
|
264
|
+
...a
|
|
265
|
+
}
|
|
266
|
+
);
|
|
267
|
+
}), A = i(({ className: t, ...e }, a) => /* @__PURE__ */ o.jsx(
|
|
268
|
+
"div",
|
|
269
|
+
{
|
|
270
|
+
ref: a,
|
|
271
|
+
className: I({ className: t }),
|
|
272
|
+
...e
|
|
273
|
+
}
|
|
274
|
+
)), G = i(
|
|
275
|
+
({ className: t, ...e }, a) => /* @__PURE__ */ o.jsx(
|
|
276
|
+
"div",
|
|
277
|
+
{
|
|
278
|
+
ref: a,
|
|
279
|
+
className: _({ className: t }),
|
|
280
|
+
...e
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
), J = i(({ className: t, ...e }, a) => /* @__PURE__ */ o.jsx(
|
|
284
|
+
"div",
|
|
285
|
+
{
|
|
286
|
+
ref: a,
|
|
287
|
+
className: P({ className: t }),
|
|
288
|
+
...e
|
|
289
|
+
}
|
|
290
|
+
)), K = i(
|
|
291
|
+
({ isOpen: t, children: e, className: a, onClose: r, ...n }, s) => {
|
|
292
|
+
w(() => {
|
|
293
|
+
const f = (b) => {
|
|
294
|
+
b.key === "Escape" && t && r();
|
|
295
|
+
};
|
|
296
|
+
return t && (document.addEventListener("keydown", f), document.body.style.overflow = "hidden"), () => {
|
|
297
|
+
document.removeEventListener("keydown", f), document.body.style.overflow = "unset";
|
|
298
|
+
};
|
|
299
|
+
}, [t, r]);
|
|
300
|
+
const c = () => {
|
|
301
|
+
r?.();
|
|
302
|
+
};
|
|
303
|
+
return /* @__PURE__ */ o.jsxs(o.Fragment, { children: [
|
|
304
|
+
/* @__PURE__ */ o.jsx(
|
|
305
|
+
"div",
|
|
306
|
+
{
|
|
307
|
+
className: L({ open: t }),
|
|
308
|
+
"aria-hidden": "true",
|
|
309
|
+
onClick: c
|
|
310
|
+
}
|
|
311
|
+
),
|
|
312
|
+
/* @__PURE__ */ o.jsx(
|
|
313
|
+
"div",
|
|
314
|
+
{
|
|
315
|
+
ref: s,
|
|
316
|
+
className: l(
|
|
317
|
+
T({
|
|
318
|
+
open: t
|
|
319
|
+
}),
|
|
320
|
+
a
|
|
321
|
+
),
|
|
322
|
+
role: "dialog",
|
|
323
|
+
"aria-modal": "true",
|
|
324
|
+
tabIndex: -1,
|
|
325
|
+
...n,
|
|
326
|
+
children: e
|
|
327
|
+
}
|
|
328
|
+
)
|
|
329
|
+
] });
|
|
330
|
+
}
|
|
331
|
+
), W = Object.assign(K, {
|
|
332
|
+
Header: A,
|
|
333
|
+
Title: q,
|
|
334
|
+
Body: G,
|
|
335
|
+
Footer: J
|
|
336
|
+
});
|
|
337
|
+
export {
|
|
338
|
+
W as B,
|
|
339
|
+
U as D
|
|
340
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as cva, j as jsxRuntimeExports, a as cn } from "./index-DOdDlCoL.js";
|
|
2
2
|
import React__default, { forwardRef, useState, useRef, useEffect, useCallback, createContext, useContext } from "react";
|
|
3
|
-
import { c as cn } from "./cn-BKwT3erk.js";
|
|
4
3
|
import { X, ChevronLeft, ChevronRight } from "lucide-react";
|
|
5
4
|
const calculatorRootVariants = cva(
|
|
6
5
|
"flex flex-col w-full max-w-xs rounded-lg bg-background",
|
|
@@ -314,7 +313,7 @@ const BUTTONS = [
|
|
|
314
313
|
"aria-label": "Calculator input"
|
|
315
314
|
}
|
|
316
315
|
),
|
|
317
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((
|
|
316
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex flex-col gap-1 mb-3", children: BUTTONS.map((w, v) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex w-full", children: w.map((h) => h === "⌫" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
318
317
|
ButtonIcon,
|
|
319
318
|
{
|
|
320
319
|
as: X,
|
|
@@ -497,7 +496,7 @@ const buttonVariants = cva(
|
|
|
497
496
|
ellipsis: c = !1,
|
|
498
497
|
fontSize: f,
|
|
499
498
|
fontWeight: d,
|
|
500
|
-
className:
|
|
499
|
+
className: w,
|
|
501
500
|
children: v,
|
|
502
501
|
...h
|
|
503
502
|
}, p) => {
|
|
@@ -511,7 +510,7 @@ const buttonVariants = cva(
|
|
|
511
510
|
"p",
|
|
512
511
|
"span",
|
|
513
512
|
"label"
|
|
514
|
-
].includes(r) ? r : "span", b = f ? `text-${f}` : "",
|
|
513
|
+
].includes(r) ? r : "span", b = f ? `text-${f}` : "", m = d ? `font-${d}` : "";
|
|
515
514
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
516
515
|
r,
|
|
517
516
|
{
|
|
@@ -529,8 +528,8 @@ const buttonVariants = cva(
|
|
|
529
528
|
as: u
|
|
530
529
|
}),
|
|
531
530
|
b,
|
|
532
|
-
|
|
533
|
-
|
|
531
|
+
m,
|
|
532
|
+
w
|
|
534
533
|
),
|
|
535
534
|
...h,
|
|
536
535
|
children: v
|
|
@@ -580,7 +579,7 @@ const CalendarHeader = () => {
|
|
|
580
579
|
] })
|
|
581
580
|
] });
|
|
582
581
|
}, CalendarWeekdays = () => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-7 px-4 text-ghost-500 mb-3", children: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"].map((r) => /* @__PURE__ */ jsxRuntimeExports.jsx(Text, { fontSize: "xs", color: "ghost", align: "center", children: r }, r)) }), CalendarDaysSingle = () => {
|
|
583
|
-
const r = useCalendarContext(), { year: e, month: t, value: i, onChange: l, setMonth: n, setYear: a } = r, c = (o, x) => new Date(o, x + 1, 0).getDate(), d = ((o, x) => new Date(o, x, 1).getDay())(e, t),
|
|
582
|
+
const r = useCalendarContext(), { year: e, month: t, value: i, onChange: l, setMonth: n, setYear: a } = r, c = (o, x) => new Date(o, x + 1, 0).getDate(), d = ((o, x) => new Date(o, x, 1).getDay())(e, t), w = c(e, t), v = t - 1 < 0 ? 11 : t - 1, h = t === 0 ? e - 1 : e, p = c(e, v), y = t === 11 ? 0 : t + 1, u = t === 11 ? e + 1 : e, b = [];
|
|
584
583
|
for (let o = 0; o < d; o++) {
|
|
585
584
|
const x = p - d + o + 1;
|
|
586
585
|
b.push(
|
|
@@ -599,7 +598,7 @@ const CalendarHeader = () => {
|
|
|
599
598
|
)
|
|
600
599
|
);
|
|
601
600
|
}
|
|
602
|
-
for (let o = 1; o <=
|
|
601
|
+
for (let o = 1; o <= w; o++) {
|
|
603
602
|
const x = i instanceof Date && i.getFullYear() === e && i.getMonth() === t && i.getDate() === o;
|
|
604
603
|
b.push(
|
|
605
604
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -627,8 +626,8 @@ const CalendarHeader = () => {
|
|
|
627
626
|
)
|
|
628
627
|
);
|
|
629
628
|
}
|
|
630
|
-
const
|
|
631
|
-
for (let o = 0; o < (
|
|
629
|
+
const m = d + w;
|
|
630
|
+
for (let o = 0; o < (m % 7 === 0 ? 0 : 7 - m % 7); o++)
|
|
632
631
|
b.push(
|
|
633
632
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
634
633
|
ButtonIcon,
|
|
@@ -646,15 +645,15 @@ const CalendarHeader = () => {
|
|
|
646
645
|
);
|
|
647
646
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "grid grid-cols-7 gap-2 px-4 pb-4", children: b });
|
|
648
647
|
}, CalendarDaysRange = () => {
|
|
649
|
-
const { year: r, month: e, value: t, onChange: i, setMonth: l, setYear: n } = useCalendarContext(), a = (s, g) => new Date(s, g + 1, 0).getDate(), f = ((s, g) => new Date(s, g, 1).getDay())(r, e), d = a(r, e),
|
|
648
|
+
const { year: r, month: e, value: t, onChange: i, setMonth: l, setYear: n } = useCalendarContext(), a = (s, g) => new Date(s, g + 1, 0).getDate(), f = ((s, g) => new Date(s, g, 1).getDay())(r, e), d = a(r, e), w = e - 1 < 0 ? 11 : e - 1, v = e === 0 ? r - 1 : r, h = a(r, w), p = e === 11 ? 0 : e + 1, y = e === 11 ? r + 1 : r, u = [], b = () => {
|
|
650
649
|
if (!Array.isArray(t)) return [null, null];
|
|
651
650
|
const [s, g] = t;
|
|
652
651
|
return !s && !g ? [null, null] : s && g ? s <= g ? [s, g] : [g, s] : [s, g];
|
|
653
|
-
}, [
|
|
654
|
-
if (!
|
|
652
|
+
}, [m, o] = b(), x = (s) => {
|
|
653
|
+
if (!m || !o) return !1;
|
|
655
654
|
const g = new Date(r, e, s);
|
|
656
|
-
return g >=
|
|
657
|
-
}, I = (s) =>
|
|
655
|
+
return g >= m && g <= o;
|
|
656
|
+
}, I = (s) => m ? m.getFullYear() === r && m.getMonth() === e && m.getDate() === s : !1, B = (s) => o ? o.getFullYear() === r && o.getMonth() === e && o.getDate() === s : !1;
|
|
658
657
|
for (let s = 0; s < f; s++) {
|
|
659
658
|
const g = h - f + s + 1;
|
|
660
659
|
u.push(
|
|
@@ -666,7 +665,7 @@ const CalendarHeader = () => {
|
|
|
666
665
|
"aria-label": "Previous month day",
|
|
667
666
|
variant: "ghost",
|
|
668
667
|
onClick: () => {
|
|
669
|
-
i?.([null, null]), l(
|
|
668
|
+
i?.([null, null]), l(w), n(v);
|
|
670
669
|
}
|
|
671
670
|
},
|
|
672
671
|
"prev-" + s
|
|
@@ -739,7 +738,7 @@ function useCalendar({
|
|
|
739
738
|
initialYear: i,
|
|
740
739
|
initialMonth: l
|
|
741
740
|
}) {
|
|
742
|
-
const [n, a] = useState(l), [c, f] = useState(i), [d,
|
|
741
|
+
const [n, a] = useState(l), [c, f] = useState(i), [d, w] = useState([
|
|
743
742
|
null,
|
|
744
743
|
null
|
|
745
744
|
]);
|
|
@@ -753,7 +752,7 @@ function useCalendar({
|
|
|
753
752
|
a(u), f(b), e === "single" && t?.(new Date(b, u, 1));
|
|
754
753
|
}, [n, c, e, t]), y = useCallback(
|
|
755
754
|
(u) => {
|
|
756
|
-
e === "single" ? t?.(u) : e === "range" && (
|
|
755
|
+
e === "single" ? t?.(u) : e === "range" && (w(u), t?.(u));
|
|
757
756
|
},
|
|
758
757
|
[e, t]
|
|
759
758
|
);
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as l } from "./cn-BKwT3erk.js";
|
|
1
|
+
import { c as i, j as o, a as l } from "./index-DOdDlCoL.js";
|
|
3
2
|
import * as p from "react";
|
|
4
3
|
import { forwardRef as n } from "react";
|
|
5
4
|
const u = i(
|
|
@@ -91,7 +90,7 @@ const u = i(
|
|
|
91
90
|
role: "banner",
|
|
92
91
|
children: e
|
|
93
92
|
}
|
|
94
|
-
),
|
|
93
|
+
), G = Object.assign(b, {
|
|
95
94
|
Leading: f,
|
|
96
95
|
Headline: v,
|
|
97
96
|
Subtitle: g,
|
|
@@ -162,7 +161,7 @@ const u = i(
|
|
|
162
161
|
...r,
|
|
163
162
|
children: e
|
|
164
163
|
}
|
|
165
|
-
),
|
|
164
|
+
), J = Object.assign(h, {
|
|
166
165
|
Item: w
|
|
167
166
|
}), T = i(
|
|
168
167
|
"w-full flex items-center px-6 py-4 mb-6 border-b border-border shadow-xs bg-white",
|
|
@@ -214,7 +213,7 @@ const u = i(
|
|
|
214
213
|
}
|
|
215
214
|
), z = n(
|
|
216
215
|
({ children: e, className: t, ...a }, s) => /* @__PURE__ */ o.jsx("header", { ref: s, className: T({ className: t }), ...a, children: e })
|
|
217
|
-
),
|
|
216
|
+
), K = Object.assign(z, {
|
|
218
217
|
Leading: F,
|
|
219
218
|
Trailing: k,
|
|
220
219
|
NavItem: O,
|
|
@@ -231,7 +230,7 @@ const u = i(
|
|
|
231
230
|
defaultVariants: {
|
|
232
231
|
type: "desktop"
|
|
233
232
|
}
|
|
234
|
-
}),
|
|
233
|
+
}), Q = p.forwardRef(
|
|
235
234
|
function({ type: t = "desktop", className: a, children: s, ...r }, c) {
|
|
236
235
|
return /* @__PURE__ */ o.jsx(
|
|
237
236
|
"div",
|
|
@@ -291,13 +290,13 @@ const u = i(
|
|
|
291
290
|
}
|
|
292
291
|
);
|
|
293
292
|
}
|
|
294
|
-
),
|
|
293
|
+
), U = Object.assign(E, {
|
|
295
294
|
Column: $
|
|
296
295
|
});
|
|
297
296
|
export {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
297
|
+
G as A,
|
|
298
|
+
J as B,
|
|
299
|
+
U as F,
|
|
300
|
+
Q as P,
|
|
301
|
+
K as T
|
|
303
302
|
};
|
package/dist/js/forms/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as e, a as n, b as p, D as s, R as u, c as i, S as I, d as c, g as S, j as h, i as l, h as r, e as T, T as g, f as m } from "../switch-input-
|
|
1
|
+
import { C as e, a as n, b as p, D as s, R as u, c as i, S as I, d as c, g as S, j as h, i as l, h as r, e as T, T as g, f as m } from "../switch-input-Bx6_2zG9.js";
|
|
2
2
|
export {
|
|
3
3
|
e as CalculatorInput,
|
|
4
4
|
n as CheckboxInput,
|