@versini/ui-panel 1.4.2 → 1.4.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.
- package/dist/index.js +33 -33
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -4,19 +4,19 @@ import V, { useRef as _, useLayoutEffect as F, useMemo as q, useState as Z, useE
|
|
|
4
4
|
import i from "clsx";
|
|
5
5
|
import { useFloating as ce, useClick as se, useDismiss as de, useRole as ue, useInteractions as me, useMergeRefs as ge, FloatingPortal as he, FloatingOverlay as be, FloatingFocusManager as fe } from "@floating-ui/react";
|
|
6
6
|
/*!
|
|
7
|
-
@versini/ui-panel v1.4.
|
|
7
|
+
@versini/ui-panel v1.4.4
|
|
8
8
|
© 2025 gizmette.com
|
|
9
9
|
*/
|
|
10
10
|
try {
|
|
11
11
|
window.__VERSINI_UI_PANEL__ || (window.__VERSINI_UI_PANEL__ = {
|
|
12
|
-
version: "1.4.
|
|
13
|
-
buildTime: "03/
|
|
12
|
+
version: "1.4.4",
|
|
13
|
+
buildTime: "03/14/2025 05:17 PM EDT",
|
|
14
14
|
homepage: "https://github.com/aversini/ui-components",
|
|
15
15
|
license: "MIT"
|
|
16
16
|
});
|
|
17
17
|
} catch {
|
|
18
18
|
}
|
|
19
|
-
const U = "av-messagebox", j = "av-panel", Y = "av-button",
|
|
19
|
+
const U = "av-messagebox", j = "av-panel", Y = "av-button", B = "icon", J = "button", P = "link", ve = ({
|
|
20
20
|
type: e,
|
|
21
21
|
size: t,
|
|
22
22
|
labelRight: r,
|
|
@@ -33,7 +33,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
33
33
|
[d]: t === "medium",
|
|
34
34
|
[s]: t === "large"
|
|
35
35
|
});
|
|
36
|
-
case
|
|
36
|
+
case B:
|
|
37
37
|
return i("flex items-center", {
|
|
38
38
|
"justify-center": n === "center",
|
|
39
39
|
"justify-start": n === "left",
|
|
@@ -68,7 +68,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
68
68
|
[o]: t === "medium",
|
|
69
69
|
[l]: t === "large"
|
|
70
70
|
});
|
|
71
|
-
case
|
|
71
|
+
case B:
|
|
72
72
|
return i({
|
|
73
73
|
[n]: t === "small" && (r || a),
|
|
74
74
|
[o]: t === "medium" && (r || a),
|
|
@@ -78,14 +78,14 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
78
78
|
}, pe = ({
|
|
79
79
|
mode: e,
|
|
80
80
|
noBackground: t,
|
|
81
|
-
|
|
81
|
+
truncate: r,
|
|
82
82
|
variant: a
|
|
83
83
|
}) => {
|
|
84
84
|
if (t)
|
|
85
85
|
return "not-prose";
|
|
86
86
|
if (a === "primary")
|
|
87
87
|
return i("not-prose", {
|
|
88
|
-
truncate:
|
|
88
|
+
truncate: r,
|
|
89
89
|
"text-copy-light": e === "dark" || e === "system",
|
|
90
90
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
91
91
|
"dark:text-copy-lighter": e === "system",
|
|
@@ -93,7 +93,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
93
93
|
});
|
|
94
94
|
if (a === "secondary")
|
|
95
95
|
return i("not-prose", {
|
|
96
|
-
truncate:
|
|
96
|
+
truncate: r,
|
|
97
97
|
"text-copy-light": e === "light" || e === "system",
|
|
98
98
|
"text-copy-lighter": e === "dark" || e === "alt-system",
|
|
99
99
|
"dark:text-copy-lighter": e === "alt-system",
|
|
@@ -101,7 +101,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
101
101
|
});
|
|
102
102
|
if (a === "danger")
|
|
103
103
|
return i("not-prose", {
|
|
104
|
-
truncate:
|
|
104
|
+
truncate: r,
|
|
105
105
|
"text-copy-light": e === "dark" || e === "system",
|
|
106
106
|
"text-copy-lighter": e === "light" || e === "alt-system",
|
|
107
107
|
"dark:text-copy-lighter": e === "system",
|
|
@@ -109,7 +109,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
109
109
|
});
|
|
110
110
|
if (a === "selected")
|
|
111
111
|
return i("not-prose text-copy-lighter", {
|
|
112
|
-
truncate:
|
|
112
|
+
truncate: r
|
|
113
113
|
});
|
|
114
114
|
}, ke = ({
|
|
115
115
|
mode: e,
|
|
@@ -274,7 +274,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
274
274
|
labelLeft: f,
|
|
275
275
|
noBackground: g,
|
|
276
276
|
variant: u,
|
|
277
|
-
|
|
277
|
+
truncate: h,
|
|
278
278
|
align: v,
|
|
279
279
|
radius: I,
|
|
280
280
|
animated: y
|
|
@@ -284,7 +284,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
284
284
|
mode: a,
|
|
285
285
|
variant: u,
|
|
286
286
|
noBackground: g,
|
|
287
|
-
|
|
287
|
+
truncate: h
|
|
288
288
|
}),
|
|
289
289
|
ke({ mode: a, noBackground: g, variant: u }),
|
|
290
290
|
xe({ radius: I }),
|
|
@@ -306,7 +306,7 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
306
306
|
"disabled:cursor-not-allowed disabled:opacity-50": o
|
|
307
307
|
},
|
|
308
308
|
i({
|
|
309
|
-
"transition-[width] duration-300 ease-in-out": e ===
|
|
309
|
+
"transition-[width] duration-300 ease-in-out": e === B && y
|
|
310
310
|
}),
|
|
311
311
|
t
|
|
312
312
|
)), Re = (e, t, r) => {
|
|
@@ -326,13 +326,13 @@ const U = "av-messagebox", j = "av-panel", Y = "av-button", T = "icon", J = "but
|
|
|
326
326
|
);
|
|
327
327
|
});
|
|
328
328
|
K.displayName = "BaseButton";
|
|
329
|
-
function
|
|
329
|
+
function Be() {
|
|
330
330
|
const e = _(!1);
|
|
331
331
|
return R(() => (e.current = !0, () => {
|
|
332
332
|
e.current = !1;
|
|
333
333
|
}), []), le(() => e.current, []);
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Me(e) {
|
|
336
336
|
return q(() => e.every((t) => t == null) ? () => {
|
|
337
337
|
} : (t) => {
|
|
338
338
|
e.forEach((r) => {
|
|
@@ -340,7 +340,7 @@ function Be(e) {
|
|
|
340
340
|
});
|
|
341
341
|
}, e);
|
|
342
342
|
}
|
|
343
|
-
const
|
|
343
|
+
const Te = {
|
|
344
344
|
x: 0,
|
|
345
345
|
y: 0,
|
|
346
346
|
width: 0,
|
|
@@ -351,7 +351,7 @@ const Me = {
|
|
|
351
351
|
right: 0
|
|
352
352
|
};
|
|
353
353
|
function O(e) {
|
|
354
|
-
const t =
|
|
354
|
+
const t = Be(), r = _(0), a = _(null), [n, o] = Z(Te), l = q(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
355
355
|
const s = d[0];
|
|
356
356
|
s && (cancelAnimationFrame(r.current), r.current = requestAnimationFrame(() => {
|
|
357
357
|
a.current && t() && o(s.contentRect);
|
|
@@ -400,7 +400,7 @@ const Le = {
|
|
|
400
400
|
...te
|
|
401
401
|
}, ae) => {
|
|
402
402
|
const oe = Ce({
|
|
403
|
-
type:
|
|
403
|
+
type: B,
|
|
404
404
|
mode: r,
|
|
405
405
|
focusMode: a,
|
|
406
406
|
fullWidth: n,
|
|
@@ -416,13 +416,13 @@ const Le = {
|
|
|
416
416
|
radius: y,
|
|
417
417
|
variant: ee,
|
|
418
418
|
animated: k
|
|
419
|
-
}), ne = Ee({ mode: r, raw: d, iconClassName: re }), $ = Se({ animated: k }), [p,
|
|
419
|
+
}), ne = Ee({ mode: r, raw: d, iconClassName: re }), $ = Se({ animated: k }), [p, T] = O(), [x, L] = O(), [E, D] = O(), A = _(0), w = _(null), ie = Me([ae, w]);
|
|
420
420
|
return F(() => {
|
|
421
421
|
E && E.current && k && (A.current = D.width + Ae[g] + (s ? 0 : Oe));
|
|
422
422
|
}, [D, E, g, s, k]), F(() => {
|
|
423
|
-
w && w.current && k && (u && p &&
|
|
423
|
+
w && w.current && k && (u && p && T.width > 0 ? (p.current && (p.current.style.opacity = "100"), w.current.style.width = `${T.width + A.current}px`) : h && L.width > 0 ? (x.current && (x.current.style.opacity = "100"), w.current.style.width = `${L.width + A.current}px`) : (p.current && (p.current.style.opacity = "0"), x.current && (x.current.style.opacity = "0"), w.current.style.width = `${Le[g]}px`));
|
|
424
424
|
}, [
|
|
425
|
-
|
|
425
|
+
T,
|
|
426
426
|
u,
|
|
427
427
|
p,
|
|
428
428
|
L,
|
|
@@ -471,13 +471,13 @@ const Le = {
|
|
|
471
471
|
}) => /* @__PURE__ */ c("span", { ref: e, className: t, children: r && /* @__PURE__ */ c("span", { className: a, children: r }) });
|
|
472
472
|
z.displayName = "ButtonIcon";
|
|
473
473
|
/*!
|
|
474
|
-
@versini/ui-button
|
|
474
|
+
@versini/ui-button v5.0.1
|
|
475
475
|
© 2025 gizmette.com
|
|
476
476
|
*/
|
|
477
477
|
try {
|
|
478
478
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
479
|
-
version: "
|
|
480
|
-
buildTime: "03/
|
|
479
|
+
version: "5.0.1",
|
|
480
|
+
buildTime: "03/14/2025 05:17 PM EDT",
|
|
481
481
|
homepage: "https://github.com/aversini/ui-components",
|
|
482
482
|
license: "MIT"
|
|
483
483
|
});
|
|
@@ -631,7 +631,7 @@ function $e({
|
|
|
631
631
|
[m, f, y, g, o, d]
|
|
632
632
|
);
|
|
633
633
|
}
|
|
634
|
-
const
|
|
634
|
+
const M = () => {
|
|
635
635
|
const e = b.useContext(Q);
|
|
636
636
|
if (e == null)
|
|
637
637
|
throw new Error("Modal components must be wrapped in <Modal />");
|
|
@@ -645,7 +645,7 @@ function De({
|
|
|
645
645
|
return /* @__PURE__ */ c(Q.Provider, { value: r, children: e });
|
|
646
646
|
}
|
|
647
647
|
const Fe = b.forwardRef(function(e, t) {
|
|
648
|
-
const { context: r, ...a } =
|
|
648
|
+
const { context: r, ...a } = M(), n = ge([a.refs.setFloating, t]);
|
|
649
649
|
if (!r.open)
|
|
650
650
|
return null;
|
|
651
651
|
const { overlayBackground: o, ...l } = e, d = i("grid place-items-center", {
|
|
@@ -663,13 +663,13 @@ const Fe = b.forwardRef(function(e, t) {
|
|
|
663
663
|
}
|
|
664
664
|
) }) }) });
|
|
665
665
|
}), Ue = b.forwardRef(function({ children: e, ...t }, r) {
|
|
666
|
-
const { setLabelId: a } =
|
|
666
|
+
const { setLabelId: a } = M(), n = H();
|
|
667
667
|
return b.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ c("h1", { ...t, ref: r, id: n, children: e });
|
|
668
668
|
}), je = b.forwardRef(function({ children: e, ...t }, r) {
|
|
669
|
-
const { setDescriptionId: a } =
|
|
669
|
+
const { setDescriptionId: a } = M(), n = H();
|
|
670
670
|
return b.useLayoutEffect(() => (a(n), () => a(void 0)), [n, a]), /* @__PURE__ */ c("div", { ...t, ref: r, id: n, children: e });
|
|
671
671
|
}), Ye = b.forwardRef(function(e, t) {
|
|
672
|
-
const { setOpen: r } =
|
|
672
|
+
const { setOpen: r } = M(), { trigger: a, className: n, ...o } = e, l = b.useCallback(() => r(!1), [r]);
|
|
673
673
|
return /* @__PURE__ */ c("div", { className: n, children: b.cloneElement(a, {
|
|
674
674
|
ref: t,
|
|
675
675
|
onClick: l,
|
|
@@ -677,13 +677,13 @@ const Fe = b.forwardRef(function(e, t) {
|
|
|
677
677
|
}) });
|
|
678
678
|
});
|
|
679
679
|
/*!
|
|
680
|
-
@versini/ui-modal v1.2.
|
|
680
|
+
@versini/ui-modal v1.2.13
|
|
681
681
|
© 2025 gizmette.com
|
|
682
682
|
*/
|
|
683
683
|
try {
|
|
684
684
|
window.__VERSINI_UI_MODAL__ || (window.__VERSINI_UI_MODAL__ = {
|
|
685
|
-
version: "1.2.
|
|
686
|
-
buildTime: "03/
|
|
685
|
+
version: "1.2.13",
|
|
686
|
+
buildTime: "03/14/2025 05:17 PM EDT",
|
|
687
687
|
homepage: "https://github.com/aversini/ui-components",
|
|
688
688
|
license: "MIT"
|
|
689
689
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-panel",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@tailwindcss/typography": "0.5.16",
|
|
43
|
-
"@versini/ui-button": "
|
|
43
|
+
"@versini/ui-button": "5.0.1",
|
|
44
44
|
"@versini/ui-icons": "4.8.1",
|
|
45
|
-
"@versini/ui-modal": "1.2.
|
|
45
|
+
"@versini/ui-modal": "1.2.13",
|
|
46
46
|
"clsx": "2.1.1",
|
|
47
47
|
"tailwindcss": "3.4.17"
|
|
48
48
|
},
|
|
49
49
|
"sideEffects": [
|
|
50
50
|
"**/*.css"
|
|
51
51
|
],
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "37955472858096264438083d812d3b12585b0253"
|
|
53
53
|
}
|