@dimasbaguspm/versaur 0.0.48 → 0.0.50

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.
Files changed (76) hide show
  1. package/dist/assets/styles.css +14 -6
  2. package/dist/js/forms/index.js +12 -14
  3. package/dist/js/image-rectangle-K9jmTTED.js +2607 -0
  4. package/dist/js/index.js +66 -68
  5. package/dist/js/layouts/index.js +8 -9
  6. package/dist/js/navigation/index.js +1 -1
  7. package/dist/js/overlays/index.js +2 -2
  8. package/dist/js/primitive/index.js +21 -20
  9. package/dist/js/tabs-I4n6MLAv.js +210 -0
  10. package/dist/js/time-picker-input-BCTs7K8s.js +1562 -0
  11. package/dist/js/{tooltip-D6fUigp2.js → tooltip-nZW9TUz3.js} +293 -297
  12. package/dist/js/{top-bar-Dx0JVXms.js → top-bar-BMw3gFYA.js} +292 -247
  13. package/dist/types/forms/checkbox-input/checkbox-input.d.ts +1 -1
  14. package/dist/types/forms/checkbox-input/types.d.ts +11 -14
  15. package/dist/types/forms/chip-multiple-input/chip-multiple-input.atoms.d.ts +2 -2
  16. package/dist/types/forms/chip-multiple-input/chip-multiple-input.d.ts +1 -1
  17. package/dist/types/forms/chip-multiple-input/types.d.ts +15 -14
  18. package/dist/types/forms/chip-single-input/chip-single-input.atoms.d.ts +1 -1
  19. package/dist/types/forms/chip-single-input/chip-single-input.d.ts +1 -1
  20. package/dist/types/forms/chip-single-input/types.d.ts +15 -14
  21. package/dist/types/forms/date-single-picker-input/types.d.ts +10 -0
  22. package/dist/types/forms/index.d.ts +0 -2
  23. package/dist/types/forms/pin-field/pin-field.d.ts +2 -2
  24. package/dist/types/forms/pin-field/types.d.ts +16 -28
  25. package/dist/types/forms/select-input/index.d.ts +1 -1
  26. package/dist/types/forms/select-input/select-input.atoms.d.ts +16 -0
  27. package/dist/types/forms/select-input/select-input.d.ts +4 -7
  28. package/dist/types/forms/select-input/types.d.ts +32 -9
  29. package/dist/types/forms/selectable-multiple-input/selectable-multiple-input.d.ts +1 -1
  30. package/dist/types/forms/selectable-multiple-input/types.d.ts +20 -3
  31. package/dist/types/forms/selectable-single-input/selectable-single-input.d.ts +1 -1
  32. package/dist/types/forms/selectable-single-input/types.d.ts +20 -3
  33. package/dist/types/forms/switch-input/switch-input.atoms.d.ts +7 -8
  34. package/dist/types/forms/switch-input/switch-input.d.ts +5 -1
  35. package/dist/types/forms/switch-input/types.d.ts +10 -33
  36. package/dist/types/forms/text-input/text-input.d.ts +2 -2
  37. package/dist/types/forms/text-input/types.d.ts +0 -7
  38. package/dist/types/forms/textarea-input/textarea-input.d.ts +3 -3
  39. package/dist/types/forms/textarea-input/types.d.ts +33 -18
  40. package/dist/types/layouts/index.d.ts +1 -2
  41. package/dist/types/layouts/page-content/index.d.ts +1 -1
  42. package/dist/types/layouts/page-content/page-content.d.ts +5 -11
  43. package/dist/types/layouts/page-content/types.d.ts +29 -9
  44. package/dist/types/layouts/page-header/types.d.ts +13 -0
  45. package/dist/types/navigation/tabs/tabs.atoms.d.ts +3 -2
  46. package/dist/types/navigation/tabs/types.d.ts +5 -13
  47. package/dist/types/navigation/tabs/use-tab-indicator.d.ts +8 -8
  48. package/dist/types/overlays/drawer/drawer.atoms.d.ts +18 -8
  49. package/dist/types/overlays/drawer/drawer.d.ts +5 -5
  50. package/dist/types/overlays/drawer/types.d.ts +11 -15
  51. package/dist/types/primitive/button/button.d.ts +5 -0
  52. package/dist/types/primitive/button/types.d.ts +24 -11
  53. package/dist/types/primitive/button-anchor/button-anchor.d.ts +9 -0
  54. package/dist/types/primitive/button-anchor/index.d.ts +2 -0
  55. package/dist/types/primitive/button-anchor/types.d.ts +35 -0
  56. package/dist/types/primitive/button-icon/button-icon.d.ts +6 -0
  57. package/dist/types/primitive/button-icon/types.d.ts +21 -10
  58. package/dist/types/primitive/filter-chip/types.d.ts +0 -10
  59. package/dist/types/primitive/index.d.ts +1 -0
  60. package/dist/types/templates/pin-verifier-drawer/types.d.ts +0 -5
  61. package/dist/utils/enforce-subpath-import.js +1 -3
  62. package/package.json +1 -1
  63. package/dist/js/image-rectangle-B4nXH4Q5.js +0 -2581
  64. package/dist/js/tabs-BAzThVka.js +0 -291
  65. package/dist/js/time-picker-input-JBEgDV2V.js +0 -2049
  66. package/dist/types/forms/segment-multiple-input/index.d.ts +0 -2
  67. package/dist/types/forms/segment-multiple-input/segment-multiple-input.atoms.d.ts +0 -12
  68. package/dist/types/forms/segment-multiple-input/segment-multiple-input.d.ts +0 -7
  69. package/dist/types/forms/segment-multiple-input/types.d.ts +0 -55
  70. package/dist/types/forms/segment-single-input/index.d.ts +0 -2
  71. package/dist/types/forms/segment-single-input/segment-single-input.atoms.d.ts +0 -11
  72. package/dist/types/forms/segment-single-input/segment-single-input.d.ts +0 -7
  73. package/dist/types/forms/segment-single-input/types.d.ts +0 -55
  74. package/dist/types/layouts/page-layout/index.d.ts +0 -2
  75. package/dist/types/layouts/page-layout/page-layout.d.ts +0 -8
  76. package/dist/types/layouts/page-layout/types.d.ts +0 -20
