@dimasbaguspm/versaur 0.0.34 → 0.0.36

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