@dimasbaguspm/versaur 0.0.44 → 0.0.46
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/forms/index.js +18 -20
- package/dist/js/{image-rectangle-DjuCYHbk.js → image-rectangle-B4nXH4Q5.js} +990 -1158
- package/dist/js/index.js +60 -64
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +5 -6
- package/dist/js/primitive/index.js +25 -26
- package/dist/js/{tabs-CiZ2DPDD.js → tabs-BAzThVka.js} +1 -1
- package/dist/js/{bottom-sheet-input-C9Ht9cxQ.js → time-picker-input-DrZ4dyEB.js} +875 -800
- package/dist/js/tooltip-D6fUigp2.js +691 -0
- package/dist/js/{top-bar-CKo6k1eW.js → top-bar-Dx0JVXms.js} +1 -1
- package/dist/types/forms/index.d.ts +7 -9
- package/dist/types/forms/pin-field/index.d.ts +2 -0
- package/dist/types/forms/pin-field/pin-field.d.ts +9 -0
- package/dist/types/forms/pin-field/types.d.ts +86 -0
- package/dist/types/primitive/action-card/action-card.atoms.d.ts +18 -0
- package/dist/types/primitive/action-card/action-card.d.ts +4 -0
- package/dist/types/primitive/action-card/index.d.ts +2 -0
- package/dist/types/primitive/action-card/types.d.ts +57 -0
- package/dist/types/primitive/brand/types.d.ts +1 -1
- package/dist/types/primitive/index.d.ts +1 -2
- package/dist/utils/enforce-subpath-import.js +2 -5
- package/package.json +1 -1
- package/dist/js/bottom-sheet-BSN0J8ji.js +0 -615
- package/dist/js/tooltip-nOXyn9AX.js +0 -81
- package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +0 -7
- package/dist/types/forms/bottom-sheet-input/index.d.ts +0 -2
- package/dist/types/forms/bottom-sheet-input/types.d.ts +0 -17
- package/dist/types/forms/drawer-input/drawer-input.d.ts +0 -6
- package/dist/types/forms/drawer-input/index.d.ts +0 -2
- package/dist/types/forms/drawer-input/types.d.ts +0 -18
- package/dist/types/forms/modal-input/index.d.ts +0 -2
- package/dist/types/forms/modal-input/modal-input.d.ts +0 -6
- package/dist/types/forms/modal-input/types.d.ts +0 -18
- package/dist/types/primitive/button-float/button-float.d.ts +0 -8
- package/dist/types/primitive/button-float/index.d.ts +0 -2
- package/dist/types/primitive/button-float/types.d.ts +0 -31
- package/dist/types/primitive/button-float/use-floating-position.d.ts +0 -12
- package/dist/types/primitive/calculator/calculator.atoms.d.ts +0 -2
- package/dist/types/primitive/calculator/calculator.d.ts +0 -2
- package/dist/types/primitive/calculator/index.d.ts +0 -2
- package/dist/types/primitive/calculator/types.d.ts +0 -29
- package/dist/types/primitive/calculator/use-calculator.d.ts +0 -11
|
@@ -1,615 +0,0 @@
|
|
|
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-DjuCYHbk.js";
|
|
4
|
-
import { XIcon as R } from "lucide-react";
|
|
5
|
-
import "./snackbar-DH8jCh2V.js";
|
|
6
|
-
function F() {
|
|
7
|
-
if (typeof window > "u") return !1;
|
|
8
|
-
const e = window.navigator.userAgent, o = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
9
|
-
e
|
|
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
|
-
}
|
|
13
|
-
function C() {
|
|
14
|
-
return typeof window < "u" && "navigator" in window && "virtualKeyboard" in navigator;
|
|
15
|
-
}
|
|
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
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
h(!0), w(C());
|
|
24
|
-
}, []), x(() => {
|
|
25
|
-
if (!i || !C())
|
|
26
|
-
return;
|
|
27
|
-
const d = navigator.virtualKeyboard, c = () => {
|
|
28
|
-
const { boundingRect: m } = d, v = m?.height || 0, y = m?.width || 0;
|
|
29
|
-
o(v > 0), n(v), s(y);
|
|
30
|
-
};
|
|
31
|
-
return c(), d.addEventListener("geometrychange", c), () => {
|
|
32
|
-
d.removeEventListener(
|
|
33
|
-
"geometrychange",
|
|
34
|
-
c
|
|
35
|
-
);
|
|
36
|
-
};
|
|
37
|
-
}, [i]), x(() => {
|
|
38
|
-
if (!i || C())
|
|
39
|
-
return;
|
|
40
|
-
const d = window.innerHeight;
|
|
41
|
-
let c;
|
|
42
|
-
const m = () => {
|
|
43
|
-
clearTimeout(c), c = setTimeout(() => {
|
|
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
|
-
}, 100);
|
|
47
|
-
};
|
|
48
|
-
return "visualViewport" in window && window.visualViewport ? (window.visualViewport.addEventListener("resize", m), () => {
|
|
49
|
-
clearTimeout(c), window.visualViewport?.removeEventListener(
|
|
50
|
-
"resize",
|
|
51
|
-
m
|
|
52
|
-
);
|
|
53
|
-
}) : (window.addEventListener("resize", m), () => {
|
|
54
|
-
clearTimeout(c), window.removeEventListener("resize", m);
|
|
55
|
-
});
|
|
56
|
-
}, [i]), x(() => {
|
|
57
|
-
i || (o(!1), n(0), s(0));
|
|
58
|
-
}, [i]), {
|
|
59
|
-
isOpen: e,
|
|
60
|
-
height: t,
|
|
61
|
-
width: a,
|
|
62
|
-
isSupported: i,
|
|
63
|
-
usingNativeAPI: b
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
const E = V(null);
|
|
67
|
-
function A() {
|
|
68
|
-
const e = B(E);
|
|
69
|
-
if (!e)
|
|
70
|
-
throw new Error(
|
|
71
|
-
"Modal components must be used within a ModalRoot component"
|
|
72
|
-
);
|
|
73
|
-
return e;
|
|
74
|
-
}
|
|
75
|
-
const O = f(
|
|
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
|
-
{
|
|
78
|
-
variants: {
|
|
79
|
-
placement: {
|
|
80
|
-
top: "items-start",
|
|
81
|
-
center: "items-center"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
defaultVariants: {
|
|
85
|
-
placement: "center"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
), W = f(
|
|
89
|
-
[
|
|
90
|
-
"absolute z-61 bg-white rounded-lg shadow-xl",
|
|
91
|
-
"flex flex-col",
|
|
92
|
-
"outline-none",
|
|
93
|
-
"transition-all duration-200 ease-in-out"
|
|
94
|
-
],
|
|
95
|
-
{
|
|
96
|
-
variants: {
|
|
97
|
-
size: {
|
|
98
|
-
sm: "w-[20rem] max-w-[90%]",
|
|
99
|
-
// 20rem, 320px
|
|
100
|
-
md: "w-[28rem] max-w-[90%]",
|
|
101
|
-
// 28rem, 448px
|
|
102
|
-
lg: "w-[36rem] max-w-[90%]",
|
|
103
|
-
// 36rem, 576px
|
|
104
|
-
"fit-content": "w-fit max-w-[90%]"
|
|
105
|
-
// Fit content, no max width
|
|
106
|
-
},
|
|
107
|
-
placement: {
|
|
108
|
-
top: "top-8 left-1/2 -translate-x-1/2",
|
|
109
|
-
center: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
|
|
110
|
-
},
|
|
111
|
-
isOpen: {
|
|
112
|
-
true: "opacity-100 scale-100",
|
|
113
|
-
false: "opacity-0 scale-95 pointer-events-none"
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
defaultVariants: {
|
|
117
|
-
size: "md",
|
|
118
|
-
placement: "center",
|
|
119
|
-
isOpen: !1
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
), K = u(
|
|
123
|
-
({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
124
|
-
"div",
|
|
125
|
-
{
|
|
126
|
-
ref: t,
|
|
127
|
-
className: l("px-6 pt-6 pb-2 text-lg font-semibold", e),
|
|
128
|
-
...o
|
|
129
|
-
}
|
|
130
|
-
)
|
|
131
|
-
), _ = u(
|
|
132
|
-
({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
133
|
-
"div",
|
|
134
|
-
{
|
|
135
|
-
ref: t,
|
|
136
|
-
className: l("px-6 py-4 flex justify-end gap-2", e),
|
|
137
|
-
...o
|
|
138
|
-
}
|
|
139
|
-
)
|
|
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
|
-
(e, o) => {
|
|
144
|
-
const { isOpen: t, placement: n, onClose: a, disableOverlayClickToClose: s } = A(), i = () => {
|
|
145
|
-
s || a();
|
|
146
|
-
};
|
|
147
|
-
return /* @__PURE__ */ r.jsx(
|
|
148
|
-
"div",
|
|
149
|
-
{
|
|
150
|
-
ref: o,
|
|
151
|
-
role: "presentation",
|
|
152
|
-
tabIndex: -1,
|
|
153
|
-
"aria-modal": "true",
|
|
154
|
-
onClick: i,
|
|
155
|
-
className: l(
|
|
156
|
-
O({ placement: n }),
|
|
157
|
-
t ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
158
|
-
),
|
|
159
|
-
...e
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
}
|
|
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 = ({
|
|
178
|
-
isOpen: e,
|
|
179
|
-
onClose: o,
|
|
180
|
-
size: t = "md",
|
|
181
|
-
placement: n = "center",
|
|
182
|
-
disableOverlayClickToClose: a = !1,
|
|
183
|
-
disableEscapeKeyDown: s = !1,
|
|
184
|
-
children: i,
|
|
185
|
-
container: h,
|
|
186
|
-
...b
|
|
187
|
-
}) => {
|
|
188
|
-
const w = {
|
|
189
|
-
isOpen: e,
|
|
190
|
-
onClose: o,
|
|
191
|
-
size: t,
|
|
192
|
-
placement: n,
|
|
193
|
-
disableOverlayClickToClose: a,
|
|
194
|
-
disableEscapeKeyDown: s
|
|
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
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
className: l(
|
|
200
|
-
"fixed z-50 inset-0 pointer-events-none",
|
|
201
|
-
e && "pointer-events-auto"
|
|
202
|
-
),
|
|
203
|
-
children: [
|
|
204
|
-
/* @__PURE__ */ r.jsx(G, {}),
|
|
205
|
-
/* @__PURE__ */ r.jsx(
|
|
206
|
-
"div",
|
|
207
|
-
{
|
|
208
|
-
ref: d,
|
|
209
|
-
className: l(W({ size: t, placement: n, isOpen: e })),
|
|
210
|
-
role: "dialog",
|
|
211
|
-
tabIndex: -1,
|
|
212
|
-
"aria-hidden": !e,
|
|
213
|
-
...b,
|
|
214
|
-
children: i
|
|
215
|
-
}
|
|
216
|
-
)
|
|
217
|
-
]
|
|
218
|
-
}
|
|
219
|
-
) }) });
|
|
220
|
-
}, Se = Object.assign(U, {
|
|
221
|
-
Header: K,
|
|
222
|
-
Body: $,
|
|
223
|
-
Footer: _
|
|
224
|
-
}), H = V(null);
|
|
225
|
-
function g() {
|
|
226
|
-
const e = B(H);
|
|
227
|
-
if (!e)
|
|
228
|
-
throw new Error(
|
|
229
|
-
"Drawer components must be used within a DrawerRoot component"
|
|
230
|
-
);
|
|
231
|
-
return e;
|
|
232
|
-
}
|
|
233
|
-
const X = f(
|
|
234
|
-
"fixed inset-0 z-50 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md",
|
|
235
|
-
{
|
|
236
|
-
variants: {
|
|
237
|
-
state: {
|
|
238
|
-
open: "opacity-100",
|
|
239
|
-
closed: "opacity-0 pointer-events-none"
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
defaultVariants: {
|
|
243
|
-
state: "closed"
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
), q = f(
|
|
247
|
-
"fixed z-50 shadow-xl flex flex-col max-w-full",
|
|
248
|
-
{
|
|
249
|
-
variants: {
|
|
250
|
-
position: {
|
|
251
|
-
left: "left-0 top-0 bottom-0 border-r",
|
|
252
|
-
right: "right-0 top-0 bottom-0 border-l"
|
|
253
|
-
},
|
|
254
|
-
size: {
|
|
255
|
-
sm: "w-80",
|
|
256
|
-
md: "w-96",
|
|
257
|
-
lg: "w-[28rem]",
|
|
258
|
-
xl: "w-[32rem]",
|
|
259
|
-
"3/4": "w-[75vw]",
|
|
260
|
-
full: "w-full"
|
|
261
|
-
},
|
|
262
|
-
variant: {
|
|
263
|
-
default: "bg-white border-border",
|
|
264
|
-
glass: "bg-white/10 backdrop-blur-lg border-white/20"
|
|
265
|
-
},
|
|
266
|
-
transitionType: {
|
|
267
|
-
slide: "transition-transform duration-300 ease-in-out",
|
|
268
|
-
fade: "transition-opacity duration-300 ease-in-out"
|
|
269
|
-
}
|
|
270
|
-
},
|
|
271
|
-
defaultVariants: {
|
|
272
|
-
position: "right",
|
|
273
|
-
size: "md",
|
|
274
|
-
variant: "default",
|
|
275
|
-
transitionType: "slide"
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
), J = f(
|
|
279
|
-
"flex justify-between items-center px-6",
|
|
280
|
-
{
|
|
281
|
-
variants: {
|
|
282
|
-
variant: {
|
|
283
|
-
default: "bg-white",
|
|
284
|
-
glass: "bg-transparent "
|
|
285
|
-
},
|
|
286
|
-
tab: {
|
|
287
|
-
true: "pt-4 pb-2",
|
|
288
|
-
false: "border-b border-border py-4 "
|
|
289
|
-
}
|
|
290
|
-
},
|
|
291
|
-
defaultVariants: {
|
|
292
|
-
variant: "default",
|
|
293
|
-
tab: !1
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
), Q = f("flex-1 overflow-y-auto px-6 py-4", {
|
|
297
|
-
variants: {
|
|
298
|
-
variant: {
|
|
299
|
-
default: "bg-white",
|
|
300
|
-
glass: "bg-transparent"
|
|
301
|
-
}
|
|
302
|
-
},
|
|
303
|
-
defaultVariants: {
|
|
304
|
-
variant: "default"
|
|
305
|
-
}
|
|
306
|
-
}), Y = f("px-6 py-4 border-t", {
|
|
307
|
-
variants: {
|
|
308
|
-
variant: {
|
|
309
|
-
default: "bg-white border-border",
|
|
310
|
-
glass: "bg-transparent border-white/10"
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
defaultVariants: {
|
|
314
|
-
variant: "default"
|
|
315
|
-
}
|
|
316
|
-
}), Z = j.forwardRef(({ className: e, ...o }, t) => {
|
|
317
|
-
const { isOpen: n, disableOverlayClickToClose: a, onClose: s } = g(), i = () => {
|
|
318
|
-
a || s();
|
|
319
|
-
};
|
|
320
|
-
return /* @__PURE__ */ r.jsx(
|
|
321
|
-
"div",
|
|
322
|
-
{
|
|
323
|
-
ref: t,
|
|
324
|
-
onClick: i,
|
|
325
|
-
className: l(
|
|
326
|
-
X({
|
|
327
|
-
state: n ? "open" : "closed"
|
|
328
|
-
}),
|
|
329
|
-
e
|
|
330
|
-
),
|
|
331
|
-
...o
|
|
332
|
-
}
|
|
333
|
-
);
|
|
334
|
-
}), ee = j.forwardRef(
|
|
335
|
-
({ children: e, className: o, hasTab: t, ...n }, a) => {
|
|
336
|
-
const { variant: s } = g();
|
|
337
|
-
return /* @__PURE__ */ r.jsx(
|
|
338
|
-
"div",
|
|
339
|
-
{
|
|
340
|
-
ref: a,
|
|
341
|
-
className: l(
|
|
342
|
-
J({ variant: s, tab: !!t }),
|
|
343
|
-
o
|
|
344
|
-
),
|
|
345
|
-
...n,
|
|
346
|
-
children: e
|
|
347
|
-
}
|
|
348
|
-
);
|
|
349
|
-
}
|
|
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
|
-
};
|
|
354
|
-
return /* @__PURE__ */ r.jsx(
|
|
355
|
-
N,
|
|
356
|
-
{
|
|
357
|
-
"aria-label": "Close drawer",
|
|
358
|
-
...o,
|
|
359
|
-
onClick: a,
|
|
360
|
-
variant: "ghost",
|
|
361
|
-
size: "sm",
|
|
362
|
-
as: R,
|
|
363
|
-
ref: t
|
|
364
|
-
}
|
|
365
|
-
);
|
|
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(
|
|
372
|
-
"div",
|
|
373
|
-
{
|
|
374
|
-
ref: n,
|
|
375
|
-
className: l(Q({ variant: a }), o),
|
|
376
|
-
...t,
|
|
377
|
-
children: e
|
|
378
|
-
}
|
|
379
|
-
);
|
|
380
|
-
}
|
|
381
|
-
), ae = j.forwardRef(
|
|
382
|
-
({ children: e, className: o, ...t }, n) => {
|
|
383
|
-
const { variant: a } = g();
|
|
384
|
-
return /* @__PURE__ */ r.jsx(
|
|
385
|
-
"div",
|
|
386
|
-
{
|
|
387
|
-
ref: n,
|
|
388
|
-
className: l(Y({ variant: a }), o),
|
|
389
|
-
...t,
|
|
390
|
-
children: e
|
|
391
|
-
}
|
|
392
|
-
);
|
|
393
|
-
}
|
|
394
|
-
), se = ({
|
|
395
|
-
container: e,
|
|
396
|
-
children: o,
|
|
397
|
-
isOpen: t,
|
|
398
|
-
onClose: n,
|
|
399
|
-
position: a = "right",
|
|
400
|
-
size: s = "md",
|
|
401
|
-
variant: i = "default",
|
|
402
|
-
transitionType: h = "slide",
|
|
403
|
-
disableOverlayClickToClose: b = !1,
|
|
404
|
-
disableEscapeKeyDown: w = !1,
|
|
405
|
-
className: d,
|
|
406
|
-
...c
|
|
407
|
-
}) => {
|
|
408
|
-
const m = {
|
|
409
|
-
isOpen: t,
|
|
410
|
-
onClose: n,
|
|
411
|
-
position: a,
|
|
412
|
-
size: s,
|
|
413
|
-
variant: i,
|
|
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
|
-
"div",
|
|
420
|
-
{
|
|
421
|
-
className: l(
|
|
422
|
-
"fixed z-50 inset-0 pointer-events-none",
|
|
423
|
-
t && "pointer-events-auto"
|
|
424
|
-
),
|
|
425
|
-
children: [
|
|
426
|
-
/* @__PURE__ */ r.jsx(Z, {}),
|
|
427
|
-
/* @__PURE__ */ r.jsx(
|
|
428
|
-
"div",
|
|
429
|
-
{
|
|
430
|
-
ref: v,
|
|
431
|
-
tabIndex: -1,
|
|
432
|
-
role: t ? "dialog" : void 0,
|
|
433
|
-
"aria-modal": t ? "true" : void 0,
|
|
434
|
-
className: l(
|
|
435
|
-
q({
|
|
436
|
-
position: a,
|
|
437
|
-
size: s,
|
|
438
|
-
variant: i,
|
|
439
|
-
transitionType: h
|
|
440
|
-
}),
|
|
441
|
-
h === "slide" ? [
|
|
442
|
-
!t && a === "left" && "-translate-x-full",
|
|
443
|
-
!t && a === "right" && "translate-x-full"
|
|
444
|
-
] : [
|
|
445
|
-
"left-0 right-0 top-0 bottom-0",
|
|
446
|
-
t ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
447
|
-
],
|
|
448
|
-
d
|
|
449
|
-
),
|
|
450
|
-
...c,
|
|
451
|
-
children: t && o
|
|
452
|
-
}
|
|
453
|
-
)
|
|
454
|
-
]
|
|
455
|
-
}
|
|
456
|
-
) }) });
|
|
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
|
-
[
|
|
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
|
-
"transition-transform duration-300 ease-in-out will-change-transform",
|
|
468
|
-
"overflow-hidden"
|
|
469
|
-
// Ensure content doesn't overflow when keyboard adjusts height
|
|
470
|
-
],
|
|
471
|
-
{
|
|
472
|
-
variants: {
|
|
473
|
-
open: {
|
|
474
|
-
true: "translate-y-0",
|
|
475
|
-
false: "translate-y-full"
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
defaultVariants: {
|
|
479
|
-
open: !1
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
), le = f(
|
|
483
|
-
["fixed inset-0 z-40 duration-300"],
|
|
484
|
-
{
|
|
485
|
-
variants: {
|
|
486
|
-
open: {
|
|
487
|
-
true: "backdrop-blur-md bg-foreground/30",
|
|
488
|
-
false: "pointer-events-none"
|
|
489
|
-
}
|
|
490
|
-
},
|
|
491
|
-
defaultVariants: {
|
|
492
|
-
open: !1
|
|
493
|
-
}
|
|
494
|
-
}
|
|
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",
|
|
499
|
-
"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border"
|
|
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,
|
|
513
|
-
{
|
|
514
|
-
ref: t,
|
|
515
|
-
variant: "ghost",
|
|
516
|
-
"aria-label": "Close",
|
|
517
|
-
as: R,
|
|
518
|
-
...o,
|
|
519
|
-
onClick: a
|
|
520
|
-
}
|
|
521
|
-
);
|
|
522
|
-
}), ve = u(({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
523
|
-
"div",
|
|
524
|
-
{
|
|
525
|
-
ref: t,
|
|
526
|
-
className: de({ className: e }),
|
|
527
|
-
...o
|
|
528
|
-
}
|
|
529
|
-
)), be = u(
|
|
530
|
-
({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
531
|
-
"div",
|
|
532
|
-
{
|
|
533
|
-
ref: t,
|
|
534
|
-
className: ce({ className: e }),
|
|
535
|
-
...o
|
|
536
|
-
}
|
|
537
|
-
)
|
|
538
|
-
), xe = u(({ className: e, ...o }, t) => /* @__PURE__ */ r.jsx(
|
|
539
|
-
"div",
|
|
540
|
-
{
|
|
541
|
-
ref: t,
|
|
542
|
-
className: ue({ className: e }),
|
|
543
|
-
...o
|
|
544
|
-
}
|
|
545
|
-
)), pe = (...e) => (o) => {
|
|
546
|
-
e.forEach((t) => {
|
|
547
|
-
typeof t == "function" ? t(o) : t && "current" in t && (t.current = o);
|
|
548
|
-
});
|
|
549
|
-
}, ge = u(
|
|
550
|
-
({
|
|
551
|
-
isOpen: e,
|
|
552
|
-
children: o,
|
|
553
|
-
className: t,
|
|
554
|
-
onClose: n,
|
|
555
|
-
container: a,
|
|
556
|
-
disableOverlayClickToClose: s = !1,
|
|
557
|
-
...i
|
|
558
|
-
}, h) => {
|
|
559
|
-
const b = T(e, n), {
|
|
560
|
-
isOpen: w,
|
|
561
|
-
height: d,
|
|
562
|
-
isSupported: c
|
|
563
|
-
} = L(), m = M(() => !e || !c || !w ? {} : {
|
|
564
|
-
// Adjust bottom position to sit above the virtual keyboard
|
|
565
|
-
bottom: `${d}px`,
|
|
566
|
-
// Reduce max height to account for keyboard
|
|
567
|
-
maxHeight: `calc(90dvh - ${d}px)`,
|
|
568
|
-
// Ensure smooth transition
|
|
569
|
-
transition: "bottom 0.2s ease-in-out, max-height 0.2s ease-in-out"
|
|
570
|
-
}, [e, c, w, d]), v = () => {
|
|
571
|
-
s || n?.();
|
|
572
|
-
};
|
|
573
|
-
return /* @__PURE__ */ r.jsx(S, { container: a, children: /* @__PURE__ */ r.jsxs(fe, { value: { onClose: n }, children: [
|
|
574
|
-
/* @__PURE__ */ r.jsx(
|
|
575
|
-
"div",
|
|
576
|
-
{
|
|
577
|
-
className: le({ open: e }),
|
|
578
|
-
"aria-hidden": "true",
|
|
579
|
-
onClick: v
|
|
580
|
-
}
|
|
581
|
-
),
|
|
582
|
-
/* @__PURE__ */ r.jsx(
|
|
583
|
-
"div",
|
|
584
|
-
{
|
|
585
|
-
ref: pe(h, b),
|
|
586
|
-
className: l(
|
|
587
|
-
ie({
|
|
588
|
-
open: e
|
|
589
|
-
}),
|
|
590
|
-
"flex flex-col",
|
|
591
|
-
// Add flex layout for proper header/body/footer arrangement
|
|
592
|
-
t
|
|
593
|
-
),
|
|
594
|
-
style: m,
|
|
595
|
-
role: "dialog",
|
|
596
|
-
"aria-modal": "true",
|
|
597
|
-
tabIndex: -1,
|
|
598
|
-
...i,
|
|
599
|
-
children: o
|
|
600
|
-
}
|
|
601
|
-
)
|
|
602
|
-
] }) });
|
|
603
|
-
}
|
|
604
|
-
), Ne = Object.assign(ge, {
|
|
605
|
-
Header: ve,
|
|
606
|
-
Title: he,
|
|
607
|
-
CloseIcon: we,
|
|
608
|
-
Body: be,
|
|
609
|
-
Footer: xe
|
|
610
|
-
});
|
|
611
|
-
export {
|
|
612
|
-
Ne as B,
|
|
613
|
-
Te as D,
|
|
614
|
-
Se as M
|
|
615
|
-
};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { c as v, j as c, a as w } from "./index-DOdDlCoL.js";
|
|
2
|
-
import { useRef as m, useState as d, useEffect as h, useId as T, cloneElement as j } from "react";
|
|
3
|
-
import { n as y } from "./image-rectangle-DjuCYHbk.js";
|
|
4
|
-
function P(e = "auto") {
|
|
5
|
-
const n = m(null), [a, t] = d("bottom");
|
|
6
|
-
return h(() => {
|
|
7
|
-
if (!open || e !== "auto" || !n.current) {
|
|
8
|
-
t(e === "auto" ? "bottom" : e);
|
|
9
|
-
return;
|
|
10
|
-
}
|
|
11
|
-
const o = n.current.getBoundingClientRect(), l = window.innerWidth, r = window.innerHeight, i = {
|
|
12
|
-
top: o.top,
|
|
13
|
-
bottom: r - o.bottom,
|
|
14
|
-
left: o.left,
|
|
15
|
-
right: l - o.right
|
|
16
|
-
};
|
|
17
|
-
i.bottom > 64 ? t("bottom") : i.top > 64 ? t("top") : i.right > 128 ? t("right") : t("left");
|
|
18
|
-
}, [e, n]), { position: a, ref: n };
|
|
19
|
-
}
|
|
20
|
-
const E = v(
|
|
21
|
-
"absolute z-50 px-2 py-1 rounded bg-neutral pointer-events-auto transition-opacity duration-150 min-w-[max-content] max-w-sm whitespace-pre-line",
|
|
22
|
-
{
|
|
23
|
-
variants: {
|
|
24
|
-
position: {
|
|
25
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
26
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
27
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
28
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2",
|
|
29
|
-
auto: "top-full left-1/2 -translate-x-1/2 mt-2"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
defaultVariants: {
|
|
33
|
-
position: "auto"
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
), O = ({
|
|
37
|
-
children: e,
|
|
38
|
-
content: n,
|
|
39
|
-
position: a = "auto",
|
|
40
|
-
popoverClassName: t,
|
|
41
|
-
delay: o,
|
|
42
|
-
...l
|
|
43
|
-
}) => {
|
|
44
|
-
const r = T(), [i, u] = d(!1), s = m(null), p = () => {
|
|
45
|
-
o ? s.current = setTimeout(() => u(!0), o) : u(!0);
|
|
46
|
-
}, f = () => {
|
|
47
|
-
s.current && clearTimeout(s.current), u(!1);
|
|
48
|
-
};
|
|
49
|
-
h(() => () => {
|
|
50
|
-
s.current && clearTimeout(s.current);
|
|
51
|
-
}, []);
|
|
52
|
-
const b = {
|
|
53
|
-
tabIndex: 0,
|
|
54
|
-
"aria-describedby": r,
|
|
55
|
-
onMouseEnter: p,
|
|
56
|
-
onFocus: p,
|
|
57
|
-
onMouseLeave: f,
|
|
58
|
-
onBlur: f,
|
|
59
|
-
...l
|
|
60
|
-
}, { ref: x, position: g } = P(a);
|
|
61
|
-
return /* @__PURE__ */ c.jsxs("div", { className: "relative w-fit", ref: x, children: [
|
|
62
|
-
j(e, b),
|
|
63
|
-
/* @__PURE__ */ c.jsx(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
id: r,
|
|
67
|
-
className: w(
|
|
68
|
-
E({ position: g }),
|
|
69
|
-
t,
|
|
70
|
-
!i && "opacity-0 pointer-events-none"
|
|
71
|
-
),
|
|
72
|
-
role: "tooltip",
|
|
73
|
-
"aria-hidden": !i,
|
|
74
|
-
children: /* @__PURE__ */ c.jsx(y, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: n })
|
|
75
|
-
}
|
|
76
|
-
)
|
|
77
|
-
] });
|
|
78
|
-
};
|
|
79
|
-
export {
|
|
80
|
-
O as T
|
|
81
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BottomSheetInputProps } from './types';
|
|
2
|
-
export declare const BottomSheetInput: import('react').ForwardRefExoticComponent<BottomSheetInputProps & import('react').RefAttributes<HTMLInputElement>> & {
|
|
3
|
-
Header: import('react').ForwardRefExoticComponent<import('../..').BottomSheetHeaderProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
4
|
-
Body: import('react').ForwardRefExoticComponent<import('../..').BottomSheetBodyProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
5
|
-
Footer: import('react').ForwardRefExoticComponent<import('../..').BottomSheetFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
-
Title: import('react').ForwardRefExoticComponent<import('../..').HeadingProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
7
|
-
};
|