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