@versini/ui-panel 2.2.2 → 2.2.4

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.
@@ -1,4 +1,4 @@
1
- import { jsx as s, jsxs as L, Fragment as K } from "react/jsx-runtime";
1
+ import { jsx as l, jsxs as L, Fragment as K } from "react/jsx-runtime";
2
2
  import * as h from "react";
3
3
  import F, { useRef as N, useLayoutEffect as H, useEffect as B, useState as Q, useMemo as Z, useCallback as me, useId as ee } from "react";
4
4
  import n from "clsx";
@@ -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 l = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", c = "max-h-12 py-2 px-4";
14
+ const s = "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
16
  case te:
17
17
  case D:
18
18
  return n({
19
- [l]: r === "small",
19
+ [s]: r === "small",
20
20
  [d]: r === "medium",
21
21
  [c]: r === "large"
22
22
  });
@@ -45,7 +45,7 @@ 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", l = "text-lg font-medium";
48
+ const i = "text-sm font-medium", o = "text-base font-medium", s = "text-lg font-medium";
49
49
  switch (e) {
50
50
  case te:
51
51
  case D:
@@ -53,13 +53,13 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
53
53
  "text-center": e === D,
54
54
  [i]: r === "small",
55
55
  [o]: r === "medium",
56
- [l]: r === "large"
56
+ [s]: 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
- [l]: r === "large" && (t || a)
62
+ [s]: 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: l,
288
+ fullWidth: s,
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": l,
323
+ "w-full": s,
324
324
  "disabled:cursor-not-allowed disabled:opacity-50": o
325
325
  },
