@versini/ui-panel 1.1.4 → 1.2.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.
@@ -1,23 +1,23 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { useFloating as E, useClick as _, useDismiss as C, useRole as R, useInteractions as x, useMergeRefs as P, FloatingPortal as k, FloatingOverlay as y, FloatingFocusManager as F } from "@floating-ui/react";
3
- import S from "clsx";
2
+ import { useFloating as _, useClick as C, useDismiss as E, useRole as x, useInteractions as D, useMergeRefs as O, FloatingPortal as R, FloatingOverlay as k, FloatingFocusManager as y } from "@floating-ui/react";
3
+ import F from "clsx";
4
4
  import * as o from "react";
5
5
  import { useId as h } from "react";
6
6
  const I = o.createContext(null);
7
- function D({
7
+ function L({
8
8
  initialOpen: n = !1,
9
9
  open: i,
10
10
  onOpenChange: t
11
11
  } = {}) {
12
- const [e, r] = o.useState(n), [s, l] = o.useState(), [c, b] = o.useState(), u = i ?? e, f = t ?? r, p = E({
12
+ const [e, r] = o.useState(n), [s, l] = o.useState(), [c, b] = o.useState(), u = i ?? e, f = t ?? r, p = _({
13
13
  open: u,
14
14
  onOpenChange: f
15
- }), m = p.context, w = _(m, {
15
+ }), m = p.context, M = C(m, {
16
16
  enabled: i == null
17
- }), M = C(m, {
17
+ }), w = E(m, {
18
18
  outsidePress: !1,
19
19
  outsidePressEvent: "mousedown"
20
- }), v = R(m), g = x([w, M, v]);
20
+ }), v = x(m), g = D([M, w, v]);
21
21
  return o.useMemo(
22
22
  () => ({
23
23
  open: u,
@@ -38,22 +38,22 @@ const d = () => {
38
38
  throw new Error("Modal components must be wrapped in <Modal />");
39
39
  return n;
40
40
  };
41
- function $({
41
+ function T({
42
42
  children: n,
43
43
  ...i
44
44
  }) {
45
- const t = D(i);
45
+ const t = L(i);
46
46
  return /* @__PURE__ */ a(I.Provider, { value: t, children: n });
47
47
  }
48
- const V = o.forwardRef(function(n, i) {
49
- const { context: t, ...e } = d(), r = P([e.refs.setFloating, i]);
48
+ const A = o.forwardRef(function(n, i) {
49
+ const { context: t, ...e } = d(), r = O([e.refs.setFloating, i]);
50
50
  if (!t.open)
51
51
  return null;
52
- const { overlayBackground: s, ...l } = n, c = S("grid place-items-center", {
52
+ const { overlayBackground: s, ...l } = n, c = F("grid place-items-center", {
53
53
  [`${s}`]: s,
54
54
  "bg-black sm:bg-black/[.8]": !s
55
55
  });
56
- return /* @__PURE__ */ a(k, { children: /* @__PURE__ */ a(y, { className: c, lockScroll: !0, children: /* @__PURE__ */ a(F, { context: t, children: /* @__PURE__ */ a(
56
+ return /* @__PURE__ */ a(R, { children: /* @__PURE__ */ a(k, { className: c, lockScroll: !0, children: /* @__PURE__ */ a(y, { context: t, children: /* @__PURE__ */ a(
57
57
  "div",
58
58
  {
59
59
  ref: r,
@@ -63,10 +63,10 @@ const V = o.forwardRef(function(n, i) {
63
63
  children: l.children
64
64
  }
65
65
  ) }) }) });
66
- }), A = o.forwardRef(function({ children: n, ...i }, t) {
66
+ }), U = o.forwardRef(function({ children: n, ...i }, t) {
67
67
  const { setLabelId: e } = d(), r = h();
68
68
  return o.useLayoutEffect(() => (e(r), () => e(void 0)), [r, e]), /* @__PURE__ */ a("h1", { ...i, ref: t, id: r, children: n });
69
- }), U = o.forwardRef(function({ children: n, ...i }, t) {
69
+ }), V = o.forwardRef(function({ children: n, ...i }, t) {
70
70
  const { setDescriptionId: e } = d(), r = h();
71
71
  return o.useLayoutEffect(() => (e(r), () => e(void 0)), [r, e]), /* @__PURE__ */ a("div", { ...i, ref: t, id: r, children: n });
72
72
  }), j = o.forwardRef(function(n, i) {
@@ -78,22 +78,22 @@ const V = o.forwardRef(function(n, i) {
78
78
  }) });
79
79
  });
80
80
  /*!
81
- @versini/ui-private v1.8.0
81
+ @versini/ui-modal v1.0.0
82
82
  © 2024 gizmette.com
83
83
  */
84
84
  try {
85
- window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
86
- version: "1.8.0",
87
- buildTime: "12/25/2024 12:30 PM EST",
85
+ window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
86
+ version: "1.0.0",
87
+ buildTime: "12/25/2024 03:12 PM EST",
88
88
  homepage: "https://github.com/aversini/ui-components",
89
89
  license: "MIT"
90
90
  });
91
91
  } catch {
92
92
  }
93
93
  export {
94
- $ as Modal,
94
+ T as Modal,
95
95
  j as ModalClose,
96
- V as ModalContent,
97
- U as ModalDescription,
98
- A as ModalHeading
96
+ A as ModalContent,
97
+ V as ModalDescription,
98
+ U as ModalHeading
99
99
  };
package/dist/index.js CHANGED
@@ -2,13 +2,13 @@ import { jsx as n, jsxs as y, Fragment as U } from "react/jsx-runtime";
2
2
  import o from "clsx";
3
3
  import E, { lazy as A, useRef as z, useEffect as O, Suspense as j } from "react";
4
4
  /*!
5
- @versini/ui-panel v1.1.4
5
+ @versini/ui-panel v1.2.0
6
6
  © 2024 gizmette.com
7
7
  */
8
8
  try {
9
9
  window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
10
- version: "1.1.4",
11
- buildTime: "12/25/2024 12:30 PM EST",
10
+ version: "1.2.0",
11
+ buildTime: "12/25/2024 03:12 PM EST",
12
12
  homepage: "https://github.com/aversini/ui-components",
13
13
  license: "MIT"
14
14
  });
@@ -22,7 +22,7 @@ const M = "av-messagebox", C = "av-panel", R = "av-button";
22
22
  try {
23
23
  window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
24
24
  version: "1.0.0",
25
- buildTime: "12/25/2024 12:30 PM EST",
25
+ buildTime: "12/25/2024 03:12 PM EST",
26
26
  homepage: "https://github.com/aversini/ui-components",
27
27
  license: "MIT"
28
28
  });
@@ -308,7 +308,7 @@ L.displayName = "ButtonIcon";
308
308
  try {
309
309
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
310
310
  version: "1.4.0",
311
- buildTime: "12/25/2024 12:30 PM EST",
311
+ buildTime: "12/25/2024 03:12 PM EST",
312
312
  homepage: "https://github.com/aversini/ui-components",
313
313
  license: "MIT"
314
314
  });
@@ -399,7 +399,7 @@ Q.displayName = "ButtonSort";
399
399
  try {
400
400
  window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
401
401
  version: "1.0.0",
402
- buildTime: "12/25/2024 12:30 PM EST",
402
+ buildTime: "12/25/2024 03:12 PM EST",
403
403
  homepage: "https://github.com/aversini/ui-components",
404
404
  license: "MIT"
405
405
  });
@@ -455,7 +455,7 @@ const Z = (e) => {
455
455
  try {
456
456
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
457
457
  version: "1.0.0",
458
- buildTime: "12/25/2024 12:30 PM EST",
458
+ buildTime: "12/25/2024 03:12 PM EST",
459
459
  homepage: "https://github.com/aversini/ui-components",
460
460
  license: "MIT"
461
461
  });
@@ -488,7 +488,7 @@ const te = ({
488
488
  try {
489
489
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
490
490
  version: "1.18.0",
491
- buildTime: "12/25/2024 12:30 PM EST",
491
+ buildTime: "12/25/2024 03:12 PM EST",
492
492
  homepage: "https://github.com/aversini/ui-components",
493
493
  license: "MIT"
494
494
  });
@@ -515,7 +515,7 @@ const p = "panel", x = "messagebox", re = ({
515
515
  header: "sm:p-4 mb-0 p-2",
516
516
  close: "sm:p-4 p-2"
517
517
  }), k = (e) => A(
518
- () => import("./chunks/index.DisnC3NY.js").then((r) => ({
518
+ () => import("./chunks/index.B81Wx2iM.js").then((r) => ({
519
519
  default: r[e]
520
520
  }))
521
521
  ), ae = k("Modal"), oe = k("ModalClose"), ie = k("ModalContent"), ne = k("ModalDescription"), le = k("ModalHeading"), ge = ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-panel",
3
- "version": "1.1.4",
3
+ "version": "1.2.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -41,12 +41,12 @@
41
41
  "@tailwindcss/typography": "0.5.15",
42
42
  "@versini/ui-button": "1.4.0",
43
43
  "@versini/ui-icons": "1.18.0",
44
- "@versini/ui-private": "1.8.0",
44
+ "@versini/ui-modal": "1.0.0",
45
45
  "clsx": "2.1.1",
46
46
  "tailwindcss": "3.4.17"
47
47
  },
48
48
  "sideEffects": [
49
49
  "**/*.css"
50
50
  ],
51
- "gitHead": "51f74738512b2962734cd6087ded58d17ef0f8d4"
51
+ "gitHead": "df31cd91b38618ed94fcfd78f916f5d6cfb22aaa"
52
52
  }