@viasat/beam-web-components 2.36.0 → 2.37.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.
@@ -14,7 +14,7 @@ const Qt = `:root,:host,.bm-light,.bm-dark .bm-inverse,.bm-dark.bm-inverse,[data
14
14
  right: "left",
15
15
  bottom: "top",
16
16
  top: "bottom"
17
- }, Re = {
17
+ }, _e = {
18
18
  start: "end",
19
19
  end: "start"
20
20
  };
@@ -48,12 +48,12 @@ function ee(e, t, i) {
48
48
  let s = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
49
49
  return t.reference[r] > t.floating[r] && (s = st(s)), [s, st(s)];
50
50
  }
51
- function _e(e) {
51
+ function Re(e) {
52
52
  const t = st(e);
53
53
  return [pt(e), t, pt(t)];
54
54
  }
55
55
  function pt(e) {
56
- return e.replace(/start|end/g, (t) => Re[t]);
56
+ return e.replace(/start|end/g, (t) => _e[t]);
57
57
  }
58
58
  function Le(e, t, i) {
59
59
  const n = ["left", "right"], o = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
@@ -360,13 +360,13 @@ const ke = function(e) {
360
360
  } = Z(e, t);
361
361
  if ((i = r.arrow) != null && i.alignmentOffset)
362
362
  return {};
363
- const u = $(o), y = Q(l), w = $(l) === l, O = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = d || (w || !g ? [st(l)] : _e(l)), D = b !== "none";
363
+ const u = $(o), y = Q(l), w = $(l) === l, O = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = d || (w || !g ? [st(l)] : Re(l)), D = b !== "none";
364
364
  !d && D && x.push(...Se(l, g, b, O));
365
- const P = [l, ...x], _ = await ot(t, h), T = [];
365
+ const P = [l, ...x], R = await ot(t, h), T = [];
366
366
  let C = ((n = r.flip) == null ? void 0 : n.overflows) || [];
367
- if (f && T.push(_[u]), p) {
367
+ if (f && T.push(R[u]), p) {
368
368
  const I = ee(o, s, O);
369
- T.push(_[I[0]], _[I[1]]);
369
+ T.push(R[I[0]], R[I[1]]);
370
370
  }
371
371
  if (C = [...C, {
372
372
  placement: o,
@@ -596,14 +596,14 @@ const Fe = function(e) {
596
596
  let h, u;
597
597
  p === "top" || p === "bottom" ? (h = p, u = d === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (u = p, h = d === "end" ? "top" : "bottom");
598
598
  const y = g - f.top - f.bottom, w = b - f.left - f.right, O = q(g - f[h], y), x = q(b - f[u], w), D = !t.middlewareData.shift;
599
- let P = O, _ = x;
600
- if ((i = t.middlewareData.shift) != null && i.enabled.x && (_ = w), (n = t.middlewareData.shift) != null && n.enabled.y && (P = y), D && !d) {
599
+ let P = O, R = x;
600
+ if ((i = t.middlewareData.shift) != null && i.enabled.x && (R = w), (n = t.middlewareData.shift) != null && n.enabled.y && (P = y), D && !d) {
601
601
  const C = S(f.left, 0), L = S(f.right, 0), j = S(f.top, 0), k = S(f.bottom, 0);
602
- m ? _ = b - 2 * (C !== 0 || L !== 0 ? C + L : S(f.left, f.right)) : P = g - 2 * (j !== 0 || k !== 0 ? j + k : S(f.top, f.bottom));
602
+ m ? R = b - 2 * (C !== 0 || L !== 0 ? C + L : S(f.left, f.right)) : P = g - 2 * (j !== 0 || k !== 0 ? j + k : S(f.top, f.bottom));
603
603
  }
604
604
  await c({
605
605
  ...t,
606
- availableWidth: _,
606
+ availableWidth: R,
607
607
  availableHeight: P
608
608
  });
609
609
  const T = await s.getDimensions(l.floating);
@@ -734,11 +734,11 @@ function se(e) {
734
734
  $: l
735
735
  };
736
736
  }
737
- function Rt(e) {
737
+ function _t(e) {
738
738
  return F(e) ? e : e.contextElement;
739
739
  }
740
740
  function et(e) {
741
- const t = Rt(e);
741
+ const t = _t(e);
742
742
  if (!V(t))
743
743
  return W(1);
744
744
  const i = t.getBoundingClientRect(), {
@@ -765,7 +765,7 @@ function Ve(e, t, i) {
765
765
  }
766
766
  function tt(e, t, i, n) {
767
767
  t === void 0 && (t = !1), i === void 0 && (i = !1);
768
- const o = e.getBoundingClientRect(), r = Rt(e);
768
+ const o = e.getBoundingClientRect(), r = _t(e);
769
769
  let s = W(1);
770
770
  t && (n ? F(n) && (s = et(n)) : s = et(e));
771
771
  const l = Ve(r, i, n) ? re(r) : W(0);
@@ -785,7 +785,7 @@ function tt(e, t, i, n) {
785
785
  y: a
786
786
  });
787
787
  }
788
- function _t(e, t) {
788
+ function Rt(e, t) {
789
789
  const i = ht(e).scrollLeft;
790
790
  return t ? t.left + i : tt(U(e)).left + i;
791
791
  }
@@ -793,7 +793,7 @@ function le(e, t, i) {
793
793
  i === void 0 && (i = !1);
794
794
  const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (i ? 0 : (
795
795
  // RTL <body> scrollbar.
796
- _t(e, n)
796
+ Rt(e, n)
797
797
  )), r = n.top + t.scrollTop;
798
798
  return {
799
799
  x: o,
@@ -832,7 +832,7 @@ function Ye(e) {
832
832
  }
833
833
  function Ke(e) {
834
834
  const t = U(e), i = ht(e), n = e.ownerDocument.body, o = S(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), r = S(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
835
- let s = -i.scrollLeft + _t(e);
835
+ let s = -i.scrollLeft + Rt(e);
836
836
  const l = -i.scrollTop;
837
837
  return M(n).direction === "rtl" && (s += S(t.clientWidth, n.clientWidth) - o), {
838
838
  width: o,
@@ -940,7 +940,7 @@ function Qe(e, t, i) {
940
940
  if ((nt(t) !== "body" || lt(o)) && (l = ht(t)), n) {
941
941
  const d = tt(t, !0, r, t);
942
942
  c.x = d.x + t.clientLeft, c.y = d.y + t.clientTop;
943
- } else o && (c.x = _t(o));
943
+ } else o && (c.x = Rt(o));
944
944
  const a = o && !n && !r ? le(o, l) : W(0), f = s.left + l.scrollLeft - c.x - a.x, p = s.top + l.scrollTop - c.y - a.y;
945
945
  return {
946
946
  x: f,
@@ -1062,7 +1062,7 @@ function no(e, t, i, n) {
1062
1062
  elementResize: s = typeof ResizeObserver == "function",
1063
1063
  layoutShift: l = typeof IntersectionObserver == "function",
1064
1064
  animationFrame: c = !1
1065
- } = n, a = Rt(e), f = o || r ? [...a ? rt(a) : [], ...rt(t)] : [];
1065
+ } = n, a = _t(e), f = o || r ? [...a ? rt(a) : [], ...rt(t)] : [];
1066
1066
  f.forEach((u) => {
1067
1067
  o && u.addEventListener("scroll", i, {
1068
1068
  passive: !0
@@ -1116,9 +1116,9 @@ const so = Fe, ro = ke, lo = Me, co = $e, ao = je, fo = Be, po = (e, t, i) => {
1116
1116
  if (a == null)
1117
1117
  return {};
1118
1118
  const p = oe(f), d = { x: i, y: n }, m = At(o), b = Ct(m), g = Ot(m), h = await s.getDimensions(a), u = m === "y", y = u ? "top" : "left", w = u ? "bottom" : "right", O = u ? "clientHeight" : "clientWidth", x = r.reference[g] + r.reference[m] - d[m] - r.floating[g], D = d[m] - r.reference[m], P = await ((Lt = s.getOffsetParent) == null ? void 0 : Lt.call(s, a));
1119
- let _ = P ? P[O] : 0;
1120
- (!_ || !await ((St = s.isElement) == null ? void 0 : St.call(s, P))) && (_ = l.floating[O] || r.floating[g]);
1121
- const T = x / 2 - D / 2, C = _ / 2 - h.width / 2 - 1, L = q(p[y], C), j = q(p[w], C), k = L, I = _ - h.width - j, Y = _ / 2 - h.width / 2 + T, X = yt(k, Y, I), K = !c.arrow && H(o) != null && Y !== X && r.reference[g] / 2 - (Y < k ? L : j) - h.width / 2 < 0, N = K ? Y < k ? Y - k : Y - I : 0, B = $(o), gt = ["top", "left"].includes(B) ? -1 : 1, de = h.height * gt, ue = bo({
1119
+ let R = P ? P[O] : 0;
1120
+ (!R || !await ((St = s.isElement) == null ? void 0 : St.call(s, P))) && (R = l.floating[O] || r.floating[g]);
1121
+ const T = x / 2 - D / 2, C = R / 2 - h.width / 2 - 1, L = q(p[y], C), j = q(p[w], C), k = L, I = R - h.width - j, Y = R / 2 - h.width / 2 + T, X = yt(k, Y, I), K = !c.arrow && H(o) != null && Y !== X && r.reference[g] / 2 - (Y < k ? L : j) - h.width / 2 < 0, N = K ? Y < k ? Y - k : Y - I : 0, B = $(o), gt = ["top", "left"].includes(B) ? -1 : 1, de = h.height * gt, ue = bo({
1122
1122
  placement: B,
1123
1123
  arrowHeight: h.height,
1124
1124
  arrowWidth: h.width,
@@ -1258,7 +1258,7 @@ const so = Fe, ro = ke, lo = Me, co = $e, ao = je, fo = Be, po = (e, t, i) => {
1258
1258
  f.left = n != null ? `${n}px` : "", f.top = o != null ? `${o}px` : "";
1259
1259
  const p = st(r);
1260
1260
  return f[p] = a, f;
1261
- }, vo = ".bm-floatingui{z-index:999;position:absolute;inset:unset;top:0;left:0;width:max-content}.bm-floatingui[popover]{overflow:unset;border:unset}.bm-floatingui__arrow{position:absolute;transform-origin:bottom center}.bm-floatingui__overlay{background:var(--bm-comp-dialog-color-overlay);padding:var(--bm-comp-dialog-space-viewport-offset);display:flex;justify-content:center;align-items:center;z-index:1}.bm-floatingui__overlay--transparent{background:transparent}.bm-floatingui__overlay:has(.bm-panel--contained){position:absolute!important;top:0;right:0;bottom:0;left:0;overflow:clip!important}";
1261
+ }, vo = ".bm-floatingui{z-index:999;position:absolute;inset:unset;top:0;left:0;width:max-content}.bm-floatingui[popover]{overflow:unset;border:unset}.bm-floatingui__arrow{position:absolute;transform-origin:bottom center}.bm-floatingui__overlay{background:var(--bm-comp-dialog-color-overlay);padding:var(--bm-comp-dialog-space-viewport-offset);display:flex;justify-content:center;align-items:center;z-index:1}.bm-floatingui__overlay--transparent{background:transparent}.bm-floatingui__overlay:has(.bm-dialog){background-color:transparent;transition:background-color .25s cubic-bezier(.33,0,.67,1)}@media (prefers-reduced-motion: reduce){.bm-floatingui__overlay:has(.bm-dialog){transition:none}}.bm-floatingui__overlay:has(.bm-dialog[data-status=open]){background-color:var(--bm-comp-dialog-color-overlay)}.bm-floatingui__overlay:has(.bm-panel--contained){position:absolute!important;top:0;right:0;bottom:0;left:0;overflow:clip!important}";
1262
1262
  class yo {
1263
1263
  constructor(t) {
1264
1264
  this.eventMap = /* @__PURE__ */ new Map(), this.elements = /* @__PURE__ */ new Map(), t.addController(this);
@@ -1483,7 +1483,7 @@ const xo = (e) => {
1483
1483
  Ee()
1484
1484
  ], t.prototype, "_isOpen"), t;
1485
1485
  };
1486
- var Co = Object.defineProperty, R = (e, t, i, n) => {
1486
+ var Co = Object.defineProperty, _ = (e, t, i, n) => {
1487
1487
  for (var o = void 0, r = e.length - 1, s; r >= 0; r--)
1488
1488
  (s = e[r]) && (o = s(t, i, o) || o);
1489
1489
  return o && Co(t, i, o), o;
@@ -1711,46 +1711,46 @@ const {
1711
1711
  `
