@warp-ds/elements 1.0.1-next.3 → 1.0.1-next.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.
- package/dist/index.js +195 -211
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -275,13 +275,13 @@ bo[vr] = !0, bo.elementProperties = /* @__PURE__ */ new Map(), bo.elementStyles
|
|
|
275
275
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
276
276
|
*/
|
|
277
277
|
var ir;
|
|
278
|
-
const No = window, vo = No.trustedTypes,
|
|
279
|
-
\f\r]`, xo = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,
|
|
280
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Fr = /'/g, Wr = /"/g, ke = /^(?:script|style|textarea|title)$/i, fe = (r) => (o, ...e) => ({ _$litType$: r, strings: o, values: e }), v = fe(1), G = fe(2),
|
|
278
|
+
const No = window, vo = No.trustedTypes, Ur = vo ? vo.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, Oo = "$lit$", O = `lit$${(Math.random() + "").slice(9)}$`, Er = "?" + O, it = `<${Er}>`, ao = document, yo = () => ao.createComment(""), zo = (r) => r === null || typeof r != "object" && typeof r != "function", xe = Array.isArray, me = (r) => xe(r) || typeof (r == null ? void 0 : r[Symbol.iterator]) == "function", lr = `[
|
|
279
|
+
\f\r]`, xo = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Qr = /-->/g, Vr = />/g, K = RegExp(`>|${lr}(?:([^\\s"'>=/]+)(${lr}*=${lr}*(?:[^
|
|
280
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Fr = /'/g, Wr = /"/g, ke = /^(?:script|style|textarea|title)$/i, fe = (r) => (o, ...e) => ({ _$litType$: r, strings: o, values: e }), v = fe(1), G = fe(2), U = Symbol.for("lit-noChange"), q = Symbol.for("lit-nothing"), Gr = /* @__PURE__ */ new WeakMap(), eo = ao.createTreeWalker(ao, 129, null, !1);
|
|
281
281
|
function $e(r, o) {
|
|
282
282
|
if (!Array.isArray(r) || !r.hasOwnProperty("raw"))
|
|
283
283
|
throw Error("invalid template strings array");
|
|
284
|
-
return
|
|
284
|
+
return Ur !== void 0 ? Ur.createHTML(o) : o;
|
|
285
285
|
}
|
|
286
286
|
const ye = (r, o) => {
|
|
287
287
|
const e = r.length - 1, t = [];
|
|
@@ -290,9 +290,9 @@ const ye = (r, o) => {
|
|
|
290
290
|
const d = r[l];
|
|
291
291
|
let n, s, b = -1, g = 0;
|
|
292
292
|
for (; g < d.length && (i.lastIndex = g, s = i.exec(d), s !== null); )
|
|
293
|
-
g = i.lastIndex, i === xo ? s[1] === "!--" ? i =
|
|
294
|
-
const
|
|
295
|
-
c += i === xo ? d + it : b >= 0 ? (t.push(n), d.slice(0, b) + Oo + d.slice(b) + O +
|
|
293
|
+
g = i.lastIndex, i === xo ? s[1] === "!--" ? i = Qr : s[1] !== void 0 ? i = Vr : s[2] !== void 0 ? (ke.test(s[2]) && (a = RegExp("</" + s[2], "g")), i = K) : s[3] !== void 0 && (i = K) : i === K ? s[0] === ">" ? (i = a ?? xo, b = -1) : s[1] === void 0 ? b = -2 : (b = i.lastIndex - s[2].length, n = s[1], i = s[3] === void 0 ? K : s[3] === '"' ? Wr : Fr) : i === Wr || i === Fr ? i = K : i === Qr || i === Vr ? i = xo : (i = K, a = void 0);
|
|
294
|
+
const w = i === K && r[l + 1].startsWith("/>") ? " " : "";
|
|
295
|
+
c += i === xo ? d + it : b >= 0 ? (t.push(n), d.slice(0, b) + Oo + d.slice(b) + O + w) : d + O + (b === -2 ? (t.push(void 0), l) : w);
|
|
296
296
|
}
|
|
297
297
|
return [$e(r, c + (r[e] || "<?>") + (o === 2 ? "</svg>" : "")), t];
|
|
298
298
|
};
|
|
@@ -312,10 +312,10 @@ class _o {
|
|
|
312
312
|
const b = [];
|
|
313
313
|
for (const g of a.getAttributeNames())
|
|
314
314
|
if (g.endsWith(Oo) || g.startsWith(O)) {
|
|
315
|
-
const
|
|
316
|
-
if (b.push(g),
|
|
317
|
-
const
|
|
318
|
-
d.push({ type: 1, index: c, name:
|
|
315
|
+
const w = s[i++];
|
|
316
|
+
if (b.push(g), w !== void 0) {
|
|
317
|
+
const x = a.getAttribute(w.toLowerCase() + Oo).split(O), m = /([.?@])?(.*)/.exec(w);
|
|
318
|
+
d.push({ type: 1, index: c, name: m[2], strings: x, ctor: m[1] === "." ? qe : m[1] === "?" ? Xe : m[1] === "@" ? Ye : jo });
|
|
319
319
|
} else
|
|
320
320
|
d.push({ type: 6, index: c });
|
|
321
321
|
}
|
|
@@ -326,8 +326,8 @@ class _o {
|
|
|
326
326
|
const b = a.textContent.split(O), g = b.length - 1;
|
|
327
327
|
if (g > 0) {
|
|
328
328
|
a.textContent = vo ? vo.emptyScript : "";
|
|
329
|
-
for (let
|
|
330
|
-
a.append(b[
|
|
329
|
+
for (let w = 0; w < g; w++)
|
|
330
|
+
a.append(b[w], yo()), eo.nextNode(), d.push({ type: 2, index: ++c });
|
|
331
331
|
a.append(b[g], yo());
|
|
332
332
|
}
|
|
333
333
|
}
|
|
@@ -349,7 +349,7 @@ class _o {
|
|
|
349
349
|
}
|
|
350
350
|
function co(r, o, e = r, t) {
|
|
351
351
|
var a, c, i, l;
|
|
352
|
-
if (o ===
|
|
352
|
+
if (o === U)
|
|
353
353
|
return o;
|
|
354
354
|
let d = t !== void 0 ? (a = e._$Co) === null || a === void 0 ? void 0 : a[t] : e._$Cl;
|
|
355
355
|
const n = zo(o) ? void 0 : o._$litDirective$;
|
|
@@ -406,7 +406,7 @@ let or = class _e {
|
|
|
406
406
|
return this._$AB;
|
|
407
407
|
}
|
|
408
408
|
_$AI(o, e = this) {
|
|
409
|
-
o = co(this, o, e), zo(o) ? o === q || o == null || o === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : o !== this._$AH && o !==
|
|
409
|
+
o = co(this, o, e), zo(o) ? o === q || o == null || o === "" ? (this._$AH !== q && this._$AR(), this._$AH = q) : o !== this._$AH && o !== U && this._(o) : o._$litType$ !== void 0 ? this.g(o) : o.nodeType !== void 0 ? this.$(o) : me(o) ? this.T(o) : this._(o);
|
|
410
410
|
}
|
|
411
411
|
k(o) {
|
|
412
412
|
return this._$AA.parentNode.insertBefore(o, this._$AB);
|
|
@@ -465,12 +465,12 @@ class jo {
|
|
|
465
465
|
const c = this.strings;
|
|
466
466
|
let i = !1;
|
|
467
467
|
if (c === void 0)
|
|
468
|
-
o = co(this, o, e, 0), i = !zo(o) || o !== this._$AH && o !==
|
|
468
|
+
o = co(this, o, e, 0), i = !zo(o) || o !== this._$AH && o !== U, i && (this._$AH = o);
|
|
469
469
|
else {
|
|
470
470
|
const l = o;
|
|
471
471
|
let d, n;
|
|
472
472
|
for (o = c[0], d = 0; d < c.length - 1; d++)
|
|
473
|
-
n = co(this, l[t + d], e, d), n ===
|
|
473
|
+
n = co(this, l[t + d], e, d), n === U && (n = this._$AH[d]), i || (i = !zo(n) || n !== this._$AH[d]), n === q ? o = q : o !== q && (o += (n ?? "") + c[d + 1]), this._$AH[d] = n;
|
|
474
474
|
}
|
|
475
475
|
i && !a && this.j(o);
|
|
476
476
|
}
|
|
@@ -500,7 +500,7 @@ let Xe = class extends jo {
|
|
|
500
500
|
}
|
|
501
501
|
_$AI(o, e = this) {
|
|
502
502
|
var t;
|
|
503
|
-
if ((o = (t = co(this, o, e, 0)) !== null && t !== void 0 ? t : q) ===
|
|
503
|
+
if ((o = (t = co(this, o, e, 0)) !== null && t !== void 0 ? t : q) === U)
|
|
504
504
|
return;
|
|
505
505
|
const a = this._$AH, c = o === q && a !== q || o.capture !== a.capture || o.once !== a.once || o.passive !== a.passive, i = o !== q && (a === q || c);
|
|
506
506
|
c && this.element.removeEventListener(this.name, this, a), i && this.element.addEventListener(this.name, this, o), this._$AH = o;
|
|
@@ -561,7 +561,7 @@ let X = class extends bo {
|
|
|
561
561
|
super.disconnectedCallback(), (o = this._$Do) === null || o === void 0 || o.setConnected(!1);
|
|
562
562
|
}
|
|
563
563
|
render() {
|
|
564
|
-
return
|
|
564
|
+
return U;
|
|
565
565
|
}
|
|
566
566
|
};
|
|
567
567
|
X.finalized = !0, X._$litElement$ = !0, (dr = globalThis.litElementHydrateSupport) === null || dr === void 0 || dr.call(globalThis, { LitElement: X });
|
|
@@ -594,7 +594,7 @@ const N = {
|
|
|
594
594
|
infoClickable: "hover:i-bg-$color-box-info-background-hover active:i-bg-$color-box-info-background-hover",
|
|
595
595
|
neutralClickable: "hover:i-bg-$color-box-neutral-background-hover active:i-bg-$color-box-neutral-background-hover",
|
|
596
596
|
borderedClickable: "hover:i-bg-$color-box-bordered-background-hover active:i-bg-$color-box-bordered-background-hover hover:i-border-$color-box-bordered-border-hover active:i-border-$color-box-bordered-border-hover"
|
|
597
|
-
},
|
|
597
|
+
}, D = {
|
|
598
598
|
card: "cursor-pointer overflow-hidden relative transition-all",
|
|
599
599
|
cardShadow: "rounded-8 i-shadow-$shadow-card hover:i-shadow-$shadow-card-hover hover:i-bg-$color-card-background-hover tap-highlight-transparent",
|
|
600
600
|
cardFlat: "border-2 rounded-4",
|
|
@@ -609,7 +609,7 @@ const N = {
|
|
|
609
609
|
container: "fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none",
|
|
610
610
|
content: "w-full",
|
|
611
611
|
toaster: "grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none"
|
|
612
|
-
},
|
|
612
|
+
}, R = {
|
|
613
613
|
wrapper: "relative overflow-hidden w-full",
|
|
614
614
|
toast: "flex group p-8 mt-16 rounded-8 border-2 w-full pointer-events-auto transition-all",
|
|
615
615
|
positive: "i-bg-$color-toast-positive-background i-border-$color-toast-positive-subtle-border i-text-$color-toast-positive-text",
|
|
@@ -678,7 +678,7 @@ const N = {
|
|
|
678
678
|
negativeQuiet: `border-0 rounded-8 ${V}`,
|
|
679
679
|
isDisabled: `font-bold max-w-max justify-center transition-colors ease-in-out cursor-default pointer-events-none ${z.disabled}`
|
|
680
680
|
// .button:disabled, .button--is-disabled
|
|
681
|
-
},
|
|
681
|
+
}, k = {
|
|
682
682
|
// Buttontypes
|
|
683
683
|
secondary: `${h.medium} ${p.medium} ${f.secondary} ${z.secondary}`,
|
|
684
684
|
// .button--secondary, .button--default, .button
|
|
@@ -1642,7 +1642,7 @@ const Se = Mr(class extends Tr {
|
|
|
1642
1642
|
const i = !!o[c];
|
|
1643
1643
|
i === this.it.has(c) || !((t = this.nt) === null || t === void 0) && t.has(c) || (i ? (a.add(c), this.it.add(c)) : (a.remove(c), this.it.delete(c)));
|
|
1644
1644
|
}
|
|
1645
|
-
return
|
|
1645
|
+
return U;
|
|
1646
1646
|
}
|
|
1647
1647
|
}), ft = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
1648
1648
|
function Zo(r) {
|
|
@@ -1699,61 +1699,45 @@ ${ee.join(
|
|
|
1699
1699
|
const o = this.variant === "primary", e = this.variant === "secondary", t = this.variant === "negative", a = this.variant === "utility", c = this.variant === "pill", i = this.variant === "link";
|
|
1700
1700
|
return F(
|
|
1701
1701
|
{
|
|
1702
|
-
[
|
|
1703
|
-
[
|
|
1704
|
-
[
|
|
1705
|
-
[
|
|
1706
|
-
[
|
|
1707
|
-
[
|
|
1708
|
-
[
|
|
1709
|
-
[
|
|
1710
|
-
[
|
|
1711
|
-
[
|
|
1712
|
-
[
|
|
1713
|
-
[
|
|
1714
|
-
[
|
|
1715
|
-
[
|
|
1716
|
-
[
|
|
1717
|
-
[
|
|
1718
|
-
[
|
|
1719
|
-
[
|
|
1720
|
-
[
|
|
1721
|
-
[
|
|
1722
|
-
[
|
|
1723
|
-
[
|
|
1724
|
-
[
|
|
1725
|
-
[
|
|
1726
|
-
[
|
|
1727
|
-
[
|
|
1728
|
-
[
|
|
1729
|
-
[
|
|
1730
|
-
[
|
|
1731
|
-
[
|
|
1732
|
-
[
|
|
1733
|
-
[
|
|
1734
|
-
[
|
|
1735
|
-
[
|
|
1736
|
-
[
|
|
1737
|
-
[
|
|
1738
|
-
[
|
|
1739
|
-
[
|
|
1740
|
-
[
|
|
1741
|
-
[w.negativeSmallDisabled]: t && this.small && !this.quiet && !this.loading && this.disabled,
|
|
1742
|
-
[w.negativeSmallQuiet]: t && this.small && this.quiet && !this.loading && !this.disabled,
|
|
1743
|
-
[w.negativeSmallQuietDisabled]: t && this.small && this.quiet && !this.loading && this.disabled,
|
|
1744
|
-
[w.negativeSmallLoading]: t && this.small && !this.quiet && this.loading,
|
|
1745
|
-
[w.negativeSmallQuietLoading]: t && this.small && this.quiet && this.loading,
|
|
1746
|
-
[w.negativeQuiet]: t && !this.small && this.quiet && !this.loading && !this.disabled,
|
|
1747
|
-
[w.negativeQuietDisabled]: t && !this.small && this.quiet && !this.loading && this.disabled,
|
|
1748
|
-
[w.negativeQuietLoading]: t && !this.small && this.quiet && this.loading,
|
|
1749
|
-
[w.negativeLoading]: t && !this.small && !this.quiet && this.loading,
|
|
1750
|
-
[w.pill]: c && !this.small && !this.loading,
|
|
1751
|
-
[w.pillSmall]: c && this.small && !this.loading,
|
|
1752
|
-
[w.pillLoading]: c && !this.small && this.loading,
|
|
1753
|
-
[w.pillSmallLoading]: c && this.small && this.loading,
|
|
1754
|
-
[w.link]: i && !this.small,
|
|
1755
|
-
[w.linkSmall]: i && this.small,
|
|
1756
|
-
[w.linkAsButton]: !!this.href
|
|
1702
|
+
[k.secondary]: e && !this.small && !this.quiet && !this.loading,
|
|
1703
|
+
[k.secondarySmall]: e && this.small && !this.quiet && !this.loading,
|
|
1704
|
+
[k.secondarySmallLoading]: e && this.small && !this.quiet && this.loading,
|
|
1705
|
+
[k.secondarySmallQuiet]: e && this.small && this.quiet && !this.loading,
|
|
1706
|
+
[k.secondarySmallQuietLoading]: e && this.small && this.quiet && this.loading,
|
|
1707
|
+
[k.secondaryQuiet]: e && !this.small && this.quiet && !this.loading,
|
|
1708
|
+
[k.secondaryQuietLoading]: e && !this.small && this.quiet && this.loading,
|
|
1709
|
+
[k.secondaryLoading]: e && !this.small && !this.quiet && this.loading,
|
|
1710
|
+
[k.primary]: o && !this.small && !this.quiet && !this.loading,
|
|
1711
|
+
[k.primarySmall]: o && this.small && !this.quiet && !this.loading,
|
|
1712
|
+
[k.primarySmallQuiet]: o && this.small && this.quiet && !this.loading,
|
|
1713
|
+
[k.primarySmallLoading]: o && this.small && !this.quiet && this.loading,
|
|
1714
|
+
[k.primarySmallQuietLoading]: o && this.small && this.quiet && this.loading,
|
|
1715
|
+
[k.primaryQuiet]: o && !this.small && this.quiet && !this.loading,
|
|
1716
|
+
[k.primaryQuietLoading]: o && !this.small && this.quiet && this.loading,
|
|
1717
|
+
[k.primaryLoading]: o && !this.small && !this.quiet && this.loading,
|
|
1718
|
+
[k.utility]: a && !this.small && !this.quiet && !this.loading,
|
|
1719
|
+
[k.utilitySmall]: a && this.small && !this.quiet && !this.loading,
|
|
1720
|
+
[k.utilitySmallQuiet]: a && this.small && this.quiet && !this.loading,
|
|
1721
|
+
[k.utilitySmallLoading]: a && this.small && !this.quiet && this.loading,
|
|
1722
|
+
[k.utilitySmallQuietLoading]: a && this.small && this.quiet && this.loading,
|
|
1723
|
+
[k.utilityQuiet]: a && !this.small && this.quiet && !this.loading,
|
|
1724
|
+
[k.utilityQuietLoading]: a && !this.small && this.quiet && this.loading,
|
|
1725
|
+
[k.utilityLoading]: a && !this.small && !this.quiet && this.loading,
|
|
1726
|
+
[k.negative]: t && !this.small && !this.quiet && !this.loading,
|
|
1727
|
+
[k.negativeSmall]: t && this.small && !this.quiet && !this.loading,
|
|
1728
|
+
[k.negativeSmallQuiet]: t && this.small && this.quiet && !this.loading,
|
|
1729
|
+
[k.negativeSmallLoading]: t && this.small && !this.quiet && this.loading,
|
|
1730
|
+
[k.negativeSmallQuietLoading]: t && this.small && this.quiet && this.loading,
|
|
1731
|
+
[k.negativeQuiet]: t && !this.small && this.quiet && !this.loading,
|
|
1732
|
+
[k.negativeQuietLoading]: t && !this.small && this.quiet && this.loading,
|
|
1733
|
+
[k.negativeLoading]: t && !this.small && !this.quiet && this.loading,
|
|
1734
|
+
[k.pill]: c && !this.small && !this.loading,
|
|
1735
|
+
[k.pillSmall]: c && this.small && !this.loading,
|
|
1736
|
+
[k.pillLoading]: c && !this.small && this.loading,
|
|
1737
|
+
[k.pillSmallLoading]: c && this.small && this.loading,
|
|
1738
|
+
[k.link]: i && !this.small,
|
|
1739
|
+
[k.linkSmall]: i && this.small,
|
|
1740
|
+
[k.linkAsButton]: !!this.href
|
|
1757
1741
|
}
|
|
1758
1742
|
);
|
|
1759
1743
|
}
|
|
@@ -2450,21 +2434,21 @@ class pr extends X {
|
|
|
2450
2434
|
}
|
|
2451
2435
|
get _outerClasses() {
|
|
2452
2436
|
return L({
|
|
2453
|
-
[
|
|
2454
|
-
[
|
|
2455
|
-
[
|
|
2456
|
-
[
|
|
2457
|
-
[this.selected ?
|
|
2437
|
+
[D.card]: !0,
|
|
2438
|
+
[D.cardShadow]: !this.flat,
|
|
2439
|
+
[D.cardSelected]: this.selected,
|
|
2440
|
+
[D.cardFlat]: this.flat,
|
|
2441
|
+
[this.selected ? D.cardFlatSelected : D.cardFlatUnselected]: this.flat
|
|
2458
2442
|
});
|
|
2459
2443
|
}
|
|
2460
2444
|
get _innerClasses() {
|
|
2461
2445
|
return L({
|
|
2462
|
-
[
|
|
2463
|
-
[this.selected ?
|
|
2446
|
+
[D.cardOutline]: !0,
|
|
2447
|
+
[this.selected ? D.cardOutlineSelected : D.cardOutlineUnselected]: !0
|
|
2464
2448
|
});
|
|
2465
2449
|
}
|
|
2466
2450
|
get uuButton() {
|
|
2467
|
-
return v`<button class="${
|
|
2451
|
+
return v`<button class="${D.a11y}" aria-pressed="${this.selected}" tabindex="-1">
|
|
2468
2452
|
Velg
|
|
2469
2453
|
</button>`;
|
|
2470
2454
|
}
|
|
@@ -3158,7 +3142,7 @@ customElements.get("w-card") || customElements.define("w-card", pr);
|
|
|
3158
3142
|
* Copyright 2021 Google LLC
|
|
3159
3143
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
3160
3144
|
*/
|
|
3161
|
-
function
|
|
3145
|
+
function Ro(r, o, e) {
|
|
3162
3146
|
return r ? o() : e == null ? void 0 : e();
|
|
3163
3147
|
}
|
|
3164
3148
|
/**
|
|
@@ -3174,7 +3158,7 @@ let wr = class extends Tr {
|
|
|
3174
3158
|
render(o) {
|
|
3175
3159
|
if (o === q || o == null)
|
|
3176
3160
|
return this.ft = void 0, this.et = o;
|
|
3177
|
-
if (o ===
|
|
3161
|
+
if (o === U)
|
|
3178
3162
|
return o;
|
|
3179
3163
|
if (typeof o != "string")
|
|
3180
3164
|
throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
@@ -3187,7 +3171,7 @@ let wr = class extends Tr {
|
|
|
3187
3171
|
};
|
|
3188
3172
|
wr.directiveName = "unsafeHTML", wr.resultType = 1;
|
|
3189
3173
|
const Ae = Mr(wr);
|
|
3190
|
-
var Wo, Ce, Go, Ee, Jo, Le, Ko, Me, go,
|
|
3174
|
+
var Wo, Ce, Go, Ee, Jo, Le, Ko, Me, go, Po, uo, Do;
|
|
3191
3175
|
class xr extends Zo(X) {
|
|
3192
3176
|
constructor() {
|
|
3193
3177
|
super();
|
|
@@ -3201,11 +3185,11 @@ class xr extends Zo(X) {
|
|
|
3201
3185
|
}
|
|
3202
3186
|
render() {
|
|
3203
3187
|
return v`<div class="${no.wrapper}">
|
|
3204
|
-
${
|
|
3188
|
+
${Ro(
|
|
3205
3189
|
this.label,
|
|
3206
|
-
() => v`<label class="${T(this, Go, Ee)}" for="${T(this, go,
|
|
3190
|
+
() => v`<label class="${T(this, Go, Ee)}" for="${T(this, go, Po)}">
|
|
3207
3191
|
${this.label}
|
|
3208
|
-
${
|
|
3192
|
+
${Ro(
|
|
3209
3193
|
this.optional,
|
|
3210
3194
|
() => v`<span class="${fo.optional}">(valgfritt)</span>`
|
|
3211
3195
|
)}</label
|
|
@@ -3214,11 +3198,11 @@ class xr extends Zo(X) {
|
|
|
3214
3198
|
<div class="${no.selectWrapper}">
|
|
3215
3199
|
<select
|
|
3216
3200
|
class="${T(this, Wo, Ce)}"
|
|
3217
|
-
id="${T(this, go,
|
|
3201
|
+
id="${T(this, go, Po)}"
|
|
3218
3202
|
?autofocus=${this.autoFocus}
|
|
3219
|
-
aria-describedby="${_(T(this, uo,
|
|
3203
|
+
aria-describedby="${_(T(this, uo, Do))}"
|
|
3220
3204
|
aria-invalid="${_(this.invalid)}"
|
|
3221
|
-
aria-errormessage="${_(this.invalid && T(this, uo,
|
|
3205
|
+
aria-errormessage="${_(this.invalid && T(this, uo, Do))}"
|
|
3222
3206
|
>
|
|
3223
3207
|
${Ae(this._options)}
|
|
3224
3208
|
</select>
|
|
@@ -3240,9 +3224,9 @@ class xr extends Zo(X) {
|
|
|
3240
3224
|
</svg>
|
|
3241
3225
|
</div>
|
|
3242
3226
|
</div>
|
|
3243
|
-
${
|
|
3227
|
+
${Ro(
|
|
3244
3228
|
this.always || this.invalid,
|
|
3245
|
-
() => v`<div id="${T(this, uo,
|
|
3229
|
+
() => v`<div id="${T(this, uo, Do)}" class="${T(this, Jo, Le)}">${this.hint}</div>`
|
|
3246
3230
|
)}
|
|
3247
3231
|
</div>`;
|
|
3248
3232
|
}
|
|
@@ -3267,10 +3251,10 @@ Wo = new WeakSet(), Ce = function() {
|
|
|
3267
3251
|
[no.chevron]: !0,
|
|
3268
3252
|
[no.chevronDisabled]: this.disabled
|
|
3269
3253
|
});
|
|
3270
|
-
}, go = new WeakSet(),
|
|
3254
|
+
}, go = new WeakSet(), Po = function() {
|
|
3271
3255
|
return "select_id";
|
|
3272
|
-
}, uo = new WeakSet(),
|
|
3273
|
-
return this.hint ? `${T(this, go,
|
|
3256
|
+
}, uo = new WeakSet(), Do = function() {
|
|
3257
|
+
return this.hint ? `${T(this, go, Po)}__hint` : void 0;
|
|
3274
3258
|
}, $(xr, "properties", {
|
|
3275
3259
|
// Whether the element should receive focus on render
|
|
3276
3260
|
autoFocus: { type: Boolean, reflect: !0 },
|
|
@@ -5291,32 +5275,32 @@ $(kr, "styles", A`
|
|
|
5291
5275
|
ariaLabel: { type: String }
|
|
5292
5276
|
});
|
|
5293
5277
|
customElements.get("w-breadcrumbs") || customElements.define("w-breadcrumbs", kr);
|
|
5294
|
-
const
|
|
5278
|
+
const Rr = typeof window < "u";
|
|
5295
5279
|
let Te = !0;
|
|
5296
|
-
if (
|
|
5280
|
+
if (Rr) {
|
|
5297
5281
|
const r = window.matchMedia("(prefers-reduced-motion: reduce)"), o = ({ matches: e }) => Te = !e;
|
|
5298
5282
|
r.addEventListener && r.addEventListener("change", o), o(r);
|
|
5299
5283
|
}
|
|
5300
|
-
const
|
|
5284
|
+
const Re = (r) => {
|
|
5301
5285
|
r.style.transition = null, r.style.backfaceVisibility = null, r.style.overflow = null;
|
|
5302
|
-
},
|
|
5286
|
+
}, Pe = (r) => {
|
|
5303
5287
|
const o = Te ? "var(--f-expansion-duration, 0.3s)" : "0.01s";
|
|
5304
5288
|
r.style.transition = `height ${o}`, r.style.backfaceVisibility = "hidden", r.style.overflow = "hidden";
|
|
5305
5289
|
}, _t = (r, o) => () => {
|
|
5306
5290
|
r.style.height = "auto", r.style.overflow = null, o && o();
|
|
5307
5291
|
}, qt = (r) => () => {
|
|
5308
5292
|
r && r();
|
|
5309
|
-
},
|
|
5293
|
+
}, De = (r, o) => {
|
|
5310
5294
|
const e = (() => {
|
|
5311
5295
|
if (!o)
|
|
5312
5296
|
return new Promise((c) => {
|
|
5313
5297
|
o = c;
|
|
5314
5298
|
});
|
|
5315
5299
|
})(), t = _t(r, o);
|
|
5316
|
-
|
|
5300
|
+
Re(r), r.style.height = "auto";
|
|
5317
5301
|
let a = r.scrollHeight;
|
|
5318
|
-
if (
|
|
5319
|
-
r.addEventListener("transitionend", t, { once: !0 }), r.style.height = "0px", r.style.transitionTimingFunction = "ease-out",
|
|
5302
|
+
if (Rr && requestAnimationFrame(() => {
|
|
5303
|
+
r.addEventListener("transitionend", t, { once: !0 }), r.style.height = "0px", r.style.transitionTimingFunction = "ease-out", Pe(r), requestAnimationFrame(() => r.style.height = a + "px");
|
|
5320
5304
|
}), e)
|
|
5321
5305
|
return e;
|
|
5322
5306
|
}, Be = (r, o) => {
|
|
@@ -5326,10 +5310,10 @@ const De = (r) => {
|
|
|
5326
5310
|
o = c;
|
|
5327
5311
|
});
|
|
5328
5312
|
})(), t = qt(o);
|
|
5329
|
-
|
|
5313
|
+
Re(r);
|
|
5330
5314
|
let a = r.scrollHeight;
|
|
5331
|
-
if (
|
|
5332
|
-
r.addEventListener("transitionend", t, { once: !0 }), r.style.height = a + "px", r.style.transitionTimingFunction = "ease-in",
|
|
5315
|
+
if (Rr && requestAnimationFrame(() => {
|
|
5316
|
+
r.addEventListener("transitionend", t, { once: !0 }), r.style.height = a + "px", r.style.transitionTimingFunction = "ease-in", Pe(r), requestAnimationFrame(() => r.style.height = "0px");
|
|
5333
5317
|
}), e)
|
|
5334
5318
|
return e;
|
|
5335
5319
|
}, Xt = () => v`
|
|
@@ -5411,7 +5395,7 @@ const De = (r) => {
|
|
|
5411
5395
|
for (const a of e.split(" "))
|
|
5412
5396
|
o[a] = t;
|
|
5413
5397
|
return Se(o);
|
|
5414
|
-
},
|
|
5398
|
+
}, P = {
|
|
5415
5399
|
success: "success",
|
|
5416
5400
|
error: "error",
|
|
5417
5401
|
warning: "warning"
|
|
@@ -5427,22 +5411,22 @@ class fr extends X {
|
|
|
5427
5411
|
super.disconnectedCallback();
|
|
5428
5412
|
}
|
|
5429
5413
|
updated() {
|
|
5430
|
-
!this._expanded && this._wrapper &&
|
|
5414
|
+
!this._expanded && this._wrapper && De(this._wrapper, () => this._expanded = !0);
|
|
5431
5415
|
}
|
|
5432
5416
|
get _primaryClasses() {
|
|
5433
5417
|
return ae({
|
|
5434
|
-
[
|
|
5435
|
-
[
|
|
5436
|
-
[
|
|
5437
|
-
[
|
|
5418
|
+
[R.toast]: !0,
|
|
5419
|
+
[R.positive]: this.type === P.success,
|
|
5420
|
+
[R.warning]: this.type === P.warning,
|
|
5421
|
+
[R.negative]: this.type === P.error
|
|
5438
5422
|
});
|
|
5439
5423
|
}
|
|
5440
5424
|
get _iconClasses() {
|
|
5441
5425
|
return ae({
|
|
5442
|
-
[
|
|
5443
|
-
[
|
|
5444
|
-
[
|
|
5445
|
-
[
|
|
5426
|
+
[R.icon]: !0,
|
|
5427
|
+
[R.iconPositive]: this.type == P.success,
|
|
5428
|
+
[R.iconWarning]: this.type === P.warning,
|
|
5429
|
+
[R.iconNegative]: this.type === P.error
|
|
5446
5430
|
});
|
|
5447
5431
|
}
|
|
5448
5432
|
get _wrapper() {
|
|
@@ -5450,13 +5434,13 @@ class fr extends X {
|
|
|
5450
5434
|
return ((o = this.renderRoot) == null ? void 0 : o.querySelector("section")) ?? null;
|
|
5451
5435
|
}
|
|
5452
5436
|
get _success() {
|
|
5453
|
-
return this.type ===
|
|
5437
|
+
return this.type === P.success;
|
|
5454
5438
|
}
|
|
5455
5439
|
get _warning() {
|
|
5456
|
-
return this.type ===
|
|
5440
|
+
return this.type === P.warning;
|
|
5457
5441
|
}
|
|
5458
5442
|
get _error() {
|
|
5459
|
-
return this.type ===
|
|
5443
|
+
return this.type === P.error;
|
|
5460
5444
|
}
|
|
5461
5445
|
get _role() {
|
|
5462
5446
|
return this._error || this._warning ? "alert" : "status";
|
|
@@ -5465,7 +5449,7 @@ class fr extends X {
|
|
|
5465
5449
|
return this._success ? "Vellykket" : this._error ? "Feil" : this._warning ? "Varsel" : "Info";
|
|
5466
5450
|
}
|
|
5467
5451
|
get _iconMarkup() {
|
|
5468
|
-
return this.type ===
|
|
5452
|
+
return this.type === P.success ? jt({ typeLabel: this._typeLabel }) : this.type === P.warning ? Zt({ typeLabel: this._typeLabel }) : Yt({ typeLabel: this._typeLabel, isInfo: this._info });
|
|
5469
5453
|
}
|
|
5470
5454
|
async collapse() {
|
|
5471
5455
|
return new Promise((o) => {
|
|
@@ -5481,15 +5465,15 @@ class fr extends X {
|
|
|
5481
5465
|
this.updateComplete.then(() => this.dispatchEvent(o));
|
|
5482
5466
|
}
|
|
5483
5467
|
render() {
|
|
5484
|
-
return this.text ? v` <section class="${
|
|
5468
|
+
return this.text ? v` <section class="${R.wrapper}" aria-label="${this._typeLabel}">
|
|
5485
5469
|
<div class="${this._primaryClasses}">
|
|
5486
5470
|
<div class="${this._iconClasses}">${this._iconMarkup}</div>
|
|
5487
|
-
<div role="${this._role}" class="${
|
|
5471
|
+
<div role="${this._role}" class="${R.content}">
|
|
5488
5472
|
<p>${this.text}</p>
|
|
5489
5473
|
</div>
|
|
5490
|
-
${
|
|
5474
|
+
${Ro(
|
|
5491
5475
|
this.canclose === !0,
|
|
5492
|
-
() => v`<button class="${
|
|
5476
|
+
() => v`<button class="${R.close}" @click="${this.close}">${Xt()}</button>`
|
|
5493
5477
|
)}
|
|
5494
5478
|
</div>
|
|
5495
5479
|
</section>` : v``;
|
|
@@ -6178,7 +6162,7 @@ const { I: Lt } = dt, ce = () => document.createComment(""), ko = (r, o, e) => {
|
|
|
6178
6162
|
}
|
|
6179
6163
|
}
|
|
6180
6164
|
return e;
|
|
6181
|
-
}, ro = (r, o, e = r) => (r._$AI(o, e), r), Mt = {}, Tt = (r, o = Mt) => r._$AH = o,
|
|
6165
|
+
}, ro = (r, o, e = r) => (r._$AI(o, e), r), Mt = {}, Tt = (r, o = Mt) => r._$AH = o, Rt = (r) => r._$AH, sr = (r) => {
|
|
6182
6166
|
var o;
|
|
6183
6167
|
(o = r._$AP) === null || o === void 0 || o.call(r, !1, !0);
|
|
6184
6168
|
let e = r._$AA;
|
|
@@ -6217,46 +6201,46 @@ const ie = (r, o, e) => {
|
|
|
6217
6201
|
}
|
|
6218
6202
|
update(r, [o, e, t]) {
|
|
6219
6203
|
var a;
|
|
6220
|
-
const c =
|
|
6204
|
+
const c = Rt(r), { values: i, keys: l } = this.dt(o, e, t);
|
|
6221
6205
|
if (!Array.isArray(c))
|
|
6222
6206
|
return this.ht = l, i;
|
|
6223
6207
|
const d = (a = this.ht) !== null && a !== void 0 ? a : this.ht = [], n = [];
|
|
6224
|
-
let s, b, g = 0,
|
|
6225
|
-
for (; g <=
|
|
6208
|
+
let s, b, g = 0, w = c.length - 1, x = 0, m = i.length - 1;
|
|
6209
|
+
for (; g <= w && x <= m; )
|
|
6226
6210
|
if (c[g] === null)
|
|
6227
6211
|
g++;
|
|
6228
|
-
else if (c[
|
|
6229
|
-
|
|
6212
|
+
else if (c[w] === null)
|
|
6213
|
+
w--;
|
|
6214
|
+
else if (d[g] === l[x])
|
|
6215
|
+
n[x] = ro(c[g], i[x]), g++, x++;
|
|
6216
|
+
else if (d[w] === l[m])
|
|
6217
|
+
n[m] = ro(c[w], i[m]), w--, m--;
|
|
6230
6218
|
else if (d[g] === l[m])
|
|
6231
|
-
n[m] = ro(c[g], i[m]), g++, m
|
|
6232
|
-
else if (d[
|
|
6233
|
-
n[
|
|
6234
|
-
else if (d
|
|
6235
|
-
|
|
6236
|
-
|
|
6237
|
-
n[m] = ro(c[x], i[m]), ko(r, c[g], c[x]), x--, m++;
|
|
6238
|
-
else if (s === void 0 && (s = ie(l, m, k), b = ie(d, g, x)), s.has(d[g]))
|
|
6239
|
-
if (s.has(d[x])) {
|
|
6240
|
-
const y = b.get(l[m]), Y = y !== void 0 ? c[y] : null;
|
|
6219
|
+
n[m] = ro(c[g], i[m]), ko(r, n[m + 1], c[g]), g++, m--;
|
|
6220
|
+
else if (d[w] === l[x])
|
|
6221
|
+
n[x] = ro(c[w], i[x]), ko(r, c[g], c[w]), w--, x++;
|
|
6222
|
+
else if (s === void 0 && (s = ie(l, x, m), b = ie(d, g, w)), s.has(d[g]))
|
|
6223
|
+
if (s.has(d[w])) {
|
|
6224
|
+
const y = b.get(l[x]), Y = y !== void 0 ? c[y] : null;
|
|
6241
6225
|
if (Y === null) {
|
|
6242
6226
|
const j = ko(r, c[g]);
|
|
6243
|
-
ro(j, i[
|
|
6227
|
+
ro(j, i[x]), n[x] = j;
|
|
6244
6228
|
} else
|
|
6245
|
-
n[
|
|
6246
|
-
|
|
6229
|
+
n[x] = ro(Y, i[x]), ko(r, c[g], Y), c[y] = null;
|
|
6230
|
+
x++;
|
|
6247
6231
|
} else
|
|
6248
|
-
sr(c[
|
|
6232
|
+
sr(c[w]), w--;
|
|
6249
6233
|
else
|
|
6250
6234
|
sr(c[g]), g++;
|
|
6251
|
-
for (;
|
|
6252
|
-
const y = ko(r, n[
|
|
6253
|
-
ro(y, i[
|
|
6235
|
+
for (; x <= m; ) {
|
|
6236
|
+
const y = ko(r, n[m + 1]);
|
|
6237
|
+
ro(y, i[x]), n[x++] = y;
|
|
6254
6238
|
}
|
|
6255
|
-
for (; g <=
|
|
6239
|
+
for (; g <= w; ) {
|
|
6256
6240
|
const y = c[g++];
|
|
6257
6241
|
y !== null && sr(y);
|
|
6258
6242
|
}
|
|
6259
|
-
return this.ht = l, Tt(r, n),
|
|
6243
|
+
return this.ht = l, Tt(r, n), U;
|
|
6260
6244
|
}
|
|
6261
6245
|
});
|
|
6262
6246
|
class $r extends X {
|
|
@@ -7746,12 +7730,12 @@ function rr(r) {
|
|
|
7746
7730
|
function Ao(r) {
|
|
7747
7731
|
return ["top", "bottom"].includes(So(r)) ? "x" : "y";
|
|
7748
7732
|
}
|
|
7749
|
-
function
|
|
7733
|
+
function Pr(r) {
|
|
7750
7734
|
return r === "y" ? "height" : "width";
|
|
7751
7735
|
}
|
|
7752
7736
|
function le(r, o, e) {
|
|
7753
7737
|
let { reference: t, floating: a } = r;
|
|
7754
|
-
const c = t.x + t.width / 2 - a.width / 2, i = t.y + t.height / 2 - a.height / 2, l = Ao(o), d =
|
|
7738
|
+
const c = t.x + t.width / 2 - a.width / 2, i = t.y + t.height / 2 - a.height / 2, l = Ao(o), d = Pr(l), n = t[d] / 2 - a[d] / 2, s = l === "x";
|
|
7755
7739
|
let b;
|
|
7756
7740
|
switch (So(o)) {
|
|
7757
7741
|
case "top":
|
|
@@ -7778,12 +7762,12 @@ function le(r, o, e) {
|
|
|
7778
7762
|
}
|
|
7779
7763
|
return b;
|
|
7780
7764
|
}
|
|
7781
|
-
const
|
|
7765
|
+
const Pt = async (r, o, e) => {
|
|
7782
7766
|
const { placement: t = "bottom", strategy: a = "absolute", middleware: c = [], platform: i } = e, l = await (i.isRTL == null ? void 0 : i.isRTL(o));
|
|
7783
|
-
let d = await i.getElementRects({ reference: r, floating: o, strategy: a }), { x: n, y: s } = le(d, t, l), b = t, g = {},
|
|
7784
|
-
for (let
|
|
7785
|
-
const { name:
|
|
7786
|
-
n = Y ?? n, s = j ?? s, g = { ...g, [
|
|
7767
|
+
let d = await i.getElementRects({ reference: r, floating: o, strategy: a }), { x: n, y: s } = le(d, t, l), b = t, g = {}, w = 0;
|
|
7768
|
+
for (let x = 0; x < c.length; x++) {
|
|
7769
|
+
const { name: m, fn: y } = c[x], { x: Y, y: j, data: C, reset: Z } = await y({ x: n, y: s, initialPlacement: t, placement: b, strategy: a, middlewareData: g, rects: d, platform: i, elements: { reference: r, floating: o } });
|
|
7770
|
+
n = Y ?? n, s = j ?? s, g = { ...g, [m]: { ...g[m], ...C } }, Z && w <= 50 && (w++, typeof Z == "object" && (Z.placement && (b = Z.placement), Z.rects && (d = Z.rects === !0 ? await i.getElementRects({ reference: r, floating: o, strategy: a }) : Z.rects), { x: n, y: s } = le(d, b, l)), x = -1);
|
|
7787
7771
|
}
|
|
7788
7772
|
return { x: n, y: s, placement: b, strategy: a, middlewareData: g };
|
|
7789
7773
|
};
|
|
@@ -7798,47 +7782,47 @@ function Ho(r) {
|
|
|
7798
7782
|
async function Ie(r, o) {
|
|
7799
7783
|
var e;
|
|
7800
7784
|
o === void 0 && (o = {});
|
|
7801
|
-
const { x: t, y: a, platform: c, rects: i, elements: l, strategy: d } = r, { boundary: n = "clippingAncestors", rootBoundary: s = "viewport", elementContext: b = "floating", altBoundary: g = !1, padding:
|
|
7802
|
-
return { top: y.top - Y.top +
|
|
7785
|
+
const { x: t, y: a, platform: c, rects: i, elements: l, strategy: d } = r, { boundary: n = "clippingAncestors", rootBoundary: s = "viewport", elementContext: b = "floating", altBoundary: g = !1, padding: w = 0 } = o, x = Oe(w), m = l[g ? b === "floating" ? "reference" : "floating" : b], y = Ho(await c.getClippingRect({ element: (e = await (c.isElement == null ? void 0 : c.isElement(m))) == null || e ? m : m.contextElement || await (c.getDocumentElement == null ? void 0 : c.getDocumentElement(l.floating)), boundary: n, rootBoundary: s, strategy: d })), Y = Ho(c.convertOffsetParentRelativeRectToViewportRelativeRect ? await c.convertOffsetParentRelativeRectToViewportRelativeRect({ rect: b === "floating" ? { ...i.floating, x: t, y: a } : i.reference, offsetParent: await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(l.floating)), strategy: d }) : i[b]);
|
|
7786
|
+
return { top: y.top - Y.top + x.top, bottom: Y.bottom - y.bottom + x.bottom, left: y.left - Y.left + x.left, right: Y.right - y.right + x.right };
|
|
7803
7787
|
}
|
|
7804
|
-
const
|
|
7788
|
+
const Dt = Math.min, Bt = Math.max;
|
|
7805
7789
|
function zr(r, o, e) {
|
|
7806
|
-
return Bt(r,
|
|
7790
|
+
return Bt(r, Dt(o, e));
|
|
7807
7791
|
}
|
|
7808
7792
|
const Nt = (r) => ({ name: "arrow", options: r, async fn(o) {
|
|
7809
7793
|
const { element: e, padding: t = 0 } = r ?? {}, { x: a, y: c, placement: i, rects: l, platform: d } = o;
|
|
7810
7794
|
if (e == null)
|
|
7811
7795
|
return {};
|
|
7812
|
-
const n = Oe(t), s = { x: a, y: c }, b = Ao(i), g = rr(i),
|
|
7796
|
+
const n = Oe(t), s = { x: a, y: c }, b = Ao(i), g = rr(i), w = Pr(b), x = await d.getDimensions(e), m = b === "y" ? "top" : "left", y = b === "y" ? "bottom" : "right", Y = l.reference[w] + l.reference[b] - s[b] - l.floating[w], j = s[b] - l.reference[b], C = await (d.getOffsetParent == null ? void 0 : d.getOffsetParent(e));
|
|
7813
7797
|
let Z = C ? b === "y" ? C.clientHeight || 0 : C.clientWidth || 0 : 0;
|
|
7814
|
-
Z === 0 && (Z = l.floating[
|
|
7815
|
-
const Eo = Y / 2 - j / 2, io = n[
|
|
7798
|
+
Z === 0 && (Z = l.floating[w]);
|
|
7799
|
+
const Eo = Y / 2 - j / 2, io = n[m], po = Z - x[w] - n[y], S = Z / 2 - x[w] / 2 + Eo, M = zr(io, S, po), lo = (g === "start" ? n[m] : n[y]) > 0 && S !== M && l.reference[w] <= l.floating[w];
|
|
7816
7800
|
return { [b]: s[b] - (lo ? S < io ? io - S : po - S : 0), data: { [b]: M, centerOffset: S - M } };
|
|
7817
7801
|
} }), Ot = { left: "right", right: "left", bottom: "top", top: "bottom" };
|
|
7818
|
-
function
|
|
7802
|
+
function Uo(r) {
|
|
7819
7803
|
return r.replace(/left|right|bottom|top/g, (o) => Ot[o]);
|
|
7820
7804
|
}
|
|
7821
7805
|
function It(r, o, e) {
|
|
7822
7806
|
e === void 0 && (e = !1);
|
|
7823
|
-
const t = rr(r), a = Ao(r), c =
|
|
7807
|
+
const t = rr(r), a = Ao(r), c = Pr(a);
|
|
7824
7808
|
let i = a === "x" ? t === (e ? "end" : "start") ? "right" : "left" : t === "start" ? "bottom" : "top";
|
|
7825
|
-
return o.reference[c] > o.floating[c] && (i =
|
|
7809
|
+
return o.reference[c] > o.floating[c] && (i = Uo(i)), { main: i, cross: Uo(i) };
|
|
7826
7810
|
}
|
|
7827
7811
|
const Ht = { start: "end", end: "start" };
|
|
7828
7812
|
function de(r) {
|
|
7829
7813
|
return r.replace(/start|end/g, (o) => Ht[o]);
|
|
7830
7814
|
}
|
|
7831
|
-
const
|
|
7832
|
-
|
|
7833
|
-
const
|
|
7815
|
+
const Ut = ["top", "right", "bottom", "left"];
|
|
7816
|
+
Ut.reduce((r, o) => r.concat(o, o + "-start", o + "-end"), []);
|
|
7817
|
+
const Qt = function(r) {
|
|
7834
7818
|
return r === void 0 && (r = {}), { name: "flip", options: r, async fn(o) {
|
|
7835
7819
|
var e;
|
|
7836
|
-
const { placement: t, middlewareData: a, rects: c, initialPlacement: i, platform: l, elements: d } = o, { mainAxis: n = !0, crossAxis: s = !0, fallbackPlacements: b, fallbackStrategy: g = "bestFit", flipAlignment:
|
|
7837
|
-
const M =
|
|
7820
|
+
const { placement: t, middlewareData: a, rects: c, initialPlacement: i, platform: l, elements: d } = o, { mainAxis: n = !0, crossAxis: s = !0, fallbackPlacements: b, fallbackStrategy: g = "bestFit", flipAlignment: w = !0, ...x } = r, m = So(t), y = b || (m === i || !w ? [Uo(i)] : function(S) {
|
|
7821
|
+
const M = Uo(S);
|
|
7838
7822
|
return [de(S), M, de(M)];
|
|
7839
|
-
}(i)), Y = [i, ...y], j = await Ie(o,
|
|
7823
|
+
}(i)), Y = [i, ...y], j = await Ie(o, x), C = [];
|
|
7840
7824
|
let Z = ((e = a.flip) == null ? void 0 : e.overflows) || [];
|
|
7841
|
-
if (n && C.push(j[
|
|
7825
|
+
if (n && C.push(j[m]), s) {
|
|
7842
7826
|
const { main: S, cross: M } = It(t, c, await (l.isRTL == null ? void 0 : l.isRTL(d.floating)));
|
|
7843
7827
|
C.push(j[S], j[M]);
|
|
7844
7828
|
}
|
|
@@ -7866,9 +7850,9 @@ const Ut = function(r) {
|
|
|
7866
7850
|
}, Vt = function(r) {
|
|
7867
7851
|
return r === void 0 && (r = 0), { name: "offset", options: r, async fn(o) {
|
|
7868
7852
|
const { x: e, y: t } = o, a = await async function(c, i) {
|
|
7869
|
-
const { placement: l, platform: d, elements: n } = c, s = await (d.isRTL == null ? void 0 : d.isRTL(n.floating)), b = So(l), g = rr(l),
|
|
7853
|
+
const { placement: l, platform: d, elements: n } = c, s = await (d.isRTL == null ? void 0 : d.isRTL(n.floating)), b = So(l), g = rr(l), w = Ao(l) === "x", x = ["left", "top"].includes(b) ? -1 : 1, m = s && w ? -1 : 1, y = typeof i == "function" ? i(c) : i;
|
|
7870
7854
|
let { mainAxis: Y, crossAxis: j, alignmentAxis: C } = typeof y == "number" ? { mainAxis: y, crossAxis: 0, alignmentAxis: null } : { mainAxis: 0, crossAxis: 0, alignmentAxis: null, ...y };
|
|
7871
|
-
return g && typeof C == "number" && (j = g === "end" ? -1 * C : C),
|
|
7855
|
+
return g && typeof C == "number" && (j = g === "end" ? -1 * C : C), w ? { x: j * m, y: Y * x } : { x: Y * x, y: j * m };
|
|
7872
7856
|
}(o, r);
|
|
7873
7857
|
return { x: e + a.x, y: t + a.y, data: a };
|
|
7874
7858
|
} };
|
|
@@ -7882,23 +7866,23 @@ const Wt = function(r) {
|
|
|
7882
7866
|
let { x: Y, y: j } = y;
|
|
7883
7867
|
return { x: Y, y: j };
|
|
7884
7868
|
} }, ...d } = r, n = { x: e, y: t }, s = await Ie(o, d), b = Ao(So(a)), g = Ft(b);
|
|
7885
|
-
let
|
|
7869
|
+
let w = n[b], x = n[g];
|
|
7886
7870
|
if (c) {
|
|
7887
7871
|
const y = b === "y" ? "bottom" : "right";
|
|
7888
|
-
|
|
7872
|
+
w = zr(w + s[b === "y" ? "top" : "left"], w, w - s[y]);
|
|
7889
7873
|
}
|
|
7890
7874
|
if (i) {
|
|
7891
7875
|
const y = g === "y" ? "bottom" : "right";
|
|
7892
|
-
|
|
7876
|
+
x = zr(x + s[g === "y" ? "top" : "left"], x, x - s[y]);
|
|
7893
7877
|
}
|
|
7894
|
-
const
|
|
7895
|
-
return { ...
|
|
7878
|
+
const m = l.fn({ ...o, [b]: w, [g]: x });
|
|
7879
|
+
return { ...m, data: { x: m.x - e, y: m.y - t } };
|
|
7896
7880
|
} };
|
|
7897
7881
|
};
|
|
7898
7882
|
function He(r) {
|
|
7899
7883
|
return r && r.document && r.location && r.alert && r.setInterval;
|
|
7900
7884
|
}
|
|
7901
|
-
function
|
|
7885
|
+
function Q(r) {
|
|
7902
7886
|
if (r == null)
|
|
7903
7887
|
return window;
|
|
7904
7888
|
if (!He(r)) {
|
|
@@ -7908,23 +7892,23 @@ function U(r) {
|
|
|
7908
7892
|
return r;
|
|
7909
7893
|
}
|
|
7910
7894
|
function Co(r) {
|
|
7911
|
-
return
|
|
7895
|
+
return Q(r).getComputedStyle(r);
|
|
7912
7896
|
}
|
|
7913
7897
|
function H(r) {
|
|
7914
7898
|
return He(r) ? "" : r ? (r.nodeName || "").toLowerCase() : "";
|
|
7915
7899
|
}
|
|
7916
|
-
function
|
|
7900
|
+
function Ue() {
|
|
7917
7901
|
const r = navigator.userAgentData;
|
|
7918
7902
|
return r != null && r.brands ? r.brands.map((o) => o.brand + "/" + o.version).join(" ") : navigator.userAgent;
|
|
7919
7903
|
}
|
|
7920
7904
|
function B(r) {
|
|
7921
|
-
return r instanceof
|
|
7905
|
+
return r instanceof Q(r).HTMLElement;
|
|
7922
7906
|
}
|
|
7923
7907
|
function ho(r) {
|
|
7924
|
-
return r instanceof
|
|
7908
|
+
return r instanceof Q(r).Element;
|
|
7925
7909
|
}
|
|
7926
|
-
function
|
|
7927
|
-
return typeof ShadowRoot > "u" ? !1 : r instanceof
|
|
7910
|
+
function Dr(r) {
|
|
7911
|
+
return typeof ShadowRoot > "u" ? !1 : r instanceof Q(r).ShadowRoot || r instanceof ShadowRoot;
|
|
7928
7912
|
}
|
|
7929
7913
|
function er(r) {
|
|
7930
7914
|
const { overflow: o, overflowX: e, overflowY: t } = Co(r);
|
|
@@ -7934,24 +7918,24 @@ function Gt(r) {
|
|
|
7934
7918
|
return ["table", "td", "th"].includes(H(r));
|
|
7935
7919
|
}
|
|
7936
7920
|
function ne(r) {
|
|
7937
|
-
const o = /firefox/i.test(
|
|
7921
|
+
const o = /firefox/i.test(Ue()), e = Co(r);
|
|
7938
7922
|
return e.transform !== "none" || e.perspective !== "none" || e.contain === "paint" || ["transform", "perspective"].includes(e.willChange) || o && e.willChange === "filter" || o && !!e.filter && e.filter !== "none";
|
|
7939
7923
|
}
|
|
7940
|
-
function
|
|
7941
|
-
return !/^((?!chrome|android).)*safari/i.test(
|
|
7924
|
+
function Qe() {
|
|
7925
|
+
return !/^((?!chrome|android).)*safari/i.test(Ue());
|
|
7942
7926
|
}
|
|
7943
|
-
const be = Math.min, $o = Math.max,
|
|
7927
|
+
const be = Math.min, $o = Math.max, Qo = Math.round;
|
|
7944
7928
|
function to(r, o, e) {
|
|
7945
7929
|
var t, a, c, i;
|
|
7946
7930
|
o === void 0 && (o = !1), e === void 0 && (e = !1);
|
|
7947
7931
|
const l = r.getBoundingClientRect();
|
|
7948
7932
|
let d = 1, n = 1;
|
|
7949
|
-
o && B(r) && (d = r.offsetWidth > 0 &&
|
|
7950
|
-
const s = ho(r) ?
|
|
7951
|
-
return { width:
|
|
7933
|
+
o && B(r) && (d = r.offsetWidth > 0 && Qo(l.width) / r.offsetWidth || 1, n = r.offsetHeight > 0 && Qo(l.height) / r.offsetHeight || 1);
|
|
7934
|
+
const s = ho(r) ? Q(r) : window, b = !Qe() && e, g = (l.left + (b && (t = (a = s.visualViewport) == null ? void 0 : a.offsetLeft) != null ? t : 0)) / d, w = (l.top + (b && (c = (i = s.visualViewport) == null ? void 0 : i.offsetTop) != null ? c : 0)) / n, x = l.width / d, m = l.height / n;
|
|
7935
|
+
return { width: x, height: m, top: w, right: g + x, bottom: w + m, left: g, x: g, y: w };
|
|
7952
7936
|
}
|
|
7953
7937
|
function W(r) {
|
|
7954
|
-
return (o = r, (o instanceof
|
|
7938
|
+
return (o = r, (o instanceof Q(o).Node ? r.ownerDocument : r.document) || window.document).documentElement;
|
|
7955
7939
|
var o;
|
|
7956
7940
|
}
|
|
7957
7941
|
function tr(r) {
|
|
@@ -7963,7 +7947,7 @@ function Ve(r) {
|
|
|
7963
7947
|
function Jt(r, o, e) {
|
|
7964
7948
|
const t = B(o), a = W(o), c = to(r, t && function(d) {
|
|
7965
7949
|
const n = to(d);
|
|
7966
|
-
return
|
|
7950
|
+
return Qo(n.width) !== d.offsetWidth || Qo(n.height) !== d.offsetHeight;
|
|
7967
7951
|
}(o), e === "fixed");
|
|
7968
7952
|
let i = { scrollLeft: 0, scrollTop: 0 };
|
|
7969
7953
|
const l = { x: 0, y: 0 };
|
|
@@ -7976,19 +7960,19 @@ function Jt(r, o, e) {
|
|
|
7976
7960
|
return { x: c.left + i.scrollLeft - l.x, y: c.top + i.scrollTop - l.y, width: c.width, height: c.height };
|
|
7977
7961
|
}
|
|
7978
7962
|
function Fe(r) {
|
|
7979
|
-
return H(r) === "html" ? r : r.assignedSlot || r.parentNode || (
|
|
7963
|
+
return H(r) === "html" ? r : r.assignedSlot || r.parentNode || (Dr(r) ? r.host : null) || W(r);
|
|
7980
7964
|
}
|
|
7981
7965
|
function se(r) {
|
|
7982
7966
|
return B(r) && getComputedStyle(r).position !== "fixed" ? r.offsetParent : null;
|
|
7983
7967
|
}
|
|
7984
7968
|
function _r(r) {
|
|
7985
|
-
const o =
|
|
7969
|
+
const o = Q(r);
|
|
7986
7970
|
let e = se(r);
|
|
7987
7971
|
for (; e && Gt(e) && getComputedStyle(e).position === "static"; )
|
|
7988
7972
|
e = se(e);
|
|
7989
7973
|
return e && (H(e) === "html" || H(e) === "body" && getComputedStyle(e).position === "static" && !ne(e)) ? o : e || function(t) {
|
|
7990
7974
|
let a = Fe(t);
|
|
7991
|
-
for (
|
|
7975
|
+
for (Dr(a) && (a = a.host); B(a) && !["html", "body"].includes(H(a)); ) {
|
|
7992
7976
|
if (ne(a))
|
|
7993
7977
|
return a;
|
|
7994
7978
|
a = a.parentNode;
|
|
@@ -8009,16 +7993,16 @@ function We(r) {
|
|
|
8009
7993
|
function Ge(r, o) {
|
|
8010
7994
|
var e;
|
|
8011
7995
|
o === void 0 && (o = []);
|
|
8012
|
-
const t = We(r), a = t === ((e = r.ownerDocument) == null ? void 0 : e.body), c =
|
|
7996
|
+
const t = We(r), a = t === ((e = r.ownerDocument) == null ? void 0 : e.body), c = Q(t), i = a ? [c].concat(c.visualViewport || [], er(t) ? t : []) : t, l = o.concat(i);
|
|
8013
7997
|
return a ? l : l.concat(Ge(i));
|
|
8014
7998
|
}
|
|
8015
7999
|
function ue(r, o, e) {
|
|
8016
8000
|
return o === "viewport" ? Ho(function(t, a) {
|
|
8017
|
-
const c =
|
|
8001
|
+
const c = Q(t), i = W(t), l = c.visualViewport;
|
|
8018
8002
|
let d = i.clientWidth, n = i.clientHeight, s = 0, b = 0;
|
|
8019
8003
|
if (l) {
|
|
8020
8004
|
d = l.width, n = l.height;
|
|
8021
|
-
const g =
|
|
8005
|
+
const g = Qe();
|
|
8022
8006
|
(g || !g && a === "fixed") && (s = l.offsetLeft, b = l.offsetTop);
|
|
8023
8007
|
}
|
|
8024
8008
|
return { width: d, height: n, x: s, y: b };
|
|
@@ -8039,7 +8023,7 @@ function Kt(r) {
|
|
|
8039
8023
|
const i = c.getRootNode == null ? void 0 : c.getRootNode();
|
|
8040
8024
|
if (a.contains(c))
|
|
8041
8025
|
return !0;
|
|
8042
|
-
if (i &&
|
|
8026
|
+
if (i && Dr(i)) {
|
|
8043
8027
|
let l = c;
|
|
8044
8028
|
do {
|
|
8045
8029
|
if (l && a === l)
|
|
@@ -8072,7 +8056,7 @@ const oa = { getClippingRect: function(r) {
|
|
|
8072
8056
|
}, isElement: ho, getDimensions: ge, getOffsetParent: _r, getDocumentElement: W, getElementRects: (r) => {
|
|
8073
8057
|
let { reference: o, floating: e, strategy: t } = r;
|
|
8074
8058
|
return { reference: Jt(o, _r(e), t), floating: { ...ge(e), x: 0, y: 0 } };
|
|
8075
|
-
}, getClientRects: (r) => Array.from(r.getClientRects()), isRTL: (r) => Co(r).direction === "rtl" }, ra = (r, o, e) =>
|
|
8059
|
+
}, getClientRects: (r) => Array.from(r.getClientRects()), isRTL: (r) => Co(r).direction === "rtl" }, ra = (r, o, e) => Pt(r, o, { platform: oa, ...e }), Xo = "top", Yo = "bottom", Vo = "left", Fo = "right", gr = {
|
|
8076
8060
|
[Xo]: Yo,
|
|
8077
8061
|
[Yo]: Xo,
|
|
8078
8062
|
[Vo]: Fo,
|
|
@@ -8105,7 +8089,7 @@ async function ia(r) {
|
|
|
8105
8089
|
placement: r.directionName,
|
|
8106
8090
|
middleware: [
|
|
8107
8091
|
// Should we make this configurable, but have these as sane defaults?
|
|
8108
|
-
|
|
8092
|
+
Qt(),
|
|
8109
8093
|
Vt(8),
|
|
8110
8094
|
Wt({ padding: 16 }),
|
|
8111
8095
|
// @ts-ignore
|
|
@@ -11169,7 +11153,7 @@ class Zr extends X {
|
|
|
11169
11153
|
this._mounted = !0;
|
|
11170
11154
|
return;
|
|
11171
11155
|
}
|
|
11172
|
-
this.show &&
|
|
11156
|
+
this.show && De(this._wrapper), !this.show && !this._removeElement && Be(this._wrapper, () => this._removeElement = !0);
|
|
11173
11157
|
}
|
|
11174
11158
|
}
|
|
11175
11159
|
get _wrapper() {
|