@dimasbaguspm/versaur 0.0.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.
- package/README.md +81 -0
- package/dist/alert-DzSPXqwS.js +167 -0
- package/dist/app-bar-B4nQkgdL.js +92 -0
- package/dist/avatar-Bsn24V6g.js +91 -0
- package/dist/badge-DqLCHm9q.js +184 -0
- package/dist/bottom-bar-DOQ3gVwW.js +73 -0
- package/dist/breadcrumbs-PJV3izUu.js +59 -0
- package/dist/button-C8OibEPE.js +81 -0
- package/dist/button-float-B8tdLJkX.js +107 -0
- package/dist/button-icon-CWji4cBA.js +89 -0
- package/dist/calendar-CkLj89o2.js +112 -0
- package/dist/checkbox-input-CSboebwt.js +167 -0
- package/dist/chip-input-C1PJPDFq.js +189 -0
- package/dist/cn-Ca4KprQ1.js +2730 -0
- package/dist/components/alert/alert.atoms.d.ts +6 -0
- package/dist/components/alert/alert.d.ts +31 -0
- package/dist/components/alert/alert.stories.d.ts +42 -0
- package/dist/components/alert/helpers.d.ts +14 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/types.d.ts +50 -0
- package/dist/components/alert.js +4 -0
- package/dist/components/app-bar/app-bar.atoms.d.ts +21 -0
- package/dist/components/app-bar/app-bar.d.ts +8 -0
- package/dist/components/app-bar/app-bar.stories.d.ts +19 -0
- package/dist/components/app-bar/helpers.d.ts +6 -0
- package/dist/components/app-bar/index.d.ts +2 -0
- package/dist/components/app-bar/types.d.ts +39 -0
- package/dist/components/app-bar.js +4 -0
- package/dist/components/avatar/avatar.atoms.d.ts +13 -0
- package/dist/components/avatar/avatar.d.ts +24 -0
- package/dist/components/avatar/avatar.stories.d.ts +42 -0
- package/dist/components/avatar/helpers.d.ts +14 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/types.d.ts +46 -0
- package/dist/components/avatar.js +4 -0
- package/dist/components/badge/badge.d.ts +24 -0
- package/dist/components/badge/badge.stories.d.ts +46 -0
- package/dist/components/badge/helpers.d.ts +10 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/badge/types.d.ts +44 -0
- package/dist/components/badge.js +4 -0
- package/dist/components/bottom-bar/bottom-bar.atoms.d.ts +2 -0
- package/dist/components/bottom-bar/bottom-bar.d.ts +4 -0
- package/dist/components/bottom-bar/bottom-bar.stories.d.ts +6 -0
- package/dist/components/bottom-bar/helpers.d.ts +7 -0
- package/dist/components/bottom-bar/index.d.ts +2 -0
- package/dist/components/bottom-bar/types.d.ts +32 -0
- package/dist/components/bottom-bar.js +4 -0
- package/dist/components/breadcrumbs/breadcrumbs.atoms.d.ts +9 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +16 -0
- package/dist/components/breadcrumbs/breadcrumbs.stories.d.ts +7 -0
- package/dist/components/breadcrumbs/helpers.d.ts +7 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/breadcrumbs/types.d.ts +21 -0
- package/dist/components/breadcrumbs.js +4 -0
- package/dist/components/button/button.d.ts +3 -0
- package/dist/components/button/button.stories.d.ts +50 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/types.d.ts +30 -0
- package/dist/components/button-float/button-float.d.ts +8 -0
- package/dist/components/button-float/button-float.stories.d.ts +27 -0
- package/dist/components/button-float/helpers.d.ts +4 -0
- package/dist/components/button-float/index.d.ts +2 -0
- package/dist/components/button-float/types.d.ts +31 -0
- package/dist/components/button-float.js +4 -0
- package/dist/components/button-icon/button-icon.d.ts +3 -0
- package/dist/components/button-icon/button-icon.stories.d.ts +45 -0
- package/dist/components/button-icon/index.d.ts +2 -0
- package/dist/components/button-icon/types.d.ts +48 -0
- package/dist/components/button-icon.js +4 -0
- package/dist/components/button.js +4 -0
- package/dist/components/calendar/calendar.d.ts +8 -0
- package/dist/components/calendar/calendar.stories.d.ts +6 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/types.d.ts +20 -0
- package/dist/components/calendar.js +4 -0
- package/dist/components/checkbox-input/checkbox-input.atoms.d.ts +9 -0
- package/dist/components/checkbox-input/checkbox-input.d.ts +5 -0
- package/dist/components/checkbox-input/checkbox-input.stories.d.ts +44 -0
- package/dist/components/checkbox-input/context.d.ts +10 -0
- package/dist/components/checkbox-input/helpers.d.ts +11 -0
- package/dist/components/checkbox-input/index.d.ts +2 -0
- package/dist/components/checkbox-input/types.d.ts +46 -0
- package/dist/components/checkbox-input.js +4 -0
- package/dist/components/chip-input/chip-input.atoms.d.ts +10 -0
- package/dist/components/chip-input/chip-input.d.ts +5 -0
- package/dist/components/chip-input/chip-input.stories.d.ts +12 -0
- package/dist/components/chip-input/context.d.ts +11 -0
- package/dist/components/chip-input/helpers.d.ts +4 -0
- package/dist/components/chip-input/index.d.ts +2 -0
- package/dist/components/chip-input/types.d.ts +51 -0
- package/dist/components/chip-input.js +4 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.atoms.d.ts +13 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.d.ts +10 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.docked.d.ts +14 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.docked.stories.d.ts +10 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.modal.d.ts +15 -0
- package/dist/components/date-single-picker-input/date-single-picker-input.modal.stories.d.ts +10 -0
- package/dist/components/date-single-picker-input/helpers.d.ts +3 -0
- package/dist/components/date-single-picker-input/index.d.ts +2 -0
- package/dist/components/date-single-picker-input/types.d.ts +75 -0
- package/dist/components/date-single-picker-input/use-date-single-picker.d.ts +10 -0
- package/dist/components/date-single-picker-input.js +4 -0
- package/dist/components/drawer/context.d.ts +11 -0
- package/dist/components/drawer/drawer.atoms.d.ts +23 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.stories.d.ts +41 -0
- package/dist/components/drawer/helpers.d.ts +39 -0
- package/dist/components/drawer/index.d.ts +10 -0
- package/dist/components/drawer/types.d.ts +93 -0
- package/dist/components/drawer.js +9 -0
- package/dist/components/icon/helpers.d.ts +4 -0
- package/dist/components/icon/icon.d.ts +8 -0
- package/dist/components/icon/icon.stories.d.ts +39 -0
- package/dist/components/icon/index.d.ts +2 -0
- package/dist/components/icon/types.d.ts +13 -0
- package/dist/components/icon.js +4 -0
- package/dist/components/index.d.ts +29 -0
- package/dist/components/loading-indicator/helpers.d.ts +9 -0
- package/dist/components/loading-indicator/index.d.ts +1 -0
- package/dist/components/loading-indicator/loading-indicator.atoms.d.ts +10 -0
- package/dist/components/loading-indicator/loading-indicator.d.ts +7 -0
- package/dist/components/loading-indicator/loading-indicator.stories.d.ts +16 -0
- package/dist/components/loading-indicator/types.d.ts +29 -0
- package/dist/components/loading-indicator.js +4 -0
- package/dist/components/menu/context.d.ts +13 -0
- package/dist/components/menu/helpers.d.ts +8 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.atoms.d.ts +14 -0
- package/dist/components/menu/menu.d.ts +7 -0
- package/dist/components/menu/menu.stories.d.ts +22 -0
- package/dist/components/menu/types.d.ts +36 -0
- package/dist/components/menu/use-menu.d.ts +3 -0
- package/dist/components/menu.js +4 -0
- package/dist/components/modal/helpers.d.ts +7 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/modal.atoms.d.ts +8 -0
- package/dist/components/modal/modal.d.ts +7 -0
- package/dist/components/modal/modal.stories.d.ts +13 -0
- package/dist/components/modal/types.d.ts +48 -0
- package/dist/components/modal/use-escape-close.d.ts +6 -0
- package/dist/components/modal/use-focus-trap.d.ts +6 -0
- package/dist/components/modal.js +4 -0
- package/dist/components/radio-input/context.d.ts +11 -0
- package/dist/components/radio-input/helpers.d.ts +11 -0
- package/dist/components/radio-input/index.d.ts +2 -0
- package/dist/components/radio-input/radio-input.atoms.d.ts +9 -0
- package/dist/components/radio-input/radio-input.d.ts +5 -0
- package/dist/components/radio-input/radio-input.stories.d.ts +74 -0
- package/dist/components/radio-input/types.d.ts +54 -0
- package/dist/components/radio-input.js +4 -0
- package/dist/components/segment-multiple-input/context.d.ts +12 -0
- package/dist/components/segment-multiple-input/helpers.d.ts +15 -0
- package/dist/components/segment-multiple-input/index.d.ts +2 -0
- package/dist/components/segment-multiple-input/segment-multiple-input.atoms.d.ts +12 -0
- package/dist/components/segment-multiple-input/segment-multiple-input.d.ts +7 -0
- package/dist/components/segment-multiple-input/segment-multiple-input.stories.d.ts +66 -0
- package/dist/components/segment-multiple-input/types.d.ts +55 -0
- package/dist/components/segment-multiple-input.js +4 -0
- package/dist/components/segment-single-input/context.d.ts +12 -0
- package/dist/components/segment-single-input/helpers.d.ts +15 -0
- package/dist/components/segment-single-input/index.d.ts +2 -0
- package/dist/components/segment-single-input/segment-single-input.atoms.d.ts +11 -0
- package/dist/components/segment-single-input/segment-single-input.d.ts +7 -0
- package/dist/components/segment-single-input/segment-single-input.stories.d.ts +57 -0
- package/dist/components/segment-single-input/types.d.ts +55 -0
- package/dist/components/segment-single-input.js +4 -0
- package/dist/components/select-input/helpers.d.ts +3 -0
- package/dist/components/select-input/index.d.ts +2 -0
- package/dist/components/select-input/select-input.d.ts +9 -0
- package/dist/components/select-input/select-input.stories.d.ts +50 -0
- package/dist/components/select-input/types.d.ts +29 -0
- package/dist/components/select-input.js +4 -0
- package/dist/components/skeleton/helpers.d.ts +6 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +6 -0
- package/dist/components/skeleton/skeleton.stories.d.ts +25 -0
- package/dist/components/skeleton/types.d.ts +17 -0
- package/dist/components/skeleton.js +4 -0
- package/dist/components/snackbar/helpers.d.ts +8 -0
- package/dist/components/snackbar/index.d.ts +2 -0
- package/dist/components/snackbar/snackbar.atoms.d.ts +10 -0
- package/dist/components/snackbar/snackbar.d.ts +6 -0
- package/dist/components/snackbar/snackbar.stories.d.ts +8 -0
- package/dist/components/snackbar/types.d.ts +40 -0
- package/dist/components/snackbar.js +4 -0
- package/dist/components/switch-input/helpers.d.ts +18 -0
- package/dist/components/switch-input/index.d.ts +3 -0
- package/dist/components/switch-input/switch-input.atoms.d.ts +28 -0
- package/dist/components/switch-input/switch-input.d.ts +6 -0
- package/dist/components/switch-input/switch-input.stories.d.ts +10 -0
- package/dist/components/switch-input/types.d.ts +49 -0
- package/dist/components/switch-input.js +7 -0
- package/dist/components/tabs/context.d.ts +3 -0
- package/dist/components/tabs/helpers.d.ts +8 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.atoms.d.ts +10 -0
- package/dist/components/tabs/tabs.d.ts +5 -0
- package/dist/components/tabs/tabs.stories.d.ts +17 -0
- package/dist/components/tabs/types.d.ts +41 -0
- package/dist/components/tabs/use-tab-indicator.d.ts +13 -0
- package/dist/components/tabs.js +4 -0
- package/dist/components/text/helpers.d.ts +18 -0
- package/dist/components/text/index.d.ts +2 -0
- package/dist/components/text/text.d.ts +7 -0
- package/dist/components/text/text.stories.d.ts +14 -0
- package/dist/components/text/types.d.ts +30 -0
- package/dist/components/text-input/helpers.d.ts +3 -0
- package/dist/components/text-input/index.d.ts +2 -0
- package/dist/components/text-input/text-input.d.ts +9 -0
- package/dist/components/text-input/text-input.stories.d.ts +20 -0
- package/dist/components/text-input/types.d.ts +33 -0
- package/dist/components/text-input.js +4 -0
- package/dist/components/text.js +4 -0
- package/dist/components/textarea-input/helpers.d.ts +4 -0
- package/dist/components/textarea-input/index.d.ts +2 -0
- package/dist/components/textarea-input/textarea-input.d.ts +10 -0
- package/dist/components/textarea-input/textarea-input.stories.d.ts +50 -0
- package/dist/components/textarea-input/types.d.ts +40 -0
- package/dist/components/textarea-input.js +4 -0
- package/dist/components/tile/helpers.d.ts +8 -0
- package/dist/components/tile/index.d.ts +2 -0
- package/dist/components/tile/tile.d.ts +11 -0
- package/dist/components/tile/tile.stories.d.ts +35 -0
- package/dist/components/tile/types.d.ts +23 -0
- package/dist/components/tile.js +4 -0
- package/dist/components/top-bar/helpers.d.ts +26 -0
- package/dist/components/top-bar/index.d.ts +2 -0
- package/dist/components/top-bar/top-bar.atoms.d.ts +6 -0
- package/dist/components/top-bar/top-bar.d.ts +8 -0
- package/dist/components/top-bar/top-bar.stories.d.ts +15 -0
- package/dist/components/top-bar/types.d.ts +38 -0
- package/dist/components/top-bar.js +4 -0
- package/dist/date-single-picker-input--Ew0O9NQ.js +252 -0
- package/dist/drawer-DrnAR2a4.js +218 -0
- package/dist/helpers-CEDtBUGM.js +37 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/icon-D-lTZMHY.js +44 -0
- package/dist/index-DU1SCUkk.js +329 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +68 -0
- package/dist/loading-indicator-BZMnT5PA.js +168 -0
- package/dist/menu-BZvilMF7.js +174 -0
- package/dist/modal-BGAtqMl9.js +149 -0
- package/dist/radio-input-BRGoevZY.js +173 -0
- package/dist/segment-multiple-input-VwHCqFd6.js +229 -0
- package/dist/segment-single-input-Cqoo7-C2.js +228 -0
- package/dist/select-input-DCb0usvK.js +108 -0
- package/dist/skeleton-D4X5USf_.js +59 -0
- package/dist/snackbar-CYias-fJ.js +79 -0
- package/dist/styles.css +115 -0
- package/dist/switch-input-C5s1lvYh.js +186 -0
- package/dist/tabs-C8aRKfxS.js +216 -0
- package/dist/text-B7e-au41.js +120 -0
- package/dist/text-input-BsWvUk_H.js +73 -0
- package/dist/textarea-input-DZExXEE8.js +102 -0
- package/dist/tile-Du7YciCG.js +51 -0
- package/dist/top-bar-ErHvwR4K.js +62 -0
- package/package.json +97 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { j as e } from "./index-DU1SCUkk.js";
|
|
2
|
+
import C, { useState as v, useEffect as T, useId as z, useRef as V, useCallback as b } from "react";
|
|
3
|
+
import { M as y } from "./modal-BGAtqMl9.js";
|
|
4
|
+
import { B as S } from "./button-C8OibEPE.js";
|
|
5
|
+
import { c as w } from "./cn-Ca4KprQ1.js";
|
|
6
|
+
import { t as _ } from "./helpers-CEDtBUGM.js";
|
|
7
|
+
import { M as j } from "./menu-BZvilMF7.js";
|
|
8
|
+
import { C as N } from "./calendar-CkLj89o2.js";
|
|
9
|
+
const q = _, I = C.forwardRef(
|
|
10
|
+
({
|
|
11
|
+
leftContent: n,
|
|
12
|
+
rightContent: a,
|
|
13
|
+
hasError: t,
|
|
14
|
+
variant: c = "primary",
|
|
15
|
+
value: d,
|
|
16
|
+
placeholder: o = "Select date",
|
|
17
|
+
formatDate: s,
|
|
18
|
+
className: l,
|
|
19
|
+
...i
|
|
20
|
+
}, m) => /* @__PURE__ */ e.jsxs(
|
|
21
|
+
"button",
|
|
22
|
+
{
|
|
23
|
+
ref: m,
|
|
24
|
+
type: "button",
|
|
25
|
+
"aria-invalid": t,
|
|
26
|
+
className: w(
|
|
27
|
+
q({
|
|
28
|
+
variant: t ? "danger" : c
|
|
29
|
+
}),
|
|
30
|
+
n ? "pl-9" : "pl-3",
|
|
31
|
+
a ? "pr-9" : "pr-3",
|
|
32
|
+
"h-10 flex items-center justify-between cursor-pointer w-full relative",
|
|
33
|
+
"text-left",
|
|
34
|
+
l
|
|
35
|
+
),
|
|
36
|
+
...i,
|
|
37
|
+
children: [
|
|
38
|
+
n && /* @__PURE__ */ e.jsx(
|
|
39
|
+
"span",
|
|
40
|
+
{
|
|
41
|
+
className: "absolute left-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
42
|
+
"data-testid": "left-content",
|
|
43
|
+
children: n
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
/* @__PURE__ */ e.jsx(
|
|
47
|
+
"span",
|
|
48
|
+
{
|
|
49
|
+
className: w(
|
|
50
|
+
"flex-1",
|
|
51
|
+
n ? "ml-2" : "",
|
|
52
|
+
a ? "mr-2" : ""
|
|
53
|
+
),
|
|
54
|
+
children: s ? s(d) : o
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
a && /* @__PURE__ */ e.jsx(
|
|
58
|
+
"span",
|
|
59
|
+
{
|
|
60
|
+
className: "absolute right-2.5 top-0 bottom-0 pointer-events-none text-gray-500 flex items-center justify-center w-5",
|
|
61
|
+
"data-testid": "right-content",
|
|
62
|
+
children: a
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
68
|
+
);
|
|
69
|
+
I.displayName = "DateSinglePickerTrigger";
|
|
70
|
+
const A = ({
|
|
71
|
+
open: n,
|
|
72
|
+
value: a,
|
|
73
|
+
onChange: t,
|
|
74
|
+
handleMenuClose: c
|
|
75
|
+
}) => /* @__PURE__ */ e.jsxs(j, { isOpen: n, onOutsideClick: c, children: [
|
|
76
|
+
/* @__PURE__ */ e.jsx(j.Trigger, { className: "absolute top-[90%] left-0", children: /* @__PURE__ */ e.jsx("span", { "aria-hidden": "true" }) }),
|
|
77
|
+
/* @__PURE__ */ e.jsx(j.Content, { className: "drop-shadow-lg rounded-lg bg-white border border-neutral", children: /* @__PURE__ */ e.jsx(N, { value: a, onChange: t }) })
|
|
78
|
+
] }), L = ({
|
|
79
|
+
open: n,
|
|
80
|
+
setOpen: a,
|
|
81
|
+
value: t,
|
|
82
|
+
onChange: c,
|
|
83
|
+
label: d,
|
|
84
|
+
buttonRef: o
|
|
85
|
+
}) => {
|
|
86
|
+
const [s, l] = v(
|
|
87
|
+
t
|
|
88
|
+
);
|
|
89
|
+
T(() => {
|
|
90
|
+
l(t);
|
|
91
|
+
}, [t, n]);
|
|
92
|
+
const i = () => {
|
|
93
|
+
a(!1), l(t), o.current?.focus();
|
|
94
|
+
}, m = () => {
|
|
95
|
+
s && (c(s), a(!1), o.current?.focus());
|
|
96
|
+
};
|
|
97
|
+
return /* @__PURE__ */ e.jsxs(
|
|
98
|
+
y,
|
|
99
|
+
{
|
|
100
|
+
isOpen: n,
|
|
101
|
+
onOpenChange: a,
|
|
102
|
+
placement: "top",
|
|
103
|
+
size: "md",
|
|
104
|
+
"aria-label": d ? String(d) : "Select date",
|
|
105
|
+
disableOverlayClose: !1,
|
|
106
|
+
disableEscClose: !1,
|
|
107
|
+
children: [
|
|
108
|
+
/* @__PURE__ */ e.jsx(y.Body, { className: "px-2", children: /* @__PURE__ */ e.jsx(N, { value: s, onChange: l }) }),
|
|
109
|
+
/* @__PURE__ */ e.jsxs(y.Footer, { className: "px-6", children: [
|
|
110
|
+
/* @__PURE__ */ e.jsx(
|
|
111
|
+
S,
|
|
112
|
+
{
|
|
113
|
+
onClick: i,
|
|
114
|
+
variant: "ghost",
|
|
115
|
+
type: "button",
|
|
116
|
+
size: "sm",
|
|
117
|
+
children: "Cancel"
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ e.jsx(
|
|
121
|
+
S,
|
|
122
|
+
{
|
|
123
|
+
onClick: m,
|
|
124
|
+
variant: "primary",
|
|
125
|
+
type: "button",
|
|
126
|
+
disabled: !s,
|
|
127
|
+
size: "sm",
|
|
128
|
+
children: "Confirm"
|
|
129
|
+
}
|
|
130
|
+
)
|
|
131
|
+
] })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
function $({ id: n }) {
|
|
137
|
+
const [a, t] = v(!1), c = z(), d = n || c, o = V(null), s = b(
|
|
138
|
+
(i) => {
|
|
139
|
+
(i.key === "ArrowDown" || i.key === "Enter" || i.key === " ") && t(!0);
|
|
140
|
+
},
|
|
141
|
+
[]
|
|
142
|
+
), l = b(() => {
|
|
143
|
+
t(!1), o.current?.focus();
|
|
144
|
+
}, []);
|
|
145
|
+
return {
|
|
146
|
+
open: a,
|
|
147
|
+
setOpen: t,
|
|
148
|
+
inputId: d,
|
|
149
|
+
buttonRef: o,
|
|
150
|
+
handleKeyDown: s,
|
|
151
|
+
handleMenuClose: l
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const Z = C.forwardRef(
|
|
155
|
+
({
|
|
156
|
+
value: n,
|
|
157
|
+
onChange: a,
|
|
158
|
+
label: t,
|
|
159
|
+
leftContent: c,
|
|
160
|
+
rightContent: d,
|
|
161
|
+
helperText: o,
|
|
162
|
+
error: s,
|
|
163
|
+
variant: l = "primary",
|
|
164
|
+
disabled: i,
|
|
165
|
+
placeholder: m = "Select date",
|
|
166
|
+
id: M,
|
|
167
|
+
type: P = "docked",
|
|
168
|
+
...x
|
|
169
|
+
}, u) => {
|
|
170
|
+
if (n === void 0 || typeof a != "function")
|
|
171
|
+
throw new Error(
|
|
172
|
+
"DateSinglePickerInput is a controlled component: value and onChange are required."
|
|
173
|
+
);
|
|
174
|
+
const {
|
|
175
|
+
open: f,
|
|
176
|
+
setOpen: D,
|
|
177
|
+
inputId: p,
|
|
178
|
+
buttonRef: g,
|
|
179
|
+
handleKeyDown: O,
|
|
180
|
+
handleMenuClose: R
|
|
181
|
+
} = $({ id: M }), h = !!s, E = (r) => r ? r.toLocaleDateString(void 0, {
|
|
182
|
+
year: "numeric",
|
|
183
|
+
month: "short",
|
|
184
|
+
day: "numeric"
|
|
185
|
+
}) : typeof m == "string" ? m : "Select date", B = (r) => typeof x.formatDate == "function" ? x.formatDate(r) : E(r), F = () => D((r) => !r), K = O, k = (r) => {
|
|
186
|
+
a?.(r), g.current?.focus();
|
|
187
|
+
};
|
|
188
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "relative w-full", children: [
|
|
189
|
+
/* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
|
|
190
|
+
t && /* @__PURE__ */ e.jsx(
|
|
191
|
+
"label",
|
|
192
|
+
{
|
|
193
|
+
htmlFor: p,
|
|
194
|
+
className: "block text-sm font-medium text-foreground mb-2",
|
|
195
|
+
children: t
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ e.jsx(
|
|
199
|
+
I,
|
|
200
|
+
{
|
|
201
|
+
ref: (r) => {
|
|
202
|
+
g.current = r, typeof u == "function" ? u(r) : u && (u.current = r);
|
|
203
|
+
},
|
|
204
|
+
id: p,
|
|
205
|
+
"aria-haspopup": "dialog",
|
|
206
|
+
"aria-expanded": f,
|
|
207
|
+
"aria-controls": f ? `${p}-calendar` : void 0,
|
|
208
|
+
"aria-invalid": h,
|
|
209
|
+
"aria-disabled": i,
|
|
210
|
+
disabled: i,
|
|
211
|
+
leftContent: c,
|
|
212
|
+
rightContent: d,
|
|
213
|
+
hasError: h,
|
|
214
|
+
variant: l,
|
|
215
|
+
value: n,
|
|
216
|
+
placeholder: typeof m == "string" ? m : "Select date",
|
|
217
|
+
formatDate: B,
|
|
218
|
+
onClick: F,
|
|
219
|
+
onKeyDown: K,
|
|
220
|
+
tabIndex: 0,
|
|
221
|
+
...x
|
|
222
|
+
}
|
|
223
|
+
),
|
|
224
|
+
h && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-danger", role: "alert", children: s }),
|
|
225
|
+
o && /* @__PURE__ */ e.jsx("div", { className: "mt-1 text-sm text-muted-foreground", children: o })
|
|
226
|
+
] }),
|
|
227
|
+
P === "docked" ? /* @__PURE__ */ e.jsx(
|
|
228
|
+
A,
|
|
229
|
+
{
|
|
230
|
+
open: f,
|
|
231
|
+
value: n,
|
|
232
|
+
onChange: k,
|
|
233
|
+
inputId: p,
|
|
234
|
+
handleMenuClose: R
|
|
235
|
+
}
|
|
236
|
+
) : /* @__PURE__ */ e.jsx(
|
|
237
|
+
L,
|
|
238
|
+
{
|
|
239
|
+
open: f,
|
|
240
|
+
setOpen: D,
|
|
241
|
+
value: n,
|
|
242
|
+
onChange: k,
|
|
243
|
+
label: typeof t == "string" ? t : void 0,
|
|
244
|
+
buttonRef: g
|
|
245
|
+
}
|
|
246
|
+
)
|
|
247
|
+
] });
|
|
248
|
+
}
|
|
249
|
+
);
|
|
250
|
+
export {
|
|
251
|
+
Z as D
|
|
252
|
+
};
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { c as d, j as s } from "./index-DU1SCUkk.js";
|
|
2
|
+
import i, { createContext as g, useContext as h, useCallback as p, useEffect as y } from "react";
|
|
3
|
+
import { c as l } from "./cn-Ca4KprQ1.js";
|
|
4
|
+
const w = g(null);
|
|
5
|
+
function c() {
|
|
6
|
+
const t = h(w);
|
|
7
|
+
if (!t)
|
|
8
|
+
throw new Error(
|
|
9
|
+
"Drawer components must be used within a DrawerRoot component"
|
|
10
|
+
);
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
const j = d(
|
|
14
|
+
"fixed inset-0 z-50 transition-opacity duration-300 bg-black/30 backdrop-blur-md",
|
|
15
|
+
{
|
|
16
|
+
variants: {
|
|
17
|
+
state: {
|
|
18
|
+
open: "opacity-100",
|
|
19
|
+
closed: "opacity-0 pointer-events-none"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
state: "closed"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
), k = d(
|
|
27
|
+
"fixed z-50 shadow-xl transition-transform duration-300 ease-in-out flex flex-col",
|
|
28
|
+
{
|
|
29
|
+
variants: {
|
|
30
|
+
position: {
|
|
31
|
+
left: "left-0 top-0 bottom-0 border-r",
|
|
32
|
+
right: "right-0 top-0 bottom-0 border-l"
|
|
33
|
+
},
|
|
34
|
+
size: {
|
|
35
|
+
sm: "w-80",
|
|
36
|
+
md: "w-96",
|
|
37
|
+
lg: "w-[28rem]",
|
|
38
|
+
xl: "w-[32rem]",
|
|
39
|
+
"3/4": "w-[75vw]",
|
|
40
|
+
full: "w-full"
|
|
41
|
+
},
|
|
42
|
+
variant: {
|
|
43
|
+
default: "bg-white border-gray-200",
|
|
44
|
+
glass: "bg-white/10 backdrop-blur-lg border-white/20"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
defaultVariants: {
|
|
48
|
+
position: "right",
|
|
49
|
+
size: "md",
|
|
50
|
+
variant: "default"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
), D = d("flex-shrink-0 px-6 py-4 border-b", {
|
|
54
|
+
variants: {
|
|
55
|
+
variant: {
|
|
56
|
+
default: "bg-white border-gray-200",
|
|
57
|
+
glass: "bg-transparent border-white/10"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultVariants: {
|
|
61
|
+
variant: "default"
|
|
62
|
+
}
|
|
63
|
+
}), V = d("flex-1 overflow-y-auto px-6 py-4", {
|
|
64
|
+
variants: {
|
|
65
|
+
variant: {
|
|
66
|
+
default: "bg-white",
|
|
67
|
+
glass: "bg-transparent"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
defaultVariants: {
|
|
71
|
+
variant: "default"
|
|
72
|
+
}
|
|
73
|
+
}), C = d("flex-shrink-0 px-6 py-4 border-t", {
|
|
74
|
+
variants: {
|
|
75
|
+
variant: {
|
|
76
|
+
default: "bg-white border-gray-200",
|
|
77
|
+
glass: "bg-transparent border-white/10"
|
|
78
|
+
},
|
|
79
|
+
responsiveFlex: {
|
|
80
|
+
true: "flex flex-row gap-3 sm:justify-end [&>*]:sm:flex-grow-0 [&>*]:flex-grow",
|
|
81
|
+
false: "flex gap-2"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
variant: "default",
|
|
86
|
+
responsiveFlex: !0
|
|
87
|
+
}
|
|
88
|
+
}), R = i.forwardRef(({ className: t, ...e }, a) => {
|
|
89
|
+
const { isOpen: r, onClose: o } = c(), n = () => {
|
|
90
|
+
o();
|
|
91
|
+
};
|
|
92
|
+
return /* @__PURE__ */ s.jsx(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
ref: a,
|
|
96
|
+
onClick: n,
|
|
97
|
+
className: l(
|
|
98
|
+
j({
|
|
99
|
+
state: r ? "open" : "closed"
|
|
100
|
+
}),
|
|
101
|
+
t
|
|
102
|
+
),
|
|
103
|
+
...e
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}), E = i.forwardRef(
|
|
107
|
+
({ children: t, className: e, ...a }, r) => {
|
|
108
|
+
const { variant: o } = c();
|
|
109
|
+
return /* @__PURE__ */ s.jsx(
|
|
110
|
+
"div",
|
|
111
|
+
{
|
|
112
|
+
ref: r,
|
|
113
|
+
className: l(D({ variant: o }), e),
|
|
114
|
+
...a,
|
|
115
|
+
children: t
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
), N = i.forwardRef(
|
|
120
|
+
({ children: t, className: e, ...a }, r) => {
|
|
121
|
+
const { variant: o } = c();
|
|
122
|
+
return /* @__PURE__ */ s.jsx(
|
|
123
|
+
"div",
|
|
124
|
+
{
|
|
125
|
+
ref: r,
|
|
126
|
+
className: l(V({ variant: o }), e),
|
|
127
|
+
...a,
|
|
128
|
+
children: t
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
), F = i.forwardRef(
|
|
133
|
+
({ children: t, className: e, responsiveFlex: a = !0, ...r }, o) => {
|
|
134
|
+
const { variant: n } = c();
|
|
135
|
+
return /* @__PURE__ */ s.jsx(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
ref: o,
|
|
139
|
+
className: l(
|
|
140
|
+
C({ variant: n, responsiveFlex: a }),
|
|
141
|
+
e
|
|
142
|
+
),
|
|
143
|
+
...r,
|
|
144
|
+
children: t
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
), z = ({
|
|
149
|
+
children: t,
|
|
150
|
+
isOpen: e,
|
|
151
|
+
onClose: a,
|
|
152
|
+
position: r = "right",
|
|
153
|
+
size: o = "md",
|
|
154
|
+
variant: n = "default",
|
|
155
|
+
className: v,
|
|
156
|
+
...x
|
|
157
|
+
}) => {
|
|
158
|
+
const f = p(() => {
|
|
159
|
+
a(!1);
|
|
160
|
+
}, [a]), m = {
|
|
161
|
+
isOpen: e,
|
|
162
|
+
onClose: f,
|
|
163
|
+
position: r,
|
|
164
|
+
size: o,
|
|
165
|
+
variant: n
|
|
166
|
+
};
|
|
167
|
+
return y(() => {
|
|
168
|
+
const u = (b) => {
|
|
169
|
+
b.key === "Escape" && e && f();
|
|
170
|
+
};
|
|
171
|
+
return e && (document.addEventListener("keydown", u), document.body.style.overflow = "hidden"), () => {
|
|
172
|
+
document.removeEventListener("keydown", u), document.body.style.overflow = "unset";
|
|
173
|
+
};
|
|
174
|
+
}, [e, f]), /* @__PURE__ */ s.jsx(w.Provider, { value: m, children: /* @__PURE__ */ s.jsxs(
|
|
175
|
+
"div",
|
|
176
|
+
{
|
|
177
|
+
className: l(
|
|
178
|
+
"fixed z-50 inset-0 pointer-events-none",
|
|
179
|
+
e && "pointer-events-auto"
|
|
180
|
+
),
|
|
181
|
+
children: [
|
|
182
|
+
/* @__PURE__ */ s.jsx(R, {}),
|
|
183
|
+
/* @__PURE__ */ s.jsx(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
role: e ? "dialog" : void 0,
|
|
187
|
+
"aria-modal": e ? "true" : void 0,
|
|
188
|
+
className: l(
|
|
189
|
+
k({
|
|
190
|
+
position: r,
|
|
191
|
+
size: o,
|
|
192
|
+
variant: n
|
|
193
|
+
}),
|
|
194
|
+
// Apply closed transform when not open
|
|
195
|
+
!e && r === "left" && "-translate-x-full",
|
|
196
|
+
!e && r === "right" && "translate-x-full",
|
|
197
|
+
v
|
|
198
|
+
),
|
|
199
|
+
...x,
|
|
200
|
+
children: e && t
|
|
201
|
+
}
|
|
202
|
+
)
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
) });
|
|
206
|
+
}, _ = Object.assign(z, {
|
|
207
|
+
Header: E,
|
|
208
|
+
Body: N,
|
|
209
|
+
Footer: F
|
|
210
|
+
});
|
|
211
|
+
export {
|
|
212
|
+
_ as D,
|
|
213
|
+
R as a,
|
|
214
|
+
E as b,
|
|
215
|
+
N as c,
|
|
216
|
+
F as d,
|
|
217
|
+
c as u
|
|
218
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { c as r } from "./index-DU1SCUkk.js";
|
|
2
|
+
const e = r(
|
|
3
|
+
"block w-full rounded-md border bg-white transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none disabled:bg-gray-50",
|
|
4
|
+
{
|
|
5
|
+
variants: {
|
|
6
|
+
variant: {
|
|
7
|
+
// Core variants using Versaur color system
|
|
8
|
+
primary: "border-coral/30 text-foreground focus:border-coral focus:ring-coral/20",
|
|
9
|
+
secondary: "border-sage/30 text-foreground focus:border-sage focus:ring-sage/20",
|
|
10
|
+
tertiary: "border-mist/30 text-foreground focus:border-mist focus:ring-mist/20",
|
|
11
|
+
ghost: "border-slate/30 text-foreground focus:border-slate focus:ring-slate/20",
|
|
12
|
+
neutral: "border-gray-300 text-foreground focus:border-gray-400 focus:ring-gray-400/20",
|
|
13
|
+
// Outline variants
|
|
14
|
+
"primary-outline": "border-coral text-foreground focus:border-coral focus:ring-coral/20",
|
|
15
|
+
"secondary-outline": "border-sage text-foreground focus:border-sage focus:ring-sage/20",
|
|
16
|
+
"tertiary-outline": "border-mist text-foreground focus:border-mist focus:ring-mist/20",
|
|
17
|
+
"ghost-outline": "border-slate text-foreground focus:border-slate focus:ring-slate/20",
|
|
18
|
+
"neutral-outline": "border-gray-400 text-foreground focus:border-gray-500 focus:ring-gray-500/20",
|
|
19
|
+
// Semantic variants
|
|
20
|
+
success: "border-success/30 text-foreground focus:border-success focus:ring-success/20",
|
|
21
|
+
"success-outline": "border-success text-foreground focus:border-success focus:ring-success/20",
|
|
22
|
+
info: "border-info/30 text-foreground focus:border-info focus:ring-info/20",
|
|
23
|
+
"info-outline": "border-info text-foreground focus:border-info focus:ring-info/20",
|
|
24
|
+
warning: "border-warning/30 text-foreground focus:border-warning focus:ring-warning/20",
|
|
25
|
+
"warning-outline": "border-warning text-foreground focus:border-warning focus:ring-warning/20",
|
|
26
|
+
danger: "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20",
|
|
27
|
+
"danger-outline": "border-danger bg-danger/5 text-foreground focus:border-danger focus:ring-danger/20"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
variant: "primary"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
export {
|
|
36
|
+
e as t
|
|
37
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { c as s, j as n } from "./index-DU1SCUkk.js";
|
|
2
|
+
import "react";
|
|
3
|
+
const i = s("inline-flex items-center justify-center", {
|
|
4
|
+
variants: {
|
|
5
|
+
size: {
|
|
6
|
+
xs: "w-3 h-3",
|
|
7
|
+
sm: "w-4 h-4",
|
|
8
|
+
md: "w-5 h-5",
|
|
9
|
+
lg: "w-6 h-6",
|
|
10
|
+
xl: "w-8 h-8"
|
|
11
|
+
},
|
|
12
|
+
color: {
|
|
13
|
+
primary: "text-primary",
|
|
14
|
+
secondary: "text-secondary",
|
|
15
|
+
tertiary: "text-tertiary",
|
|
16
|
+
ghost: "text-ghost",
|
|
17
|
+
neutral: "text-neutral",
|
|
18
|
+
success: "text-success",
|
|
19
|
+
info: "text-info",
|
|
20
|
+
warning: "text-warning",
|
|
21
|
+
danger: "text-danger"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
size: "md",
|
|
26
|
+
color: "primary"
|
|
27
|
+
}
|
|
28
|
+
}), m = ({
|
|
29
|
+
color: e = "primary",
|
|
30
|
+
size: r = "md",
|
|
31
|
+
children: a,
|
|
32
|
+
...t
|
|
33
|
+
}) => /* @__PURE__ */ n.jsx(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
className: i({ color: e, size: r, className: t.className }),
|
|
37
|
+
"aria-hidden": "true",
|
|
38
|
+
...t,
|
|
39
|
+
children: a
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
export {
|
|
43
|
+
m as I
|
|
44
|
+
};
|