@versini/ui-bubble 5.0.8 → 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.
@@ -1,25 +1,679 @@
1
- import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
- import { ButtonIcon as C } from "@versini/ui-button";
3
- import { IconCopied as E, IconCopy as N } from "@versini/ui-icons";
4
- import { useState as $, useEffect as z } from "react";
5
- import l from "clsx";
6
- const c = "av-bubble", O = ({ kind: e, noMaxWidth: r }) => l("px-4 py-2", {
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
+ import o from "clsx";
4
+ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", ie = ({
5
+ type: e,
6
+ size: r,
7
+ labelRight: t,
8
+ labelLeft: a,
9
+ align: i,
10
+ animated: l
11
+ }) => {
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
+ switch (e) {
14
+ case Y:
15
+ case L:
16
+ return o({
17
+ [s]: r === "small",
18
+ [d]: r === "medium",
19
+ [u]: r === "large"
20
+ });
21
+ case j:
22
+ return o("flex items-center", {
23
+ "justify-center": i === "center",
24
+ "justify-start": i === "left",
25
+ "justify-end": i === "right",
26
+ "h-6 w-6 p-0": r === "small" && !l && !(t || a),
27
+ "h-6 px-1 sm:px-2": r === "small" && !l && (t || a),
28
+ "h-8 w-8 p-1": r === "medium" && !l && !(t || a),
29
+ "h-8 px-3": r === "medium" && !l && (t || a),
30
+ "h-12 w-12 p-2": r === "large" && !l && !(t || a),
31
+ "h-12 px-4": r === "large" && !l && (t || a),
32
+ "h-6 py-0": r === "small" && l && !(t || a),
33
+ "h-6": r === "small" && l && (t || a),
34
+ "h-8 py-1": r === "medium" && l && !(t || a),
35
+ "h-8": r === "medium" && l && (t || a),
36
+ "h-12 py-2": r === "large" && l && !(t || a),
37
+ "h-12": r === "large" && l && (t || a)
38
+ });
39
+ }
40
+ }, oe = ({
41
+ type: e,
42
+ size: r,
43
+ labelRight: t,
44
+ labelLeft: a
45
+ }) => {
46
+ const i = "text-sm font-medium", l = "text-base font-medium", s = "text-lg font-medium";
47
+ switch (e) {
48
+ case Y:
49
+ case L:
50
+ return o({
51
+ "text-center": e === L,
52
+ [i]: r === "small",
53
+ [l]: r === "medium",
54
+ [s]: r === "large"
55
+ });
56
+ case j:
57
+ return o({
58
+ [i]: r === "small" && (t || a),
59
+ [l]: r === "medium" && (t || a),
60
+ [s]: r === "large" && (t || a)
61
+ });
62
+ }
63
+ }, le = ({
64
+ mode: e,
65
+ noBackground: r,
66
+ truncate: t,
67
+ variant: a
68
+ }) => {
69
+ if (r)
70
+ return "not-prose";
71
+ if (a === "primary")
72
+ return o("not-prose", {
73
+ truncate: t,
74
+ "text-copy-dark": e === "dark" || e === "system",
75
+ "text-copy-light": e === "light" || e === "alt-system",
76
+ "dark:text-copy-light": e === "system",
77
+ "dark:text-copy-dark": e === "alt-system"
78
+ });
79
+ if (a === "secondary")
80
+ return o("not-prose", {
81
+ truncate: t,
82
+ "text-copy-light": e === "dark" || e === "system",
83
+ "text-copy-dark": e === "light" || e === "alt-system",
84
+ "dark:text-copy-dark": e === "system",
85
+ "dark:text-copy-light": e === "alt-system"
86
+ });
87
+ if (a === "danger")
88
+ return o("not-prose", {
89
+ truncate: t,
90
+ "text-copy-light": e === "dark" || e === "system",
91
+ "text-copy-lighter": e === "light" || e === "alt-system",
92
+ "dark:text-copy-lighter": e === "system",
93
+ "dark:text-copy-light": e === "alt-system"
94
+ });
95
+ if (a === "selected")
96
+ return o("not-prose text-copy-lighter", {
97
+ truncate: t
98
+ });
99
+ }, se = ({
100
+ mode: e,
101
+ noBackground: r,
102
+ variant: t
103
+ }) => {
104
+ if (!r) {
105
+ if (t === "primary")
106
+ return o({
107
+ "bg-action-light": e === "dark",
108
+ "bg-action-dark": e === "light",
109
+ "bg-action-light dark:bg-action-dark": e === "system",
110
+ "bg-action-dark dark:bg-action-light": e === "alt-system"
111
+ });
112
+ if (t === "secondary")
113
+ return o({
114
+ "bg-action-light": e === "light",
115
+ "bg-action-dark": e === "dark",
116
+ "bg-action-light dark:bg-action-dark": e === "alt-system",
117
+ "bg-action-dark dark:bg-action-light": e === "system"
118
+ });
119
+ if (t === "danger")
120
+ return o({
121
+ "bg-action-danger-dark": e === "dark",
122
+ "bg-action-danger-light": e === "light",
123
+ "bg-action-danger-dark dark:bg-action-danger-light": e === "system",
124
+ "bg-action-danger-light dark:bg-action-danger-dark": e === "alt-system"
125
+ });
126
+ if (t === "selected")
127
+ return "bg-action-selected-dark";
128
+ }
129
+ }, ce = ({
130
+ radius: e
131
+ }) => o({
132
+ "rounded-full": e === "large",
133
+ "rounded-md": e === "medium",
134
+ "rounded-xs": e === "small"
135
+ }), ne = ({
136
+ mode: e,
137
+ disabled: r,
138
+ variant: t
139
+ }) => {
140
+ if (r)
141
+ return "";
142
+ if (t === "primary")
143
+ return o({
144
+ "hover:text-copy-dark-hover": e === "dark" || e === "system",
145
+ "hover:text-copy-light-hover": e === "light" || e === "alt-system",
146
+ "dark:hover:text-copy-light-hover": e === "system",
147
+ "dark:hover:text-copy-dark-hover": e === "alt-system",
148
+ "hover:bg-action-light-hover": e === "dark",
149
+ "hover:bg-action-dark-hover": e === "light",
150
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system",
151
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system"
152
+ });
153
+ if (t === "secondary")
154
+ return o({
155
+ "hover:text-copy-light-hover": e === "dark" || e === "system",
156
+ "hover:text-copy-dark-hover": e === "light" || e === "alt-system",
157
+ "dark:hover:text-copy-dark-hover": e === "system",
158
+ "dark:hover:text-copy-light-hover": e === "alt-system",
159
+ "hover:bg-action-light-hover": e === "light",
160
+ "hover:bg-action-dark-hover": e === "dark",
161
+ "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system",
162
+ "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system"
163
+ });
164
+ if (t === "danger")
165
+ return o("hover:text-copy-light-hover", {
166
+ "hover:bg-action-danger-dark-hover": e === "dark",
167
+ "hover:bg-action-danger-light-hover": e === "light",
168
+ "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
169
+ "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
170
+ });
171
+ if (t === "selected")
172
+ return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
173
+ }, de = ({
174
+ mode: e,
175
+ disabled: r,
176
+ variant: t
177
+ }) => {
178
+ if (r)
179
+ return "";
180
+ if (t === "primary")
181
+ return o({
182
+ "active:text-copy-dark-active": e === "dark" || e === "system",
183
+ "active:text-copy-light-active": e === "light" || e === "alt-system",
184
+ "dark:active:text-copy-light-active": e === "system",
185
+ "dark:active:text-copy-dark-active": e === "alt-system",
186
+ "active:bg-action-light-active": e === "dark",
187
+ "active:bg-action-dark-active": e === "light",
188
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system",
189
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system"
190
+ });
191
+ if (t === "secondary")
192
+ return o({
193
+ "active:text-copy-light-active": e === "dark" || e === "system",
194
+ "active:text-copy-dark-active": e === "light" || e === "alt-system",
195
+ "dark:active:text-copy-dark-active": e === "system",
196
+ "dark:active:text-copy-light-active": e === "alt-system",
197
+ "active:bg-action-light-active": e === "light",
198
+ "active:bg-action-dark-active": e === "dark",
199
+ "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system",
200
+ "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system"
201
+ });
202
+ if (t === "danger")
203
+ return o("active:text-copy-lighter-active", {
204
+ "active:bg-action-danger-dark-active": e === "dark",
205
+ "active:bg-action-danger-light-active": e === "light",
206
+ "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
207
+ "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
208
+ });
209
+ if (t === "selected")
210
+ return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
211
+ }, ue = ({
212
+ mode: e,
213
+ noBorder: r,
214
+ variant: t
215
+ }) => {
216
+ if (r)
217
+ return "border border-transparent";
218
+ if (t === "primary")
219
+ return o("border", {
220
+ "border-border-medium": e === "dark",
221
+ "border-border-accent": e === "light",
222
+ "border-border-medium dark:border-border-accent": e === "system",
223
+ "border-border-accent dark:border-border-medium": e === "alt-system"
224
+ });
225
+ if (t === "secondary")
226
+ return o("border", {
227
+ "border-border-medium": e === "light",
228
+ "border-border-accent": e === "dark",
229
+ "border-border-medium dark:border-border-accent": e === "alt-system",
230
+ "border-border-accent dark:border-border-medium": e === "system"
231
+ });
232
+ if (t === "danger")
233
+ return o("border", {
234
+ "border-border-danger-dark": e === "dark",
235
+ "border-border-danger-medium": e === "light",
236
+ "border-border-danger-dark dark:border-border-danger-medium": e === "system",
237
+ "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
238
+ });
239
+ if (t === "selected")
240
+ return "border border-border-selected-dark";
241
+ }, me = ({
242
+ focusMode: e
243
+ }) => o("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
244
+ "focus:outline-focus-dark": e === "dark",
245
+ "focus:outline-focus-light": e === "light",
246
+ "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
247
+ "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
248
+ }), ge = ({
249
+ mode: e,
250
+ raw: r,
251
+ iconClassName: t,
252
+ variant: a = "primary"
253
+ }) => {
254
+ if (r)
255
+ return "";
256
+ let i = {};
257
+ return a === "primary" ? i = {
258
+ "text-copy-dark": e === "dark" || e === "system",
259
+ "text-copy-light": e === "light" || e === "alt-system",
260
+ "dark:text-copy-light": e === "system",
261
+ "dark:text-copy-dark": e === "alt-system"
262
+ } : a === "secondary" ? i = {
263
+ "text-copy-light": e === "dark" || e === "system",
264
+ "text-copy-dark": e === "light" || e === "alt-system",
265
+ "dark:text-copy-dark": e === "system",
266
+ "dark:text-copy-light": e === "alt-system"
267
+ } : a === "danger" ? i = {
268
+ "text-copy-light": e === "dark" || e === "system",
269
+ "text-copy-lighter": e === "light" || e === "alt-system",
270
+ "dark:text-copy-lighter": e === "system",
271
+ "dark:text-copy-light": e === "alt-system"
272
+ } : a === "selected" && (i = {
273
+ "text-copy-lighter": !0
274
+ }), o(i, t);
275
+ }, be = ({
276
+ animated: e
277
+ }) => o({
278
+ "transition-opacity duration-300 ease-in-out": e
279
+ }), he = ({
280
+ type: e,
281
+ className: r,
282
+ raw: t,
283
+ mode: a,
284
+ focusMode: i,
285
+ disabled: l,
286
+ fullWidth: s,
287
+ size: d,
288
+ noBorder: u,
289
+ labelRight: y,
290
+ labelLeft: k,
291
+ noBackground: n,
292
+ variant: m,
293
+ truncate: g,
294
+ align: _,
295
+ radius: I,
296
+ animated: b
297
+ }) => (m || (m = "primary"), t ? o(q, r) : o(
298
+ q,
299
+ le({
300
+ mode: a,
301
+ variant: m,
302
+ noBackground: n,
303
+ truncate: g
304
+ }),
305
+ se({ mode: a, noBackground: n, variant: m }),
306
+ ce({ radius: I }),
307
+ ie({
308
+ type: e,
309
+ size: d,
310
+ labelRight: y,
311
+ labelLeft: k,
312
+ align: _,
313
+ animated: b
314
+ }),
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
+ {
321
+ "w-full": s,
322
+ "disabled:cursor-not-allowed disabled:opacity-50": l
323
+ },
324
+ o({
325
+ "transition-[width] duration-300 ease-in": b
326
+ }),
327
+ r
328
+ )), fe = (e, r, t) => {
329
+ !r && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof e?.currentTarget?.focus == "function" && e.currentTarget.focus(), typeof t == "function" && t(e);
330
+ }, J = U.forwardRef((e, r) => {
331
+ const { onClick: t, noInternalClick: a = !1, ...i } = e;
332
+ return /* @__PURE__ */ c(
333
+ "button",
334
+ {
335
+ ref: r,
336
+ onClick: (l) => {
337
+ fe(l, a, t);
338
+ },
339
+ ...i
340
+ }
341
+ );
342
+ });
343
+ J.displayName = "BaseButton";
344
+ function ye() {
345
+ const e = N(!1);
346
+ return M(() => (e.current = !0, () => {
347
+ e.current = !1;
348
+ }), []), ae(() => e.current, []);
349
+ }
350
+ function ve(e) {
351
+ return W(() => e.every((r) => r == null) ? () => {
352
+ } : (r) => {
353
+ e.forEach((t) => {
354
+ typeof t == "function" ? t(r) : t != null && (t.current = r);
355
+ });
356
+ }, [...e]);
357
+ }
358
+ const pe = {
359
+ x: 0,
360
+ y: 0,
361
+ width: 0,
362
+ height: 0,
363
+ top: 0,
364
+ left: 0,
365
+ bottom: 0,
366
+ right: 0
367
+ };
368
+ function O(e) {
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
+ }));
374
+ }), [r]);
375
+ return M(() => (a.current && s?.observe(a.current, e), () => {
376
+ s?.disconnect(), t.current && cancelAnimationFrame(t.current);
377
+ }), [s, e]), [a, i];
378
+ }
379
+ const z = {
380
+ small: 24,
381
+ // w-6
382
+ medium: 32,
383
+ // w-8
384
+ large: 48
385
+ // w-12
386
+ }, ke = {
387
+ small: 16,
388
+ // px-2 x 2
389
+ medium: 24,
390
+ // px-3 x 2
391
+ large: 32
392
+ // px-4 x 2
393
+ }, xe = 2, we = 300, A = U.forwardRef(
394
+ ({
395
+ children: e,
396
+ disabled: r = !1,
397
+ mode: t = "system",
398
+ focusMode: a = "system",
399
+ fullWidth: i = !1,
400
+ className: l,
401
+ type: s = "button",
402
+ raw: d = !1,
403
+ noBorder: u = !1,
404
+ "aria-label": y,
405
+ label: k,
406
+ size: n = "medium",
407
+ labelRight: m,
408
+ labelLeft: g,
409
+ noBackground: _ = !1,
410
+ align: I = "center",
411
+ radius: b = "large",
412
+ variant: C = "secondary",
413
+ iconClassName: T,
414
+ animated: v = !1,
415
+ ...Q
416
+ }, X) => {
417
+ const Z = he({
418
+ type: j,
419
+ mode: t,
420
+ focusMode: a,
421
+ fullWidth: i,
422
+ disabled: r,
423
+ raw: d,
424
+ className: l,
425
+ noBorder: u,
426
+ size: n,
427
+ labelRight: m,
428
+ labelLeft: g,
429
+ noBackground: _,
430
+ align: I,
431
+ radius: b,
432
+ variant: C,
433
+ animated: v
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
+ return P(() => {
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
+ if (p && p.current && v) {
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
+ }
444
+ }, [
445
+ $,
446
+ m,
447
+ h,
448
+ S,
449
+ g,
450
+ f,
451
+ n,
452
+ v
453
+ ]), M(() => () => {
454
+ x.current && clearTimeout(x.current);
455
+ }, []), /* @__PURE__ */ c(
456
+ J,
457
+ {
458
+ ref: re,
459
+ className: Z,
460
+ disabled: r,
461
+ type: s,
462
+ "aria-label": y || k,
463
+ ...Q,
464
+ children: /* @__PURE__ */ B("div", { className: te, children: [
465
+ /* @__PURE__ */ c(
466
+ D,
467
+ {
468
+ label: g,
469
+ labelRef: f,
470
+ labelClass: H,
471
+ labelInnerClass: "pr-2",
472
+ initiallyHidden: v
473
+ }
474
+ ),
475
+ /* @__PURE__ */ c("span", { ref: E, className: ee, children: e }),
476
+ /* @__PURE__ */ c(
477
+ D,
478
+ {
479
+ label: m,
480
+ labelRef: h,
481
+ labelClass: H,
482
+ labelInnerClass: "pl-2",
483
+ initiallyHidden: v
484
+ }
485
+ )
486
+ ] })
487
+ }
488
+ );
489
+ }
490
+ ), D = ({
491
+ labelRef: e,
492
+ labelClass: r,
493
+ label: t,
494
+ labelInnerClass: a,
495
+ initiallyHidden: i = !1
496
+ }) => /* @__PURE__ */ c(
497
+ "span",
498
+ {
499
+ ref: e,
500
+ className: r,
501
+ style: i ? { opacity: 0 } : void 0,
502
+ children: t && /* @__PURE__ */ c("span", { className: a, children: t })
503
+ }
504
+ );
505
+ A.displayName = "ButtonIcon";
506
+ /*!
507
+ @versini/ui-button v8.0.0
508
+ © 2025 gizmette.com
509
+ */
510
+ try {
511
+ window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
512
+ version: "8.0.0",
513
+ buildTime: "09/01/2025 03:17 PM EDT",
514
+ homepage: "https://github.com/aversini/ui-components",
515
+ license: "MIT"
516
+ });
517
+ } catch {
518
+ }
519
+ const Be = U.forwardRef(
520
+ ({
521
+ children: e,
522
+ mode: r = "system",
523
+ className: t,
524
+ active: a = !1,
525
+ ...i
526
+ }, l) => {
527
+ const s = a ? o(
528
+ "relative",
529
+ "focus-within:static",
530
+ "focus-within:after:border-transparent",
531
+ "after:absolute",
532
+ "after:content-['']",
533
+ "after:border-b-2",
534
+ "after:bottom-[-4px]",
535
+ "after:left-0",
536
+ "after:right-0",
537
+ {
538
+ "after:border-table-dark": r === "dark",
539
+ "after:border-table-light": r === "light",
540
+ "after:border-table-dark dark:after:border-table-light": r === "system",
541
+ "after:border-table-light dark:after:border-table-dark": r === "alt-system"
542
+ }
543
+ ) : "";
544
+ return /* @__PURE__ */ c("div", { className: s, children: /* @__PURE__ */ c(
545
+ A,
546
+ {
547
+ className: t,
548
+ ref: l,
549
+ mode: r,
550
+ radius: "small",
551
+ size: "small",
552
+ align: "center",
553
+ ...i,
554
+ children: e
555
+ }
556
+ ) });
557
+ }
558
+ );
559
+ Be.displayName = "ButtonSort";
560
+ const K = ({
561
+ children: e,
562
+ fill: r,
563
+ viewBox: t,
564
+ className: a,
565
+ defaultViewBox: i,
566
+ size: l,
567
+ title: s,
568
+ semantic: d = !1,
569
+ ...u
570
+ }) => {
571
+ const y = o(l, a);
572
+ return /* @__PURE__ */ B(
573
+ "svg",
574
+ {
575
+ xmlns: "http://www.w3.org/2000/svg",
576
+ className: y,
577
+ viewBox: t || i,
578
+ fill: r || "currentColor",
579
+ role: "img",
580
+ "aria-hidden": !d,
581
+ focusable: !1,
582
+ ...u,
583
+ children: [
584
+ s && d && /* @__PURE__ */ c("title", { children: s }),
585
+ e
586
+ ]
587
+ }
588
+ );
589
+ };
590
+ /*!
591
+ @versini/ui-svgicon v4.2.1
592
+ © 2025 gizmette.com
593
+ */
594
+ try {
595
+ window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
596
+ version: "4.2.1",
597
+ buildTime: "08/27/2025 08:27 AM EDT",
598
+ homepage: "https://github.com/aversini/ui-components",
599
+ license: "MIT"
600
+ });
601
+ } catch {
602
+ }
603
+ const Ne = ({
604
+ className: e,
605
+ viewBox: r,
606
+ title: t,
607
+ monotone: a,
608
+ ...i
609
+ }) => /* @__PURE__ */ B(
610
+ K,
611
+ {
612
+ defaultViewBox: "0 0 448 512",
613
+ size: "size-5",
614
+ viewBox: r,
615
+ className: e,
616
+ title: t || "Copied",
617
+ ...i,
618
+ children: [
619
+ /* @__PURE__ */ c(
620
+ "path",
621
+ {
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
+ opacity: ".4"
624
+ }
625
+ ),
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
+ ]
628
+ }
629
+ ), _e = ({
630
+ className: e,
631
+ viewBox: r,
632
+ title: t,
633
+ monotone: a,
634
+ ...i
635
+ }) => /* @__PURE__ */ c(
636
+ K,
637
+ {
638
+ defaultViewBox: "0 0 512 512",
639
+ size: "size-5",
640
+ viewBox: r,
641
+ className: e,
642
+ title: t || "Copy",
643
+ ...i,
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
+ }
646
+ );
647
+ /*!
648
+ @versini/ui-icons v4.11.0
649
+ © 2025 gizmette.com
650
+ */
651
+ try {
652
+ window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
653
+ version: "4.11.0",
654
+ buildTime: "08/27/2025 08:28 AM EDT",
655
+ homepage: "https://github.com/aversini/ui-components",
656
+ license: "MIT"
657
+ });
658
+ } catch {
659
+ }
660
+ const Ie = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
7
661
  "max-w-xs sm:max-w-md md:max-w-2xl": !r,
