@dimasbaguspm/versaur 0.0.25 → 0.0.26
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-CCDa5VGo.js → bottom-sheet-CQw_O-4W.js} +195 -176
- package/dist/js/{bottom-sheet-input-DsgPp5zI.js → bottom-sheet-input-1C3Up2xF.js} +34 -35
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-GA3oWX7A.js → image-rectangle--Sy82Ff9.js} +232 -111
- package/dist/js/index.js +20 -21
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +10 -11
- package/dist/js/{tabs-p6g9kN0N.js → tabs-CoNG51E1.js} +5 -6
- package/dist/js/{tooltip-CDdl1U3A.js → tooltip-BbTHXz6h.js} +1 -1
- package/dist/js/{top-bar-PpiWsgeR.js → top-bar-BjE0FiE8.js} +61 -62
- package/dist/types/overlays/drawer/drawer.atoms.d.ts +5 -2
- package/dist/types/overlays/drawer/drawer.d.ts +2 -0
- package/dist/types/overlays/drawer/types.d.ts +1 -16
- package/package.json +1 -1
- package/dist/js/text-CRsIInRA.js +0 -127
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { c, j as n, a as d } from "./index-DOdDlCoL.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
2
|
+
import j, { useState as x, useEffect as b, createContext as S, useContext as N, forwardRef as u, useRef as E, useCallback as M, useMemo as z } from "react";
|
|
3
|
+
import { XIcon as D } from "lucide-react";
|
|
4
|
+
import { h as H, f as I } from "./image-rectangle--Sy82Ff9.js";
|
|
5
|
+
import "./snackbar-DH8jCh2V.js";
|
|
6
|
+
import P from "react-dom";
|
|
7
|
+
function F() {
|
|
5
8
|
if (typeof window > "u") return !1;
|
|
6
9
|
const e = window.navigator.userAgent, o = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
7
10
|
e
|
|
@@ -11,66 +14,66 @@ function D() {
|
|
|
11
14
|
function k() {
|
|
12
15
|
return typeof window < "u" && "navigator" in window && "virtualKeyboard" in navigator;
|
|
13
16
|
}
|
|
14
|
-
function
|
|
15
|
-
const [e, o] =
|
|
16
|
-
return
|
|
17
|
-
if (!
|
|
18
|
-
|
|
17
|
+
function L() {
|
|
18
|
+
const [e, o] = x(!1), [t, r] = x(0), [a, s] = x(0), [i, w] = x(!1), [h, p] = x(!1);
|
|
19
|
+
return b(() => {
|
|
20
|
+
if (!F()) {
|
|
21
|
+
w(!1);
|
|
19
22
|
return;
|
|
20
23
|
}
|
|
21
|
-
|
|
22
|
-
}, []),
|
|
24
|
+
w(!0), p(k());
|
|
25
|
+
}, []), b(() => {
|
|
23
26
|
if (!i || !k())
|
|
24
27
|
return;
|
|
25
|
-
const
|
|
26
|
-
const { boundingRect:
|
|
27
|
-
o(
|
|
28
|
+
const f = navigator.virtualKeyboard, l = () => {
|
|
29
|
+
const { boundingRect: m } = f, g = m?.height || 0, y = m?.width || 0;
|
|
30
|
+
o(g > 0), r(g), s(y);
|
|
28
31
|
};
|
|
29
|
-
return l(),
|
|
30
|
-
|
|
32
|
+
return l(), f.addEventListener("geometrychange", l), () => {
|
|
33
|
+
f.removeEventListener(
|
|
31
34
|
"geometrychange",
|
|
32
35
|
l
|
|
33
36
|
);
|
|
34
37
|
};
|
|
35
|
-
}, [i]),
|
|
38
|
+
}, [i]), b(() => {
|
|
36
39
|
if (!i || k())
|
|
37
40
|
return;
|
|
38
|
-
const
|
|
41
|
+
const f = window.innerHeight;
|
|
39
42
|
let l;
|
|
40
|
-
const
|
|
43
|
+
const m = () => {
|
|
41
44
|
clearTimeout(l), l = setTimeout(() => {
|
|
42
|
-
const
|
|
43
|
-
o(V), r(V ?
|
|
45
|
+
const g = window.visualViewport?.height ?? window.innerHeight, y = f - g, V = y > 150;
|
|
46
|
+
o(V), r(V ? y : 0), s(V ? window.innerWidth : 0);
|
|
44
47
|
}, 100);
|
|
45
48
|
};
|
|
46
|
-
return "visualViewport" in window && window.visualViewport ? (window.visualViewport.addEventListener("resize",
|
|
49
|
+
return "visualViewport" in window && window.visualViewport ? (window.visualViewport.addEventListener("resize", m), () => {
|
|
47
50
|
clearTimeout(l), window.visualViewport?.removeEventListener(
|
|
48
51
|
"resize",
|
|
49
|
-
|
|
52
|
+
m
|
|
50
53
|
);
|
|
51
|
-
}) : (window.addEventListener("resize",
|
|
52
|
-
clearTimeout(l), window.removeEventListener("resize",
|
|
54
|
+
}) : (window.addEventListener("resize", m), () => {
|
|
55
|
+
clearTimeout(l), window.removeEventListener("resize", m);
|
|
53
56
|
});
|
|
54
|
-
}, [i]),
|
|
57
|
+
}, [i]), b(() => {
|
|
55
58
|
i || (o(!1), r(0), s(0));
|
|
56
59
|
}, [i]), {
|
|
57
60
|
isOpen: e,
|
|
58
61
|
height: t,
|
|
59
62
|
width: a,
|
|
60
63
|
isSupported: i,
|
|
61
|
-
usingNativeAPI:
|
|
64
|
+
usingNativeAPI: h
|
|
62
65
|
};
|
|
63
66
|
}
|
|
64
|
-
const
|
|
65
|
-
function
|
|
66
|
-
const e = R
|
|
67
|
+
const R = S(null);
|
|
68
|
+
function A() {
|
|
69
|
+
const e = N(R);
|
|
67
70
|
if (!e)
|
|
68
71
|
throw new Error(
|
|
69
72
|
"Modal components must be used within a ModalRoot component"
|
|
70
73
|
);
|
|
71
74
|
return e;
|
|
72
75
|
}
|
|
73
|
-
const
|
|
76
|
+
const K = c(
|
|
74
77
|
"fixed inset-0 z-60 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md flex items-center justify-center transition-opacity duration-200 ease-in-out",
|
|
75
78
|
{
|
|
76
79
|
variants: {
|
|
@@ -83,7 +86,7 @@ const P = c(
|
|
|
83
86
|
placement: "center"
|
|
84
87
|
}
|
|
85
88
|
}
|
|
86
|
-
),
|
|
89
|
+
), O = c(
|
|
87
90
|
[
|
|
88
91
|
"absolute z-61 bg-white rounded-lg shadow-xl",
|
|
89
92
|
"flex flex-col",
|
|
@@ -117,7 +120,7 @@ const P = c(
|
|
|
117
120
|
isOpen: !1
|
|
118
121
|
}
|
|
119
122
|
}
|
|
120
|
-
),
|
|
123
|
+
), W = u(
|
|
121
124
|
({ className: e, ...o }, t) => /* @__PURE__ */ n.jsx(
|
|
122
125
|
"div",
|
|
123
126
|
{
|
|
@@ -126,7 +129,7 @@ const P = c(
|
|
|
126
129
|
...o
|
|
127
130
|
}
|
|
128
131
|
)
|
|
129
|
-
),
|
|
132
|
+
), _ = u(
|
|
130
133
|
({ className: e, ...o }, t) => /* @__PURE__ */ n.jsx(
|
|
131
134
|
"div",
|
|
132
135
|
{
|
|
@@ -135,11 +138,11 @@ const P = c(
|
|
|
135
138
|
...o
|
|
136
139
|
}
|
|
137
140
|
)
|
|
138
|
-
),
|
|
141
|
+
), $ = u(
|
|
139
142
|
({ className: e, ...o }, t) => /* @__PURE__ */ n.jsx("div", { ref: t, className: d("px-6 py-2", e), ...o })
|
|
140
|
-
),
|
|
143
|
+
), G = u(
|
|
141
144
|
(e, o) => {
|
|
142
|
-
const { isOpen: t, placement: r, onClose: a } =
|
|
145
|
+
const { isOpen: t, placement: r, onClose: a } = A();
|
|
143
146
|
return /* @__PURE__ */ n.jsx(
|
|
144
147
|
"div",
|
|
145
148
|
{
|
|
@@ -149,7 +152,7 @@ const P = c(
|
|
|
149
152
|
"aria-modal": "true",
|
|
150
153
|
onClick: a,
|
|
151
154
|
className: d(
|
|
152
|
-
|
|
155
|
+
K({ placement: r }),
|
|
153
156
|
t ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
154
157
|
),
|
|
155
158
|
...e
|
|
@@ -158,10 +161,10 @@ const P = c(
|
|
|
158
161
|
}
|
|
159
162
|
);
|
|
160
163
|
function B(e, o, t) {
|
|
161
|
-
const r =
|
|
162
|
-
return
|
|
164
|
+
const r = E(null);
|
|
165
|
+
return b(() => {
|
|
163
166
|
r.current && r.current.focus();
|
|
164
|
-
}, []),
|
|
167
|
+
}, []), b(() => {
|
|
165
168
|
const a = (s) => {
|
|
166
169
|
s.key === "Escape" && e && r.current && r.current.contains(document.activeElement) && !t && o();
|
|
167
170
|
};
|
|
@@ -170,15 +173,15 @@ function B(e, o, t) {
|
|
|
170
173
|
};
|
|
171
174
|
}, [e, o, t, r]), r;
|
|
172
175
|
}
|
|
173
|
-
const
|
|
176
|
+
const C = ({
|
|
174
177
|
container: e,
|
|
175
178
|
children: o
|
|
176
179
|
}) => {
|
|
177
180
|
if (typeof window > "u" || typeof document > "u")
|
|
178
181
|
return /* @__PURE__ */ n.jsx(n.Fragment, { children: o });
|
|
179
182
|
const t = e ?? document.body;
|
|
180
|
-
return t ?
|
|
181
|
-
},
|
|
183
|
+
return t ? P.createPortal(o, t) : /* @__PURE__ */ n.jsx(n.Fragment, { children: o });
|
|
184
|
+
}, U = ({
|
|
182
185
|
isOpen: e,
|
|
183
186
|
onClose: o,
|
|
184
187
|
size: t = "md",
|
|
@@ -187,13 +190,13 @@ const N = ({
|
|
|
187
190
|
container: s,
|
|
188
191
|
...i
|
|
189
192
|
}) => {
|
|
190
|
-
const
|
|
193
|
+
const w = {
|
|
191
194
|
isOpen: e,
|
|
192
195
|
onClose: o,
|
|
193
196
|
size: t,
|
|
194
197
|
placement: r
|
|
195
|
-
},
|
|
196
|
-
return /* @__PURE__ */ n.jsx(
|
|
198
|
+
}, h = B(e, o);
|
|
199
|
+
return /* @__PURE__ */ n.jsx(C, { container: s, children: /* @__PURE__ */ n.jsx(R.Provider, { value: w, children: /* @__PURE__ */ n.jsxs(
|
|
197
200
|
"div",
|
|
198
201
|
{
|
|
199
202
|
className: d(
|
|
@@ -201,12 +204,12 @@ const N = ({
|
|
|
201
204
|
e && "pointer-events-auto"
|
|
202
205
|
),
|
|
203
206
|
children: [
|
|
204
|
-
/* @__PURE__ */ n.jsx(
|
|
207
|
+
/* @__PURE__ */ n.jsx(G, {}),
|
|
205
208
|
/* @__PURE__ */ n.jsx(
|
|
206
209
|
"div",
|
|
207
210
|
{
|
|
208
|
-
ref:
|
|
209
|
-
className: d(
|
|
211
|
+
ref: h,
|
|
212
|
+
className: d(O({ size: t, placement: r, isOpen: e })),
|
|
210
213
|
role: "dialog",
|
|
211
214
|
tabIndex: -1,
|
|
212
215
|
"aria-hidden": !e,
|
|
@@ -217,20 +220,20 @@ const N = ({
|
|
|
217
220
|
]
|
|
218
221
|
}
|
|
219
222
|
) }) });
|
|
220
|
-
},
|
|
221
|
-
Header:
|
|
222
|
-
Body:
|
|
223
|
-
Footer:
|
|
224
|
-
}),
|
|
225
|
-
function
|
|
226
|
-
const e =
|
|
223
|
+
}, Be = Object.assign(U, {
|
|
224
|
+
Header: W,
|
|
225
|
+
Body: $,
|
|
226
|
+
Footer: _
|
|
227
|
+
}), T = S(null);
|
|
228
|
+
function v() {
|
|
229
|
+
const e = N(T);
|
|
227
230
|
if (!e)
|
|
228
231
|
throw new Error(
|
|
229
232
|
"Drawer components must be used within a DrawerRoot component"
|
|
230
233
|
);
|
|
231
234
|
return e;
|
|
232
235
|
}
|
|
233
|
-
const
|
|
236
|
+
const X = c(
|
|
234
237
|
"fixed inset-0 z-50 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md",
|
|
235
238
|
{
|
|
236
239
|
variants: {
|
|
@@ -243,51 +246,57 @@ const $ = c(
|
|
|
243
246
|
state: "closed"
|
|
244
247
|
}
|
|
245
248
|
}
|
|
246
|
-
),
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
249
|
+
), q = c(
|
|
250
|
+
"fixed z-50 shadow-xl flex flex-col max-w-full",
|
|
251
|
+
{
|
|
252
|
+
variants: {
|
|
253
|
+
position: {
|
|
254
|
+
left: "left-0 top-0 bottom-0 border-r",
|
|
255
|
+
right: "right-0 top-0 bottom-0 border-l"
|
|
256
|
+
},
|
|
257
|
+
size: {
|
|
258
|
+
sm: "w-80",
|
|
259
|
+
md: "w-96",
|
|
260
|
+
lg: "w-[28rem]",
|
|
261
|
+
xl: "w-[32rem]",
|
|
262
|
+
"3/4": "w-[75vw]",
|
|
263
|
+
full: "w-full"
|
|
264
|
+
},
|
|
265
|
+
variant: {
|
|
266
|
+
default: "bg-white border-border",
|
|
267
|
+
glass: "bg-white/10 backdrop-blur-lg border-white/20"
|
|
268
|
+
},
|
|
269
|
+
transitionType: {
|
|
270
|
+
slide: "transition-transform duration-300 ease-in-out",
|
|
271
|
+
fade: "transition-opacity duration-300 ease-in-out"
|
|
272
|
+
}
|
|
263
273
|
},
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
274
|
+
defaultVariants: {
|
|
275
|
+
position: "right",
|
|
276
|
+
size: "md",
|
|
277
|
+
variant: "default",
|
|
278
|
+
transitionType: "slide"
|
|
267
279
|
}
|
|
268
|
-
},
|
|
269
|
-
defaultVariants: {
|
|
270
|
-
position: "right",
|
|
271
|
-
size: "md",
|
|
272
|
-
variant: "default",
|
|
273
|
-
transitionType: "slide"
|
|
274
280
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
281
|
+
), J = c(
|
|
282
|
+
"flex justify-between items-center px-6",
|
|
283
|
+
{
|
|
284
|
+
variants: {
|
|
285
|
+
variant: {
|
|
286
|
+
default: "bg-white",
|
|
287
|
+
glass: "bg-transparent "
|
|
288
|
+
},
|
|
289
|
+
tab: {
|
|
290
|
+
true: "pt-4 pb-2",
|
|
291
|
+
false: "border-b border-border py-4 "
|
|
292
|
+
}
|
|
280
293
|
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
294
|
+
defaultVariants: {
|
|
295
|
+
variant: "default",
|
|
296
|
+
tab: !1
|
|
284
297
|
}
|
|
285
|
-
},
|
|
286
|
-
defaultVariants: {
|
|
287
|
-
variant: "default",
|
|
288
|
-
tab: !1
|
|
289
298
|
}
|
|
290
|
-
|
|
299
|
+
), Q = c("flex-1 overflow-y-auto px-6 py-4", {
|
|
291
300
|
variants: {
|
|
292
301
|
variant: {
|
|
293
302
|
default: "bg-white",
|
|
@@ -297,23 +306,18 @@ const $ = c(
|
|
|
297
306
|
defaultVariants: {
|
|
298
307
|
variant: "default"
|
|
299
308
|
}
|
|
300
|
-
}),
|
|
309
|
+
}), Y = c("px-6 py-4 border-t", {
|
|
301
310
|
variants: {
|
|
302
311
|
variant: {
|
|
303
312
|
default: "bg-white border-border",
|
|
304
313
|
glass: "bg-transparent border-white/10"
|
|
305
|
-
},
|
|
306
|
-
responsiveFlex: {
|
|
307
|
-
true: "flex flex-row gap-3 sm:justify-end [&>*]:sm:flex-grow-0 [&>*]:flex-grow",
|
|
308
|
-
false: "flex gap-2"
|
|
309
314
|
}
|
|
310
315
|
},
|
|
311
316
|
defaultVariants: {
|
|
312
|
-
variant: "default"
|
|
313
|
-
responsiveFlex: !0
|
|
317
|
+
variant: "default"
|
|
314
318
|
}
|
|
315
|
-
}),
|
|
316
|
-
const { isOpen: r, onClose: a } =
|
|
319
|
+
}), Z = j.forwardRef(({ className: e, ...o }, t) => {
|
|
320
|
+
const { isOpen: r, onClose: a } = v(), s = () => {
|
|
317
321
|
a();
|
|
318
322
|
};
|
|
319
323
|
return /* @__PURE__ */ n.jsx(
|
|
@@ -322,7 +326,7 @@ const $ = c(
|
|
|
322
326
|
ref: t,
|
|
323
327
|
onClick: s,
|
|
324
328
|
className: d(
|
|
325
|
-
|
|
329
|
+
X({
|
|
326
330
|
state: r ? "open" : "closed"
|
|
327
331
|
}),
|
|
328
332
|
e
|
|
@@ -330,15 +334,15 @@ const $ = c(
|
|
|
330
334
|
...o
|
|
331
335
|
}
|
|
332
336
|
);
|
|
333
|
-
}),
|
|
337
|
+
}), ee = j.forwardRef(
|
|
334
338
|
({ children: e, className: o, hasTab: t, ...r }, a) => {
|
|
335
|
-
const { variant: s } =
|
|
339
|
+
const { variant: s } = v();
|
|
336
340
|
return /* @__PURE__ */ n.jsx(
|
|
337
341
|
"div",
|
|
338
342
|
{
|
|
339
343
|
ref: a,
|
|
340
344
|
className: d(
|
|
341
|
-
|
|
345
|
+
J({ variant: s, tab: !!t }),
|
|
342
346
|
o
|
|
343
347
|
),
|
|
344
348
|
...r,
|
|
@@ -346,38 +350,51 @@ const $ = c(
|
|
|
346
350
|
}
|
|
347
351
|
);
|
|
348
352
|
}
|
|
349
|
-
),
|
|
353
|
+
), te = u((e, o) => /* @__PURE__ */ n.jsx(H, { ...e, ref: o, as: "h3", fontSize: "lg" })), oe = u(({ onClick: e, ...o }, t) => {
|
|
354
|
+
const { onClose: r } = v(), a = (s) => {
|
|
355
|
+
r(), e?.(s);
|
|
356
|
+
};
|
|
357
|
+
return /* @__PURE__ */ n.jsx(
|
|
358
|
+
I,
|
|
359
|
+
{
|
|
360
|
+
"aria-label": "Close drawer",
|
|
361
|
+
...o,
|
|
362
|
+
onClick: a,
|
|
363
|
+
variant: "ghost",
|
|
364
|
+
size: "sm",
|
|
365
|
+
as: D,
|
|
366
|
+
ref: t
|
|
367
|
+
}
|
|
368
|
+
);
|
|
369
|
+
}), re = u(
|
|
350
370
|
({ children: e, className: o, ...t }, r) => /* @__PURE__ */ n.jsx("div", { ref: r, className: d("[&>div]:px-6", o), ...t, children: e })
|
|
351
|
-
),
|
|
371
|
+
), ne = j.forwardRef(
|
|
352
372
|
({ children: e, className: o, ...t }, r) => {
|
|
353
|
-
const { variant: a } =
|
|
373
|
+
const { variant: a } = v();
|
|
354
374
|
return /* @__PURE__ */ n.jsx(
|
|
355
375
|
"div",
|
|
356
376
|
{
|
|
357
377
|
ref: r,
|
|
358
|
-
className: d(
|
|
378
|
+
className: d(Q({ variant: a }), o),
|
|
359
379
|
...t,
|
|
360
380
|
children: e
|
|
361
381
|
}
|
|
362
382
|
);
|
|
363
383
|
}
|
|
364
|
-
),
|
|
365
|
-
({ children: e, className: o,
|
|
366
|
-
const { variant:
|
|
384
|
+
), ae = j.forwardRef(
|
|
385
|
+
({ children: e, className: o, ...t }, r) => {
|
|
386
|
+
const { variant: a } = v();
|
|
367
387
|
return /* @__PURE__ */ n.jsx(
|
|
368
388
|
"div",
|
|
369
389
|
{
|
|
370
|
-
ref:
|
|
371
|
-
className: d(
|
|
372
|
-
|
|
373
|
-
o
|
|
374
|
-
),
|
|
375
|
-
...r,
|
|
390
|
+
ref: r,
|
|
391
|
+
className: d(Y({ variant: a }), o),
|
|
392
|
+
...t,
|
|
376
393
|
children: e
|
|
377
394
|
}
|
|
378
395
|
);
|
|
379
396
|
}
|
|
380
|
-
),
|
|
397
|
+
), se = ({
|
|
381
398
|
container: e,
|
|
382
399
|
children: o,
|
|
383
400
|
isOpen: t,
|
|
@@ -385,21 +402,21 @@ const $ = c(
|
|
|
385
402
|
position: a = "right",
|
|
386
403
|
size: s = "md",
|
|
387
404
|
variant: i = "default",
|
|
388
|
-
transitionType:
|
|
389
|
-
className:
|
|
390
|
-
...
|
|
405
|
+
transitionType: w = "slide",
|
|
406
|
+
className: h,
|
|
407
|
+
...p
|
|
391
408
|
}) => {
|
|
392
|
-
const
|
|
409
|
+
const f = M(() => {
|
|
393
410
|
r(!1);
|
|
394
411
|
}, [r]), l = {
|
|
395
412
|
isOpen: t,
|
|
396
|
-
onClose:
|
|
413
|
+
onClose: f,
|
|
397
414
|
position: a,
|
|
398
415
|
size: s,
|
|
399
416
|
variant: i,
|
|
400
|
-
transitionType:
|
|
401
|
-
},
|
|
402
|
-
return /* @__PURE__ */ n.jsx(
|
|
417
|
+
transitionType: w
|
|
418
|
+
}, m = B(t, f);
|
|
419
|
+
return /* @__PURE__ */ n.jsx(C, { container: e, children: /* @__PURE__ */ n.jsx(T.Provider, { value: l, children: /* @__PURE__ */ n.jsxs(
|
|
403
420
|
"div",
|
|
404
421
|
{
|
|
405
422
|
className: d(
|
|
@@ -407,43 +424,45 @@ const $ = c(
|
|
|
407
424
|
t && "pointer-events-auto"
|
|
408
425
|
),
|
|
409
426
|
children: [
|
|
410
|
-
/* @__PURE__ */ n.jsx(
|
|
427
|
+
/* @__PURE__ */ n.jsx(Z, {}),
|
|
411
428
|
/* @__PURE__ */ n.jsx(
|
|
412
429
|
"div",
|
|
413
430
|
{
|
|
414
|
-
ref:
|
|
431
|
+
ref: m,
|
|
415
432
|
tabIndex: -1,
|
|
416
433
|
role: t ? "dialog" : void 0,
|
|
417
434
|
"aria-modal": t ? "true" : void 0,
|
|
418
435
|
className: d(
|
|
419
|
-
|
|
436
|
+
q({
|
|
420
437
|
position: a,
|
|
421
438
|
size: s,
|
|
422
439
|
variant: i,
|
|
423
|
-
transitionType:
|
|
440
|
+
transitionType: w
|
|
424
441
|
}),
|
|
425
|
-
|
|
442
|
+
w === "slide" ? [
|
|
426
443
|
!t && a === "left" && "-translate-x-full",
|
|
427
444
|
!t && a === "right" && "translate-x-full"
|
|
428
445
|
] : [
|
|
429
446
|
"left-0 right-0 top-0 bottom-0",
|
|
430
447
|
t ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
431
448
|
],
|
|
432
|
-
|
|
449
|
+
h
|
|
433
450
|
),
|
|
434
|
-
...
|
|
451
|
+
...p,
|
|
435
452
|
children: t && o
|
|
436
453
|
}
|
|
437
454
|
)
|
|
438
455
|
]
|
|
439
456
|
}
|
|
440
457
|
) }) });
|
|
441
|
-
},
|
|
442
|
-
Header:
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
458
|
+
}, Ce = Object.assign(se, {
|
|
459
|
+
Header: ee,
|
|
460
|
+
Title: te,
|
|
461
|
+
CloseButton: oe,
|
|
462
|
+
Tab: re,
|
|
463
|
+
Body: ne,
|
|
464
|
+
Footer: ae
|
|
465
|
+
}), ie = c(
|
|
447
466
|
[
|
|
448
467
|
"fixed left-0 bottom-0 z-40 w-full max-h-[90dvh] bg-background rounded-t-xl shadow-lg border-t border-border rounded-lg",
|
|
449
468
|
"transition-transform duration-300 ease-in-out will-change-transform",
|
|
@@ -461,7 +480,7 @@ const $ = c(
|
|
|
461
480
|
open: !1
|
|
462
481
|
}
|
|
463
482
|
}
|
|
464
|
-
),
|
|
483
|
+
), de = c(
|
|
465
484
|
["fixed inset-0 z-40 duration-300"],
|
|
466
485
|
{
|
|
467
486
|
variants: {
|
|
@@ -474,10 +493,10 @@ const $ = c(
|
|
|
474
493
|
open: !1
|
|
475
494
|
}
|
|
476
495
|
}
|
|
477
|
-
),
|
|
496
|
+
), le = c("px-4 pt-4 pb-2 flex-shrink-0"), ce = c([
|
|
478
497
|
"px-4 py-2 flex-1 overflow-y-auto",
|
|
479
498
|
"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border"
|
|
480
|
-
]),
|
|
499
|
+
]), ue = c("px-4 pt-2 pb-4 flex-shrink-0"), fe = u(function({ className: o, ...t }, r) {
|
|
481
500
|
return /* @__PURE__ */ n.jsx(
|
|
482
501
|
"h2",
|
|
483
502
|
{
|
|
@@ -486,64 +505,64 @@ const $ = c(
|
|
|
486
505
|
...t
|
|
487
506
|
}
|
|
488
507
|
);
|
|
489
|
-
}),
|
|
508
|
+
}), me = u(({ className: e, ...o }, t) => /* @__PURE__ */ n.jsx(
|
|
490
509
|
"div",
|
|
491
510
|
{
|
|
492
511
|
ref: t,
|
|
493
|
-
className:
|
|
512
|
+
className: le({ className: e }),
|
|
494
513
|
...o
|
|
495
514
|
}
|
|
496
|
-
)),
|
|
515
|
+
)), we = u(
|
|
497
516
|
({ className: e, ...o }, t) => /* @__PURE__ */ n.jsx(
|
|
498
517
|
"div",
|
|
499
518
|
{
|
|
500
519
|
ref: t,
|
|
501
|
-
className:
|
|
520
|
+
className: ce({ className: e }),
|
|
502
521
|
...o
|
|
503
522
|
}
|
|
504
523
|
)
|
|
505
|
-
),
|
|
524
|
+
), he = u(({ className: e, ...o }, t) => /* @__PURE__ */ n.jsx(
|
|
506
525
|
"div",
|
|
507
526
|
{
|
|
508
527
|
ref: t,
|
|
509
|
-
className:
|
|
528
|
+
className: ue({ className: e }),
|
|
510
529
|
...o
|
|
511
530
|
}
|
|
512
|
-
)),
|
|
531
|
+
)), pe = (...e) => (o) => {
|
|
513
532
|
e.forEach((t) => {
|
|
514
533
|
typeof t == "function" ? t(o) : t && "current" in t && (t.current = o);
|
|
515
534
|
});
|
|
516
|
-
},
|
|
535
|
+
}, be = u(
|
|
517
536
|
({ isOpen: e, children: o, className: t, onClose: r, container: a, ...s }, i) => {
|
|
518
|
-
const
|
|
519
|
-
isOpen:
|
|
520
|
-
height:
|
|
521
|
-
isSupported:
|
|
522
|
-
} =
|
|
537
|
+
const w = B(e, r), {
|
|
538
|
+
isOpen: h,
|
|
539
|
+
height: p,
|
|
540
|
+
isSupported: f
|
|
541
|
+
} = L(), l = z(() => !e || !f || !h ? {} : {
|
|
523
542
|
// Adjust bottom position to sit above the virtual keyboard
|
|
524
|
-
bottom: `${
|
|
543
|
+
bottom: `${p}px`,
|
|
525
544
|
// Reduce max height to account for keyboard
|
|
526
|
-
maxHeight: `calc(90dvh - ${
|
|
545
|
+
maxHeight: `calc(90dvh - ${p}px)`,
|
|
527
546
|
// Ensure smooth transition
|
|
528
547
|
transition: "bottom 0.2s ease-in-out, max-height 0.2s ease-in-out"
|
|
529
|
-
}, [e,
|
|
548
|
+
}, [e, f, h, p]), m = () => {
|
|
530
549
|
r?.();
|
|
531
550
|
};
|
|
532
|
-
return /* @__PURE__ */ n.jsxs(
|
|
551
|
+
return /* @__PURE__ */ n.jsxs(C, { container: a, children: [
|
|
533
552
|
/* @__PURE__ */ n.jsx(
|
|
534
553
|
"div",
|
|
535
554
|
{
|
|
536
|
-
className:
|
|
555
|
+
className: de({ open: e }),
|
|
537
556
|
"aria-hidden": "true",
|
|
538
|
-
onClick:
|
|
557
|
+
onClick: m
|
|
539
558
|
}
|
|
540
559
|
),
|
|
541
560
|
/* @__PURE__ */ n.jsx(
|
|
542
561
|
"div",
|
|
543
562
|
{
|
|
544
|
-
ref:
|
|
563
|
+
ref: pe(i, w),
|
|
545
564
|
className: d(
|
|
546
|
-
|
|
565
|
+
ie({
|
|
547
566
|
open: e
|
|
548
567
|
}),
|
|
549
568
|
"flex flex-col",
|
|
@@ -560,14 +579,14 @@ const $ = c(
|
|
|
560
579
|
)
|
|
561
580
|
] });
|
|
562
581
|
}
|
|
563
|
-
),
|
|
564
|
-
Header:
|
|
565
|
-
Title:
|
|
566
|
-
Body:
|
|
567
|
-
Footer:
|
|
582
|
+
), Se = Object.assign(be, {
|
|
583
|
+
Header: me,
|
|
584
|
+
Title: fe,
|
|
585
|
+
Body: we,
|
|
586
|
+
Footer: he
|
|
568
587
|
});
|
|
569
588
|
export {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
589
|
+
Se as B,
|
|
590
|
+
Ce as D,
|
|
591
|
+
Be as M
|
|
573
592
|
};
|