@versini/ui-bubble 5.0.0 → 5.0.2

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.
@@ -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", u = "max-h-12 py-2 px-4";
12
+ const s = "max-h-8 py-0 px-2", d = "max-h-9 h-8 px-3", m = "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
- [u]: r === "large"
19
+ [m]: r === "large"
20
20
  });
21
21
  case j:
22
22
  return o("flex items-center", {
@@ -24,7 +24,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
24
24
  "justify-start": i === "left",
25
25
  "justify-end": i === "right",
26
26
  "h-6 w-6 p-0": r === "small" && !l && !(t || a),
27
- "h-6 px-2": r === "small" && !l && (t || a),
27
+ "h-6 px-1 sm:px-2": r === "small" && !l && (t || a),
28
28
  "h-8 w-8 p-1": r === "medium" && !l && !(t || a),
29
29
  "h-8 px-3": r === "medium" && !l && (t || a),
30
30
  "h-12 w-12 p-2": r === "large" && !l && !(t || a),
@@ -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
- }, ue = ({
173
+ }, me = ({
174
174
  mode: e,
175
175
  disabled: r,
176
176
  variant: t
@@ -208,7 +208,7 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
208
208
  });
209
209
  if (t === "selected")
210
210
  return "active:text-copy-lighter-active active:bg-action-selected-dark-active";
211
- }, me = ({
211
+ }, ue = ({
212
212
  mode: e,
213
213
  noBorder: r,
214
214
  variant: t
@@ -285,24 +285,24 @@ 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: u,
288
+ noBorder: m,
289
289
  labelRight: y,
290
290
  labelLeft: k,
291
291
  noBackground: c,
292
- variant: m,
292
+ variant: u,
293
293
  truncate: g,
294
294
  align: _,
295
295
  radius: I,
296
296
  animated: b
297
- }) => (m || (m = "primary"), t ? o(q, r) : o(
297
+ }) => (u || (u = "primary"), t ? o(q, r) : o(
298
298
  q,
299
299
  se({
300
300
  mode: a,
301
- variant: m,
301
+ variant: u,
302
302
  noBackground: c,
303
303
  truncate: g
304
304
  }),
305
- ne({ mode: a, noBackground: c, variant: m }),
305
+ ne({ mode: a, noBackground: c, variant: u }),
306
306
  ce({ radius: I }),
307
307
  oe({
308
308
  type: e,
@@ -313,10 +313,10 @@ const R = "av-bubble", q = "av-button", j = "icon", Y = "button", L = "link", oe
313
313
  animated: b
314
314
  }),
315
315
  le({ type: e, size: d, labelRight: y, labelLeft: k }),
316
- me({ mode: a, variant: m, noBorder: u }),
316
+ ue({ mode: a, variant: u, noBorder: m }),
317
317
  ge({ focusMode: i }),
318
- de({ mode: a, variant: m, disabled: l }),
319
- ue({ mode: a, variant: m, disabled: l }),
318
+ de({ mode: a, variant: u, disabled: l }),
319
+ me({ mode: a, variant: u, disabled: l }),
320
320
  {
321
321
  "w-full": s,
322
322
  "disabled:cursor-not-allowed disabled:opacity-50": l
@@ -367,9 +367,9 @@ const ke = {
367
367
  };
368
368
  function O(e) {
369
369
  const r = ve(), t = N(0), a = N(null), [i, l] = G(ke), 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);
370
+ const m = d[0];
371
+ m && (cancelAnimationFrame(t.current), t.current = requestAnimationFrame(() => {
372
+ a.current && r() && l(m.contentRect);
373
373
  }));
374
374
  }), [r]);
375
375
  return M(() => (a.current && s?.observe(a.current, e), () => {
@@ -400,11 +400,11 @@ const z = {
400
400
  className: l,
401
401
  type: s = "button",
402
402
  raw: d = !1,
403
- noBorder: u = !1,
403
+ noBorder: m = !1,
404
404
  "aria-label": y,
405
405
  label: k,
406
406
  size: c = "medium",
407
- labelRight: m,
407
+ labelRight: u,
408
408
  labelLeft: g,
409
409
  noBackground: _ = !1,
410
410
  align: I = "center",
@@ -422,9 +422,9 @@ const z = {
422
422
  disabled: r,
423
423
  raw: d,
424
424
  className: l,
425
- noBorder: u,
425
+ noBorder: m,
426
426
  size: c,
427
- labelRight: m,
427
+ labelRight: u,
428
428
  labelLeft: g,
429
429
  noBackground: _,
430
430
  align: I,
@@ -433,17 +433,17 @@ const z = {
433
433
  animated: v
434
434
  }), ee = be({ mode: t, raw: d, iconClassName: T, variant: C }), A = he({ animated: v }), te = "flex items-center justify-center relative w-full h-full overflow-hidden", [h, $] = O(), [f, S] = O(), [E, P] = O(), V = N(0), p = N(null), x = N(null), re = pe([X, p]);
435
435
  return F(() => {
436
- E && E.current && v && (V.current = P.width + xe[c] + (u ? 0 : we), p.current && !p.current.style.width && (p.current.style.width = `${z[c]}px`));
437
- }, [P, E, c, u, v]), F(() => {
436
+ E && E.current && v && (V.current = P.width + xe[c] + (m ? 0 : we), p.current && !p.current.style.width && (p.current.style.width = `${z[c]}px`));
437
+ }, [P, E, c, m, v]), F(() => {
438
438
  if (p && p.current && v) {
439
439
  let w = z[c];
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[c] && (x.current = setTimeout(() => {
441
- h.current && m && (h.current.style.opacity = "1"), f.current && g && (f.current.style.opacity = "1"), x.current = null;
440
+ u && 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[c] && (x.current = setTimeout(() => {
441
+ h.current && u && (h.current.style.opacity = "1"), f.current && g && (f.current.style.opacity = "1"), x.current = null;
442
442
  }, Be * 0.8))), w === z[c] && (h.current && (h.current.style.opacity = "0"), f.current && (f.current.style.opacity = "0"));
443
443
  }
444
444
  }, [
445
445
  $,
446
- m,
446
+ u,
447
447
  h,
448
448
  S,
449
449
  g,
@@ -476,7 +476,7 @@ const z = {
476
476
  /* @__PURE__ */ n(
477
477
  D,
478
478
  {
479
- label: m,
479
+ label: u,
480
480
  labelRef: h,
481
481
  labelClass: A,
482
482
  labelInnerClass: "pl-2",
@@ -504,13 +504,13 @@ const z = {
504
504
  );
505
505
  H.displayName = "ButtonIcon";
506
506
  /*!
507
- @versini/ui-button v7.0.0
507
+ @versini/ui-button v7.1.1
508
508
  © 2025 gizmette.com
509
509
  */
510
510
  try {
511
511
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
512
- version: "7.0.0",
513
- buildTime: "08/07/2025 04:11 PM EDT",
512
+ version: "7.1.1",
513
+ buildTime: "08/10/2025 01:26 PM EDT",
514
514
  homepage: "https://github.com/aversini/ui-components",
515
515
  license: "MIT"
516
516
  });
@@ -544,10 +544,12 @@ const Ne = U.forwardRef(
544
544
  return /* @__PURE__ */ n("div", { className: s, children: /* @__PURE__ */ n(
545
545
  H,
546
546
  {
547
- className: o("justify-center", t),
547
+ className: t,
548
548
  ref: l,
549
549
  mode: r,
550
550
  radius: "small",
551
+ size: "small",
552
+ align: "center",
551
553
  ...i,
552
554
  children: e
553
555
  }
@@ -564,7 +566,7 @@ const K = ({
564
566
  size: l,
565
567
  title: s,
566
568
  semantic: d = !1,
567
- ...u
569
+ ...m
568
570
  }) => {
569
571
  const y = o(l, a);
570
572
  return /* @__PURE__ */ n(ae, { children: /* @__PURE__ */ B(
@@ -577,7 +579,7 @@ const K = ({
577
579
  role: "img",
578
580
  "aria-hidden": !d,
579
581
  focusable: !1,
580
- ...u,
582
+ ...m,
581
583
  children: [
582
584
  s && d && /* @__PURE__ */ n("title", { children: s }),
583
585
  e
@@ -712,7 +714,7 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
712
714
  Te({ kind: e }),
713
715
  ze({ kind: e, tail: i }),
714
716
  t
715
- ), d = "pr-2 pt-1 text-end text-xs text-copy-light", u = o("flex flex-col-reverse sm:flex-row", {
717
+ ), d = "pr-2 pt-1 text-end text-xs text-copy-light", m = o("flex flex-col-reverse sm:flex-row", {
716
718
  "ml-2": e === "left" && !i,
717
719
  "mr-2": e === "right" && !i,
718
720
  "ml-1": e === "left" && i,
@@ -722,7 +724,7 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
722
724
  wrapper: l,
723
725
  main: s,
724
726
  footer: d,
725
- copyButton: u
727
+ copyButton: m
726
728
  };
727
729
  }, Me = "FOOTER_EMPTY", Oe = ({
728
730
  children: e,
@@ -733,23 +735,23 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
733
735
  rawFooter: l,
734
736
  copyToClipboard: s,
735
737
  copyToClipboardFocusMode: d = "system",
736
- copyToClipboardMode: u = "system",
738
+ copyToClipboardMode: m = "system",
737
739
  noMaxWidth: y = !1,
738
740
  tail: k = !1
739
741
  }) => {
740
- const [c, m] = G(!1), g = Re({
742
+ const [c, u] = G(!1), g = Re({
741
743
  kind: r,
742
744
  className: t,
743
745
  contentClassName: a,
744
746
  noMaxWidth: y,
745
747
  tail: k
746
748
  }), _ = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), I = () => {
747
- m(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
749
+ u(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
748
750
  };
749
751
  return M(() => {
750
752
  let b;
751
753
  return c && (b = window.setTimeout(() => {
752
- m(!1);
754
+ u(!1);
753
755
  }, 3e3)), () => {
754
756
  clearTimeout(b);
755
757
  };
@@ -772,7 +774,7 @@ const Ce = ({ kind: e, noMaxWidth: r }) => o("px-4 py-2", {
772
774
  noBorder: !0,
773
775
  noBackground: !0,
774
776
  size: "small",
775
- mode: u,
777
+ mode: m,
776
778
  focusMode: d,
777
779
  label: c ? "Copied to clipboard" : "Copy to clipboard",
778
780
  onClick: I,
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.0
3
+ @versini/ui-bubble v5.0.2
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
8
- version: "5.0.0",
9
- buildTime: "08/07/2025 04:12 PM EDT",
8
+ version: "5.0.2",
9
+ buildTime: "08/10/2025 01:26 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.0",
3
+ "version": "5.0.2",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@tailwindcss/typography": "0.5.16",
48
- "@versini/ui-button": "7.0.0",
48
+ "@versini/ui-button": "7.1.1",
49
49
  "@versini/ui-icons": "4.10.0",
50
50
  "clsx": "2.1.1",
51
51
  "tailwindcss": "4.1.11"
@@ -53,5 +53,5 @@
53
53
  "sideEffects": [
54
54
  "**/*.css"
55
55
  ],
56
- "gitHead": "42daab1fb88c366495abbc1db78a9987de05e59b"
56
+ "gitHead": "381a563cd0bb01eeddea33e57c0f5705663b5be4"
57
57
  }