@florid-kit/components 0.8.45 → 0.8.47
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/components/side-panel.d.ts +2 -0
- package/index.js +107 -54
- package/index.mjs +174 -115
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ let oe = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const ce = (o) => new oe(typeof o == "string" ? o : o + "", void 0, It),
|
|
25
|
+
const ce = (o) => new oe(typeof o == "string" ? o : o + "", void 0, It), m = (o, ...t) => {
|
|
26
26
|
const e = o.length === 1 ? o[0] : t.reduce((n, i, r) => n + ((s) => {
|
|
27
27
|
if (s._$cssResult$ === !0) return s.cssText;
|
|
28
28
|
if (typeof s == "number") return s;
|
|
@@ -284,18 +284,18 @@ J.elementStyles = [], J.shadowRootOptions = { mode: "open" }, J[ot("elementPrope
|
|
|
284
284
|
*/
|
|
285
285
|
const it = globalThis, gt = it.trustedTypes, Kt = gt ? gt.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, ie = "$lit$", j = `lit$${Math.random().toFixed(9).slice(2)}$`, ne = "?" + j, ye = `<${ne}>`, W = document, rt = () => W.createComment(""), st = (o) => o === null || typeof o != "object" && typeof o != "function", Bt = Array.isArray, me = (o) => Bt(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", _t = `[
|
|
286
286
|
\f\r]`, et = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Gt = /-->/g, Xt = />/g, V = RegExp(`>|${_t}(?:([^\\s"'>=/]+)(${_t}*=${_t}*(?:[^
|
|
287
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Jt = /'/g, Qt = /"/g, re = /^(?:script|style|textarea|title)$/i,
|
|
287
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Jt = /'/g, Qt = /"/g, re = /^(?:script|style|textarea|title)$/i, we = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), l = we(1), F = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), Yt = /* @__PURE__ */ new WeakMap(), Z = W.createTreeWalker(W, 129);
|
|
288
288
|
function se(o, t) {
|
|
289
289
|
if (!Bt(o) || !o.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
290
290
|
return Kt !== void 0 ? Kt.createHTML(t) : t;
|
|
291
291
|
}
|
|
292
|
-
const
|
|
292
|
+
const xe = (o, t) => {
|
|
293
293
|
const e = o.length - 1, n = [];
|
|
294
294
|
let i, r = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", s = et;
|
|
295
295
|
for (let h = 0; h < e; h++) {
|
|
296
296
|
const c = o[h];
|
|
297
|
-
let v,
|
|
298
|
-
for (; $ < c.length && (s.lastIndex = $,
|
|
297
|
+
let v, y, p = -1, $ = 0;
|
|
298
|
+
for (; $ < c.length && (s.lastIndex = $, y = s.exec(c), y !== null); ) $ = s.lastIndex, s === et ? y[1] === "!--" ? s = Gt : y[1] !== void 0 ? s = Xt : y[2] !== void 0 ? (re.test(y[2]) && (i = RegExp("</" + y[2], "g")), s = V) : y[3] !== void 0 && (s = V) : s === V ? y[0] === ">" ? (s = i ?? et, p = -1) : y[1] === void 0 ? p = -2 : (p = s.lastIndex - y[2].length, v = y[1], s = y[3] === void 0 ? V : y[3] === '"' ? Qt : Jt) : s === Qt || s === Jt ? s = V : s === Gt || s === Xt ? s = et : (s = V, i = void 0);
|
|
299
299
|
const E = s === V && o[h + 1].startsWith("/>") ? " " : "";
|
|
300
300
|
r += s === et ? c + ye : p >= 0 ? (n.push(v), c.slice(0, p) + ie + c.slice(p) + j + E) : c + j + (p === -2 ? h : E);
|
|
301
301
|
}
|
|
@@ -306,7 +306,7 @@ class at {
|
|
|
306
306
|
let i;
|
|
307
307
|
this.parts = [];
|
|
308
308
|
let r = 0, s = 0;
|
|
309
|
-
const h = t.length - 1, c = this.parts, [v,
|
|
309
|
+
const h = t.length - 1, c = this.parts, [v, y] = xe(t, e);
|
|
310
310
|
if (this.el = at.createElement(v, n), Z.currentNode = this.el.content, e === 2 || e === 3) {
|
|
311
311
|
const p = this.el.content.firstChild;
|
|
312
312
|
p.replaceWith(...p.childNodes);
|
|
@@ -314,7 +314,7 @@ class at {
|
|
|
314
314
|
for (; (i = Z.nextNode()) !== null && c.length < h; ) {
|
|
315
315
|
if (i.nodeType === 1) {
|
|
316
316
|
if (i.hasAttributes()) for (const p of i.getAttributeNames()) if (p.endsWith(ie)) {
|
|
317
|
-
const $ =
|
|
317
|
+
const $ = y[s++], E = i.getAttribute(p).split(j), vt = /([.?@])?(.*)/.exec($);
|
|
318
318
|
c.push({ type: 1, index: r, name: vt[2], strings: E, ctor: vt[1] === "." ? _e : vt[1] === "?" ? Ce : vt[1] === "@" ? ke : mt }), i.removeAttribute(p);
|
|
319
319
|
} else p.startsWith(j) && (c.push({ type: 6, index: r }), i.removeAttribute(p));
|
|
320
320
|
if (re.test(i.tagName)) {
|
|
@@ -554,7 +554,7 @@ kt == null || kt({ LitElement: f });
|
|
|
554
554
|
* Copyright 2017 Google LLC
|
|
555
555
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
556
556
|
*/
|
|
557
|
-
const
|
|
557
|
+
const w = (o) => (t, e) => {
|
|
558
558
|
e !== void 0 ? e.addInitializer(() => {
|
|
559
559
|
customElements.define(o, t);
|
|
560
560
|
}) : customElements.define(o, t);
|
|
@@ -599,11 +599,11 @@ function a(o) {
|
|
|
599
599
|
function K(o) {
|
|
600
600
|
return a({ ...o, state: !0, attribute: !1 });
|
|
601
601
|
}
|
|
602
|
-
const ut =
|
|
602
|
+
const ut = m`
|
|
603
603
|
outline: 1px dashed var(--color-border-primary);
|
|
604
604
|
outline-offset: 2px;
|
|
605
605
|
`;
|
|
606
|
-
|
|
606
|
+
m`
|
|
607
607
|
:host * {
|
|
608
608
|
box-sizing: border-box;
|
|
609
609
|
}
|
|
@@ -820,7 +820,7 @@ class St extends Et {
|
|
|
820
820
|
}
|
|
821
821
|
St.directiveName = "unsafeSVG", St.resultType = 2;
|
|
822
822
|
const I = Mt(St);
|
|
823
|
-
var oo = Object.defineProperty, io = Object.getOwnPropertyDescriptor,
|
|
823
|
+
var oo = Object.defineProperty, io = Object.getOwnPropertyDescriptor, x = (o, t, e, n) => {
|
|
824
824
|
for (var i = n > 1 ? void 0 : n ? io(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
825
825
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
826
826
|
return n && i && oo(t, e, i), i;
|
|
@@ -891,7 +891,7 @@ let b = class extends no {
|
|
|
891
891
|
};
|
|
892
892
|
Pe(b);
|
|
893
893
|
b.formAssociated = !0;
|
|
894
|
-
b.styles =
|
|
894
|
+
b.styles = m`
|
|
895
895
|
:host {
|
|
896
896
|
--button-border: transparent;
|
|
897
897
|
cursor: pointer;
|
|
@@ -1080,55 +1080,55 @@ b.styles = y`
|
|
|
1080
1080
|
}
|
|
1081
1081
|
//End icon movment on hover
|
|
1082
1082
|
`;
|
|
1083
|
-
|
|
1083
|
+
x([
|
|
1084
1084
|
a()
|
|
1085
1085
|
], b.prototype, "type", 2);
|
|
1086
|
-
|
|
1086
|
+
x([
|
|
1087
1087
|
a({ reflect: !0 })
|
|
1088
1088
|
], b.prototype, "value", 2);
|
|
1089
|
-
|
|
1089
|
+
x([
|
|
1090
1090
|
a({ type: String, reflect: !0 })
|
|
1091
1091
|
], b.prototype, "variant", 2);
|
|
1092
|
-
|
|
1092
|
+
x([
|
|
1093
1093
|
a({ type: String })
|
|
1094
1094
|
], b.prototype, "text", 2);
|
|
1095
|
-
|
|
1095
|
+
x([
|
|
1096
1096
|
a({ type: String })
|
|
1097
1097
|
], b.prototype, "textsecond", 2);
|
|
1098
|
-
|
|
1098
|
+
x([
|
|
1099
1099
|
a({ type: Boolean, reflect: !0 })
|
|
1100
1100
|
], b.prototype, "fullwidth", 2);
|
|
1101
|
-
|
|
1101
|
+
x([
|
|
1102
1102
|
a({ type: Boolean, reflect: !0 })
|
|
1103
1103
|
], b.prototype, "disabled", 2);
|
|
1104
|
-
|
|
1104
|
+
x([
|
|
1105
1105
|
a({ type: String, reflect: !0 })
|
|
1106
1106
|
], b.prototype, "startIconModel", 2);
|
|
1107
|
-
|
|
1107
|
+
x([
|
|
1108
1108
|
a({ type: String, reflect: !0 })
|
|
1109
1109
|
], b.prototype, "endIconModel", 2);
|
|
1110
|
-
|
|
1110
|
+
x([
|
|
1111
1111
|
a({ type: Boolean, reflect: !0, attribute: "starticon" })
|
|
1112
1112
|
], b.prototype, "startIcon", 2);
|
|
1113
|
-
|
|
1113
|
+
x([
|
|
1114
1114
|
a({ type: Boolean, reflect: !0, attribute: "endicon" })
|
|
1115
1115
|
], b.prototype, "endIcon", 2);
|
|
1116
|
-
|
|
1116
|
+
x([
|
|
1117
1117
|
a({ type: String, attribute: "paneltarget", reflect: !0 })
|
|
1118
1118
|
], b.prototype, "panelTarget", 2);
|
|
1119
|
-
|
|
1119
|
+
x([
|
|
1120
1120
|
a({ type: String })
|
|
1121
1121
|
], b.prototype, "href", 2);
|
|
1122
|
-
|
|
1122
|
+
x([
|
|
1123
1123
|
a({ type: String })
|
|
1124
1124
|
], b.prototype, "target", 2);
|
|
1125
|
-
|
|
1125
|
+
x([
|
|
1126
1126
|
a({ type: Boolean, reflect: !0 })
|
|
1127
1127
|
], b.prototype, "underlined", 2);
|
|
1128
|
-
b =
|
|
1129
|
-
|
|
1128
|
+
b = x([
|
|
1129
|
+
w("o-button")
|
|
1130
1130
|
], b);
|
|
1131
|
-
var ro = Object.defineProperty, so = Object.getOwnPropertyDescriptor,
|
|
1131
|
+
var ro = Object.defineProperty, so = Object.getOwnPropertyDescriptor, wt = (o, t, e, n) => {
|
|
1132
1132
|
for (var i = n > 1 ? void 0 : n ? so(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1133
1133
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1134
1134
|
return n && i && ro(t, e, i), i;
|
|
@@ -1174,7 +1174,7 @@ let Y = class extends f {
|
|
|
1174
1174
|
this.label = o, this.requestUpdate();
|
|
1175
1175
|
}
|
|
1176
1176
|
};
|
|
1177
|
-
Y.styles =
|
|
1177
|
+
Y.styles = m`
|
|
1178
1178
|
:host {
|
|
1179
1179
|
display: inline-flex;
|
|
1180
1180
|
justify-content: center;
|
|
@@ -1240,17 +1240,17 @@ Y.styles = y`
|
|
|
1240
1240
|
white-space: nowrap !important;
|
|
1241
1241
|
}
|
|
1242
1242
|
`;
|
|
1243
|
-
|
|
1243
|
+
wt([
|
|
1244
1244
|
a({ type: String, reflect: !0 })
|
|
1245
1245
|
], Y.prototype, "status", 2);
|
|
1246
|
-
|
|
1246
|
+
wt([
|
|
1247
1247
|
a({ type: String, reflect: !0 })
|
|
1248
1248
|
], Y.prototype, "ariaDescribedBy", 2);
|
|
1249
|
-
|
|
1249
|
+
wt([
|
|
1250
1250
|
a({ type: String, reflect: !0 })
|
|
1251
1251
|
], Y.prototype, "label", 2);
|
|
1252
|
-
Y =
|
|
1253
|
-
|
|
1252
|
+
Y = wt([
|
|
1253
|
+
w("o-wishlist-button")
|
|
1254
1254
|
], Y);
|
|
1255
1255
|
/**
|
|
1256
1256
|
* @license
|
|
@@ -1294,7 +1294,7 @@ let C = class extends f {
|
|
|
1294
1294
|
`;
|
|
1295
1295
|
}
|
|
1296
1296
|
};
|
|
1297
|
-
C.styles =
|
|
1297
|
+
C.styles = m`
|
|
1298
1298
|
:host {
|
|
1299
1299
|
display: inline-flex;
|
|
1300
1300
|
justify-content: center;
|
|
@@ -1534,7 +1534,7 @@ B([
|
|
|
1534
1534
|
a({ type: String })
|
|
1535
1535
|
], C.prototype, "srLabel", 2);
|
|
1536
1536
|
C = B([
|
|
1537
|
-
|
|
1537
|
+
w("o-icon-button")
|
|
1538
1538
|
], C);
|
|
1539
1539
|
var co = Object.defineProperty, ho = Object.getOwnPropertyDescriptor, X = (o, t, e, n) => {
|
|
1540
1540
|
for (var i = n > 1 ? void 0 : n ? ho(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -1579,7 +1579,7 @@ let D = class extends f {
|
|
|
1579
1579
|
`;
|
|
1580
1580
|
}
|
|
1581
1581
|
};
|
|
1582
|
-
D.styles =
|
|
1582
|
+
D.styles = m`
|
|
1583
1583
|
:host([template="standard"]) a {
|
|
1584
1584
|
color: var(--color-content-action-secondary);
|
|
1585
1585
|
font-size: var(--font-size-200);
|
|
@@ -1686,9 +1686,9 @@ X([
|
|
|
1686
1686
|
a({ type: Boolean, reflect: !0 })
|
|
1687
1687
|
], D.prototype, "reverseEndIcon", 2);
|
|
1688
1688
|
D = X([
|
|
1689
|
-
|
|
1689
|
+
w("o-link")
|
|
1690
1690
|
], D);
|
|
1691
|
-
var po = Object.defineProperty, uo = Object.getOwnPropertyDescriptor,
|
|
1691
|
+
var po = Object.defineProperty, uo = Object.getOwnPropertyDescriptor, xt = (o, t, e, n) => {
|
|
1692
1692
|
for (var i = n > 1 ? void 0 : n ? uo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1693
1693
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1694
1694
|
return n && i && po(t, e, i), i;
|
|
@@ -1720,7 +1720,7 @@ let tt = class extends f {
|
|
|
1720
1720
|
`;
|
|
1721
1721
|
}
|
|
1722
1722
|
};
|
|
1723
|
-
tt.styles =
|
|
1723
|
+
tt.styles = m`
|
|
1724
1724
|
svg {
|
|
1725
1725
|
width: 12px;
|
|
1726
1726
|
height: 12px;
|
|
@@ -1754,17 +1754,17 @@ tt.styles = y`
|
|
|
1754
1754
|
cursor: pointer;
|
|
1755
1755
|
}
|
|
1756
1756
|
`;
|
|
1757
|
-
|
|
1757
|
+
xt([
|
|
1758
1758
|
a({ type: Number })
|
|
1759
1759
|
], tt.prototype, "rating", 2);
|
|
1760
|
-
|
|
1760
|
+
xt([
|
|
1761
1761
|
a({ type: String })
|
|
1762
1762
|
], tt.prototype, "reviewCount", 2);
|
|
1763
|
-
|
|
1763
|
+
xt([
|
|
1764
1764
|
a({ type: String })
|
|
1765
1765
|
], tt.prototype, "href", 2);
|
|
1766
|
-
tt =
|
|
1767
|
-
|
|
1766
|
+
tt = xt([
|
|
1767
|
+
w("o-rating")
|
|
1768
1768
|
], tt);
|
|
1769
1769
|
/**
|
|
1770
1770
|
* @license
|
|
@@ -1859,7 +1859,7 @@ class mo extends yo {
|
|
|
1859
1859
|
(!t || !(i in t) && n[i] === e[i]) && (n[i] = void 0);
|
|
1860
1860
|
}
|
|
1861
1861
|
}
|
|
1862
|
-
class
|
|
1862
|
+
class wo extends mo {
|
|
1863
1863
|
constructor() {
|
|
1864
1864
|
super(...arguments), this.eventData = {};
|
|
1865
1865
|
}
|
|
@@ -1903,7 +1903,7 @@ class xo extends mo {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
class
|
|
1906
|
+
class xo extends wo {
|
|
1907
1907
|
apply(t) {
|
|
1908
1908
|
if (!t)
|
|
1909
1909
|
return;
|
|
@@ -1952,15 +1952,17 @@ class wo extends xo {
|
|
|
1952
1952
|
}
|
|
1953
1953
|
}
|
|
1954
1954
|
}
|
|
1955
|
-
const te = Mt(
|
|
1956
|
-
var $o = Object.defineProperty, _o = Object.getOwnPropertyDescriptor,
|
|
1955
|
+
const te = Mt(xo);
|
|
1956
|
+
var $o = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, g = (o, t, e, n) => {
|
|
1957
1957
|
for (var i = n > 1 ? void 0 : n ? _o(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1958
1958
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1959
1959
|
return n && i && $o(t, e, i), i;
|
|
1960
1960
|
};
|
|
1961
1961
|
let u = class extends f {
|
|
1962
1962
|
constructor() {
|
|
1963
|
-
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !1, this.showHeaderStartIcon = !1, this.headerTitle = "", this.headerTitleClassName = "panel-title", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "Close", this.firstButtonVariant = "primary", this.firstButtonProps = {}, this.onFirstButtonClickClose = !1, this.secondButtonLabel = "", this.secondButtonVariant = "secondary", this.secondButtonProps = {}, this.onSecondButtonClickClose = !1, this.disablePortal = !1, this.zIndex = 99, this.initialized = !1, this.previousFocusedElement = null, this.innerFocusedElement = null, this.
|
|
1963
|
+
super(...arguments), this.open = !1, this.showHeader = !0, this.showFooter = !1, this.showHeaderStartIcon = !1, this.headerTitle = "", this.headerTitleClassName = "panel-title", this.closeButtonLabel = "Close the modal", this.firstButtonLabel = "Close", this.firstButtonVariant = "primary", this.firstButtonProps = {}, this.onFirstButtonClickClose = !1, this.secondButtonLabel = "", this.secondButtonVariant = "secondary", this.secondButtonProps = {}, this.onSecondButtonClickClose = !1, this.disablePortal = !1, this.zIndex = 99, this.initialized = !1, this.showDetail = !1, this.previousFocusedElement = null, this.innerFocusedElement = null, this._onOpenDetail = () => {
|
|
1964
|
+
this.showDetail = !0;
|
|
1965
|
+
}, this.handleKeyDown = (o) => {
|
|
1964
1966
|
this.open && (o.key === "Escape" ? this.closePanel() : o.key === "Tab" && this.trapFocus(o));
|
|
1965
1967
|
}, this.handleClosePanel = (o) => {
|
|
1966
1968
|
o instanceof KeyboardEvent && o.key !== "Enter" && o.key !== " " || (o.preventDefault(), o.stopPropagation(), this.closePanel());
|
|
@@ -1969,18 +1971,18 @@ let u = class extends f {
|
|
|
1969
1971
|
connectedCallback() {
|
|
1970
1972
|
super.connectedCallback(), !this.disablePortal && this.parentElement !== document.body && document.body.appendChild(this), this.addEventListener("keydown", this.handleKeyDown), this.updateComplete.then(() => {
|
|
1971
1973
|
this.initialized = !0;
|
|
1972
|
-
});
|
|
1974
|
+
}), this.addEventListener("open-detail", this._onOpenDetail);
|
|
1973
1975
|
}
|
|
1974
1976
|
disconnectedCallback() {
|
|
1975
|
-
document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), this.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback();
|
|
1977
|
+
document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), this.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback(), this.removeEventListener("open-detail", this._onOpenDetail);
|
|
1976
1978
|
}
|
|
1977
1979
|
trapFocus(o) {
|
|
1978
|
-
var i, r, s, h, c, v,
|
|
1980
|
+
var i, r, s, h, c, v, y, p, $, E;
|
|
1979
1981
|
this.innerFocusedElement = document.activeElement || null, this.innerFocusedElement = ((r = (i = this.innerFocusedElement) == null ? void 0 : i.shadowRoot) == null ? void 0 : r.activeElement) || this.innerFocusedElement;
|
|
1980
1982
|
const t = this.getFocusableElements();
|
|
1981
1983
|
if (t.length === 0) return;
|
|
1982
1984
|
const e = t[0], n = t[t.length - 1];
|
|
1983
|
-
o.shiftKey && this.innerFocusedElement === e ? (o.preventDefault(), n.shadowRoot ? (c = (h = (s = n.shadowRoot) == null ? void 0 : s.querySelector(u.focusablesSelector)) == null ? void 0 : h.focus) == null || c.call(h) : (v = n.focus) == null || v.call(n)) : !o.shiftKey && this.innerFocusedElement === n && (o.preventDefault(), e.shadowRoot ? ($ = (p = (
|
|
1985
|
+
o.shiftKey && this.innerFocusedElement === e ? (o.preventDefault(), n.shadowRoot ? (c = (h = (s = n.shadowRoot) == null ? void 0 : s.querySelector(u.focusablesSelector)) == null ? void 0 : h.focus) == null || c.call(h) : (v = n.focus) == null || v.call(n)) : !o.shiftKey && this.innerFocusedElement === n && (o.preventDefault(), e.shadowRoot ? ($ = (p = (y = e.shadowRoot) == null ? void 0 : y.querySelector(u.focusablesSelector)) == null ? void 0 : p.focus) == null || $.call(p) : (E = e.focus) == null || E.call(e));
|
|
1984
1986
|
}
|
|
1985
1987
|
getFocusableElements() {
|
|
1986
1988
|
const o = this.renderRoot.querySelector(".panel");
|
|
@@ -2019,7 +2021,7 @@ let u = class extends f {
|
|
|
2019
2021
|
}
|
|
2020
2022
|
closePanel() {
|
|
2021
2023
|
var o;
|
|
2022
|
-
this.open = !1, document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), (o = this.previousFocusedElement) == null || o.focus(), this.dispatchEvent(
|
|
2024
|
+
this.open = !1, this.showDetail = !1, document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), (o = this.previousFocusedElement) == null || o.focus(), this.dispatchEvent(
|
|
2023
2025
|
new CustomEvent("close", { bubbles: !0, composed: !0 })
|
|
2024
2026
|
);
|
|
2025
2027
|
}
|
|
@@ -2053,6 +2055,33 @@ let u = class extends f {
|
|
|
2053
2055
|
this.style.setProperty("--z-overlay", `${this.zIndex || 99}`), this.style.setProperty("--z-panel", `${this.zIndex ? this.zIndex + 1 : 99}`);
|
|
2054
2056
|
}
|
|
2055
2057
|
render() {
|
|
2058
|
+
const o = this.showHeader ? l`
|
|
2059
|
+
<div class="header">
|
|
2060
|
+
${this.showHeaderStartIcon ? l`
|
|
2061
|
+
<o-icon-button
|
|
2062
|
+
icon="arrowLeft"
|
|
2063
|
+
size="small"
|
|
2064
|
+
class="return-btn"
|
|
2065
|
+
bgstyle="background-light"
|
|
2066
|
+
@click=${this.handleClosePanel}
|
|
2067
|
+
@keydown=${this.handleClosePanel}
|
|
2068
|
+
aria-label="${this.closeButtonLabel}"
|
|
2069
|
+
></o-icon-button>
|
|
2070
|
+
` : null}
|
|
2071
|
+
<h2 id="panel-title" class="${this.headerTitleClassName}">
|
|
2072
|
+
${this.headerTitle}
|
|
2073
|
+
</h2>
|
|
2074
|
+
<o-icon-button
|
|
2075
|
+
icon="cross"
|
|
2076
|
+
size="small"
|
|
2077
|
+
class="close-btn"
|
|
2078
|
+
bgstyle="background-light"
|
|
2079
|
+
@click=${this.handleClosePanel}
|
|
2080
|
+
@keydown=${this.handleClosePanel}
|
|
2081
|
+
aria-label="${this.closeButtonLabel}"
|
|
2082
|
+
></o-icon-button>
|
|
2083
|
+
</div>
|
|
2084
|
+
` : null;
|
|
2056
2085
|
return l`
|
|
2057
2086
|
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
|
|
2058
2087
|
<div
|
|
@@ -2064,18 +2093,18 @@ let u = class extends f {
|
|
|
2064
2093
|
tabindex="-1"
|
|
2065
2094
|
>
|
|
2066
2095
|
|
|
2067
|
-
${
|
|
2068
|
-
<div class="header">
|
|
2069
|
-
${this.showHeaderStartIcon ? l`
|
|
2070
|
-
<o-icon-button icon="arrowLeft" size="small" class="return-btn" bgstyle="background-light" @click=${this.handleClosePanel} @keydown=${this.handleClosePanel} aria-label="${this.closeButtonLabel}"></o-icon-button>
|
|
2071
|
-
` : null}
|
|
2072
|
-
<h2 id="panel-title" class="${this.headerTitleClassName}">${this.headerTitle}</h2>
|
|
2073
|
-
<o-icon-button icon="cross" size="small" class="close-btn" bgstyle="background-light" @click=${this.handleClosePanel} @keydown=${this.handleClosePanel} aria-label="${this.closeButtonLabel}"></o-icon-button>
|
|
2074
|
-
</div>
|
|
2075
|
-
` : null}
|
|
2096
|
+
${o}
|
|
2076
2097
|
|
|
2077
|
-
<div class="content">
|
|
2078
|
-
|
|
2098
|
+
<div class="content ${this.showDetail ? "with-detail" : ""}">
|
|
2099
|
+
|
|
2100
|
+
${this.showDetail ? l`
|
|
2101
|
+
<div class="detail-view">
|
|
2102
|
+
${o}
|
|
2103
|
+
<div class="detail-content">
|
|
2104
|
+
<slot name="detail"></slot>
|
|
2105
|
+
</div>
|
|
2106
|
+
</div>
|
|
2107
|
+
` : l`<slot></slot>`}
|
|
2079
2108
|
</div>
|
|
2080
2109
|
|
|
2081
2110
|
${this.showFooter ? l`
|
|
@@ -2107,7 +2136,7 @@ let u = class extends f {
|
|
|
2107
2136
|
`;
|
|
2108
2137
|
}
|
|
2109
2138
|
};
|
|
2110
|
-
u.styles =
|
|
2139
|
+
u.styles = m`
|
|
2111
2140
|
:host {
|
|
2112
2141
|
--z-overlay: 99;
|
|
2113
2142
|
--z-panel: 100;
|
|
@@ -2218,12 +2247,23 @@ u.styles = y`
|
|
|
2218
2247
|
flex: 1 1 auto;
|
|
2219
2248
|
overflow-y: auto;
|
|
2220
2249
|
overflow-x: hidden;
|
|
2221
|
-
padding:
|
|
2250
|
+
padding: var(--spacing-xl);
|
|
2251
|
+
|
|
2252
|
+
&.with-detail {
|
|
2253
|
+
width: 100%;
|
|
2254
|
+
height: 100%;
|
|
2255
|
+
position: absolute;
|
|
2256
|
+
top: 0;
|
|
2257
|
+
left: 0;
|
|
2258
|
+
background: var(--color-container-bg-white);
|
|
2259
|
+
z-index: 3;
|
|
2260
|
+
padding: var(--spacing-4-xs);
|
|
2261
|
+
}
|
|
2222
2262
|
}
|
|
2223
2263
|
|
|
2224
2264
|
.footer {
|
|
2225
2265
|
flex: 0 0 auto;
|
|
2226
|
-
padding:
|
|
2266
|
+
padding: var(--spacing-xl);
|
|
2227
2267
|
border-top: var(--border-050) solid var(--color-border-tertiary);
|
|
2228
2268
|
display: flex;
|
|
2229
2269
|
flex-direction: column;
|
|
@@ -2255,65 +2295,84 @@ u.styles = y`
|
|
|
2255
2295
|
--line-height: var(--line-height-280);
|
|
2256
2296
|
}
|
|
2257
2297
|
}
|
|
2298
|
+
|
|
2299
|
+
@keyframes slideInRight {
|
|
2300
|
+
from {
|
|
2301
|
+
transform: translateX(100%);
|
|
2302
|
+
}
|
|
2303
|
+
to {
|
|
2304
|
+
transform: translateX(0%);
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
.detail-view {
|
|
2309
|
+
animation: slideInRight 0.3s ease-out both;
|
|
2310
|
+
}
|
|
2311
|
+
.detail-content {
|
|
2312
|
+
padding: var(--spacing-xl);
|
|
2313
|
+
}
|
|
2258
2314
|
`;
|
|
2259
2315
|
u.focusablesSelector = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';
|
|
2260
2316
|
u.focusablesCustomElementsSelector = "o-icon-button, o-button";
|
|
2261
|
-
|
|
2317
|
+
g([
|
|
2262
2318
|
a({ type: Boolean, reflect: !0 })
|
|
2263
2319
|
], u.prototype, "open", 2);
|
|
2264
|
-
|
|
2320
|
+
g([
|
|
2265
2321
|
a({ type: Boolean, reflect: !0 })
|
|
2266
2322
|
], u.prototype, "showHeader", 2);
|
|
2267
|
-
|
|
2323
|
+
g([
|
|
2268
2324
|
a({ type: Boolean, reflect: !0 })
|
|
2269
2325
|
], u.prototype, "showFooter", 2);
|
|
2270
|
-
|
|
2326
|
+
g([
|
|
2271
2327
|
a({ type: Boolean, reflect: !0 })
|
|
2272
2328
|
], u.prototype, "showHeaderStartIcon", 2);
|
|
2273
|
-
|
|
2329
|
+
g([
|
|
2274
2330
|
a({ type: String, reflect: !0 })
|
|
2275
2331
|
], u.prototype, "headerTitle", 2);
|
|
2276
|
-
|
|
2332
|
+
g([
|
|
2277
2333
|
a({ type: String, reflect: !0 })
|
|
2278
2334
|
], u.prototype, "headerTitleClassName", 2);
|
|
2279
|
-
|
|
2335
|
+
g([
|
|
2280
2336
|
a({ type: String, reflect: !0 })
|
|
2281
2337
|
], u.prototype, "closeButtonLabel", 2);
|
|
2282
|
-
|
|
2338
|
+
g([
|
|
2283
2339
|
a({ type: String, reflect: !0 })
|
|
2284
2340
|
], u.prototype, "firstButtonLabel", 2);
|
|
2285
|
-
|
|
2341
|
+
g([
|
|
2286
2342
|
a({ type: String, reflect: !0 })
|
|
2287
2343
|
], u.prototype, "firstButtonVariant", 2);
|
|
2288
|
-
|
|
2344
|
+
g([
|
|
2289
2345
|
a({ type: Object, reflect: !0 })
|
|
2290
2346
|
], u.prototype, "firstButtonProps", 2);
|
|
2291
|
-
|
|
2347
|
+
g([
|
|
2292
2348
|
a({ type: Boolean, reflect: !0 })
|
|
2293
2349
|
], u.prototype, "onFirstButtonClickClose", 2);
|
|
2294
|
-
|
|
2350
|
+
g([
|
|
2295
2351
|
a({ type: String, reflect: !0 })
|
|
2296
2352
|
], u.prototype, "secondButtonLabel", 2);
|
|
2297
|
-
|
|
2353
|
+
g([
|
|
2298
2354
|
a({ type: String, reflect: !0 })
|
|
2299
2355
|
], u.prototype, "secondButtonVariant", 2);
|
|
2300
|
-
|
|
2356
|
+
g([
|
|
2301
2357
|
a({ type: Object, reflect: !0 })
|
|
2302
2358
|
], u.prototype, "secondButtonProps", 2);
|
|
2303
|
-
|
|
2359
|
+
g([
|
|
2304
2360
|
a({ type: Boolean, reflect: !0 })
|
|
2305
2361
|
], u.prototype, "onSecondButtonClickClose", 2);
|
|
2306
|
-
|
|
2362
|
+
g([
|
|
2307
2363
|
a({ type: Boolean, reflect: !0 })
|
|
2308
2364
|
], u.prototype, "disablePortal", 2);
|
|
2309
|
-
|
|
2365
|
+
g([
|
|
2310
2366
|
a({ type: Number, reflect: !0 })
|
|
2311
2367
|
], u.prototype, "zIndex", 2);
|
|
2312
|
-
|
|
2368
|
+
g([
|
|
2313
2369
|
a({ type: Boolean, reflect: !0 })
|
|
2314
2370
|
], u.prototype, "initialized", 2);
|
|
2315
|
-
|
|
2316
|
-
|
|
2371
|
+
g([
|
|
2372
|
+
a({ type: Boolean })
|
|
2373
|
+
], u.prototype, "showDetail", 2);
|
|
2374
|
+
u = g([
|
|
2375
|
+
w("o-side-panel")
|
|
2317
2376
|
], u);
|
|
2318
2377
|
var Co = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, N = (o, t, e, n) => {
|
|
2319
2378
|
for (var i = n > 1 ? void 0 : n ? ko(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -2397,7 +2456,7 @@ let O = class extends f {
|
|
|
2397
2456
|
`;
|
|
2398
2457
|
}
|
|
2399
2458
|
};
|
|
2400
|
-
O.styles =
|
|
2459
|
+
O.styles = m`
|
|
2401
2460
|
:host {
|
|
2402
2461
|
display: flex;
|
|
2403
2462
|
gap: 5px;
|
|
@@ -2525,7 +2584,7 @@ N([
|
|
|
2525
2584
|
K()
|
|
2526
2585
|
], O.prototype, "focusedIndex", 2);
|
|
2527
2586
|
O = N([
|
|
2528
|
-
|
|
2587
|
+
w("thumbnail-navigation")
|
|
2529
2588
|
], O);
|
|
2530
2589
|
var Ao = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, jt = (o, t, e, n) => {
|
|
2531
2590
|
for (var i = n > 1 ? void 0 : n ? Eo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -2542,7 +2601,7 @@ let lt = class extends f {
|
|
|
2542
2601
|
`;
|
|
2543
2602
|
}
|
|
2544
2603
|
};
|
|
2545
|
-
lt.styles =
|
|
2604
|
+
lt.styles = m`
|
|
2546
2605
|
.tag {
|
|
2547
2606
|
display: inline-block;
|
|
2548
2607
|
padding: var(--spacing-2-xs) var(--spacing-s);
|
|
@@ -2590,7 +2649,7 @@ lt.styles = y`
|
|
|
2590
2649
|
background-color: var(--color-content-success);
|
|
2591
2650
|
}
|
|
2592
2651
|
|
|
2593
|
-
:host(:not([type$="percentage"])) .tag
|
|
2652
|
+
:host(:not([type$="percentage"])) .tag {
|
|
2594
2653
|
@media (max-width: 375px) {
|
|
2595
2654
|
overflow: hidden;
|
|
2596
2655
|
white-space: nowrap;
|
|
@@ -2607,7 +2666,7 @@ jt([
|
|
|
2607
2666
|
a({ type: String, reflect: !0 })
|
|
2608
2667
|
], lt.prototype, "bgstyle", 2);
|
|
2609
2668
|
lt = jt([
|
|
2610
|
-
|
|
2669
|
+
w("o-tag")
|
|
2611
2670
|
], lt);
|
|
2612
2671
|
var So = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, Ut = (o, t, e, n) => {
|
|
2613
2672
|
for (var i = n > 1 ? void 0 : n ? Lo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -2627,7 +2686,7 @@ let ct = class extends f {
|
|
|
2627
2686
|
`;
|
|
2628
2687
|
}
|
|
2629
2688
|
};
|
|
2630
|
-
ct.styles =
|
|
2689
|
+
ct.styles = m`
|
|
2631
2690
|
.tooltip {
|
|
2632
2691
|
position: relative;
|
|
2633
2692
|
display: inline-block;
|
|
@@ -2727,7 +2786,7 @@ Ut([
|
|
|
2727
2786
|
a({ type: String, reflect: !0 })
|
|
2728
2787
|
], ct.prototype, "text", 2);
|
|
2729
2788
|
ct = Ut([
|
|
2730
|
-
|
|
2789
|
+
w("o-tooltip")
|
|
2731
2790
|
], ct);
|
|
2732
2791
|
var Po = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, H = (o, t, e, n) => {
|
|
2733
2792
|
for (var i = n > 1 ? void 0 : n ? Io(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -2857,7 +2916,7 @@ let S = class extends f {
|
|
|
2857
2916
|
`;
|
|
2858
2917
|
}
|
|
2859
2918
|
};
|
|
2860
|
-
S.styles =
|
|
2919
|
+
S.styles = m`
|
|
2861
2920
|
:host {
|
|
2862
2921
|
display: inline-block;
|
|
2863
2922
|
position: relative;
|
|
@@ -3022,7 +3081,7 @@ H([
|
|
|
3022
3081
|
K()
|
|
3023
3082
|
], S.prototype, "menuWidth", 2);
|
|
3024
3083
|
S = H([
|
|
3025
|
-
|
|
3084
|
+
w("o-dropdown")
|
|
3026
3085
|
], S);
|
|
3027
3086
|
var Oo = Object.getOwnPropertyDescriptor, Bo = (o, t, e, n) => {
|
|
3028
3087
|
for (var i = n > 1 ? void 0 : n ? Oo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -3034,7 +3093,7 @@ let Lt = class extends f {
|
|
|
3034
3093
|
return l` <span class="dots"></span> `;
|
|
3035
3094
|
}
|
|
3036
3095
|
};
|
|
3037
|
-
Lt.styles =
|
|
3096
|
+
Lt.styles = m`
|
|
3038
3097
|
:host {
|
|
3039
3098
|
display: flex;
|
|
3040
3099
|
align-items: center;
|
|
@@ -3087,7 +3146,7 @@ Lt.styles = y`
|
|
|
3087
3146
|
}
|
|
3088
3147
|
`;
|
|
3089
3148
|
Lt = Bo([
|
|
3090
|
-
|
|
3149
|
+
w("o-dots")
|
|
3091
3150
|
], Lt);
|
|
3092
3151
|
var zo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, z = (o, t, e, n) => {
|
|
3093
3152
|
for (var i = n > 1 ? void 0 : n ? Do(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -3231,7 +3290,7 @@ let k = class extends f {
|
|
|
3231
3290
|
`;
|
|
3232
3291
|
}
|
|
3233
3292
|
};
|
|
3234
|
-
k.styles =
|
|
3293
|
+
k.styles = m`
|
|
3235
3294
|
:host {
|
|
3236
3295
|
display: inline-block;
|
|
3237
3296
|
position: relative;
|
|
@@ -3435,7 +3494,7 @@ z([
|
|
|
3435
3494
|
K()
|
|
3436
3495
|
], k.prototype, "menuWidth", 2);
|
|
3437
3496
|
k = z([
|
|
3438
|
-
|
|
3497
|
+
w("o-dropdown-variant")
|
|
3439
3498
|
], k);
|
|
3440
3499
|
/**
|
|
3441
3500
|
* @license
|
|
@@ -3491,7 +3550,7 @@ let ht = class extends f {
|
|
|
3491
3550
|
return o ? l`<a href="${_(this.option.url)}" class="reassurance-item clickable">${e}</a>` : l`<div class="reassurance-item">${e}</div>`;
|
|
3492
3551
|
}
|
|
3493
3552
|
};
|
|
3494
|
-
ht.styles =
|
|
3553
|
+
ht.styles = m`
|
|
3495
3554
|
:host {
|
|
3496
3555
|
display: inline-block;
|
|
3497
3556
|
position: relative;
|
|
@@ -3580,7 +3639,7 @@ Ft([
|
|
|
3580
3639
|
a({ type: Number, reflect: !0 })
|
|
3581
3640
|
], ht.prototype, "imageSize", 2);
|
|
3582
3641
|
ht = Ft([
|
|
3583
|
-
|
|
3642
|
+
w("o-reassurance")
|
|
3584
3643
|
], ht);
|
|
3585
3644
|
var Uo = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, M = (o, t, e, n) => {
|
|
3586
3645
|
for (var i = n > 1 ? void 0 : n ? Fo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -3611,7 +3670,7 @@ let A = class extends No {
|
|
|
3611
3670
|
`;
|
|
3612
3671
|
}
|
|
3613
3672
|
};
|
|
3614
|
-
A.styles =
|
|
3673
|
+
A.styles = m`
|
|
3615
3674
|
:host {
|
|
3616
3675
|
cursor: pointer;
|
|
3617
3676
|
display: inline-flex;
|
|
@@ -3726,7 +3785,7 @@ M([
|
|
|
3726
3785
|
a({ type: Boolean, reflect: !0 })
|
|
3727
3786
|
], A.prototype, "inactive", 2);
|
|
3728
3787
|
A = M([
|
|
3729
|
-
|
|
3788
|
+
w("o-chip")
|
|
3730
3789
|
], A);
|
|
3731
3790
|
var Ro = Object.defineProperty, Vo = Object.getOwnPropertyDescriptor, Nt = (o, t, e, n) => {
|
|
3732
3791
|
for (var i = n > 1 ? void 0 : n ? Vo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -3749,7 +3808,7 @@ let dt = class extends f {
|
|
|
3749
3808
|
`;
|
|
3750
3809
|
}
|
|
3751
3810
|
};
|
|
3752
|
-
dt.styles =
|
|
3811
|
+
dt.styles = m`
|
|
3753
3812
|
:host {
|
|
3754
3813
|
display: flex;
|
|
3755
3814
|
flex-direction: row;
|
|
@@ -3764,7 +3823,7 @@ Nt([
|
|
|
3764
3823
|
a({ reflect: !0 })
|
|
3765
3824
|
], dt.prototype, "value", 2);
|
|
3766
3825
|
dt = Nt([
|
|
3767
|
-
|
|
3826
|
+
w("o-chipset")
|
|
3768
3827
|
], dt);
|
|
3769
3828
|
var Zo = Object.defineProperty, qo = Object.getOwnPropertyDescriptor, T = (o, t, e, n) => {
|
|
3770
3829
|
for (var i = n > 1 ? void 0 : n ? qo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -3822,7 +3881,7 @@ let L = class extends Wo {
|
|
|
3822
3881
|
`;
|
|
3823
3882
|
}
|
|
3824
3883
|
};
|
|
3825
|
-
L.styles =
|
|
3884
|
+
L.styles = m`
|
|
3826
3885
|
:host {
|
|
3827
3886
|
cursor: pointer;
|
|
3828
3887
|
display: inline-flex;
|
|
@@ -3973,7 +4032,7 @@ T([
|
|
|
3973
4032
|
a({ type: Boolean, reflect: !0 })
|
|
3974
4033
|
], L.prototype, "fullwidth", 2);
|
|
3975
4034
|
L = T([
|
|
3976
|
-
|
|
4035
|
+
w("o-filter-chip")
|
|
3977
4036
|
], L);
|
|
3978
4037
|
var Ko = Object.defineProperty, R = (o, t, e, n) => {
|
|
3979
4038
|
for (var i = void 0, r = o.length - 1, s; r >= 0; r--)
|
|
@@ -3985,7 +4044,7 @@ const Rt = class Rt extends f {
|
|
|
3985
4044
|
super(...arguments), this.type = "cart | chevron", this.titleProduct = "", this.volume = "", this.perLiter = "", this.mainPrice = "", this.imageUrl = "https://placehold.co/56x70", this.altImage = "";
|
|
3986
4045
|
}
|
|
3987
4046
|
onClick() {
|
|
3988
|
-
typeof this.onClickTile == "function" && this.
|
|
4047
|
+
typeof this.onClickTile == "function" && this.dispatchEvent(new CustomEvent("tile-click", { bubbles: !0, composed: !0 }));
|
|
3989
4048
|
}
|
|
3990
4049
|
get icons() {
|
|
3991
4050
|
return this.type === "chevron" ? l`
|
|
@@ -4026,13 +4085,13 @@ const Rt = class Rt extends f {
|
|
|
4026
4085
|
`;
|
|
4027
4086
|
}
|
|
4028
4087
|
};
|
|
4029
|
-
Rt.styles =
|
|
4088
|
+
Rt.styles = m`
|
|
4030
4089
|
.tile {
|
|
4031
4090
|
display: flex;
|
|
4032
4091
|
align-items: center;
|
|
4033
4092
|
justify-content: space-between;
|
|
4034
4093
|
border-radius: var(--radius-xs);
|
|
4035
|
-
background: var(--
|
|
4094
|
+
background: var(--color-container-bg-white);
|
|
4036
4095
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
|
|
4037
4096
|
font-family: var(--font-family-loccitane-sans);
|
|
4038
4097
|
height: 70px;
|