@versini/ui-bubble 4.0.1 → 4.0.3
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 +31 -31
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as s, jsxs as x, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import V, { useRef as B, useLayoutEffect as
|
|
2
|
+
import V, { useRef as B, useLayoutEffect as $, useMemo as P, useState as D, useEffect as L, useCallback as ee } from "react";
|
|
3
3
|
import o from "clsx";
|
|
4
4
|
/*!
|
|
5
|
-
@versini/ui-bubble v4.0.
|
|
5
|
+
@versini/ui-bubble v4.0.3
|
|
6
6
|
© 2025 gizmette.com
|
|
7
7
|
*/
|
|
8
8
|
try {
|
|
9
9
|
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
10
|
-
version: "4.0.
|
|
11
|
-
buildTime: "03/19/2025
|
|
10
|
+
version: "4.0.3",
|
|
11
|
+
buildTime: "03/19/2025 06:10 PM EDT",
|
|
12
12
|
homepage: "https://github.com/aversini/ui-components",
|
|
13
13
|
license: "MIT"
|
|
14
14
|
});
|
|
15
15
|
} catch {
|
|
16
16
|
}
|
|
17
|
-
const I = "av-bubble",
|
|
17
|
+
const I = "av-bubble", A = "av-button", C = "icon", q = "button", S = "link", te = ({
|
|
18
18
|
type: e,
|
|
19
19
|
size: r,
|
|
20
20
|
labelRight: t,
|
|
@@ -24,8 +24,8 @@ const I = "av-bubble", $ = "av-button", C = "icon", P = "button", M = "link", te
|
|
|
24
24
|
}) => {
|
|
25
25
|
const n = "max-h-8 py-0 px-2", c = "max-h-9 h-8 px-3", d = "max-h-12 py-2 px-4";
|
|
26
26
|
switch (e) {
|
|
27
|
-
case
|
|
28
|
-
case
|
|
27
|
+
case q:
|
|
28
|
+
case S:
|
|
29
29
|
return o({
|
|
30
30
|
[n]: r === "small",
|
|
31
31
|
[c]: r === "medium",
|
|
@@ -58,10 +58,10 @@ const I = "av-bubble", $ = "av-button", C = "icon", P = "button", M = "link", te
|
|
|
58
58
|
}) => {
|
|
59
59
|
const l = "text-sm font-medium", i = "text-base font-medium", n = "text-lg font-medium";
|
|
60
60
|
switch (e) {
|
|
61
|
-
case
|
|
62
|
-
case
|
|
61
|
+
case q:
|
|
62
|
+
case S:
|
|
63
63
|
return o({
|
|
64
|
-
"text-center": e ===
|
|
64
|
+
"text-center": e === S,
|
|
65
65
|
[l]: r === "small",
|
|
66
66
|
[i]: r === "medium",
|
|
67
67
|
[n]: r === "large"
|
|
@@ -276,8 +276,8 @@ const I = "av-bubble", $ = "av-button", C = "icon", P = "button", M = "link", te
|
|
|
276
276
|
align: w,
|
|
277
277
|
radius: _,
|
|
278
278
|
animated: g
|
|
279
|
-
}) => (b || (b = "primary"), t ? o(
|
|
280
|
-
|
|
279
|
+
}) => (b || (b = "primary"), t ? o(A, r) : o(
|
|
280
|
+
A,
|
|
281
281
|
ae({
|
|
282
282
|
mode: a,
|
|
283
283
|
variant: b,
|
|
@@ -310,7 +310,7 @@ const I = "av-bubble", $ = "av-button", C = "icon", P = "button", M = "link", te
|
|
|
310
310
|
)), ge = (e, r, t) => {
|
|
311
311
|
var a;
|
|
312
312
|
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
313
|
-
},
|
|
313
|
+
}, F = V.forwardRef((e, r) => {
|
|
314
314
|
const { onClick: t, noInternalClick: a = !1, ...l } = e;
|
|
315
315
|
return /* @__PURE__ */ s(
|
|
316
316
|
"button",
|
|
@@ -323,7 +323,7 @@ const I = "av-bubble", $ = "av-button", C = "icon", P = "button", M = "link", te
|
|
|
323
323
|
}
|
|
324
324
|
);
|
|
325
325
|
});
|
|
326
|
-
|
|
326
|
+
F.displayName = "BaseButton";
|
|
327
327
|
function me() {
|
|
328
328
|
const e = B(!1);
|
|
329
329
|
return L(() => (e.current = !0, () => {
|
|
@@ -331,7 +331,7 @@ function me() {
|
|
|
331
331
|
}), []), ee(() => e.current, []);
|
|
332
332
|
}
|
|
333
333
|
function he(e) {
|
|
334
|
-
return
|
|
334
|
+
return P(() => e.every((r) => r == null) ? () => {
|
|
335
335
|
} : (r) => {
|
|
336
336
|
e.forEach((t) => {
|
|
337
337
|
typeof t == "function" ? t(r) : t != null && (t.current = r);
|
|
@@ -348,8 +348,8 @@ const fe = {
|
|
|
348
348
|
bottom: 0,
|
|
349
349
|
right: 0
|
|
350
350
|
};
|
|
351
|
-
function
|
|
352
|
-
const r = me(), t = B(0), a = B(null), [l, i] =
|
|
351
|
+
function M(e) {
|
|
352
|
+
const r = me(), t = B(0), a = B(null), [l, i] = D(fe), n = P(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
|
|
353
353
|
const d = c[0];
|
|
354
354
|
d && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
355
355
|
a.current && r() && i(d.contentRect);
|
|
@@ -414,10 +414,10 @@ const ve = {
|
|
|
414
414
|
radius: g,
|
|
415
415
|
variant: z,
|
|
416
416
|
animated: p
|
|
417
|
-
}), K = de({ mode: t, raw: c, iconClassName: W }), O = be({ animated: p }), [f, E] =
|
|
418
|
-
return
|
|
417
|
+
}), K = de({ mode: t, raw: c, iconClassName: W }), O = be({ animated: p }), [f, E] = M(), [y, R] = M(), [N, j] = M(), T = B(0), k = B(null), Q = he([Z, k]);
|
|
418
|
+
return $(() => {
|
|
419
419
|
N && N.current && p && (T.current = j.width + pe[u] + (d ? 0 : ye));
|
|
420
|
-
}, [j, N, u, d, p]),
|
|
420
|
+
}, [j, N, u, d, p]), $(() => {
|
|
421
421
|
k && k.current && p && (b && f && E.width > 0 ? (f.current && (f.current.style.opacity = "100"), k.current.style.width = `${E.width + T.current}px`) : m && R.width > 0 ? (y.current && (y.current.style.opacity = "100"), k.current.style.width = `${R.width + T.current}px`) : (f.current && (f.current.style.opacity = "0"), y.current && (y.current.style.opacity = "0"), k.current.style.width = `${ve[u]}px`));
|
|
422
422
|
}, [
|
|
423
423
|
E,
|
|
@@ -429,7 +429,7 @@ const ve = {
|
|
|
429
429
|
u,
|
|
430
430
|
p
|
|
431
431
|
]), /* @__PURE__ */ x(
|
|
432
|
-
|
|
432
|
+
F,
|
|
433
433
|
{
|
|
434
434
|
ref: Q,
|
|
435
435
|
className: J,
|
|
@@ -469,13 +469,13 @@ const ve = {
|
|
|
469
469
|
}) => /* @__PURE__ */ s("span", { ref: e, className: r, children: t && /* @__PURE__ */ s("span", { className: a, children: t }) });
|
|
470
470
|
U.displayName = "ButtonIcon";
|
|
471
471
|
/*!
|
|
472
|
-
@versini/ui-button v6.0.
|
|
472
|
+
@versini/ui-button v6.0.3
|
|
473
473
|
© 2025 gizmette.com
|
|
474
474
|
*/
|
|
475
475
|
try {
|
|
476
476
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
477
|
-
version: "6.0.
|
|
478
|
-
buildTime: "03/19/2025
|
|
477
|
+
version: "6.0.3",
|
|
478
|
+
buildTime: "03/19/2025 06:10 PM EDT",
|
|
479
479
|
homepage: "https://github.com/aversini/ui-components",
|
|
480
480
|
license: "MIT"
|
|
481
481
|
});
|
|
@@ -551,13 +551,13 @@ const G = ({
|
|
|
551
551
|
) });
|
|
552
552
|
};
|
|
553
553
|
/*!
|
|
554
|
-
@versini/ui-svgicon v4.
|
|
554
|
+
@versini/ui-svgicon v4.2.0
|
|
555
555
|
© 2025 gizmette.com
|
|
556
556
|
*/
|
|
557
557
|
try {
|
|
558
558
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
559
|
-
version: "4.
|
|
560
|
-
buildTime: "
|
|
559
|
+
version: "4.2.0",
|
|
560
|
+
buildTime: "03/19/2025 05:27 PM EDT",
|
|
561
561
|
homepage: "https://github.com/aversini/ui-components",
|
|
562
562
|
license: "MIT"
|
|
563
563
|
});
|
|
@@ -608,13 +608,13 @@ const xe = ({
|
|
|
608
608
|
}
|
|
609
609
|
);
|
|
610
610
|
/*!
|
|
611
|
-
@versini/ui-icons v4.8.
|
|
611
|
+
@versini/ui-icons v4.8.2
|
|
612
612
|
© 2025 gizmette.com
|
|
613
613
|
*/
|
|
614
614
|
try {
|
|
615
615
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
616
|
-
version: "4.8.
|
|
617
|
-
buildTime: "
|
|
616
|
+
version: "4.8.2",
|
|
617
|
+
buildTime: "03/19/2025 05:27 PM EDT",
|
|
618
618
|
homepage: "https://github.com/aversini/ui-components",
|
|
619
619
|
license: "MIT"
|
|
620
620
|
});
|
|
@@ -703,7 +703,7 @@ const _e = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
|
703
703
|
noMaxWidth: h = !1,
|
|
704
704
|
tail: v = !1
|
|
705
705
|
}) => {
|
|
706
|
-
const [u, b] =
|
|
706
|
+
const [u, b] = D(!1), m = Ce({
|
|
707
707
|
kind: r,
|
|
708
708
|
className: t,
|
|
709
709
|
contentClassName: a,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versini/ui-bubble",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Arno Versini",
|
|
6
6
|
"publishConfig": {
|
|
@@ -43,13 +43,13 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@tailwindcss/typography": "0.5.16",
|
|
46
|
-
"@versini/ui-button": "6.0.
|
|
47
|
-
"@versini/ui-icons": "4.8.
|
|
46
|
+
"@versini/ui-button": "6.0.3",
|
|
47
|
+
"@versini/ui-icons": "4.8.2",
|
|
48
48
|
"clsx": "2.1.1",
|
|
49
49
|
"tailwindcss": "4.0.14"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": [
|
|
52
52
|
"**/*.css"
|
|
53
53
|
],
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "b49e510e164843553df3b3dd194c17b7e122e986"
|
|
55
55
|
}
|