@versini/ui-bubble 5.0.7 → 6.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/Bubble/Bubble.js +118 -118
- package/dist/index.js +3 -3
- package/package.json +7 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import U, { useRef as N, useLayoutEffect as P, useEffect as M, useState as G, useMemo as W, useCallback as
|
|
1
|
+
import { jsx as c, jsxs as B } from "react/jsx-runtime";
|
|
2
|
+
import U, { useRef as N, useLayoutEffect as P, useEffect as M, useState as G, useMemo as W, useCallback as ae } from "react";
|
|
3
3
|
import o from "clsx";
|
|
4
|
-
const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link",
|
|
4
|
+
const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", ie = ({
|
|
5
5
|
type: e,
|
|
6
6
|
size: r,
|
|
7
7
|
labelRight: t,
|
|
@@ -9,14 +9,14 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
9
9
|
align: i,
|
|
10
10
|
animated: l
|
|
11
11
|
}) => {
|
|
12
|
-
const s = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3",
|
|
12
|
+
const s = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", u = "max-h-12 py-2 px-4";
|
|
13
13
|
switch (e) {
|
|
14
14
|
case Y:
|
|
15
15
|
case L:
|
|
16
16
|
return o({
|
|
17
17
|
[s]: r === "small",
|
|
18
18
|
[d]: r === "medium",
|
|
19
|
-
[
|
|
19
|
+
[u]: r === "large"
|
|
20
20
|
});
|
|
21
21
|
case j:
|
|
22
22
|
return o("flex items-center", {
|
|
@@ -37,7 +37,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
37
37
|
"h-12": r === "large" && l && (t || a)
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
|
-
},
|
|
40
|
+
}, oe = ({
|
|
41
41
|
type: e,
|
|
42
42
|
size: r,
|
|
43
43
|
labelRight: t,
|
|
@@ -60,7 +60,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
60
60
|
[s]: r === "large" && (t || a)
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
},
|
|
63
|
+
}, le = ({
|
|
64
64
|
mode: e,
|
|
65
65
|
noBackground: r,
|
|
66
66
|
truncate: t,
|
|
@@ -96,7 +96,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
96
96
|
return o("not-prose text-copy-lighter", {
|
|
97
97
|
truncate: t
|
|
98
98
|
});
|
|
99
|
-
},
|
|
99
|
+
}, se = ({
|
|
100
100
|
mode: e,
|
|
101
101
|
noBackground: r,
|
|
102
102
|
variant: t
|
|
@@ -132,7 +132,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
132
132
|
"rounded-full": e === "large",
|
|
133
133
|
"rounded-md": e === "medium",
|
|
134
134
|
"rounded-xs": e === "small"
|
|
135
|
-
}),
|
|
135
|
+
}), ne = ({
|
|
136
136
|
mode: e,
|
|
137
137
|
disabled: r,
|
|
138
138
|
variant: t
|
|
@@ -170,7 +170,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
170
170
|
});
|
|
171
171
|
if (t === "selected")
|
|
172
172
|
return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
|
|
173
|
-
},
|
|
173
|
+
}, de = ({
|
|
174
174
|
mode: e,
|
|
175
175
|
disabled: r,
|
|
176
176
|
variant: t
|
|
@@ -238,14 +238,14 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
238
238
|
});
|
|
239
239
|
if (t === "selected")
|
|
240
240
|
return "border border-border-selected-dark";
|
|
241
|
-
},
|
|
241
|
+
}, me = ({
|
|
242
242
|
focusMode: e
|
|
243
243
|
}) => o("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
|
|
244
244
|
"focus:outline-focus-dark": e === "dark",
|
|
245
245
|
"focus:outline-focus-light": e === "light",
|
|
246
246
|
"focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
|
|
247
247
|
"focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
|
|
248
|
-
}),
|
|
248
|
+
}), ge = ({
|
|
249
249
|
mode: e,
|
|
250
250
|
raw: r,
|
|
251
251
|
iconClassName: t,
|
|
@@ -272,11 +272,11 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
272
272
|
} : a === "selected" && (i = {
|
|
273
273
|
"text-copy-lighter": !0
|
|
274
274
|
}), o(i, t);
|
|
275
|
-
},
|
|
275
|
+
}, be = ({
|
|
276
276
|
animated: e
|
|
277
277
|
}) => o({
|
|
278
278
|
"transition-opacity duration-300 ease-in-out": e
|
|
279
|
-
}),
|
|
279
|
+
}), he = ({
|
|
280
280
|
type: e,
|
|
281
281
|
className: r,
|
|
282
282
|
raw: t,
|
|
@@ -285,26 +285,26 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
285
285
|
disabled: l,
|
|
286
286
|
fullWidth: s,
|
|
287
287
|
size: d,
|
|
288
|
-
noBorder:
|
|
288
|
+
noBorder: u,
|
|
289
289
|
labelRight: y,
|
|
290
290
|
labelLeft: k,
|
|
291
|
-
noBackground:
|
|
292
|
-
variant:
|
|
291
|
+
noBackground: n,
|
|
292
|
+
variant: m,
|
|
293
293
|
truncate: g,
|
|
294
294
|
align: _,
|
|
295
295
|
radius: I,
|
|
296
296
|
animated: b
|
|
297
|
-
}) => (
|
|
297
|
+
}) => (m || (m = "primary"), t ? o(q, r) : o(
|
|
298
298
|
q,
|
|
299
|
-
|
|
299
|
+
le({
|
|
300
300
|
mode: a,
|
|
301
|
-
variant:
|
|
302
|
-
noBackground:
|
|
301
|
+
variant: m,
|
|
302
|
+
noBackground: n,
|
|
303
303
|
truncate: g
|
|
304
304
|
}),
|
|
305
|
-
|
|
305
|
+
se({ mode: a, noBackground: n, variant: m }),
|
|
306
306
|
ce({ radius: I }),
|
|
307
|
-
|
|
307
|
+
ie({
|
|
308
308
|
type: e,
|
|
309
309
|
size: d,
|
|
310
310
|
labelRight: y,
|
|
@@ -312,11 +312,11 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
312
312
|
align: _,
|
|
313
313
|
animated: b
|
|
314
314
|
}),
|
|
315
|
-
|
|
316
|
-
ue({ mode: a, variant:
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
315
|
+
oe({ type: e, size: d, labelRight: y, labelLeft: k }),
|
|
316
|
+
ue({ mode: a, variant: m, noBorder: u }),
|
|
317
|
+
me({ focusMode: i }),
|
|
318
|
+
ne({ mode: a, variant: m, disabled: l }),
|
|
319
|
+
de({ mode: a, variant: m, disabled: l }),
|
|
320
320
|
{
|
|
321
321
|
"w-full": s,
|
|
322
322
|
"disabled:cursor-not-allowed disabled:opacity-50": l
|
|
@@ -325,29 +325,29 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
|
|
|
325
325
|
"transition-[width] duration-300 ease-in": b
|
|
326
326
|
}),
|
|
327
327
|
r
|
|
328
|
-
)),
|
|
328
|
+
)), fe = (e, r, t) => {
|
|
329
329
|
!r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
|
|
330
330
|
}, J = U.forwardRef((e, r) => {
|
|
331
331
|
const { onClick: t, noInternalClick: a = !1, ...i } = e;
|
|
332
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ c(
|
|
333
333
|
"button",
|
|
334
334
|
{
|
|
335
335
|
ref: r,
|
|
336
336
|
onClick: (l) => {
|
|
337
|
-
|
|
337
|
+
fe(l, a, t);
|
|
338
338
|
},
|
|
339
339
|
...i
|
|
340
340
|
}
|
|
341
341
|
);
|
|
342
342
|
});
|
|
343
343
|
J.displayName = "BaseButton";
|
|
344
|
-
function
|
|
344
|
+
function ye() {
|
|
345
345
|
const e = N(!1);
|
|
346
346
|
return M(() => (e.current = !0, () => {
|
|
347
347
|
e.current = !1;
|
|
348
|
-
}), []),
|
|
348
|
+
}), []), ae(() => e.current, []);
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function ve(e) {
|
|
351
351
|
return W(() => e.every((r) => r == null) ? () => {
|
|
352
352
|
} : (r) => {
|
|
353
353
|
e.forEach((t) => {
|
|
@@ -355,7 +355,7 @@ function pe(e) {
|
|
|
355
355
|
});
|
|
356
356
|
}, [...e]);
|
|
357
357
|
}
|
|
358
|
-
const
|
|
358
|
+
const pe = {
|
|
359
359
|
x: 0,
|
|
360
360
|
y: 0,
|
|
361
361
|
width: 0,
|
|
@@ -366,10 +366,10 @@ const ke = {
|
|
|
366
366
|
right: 0
|
|
367
367
|
};
|
|
368
368
|
function O(e) {
|
|
369
|
-
const r =
|
|
370
|
-
const
|
|
371
|
-
|
|
372
|
-
a.current && r() && l(
|
|
369
|
+
const r = ye(), t = N(0), a = N(null), [i, l] = G(pe), s = W(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
|
|
370
|
+
const u = d[0];
|
|
371
|
+
u && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
|
|
372
|
+
a.current && r() && l(u.contentRect);
|
|
373
373
|
}));
|
|
374
374
|
}), [r]);
|
|
375
375
|
return M(() => (a.current && s?.observe(a.current, e), () => {
|
|
@@ -383,14 +383,14 @@ const z = {
|
|
|
383
383
|
// w-8
|
|
384
384
|
large: 48
|
|
385
385
|
// w-12
|
|
386
|
-
},
|
|
386
|
+
}, ke = {
|
|
387
387
|
small: 16,
|
|
388
388
|
// px-2 x 2
|
|
389
389
|
medium: 24,
|
|
390
390
|
// px-3 x 2
|
|
391
391
|
large: 32
|
|
392
392
|
// px-4 x 2
|
|
393
|
-
},
|
|
393
|
+
}, xe = 2, we = 300, A = U.forwardRef(
|
|
394
394
|
({
|
|
395
395
|
children: e,
|
|
396
396
|
disabled: r = !1,
|
|
@@ -400,11 +400,11 @@ const z = {
|
|
|
400
400
|
className: l,
|
|
401
401
|
type: s = "button",
|
|
402
402
|
raw: d = !1,
|
|
403
|
-
noBorder:
|
|
403
|
+
noBorder: u = !1,
|
|
404
404
|
"aria-label": y,
|
|
405
405
|
label: k,
|
|
406
|
-
size:
|
|
407
|
-
labelRight:
|
|
406
|
+
size: n = "medium",
|
|
407
|
+
labelRight: m,
|
|
408
408
|
labelLeft: g,
|
|
409
409
|
noBackground: _ = !1,
|
|
410
410
|
align: I = "center",
|
|
@@ -414,7 +414,7 @@ const z = {
|
|
|
414
414
|
animated: v = !1,
|
|
415
415
|
...Q
|
|
416
416
|
}, X) => {
|
|
417
|
-
const Z =
|
|
417
|
+
const Z = he({
|
|
418
418
|
type: j,
|
|
419
419
|
mode: t,
|
|
420
420
|
focusMode: a,
|
|
@@ -422,37 +422,37 @@ const z = {
|
|
|
422
422
|
disabled: r,
|
|
423
423
|
raw: d,
|
|
424
424
|
className: l,
|
|
425
|
-
noBorder:
|
|
426
|
-
size:
|
|
427
|
-
labelRight:
|
|
425
|
+
noBorder: u,
|
|
426
|
+
size: n,
|
|
427
|
+
labelRight: m,
|
|
428
428
|
labelLeft: g,
|
|
429
429
|
noBackground: _,
|
|
430
430
|
align: I,
|
|
431
431
|
radius: b,
|
|
432
432
|
variant: C,
|
|
433
433
|
animated: v
|
|
434
|
-
}), ee =
|
|
434
|
+
}), ee = ge({ mode: t, raw: d, iconClassName: T, variant: C }), H = be({ animated: v }), te = "flex items-center justify-center relative w-full h-full overflow-hidden", [h, $] = O(), [f, S] = O(), [E, F] = O(), V = N(0), p = N(null), x = N(null), re = ve([X, p]);
|
|
435
435
|
return P(() => {
|
|
436
|
-
E && E.current && v && (V.current = F.width +
|
|
437
|
-
}, [F, E,
|
|
436
|
+
E && E.current && v && (V.current = F.width + ke[n] + (u ? 0 : xe), p.current && !p.current.style.width && (p.current.style.width = `${z[n]}px`));
|
|
437
|
+
}, [F, E, n, u, v]), P(() => {
|
|
438
438
|
if (p && p.current && v) {
|
|
439
|
-
let w = z[
|
|
440
|
-
|
|
441
|
-
h.current &&
|
|
442
|
-
},
|
|
439
|
+
let w = z[n];
|
|
440
|
+
m && h && $.width > 0 ? w = $.width + V.current : g && f && S.width > 0 && (w = S.width + V.current), x.current && clearTimeout(x.current), w !== parseInt(p.current.style.width || "0", 10) && (h.current && (h.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"), p.current.style.width = `${w}px`, w > z[n] && (x.current = setTimeout(() => {
|
|
441
|
+
h.current && m && (h.current.style.opacity = "1"), f.current && g && (f.current.style.opacity = "1"), x.current = null;
|
|
442
|
+
}, we * 0.8))), w === z[n] && (h.current && (h.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"));
|
|
443
443
|
}
|
|
444
444
|
}, [
|
|
445
445
|
$,
|
|
446
|
-
|
|
446
|
+
m,
|
|
447
447
|
h,
|
|
448
448
|
S,
|
|
449
449
|
g,
|
|
450
450
|
f,
|
|
451
|
-
|
|
451
|
+
n,
|
|
452
452
|
v
|
|
453
453
|
]), M(() => () => {
|
|
454
454
|
x.current && clearTimeout(x.current);
|
|
455
|
-
}, []), /* @__PURE__ */
|
|
455
|
+
}, []), /* @__PURE__ */ c(
|
|
456
456
|
J,
|
|
457
457
|
{
|
|
458
458
|
ref: re,
|
|
@@ -462,23 +462,23 @@ const z = {
|
|
|
462
462
|
"aria-label": y || k,
|
|
463
463
|
...Q,
|
|
464
464
|
children: /* @__PURE__ */ B("div", { className: te, children: [
|
|
465
|
-
/* @__PURE__ */
|
|
465
|
+
/* @__PURE__ */ c(
|
|
466
466
|
D,
|
|
467
467
|
{
|
|
468
468
|
label: g,
|
|
469
469
|
labelRef: f,
|
|
470
|
-
labelClass:
|
|
470
|
+
labelClass: H,
|
|
471
471
|
labelInnerClass: "pr-2",
|
|
472
472
|
initiallyHidden: v
|
|
473
473
|
}
|
|
474
474
|
),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ c("span", { ref: E, className: ee, children: e }),
|
|
476
|
+
/* @__PURE__ */ c(
|
|
477
477
|
D,
|
|
478
478
|
{
|
|
479
|
-
label:
|
|
479
|
+
label: m,
|
|
480
480
|
labelRef: h,
|
|
481
|
-
labelClass:
|
|
481
|
+
labelClass: H,
|
|
482
482
|
labelInnerClass: "pl-2",
|
|
483
483
|
initiallyHidden: v
|
|
484
484
|
}
|
|
@@ -493,30 +493,30 @@ const z = {
|
|
|
493
493
|
label: t,
|
|
494
494
|
labelInnerClass: a,
|
|
495
495
|
initiallyHidden: i = !1
|
|
496
|
-
}) => /* @__PURE__ */
|
|
496
|
+
}) => /* @__PURE__ */ c(
|
|
497
497
|
"span",
|
|
498
498
|
{
|
|
499
499
|
ref: e,
|
|
500
500
|
className: r,
|
|
501
501
|
style: i ? { opacity: 0 } : void 0,
|
|
502
|
-
children: t && /* @__PURE__ */
|
|
502
|
+
children: t && /* @__PURE__ */ c("span", { className: a, children: t })
|
|
503
503
|
}
|
|
504
504
|
);
|
|
505
|
-
|
|
505
|
+
A.displayName = "ButtonIcon";
|
|
506
506
|
/*!
|
|
507
|
-
@versini/ui-button
|
|
507
|
+
@versini/ui-button v8.0.0
|
|
508
508
|
© 2025 gizmette.com
|
|
509
509
|
*/
|
|
510
510
|
try {
|
|
511
511
|
window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
|
|
512
|
-
version: "
|
|
513
|
-
buildTime: "
|
|
512
|
+
version: "8.0.0",
|
|
513
|
+
buildTime: "09/01/2025 03:17 PM EDT",
|
|
514
514
|
homepage: "https://github.com/aversini/ui-components",
|
|
515
515
|
license: "MIT"
|
|
516
516
|
});
|
|
517
517
|
} catch {
|
|
518
518
|
}
|
|
519
|
-
const
|
|
519
|
+
const Be = U.forwardRef(
|
|
520
520
|
({
|
|
521
521
|
children: e,
|
|
522
522
|
mode: r = "system",
|
|
@@ -541,8 +541,8 @@ const Ne = U.forwardRef(
|
|
|
541
541
|
"after:border-table-light dark:after:border-table-dark": r === "alt-system"
|
|
542
542
|
}
|
|
543
543
|
) : "";
|
|
544
|
-
return /* @__PURE__ */
|
|
545
|
-
|
|
544
|
+
return /* @__PURE__ */ c("div", { className: s, children: /* @__PURE__ */ c(
|
|
545
|
+
A,
|
|
546
546
|
{
|
|
547
547
|
className: t,
|
|
548
548
|
ref: l,
|
|
@@ -556,7 +556,7 @@ const Ne = U.forwardRef(
|
|
|
556
556
|
) });
|
|
557
557
|
}
|
|
558
558
|
);
|
|
559
|
-
|
|
559
|
+
Be.displayName = "ButtonSort";
|
|
560
560
|
const K = ({
|
|
561
561
|
children: e,
|
|
562
562
|
fill: r,
|
|
@@ -566,10 +566,10 @@ const K = ({
|
|
|
566
566
|
size: l,
|
|
567
567
|
title: s,
|
|
568
568
|
semantic: d = !1,
|
|
569
|
-
...
|
|
569
|
+
...u
|
|
570
570
|
}) => {
|
|
571
571
|
const y = o(l, a);
|
|
572
|
-
return /* @__PURE__ */
|
|
572
|
+
return /* @__PURE__ */ B(
|
|
573
573
|
"svg",
|
|
574
574
|
{
|
|
575
575
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -579,28 +579,28 @@ const K = ({
|
|
|
579
579
|
role: "img",
|
|
580
580
|
"aria-hidden": !d,
|
|
581
581
|
focusable: !1,
|
|
582
|
-
...
|
|
582
|
+
...u,
|
|
583
583
|
children: [
|
|
584
|
-
s && d && /* @__PURE__ */
|
|
584
|
+
s && d && /* @__PURE__ */ c("title", { children: s }),
|
|
585
585
|
e
|
|
586
586
|
]
|
|
587
587
|
}
|
|
588
|
-
)
|
|
588
|
+
);
|
|
589
589
|
};
|
|
590
590
|
/*!
|
|
591
|
-
@versini/ui-svgicon v4.2.
|
|
591
|
+
@versini/ui-svgicon v4.2.1
|
|
592
592
|
© 2025 gizmette.com
|
|
593
593
|
*/
|
|
594
594
|
try {
|
|
595
595
|
window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
|
|
596
|
-
version: "4.2.
|
|
597
|
-
buildTime: "
|
|
596
|
+
version: "4.2.1",
|
|
597
|
+
buildTime: "08/27/2025 08:27 AM EDT",
|
|
598
598
|
homepage: "https://github.com/aversini/ui-components",
|
|
599
599
|
license: "MIT"
|
|
600
600
|
});
|
|
601
601
|
} catch {
|
|
602
602
|
}
|
|
603
|
-
const
|
|
603
|
+
const Ne = ({
|
|
604
604
|
className: e,
|
|
605
605
|
viewBox: r,
|
|
606
606
|
title: t,
|
|
@@ -616,23 +616,23 @@ const _e = ({
|
|
|
616
616
|
title: t || "Copied",
|
|
617
617
|
...i,
|
|
618
618
|
children: [
|
|
619
|
-
/* @__PURE__ */
|
|
619
|
+
/* @__PURE__ */ c(
|
|
620
620
|
"path",
|
|
621
621
|
{
|
|
622
622
|
d: "M0 96v320c0 35.3 28.7 64 64 64h320c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96m104 160c0-6.1 2.3-12.3 7-17 9.4-9.4 24.6-9.4 33.9 0l47 47 111-111c4.7-4.7 10.8-7 17-7s12.3 2.3 17 7c2.3 2.3 4.1 5 5.3 7.9.6 1.5 1 2.9 1.3 4.4.2 1.1.3 2.2.3 2.2.1 1.2.1 1.2.1 2.5-.1 1.5-.1 1.9-.1 2.3-.1.7-.2 1.5-.3 2.2-.3 1.5-.7 3-1.3 4.4-1.2 2.9-2.9 5.6-5.3 7.9l-128 128c-4.7 4.7-10.8 7-17 7s-12.3-2.3-17-7l-64-64c-4.7-4.7-7-10.8-7-17z",
|
|
623
623
|
opacity: ".4"
|
|
624
624
|
}
|
|
625
625
|
),
|
|
626
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ c("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
|
|
627
627
|
]
|
|
628
628
|
}
|
|
629
|
-
),
|
|
629
|
+
), _e = ({
|
|
630
630
|
className: e,
|
|
631
631
|
viewBox: r,
|
|
632
632
|
title: t,
|
|
633
633
|
monotone: a,
|
|
634
634
|
...i
|
|
635
|
-
}) => /* @__PURE__ */
|
|
635
|
+
}) => /* @__PURE__ */ c(
|
|
636
636
|
K,
|
|
637
637
|
{
|
|
638
638
|
defaultViewBox: "0 0 512 512",
|
|
@@ -641,36 +641,36 @@ const _e = ({
|
|
|
641
641
|
className: e,
|
|
642
642
|
title: t || "Copy",
|
|
643
643
|
...i,
|
|
644
|
-
children: /* @__PURE__ */
|
|
644
|
+
children: /* @__PURE__ */ c("path", { d: "M64 464h224c8.8 0 16-7.2 16-16v-64h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16m160-160h224c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16m-64-16V64c0-35.3 28.7-64 64-64h224c35.3 0 64 28.7 64 64v224c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64" })
|
|
645
645
|
}
|
|
646
646
|
);
|
|
647
647
|
/*!
|
|
648
|
-
@versini/ui-icons v4.
|
|
648
|
+
@versini/ui-icons v4.11.0
|
|
649
649
|
© 2025 gizmette.com
|
|
650
650
|
*/
|
|
651
651
|
try {
|
|
652
652
|
window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
|
|
653
|
-
version: "4.
|
|
654
|
-
buildTime: "
|
|
653
|
+
version: "4.11.0",
|
|
654
|
+
buildTime: "08/27/2025 08:28 AM EDT",
|
|
655
655
|
homepage: "https://github.com/aversini/ui-components",
|
|
656
656
|
license: "MIT"
|
|
657
657
|
});
|
|
658
658
|
} catch {
|
|
659
659
|
}
|
|
660
|
-
const
|
|
660
|
+
const Ie = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
661
661
|
"max-w-xs sm:max-w-md md:max-w-2xl": !r,
|
|
662
662
|
"lg:max-w-3xl": e === "left" && !r
|
|
663
|
-
}),
|
|
663
|
+
}), Ce = ({ kind: e }) => o({
|
|
664
664
|
"bg-surface-lighter dark:bg-surface-dark": e === "left",
|
|
665
665
|
"bg-surface-accent": e === "right"
|
|
666
|
-
}),
|
|
666
|
+
}), Te = ({ kind: e }) => o(
|
|
667
667
|
"prose prose-dark dark:prose-lighter",
|
|
668
668
|
"prose-blockquote:my-1",
|
|
669
669
|
"prose-ol:my-1 prose-ul:my-1",
|
|
670
670
|
{
|
|
671
671
|
"text-copy-lighter": e === "right"
|
|
672
672
|
}
|
|
673
|
-
),
|
|
673
|
+
), Ee = ({ kind: e, tail: r }) => {
|
|
674
674
|
if (r)
|
|
675
675
|
return o(
|
|
676
676
|
`${R}-${e}-tail`,
|
|
@@ -691,7 +691,7 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
|
691
691
|
"rounded-tr-xl": e === "left",
|
|
692
692
|
"rounded-tl-xl": e === "right"
|
|
693
693
|
});
|
|
694
|
-
},
|
|
694
|
+
}, ze = ({
|
|
695
695
|
kind: e,
|
|
696
696
|
className: r,
|
|
697
697
|
contentClassName: t,
|
|
@@ -709,12 +709,12 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
|
709
709
|
), s = o(
|
|
710
710
|
`${R}-content`,
|
|
711
711
|
"flex flex-col empty:hidden",
|
|
712
|
-
|
|
713
|
-
Ee({ kind: e }),
|
|
712
|
+
Ie({ kind: e, noMaxWidth: a }),
|
|
714
713
|
Te({ kind: e }),
|
|
715
|
-
|
|
714
|
+
Ce({ kind: e }),
|
|
715
|
+
Ee({ kind: e, tail: i }),
|
|
716
716
|
t
|
|
717
|
-
), d = "pr-2 pt-1 text-end text-xs text-copy-light",
|
|
717
|
+
), d = "pr-2 pt-1 text-end text-xs text-copy-light", u = o("flex flex-col-reverse sm:flex-row", {
|
|
718
718
|
"ml-2": e === "left" && !i,
|
|
719
719
|
"mr-2": e === "right" && !i,
|
|
720
720
|
"ml-1": e === "left" && i,
|
|
@@ -724,9 +724,9 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
|
724
724
|
wrapper: l,
|
|
725
725
|
main: s,
|
|
726
726
|
footer: d,
|
|
727
|
-
copyButton:
|
|
727
|
+
copyButton: u
|
|
728
728
|
};
|
|
729
|
-
},
|
|
729
|
+
}, Re = "FOOTER_EMPTY", Ve = ({
|
|
730
730
|
children: e,
|
|
731
731
|
kind: r = "left",
|
|
732
732
|
className: t,
|
|
@@ -735,32 +735,32 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
|
735
735
|
rawFooter: l,
|
|
736
736
|
copyToClipboard: s,
|
|
737
737
|
copyToClipboardFocusMode: d = "system",
|
|
738
|
-
copyToClipboardMode:
|
|
738
|
+
copyToClipboardMode: u = "system",
|
|
739
739
|
noMaxWidth: y = !1,
|
|
740
740
|
tail: k = !1
|
|
741
741
|
}) => {
|
|
742
|
-
const [
|
|
742
|
+
const [n, m] = G(!1), g = ze({
|
|
743
743
|
kind: r,
|
|
744
744
|
className: t,
|
|
745
745
|
contentClassName: a,
|
|
746
746
|
noMaxWidth: y,
|
|
747
747
|
tail: k
|
|
748
748
|
}), _ = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), I = () => {
|
|
749
|
-
|
|
749
|
+
m(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
|
|
750
750
|
};
|
|
751
751
|
return M(() => {
|
|
752
752
|
let b;
|
|
753
|
-
return
|
|
754
|
-
|
|
753
|
+
return n && (b = window.setTimeout(() => {
|
|
754
|
+
m(!1);
|
|
755
755
|
}, 3e3)), () => {
|
|
756
756
|
clearTimeout(b);
|
|
757
757
|
};
|
|
758
|
-
}, [
|
|
758
|
+
}, [n]), /* @__PURE__ */ B("div", { className: g.wrapper, children: [
|
|
759
759
|
/* @__PURE__ */ B("div", { children: [
|
|
760
|
-
/* @__PURE__ */
|
|
760
|
+
/* @__PURE__ */ c("div", { className: g.main, children: e }),
|
|
761
761
|
i && Object.keys(i).map((b, C) => {
|
|
762
762
|
const T = i[b];
|
|
763
|
-
return T ===
|
|
763
|
+
return T === Re ? /* @__PURE__ */ c("div", { className: "prose-p:m-0", children: /* @__PURE__ */ c("p", { className: g.footer, "aria-hidden": "true", children: /* @__PURE__ */ c("span", { className: "invisible", children: " " }) }) }, `${b}-${C}`) : T ? /* @__PURE__ */ c("div", { className: "prose-p:m-0", children: /* @__PURE__ */ B("p", { className: g.footer, children: [
|
|
764
764
|
b,
|
|
765
765
|
": ",
|
|
766
766
|
T
|
|
@@ -768,24 +768,24 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
|
|
|
768
768
|
}),
|
|
769
769
|
l && l
|
|
770
770
|
] }),
|
|
771
|
-
_ && /* @__PURE__ */
|
|
772
|
-
|
|
771
|
+
_ && /* @__PURE__ */ c("div", { className: g.copyButton, children: /* @__PURE__ */ c(
|
|
772
|
+
A,
|
|
773
773
|
{
|
|
774
774
|
noBorder: !0,
|
|
775
775
|
noBackground: !0,
|
|
776
776
|
size: "small",
|
|
777
|
-
mode:
|
|
777
|
+
mode: u,
|
|
778
778
|
focusMode: d,
|
|
779
|
-
label:
|
|
779
|
+
label: n ? "Copied to clipboard" : "Copy to clipboard",
|
|
780
780
|
onClick: I,
|
|
781
|
-
disabled:
|
|
782
|
-
children:
|
|
781
|
+
disabled: n,
|
|
782
|
+
children: n ? /* @__PURE__ */ c(Ne, { size: "size-3" }) : /* @__PURE__ */ c(_e, { size: "size-3" })
|
|
783
783
|
}
|
|
784
784
|
) })
|
|
785
785
|
] });
|
|
786
786
|
};
|
|
787
787
|
export {
|
|
788
788
|
R as BUBBLE_CLASSNAME,
|
|
789
|
-
|
|
790
|
-
|
|
789
|
+
Re as BUBBLE_FOOTER_EMPTY,
|
|
790
|
+
Ve as Bubble
|
|
791
791
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { BUBBLE_CLASSNAME as i, BUBBLE_FOOTER_EMPTY as o, Bubble as E } from "./components/Bubble/Bubble.js";
|
|
2
2
|
/*!
|
|
3
|
-
@versini/ui-bubble
|
|
3
|
+
@versini/ui-bubble v6.0.0
|
|
4
4
|
© 2025 gizmette.com
|
|
5
5
|
*/
|
|
6
6
|
try {
|
|
7
7
|
window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
|
|
8
|
-
version: "
|
|
9
|
-
buildTime: "
|
|
8
|
+
version: "6.0.0",
|
|
9
|
+
buildTime: "09/01/2025 03:19 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-bubble",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.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
|
-
"@versini/ui-types": "
|
|
45
|
+
"@versini/ui-types": "6.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@tailwindcss/typography": "0.5.16",
|
|
49
|
-
"@versini/ui-button": "
|
|
50
|
-
"@versini/ui-icons": "4.
|
|
49
|
+
"@versini/ui-button": "8.0.0",
|
|
50
|
+
"@versini/ui-icons": "4.11.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
|
}
|