@versini/ui-bubble 4.0.6 → 4.1.1

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,66 +1,66 @@
1
- import { jsx as s, jsxs as x, Fragment as Y } from "react/jsx-runtime";
2
- import S, { useRef as N, useLayoutEffect as $, useState as q, useMemo as D, useEffect as V, useCallback as ee } from "react";
1
+ import { jsx as c, jsxs as B, Fragment as ae } from "react/jsx-runtime";
2
+ import j, { useRef as N, useLayoutEffect as F, useEffect as M, useState as G, useMemo as W, useCallback as oe } from "react";
3
3
  import o from "clsx";
4
- const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te = ({
4
+ const R = "av-bubble", D = "av-button", H = "icon", Y = "button", U = "link", ie = ({
5
5
  type: e,
6
6
  size: r,
7
7
  labelRight: t,
8
8
  labelLeft: a,
9
- align: l,
10
- animated: i
9
+ align: i,
10
+ animated: l
11
11
  }) => {
12
- 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";
12
+ const n = "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
- case F:
15
- case M:
14
+ case Y:
15
+ case U:
16
16
  return o({
17
17
  [n]: r === "small",
18
- [c]: r === "medium",
19
- [d]: r === "large"
18
+ [d]: r === "medium",
19
+ [u]: r === "large"
20
20
  });
21
- case L:
21
+ case H:
22
22
  return o("flex items-center", {
23
- "justify-center": l === "center",
24
- "justify-start": l === "left",
25
- "justify-end": l === "right",
26
- "h-6 w-6 p-0": r === "small" && !i && !(t || a),
27
- "h-6 px-2": r === "small" && !i && (t || a),
28
- "h-8 w-8 p-1": r === "medium" && !i && !(t || a),
29
- "h-8 px-3": r === "medium" && !i && (t || a),
30
- "h-12 w-12 p-2": r === "large" && !i && !(t || a),
31
- "h-12 px-4": r === "large" && !i && (t || a),
32
- "h-6 py-0": r === "small" && i && !(t || a),
33
- "h-6": r === "small" && i && (t || a),
34
- "h-8 py-1": r === "medium" && i && !(t || a),
35
- "h-8": r === "medium" && i && (t || a),
36
- "h-12 py-2": r === "large" && i && !(t || a),
37
- "h-12": r === "large" && i && (t || a)
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-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
38
  });
39
39
  }
40
- }, re = ({
40
+ }, le = ({
41
41
  type: e,
42
42
  size: r,
43
43
  labelRight: t,
44
44
  labelLeft: a
45
45
  }) => {
46
- const l = "text-sm font-medium", i = "text-base font-medium", n = "text-lg font-medium";
46
+ const i = "text-sm font-medium", l = "text-base font-medium", n = "text-lg font-medium";
47
47
  switch (e) {
48
- case F:
49
- case M:
48
+ case Y:
49
+ case U:
50
50
  return o({
51
- "text-center": e === M,
52
- [l]: r === "small",
53
- [i]: r === "medium",
51
+ "text-center": e === U,
52
+ [i]: r === "small",
53
+ [l]: r === "medium",
54
54
  [n]: r === "large"
55
55
  });
56
- case L:
56
+ case H:
57
57
  return o({
58
- [l]: r === "small" && (t || a),
59
- [i]: r === "medium" && (t || a),
58
+ [i]: r === "small" && (t || a),
59
+ [l]: r === "medium" && (t || a),
60
60
  [n]: r === "large" && (t || a)
61
61
  });
62
62
  }
63
- }, ae = ({
63
+ }, ne = ({
64
64
  mode: e,
65
65
  noBackground: r,
66
66
  truncate: t,
@@ -96,7 +96,7 @@ const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te
96
96
  return o("not-prose text-copy-lighter", {
97
97
  truncate: t
98
98
  });
99
- }, oe = ({
99
+ }, ce = ({
100
100
  mode: e,
101
101
  noBackground: r,
102
102
  variant: t
@@ -126,13 +126,13 @@ const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te
126
126
  if (t === "selected")
127
127
  return "bg-action-selected-dark";
128
128
  }
129
- }, ie = ({
129
+ }, se = ({
130
130
  radius: e
131
131
  }) => o({
132
132
  "rounded-full": e === "large",
133
133
  "rounded-md": e === "medium",
134
134
  "rounded-xs": e === "small"
135
- }), le = ({
135
+ }), de = ({
136
136
  mode: e,
137
137
  disabled: r,
138
138
  variant: t
@@ -162,7 +162,7 @@ const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te
162
162
  });
163
163
  if (t === "selected")
164
164
  return "hover:text-copy-light-hover hover:bg-action-selected-dark-hover";
165
- }, ne = ({
165
+ }, ue = ({
166
166
  mode: e,
167
167
  disabled: r,
168
168
  variant: t
@@ -192,7 +192,7 @@ const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te
192
192
  });
193
193
  if (t === "selected")
194
194
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
195
- }, se = ({
195
+ }, be = ({
196
196
  mode: e,
197
197
  noBorder: r,
198
198
  variant: t
@@ -222,14 +222,14 @@ const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te
222
222
  });
223
223
  if (t === "selected")
224
224
  return "border border-border-selected-dark";
225
- }, ce = ({
225
+ }, ge = ({
226
226
  focusMode: e
227
227
  }) => o("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
228
228
  "focus:outline-focus-dark": e === "dark",
229
229
  "focus:outline-focus-light": e === "light",
230
230
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
231
231
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
232
- }), de = ({
232
+ }), me = ({
233
233
  mode: e,
234
234
  raw: r,
235
235
  iconClassName: t
@@ -241,91 +241,91 @@ const I = "av-bubble", A = "av-button", L = "icon", F = "button", M = "link", te
241
241
  "dark:text-copy-accent-dark": e === "system"
242
242
  },
243
243
  t
244
- ), be = ({
244
+ ), he = ({
245
245
  animated: e
246
246
  }) => o({
247
- "transition-opacity duration-300 ease-in": e
248
- }), ue = ({
247
+ "transition-opacity duration-300 ease-in-out": e
248
+ }), fe = ({
249
249
  type: e,
250
250
  className: r,
251
251
  raw: t,
252
252
  mode: a,
253
- focusMode: l,
254
- disabled: i,
253
+ focusMode: i,
254
+ disabled: l,
255
255
  fullWidth: n,
256
- size: c,
257
- noBorder: d,
258
- labelRight: h,
259
- labelLeft: v,
260
- noBackground: u,
256
+ size: d,
257
+ noBorder: u,
258
+ labelRight: v,
259
+ labelLeft: k,
260
+ noBackground: s,
261
261
  variant: b,
262
- truncate: m,
263
- align: w,
264
- radius: B,
265
- animated: g
266
- }) => (b || (b = "primary"), t ? o(A, r) : o(
267
- A,
268
- ae({
262
+ truncate: g,
263
+ align: _,
264
+ radius: I,
265
+ animated: m
266
+ }) => (b || (b = "primary"), t ? o(D, r) : o(
267
+ D,
268
+ ne({
269
269
  mode: a,
270
270
  variant: b,
271
- noBackground: u,
272
- truncate: m
271
+ noBackground: s,
272
+ truncate: g
273
273
  }),
274
- oe({ mode: a, noBackground: u, variant: b }),
275
- ie({ radius: B }),
276
- te({
274
+ ce({ mode: a, noBackground: s, variant: b }),
275
+ se({ radius: I }),
276
+ ie({
277
277
  type: e,
278
- size: c,
279
- labelRight: h,
280
- labelLeft: v,
281
- align: w,
282
- animated: g
278
+ size: d,
279
+ labelRight: v,
280
+ labelLeft: k,
281
+ align: _,
282
+ animated: m
283
283
  }),
284
- re({ type: e, size: c, labelRight: h, labelLeft: v }),
285
- se({ mode: a, variant: b, noBorder: d }),
286
- ce({ focusMode: l }),
287
- le({ mode: a, variant: b, disabled: i }),
288
- ne({ mode: a, variant: b, disabled: i }),
284
+ le({ type: e, size: d, labelRight: v, labelLeft: k }),
285
+ be({ mode: a, variant: b, noBorder: u }),
286
+ ge({ focusMode: i }),
287
+ de({ mode: a, variant: b, disabled: l }),
288
+ ue({ mode: a, variant: b, disabled: l }),
289
289
  {
290
290
  "w-full": n,
291
- "disabled:cursor-not-allowed disabled:opacity-50": i
291
+ "disabled:cursor-not-allowed disabled:opacity-50": l
292
292
  },
293
293
  o({
294
- "transition-[width] duration-300 ease-in-out": g
294
+ "transition-[width] duration-300 ease-in": m
295
295
  }),
296
296
  r
297
- )), ge = (e, r, t) => {
297
+ )), ve = (e, r, t) => {
298
298
  var a;
299
299
  !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);
300
- }, P = S.forwardRef((e, r) => {
301
- const { onClick: t, noInternalClick: a = !1, ...l } = e;
302
- return /* @__PURE__ */ s(
300
+ }, J = j.forwardRef((e, r) => {
301
+ const { onClick: t, noInternalClick: a = !1, ...i } = e;
302
+ return /* @__PURE__ */ c(
303
303
  "button",
304
304
  {
305
305
  ref: r,
306
- onClick: (i) => {
307
- ge(i, a, t);
306
+ onClick: (l) => {
307
+ ve(l, a, t);
308
308
  },
309
- ...l
309
+ ...i
310
310
  }
311
311
  );
312
312
  });
313
- P.displayName = "BaseButton";
314
- function me() {
313
+ J.displayName = "BaseButton";
314
+ function ye() {
315
315
  const e = N(!1);
316
- return V(() => (e.current = !0, () => {
316
+ return M(() => (e.current = !0, () => {
317
317
  e.current = !1;
318
- }), []), ee(() => e.current, []);
318
+ }), []), oe(() => e.current, []);
319
319
  }
320
- function he(e) {
321
- return D(() => e.every((r) => r == null) ? () => {
320
+ function pe(e) {
321
+ return W(() => e.every((r) => r == null) ? () => {
322
322
  } : (r) => {
323
323
  e.forEach((t) => {
324
324
  typeof t == "function" ? t(r) : t != null && (t.current = r);
325
325
  });
326
326
  }, e);
327
327
  }
328
- const fe = {
328
+ const ke = {
329
329
  x: 0,
330
330
  y: 0,
331
331
  width: 0,
@@ -335,147 +335,165 @@ const fe = {
335
335
  bottom: 0,
336
336
  right: 0
337
337
  };
338
- function T(e) {
339
- const r = me(), t = N(0), a = N(null), [l, i] = q(fe), n = D(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((c) => {
340
- const d = c[0];
341
- d && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
342
- a.current && r() && i(d.contentRect);
338
+ function O(e) {
339
+ const r = ye(), t = N(0), a = N(null), [i, l] = G(ke), n = W(() => typeof ResizeObserver > "u" ? null : new ResizeObserver((d) => {
340
+ const u = d[0];
341
+ u && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
342
+ a.current && r() && l(u.contentRect);
343
343
  }));
344
344
  }), [r]);
345
- return V(() => (a.current && (n == null || n.observe(a.current, e)), () => {
345
+ return M(() => (a.current && (n == null || n.observe(a.current, e)), () => {
346
346
  n == null || n.disconnect(), t.current && cancelAnimationFrame(t.current);
347
- }), [n, e]), [a, l];
347
+ }), [n, e]), [a, i];
348
348
  }
349
- const ve = {
349
+ const z = {
350
350
  small: 24,
351
351
  // w-6
352
352
  medium: 32,
353
353
  // w-8
354
354
  large: 48
355
355
  // w-12
356
- }, pe = {
356
+ }, xe = {
357
357
  small: 8 * 2,
358
358
  // px-2 x 2
359
359
  medium: 12 * 2,
360
360
  // px-3 x 2
361
361
  large: 16 * 2
362
362
  // px-4 x 2
363
- }, ye = 2, O = S.forwardRef(
363
+ }, we = 2, Be = 300, $ = j.forwardRef(
364
364
  ({
365
365
  children: e,
366
366
  disabled: r = !1,
367
367
  mode: t = "system",
368
368
  focusMode: a = "system",
369
- fullWidth: l = !1,
370
- className: i,
369
+ fullWidth: i = !1,
370
+ className: l,
371
371
  type: n = "button",
372
- raw: c = !1,
373
- noBorder: d = !1,
374
- "aria-label": h,
375
- label: v,
376
- size: u = "medium",
372
+ raw: d = !1,
373
+ noBorder: u = !1,
374
+ "aria-label": v,
375
+ label: k,
376
+ size: s = "medium",
377
377
  labelRight: b,
378
- labelLeft: m,
379
- noBackground: w = !1,
380
- align: B = "center",
381
- radius: g = "large",
382
- variant: C = "primary",
383
- iconClassName: W,
384
- animated: p = !1,
385
- ...X
386
- }, Z) => {
387
- const J = ue({
388
- type: L,
378
+ labelLeft: g,
379
+ noBackground: _ = !1,
380
+ align: I = "center",
381
+ radius: m = "large",
382
+ variant: T = "primary",
383
+ iconClassName: C,
384
+ animated: y = !1,
385
+ ...Q
386
+ }, X) => {
387
+ const Z = fe({
388
+ type: H,
389
389
  mode: t,
390
390
  focusMode: a,
391
- fullWidth: l,
391
+ fullWidth: i,
392
392
  disabled: r,
393
- raw: c,
394
- className: i,
395
- noBorder: d,
396
- size: u,
393
+ raw: d,
394
+ className: l,
395
+ noBorder: u,
396
+ size: s,
397
397
  labelRight: b,
398
- labelLeft: m,
399
- noBackground: w,
400
- align: B,
401
- radius: g,
402
- variant: C,
403
- animated: p
404
- }), K = de({ mode: t, raw: c, iconClassName: W }), U = be({ animated: p }), [f, z] = T(), [y, R] = T(), [_, j] = T(), E = N(0), k = N(null), Q = he([Z, k]);
405
- return $(() => {
406
- _ && _.current && p && (E.current = j.width + pe[u] + (d ? 0 : ye));
407
- }, [j, _, u, d, p]), $(() => {
408
- k && k.current && p && (b && f && z.width > 0 ? (f.current && (f.current.style.opacity = "100"), k.current.style.width = `${z.width + E.current}px`) : m && R.width > 0 ? (y.current && (y.current.style.opacity = "100"), k.current.style.width = `${R.width + E.current}px`) : (f.current && (f.current.style.opacity = "0"), y.current && (y.current.style.opacity = "0"), k.current.style.width = `${ve[u]}px`));
398
+ labelLeft: g,
399
+ noBackground: _,
400
+ align: I,
401
+ radius: m,
402
+ variant: T,
403
+ animated: y
404
+ }), ee = me({ mode: t, raw: d, iconClassName: C }), A = he({ animated: y }), te = "flex items-center justify-center relative w-full h-full overflow-hidden", [h, S] = O(), [f, V] = O(), [E, P] = O(), L = N(0), p = N(null), x = N(null), re = pe([X, p]);
405
+ return F(() => {
406
+ E && E.current && y && (L.current = P.width + xe[s] + (u ? 0 : we), p.current && !p.current.style.width && (p.current.style.width = `${z[s]}px`));
407
+ }, [P, E, s, u, y]), F(() => {
408
+ if (p && p.current && y) {
409
+ let w = z[s];
410
+ b && h && S.width > 0 ? w = S.width + L.current : g && f && V.width > 0 && (w = V.width + L.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[s] && (x.current = setTimeout(() => {
411
+ h.current && b && (h.current.style.opacity = "1"), f.current && g && (f.current.style.opacity = "1"), x.current = null;
412
+ }, Be * 0.8))), w === z[s] && (h.current && (h.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"));
413
+ }
409
414
  }, [
410
- z,
415
+ S,
411
416
  b,
417
+ h,
418
+ V,
419
+ g,
412
420
  f,
413
- R,
414
- m,
415
- y,
416
- u,
417
- p
418
- ]), /* @__PURE__ */ x(
419
- P,
421
+ s,
422
+ y
423
+ ]), M(() => () => {
424
+ x.current && clearTimeout(x.current);
425
+ }, []), /* @__PURE__ */ c(
426
+ J,
420
427
  {
421
- ref: Q,
422
- className: J,
428
+ ref: re,
429
+ className: Z,
423
430
  disabled: r,
424
431
  type: n,
425
- "aria-label": h || v,
426
- ...X,
427
- children: [
428
- /* @__PURE__ */ s(
429
- H,
432
+ "aria-label": v || k,
433
+ ...Q,
434
+ children: /* @__PURE__ */ B("div", { className: te, children: [
435
+ /* @__PURE__ */ c(
436
+ q,
430
437
  {
431
- label: m,
432
- labelRef: y,
433
- labelClass: U,
434
- labelInnerClass: "pr-2"
438
+ label: g,
439
+ labelRef: f,
440
+ labelClass: A,
441
+ labelInnerClass: "pr-2",
442
+ initiallyHidden: y
435
443
  }
436
444
  ),
437
- /* @__PURE__ */ s("span", { ref: _, className: K, children: e }),
438
- /* @__PURE__ */ s(
439
- H,
445
+ /* @__PURE__ */ c("span", { ref: E, className: ee, children: e }),
446
+ /* @__PURE__ */ c(
447
+ q,
440
448
  {
441
449
  label: b,
442
- labelRef: f,
443
- labelClass: U,
444
- labelInnerClass: "pl-2"
450
+ labelRef: h,
451
+ labelClass: A,
452
+ labelInnerClass: "pl-2",
453
+ initiallyHidden: y
445
454
  }
446
455
  )
447
- ]
456
+ ] })
448
457
  }
449
458
  );
450
459
  }
451
- ), H = ({
460
+ ), q = ({
452
461
  labelRef: e,
453
462
  labelClass: r,
454
463
  label: t,
455
- labelInnerClass: a
456
- }) => /* @__PURE__ */ s("span", { ref: e, className: r, children: t && /* @__PURE__ */ s("span", { className: a, children: t }) });
457
- O.displayName = "ButtonIcon";
464
+ labelInnerClass: a,
465
+ initiallyHidden: i = !1
466
+ }) => /* @__PURE__ */ c(
467
+ "span",
468
+ {
469
+ ref: e,
470
+ className: r,
471
+ style: i ? { opacity: 0 } : void 0,
472
+ children: t && /* @__PURE__ */ c("span", { className: a, children: t })
473
+ }
474
+ );
475
+ $.displayName = "ButtonIcon";
458
476
  /*!
459
- @versini/ui-button v6.0.5
477
+ @versini/ui-button v6.0.6
460
478
  © 2025 gizmette.com
461
479
  */
462
480
  try {
463
481
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
464
- version: "6.0.5",
465
- buildTime: "04/12/2025 09:18 AM EDT",
482
+ version: "6.0.6",
483
+ buildTime: "05/26/2025 03:48 PM EDT",
466
484
  homepage: "https://github.com/aversini/ui-components",
467
485
  license: "MIT"
468
486
  });
469
487
  } catch {
470
488
  }
471
- const ke = S.forwardRef(
489
+ const Ne = j.forwardRef(
472
490
  ({
473
491
  children: e,
474
492
  mode: r = "system",
475
493
  className: t,
476
494
  active: a = !1,
477
- ...l
478
- }, i) => {
495
+ ...i
496
+ }, l) => {
479
497
  const n = a ? o(
480
498
  "relative",
481
499
  "focus-within:static",
@@ -493,45 +511,45 @@ const ke = S.forwardRef(
493
511
  "after:border-table-light dark:after:border-table-dark": r === "alt-system"
494
512
  }
495
513
  ) : "";
496
- return /* @__PURE__ */ s("div", { className: n, children: /* @__PURE__ */ s(
497
- O,
514
+ return /* @__PURE__ */ c("div", { className: n, children: /* @__PURE__ */ c(
515
+ $,
498
516
  {
499
517
  className: o("justify-center", t),
500
- ref: i,
518
+ ref: l,
501
519
  mode: r,
502
520
  radius: "small",
503
- ...l,
521
+ ...i,
504
522
  children: e
505
523
  }
506
524
  ) });
507
525
  }
508
526
  );
509
- ke.displayName = "ButtonSort";
510
- const G = ({
527
+ Ne.displayName = "ButtonSort";
528
+ const K = ({
511
529
  children: e,
512
530
  fill: r,
513
531
  viewBox: t,
514
532
  className: a,
515
- defaultViewBox: l,
516
- size: i,
533
+ defaultViewBox: i,
534
+ size: l,
517
535
  title: n,
518
- semantic: c = !1,
519
- ...d
536
+ semantic: d = !1,
537
+ ...u
520
538
  }) => {
521
- const h = o(i, a);
522
- return /* @__PURE__ */ s(Y, { children: /* @__PURE__ */ x(
539
+ const v = o(l, a);
540
+ return /* @__PURE__ */ c(ae, { children: /* @__PURE__ */ B(
523
541
  "svg",
524
542
  {
525
543
  xmlns: "http://www.w3.org/2000/svg",
526
- className: h,
527
- viewBox: t || l,
544
+ className: v,
545
+ viewBox: t || i,
528
546
  fill: r || "currentColor",
529
547
  role: "img",
530
- "aria-hidden": !c,
548
+ "aria-hidden": !d,
531
549
  focusable: !1,
532
- ...d,
550
+ ...u,
533
551
  children: [
534
- n && c && /* @__PURE__ */ s("title", { children: n }),
552
+ n && d && /* @__PURE__ */ c("title", { children: n }),
535
553
  e
536
554
  ]
537
555
  }
@@ -544,86 +562,86 @@ const G = ({
544
562
  try {
545
563
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
546
564
  version: "4.2.0",
547
- buildTime: "04/05/2025 07:49 PM EDT",
565
+ buildTime: "05/17/2025 06:18 PM EDT",
548
566
  homepage: "https://github.com/aversini/ui-components",
549
567
  license: "MIT"
550
568
  });
551
569
  } catch {
552
570
  }
553
- const xe = ({
571
+ const _e = ({
554
572
  className: e,
555
573
  viewBox: r,
556
574
  title: t,
557
575
  monotone: a,
558
- ...l
559
- }) => /* @__PURE__ */ x(
560
- G,
576
+ ...i
577
+ }) => /* @__PURE__ */ B(
578
+ K,
561
579
  {
562
580
  defaultViewBox: "0 0 448 512",
563
581
  size: "size-5",
564
582
  viewBox: r,
565
583
  className: e,
566
584
  title: t || "Copied",
567
- ...l,
585
+ ...i,
568
586
  children: [
569
- /* @__PURE__ */ s(
587
+ /* @__PURE__ */ c(
570
588
  "path",
571
589
  {
572
590
  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",
573
591
  opacity: ".4"
574
592
  }
575
593
  ),
576
- /* @__PURE__ */ s("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" })
594
+ /* @__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" })
577
595
  ]
578
596
  }
579
- ), we = ({
597
+ ), Ie = ({
580
598
  className: e,
581
599
  viewBox: r,
582
600
  title: t,
583
601
  monotone: a,
584
- ...l
585
- }) => /* @__PURE__ */ s(
586
- G,
602
+ ...i
603
+ }) => /* @__PURE__ */ c(
604
+ K,
587
605
  {
588
606
  defaultViewBox: "0 0 512 512",
589
607
  size: "size-5",
590
608
  viewBox: r,
591
609
  className: e,
592
610
  title: t || "Copy",
593
- ...l,
594
- children: /* @__PURE__ */ s("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" })
611
+ ...i,
612
+ 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" })
595
613
  }
596
614
  );
597
615
  /*!
598
- @versini/ui-icons v4.9.0
616
+ @versini/ui-icons v4.10.0
599
617
  © 2025 gizmette.com
600
618
  */
601
619
  try {
602
620
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
603
- version: "4.9.0",
604
- buildTime: "04/05/2025 07:49 PM EDT",
621
+ version: "4.10.0",
622
+ buildTime: "05/17/2025 06:18 PM EDT",
605
623
  homepage: "https://github.com/aversini/ui-components",
606
624
  license: "MIT"
607
625
  });
608
626
  } catch {
609
627
  }
610
- const Be = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
628
+ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
611
629
  "max-w-xs sm:max-w-md md:max-w-2xl": !r,
612
630
  "lg:max-w-3xl": e === "left" && !r
613
- }), Ne = ({ kind: e }) => o({
631
+ }), Te = ({ kind: e }) => o({
614
632
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
615
633
  "bg-surface-accent": e === "right"
616
- }), _e = ({ kind: e }) => o(
634
+ }), Ee = ({ kind: e }) => o(
617
635
  "prose prose-dark dark:prose-lighter",
618
636
  "prose-blockquote:my-1",
619
637
  "prose-ol:my-1 prose-ul:my-1",
620
638
  {
621
639
  "text-copy-lighter": e === "right"
622
640
  }
623
- ), Ie = ({ kind: e, tail: r }) => {
641
+ ), ze = ({ kind: e, tail: r }) => {
624
642
  if (r)
625
643
  return o(
626
- `${I}-${e}-tail`,
644
+ `${R}-${e}-tail`,
627
645
  "rounded-3xl",
628
646
  "relative",
629
647
  "before:content-['']",
@@ -641,97 +659,101 @@ const Be = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
641
659
  "rounded-tr-xl": e === "left",
642
660
  "rounded-tl-xl": e === "right"
643
661
  });
644
- }, Ce = ({
662
+ }, Re = ({
645
663
  kind: e,
646
664
  className: r,
647
665
  contentClassName: t,
648
666
  noMaxWidth: a,
649
- tail: l
667
+ tail: i
650
668
  }) => {
651
- const i = o(
652
- I,
653
- `${I}-${e}`,
669
+ const l = o(
670
+ R,
671
+ `${R}-${e}`,
654
672
  "flex items-start",
655
673
  {
656
674
  "flex-row-reverse": e === "right"
657
675
  },
658
676
  r
659
677
  ), n = o(
660
- `${I}-content`,
678
+ `${R}-content`,
661
679
  "flex flex-col empty:hidden",
662
- Be({ kind: e, noMaxWidth: a }),
663
- _e({ kind: e }),
664
- Ne({ kind: e }),
665
- Ie({ kind: e, tail: l }),
680
+ Ce({ kind: e, noMaxWidth: a }),
681
+ Ee({ kind: e }),
682
+ Te({ kind: e }),
683
+ ze({ kind: e, tail: i }),
666
684
  t
667
- ), c = "pr-2 pt-1 text-end text-xs text-copy-light", d = o("flex flex-col-reverse sm:flex-row", {
668
- "ml-2": e === "left" && !l,
669
- "mr-2": e === "right" && !l,
670
- "ml-1": e === "left" && l,
671
- "mr-1": e === "right" && l
685
+ ), d = "pr-2 pt-1 text-end text-xs text-copy-light", u = o("flex flex-col-reverse sm:flex-row", {
686
+ "ml-2": e === "left" && !i,
687
+ "mr-2": e === "right" && !i,
688
+ "ml-1": e === "left" && i,
689
+ "mr-1": e === "right" && i
672
690
  });
673
691
  return {
674
- wrapper: i,
692
+ wrapper: l,
675
693
  main: n,
676
- footer: c,
677
- copyButton: d
694
+ footer: d,
695
+ copyButton: u
678
696
  };
679
- }, Te = ({
697
+ }, Me = "FOOTER_EMPTY", Oe = ({
680
698
  children: e,
681
699
  kind: r = "left",
682
700
  className: t,
683
701
  contentClassName: a,
684
- footer: l,
685
- rawFooter: i,
702
+ footer: i,
703
+ rawFooter: l,
686
704
  copyToClipboard: n,
687
- copyToClipboardFocusMode: c = "system",
688
- copyToClipboardMode: d = "system",
689
- noMaxWidth: h = !1,
690
- tail: v = !1
705
+ copyToClipboardFocusMode: d = "system",
706
+ copyToClipboardMode: u = "system",
707
+ noMaxWidth: v = !1,
708
+ tail: k = !1
691
709
  }) => {
692
- const [u, b] = q(!1), m = Ce({
710
+ const [s, b] = G(!1), g = Re({
693
711
  kind: r,
694
712
  className: t,
695
713
  contentClassName: a,
696
- noMaxWidth: h,
697
- tail: v
698
- }), w = !!n && (typeof n == "function" || typeof n == "string" || typeof e == "string"), B = () => {
714
+ noMaxWidth: v,
715
+ tail: k
716
+ }), _ = !!n && (typeof n == "function" || typeof n == "string" || typeof e == "string"), I = () => {
699
717
  b(!0), typeof n == "function" ? n(e) : typeof n == "string" ? navigator.clipboard.writeText(n) : typeof e == "string" && navigator.clipboard.writeText(e);
700
718
  };
701
- return V(() => {
702
- let g;
703
- return u && (g = window.setTimeout(() => {
719
+ return M(() => {
720
+ let m;
721
+ return s && (m = window.setTimeout(() => {
704
722
  b(!1);
705
723
  }, 3e3)), () => {
706
- clearTimeout(g);
724
+ clearTimeout(m);
707
725
  };
708
- }, [u]), /* @__PURE__ */ x("div", { className: m.wrapper, children: [
709
- /* @__PURE__ */ x("div", { children: [
710
- /* @__PURE__ */ s("div", { className: m.main, children: e }),
711
- l && Object.keys(l).map((g, C) => l[g] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ x("p", { className: m.footer, children: [
712
- g,
713
- ": ",
714
- l[g]
715
- ] }) }, `${g}-${C}`) : null),
716
- i && i
726
+ }, [s]), /* @__PURE__ */ B("div", { className: g.wrapper, children: [
727
+ /* @__PURE__ */ B("div", { children: [
728
+ /* @__PURE__ */ c("div", { className: g.main, children: e }),
729
+ i && Object.keys(i).map((m, T) => {
730
+ const C = i[m];
731
+ return C === Me ? /* @__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: " " }) }) }, `${m}-${T}`) : C ? /* @__PURE__ */ c("div", { className: "prose-p:m-0", children: /* @__PURE__ */ B("p", { className: g.footer, children: [
732
+ m,
733
+ ": ",
734
+ C
735
+ ] }) }, `${m}-${T}`) : null;
736
+ }),
737
+ l && l
717
738
  ] }),
718
- w && /* @__PURE__ */ s("div", { className: m.copyButton, children: /* @__PURE__ */ s(
719
- O,
739
+ _ && /* @__PURE__ */ c("div", { className: g.copyButton, children: /* @__PURE__ */ c(
740
+ $,
720
741
  {
721
742
  noBorder: !0,
722
743
  noBackground: !0,
723
744
  size: "small",
724
- mode: d,
725
- focusMode: c,
726
- label: u ? "Copied to clipboard" : "Copy to clipboard",
727
- onClick: B,
728
- disabled: u,
729
- children: u ? /* @__PURE__ */ s(xe, { size: "size-3" }) : /* @__PURE__ */ s(we, { size: "size-3" })
745
+ mode: u,
746
+ focusMode: d,
747
+ label: s ? "Copied to clipboard" : "Copy to clipboard",
748
+ onClick: I,
749
+ disabled: s,
750
+ children: s ? /* @__PURE__ */ c(_e, { size: "size-3" }) : /* @__PURE__ */ c(Ie, { size: "size-3" })
730
751
  }
731
752
  ) })
732
753
  ] });
733
754
  };
734
755
  export {
735
- I as BUBBLE_CLASSNAME,
736
- Te as Bubble
756
+ R as BUBBLE_CLASSNAME,
757
+ Me as BUBBLE_FOOTER_EMPTY,
758
+ Oe as Bubble
737
759
  };
package/dist/index.d.ts CHANGED
@@ -44,10 +44,14 @@ type BubbleProps = {
44
44
  * footer={{
45
45
  * "Sent": "12:00 PM",
46
46
  * "Delivered": "12:01 PM",
47
+ * "Verified": Bubble.FOOTER_EMPTY,
47
48
  * "Read": "12:02 PM",
48
49
  * }}
49
50
  * >Hello World</Bubble>
50
51
  * ```
52
+ * This will create a footer with 4 rows, with the row before last being
53
+ * empty but taking the full height of a normal row.
54
+ *
51
55
  */
52
56
  footer?: {
53
57
  [key: string]: string | number | undefined | null;
@@ -88,6 +92,7 @@ type BubbleProps = {
88
92
  tail?: boolean;
89
93
  };
90
94
 
95
+ declare const BUBBLE_FOOTER_EMPTY = "FOOTER_EMPTY";
91
96
  declare const Bubble: ({ children, kind, className, contentClassName, footer, rawFooter, copyToClipboard, copyToClipboardFocusMode, copyToClipboardMode, noMaxWidth, tail, }: BubbleProps) => react_jsx_runtime.JSX.Element;
92
97
 
93
- export { BUBBLE_CLASSNAME, Bubble };
98
+ export { BUBBLE_CLASSNAME, BUBBLE_FOOTER_EMPTY, Bubble };
package/dist/index.js CHANGED
@@ -1,18 +1,19 @@
1
- import { BUBBLE_CLASSNAME as o, Bubble as B } from "./components/Bubble/Bubble.js";
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 v4.0.6
3
+ @versini/ui-bubble v4.1.1
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
8
- version: "4.0.6",
9
- buildTime: "04/12/2025 09:18 AM EDT",
8
+ version: "4.1.1",
9
+ buildTime: "05/26/2025 03:48 PM EDT",
10
10
  homepage: "https://github.com/aversini/ui-components",
11
11
  license: "MIT"
12
12
  });
13
13
  } catch {
14
14
  }
15
15
  export {
16
- o as BUBBLE_CLASSNAME,
17
- B as Bubble
16
+ i as BUBBLE_CLASSNAME,
17
+ o as BUBBLE_FOOTER_EMPTY,
18
+ E as Bubble
18
19
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/ui-bubble",
3
- "version": "4.0.6",
3
+ "version": "4.1.1",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -39,17 +39,17 @@
39
39
  "react-dom": "^18.3.1 || ^19.0.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@versini/ui-types": "5.0.2"
42
+ "@versini/ui-types": "5.0.3"
43
43
  },
44
44
  "dependencies": {
45
45
  "@tailwindcss/typography": "0.5.16",
46
- "@versini/ui-button": "6.0.5",
47
- "@versini/ui-icons": "4.9.0",
46
+ "@versini/ui-button": "6.0.6",
47
+ "@versini/ui-icons": "4.10.0",
48
48
  "clsx": "2.1.1",
49
- "tailwindcss": "4.1.3"
49
+ "tailwindcss": "4.1.7"
50
50
  },
51
51
  "sideEffects": [
52
52
  "**/*.css"
53
53
  ],
54
- "gitHead": "1bc09c4f0904bd8c01a22b1a32299fdd7598ae32"
54
+ "gitHead": "863a399128080a19f2668e458d495110aa0f68f8"
55
55
  }