1712
1712
  ];
1713
1713
  let t = i;
1714
- return R([
1714
+ return _([
1715
1715
  v({ type: Boolean })
1716
- ], t.prototype, "hideArrow"), R([
1716
+ ], t.prototype, "hideArrow"), _([
1717
1717
  v({ type: String })
1718
- ], t.prototype, "placement"), R([
1718
+ ], t.prototype, "placement"), _([
1719
1719
  v({ type: Object })
1720
- ], t.prototype, "autoPlacement"), R([
1720
+ ], t.prototype, "autoPlacement"), _([
1721
1721
  v({ type: Object })
1722
- ], t.prototype, "flip"), R([
1722
+ ], t.prototype, "flip"), _([
1723
1723
  v({ type: Object })
1724
- ], t.prototype, "shift"), R([
1724
+ ], t.prototype, "shift"), _([
1725
1725
  v({ type: Object })
1726
- ], t.prototype, "autoHiding"), R([
1726
+ ], t.prototype, "autoHiding"), _([
1727
1727
  v({ type: Object })
1728
- ], t.prototype, "middleware"), R([
1728
+ ], t.prototype, "middleware"), _([
1729
1729
  v({ type: Boolean })
1730
- ], t.prototype, "defaultOpen"), R([
1730
+ ], t.prototype, "defaultOpen"), _([
1731
1731
  v({ type: Number })
1732
- ], t.prototype, "showDelay"), R([
1732
+ ], t.prototype, "showDelay"), _([
1733
1733
  v({ type: Number })
1734
- ], t.prototype, "hideDelay"), R([
1734
+ ], t.prototype, "hideDelay"), _([
1735
1735
  v({ type: Boolean, converter: Jt })
1736
- ], t.prototype, "popoverAPI"), R([
1736
+ ], t.prototype, "popoverAPI"), _([
1737
1737
  v({ type: Boolean })
1738
- ], t.prototype, "disableAutoAria"), R([
1738
+ ], t.prototype, "disableAutoAria"), _([
1739
1739
  v({ type: String })
1740
- ], t.prototype, "autoDescribedById"), R([
1740
+ ], t.prototype, "autoDescribedById"), _([
1741
1741
  v()
1742
- ], t.prototype, "offset"), R([
1742
+ ], t.prototype, "offset"), _([
1743
1743
  v({ type: Boolean })
1744
- ], t.prototype, "openOnClick"), R([
1744
+ ], t.prototype, "openOnClick"), _([
1745
1745
  v({ type: Boolean })
1746
- ], t.prototype, "openOnHover"), R([
1746
+ ], t.prototype, "openOnHover"), _([
1747
1747
  v({ type: Boolean })
1748
1748
  ], t.prototype, "openOnFocus"), t;
1749
1749
  };
1750
- var Ro = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, Lo = Object.getPrototypeOf, So = Reflect.get, E = (e, t, i, n) => {
1751
- for (var o = n > 1 ? void 0 : n ? _o(t, i) : t, r = e.length - 1, s; r >= 0; r--)
1750
+ var _o = Object.defineProperty, Ro = Object.getOwnPropertyDescriptor, Lo = Object.getPrototypeOf, So = Reflect.get, E = (e, t, i, n) => {
1751
+ for (var o = n > 1 ? void 0 : n ? Ro(t, i) : t, r = e.length - 1, s; r >= 0; r--)
1752
1752
  (s = e[r]) && (o = (n ? s(t, i, o) : s(o)) || o);
1753
- return n && o && Ro(t, i, o), o;
1753
+ return n && o && _o(t, i, o), o;
1754
1754
  }, pe = (e, t, i) => So(Lo(e), i, t);
1755
1755
  const { subElementClassPrefix: me, baseClassNamePrefix: zo } = Zt("tooltip");
1756
1756
  let A = class extends Po(qt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viasat/beam-web-components",
3
- "version": "2.36.0",
3
+ "version": "2.37.0",
4
4
  "description": "Framework-agnostic web components for the Beam Design System built with Lit, compatible with Angular, Vue, Svelte, and vanilla JavaScript",
5
5
  "license": "MIT",
6
6
  "author": "Viasat",
@@ -64,11 +64,11 @@
64
64
  "access": "public"
65
65
  },
66
66
  "dependencies": {
67
- "@viasat/beam-fonts": "2.36.0",
68
- "@viasat/beam-shared": "2.36.0",
69
- "@viasat/beam-styles": "2.36.0",
70
- "@viasat/beam-tokens": "2.36.0",
71
- "@viasat/beam-icons": "2.36.0",
67
+ "@viasat/beam-fonts": "2.37.0",
68
+ "@viasat/beam-shared": "2.37.0",
69
+ "@viasat/beam-styles": "2.37.0",
70
+ "@viasat/beam-tokens": "2.37.0",
71
+ "@viasat/beam-icons": "2.37.0",
72
72
  "clsx": "^1.2.1",
73
73
  "lit": "^3.1.0",
74
74
  "@lit/context": "^1.1.1",