@dimasbaguspm/versaur 0.0.44 → 0.0.46

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 (43) hide show
  1. package/dist/js/forms/index.js +18 -20
  2. package/dist/js/{image-rectangle-DjuCYHbk.js → image-rectangle-B4nXH4Q5.js} +990 -1158
  3. package/dist/js/index.js +60 -64
  4. package/dist/js/layouts/index.js +1 -1
  5. package/dist/js/navigation/index.js +1 -1
  6. package/dist/js/overlays/index.js +5 -6
  7. package/dist/js/primitive/index.js +25 -26
  8. package/dist/js/{tabs-CiZ2DPDD.js → tabs-BAzThVka.js} +1 -1
  9. package/dist/js/{bottom-sheet-input-C9Ht9cxQ.js → time-picker-input-DrZ4dyEB.js} +875 -800
  10. package/dist/js/tooltip-D6fUigp2.js +691 -0
  11. package/dist/js/{top-bar-CKo6k1eW.js → top-bar-Dx0JVXms.js} +1 -1
  12. package/dist/types/forms/index.d.ts +7 -9
  13. package/dist/types/forms/pin-field/index.d.ts +2 -0
  14. package/dist/types/forms/pin-field/pin-field.d.ts +9 -0
  15. package/dist/types/forms/pin-field/types.d.ts +86 -0
  16. package/dist/types/primitive/action-card/action-card.atoms.d.ts +18 -0
  17. package/dist/types/primitive/action-card/action-card.d.ts +4 -0
  18. package/dist/types/primitive/action-card/index.d.ts +2 -0
  19. package/dist/types/primitive/action-card/types.d.ts +57 -0
  20. package/dist/types/primitive/brand/types.d.ts +1 -1
  21. package/dist/types/primitive/index.d.ts +1 -2
  22. package/dist/utils/enforce-subpath-import.js +2 -5
  23. package/package.json +1 -1
  24. package/dist/js/bottom-sheet-BSN0J8ji.js +0 -615
  25. package/dist/js/tooltip-nOXyn9AX.js +0 -81
  26. package/dist/types/forms/bottom-sheet-input/bottom-sheet-input.d.ts +0 -7
  27. package/dist/types/forms/bottom-sheet-input/index.d.ts +0 -2
  28. package/dist/types/forms/bottom-sheet-input/types.d.ts +0 -17
  29. package/dist/types/forms/drawer-input/drawer-input.d.ts +0 -6
  30. package/dist/types/forms/drawer-input/index.d.ts +0 -2
  31. package/dist/types/forms/drawer-input/types.d.ts +0 -18
  32. package/dist/types/forms/modal-input/index.d.ts +0 -2
  33. package/dist/types/forms/modal-input/modal-input.d.ts +0 -6
  34. package/dist/types/forms/modal-input/types.d.ts +0 -18
  35. package/dist/types/primitive/button-float/button-float.d.ts +0 -8
  36. package/dist/types/primitive/button-float/index.d.ts +0 -2
  37. package/dist/types/primitive/button-float/types.d.ts +0 -31
  38. package/dist/types/primitive/button-float/use-floating-position.d.ts +0 -12
  39. package/dist/types/primitive/calculator/calculator.atoms.d.ts +0 -2
  40. package/dist/types/primitive/calculator/calculator.d.ts +0 -2
  41. package/dist/types/primitive/calculator/index.d.ts +0 -2
  42. package/dist/types/primitive/calculator/types.d.ts +0 -29
  43. package/dist/types/primitive/calculator/use-calculator.d.ts +0 -11
