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