@versini/ui-panel 2.2.9 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Panel/Panel.js +93 -93
- package/dist/index.js +3 -3
- package/package.json +7 -7
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as s, jsxs as L, Fragment as de } from "react/jsx-runtime";
|
|
2
2
|
import * as h from "react";
|
|
3
|
-
import F, { useRef as N, useLayoutEffect as H, useEffect as B, useState as
|
|
3
|
+
import F, { useRef as N, useLayoutEffect as H, useEffect as B, useState as K, useMemo as Q, useCallback as me, useId as Z } from "react";
|
|
4
4
|
import n from "clsx";
|
|
5
5
|
import { useFloating as ue, useClick as ge, useDismiss as he, useRole as fe, useInteractions as be, useMergeRefs as ye, FloatingPortal as ve, FloatingOverlay as pe, FloatingFocusManager as ke } from "@floating-ui/react";
|
|
6
|
-
const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon",
|
|
6
|
+
const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", ee = "button", D = "link", xe = ({
|
|
7
7
|
type: e,
|
|
8
8
|
size: r,
|
|
9
9
|
labelRight: t,
|
|
@@ -11,12 +11,12 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
|
|
|
11
11
|
align: i,
|
|
12
12
|
animated: o
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
14
|
+
const l = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
|
|
15
15
|
switch (e) {
|
|
16
|
-
case
|
|
16
|
+
case ee:
|
|
17
17
|
case D:
|
|
18
18
|
return n({
|
|
19
|
-
[
|
|
19
|
+
[l]: r === "small",
|
|
20
20
|
[d]: r === "medium",
|
|
21
21
|
[c]: r === "large"
|
|
22
22
|
});
|
|
@@ -45,21 +45,21 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
|
|
|
45
45
|
labelRight: t,
|
|
46
46
|
labelLeft: a
|
|
47
47
|
}) => {
|
|
48
|
-
const i = "text-sm font-medium", o = "text-base font-medium",
|
|
48
|
+
const i = "text-sm font-medium", o = "text-base font-medium", l = "text-lg font-medium";
|
|
49
49
|
switch (e) {
|
|
50
|
-
case
|
|
50
|
+
case ee:
|
|
51
51
|
case D:
|
|
52
52
|
return n({
|
|
53
53
|
"text-center": e === D,
|
|
54
54
|
[i]: r === "small",
|
|
55
55
|
[o]: r === "medium",
|
|
56
|
-
[
|
|
56
|
+
[l]: r === "large"
|
|
57
57
|
});
|
|
58
58
|
case V:
|
|
59
59
|
return n({
|
|
60
60
|
[i]: r === "small" && (t || a),
|
|
61
61
|
[o]: r === "medium" && (t || a),
|
|
62
|
-
[
|
|
62
|
+
[l]: r === "large" && (t || a)
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
65
|
}, Ie = ({
|
|
@@ -285,7 +285,7 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
|
|
|
285
285
|
mode: a,
|
|
286
286
|
focusMode: i,
|
|
287
287
|
disabled: o,
|
|
288
|
-
fullWidth:
|
|
288
|
+
fullWidth: l,
|
|
289
289
|
size: d,
|
|
290
290
|
noBorder: c,
|
|
291
291
|
labelRight: g,
|
|
@@ -320,7 +320,7 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
|
|
|
320
320
|
Ee({ mode: a, variant: u, disabled: o }),
|
|
321
321
|
Ce({ mode: a, variant: u, disabled: o }),
|
|
322
322
|
{
|
|
323
|
-
"w-full":
|
|
323
|
+
"w-full": l,
|
|
324
324
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
325
325
|
},
|
|
326
326
|
n({
|
|
@@ -329,9 +329,9 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
|
|
|
329
329
|
r
|
|
330
330
|
)), Le = (e, r, t) => {
|
|
331
331
|
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
332
|
-
},
|
|
332
|
+
}, te = F.forwardRef((e, r) => {
|
|
333
333
|
const { onClick: t, noInternalClick: a = !1, ...i } = e;
|
|
334
|
-
return /* @__PURE__ */
|
|
334
|
+
return /* @__PURE__ */ s(
|
|
335
335
|
"button",
|
|
336
336
|
{
|
|
337
337
|
ref: r,
|
|
@@ -342,22 +342,22 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
|
|
|
342
342
|
}
|
|
343
343
|
);
|
|
344
344
|
});
|
|
345
|
-
|
|
345
|
+
te.displayName = "BaseButton";
|
|
346
346
|
function $e() {
|
|
347
347
|
const e = N(!1);
|
|
348
348
|
return B(() => (e.current = !0, () => {
|
|
349
349
|
e.current = !1;
|
|
350
350
|
}), []), me(() => e.current, []);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
353
|
-
return
|
|
352
|
+
function Ae(e) {
|
|
353
|
+
return Q(() => e.every((r) => r == null) ? () => {
|
|
354
354
|
} : (r) => {
|
|
355
355
|
e.forEach((t) => {
|
|
356
356
|
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
357
357
|
});
|
|
358
358
|
}, [...e]);
|
|
359
359
|
}
|
|
360
|
-
const
|
|
360
|
+
const Oe = {
|
|
361
361
|
x: 0,
|
|
362
362
|
y: 0,
|
|
363
363
|
width: 0,
|
|
@@ -367,16 +367,16 @@ const Ae = {
|
|
|
367
367
|
bottom: 0,
|
|
368
368
|
right: 0
|
|
369
369
|
};
|
|
370
|
-
function
|
|
371
|
-
const r = $e(), t = N(0), a = N(null), [i, o] =
|
|
370
|
+
function P(e) {
|
|
371
|
+
const r = $e(), t = N(0), a = N(null), [i, o] = K(Oe), l = Q(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
372
372
|
const c = d[0];
|
|
373
373
|
c && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
374
374
|
a.current && r() && o(c.contentRect);
|
|
375
375
|
}));
|
|
376
376
|
}), [r]);
|
|
377
|
-
return B(() => (a.current &&
|
|
378
|
-
|
|
379
|
-
}), [
|
|
377
|
+
return B(() => (a.current && l?.observe(a.current, e), () => {
|
|
378
|
+
l?.disconnect(), t.current && cancelAnimationFrame(t.current);
|
|
379
|
+
}), [l, e]), [a, i];
|
|
380
380
|
}
|
|
381
381
|
const M = {
|
|
382
382
|
small: 24,
|
|
@@ -385,14 +385,14 @@ const M = {
|
|
|
385
385
|
// w-8
|
|
386
386
|
large: 48
|
|
387
387
|
// w-12
|
|
388
|
-
},
|
|
388
|
+
}, ze = {
|
|
389
389
|
small: 16,
|
|
390
390
|
// px-2 x 2
|
|
391
391
|
medium: 24,
|
|
392
392
|
// px-3 x 2
|
|
393
393
|
large: 32
|
|
394
394
|
// px-4 x 2
|
|
395
|
-
},
|
|
395
|
+
}, Pe = 2, De = 300, U = F.forwardRef(
|
|
396
396
|
({
|
|
397
397
|
children: e,
|
|
398
398
|
disabled: r = !1,
|
|
@@ -400,7 +400,7 @@ const M = {
|
|
|
400
400
|
focusMode: a = "system",
|
|
401
401
|
fullWidth: i = !1,
|
|
402
402
|
className: o,
|
|
403
|
-
type:
|
|
403
|
+
type: l = "button",
|
|
404
404
|
raw: d = !1,
|
|
405
405
|
noBorder: c = !1,
|
|
406
406
|
"aria-label": g,
|
|
@@ -412,11 +412,11 @@ const M = {
|
|
|
412
412
|
align: w = "center",
|
|
413
413
|
radius: I = "large",
|
|
414
414
|
variant: j = "secondary",
|
|
415
|
-
iconClassName:
|
|
415
|
+
iconClassName: ae,
|
|
416
416
|
animated: k = !1,
|
|
417
|
-
...
|
|
418
|
-
},
|
|
419
|
-
const
|
|
417
|
+
...ie
|
|
418
|
+
}, oe) => {
|
|
419
|
+
const ne = Te({
|
|
420
420
|
type: V,
|
|
421
421
|
mode: t,
|
|
422
422
|
focusMode: a,
|
|
@@ -433,38 +433,38 @@ const M = {
|
|
|
433
433
|
radius: I,
|
|
434
434
|
variant: j,
|
|
435
435
|
animated: k
|
|
436
|
-
}), se = Re({ mode: t, raw: d, iconClassName:
|
|
436
|
+
}), se = Re({ mode: t, raw: d, iconClassName: ae, variant: j }), G = Me({ animated: k }), le = "flex items-center justify-center relative w-full h-full overflow-hidden", [v, A] = P(), [p, O] = P(), [S, Y] = P(), z = N(0), x = N(null), E = N(null), ce = Ae([oe, x]);
|
|
437
437
|
return H(() => {
|
|
438
|
-
S && S.current && k && (
|
|
438
|
+
S && S.current && k && (z.current = Y.width + ze[m] + (c ? 0 : Pe), x.current && !x.current.style.width && (x.current.style.width = `${M[m]}px`));
|
|
439
439
|
}, [Y, S, m, c, k]), H(() => {
|
|
440
440
|
if (x && x.current && k) {
|
|
441
441
|
let C = M[m];
|
|
442
|
-
u && v &&
|
|
442
|
+
u && v && A.width > 0 ? C = A.width + z.current : f && p && O.width > 0 && (C = O.width + z.current), E.current && clearTimeout(E.current), C !== parseInt(x.current.style.width || "0", 10) && (v.current && (v.current.style.opacity = "0"), p.current && (p.current.style.opacity = "0"), x.current.style.width = `${C}px`, C > M[m] && (E.current = setTimeout(() => {
|
|
443
443
|
v.current && u && (v.current.style.opacity = "1"), p.current && f && (p.current.style.opacity = "1"), E.current = null;
|
|
444
444
|
}, De * 0.8))), C === M[m] && (v.current && (v.current.style.opacity = "0"), p.current && (p.current.style.opacity = "0"));
|
|
445
445
|
}
|
|
446
446
|
}, [
|
|
447
|
-
|
|
447
|
+
A,
|
|
448
448
|
u,
|
|
449
449
|
v,
|
|
450
|
-
|
|
450
|
+
O,
|
|
451
451
|
f,
|
|
452
452
|
p,
|
|
453
453
|
m,
|
|
454
454
|
k
|
|
455
455
|
]), B(() => () => {
|
|
456
456
|
E.current && clearTimeout(E.current);
|
|
457
|
-
}, []), /* @__PURE__ */
|
|
458
|
-
|
|
457
|
+
}, []), /* @__PURE__ */ s(
|
|
458
|
+
te,
|
|
459
459
|
{
|
|
460
|
-
ref:
|
|
461
|
-
className:
|
|
460
|
+
ref: ce,
|
|
461
|
+
className: ne,
|
|
462
462
|
disabled: r,
|
|
463
|
-
type:
|
|
463
|
+
type: l,
|
|
464
464
|
"aria-label": g || y,
|
|
465
|
-
...
|
|
466
|
-
children: /* @__PURE__ */ L("div", { className:
|
|
467
|
-
/* @__PURE__ */
|
|
465
|
+
...ie,
|
|
466
|
+
children: /* @__PURE__ */ L("div", { className: le, children: [
|
|
467
|
+
/* @__PURE__ */ s(
|
|
468
468
|
W,
|
|
469
469
|
{
|
|
470
470
|
label: f,
|
|
@@ -474,8 +474,8 @@ const M = {
|
|
|
474
474
|
initiallyHidden: k
|
|
475
475
|
}
|
|
476
476
|
),
|
|
477
|
-
/* @__PURE__ */
|
|
478
|
-
/* @__PURE__ */
|
|
477
|
+
/* @__PURE__ */ s("span", { ref: S, className: se, children: e }),
|
|
478
|
+
/* @__PURE__ */ s(
|
|
479
479
|
W,
|
|
480
480
|
{
|
|
481
481
|
label: u,
|
|
@@ -495,24 +495,24 @@ const M = {
|
|
|
495
495
|
label: t,
|
|
496
496
|
labelInnerClass: a,
|
|
497
497
|
initiallyHidden: i = !1
|
|
498
|
-
}) => /* @__PURE__ */
|
|
498
|
+
}) => /* @__PURE__ */ s(
|
|
499
499
|
"span",
|
|
500
500
|
{
|
|
501
501
|
ref: e,
|
|
502
502
|
className: r,
|
|
503
503
|
style: i ? { opacity: 0 } : void 0,
|
|
504
|
-
children: t && /* @__PURE__ */
|
|
504
|
+
children: t && /* @__PURE__ */ s("span", { className: a, children: t })
|
|
505
505
|
}
|
|
506
506
|
);
|
|
507
507
|
U.displayName = "ButtonIcon";
|
|
508
508
|
/*!
|
|
509
|
-
@versini/ui-button
|
|
509
|
+
@versini/ui-button v8.0.0
|
|
510
510
|
© 2025 gizmette.com
|
|
511
511
|
*/
|
|
512
512
|
try {
|
|
513
513
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
514
|
-
version: "
|
|
515
|
-
buildTime: "
|
|
514
|
+
version: "8.0.0",
|
|
515
|
+
buildTime: "09/01/2025 03:17 PM EDT",
|
|
516
516
|
homepage: "https://github.com/aversini/ui-components",
|
|
517
517
|
license: "MIT"
|
|
518
518
|
});
|
|
@@ -526,7 +526,7 @@ const Fe = F.forwardRef(
|
|
|
526
526
|
active: a = !1,
|
|
527
527
|
...i
|
|
528
528
|
}, o) => {
|
|
529
|
-
const
|
|
529
|
+
const l = a ? n(
|
|
530
530
|
"relative",
|
|
531
531
|
"focus-within:static",
|
|
532
532
|
"focus-within:after:border-transparent",
|
|
@@ -543,7 +543,7 @@ const Fe = F.forwardRef(
|
|
|
543
543
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
544
544
|
}
|
|
545
545
|
) : "";
|
|
546
|
-
return /* @__PURE__ */
|
|
546
|
+
return /* @__PURE__ */ s("div", { className: l, children: /* @__PURE__ */ s(
|
|
547
547
|
U,
|
|
548
548
|
{
|
|
549
549
|
className: t,
|
|
@@ -566,12 +566,12 @@ const Ve = ({
|
|
|
566
566
|
className: a,
|
|
567
567
|
defaultViewBox: i,
|
|
568
568
|
size: o,
|
|
569
|
-
title:
|
|
569
|
+
title: l,
|
|
570
570
|
semantic: d = !1,
|
|
571
571
|
...c
|
|
572
572
|
}) => {
|
|
573
573
|
const g = n(o, a);
|
|
574
|
-
return /* @__PURE__ */
|
|
574
|
+
return /* @__PURE__ */ L(
|
|
575
575
|
"svg",
|
|
576
576
|
{
|
|
577
577
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -583,20 +583,20 @@ const Ve = ({
|
|
|
583
583
|
focusable: !1,
|
|
584
584
|
...c,
|
|
585
585
|
children: [
|
|
586
|
-
|
|
586
|
+
l && d && /* @__PURE__ */ s("title", { children: l }),
|
|
587
587
|
e
|
|
588
588
|
]
|
|
589
589
|
}
|
|
590
|
-
)
|
|
590
|
+
);
|
|
591
591
|
};
|
|
592
592
|
/*!
|
|
593
|
-
@versini/ui-svgicon v4.2.
|
|
593
|
+
@versini/ui-svgicon v4.2.1
|
|
594
594
|
© 2025 gizmette.com
|
|
595
595
|
*/
|
|
596
596
|
try {
|
|
597
597
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
598
|
-
version: "4.2.
|
|
599
|
-
buildTime: "
|
|
598
|
+
version: "4.2.1",
|
|
599
|
+
buildTime: "08/27/2025 08:27 AM EDT",
|
|
600
600
|
homepage: "https://github.com/aversini/ui-components",
|
|
601
601
|
license: "MIT"
|
|
602
602
|
});
|
|
@@ -608,7 +608,7 @@ const Ue = ({
|
|
|
608
608
|
title: t,
|
|
609
609
|
monotone: a,
|
|
610
610
|
...i
|
|
611
|
-
}) => /* @__PURE__ */
|
|
611
|
+
}) => /* @__PURE__ */ s(
|
|
612
612
|
Ve,
|
|
613
613
|
{
|
|
614
614
|
defaultViewBox: "0 0 384 512",
|
|
@@ -617,7 +617,7 @@ const Ue = ({
|
|
|
617
617
|
className: e,
|
|
618
618
|
title: t || "Close",
|
|
619
619
|
...i,
|
|
620
|
-
children: /* @__PURE__ */
|
|
620
|
+
children: /* @__PURE__ */ s(
|
|
621
621
|
"path",
|
|
622
622
|
{
|
|
623
623
|
d: "M297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3z",
|
|
@@ -627,25 +627,25 @@ const Ue = ({
|
|
|
627
627
|
}
|
|
628
628
|
);
|
|
629
629
|
/*!
|
|
630
|
-
@versini/ui-icons v4.
|
|
630
|
+
@versini/ui-icons v4.11.0
|
|
631
631
|
© 2025 gizmette.com
|
|
632
632
|
*/
|
|
633
633
|
try {
|
|
634
634
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
635
|
-
version: "4.
|
|
636
|
-
buildTime: "
|
|
635
|
+
version: "4.11.0",
|
|
636
|
+
buildTime: "08/27/2025 08:28 AM EDT",
|
|
637
637
|
homepage: "https://github.com/aversini/ui-components",
|
|
638
638
|
license: "MIT"
|
|
639
639
|
});
|
|
640
640
|
} catch {
|
|
641
641
|
}
|
|
642
|
-
const
|
|
642
|
+
const re = h.createContext(null);
|
|
643
643
|
function je({
|
|
644
644
|
initialOpen: e = !1,
|
|
645
645
|
open: r,
|
|
646
646
|
onOpenChange: t
|
|
647
647
|
} = {}) {
|
|
648
|
-
const [a, i] = h.useState(e), [o,
|
|
648
|
+
const [a, i] = h.useState(e), [o, l] = h.useState(), [d, c] = h.useState(), g = r ?? a, y = t ?? i, m = ue({
|
|
649
649
|
open: g,
|
|
650
650
|
onOpenChange: y
|
|
651
651
|
}), u = m.context, f = ge(u, {
|
|
@@ -662,14 +662,14 @@ function je({
|
|
|
662
662
|
...m,
|
|
663
663
|
labelId: o,
|
|
664
664
|
descriptionId: d,
|
|
665
|
-
setLabelId:
|
|
665
|
+
setLabelId: l,
|
|
666
666
|
setDescriptionId: c
|
|
667
667
|
}),
|
|
668
668
|
[g, y, I, m, o, d]
|
|
669
669
|
);
|
|
670
670
|
}
|
|
671
671
|
const $ = () => {
|
|
672
|
-
const e = h.useContext(
|
|
672
|
+
const e = h.useContext(re);
|
|
673
673
|
if (e == null)
|
|
674
674
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
675
675
|
return e;
|
|
@@ -679,48 +679,48 @@ function Ge({
|
|
|
679
679
|
...r
|
|
680
680
|
}) {
|
|
681
681
|
const t = je(r);
|
|
682
|
-
return /* @__PURE__ */
|
|
682
|
+
return /* @__PURE__ */ s(re.Provider, { value: t, children: e });
|
|
683
683
|
}
|
|
684
684
|
const Ye = h.forwardRef(function(e, r) {
|
|
685
685
|
const { context: t, ...a } = $(), i = ye([a.refs.setFloating, r]);
|
|
686
686
|
if (!t.open)
|
|
687
687
|
return null;
|
|
688
|
-
const { overlayBackground: o, ...
|
|
688
|
+
const { overlayBackground: o, ...l } = e, d = n("grid place-items-center", {
|
|
689
689
|
[`${o}`]: o,
|
|
690
690
|
"bg-black sm:bg-black/[.8]": !o
|
|
691
691
|
});
|
|
692
|
-
return /* @__PURE__ */
|
|
692
|
+
return /* @__PURE__ */ s(ve, { children: /* @__PURE__ */ s(pe, { className: d, lockScroll: !0, children: /* @__PURE__ */ s(ke, { context: t, children: /* @__PURE__ */ s(
|
|
693
693
|
"div",
|
|
694
694
|
{
|
|
695
695
|
ref: i,
|
|
696
696
|
"aria-labelledby": a.labelId,
|
|
697
697
|
"aria-describedby": a.descriptionId,
|
|
698
|
-
...a.getFloatingProps(
|
|
699
|
-
children:
|
|
698
|
+
...a.getFloatingProps(l),
|
|
699
|
+
children: l.children
|
|
700
700
|
}
|
|
701
701
|
) }) }) });
|
|
702
702
|
}), He = h.forwardRef(function({ children: e, ...r }, t) {
|
|
703
|
-
const { setLabelId: a } = $(), i =
|
|
704
|
-
return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */
|
|
703
|
+
const { setLabelId: a } = $(), i = Z();
|
|
704
|
+
return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */ s("h1", { ...r, ref: t, id: i, children: e });
|
|
705
705
|
}), qe = h.forwardRef(function({ children: e, ...r }, t) {
|
|
706
|
-
const { setDescriptionId: a } = $(), i =
|
|
707
|
-
return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */
|
|
706
|
+
const { setDescriptionId: a } = $(), i = Z();
|
|
707
|
+
return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */ s("div", { ...r, ref: t, id: i, children: e });
|
|
708
708
|
}), Xe = h.forwardRef(function(e, r) {
|
|
709
|
-
const { setOpen: t } = $(), { trigger: a, className: i, ...o } = e,
|
|
710
|
-
return /* @__PURE__ */
|
|
709
|
+
const { setOpen: t } = $(), { trigger: a, className: i, ...o } = e, l = h.useCallback(() => t(!1), [t]);
|
|
710
|
+
return /* @__PURE__ */ s("div", { className: i, children: h.cloneElement(a, {
|
|
711
711
|
ref: r,
|
|
712
|
-
onClick:
|
|
712
|
+
onClick: l,
|
|
713
713
|
...o
|
|
714
714
|
}) });
|
|
715
715
|
});
|
|
716
716
|
/*!
|
|
717
|
-
@versini/ui-modal
|
|
717
|
+
@versini/ui-modal v3.0.0
|
|
718
718
|
© 2025 gizmette.com
|
|
719
719
|
*/
|
|
720
720
|
try {
|
|
721
721
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
722
|
-
version: "
|
|
723
|
-
buildTime: "
|
|
722
|
+
version: "3.0.0",
|
|
723
|
+
buildTime: "09/01/2025 03:17 PM EDT",
|
|
724
724
|
homepage: "https://github.com/aversini/ui-components",
|
|
725
725
|
license: "MIT"
|
|
726
726
|
});
|
|
@@ -758,19 +758,19 @@ const _ = "panel", T = "messagebox", We = ({
|
|
|
758
758
|
children: a,
|
|
759
759
|
footer: i,
|
|
760
760
|
borderMode: o = "light",
|
|
761
|
-
kind:
|
|
761
|
+
kind: l = _,
|
|
762
762
|
className: d,
|
|
763
763
|
animation: c = !1,
|
|
764
764
|
animationType: g = Je,
|
|
765
765
|
maxWidth: y = "medium"
|
|
766
766
|
}) => {
|
|
767
|
-
const m = N(""), [u, f] =
|
|
767
|
+
const m = N(""), [u, f] = K(
|
|
768
768
|
c ? g === J ? { opacity: 0 } : {
|
|
769
769
|
transform: "translateY(-100vh)"
|
|
770
770
|
} : {}
|
|
771
771
|
), b = We({
|
|
772
772
|
className: d,
|
|
773
|
-
kind:
|
|
773
|
+
kind: l,
|
|
774
774
|
borderMode: o,
|
|
775
775
|
animation: c,
|
|
776
776
|
maxWidth: y
|
|
@@ -793,28 +793,28 @@ const _ = "panel", T = "messagebox", We = ({
|
|
|
793
793
|
}, 100);
|
|
794
794
|
return () => clearTimeout(w);
|
|
795
795
|
}
|
|
796
|
-
}, [e, c, g]), /* @__PURE__ */
|
|
796
|
+
}, [e, c, g]), /* @__PURE__ */ s(de, { children: e && /* @__PURE__ */ s(Ge, { open: e, onOpenChange: r, children: /* @__PURE__ */ L(Ye, { className: b.main, style: u, children: [
|
|
797
797
|
/* @__PURE__ */ L("div", { className: "flex flex-row-reverse items-center justify-between", children: [
|
|
798
|
-
/* @__PURE__ */
|
|
798
|
+
/* @__PURE__ */ s(
|
|
799
799
|
Xe,
|
|
800
800
|
{
|
|
801
801
|
className: b.close,
|
|
802
|
-
trigger: /* @__PURE__ */
|
|
802
|
+
trigger: /* @__PURE__ */ s(
|
|
803
803
|
U,
|
|
804
804
|
{
|
|
805
805
|
mode: "dark",
|
|
806
806
|
focusMode: "light",
|
|
807
807
|
noBorder: !0,
|
|
808
808
|
label: "Close",
|
|
809
|
-
children: /* @__PURE__ */
|
|
809
|
+
children: /* @__PURE__ */ s(Ue, { monotone: !0 })
|
|
810
810
|
}
|
|
811
811
|
)
|
|
812
812
|
}
|
|
813
813
|
),
|
|
814
|
-
/* @__PURE__ */
|
|
814
|
+
/* @__PURE__ */ s(He, { className: b.header, children: t })
|
|
815
815
|
] }),
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
i && /* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ s(qe, { className: b.content, children: a }),
|
|
817
|
+
i && /* @__PURE__ */ s("div", { className: b.footer, children: i })
|
|
818
818
|
] }) }) });
|
|
819
819
|
};
|
|
820
820
|
export {
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { MESSAGEBOX_CLASSNAME as o, PANEL_CLASSNAME as E, Panel as n } from "./components/Panel/Panel.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-panel
|
|
3
|
+
@versini/ui-panel v3.0.0
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
8
|
-
version: "
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "3.0.0",
|
|
9
|
+
buildTime: "09/01/2025 03:18 PM EDT",
|
|
10
10
|
homepage: "https://github.com/aversini/ui-components",
|
|
11
11
|
license: "MIT"
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-panel",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -37,22 +37,22 @@
|
|
|
37
37
|
"test": "vitest run"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"react": "^
|
|
41
|
-
"react-dom": "^
|
|
40
|
+
"react": "^19.0.0",
|
|
41
|
+
"react-dom": "^19.0.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@testing-library/jest-dom": "6.8.0"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@tailwindcss/typography": "0.5.16",
|
|
48
|
-
"@versini/ui-button": "
|
|
49
|
-
"@versini/ui-icons": "4.
|
|
50
|
-
"@versini/ui-modal": "
|
|
48
|
+
"@versini/ui-button": "8.0.0",
|
|
49
|
+
"@versini/ui-icons": "4.11.0",
|
|
50
|
+
"@versini/ui-modal": "3.0.0",
|
|
51
51
|
"clsx": "2.1.1",
|
|
52
52
|
"tailwindcss": "4.1.12"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": [
|
|
55
55
|
"**/*.css"
|
|
56
56
|
],
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "70a47e9e30172dbb7b36306773fe9511e437fba6"
|
|
58
58
|
}
|