@dimasbaguspm/versaur 0.0.48 → 0.0.49
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/assets/styles.css +14 -6
- package/dist/js/forms/index.js +12 -14
- package/dist/js/image-rectangle-K9jmTTED.js +2607 -0
- package/dist/js/index.js +66 -68
- package/dist/js/layouts/index.js +8 -9
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +21 -20
- package/dist/js/tabs-I4n6MLAv.js +210 -0
- package/dist/js/time-picker-input-jJBtyikv.js +1562 -0
- package/dist/js/{tooltip-D6fUigp2.js → tooltip-nZW9TUz3.js} +293 -297
- package/dist/js/{top-bar-Dx0JVXms.js → top-bar-BMw3gFYA.js} +292 -247
- package/dist/types/forms/checkbox-input/checkbox-input.d.ts +1 -1
- package/dist/types/forms/checkbox-input/types.d.ts +11 -14
- package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +2 -2
- package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +1 -1
- package/dist/types/forms/chip-multiple-input/types.d.ts +15 -14
- package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +1 -1
- package/dist/types/forms/chip-single-input/chip-single-input.d.ts +1 -1
- package/dist/types/forms/chip-single-input/types.d.ts +15 -14
- package/dist/types/forms/date-single-picker-input/types.d.ts +10 -0
- package/dist/types/forms/index.d.ts +0 -2
- package/dist/types/forms/pin-field/pin-field.d.ts +2 -2
- package/dist/types/forms/pin-field/types.d.ts +16 -28
- package/dist/types/forms/select-input/index.d.ts +1 -1
- package/dist/types/forms/select-input/select-input.atoms.d.ts +16 -0
- package/dist/types/forms/select-input/select-input.d.ts +4 -7
- package/dist/types/forms/select-input/types.d.ts +32 -9
- package/dist/types/forms/selectable-multiple-input/selectable-multiple-input.d.ts +1 -1
- package/dist/types/forms/selectable-multiple-input/types.d.ts +20 -3
- package/dist/types/forms/selectable-single-input/selectable-single-input.d.ts +1 -1
- package/dist/types/forms/selectable-single-input/types.d.ts +20 -3
- package/dist/types/forms/switch-input/switch-input.atoms.d.ts +7 -8
- package/dist/types/forms/switch-input/switch-input.d.ts +5 -1
- package/dist/types/forms/switch-input/types.d.ts +10 -33
- package/dist/types/forms/text-input/text-input.d.ts +2 -2
- package/dist/types/forms/text-input/types.d.ts +0 -7
- package/dist/types/forms/textarea-input/textarea-input.d.ts +3 -3
- package/dist/types/forms/textarea-input/types.d.ts +33 -18
- package/dist/types/layouts/index.d.ts +1 -2
- package/dist/types/layouts/page-content/index.d.ts +1 -1
- package/dist/types/layouts/page-content/page-content.d.ts +5 -11
- package/dist/types/layouts/page-content/types.d.ts +29 -9
- package/dist/types/layouts/page-header/types.d.ts +13 -0
- package/dist/types/navigation/tabs/tabs.atoms.d.ts +3 -2
- package/dist/types/navigation/tabs/types.d.ts +5 -13
- package/dist/types/navigation/tabs/use-tab-indicator.d.ts +8 -8
- package/dist/types/overlays/drawer/drawer.atoms.d.ts +18 -8
- package/dist/types/overlays/drawer/drawer.d.ts +5 -5
- package/dist/types/overlays/drawer/types.d.ts +11 -15
- package/dist/types/primitive/button/button.d.ts +5 -0
- package/dist/types/primitive/button/types.d.ts +24 -11
- package/dist/types/primitive/button-anchor/button-anchor.d.ts +9 -0
- package/dist/types/primitive/button-anchor/index.d.ts +2 -0
- package/dist/types/primitive/button-anchor/types.d.ts +35 -0
- package/dist/types/primitive/button-icon/button-icon.d.ts +6 -0
- package/dist/types/primitive/button-icon/types.d.ts +21 -10
- package/dist/types/primitive/filter-chip/types.d.ts +0 -10
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/types/templates/pin-verifier-drawer/types.d.ts +0 -5
- package/dist/utils/enforce-subpath-import.js +1 -3
- package/package.json +1 -1
- package/dist/js/image-rectangle-B4nXH4Q5.js +0 -2581
- package/dist/js/tabs-BAzThVka.js +0 -291
- package/dist/js/time-picker-input-JBEgDV2V.js +0 -2049
- package/dist/types/forms/segment-multiple-input/index.d.ts +0 -2
- package/dist/types/forms/segment-multiple-input/segment-multiple-input.atoms.d.ts +0 -12
- package/dist/types/forms/segment-multiple-input/segment-multiple-input.d.ts +0 -7
- package/dist/types/forms/segment-multiple-input/types.d.ts +0 -55
- package/dist/types/forms/segment-single-input/index.d.ts +0 -2
- package/dist/types/forms/segment-single-input/segment-single-input.atoms.d.ts +0 -11
- package/dist/types/forms/segment-single-input/segment-single-input.d.ts +0 -7
- package/dist/types/forms/segment-single-input/types.d.ts +0 -55
- package/dist/types/layouts/page-layout/index.d.ts +0 -2
- package/dist/types/layouts/page-layout/page-layout.d.ts +0 -8
- package/dist/types/layouts/page-layout/types.d.ts +0 -20
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import
|
|
3
|
-
import { XIcon as
|
|
4
|
-
import {
|
|
1
|
+
import { c as p, j as a, a as u } from "./index-DOdDlCoL.js";
|
|
2
|
+
import g, { useState as y, useEffect as v, createContext as V, useContext as T, forwardRef as h, useRef as S, useId as k, useMemo as _, cloneElement as $ } from "react";
|
|
3
|
+
import { XIcon as R } from "lucide-react";
|
|
4
|
+
import { n as D, l as E, O as N, H as G } from "./image-rectangle-K9jmTTED.js";
|
|
5
5
|
import "./snackbar-DH8jCh2V.js";
|
|
6
|
-
function
|
|
6
|
+
function U() {
|
|
7
7
|
if (typeof window > "u") return !1;
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
),
|
|
11
|
-
return o ||
|
|
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, r = window.innerWidth <= 1024;
|
|
11
|
+
return o || t || n && r;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function B() {
|
|
14
14
|
return typeof window < "u" && "navigator" in window && "virtualKeyboard" in navigator;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
17
|
-
const [
|
|
18
|
-
return
|
|
19
|
-
if (!
|
|
20
|
-
|
|
16
|
+
function X() {
|
|
17
|
+
const [e, o] = y(!1), [t, n] = y(0), [r, s] = y(0), [i, c] = y(!1), [w, f] = y(!1);
|
|
18
|
+
return v(() => {
|
|
19
|
+
if (!U()) {
|
|
20
|
+
c(!1);
|
|
21
21
|
return;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
}, []),
|
|
25
|
-
if (!i || !
|
|
23
|
+
c(!0), f(B());
|
|
24
|
+
}, []), v(() => {
|
|
25
|
+
if (!i || !B())
|
|
26
26
|
return;
|
|
27
|
-
const d = navigator.virtualKeyboard,
|
|
28
|
-
const { boundingRect: m } = d,
|
|
29
|
-
o(
|
|
27
|
+
const d = navigator.virtualKeyboard, l = () => {
|
|
28
|
+
const { boundingRect: m } = d, b = m?.height || 0, x = m?.width || 0;
|
|
29
|
+
o(b > 0), n(b), s(x);
|
|
30
30
|
};
|
|
31
|
-
return
|
|
31
|
+
return l(), d.addEventListener("geometrychange", l), () => {
|
|
32
32
|
d.removeEventListener(
|
|
33
33
|
"geometrychange",
|
|
34
|
-
|
|
34
|
+
l
|
|
35
35
|
);
|
|
36
36
|
};
|
|
37
|
-
}, [i]),
|
|
38
|
-
if (!i ||
|
|
37
|
+
}, [i]), v(() => {
|
|
38
|
+
if (!i || B())
|
|
39
39
|
return;
|
|
40
40
|
const d = window.innerHeight;
|
|
41
|
-
let
|
|
41
|
+
let l;
|
|
42
42
|
const m = () => {
|
|
43
|
-
clearTimeout(
|
|
44
|
-
const
|
|
45
|
-
o(C), n(C ?
|
|
43
|
+
clearTimeout(l), l = setTimeout(() => {
|
|
44
|
+
const b = window.visualViewport?.height ?? window.innerHeight, x = d - b, C = x > 150;
|
|
45
|
+
o(C), n(C ? x : 0), s(C ? window.innerWidth : 0);
|
|
46
46
|
}, 100);
|
|
47
47
|
};
|
|
48
48
|
return "visualViewport" in window && window.visualViewport ? (window.visualViewport.addEventListener("resize", m), () => {
|
|
49
|
-
clearTimeout(
|
|
49
|
+
clearTimeout(l), window.visualViewport?.removeEventListener(
|
|
50
50
|
"resize",
|
|
51
51
|
m
|
|
52
52
|
);
|
|
53
53
|
}) : (window.addEventListener("resize", m), () => {
|
|
54
|
-
clearTimeout(
|
|
54
|
+
clearTimeout(l), window.removeEventListener("resize", m);
|
|
55
55
|
});
|
|
56
|
-
}, [i]),
|
|
56
|
+
}, [i]), v(() => {
|
|
57
57
|
i || (o(!1), n(0), s(0));
|
|
58
58
|
}, [i]), {
|
|
59
|
-
isOpen:
|
|
60
|
-
height:
|
|
59
|
+
isOpen: e,
|
|
60
|
+
height: t,
|
|
61
61
|
width: r,
|
|
62
62
|
isSupported: i,
|
|
63
63
|
usingNativeAPI: w
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
const
|
|
67
|
-
function
|
|
68
|
-
const
|
|
69
|
-
if (!
|
|
66
|
+
const H = V(null);
|
|
67
|
+
function j() {
|
|
68
|
+
const e = T(H);
|
|
69
|
+
if (!e)
|
|
70
70
|
throw new Error(
|
|
71
71
|
"Drawer components must be used within a DrawerRoot component"
|
|
72
72
|
);
|
|
73
|
-
return
|
|
73
|
+
return e;
|
|
74
74
|
}
|
|
75
|
-
const
|
|
75
|
+
const q = p(
|
|
76
76
|
"fixed inset-0 z-50 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md",
|
|
77
77
|
{
|
|
78
78
|
variants: {
|
|
@@ -85,13 +85,13 @@ const W = h(
|
|
|
85
85
|
state: "closed"
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
),
|
|
89
|
-
"fixed z-50 shadow-xl flex flex-col max-w-full",
|
|
88
|
+
), J = p(
|
|
89
|
+
"fixed z-50 shadow-xl flex flex-col max-w-full bg-white",
|
|
90
90
|
{
|
|
91
91
|
variants: {
|
|
92
92
|
position: {
|
|
93
|
-
left: "left-0 top-0 bottom-0 border-r",
|
|
94
|
-
right: "right-0 top-0 bottom-0 border-l"
|
|
93
|
+
left: "left-0 top-0 bottom-0 border-r border-border",
|
|
94
|
+
right: "right-0 top-0 bottom-0 border-l border-border"
|
|
95
95
|
},
|
|
96
96
|
size: {
|
|
97
97
|
sm: "w-80",
|
|
@@ -101,10 +101,6 @@ const W = h(
|
|
|
101
101
|
"3/4": "w-[75vw]",
|
|
102
102
|
full: "w-full"
|
|
103
103
|
},
|
|
104
|
-
variant: {
|
|
105
|
-
default: "bg-white border-border",
|
|
106
|
-
glass: "bg-white/10 backdrop-blur-lg border-white/20"
|
|
107
|
-
},
|
|
108
104
|
transitionType: {
|
|
109
105
|
slide: "transition-transform duration-300 ease-in-out",
|
|
110
106
|
fade: "transition-opacity duration-300 ease-in-out"
|
|
@@ -113,85 +109,70 @@ const W = h(
|
|
|
113
109
|
defaultVariants: {
|
|
114
110
|
position: "right",
|
|
115
111
|
size: "md",
|
|
116
|
-
variant: "default",
|
|
117
112
|
transitionType: "slide"
|
|
118
113
|
}
|
|
119
114
|
}
|
|
120
|
-
),
|
|
121
|
-
"flex justify-between items-center px-6",
|
|
115
|
+
), Q = p(
|
|
116
|
+
"flex justify-between items-center px-6 bg-white",
|
|
122
117
|
{
|
|
123
118
|
variants: {
|
|
124
|
-
variant: {
|
|
125
|
-
default: "bg-white",
|
|
126
|
-
glass: "bg-transparent "
|
|
127
|
-
},
|
|
128
119
|
tab: {
|
|
129
120
|
true: "pt-4 pb-2",
|
|
130
|
-
false: "border-b border-border py-4
|
|
121
|
+
false: "border-b border-border py-4"
|
|
131
122
|
}
|
|
132
123
|
},
|
|
133
124
|
defaultVariants: {
|
|
134
|
-
variant: "default",
|
|
135
125
|
tab: !1
|
|
136
126
|
}
|
|
137
127
|
}
|
|
138
|
-
),
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
defaultVariants: {
|
|
146
|
-
variant: "default"
|
|
147
|
-
}
|
|
148
|
-
}), G = h("px-6 py-4 border-t", {
|
|
149
|
-
variants: {
|
|
150
|
-
variant: {
|
|
151
|
-
default: "bg-white border-border",
|
|
152
|
-
glass: "bg-transparent border-white/10"
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
defaultVariants: {
|
|
156
|
-
variant: "default"
|
|
157
|
-
}
|
|
158
|
-
}), U = j.forwardRef(({ className: t, ...o }, e) => {
|
|
159
|
-
const { isOpen: n, disableOverlayClickToClose: r, onClose: s } = y(), i = () => {
|
|
128
|
+
), Y = p(
|
|
129
|
+
"flex-1 overflow-y-auto px-6 py-4 bg-white"
|
|
130
|
+
), Z = p(
|
|
131
|
+
"px-6 py-4 border-t border-border bg-white"
|
|
132
|
+
), z = g.forwardRef(({ className: e, ...o }, t) => {
|
|
133
|
+
const { isOpen: n, disableOverlayClickToClose: r, onClose: s } = j(), i = () => {
|
|
160
134
|
r || s();
|
|
161
135
|
};
|
|
162
136
|
return /* @__PURE__ */ a.jsx(
|
|
163
137
|
"div",
|
|
164
138
|
{
|
|
165
|
-
ref:
|
|
139
|
+
ref: t,
|
|
166
140
|
onClick: i,
|
|
167
|
-
|
|
168
|
-
|
|
141
|
+
"aria-hidden": "true",
|
|
142
|
+
className: u(
|
|
143
|
+
q({
|
|
169
144
|
state: n ? "open" : "closed"
|
|
170
145
|
}),
|
|
171
|
-
|
|
146
|
+
e
|
|
172
147
|
),
|
|
173
148
|
...o
|
|
174
149
|
}
|
|
175
150
|
);
|
|
176
|
-
})
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
151
|
+
});
|
|
152
|
+
z.displayName = "DrawerOverlay";
|
|
153
|
+
const M = g.forwardRef(
|
|
154
|
+
({ children: e, className: o, hasTab: t, ...n }, r) => /* @__PURE__ */ a.jsx(
|
|
155
|
+
"header",
|
|
156
|
+
{
|
|
157
|
+
ref: r,
|
|
158
|
+
className: u(
|
|
159
|
+
Q({ tab: !!t }),
|
|
160
|
+
o
|
|
161
|
+
),
|
|
162
|
+
...n,
|
|
163
|
+
children: e
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
M.displayName = "DrawerHeader";
|
|
168
|
+
const P = h((e, o) => {
|
|
169
|
+
const { titleId: t } = j();
|
|
170
|
+
return /* @__PURE__ */ a.jsx(D, { ...e, ref: o, as: "h3", fontSize: "lg", id: t });
|
|
171
|
+
});
|
|
172
|
+
P.displayName = "DrawerTitle";
|
|
173
|
+
const O = h(({ onClick: e, ...o }, t) => {
|
|
174
|
+
const { onClose: n } = j(), r = (s) => {
|
|
175
|
+
n(), e?.(s);
|
|
195
176
|
};
|
|
196
177
|
return /* @__PURE__ */ a.jsx(
|
|
197
178
|
E,
|
|
@@ -201,132 +182,147 @@ const W = h(
|
|
|
201
182
|
onClick: r,
|
|
202
183
|
variant: "ghost",
|
|
203
184
|
size: "sm",
|
|
204
|
-
as:
|
|
205
|
-
ref:
|
|
185
|
+
as: R,
|
|
186
|
+
ref: t
|
|
206
187
|
}
|
|
207
188
|
);
|
|
208
|
-
})
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
({ children:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
const { variant: r } = y();
|
|
189
|
+
});
|
|
190
|
+
O.displayName = "DrawerCloseButton";
|
|
191
|
+
const F = h(
|
|
192
|
+
({ children: e, className: o, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
193
|
+
"div",
|
|
194
|
+
{
|
|
195
|
+
ref: n,
|
|
196
|
+
className: u("[&>nav>div>ul]:px-6", o),
|
|
197
|
+
...t,
|
|
198
|
+
children: e
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
);
|
|
202
|
+
F.displayName = "DrawerTab";
|
|
203
|
+
const L = g.forwardRef(
|
|
204
|
+
({ children: e, className: o, ...t }, n) => {
|
|
205
|
+
const { descriptionId: r } = j();
|
|
226
206
|
return /* @__PURE__ */ a.jsx(
|
|
227
|
-
"
|
|
207
|
+
"main",
|
|
228
208
|
{
|
|
229
209
|
ref: n,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
210
|
+
id: r,
|
|
211
|
+
className: u(Y(), o),
|
|
212
|
+
...t,
|
|
213
|
+
children: e
|
|
233
214
|
}
|
|
234
215
|
);
|
|
235
216
|
}
|
|
236
217
|
);
|
|
237
|
-
|
|
218
|
+
L.displayName = "DrawerBody";
|
|
219
|
+
const A = g.forwardRef(
|
|
220
|
+
({ children: e, className: o, ...t }, n) => /* @__PURE__ */ a.jsx(
|
|
221
|
+
"footer",
|
|
222
|
+
{
|
|
223
|
+
ref: n,
|
|
224
|
+
className: u(Z(), o),
|
|
225
|
+
...t,
|
|
226
|
+
children: e
|
|
227
|
+
}
|
|
228
|
+
)
|
|
229
|
+
);
|
|
230
|
+
A.displayName = "DrawerFooter";
|
|
231
|
+
function I(e, o, t) {
|
|
238
232
|
const n = S(null);
|
|
239
|
-
return
|
|
233
|
+
return v(() => {
|
|
240
234
|
n.current && n.current.focus();
|
|
241
|
-
}, []),
|
|
235
|
+
}, []), v(() => {
|
|
242
236
|
const r = (s) => {
|
|
243
|
-
s.key === "Escape" &&
|
|
237
|
+
s.key === "Escape" && e && n.current && n.current.contains(document.activeElement) && !t && o();
|
|
244
238
|
};
|
|
245
|
-
return
|
|
239
|
+
return e && (document.addEventListener("keydown", r), document.body.style.overflow = "hidden"), () => {
|
|
246
240
|
document.removeEventListener("keydown", r), document.body.style.overflow = "unset";
|
|
247
241
|
};
|
|
248
|
-
}, [
|
|
242
|
+
}, [e, o, t, n]), n;
|
|
249
243
|
}
|
|
250
|
-
const
|
|
251
|
-
container:
|
|
244
|
+
const ee = ({
|
|
245
|
+
container: e,
|
|
252
246
|
children: o,
|
|
253
|
-
isOpen:
|
|
247
|
+
isOpen: t,
|
|
254
248
|
onClose: n,
|
|
255
249
|
position: r = "right",
|
|
256
250
|
size: s = "md",
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
...c
|
|
251
|
+
transitionType: i = "slide",
|
|
252
|
+
disableOverlayClickToClose: c = !1,
|
|
253
|
+
disableEscapeKeyDown: w = !1,
|
|
254
|
+
className: f,
|
|
255
|
+
...d
|
|
263
256
|
}) => {
|
|
264
|
-
const m = {
|
|
265
|
-
isOpen:
|
|
257
|
+
const l = k(), m = k(), b = {
|
|
258
|
+
isOpen: t,
|
|
266
259
|
onClose: n,
|
|
267
260
|
position: r,
|
|
268
261
|
size: s,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
262
|
+
transitionType: i,
|
|
263
|
+
disableOverlayClickToClose: c,
|
|
264
|
+
disableEscapeKeyDown: w,
|
|
265
|
+
titleId: l,
|
|
266
|
+
descriptionId: m
|
|
267
|
+
}, x = I(t, n, w);
|
|
268
|
+
return /* @__PURE__ */ a.jsx(N, { container: e, children: /* @__PURE__ */ a.jsx(H.Provider, { value: b, children: /* @__PURE__ */ a.jsxs(
|
|
275
269
|
"div",
|
|
276
270
|
{
|
|
277
|
-
className:
|
|
271
|
+
className: u(
|
|
278
272
|
"fixed z-50 inset-0 pointer-events-none",
|
|
279
|
-
|
|
273
|
+
t && "pointer-events-auto"
|
|
280
274
|
),
|
|
281
275
|
children: [
|
|
282
|
-
/* @__PURE__ */ a.jsx(
|
|
276
|
+
/* @__PURE__ */ a.jsx(z, {}),
|
|
283
277
|
/* @__PURE__ */ a.jsx(
|
|
284
278
|
"div",
|
|
285
279
|
{
|
|
286
|
-
ref:
|
|
280
|
+
ref: x,
|
|
281
|
+
role: "dialog",
|
|
287
282
|
tabIndex: -1,
|
|
288
|
-
|
|
289
|
-
"aria-
|
|
290
|
-
|
|
291
|
-
|
|
283
|
+
"aria-modal": "true",
|
|
284
|
+
"aria-labelledby": l,
|
|
285
|
+
"aria-describedby": m,
|
|
286
|
+
"aria-hidden": !t,
|
|
287
|
+
className: u(
|
|
288
|
+
J({
|
|
292
289
|
position: r,
|
|
293
290
|
size: s,
|
|
294
|
-
|
|
295
|
-
transitionType: l
|
|
291
|
+
transitionType: i
|
|
296
292
|
}),
|
|
297
|
-
|
|
298
|
-
!
|
|
299
|
-
!
|
|
293
|
+
i === "slide" ? [
|
|
294
|
+
!t && r === "left" && "-translate-x-full",
|
|
295
|
+
!t && r === "right" && "translate-x-full"
|
|
300
296
|
] : [
|
|
301
297
|
"left-0 right-0 top-0 bottom-0",
|
|
302
|
-
|
|
298
|
+
t ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
303
299
|
],
|
|
304
|
-
|
|
300
|
+
f
|
|
305
301
|
),
|
|
306
|
-
...
|
|
307
|
-
children:
|
|
302
|
+
...d,
|
|
303
|
+
children: t && o
|
|
308
304
|
}
|
|
309
305
|
)
|
|
310
306
|
]
|
|
311
307
|
}
|
|
312
308
|
) }) });
|
|
313
|
-
},
|
|
314
|
-
Header:
|
|
315
|
-
Title:
|
|
316
|
-
CloseButton:
|
|
317
|
-
Tab:
|
|
318
|
-
Body:
|
|
319
|
-
Footer:
|
|
320
|
-
}),
|
|
321
|
-
function
|
|
322
|
-
const
|
|
323
|
-
if (!
|
|
309
|
+
}, Re = Object.assign(ee, {
|
|
310
|
+
Header: M,
|
|
311
|
+
Title: P,
|
|
312
|
+
CloseButton: O,
|
|
313
|
+
Tab: F,
|
|
314
|
+
Body: L,
|
|
315
|
+
Footer: A
|
|
316
|
+
}), W = V(null);
|
|
317
|
+
function te() {
|
|
318
|
+
const e = T(W);
|
|
319
|
+
if (!e)
|
|
324
320
|
throw new Error(
|
|
325
321
|
"Modal components must be used within a ModalRoot component"
|
|
326
322
|
);
|
|
327
|
-
return
|
|
323
|
+
return e;
|
|
328
324
|
}
|
|
329
|
-
const
|
|
325
|
+
const oe = p(
|
|
330
326
|
"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",
|
|
331
327
|
{
|
|
332
328
|
variants: {
|
|
@@ -339,7 +335,7 @@ const ot = h(
|
|
|
339
335
|
placement: "center"
|
|
340
336
|
}
|
|
341
337
|
}
|
|
342
|
-
),
|
|
338
|
+
), ne = p(
|
|
343
339
|
[
|
|
344
340
|
"absolute z-61 bg-white rounded-lg shadow-xl",
|
|
345
341
|
"flex flex-col",
|
|
@@ -373,29 +369,29 @@ const ot = h(
|
|
|
373
369
|
isOpen: !1
|
|
374
370
|
}
|
|
375
371
|
}
|
|
376
|
-
),
|
|
377
|
-
({ className:
|
|
372
|
+
), re = h(
|
|
373
|
+
({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
|
|
378
374
|
"div",
|
|
379
375
|
{
|
|
380
|
-
ref:
|
|
381
|
-
className:
|
|
376
|
+
ref: t,
|
|
377
|
+
className: u("px-6 pt-6 pb-2 text-lg font-semibold", e),
|
|
382
378
|
...o
|
|
383
379
|
}
|
|
384
380
|
)
|
|
385
|
-
),
|
|
386
|
-
({ className:
|
|
381
|
+
), ae = h(
|
|
382
|
+
({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
|
|
387
383
|
"div",
|
|
388
384
|
{
|
|
389
|
-
ref:
|
|
390
|
-
className:
|
|
385
|
+
ref: t,
|
|
386
|
+
className: u("px-6 py-4 flex justify-end gap-2", e),
|
|
391
387
|
...o
|
|
392
388
|
}
|
|
393
389
|
)
|
|
394
|
-
),
|
|
395
|
-
({ className:
|
|
396
|
-
),
|
|
397
|
-
(
|
|
398
|
-
const { isOpen:
|
|
390
|
+
), se = h(
|
|
391
|
+
({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx("div", { ref: t, className: u("px-6 py-2", e), ...o })
|
|
392
|
+
), ie = h(
|
|
393
|
+
(e, o) => {
|
|
394
|
+
const { isOpen: t, placement: n, onClose: r, disableOverlayClickToClose: s } = te(), i = () => {
|
|
399
395
|
s || r();
|
|
400
396
|
};
|
|
401
397
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -406,50 +402,50 @@ const ot = h(
|
|
|
406
402
|
tabIndex: -1,
|
|
407
403
|
"aria-modal": "true",
|
|
408
404
|
onClick: i,
|
|
409
|
-
className:
|
|
410
|
-
|
|
411
|
-
|
|
405
|
+
className: u(
|
|
406
|
+
oe({ placement: n }),
|
|
407
|
+
t ? "opacity-100" : "opacity-0 pointer-events-none"
|
|
412
408
|
),
|
|
413
|
-
...
|
|
409
|
+
...e
|
|
414
410
|
}
|
|
415
411
|
);
|
|
416
412
|
}
|
|
417
|
-
),
|
|
418
|
-
isOpen:
|
|
413
|
+
), le = ({
|
|
414
|
+
isOpen: e,
|
|
419
415
|
onClose: o,
|
|
420
|
-
size:
|
|
416
|
+
size: t = "md",
|
|
421
417
|
placement: n = "center",
|
|
422
418
|
disableOverlayClickToClose: r = !1,
|
|
423
419
|
disableEscapeKeyDown: s = !1,
|
|
424
420
|
children: i,
|
|
425
|
-
container:
|
|
421
|
+
container: c,
|
|
426
422
|
...w
|
|
427
423
|
}) => {
|
|
428
|
-
const
|
|
429
|
-
isOpen:
|
|
424
|
+
const f = {
|
|
425
|
+
isOpen: e,
|
|
430
426
|
onClose: o,
|
|
431
|
-
size:
|
|
427
|
+
size: t,
|
|
432
428
|
placement: n,
|
|
433
429
|
disableOverlayClickToClose: r,
|
|
434
430
|
disableEscapeKeyDown: s
|
|
435
|
-
}, d = I(
|
|
436
|
-
return /* @__PURE__ */ a.jsx(
|
|
431
|
+
}, d = I(e, o, s);
|
|
432
|
+
return /* @__PURE__ */ a.jsx(N, { container: c, children: /* @__PURE__ */ a.jsx(W.Provider, { value: f, children: /* @__PURE__ */ a.jsxs(
|
|
437
433
|
"div",
|
|
438
434
|
{
|
|
439
|
-
className:
|
|
435
|
+
className: u(
|
|
440
436
|
"fixed z-50 inset-0 pointer-events-none",
|
|
441
|
-
|
|
437
|
+
e && "pointer-events-auto"
|
|
442
438
|
),
|
|
443
439
|
children: [
|
|
444
|
-
/* @__PURE__ */ a.jsx(
|
|
440
|
+
/* @__PURE__ */ a.jsx(ie, {}),
|
|
445
441
|
/* @__PURE__ */ a.jsx(
|
|
446
442
|
"div",
|
|
447
443
|
{
|
|
448
444
|
ref: d,
|
|
449
|
-
className:
|
|
445
|
+
className: u(ne({ size: t, placement: n, isOpen: e })),
|
|
450
446
|
role: "dialog",
|
|
451
447
|
tabIndex: -1,
|
|
452
|
-
"aria-hidden": !
|
|
448
|
+
"aria-hidden": !e,
|
|
453
449
|
...w,
|
|
454
450
|
children: i
|
|
455
451
|
}
|
|
@@ -457,11 +453,11 @@ const ot = h(
|
|
|
457
453
|
]
|
|
458
454
|
}
|
|
459
455
|
) }) });
|
|
460
|
-
},
|
|
461
|
-
Header:
|
|
462
|
-
Body:
|
|
463
|
-
Footer:
|
|
464
|
-
}),
|
|
456
|
+
}, De = Object.assign(le, {
|
|
457
|
+
Header: re,
|
|
458
|
+
Body: se,
|
|
459
|
+
Footer: ae
|
|
460
|
+
}), de = p(
|
|
465
461
|
[
|
|
466
462
|
"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
463
|
"transition-transform duration-300 ease-in-out will-change-transform",
|
|
@@ -479,7 +475,7 @@ const ot = h(
|
|
|
479
475
|
open: !1
|
|
480
476
|
}
|
|
481
477
|
}
|
|
482
|
-
),
|
|
478
|
+
), ce = p(
|
|
483
479
|
["fixed inset-0 z-40 duration-300"],
|
|
484
480
|
{
|
|
485
481
|
variants: {
|
|
@@ -492,104 +488,104 @@ const ot = h(
|
|
|
492
488
|
open: !1
|
|
493
489
|
}
|
|
494
490
|
}
|
|
495
|
-
),
|
|
491
|
+
), ue = p(
|
|
496
492
|
"p-4 pb-2 flex justify-between w-full"
|
|
497
|
-
),
|
|
493
|
+
), fe = p([
|
|
498
494
|
"p-4 py-2 flex-1 overflow-y-auto",
|
|
499
495
|
"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-border"
|
|
500
|
-
]),
|
|
501
|
-
const
|
|
502
|
-
if (!
|
|
496
|
+
]), me = p("p-4 pt-2 flex-shrink-0"), K = V(null), pe = K.Provider, he = () => {
|
|
497
|
+
const e = T(K);
|
|
498
|
+
if (!e)
|
|
503
499
|
throw new Error("useBottomSheet must be used within a BottomSheetProvider");
|
|
504
|
-
return
|
|
505
|
-
},
|
|
506
|
-
return /* @__PURE__ */ a.jsx(
|
|
507
|
-
}),
|
|
508
|
-
const { onClose: n } =
|
|
500
|
+
return e;
|
|
501
|
+
}, we = h(function(o, t) {
|
|
502
|
+
return /* @__PURE__ */ a.jsx(G, { level: 3, ref: t, ...o });
|
|
503
|
+
}), be = h(function(o, t) {
|
|
504
|
+
const { onClose: n } = he(), r = (s) => {
|
|
509
505
|
n(), o?.onClick?.(s);
|
|
510
506
|
};
|
|
511
507
|
return /* @__PURE__ */ a.jsx(
|
|
512
508
|
E,
|
|
513
509
|
{
|
|
514
|
-
ref:
|
|
510
|
+
ref: t,
|
|
515
511
|
variant: "ghost",
|
|
516
512
|
"aria-label": "Close",
|
|
517
|
-
as:
|
|
513
|
+
as: R,
|
|
518
514
|
...o,
|
|
519
515
|
onClick: r
|
|
520
516
|
}
|
|
521
517
|
);
|
|
522
|
-
}),
|
|
518
|
+
}), xe = h(({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
|
|
523
519
|
"div",
|
|
524
520
|
{
|
|
525
|
-
ref:
|
|
526
|
-
className:
|
|
521
|
+
ref: t,
|
|
522
|
+
className: ue({ className: e }),
|
|
527
523
|
...o
|
|
528
524
|
}
|
|
529
|
-
)),
|
|
530
|
-
({ className:
|
|
525
|
+
)), ve = h(
|
|
526
|
+
({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
|
|
531
527
|
"div",
|
|
532
528
|
{
|
|
533
|
-
ref:
|
|
534
|
-
className:
|
|
529
|
+
ref: t,
|
|
530
|
+
className: fe({ className: e }),
|
|
535
531
|
...o
|
|
536
532
|
}
|
|
537
533
|
)
|
|
538
|
-
),
|
|
534
|
+
), ye = h(({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
|
|
539
535
|
"div",
|
|
540
536
|
{
|
|
541
|
-
ref:
|
|
542
|
-
className:
|
|
537
|
+
ref: t,
|
|
538
|
+
className: me({ className: e }),
|
|
543
539
|
...o
|
|
544
540
|
}
|
|
545
|
-
)),
|
|
546
|
-
|
|
547
|
-
typeof
|
|
541
|
+
)), ge = (...e) => (o) => {
|
|
542
|
+
e.forEach((t) => {
|
|
543
|
+
typeof t == "function" ? t(o) : t && "current" in t && (t.current = o);
|
|
548
544
|
});
|
|
549
|
-
},
|
|
545
|
+
}, je = h(
|
|
550
546
|
({
|
|
551
|
-
isOpen:
|
|
547
|
+
isOpen: e,
|
|
552
548
|
children: o,
|
|
553
|
-
className:
|
|
549
|
+
className: t,
|
|
554
550
|
onClose: n,
|
|
555
551
|
container: r,
|
|
556
552
|
disableOverlayClickToClose: s = !1,
|
|
557
553
|
...i
|
|
558
|
-
},
|
|
559
|
-
const w = I(
|
|
560
|
-
isOpen:
|
|
554
|
+
}, c) => {
|
|
555
|
+
const w = I(e, n), {
|
|
556
|
+
isOpen: f,
|
|
561
557
|
height: d,
|
|
562
|
-
isSupported:
|
|
563
|
-
} =
|
|
558
|
+
isSupported: l
|
|
559
|
+
} = X(), m = _(() => !e || !l || !f ? {} : {
|
|
564
560
|
// Adjust bottom position to sit above the virtual keyboard
|
|
565
561
|
bottom: `${d}px`,
|
|
566
562
|
// Reduce max height to account for keyboard
|
|
567
563
|
maxHeight: `calc(90dvh - ${d}px)`,
|
|
568
564
|
// Ensure smooth transition
|
|
569
565
|
transition: "bottom 0.2s ease-in-out, max-height 0.2s ease-in-out"
|
|
570
|
-
}, [
|
|
566
|
+
}, [e, l, f, d]), b = () => {
|
|
571
567
|
s || n?.();
|
|
572
568
|
};
|
|
573
|
-
return /* @__PURE__ */ a.jsx(
|
|
569
|
+
return /* @__PURE__ */ a.jsx(N, { container: r, children: /* @__PURE__ */ a.jsxs(pe, { value: { onClose: n }, children: [
|
|
574
570
|
/* @__PURE__ */ a.jsx(
|
|
575
571
|
"div",
|
|
576
572
|
{
|
|
577
|
-
className:
|
|
573
|
+
className: ce({ open: e }),
|
|
578
574
|
"aria-hidden": "true",
|
|
579
|
-
onClick:
|
|
575
|
+
onClick: b
|
|
580
576
|
}
|
|
581
577
|
),
|
|
582
578
|
/* @__PURE__ */ a.jsx(
|
|
583
579
|
"div",
|
|
584
580
|
{
|
|
585
|
-
ref:
|
|
586
|
-
className:
|
|
587
|
-
|
|
588
|
-
open:
|
|
581
|
+
ref: ge(c, w),
|
|
582
|
+
className: u(
|
|
583
|
+
de({
|
|
584
|
+
open: e
|
|
589
585
|
}),
|
|
590
586
|
"flex flex-col",
|
|
591
587
|
// Add flex layout for proper header/body/footer arrangement
|
|
592
|
-
|
|
588
|
+
t
|
|
593
589
|
),
|
|
594
590
|
style: m,
|
|
595
591
|
role: "dialog",
|
|
@@ -601,30 +597,30 @@ const ot = h(
|
|
|
601
597
|
)
|
|
602
598
|
] }) });
|
|
603
599
|
}
|
|
604
|
-
),
|
|
605
|
-
Header:
|
|
606
|
-
Title:
|
|
607
|
-
CloseIcon:
|
|
608
|
-
Body:
|
|
609
|
-
Footer:
|
|
600
|
+
), Ee = Object.assign(je, {
|
|
601
|
+
Header: xe,
|
|
602
|
+
Title: we,
|
|
603
|
+
CloseIcon: be,
|
|
604
|
+
Body: ve,
|
|
605
|
+
Footer: ye
|
|
610
606
|
});
|
|
611
|
-
function
|
|
612
|
-
const o = S(null), [
|
|
613
|
-
return
|
|
614
|
-
if (!open ||
|
|
615
|
-
n(
|
|
607
|
+
function Ce(e = "auto") {
|
|
608
|
+
const o = S(null), [t, n] = y("bottom");
|
|
609
|
+
return v(() => {
|
|
610
|
+
if (!open || e !== "auto" || !o.current) {
|
|
611
|
+
n(e === "auto" ? "bottom" : e);
|
|
616
612
|
return;
|
|
617
613
|
}
|
|
618
|
-
const r = o.current.getBoundingClientRect(), s = window.innerWidth, i = window.innerHeight,
|
|
614
|
+
const r = o.current.getBoundingClientRect(), s = window.innerWidth, i = window.innerHeight, c = {
|
|
619
615
|
top: r.top,
|
|
620
616
|
bottom: i - r.bottom,
|
|
621
617
|
left: r.left,
|
|
622
618
|
right: s - r.right
|
|
623
619
|
};
|
|
624
|
-
|
|
625
|
-
}, [
|
|
620
|
+
c.bottom > 64 ? n("bottom") : c.top > 64 ? n("top") : c.right > 128 ? n("right") : n("left");
|
|
621
|
+
}, [e, o]), { position: t, ref: o };
|
|
626
622
|
}
|
|
627
|
-
const
|
|
623
|
+
const Be = p(
|
|
628
624
|
"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",
|
|
629
625
|
{
|
|
630
626
|
variants: {
|
|
@@ -640,52 +636,52 @@ const kt = h(
|
|
|
640
636
|
position: "auto"
|
|
641
637
|
}
|
|
642
638
|
}
|
|
643
|
-
),
|
|
644
|
-
children:
|
|
639
|
+
), He = ({
|
|
640
|
+
children: e,
|
|
645
641
|
content: o,
|
|
646
|
-
position:
|
|
642
|
+
position: t = "auto",
|
|
647
643
|
popoverClassName: n,
|
|
648
644
|
delay: r,
|
|
649
645
|
...s
|
|
650
646
|
}) => {
|
|
651
|
-
const i =
|
|
652
|
-
r ?
|
|
653
|
-
},
|
|
654
|
-
|
|
647
|
+
const i = k(), [c, w] = y(!1), f = S(null), d = () => {
|
|
648
|
+
r ? f.current = setTimeout(() => w(!0), r) : w(!0);
|
|
649
|
+
}, l = () => {
|
|
650
|
+
f.current && clearTimeout(f.current), w(!1);
|
|
655
651
|
};
|
|
656
|
-
|
|
657
|
-
|
|
652
|
+
v(() => () => {
|
|
653
|
+
f.current && clearTimeout(f.current);
|
|
658
654
|
}, []);
|
|
659
655
|
const m = {
|
|
660
656
|
tabIndex: 0,
|
|
661
657
|
"aria-describedby": i,
|
|
662
658
|
onMouseEnter: d,
|
|
663
659
|
onFocus: d,
|
|
664
|
-
onMouseLeave:
|
|
665
|
-
onBlur:
|
|
660
|
+
onMouseLeave: l,
|
|
661
|
+
onBlur: l,
|
|
666
662
|
...s
|
|
667
|
-
}, { ref:
|
|
668
|
-
return /* @__PURE__ */ a.jsxs("div", { className: "relative w-fit", ref:
|
|
669
|
-
|
|
663
|
+
}, { ref: b, position: x } = Ce(t);
|
|
664
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "relative w-fit", ref: b, children: [
|
|
665
|
+
$(e, m),
|
|
670
666
|
/* @__PURE__ */ a.jsx(
|
|
671
667
|
"div",
|
|
672
668
|
{
|
|
673
669
|
id: i,
|
|
674
|
-
className:
|
|
675
|
-
|
|
670
|
+
className: u(
|
|
671
|
+
Be({ position: x }),
|
|
676
672
|
n,
|
|
677
|
-
!
|
|
673
|
+
!c && "opacity-0 pointer-events-none"
|
|
678
674
|
),
|
|
679
675
|
role: "tooltip",
|
|
680
|
-
"aria-hidden": !
|
|
681
|
-
children: /* @__PURE__ */ a.jsx(
|
|
676
|
+
"aria-hidden": !c,
|
|
677
|
+
children: /* @__PURE__ */ a.jsx(D, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: o })
|
|
682
678
|
}
|
|
683
679
|
)
|
|
684
680
|
] });
|
|
685
681
|
};
|
|
686
682
|
export {
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
683
|
+
Ee as B,
|
|
684
|
+
Re as D,
|
|
685
|
+
De as M,
|
|
686
|
+
He as T
|
|
691
687
|
};
|