@florid-kit/components 0.9.14 → 0.9.16
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/aria.d.ts +1 -1
- package/index.js +831 -830
- package/index.mjs +1524 -1523
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -282,7 +282,7 @@ it.elementStyles = [], it.shadowRootOptions = { mode: "open" }, it[ct("elementPr
|
|
|
282
282
|
* Copyright 2017 Google LLC
|
|
283
283
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
284
284
|
*/
|
|
285
|
-
const ht = globalThis, _t = ht.trustedTypes, oe = _t ? _t.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, de = "$lit$", K = `lit$${Math.random().toFixed(9).slice(2)}$`, pe = "?" + K,
|
|
285
|
+
const ht = globalThis, _t = ht.trustedTypes, oe = _t ? _t.createPolicy("lit-html", { createHTML: (o) => o }) : void 0, de = "$lit$", K = `lit$${Math.random().toFixed(9).slice(2)}$`, pe = "?" + K, Ae = `<${pe}>`, tt = document, pt = () => tt.createComment(""), ut = (o) => o === null || typeof o != "object" && typeof o != "function", Rt = Array.isArray, Ee = (o) => Rt(o) || typeof (o == null ? void 0 : o[Symbol.iterator]) == "function", Pt = `[
|
|
286
286
|
\f\r]`, lt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ie = /-->/g, ne = />/g, J = RegExp(`>|${Pt}(?:([^\\s"'>=/]+)(${Pt}*=${Pt}*(?:[^
|
|
287
287
|
\f\r"'\`<>=]|("|')|))|$)`, "g"), re = /'/g, se = /"/g, ue = /^(?:script|style|textarea|title)$/i, Le = (o) => (t, ...e) => ({ _$litType$: o, strings: t, values: e }), l = Le(1), G = Symbol.for("lit-noChange"), d = Symbol.for("lit-nothing"), ae = /* @__PURE__ */ new WeakMap(), Q = tt.createTreeWalker(tt, 129);
|
|
288
288
|
function ve(o, t) {
|
|
@@ -297,7 +297,7 @@ const Pe = (o, t) => {
|
|
|
297
297
|
let m, w, v = -1, R = 0;
|
|
298
298
|
for (; R < c.length && (s.lastIndex = R, w = s.exec(c), w !== null); ) R = s.lastIndex, s === lt ? w[1] === "!--" ? s = ie : w[1] !== void 0 ? s = ne : w[2] !== void 0 ? (ue.test(w[2]) && (i = RegExp("</" + w[2], "g")), s = J) : w[3] !== void 0 && (s = J) : s === J ? w[0] === ">" ? (s = i ?? lt, v = -1) : w[1] === void 0 ? v = -2 : (v = s.lastIndex - w[2].length, m = w[1], s = w[3] === void 0 ? J : w[3] === '"' ? se : re) : s === se || s === re ? s = J : s === ie || s === ne ? s = lt : (s = J, i = void 0);
|
|
299
299
|
const Z = s === J && o[h + 1].startsWith("/>") ? " " : "";
|
|
300
|
-
r += s === lt ? c +
|
|
300
|
+
r += s === lt ? c + Ae : v >= 0 ? (n.push(m), c.slice(0, v) + de + c.slice(v) + K + Z) : c + K + (v === -2 ? h : Z);
|
|
301
301
|
}
|
|
302
302
|
return [ve(o, r + (o[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), n];
|
|
303
303
|
};
|
|
@@ -393,7 +393,7 @@ class xt {
|
|
|
393
393
|
return this._$AB;
|
|
394
394
|
}
|
|
395
395
|
_$AI(t, e = this) {
|
|
396
|
-
t = nt(this, t, e), ut(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== G && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) :
|
|
396
|
+
t = nt(this, t, e), ut(t) ? t === d || t == null || t === "" ? (this._$AH !== d && this._$AR(), this._$AH = d) : t !== this._$AH && t !== G && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ee(t) ? this.k(t) : this._(t);
|
|
397
397
|
}
|
|
398
398
|
O(t) {
|
|
399
399
|
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
@@ -856,715 +856,451 @@ class Dt extends Bt {
|
|
|
856
856
|
}
|
|
857
857
|
Dt.directiveName = "unsafeSVG", Dt.resultType = 2;
|
|
858
858
|
const C = Vt(Dt);
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
859
|
+
/**
|
|
860
|
+
* @license
|
|
861
|
+
* Copyright 2020 Google LLC
|
|
862
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
863
|
+
*/
|
|
864
|
+
const mo = (o) => o.strings === void 0;
|
|
865
|
+
/**
|
|
866
|
+
* @license
|
|
867
|
+
* Copyright 2017 Google LLC
|
|
868
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
869
|
+
*/
|
|
870
|
+
const dt = (o, t) => {
|
|
871
|
+
var n;
|
|
872
|
+
const e = o._$AN;
|
|
873
|
+
if (e === void 0) return !1;
|
|
874
|
+
for (const i of e) (n = i._$AO) == null || n.call(i, t, !1), dt(i, t);
|
|
875
|
+
return !0;
|
|
876
|
+
}, kt = (o) => {
|
|
877
|
+
let t, e;
|
|
878
|
+
do {
|
|
879
|
+
if ((t = o._$AM) === void 0) break;
|
|
880
|
+
e = t._$AN, e.delete(o), o = t;
|
|
881
|
+
} while ((e == null ? void 0 : e.size) === 0);
|
|
882
|
+
}, be = (o) => {
|
|
883
|
+
for (let t; t = o._$AM; o = t) {
|
|
884
|
+
let e = t._$AN;
|
|
885
|
+
if (e === void 0) t._$AN = e = /* @__PURE__ */ new Set();
|
|
886
|
+
else if (e.has(o)) break;
|
|
887
|
+
e.add(o), $o(t);
|
|
888
|
+
}
|
|
889
|
+
};
|
|
890
|
+
function xo(o) {
|
|
891
|
+
this._$AN !== void 0 ? (kt(this), this._$AM = o, be(this)) : this._$AM = o;
|
|
892
|
+
}
|
|
893
|
+
function wo(o, t = !1, e = 0) {
|
|
894
|
+
const n = this._$AH, i = this._$AN;
|
|
895
|
+
if (i !== void 0 && i.size !== 0) if (t) if (Array.isArray(n)) for (let r = e; r < n.length; r++) dt(n[r], !1), kt(n[r]);
|
|
896
|
+
else n != null && (dt(n, !1), kt(n));
|
|
897
|
+
else dt(this, o);
|
|
898
|
+
}
|
|
899
|
+
const $o = (o) => {
|
|
900
|
+
o.type == Ut.CHILD && (o._$AP ?? (o._$AP = wo), o._$AQ ?? (o._$AQ = xo));
|
|
863
901
|
};
|
|
864
|
-
|
|
865
|
-
let b = class extends wo {
|
|
902
|
+
class Co extends qt {
|
|
866
903
|
constructor() {
|
|
867
|
-
super(...arguments), this.
|
|
868
|
-
}
|
|
869
|
-
get name() {
|
|
870
|
-
return this.getAttribute("name") ?? "";
|
|
904
|
+
super(...arguments), this._$AN = void 0;
|
|
871
905
|
}
|
|
872
|
-
|
|
873
|
-
|
|
906
|
+
_$AT(t, e, n) {
|
|
907
|
+
super._$AT(t, e, n), be(this), this.isConnected = t._$AU;
|
|
874
908
|
}
|
|
875
|
-
|
|
876
|
-
|
|
909
|
+
_$AO(t, e = !0) {
|
|
910
|
+
var n, i;
|
|
911
|
+
t !== this.isConnected && (this.isConnected = t, t ? (n = this.reconnected) == null || n.call(this) : (i = this.disconnected) == null || i.call(this)), e && (dt(this, t), kt(this));
|
|
877
912
|
}
|
|
878
|
-
|
|
879
|
-
if (
|
|
880
|
-
|
|
881
|
-
|
|
913
|
+
setValue(t) {
|
|
914
|
+
if (mo(this._$Ct)) this._$Ct._$AI(t, this);
|
|
915
|
+
else {
|
|
916
|
+
const e = [...this._$Ct._$AH];
|
|
917
|
+
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
882
918
|
}
|
|
883
919
|
}
|
|
884
|
-
|
|
885
|
-
return this.href ? this.renderLink() : this.renderButton();
|
|
920
|
+
disconnected() {
|
|
886
921
|
}
|
|
887
|
-
|
|
888
|
-
const t = o === "start" ? this.startIconModel : this.endIconModel;
|
|
889
|
-
if (!t) return d;
|
|
890
|
-
const e = N[t].replace(
|
|
891
|
-
"<svg",
|
|
892
|
-
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
893
|
-
);
|
|
894
|
-
return l`<span class="${o === "start" ? "icon-start" : "icon-end"}">${C(e)}</span>`;
|
|
922
|
+
reconnected() {
|
|
895
923
|
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
${this.startIcon ? this.renderIcon("start") : d}
|
|
901
|
-
${o ? l`
|
|
902
|
-
${this.text ? l`<span class="text">${this.text}</span>` : d}
|
|
903
|
-
${this.textsecond ? l`<span class="text">${this.textsecond}</span>` : d}
|
|
904
|
-
${this.withbadge ? l`<slot></slot>` : d}
|
|
905
|
-
` : l`<slot></slot>`}
|
|
906
|
-
${this.endIcon ? this.renderIcon("end") : d}
|
|
907
|
-
</button>
|
|
908
|
-
`;
|
|
924
|
+
}
|
|
925
|
+
class _o extends Co {
|
|
926
|
+
constructor() {
|
|
927
|
+
super(...arguments), this.prevData = {};
|
|
909
928
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
return l`
|
|
913
|
-
<a
|
|
914
|
-
href=${this.href}
|
|
915
|
-
target=${this.target || d}
|
|
916
|
-
class="button"
|
|
917
|
-
?disabled=${this.disabled}
|
|
918
|
-
role="button"
|
|
919
|
-
@click=${this.handleClick}
|
|
920
|
-
@keydown=${this.handleClick}
|
|
921
|
-
>
|
|
922
|
-
${this.startIcon ? this.renderIcon("start") : d}
|
|
923
|
-
${o ? l`
|
|
924
|
-
${this.text ? l`<span>${this.text}</span>` : d}
|
|
925
|
-
${this.textsecond ? l`<span>${this.textsecond}</span>` : d}
|
|
926
|
-
` : l`<slot></slot>`}
|
|
927
|
-
${this.endIcon ? this.renderIcon("end") : d}
|
|
928
|
-
</a>
|
|
929
|
-
`;
|
|
929
|
+
render(t) {
|
|
930
|
+
return d;
|
|
930
931
|
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
:host(.a--tabfocus) {
|
|
943
|
-
outline: none !important;
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
:host([fullwidth]) {
|
|
947
|
-
width: 100%;
|
|
948
|
-
}
|
|
949
|
-
|
|
950
|
-
:host([variant="primary"]) {
|
|
951
|
-
--button-bg: var(--color-container-action-primary-default);
|
|
952
|
-
--button-bg-hover: var(--color-container-action-primary-hover);
|
|
953
|
-
--button-bg-pressed: var(--color-container-action-primary-pressed);
|
|
954
|
-
--button-text: var(--color-content-action-primary);
|
|
955
|
-
--button-text-hover: var(--color-content-action-primary);
|
|
956
|
-
--button-border: transparent;
|
|
957
|
-
--button-border-width: var(--border-m);
|
|
958
|
-
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
959
|
-
--button-starticon-svg-width: 0px; /* No starticon SVG for primary button */
|
|
960
|
-
--button-endicon-svg-width: 0px; /* No endicon SVG for primary button */
|
|
932
|
+
update(t, [e]) {
|
|
933
|
+
var n;
|
|
934
|
+
this.element !== t.element && (this.element = t.element), this.host = ((n = t.options) === null || n === void 0 ? void 0 : n.host) || this.element, this.apply(e), this.groom(e), this.prevData = { ...e };
|
|
935
|
+
}
|
|
936
|
+
apply(t) {
|
|
937
|
+
if (!t)
|
|
938
|
+
return;
|
|
939
|
+
const { prevData: e, element: n } = this;
|
|
940
|
+
for (const i in t) {
|
|
941
|
+
const r = t[i];
|
|
942
|
+
r !== e[i] && (n[i] = r);
|
|
961
943
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
944
|
+
}
|
|
945
|
+
groom(t) {
|
|
946
|
+
const { prevData: e, element: n } = this;
|
|
947
|
+
if (e)
|
|
948
|
+
for (const i in e)
|
|
949
|
+
(!t || !(i in t) && n[i] === e[i]) && (n[i] = void 0);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
class ko extends _o {
|
|
953
|
+
constructor() {
|
|
954
|
+
super(...arguments), this.eventData = {};
|
|
955
|
+
}
|
|
956
|
+
apply(t) {
|
|
957
|
+
if (t)
|
|
958
|
+
for (const e in t) {
|
|
959
|
+
const n = t[e];
|
|
960
|
+
n !== this.eventData[e] && this.applyEvent(e, n);
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
applyEvent(t, e) {
|
|
964
|
+
const { prevData: n, element: i } = this;
|
|
965
|
+
this.eventData[t] = e, n[t] && i.removeEventListener(t, this, e), i.addEventListener(t, this, e);
|
|
966
|
+
}
|
|
967
|
+
groom(t) {
|
|
968
|
+
const { prevData: e, element: n } = this;
|
|
969
|
+
if (e)
|
|
970
|
+
for (const i in e)
|
|
971
|
+
(!t || !(i in t) && n[i] === e[i]) && this.groomEvent(i, e[i]);
|
|
972
|
+
}
|
|
973
|
+
groomEvent(t, e) {
|
|
974
|
+
const { element: n } = this;
|
|
975
|
+
delete this.eventData[t], n.removeEventListener(t, this, e);
|
|
976
|
+
}
|
|
977
|
+
handleEvent(t) {
|
|
978
|
+
const e = this.eventData[t.type];
|
|
979
|
+
typeof e == "function" ? e.call(this.host, t) : e.handleEvent(t);
|
|
980
|
+
}
|
|
981
|
+
disconnected() {
|
|
982
|
+
const { eventData: t, element: e } = this;
|
|
983
|
+
for (const n in t) {
|
|
984
|
+
const i = n.slice(1), r = t[n];
|
|
985
|
+
e.removeEventListener(i, this, r);
|
|
974
986
|
}
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
--button-text-hover: var(--color-content-action-secondary);
|
|
982
|
-
--button-border-width: 0;
|
|
983
|
-
--button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
|
|
984
|
-
--button-starticon-svg-width: 16px;
|
|
985
|
-
--button-endicon-svg-width: 12px;
|
|
987
|
+
}
|
|
988
|
+
reconnected() {
|
|
989
|
+
const { eventData: t, element: e } = this;
|
|
990
|
+
for (const n in t) {
|
|
991
|
+
const i = n.slice(1), r = t[n];
|
|
992
|
+
e.addEventListener(i, this, r);
|
|
986
993
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
class So extends ko {
|
|
997
|
+
apply(t) {
|
|
998
|
+
if (!t)
|
|
999
|
+
return;
|
|
1000
|
+
const { prevData: e, element: n } = this;
|
|
1001
|
+
for (const i in t) {
|
|
1002
|
+
const r = t[i];
|
|
1003
|
+
if (r === e[i])
|
|
1004
|
+
continue;
|
|
1005
|
+
const s = i.slice(1);
|
|
1006
|
+
switch (i[0]) {
|
|
1007
|
+
case "@":
|
|
1008
|
+
this.eventData[s] = r, this.applyEvent(s, r);
|
|
1009
|
+
break;
|
|
1010
|
+
case ".":
|
|
1011
|
+
n[s] = r;
|
|
1012
|
+
break;
|
|
1013
|
+
case "?":
|
|
1014
|
+
r ? n.setAttribute(s, "") : n.removeAttribute(s);
|
|
1015
|
+
break;
|
|
1016
|
+
default:
|
|
1017
|
+
r != null ? n.setAttribute(i, String(r)) : n.removeAttribute(i);
|
|
1018
|
+
break;
|
|
1019
|
+
}
|
|
1006
1020
|
}
|
|
1021
|
+
}
|
|
1022
|
+
groom(t) {
|
|
1023
|
+
const { prevData: e, element: n } = this;
|
|
1024
|
+
if (e)
|
|
1025
|
+
for (const i in e) {
|
|
1026
|
+
const r = i.slice(1);
|
|
1027
|
+
if (!t || !(i in t) && n[r] === e[i])
|
|
1028
|
+
switch (i[0]) {
|
|
1029
|
+
case "@":
|
|
1030
|
+
this.groomEvent(r, e[i]);
|
|
1031
|
+
break;
|
|
1032
|
+
case ".":
|
|
1033
|
+
n[r] = void 0;
|
|
1034
|
+
break;
|
|
1035
|
+
case "?":
|
|
1036
|
+
n.removeAttribute(r);
|
|
1037
|
+
break;
|
|
1038
|
+
default:
|
|
1039
|
+
n.removeAttribute(i);
|
|
1040
|
+
break;
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
const le = Vt(So);
|
|
1046
|
+
/**
|
|
1047
|
+
* @license
|
|
1048
|
+
* Copyright 2018 Google LLC
|
|
1049
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
1050
|
+
*/
|
|
1051
|
+
const k = (o) => o ?? d;
|
|
1052
|
+
var Ao = Object.defineProperty, Eo = Object.getOwnPropertyDescriptor, H = (o, t, e, n) => {
|
|
1053
|
+
for (var i = n > 1 ? void 0 : n ? Eo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1054
|
+
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1055
|
+
return n && i && Ao(t, e, i), i;
|
|
1056
|
+
};
|
|
1057
|
+
let S = class extends u {
|
|
1058
|
+
constructor() {
|
|
1059
|
+
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1, this.showSrLabel = !1, this.srLabel = "";
|
|
1060
|
+
}
|
|
1061
|
+
updated(o) {
|
|
1062
|
+
super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
1063
|
+
}
|
|
1064
|
+
render() {
|
|
1065
|
+
const o = N[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace("<svg", '<svg aria-hidden="true" focusable="false" part="svg"').replace(/<path\b/g, '<path part="icon-path"').replace(/<g\b/g, '<g part="icon-group"').replace(/<circle\b/g, '<circle part="icon-circle"'), n = this.showSrLabel ? l`<span class="sr-only">${this.srLabel}</span>` : null, i = this.showSrLabel ? null : "icon";
|
|
1066
|
+
return l`
|
|
1067
|
+
${this.type === "span" ? l`
|
|
1068
|
+
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1069
|
+
${C(e)}
|
|
1070
|
+
</span>
|
|
1071
|
+
` : l`
|
|
1072
|
+
<button
|
|
1073
|
+
type="button"
|
|
1074
|
+
aria-label=${k(i)}
|
|
1075
|
+
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
1076
|
+
?disabled="${this.disabled}"
|
|
1077
|
+
>
|
|
1078
|
+
${C(e)}
|
|
1079
|
+
${n}
|
|
1080
|
+
</button>
|
|
1081
|
+
`}
|
|
1082
|
+
`;
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
S.styles = f`
|
|
1086
|
+
:host {
|
|
1087
|
+
display: inline-flex;
|
|
1088
|
+
justify-content: center;
|
|
1089
|
+
align-items: center;
|
|
1090
|
+
outline: none !important;
|
|
1091
|
+
}
|
|
1007
1092
|
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1093
|
+
.icon-button {
|
|
1094
|
+
display: flex;
|
|
1095
|
+
justify-content: center;
|
|
1096
|
+
align-items: center;
|
|
1097
|
+
width: 32px;
|
|
1098
|
+
height: 32px;
|
|
1099
|
+
border: transparent;
|
|
1100
|
+
border-radius: var(--radius-full);
|
|
1101
|
+
cursor: pointer;
|
|
1102
|
+
position: relative;
|
|
1011
1103
|
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
border: var(--button-border-width, var(--border-m)) solid var(--button-border);
|
|
1022
|
-
border-radius: var(--radius-m);
|
|
1023
|
-
font-family: var(--font-family-loccitane-sans);
|
|
1024
|
-
font-size: var(--font-size-150);
|
|
1025
|
-
font-weight: var(--font-weight-400);
|
|
1026
|
-
line-height: var(--line-height-200);
|
|
1027
|
-
min-width: 64px;
|
|
1028
|
-
padding: var(--button-padding);
|
|
1029
|
-
text-decoration: none;
|
|
1030
|
-
cursor: inherit;
|
|
1031
|
-
box-sizing: border-box;
|
|
1104
|
+
&.icon-wishlist {
|
|
1105
|
+
svg {
|
|
1106
|
+
path {
|
|
1107
|
+
stroke: var(--color-content-action-secondary);
|
|
1108
|
+
stroke-width: var(--icon-stroke-width, 1);
|
|
1109
|
+
}
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
}
|
|
1032
1113
|
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
font-weight: var(--font-weight-400);
|
|
1037
|
-
line-height: var(--line-height-200);
|
|
1038
|
-
}
|
|
1039
|
-
}
|
|
1114
|
+
.icon-button.filled svg {
|
|
1115
|
+
fill: var(--color-content-action-secondary);
|
|
1116
|
+
}
|
|
1040
1117
|
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
}
|
|
1118
|
+
.icon-button.xsmall {
|
|
1119
|
+
width: 20px;
|
|
1120
|
+
height: 20px;
|
|
1045
1121
|
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1122
|
+
&:not(.icon-wishlist) {
|
|
1123
|
+
svg {
|
|
1124
|
+
width: 8px;
|
|
1125
|
+
height: 8px;
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1049
1129
|
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1130
|
+
.icon-button.small {
|
|
1131
|
+
width: 32px;
|
|
1132
|
+
height: 32px;
|
|
1053
1133
|
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1134
|
+
&:not(.icon-wishlist) {
|
|
1135
|
+
svg {
|
|
1136
|
+
width: 16px;
|
|
1137
|
+
height: 16px;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1058
1141
|
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
align-items: center;
|
|
1142
|
+
.icon-button.medium {
|
|
1143
|
+
width: 40px;
|
|
1144
|
+
height: 40px;
|
|
1063
1145
|
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
path[class] {
|
|
1072
|
-
fill: var(--button-text) !important;
|
|
1073
|
-
}
|
|
1074
|
-
path[stroke] {
|
|
1075
|
-
stroke: var(--button-text) !important;
|
|
1076
|
-
}
|
|
1077
|
-
}
|
|
1146
|
+
&:not(.icon-wishlist) {
|
|
1147
|
+
svg {
|
|
1148
|
+
width: 16px;
|
|
1149
|
+
height: 16px;
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1078
1153
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1154
|
+
.icon-button.large {
|
|
1155
|
+
width: 40px;
|
|
1156
|
+
height: 40px;
|
|
1082
1157
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1158
|
+
&:not(.icon-wishlist) {
|
|
1159
|
+
svg {
|
|
1160
|
+
width: 24px;
|
|
1161
|
+
height: 24px;
|
|
1162
|
+
}
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1087
1165
|
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
:host([variant="tertiary"][endIcon]) .button .icon-end {
|
|
1094
|
-
width: var(--button-endicon-svg-width, 8px);
|
|
1095
|
-
}
|
|
1166
|
+
.icon-button.none-light, .icon-button.none-contrast {
|
|
1167
|
+
background-color: transparent;
|
|
1168
|
+
width: auto;
|
|
1169
|
+
height: auto;
|
|
1096
1170
|
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1171
|
+
&.xsmall {
|
|
1172
|
+
svg {
|
|
1173
|
+
width: 8px;
|
|
1174
|
+
height: 8px;
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1101
1177
|
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
width: 100%;
|
|
1109
|
-
border-bottom: var(--border-M, 1px) solid var(--button-text);
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1178
|
+
&.small {
|
|
1179
|
+
svg {
|
|
1180
|
+
width: 16px;
|
|
1181
|
+
height: 16px;
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1112
1184
|
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1185
|
+
&.medium {
|
|
1186
|
+
svg {
|
|
1187
|
+
width: 16px;
|
|
1188
|
+
height: 16px;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1117
1191
|
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
//Icon movement on hover
|
|
1125
|
-
:host([variant="tertiary"][endIcon]) .icon-end {
|
|
1126
|
-
display: inline-flex;
|
|
1127
|
-
align-items: center;
|
|
1128
|
-
}
|
|
1192
|
+
&.large {
|
|
1193
|
+
svg {
|
|
1194
|
+
width: 24px;
|
|
1195
|
+
height: 24px;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1129
1198
|
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
}
|
|
1134
|
-
//End icon movment on hover
|
|
1135
|
-
`;
|
|
1136
|
-
x([
|
|
1137
|
-
a()
|
|
1138
|
-
], b.prototype, "type", 2);
|
|
1139
|
-
x([
|
|
1140
|
-
a({ reflect: !0 })
|
|
1141
|
-
], b.prototype, "value", 2);
|
|
1142
|
-
x([
|
|
1143
|
-
a({ type: String, reflect: !0 })
|
|
1144
|
-
], b.prototype, "variant", 2);
|
|
1145
|
-
x([
|
|
1146
|
-
a({ type: String })
|
|
1147
|
-
], b.prototype, "text", 2);
|
|
1148
|
-
x([
|
|
1149
|
-
a({ type: String })
|
|
1150
|
-
], b.prototype, "textsecond", 2);
|
|
1151
|
-
x([
|
|
1152
|
-
a({ type: Boolean, reflect: !0 })
|
|
1153
|
-
], b.prototype, "fullwidth", 2);
|
|
1154
|
-
x([
|
|
1155
|
-
a({ type: Boolean, reflect: !0 })
|
|
1156
|
-
], b.prototype, "disabled", 2);
|
|
1157
|
-
x([
|
|
1158
|
-
a({ type: String, reflect: !0 })
|
|
1159
|
-
], b.prototype, "startIconModel", 2);
|
|
1160
|
-
x([
|
|
1161
|
-
a({ type: String, reflect: !0 })
|
|
1162
|
-
], b.prototype, "endIconModel", 2);
|
|
1163
|
-
x([
|
|
1164
|
-
a({ type: Boolean, reflect: !0, attribute: "starticon" })
|
|
1165
|
-
], b.prototype, "startIcon", 2);
|
|
1166
|
-
x([
|
|
1167
|
-
a({ type: Boolean, reflect: !0, attribute: "endicon" })
|
|
1168
|
-
], b.prototype, "endIcon", 2);
|
|
1169
|
-
x([
|
|
1170
|
-
a({ type: String, attribute: "paneltarget", reflect: !0 })
|
|
1171
|
-
], b.prototype, "panelTarget", 2);
|
|
1172
|
-
x([
|
|
1173
|
-
a({ type: String })
|
|
1174
|
-
], b.prototype, "href", 2);
|
|
1175
|
-
x([
|
|
1176
|
-
a({ type: String })
|
|
1177
|
-
], b.prototype, "target", 2);
|
|
1178
|
-
x([
|
|
1179
|
-
a({ type: Boolean, reflect: !0 })
|
|
1180
|
-
], b.prototype, "underlined", 2);
|
|
1181
|
-
x([
|
|
1182
|
-
a({ type: Boolean, reflect: !0 })
|
|
1183
|
-
], b.prototype, "withbadge", 2);
|
|
1184
|
-
b = x([
|
|
1185
|
-
y("o-button")
|
|
1186
|
-
], b);
|
|
1187
|
-
var $o = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, Et = (o, t, e, n) => {
|
|
1188
|
-
for (var i = n > 1 ? void 0 : n ? Co(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1189
|
-
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1190
|
-
return n && i && $o(t, e, i), i;
|
|
1191
|
-
};
|
|
1192
|
-
let rt = class extends u {
|
|
1193
|
-
constructor() {
|
|
1194
|
-
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
|
|
1195
|
-
this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
|
|
1196
|
-
detail: { status: this.status },
|
|
1197
|
-
bubbles: !0,
|
|
1198
|
-
composed: !0
|
|
1199
|
-
}));
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
connectedCallback() {
|
|
1203
|
-
super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-pressed", String(this.status === "filled"));
|
|
1204
|
-
}
|
|
1205
|
-
firstUpdated() {
|
|
1206
|
-
this.addEventListener("click", this.toggleStatus), this.addEventListener("keydown", this.handleKeydown);
|
|
1207
|
-
}
|
|
1208
|
-
handleKeydown(o) {
|
|
1209
|
-
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.toggleStatus());
|
|
1210
|
-
}
|
|
1211
|
-
render() {
|
|
1212
|
-
const o = N.wishlist.replace(
|
|
1213
|
-
"<svg",
|
|
1214
|
-
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1215
|
-
);
|
|
1216
|
-
return l`
|
|
1217
|
-
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
1218
|
-
<span class="sr-only">${this.label}</span>
|
|
1219
|
-
${C(o)}
|
|
1220
|
-
</button>
|
|
1221
|
-
`;
|
|
1222
|
-
}
|
|
1223
|
-
setStatus(o) {
|
|
1224
|
-
this.status = o, this.setAttribute("aria-pressed", String(this.status === "filled")), this.requestUpdate();
|
|
1225
|
-
}
|
|
1226
|
-
setAriaDescribedBy(o) {
|
|
1227
|
-
this.ariaDescribedBy = o, this.requestUpdate();
|
|
1228
|
-
}
|
|
1229
|
-
setLabel(o) {
|
|
1230
|
-
this.label = o, this.requestUpdate();
|
|
1231
|
-
}
|
|
1232
|
-
};
|
|
1233
|
-
rt.styles = f`
|
|
1234
|
-
:host {
|
|
1235
|
-
display: inline-flex;
|
|
1236
|
-
justify-content: center;
|
|
1237
|
-
align-items: center;
|
|
1238
|
-
outline: none !important;
|
|
1199
|
+
&:disabled {
|
|
1200
|
+
background-color: transparent;
|
|
1201
|
+
}
|
|
1239
1202
|
}
|
|
1240
1203
|
|
|
1241
|
-
.
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
border-radius: var(--radius-full);
|
|
1249
|
-
background-color: var(--color-alpha-light-strong);
|
|
1250
|
-
position: relative;
|
|
1251
|
-
cursor: pointer;
|
|
1204
|
+
.icon-button.none-light {
|
|
1205
|
+
svg {
|
|
1206
|
+
path {
|
|
1207
|
+
stroke: var(--color-content-action-primary);
|
|
1208
|
+
fill: var(--color-content-action-primary);
|
|
1209
|
+
}
|
|
1210
|
+
}
|
|
1252
1211
|
}
|
|
1253
1212
|
|
|
1254
|
-
.
|
|
1255
|
-
|
|
1213
|
+
.icon-button.none-light.icon-wishlist svg path {
|
|
1214
|
+
fill: none;
|
|
1256
1215
|
}
|
|
1257
1216
|
|
|
1258
|
-
.
|
|
1259
|
-
|
|
1217
|
+
:host([status="filled"]) .icon-button.none-light.icon-wishlist svg path {
|
|
1218
|
+
fill: var(--color-content-action-primary);
|
|
1260
1219
|
}
|
|
1261
1220
|
|
|
1262
|
-
.
|
|
1263
|
-
|
|
1221
|
+
.icon-button.background-light {
|
|
1222
|
+
background-color: var(--color-alpha-light-strong);
|
|
1223
|
+
|
|
1224
|
+
&:hover:not(:disabled) {
|
|
1225
|
+
background-color: var(--color-alpha-light-stronger);
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
&:active:not(:disabled) {
|
|
1229
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1230
|
+
}
|
|
1264
1231
|
}
|
|
1265
1232
|
|
|
1266
|
-
.
|
|
1267
|
-
|
|
1233
|
+
.icon-button.background-contrast {
|
|
1234
|
+
background-color: var(--color-container-action-tertiary-default);
|
|
1235
|
+
|
|
1236
|
+
&:hover:not(:disabled) {
|
|
1237
|
+
background-color: var(--color-container-action-tertiary-hover);
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
&:active:not(:disabled) {
|
|
1241
|
+
background-color: var(--color-container-action-tertiary-pressed);
|
|
1242
|
+
}
|
|
1268
1243
|
}
|
|
1269
1244
|
|
|
1270
|
-
|
|
1271
|
-
|
|
1245
|
+
.icon-button.ghost-light {
|
|
1246
|
+
background-color: transparent;
|
|
1247
|
+
|
|
1248
|
+
svg {
|
|
1249
|
+
path {
|
|
1250
|
+
stroke: var(--color-content-action-primary);
|
|
1251
|
+
fill: var(--color-content-action-primary);
|
|
1252
|
+
}
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
&:hover:not(:disabled) {
|
|
1256
|
+
background-color: var(--color-alpha-light-lightest);
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
&:active:not(:disabled) {
|
|
1260
|
+
background-color: var(--color-alpha-light-light);
|
|
1261
|
+
}
|
|
1272
1262
|
}
|
|
1273
1263
|
|
|
1274
|
-
|
|
1275
|
-
|
|
1264
|
+
.icon-button.ghost-contrast {
|
|
1265
|
+
background-color: transparent;
|
|
1266
|
+
|
|
1267
|
+
&:hover:not(:disabled) {
|
|
1268
|
+
background-color: var(--color-alpha-light-medium);
|
|
1269
|
+
}
|
|
1270
|
+
|
|
1271
|
+
&:active:not(:disabled) {
|
|
1272
|
+
background-color: var(--color-alpha-light-strongest);
|
|
1273
|
+
}
|
|
1276
1274
|
}
|
|
1277
1275
|
|
|
1278
|
-
|
|
1279
|
-
:
|
|
1280
|
-
|
|
1276
|
+
.icon-button:disabled {
|
|
1277
|
+
background-color: var(--color-container-disabled);
|
|
1278
|
+
cursor: default;
|
|
1279
|
+
|
|
1280
|
+
svg {
|
|
1281
|
+
fill: var(--color-content-disabled);
|
|
1282
|
+
|
|
1283
|
+
path {
|
|
1284
|
+
fill: var(--color-content-disabled);
|
|
1285
|
+
}
|
|
1281
1286
|
}
|
|
1282
1287
|
}
|
|
1283
1288
|
|
|
1289
|
+
.icon-button:focus-visible {
|
|
1290
|
+
${at}
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1284
1293
|
.sr-only {
|
|
1285
|
-
|
|
1286
|
-
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
1287
|
-
-webkit-clip-path: inset(50%) !important;
|
|
1288
|
-
clip-path: inset(50%) !important;
|
|
1289
|
-
height: 0.1rem !important;
|
|
1290
|
-
margin: -0.1rem !important;
|
|
1291
|
-
overflow: hidden !important;
|
|
1292
|
-
padding: 0 !important;
|
|
1293
|
-
position: absolute !important;
|
|
1294
|
-
width: 0.1rem !important;
|
|
1295
|
-
white-space: nowrap !important;
|
|
1294
|
+
display: none;
|
|
1296
1295
|
}
|
|
1297
1296
|
`;
|
|
1298
|
-
|
|
1297
|
+
H([
|
|
1299
1298
|
a({ type: String, reflect: !0 })
|
|
1300
|
-
],
|
|
1301
|
-
|
|
1299
|
+
], S.prototype, "bgstyle", 2);
|
|
1300
|
+
H([
|
|
1302
1301
|
a({ type: String, reflect: !0 })
|
|
1303
|
-
],
|
|
1304
|
-
|
|
1305
|
-
a({ type: String, reflect: !0 })
|
|
1306
|
-
], rt.prototype, "label", 2);
|
|
1307
|
-
rt = Et([
|
|
1308
|
-
y("o-wishlist-button")
|
|
1309
|
-
], rt);
|
|
1310
|
-
/**
|
|
1311
|
-
* @license
|
|
1312
|
-
* Copyright 2018 Google LLC
|
|
1313
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
1314
|
-
*/
|
|
1315
|
-
const k = (o) => o ?? d;
|
|
1316
|
-
var _o = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, H = (o, t, e, n) => {
|
|
1317
|
-
for (var i = n > 1 ? void 0 : n ? ko(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1318
|
-
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1319
|
-
return n && i && _o(t, e, i), i;
|
|
1320
|
-
};
|
|
1321
|
-
let S = class extends u {
|
|
1322
|
-
constructor() {
|
|
1323
|
-
super(...arguments), this.bgstyle = "background-light", this.size = "medium", this.status = "empty", this.type = "button", this.strokewidth = "1", this.icon = "wishlist", this.disabled = !1, this.showSrLabel = !1, this.srLabel = "";
|
|
1324
|
-
}
|
|
1325
|
-
updated(o) {
|
|
1326
|
-
super.updated(o), this.style.setProperty("--icon-stroke-width", this.strokewidth);
|
|
1327
|
-
}
|
|
1328
|
-
render() {
|
|
1329
|
-
const o = N[this.icon] ?? "", t = `icon-${this.icon}`, e = o.replace("<svg", '<svg aria-hidden="true" focusable="false" part="svg"').replace(/<path\b/g, '<path part="icon-path"').replace(/<g\b/g, '<g part="icon-group"').replace(/<circle\b/g, '<circle part="icon-circle"'), n = this.showSrLabel ? l`<span class="sr-only">${this.srLabel}</span>` : null, i = this.showSrLabel ? null : "icon";
|
|
1330
|
-
return l`
|
|
1331
|
-
${this.type === "span" ? l`
|
|
1332
|
-
<span class="icon icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}" ?disabled="${this.disabled}">
|
|
1333
|
-
${C(e)}
|
|
1334
|
-
</span>
|
|
1335
|
-
` : l`
|
|
1336
|
-
<button
|
|
1337
|
-
type="button"
|
|
1338
|
-
aria-label=${k(i)}
|
|
1339
|
-
class="icon-button ${this.size} ${this.bgstyle} ${this.status} ${t}"
|
|
1340
|
-
?disabled="${this.disabled}"
|
|
1341
|
-
>
|
|
1342
|
-
${C(e)}
|
|
1343
|
-
${n}
|
|
1344
|
-
</button>
|
|
1345
|
-
`}
|
|
1346
|
-
`;
|
|
1347
|
-
}
|
|
1348
|
-
};
|
|
1349
|
-
S.styles = f`
|
|
1350
|
-
:host {
|
|
1351
|
-
display: inline-flex;
|
|
1352
|
-
justify-content: center;
|
|
1353
|
-
align-items: center;
|
|
1354
|
-
outline: none !important;
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
.icon-button {
|
|
1358
|
-
display: flex;
|
|
1359
|
-
justify-content: center;
|
|
1360
|
-
align-items: center;
|
|
1361
|
-
width: 32px;
|
|
1362
|
-
height: 32px;
|
|
1363
|
-
border: transparent;
|
|
1364
|
-
border-radius: var(--radius-full);
|
|
1365
|
-
cursor: pointer;
|
|
1366
|
-
position: relative;
|
|
1367
|
-
|
|
1368
|
-
&.icon-wishlist {
|
|
1369
|
-
svg {
|
|
1370
|
-
path {
|
|
1371
|
-
stroke: var(--color-content-action-secondary);
|
|
1372
|
-
stroke-width: var(--icon-stroke-width, 1);
|
|
1373
|
-
}
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
}
|
|
1377
|
-
|
|
1378
|
-
.icon-button.filled svg {
|
|
1379
|
-
fill: var(--color-content-action-secondary);
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
.icon-button.xsmall {
|
|
1383
|
-
width: 20px;
|
|
1384
|
-
height: 20px;
|
|
1385
|
-
|
|
1386
|
-
&:not(.icon-wishlist) {
|
|
1387
|
-
svg {
|
|
1388
|
-
width: 8px;
|
|
1389
|
-
height: 8px;
|
|
1390
|
-
}
|
|
1391
|
-
}
|
|
1392
|
-
}
|
|
1393
|
-
|
|
1394
|
-
.icon-button.small {
|
|
1395
|
-
width: 32px;
|
|
1396
|
-
height: 32px;
|
|
1397
|
-
|
|
1398
|
-
&:not(.icon-wishlist) {
|
|
1399
|
-
svg {
|
|
1400
|
-
width: 16px;
|
|
1401
|
-
height: 16px;
|
|
1402
|
-
}
|
|
1403
|
-
}
|
|
1404
|
-
}
|
|
1405
|
-
|
|
1406
|
-
.icon-button.medium {
|
|
1407
|
-
width: 40px;
|
|
1408
|
-
height: 40px;
|
|
1409
|
-
|
|
1410
|
-
&:not(.icon-wishlist) {
|
|
1411
|
-
svg {
|
|
1412
|
-
width: 16px;
|
|
1413
|
-
height: 16px;
|
|
1414
|
-
}
|
|
1415
|
-
}
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
.icon-button.large {
|
|
1419
|
-
width: 40px;
|
|
1420
|
-
height: 40px;
|
|
1421
|
-
|
|
1422
|
-
&:not(.icon-wishlist) {
|
|
1423
|
-
svg {
|
|
1424
|
-
width: 24px;
|
|
1425
|
-
height: 24px;
|
|
1426
|
-
}
|
|
1427
|
-
}
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
.icon-button.none-light, .icon-button.none-contrast {
|
|
1431
|
-
background-color: transparent;
|
|
1432
|
-
width: auto;
|
|
1433
|
-
height: auto;
|
|
1434
|
-
|
|
1435
|
-
&.xsmall {
|
|
1436
|
-
svg {
|
|
1437
|
-
width: 8px;
|
|
1438
|
-
height: 8px;
|
|
1439
|
-
}
|
|
1440
|
-
}
|
|
1441
|
-
|
|
1442
|
-
&.small {
|
|
1443
|
-
svg {
|
|
1444
|
-
width: 16px;
|
|
1445
|
-
height: 16px;
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
|
|
1449
|
-
&.medium {
|
|
1450
|
-
svg {
|
|
1451
|
-
width: 16px;
|
|
1452
|
-
height: 16px;
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
&.large {
|
|
1457
|
-
svg {
|
|
1458
|
-
width: 24px;
|
|
1459
|
-
height: 24px;
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
|
|
1463
|
-
&:disabled {
|
|
1464
|
-
background-color: transparent;
|
|
1465
|
-
}
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
|
-
.icon-button.none-light {
|
|
1469
|
-
svg {
|
|
1470
|
-
path {
|
|
1471
|
-
stroke: var(--color-content-action-primary);
|
|
1472
|
-
fill: var(--color-content-action-primary);
|
|
1473
|
-
}
|
|
1474
|
-
}
|
|
1475
|
-
}
|
|
1476
|
-
|
|
1477
|
-
.icon-button.none-light.icon-wishlist svg path {
|
|
1478
|
-
fill: none;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
|
-
:host([status="filled"]) .icon-button.none-light.icon-wishlist svg path {
|
|
1482
|
-
fill: var(--color-content-action-primary);
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
.icon-button.background-light {
|
|
1486
|
-
background-color: var(--color-alpha-light-strong);
|
|
1487
|
-
|
|
1488
|
-
&:hover:not(:disabled) {
|
|
1489
|
-
background-color: var(--color-alpha-light-stronger);
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
|
-
&:active:not(:disabled) {
|
|
1493
|
-
background-color: var(--color-alpha-light-strongest);
|
|
1494
|
-
}
|
|
1495
|
-
}
|
|
1496
|
-
|
|
1497
|
-
.icon-button.background-contrast {
|
|
1498
|
-
background-color: var(--color-container-action-tertiary-default);
|
|
1499
|
-
|
|
1500
|
-
&:hover:not(:disabled) {
|
|
1501
|
-
background-color: var(--color-container-action-tertiary-hover);
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
|
-
&:active:not(:disabled) {
|
|
1505
|
-
background-color: var(--color-container-action-tertiary-pressed);
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
.icon-button.ghost-light {
|
|
1510
|
-
background-color: transparent;
|
|
1511
|
-
|
|
1512
|
-
svg {
|
|
1513
|
-
path {
|
|
1514
|
-
stroke: var(--color-content-action-primary);
|
|
1515
|
-
fill: var(--color-content-action-primary);
|
|
1516
|
-
}
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
&:hover:not(:disabled) {
|
|
1520
|
-
background-color: var(--color-alpha-light-lightest);
|
|
1521
|
-
}
|
|
1522
|
-
|
|
1523
|
-
&:active:not(:disabled) {
|
|
1524
|
-
background-color: var(--color-alpha-light-light);
|
|
1525
|
-
}
|
|
1526
|
-
}
|
|
1527
|
-
|
|
1528
|
-
.icon-button.ghost-contrast {
|
|
1529
|
-
background-color: transparent;
|
|
1530
|
-
|
|
1531
|
-
&:hover:not(:disabled) {
|
|
1532
|
-
background-color: var(--color-alpha-light-medium);
|
|
1533
|
-
}
|
|
1534
|
-
|
|
1535
|
-
&:active:not(:disabled) {
|
|
1536
|
-
background-color: var(--color-alpha-light-strongest);
|
|
1537
|
-
}
|
|
1538
|
-
}
|
|
1539
|
-
|
|
1540
|
-
.icon-button:disabled {
|
|
1541
|
-
background-color: var(--color-container-disabled);
|
|
1542
|
-
cursor: default;
|
|
1543
|
-
|
|
1544
|
-
svg {
|
|
1545
|
-
fill: var(--color-content-disabled);
|
|
1546
|
-
|
|
1547
|
-
path {
|
|
1548
|
-
fill: var(--color-content-disabled);
|
|
1549
|
-
}
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
.icon-button:focus-visible {
|
|
1554
|
-
${at}
|
|
1555
|
-
}
|
|
1556
|
-
|
|
1557
|
-
.sr-only {
|
|
1558
|
-
display: none;
|
|
1559
|
-
}
|
|
1560
|
-
`;
|
|
1561
|
-
H([
|
|
1562
|
-
a({ type: String, reflect: !0 })
|
|
1563
|
-
], S.prototype, "bgstyle", 2);
|
|
1564
|
-
H([
|
|
1565
|
-
a({ type: String, reflect: !0 })
|
|
1566
|
-
], S.prototype, "size", 2);
|
|
1567
|
-
H([
|
|
1302
|
+
], S.prototype, "size", 2);
|
|
1303
|
+
H([
|
|
1568
1304
|
a({ type: String, reflect: !0 })
|
|
1569
1305
|
], S.prototype, "status", 2);
|
|
1570
1306
|
H([
|
|
@@ -1588,940 +1324,1205 @@ H([
|
|
|
1588
1324
|
S = H([
|
|
1589
1325
|
y("o-icon-button")
|
|
1590
1326
|
], S);
|
|
1591
|
-
var
|
|
1592
|
-
for (var i = n > 1 ? void 0 : n ?
|
|
1327
|
+
var Lo = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, g = (o, t, e, n) => {
|
|
1328
|
+
for (var i = n > 1 ? void 0 : n ? Po(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1593
1329
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1594
|
-
return n && i &&
|
|
1330
|
+
return n && i && Lo(t, e, i), i;
|
|
1595
1331
|
};
|
|
1596
|
-
let
|
|
1332
|
+
let p = class extends u {
|
|
1597
1333
|
constructor() {
|
|
1598
|
-
super(...arguments), this.
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1334
|
+
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.isHidingDetail = !1, this.previousFocusedElement = null, this._onOpenDetail = async (o) => {
|
|
1335
|
+
var e, n;
|
|
1336
|
+
const t = ((e = o.detail) == null ? void 0 : e.origin) ?? document.activeElement;
|
|
1337
|
+
if (this._detailOriginEl = t, this._detailOriginClass = (t == null ? void 0 : t.className) ?? "", this.showDetail = !0, this.showHeaderStartIcon = !0, await this.updateComplete, this._detailOriginClass) {
|
|
1338
|
+
const i = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view");
|
|
1339
|
+
i && i.setAttribute("fromelement", this._detailOriginClass);
|
|
1340
|
+
}
|
|
1341
|
+
this._setPriceTabindex(), await this.focusDetailReturnBtn();
|
|
1342
|
+
}, this._detailOriginEl = null, this._detailOriginClass = "", this.handleKeyDown = (o) => {
|
|
1343
|
+
this.open && (o.key === "Escape" ? this.closePanel() : o.key === "Tab" && this.trapFocus(o));
|
|
1344
|
+
}, this.handleClosePanel = (o) => {
|
|
1345
|
+
if (o instanceof KeyboardEvent && o.key !== "Enter" && o.key !== " ")
|
|
1346
|
+
return;
|
|
1347
|
+
o.preventDefault(), o.stopPropagation();
|
|
1348
|
+
const t = o.currentTarget, e = (t == null ? void 0 : t.getAttribute("data-role")) === "back";
|
|
1349
|
+
if (this.showDetail && e) {
|
|
1350
|
+
this.isHidingDetail = !0;
|
|
1351
|
+
const n = this.renderRoot.querySelector(".content"), i = async () => {
|
|
1352
|
+
this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1, await this.updateComplete, this._restoreFocusToOrigin();
|
|
1353
|
+
};
|
|
1354
|
+
if (n) {
|
|
1355
|
+
this.showHeaderStartIcon = !1;
|
|
1356
|
+
const r = () => {
|
|
1357
|
+
this.showDetail = !1, this.isHidingDetail = !1, n.removeEventListener("animationend", r), i();
|
|
1358
|
+
};
|
|
1359
|
+
n.addEventListener("animationend", r);
|
|
1360
|
+
} else
|
|
1361
|
+
this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1;
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
this.closePanel();
|
|
1365
|
+
}, this._onDetailSlotChange = (o) => {
|
|
1366
|
+
const n = o.target.assignedElements({ flatten: !0 }).flatMap((i) => Array.from(i.querySelectorAll("img")))[0];
|
|
1367
|
+
n == null || n.setAttribute("tabindex", "0");
|
|
1368
|
+
};
|
|
1632
1369
|
}
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1370
|
+
connectedCallback() {
|
|
1371
|
+
super.connectedCallback(), !this.disablePortal && this.parentElement !== document.body && document.body.appendChild(this), this.addEventListener("keydown", this.handleKeyDown), this.updateComplete.then(() => {
|
|
1372
|
+
this.initialized = !0;
|
|
1373
|
+
}), this.addEventListener("open-detail", this._onOpenDetail);
|
|
1374
|
+
}
|
|
1375
|
+
disconnectedCallback() {
|
|
1376
|
+
document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), this.removeEventListener("keydown", this.handleKeyDown), super.disconnectedCallback(), this.removeEventListener("open-detail", this._onOpenDetail);
|
|
1377
|
+
}
|
|
1378
|
+
async focusDetailReturnBtn() {
|
|
1379
|
+
var n, i, r, s;
|
|
1380
|
+
await this.updateComplete;
|
|
1381
|
+
const o = this.getDeepActiveElement(document);
|
|
1382
|
+
if (o && o !== document.body)
|
|
1383
|
+
try {
|
|
1384
|
+
o.blur();
|
|
1385
|
+
} catch {
|
|
1386
|
+
}
|
|
1387
|
+
await new Promise(requestAnimationFrame);
|
|
1388
|
+
const t = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view .return-btn");
|
|
1389
|
+
if (!t) return;
|
|
1390
|
+
t.updateComplete && await t.updateComplete, (s = (r = ((i = t.shadowRoot) == null ? void 0 : i.querySelector("button")) ?? t) == null ? void 0 : r.focus) == null || s.call(r, { preventScroll: !0 });
|
|
1391
|
+
}
|
|
1392
|
+
_setPriceTabindex() {
|
|
1393
|
+
var n;
|
|
1394
|
+
const o = (n = this.shadowRoot) == null ? void 0 : n.querySelector('slot[name="detail"]');
|
|
1395
|
+
if (!o) return;
|
|
1396
|
+
const e = o.assignedElements({ flatten: !0 }).flatMap(
|
|
1397
|
+
(i) => Array.from(i.querySelectorAll(".m-product-price-standard"))
|
|
1398
|
+
);
|
|
1399
|
+
for (const i of e)
|
|
1400
|
+
i.hasAttribute("tabindex") || i.setAttribute("tabindex", "0");
|
|
1401
|
+
}
|
|
1402
|
+
_restoreFocusToOrigin() {
|
|
1403
|
+
var t, e;
|
|
1404
|
+
const o = this._detailOriginEl;
|
|
1405
|
+
!o || !document.contains(o) || ((e = (t = document.activeElement) == null ? void 0 : t.blur) == null || e.call(t), requestAnimationFrame(() => {
|
|
1406
|
+
var i;
|
|
1407
|
+
o.classList.add("a--tabfocus"), (((i = o.shadowRoot) == null ? void 0 : i.querySelector('button, .button, [tabindex]:not([tabindex="-1"])')) ?? null ?? o).focus({ preventScroll: !0 });
|
|
1408
|
+
}));
|
|
1409
|
+
}
|
|
1410
|
+
getDeepActiveElement(o = this.shadowRoot) {
|
|
1411
|
+
let t = o.activeElement;
|
|
1412
|
+
for (; t && t.shadowRoot && t.shadowRoot.activeElement; )
|
|
1413
|
+
t = t.shadowRoot.activeElement;
|
|
1414
|
+
return t;
|
|
1415
|
+
}
|
|
1416
|
+
trapFocus(o) {
|
|
1417
|
+
if (o.key !== "Tab") return;
|
|
1418
|
+
const t = this.getDeepActiveElement(), e = this.renderRoot.querySelector(".close-btn");
|
|
1419
|
+
if (!o.shiftKey && e && e.contains(t)) {
|
|
1420
|
+
o.preventDefault();
|
|
1421
|
+
const n = this.renderRoot.querySelector(
|
|
1422
|
+
".o-whats-inside--content p"
|
|
1423
|
+
);
|
|
1424
|
+
n == null || n.focus();
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
getFocusableElements() {
|
|
1428
|
+
const o = this.renderRoot.querySelector(".panel");
|
|
1429
|
+
if (!o) return [];
|
|
1430
|
+
function t(i) {
|
|
1431
|
+
return !(i.disabled || i.hasAttribute("disabled") || i.hasAttribute("tabindex") && i.getAttribute("tabindex") === "-1");
|
|
1432
|
+
}
|
|
1433
|
+
function e(i) {
|
|
1434
|
+
var s;
|
|
1435
|
+
const r = [i.matches(p.focusablesSelector) ? i : []];
|
|
1436
|
+
if (!["o-icon-button", "o-button"].includes(i.tagName.toLowerCase())) {
|
|
1437
|
+
const h = Array.from(
|
|
1438
|
+
i instanceof HTMLSlotElement ? i.assignedElements({ flatten: !0 }) : []
|
|
1439
|
+
).filter(t).flatMap(e), c = Array.from(
|
|
1440
|
+
((s = i.shadowRoot) == null ? void 0 : s.querySelectorAll("*")) || []
|
|
1441
|
+
).filter(t).flatMap(e);
|
|
1442
|
+
r.push(...h, ...c);
|
|
1443
|
+
}
|
|
1444
|
+
return r.flat();
|
|
1445
|
+
}
|
|
1446
|
+
return Array.from(o.querySelectorAll("*")).filter(t).flatMap(e);
|
|
1447
|
+
}
|
|
1448
|
+
openPanel() {
|
|
1449
|
+
this.removeAttribute("hidden"), this.getBoundingClientRect(), this.previousFocusedElement = document.activeElement, this.open = !0, document.body.style.overflow = "hidden", document.body.setAttribute("data-side-panel", "open");
|
|
1450
|
+
const o = this.renderRoot.querySelector(".panel");
|
|
1451
|
+
o && o.setAttribute("aria-modal", "true"), this.updateComplete.then(() => {
|
|
1452
|
+
var t, e, n, i;
|
|
1453
|
+
if (this.showHeader) {
|
|
1454
|
+
const r = ((t = this.shadowRoot) == null ? void 0 : t.querySelector(".panel .close-btn")) || null, s = ((e = r == null ? void 0 : r.shadowRoot) == null ? void 0 : e.querySelector("button")) || null;
|
|
1455
|
+
s && ((n = s.focus) == null || n.call(s));
|
|
1456
|
+
} else {
|
|
1457
|
+
const r = this.getFocusableElements()[0];
|
|
1458
|
+
(i = r == null ? void 0 : r.focus) == null || i.call(r);
|
|
1459
|
+
}
|
|
1460
|
+
}), this.dispatchEvent(
|
|
1461
|
+
new CustomEvent("open", { bubbles: !0, composed: !0 })
|
|
1462
|
+
);
|
|
1463
|
+
}
|
|
1464
|
+
closePanel() {
|
|
1465
|
+
var t, e, n, i, r;
|
|
1466
|
+
this.open = !1, this.showDetail = !1, document.body.style.overflow = "", document.body.removeAttribute("data-side-panel"), ((t = this.previousFocusedElement) == null ? void 0 : t.tagName.toLowerCase()) === "o-button" ? (i = (n = (e = this.previousFocusedElement.shadowRoot) == null ? void 0 : e.querySelector(".button")) == null ? void 0 : n.focus) == null || i.call(n) : (r = this.previousFocusedElement) == null || r.focus();
|
|
1467
|
+
const o = this.renderRoot.querySelector(".panel");
|
|
1468
|
+
o && o.removeAttribute("aria-modal"), this.dispatchEvent(
|
|
1469
|
+
new CustomEvent("close", { bubbles: !0, composed: !0 })
|
|
1470
|
+
);
|
|
1471
|
+
}
|
|
1472
|
+
handleFirstClick(o) {
|
|
1473
|
+
o instanceof KeyboardEvent && o.key !== "Enter" && o.key !== " " || (o.preventDefault(), o.stopPropagation(), this.onFirstButtonClickClose && this.closePanel(), this.dispatchEvent(
|
|
1474
|
+
new CustomEvent("firstbuttonclick", {
|
|
1475
|
+
bubbles: !0,
|
|
1476
|
+
composed: !0,
|
|
1477
|
+
cancelable: !0,
|
|
1478
|
+
detail: {
|
|
1479
|
+
button: "first",
|
|
1480
|
+
target: o.target
|
|
1714
1481
|
}
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1482
|
+
})
|
|
1483
|
+
));
|
|
1484
|
+
}
|
|
1485
|
+
handleSecondClick(o) {
|
|
1486
|
+
o instanceof KeyboardEvent && o.key !== "Enter" && o.key !== " " || (o.preventDefault(), o.stopPropagation(), this.onSecondButtonClickClose && this.closePanel(), this.dispatchEvent(
|
|
1487
|
+
new CustomEvent("secondbuttonclick", {
|
|
1488
|
+
bubbles: !0,
|
|
1489
|
+
composed: !0,
|
|
1490
|
+
cancelable: !0,
|
|
1491
|
+
detail: {
|
|
1492
|
+
button: "second",
|
|
1493
|
+
target: o.target
|
|
1719
1494
|
}
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
ot([
|
|
1723
|
-
a({ type: String })
|
|
1724
|
-
], F.prototype, "href", 2);
|
|
1725
|
-
ot([
|
|
1726
|
-
a({ type: String })
|
|
1727
|
-
], F.prototype, "target", 2);
|
|
1728
|
-
ot([
|
|
1729
|
-
a({ type: String, reflect: !0 })
|
|
1730
|
-
], F.prototype, "template", 2);
|
|
1731
|
-
ot([
|
|
1732
|
-
a({ type: Boolean, reflect: !0 })
|
|
1733
|
-
], F.prototype, "inverse", 2);
|
|
1734
|
-
ot([
|
|
1735
|
-
a({ type: Boolean, reflect: !0 })
|
|
1736
|
-
], F.prototype, "endIcon", 2);
|
|
1737
|
-
ot([
|
|
1738
|
-
a({ type: Boolean, reflect: !0 })
|
|
1739
|
-
], F.prototype, "reverseEndIcon", 2);
|
|
1740
|
-
F = ot([
|
|
1741
|
-
y("o-link")
|
|
1742
|
-
], F);
|
|
1743
|
-
var Ao = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, At = (o, t, e, n) => {
|
|
1744
|
-
for (var i = n > 1 ? void 0 : n ? Lo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1745
|
-
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1746
|
-
return n && i && Ao(t, e, i), i;
|
|
1747
|
-
};
|
|
1748
|
-
let st = class extends u {
|
|
1749
|
-
constructor() {
|
|
1750
|
-
super(...arguments), this.rating = 0;
|
|
1495
|
+
})
|
|
1496
|
+
));
|
|
1751
1497
|
}
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
let n;
|
|
1757
|
-
e >= 1 ? n = 100 : e <= 0 ? n = 0 : n = Math.round(e * 100 / 25) * 25, o.push(`star-${n}`);
|
|
1758
|
-
}
|
|
1759
|
-
return o;
|
|
1498
|
+
updated() {
|
|
1499
|
+
this.style.setProperty("--z-overlay", `${this.zIndex || 99}`), this.style.setProperty("--z-panel", `${this.zIndex ? this.zIndex + 1 : 99}`), this.open || setTimeout(() => {
|
|
1500
|
+
this.setAttribute("hidden", "hidden");
|
|
1501
|
+
}, 500);
|
|
1760
1502
|
}
|
|
1761
1503
|
render() {
|
|
1762
|
-
const o = this.
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1504
|
+
const o = this.showHeader ? l`
|
|
1505
|
+
<div tabindex="-1" class="header">
|
|
1506
|
+
${this.showHeaderStartIcon ? l`
|
|
1507
|
+
<o-icon-button
|
|
1508
|
+
icon="arrowLeft"
|
|
1509
|
+
size="small"
|
|
1510
|
+
class="return-btn"
|
|
1511
|
+
bgstyle="background-light"
|
|
1512
|
+
data-role="back"
|
|
1513
|
+
@click=${this.handleClosePanel}
|
|
1514
|
+
@keydown=${this.handleClosePanel}
|
|
1515
|
+
aria-label="${this.closeButtonLabel}"
|
|
1516
|
+
srlabel="${this.closeButtonLabel}"
|
|
1517
|
+
showsrlabel="true"
|
|
1518
|
+
></o-icon-button>
|
|
1519
|
+
` : null}
|
|
1520
|
+
<p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
|
|
1521
|
+
${this.headerTitle}
|
|
1522
|
+
</p>
|
|
1523
|
+
<o-icon-button
|
|
1524
|
+
icon="cross"
|
|
1525
|
+
size="small"
|
|
1526
|
+
class="close-btn"
|
|
1527
|
+
bgstyle="background-light"
|
|
1528
|
+
@click=${this.handleClosePanel}
|
|
1529
|
+
@keydown=${this.handleClosePanel}
|
|
1530
|
+
aria-label="${this.closeButtonLabel}"
|
|
1531
|
+
aria-describedby="panel-title"
|
|
1532
|
+
srlabel="${this.closeButtonLabel}"
|
|
1533
|
+
showsrlabel="true"
|
|
1534
|
+
></o-icon-button>
|
|
1769
1535
|
</div>
|
|
1770
|
-
|
|
1536
|
+
` : null;
|
|
1537
|
+
return l`
|
|
1538
|
+
<div class="overlay" style="z-index: ${this.zIndex}" @click=${this.handleClosePanel}></div>
|
|
1539
|
+
<div
|
|
1540
|
+
class="panel"
|
|
1541
|
+
role="dialog"
|
|
1542
|
+
aria-modal="true"
|
|
1543
|
+
aria-labelledby="panel-title"
|
|
1544
|
+
style="z-index: ${this.zIndex + 1}"
|
|
1545
|
+
tabindex="-1"
|
|
1546
|
+
>
|
|
1547
|
+
<div role="document">
|
|
1548
|
+
${o}
|
|
1549
|
+
|
|
1550
|
+
<div class="content ${this.isHidingDetail ? "slide-out-right" : ""} ${this.showDetail ? "with-detail" : ""}">
|
|
1551
|
+
|
|
1552
|
+
${this.showDetail ? l`
|
|
1553
|
+
<div class="detail-view">
|
|
1554
|
+
${o}
|
|
1555
|
+
<div class="detail-content">
|
|
1556
|
+
<slot name="detail" @slotchange=${this._onDetailSlotChange}></slot>
|
|
1557
|
+
</div>
|
|
1558
|
+
</div>
|
|
1559
|
+
` : l`<slot></slot>`}
|
|
1560
|
+
</div>
|
|
1561
|
+
|
|
1562
|
+
${this.showFooter ? l`
|
|
1563
|
+
<div class="footer">
|
|
1564
|
+
${this.firstButtonVariant && this.firstButtonLabel ? l`
|
|
1565
|
+
<o-button
|
|
1566
|
+
variant="${this.firstButtonVariant}"
|
|
1567
|
+
@click=${this.handleFirstClick}
|
|
1568
|
+
@keydown=${this.handleFirstClick}
|
|
1569
|
+
${le(this.firstButtonProps)}
|
|
1570
|
+
>
|
|
1571
|
+
${this.firstButtonLabel}
|
|
1572
|
+
</o-button>
|
|
1573
|
+
` : null}
|
|
1574
|
+
|
|
1575
|
+
${this.secondButtonVariant && this.secondButtonLabel ? l`
|
|
1576
|
+
<o-button
|
|
1577
|
+
variant="${this.secondButtonVariant}"
|
|
1578
|
+
@click=${this.handleSecondClick}
|
|
1579
|
+
@keydown=${this.handleSecondClick}
|
|
1580
|
+
${le(this.secondButtonProps)}
|
|
1581
|
+
>
|
|
1582
|
+
${this.secondButtonLabel}
|
|
1583
|
+
</o-button>
|
|
1584
|
+
` : null}
|
|
1585
|
+
</div>
|
|
1586
|
+
` : null}
|
|
1587
|
+
</div>
|
|
1771
1588
|
</div>
|
|
1772
1589
|
`;
|
|
1773
1590
|
}
|
|
1774
1591
|
};
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1592
|
+
p.styles = f`
|
|
1593
|
+
:host {
|
|
1594
|
+
--z-overlay: 99;
|
|
1595
|
+
--z-panel: 100;
|
|
1596
|
+
position: fixed;
|
|
1597
|
+
top: 0;
|
|
1598
|
+
right: 0;
|
|
1599
|
+
height: 100%;
|
|
1600
|
+
width: 100%;
|
|
1601
|
+
pointer-events: none;
|
|
1602
|
+
z-index: var(--z-overlay);
|
|
1603
|
+
--side-panel-width: 100%;
|
|
1604
|
+
--side-panel-max-width: 416px;
|
|
1605
|
+
--font-size: var(--font-size-300);
|
|
1606
|
+
--line-height: var(--line-height-240);
|
|
1779
1607
|
}
|
|
1780
|
-
|
|
1608
|
+
|
|
1609
|
+
/* Hide content until it is initialized */
|
|
1610
|
+
:host(:not([initialized])) .content {
|
|
1611
|
+
display: none;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
/* hide the host completely until its initialized */
|
|
1615
|
+
:host(:not([initialized])) {
|
|
1616
|
+
display: none !important;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
.overlay {
|
|
1620
|
+
position: absolute;
|
|
1621
|
+
inset: 0;
|
|
1622
|
+
backdrop-filter: blur(4px);
|
|
1623
|
+
background-color: rgba(0, 0, 0, 0.3);
|
|
1624
|
+
opacity: 0;
|
|
1625
|
+
transition: opacity 0.3s ease;
|
|
1626
|
+
pointer-events: none;
|
|
1627
|
+
z-index: var(--z-overlay);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
:host([open]) .overlay {
|
|
1631
|
+
opacity: 1;
|
|
1632
|
+
pointer-events: auto;
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
.panel {
|
|
1636
|
+
position: absolute;
|
|
1637
|
+
top: 0;
|
|
1638
|
+
right: 0;
|
|
1639
|
+
width: var(--side-panel-width);
|
|
1640
|
+
max-width: var(--side-panel-max-width);
|
|
1641
|
+
height: 100%;
|
|
1642
|
+
background: white;
|
|
1643
|
+
box-shadow: var(--colors-alpha-dark-60);
|
|
1644
|
+
transform: translateX(100%);
|
|
1645
|
+
transition: transform 0.3s ease;
|
|
1781
1646
|
display: flex;
|
|
1782
|
-
|
|
1647
|
+
flex-direction: column;
|
|
1648
|
+
pointer-events: auto;
|
|
1649
|
+
z-index: var(--z-panel);
|
|
1783
1650
|
}
|
|
1784
1651
|
|
|
1785
|
-
.
|
|
1652
|
+
:host([open]) .panel {
|
|
1653
|
+
transform: translateX(0%);
|
|
1654
|
+
}
|
|
1655
|
+
|
|
1656
|
+
.header {
|
|
1657
|
+
flex: 0 0 auto;
|
|
1786
1658
|
display: flex;
|
|
1787
|
-
|
|
1659
|
+
justify-content: space-between;
|
|
1660
|
+
padding: 20px 16px;
|
|
1661
|
+
border-bottom: var(--border-050) solid var(--color-border-tertiary);
|
|
1662
|
+
|
|
1663
|
+
.panel-title {
|
|
1664
|
+
font-family: var(--font-family-loccitane-serif);
|
|
1665
|
+
font-size: var(--font-size);
|
|
1666
|
+
font-weight: var(--font-weight-400);
|
|
1667
|
+
line-height: var(--line-height);
|
|
1668
|
+
font-style: italic;
|
|
1669
|
+
display: -webkit-box;
|
|
1670
|
+
-webkit-line-clamp: 2;
|
|
1671
|
+
-webkit-box-orient: vertical;
|
|
1672
|
+
height: auto;
|
|
1673
|
+
margin-top: auto;
|
|
1674
|
+
margin-bottom: auto;
|
|
1675
|
+
overflow: hidden;
|
|
1676
|
+
width: 100%;
|
|
1677
|
+
color: var(--color-content-heading);
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
.close-btn {
|
|
1681
|
+
margin-left: 8px;
|
|
1682
|
+
margin-top: 0;
|
|
1683
|
+
flex-direction: column;
|
|
1684
|
+
justify-content: start;
|
|
1685
|
+
}
|
|
1686
|
+
|
|
1687
|
+
.return-btn {
|
|
1688
|
+
margin-right: 8px;
|
|
1689
|
+
}
|
|
1788
1690
|
}
|
|
1789
1691
|
|
|
1790
|
-
.
|
|
1791
|
-
|
|
1692
|
+
.panel:focus-visible,
|
|
1693
|
+
.close-btn:focus-visible {
|
|
1694
|
+
${at}
|
|
1792
1695
|
}
|
|
1793
1696
|
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1697
|
+
.content {
|
|
1698
|
+
flex: 1 1 auto;
|
|
1699
|
+
overflow-y: auto;
|
|
1700
|
+
overflow-x: hidden;
|
|
1701
|
+
padding: var(--spacing-xl);
|
|
1702
|
+
|
|
1703
|
+
&.with-detail {
|
|
1704
|
+
width: 100%;
|
|
1705
|
+
height: 100%;
|
|
1706
|
+
position: absolute;
|
|
1707
|
+
top: 0;
|
|
1708
|
+
left: 0;
|
|
1709
|
+
background: var(--color-container-bg-white);
|
|
1710
|
+
z-index: 3;
|
|
1711
|
+
padding: var(--spacing-4-xs);
|
|
1712
|
+
}
|
|
1802
1713
|
}
|
|
1803
1714
|
|
|
1804
|
-
.
|
|
1805
|
-
|
|
1806
|
-
|
|
1715
|
+
.footer {
|
|
1716
|
+
flex: 0 0 auto;
|
|
1717
|
+
padding: var(--spacing-xl);
|
|
1718
|
+
border-top: var(--border-050) solid var(--color-border-tertiary);
|
|
1719
|
+
display: flex;
|
|
1720
|
+
flex-direction: column;
|
|
1721
|
+
gap: var(--spacing-l);
|
|
1722
|
+
justify-content: flex-start;
|
|
1807
1723
|
}
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
}
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1724
|
+
|
|
1725
|
+
/* Mobile */
|
|
1726
|
+
@media (max-width: 767px) {
|
|
1727
|
+
:host {
|
|
1728
|
+
--side-panel-width: 100%;
|
|
1729
|
+
--side-panel-max-width: none;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
/* Tablet */
|
|
1734
|
+
@media (min-width: 768px) and (max-width: 1024px) {
|
|
1735
|
+
:host {
|
|
1736
|
+
--side-panel-width: 375px;
|
|
1737
|
+
--side-panel-max-width: 375px;
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
@media (min-width: 1025px) {
|
|
1742
|
+
:host {
|
|
1743
|
+
--side-panel-width: 100%;
|
|
1744
|
+
--side-panel-max-width: 416px;
|
|
1745
|
+
--font-size: var(--font-size-400);
|
|
1746
|
+
--line-height: var(--line-height-280);
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
@keyframes slideInRight {
|
|
1751
|
+
from {
|
|
1752
|
+
transform: translateX(100%);
|
|
1753
|
+
}
|
|
1754
|
+
to {
|
|
1755
|
+
transform: translateX(0%);
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
@keyframes slideOutRight {
|
|
1760
|
+
from {
|
|
1761
|
+
transform: translateX(0%);
|
|
1762
|
+
}
|
|
1763
|
+
to {
|
|
1764
|
+
transform: translateX(100%);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
.slide-out-right {
|
|
1769
|
+
animation: slideOutRight 0.3s ease-in forwards;
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.detail-view {
|
|
1773
|
+
animation: slideInRight 0.3s ease-out both;
|
|
1774
|
+
}
|
|
1775
|
+
.detail-content {
|
|
1776
|
+
padding: var(--spacing-xl);
|
|
1777
|
+
}
|
|
1778
|
+
`;
|
|
1779
|
+
p.focusablesSelector = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"]), o-icon-button, o-button';
|
|
1780
|
+
p.focusablesCustomElementsSelector = "o-icon-button, o-button";
|
|
1781
|
+
g([
|
|
1782
|
+
a({ type: Boolean, reflect: !0 })
|
|
1783
|
+
], p.prototype, "open", 2);
|
|
1784
|
+
g([
|
|
1785
|
+
a({ type: Boolean, reflect: !0 })
|
|
1786
|
+
], p.prototype, "showHeader", 2);
|
|
1787
|
+
g([
|
|
1788
|
+
a({ type: Boolean, reflect: !0 })
|
|
1789
|
+
], p.prototype, "showFooter", 2);
|
|
1790
|
+
g([
|
|
1791
|
+
a({ type: Boolean, reflect: !0 })
|
|
1792
|
+
], p.prototype, "showHeaderStartIcon", 2);
|
|
1793
|
+
g([
|
|
1794
|
+
a({ type: String, reflect: !0 })
|
|
1795
|
+
], p.prototype, "headerTitle", 2);
|
|
1796
|
+
g([
|
|
1797
|
+
a({ type: String, reflect: !0 })
|
|
1798
|
+
], p.prototype, "headerTitleClassName", 2);
|
|
1799
|
+
g([
|
|
1800
|
+
a({ type: String, reflect: !0 })
|
|
1801
|
+
], p.prototype, "closeButtonLabel", 2);
|
|
1802
|
+
g([
|
|
1803
|
+
a({ type: String, reflect: !0 })
|
|
1804
|
+
], p.prototype, "firstButtonLabel", 2);
|
|
1805
|
+
g([
|
|
1806
|
+
a({ type: String, reflect: !0 })
|
|
1807
|
+
], p.prototype, "firstButtonVariant", 2);
|
|
1808
|
+
g([
|
|
1809
|
+
a({ type: Object, reflect: !0 })
|
|
1810
|
+
], p.prototype, "firstButtonProps", 2);
|
|
1811
|
+
g([
|
|
1812
|
+
a({ type: Boolean, reflect: !0 })
|
|
1813
|
+
], p.prototype, "onFirstButtonClickClose", 2);
|
|
1814
|
+
g([
|
|
1815
|
+
a({ type: String, reflect: !0 })
|
|
1816
|
+
], p.prototype, "secondButtonLabel", 2);
|
|
1817
|
+
g([
|
|
1818
|
+
a({ type: String, reflect: !0 })
|
|
1819
|
+
], p.prototype, "secondButtonVariant", 2);
|
|
1820
|
+
g([
|
|
1821
|
+
a({ type: Object, reflect: !0 })
|
|
1822
|
+
], p.prototype, "secondButtonProps", 2);
|
|
1823
|
+
g([
|
|
1824
|
+
a({ type: Boolean, reflect: !0 })
|
|
1825
|
+
], p.prototype, "onSecondButtonClickClose", 2);
|
|
1826
|
+
g([
|
|
1827
|
+
a({ type: Boolean, reflect: !0 })
|
|
1828
|
+
], p.prototype, "disablePortal", 2);
|
|
1829
|
+
g([
|
|
1830
|
+
a({ type: Number, reflect: !0 })
|
|
1831
|
+
], p.prototype, "zIndex", 2);
|
|
1832
|
+
g([
|
|
1833
|
+
a({ type: Boolean, reflect: !0 })
|
|
1834
|
+
], p.prototype, "initialized", 2);
|
|
1835
|
+
g([
|
|
1836
|
+
a({ type: Boolean })
|
|
1837
|
+
], p.prototype, "showDetail", 2);
|
|
1838
|
+
g([
|
|
1839
|
+
a({ type: Boolean })
|
|
1840
|
+
], p.prototype, "isHidingDetail", 2);
|
|
1841
|
+
p = g([
|
|
1842
|
+
y("o-side-panel")
|
|
1843
|
+
], p);
|
|
1844
|
+
var Io = Object.defineProperty, Oo = Object.getOwnPropertyDescriptor, x = (o, t, e, n) => {
|
|
1845
|
+
for (var i = n > 1 ? void 0 : n ? Oo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
1846
|
+
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
1847
|
+
return n && i && Io(t, e, i), i;
|
|
1863
1848
|
};
|
|
1864
|
-
|
|
1849
|
+
const zo = Ft(u);
|
|
1850
|
+
let b = class extends zo {
|
|
1865
1851
|
constructor() {
|
|
1866
|
-
super(...arguments), this.
|
|
1867
|
-
}
|
|
1868
|
-
_$AT(t, e, n) {
|
|
1869
|
-
super._$AT(t, e, n), be(this), this.isConnected = t._$AU;
|
|
1870
|
-
}
|
|
1871
|
-
_$AO(t, e = !0) {
|
|
1872
|
-
var n, i;
|
|
1873
|
-
t !== this.isConnected && (this.isConnected = t, t ? (n = this.reconnected) == null || n.call(this) : (i = this.disconnected) == null || i.call(this)), e && (dt(this, t), kt(this));
|
|
1874
|
-
}
|
|
1875
|
-
setValue(t) {
|
|
1876
|
-
if (Po(this._$Ct)) this._$Ct._$AI(t, this);
|
|
1877
|
-
else {
|
|
1878
|
-
const e = [...this._$Ct._$AH];
|
|
1879
|
-
e[this._$Ci] = t, this._$Ct._$AI(e, this, 0);
|
|
1880
|
-
}
|
|
1881
|
-
}
|
|
1882
|
-
disconnected() {
|
|
1883
|
-
}
|
|
1884
|
-
reconnected() {
|
|
1852
|
+
super(...arguments), this.type = "submit", this.value = "", this.variant = "primary", this.text = "", this.textsecond = "", this.fullwidth = !1, this.disabled = !1, this.startIconModel = "", this.endIconModel = "", this.startIcon = !1, this.endIcon = !1, this.panelTarget = "", this.href = "", this.target = "", this.underlined = !1, this.withbadge = !1;
|
|
1885
1853
|
}
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
constructor() {
|
|
1889
|
-
super(...arguments), this.prevData = {};
|
|
1854
|
+
get name() {
|
|
1855
|
+
return this.getAttribute("name") ?? "";
|
|
1890
1856
|
}
|
|
1891
|
-
|
|
1892
|
-
|
|
1857
|
+
set name(o) {
|
|
1858
|
+
this.setAttribute("name", o);
|
|
1893
1859
|
}
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
this.element !== t.element && (this.element = t.element), this.host = ((n = t.options) === null || n === void 0 ? void 0 : n.host) || this.element, this.apply(e), this.groom(e), this.prevData = { ...e };
|
|
1860
|
+
get form() {
|
|
1861
|
+
return this[Nt].form;
|
|
1897
1862
|
}
|
|
1898
|
-
|
|
1899
|
-
if (!
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
for (const i in t) {
|
|
1903
|
-
const r = t[i];
|
|
1904
|
-
r !== e[i] && (n[i] = r);
|
|
1863
|
+
handleClick(o) {
|
|
1864
|
+
if (!(o instanceof KeyboardEvent && !["Enter", " "].includes(o.key)) && this.panelTarget) {
|
|
1865
|
+
const t = document.getElementById(this.panelTarget);
|
|
1866
|
+
t instanceof p && (t != null && t.openPanel) && typeof t.openPanel == "function" ? (o.preventDefault(), t.openPanel()) : console.warn(`[o-button] No side panel with id="${this.panelTarget}" found or it does not have an openPanel method.`);
|
|
1905
1867
|
}
|
|
1906
1868
|
}
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
if (e)
|
|
1910
|
-
for (const i in e)
|
|
1911
|
-
(!t || !(i in t) && n[i] === e[i]) && (n[i] = void 0);
|
|
1912
|
-
}
|
|
1913
|
-
}
|
|
1914
|
-
class Ho extends Do {
|
|
1915
|
-
constructor() {
|
|
1916
|
-
super(...arguments), this.eventData = {};
|
|
1917
|
-
}
|
|
1918
|
-
apply(t) {
|
|
1919
|
-
if (t)
|
|
1920
|
-
for (const e in t) {
|
|
1921
|
-
const n = t[e];
|
|
1922
|
-
n !== this.eventData[e] && this.applyEvent(e, n);
|
|
1923
|
-
}
|
|
1924
|
-
}
|
|
1925
|
-
applyEvent(t, e) {
|
|
1926
|
-
const { prevData: n, element: i } = this;
|
|
1927
|
-
this.eventData[t] = e, n[t] && i.removeEventListener(t, this, e), i.addEventListener(t, this, e);
|
|
1869
|
+
render() {
|
|
1870
|
+
return this.href ? this.renderLink() : this.renderButton();
|
|
1928
1871
|
}
|
|
1929
|
-
|
|
1930
|
-
const
|
|
1931
|
-
if (
|
|
1932
|
-
|
|
1933
|
-
|
|
1872
|
+
renderIcon(o) {
|
|
1873
|
+
const t = o === "start" ? this.startIconModel : this.endIconModel;
|
|
1874
|
+
if (!t) return d;
|
|
1875
|
+
const e = N[t].replace(
|
|
1876
|
+
"<svg",
|
|
1877
|
+
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
1878
|
+
);
|
|
1879
|
+
return l`<span class="${o === "start" ? "icon-start" : "icon-end"}">${C(e)}</span>`;
|
|
1934
1880
|
}
|
|
1935
|
-
|
|
1936
|
-
const
|
|
1937
|
-
|
|
1881
|
+
renderButton() {
|
|
1882
|
+
const o = this.text || this.textsecond;
|
|
1883
|
+
return l`
|
|
1884
|
+
<button type=${this.type} class="button" ?disabled=${this.disabled} @click=${this.handleClick} @keydown=${this.handleClick}>
|
|
1885
|
+
${this.startIcon ? this.renderIcon("start") : d}
|
|
1886
|
+
${o ? l`
|
|
1887
|
+
${this.text ? l`<span class="text">${this.text}</span>` : d}
|
|
1888
|
+
${this.textsecond ? l`<span class="text">${this.textsecond}</span>` : d}
|
|
1889
|
+
${this.withbadge ? l`<slot></slot>` : d}
|
|
1890
|
+
` : l`<slot></slot>`}
|
|
1891
|
+
${this.endIcon ? this.renderIcon("end") : d}
|
|
1892
|
+
</button>
|
|
1893
|
+
`;
|
|
1938
1894
|
}
|
|
1939
|
-
|
|
1940
|
-
const
|
|
1941
|
-
|
|
1895
|
+
renderLink() {
|
|
1896
|
+
const o = this.text || this.textsecond;
|
|
1897
|
+
return l`
|
|
1898
|
+
<a
|
|
1899
|
+
href=${this.href}
|
|
1900
|
+
target=${this.target || d}
|
|
1901
|
+
class="button"
|
|
1902
|
+
?disabled=${this.disabled}
|
|
1903
|
+
role="button"
|
|
1904
|
+
@click=${this.handleClick}
|
|
1905
|
+
@keydown=${this.handleClick}
|
|
1906
|
+
aria-describedby=${this.getAttribute("aria-describedby") || d}
|
|
1907
|
+
>
|
|
1908
|
+
${this.startIcon ? this.renderIcon("start") : d}
|
|
1909
|
+
${o ? l`
|
|
1910
|
+
${this.text ? l`<span>${this.text}</span>` : d}
|
|
1911
|
+
${this.textsecond ? l`<span>${this.textsecond}</span>` : d}
|
|
1912
|
+
` : l`<slot></slot>`}
|
|
1913
|
+
${this.endIcon ? this.renderIcon("end") : d}
|
|
1914
|
+
</a>
|
|
1915
|
+
`;
|
|
1942
1916
|
}
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1917
|
+
};
|
|
1918
|
+
Re(b);
|
|
1919
|
+
b.formAssociated = !0;
|
|
1920
|
+
b.styles = f`
|
|
1921
|
+
:host {
|
|
1922
|
+
--button-border: transparent;
|
|
1923
|
+
--badge-outer-width: 19px;
|
|
1924
|
+
cursor: pointer;
|
|
1925
|
+
display: inline-flex;
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
:host(.a--tabfocus) {
|
|
1929
|
+
outline: none !important;
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1932
|
+
:host([fullwidth]) {
|
|
1933
|
+
width: 100%;
|
|
1934
|
+
}
|
|
1935
|
+
|
|
1936
|
+
:host([variant="primary"]) {
|
|
1937
|
+
--button-bg: var(--color-container-action-primary-default);
|
|
1938
|
+
--button-bg-hover: var(--color-container-action-primary-hover);
|
|
1939
|
+
--button-bg-pressed: var(--color-container-action-primary-pressed);
|
|
1940
|
+
--button-text: var(--color-content-action-primary);
|
|
1941
|
+
--button-text-hover: var(--color-content-action-primary);
|
|
1942
|
+
--button-border: transparent;
|
|
1943
|
+
--button-border-width: var(--border-m);
|
|
1944
|
+
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
1945
|
+
--button-starticon-svg-width: 0px; /* No starticon SVG for primary button */
|
|
1946
|
+
--button-endicon-svg-width: 0px; /* No endicon SVG for primary button */
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
:host([variant="secondary"]) {
|
|
1950
|
+
--button-bg: var(--color-container-action-secondary-default);
|
|
1951
|
+
--button-bg-hover: var(--color-container-action-secondary-hover);
|
|
1952
|
+
--button-bg-pressed: var(--color-container-action-secondary-pressed);
|
|
1953
|
+
--button-text: var(--color-content-action-secondary);
|
|
1954
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
1955
|
+
--button-border: var(--color-border-secondary);
|
|
1956
|
+
--button-border-width: var(--border-m);
|
|
1957
|
+
--button-padding: var(--spacing-l, 12px) var(--spacing-3-xl, 24px);
|
|
1958
|
+
--button-starticon-svg-width: 16px;
|
|
1959
|
+
--button-endicon-svg-width: 0px; /* No endicon SVG for secondary button */
|
|
1960
|
+
}
|
|
1961
|
+
|
|
1962
|
+
:host([variant="ghost"]) {
|
|
1963
|
+
--button-bg: transparent;
|
|
1964
|
+
--button-bg-hover: var(--color-alpha-dark-lightest);
|
|
1965
|
+
--button-bg-pressed: var(--color-alpha-dark-lighter);
|
|
1966
|
+
--button-text: var(--color-content-action-secondary);
|
|
1967
|
+
--button-text-hover: var(--color-content-action-secondary);
|
|
1968
|
+
--button-border-width: 0;
|
|
1969
|
+
--button-padding: var(--spacing-m, 10px) var(--spacing-xl, 16px);
|
|
1970
|
+
--button-starticon-svg-width: 16px;
|
|
1971
|
+
--button-endicon-svg-width: 12px;
|
|
1948
1972
|
}
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1973
|
+
|
|
1974
|
+
:host([variant="tertiary"]) {
|
|
1975
|
+
--button-bg: var(--color-container-action-tertiary-default);
|
|
1976
|
+
--button-bg-hover: var(--color-container-action-tertiary-hover);
|
|
1977
|
+
--button-bg-pressed: var(--color-container-action-tertiary-pressed);
|
|
1978
|
+
--button-text: var(--color-content-body);
|
|
1979
|
+
--button-text-hover: var(--color-content-action-tertiary);
|
|
1980
|
+
--button-border-width: 0;
|
|
1981
|
+
--button-padding: var(--spacing-m, 10px) var(--spacing-l, 12px);
|
|
1982
|
+
--button-starticon-svg-width: 0px; /* No starticon SVG for tertiary button */
|
|
1983
|
+
--button-endicon-svg-width: 8px;
|
|
1955
1984
|
}
|
|
1956
|
-
|
|
1957
|
-
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1985
|
+
|
|
1986
|
+
:host([disabled]),
|
|
1987
|
+
:host([aria-disabled="true"]),
|
|
1988
|
+
:host([aria-disabled="true"]:hover) {
|
|
1989
|
+
--button-bg: var(--color-container-disabled);
|
|
1990
|
+
--button-text: var(--color-content-disabled);
|
|
1991
|
+
--button-border: transparent;
|
|
1992
|
+
}
|
|
1993
|
+
|
|
1994
|
+
:host([disabled][variant="secondary"]) {
|
|
1995
|
+
--button-border: var(--color-border-secondary);
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
.button {
|
|
1999
|
+
display: inline-flex;
|
|
2000
|
+
align-items: center;
|
|
2001
|
+
justify-content: center;
|
|
2002
|
+
width: 100%;
|
|
2003
|
+
gap: var(--spacing-s, 8px);
|
|
2004
|
+
height: 100%;
|
|
2005
|
+
background-color: var(--button-bg);
|
|
2006
|
+
color: var(--button-text);
|
|
2007
|
+
border: var(--button-border-width, var(--border-m)) solid var(--button-border);
|
|
2008
|
+
border-radius: var(--radius-m);
|
|
2009
|
+
font-family: var(--font-family-loccitane-sans);
|
|
2010
|
+
font-size: var(--font-size-150);
|
|
2011
|
+
font-weight: var(--font-weight-400);
|
|
2012
|
+
line-height: var(--line-height-200);
|
|
2013
|
+
min-width: 64px;
|
|
2014
|
+
padding: var(--button-padding);
|
|
2015
|
+
text-decoration: none;
|
|
2016
|
+
cursor: inherit;
|
|
2017
|
+
box-sizing: border-box;
|
|
2018
|
+
|
|
2019
|
+
span {
|
|
2020
|
+
font-family: var(--font-family-loccitane-sans);
|
|
2021
|
+
font-size: var(--font-size-150);
|
|
2022
|
+
font-weight: var(--font-weight-400);
|
|
2023
|
+
line-height: var(--line-height-200);
|
|
1981
2024
|
}
|
|
1982
2025
|
}
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2026
|
+
|
|
2027
|
+
.button:hover:not([disabled]) {
|
|
2028
|
+
background-color: var(--button-bg-hover);
|
|
2029
|
+
color: var(--button-text-hover);
|
|
2030
|
+
}
|
|
2031
|
+
|
|
2032
|
+
.button:active:not([disabled]) {
|
|
2033
|
+
background-color: var(--button-bg-pressed);
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
.button:focus-visible {
|
|
2037
|
+
${at};
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
span.text + span.text::before {
|
|
2041
|
+
content: "•";
|
|
2042
|
+
margin-right: 8px;
|
|
2043
|
+
}
|
|
2044
|
+
|
|
2045
|
+
.icon-start,
|
|
2046
|
+
.icon-end {
|
|
2047
|
+
display: inline-flex;
|
|
2048
|
+
align-items: center;
|
|
2049
|
+
|
|
2050
|
+
svg {
|
|
2051
|
+
max-height: 20px;
|
|
2004
2052
|
}
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
const le = Vt(Mo);
|
|
2008
|
-
var To = Object.defineProperty, jo = Object.getOwnPropertyDescriptor, g = (o, t, e, n) => {
|
|
2009
|
-
for (var i = n > 1 ? void 0 : n ? jo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2010
|
-
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
2011
|
-
return n && i && To(t, e, i), i;
|
|
2012
|
-
};
|
|
2013
|
-
let p = class extends u {
|
|
2014
|
-
constructor() {
|
|
2015
|
-
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.isHidingDetail = !1, this.previousFocusedElement = null, this._onOpenDetail = async (o) => {
|
|
2016
|
-
var e, n;
|
|
2017
|
-
const t = ((e = o.detail) == null ? void 0 : e.origin) ?? document.activeElement;
|
|
2018
|
-
if (this._detailOriginEl = t, this._detailOriginClass = (t == null ? void 0 : t.className) ?? "", this.showDetail = !0, this.showHeaderStartIcon = !0, await this.updateComplete, this._detailOriginClass) {
|
|
2019
|
-
const i = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view");
|
|
2020
|
-
i && i.setAttribute("fromelement", this._detailOriginClass);
|
|
2053
|
+
svg[x] {
|
|
2054
|
+
width: 15px;
|
|
2021
2055
|
}
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
}, this.handleClosePanel = (o) => {
|
|
2026
|
-
if (o instanceof KeyboardEvent && o.key !== "Enter" && o.key !== " ")
|
|
2027
|
-
return;
|
|
2028
|
-
o.preventDefault(), o.stopPropagation();
|
|
2029
|
-
const t = o.currentTarget, e = (t == null ? void 0 : t.getAttribute("data-role")) === "back";
|
|
2030
|
-
if (this.showDetail && e) {
|
|
2031
|
-
this.isHidingDetail = !0;
|
|
2032
|
-
const n = this.renderRoot.querySelector(".content"), i = async () => {
|
|
2033
|
-
this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1, await this.updateComplete, this._restoreFocusToOrigin();
|
|
2034
|
-
};
|
|
2035
|
-
if (n) {
|
|
2036
|
-
this.showHeaderStartIcon = !1;
|
|
2037
|
-
const r = () => {
|
|
2038
|
-
this.showDetail = !1, this.isHidingDetail = !1, n.removeEventListener("animationend", r), i();
|
|
2039
|
-
};
|
|
2040
|
-
n.addEventListener("animationend", r);
|
|
2041
|
-
} else
|
|
2042
|
-
this.showDetail = !1, this.isHidingDetail = !1, this.showHeaderStartIcon = !1;
|
|
2043
|
-
return;
|
|
2056
|
+
path[fill],
|
|
2057
|
+
path[class] {
|
|
2058
|
+
fill: var(--button-text) !important;
|
|
2044
2059
|
}
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2060
|
+
path[stroke] {
|
|
2061
|
+
stroke: var(--button-text) !important;
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
:host([variant="tertiary"][fullwidth][endIcon]) .button {
|
|
2066
|
+
justify-content: space-between;
|
|
2067
|
+
}
|
|
2068
|
+
|
|
2069
|
+
.button span {
|
|
2070
|
+
display: inline-flex;
|
|
2071
|
+
align-items: center;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
.button slot {
|
|
2075
|
+
display: inline-flex;
|
|
2076
|
+
align-items: center;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
:host([variant="tertiary"][endIcon]) .button .icon-end {
|
|
2080
|
+
width: var(--button-endicon-svg-width, 8px);
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
:host([underlined]) span:not([class*="icon-"]),
|
|
2084
|
+
:host([underlined]) .text,
|
|
2085
|
+
:host([underlined]:not([text])) .button slot {
|
|
2086
|
+
position: relative;
|
|
2087
|
+
|
|
2088
|
+
&::after {
|
|
2089
|
+
content: "";
|
|
2090
|
+
display: block;
|
|
2091
|
+
position: absolute;
|
|
2092
|
+
bottom: 0;
|
|
2093
|
+
left: 0;
|
|
2094
|
+
width: 100%;
|
|
2095
|
+
border-bottom: var(--border-M, 1px) solid var(--button-text);
|
|
2067
2096
|
}
|
|
2068
|
-
await new Promise(requestAnimationFrame);
|
|
2069
|
-
const t = (n = this.shadowRoot) == null ? void 0 : n.querySelector(".detail-view .return-btn");
|
|
2070
|
-
if (!t) return;
|
|
2071
|
-
t.updateComplete && await t.updateComplete, (s = (r = ((i = t.shadowRoot) == null ? void 0 : i.querySelector("button")) ?? t) == null ? void 0 : r.focus) == null || s.call(r, { preventScroll: !0 });
|
|
2072
|
-
}
|
|
2073
|
-
_setPriceTabindex() {
|
|
2074
|
-
var n;
|
|
2075
|
-
const o = (n = this.shadowRoot) == null ? void 0 : n.querySelector('slot[name="detail"]');
|
|
2076
|
-
if (!o) return;
|
|
2077
|
-
const e = o.assignedElements({ flatten: !0 }).flatMap(
|
|
2078
|
-
(i) => Array.from(i.querySelectorAll(".m-product-price-standard"))
|
|
2079
|
-
);
|
|
2080
|
-
for (const i of e)
|
|
2081
|
-
i.hasAttribute("tabindex") || i.setAttribute("tabindex", "0");
|
|
2082
|
-
}
|
|
2083
|
-
_restoreFocusToOrigin() {
|
|
2084
|
-
var t, e;
|
|
2085
|
-
const o = this._detailOriginEl;
|
|
2086
|
-
!o || !document.contains(o) || ((e = (t = document.activeElement) == null ? void 0 : t.blur) == null || e.call(t), requestAnimationFrame(() => {
|
|
2087
|
-
var i;
|
|
2088
|
-
o.classList.add("a--tabfocus"), (((i = o.shadowRoot) == null ? void 0 : i.querySelector('button, .button, [tabindex]:not([tabindex="-1"])')) ?? null ?? o).focus({ preventScroll: !0 });
|
|
2089
|
-
}));
|
|
2090
|
-
}
|
|
2091
|
-
getDeepActiveElement(o = this.shadowRoot) {
|
|
2092
|
-
let t = o.activeElement;
|
|
2093
|
-
for (; t && t.shadowRoot && t.shadowRoot.activeElement; )
|
|
2094
|
-
t = t.shadowRoot.activeElement;
|
|
2095
|
-
return t;
|
|
2096
|
-
}
|
|
2097
|
-
trapFocus(o) {
|
|
2098
|
-
if (o.key !== "Tab") return;
|
|
2099
|
-
const t = this.getDeepActiveElement(), e = this.renderRoot.querySelector(".close-btn");
|
|
2100
|
-
if (!o.shiftKey && e && e.contains(t)) {
|
|
2101
|
-
o.preventDefault();
|
|
2102
|
-
const n = this.renderRoot.querySelector(
|
|
2103
|
-
".o-whats-inside--content p"
|
|
2104
|
-
);
|
|
2105
|
-
n == null || n.focus();
|
|
2106
2097
|
}
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
function t(i) {
|
|
2112
|
-
return !(i.disabled || i.hasAttribute("disabled") || i.hasAttribute("tabindex") && i.getAttribute("tabindex") === "-1");
|
|
2098
|
+
|
|
2099
|
+
:host([underlined]:not([text])) .button slot {
|
|
2100
|
+
display: inline-flex;
|
|
2101
|
+
gap: 8px;
|
|
2113
2102
|
}
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
const h = Array.from(
|
|
2119
|
-
i instanceof HTMLSlotElement ? i.assignedElements({ flatten: !0 }) : []
|
|
2120
|
-
).filter(t).flatMap(e), c = Array.from(
|
|
2121
|
-
((s = i.shadowRoot) == null ? void 0 : s.querySelectorAll("*")) || []
|
|
2122
|
-
).filter(t).flatMap(e);
|
|
2123
|
-
r.push(...h, ...c);
|
|
2103
|
+
|
|
2104
|
+
:host([underlined][withbadge]:not([text])) .button slot {
|
|
2105
|
+
&::after {
|
|
2106
|
+
width: calc(100% - var(--badge-outer-width, 19px) - var(--spacing-s, 8px))
|
|
2124
2107
|
}
|
|
2125
|
-
return r.flat();
|
|
2126
2108
|
}
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2109
|
+
|
|
2110
|
+
//Icon movement on hover
|
|
2111
|
+
:host([variant="tertiary"][endIcon]) .icon-end {
|
|
2112
|
+
display: inline-flex;
|
|
2113
|
+
align-items: center;
|
|
2114
|
+
}
|
|
2115
|
+
|
|
2116
|
+
:host([variant="tertiary"][endIcon]:hover) .icon-end {
|
|
2117
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2118
|
+
transform: translateX(4px);
|
|
2119
|
+
}
|
|
2120
|
+
//End icon movment on hover
|
|
2121
|
+
`;
|
|
2122
|
+
x([
|
|
2123
|
+
a()
|
|
2124
|
+
], b.prototype, "type", 2);
|
|
2125
|
+
x([
|
|
2126
|
+
a()
|
|
2127
|
+
], b.prototype, "value", 2);
|
|
2128
|
+
x([
|
|
2129
|
+
a({ type: String, reflect: !0 })
|
|
2130
|
+
], b.prototype, "variant", 2);
|
|
2131
|
+
x([
|
|
2132
|
+
a({ type: String })
|
|
2133
|
+
], b.prototype, "text", 2);
|
|
2134
|
+
x([
|
|
2135
|
+
a({ type: String })
|
|
2136
|
+
], b.prototype, "textsecond", 2);
|
|
2137
|
+
x([
|
|
2138
|
+
a({ type: Boolean, reflect: !0 })
|
|
2139
|
+
], b.prototype, "fullwidth", 2);
|
|
2140
|
+
x([
|
|
2141
|
+
a({ type: Boolean, reflect: !0 })
|
|
2142
|
+
], b.prototype, "disabled", 2);
|
|
2143
|
+
x([
|
|
2144
|
+
a({ type: String })
|
|
2145
|
+
], b.prototype, "startIconModel", 2);
|
|
2146
|
+
x([
|
|
2147
|
+
a({ type: String })
|
|
2148
|
+
], b.prototype, "endIconModel", 2);
|
|
2149
|
+
x([
|
|
2150
|
+
a({ type: Boolean, reflect: !0, attribute: "starticon" })
|
|
2151
|
+
], b.prototype, "startIcon", 2);
|
|
2152
|
+
x([
|
|
2153
|
+
a({ type: Boolean, reflect: !0, attribute: "endicon" })
|
|
2154
|
+
], b.prototype, "endIcon", 2);
|
|
2155
|
+
x([
|
|
2156
|
+
a({ type: String, attribute: "paneltarget" })
|
|
2157
|
+
], b.prototype, "panelTarget", 2);
|
|
2158
|
+
x([
|
|
2159
|
+
a({ type: String })
|
|
2160
|
+
], b.prototype, "href", 2);
|
|
2161
|
+
x([
|
|
2162
|
+
a({ type: String })
|
|
2163
|
+
], b.prototype, "target", 2);
|
|
2164
|
+
x([
|
|
2165
|
+
a({ type: Boolean, reflect: !0 })
|
|
2166
|
+
], b.prototype, "underlined", 2);
|
|
2167
|
+
x([
|
|
2168
|
+
a({ type: Boolean, reflect: !0 })
|
|
2169
|
+
], b.prototype, "withbadge", 2);
|
|
2170
|
+
b = x([
|
|
2171
|
+
y("o-button")
|
|
2172
|
+
], b);
|
|
2173
|
+
var Bo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, At = (o, t, e, n) => {
|
|
2174
|
+
for (var i = n > 1 ? void 0 : n ? Do(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2175
|
+
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
2176
|
+
return n && i && Bo(t, e, i), i;
|
|
2177
|
+
};
|
|
2178
|
+
let rt = class extends u {
|
|
2179
|
+
constructor() {
|
|
2180
|
+
super(...arguments), this.status = "empty", this.ariaDescribedBy = "a-product-name", this.label = "Add to wishlist", this.toggleStatus = () => {
|
|
2181
|
+
this.status = this.status === "empty" ? "filled" : "empty", this.setAttribute("aria-pressed", String(this.status === "filled")), this.dispatchEvent(new CustomEvent("wishlist-toggle", {
|
|
2182
|
+
detail: { status: this.status },
|
|
2156
2183
|
bubbles: !0,
|
|
2157
|
-
composed: !0
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
button: "first",
|
|
2161
|
-
target: o.target
|
|
2162
|
-
}
|
|
2163
|
-
})
|
|
2164
|
-
));
|
|
2184
|
+
composed: !0
|
|
2185
|
+
}));
|
|
2186
|
+
};
|
|
2165
2187
|
}
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
new CustomEvent("secondbuttonclick", {
|
|
2169
|
-
bubbles: !0,
|
|
2170
|
-
composed: !0,
|
|
2171
|
-
cancelable: !0,
|
|
2172
|
-
detail: {
|
|
2173
|
-
button: "second",
|
|
2174
|
-
target: o.target
|
|
2175
|
-
}
|
|
2176
|
-
})
|
|
2177
|
-
));
|
|
2188
|
+
connectedCallback() {
|
|
2189
|
+
super.connectedCallback(), this.setAttribute("role", "button"), this.setAttribute("aria-pressed", String(this.status === "filled"));
|
|
2178
2190
|
}
|
|
2179
|
-
|
|
2180
|
-
this.
|
|
2181
|
-
|
|
2182
|
-
|
|
2191
|
+
firstUpdated() {
|
|
2192
|
+
this.addEventListener("click", this.toggleStatus), this.addEventListener("keydown", this.handleKeydown);
|
|
2193
|
+
}
|
|
2194
|
+
handleKeydown(o) {
|
|
2195
|
+
(o.key === "Enter" || o.key === " ") && (o.preventDefault(), this.toggleStatus());
|
|
2183
2196
|
}
|
|
2184
2197
|
render() {
|
|
2185
|
-
const o =
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
icon="arrowLeft"
|
|
2190
|
-
size="small"
|
|
2191
|
-
class="return-btn"
|
|
2192
|
-
bgstyle="background-light"
|
|
2193
|
-
data-role="back"
|
|
2194
|
-
@click=${this.handleClosePanel}
|
|
2195
|
-
@keydown=${this.handleClosePanel}
|
|
2196
|
-
aria-label="${this.closeButtonLabel}"
|
|
2197
|
-
srlabel="${this.closeButtonLabel}"
|
|
2198
|
-
showsrlabel="true"
|
|
2199
|
-
></o-icon-button>
|
|
2200
|
-
` : null}
|
|
2201
|
-
<p role="heading" aria-level="1" id="panel-title" class="${this.headerTitleClassName}">
|
|
2202
|
-
${this.headerTitle}
|
|
2203
|
-
</p>
|
|
2204
|
-
<o-icon-button
|
|
2205
|
-
icon="cross"
|
|
2206
|
-
size="small"
|
|
2207
|
-
class="close-btn"
|
|
2208
|
-
bgstyle="background-light"
|
|
2209
|
-
@click=${this.handleClosePanel}
|
|
2210
|
-
@keydown=${this.handleClosePanel}
|
|
2211
|
-
aria-label="${this.closeButtonLabel}"
|
|
2212
|
-
aria-describedby="panel-title"
|
|
2213
|
-
srlabel="${this.closeButtonLabel}"
|
|
2214
|
-
showsrlabel="true"
|
|
2215
|
-
></o-icon-button>
|
|
2216
|
-
</div>
|
|
2217
|
-
` : null;
|
|
2198
|
+
const o = N.wishlist.replace(
|
|
2199
|
+
"<svg",
|
|
2200
|
+
'<svg aria-hidden="true" focusable="false" part="svg"'
|
|
2201
|
+
);
|
|
2218
2202
|
return l`
|
|
2219
|
-
<
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
aria-modal="true"
|
|
2224
|
-
aria-labelledby="panel-title"
|
|
2225
|
-
style="z-index: ${this.zIndex + 1}"
|
|
2226
|
-
tabindex="-1"
|
|
2227
|
-
>
|
|
2228
|
-
<div role="document">
|
|
2229
|
-
${o}
|
|
2230
|
-
|
|
2231
|
-
<div class="content ${this.isHidingDetail ? "slide-out-right" : ""} ${this.showDetail ? "with-detail" : ""}">
|
|
2232
|
-
|
|
2233
|
-
${this.showDetail ? l`
|
|
2234
|
-
<div class="detail-view">
|
|
2235
|
-
${o}
|
|
2236
|
-
<div class="detail-content">
|
|
2237
|
-
<slot name="detail" @slotchange=${this._onDetailSlotChange}></slot>
|
|
2238
|
-
</div>
|
|
2239
|
-
</div>
|
|
2240
|
-
` : l`<slot></slot>`}
|
|
2241
|
-
</div>
|
|
2242
|
-
|
|
2243
|
-
${this.showFooter ? l`
|
|
2244
|
-
<div class="footer">
|
|
2245
|
-
${this.firstButtonVariant && this.firstButtonLabel ? l`
|
|
2246
|
-
<o-button
|
|
2247
|
-
variant="${this.firstButtonVariant}"
|
|
2248
|
-
@click=${this.handleFirstClick}
|
|
2249
|
-
@keydown=${this.handleFirstClick}
|
|
2250
|
-
${le(this.firstButtonProps)}
|
|
2251
|
-
>
|
|
2252
|
-
${this.firstButtonLabel}
|
|
2253
|
-
</o-button>
|
|
2254
|
-
` : null}
|
|
2255
|
-
|
|
2256
|
-
${this.secondButtonVariant && this.secondButtonLabel ? l`
|
|
2257
|
-
<o-button
|
|
2258
|
-
variant="${this.secondButtonVariant}"
|
|
2259
|
-
@click=${this.handleSecondClick}
|
|
2260
|
-
@keydown=${this.handleSecondClick}
|
|
2261
|
-
${le(this.secondButtonProps)}
|
|
2262
|
-
>
|
|
2263
|
-
${this.secondButtonLabel}
|
|
2264
|
-
</o-button>
|
|
2265
|
-
` : null}
|
|
2266
|
-
</div>
|
|
2267
|
-
` : null}
|
|
2268
|
-
</div>
|
|
2269
|
-
</div>
|
|
2203
|
+
<button type="button" aria-describedby="${this.ariaDescribedBy}" class="wishlist-button">
|
|
2204
|
+
<span class="sr-only">${this.label}</span>
|
|
2205
|
+
${C(o)}
|
|
2206
|
+
</button>
|
|
2270
2207
|
`;
|
|
2271
2208
|
}
|
|
2209
|
+
setStatus(o) {
|
|
2210
|
+
this.status = o, this.setAttribute("aria-pressed", String(this.status === "filled")), this.requestUpdate();
|
|
2211
|
+
}
|
|
2212
|
+
setAriaDescribedBy(o) {
|
|
2213
|
+
this.ariaDescribedBy = o, this.requestUpdate();
|
|
2214
|
+
}
|
|
2215
|
+
setLabel(o) {
|
|
2216
|
+
this.label = o, this.requestUpdate();
|
|
2217
|
+
}
|
|
2272
2218
|
};
|
|
2273
|
-
|
|
2219
|
+
rt.styles = f`
|
|
2274
2220
|
:host {
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
right: 0;
|
|
2280
|
-
height: 100%;
|
|
2281
|
-
width: 100%;
|
|
2282
|
-
pointer-events: none;
|
|
2283
|
-
z-index: var(--z-overlay);
|
|
2284
|
-
--side-panel-width: 100%;
|
|
2285
|
-
--side-panel-max-width: 416px;
|
|
2286
|
-
--font-size: var(--font-size-300);
|
|
2287
|
-
--line-height: var(--line-height-240);
|
|
2221
|
+
display: inline-flex;
|
|
2222
|
+
justify-content: center;
|
|
2223
|
+
align-items: center;
|
|
2224
|
+
outline: none !important;
|
|
2288
2225
|
}
|
|
2289
2226
|
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2227
|
+
.wishlist-button {
|
|
2228
|
+
display: flex;
|
|
2229
|
+
justify-content: center;
|
|
2230
|
+
align-items: center;
|
|
2231
|
+
width: 40px;
|
|
2232
|
+
height: 40px;
|
|
2233
|
+
border: transparent;
|
|
2234
|
+
border-radius: var(--radius-full);
|
|
2235
|
+
background-color: var(--color-alpha-light-strong);
|
|
2236
|
+
position: relative;
|
|
2237
|
+
cursor: pointer;
|
|
2293
2238
|
}
|
|
2294
2239
|
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
display: none !important;
|
|
2240
|
+
.wishlist-button:hover {
|
|
2241
|
+
background-color: var(--color-alpha-light-stronger);
|
|
2298
2242
|
}
|
|
2299
2243
|
|
|
2300
|
-
.
|
|
2301
|
-
|
|
2302
|
-
inset: 0;
|
|
2303
|
-
backdrop-filter: blur(4px);
|
|
2304
|
-
background-color: rgba(0, 0, 0, 0.3);
|
|
2305
|
-
opacity: 0;
|
|
2306
|
-
transition: opacity 0.3s ease;
|
|
2307
|
-
pointer-events: none;
|
|
2308
|
-
z-index: var(--z-overlay);
|
|
2244
|
+
.wishlist-button:active {
|
|
2245
|
+
background-color: var(--color-alpha-light-strongest);
|
|
2309
2246
|
}
|
|
2310
2247
|
|
|
2311
|
-
:
|
|
2312
|
-
|
|
2313
|
-
pointer-events: auto;
|
|
2248
|
+
.wishlist-button:focus-visible {
|
|
2249
|
+
${at};
|
|
2314
2250
|
}
|
|
2315
2251
|
|
|
2316
|
-
.
|
|
2317
|
-
|
|
2318
|
-
top: 0;
|
|
2319
|
-
right: 0;
|
|
2320
|
-
width: var(--side-panel-width);
|
|
2321
|
-
max-width: var(--side-panel-max-width);
|
|
2322
|
-
height: 100%;
|
|
2323
|
-
background: white;
|
|
2324
|
-
box-shadow: var(--colors-alpha-dark-60);
|
|
2325
|
-
transform: translateX(100%);
|
|
2326
|
-
transition: transform 0.3s ease;
|
|
2327
|
-
display: flex;
|
|
2328
|
-
flex-direction: column;
|
|
2329
|
-
pointer-events: auto;
|
|
2330
|
-
z-index: var(--z-panel);
|
|
2252
|
+
.wishlist-button:hover svg path {
|
|
2253
|
+
fill: var(--color-content-action-secondary);
|
|
2331
2254
|
}
|
|
2332
2255
|
|
|
2333
|
-
:host([
|
|
2334
|
-
|
|
2256
|
+
:host([status="filled"]) .wishlist-button svg path {
|
|
2257
|
+
fill: var(--color-content-action-secondary);
|
|
2335
2258
|
}
|
|
2336
2259
|
|
|
2337
|
-
.
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
justify-content: space-between;
|
|
2341
|
-
padding: 20px 16px;
|
|
2342
|
-
border-bottom: var(--border-050) solid var(--color-border-tertiary);
|
|
2343
|
-
|
|
2344
|
-
.panel-title {
|
|
2345
|
-
font-family: var(--font-family-loccitane-serif);
|
|
2346
|
-
font-size: var(--font-size);
|
|
2347
|
-
font-weight: var(--font-weight-400);
|
|
2348
|
-
line-height: var(--line-height);
|
|
2349
|
-
font-style: italic;
|
|
2350
|
-
display: -webkit-box;
|
|
2351
|
-
-webkit-line-clamp: 2;
|
|
2352
|
-
-webkit-box-orient: vertical;
|
|
2353
|
-
height: auto;
|
|
2354
|
-
margin-top: auto;
|
|
2355
|
-
margin-bottom: auto;
|
|
2356
|
-
overflow: hidden;
|
|
2357
|
-
width: 100%;
|
|
2358
|
-
color: var(--color-content-heading);
|
|
2359
|
-
}
|
|
2360
|
-
|
|
2361
|
-
.close-btn {
|
|
2362
|
-
margin-left: 8px;
|
|
2363
|
-
margin-top: 0;
|
|
2364
|
-
flex-direction: column;
|
|
2365
|
-
justify-content: start;
|
|
2366
|
-
}
|
|
2260
|
+
:host([status="empty"]) .wishlist-button svg path {
|
|
2261
|
+
fill: var(--color-alpha-light-strong);
|
|
2262
|
+
}
|
|
2367
2263
|
|
|
2368
|
-
|
|
2369
|
-
|
|
2264
|
+
@media (hover: hover) and (pointer: fine) {
|
|
2265
|
+
:host([status="empty"]) .wishlist-button:hover svg path {
|
|
2266
|
+
fill: var(--color-content-action-secondary);
|
|
2370
2267
|
}
|
|
2371
2268
|
}
|
|
2372
2269
|
|
|
2373
|
-
.
|
|
2374
|
-
|
|
2375
|
-
|
|
2270
|
+
.sr-only {
|
|
2271
|
+
border: 0 !important;
|
|
2272
|
+
clip: rect(0.1rem, 0.1rem, 0.1rem, 0.1rem) !important;
|
|
2273
|
+
-webkit-clip-path: inset(50%) !important;
|
|
2274
|
+
clip-path: inset(50%) !important;
|
|
2275
|
+
height: 0.1rem !important;
|
|
2276
|
+
margin: -0.1rem !important;
|
|
2277
|
+
overflow: hidden !important;
|
|
2278
|
+
padding: 0 !important;
|
|
2279
|
+
position: absolute !important;
|
|
2280
|
+
width: 0.1rem !important;
|
|
2281
|
+
white-space: nowrap !important;
|
|
2376
2282
|
}
|
|
2283
|
+
`;
|
|
2284
|
+
At([
|
|
2285
|
+
a({ type: String, reflect: !0 })
|
|
2286
|
+
], rt.prototype, "status", 2);
|
|
2287
|
+
At([
|
|
2288
|
+
a({ type: String, reflect: !0 })
|
|
2289
|
+
], rt.prototype, "ariaDescribedBy", 2);
|
|
2290
|
+
At([
|
|
2291
|
+
a({ type: String, reflect: !0 })
|
|
2292
|
+
], rt.prototype, "label", 2);
|
|
2293
|
+
rt = At([
|
|
2294
|
+
y("o-wishlist-button")
|
|
2295
|
+
], rt);
|
|
2296
|
+
var Ho = Object.defineProperty, Mo = Object.getOwnPropertyDescriptor, ot = (o, t, e, n) => {
|
|
2297
|
+
for (var i = n > 1 ? void 0 : n ? Mo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2298
|
+
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
2299
|
+
return n && i && Ho(t, e, i), i;
|
|
2300
|
+
};
|
|
2301
|
+
let F = class extends u {
|
|
2302
|
+
constructor() {
|
|
2303
|
+
super(...arguments), this.href = "", this.target = "", this.template = "standard", this.inverse = !1, this.endIcon = !1, this.reverseEndIcon = !1;
|
|
2304
|
+
}
|
|
2305
|
+
_handleClick(o) {
|
|
2306
|
+
(!this.href || this.href === "#") && o.preventDefault();
|
|
2307
|
+
}
|
|
2308
|
+
render() {
|
|
2309
|
+
const o = this.href || "#";
|
|
2310
|
+
return l`
|
|
2311
|
+
<a
|
|
2312
|
+
href="${o}"
|
|
2313
|
+
target="${k(this.target || void 0)}"
|
|
2314
|
+
@click="${this._handleClick}"
|
|
2315
|
+
>
|
|
2316
|
+
${this.endIcon && this.reverseEndIcon ? l`
|
|
2317
|
+
<o-icon-button
|
|
2318
|
+
icon="chevronLeft"
|
|
2319
|
+
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
2320
|
+
size="xsmall"
|
|
2321
|
+
aria-hidden="true"
|
|
2322
|
+
type="span"
|
|
2323
|
+
></o-icon-button>
|
|
2324
|
+
` : null}
|
|
2325
|
+
<span class="link-text"><slot></slot></span>
|
|
2326
|
+
${this.endIcon && !this.reverseEndIcon ? l`
|
|
2327
|
+
<o-icon-button
|
|
2328
|
+
icon="chevronRight"
|
|
2329
|
+
bgstyle="${this.inverse ? "none-light" : "none-contrast"}"
|
|
2330
|
+
size="xsmall"
|
|
2331
|
+
aria-hidden="true"
|
|
2332
|
+
type="span"
|
|
2333
|
+
></o-icon-button>
|
|
2334
|
+
` : null}
|
|
2335
|
+
</a>
|
|
2336
|
+
`;
|
|
2337
|
+
}
|
|
2338
|
+
};
|
|
2339
|
+
F.styles = f`
|
|
2340
|
+
:host([template="standard"]) a {
|
|
2341
|
+
color: var(--color-content-action-secondary);
|
|
2342
|
+
font-size: var(--font-size-200);
|
|
2343
|
+
font-weight: var(--font-weight-400);
|
|
2344
|
+
line-height: var(--line-height-240);
|
|
2345
|
+
letter-spacing: var(--letter-spacing-400);
|
|
2346
|
+
font-family: var(--font-family-loccitane-serif);
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
:host([template="discret"]) a {
|
|
2350
|
+
color: var(--color-content-action-secondary);
|
|
2351
|
+
font-size: var(--font-size-100);
|
|
2352
|
+
font-weight: var(--font-weight-400);
|
|
2353
|
+
line-height: var(--line-height-160);
|
|
2354
|
+
letter-spacing: var(--letter-spacing-400);
|
|
2355
|
+
font-family: var(--font-family-loccitane-sans);
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
:host([template="review"]) a {
|
|
2359
|
+
color: var(--color-content-action-secondary);
|
|
2360
|
+
font-size: var(--font-size-100);
|
|
2361
|
+
font-weight: var(--font-weight-500);
|
|
2362
|
+
line-height: var(--line-height-160);
|
|
2363
|
+
letter-spacing: var(--letter-spacing-400);
|
|
2364
|
+
font-family: var(--font-family-loccitane-sans);
|
|
2365
|
+
text-transform: uppercase;
|
|
2366
|
+
}
|
|
2367
|
+
|
|
2368
|
+
:host([inverse]) a {
|
|
2369
|
+
color: var(--color-container-action-tertiary-default);
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
:host([endIcon]) a o-icon-button {
|
|
2373
|
+
margin-left: 2px;
|
|
2374
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2375
|
+
}
|
|
2376
|
+
|
|
2377
|
+
:host([endIcon][reverseEndIcon]) a o-icon-button {
|
|
2378
|
+
margin-right: 2px;
|
|
2379
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
:host([endIcon]) a {
|
|
2383
|
+
&:hover {
|
|
2384
|
+
o-icon-button {
|
|
2385
|
+
transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
2386
|
+
:host(:not([reverseEndIcon])) & {
|
|
2387
|
+
transform: translateX(4px);
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2390
|
+
:host([reverseEndIcon]) & {
|
|
2391
|
+
transform: translateX(-4px);
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2395
|
+
}
|
|
2396
|
+
|
|
2397
|
+
:host a {
|
|
2398
|
+
position: relative;
|
|
2399
|
+
text-decoration: none;
|
|
2400
|
+
color: inherit;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
.link-text {
|
|
2404
|
+
position: relative;
|
|
2405
|
+
display: inline-block;
|
|
2406
|
+
}
|
|
2377
2407
|
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2408
|
+
.link-text::after {
|
|
2409
|
+
content: "";
|
|
2410
|
+
position: absolute;
|
|
2411
|
+
left: 0;
|
|
2412
|
+
bottom: 0;
|
|
2413
|
+
width: 100%;
|
|
2414
|
+
opacity: 1;
|
|
2415
|
+
height: 1px;
|
|
2416
|
+
background-color: currentColor;
|
|
2417
|
+
transition: opacity 0.3s ease, height 0.3s ease;
|
|
2418
|
+
pointer-events: none;
|
|
2419
|
+
}
|
|
2383
2420
|
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2421
|
+
:host a:hover .link-text::after {
|
|
2422
|
+
opacity: 0;
|
|
2423
|
+
height: 1px;
|
|
2424
|
+
}
|
|
2425
|
+
/* End of underline effect */
|
|
2426
|
+
`;
|
|
2427
|
+
ot([
|
|
2428
|
+
a({ type: String })
|
|
2429
|
+
], F.prototype, "href", 2);
|
|
2430
|
+
ot([
|
|
2431
|
+
a({ type: String })
|
|
2432
|
+
], F.prototype, "target", 2);
|
|
2433
|
+
ot([
|
|
2434
|
+
a({ type: String, reflect: !0 })
|
|
2435
|
+
], F.prototype, "template", 2);
|
|
2436
|
+
ot([
|
|
2437
|
+
a({ type: Boolean, reflect: !0 })
|
|
2438
|
+
], F.prototype, "inverse", 2);
|
|
2439
|
+
ot([
|
|
2440
|
+
a({ type: Boolean, reflect: !0 })
|
|
2441
|
+
], F.prototype, "endIcon", 2);
|
|
2442
|
+
ot([
|
|
2443
|
+
a({ type: Boolean, reflect: !0 })
|
|
2444
|
+
], F.prototype, "reverseEndIcon", 2);
|
|
2445
|
+
F = ot([
|
|
2446
|
+
y("o-link")
|
|
2447
|
+
], F);
|
|
2448
|
+
var To = Object.defineProperty, jo = Object.getOwnPropertyDescriptor, Et = (o, t, e, n) => {
|
|
2449
|
+
for (var i = n > 1 ? void 0 : n ? jo(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2450
|
+
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
2451
|
+
return n && i && To(t, e, i), i;
|
|
2452
|
+
};
|
|
2453
|
+
let st = class extends u {
|
|
2454
|
+
constructor() {
|
|
2455
|
+
super(...arguments), this.rating = 0;
|
|
2456
|
+
}
|
|
2457
|
+
getStarKeys() {
|
|
2458
|
+
const o = [];
|
|
2459
|
+
for (let t = 0; t < 5; t++) {
|
|
2460
|
+
const e = this.rating - t;
|
|
2461
|
+
let n;
|
|
2462
|
+
e >= 1 ? n = 100 : e <= 0 ? n = 0 : n = Math.round(e * 100 / 25) * 25, o.push(`star-${n}`);
|
|
2463
|
+
}
|
|
2464
|
+
return o;
|
|
2465
|
+
}
|
|
2466
|
+
render() {
|
|
2467
|
+
const o = this.getStarKeys();
|
|
2468
|
+
return l`
|
|
2469
|
+
<div class="rating">
|
|
2470
|
+
<div class="stars">
|
|
2471
|
+
${o.map(
|
|
2472
|
+
(t) => l`<span class="star">${C(N[t] ?? "")}</span>`
|
|
2473
|
+
)}
|
|
2474
|
+
</div>
|
|
2475
|
+
${this.reviewCount != null && this.href != null ? l`<o-link template="review" href="${this.href}">${this.reviewCount}</o-link>` : null}
|
|
2476
|
+
</div>
|
|
2477
|
+
`;
|
|
2478
|
+
}
|
|
2479
|
+
};
|
|
2480
|
+
st.styles = f`
|
|
2481
|
+
svg {
|
|
2482
|
+
width: 12px;
|
|
2483
|
+
height: 12px;
|
|
2394
2484
|
}
|
|
2395
|
-
|
|
2396
|
-
.footer {
|
|
2397
|
-
flex: 0 0 auto;
|
|
2398
|
-
padding: var(--spacing-xl);
|
|
2399
|
-
border-top: var(--border-050) solid var(--color-border-tertiary);
|
|
2485
|
+
.rating {
|
|
2400
2486
|
display: flex;
|
|
2401
|
-
|
|
2402
|
-
gap: var(--spacing-l);
|
|
2403
|
-
justify-content: flex-start;
|
|
2487
|
+
align-items: center;
|
|
2404
2488
|
}
|
|
2405
2489
|
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
:
|
|
2409
|
-
--side-panel-width: 100%;
|
|
2410
|
-
--side-panel-max-width: none;
|
|
2411
|
-
}
|
|
2490
|
+
.stars {
|
|
2491
|
+
display: flex;
|
|
2492
|
+
gap: 2px;
|
|
2412
2493
|
}
|
|
2413
2494
|
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
:host {
|
|
2417
|
-
--side-panel-width: 375px;
|
|
2418
|
-
--side-panel-max-width: 375px;
|
|
2419
|
-
}
|
|
2495
|
+
.star {
|
|
2496
|
+
display: block;
|
|
2420
2497
|
}
|
|
2421
2498
|
|
|
2422
|
-
|
|
2423
|
-
:
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
@keyframes slideInRight {
|
|
2432
|
-
from {
|
|
2433
|
-
transform: translateX(100%);
|
|
2434
|
-
}
|
|
2435
|
-
to {
|
|
2436
|
-
transform: translateX(0%);
|
|
2437
|
-
}
|
|
2438
|
-
}
|
|
2439
|
-
|
|
2440
|
-
@keyframes slideOutRight {
|
|
2441
|
-
from {
|
|
2442
|
-
transform: translateX(0%);
|
|
2443
|
-
}
|
|
2444
|
-
to {
|
|
2445
|
-
transform: translateX(100%);
|
|
2446
|
-
}
|
|
2499
|
+
o-link {
|
|
2500
|
+
margin-left: 6px;
|
|
2501
|
+
font-family: var(--font-family-loccitane-sans);
|
|
2502
|
+
font-weight: var(--font-weight-500);
|
|
2503
|
+
font-size: var(--font-size-100);
|
|
2504
|
+
line-height: var(--line-height-160);
|
|
2505
|
+
letter-spacing: var(--letter-spacing-400);
|
|
2506
|
+
color: var(--color-content-action-secondary);
|
|
2447
2507
|
}
|
|
2448
2508
|
|
|
2449
|
-
.
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
.detail-view {
|
|
2454
|
-
animation: slideInRight 0.3s ease-out both;
|
|
2455
|
-
}
|
|
2456
|
-
.detail-content {
|
|
2457
|
-
padding: var(--spacing-xl);
|
|
2509
|
+
.review-link {
|
|
2510
|
+
text-decoration: underline;
|
|
2511
|
+
cursor: pointer;
|
|
2458
2512
|
}
|
|
2459
2513
|
`;
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
a({ type: Boolean, reflect: !0 })
|
|
2473
|
-
], p.prototype, "showHeaderStartIcon", 2);
|
|
2474
|
-
g([
|
|
2475
|
-
a({ type: String, reflect: !0 })
|
|
2476
|
-
], p.prototype, "headerTitle", 2);
|
|
2477
|
-
g([
|
|
2478
|
-
a({ type: String, reflect: !0 })
|
|
2479
|
-
], p.prototype, "headerTitleClassName", 2);
|
|
2480
|
-
g([
|
|
2481
|
-
a({ type: String, reflect: !0 })
|
|
2482
|
-
], p.prototype, "closeButtonLabel", 2);
|
|
2483
|
-
g([
|
|
2484
|
-
a({ type: String, reflect: !0 })
|
|
2485
|
-
], p.prototype, "firstButtonLabel", 2);
|
|
2486
|
-
g([
|
|
2487
|
-
a({ type: String, reflect: !0 })
|
|
2488
|
-
], p.prototype, "firstButtonVariant", 2);
|
|
2489
|
-
g([
|
|
2490
|
-
a({ type: Object, reflect: !0 })
|
|
2491
|
-
], p.prototype, "firstButtonProps", 2);
|
|
2492
|
-
g([
|
|
2493
|
-
a({ type: Boolean, reflect: !0 })
|
|
2494
|
-
], p.prototype, "onFirstButtonClickClose", 2);
|
|
2495
|
-
g([
|
|
2496
|
-
a({ type: String, reflect: !0 })
|
|
2497
|
-
], p.prototype, "secondButtonLabel", 2);
|
|
2498
|
-
g([
|
|
2499
|
-
a({ type: String, reflect: !0 })
|
|
2500
|
-
], p.prototype, "secondButtonVariant", 2);
|
|
2501
|
-
g([
|
|
2502
|
-
a({ type: Object, reflect: !0 })
|
|
2503
|
-
], p.prototype, "secondButtonProps", 2);
|
|
2504
|
-
g([
|
|
2505
|
-
a({ type: Boolean, reflect: !0 })
|
|
2506
|
-
], p.prototype, "onSecondButtonClickClose", 2);
|
|
2507
|
-
g([
|
|
2508
|
-
a({ type: Boolean, reflect: !0 })
|
|
2509
|
-
], p.prototype, "disablePortal", 2);
|
|
2510
|
-
g([
|
|
2511
|
-
a({ type: Number, reflect: !0 })
|
|
2512
|
-
], p.prototype, "zIndex", 2);
|
|
2513
|
-
g([
|
|
2514
|
-
a({ type: Boolean, reflect: !0 })
|
|
2515
|
-
], p.prototype, "initialized", 2);
|
|
2516
|
-
g([
|
|
2517
|
-
a({ type: Boolean })
|
|
2518
|
-
], p.prototype, "showDetail", 2);
|
|
2519
|
-
g([
|
|
2520
|
-
a({ type: Boolean })
|
|
2521
|
-
], p.prototype, "isHidingDetail", 2);
|
|
2522
|
-
p = g([
|
|
2523
|
-
y("o-side-panel")
|
|
2524
|
-
], p);
|
|
2514
|
+
Et([
|
|
2515
|
+
a({ type: Number })
|
|
2516
|
+
], st.prototype, "rating", 2);
|
|
2517
|
+
Et([
|
|
2518
|
+
a({ type: String })
|
|
2519
|
+
], st.prototype, "reviewCount", 2);
|
|
2520
|
+
Et([
|
|
2521
|
+
a({ type: String })
|
|
2522
|
+
], st.prototype, "href", 2);
|
|
2523
|
+
st = Et([
|
|
2524
|
+
y("o-rating")
|
|
2525
|
+
], st);
|
|
2525
2526
|
var Ro = Object.defineProperty, No = Object.getOwnPropertyDescriptor, X = (o, t, e, n) => {
|
|
2526
2527
|
for (var i = n > 1 ? void 0 : n ? No(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
2527
2528
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
@@ -3315,7 +3316,7 @@ var Xo = Object.defineProperty, Jo = Object.getOwnPropertyDescriptor, M = (o, t,
|
|
|
3315
3316
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
3316
3317
|
return n && i && Xo(t, e, i), i;
|
|
3317
3318
|
};
|
|
3318
|
-
let
|
|
3319
|
+
let A = class extends u {
|
|
3319
3320
|
constructor() {
|
|
3320
3321
|
super(...arguments), this.options = [], this.value = "", this.name = "", this.additionaltext = "+X variant(s)", this.disabled = !1, this.width = "100%", this.open = !1, this.activeIndex = -1, this.menuWidth = "", this._handleOutsideClick = (o) => {
|
|
3321
3322
|
this.contains(o.target) || (this.open = !1, this.activeIndex = -1);
|
|
@@ -3452,7 +3453,7 @@ let E = class extends u {
|
|
|
3452
3453
|
`;
|
|
3453
3454
|
}
|
|
3454
3455
|
};
|
|
3455
|
-
|
|
3456
|
+
A.styles = f`
|
|
3456
3457
|
:host {
|
|
3457
3458
|
display: inline-block;
|
|
3458
3459
|
position: relative;
|
|
@@ -3630,34 +3631,34 @@ E.styles = f`
|
|
|
3630
3631
|
`;
|
|
3631
3632
|
M([
|
|
3632
3633
|
a({ type: Array, reflect: !0 })
|
|
3633
|
-
],
|
|
3634
|
+
], A.prototype, "options", 2);
|
|
3634
3635
|
M([
|
|
3635
3636
|
a({ type: String, reflect: !0 })
|
|
3636
|
-
],
|
|
3637
|
+
], A.prototype, "value", 2);
|
|
3637
3638
|
M([
|
|
3638
3639
|
a({ type: String, reflect: !0 })
|
|
3639
|
-
],
|
|
3640
|
+
], A.prototype, "name", 2);
|
|
3640
3641
|
M([
|
|
3641
3642
|
a({ type: String, reflect: !0 })
|
|
3642
|
-
],
|
|
3643
|
+
], A.prototype, "additionaltext", 2);
|
|
3643
3644
|
M([
|
|
3644
3645
|
a({ type: Boolean, reflect: !0 })
|
|
3645
|
-
],
|
|
3646
|
+
], A.prototype, "disabled", 2);
|
|
3646
3647
|
M([
|
|
3647
3648
|
a({ type: String, reflect: !0 })
|
|
3648
|
-
],
|
|
3649
|
+
], A.prototype, "width", 2);
|
|
3649
3650
|
M([
|
|
3650
3651
|
et()
|
|
3651
|
-
],
|
|
3652
|
+
], A.prototype, "open", 2);
|
|
3652
3653
|
M([
|
|
3653
3654
|
et()
|
|
3654
|
-
],
|
|
3655
|
+
], A.prototype, "activeIndex", 2);
|
|
3655
3656
|
M([
|
|
3656
3657
|
et()
|
|
3657
|
-
],
|
|
3658
|
-
|
|
3658
|
+
], A.prototype, "menuWidth", 2);
|
|
3659
|
+
A = M([
|
|
3659
3660
|
y("o-dropdown-variant")
|
|
3660
|
-
],
|
|
3661
|
+
], A);
|
|
3661
3662
|
/**
|
|
3662
3663
|
* @license
|
|
3663
3664
|
* Copyright 2018 Google LLC
|
|
@@ -3809,7 +3810,7 @@ var oi = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, V = (o, t,
|
|
|
3809
3810
|
return n && i && oi(t, e, i), i;
|
|
3810
3811
|
};
|
|
3811
3812
|
const ni = Ft(u);
|
|
3812
|
-
let
|
|
3813
|
+
let E = class extends ni {
|
|
3813
3814
|
constructor() {
|
|
3814
3815
|
super(...arguments), this.link = "", this.name = "", this.value = "", this.text = "", this.size = "standard", this.selected = !1, this.fullwidth = !1, this.inactive = !1;
|
|
3815
3816
|
}
|
|
@@ -3832,7 +3833,7 @@ let A = class extends ni {
|
|
|
3832
3833
|
`;
|
|
3833
3834
|
}
|
|
3834
3835
|
};
|
|
3835
|
-
|
|
3836
|
+
E.styles = f`
|
|
3836
3837
|
:host {
|
|
3837
3838
|
cursor: pointer;
|
|
3838
3839
|
display: inline-flex;
|
|
@@ -3924,31 +3925,31 @@ A.styles = f`
|
|
|
3924
3925
|
`;
|
|
3925
3926
|
V([
|
|
3926
3927
|
a({ type: String, reflect: !0 })
|
|
3927
|
-
],
|
|
3928
|
+
], E.prototype, "link", 2);
|
|
3928
3929
|
V([
|
|
3929
3930
|
a({ reflect: !0 })
|
|
3930
|
-
],
|
|
3931
|
+
], E.prototype, "name", 2);
|
|
3931
3932
|
V([
|
|
3932
3933
|
a({ reflect: !0 })
|
|
3933
|
-
],
|
|
3934
|
+
], E.prototype, "value", 2);
|
|
3934
3935
|
V([
|
|
3935
3936
|
a({ type: String })
|
|
3936
|
-
],
|
|
3937
|
+
], E.prototype, "text", 2);
|
|
3937
3938
|
V([
|
|
3938
3939
|
a({ type: String, reflect: !0 })
|
|
3939
|
-
],
|
|
3940
|
+
], E.prototype, "size", 2);
|
|
3940
3941
|
V([
|
|
3941
3942
|
a({ type: Boolean, reflect: !0 })
|
|
3942
|
-
],
|
|
3943
|
+
], E.prototype, "selected", 2);
|
|
3943
3944
|
V([
|
|
3944
3945
|
a({ type: Boolean, reflect: !0 })
|
|
3945
|
-
],
|
|
3946
|
+
], E.prototype, "fullwidth", 2);
|
|
3946
3947
|
V([
|
|
3947
3948
|
a({ type: Boolean, reflect: !0 })
|
|
3948
|
-
],
|
|
3949
|
-
|
|
3949
|
+
], E.prototype, "inactive", 2);
|
|
3950
|
+
E = V([
|
|
3950
3951
|
y("o-chip")
|
|
3951
|
-
],
|
|
3952
|
+
], E);
|
|
3952
3953
|
var ri = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Gt = (o, t, e, n) => {
|
|
3953
3954
|
for (var i = n > 1 ? void 0 : n ? si(t, e) : t, r = o.length - 1, s; r >= 0; r--)
|
|
3954
3955
|
(s = o[r]) && (i = (n ? s(t, e, i) : s(i)) || i);
|
|
@@ -3959,7 +3960,7 @@ let yt = class extends u {
|
|
|
3959
3960
|
super(), this.name = "", this.value = "", this.addEventListener("selected", this.onChipSelected);
|
|
3960
3961
|
}
|
|
3961
3962
|
onChipSelected(o) {
|
|
3962
|
-
const t = o.target instanceof
|
|
3963
|
+
const t = o.target instanceof E ? o.target : null;
|
|
3963
3964
|
t != null && t.link || (this.name = (t == null ? void 0 : t.name) || "", this.value = (t == null ? void 0 : t.value) || "", this.querySelectorAll("o-chip").forEach((e) => {
|
|
3964
3965
|
e !== t && (e.selected = !1);
|
|
3965
3966
|
}));
|