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