@dimasbaguspm/versaur 0.0.56 → 0.0.58

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