@@ -1,78 +1,78 @@
1
- import { c as h, j as a, a as f } from "./index-DOdDlCoL.js";
2
- import j, { useState as x, useEffect as b, createContext as V, useContext as B, forwardRef as p, useRef as S, useMemo as P, useId as D, cloneElement as O } from "react";
3
- import { XIcon as N } from "lucide-react";
4
- import { m as R, k as E, O as T, H as F } from "./image-rectangle-B4nXH4Q5.js";
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 L() {
6
+ function U() {
7
7
  if (typeof window > "u") return !1;
8
- const t = window.navigator.userAgent, o = /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
9
- t
10
- ), e = /iPad|Android(?=.*Mobile)|Tablet/i.test(t), n = "ontouchstart" in window || navigator.maxTouchPoints > 0, r = window.innerWidth <= 1024;
11
- return o || e || n && r;
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 k() {
13
+ function B() {
14
14
  return typeof window < "u" && "navigator" in window && "virtualKeyboard" in navigator;
15
15
  }
16
- function A() {
17
- const [t, o] = x(!1), [e, n] = x(0), [r, s] = x(0), [i, l] = x(!1), [w, u] = x(!1);
18
- return b(() => {
19
- if (!L()) {
20
- l(!1);
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
- l(!0), u(k());
24
- }, []), b(() => {
25
- if (!i || !k())
23
+ c(!0), f(B());
24
+ }, []), v(() => {
25
+ if (!i || !B())
26
26
  return;
27
- const d = navigator.virtualKeyboard, c = () => {
28
- const { boundingRect: m } = d, v = m?.height || 0, g = m?.width || 0;
29
- o(v > 0), n(v), s(g);
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 c(), d.addEventListener("geometrychange", c), () => {
31
+ return l(), d.addEventListener("geometrychange", l), () => {
32
32
  d.removeEventListener(
33
33
  "geometrychange",
34
- c
34
+ l
35
35
  );
36
36
  };
37
- }, [i]), b(() => {
38
- if (!i || k())
37
+ }, [i]), v(() => {
38
+ if (!i || B())
39
39
  return;
40
40
  const d = window.innerHeight;
41
- let c;
41
+ let l;
42
42
  const m = () => {
43
- clearTimeout(c), c = setTimeout(() => {
44
- const v = window.visualViewport?.height ?? window.innerHeight, g = d - v, C = g > 150;
45
- o(C), n(C ? g : 0), s(C ? window.innerWidth : 0);
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(c), window.visualViewport?.removeEventListener(
49
+ clearTimeout(l), window.visualViewport?.removeEventListener(
50
50
  "resize",
51
51
  m
52
52
  );
53
53
  }) : (window.addEventListener("resize", m), () => {
54
- clearTimeout(c), window.removeEventListener("resize", m);
54
+ clearTimeout(l), window.removeEventListener("resize", m);
55
55
  });
56
- }, [i]), b(() => {
56
+ }, [i]), v(() => {
57
57
  i || (o(!1), n(0), s(0));
58
58
  }, [i]), {
59
- isOpen: t,
60
- height: e,
59
+ isOpen: e,
60
+ height: t,
61
61
  width: r,
62
62
  isSupported: i,
63
63
  usingNativeAPI: w
64
64
  };
65
65
  }
66
- const z = V(null);
67
- function y() {
68
- const t = B(z);
69
- if (!t)
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 t;
73
+ return e;
74
74
  }
75
- const W = h(
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
- ), K = h(
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
- ), _ = h(
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
- ), $ = h("flex-1 overflow-y-auto px-6 py-4", {
139
- variants: {
140
- variant: {
141
- default: "bg-white",
142
- glass: "bg-transparent"
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: e,
139
+ ref: t,
166
140
  onClick: i,
167
- className: f(
168
- W({
141
+ "aria-hidden": "true",
142
+ className: u(
143
+ q({
169
144
  state: n ? "open" : "closed"
170
145
  }),
171
- t
146
+ e
172
147
  ),
173
148
  ...o
174
149
  }
175
150
  );
176
- }), X = j.forwardRef(
177
- ({ children: t, className: o, hasTab: e, ...n }, r) => {
178
- const { variant: s } = y();
179
- return /* @__PURE__ */ a.jsx(
180
- "div",
181
- {
182
- ref: r,
183
- className: f(
184
- _({ variant: s, tab: !!e }),
185
- o
186
- ),
187
- ...n,
188
- children: t
189
- }
190
- );
191
- }
192
- ), q = p((t, o) => /* @__PURE__ */ a.jsx(R, { ...t, ref: o, as: "h3", fontSize: "lg" })), J = p(({ onClick: t, ...o }, e) => {
193
- const { onClose: n } = y(), r = (s) => {
194
- n(), t?.(s);
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: N,
205
- ref: e
185
+ as: R,
186
+ ref: t
206
187
  }
207
188
  );
208
- }), Q = p(
209
- ({ children: t, className: o, ...e }, n) => /* @__PURE__ */ a.jsx("div", { ref: n, className: f("[&>div]:px-6", o), ...e, children: t })
210
- ), Y = j.forwardRef(
211
- ({ children: t, className: o, ...e }, n) => {
212
- const { variant: r } = y();
213
- return /* @__PURE__ */ a.jsx(
214
- "div",
215
- {
216
- ref: n,
217
- className: f($({ variant: r }), o),
218
- ...e,
219
- children: t
220
- }
221
- );
222
- }
223
- ), Z = j.forwardRef(
224
- ({ children: t, className: o, ...e }, n) => {
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
- "div",
207
+ "main",
228
208
  {
229
209
  ref: n,
230
- className: f(G({ variant: r }), o),
231
- ...e,
232
- children: t
210
+ id: r,
211
+ className: u(Y(), o),
212
+ ...t,
213
+ children: e
233
214
  }
234
215
  );
235
216
  }
236
217
  );
237
- function I(t, o, e) {
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 b(() => {
233
+ return v(() => {
240
234
  n.current && n.current.focus();
241
- }, []), b(() => {
235
+ }, []), v(() => {
242
236
  const r = (s) => {
243
- s.key === "Escape" && t && n.current && n.current.contains(document.activeElement) && !e && o();
237
+ s.key === "Escape" && e && n.current && n.current.contains(document.activeElement) && !t && o();
244
238
  };
245
- return t && (document.addEventListener("keydown", r), document.body.style.overflow = "hidden"), () => {
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
- }, [t, o, e, n]), n;
242
+ }, [e, o, t, n]), n;
249
243
  }
250
- const tt = ({
251
- container: t,
244
+ const ee = ({
245
+ container: e,
252
246
  children: o,
253
- isOpen: e,
247
+ isOpen: t,
254
248
  onClose: n,
255
249
  position: r = "right",
256
250
  size: s = "md",
257
- variant: i = "default",
258
- transitionType: l = "slide",
259
- disableOverlayClickToClose: w = !1,
260
- disableEscapeKeyDown: u = !1,
261
- className: d,
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: e,
257
+ const l = k(), m = k(), b = {
258
+ isOpen: t,
266
259
  onClose: n,
267
260
  position: r,
268
261
  size: s,
269
- variant: i,
270
- transitionType: l,
271
- disableOverlayClickToClose: w,
272
- disableEscapeKeyDown: u
273
- }, v = I(e, n, u);
274
- return /* @__PURE__ */ a.jsx(T, { container: t, children: /* @__PURE__ */ a.jsx(z.Provider, { value: m, children: /* @__PURE__ */ a.jsxs(
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: f(
271
+ className: u(
278
272
  "fixed z-50 inset-0 pointer-events-none",
279
- e && "pointer-events-auto"
273
+ t && "pointer-events-auto"
280
274
  ),
281
275
  children: [
282
- /* @__PURE__ */ a.jsx(U, {}),
276
+ /* @__PURE__ */ a.jsx(z, {}),
283
277
  /* @__PURE__ */ a.jsx(
284
278
  "div",
285
279
  {
286
- ref: v,
280
+ ref: x,
281
+ role: "dialog",
287
282
  tabIndex: -1,
288
- role: e ? "dialog" : void 0,
289
- "aria-modal": e ? "true" : void 0,
290
- className: f(
291
- K({
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
- variant: i,
295
- transitionType: l
291
+ transitionType: i
296
292
  }),
297
- l === "slide" ? [
298
- !e && r === "left" && "-translate-x-full",
299
- !e && r === "right" && "translate-x-full"
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
- e ? "opacity-100" : "opacity-0 pointer-events-none"
298
+ t ? "opacity-100" : "opacity-0 pointer-events-none"
303
299
  ],
304
- d
300
+ f
305
301
  ),
306
- ...c,
307
- children: e && o
302
+ ...d,
303
+ children: t && o
308
304
  }
309
305
  )
310
306
  ]
311
307
  }
312
308
  ) }) });
313
- }, Rt = Object.assign(tt, {
314
- Header: X,
315
- Title: q,
316
- CloseButton: J,
317
- Tab: Q,
318
- Body: Y,
319
- Footer: Z
320
- }), H = V(null);
321
- function et() {
322
- const t = B(H);
323
- if (!t)
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 t;
323
+ return e;
328
324
  }
329
- const ot = h(
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
- ), nt = h(
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
- ), rt = p(
377
- ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
372
+ ), re = h(
373
+ ({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
378
374
  "div",
379
375
  {
380
- ref: e,
381
- className: f("px-6 pt-6 pb-2 text-lg font-semibold", t),
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
- ), at = p(
386
- ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
381
+ ), ae = h(
382
+ ({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
387
383
  "div",
388
384
  {
389
- ref: e,
390
- className: f("px-6 py-4 flex justify-end gap-2", t),
385
+ ref: t,
386
+ className: u("px-6 py-4 flex justify-end gap-2", e),
391
387
  ...o
392
388
  }
393
389
  )
394
- ), st = p(
395
- ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx("div", { ref: e, className: f("px-6 py-2", t), ...o })
396
- ), it = p(
397
- (t, o) => {
398
- const { isOpen: e, placement: n, onClose: r, disableOverlayClickToClose: s } = et(), i = () => {
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: f(
410
- ot({ placement: n }),
411
- e ? "opacity-100" : "opacity-0 pointer-events-none"
405
+ className: u(
406
+ oe({ placement: n }),
407
+ t ? "opacity-100" : "opacity-0 pointer-events-none"
412
408
  ),
413
- ...t
409
+ ...e
414
410
  }
415
411
  );
416
412
  }
417
- ), lt = ({
418
- isOpen: t,
413
+ ), le = ({
414
+ isOpen: e,
419
415
  onClose: o,
420
- size: e = "md",
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: l,
421
+ container: c,
426
422
  ...w
427
423
  }) => {
428
- const u = {
429
- isOpen: t,
424
+ const f = {
425
+ isOpen: e,
430
426
  onClose: o,
431
- size: e,
427
+ size: t,
432
428
  placement: n,
433
429
  disableOverlayClickToClose: r,
434
430
  disableEscapeKeyDown: s
435
- }, d = I(t, o, s);
436
- return /* @__PURE__ */ a.jsx(T, { container: l, children: /* @__PURE__ */ a.jsx(H.Provider, { value: u, children: /* @__PURE__ */ a.jsxs(
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: f(
435
+ className: u(
440
436
  "fixed z-50 inset-0 pointer-events-none",
441
- t && "pointer-events-auto"
437
+ e && "pointer-events-auto"
442
438
  ),
443
439
  children: [
444
- /* @__PURE__ */ a.jsx(it, {}),
440
+ /* @__PURE__ */ a.jsx(ie, {}),
445
441
  /* @__PURE__ */ a.jsx(
446
442
  "div",
447
443
  {
448
444
  ref: d,
449
- className: f(nt({ size: e, placement: n, isOpen: t })),
445
+ className: u(ne({ size: t, placement: n, isOpen: e })),
450
446
  role: "dialog",
451
447
  tabIndex: -1,
452
- "aria-hidden": !t,
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
- }, Et = Object.assign(lt, {
461
- Header: rt,
462
- Body: st,
463
- Footer: at
464
- }), dt = h(
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
- ), ct = h(
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
- ), ut = h(
491
+ ), ue = p(
496
492
  "p-4 pb-2 flex justify-between w-full"
497
- ), ft = h([
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
- ]), mt = h("p-4 pt-2 flex-shrink-0"), M = V(null), ht = M.Provider, pt = () => {
501
- const t = B(M);
502
- if (!t)
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 t;
505
- }, wt = p(function(o, e) {
506
- return /* @__PURE__ */ a.jsx(F, { level: 3, ref: e, ...o });
507
- }), vt = p(function(o, e) {
508
- const { onClose: n } = pt(), r = (s) => {
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: e,
510
+ ref: t,
515
511
  variant: "ghost",
516
512
  "aria-label": "Close",
517
- as: N,
513
+ as: R,
518
514
  ...o,
519
515
  onClick: r
520
516
  }
521
517
  );
522
- }), bt = p(({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
518
+ }), xe = h(({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
523
519
  "div",
524
520
  {
525
- ref: e,
526
- className: ut({ className: t }),
521
+ ref: t,
522
+ className: ue({ className: e }),
527
523
  ...o
528
524
  }
529
- )), xt = p(
530
- ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
525
+ )), ve = h(
526
+ ({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
531
527
  "div",
532
528
  {
533
- ref: e,
534
- className: ft({ className: t }),
529
+ ref: t,
530
+ className: fe({ className: e }),
535
531
  ...o
536
532
  }
537
533
  )
538
- ), gt = p(({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
534
+ ), ye = h(({ className: e, ...o }, t) => /* @__PURE__ */ a.jsx(
539
535
  "div",
540
536
  {
541
- ref: e,
542
- className: mt({ className: t }),
537
+ ref: t,
538
+ className: me({ className: e }),
543
539
  ...o
544
540
  }
545
- )), yt = (...t) => (o) => {
546
- t.forEach((e) => {
547
- typeof e == "function" ? e(o) : e && "current" in e && (e.current = o);
541
+ )), ge = (...e) => (o) => {
542
+ e.forEach((t) => {
543
+ typeof t == "function" ? t(o) : t && "current" in t && (t.current = o);
548
544
  });
549
- }, jt = p(
545
+ }, je = h(
550
546
  ({
551
- isOpen: t,
547
+ isOpen: e,
552
548
  children: o,
553
- className: e,
549
+ className: t,
554
550
  onClose: n,
555
551
  container: r,
556
552
  disableOverlayClickToClose: s = !1,
557
553
  ...i
558
- }, l) => {
559
- const w = I(t, n), {
560
- isOpen: u,
554
+ }, c) => {
555
+ const w = I(e, n), {
556
+ isOpen: f,
561
557
  height: d,
562
- isSupported: c
563
- } = A(), m = P(() => !t || !c || !u ? {} : {
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
- }, [t, c, u, d]), v = () => {
566
+ }, [e, l, f, d]), b = () => {
571
567
  s || n?.();
572
568
  };
573
- return /* @__PURE__ */ a.jsx(T, { container: r, children: /* @__PURE__ */ a.jsxs(ht, { value: { onClose: n }, children: [
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: ct({ open: t }),
573
+ className: ce({ open: e }),
578
574
  "aria-hidden": "true",
579
- onClick: v
575
+ onClick: b
580
576
  }
581
577
  ),
582
578
  /* @__PURE__ */ a.jsx(
583
579
  "div",
584
580
  {
585
- ref: yt(l, w),
586
- className: f(
587
- dt({
588
- open: t
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
- e
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
- ), zt = Object.assign(jt, {
605
- Header: bt,
606
- Title: wt,
607
- CloseIcon: vt,
608
- Body: xt,
609
- Footer: gt
600
+ ), Ee = Object.assign(je, {
601
+ Header: xe,
602
+ Title: we,
603
+ CloseIcon: be,
604
+ Body: ve,
605
+ Footer: ye
610
606
  });
611
- function Ct(t = "auto") {
612
- const o = S(null), [e, n] = x("bottom");
613
- return b(() => {
614
- if (!open || t !== "auto" || !o.current) {
615
- n(t === "auto" ? "bottom" : t);
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, l = {
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
- l.bottom > 64 ? n("bottom") : l.top > 64 ? n("top") : l.right > 128 ? n("right") : n("left");
625
- }, [t, o]), { position: e, ref: o };
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 kt = h(
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
- ), Ht = ({
644
- children: t,
639
+ ), He = ({
640
+ children: e,
645
641
  content: o,
646
- position: e = "auto",
642
+ position: t = "auto",
647
643
  popoverClassName: n,
648
644
  delay: r,
649
645
  ...s
650
646
  }) => {
651
- const i = D(), [l, w] = x(!1), u = S(null), d = () => {
652
- r ? u.current = setTimeout(() => w(!0), r) : w(!0);
653
- }, c = () => {
654
- u.current && clearTimeout(u.current), w(!1);
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
- b(() => () => {
657
- u.current && clearTimeout(u.current);
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: c,
665
- onBlur: c,
660
+ onMouseLeave: l,
661
+ onBlur: l,
666
662
  ...s
667
- }, { ref: v, position: g } = Ct(e);
668
- return /* @__PURE__ */ a.jsxs("div", { className: "relative w-fit", ref: v, children: [
669
- O(t, m),
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: f(
675
- kt({ position: g }),
670
+ className: u(
671
+ Be({ position: x }),
676
672
  n,
677
- !l && "opacity-0 pointer-events-none"
673
+ !c && "opacity-0 pointer-events-none"
678
674
  ),
679
675
  role: "tooltip",
680
- "aria-hidden": !l,
681
- children: /* @__PURE__ */ a.jsx(R, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: o })
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
- zt as B,
688
- Rt as D,
689
- Et as M,
690
- Ht as T
683
+ Ee as B,
684
+ Re as D,
685
+ De as M,
686
+ He as T
691
687
  };