@orangelogic/design-system 2.19.0-pr77234.3 → 2.19.0-pr77248.4
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,11 +1,11 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { r as
|
|
1
|
+
import { a as _e, i as Vt, r as ze, x as j, n as v, C as Be, c as Ie } from "../chunks/custom-element.fmLrnDZr.js";
|
|
2
|
+
import { r as Me } from "../chunks/state.Dt9F_SuS.js";
|
|
3
3
|
import { e as ut } from "../chunks/query.BBf1UFkC.js";
|
|
4
4
|
import { e as He } from "../chunks/base.D76d76ww.js";
|
|
5
5
|
import { o as Tt } from "../chunks/if-defined.CKupVaWs.js";
|
|
6
6
|
import { o as se } from "../chunks/style-map.lEJHEwk3.js";
|
|
7
7
|
import { i as Lt, p as ne, f as We, a as qe } from "../chunks/browser.Va59Ix3P.js";
|
|
8
|
-
import { c as
|
|
8
|
+
import { c as ye } from "../chunks/component.styles.DtouHn2g.js";
|
|
9
9
|
import { L as Ve } from "../chunks/i18n.C6c6_pqI.js";
|
|
10
10
|
import { e as Dt } from "../chunks/class-map.DqNfBvJI.js";
|
|
11
11
|
import { n as Ue } from "../chunks/when.Dr1es41R.js";
|
|
@@ -77,7 +77,7 @@ function Ke(e) {
|
|
|
77
77
|
}
|
|
78
78
|
return t;
|
|
79
79
|
}
|
|
80
|
-
class Xe extends Ke(
|
|
80
|
+
class Xe extends Ke(_e) {
|
|
81
81
|
}
|
|
82
82
|
function Ge(e, t, o) {
|
|
83
83
|
const i = e.getAttribute(t);
|
|
@@ -305,7 +305,7 @@ class ht extends Xe {
|
|
|
305
305
|
document.dispatchEvent(t);
|
|
306
306
|
}
|
|
307
307
|
static async open(t, o, i, s) {
|
|
308
|
-
await Promise.resolve().then(() =>
|
|
308
|
+
await Promise.resolve().then(() => Ne);
|
|
309
309
|
const r = arguments.length === 2, n = i || t, a = new this();
|
|
310
310
|
let l = !1;
|
|
311
311
|
a.dispose = () => {
|
|
@@ -345,7 +345,7 @@ class ht extends Xe {
|
|
|
345
345
|
t.delayed = !!o.delayed, t.receivesFocus = o.receivesFocus ?? "auto", t.triggerElement = o.trigger || null, t.type = o.type || "modal", t.offset = o.offset ?? 0, t.placement = o.placement, t.willPreventClose = !!o.notImmediatelyClosable;
|
|
346
346
|
}
|
|
347
347
|
}
|
|
348
|
-
const
|
|
348
|
+
const ve = Symbol("element resolver updated");
|
|
349
349
|
class hi {
|
|
350
350
|
constructor(t, { selector: o } = { selector: "" }) {
|
|
351
351
|
this._element = null, this._selector = "", this.mutationCallback = (i) => {
|
|
@@ -373,7 +373,7 @@ class hi {
|
|
|
373
373
|
if (t === this.element)
|
|
374
374
|
return;
|
|
375
375
|
const o = this.element;
|
|
376
|
-
this._element = t, this.host.requestUpdate(
|
|
376
|
+
this._element = t, this.host.requestUpdate(ve, o);
|
|
377
377
|
}
|
|
378
378
|
get selector() {
|
|
379
379
|
return this._selector;
|
|
@@ -877,7 +877,7 @@ function Z(e) {
|
|
|
877
877
|
function at(e) {
|
|
878
878
|
return e.split("-")[1];
|
|
879
879
|
}
|
|
880
|
-
function
|
|
880
|
+
function be(e) {
|
|
881
881
|
return e === "x" ? "y" : "x";
|
|
882
882
|
}
|
|
883
883
|
function Jt(e) {
|
|
@@ -888,7 +888,7 @@ function Y(e) {
|
|
|
888
888
|
return wi.has(Z(e)) ? "y" : "x";
|
|
889
889
|
}
|
|
890
890
|
function Zt(e) {
|
|
891
|
-
return
|
|
891
|
+
return be(Y(e));
|
|
892
892
|
}
|
|
893
893
|
function xi(e, t, o) {
|
|
894
894
|
o === void 0 && (o = !1);
|
|
@@ -933,7 +933,7 @@ function Si(e) {
|
|
|
933
933
|
...e
|
|
934
934
|
};
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function we(e) {
|
|
937
937
|
return typeof e != "number" ? Si(e) : {
|
|
938
938
|
top: e,
|
|
939
939
|
right: e,
|
|
@@ -1084,7 +1084,7 @@ async function dt(e, t) {
|
|
|
1084
1084
|
elementContext: d = "floating",
|
|
1085
1085
|
altBoundary: u = !1,
|
|
1086
1086
|
padding: p = 0
|
|
1087
|
-
} = st(t, e), f =
|
|
1087
|
+
} = st(t, e), f = we(p), m = a[u ? d === "floating" ? "reference" : "floating" : d], y = Et(await r.getClippingRect({
|
|
1088
1088
|
element: (o = await (r.isElement == null ? void 0 : r.isElement(m))) == null || o ? m : m.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(a.floating)),
|
|
1089
1089
|
boundary: c,
|
|
1090
1090
|
rootBoundary: h,
|
|
@@ -1131,7 +1131,7 @@ const Ti = (e) => ({
|
|
|
1131
1131
|
} = st(e, t) || {};
|
|
1132
1132
|
if (c == null)
|
|
1133
1133
|
return {};
|
|
1134
|
-
const d =
|
|
1134
|
+
const d = we(h), u = {
|
|
1135
1135
|
x: o,
|
|
1136
1136
|
y: i
|
|
1137
1137
|
}, p = Zt(s), f = Jt(p), g = await n.getDimensions(c), m = p === "y", y = m ? "top" : "left", x = m ? "bottom" : "right", E = m ? "clientHeight" : "clientWidth", C = r.reference[f] + r.reference[p] - u[p] - r.floating[f], P = u[p] - r.reference[p], F = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(c));
|
|
@@ -1213,7 +1213,7 @@ const Ti = (e) => ({
|
|
|
1213
1213
|
Q === "y";
|
|
1214
1214
|
}
|
|
1215
1215
|
return !0;
|
|
1216
|
-
}).map(($) => [$.placement, $.overflows.filter((Q) => Q > 0).reduce((Q,
|
|
1216
|
+
}).map(($) => [$.placement, $.overflows.filter((Q) => Q > 0).reduce((Q, $e) => Q + $e, 0)]).sort(($, Q) => $[1] - Q[1])[0]) == null ? void 0 : G[0];
|
|
1217
1217
|
N && (U = N);
|
|
1218
1218
|
break;
|
|
1219
1219
|
}
|
|
@@ -1362,7 +1362,7 @@ const Ni = function(e) {
|
|
|
1362
1362
|
} = st(e, t), c = {
|
|
1363
1363
|
x: o,
|
|
1364
1364
|
y: i
|
|
1365
|
-
}, h = await dt(t, l), d = Y(Z(s)), u =
|
|
1365
|
+
}, h = await dt(t, l), d = Y(Z(s)), u = be(d);
|
|
1366
1366
|
let p = c[u], f = c[d];
|
|
1367
1367
|
if (r) {
|
|
1368
1368
|
const m = u === "y" ? "top" : "left", y = u === "y" ? "bottom" : "right", x = p + h[m], E = p - h[y];
|
|
@@ -1435,7 +1435,7 @@ function Ct() {
|
|
|
1435
1435
|
return typeof window < "u";
|
|
1436
1436
|
}
|
|
1437
1437
|
function lt(e) {
|
|
1438
|
-
return
|
|
1438
|
+
return xe(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1439
1439
|
}
|
|
1440
1440
|
function L(e) {
|
|
1441
1441
|
var t;
|
|
@@ -1443,9 +1443,9 @@ function L(e) {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
function q(e) {
|
|
1445
1445
|
var t;
|
|
1446
|
-
return (t = (
|
|
1446
|
+
return (t = (xe(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function xe(e) {
|
|
1449
1449
|
return Ct() ? e instanceof Node || e instanceof L(e).Node : !1;
|
|
1450
1450
|
}
|
|
1451
1451
|
function z(e) {
|
|
@@ -1528,14 +1528,14 @@ function tt(e) {
|
|
|
1528
1528
|
);
|
|
1529
1529
|
return fe(t) ? t.host : t;
|
|
1530
1530
|
}
|
|
1531
|
-
function
|
|
1531
|
+
function Ee(e) {
|
|
1532
1532
|
const t = tt(e);
|
|
1533
|
-
return rt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && gt(t) ? t :
|
|
1533
|
+
return rt(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && gt(t) ? t : Ee(t);
|
|
1534
1534
|
}
|
|
1535
1535
|
function pt(e, t, o) {
|
|
1536
1536
|
var i;
|
|
1537
1537
|
t === void 0 && (t = []), o === void 0 && (o = !0);
|
|
1538
|
-
const s =
|
|
1538
|
+
const s = Ee(e), r = s === ((i = e.ownerDocument) == null ? void 0 : i.body), n = L(s);
|
|
1539
1539
|
if (r) {
|
|
1540
1540
|
const a = Bt(n);
|
|
1541
1541
|
return t.concat(n, n.visualViewport || [], gt(s) ? s : [], a && o ? pt(a) : []);
|
|
@@ -1545,7 +1545,7 @@ function pt(e, t, o) {
|
|
|
1545
1545
|
function Bt(e) {
|
|
1546
1546
|
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function Pe(e) {
|
|
1549
1549
|
const t = B(e);
|
|
1550
1550
|
let o = parseFloat(t.width) || 0, i = parseFloat(t.height) || 0;
|
|
1551
1551
|
const s = W(e), r = s ? e.offsetWidth : o, n = s ? e.offsetHeight : i, a = wt(o) !== r || wt(i) !== n;
|
|
@@ -1566,7 +1566,7 @@ function nt(e) {
|
|
|
1566
1566
|
width: i,
|
|
1567
1567
|
height: s,
|
|
1568
1568
|
$: r
|
|
1569
|
-
} =
|
|
1569
|
+
} = Pe(t);
|
|
1570
1570
|
let n = (r ? wt(o.width) : o.width) / i, a = (r ? wt(o.height) : o.height) / s;
|
|
1571
1571
|
return (!n || !Number.isFinite(n)) && (n = 1), (!a || !Number.isFinite(a)) && (a = 1), {
|
|
1572
1572
|
x: n,
|
|
@@ -1574,7 +1574,7 @@ function nt(e) {
|
|
|
1574
1574
|
};
|
|
1575
1575
|
}
|
|
1576
1576
|
const ji = /* @__PURE__ */ H(0);
|
|
1577
|
-
function
|
|
1577
|
+
function Ce(e) {
|
|
1578
1578
|
const t = L(e);
|
|
1579
1579
|
return !te() || !t.visualViewport ? ji : {
|
|
1580
1580
|
x: t.visualViewport.offsetLeft,
|
|
@@ -1589,7 +1589,7 @@ function ot(e, t, o, i) {
|
|
|
1589
1589
|
const s = e.getBoundingClientRect(), r = ee(e);
|
|
1590
1590
|
let n = H(1);
|
|
1591
1591
|
t && (i ? z(i) && (n = nt(i)) : n = nt(e));
|
|
1592
|
-
const a = Yi(r, o, i) ?
|
|
1592
|
+
const a = Yi(r, o, i) ? Ce(r) : H(0);
|
|
1593
1593
|
let l = (s.left + a.x) / n.x, c = (s.top + a.y) / n.y, h = s.width / n.x, d = s.height / n.y;
|
|
1594
1594
|
if (r) {
|
|
1595
1595
|
const u = L(r), p = i && z(i) ? L(i) : i;
|
|
@@ -1610,7 +1610,7 @@ function ie(e, t) {
|
|
|
1610
1610
|
const o = St(e).scrollLeft;
|
|
1611
1611
|
return t ? t.left + o : ot(q(e)).left + o;
|
|
1612
1612
|
}
|
|
1613
|
-
function
|
|
1613
|
+
function Oe(e, t, o) {
|
|
1614
1614
|
o === void 0 && (o = !1);
|
|
1615
1615
|
const i = e.getBoundingClientRect(), s = i.left + t.scrollLeft - (o ? 0 : (
|
|
1616
1616
|
// RTL <body> scrollbar.
|
|
@@ -1640,7 +1640,7 @@ function Ki(e) {
|
|
|
1640
1640
|
const p = ot(i);
|
|
1641
1641
|
c = nt(i), h.x = p.x + i.clientLeft, h.y = p.y + i.clientTop;
|
|
1642
1642
|
}
|
|
1643
|
-
const u = n && !d && !r ?
|
|
1643
|
+
const u = n && !d && !r ? Oe(n, l, !0) : H(0);
|
|
1644
1644
|
return {
|
|
1645
1645
|
width: o.width * c.x,
|
|
1646
1646
|
height: o.height * c.y,
|
|
@@ -1696,7 +1696,7 @@ function ge(e, t, o) {
|
|
|
1696
1696
|
else if (z(t))
|
|
1697
1697
|
i = Zi(t, o);
|
|
1698
1698
|
else {
|
|
1699
|
-
const s =
|
|
1699
|
+
const s = Ce(e);
|
|
1700
1700
|
i = {
|
|
1701
1701
|
x: t.x - s.x,
|
|
1702
1702
|
y: t.y - s.y,
|
|
@@ -1706,9 +1706,9 @@ function ge(e, t, o) {
|
|
|
1706
1706
|
}
|
|
1707
1707
|
return Et(i);
|
|
1708
1708
|
}
|
|
1709
|
-
function
|
|
1709
|
+
function Ae(e, t) {
|
|
1710
1710
|
const o = tt(e);
|
|
1711
|
-
return o === t || !z(o) || rt(o) ? !1 : B(o).position === "fixed" ||
|
|
1711
|
+
return o === t || !z(o) || rt(o) ? !1 : B(o).position === "fixed" || Ae(o, t);
|
|
1712
1712
|
}
|
|
1713
1713
|
function to(e, t) {
|
|
1714
1714
|
const o = t.get(e);
|
|
@@ -1719,7 +1719,7 @@ function to(e, t) {
|
|
|
1719
1719
|
let n = r ? tt(e) : e;
|
|
1720
1720
|
for (; z(n) && !rt(n); ) {
|
|
1721
1721
|
const a = B(n), l = At(n);
|
|
1722
|
-
!l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && Ji.has(s.position) || gt(n) && !l &&
|
|
1722
|
+
!l && a.position === "fixed" && (s = null), (r ? !l && !s : !l && a.position === "static" && !!s && Ji.has(s.position) || gt(n) && !l && Ae(e, n)) ? i = i.filter((h) => h !== n) : s = a, n = tt(n);
|
|
1723
1723
|
}
|
|
1724
1724
|
return t.set(e, i), i;
|
|
1725
1725
|
}
|
|
@@ -1745,7 +1745,7 @@ function io(e) {
|
|
|
1745
1745
|
const {
|
|
1746
1746
|
width: t,
|
|
1747
1747
|
height: o
|
|
1748
|
-
} =
|
|
1748
|
+
} = Pe(e);
|
|
1749
1749
|
return {
|
|
1750
1750
|
width: t,
|
|
1751
1751
|
height: o
|
|
@@ -1767,7 +1767,7 @@ function oo(e, t, o) {
|
|
|
1767
1767
|
l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
|
|
1768
1768
|
} else s && c();
|
|
1769
1769
|
r && !i && s && c();
|
|
1770
|
-
const h = s && !i && !r ?
|
|
1770
|
+
const h = s && !i && !r ? Oe(s, a) : H(0), d = n.left + a.scrollLeft - l.x - h.x, u = n.top + a.scrollTop - l.y - h.y;
|
|
1771
1771
|
return {
|
|
1772
1772
|
x: d,
|
|
1773
1773
|
y: u,
|
|
@@ -1786,7 +1786,7 @@ function me(e, t) {
|
|
|
1786
1786
|
let o = e.offsetParent;
|
|
1787
1787
|
return q(e) === o && (o = o.ownerDocument.body), o;
|
|
1788
1788
|
}
|
|
1789
|
-
function
|
|
1789
|
+
function Se(e, t) {
|
|
1790
1790
|
const o = L(e);
|
|
1791
1791
|
if (Ot(e))
|
|
1792
1792
|
return o;
|
|
@@ -1805,7 +1805,7 @@ function Re(e, t) {
|
|
|
1805
1805
|
return i && rt(i) && Ft(i) && !At(i) ? o : i || Vi(e) || o;
|
|
1806
1806
|
}
|
|
1807
1807
|
const so = async function(e) {
|
|
1808
|
-
const t = this.getOffsetParent ||
|
|
1808
|
+
const t = this.getOffsetParent || Se, o = this.getDimensions, i = await o(e.floating);
|
|
1809
1809
|
return {
|
|
1810
1810
|
reference: oo(e.reference, await t(e.floating), e.strategy),
|
|
1811
1811
|
floating: {
|
|
@@ -1823,7 +1823,7 @@ const It = {
|
|
|
1823
1823
|
convertOffsetParentRelativeRectToViewportRelativeRect: Ki,
|
|
1824
1824
|
getDocumentElement: q,
|
|
1825
1825
|
getClippingRect: eo,
|
|
1826
|
-
getOffsetParent:
|
|
1826
|
+
getOffsetParent: Se,
|
|
1827
1827
|
getElementRects: so,
|
|
1828
1828
|
getClientRects: Xi,
|
|
1829
1829
|
getDimensions: io,
|
|
@@ -1831,7 +1831,7 @@ const It = {
|
|
|
1831
1831
|
isElement: z,
|
|
1832
1832
|
isRTL: no
|
|
1833
1833
|
};
|
|
1834
|
-
function
|
|
1834
|
+
function Re(e, t) {
|
|
1835
1835
|
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1836
1836
|
}
|
|
1837
1837
|
function ro(e, t) {
|
|
@@ -1865,7 +1865,7 @@ function ro(e, t) {
|
|
|
1865
1865
|
n(!1, 1e-7);
|
|
1866
1866
|
}, 1e3);
|
|
1867
1867
|
}
|
|
1868
|
-
O === 1 && !
|
|
1868
|
+
O === 1 && !Re(c, e.getBoundingClientRect()) && n(), C = !1;
|
|
1869
1869
|
}
|
|
1870
1870
|
try {
|
|
1871
1871
|
o = new IntersectionObserver(P, {
|
|
@@ -1907,7 +1907,7 @@ function Mt(e, t, o, i) {
|
|
|
1907
1907
|
l && m();
|
|
1908
1908
|
function m() {
|
|
1909
1909
|
const y = ot(e);
|
|
1910
|
-
g && !
|
|
1910
|
+
g && !Re(g, y) && o(), g = y, f = requestAnimationFrame(m);
|
|
1911
1911
|
}
|
|
1912
1912
|
return o(), () => {
|
|
1913
1913
|
var y;
|
|
@@ -1916,7 +1916,7 @@ function Mt(e, t, o, i) {
|
|
|
1916
1916
|
}), d?.(), (y = p) == null || y.disconnect(), p = null, l && cancelAnimationFrame(f);
|
|
1917
1917
|
};
|
|
1918
1918
|
}
|
|
1919
|
-
const Ht = Ni,
|
|
1919
|
+
const Ht = Ni, Te = $i, Wt = Li, qt = _i, ao = Di, Le = Ti, De = (e, t, o) => {
|
|
1920
1920
|
const i = /* @__PURE__ */ new Map(), s = {
|
|
1921
1921
|
platform: It,
|
|
1922
1922
|
...o
|
|
@@ -2005,7 +2005,7 @@ class ho {
|
|
|
2005
2005
|
crossAxis: r,
|
|
2006
2006
|
mainAxis: s
|
|
2007
2007
|
}),
|
|
2008
|
-
|
|
2008
|
+
Te({ padding: vt }),
|
|
2009
2009
|
i,
|
|
2010
2010
|
qt({
|
|
2011
2011
|
apply: ({ availableHeight: u, availableWidth: p, rects: { floating: f } }) => {
|
|
@@ -2023,12 +2023,12 @@ class ho {
|
|
|
2023
2023
|
padding: vt
|
|
2024
2024
|
}),
|
|
2025
2025
|
...n ? [
|
|
2026
|
-
|
|
2026
|
+
Le({
|
|
2027
2027
|
element: n,
|
|
2028
2028
|
padding: t.tipPadding || vt
|
|
2029
2029
|
})
|
|
2030
2030
|
] : []
|
|
2031
|
-
], { middlewareData: l, placement: c, x: h, y: d } = await
|
|
2031
|
+
], { middlewareData: l, placement: c, x: h, y: d } = await De(
|
|
2032
2032
|
t.trigger,
|
|
2033
2033
|
o,
|
|
2034
2034
|
{
|
|
@@ -2094,7 +2094,7 @@ class oe {
|
|
|
2094
2094
|
t && (customElements.whenDefined("cx-overlay").then(async () => {
|
|
2095
2095
|
const { Overlay: o } = await Promise.resolve().then(() => Co);
|
|
2096
2096
|
this.overlay = new o(), this.overlay.open = !0;
|
|
2097
|
-
}), Promise.resolve().then(() =>
|
|
2097
|
+
}), Promise.resolve().then(() => Ne));
|
|
2098
2098
|
}
|
|
2099
2099
|
}
|
|
2100
2100
|
get overlay() {
|
|
@@ -2126,7 +2126,7 @@ class oe {
|
|
|
2126
2126
|
this.isPersistent || this.abort();
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
const po = 300,
|
|
2129
|
+
const po = 300, ke = {
|
|
2130
2130
|
keyboard: "Press Space or Alt+Down Arrow for additional options",
|
|
2131
2131
|
mouse: "Click and hold for additional options",
|
|
2132
2132
|
touch: "Double tap and long press for additional options"
|
|
@@ -2188,7 +2188,7 @@ class uo extends oe {
|
|
|
2188
2188
|
const o = document.createElement("div");
|
|
2189
2189
|
o.id = `longpress-describedby-descriptor-${Ut()}`;
|
|
2190
2190
|
const i = ni() || ri() ? "touch" : "keyboard";
|
|
2191
|
-
o.textContent =
|
|
2191
|
+
o.textContent = ke[i], o.slot = "longpress-describedby-descriptor";
|
|
2192
2192
|
const s = t.getRootNode(), r = this.overlay.getRootNode();
|
|
2193
2193
|
s === r ? this.overlay.append(o) : (o.hidden = !("host" in s), t.insertAdjacentElement("afterend", o));
|
|
2194
2194
|
const n = $t(
|
|
@@ -2719,7 +2719,7 @@ const A = (K = class extends ct {
|
|
|
2719
2719
|
this.elementResolver.selector = i ? `#${i}` : "", this.triggerInteraction = s;
|
|
2720
2720
|
}
|
|
2721
2721
|
let o = !1;
|
|
2722
|
-
t.has(
|
|
2722
|
+
t.has(ve) && (o = this.triggerElement, this.triggerElement = this.elementResolver.element), t.has("triggerElement") && (o = t.get("triggerElement")), o !== !1 && this.bindEvents();
|
|
2723
2723
|
}
|
|
2724
2724
|
updated(t) {
|
|
2725
2725
|
super.updated(t), t.has("placement") && (this.placement ? this.dialogEl.setAttribute("actual-placement", this.placement) : this.dialogEl.removeAttribute("actual-placement"), this.open && typeof t.get("placement") < "u" && this.placementController.resetOverlayPosition()), t.has("state") && this.state === "closed" && typeof t.get("state") < "u" && this.placementController.clearOverlayPosition();
|
|
@@ -2785,9 +2785,9 @@ const A = (K = class extends ct {
|
|
|
2785
2785
|
super.disconnectedCallback(), this.removeEventListener("close", this.handleClose), this.strategy?.releaseDescription(), this.open = !1;
|
|
2786
2786
|
}
|
|
2787
2787
|
}, K.styles = [
|
|
2788
|
-
|
|
2788
|
+
ye,
|
|
2789
2789
|
Vt`
|
|
2790
|
-
${
|
|
2790
|
+
${ze(fo)}
|
|
2791
2791
|
`
|
|
2792
2792
|
], K.openCount = 1, K);
|
|
2793
2793
|
R([
|
|
@@ -2822,7 +2822,7 @@ R([
|
|
|
2822
2822
|
ut("slot")
|
|
2823
2823
|
], A.prototype, "slotEl", 2);
|
|
2824
2824
|
R([
|
|
2825
|
-
|
|
2825
|
+
Me()
|
|
2826
2826
|
], A.prototype, "state", 1);
|
|
2827
2827
|
R([
|
|
2828
2828
|
v({ attribute: "tip-padding", type: Number })
|
|
@@ -2839,14 +2839,14 @@ R([
|
|
|
2839
2839
|
R([
|
|
2840
2840
|
v()
|
|
2841
2841
|
], A.prototype, "type", 2);
|
|
2842
|
-
let
|
|
2842
|
+
let Fe = A;
|
|
2843
2843
|
const Co = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2844
2844
|
__proto__: null,
|
|
2845
|
-
LONGPRESS_INSTRUCTIONS:
|
|
2846
|
-
Overlay:
|
|
2845
|
+
LONGPRESS_INSTRUCTIONS: ke,
|
|
2846
|
+
Overlay: Fe
|
|
2847
2847
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2848
|
-
Qe("cx-overlay",
|
|
2849
|
-
const
|
|
2848
|
+
Qe("cx-overlay", Fe);
|
|
2849
|
+
const Ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2850
2850
|
__proto__: null
|
|
2851
2851
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2852
2852
|
function Oo(e) {
|
|
@@ -2902,7 +2902,7 @@ const So = Vt`
|
|
|
2902
2902
|
width: max-content;
|
|
2903
2903
|
}
|
|
2904
2904
|
|
|
2905
|
-
.popup--fixed
|
|
2905
|
+
.popup--fixed {
|
|
2906
2906
|
position: fixed;
|
|
2907
2907
|
z-index: var(--cx-z-index-dialog);
|
|
2908
2908
|
}
|
|
@@ -2911,12 +2911,6 @@ const So = Vt`
|
|
|
2911
2911
|
display: none;
|
|
2912
2912
|
}
|
|
2913
2913
|
|
|
2914
|
-
.popup--overlay.popup:not(.popup--active) {
|
|
2915
|
-
display: unset;
|
|
2916
|
-
visibility: hidden;
|
|
2917
|
-
opacity: 0;
|
|
2918
|
-
}
|
|
2919
|
-
|
|
2920
2914
|
.popup__arrow {
|
|
2921
2915
|
position: absolute;
|
|
2922
2916
|
width: calc(var(--arrow-size-diagonal) * 2);
|
|
@@ -2958,9 +2952,9 @@ function Lo(e) {
|
|
|
2958
2952
|
const t = "contextElement" in e ? e.contextElement.ownerDocument.defaultView : null;
|
|
2959
2953
|
return "getBoundingClientRect" in e && ("contextElement" in e ? e.contextElement instanceof (t?.Element ?? Element) : !0);
|
|
2960
2954
|
}
|
|
2961
|
-
let b = class extends
|
|
2955
|
+
let b = class extends Be {
|
|
2962
2956
|
constructor() {
|
|
2963
|
-
super(...arguments), this.localize = new Ve(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.hide = !1, this.hideBoundaryStrategy = "escaped", this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.autoWidthFactor = 1, this.
|
|
2957
|
+
super(...arguments), this.localize = new Ve(this), this.active = !1, this.placement = "top", this.strategy = "absolute", this.distance = 0, this.skidding = 0, this.arrow = !1, this.arrowPlacement = "anchor", this.arrowPadding = 10, this.flip = !1, this.hide = !1, this.hideBoundaryStrategy = "escaped", this.flipFallbackPlacements = "", this.flipFallbackStrategy = "best-fit", this.flipPadding = 0, this.shift = !1, this.shiftPadding = 0, this.autoSizePadding = 0, this.hoverBridge = !1, this.autoWidthFactor = 1, this.updateHoverBridge = () => {
|
|
2964
2958
|
if (this.hoverBridge && this.anchorEl) {
|
|
2965
2959
|
const e = this.anchorEl.getBoundingClientRect(), t = this.popup.getBoundingClientRect(), o = this.placement.includes("top") || this.placement.includes("bottom") || this.placement === "center";
|
|
2966
2960
|
let i = 0, s = 0, r = 0, n = 0, a = 0, l = 0, c = 0, h = 0;
|
|
@@ -2990,18 +2984,14 @@ let b = class extends Ie {
|
|
|
2990
2984
|
disconnectedCallback() {
|
|
2991
2985
|
super.disconnectedCallback(), this.stop();
|
|
2992
2986
|
}
|
|
2993
|
-
runFirstUpdated() {
|
|
2994
|
-
if (this.strategy
|
|
2995
|
-
this.start();
|
|
2996
|
-
return;
|
|
2997
|
-
}
|
|
2998
|
-
if (this.overlayOpened && this.start(), !ne) {
|
|
2987
|
+
async runFirstUpdated() {
|
|
2988
|
+
if (this.start(), this.strategy === "overlay" && !ne) {
|
|
2999
2989
|
const e = We(this);
|
|
3000
2990
|
e && (this.autoSizeBoundary = e, this.flipBoundary = e, this.shiftBoundary = e);
|
|
3001
2991
|
}
|
|
3002
2992
|
}
|
|
3003
2993
|
async updated(e) {
|
|
3004
|
-
super.updated(e), e.has("active") && (this.active ?
|
|
2994
|
+
super.updated(e), e.has("active") && (this.active ? (this.start(), this.emit("cx-opened")) : this.stop()), e.has("anchor") && this.handleAnchorChange(), this.active && (await this.updateComplete, this.reposition());
|
|
3005
2995
|
}
|
|
3006
2996
|
async handleAnchorChange() {
|
|
3007
2997
|
if (await this.stop(), this.anchor && typeof this.anchor == "string") {
|
|
@@ -3012,10 +3002,10 @@ let b = class extends Ie {
|
|
|
3012
3002
|
flatten: !0
|
|
3013
3003
|
})[0]), this.anchorEl instanceof Element && this.anchorEl.tagName.toLowerCase() === "cx-dialog" && (this.anchorEl = this.anchorEl?.shadowRoot?.querySelector(
|
|
3014
3004
|
'[part="panel"]'
|
|
3015
|
-
)), this.anchorEl && this.
|
|
3005
|
+
)), this.anchorEl && this.start();
|
|
3016
3006
|
}
|
|
3017
3007
|
async handleOverlayOpened(e) {
|
|
3018
|
-
e.target === this.overlay && (this.
|
|
3008
|
+
e.target === this.overlay && (this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height"), this.reposition(), await this.updateComplete, this.emit("cx-opened"));
|
|
3019
3009
|
}
|
|
3020
3010
|
start() {
|
|
3021
3011
|
this.anchorEl && (this.cleanup = Mt(this.anchorEl, this.popup, () => {
|
|
@@ -3023,7 +3013,7 @@ let b = class extends Ie {
|
|
|
3023
3013
|
}));
|
|
3024
3014
|
}
|
|
3025
3015
|
async stop() {
|
|
3026
|
-
return
|
|
3016
|
+
return new Promise((e) => {
|
|
3027
3017
|
this.cleanup ? (this.cleanup(), this.cleanup = void 0, this.removeAttribute("data-current-placement"), this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height"), requestAnimationFrame(() => e())) : e();
|
|
3028
3018
|
});
|
|
3029
3019
|
}
|
|
@@ -3059,7 +3049,7 @@ let b = class extends Ie {
|
|
|
3059
3049
|
if (this.shift) {
|
|
3060
3050
|
let t = this.shiftBoundary;
|
|
3061
3051
|
!t && ["fixed", "overlay"].includes(this.strategy) && (t = document.body), e.push(
|
|
3062
|
-
|
|
3052
|
+
Te({
|
|
3063
3053
|
boundary: t,
|
|
3064
3054
|
padding: this.shiftPadding
|
|
3065
3055
|
})
|
|
@@ -3085,7 +3075,7 @@ let b = class extends Ie {
|
|
|
3085
3075
|
} else
|
|
3086
3076
|
this.style.removeProperty("--auto-size-available-width"), this.style.removeProperty("--auto-size-available-height");
|
|
3087
3077
|
this.arrow && e.push(
|
|
3088
|
-
|
|
3078
|
+
Le({
|
|
3089
3079
|
element: this.arrowEl,
|
|
3090
3080
|
padding: this.arrowPadding
|
|
3091
3081
|
})
|
|
@@ -3094,7 +3084,7 @@ let b = class extends Ie {
|
|
|
3094
3084
|
boundary: this.hideBoundary,
|
|
3095
3085
|
strategy: this.hideBoundaryStrategy
|
|
3096
3086
|
})
|
|
3097
|
-
),
|
|
3087
|
+
), De(this.anchorEl, this.popup, {
|
|
3098
3088
|
middleware: e,
|
|
3099
3089
|
placement: this.placement === "center" ? "bottom" : this.placement,
|
|
3100
3090
|
platform: {
|
|
@@ -3146,7 +3136,7 @@ let b = class extends Ie {
|
|
|
3146
3136
|
}
|
|
3147
3137
|
render() {
|
|
3148
3138
|
const e = j`<cx-overlay
|
|
3149
|
-
|
|
3139
|
+
open
|
|
3150
3140
|
placement="bottom"
|
|
3151
3141
|
type="manual"
|
|
3152
3142
|
@cx-opened=${this.handleOverlayOpened}
|
|
@@ -3155,9 +3145,9 @@ let b = class extends Ie {
|
|
|
3155
3145
|
part="popup"
|
|
3156
3146
|
class=${Dt({
|
|
3157
3147
|
popup: !0,
|
|
3158
|
-
"popup--active": this.
|
|
3148
|
+
"popup--active": this.active,
|
|
3149
|
+
"popup--fixed": !0,
|
|
3159
3150
|
"popup--has-arrow": this.arrow,
|
|
3160
|
-
"popup--overlay": !0,
|
|
3161
3151
|
"popup--use-size-middleware": this.isSizeMiddleWareUsed
|
|
3162
3152
|
})}
|
|
3163
3153
|
>
|
|
@@ -3204,7 +3194,7 @@ let b = class extends Ie {
|
|
|
3204
3194
|
`;
|
|
3205
3195
|
}
|
|
3206
3196
|
};
|
|
3207
|
-
b.styles = [
|
|
3197
|
+
b.styles = [ye, So];
|
|
3208
3198
|
w([
|
|
3209
3199
|
ut(".popup")
|
|
3210
3200
|
], b.prototype, "popup", 2);
|
|
@@ -3301,11 +3291,8 @@ w([
|
|
|
3301
3291
|
w([
|
|
3302
3292
|
v({ attribute: "auto-width-factor" })
|
|
3303
3293
|
], b.prototype, "autoWidthFactor", 2);
|
|
3304
|
-
w([
|
|
3305
|
-
ye()
|
|
3306
|
-
], b.prototype, "overlayOpened", 2);
|
|
3307
3294
|
b = w([
|
|
3308
|
-
|
|
3295
|
+
Ie("cx-popup")
|
|
3309
3296
|
], b);
|
|
3310
3297
|
export {
|
|
3311
3298
|
b as default
|