8
662
  "lg:max-w-3xl": e === "left" && !r
9
- }), T = ({ kind: e }) => l({
663
+ }), Ce = ({ kind: e }) => o({
10
664
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
11
665
  "bg-surface-accent": e === "right"
12
- }), I = ({ kind: e }) => l(
666
+ }), Te = ({ kind: e }) => o(
13
667
  "prose prose-dark dark:prose-lighter",
14
668
  "prose-blockquote:my-1",
15
669
  "prose-ol:my-1 prose-ul:my-1",
16
670
  {
17
671
  "text-copy-lighter": e === "right"
18
672
  }
19
- ), S = ({ kind: e, tail: r }) => {
673
+ ), Ee = ({ kind: e, tail: r }) => {
20
674
  if (r)
21
- return l(
22
- `${c}-${e}-tail`,
675
+ return o(
676
+ `${R}-${e}-tail`,
23
677
  "rounded-3xl",
24
678
  "relative",
25
679
  "before:content-['']",
@@ -33,105 +687,105 @@ const c = "av-bubble", O = ({ kind: e, noMaxWidth: r }) => l("px-4 py-2", {
33
687
  }
34
688
  );
35
689
  if (!r)
36
- return l("rounded-b-xl", {
690
+ return o("rounded-b-xl", {
37
691
  "rounded-tr-xl": e === "left",
38
692
  "rounded-tl-xl": e === "right"
39
693
  });
40
- }, _ = ({
694
+ }, ze = ({
41
695
  kind: e,
42
696
  className: r,
43
- contentClassName: u,
44
- noMaxWidth: i,
45
- tail: t
697
+ contentClassName: t,
698
+ noMaxWidth: a,
699
+ tail: i
46
700
  }) => {
47
- const n = l(
48
- c,
49
- `${c}-${e}`,
701
+ const l = o(
702
+ R,
703
+ `${R}-${e}`,
50
704
  "flex items-start",
51
705
  {
52
706
  "flex-row-reverse": e === "right"
53
707
  },
54
708
  r
55
- ), s = l(
56
- `${c}-content`,
709
+ ), s = o(
710
+ `${R}-content`,
57
711
  "flex flex-col empty:hidden",
58
- O({ kind: e, noMaxWidth: i }),
59
- I({ kind: e }),
60
- T({ kind: e }),
61
- S({ kind: e, tail: t }),
62
- u
63
- ), m = "pr-2 pt-1 text-end text-xs text-copy-light", p = l("flex flex-col-reverse sm:flex-row", {
64
- "ml-2": e === "left" && !t,
65
- "mr-2": e === "right" && !t,
66
- "ml-1": e === "left" && t,
67
- "mr-1": e === "right" && t
712
+ Ie({ kind: e, noMaxWidth: a }),
713
+ Te({ kind: e }),
714
+ Ce({ kind: e }),
715
+ Ee({ kind: e, tail: i }),
716
+ t
717
+ ), d = "pr-2 pt-1 text-end text-xs text-copy-light", u = o("flex flex-col-reverse sm:flex-row", {
718
+ "ml-2": e === "left" && !i,
719
+ "mr-2": e === "right" && !i,
720
+ "ml-1": e === "left" && i,
721
+ "mr-1": e === "right" && i
68
722
  });
69
723
  return {
70
- wrapper: n,
724
+ wrapper: l,
71
725
  main: s,
72
- footer: m,
73
- copyButton: p
726
+ footer: d,
727
+ copyButton: u
74
728
  };
75
- }, j = "FOOTER_EMPTY", U = ({
729
+ }, Re = "FOOTER_EMPTY", Ve = ({
76
730
  children: e,
77
731
  kind: r = "left",
78
- className: u,
79
- contentClassName: i,
80
- footer: t,
81
- rawFooter: n,
732
+ className: t,
733
+ contentClassName: a,
734
+ footer: i,
735
+ rawFooter: l,
82
736
  copyToClipboard: s,
83
- copyToClipboardFocusMode: m = "system",
84
- copyToClipboardMode: p = "system",
85
- noMaxWidth: B = !1,
86
- tail: y = !1
737
+ copyToClipboardFocusMode: d = "system",
738
+ copyToClipboardMode: u = "system",
739
+ noMaxWidth: y = !1,
740
+ tail: k = !1
87
741
  }) => {
88
- const [a, x] = $(!1), f = _({
742
+ const [n, m] = G(!1), g = ze({
89
743
  kind: r,
90
- className: u,
91
- contentClassName: i,
92
- noMaxWidth: B,
93
- tail: y
94
- }), v = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), w = () => {
95
- x(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
744
+ className: t,
745
+ contentClassName: a,
746
+ noMaxWidth: y,
747
+ tail: k
748
+ }), _ = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), I = () => {
749
+ m(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
96
750
  };
97
- return z(() => {
751
+ return M(() => {
98
752
  let b;
99
- return a && (b = window.setTimeout(() => {
100
- x(!1);
753
+ return n && (b = window.setTimeout(() => {
754
+ m(!1);
101
755
  }, 3e3)), () => {
102
756
  clearTimeout(b);
103
757
  };
104
- }, [a]), /* @__PURE__ */ g("div", { className: f.wrapper, children: [
105
- /* @__PURE__ */ g("div", { children: [
106
- /* @__PURE__ */ o("div", { className: f.main, children: e }),
107
- t && Object.keys(t).map((b, h) => {
108
- const d = t[b];
109
- return d === j ? /* @__PURE__ */ o("div", { className: "prose-p:m-0", children: /* @__PURE__ */ o("p", { className: f.footer, "aria-hidden": "true", children: /* @__PURE__ */ o("span", { className: "invisible", children: " " }) }) }, `${b}-${h}`) : d ? /* @__PURE__ */ o("div", { className: "prose-p:m-0", children: /* @__PURE__ */ g("p", { className: f.footer, children: [
758
+ }, [n]), /* @__PURE__ */ B("div", { className: g.wrapper, children: [
759
+ /* @__PURE__ */ B("div", { children: [
760
+ /* @__PURE__ */ c("div", { className: g.main, children: e }),
761
+ i && Object.keys(i).map((b, C) => {
762
+ const T = i[b];
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: [
110
764
  b,
111
765
  ": ",
112
- d
113
- ] }) }, `${b}-${h}`) : null;
766
+ T
767
+ ] }) }, `${b}-${C}`) : null;
114
768
  }),
115
- n && n
769
+ l && l
116
770
  ] }),
117
- v && /* @__PURE__ */ o("div", { className: f.copyButton, children: /* @__PURE__ */ o(
118
- C,
771
+ _ && /* @__PURE__ */ c("div", { className: g.copyButton, children: /* @__PURE__ */ c(
772
+ A,
119
773
  {
120
774
  noBorder: !0,
121
775
  noBackground: !0,
122
776
  size: "small",
123
- mode: p,
124
- focusMode: m,
125
- label: a ? "Copied to clipboard" : "Copy to clipboard",
126
- onClick: w,
127
- disabled: a,
128
- children: a ? /* @__PURE__ */ o(E, { size: "size-3" }) : /* @__PURE__ */ o(N, { size: "size-3" })
777
+ mode: u,
778
+ focusMode: d,
779
+ label: n ? "Copied to clipboard" : "Copy to clipboard",
780
+ onClick: I,
781
+ disabled: n,
782
+ children: n ? /* @__PURE__ */ c(Ne, { size: "size-3" }) : /* @__PURE__ */ c(_e, { size: "size-3" })
129
783
  }
130
784
  ) })
131
785
  ] });
132
786
  };
133
787
  export {
134
- c as BUBBLE_CLASSNAME,
135
- j as BUBBLE_FOOTER_EMPTY,
136
- U as Bubble
788
+ R as BUBBLE_CLASSNAME,
789
+ Re as BUBBLE_FOOTER_EMPTY,
790
+ Ve as Bubble
137
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 v5.0.8
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: "5.0.8",
9
- buildTime: "09/01/2025 02:20 PM EDT",
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": "5.0.8",
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": "^18.3.1 || ^19.0.0",
41
- "react-dom": "^18.3.1 || ^19.0.0"
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": "5.0.7"
45
+ "@versini/ui-types": "6.0.0"
46
46
  },
47
47
  "dependencies": {
48
48
  "@tailwindcss/typography": "0.5.16",
49
- "@versini/ui-button": "7.1.6",
50
- "@versini/ui-icons": "4.10.0",
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": "c577149643ec36cad454587166e62410a77aed38"
57
+ "gitHead": "70a47e9e30172dbb7b36306773fe9511e437fba6"
58
58
  }