@dimasbaguspm/versaur 0.0.35 → 0.0.37
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-BYq9Nf57.js → bottom-sheet-CJfhhYkA.js} +180 -164
- package/dist/js/{bottom-sheet-input-Bo5LLNVg.js → bottom-sheet-input-CpL1KbPE.js} +517 -476
- package/dist/js/forms/index.js +1 -1
- package/dist/js/{image-rectangle-BPmnlpnT.js → image-rectangle-DIGAUCV8.js} +258 -198
- package/dist/js/index.js +32 -31
- 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 -23
- package/dist/js/{tabs-C3wTfqhW.js → tabs-Dt4NFIig.js} +1 -1
- package/dist/js/{tooltip-Dh1adQMb.js → tooltip-IIqgfodK.js} +1 -1
- package/dist/js/{top-bar-DNHnNH-S.js → top-bar-C2eCjlsH.js} +2 -2
- package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +1 -1
- package/dist/types/forms/price-input/price-input.d.ts +4 -1
- 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/types.d.ts +3 -0
- package/dist/types/primitive/button-menu/button-menu.d.ts +4 -0
- package/dist/types/primitive/button-menu/index.d.ts +2 -0
- package/dist/types/primitive/button-menu/types.d.ts +17 -0
- package/dist/types/primitive/card/types.d.ts +5 -1
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/utils/enforce-subpath-import.js +1 -0
- package/package.json +1 -1
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import j, { useState as
|
|
3
|
-
import { O as
|
|
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, n as P, k as N, H as D } from "./image-rectangle-DIGAUCV8.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 P() {
|
|
|
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 P() {
|
|
|
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
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 L = 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 L = 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 L = 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 L = 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:
|
|
144
|
+
const { isOpen: t, placement: n, onClose: a, disableOverlayClickToClose: s } = A(), i = () => {
|
|
145
145
|
s || a();
|
|
146
146
|
};
|
|
147
|
-
return /* @__PURE__ */
|
|
147
|
+
return /* @__PURE__ */ r.jsx(
|
|
148
148
|
"div",
|
|
149
149
|
{
|
|
150
150
|
ref: o,
|
|
@@ -153,7 +153,7 @@ const L = 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
|
|
@@ -161,39 +161,39 @@ const L = u(
|
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
|
-
function
|
|
165
|
-
const
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
}, []),
|
|
164
|
+
function T(e, o, t) {
|
|
165
|
+
const n = z(null);
|
|
166
|
+
return x(() => {
|
|
167
|
+
n.current && n.current.focus();
|
|
168
|
+
}, []), x(() => {
|
|
169
169
|
const a = (s) => {
|
|
170
|
-
s.key === "Escape" && e &&
|
|
170
|
+
s.key === "Escape" && e && n.current && n.current.contains(document.activeElement) && !t && o();
|
|
171
171
|
};
|
|
172
172
|
return e && (document.addEventListener("keydown", a), document.body.style.overflow = "hidden"), () => {
|
|
173
173
|
document.removeEventListener("keydown", a), document.body.style.overflow = "unset";
|
|
174
174
|
};
|
|
175
|
-
}, [e, o, t,
|
|
175
|
+
}, [e, o, t, n]), n;
|
|
176
176
|
}
|
|
177
|
-
const
|
|
177
|
+
const U = ({
|
|
178
178
|
isOpen: e,
|
|
179
179
|
onClose: o,
|
|
180
180
|
size: t = "md",
|
|
181
|
-
placement:
|
|
181
|
+
placement: n = "center",
|
|
182
182
|
disableOverlayClickToClose: a = !1,
|
|
183
183
|
disableEscapeKeyDown: s = !1,
|
|
184
184
|
children: i,
|
|
185
|
-
container:
|
|
186
|
-
...
|
|
185
|
+
container: h,
|
|
186
|
+
...b
|
|
187
187
|
}) => {
|
|
188
|
-
const
|
|
188
|
+
const w = {
|
|
189
189
|
isOpen: e,
|
|
190
190
|
onClose: o,
|
|
191
191
|
size: t,
|
|
192
|
-
placement:
|
|
192
|
+
placement: n,
|
|
193
193
|
disableOverlayClickToClose: a,
|
|
194
194
|
disableEscapeKeyDown: s
|
|
195
|
-
}, d =
|
|
196
|
-
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(
|
|
197
197
|
"div",
|
|
198
198
|
{
|
|
199
199
|
className: l(
|
|
@@ -201,36 +201,36 @@ const $ = ({
|
|
|
201
201
|
e && "pointer-events-auto"
|
|
202
202
|
),
|
|
203
203
|
children: [
|
|
204
|
-
/* @__PURE__ */
|
|
205
|
-
/* @__PURE__ */
|
|
204
|
+
/* @__PURE__ */ r.jsx(G, {}),
|
|
205
|
+
/* @__PURE__ */ r.jsx(
|
|
206
206
|
"div",
|
|
207
207
|
{
|
|
208
208
|
ref: d,
|
|
209
|
-
className: l(
|
|
209
|
+
className: l(W({ size: t, placement: n, isOpen: e })),
|
|
210
210
|
role: "dialog",
|
|
211
211
|
tabIndex: -1,
|
|
212
212
|
"aria-hidden": !e,
|
|
213
|
-
...
|
|
213
|
+
...b,
|
|
214
214
|
children: i
|
|
215
215
|
}
|
|
216
216
|
)
|
|
217
217
|
]
|
|
218
218
|
}
|
|
219
219
|
) }) });
|
|
220
|
-
},
|
|
221
|
-
Header:
|
|
222
|
-
Body:
|
|
223
|
-
Footer:
|
|
224
|
-
}),
|
|
220
|
+
}, Se = Object.assign(U, {
|
|
221
|
+
Header: K,
|
|
222
|
+
Body: $,
|
|
223
|
+
Footer: _
|
|
224
|
+
}), H = V(null);
|
|
225
225
|
function g() {
|
|
226
|
-
const e =
|
|
226
|
+
const e = B(H);
|
|
227
227
|
if (!e)
|
|
228
228
|
throw new Error(
|
|
229
229
|
"Drawer components must be used within a DrawerRoot component"
|
|
230
230
|
);
|
|
231
231
|
return e;
|
|
232
232
|
}
|
|
233
|
-
const
|
|
233
|
+
const X = f(
|
|
234
234
|
"fixed inset-0 z-50 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md",
|
|
235
235
|
{
|
|
236
236
|
variants: {
|
|
@@ -243,7 +243,7 @@ const G = u(
|
|
|
243
243
|
state: "closed"
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
),
|
|
246
|
+
), q = f(
|
|
247
247
|
"fixed z-50 shadow-xl flex flex-col max-w-full",
|
|
248
248
|
{
|
|
249
249
|
variants: {
|
|
@@ -275,7 +275,7 @@ const G = u(
|
|
|
275
275
|
transitionType: "slide"
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
),
|
|
278
|
+
), J = f(
|
|
279
279
|
"flex justify-between items-center px-6",
|
|
280
280
|
{
|
|
281
281
|
variants: {
|
|
@@ -293,7 +293,7 @@ const G = u(
|
|
|
293
293
|
tab: !1
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
|
-
),
|
|
296
|
+
), Q = f("flex-1 overflow-y-auto px-6 py-4", {
|
|
297
297
|
variants: {
|
|
298
298
|
variant: {
|
|
299
299
|
default: "bg-white",
|
|
@@ -303,7 +303,7 @@ const G = u(
|
|
|
303
303
|
defaultVariants: {
|
|
304
304
|
variant: "default"
|
|
305
305
|
}
|
|
306
|
-
}),
|
|
306
|
+
}), Y = f("px-6 py-4 border-t", {
|
|
307
307
|
variants: {
|
|
308
308
|
variant: {
|
|
309
309
|
default: "bg-white border-border",
|
|
@@ -313,109 +313,109 @@ const G = u(
|
|
|
313
313
|
defaultVariants: {
|
|
314
314
|
variant: "default"
|
|
315
315
|
}
|
|
316
|
-
}),
|
|
317
|
-
const { isOpen:
|
|
316
|
+
}), Z = j.forwardRef(({ className: e, ...o }, t) => {
|
|
317
|
+
const { isOpen: n, disableOverlayClickToClose: a, onClose: s } = g(), i = () => {
|
|
318
318
|
a || s();
|
|
319
319
|
};
|
|
320
|
-
return /* @__PURE__ */
|
|
320
|
+
return /* @__PURE__ */ r.jsx(
|
|
321
321
|
"div",
|
|
322
322
|
{
|
|
323
323
|
ref: t,
|
|
324
324
|
onClick: i,
|
|
325
325
|
className: l(
|
|
326
|
-
|
|
327
|
-
state:
|
|
326
|
+
X({
|
|
327
|
+
state: n ? "open" : "closed"
|
|
328
328
|
}),
|
|
329
329
|
e
|
|
330
330
|
),
|
|
331
331
|
...o
|
|
332
332
|
}
|
|
333
333
|
);
|
|
334
|
-
}),
|
|
335
|
-
({ children: e, className: o, hasTab: t, ...
|
|
334
|
+
}), ee = j.forwardRef(
|
|
335
|
+
({ children: e, className: o, hasTab: t, ...n }, a) => {
|
|
336
336
|
const { variant: s } = g();
|
|
337
|
-
return /* @__PURE__ */
|
|
337
|
+
return /* @__PURE__ */ r.jsx(
|
|
338
338
|
"div",
|
|
339
339
|
{
|
|
340
340
|
ref: a,
|
|
341
341
|
className: l(
|
|
342
|
-
|
|
342
|
+
J({ variant: s, tab: !!t }),
|
|
343
343
|
o
|
|
344
344
|
),
|
|
345
|
-
...
|
|
345
|
+
...n,
|
|
346
346
|
children: e
|
|
347
347
|
}
|
|
348
348
|
);
|
|
349
349
|
}
|
|
350
|
-
),
|
|
351
|
-
const { onClose:
|
|
352
|
-
|
|
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);
|
|
353
353
|
};
|
|
354
|
-
return /* @__PURE__ */
|
|
355
|
-
|
|
354
|
+
return /* @__PURE__ */ r.jsx(
|
|
355
|
+
N,
|
|
356
356
|
{
|
|
357
357
|
"aria-label": "Close drawer",
|
|
358
358
|
...o,
|
|
359
359
|
onClick: a,
|
|
360
360
|
variant: "ghost",
|
|
361
361
|
size: "sm",
|
|
362
|
-
as:
|
|
362
|
+
as: R,
|
|
363
363
|
ref: t
|
|
364
364
|
}
|
|
365
365
|
);
|
|
366
|
-
}),
|
|
367
|
-
({ children: e, className: o, ...t },
|
|
368
|
-
),
|
|
369
|
-
({ children: e, className: o, ...t },
|
|
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
370
|
const { variant: a } = g();
|
|
371
|
-
return /* @__PURE__ */
|
|
371
|
+
return /* @__PURE__ */ r.jsx(
|
|
372
372
|
"div",
|
|
373
373
|
{
|
|
374
|
-
ref:
|
|
375
|
-
className: l(
|
|
374
|
+
ref: n,
|
|
375
|
+
className: l(Q({ variant: a }), o),
|
|
376
376
|
...t,
|
|
377
377
|
children: e
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
380
|
}
|
|
381
|
-
),
|
|
382
|
-
({ children: e, className: o, ...t },
|
|
381
|
+
), ae = j.forwardRef(
|
|
382
|
+
({ children: e, className: o, ...t }, n) => {
|
|
383
383
|
const { variant: a } = g();
|
|
384
|
-
return /* @__PURE__ */
|
|
384
|
+
return /* @__PURE__ */ r.jsx(
|
|
385
385
|
"div",
|
|
386
386
|
{
|
|
387
|
-
ref:
|
|
388
|
-
className: l(
|
|
387
|
+
ref: n,
|
|
388
|
+
className: l(Y({ variant: a }), o),
|
|
389
389
|
...t,
|
|
390
390
|
children: e
|
|
391
391
|
}
|
|
392
392
|
);
|
|
393
393
|
}
|
|
394
|
-
),
|
|
394
|
+
), se = ({
|
|
395
395
|
container: e,
|
|
396
396
|
children: o,
|
|
397
397
|
isOpen: t,
|
|
398
|
-
onClose:
|
|
398
|
+
onClose: n,
|
|
399
399
|
position: a = "right",
|
|
400
400
|
size: s = "md",
|
|
401
401
|
variant: i = "default",
|
|
402
|
-
transitionType:
|
|
403
|
-
disableOverlayClickToClose:
|
|
404
|
-
disableEscapeKeyDown:
|
|
402
|
+
transitionType: h = "slide",
|
|
403
|
+
disableOverlayClickToClose: b = !1,
|
|
404
|
+
disableEscapeKeyDown: w = !1,
|
|
405
405
|
className: d,
|
|
406
406
|
...c
|
|
407
407
|
}) => {
|
|
408
408
|
const m = {
|
|
409
409
|
isOpen: t,
|
|
410
|
-
onClose:
|
|
410
|
+
onClose: n,
|
|
411
411
|
position: a,
|
|
412
412
|
size: s,
|
|
413
413
|
variant: i,
|
|
414
|
-
transitionType:
|
|
415
|
-
disableOverlayClickToClose:
|
|
416
|
-
disableEscapeKeyDown:
|
|
417
|
-
},
|
|
418
|
-
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(
|
|
419
419
|
"div",
|
|
420
420
|
{
|
|
421
421
|
className: l(
|
|
@@ -423,22 +423,22 @@ const G = u(
|
|
|
423
423
|
t && "pointer-events-auto"
|
|
424
424
|
),
|
|
425
425
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
426
|
+
/* @__PURE__ */ r.jsx(Z, {}),
|
|
427
|
+
/* @__PURE__ */ r.jsx(
|
|
428
428
|
"div",
|
|
429
429
|
{
|
|
430
|
-
ref:
|
|
430
|
+
ref: v,
|
|
431
431
|
tabIndex: -1,
|
|
432
432
|
role: t ? "dialog" : void 0,
|
|
433
433
|
"aria-modal": t ? "true" : void 0,
|
|
434
434
|
className: l(
|
|
435
|
-
|
|
435
|
+
q({
|
|
436
436
|
position: a,
|
|
437
437
|
size: s,
|
|
438
438
|
variant: i,
|
|
439
|
-
transitionType:
|
|
439
|
+
transitionType: h
|
|
440
440
|
}),
|
|
441
|
-
|
|
441
|
+
h === "slide" ? [
|
|
442
442
|
!t && a === "left" && "-translate-x-full",
|
|
443
443
|
!t && a === "right" && "translate-x-full"
|
|
444
444
|
] : [
|
|
@@ -454,14 +454,14 @@ const G = u(
|
|
|
454
454
|
]
|
|
455
455
|
}
|
|
456
456
|
) }) });
|
|
457
|
-
},
|
|
458
|
-
Header:
|
|
459
|
-
Title:
|
|
460
|
-
CloseButton:
|
|
461
|
-
Tab:
|
|
462
|
-
Body:
|
|
463
|
-
Footer:
|
|
464
|
-
}),
|
|
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(
|
|
465
465
|
[
|
|
466
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",
|
|
467
467
|
"transition-transform duration-300 ease-in-out will-change-transform",
|
|
@@ -479,7 +479,7 @@ const G = u(
|
|
|
479
479
|
open: !1
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
),
|
|
482
|
+
), le = f(
|
|
483
483
|
["fixed inset-0 z-40 duration-300"],
|
|
484
484
|
{
|
|
485
485
|
variants: {
|
|
@@ -492,84 +492,99 @@ const G = u(
|
|
|
492
492
|
open: !1
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
),
|
|
496
|
-
"
|
|
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",
|
|
497
499
|
"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border"
|
|
498
|
-
]),
|
|
499
|
-
|
|
500
|
-
|
|
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,
|
|
501
513
|
{
|
|
502
|
-
ref:
|
|
503
|
-
|
|
504
|
-
|
|
514
|
+
ref: t,
|
|
515
|
+
variant: "ghost",
|
|
516
|
+
"aria-label": "Close",
|
|
517
|
+
as: R,
|
|
518
|
+
...o,
|
|
519
|
+
onClick: a
|
|
505
520
|
}
|
|
506
521
|
);
|
|
507
|
-
}),
|
|
522
|
+
}), ve = u(({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
508
523
|
"div",
|
|
509
524
|
{
|
|
510
525
|
ref: t,
|
|
511
|
-
className:
|
|
526
|
+
className: de({ className: e }),
|
|
512
527
|
...o
|
|
513
528
|
}
|
|
514
|
-
)),
|
|
515
|
-
({ className: e, ...o }, t) => /* @__PURE__ */
|
|
529
|
+
)), be = u(
|
|
530
|
+
({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
516
531
|
"div",
|
|
517
532
|
{
|
|
518
533
|
ref: t,
|
|
519
|
-
className:
|
|
534
|
+
className: ce({ className: e }),
|
|
520
535
|
...o
|
|
521
536
|
}
|
|
522
537
|
)
|
|
523
|
-
),
|
|
538
|
+
), xe = u(({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
524
539
|
"div",
|
|
525
540
|
{
|
|
526
541
|
ref: t,
|
|
527
|
-
className:
|
|
542
|
+
className: ue({ className: e }),
|
|
528
543
|
...o
|
|
529
544
|
}
|
|
530
|
-
)),
|
|
545
|
+
)), pe = (...e) => (o) => {
|
|
531
546
|
e.forEach((t) => {
|
|
532
547
|
typeof t == "function" ? t(o) : t && "current" in t && (t.current = o);
|
|
533
548
|
});
|
|
534
|
-
},
|
|
549
|
+
}, ge = u(
|
|
535
550
|
({
|
|
536
551
|
isOpen: e,
|
|
537
552
|
children: o,
|
|
538
553
|
className: t,
|
|
539
|
-
onClose:
|
|
554
|
+
onClose: n,
|
|
540
555
|
container: a,
|
|
541
556
|
disableOverlayClickToClose: s = !1,
|
|
542
557
|
...i
|
|
543
|
-
},
|
|
544
|
-
const
|
|
545
|
-
isOpen:
|
|
558
|
+
}, h) => {
|
|
559
|
+
const b = T(e, n), {
|
|
560
|
+
isOpen: w,
|
|
546
561
|
height: d,
|
|
547
562
|
isSupported: c
|
|
548
|
-
} =
|
|
563
|
+
} = L(), m = M(() => !e || !c || !w ? {} : {
|
|
549
564
|
// Adjust bottom position to sit above the virtual keyboard
|
|
550
565
|
bottom: `${d}px`,
|
|
551
566
|
// Reduce max height to account for keyboard
|
|
552
567
|
maxHeight: `calc(90dvh - ${d}px)`,
|
|
553
568
|
// Ensure smooth transition
|
|
554
569
|
transition: "bottom 0.2s ease-in-out, max-height 0.2s ease-in-out"
|
|
555
|
-
}, [e, c,
|
|
556
|
-
s ||
|
|
570
|
+
}, [e, c, w, d]), v = () => {
|
|
571
|
+
s || n?.();
|
|
557
572
|
};
|
|
558
|
-
return /* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
573
|
+
return /* @__PURE__ */ r.jsx(S, { container: a, children: /* @__PURE__ */ r.jsxs(fe, { value: { onClose: n }, children: [
|
|
574
|
+
/* @__PURE__ */ r.jsx(
|
|
560
575
|
"div",
|
|
561
576
|
{
|
|
562
|
-
className:
|
|
577
|
+
className: le({ open: e }),
|
|
563
578
|
"aria-hidden": "true",
|
|
564
|
-
onClick:
|
|
579
|
+
onClick: v
|
|
565
580
|
}
|
|
566
581
|
),
|
|
567
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ r.jsx(
|
|
568
583
|
"div",
|
|
569
584
|
{
|
|
570
|
-
ref:
|
|
585
|
+
ref: pe(h, b),
|
|
571
586
|
className: l(
|
|
572
|
-
|
|
587
|
+
ie({
|
|
573
588
|
open: e
|
|
574
589
|
}),
|
|
575
590
|
"flex flex-col",
|
|
@@ -584,16 +599,17 @@ const G = u(
|
|
|
584
599
|
children: o
|
|
585
600
|
}
|
|
586
601
|
)
|
|
587
|
-
] });
|
|
602
|
+
] }) });
|
|
588
603
|
}
|
|
589
|
-
),
|
|
590
|
-
Header:
|
|
591
|
-
Title:
|
|
592
|
-
|
|
593
|
-
|
|
604
|
+
), Ne = Object.assign(ge, {
|
|
605
|
+
Header: ve,
|
|
606
|
+
Title: he,
|
|
607
|
+
CloseIcon: we,
|
|
608
|
+
Body: be,
|
|
609
|
+
Footer: xe
|
|
594
610
|
});
|
|
595
611
|
export {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
612
|
+
Ne as B,
|
|
613
|
+
Te as D,
|
|
614
|
+
Se as M
|
|
599
615
|
};
|