326
326
  n({
@@ -331,7 +331,7 @@ const q = "av-messagebox", R = "av-panel", X = "av-button", V = "icon", te = "bu
331
331
  !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
332
332
  }, re = F.forwardRef((e, r) => {
333
333
  const { onClick: t, noInternalClick: a = !1, ...i } = e;
334
- return /* @__PURE__ */ s(
334
+ return /* @__PURE__ */ l(
335
335
  "button",
336
336
  {
337
337
  ref: r,
@@ -368,15 +368,15 @@ const Ae = {
368
368
  right: 0
369
369
  };
370
370
  function z(e) {
371
- const r = $e(), t = N(0), a = N(null), [i, o] = Q(Ae), l = Z(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
371
+ const r = $e(), t = N(0), a = N(null), [i, o] = Q(Ae), s = Z(() => 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 && l?.observe(a.current, e), () => {
378
- l?.disconnect(), t.current && cancelAnimationFrame(t.current);
379
- }), [l, e]), [a, i];
377
+ return B(() => (a.current && s?.observe(a.current, e), () => {
378
+ s?.disconnect(), t.current && cancelAnimationFrame(t.current);
379
+ }), [s, e]), [a, i];
380
380
  }
381
381
  const M = {
382
382
  small: 24,
@@ -400,7 +400,7 @@ const M = {
400
400
  focusMode: a = "system",
401
401
  fullWidth: i = !1,
402
402
  className: o,
403
- type: l = "button",
403
+ type: s = "button",
404
404
  raw: d = !1,
405
405
  noBorder: c = !1,
406
406
  "aria-label": g,
@@ -416,7 +416,7 @@ const M = {
416
416
  animated: k = !1,
417
417
  ...oe
418
418
  }, ne) => {
419
- const se = Te({
419
+ const le = Te({
420
420
  type: V,
421
421
  mode: t,
422
422
  focusMode: a,
@@ -433,7 +433,7 @@ const M = {
433
433
  radius: I,
434
434
  variant: j,
435
435
  animated: k
436
- }), le = Re({ mode: t, raw: d, iconClassName: ie, variant: j }), G = Me({ animated: k }), ce = "flex items-center justify-center relative w-full h-full overflow-hidden", [v, O] = z(), [p, A] = z(), [S, Y] = z(), P = N(0), x = N(null), E = N(null), de = Oe([ne, x]);
436
+ }), se = Re({ mode: t, raw: d, iconClassName: ie, variant: j }), G = Me({ animated: k }), ce = "flex items-center justify-center relative w-full h-full overflow-hidden", [v, O] = z(), [p, A] = z(), [S, Y] = z(), P = N(0), x = N(null), E = N(null), de = Oe([ne, x]);
437
437
  return H(() => {
438
438
  S && S.current && k && (P.current = Y.width + Pe[m] + (c ? 0 : ze), x.current && !x.current.style.width && (x.current.style.width = `${M[m]}px`));
439
439
  }, [Y, S, m, c, k]), H(() => {
@@ -454,17 +454,17 @@ const M = {
454
454
  k
455
455
  ]), B(() => () => {
456
456
  E.current && clearTimeout(E.current);
457
- }, []), /* @__PURE__ */ s(
457
+ }, []), /* @__PURE__ */ l(
458
458
  re,
459
459
  {
460
460
  ref: de,
461
- className: se,
461
+ className: le,
462
462
  disabled: r,
463
- type: l,
463
+ type: s,
464
464
  "aria-label": g || y,
465
465
  ...oe,
466
466
  children: /* @__PURE__ */ L("div", { className: ce, children: [
467
- /* @__PURE__ */ s(
467
+ /* @__PURE__ */ l(
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__ */ s("span", { ref: S, className: le, children: e }),
478
- /* @__PURE__ */ s(
477
+ /* @__PURE__ */ l("span", { ref: S, className: se, children: e }),
478
+ /* @__PURE__ */ l(
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__ */ s(
498
+ }) => /* @__PURE__ */ l(
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__ */ s("span", { className: a, children: t })
504
+ children: t && /* @__PURE__ */ l("span", { className: a, children: t })
505
505
  }
506
506
  );
507
507
  U.displayName = "ButtonIcon";
508
508
  /*!
509
- @versini/ui-button v7.0.0
509
+ @versini/ui-button v7.1.0
510
510
  © 2025 gizmette.com
511
511
  */
512
512
  try {
513
513
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
514
- version: "7.0.0",
515
- buildTime: "08/07/2025 04:11 PM EDT",
514
+ version: "7.1.0",
515
+ buildTime: "08/10/2025 12:46 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 l = a ? n(
529
+ const s = a ? n(
530
530
  "relative",
531
531
  "focus-within:static",
532
532
  "focus-within:after:border-transparent",
@@ -543,13 +543,15 @@ 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__ */ s("div", { className: l, children: /* @__PURE__ */ s(
546
+ return /* @__PURE__ */ l("div", { className: s, children: /* @__PURE__ */ l(
547
547
  U,
548
548
  {
549
- className: n("justify-center", t),
549
+ className: t,
550
550
  ref: o,
551
551
  mode: r,
552
552
  radius: "small",
553
+ size: "small",
554
+ align: "center",
553
555
  ...i,
554
556
  children: e
555
557
  }
@@ -564,12 +566,12 @@ const Ve = ({
564
566
  className: a,
565
567
  defaultViewBox: i,
566
568
  size: o,
567
- title: l,
569
+ title: s,
568
570
  semantic: d = !1,
569
571
  ...c
570
572
  }) => {
571
573
  const g = n(o, a);
572
- return /* @__PURE__ */ s(K, { children: /* @__PURE__ */ L(
574
+ return /* @__PURE__ */ l(K, { children: /* @__PURE__ */ L(
573
575
  "svg",
574
576
  {
575
577
  xmlns: "http://www.w3.org/2000/svg",
@@ -581,7 +583,7 @@ const Ve = ({
581
583
  focusable: !1,
582
584
  ...c,
583
585
  children: [
584
- l && d && /* @__PURE__ */ s("title", { children: l }),
586
+ s && d && /* @__PURE__ */ l("title", { children: s }),
585
587
  e
586
588
  ]
587
589
  }
@@ -606,7 +608,7 @@ const Ue = ({
606
608
  title: t,
607
609
  monotone: a,
608
610
  ...i
609
- }) => /* @__PURE__ */ s(
611
+ }) => /* @__PURE__ */ l(
610
612
  Ve,
611
613
  {
612
614
  defaultViewBox: "0 0 384 512",
@@ -615,7 +617,7 @@ const Ue = ({
615
617
  className: e,
616
618
  title: t || "Close",
617
619
  ...i,
618
- children: /* @__PURE__ */ s(
620
+ children: /* @__PURE__ */ l(
619
621
  "path",
620
622
  {
621
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",
@@ -643,7 +645,7 @@ function je({
643
645
  open: r,
644
646
  onOpenChange: t
645
647
  } = {}) {
646
- const [a, i] = h.useState(e), [o, l] = h.useState(), [d, c] = h.useState(), g = r ?? a, y = t ?? i, m = ue({
648
+ const [a, i] = h.useState(e), [o, s] = h.useState(), [d, c] = h.useState(), g = r ?? a, y = t ?? i, m = ue({
647
649
  open: g,
648
650
  onOpenChange: y
649
651
  }), u = m.context, f = ge(u, {
@@ -660,7 +662,7 @@ function je({
660
662
  ...m,
661
663
  labelId: o,
662
664
  descriptionId: d,
663
- setLabelId: l,
665
+ setLabelId: s,
664
666
  setDescriptionId: c
665
667
  }),
666
668
  [g, y, I, m, o, d]
@@ -677,37 +679,37 @@ function Ge({
677
679
  ...r
678
680
  }) {
679
681
  const t = je(r);
680
- return /* @__PURE__ */ s(ae.Provider, { value: t, children: e });
682
+ return /* @__PURE__ */ l(ae.Provider, { value: t, children: e });
681
683
  }
682
684
  const Ye = h.forwardRef(function(e, r) {
683
685
  const { context: t, ...a } = $(), i = ye([a.refs.setFloating, r]);
684
686
  if (!t.open)
685
687
  return null;
686
- const { overlayBackground: o, ...l } = e, d = n("grid place-items-center", {
688
+ const { overlayBackground: o, ...s } = e, d = n("grid place-items-center", {
687
689
  [`${o}`]: o,
688
690
  "bg-black sm:bg-black/[.8]": !o
689
691
  });
690
- return /* @__PURE__ */ s(ve, { children: /* @__PURE__ */ s(pe, { className: d, lockScroll: !0, children: /* @__PURE__ */ s(ke, { context: t, children: /* @__PURE__ */ s(
692
+ return /* @__PURE__ */ l(ve, { children: /* @__PURE__ */ l(pe, { className: d, lockScroll: !0, children: /* @__PURE__ */ l(ke, { context: t, children: /* @__PURE__ */ l(
691
693
  "div",
692
694
  {
693
695
  ref: i,
694
696
  "aria-labelledby": a.labelId,
695
697
  "aria-describedby": a.descriptionId,
696
- ...a.getFloatingProps(l),
697
- children: l.children
698
+ ...a.getFloatingProps(s),
699
+ children: s.children
698
700
  }
699
701
  ) }) }) });
700
702
  }), He = h.forwardRef(function({ children: e, ...r }, t) {
701
703
  const { setLabelId: a } = $(), i = ee();
702
- return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */ s("h1", { ...r, ref: t, id: i, children: e });
704
+ return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */ l("h1", { ...r, ref: t, id: i, children: e });
703
705
  }), qe = h.forwardRef(function({ children: e, ...r }, t) {
704
706
  const { setDescriptionId: a } = $(), i = ee();
705
- return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */ s("div", { ...r, ref: t, id: i, children: e });
707
+ return h.useLayoutEffect(() => (a(i), () => a(void 0)), [i, a]), /* @__PURE__ */ l("div", { ...r, ref: t, id: i, children: e });
706
708
  }), Xe = h.forwardRef(function(e, r) {
707
- const { setOpen: t } = $(), { trigger: a, className: i, ...o } = e, l = h.useCallback(() => t(!1), [t]);
708
- return /* @__PURE__ */ s("div", { className: i, children: h.cloneElement(a, {
709
+ const { setOpen: t } = $(), { trigger: a, className: i, ...o } = e, s = h.useCallback(() => t(!1), [t]);
710
+ return /* @__PURE__ */ l("div", { className: i, children: h.cloneElement(a, {
709
711
  ref: r,
710
- onClick: l,
712
+ onClick: s,
711
713
  ...o
712
714
  }) });
713
715
  });
@@ -718,7 +720,7 @@ const Ye = h.forwardRef(function(e, r) {
718
720
  try {
719
721
  window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
720
722
  version: "2.0.6",
721
- buildTime: "08/07/2025 04:12 PM EDT",
723
+ buildTime: "08/10/2025 12:46 PM EDT",
722
724
  homepage: "https://github.com/aversini/ui-components",
723
725
  license: "MIT"
724
726
  });
@@ -731,7 +733,7 @@ const _ = "panel", T = "messagebox", We = ({
731
733
  animation: a,
732
734
  maxWidth: i = "medium"
733
735
  }) => ({
734
- main: n("prose prose-lighter flex flex-col bg-surface-medium", {
736
+ main: n("prose prose-lighter flex flex-col bg-surface-dark", {
735
737
  "duration-200 ease-out": a,
736
738
  [`${R} max-h-full sm:max-h-[95%] min-h-full sm:min-h-[10rem] sm:rounded-lg sm:border-2`]: r === _,
737
739
  [`${R} w-full sm:w-[95%] md:max-w-2xl`]: r === _ && !e && i === "small",
@@ -756,7 +758,7 @@ const _ = "panel", T = "messagebox", We = ({
756
758
  children: a,
757
759
  footer: i,
758
760
  borderMode: o = "light",
759
- kind: l = _,
761
+ kind: s = _,
760
762
  className: d,
761
763
  animation: c = !1,
762
764
  animationType: g = Je,
@@ -768,7 +770,7 @@ const _ = "panel", T = "messagebox", We = ({
768
770
  } : {}
769
771
  ), b = We({
770
772
  className: d,
771
- kind: l,
773
+ kind: s,
772
774
  borderMode: o,
773
775
  animation: c,
774
776
  maxWidth: y
@@ -791,28 +793,28 @@ const _ = "panel", T = "messagebox", We = ({
791
793
  }, 100);
792
794
  return () => clearTimeout(w);
793
795
  }
794
- }, [e, c, g]), /* @__PURE__ */ s(K, { children: e && /* @__PURE__ */ s(Ge, { open: e, onOpenChange: r, children: /* @__PURE__ */ L(Ye, { className: b.main, style: u, children: [
796
+ }, [e, c, g]), /* @__PURE__ */ l(K, { children: e && /* @__PURE__ */ l(Ge, { open: e, onOpenChange: r, children: /* @__PURE__ */ L(Ye, { className: b.main, style: u, children: [
795
797
  /* @__PURE__ */ L("div", { className: "flex flex-row-reverse items-center justify-between", children: [
796
- /* @__PURE__ */ s(
798
+ /* @__PURE__ */ l(
797
799
  Xe,
798
800
  {
799
801
  className: b.close,
800
- trigger: /* @__PURE__ */ s(
802
+ trigger: /* @__PURE__ */ l(
801
803
  U,
802
804
  {
803
805
  mode: "dark",
804
806
  focusMode: "light",
805
807
  noBorder: !0,
806
808
  label: "Close",
807
- children: /* @__PURE__ */ s(Ue, {})
809
+ children: /* @__PURE__ */ l(Ue, { monotone: !0 })
808
810
  }
809
811
  )
810
812
  }
811
813
  ),
812
- /* @__PURE__ */ s(He, { className: b.header, children: t })
814
+ /* @__PURE__ */ l(He, { className: b.header, children: t })
813
815
  ] }),
814
- /* @__PURE__ */ s(qe, { className: b.content, children: a }),
815
- i && /* @__PURE__ */ s("div", { className: b.footer, children: i })
816
+ /* @__PURE__ */ l(qe, { className: b.content, children: a }),
817
+ i && /* @__PURE__ */ l("div", { className: b.footer, children: i })
816
818
  ] }) }) });
817
819
  };
818
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 v2.2.2
3
+ @versini/ui-panel v2.2.4
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
8
- version: "2.2.2",
9
- buildTime: "08/07/2025 04:12 PM EDT",
8
+ version: "2.2.4",
9
+ buildTime: "08/10/2025 12:46 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": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "dependencies": {
46
46
  "@tailwindcss/typography": "0.5.16",
47
- "@versini/ui-button": "7.0.0",
47
+ "@versini/ui-button": "7.1.0",
48
48
  "@versini/ui-icons": "4.10.0",
49
49
  "@versini/ui-modal": "2.0.6",
50
50
  "clsx": "2.1.1",
@@ -53,5 +53,5 @@
53
53
  "sideEffects": [
54
54
  "**/*.css"
55
55
  ],
56
- "gitHead": "42daab1fb88c366495abbc1db78a9987de05e59b"
56
+ "gitHead": "6d8fef53d038c1153effea9b0cfaf01f983c1774"
57
57
  }