@@ -0,0 +1,691 @@
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";
5
+ import "./snackbar-DH8jCh2V.js";
6
+ function L() {
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;
12
+ }
13
+ function k() {
14
+ return typeof window < "u" && "navigator" in window && "virtualKeyboard" in navigator;
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);
21
+ return;
22
+ }
23
+ l(!0), u(k());
24
+ }, []), b(() => {
25
+ if (!i || !k())
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);
30
+ };
31
+ return c(), d.addEventListener("geometrychange", c), () => {
32
+ d.removeEventListener(
33
+ "geometrychange",
34
+ c
35
+ );
36
+ };
37
+ }, [i]), b(() => {
38
+ if (!i || k())
39
+ return;
40
+ const d = window.innerHeight;
41
+ let c;
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);
46
+ }, 100);
47
+ };
48
+ return "visualViewport" in window && window.visualViewport ? (window.visualViewport.addEventListener("resize", m), () => {
49
+ clearTimeout(c), window.visualViewport?.removeEventListener(
50
+ "resize",
51
+ m
52
+ );
53
+ }) : (window.addEventListener("resize", m), () => {
54
+ clearTimeout(c), window.removeEventListener("resize", m);
55
+ });
56
+ }, [i]), b(() => {
57
+ i || (o(!1), n(0), s(0));
58
+ }, [i]), {
59
+ isOpen: t,
60
+ height: e,
61
+ width: r,
62
+ isSupported: i,
63
+ usingNativeAPI: w
64
+ };
65
+ }
66
+ const z = V(null);
67
+ function y() {
68
+ const t = B(z);
69
+ if (!t)
70
+ throw new Error(
71
+ "Drawer components must be used within a DrawerRoot component"
72
+ );
73
+ return t;
74
+ }
75
+ const W = h(
76
+ "fixed inset-0 z-50 transition-opacity duration-300 bg-foreground/30 backdrop-blur-md",
77
+ {
78
+ variants: {
79
+ state: {
80
+ open: "opacity-100",
81
+ closed: "opacity-0 pointer-events-none"
82
+ }
83
+ },
84
+ defaultVariants: {
85
+ state: "closed"
86
+ }
87
+ }
88
+ ), K = h(
89
+ "fixed z-50 shadow-xl flex flex-col max-w-full",
90
+ {
91
+ variants: {
92
+ position: {
93
+ left: "left-0 top-0 bottom-0 border-r",
94
+ right: "right-0 top-0 bottom-0 border-l"
95
+ },
96
+ size: {
97
+ sm: "w-80",
98
+ md: "w-96",
99
+ lg: "w-[28rem]",
100
+ xl: "w-[32rem]",
101
+ "3/4": "w-[75vw]",
102
+ full: "w-full"
103
+ },
104
+ variant: {
105
+ default: "bg-white border-border",
106
+ glass: "bg-white/10 backdrop-blur-lg border-white/20"
107
+ },
108
+ transitionType: {
109
+ slide: "transition-transform duration-300 ease-in-out",
110
+ fade: "transition-opacity duration-300 ease-in-out"
111
+ }
112
+ },
113
+ defaultVariants: {
114
+ position: "right",
115
+ size: "md",
116
+ variant: "default",
117
+ transitionType: "slide"
118
+ }
119
+ }
120
+ ), _ = h(
121
+ "flex justify-between items-center px-6",
122
+ {
123
+ variants: {
124
+ variant: {
125
+ default: "bg-white",
126
+ glass: "bg-transparent "
127
+ },
128
+ tab: {
129
+ true: "pt-4 pb-2",
130
+ false: "border-b border-border py-4 "
131
+ }
132
+ },
133
+ defaultVariants: {
134
+ variant: "default",
135
+ tab: !1
136
+ }
137
+ }
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 = () => {
160
+ r || s();
161
+ };
162
+ return /* @__PURE__ */ a.jsx(
163
+ "div",
164
+ {
165
+ ref: e,
166
+ onClick: i,
167
+ className: f(
168
+ W({
169
+ state: n ? "open" : "closed"
170
+ }),
171
+ t
172
+ ),
173
+ ...o
174
+ }
175
+ );
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);
195
+ };
196
+ return /* @__PURE__ */ a.jsx(
197
+ E,
198
+ {
199
+ "aria-label": "Close drawer",
200
+ ...o,
201
+ onClick: r,
202
+ variant: "ghost",
203
+ size: "sm",
204
+ as: N,
205
+ ref: e
206
+ }
207
+ );
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();
226
+ return /* @__PURE__ */ a.jsx(
227
+ "div",
228
+ {
229
+ ref: n,
230
+ className: f(G({ variant: r }), o),
231
+ ...e,
232
+ children: t
233
+ }
234
+ );
235
+ }
236
+ );
237
+ function I(t, o, e) {
238
+ const n = S(null);
239
+ return b(() => {
240
+ n.current && n.current.focus();
241
+ }, []), b(() => {
242
+ const r = (s) => {
243
+ s.key === "Escape" && t && n.current && n.current.contains(document.activeElement) && !e && o();
244
+ };
245
+ return t && (document.addEventListener("keydown", r), document.body.style.overflow = "hidden"), () => {
246
+ document.removeEventListener("keydown", r), document.body.style.overflow = "unset";
247
+ };
248
+ }, [t, o, e, n]), n;
249
+ }
250
+ const tt = ({
251
+ container: t,
252
+ children: o,
253
+ isOpen: e,
254
+ onClose: n,
255
+ position: r = "right",
256
+ size: s = "md",
257
+ variant: i = "default",
258
+ transitionType: l = "slide",
259
+ disableOverlayClickToClose: w = !1,
260
+ disableEscapeKeyDown: u = !1,
261
+ className: d,
262
+ ...c
263
+ }) => {
264
+ const m = {
265
+ isOpen: e,
266
+ onClose: n,
267
+ position: r,
268
+ 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(
275
+ "div",
276
+ {
277
+ className: f(
278
+ "fixed z-50 inset-0 pointer-events-none",
279
+ e && "pointer-events-auto"
280
+ ),
281
+ children: [
282
+ /* @__PURE__ */ a.jsx(U, {}),
283
+ /* @__PURE__ */ a.jsx(
284
+ "div",
285
+ {
286
+ ref: v,
287
+ tabIndex: -1,
288
+ role: e ? "dialog" : void 0,
289
+ "aria-modal": e ? "true" : void 0,
290
+ className: f(
291
+ K({
292
+ position: r,
293
+ size: s,
294
+ variant: i,
295
+ transitionType: l
296
+ }),
297
+ l === "slide" ? [
298
+ !e && r === "left" && "-translate-x-full",
299
+ !e && r === "right" && "translate-x-full"
300
+ ] : [
301
+ "left-0 right-0 top-0 bottom-0",
302
+ e ? "opacity-100" : "opacity-0 pointer-events-none"
303
+ ],
304
+ d
305
+ ),
306
+ ...c,
307
+ children: e && o
308
+ }
309
+ )
310
+ ]
311
+ }
312
+ ) }) });
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)
324
+ throw new Error(
325
+ "Modal components must be used within a ModalRoot component"
326
+ );
327
+ return t;
328
+ }
329
+ const ot = h(
330
+ "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
+ {
332
+ variants: {
333
+ placement: {
334
+ top: "items-start",
335
+ center: "items-center"
336
+ }
337
+ },
338
+ defaultVariants: {
339
+ placement: "center"
340
+ }
341
+ }
342
+ ), nt = h(
343
+ [
344
+ "absolute z-61 bg-white rounded-lg shadow-xl",
345
+ "flex flex-col",
346
+ "outline-none",
347
+ "transition-all duration-200 ease-in-out"
348
+ ],
349
+ {
350
+ variants: {
351
+ size: {
352
+ sm: "w-[20rem] max-w-[90%]",
353
+ // 20rem, 320px
354
+ md: "w-[28rem] max-w-[90%]",
355
+ // 28rem, 448px
356
+ lg: "w-[36rem] max-w-[90%]",
357
+ // 36rem, 576px
358
+ "fit-content": "w-fit max-w-[90%]"
359
+ // Fit content, no max width
360
+ },
361
+ placement: {
362
+ top: "top-8 left-1/2 -translate-x-1/2",
363
+ center: "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"
364
+ },
365
+ isOpen: {
366
+ true: "opacity-100 scale-100",
367
+ false: "opacity-0 scale-95 pointer-events-none"
368
+ }
369
+ },
370
+ defaultVariants: {
371
+ size: "md",
372
+ placement: "center",
373
+ isOpen: !1
374
+ }
375
+ }
376
+ ), rt = p(
377
+ ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
378
+ "div",
379
+ {
380
+ ref: e,
381
+ className: f("px-6 pt-6 pb-2 text-lg font-semibold", t),
382
+ ...o
383
+ }
384
+ )
385
+ ), at = p(
386
+ ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
387
+ "div",
388
+ {
389
+ ref: e,
390
+ className: f("px-6 py-4 flex justify-end gap-2", t),
391
+ ...o
392
+ }
393
+ )
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 = () => {
399
+ s || r();
400
+ };
401
+ return /* @__PURE__ */ a.jsx(
402
+ "div",
403
+ {
404
+ ref: o,
405
+ role: "presentation",
406
+ tabIndex: -1,
407
+ "aria-modal": "true",
408
+ onClick: i,
409
+ className: f(
410
+ ot({ placement: n }),
411
+ e ? "opacity-100" : "opacity-0 pointer-events-none"
412
+ ),
413
+ ...t
414
+ }
415
+ );
416
+ }
417
+ ), lt = ({
418
+ isOpen: t,
419
+ onClose: o,
420
+ size: e = "md",
421
+ placement: n = "center",
422
+ disableOverlayClickToClose: r = !1,
423
+ disableEscapeKeyDown: s = !1,
424
+ children: i,
425
+ container: l,
426
+ ...w
427
+ }) => {
428
+ const u = {
429
+ isOpen: t,
430
+ onClose: o,
431
+ size: e,
432
+ placement: n,
433
+ disableOverlayClickToClose: r,
434
+ 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(
437
+ "div",
438
+ {
439
+ className: f(
440
+ "fixed z-50 inset-0 pointer-events-none",
441
+ t && "pointer-events-auto"
442
+ ),
443
+ children: [
444
+ /* @__PURE__ */ a.jsx(it, {}),
445
+ /* @__PURE__ */ a.jsx(
446
+ "div",
447
+ {
448
+ ref: d,
449
+ className: f(nt({ size: e, placement: n, isOpen: t })),
450
+ role: "dialog",
451
+ tabIndex: -1,
452
+ "aria-hidden": !t,
453
+ ...w,
454
+ children: i
455
+ }
456
+ )
457
+ ]
458
+ }
459
+ ) }) });
460
+ }, Et = Object.assign(lt, {
461
+ Header: rt,
462
+ Body: st,
463
+ Footer: at
464
+ }), dt = h(
465
+ [
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",
467
+ "transition-transform duration-300 ease-in-out will-change-transform",
468
+ "overflow-hidden"
469
+ // Ensure content doesn't overflow when keyboard adjusts height
470
+ ],
471
+ {
472
+ variants: {
473
+ open: {
474
+ true: "translate-y-0",
475
+ false: "translate-y-full"
476
+ }
477
+ },
478
+ defaultVariants: {
479
+ open: !1
480
+ }
481
+ }
482
+ ), ct = h(
483
+ ["fixed inset-0 z-40 duration-300"],
484
+ {
485
+ variants: {
486
+ open: {
487
+ true: "backdrop-blur-md bg-foreground/30",
488
+ false: "pointer-events-none"
489
+ }
490
+ },
491
+ defaultVariants: {
492
+ open: !1
493
+ }
494
+ }
495
+ ), ut = h(
496
+ "p-4 pb-2 flex justify-between w-full"
497
+ ), ft = h([
498
+ "p-4 py-2 flex-1 overflow-y-auto",
499
+ "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)
503
+ 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) => {
509
+ n(), o?.onClick?.(s);
510
+ };
511
+ return /* @__PURE__ */ a.jsx(
512
+ E,
513
+ {
514
+ ref: e,
515
+ variant: "ghost",
516
+ "aria-label": "Close",
517
+ as: N,
518
+ ...o,
519
+ onClick: r
520
+ }
521
+ );
522
+ }), bt = p(({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
523
+ "div",
524
+ {
525
+ ref: e,
526
+ className: ut({ className: t }),
527
+ ...o
528
+ }
529
+ )), xt = p(
530
+ ({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
531
+ "div",
532
+ {
533
+ ref: e,
534
+ className: ft({ className: t }),
535
+ ...o
536
+ }
537
+ )
538
+ ), gt = p(({ className: t, ...o }, e) => /* @__PURE__ */ a.jsx(
539
+ "div",
540
+ {
541
+ ref: e,
542
+ className: mt({ className: t }),
543
+ ...o
544
+ }
545
+ )), yt = (...t) => (o) => {
546
+ t.forEach((e) => {
547
+ typeof e == "function" ? e(o) : e && "current" in e && (e.current = o);
548
+ });
549
+ }, jt = p(
550
+ ({
551
+ isOpen: t,
552
+ children: o,
553
+ className: e,
554
+ onClose: n,
555
+ container: r,
556
+ disableOverlayClickToClose: s = !1,
557
+ ...i
558
+ }, l) => {
559
+ const w = I(t, n), {
560
+ isOpen: u,
561
+ height: d,
562
+ isSupported: c
563
+ } = A(), m = P(() => !t || !c || !u ? {} : {
564
+ // Adjust bottom position to sit above the virtual keyboard
565
+ bottom: `${d}px`,
566
+ // Reduce max height to account for keyboard
567
+ maxHeight: `calc(90dvh - ${d}px)`,
568
+ // Ensure smooth transition
569
+ transition: "bottom 0.2s ease-in-out, max-height 0.2s ease-in-out"
570
+ }, [t, c, u, d]), v = () => {
571
+ s || n?.();
572
+ };
573
+ return /* @__PURE__ */ a.jsx(T, { container: r, children: /* @__PURE__ */ a.jsxs(ht, { value: { onClose: n }, children: [
574
+ /* @__PURE__ */ a.jsx(
575
+ "div",
576
+ {
577
+ className: ct({ open: t }),
578
+ "aria-hidden": "true",
579
+ onClick: v
580
+ }
581
+ ),
582
+ /* @__PURE__ */ a.jsx(
583
+ "div",
584
+ {
585
+ ref: yt(l, w),
586
+ className: f(
587
+ dt({
588
+ open: t
589
+ }),
590
+ "flex flex-col",
591
+ // Add flex layout for proper header/body/footer arrangement
592
+ e
593
+ ),
594
+ style: m,
595
+ role: "dialog",
596
+ "aria-modal": "true",
597
+ tabIndex: -1,
598
+ ...i,
599
+ children: o
600
+ }
601
+ )
602
+ ] }) });
603
+ }
604
+ ), zt = Object.assign(jt, {
605
+ Header: bt,
606
+ Title: wt,
607
+ CloseIcon: vt,
608
+ Body: xt,
609
+ Footer: gt
610
+ });
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);
616
+ return;
617
+ }
618
+ const r = o.current.getBoundingClientRect(), s = window.innerWidth, i = window.innerHeight, l = {
619
+ top: r.top,
620
+ bottom: i - r.bottom,
621
+ left: r.left,
622
+ right: s - r.right
623
+ };
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 };
626
+ }
627
+ const kt = h(
628
+ "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
+ {
630
+ variants: {
631
+ position: {
632
+ top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
633
+ bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
634
+ left: "right-full top-1/2 -translate-y-1/2 mr-2",
635
+ right: "left-full top-1/2 -translate-y-1/2 ml-2",
636
+ auto: "top-full left-1/2 -translate-x-1/2 mt-2"
637
+ }
638
+ },
639
+ defaultVariants: {
640
+ position: "auto"
641
+ }
642
+ }
643
+ ), Ht = ({
644
+ children: t,
645
+ content: o,
646
+ position: e = "auto",
647
+ popoverClassName: n,
648
+ delay: r,
649
+ ...s
650
+ }) => {
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);
655
+ };
656
+ b(() => () => {
657
+ u.current && clearTimeout(u.current);
658
+ }, []);
659
+ const m = {
660
+ tabIndex: 0,
661
+ "aria-describedby": i,
662
+ onMouseEnter: d,
663
+ onFocus: d,
664
+ onMouseLeave: c,
665
+ onBlur: c,
666
+ ...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),
670
+ /* @__PURE__ */ a.jsx(
671
+ "div",
672
+ {
673
+ id: i,
674
+ className: f(
675
+ kt({ position: g }),
676
+ n,
677
+ !l && "opacity-0 pointer-events-none"
678
+ ),
679
+ role: "tooltip",
680
+ "aria-hidden": !l,
681
+ children: /* @__PURE__ */ a.jsx(R, { as: "p", fontSize: "xs", fontWeight: "normal", color: "black", children: o })
682
+ }
683
+ )
684
+ ] });
685
+ };
686
+ export {
687
+ zt as B,
688
+ Rt as D,
689
+ Et as M,
690
+ Ht as T
691
+ };
@@ -1,7 +1,7 @@
1
1
  import { c as i, j as s, a as l } from "./index-DOdDlCoL.js";
2
2
  import * as v from "react";
3
3
  import { forwardRef as o } from "react";
4
- import { n as f } from "./image-rectangle-DjuCYHbk.js";
4
+ import { m as f } from "./image-rectangle-B4nXH4Q5.js";
5
5
  import "./snackbar-DH8jCh2V.js";
6
6
  import { L as h } from "./skeleton-BNZyaRjo.js";
7
7
  const j = i(