@dimasbaguspm/versaur 0.0.0 → 0.0.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.
- package/dist/components/bottom-bar/bottom-bar.atoms.d.ts +1 -1
- package/dist/components/bottom-bar/bottom-bar.d.ts +1 -1
- package/dist/components/bottom-bar/types.d.ts +3 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/index.js +6996 -66
- package/package.json +2 -10
- package/dist/alert-DzSPXqwS.js +0 -167
- package/dist/app-bar-B4nQkgdL.js +0 -92
- package/dist/avatar-Bsn24V6g.js +0 -91
- package/dist/badge-DqLCHm9q.js +0 -184
- package/dist/bottom-bar-DOQ3gVwW.js +0 -73
- package/dist/breadcrumbs-PJV3izUu.js +0 -59
- package/dist/button-C8OibEPE.js +0 -81
- package/dist/button-float-B8tdLJkX.js +0 -107
- package/dist/button-icon-CWji4cBA.js +0 -89
- package/dist/calendar-CkLj89o2.js +0 -112
- package/dist/checkbox-input-CSboebwt.js +0 -167
- package/dist/chip-input-C1PJPDFq.js +0 -189
- package/dist/cn-Ca4KprQ1.js +0 -2730
- package/dist/components/alert.js +0 -4
- package/dist/components/app-bar.js +0 -4
- package/dist/components/avatar.js +0 -4
- package/dist/components/badge.js +0 -4
- package/dist/components/bottom-bar.js +0 -4
- package/dist/components/breadcrumbs.js +0 -4
- package/dist/components/button-float.js +0 -4
- package/dist/components/button-icon.js +0 -4
- package/dist/components/button.js +0 -4
- package/dist/components/calendar.js +0 -4
- package/dist/components/checkbox-input.js +0 -4
- package/dist/components/chip-input.js +0 -4
- package/dist/components/date-single-picker-input.js +0 -4
- package/dist/components/drawer.js +0 -9
- package/dist/components/icon.js +0 -4
- package/dist/components/loading-indicator.js +0 -4
- package/dist/components/menu.js +0 -4
- package/dist/components/modal.js +0 -4
- package/dist/components/radio-input.js +0 -4
- package/dist/components/segment-multiple-input.js +0 -4
- package/dist/components/segment-single-input.js +0 -4
- package/dist/components/select-input.js +0 -4
- package/dist/components/skeleton.js +0 -4
- package/dist/components/snackbar.js +0 -4
- package/dist/components/switch-input.js +0 -7
- package/dist/components/tabs.js +0 -4
- package/dist/components/text-input.js +0 -4
- package/dist/components/text.js +0 -4
- package/dist/components/textarea-input.js +0 -4
- package/dist/components/tile.js +0 -4
- package/dist/components/top-bar.js +0 -4
- package/dist/date-single-picker-input--Ew0O9NQ.js +0 -252
- package/dist/drawer-DrnAR2a4.js +0 -218
- package/dist/helpers-CEDtBUGM.js +0 -37
- package/dist/hooks/index.js +0 -1
- package/dist/icon-D-lTZMHY.js +0 -44
- package/dist/index-DU1SCUkk.js +0 -329
- package/dist/loading-indicator-BZMnT5PA.js +0 -168
- package/dist/menu-BZvilMF7.js +0 -174
- package/dist/modal-BGAtqMl9.js +0 -149
- package/dist/radio-input-BRGoevZY.js +0 -173
- package/dist/segment-multiple-input-VwHCqFd6.js +0 -229
- package/dist/segment-single-input-Cqoo7-C2.js +0 -228
- package/dist/select-input-DCb0usvK.js +0 -108
- package/dist/skeleton-D4X5USf_.js +0 -59
- package/dist/snackbar-CYias-fJ.js +0 -79
- package/dist/switch-input-C5s1lvYh.js +0 -186
- package/dist/tabs-C8aRKfxS.js +0 -216
- package/dist/text-B7e-au41.js +0 -120
- package/dist/text-input-BsWvUk_H.js +0 -73
- package/dist/textarea-input-DZExXEE8.js +0 -102
- package/dist/tile-Du7YciCG.js +0 -51
- package/dist/top-bar-ErHvwR4K.js +0 -62
package/dist/components/alert.js
DELETED
package/dist/components/badge.js
DELETED
package/dist/components/icon.js
DELETED
package/dist/components/menu.js
DELETED
package/dist/components/modal.js
DELETED
package/dist/components/tabs.js
DELETED
package/dist/components/text.js
DELETED
package/dist/components/tile.js
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
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
|
-
};
|
package/dist/drawer-DrnAR2a4.js
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
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
|
-
};
|