@proximus/lavender-header 1.0.0-alpha.8 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Header.d.ts +35 -0
- package/dist/HeaderItem.d.ts +19 -0
- package/dist/Link.d.ts +5 -0
- package/dist/MobileMenu.d.ts +8 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.es.js +4031 -0
- package/package.json +10 -33
- package/dist/index.js +0 -1370
package/dist/index.js
DELETED
|
@@ -1,1370 +0,0 @@
|
|
|
1
|
-
import { PxElement as u, cssTokenBreakpoints as a, paddingValues as n, boxShadowValues as R, backgroundSizeValues as I, noBorderRadiusValues as P, borderRadiusValues as _, borderSideValues as q, borderValues as H, gradientValues as F, backgroundColorValues as f, borderColorValues as j, transferAccessibilityAttributes as N, WithExtraAttributes as k, fontweightValues as O, colorValues as W, fontsizeValues as G } from "@proximus/lavender-common";
|
|
2
|
-
import "@proximus/lavender-layout";
|
|
3
|
-
const Y = ':host{display:block}.container{font-family:var(--px-font-family);background-color:var(--background-color);background-image:var(--background-image);background:var(--background-gradient);border-radius:var(--px-radius-main);box-sizing:border-box;height:100%}:host([inverted]) .container{background-color:var(--background-color-inverted)}.border-none{border:none}.border-s{border:var(--px-border-size-s) solid var(--border-color)}.border-m{border:var(--px-border-size-m) solid var(--border-color)}.border-l{border:var(--px-border-size-l) solid var(--border-color)}.border-side-top{border-bottom-style:none;border-right-style:none;border-left-style:none}.border-side-right{border-top-style:none;border-bottom-style:none;border-left-style:none}.border-side-bottom{border-top-style:none;border-right-style:none;border-left-style:none}.border-side-left{border-top-style:none;border-right-style:none;border-bottom-style:none}.border-side-block{border-inline-style:none}.border-side-inline{border-block-style:none}:host([inverted]) .border-s,:host([inverted]) .border-m,:host([inverted]) .border-l{border-color:var(--border-color-inverted)}.border-radius-main{border-radius:var(--px-radius-main)}.border-radius-pill{border-radius:var(--px-radius-pill)}.no-border-radius-top{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all,.border-radius-none{border-radius:var(--px-radius-none)}.bgimg{background-repeat:no-repeat}.background-size-cover{background-size:cover;background-position:center center}.background-size-contain{background-size:contain}.box-shadow-none{box-shadow:none}.box-shadow-s{box-shadow:0 1px 2px #2525251f}.box-shadow-m{box-shadow:0 4px 6px -1px #25252514}.box-shadow-l{box-shadow:0 10px 15px -3px #25252514}.box-shadow-xl{box-shadow:0 20px 25px -5px #25252514}.anchored{position:relative}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]),::slotted([slot="anchor-full"]){position:absolute;top:0}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]){transform:translateY(-50%);z-index:2}::slotted([slot="anchor-right"]){right:var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) )}::slotted([slot="anchor-left"]){left:var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) )}::slotted([slot="anchor-full"]){transform:translateY(-100%);right:0;left:0;text-align:center;z-index:1}@media only screen and (max-width: 767px){.container{background-color:var(--background-color--mobile, var(--background-color));background-image:var( --background-image--mobile, var( --background-image, var(--background-gradient--mobile, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--mobile, var(--background-color-inverted) )}.border-side-top--mobile{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--mobile{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--mobile{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--mobile{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--mobile{border-inline-style:none;border-block-style:solid}.border-side-inline--mobile{border-block-style:none;border-inline-style:solid}.no-border-radius-top--mobile{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--mobile{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--mobile{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--mobile{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--mobile{border-radius:var(--px-radius-none)}}.border-s ::slotted([slot="anchor-full"]){right:calc(var(--px-border-size-s) * -1);left:calc(var(--px-border-size-s) * -1)}.border-m ::slotted([slot="anchor-full"]){right:calc(var(--px-border-size-m) * -1);left:calc(var(--px-border-size-m) * -1)}.border-l ::slotted([slot="anchor-full"]){right:calc(var(--px-border-l) * -1);left:calc(var(--px-border-l) * -1)}@media only screen and (min-width: 768px) and (max-width: 1024px){.container{background-color:var(--background-color--tablet, var(--background-color));background-image:var( --background-image--tablet, var( --background-image, var(--background-gradient--tablet, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--tablet, var(--background-color-inverted) )}.no-border-radius-top--tablet{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--tablet{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--tablet{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--tablet{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--tablet{border-radius:var(--px-radius-none)}.border-side-top--tablet{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--tablet{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--tablet{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--tablet{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--tablet{border-inline-style:none;border-block-style:solid}.border-side-inline--tablet{border-block-style:none;border-inline-style:solid}::slotted([slot="anchor-right"]){right:var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) )}::slotted([slot="anchor-left"]){left:var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) )}}@media only screen and (min-width: 1025px){.container{background-color:var(--background-color--laptop, var(--background-color));background-image:var( --background-image--laptop, var( --background-image, var(--background-gradient--laptop, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--laptop, var(--background-color-inverted) )}.no-border-radius-top--laptop{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--laptop{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--laptop{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--laptop{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--laptop{border-radius:var(--px-radius-none)}::slotted([slot="anchor-right"]){right:var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) )}::slotted([slot="anchor-left"]){left:var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) )}.border-side-top--laptop{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--laptop{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--laptop{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--laptop{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--laptop{border-inline-style:none;border-block-style:solid}.border-side-inline--laptop{border-block-style:none;border-inline-style:solid}}', m = new CSSStyleSheet();
|
|
4
|
-
m.replaceSync(Y);
|
|
5
|
-
const J = ["anchor-right", "anchor-left", "anchor-full"], d = (l, t, e) => `:host([${l}${e ? `--${e}` : ""}='${t}']) .container`, s = "px-padding", h = class h extends u {
|
|
6
|
-
constructor() {
|
|
7
|
-
super(
|
|
8
|
-
m,
|
|
9
|
-
a(
|
|
10
|
-
"padding",
|
|
11
|
-
d,
|
|
12
|
-
n,
|
|
13
|
-
s,
|
|
14
|
-
"--container-padding"
|
|
15
|
-
),
|
|
16
|
-
a(
|
|
17
|
-
"padding-inline",
|
|
18
|
-
d,
|
|
19
|
-
n,
|
|
20
|
-
s
|
|
21
|
-
),
|
|
22
|
-
a(
|
|
23
|
-
"padding-block",
|
|
24
|
-
d,
|
|
25
|
-
n,
|
|
26
|
-
s
|
|
27
|
-
),
|
|
28
|
-
a(
|
|
29
|
-
"padding-top",
|
|
30
|
-
d,
|
|
31
|
-
n,
|
|
32
|
-
s
|
|
33
|
-
),
|
|
34
|
-
a(
|
|
35
|
-
"padding-right",
|
|
36
|
-
d,
|
|
37
|
-
n,
|
|
38
|
-
s,
|
|
39
|
-
"--container-padding-right"
|
|
40
|
-
),
|
|
41
|
-
a(
|
|
42
|
-
"padding-bottom",
|
|
43
|
-
d,
|
|
44
|
-
n,
|
|
45
|
-
s
|
|
46
|
-
),
|
|
47
|
-
a(
|
|
48
|
-
"padding-left",
|
|
49
|
-
d,
|
|
50
|
-
n,
|
|
51
|
-
s,
|
|
52
|
-
"--container-padding-left"
|
|
53
|
-
)
|
|
54
|
-
), this.template = () => `<div class="container">
|
|
55
|
-
<slot name="anchor-left"></slot>
|
|
56
|
-
<slot name="anchor-right"></slot>
|
|
57
|
-
<slot name="anchor-full"></slot>
|
|
58
|
-
<slot></slot>
|
|
59
|
-
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
60
|
-
}
|
|
61
|
-
static get observedAttributes() {
|
|
62
|
-
return [
|
|
63
|
-
...super.observedAttributes,
|
|
64
|
-
"border",
|
|
65
|
-
"border-color",
|
|
66
|
-
"border-side",
|
|
67
|
-
"border-side--mobile",
|
|
68
|
-
"border-side--tablet",
|
|
69
|
-
"border-side--laptop",
|
|
70
|
-
"border-radius",
|
|
71
|
-
"no-border-radius",
|
|
72
|
-
"no-border-radius--mobile",
|
|
73
|
-
"no-border-radius--tablet",
|
|
74
|
-
"no-border-radius--laptop",
|
|
75
|
-
"background-color",
|
|
76
|
-
"background-color--mobile",
|
|
77
|
-
"background-color--tablet",
|
|
78
|
-
"background-color--laptop",
|
|
79
|
-
"background-gradient",
|
|
80
|
-
"background-gradient--mobile",
|
|
81
|
-
"background-gradient--tablet",
|
|
82
|
-
"background-gradient--laptop",
|
|
83
|
-
"background-image",
|
|
84
|
-
"background-image--mobile",
|
|
85
|
-
"background-image--tablet",
|
|
86
|
-
"background-image--laptop",
|
|
87
|
-
"background-size",
|
|
88
|
-
"background-position",
|
|
89
|
-
"box-shadow",
|
|
90
|
-
"inverted"
|
|
91
|
-
];
|
|
92
|
-
}
|
|
93
|
-
connectedCallback() {
|
|
94
|
-
super.connectedCallback(), this.padding || (this.padding = "m"), this.backgroundColor || (this.backgroundColor = "container-neutral-bare"), this.borderColor || (this.borderColor = "container-main");
|
|
95
|
-
const t = this.querySelector("[slot]");
|
|
96
|
-
t && J.includes(t.getAttribute("slot")) && this.shadowRoot.querySelector(".container").classList.toggle("anchored");
|
|
97
|
-
}
|
|
98
|
-
attributeChangedCallback(t, e, r) {
|
|
99
|
-
if (e !== r)
|
|
100
|
-
switch (t) {
|
|
101
|
-
case "border":
|
|
102
|
-
this.updateAttribute(t, e, r, H);
|
|
103
|
-
break;
|
|
104
|
-
case "border-color":
|
|
105
|
-
this.updateBorderColor(t, r);
|
|
106
|
-
break;
|
|
107
|
-
case "border-side":
|
|
108
|
-
case "border-side--mobile":
|
|
109
|
-
case "border-side--tablet":
|
|
110
|
-
case "border-side--laptop":
|
|
111
|
-
this.updateAttribute(t, e, r, q);
|
|
112
|
-
break;
|
|
113
|
-
case "border-radius":
|
|
114
|
-
this.updateAttribute(
|
|
115
|
-
t,
|
|
116
|
-
e,
|
|
117
|
-
r,
|
|
118
|
-
_
|
|
119
|
-
);
|
|
120
|
-
break;
|
|
121
|
-
case "no-border-radius":
|
|
122
|
-
case "no-border-radius--mobile":
|
|
123
|
-
case "no-border-radius--tablet":
|
|
124
|
-
case "no-border-radius--laptop":
|
|
125
|
-
this.updateNoBorderRadius(
|
|
126
|
-
t,
|
|
127
|
-
e,
|
|
128
|
-
r,
|
|
129
|
-
P
|
|
130
|
-
);
|
|
131
|
-
break;
|
|
132
|
-
case "background-color":
|
|
133
|
-
case "background-color--mobile":
|
|
134
|
-
case "background-color--tablet":
|
|
135
|
-
case "background-color--laptop":
|
|
136
|
-
this.updateBackgroundColor(t, r);
|
|
137
|
-
break;
|
|
138
|
-
case "background-gradient":
|
|
139
|
-
case "background-gradient--mobile":
|
|
140
|
-
case "background-gradient--tablet":
|
|
141
|
-
case "background-gradient--laptop":
|
|
142
|
-
this.updateGradient(t, r);
|
|
143
|
-
break;
|
|
144
|
-
case "background-size":
|
|
145
|
-
this.updateAttribute(
|
|
146
|
-
t,
|
|
147
|
-
e,
|
|
148
|
-
r,
|
|
149
|
-
I
|
|
150
|
-
);
|
|
151
|
-
break;
|
|
152
|
-
case "background-image":
|
|
153
|
-
case "background-image--mobile":
|
|
154
|
-
case "background-image--tablet":
|
|
155
|
-
case "background-image--laptop":
|
|
156
|
-
this.updateBackgroundImg(t, r);
|
|
157
|
-
break;
|
|
158
|
-
case "background-position":
|
|
159
|
-
r !== null && r !== "" && (this.$el.style.backgroundPosition = r);
|
|
160
|
-
break;
|
|
161
|
-
case "box-shadow":
|
|
162
|
-
this.updateAttribute(t, e, r, R);
|
|
163
|
-
break;
|
|
164
|
-
default:
|
|
165
|
-
super.attributeChangedCallback(t, e, r);
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
updateBackgroundImg(t, e) {
|
|
170
|
-
this.$el.style.setProperty(`--${t}`, `url("${e}")`);
|
|
171
|
-
}
|
|
172
|
-
updateGradient(t, e) {
|
|
173
|
-
if (this.checkName(F, e)) {
|
|
174
|
-
const r = this.splitAttrNameFromBreakpoint(t);
|
|
175
|
-
t = r.attrName;
|
|
176
|
-
const o = r.breakpoint;
|
|
177
|
-
this.$el.style.setProperty(
|
|
178
|
-
`--${t}${o}`,
|
|
179
|
-
`linear-gradient(var(--px-background-color-container-gradient-${e}))`
|
|
180
|
-
);
|
|
181
|
-
} else
|
|
182
|
-
console.error(
|
|
183
|
-
`${e} is not an allowed background-gradient value for ${this.$el}`
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
updateBackgroundColor(t, e) {
|
|
187
|
-
if (this.checkName(f, e)) {
|
|
188
|
-
const r = this.splitAttrNameFromBreakpoint(t), o = r.breakpoint;
|
|
189
|
-
this.$el.style.setProperty(
|
|
190
|
-
`--${r.attrName}${o}`,
|
|
191
|
-
`var(--px-background-color-${e}-default)`
|
|
192
|
-
), this.$el.style.setProperty(
|
|
193
|
-
`--${r.attrName}-inverted${o}`,
|
|
194
|
-
`var(--px-background-color-${e}-inverted)`
|
|
195
|
-
);
|
|
196
|
-
} else
|
|
197
|
-
console.error(
|
|
198
|
-
`${e} is not an allowed ${t} value for ${this.$el}`
|
|
199
|
-
);
|
|
200
|
-
}
|
|
201
|
-
updateBorderColor(t, e) {
|
|
202
|
-
this.checkName(j, e) ? (this.$el.style.setProperty(
|
|
203
|
-
`--${t}`,
|
|
204
|
-
`var(--px-border-color-${e}-default)`
|
|
205
|
-
), this.$el.style.setProperty(
|
|
206
|
-
`--${t}-inverted`,
|
|
207
|
-
`var(--px-border-color-${e}-inverted)`
|
|
208
|
-
)) : console.error(
|
|
209
|
-
`${e} is not an allowed ${t} value for ${this.$el}`
|
|
210
|
-
);
|
|
211
|
-
}
|
|
212
|
-
updateNoBorderRadius(t, e, r, o) {
|
|
213
|
-
if (!this.checkName(o, r))
|
|
214
|
-
console.error(
|
|
215
|
-
`${r} is not an allowed ${t} value for ${this.$el}`
|
|
216
|
-
);
|
|
217
|
-
else {
|
|
218
|
-
const i = this.splitAttrNameFromBreakpoint(t), b = i.breakpoint;
|
|
219
|
-
e !== null && e !== "" && this.$el.classList.toggle(
|
|
220
|
-
`${i.attrName}-${e}${b}`
|
|
221
|
-
), r !== null && r !== "" && this.$el.classList.toggle(
|
|
222
|
-
`${i.attrName}-${r}${b}`
|
|
223
|
-
);
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
updateAttribute(t, e, r, o) {
|
|
227
|
-
if (!this.checkName(o, r))
|
|
228
|
-
console.error(
|
|
229
|
-
`${r} is not an allowed ${t} value for ${this.$el}`
|
|
230
|
-
);
|
|
231
|
-
else {
|
|
232
|
-
const i = this.splitAttrNameFromBreakpoint(t), b = i.breakpoint;
|
|
233
|
-
e !== null && e !== "" && this.$el.classList.toggle(
|
|
234
|
-
`${i.attrName}-${e}${b}`
|
|
235
|
-
), r !== null && r !== "" && this.$el.classList.toggle(
|
|
236
|
-
`${i.attrName}-${r}${b}`
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
splitAttrNameFromBreakpoint(t) {
|
|
241
|
-
let e = "";
|
|
242
|
-
if (["--mobile", "--tablet", "--laptop"].some(
|
|
243
|
-
(r) => t.includes(r)
|
|
244
|
-
)) {
|
|
245
|
-
const r = t.split("--");
|
|
246
|
-
t = r[0], e = `--${r[1]}`;
|
|
247
|
-
}
|
|
248
|
-
return { attrName: t, breakpoint: e };
|
|
249
|
-
}
|
|
250
|
-
checkName(t, e) {
|
|
251
|
-
return t.includes(e);
|
|
252
|
-
}
|
|
253
|
-
get padding() {
|
|
254
|
-
return this.getAttribute("padding");
|
|
255
|
-
}
|
|
256
|
-
set padding(t) {
|
|
257
|
-
this.setAttribute("padding", t);
|
|
258
|
-
}
|
|
259
|
-
get paddingBlock() {
|
|
260
|
-
return this.getAttribute("padding-block");
|
|
261
|
-
}
|
|
262
|
-
set paddingBlock(t) {
|
|
263
|
-
this.setAttribute("padding-block", t);
|
|
264
|
-
}
|
|
265
|
-
get paddingInline() {
|
|
266
|
-
return this.getAttribute("padding-inline");
|
|
267
|
-
}
|
|
268
|
-
set paddingInline(t) {
|
|
269
|
-
this.setAttribute("padding-inline", t);
|
|
270
|
-
}
|
|
271
|
-
get paddingTop() {
|
|
272
|
-
return this.getAttribute("padding-top");
|
|
273
|
-
}
|
|
274
|
-
set paddingTop(t) {
|
|
275
|
-
this.setAttribute("padding-top", t);
|
|
276
|
-
}
|
|
277
|
-
get paddingRight() {
|
|
278
|
-
return this.getAttribute("padding-right");
|
|
279
|
-
}
|
|
280
|
-
set paddingRight(t) {
|
|
281
|
-
this.setAttribute("padding-right", t);
|
|
282
|
-
}
|
|
283
|
-
get paddingBottom() {
|
|
284
|
-
return this.getAttribute("padding-bottom");
|
|
285
|
-
}
|
|
286
|
-
set paddingBottom(t) {
|
|
287
|
-
this.setAttribute("padding-bottom", t);
|
|
288
|
-
}
|
|
289
|
-
get paddingLeft() {
|
|
290
|
-
return this.getAttribute("padding-left");
|
|
291
|
-
}
|
|
292
|
-
set paddingLeft(t) {
|
|
293
|
-
this.setAttribute("padding-left", t);
|
|
294
|
-
}
|
|
295
|
-
get paddingMobile() {
|
|
296
|
-
return this.getAttribute("padding--mobile");
|
|
297
|
-
}
|
|
298
|
-
set paddingMobile(t) {
|
|
299
|
-
this.setAttribute("padding--mobile", t);
|
|
300
|
-
}
|
|
301
|
-
get paddingBlockMobile() {
|
|
302
|
-
return this.getAttribute("padding-block--mobile");
|
|
303
|
-
}
|
|
304
|
-
set paddingBlockMobile(t) {
|
|
305
|
-
this.setAttribute("padding-block--mobile", t);
|
|
306
|
-
}
|
|
307
|
-
get paddingInlineMobile() {
|
|
308
|
-
return this.getAttribute("padding-inline--mobile");
|
|
309
|
-
}
|
|
310
|
-
set paddingInlineMobile(t) {
|
|
311
|
-
this.setAttribute("padding-inline--mobile", t);
|
|
312
|
-
}
|
|
313
|
-
get paddingTopMobile() {
|
|
314
|
-
return this.getAttribute("padding-top--mobile");
|
|
315
|
-
}
|
|
316
|
-
set paddingTopMobile(t) {
|
|
317
|
-
this.setAttribute("padding-top--mobile", t);
|
|
318
|
-
}
|
|
319
|
-
get paddingRightMobile() {
|
|
320
|
-
return this.getAttribute("padding-right--mobile");
|
|
321
|
-
}
|
|
322
|
-
set paddingRightMobile(t) {
|
|
323
|
-
this.setAttribute("padding-right--mobile", t);
|
|
324
|
-
}
|
|
325
|
-
get paddingBottomMobile() {
|
|
326
|
-
return this.getAttribute("padding-bottom--mobile");
|
|
327
|
-
}
|
|
328
|
-
set paddingBottomMobile(t) {
|
|
329
|
-
this.setAttribute("padding-bottom--mobile", t);
|
|
330
|
-
}
|
|
331
|
-
get paddingLeftMobile() {
|
|
332
|
-
return this.getAttribute("padding-left--mobile");
|
|
333
|
-
}
|
|
334
|
-
set paddingLeftMobile(t) {
|
|
335
|
-
this.setAttribute("padding-left--mobile", t);
|
|
336
|
-
}
|
|
337
|
-
get paddingTablet() {
|
|
338
|
-
return this.getAttribute("padding--tablet");
|
|
339
|
-
}
|
|
340
|
-
set paddingTablet(t) {
|
|
341
|
-
this.setAttribute("padding--tablet", t);
|
|
342
|
-
}
|
|
343
|
-
get paddingBlockTablet() {
|
|
344
|
-
return this.getAttribute("padding-block--tablet");
|
|
345
|
-
}
|
|
346
|
-
set paddingBlockTablet(t) {
|
|
347
|
-
this.setAttribute("padding-block--tablet", t);
|
|
348
|
-
}
|
|
349
|
-
get paddingInlineTablet() {
|
|
350
|
-
return this.getAttribute("padding-inline--tablet");
|
|
351
|
-
}
|
|
352
|
-
set paddingInlineTablet(t) {
|
|
353
|
-
this.setAttribute("padding-inline--tablet", t);
|
|
354
|
-
}
|
|
355
|
-
get paddingTopTablet() {
|
|
356
|
-
return this.getAttribute("padding-top--tablet");
|
|
357
|
-
}
|
|
358
|
-
set paddingTopTablet(t) {
|
|
359
|
-
this.setAttribute("padding-top--tablet", t);
|
|
360
|
-
}
|
|
361
|
-
get paddingRightTablet() {
|
|
362
|
-
return this.getAttribute("padding-right--tablet");
|
|
363
|
-
}
|
|
364
|
-
set paddingRightTablet(t) {
|
|
365
|
-
this.setAttribute("padding-right--tablet", t);
|
|
366
|
-
}
|
|
367
|
-
get paddingBottomTablet() {
|
|
368
|
-
return this.getAttribute("padding-bottom--tablet");
|
|
369
|
-
}
|
|
370
|
-
set paddingBottomTablet(t) {
|
|
371
|
-
this.setAttribute("padding-bottom--tablet", t);
|
|
372
|
-
}
|
|
373
|
-
get paddingLeftTablet() {
|
|
374
|
-
return this.getAttribute("padding-left--tablet");
|
|
375
|
-
}
|
|
376
|
-
set paddingLeftTablet(t) {
|
|
377
|
-
this.setAttribute("padding-left--tablet", t);
|
|
378
|
-
}
|
|
379
|
-
get paddingLaptop() {
|
|
380
|
-
return this.getAttribute("padding--laptop");
|
|
381
|
-
}
|
|
382
|
-
set paddingLaptop(t) {
|
|
383
|
-
this.setAttribute("padding--laptop", t);
|
|
384
|
-
}
|
|
385
|
-
get paddingBlockLaptop() {
|
|
386
|
-
return this.getAttribute("padding-block--laptop");
|
|
387
|
-
}
|
|
388
|
-
set paddingBlockLaptop(t) {
|
|
389
|
-
this.setAttribute("padding-block--laptop", t);
|
|
390
|
-
}
|
|
391
|
-
get paddingInlineLaptop() {
|
|
392
|
-
return this.getAttribute("padding-inline--laptop");
|
|
393
|
-
}
|
|
394
|
-
set paddingInlineLaptop(t) {
|
|
395
|
-
this.setAttribute("padding-inline--laptop", t);
|
|
396
|
-
}
|
|
397
|
-
get paddingTopLaptop() {
|
|
398
|
-
return this.getAttribute("padding-top--laptop");
|
|
399
|
-
}
|
|
400
|
-
set paddingTopLaptop(t) {
|
|
401
|
-
this.setAttribute("padding-top--laptop", t);
|
|
402
|
-
}
|
|
403
|
-
get paddingRightLaptop() {
|
|
404
|
-
return this.getAttribute("padding-right--laptop");
|
|
405
|
-
}
|
|
406
|
-
set paddingRightLaptop(t) {
|
|
407
|
-
this.setAttribute("padding-right--laptop", t);
|
|
408
|
-
}
|
|
409
|
-
get paddingBottomLaptop() {
|
|
410
|
-
return this.getAttribute("padding-bottom--laptop");
|
|
411
|
-
}
|
|
412
|
-
set paddingBottomLaptop(t) {
|
|
413
|
-
this.setAttribute("padding-bottom--laptop", t);
|
|
414
|
-
}
|
|
415
|
-
get paddingLeftLaptop() {
|
|
416
|
-
return this.getAttribute("padding-left--laptop");
|
|
417
|
-
}
|
|
418
|
-
set paddingLeftLaptop(t) {
|
|
419
|
-
this.setAttribute("padding-left--laptop", t);
|
|
420
|
-
}
|
|
421
|
-
get border() {
|
|
422
|
-
return this.getAttribute("border");
|
|
423
|
-
}
|
|
424
|
-
set border(t) {
|
|
425
|
-
this.setAttribute("border", t);
|
|
426
|
-
}
|
|
427
|
-
get borderColor() {
|
|
428
|
-
return this.getAttribute("border-color");
|
|
429
|
-
}
|
|
430
|
-
set borderColor(t) {
|
|
431
|
-
this.setAttribute("border-color", t);
|
|
432
|
-
}
|
|
433
|
-
get borderSide() {
|
|
434
|
-
return this.getAttribute("border-side");
|
|
435
|
-
}
|
|
436
|
-
set borderSide(t) {
|
|
437
|
-
this.setAttribute("border-side", t);
|
|
438
|
-
}
|
|
439
|
-
get borderSideMobile() {
|
|
440
|
-
return this.getAttribute("border-side--mobile");
|
|
441
|
-
}
|
|
442
|
-
set borderSideMobile(t) {
|
|
443
|
-
this.setAttribute("border-side--mobile", t);
|
|
444
|
-
}
|
|
445
|
-
get borderSideTablet() {
|
|
446
|
-
return this.getAttribute("border-side--tablet");
|
|
447
|
-
}
|
|
448
|
-
set borderSideTablet(t) {
|
|
449
|
-
this.setAttribute("border-side--tablet", t);
|
|
450
|
-
}
|
|
451
|
-
get borderSideLaptop() {
|
|
452
|
-
return this.getAttribute("border-side--laptop");
|
|
453
|
-
}
|
|
454
|
-
set borderSideLaptop(t) {
|
|
455
|
-
this.setAttribute("border-side--laptop", t);
|
|
456
|
-
}
|
|
457
|
-
get borderRadius() {
|
|
458
|
-
return this.getAttribute("border-radius");
|
|
459
|
-
}
|
|
460
|
-
set borderRadius(t) {
|
|
461
|
-
this.setAttribute("border-radius", t);
|
|
462
|
-
}
|
|
463
|
-
get noBorderRadius() {
|
|
464
|
-
return this.getAttribute("no-border-radius");
|
|
465
|
-
}
|
|
466
|
-
set noBorderRadius(t) {
|
|
467
|
-
this.setAttribute("no-border-radius", t);
|
|
468
|
-
}
|
|
469
|
-
get noBorderRadiusMobile() {
|
|
470
|
-
return this.getAttribute("no-border-radius--mobile");
|
|
471
|
-
}
|
|
472
|
-
set noBorderRadiusMobile(t) {
|
|
473
|
-
this.setAttribute("no-border-radius--mobile", t);
|
|
474
|
-
}
|
|
475
|
-
get noBorderRadiusTablet() {
|
|
476
|
-
return this.getAttribute("no-border-radius--tablet");
|
|
477
|
-
}
|
|
478
|
-
set noBorderRadiusTablet(t) {
|
|
479
|
-
this.setAttribute("no-border-radius--tablet", t);
|
|
480
|
-
}
|
|
481
|
-
get noBorderRadiusLaptop() {
|
|
482
|
-
return this.getAttribute("no-border-radius--laptop");
|
|
483
|
-
}
|
|
484
|
-
set noBorderRadiusLaptop(t) {
|
|
485
|
-
this.setAttribute("no-border-radius--laptop", t);
|
|
486
|
-
}
|
|
487
|
-
get backgroundColor() {
|
|
488
|
-
return this.getAttribute("background-color");
|
|
489
|
-
}
|
|
490
|
-
set backgroundColor(t) {
|
|
491
|
-
this.setAttribute("background-color", t);
|
|
492
|
-
}
|
|
493
|
-
get backgroundColorMobile() {
|
|
494
|
-
return this.getAttribute("background-color--mobile");
|
|
495
|
-
}
|
|
496
|
-
set backgroundColorMobile(t) {
|
|
497
|
-
this.setAttribute("background-color--mobile", t);
|
|
498
|
-
}
|
|
499
|
-
get backgroundColorTablet() {
|
|
500
|
-
return this.getAttribute("background-color--tablet");
|
|
501
|
-
}
|
|
502
|
-
set backgroundColorTablet(t) {
|
|
503
|
-
this.setAttribute("background-color--tablet", t);
|
|
504
|
-
}
|
|
505
|
-
get backgroundColorLaptop() {
|
|
506
|
-
return this.getAttribute("background-color--laptop");
|
|
507
|
-
}
|
|
508
|
-
set backgroundColorLaptop(t) {
|
|
509
|
-
this.setAttribute("background-color--laptop", t);
|
|
510
|
-
}
|
|
511
|
-
get gradient() {
|
|
512
|
-
return this.getAttribute("background-gradient");
|
|
513
|
-
}
|
|
514
|
-
set gradient(t) {
|
|
515
|
-
this.setAttribute("background-gradient", t);
|
|
516
|
-
}
|
|
517
|
-
get gradientMobile() {
|
|
518
|
-
return this.getAttribute("background-gradient--mobile");
|
|
519
|
-
}
|
|
520
|
-
set gradientMobile(t) {
|
|
521
|
-
this.setAttribute("background-gradient--mobile", t);
|
|
522
|
-
}
|
|
523
|
-
get gradientTablet() {
|
|
524
|
-
return this.getAttribute("background-gradient--tablet");
|
|
525
|
-
}
|
|
526
|
-
set gradientTablet(t) {
|
|
527
|
-
this.setAttribute("background-gradient--tablet", t);
|
|
528
|
-
}
|
|
529
|
-
get gradientLaptop() {
|
|
530
|
-
return this.getAttribute("background-gradient--laptop");
|
|
531
|
-
}
|
|
532
|
-
set gradientLaptop(t) {
|
|
533
|
-
this.setAttribute("background-gradient--laptop", t);
|
|
534
|
-
}
|
|
535
|
-
get backgroundImage() {
|
|
536
|
-
return this.getAttribute("background-image");
|
|
537
|
-
}
|
|
538
|
-
set backgroundImage(t) {
|
|
539
|
-
this.setAttribute("background-image", t);
|
|
540
|
-
}
|
|
541
|
-
get backgroundImageMobile() {
|
|
542
|
-
return this.getAttribute("background-image--mobile");
|
|
543
|
-
}
|
|
544
|
-
set backgroundImageMobile(t) {
|
|
545
|
-
this.setAttribute("background-image--mobile", t);
|
|
546
|
-
}
|
|
547
|
-
get backgroundImageTablet() {
|
|
548
|
-
return this.getAttribute("background-image--tablet");
|
|
549
|
-
}
|
|
550
|
-
set backgroundImageTablet(t) {
|
|
551
|
-
this.setAttribute("background-image--tablet", t);
|
|
552
|
-
}
|
|
553
|
-
get backgroundImageLaptop() {
|
|
554
|
-
return this.getAttribute("background-image--laptop");
|
|
555
|
-
}
|
|
556
|
-
set backgroundImageLaptop(t) {
|
|
557
|
-
this.setAttribute("background-image--laptop", t);
|
|
558
|
-
}
|
|
559
|
-
get backgroundSize() {
|
|
560
|
-
return this.getAttribute("background-size");
|
|
561
|
-
}
|
|
562
|
-
set backgroundSize(t) {
|
|
563
|
-
this.setAttribute("background-size", t);
|
|
564
|
-
}
|
|
565
|
-
get backgroundPosition() {
|
|
566
|
-
return this.getAttribute("background-position");
|
|
567
|
-
}
|
|
568
|
-
set backgroundPosition(t) {
|
|
569
|
-
this.setAttribute("background-position", t);
|
|
570
|
-
}
|
|
571
|
-
get boxShadow() {
|
|
572
|
-
return this.getAttribute("box-shadow");
|
|
573
|
-
}
|
|
574
|
-
set boxShadow(t) {
|
|
575
|
-
this.setAttribute("box-shadow", t);
|
|
576
|
-
}
|
|
577
|
-
get inverted() {
|
|
578
|
-
return this.getAttribute("inverted");
|
|
579
|
-
}
|
|
580
|
-
set inverted(t) {
|
|
581
|
-
this.setAttribute("inverted", t);
|
|
582
|
-
}
|
|
583
|
-
};
|
|
584
|
-
h.nativeName = "div";
|
|
585
|
-
let c = h;
|
|
586
|
-
customElements.define("px-container", c);
|
|
587
|
-
const y = '.btn{width:var(--button-extended--mobile, var(--button-extended, auto));display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-m);font-weight:700;gap:var(--px-spacing-after-element-2xs-mobile);cursor:pointer;text-decoration:none;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border:var(--px-border-size-m) solid transparent}.btn,.btn *{box-sizing:border-box}.btn ::slotted(px-icon){line-height:0}.btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-border-color-action-hover-default)}.btn:focus:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-border-color-focus-outline-default)}.btn:active{transform:scale(.95)}.btn[disabled],.btn[aria-disabled=true]{cursor:default;pointer-events:none}.btn.loading{cursor:inherit}.btn.loading ::slotted(px-spinner){line-height:0}.btn:not(.secondary,.tertiary,.patch,.actionable-tag){color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-primary-default);min-height:var(--px-action-size-l);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag)[disabled],.btn:not(.secondary,.tertiary,.patch,.actionable-tag)[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag).loading{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-heading-brand-default);border-color:transparent}.btn:not(.secondary,.tertiary,.patch,.actionable-tag).alternative{border-radius:var(--px-radius-button-small)}.btn.secondary{color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-secondary-default);min-height:var(--px-action-size-l);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn.secondary[disabled],.btn.secondary[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}.btn.secondary.loading{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-heading-brand-default);border-color:transparent}.btn.secondary.alternative{border-radius:var(--px-radius-button-small)}.btn.tertiary{background:none;color:var(--px-text-color-heading-brand-default);border-radius:var(--px-radius-pill);border:var(--px-border-size-m) solid transparent;padding:var(--px-padding-2xs-mobile) 0;gap:var(--px-spacing-after-element-xs-mobile)}.btn.tertiary ::slotted(px-icon){display:flex;align-items:center;justify-content:center;width:var(--px-icon-size-xs-mobile);height:var(--px-icon-size-xs-mobile);padding:4px;border-radius:var(--px-radius-pill);background:var(--px-background-color-action-secondary-default);transition:var(--btn-transition)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-mobile) var(--px-padding-s-mobile)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent;margin:0 -8px;width:inherit;height:inherit}.btn.tertiary[disabled],.btn.tertiary[aria-disabled=true]{color:var(--px-text-color-action-disabled-default)}.btn.tertiary[disabled] ::slotted(px-icon),.btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-background-color-action-disabled-default)}.btn.tertiary.loading{color:var(--px-text-color-heading-brand-default);border-color:transparent}.btn.tertiary.loading ::slotted(px-spinner){display:flex;align-items:center;justify-content:center;width:var(--px-icon-size-xs-mobile);height:var(--px-icon-size-xs-mobile);padding:4px;border-radius:var(--px-radius-pill);background:var(--px-background-color-action-disabled-default)}.btn.patch{display:inline-flex}.btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn.patch[disabled],.btn.patch[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}.btn.actionable-tag{background:var(--px-background-color-action-neutral-inverted);color:var(--px-text-color-action-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);gap:var(--px-spacing-after-element-xs-mobile);border-radius:var(--px-radius-pill);border:var(--px-border-size-m) solid var(--px-border-color-action-neutral-default)}.btn.actionable-tag:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-action-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn.actionable-tag:active:not([disabled],[aria-disabled=true],.loading){background:var(--px-background-color-action-active-default);color:var(--px-text-color-action-active-inverted);border-color:var(--px-border-color-none)}.btn.actionable-tag[disabled],.btn.actionable-tag[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default);border-color:var(--px-border-color-none)}button.link{background:none;border:none;text-decoration:underline;padding:0;cursor:pointer}button.link[disabled],button.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-text-color-action-disabled-default)}:host([inverted]) .btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-border-color-action-hover-inverted)}:host([inverted]) .btn:focus:not([disabled],[aria-disabled=true]){outline-color:var(--px-border-color-focus-outline-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-primary-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-neutral-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag)[disabled],:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag)[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch,.actionable-tag).loading{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-heading-brand-inverted);border-color:transparent}:host([inverted]) .btn.secondary{color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-secondary-inverted)}:host([inverted]) .btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-neutral-inverted)}:host([inverted]) .btn.secondary[disabled],:host([inverted]) .btn.secondary[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn.secondary.loading{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-heading-brand-inverted);border-color:transparent}:host([inverted]) .btn.tertiary{color:var(--px-text-color-heading-brand-inverted)}:host([inverted]) .btn.tertiary ::slotted(px-icon){background:var(--px-background-color-action-secondary-inverted)}:host([inverted]) .btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent}:host([inverted]) .btn.tertiary[disabled],:host([inverted]) .btn.tertiary[aria-disabled=true]{color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn.tertiary[disabled] ::slotted(px-icon),:host([inverted]) .btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-background-color-action-disabled-inverted)}:host([inverted]) .btn.tertiary.loading{color:var(--px-text-color-heading-brand-inverted)}:host([inverted]) .btn.tertiary.loading ::slotted(px-spinner){background:var(--px-background-color-action-disabled-inverted)}:host([inverted]) .btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-inverted);background:var( --px-background-color-action-hover-bordered-default-inverted )}:host([inverted]) .btn.patch[disabled],:host([inverted]) .btn.patch[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn.actionable-tag{background:var(--px-background-color-action-neutral-default);color:var(--px-text-color-action-brand-inverted);border-color:var(--px-border-color-action-neutral-inverted)}:host([inverted]) .btn.actionable-tag:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-action-brand-inverted);background:var(--px-background-color-action-neutral-inverted);border-color:var(--px-border-color-action-hover-inverted)}:host([inverted]) .btn.actionable-tag:active:not([disabled],[aria-disabled=true],.loading){background:var(--px-background-color-action-active-inverted);color:var(--px-text-color-action-active-default);border-color:var(--px-border-color-none)}:host([inverted]) .btn.actionable-tag[disabled],:host([inverted]) .btn.actionable-tag[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted);border-color:var(--px-border-color-none)}:host([inverted]) button.link[disabled],:host([inverted]) button.link[aria-disabled=true]{color:var(--px-text-color-action-disabled-inverted)}@media only screen and (min-width: 768px){.btn{width:var(--button-extended--tablet, var(--button-extended, auto));font-size:var(--px-text-size-label-m-tablet);gap:var(--px-spacing-after-element-2xs-tablet)}.btn:focus:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}.btn.actionable-tag{padding:var(--px-padding-2xs-tablet) var(--px-padding-xs-tablet);gap:var(--px-spacing-after-element-xs-tablet)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag){padding:var(--px-padding-xs-tablet) var(--px-padding-m-tablet)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-tablet) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-tablet) * -1)}.btn.secondary{padding:var(--px-padding-xs-tablet) var(--px-padding-m-tablet)}.btn.tertiary{padding:var(--px-padding-2xs-tablet) 0;gap:var(--px-spacing-after-element-xs-tablet)}.btn.tertiary ::slotted(px-icon){width:var(--px-icon-size-xs-tablet);height:var(--px-icon-size-xs-tablet)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-tablet) var(--px-padding-s-tablet)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-icon-size-xs-tablet);height:var(--px-icon-size-xs-tablet)}}@media only screen and (min-width: 1025px){.btn{width:var(--button-extended--laptop, var(--button-extended, auto));font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-after-element-2xs-desktop)}.btn:focus:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn.actionable-tag{padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop);gap:var(--px-spacing-after-element-xs-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag){padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-desktop) * -1)}.btn:not(.secondary,.tertiary,.patch,.actionable-tag) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-desktop) * -1)}.btn.secondary{padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn.tertiary{padding:var(--px-padding-2xs-desktop) 0;gap:var(--px-spacing-after-element-xs-desktop)}.btn.tertiary ::slotted(px-icon){width:var(--px-icon-size-xs-desktop);height:var(--px-icon-size-xs-desktop)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-desktop) var(--px-padding-s-desktop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-icon-size-xs-desktop);height:var(--px-icon-size-xs-desktop)}}@keyframes anim-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}', A = 'a,.link,::slotted(a){display:inline-flex;align-items:center;font-family:var(--px-font-family);font-size:var(--px-text-size-link-m-mobile);line-height:var(--px-line-height-m);font-weight:400;color:var(--px-text-color-heading-neutral-default)}a:hover,.link:hover{color:var(--px-text-color-action-hover-default)}a:focus,.link:focus{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-border-color-focus-outline-default)}a[aria-disabled=true],.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-text-color-action-disabled-default)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-after-element-2xs-mobile)}a ::slotted(span[slot="after"]),a ::slotted(span[slot="before"]),.link ::slotted(span[slot="after"]),.link ::slotted(span[slot="before"]){display:inline-block}::slotted(a:hover){color:var(--px-text-color-action-hover-default)}a.no-style{text-decoration:none}a.no-style:hover,a.no-style:focus{color:inherit}a.skip-link{position:absolute;left:-10000px;top:auto;overflow:hidden;background-color:var(--px-background-color-container-weak);padding:var(--px-padding-xs-mobile)}a.skip-link:focus{left:auto;z-index:999}a.icon-link{color:var(--px-icon-color-content-brand-default)}:host([inverted]) a,:host([inverted]) .link,:host([inverted]) ::slotted(a){color:var(--px-text-color-heading-neutral-inverted)}:host([inverted]) a:hover,:host([inverted]) .link:hover{color:var(--px-text-color-action-hover-inverted)}:host([inverted]) a:focus,:host([inverted]) .link:focus{outline-color:var(--px-border-color-focus-outline-inverted)}:host([inverted]) a[aria-disabled=true],:host([inverted]) .link[aria-disabled=true]{color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) ::slotted(a:hover){color:var(--px-text-color-action-hover-inverted)}:host([inverted]) a.skip-link{background-color:var(--px-background-color-container-weak-inverted)}:host([inverted]) a.icon-link{color:var(--px-icon-color-content-brand-inverted)}@media only screen and (min-width: 768px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-tablet)}a:focus,.link:focus{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-after-element-2xs-tablet)}a.skip-link{padding:var(--px-padding-xs-tablet)}}@media only screen and (min-width: 1025px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-desktop)}a:focus,.link:focus{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-after-element-2xs-desktop)}a.skip-link{padding:var(--px-padding-xs-desktop)}}', K = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s-mobile);height:1.625em;border:var(--px-border-size-m) solid transparent;border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small);font-family:var(--px-font-family);font-weight:700;font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-m);text-align:center;background-color:var(--px-background-color-purpose-promo-default);color:var(--px-text-color-action-neutral-inverted)}.patch,.patch *{box-sizing:border-box}.bottom-right{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small) var(--px-radius-patch-big)}.bottom-left{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small)}.info{background-color:var(--px-background-color-purpose-info-default);color:var(--px-text-color-action-neutral-default)}.black-friday{background-color:var(--px-background-color-container-neutral-rich-default);color:var(--px-text-color-action-neutral-inverted)}.eco{background-color:var(--px-background-color-purpose-success-default);color:var(--px-text-color-action-neutral-inverted)}.greyed{background-color:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}:host([inverted]) .patch{background-color:var(--px-background-color-purpose-promo-inverted);color:var(--px-text-color-action-neutral-inverted)}:host([inverted]) .info{background-color:var(--px-background-color-purpose-info-inverted);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .black-friday{background-color:var(--px-background-color-container-neutral-bare-default);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .eco{background-color:var(--px-background-color-purpose-success-inverted);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .greyed{background-color:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}@media only screen and (min-width: 768px){.patch{padding:0 var(--px-padding-s-tablet);font-size:var(--px-text-size-label-m-tablet)}}@media only screen and (min-width: 1025px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1441px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}", Q = ":host{display:inline-block}.tag{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-m);font-weight:400;gap:var(--px-spacing-after-element-xs-mobile);background-color:var(--px-background-color-action-neutral-default);color:var(--px-text-color-action-neutral-default);padding:var(--px-padding-2xs-mobile) var(--px-padding-xs-mobile);border:var(--px-border-size-s) solid transparent;border-radius:var(--px-radius-main)}.tag,.tag *{box-sizing:border-box}:host([inverted]) .tag{background-color:var(--px-background-color-action-neutral-inverted);color:var(--px-text-color-action-neutral-inverted)}@media only screen and (min-width: 768px){.tag{font-size:var(--px-text-size-label-m-tablet);gap:var(--px-spacing-after-element-xs-tablet);padding:var(--px-padding-2xs-tablet) var(--px-padding-xs-tablet)}}@media only screen and (min-width: 1025px){.tag{font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-after-element-xs-desktop);padding:var(--px-padding-2xs-desktop) var(--px-padding-xs-desktop)}}", z = new CSSStyleSheet(), $ = new CSSStyleSheet(), S = new CSSStyleSheet(), L = new CSSStyleSheet();
|
|
588
|
-
z.replaceSync(y);
|
|
589
|
-
$.replaceSync(A);
|
|
590
|
-
S.replaceSync(K);
|
|
591
|
-
L.replaceSync(Q);
|
|
592
|
-
const U = [
|
|
593
|
-
"",
|
|
594
|
-
"default",
|
|
595
|
-
"secondary",
|
|
596
|
-
"tertiary",
|
|
597
|
-
"link",
|
|
598
|
-
"patch",
|
|
599
|
-
"patch-info",
|
|
600
|
-
"patch-black-friday",
|
|
601
|
-
"patch-eco",
|
|
602
|
-
"actionable-tag"
|
|
603
|
-
], X = [
|
|
604
|
-
"extended",
|
|
605
|
-
"extended--mobile",
|
|
606
|
-
"extended--tablet",
|
|
607
|
-
"extended--laptop"
|
|
608
|
-
], x = class x extends u {
|
|
609
|
-
constructor() {
|
|
610
|
-
super(z, $, S, L), this.template = () => `<button class="btn">
|
|
611
|
-
<slot name="before"></slot><slot></slot><slot name="after"></slot>
|
|
612
|
-
</button>`, this.shadowRoot.innerHTML = this.template();
|
|
613
|
-
}
|
|
614
|
-
static get observedAttributes() {
|
|
615
|
-
return [
|
|
616
|
-
...super.observedAttributes,
|
|
617
|
-
"variant",
|
|
618
|
-
"state",
|
|
619
|
-
"loading",
|
|
620
|
-
"shape",
|
|
621
|
-
"inverted",
|
|
622
|
-
...X
|
|
623
|
-
];
|
|
624
|
-
}
|
|
625
|
-
connectedCallback() {
|
|
626
|
-
super.connectedCallback();
|
|
627
|
-
const t = this.querySelectorAll("px-icon");
|
|
628
|
-
t && t.forEach((e) => {
|
|
629
|
-
const r = e.getAttribute("size"), o = e.getAttribute("color");
|
|
630
|
-
e && (e.addEventListener("click", () => {
|
|
631
|
-
this.$el.focus();
|
|
632
|
-
}), r || e.setAttribute("size", "xs"), o || e.setAttribute("color", "inherit"));
|
|
633
|
-
}), N(this, this.$el), this.$el.type === "submit" && this.addEventListener("click", (e) => {
|
|
634
|
-
var r;
|
|
635
|
-
e.preventDefault(), (r = this.closest("form")) == null || r.submit();
|
|
636
|
-
}), this.$el.type === "reset" && this.addEventListener("click", (e) => {
|
|
637
|
-
var r;
|
|
638
|
-
e.preventDefault(), (r = this.closest("form")) == null || r.reset();
|
|
639
|
-
});
|
|
640
|
-
}
|
|
641
|
-
attributeChangedCallback(t, e, r) {
|
|
642
|
-
if (e !== r)
|
|
643
|
-
switch (t) {
|
|
644
|
-
case "variant":
|
|
645
|
-
this.updateVariant(e, r, U);
|
|
646
|
-
break;
|
|
647
|
-
case "state":
|
|
648
|
-
this.updateState(e, r);
|
|
649
|
-
break;
|
|
650
|
-
case "extended":
|
|
651
|
-
case "extended--mobile":
|
|
652
|
-
case "extended--tablet":
|
|
653
|
-
case "extended--laptop":
|
|
654
|
-
this.updateExtended(t, r);
|
|
655
|
-
break;
|
|
656
|
-
case "loading":
|
|
657
|
-
this.updateLoading();
|
|
658
|
-
break;
|
|
659
|
-
case "shape":
|
|
660
|
-
this.updateShape(e, r);
|
|
661
|
-
break;
|
|
662
|
-
default:
|
|
663
|
-
super.attributeChangedCallback(t, e, r);
|
|
664
|
-
break;
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
checkName(t, e) {
|
|
668
|
-
return !!t.includes(e);
|
|
669
|
-
}
|
|
670
|
-
checkClass(t) {
|
|
671
|
-
if (t.startsWith("patch-")) {
|
|
672
|
-
const e = t.split(/-(.*)/s);
|
|
673
|
-
for (const r of e)
|
|
674
|
-
r != "" && this.$el.classList.toggle(r);
|
|
675
|
-
} else
|
|
676
|
-
this.$el.classList.toggle(t);
|
|
677
|
-
}
|
|
678
|
-
_toggleClass(t, e) {
|
|
679
|
-
t !== null && t !== "" && t !== "default" && this.checkClass(t), e !== null && e !== "" && e !== "default" && this.checkClass(e);
|
|
680
|
-
}
|
|
681
|
-
updateVariant(t, e, r) {
|
|
682
|
-
e === "link" ? this.$el.classList.remove("btn") : this.$el.classList.add("btn"), this._toggleClass(t, e), this.checkName(r, e) || console.error(`Bad "variant" value for ${this.$el}`);
|
|
683
|
-
}
|
|
684
|
-
updateState(t, e) {
|
|
685
|
-
const r = ["", "default", "success", "error"];
|
|
686
|
-
this._toggleClass(t, e), this.checkName(r, e) || console.error(`Bad "sate" value for ${this.$el}`);
|
|
687
|
-
}
|
|
688
|
-
updateExtended(t, e) {
|
|
689
|
-
e === null ? this.$el.style.setProperty(`--button-${t}`, "") : this.$el.style.setProperty(`--button-${t}`, "100%");
|
|
690
|
-
}
|
|
691
|
-
updateLoading() {
|
|
692
|
-
const t = this.querySelector("px-spinner");
|
|
693
|
-
t && (t.getAttribute("size") || t.setAttribute("size", "xs")), this.$el.classList.toggle("loading");
|
|
694
|
-
}
|
|
695
|
-
updateShape(t, e) {
|
|
696
|
-
const r = [
|
|
697
|
-
"",
|
|
698
|
-
"default",
|
|
699
|
-
"bottom-right",
|
|
700
|
-
"bottom-left",
|
|
701
|
-
"alternative"
|
|
702
|
-
];
|
|
703
|
-
this._toggleClass(t, e), this.checkName(r, e) || console.error(`Bad "shape" value for ${this.$el}`);
|
|
704
|
-
}
|
|
705
|
-
get variant() {
|
|
706
|
-
return this.getAttribute("variant");
|
|
707
|
-
}
|
|
708
|
-
set variant(t) {
|
|
709
|
-
this.setAttribute("variant", t);
|
|
710
|
-
}
|
|
711
|
-
get state() {
|
|
712
|
-
return this.getAttribute("state");
|
|
713
|
-
}
|
|
714
|
-
set state(t) {
|
|
715
|
-
this.setAttribute("state", t);
|
|
716
|
-
}
|
|
717
|
-
get extended() {
|
|
718
|
-
return this.getAttribute("extended");
|
|
719
|
-
}
|
|
720
|
-
set extended(t) {
|
|
721
|
-
this.setAttribute("extended", t);
|
|
722
|
-
}
|
|
723
|
-
get extendedMobile() {
|
|
724
|
-
return this.getAttribute("extended--mobile");
|
|
725
|
-
}
|
|
726
|
-
set extendedMobile(t) {
|
|
727
|
-
this.setAttribute("extended--mobile", t);
|
|
728
|
-
}
|
|
729
|
-
get extendedTablet() {
|
|
730
|
-
return this.getAttribute("extended--tablet");
|
|
731
|
-
}
|
|
732
|
-
set extendedTablet(t) {
|
|
733
|
-
this.setAttribute("extended--tablet", t);
|
|
734
|
-
}
|
|
735
|
-
get extendedLaptop() {
|
|
736
|
-
return this.getAttribute("extended--laptop");
|
|
737
|
-
}
|
|
738
|
-
set extendedLaptop(t) {
|
|
739
|
-
this.setAttribute("extended--laptop", t);
|
|
740
|
-
}
|
|
741
|
-
get loading() {
|
|
742
|
-
return this.getAttribute("loading");
|
|
743
|
-
}
|
|
744
|
-
set loading(t) {
|
|
745
|
-
this.setAttribute("loading", t);
|
|
746
|
-
}
|
|
747
|
-
get shape() {
|
|
748
|
-
return this.getAttribute("shape");
|
|
749
|
-
}
|
|
750
|
-
set shape(t) {
|
|
751
|
-
this.setAttribute("shape", t);
|
|
752
|
-
}
|
|
753
|
-
get inverted() {
|
|
754
|
-
return this.getAttribute("inverted");
|
|
755
|
-
}
|
|
756
|
-
set inverted(t) {
|
|
757
|
-
this.setAttribute("inverted", t);
|
|
758
|
-
}
|
|
759
|
-
};
|
|
760
|
-
x.nativeName = "button";
|
|
761
|
-
let p = x;
|
|
762
|
-
customElements.get("px-button") || customElements.define("px-button", p);
|
|
763
|
-
const Z = ':host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:1200px}@media only screen and (min-width: 1232px){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-spacing-inside-section-overlapped-mobile) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-spacing-inside-section-overlapped-mobile)}@media only screen and (min-width: 768px){.overlapped{margin-bottom:calc(var(--px-spacing-inside-section-overlapped-tablet) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-spacing-inside-section-overlapped-tablet)}}@media only screen and (min-width: 1025px){.overlapped{margin-bottom:calc(var(--px-spacing-inside-section-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-spacing-inside-section-overlapped-desktop)}}', T = new CSSStyleSheet();
|
|
764
|
-
T.replaceSync(Z);
|
|
765
|
-
class D extends HTMLElement {
|
|
766
|
-
constructor() {
|
|
767
|
-
super(), this.template = () => `
|
|
768
|
-
<px-container border-radius="none" padding-inline="none" background-color="${this.backgroundColor}">
|
|
769
|
-
<div class="content-wrapper ${this.$slotOverlap ? "overlapped" : ""}">
|
|
770
|
-
<px-vstack gap="heading-to-content">
|
|
771
|
-
<slot name="heading"></slot>
|
|
772
|
-
<px-vstack gap="after-element-none">
|
|
773
|
-
<slot></slot>
|
|
774
|
-
</px-vstack>
|
|
775
|
-
</px-vstack>
|
|
776
|
-
</div>
|
|
777
|
-
</px-container>
|
|
778
|
-
<div class="content-wrapper">
|
|
779
|
-
<slot name="overlap"></slot>
|
|
780
|
-
</div>
|
|
781
|
-
`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [T];
|
|
782
|
-
}
|
|
783
|
-
connectedCallback() {
|
|
784
|
-
const t = this.querySelector('[slot="heading"]');
|
|
785
|
-
!this.paddingBlock && !this.paddingTop && !this.paddingBottom && !this.paddingBlockMobile && !this.paddingTopMobile && !this.paddingBottomMobile && !this.paddingBlockTablet && !this.paddingTopTablet && !this.paddingBottomTablet && !this.paddingBlockLaptop && !this.paddingTopLaptop && !this.paddingBottomLaptop && (this.$container.paddingBlock = "none"), t || this.shadowRoot.querySelector("px-vstack").setAttribute("gap", "after-element-none");
|
|
786
|
-
}
|
|
787
|
-
static get observedAttributes() {
|
|
788
|
-
return [
|
|
789
|
-
"background-color",
|
|
790
|
-
"background-gradient",
|
|
791
|
-
"background-image",
|
|
792
|
-
"background-image--mobile",
|
|
793
|
-
"background-image--tablet",
|
|
794
|
-
"background-image--laptop",
|
|
795
|
-
"background-size",
|
|
796
|
-
"background-position",
|
|
797
|
-
"padding-block",
|
|
798
|
-
"padding-top",
|
|
799
|
-
"padding-bottom",
|
|
800
|
-
"padding-block--mobile",
|
|
801
|
-
"padding-top--mobile",
|
|
802
|
-
"padding-bottom--mobile",
|
|
803
|
-
"padding-block--tablet",
|
|
804
|
-
"padding-top--tablet",
|
|
805
|
-
"padding-bottom--tablet",
|
|
806
|
-
"padding-block--laptop",
|
|
807
|
-
"padding-top--laptop",
|
|
808
|
-
"padding-bottom--laptop",
|
|
809
|
-
"border",
|
|
810
|
-
"border-side",
|
|
811
|
-
"border-side--mobile",
|
|
812
|
-
"border-side--tablet",
|
|
813
|
-
"border-side--laptop"
|
|
814
|
-
];
|
|
815
|
-
}
|
|
816
|
-
get $container() {
|
|
817
|
-
return this.shadowRoot.querySelector("px-container");
|
|
818
|
-
}
|
|
819
|
-
attributeChangedCallback(t, e, r) {
|
|
820
|
-
if (e !== r)
|
|
821
|
-
switch (t) {
|
|
822
|
-
case "background-color":
|
|
823
|
-
this.$container.backgroundColor = f.indexOf(r) > 0 ? r : "none";
|
|
824
|
-
break;
|
|
825
|
-
case "background-gradient":
|
|
826
|
-
this.$container.gradient = this.gradient;
|
|
827
|
-
break;
|
|
828
|
-
case "background-image":
|
|
829
|
-
this.$container.backgroundImage = r;
|
|
830
|
-
break;
|
|
831
|
-
case "background-image--mobile":
|
|
832
|
-
this.$container.backgroundImageMobile = r;
|
|
833
|
-
break;
|
|
834
|
-
case "background-image--tablet":
|
|
835
|
-
this.$container.backgroundImageTablet = r;
|
|
836
|
-
break;
|
|
837
|
-
case "background-image--laptop":
|
|
838
|
-
this.$container.backgroundImageLaptop = r;
|
|
839
|
-
break;
|
|
840
|
-
case "background-size":
|
|
841
|
-
this.$container.backgroundSize = r;
|
|
842
|
-
break;
|
|
843
|
-
case "background-position":
|
|
844
|
-
this.$container.backgroundPosition = r;
|
|
845
|
-
break;
|
|
846
|
-
case "padding-block":
|
|
847
|
-
this.$container.paddingBlock = r;
|
|
848
|
-
break;
|
|
849
|
-
case "padding-top":
|
|
850
|
-
this.$container.paddingTop = r;
|
|
851
|
-
break;
|
|
852
|
-
case "padding-bottom":
|
|
853
|
-
this.$container.paddingBottom = r;
|
|
854
|
-
break;
|
|
855
|
-
case "padding-block--mobile":
|
|
856
|
-
this.$container.paddingBlockMobile = r;
|
|
857
|
-
break;
|
|
858
|
-
case "padding-top--mobile":
|
|
859
|
-
this.$container.paddingTopMobile = r;
|
|
860
|
-
break;
|
|
861
|
-
case "padding-bottom--mobile":
|
|
862
|
-
this.$container.paddingBottomMobile = r;
|
|
863
|
-
break;
|
|
864
|
-
case "padding-block--tablet":
|
|
865
|
-
this.$container.paddingBlockTablet = r;
|
|
866
|
-
break;
|
|
867
|
-
case "padding-top--tablet":
|
|
868
|
-
this.$container.paddingTopTablet = r;
|
|
869
|
-
break;
|
|
870
|
-
case "padding-bottom--tablet":
|
|
871
|
-
this.$container.paddingBottomTablet = r;
|
|
872
|
-
break;
|
|
873
|
-
case "padding-block--laptop":
|
|
874
|
-
this.$container.paddingBlockLaptop = r;
|
|
875
|
-
break;
|
|
876
|
-
case "padding-top--laptop":
|
|
877
|
-
this.$container.paddingTopLaptop = r;
|
|
878
|
-
break;
|
|
879
|
-
case "padding-bottom--laptop":
|
|
880
|
-
this.$container.paddingBottomLaptop = r;
|
|
881
|
-
break;
|
|
882
|
-
case "border":
|
|
883
|
-
this.$container.border = r;
|
|
884
|
-
break;
|
|
885
|
-
case "border-side":
|
|
886
|
-
this.$container.borderSide = r;
|
|
887
|
-
break;
|
|
888
|
-
case "border-side--mobile":
|
|
889
|
-
this.$container.borderSideMobile = r;
|
|
890
|
-
break;
|
|
891
|
-
case "border-side--tablet":
|
|
892
|
-
this.$container.borderSideTablet = r;
|
|
893
|
-
break;
|
|
894
|
-
case "border-side--laptop":
|
|
895
|
-
this.$container.borderSideLaptop = r;
|
|
896
|
-
break;
|
|
897
|
-
}
|
|
898
|
-
}
|
|
899
|
-
get $slotOverlap() {
|
|
900
|
-
return this.querySelector('[slot="overlap"]');
|
|
901
|
-
}
|
|
902
|
-
get backgroundColor() {
|
|
903
|
-
return this.getAttribute("background-color") || "none";
|
|
904
|
-
}
|
|
905
|
-
set backgroundColor(t) {
|
|
906
|
-
this.setAttribute("background-color", t);
|
|
907
|
-
}
|
|
908
|
-
get gradient() {
|
|
909
|
-
return this.getAttribute("background-gradient");
|
|
910
|
-
}
|
|
911
|
-
set gradient(t) {
|
|
912
|
-
this.setAttribute("background-gradient", t);
|
|
913
|
-
}
|
|
914
|
-
get backgroundImage() {
|
|
915
|
-
return this.getAttribute("background-image");
|
|
916
|
-
}
|
|
917
|
-
set backgroundImage(t) {
|
|
918
|
-
this.setAttribute("background-image", t);
|
|
919
|
-
}
|
|
920
|
-
get backgroundImageMobile() {
|
|
921
|
-
return this.getAttribute("background-image--mobile");
|
|
922
|
-
}
|
|
923
|
-
set backgroundImageMobile(t) {
|
|
924
|
-
this.setAttribute("background-image--mobile", t);
|
|
925
|
-
}
|
|
926
|
-
get backgroundImageTablet() {
|
|
927
|
-
return this.getAttribute("background-image--tablet");
|
|
928
|
-
}
|
|
929
|
-
set backgroundImageTablet(t) {
|
|
930
|
-
this.setAttribute("background-image--tablet", t);
|
|
931
|
-
}
|
|
932
|
-
get backgroundImageLaptop() {
|
|
933
|
-
return this.getAttribute("background-image--laptop");
|
|
934
|
-
}
|
|
935
|
-
set backgroundImageLaptop(t) {
|
|
936
|
-
this.setAttribute("background-image--laptop", t);
|
|
937
|
-
}
|
|
938
|
-
get backgroundSize() {
|
|
939
|
-
return this.getAttribute("background-size");
|
|
940
|
-
}
|
|
941
|
-
set backgroundSize(t) {
|
|
942
|
-
this.setAttribute("background-size", t);
|
|
943
|
-
}
|
|
944
|
-
get backgroundPosition() {
|
|
945
|
-
return this.getAttribute("background-position");
|
|
946
|
-
}
|
|
947
|
-
set backgroundPosition(t) {
|
|
948
|
-
this.setAttribute("background-position", t);
|
|
949
|
-
}
|
|
950
|
-
get paddingBlock() {
|
|
951
|
-
return this.getAttribute("padding-block");
|
|
952
|
-
}
|
|
953
|
-
set paddingBlock(t) {
|
|
954
|
-
this.setAttribute("padding-block", t);
|
|
955
|
-
}
|
|
956
|
-
get paddingTop() {
|
|
957
|
-
return this.getAttribute("padding-top");
|
|
958
|
-
}
|
|
959
|
-
set paddingTop(t) {
|
|
960
|
-
this.setAttribute("padding-top", t);
|
|
961
|
-
}
|
|
962
|
-
get paddingBottom() {
|
|
963
|
-
return this.getAttribute("padding-bottom");
|
|
964
|
-
}
|
|
965
|
-
set paddingBottom(t) {
|
|
966
|
-
this.setAttribute("padding-bottom", t);
|
|
967
|
-
}
|
|
968
|
-
get paddingBlockMobile() {
|
|
969
|
-
return this.getAttribute("padding-block--mobile");
|
|
970
|
-
}
|
|
971
|
-
set paddingBlockMobile(t) {
|
|
972
|
-
this.setAttribute("padding-block--mobile", t);
|
|
973
|
-
}
|
|
974
|
-
get paddingTopMobile() {
|
|
975
|
-
return this.getAttribute("padding-top--mobile");
|
|
976
|
-
}
|
|
977
|
-
set paddingTopMobile(t) {
|
|
978
|
-
this.setAttribute("padding-top--mobile", t);
|
|
979
|
-
}
|
|
980
|
-
get paddingBottomMobile() {
|
|
981
|
-
return this.getAttribute("padding-bottom--mobile");
|
|
982
|
-
}
|
|
983
|
-
set paddingBottomMobile(t) {
|
|
984
|
-
this.setAttribute("padding-bottom--mobile", t);
|
|
985
|
-
}
|
|
986
|
-
get paddingBlockTablet() {
|
|
987
|
-
return this.getAttribute("padding-block--tablet");
|
|
988
|
-
}
|
|
989
|
-
set paddingBlockTablet(t) {
|
|
990
|
-
this.setAttribute("padding-block--tablet", t);
|
|
991
|
-
}
|
|
992
|
-
get paddingTopTablet() {
|
|
993
|
-
return this.getAttribute("padding-top--tablet");
|
|
994
|
-
}
|
|
995
|
-
set paddingTopTablet(t) {
|
|
996
|
-
this.setAttribute("padding-top--tablet", t);
|
|
997
|
-
}
|
|
998
|
-
get paddingBottomTablet() {
|
|
999
|
-
return this.getAttribute("padding-bottom--tablet");
|
|
1000
|
-
}
|
|
1001
|
-
set paddingBottomTablet(t) {
|
|
1002
|
-
this.setAttribute("padding-bottom--tablet", t);
|
|
1003
|
-
}
|
|
1004
|
-
get paddingBlockLaptop() {
|
|
1005
|
-
return this.getAttribute("padding-block--laptop");
|
|
1006
|
-
}
|
|
1007
|
-
set paddingBlockLaptop(t) {
|
|
1008
|
-
this.setAttribute("padding-block--laptop", t);
|
|
1009
|
-
}
|
|
1010
|
-
get paddingTopLaptop() {
|
|
1011
|
-
return this.getAttribute("padding-top--laptop");
|
|
1012
|
-
}
|
|
1013
|
-
set paddingTopLaptop(t) {
|
|
1014
|
-
this.setAttribute("padding-top--laptop", t);
|
|
1015
|
-
}
|
|
1016
|
-
get paddingBottomLaptop() {
|
|
1017
|
-
return this.getAttribute("padding-bottom--laptop");
|
|
1018
|
-
}
|
|
1019
|
-
set paddingBottomLaptop(t) {
|
|
1020
|
-
this.setAttribute("padding-bottom--laptop", t);
|
|
1021
|
-
}
|
|
1022
|
-
get border() {
|
|
1023
|
-
return this.getAttribute("border");
|
|
1024
|
-
}
|
|
1025
|
-
set border(t) {
|
|
1026
|
-
this.setAttribute("border", t);
|
|
1027
|
-
}
|
|
1028
|
-
get borderSide() {
|
|
1029
|
-
return this.getAttribute("border-side");
|
|
1030
|
-
}
|
|
1031
|
-
set borderSide(t) {
|
|
1032
|
-
this.setAttribute("border-side", t);
|
|
1033
|
-
}
|
|
1034
|
-
get borderSideMobile() {
|
|
1035
|
-
return this.getAttribute("border-side--mobile");
|
|
1036
|
-
}
|
|
1037
|
-
set borderSideMobile(t) {
|
|
1038
|
-
this.setAttribute("border-side--mobile", t);
|
|
1039
|
-
}
|
|
1040
|
-
get borderSideTablet() {
|
|
1041
|
-
return this.getAttribute("border-side--tablet");
|
|
1042
|
-
}
|
|
1043
|
-
set borderSideTablet(t) {
|
|
1044
|
-
this.setAttribute("border-side--tablet", t);
|
|
1045
|
-
}
|
|
1046
|
-
get borderSideLaptop() {
|
|
1047
|
-
return this.getAttribute("border-side--laptop");
|
|
1048
|
-
}
|
|
1049
|
-
set borderSideLaptop(t) {
|
|
1050
|
-
this.setAttribute("border-side--laptop", t);
|
|
1051
|
-
}
|
|
1052
|
-
}
|
|
1053
|
-
customElements.define("px-section", D);
|
|
1054
|
-
const V = ":host>*{padding:2em 0;cursor:pointer}button{margin:0;padding:0;border:0;border-bottom:2px solid rgba(0,0,0,0);outline:0;background:inherit;font-family:var(--px-font-family);font-size:var(--px-text-size-label-l-mobile)}button[aria-expanded=true],button:focus{outline:0;font-weight:700;border-bottom:2px solid var(--px-background-color-action-primary-default);color:var(--px-background-color-action-primary-default)}button:hover{font-weight:700;color:var(--px-background-color-action-primary-default)}@media screen and (min-width: 1024px){button{font-size:var(--px-text-size-label-l-desktop)}}px-a{height:100%;display:block}px-a:hover{font-weight:700;color:var(--px-background-color-action-primary-default)}", B = new CSSStyleSheet();
|
|
1055
|
-
B.replaceSync(V);
|
|
1056
|
-
class tt extends k {
|
|
1057
|
-
constructor() {
|
|
1058
|
-
super(), this.template = () => `${this.getAttribute("href") ? `<px-a font-size="body-l" variant="no-style" href="${this.getAttribute("href")}">
|
|
1059
|
-
<slot></slot>
|
|
1060
|
-
</px-a>` : "<button><slot></slot></button>"}`, this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [B];
|
|
1061
|
-
}
|
|
1062
|
-
static get observedAttributes() {
|
|
1063
|
-
return ["for", "href"];
|
|
1064
|
-
}
|
|
1065
|
-
connectedCallback() {
|
|
1066
|
-
this.setAttribute("slot", "header-entries"), this.$button && this.setupButtonA11y();
|
|
1067
|
-
}
|
|
1068
|
-
attributeChangedCallback(t, e, r) {
|
|
1069
|
-
super.attributeChangedCallback(t, e, r), t === "href" && this.$button && r ? this.shadowRoot.innerHTML = this.template() : t === "for" && this.$a && r && (this.shadowRoot.innerHTML = this.template(), this.setupButtonA11y());
|
|
1070
|
-
}
|
|
1071
|
-
setupButtonA11y() {
|
|
1072
|
-
this.$button.setAttribute("tabindex", "0"), this.$button.role = "menuitem", this.$button.ariaExpanded = "false", this.$button.ariaHasPopup = "menu";
|
|
1073
|
-
}
|
|
1074
|
-
get for() {
|
|
1075
|
-
return this.getAttribute("for");
|
|
1076
|
-
}
|
|
1077
|
-
set for(t) {
|
|
1078
|
-
this.setAttribute("for", t);
|
|
1079
|
-
}
|
|
1080
|
-
get checked() {
|
|
1081
|
-
return this.$button.ariaExpanded === "true";
|
|
1082
|
-
}
|
|
1083
|
-
set checked(t) {
|
|
1084
|
-
if (typeof t != "boolean")
|
|
1085
|
-
throw new Error("checked must be a boolean");
|
|
1086
|
-
this.$button.setAttribute("tabindex", t ? "0" : "-1"), this.$button.ariaExpanded = `${!!t}`, this.$button.setAttribute("aria-controls", this.for);
|
|
1087
|
-
}
|
|
1088
|
-
get $button() {
|
|
1089
|
-
return this.shadowRoot.querySelector("button");
|
|
1090
|
-
}
|
|
1091
|
-
get $a() {
|
|
1092
|
-
return this.shadowRoot.querySelector("px-a");
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
customElements.get("px-header-item") || customElements.define("px-header-item", tt);
|
|
1096
|
-
const et = ":host>*:first-child{--font-weight-light: 300;--font-weight-regular: 400;--font-weight-bold: 700;--font-weight-extrabold: 900}.color-inherit{color:inherit}.color-action-brand{color:var(--px-text-color-action-brand-default)}.color-action-neutral{color:var(--px-text-color-action-neutral-default)}.color-action-hover{color:var(--px-text-color-action-hover-default)}.color-action-active{color:var(--px-text-color-action-active-default)}.color-action-disabled{color:var(--px-text-color-action-disabled-default)}.color-body-neutral-strong{color:var(--px-text-color-body-neutral-strong-default)}.color-body-neutral-weak{color:var(--px-text-color-body-neutral-weak-default)}.color-heading-brand{color:var(--px-text-color-heading-brand-default)}.color-heading-neutral{color:var(--px-text-color-heading-neutral-default)}.color-purpose-success{color:var(--px-text-color-purpose-success-default)}.color-purpose-warning{color:var(--px-text-color-purpose-warning-default)}.color-purpose-error{color:var(--px-text-color-purpose-error-default)}.color-purpose-unlimited{color:var(--px-text-color-purpose-unlimited-default)}.color-purpose-promo{color:var(--px-text-color-purpose-promo-default)}:host([inverted]) .color-inherit{color:inherit}:host([inverted]) .color-action-brand{color:var(--px-text-color-action-brand-inverted)}:host([inverted]) .color-action-neutral{color:var(--px-text-color-action-neutral-inverted)}:host([inverted]) .color-action-hover{color:var(--px-text-color-action-hover-inverted)}:host([inverted]) .color-action-active{color:var(--px-text-color-action-active-inverted)}:host([inverted]) .color-action-disabled{color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .color-body-neutral-strong{color:var(--px-text-color-body-neutral-strong-inverted)}:host([inverted]) .color-body-neutral-weak{color:var(--px-text-color-body-neutral-weak-inverted)}:host([inverted]) .color-heading-brand{color:var(--px-text-color-heading-brand-inverted)}:host([inverted]) .color-heading-neutral{color:var(--px-text-color-heading-neutral-inverted)}:host([inverted]) .color-purpose-success{color:var(--px-text-color-purpose-success-inverted)}:host([inverted]) .color-purpose-warning{color:var(--px-text-color-purpose-warning-inverted)}:host([inverted]) .color-purpose-error{color:var(--px-text-color-purpose-error-inverted)}:host([inverted]) .color-purpose-unlimited{color:var(--px-text-color-purpose-unlimited-inverted)}:host([inverted]) .color-purpose-promo{color:var(--px-text-color-purpose-promo-inverted)}.font-size-inherit{font-size:inherit;line-height:inherit}.font-size-body-l{font-size:var(--px-text-size-body-l-mobile)}.font-size-body-m{font-size:var(--px-text-size-body-m-mobile)}.font-size-body-s{font-size:var(--px-text-size-body-s-mobile)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-mobile)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-mobile)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-mobile)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-mobile)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-mobile)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-mobile)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-mobile)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-mobile)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){.font-size-body-l{font-size:var(--px-text-size-body-l-tablet)}.font-size-body-m{font-size:var(--px-text-size-body-m-tablet)}.font-size-body-s{font-size:var(--px-text-size-body-s-tablet)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-tablet)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-tablet)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-tablet)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-tablet)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-tablet)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-tablet)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-tablet)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-tablet)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-tablet)}}@media only screen and (min-width: 1025px){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-normal{font-weight:var(--font-weight-regular)}.font-weight-bold{font-weight:var(--font-weight-bold)}.font-weight-extrabold{font-weight:var(--font-weight-extrabold)}.font-weight-light{font-weight:var(--font-weight-light)}", C = new CSSStyleSheet(), M = new CSSStyleSheet(), w = new CSSStyleSheet();
|
|
1097
|
-
C.replaceSync(A);
|
|
1098
|
-
M.replaceSync(y);
|
|
1099
|
-
w.replaceSync(et);
|
|
1100
|
-
const rt = [
|
|
1101
|
-
"link",
|
|
1102
|
-
"no-style",
|
|
1103
|
-
"skip-link",
|
|
1104
|
-
"btn-default",
|
|
1105
|
-
"btn-secondary",
|
|
1106
|
-
"btn-tertiary",
|
|
1107
|
-
"icon-link"
|
|
1108
|
-
], ot = ["", "default", "alternative"], v = class v extends u {
|
|
1109
|
-
constructor() {
|
|
1110
|
-
super(C, M, w), this.template = () => '<slot name="before"></slot><slot></slot><slot name="after"></slot>';
|
|
1111
|
-
const t = document.createElement(this.nativeName);
|
|
1112
|
-
t.innerHTML = this.template(), this.shadowRoot.appendChild(t);
|
|
1113
|
-
}
|
|
1114
|
-
static get observedAttributes() {
|
|
1115
|
-
return [
|
|
1116
|
-
...super.observedAttributes,
|
|
1117
|
-
"disabled",
|
|
1118
|
-
"variant",
|
|
1119
|
-
"shape",
|
|
1120
|
-
"extended",
|
|
1121
|
-
"inverted",
|
|
1122
|
-
"font-size",
|
|
1123
|
-
"color",
|
|
1124
|
-
"font-weight"
|
|
1125
|
-
];
|
|
1126
|
-
}
|
|
1127
|
-
connectedCallback() {
|
|
1128
|
-
super.connectedCallback(), this.$before && this.$before.localName === "px-icon" && this.configureBeforeAfterIcon(this.$before), this.$after && this.$after.localName === "px-icon" && this.configureBeforeAfterIcon(this.$after);
|
|
1129
|
-
}
|
|
1130
|
-
attributeChangedCallback(t, e, r) {
|
|
1131
|
-
if (e !== r)
|
|
1132
|
-
switch (t) {
|
|
1133
|
-
case "disabled":
|
|
1134
|
-
this.$el.toggleAttribute("aria-disabled"), r !== null && this.$el.setAttribute("aria-disabled", "true");
|
|
1135
|
-
break;
|
|
1136
|
-
case "variant":
|
|
1137
|
-
this.updateVariant(e, r);
|
|
1138
|
-
break;
|
|
1139
|
-
case "shape":
|
|
1140
|
-
this.updateShape(e, r);
|
|
1141
|
-
break;
|
|
1142
|
-
case "extended":
|
|
1143
|
-
this.$el.classList.toggle(t);
|
|
1144
|
-
break;
|
|
1145
|
-
case "font-size":
|
|
1146
|
-
this.updateTypography(t, e, r, G);
|
|
1147
|
-
break;
|
|
1148
|
-
case "color":
|
|
1149
|
-
this.updateTypography(t, e, r, W);
|
|
1150
|
-
break;
|
|
1151
|
-
case "font-weight":
|
|
1152
|
-
this.updateTypography(t, e, r, O);
|
|
1153
|
-
break;
|
|
1154
|
-
default:
|
|
1155
|
-
super.attributeChangedCallback(t, e, r);
|
|
1156
|
-
break;
|
|
1157
|
-
}
|
|
1158
|
-
}
|
|
1159
|
-
configureBeforeAfterIcon(t) {
|
|
1160
|
-
const e = t.getAttribute("size"), r = t.getAttribute("color");
|
|
1161
|
-
t.addEventListener("click", () => {
|
|
1162
|
-
this.$el.focus();
|
|
1163
|
-
}), e || t.setAttribute("size", "2xs"), r || t.setAttribute("color", "inherit");
|
|
1164
|
-
}
|
|
1165
|
-
checkName(t, e) {
|
|
1166
|
-
return t.includes(e);
|
|
1167
|
-
}
|
|
1168
|
-
_toggleClassList(t) {
|
|
1169
|
-
if (t.startsWith("btn-")) {
|
|
1170
|
-
const e = t.split("-");
|
|
1171
|
-
for (const r of e)
|
|
1172
|
-
this.$el.classList.toggle(r);
|
|
1173
|
-
} else
|
|
1174
|
-
this.$el.classList.toggle(t);
|
|
1175
|
-
}
|
|
1176
|
-
updateVariant(t, e) {
|
|
1177
|
-
t !== null && t !== "" && t !== "link" && this._toggleClassList(t), e !== null && e !== "" && e !== "link" && this._toggleClassList(e), this.checkName(rt, e) || console.error(`Bad "variant" value for ${this.$el}`), e === "icon-link" && this.$iconNotBeforeAfter.setAttribute("color", "inherit");
|
|
1178
|
-
}
|
|
1179
|
-
updateShape(t, e) {
|
|
1180
|
-
t !== null && t !== "" && t !== "default" && this._toggleClassList(t), e !== null && e !== "" && e !== "default" && this._toggleClassList(e), this.checkName(ot, e) || console.error(`Bad "shape" value for ${this.$el}`);
|
|
1181
|
-
}
|
|
1182
|
-
updateTypography(t, e, r, o) {
|
|
1183
|
-
e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`${t}-${e}`), r !== null && r !== "" && r !== "default" && this.$el.classList.toggle(`${t}-${r}`), this.checkName(o, r) || console.error(`Bad ${t} value for ${this.$el}`);
|
|
1184
|
-
}
|
|
1185
|
-
get $before() {
|
|
1186
|
-
return this.querySelector('[slot="before"]');
|
|
1187
|
-
}
|
|
1188
|
-
get $after() {
|
|
1189
|
-
return this.querySelector('[slot="after"]');
|
|
1190
|
-
}
|
|
1191
|
-
get $iconNotBeforeAfter() {
|
|
1192
|
-
return this.querySelector(
|
|
1193
|
-
'px-icon:not([slot="before"], [slot="after"])'
|
|
1194
|
-
);
|
|
1195
|
-
}
|
|
1196
|
-
get disabled() {
|
|
1197
|
-
return this.getAttribute("disabled");
|
|
1198
|
-
}
|
|
1199
|
-
set disabled(t) {
|
|
1200
|
-
this.setAttribute("disabled", t);
|
|
1201
|
-
}
|
|
1202
|
-
get variant() {
|
|
1203
|
-
return this.getAttribute("variant");
|
|
1204
|
-
}
|
|
1205
|
-
set variant(t) {
|
|
1206
|
-
this.setAttribute("variant", t);
|
|
1207
|
-
}
|
|
1208
|
-
get shape() {
|
|
1209
|
-
return this.getAttribute("shape");
|
|
1210
|
-
}
|
|
1211
|
-
set shape(t) {
|
|
1212
|
-
this.setAttribute("shape", t);
|
|
1213
|
-
}
|
|
1214
|
-
get extended() {
|
|
1215
|
-
return this.getAttribute("extended");
|
|
1216
|
-
}
|
|
1217
|
-
set extended(t) {
|
|
1218
|
-
this.setAttribute("extended", t);
|
|
1219
|
-
}
|
|
1220
|
-
get inverted() {
|
|
1221
|
-
return this.getAttribute("inverted");
|
|
1222
|
-
}
|
|
1223
|
-
set inverted(t) {
|
|
1224
|
-
this.setAttribute("inverted", t);
|
|
1225
|
-
}
|
|
1226
|
-
get fontsize() {
|
|
1227
|
-
return this.getAttribute("font-size");
|
|
1228
|
-
}
|
|
1229
|
-
set fontsize(t) {
|
|
1230
|
-
this.setAttribute("font-size", t);
|
|
1231
|
-
}
|
|
1232
|
-
get color() {
|
|
1233
|
-
return this.getAttribute("color");
|
|
1234
|
-
}
|
|
1235
|
-
set color(t) {
|
|
1236
|
-
this.setAttribute("color", t);
|
|
1237
|
-
}
|
|
1238
|
-
get fontweight() {
|
|
1239
|
-
return this.getAttribute("font-weight");
|
|
1240
|
-
}
|
|
1241
|
-
set fontweight(t) {
|
|
1242
|
-
this.setAttribute("font-weight", t);
|
|
1243
|
-
}
|
|
1244
|
-
};
|
|
1245
|
-
v.nativeName = "a";
|
|
1246
|
-
let g = v;
|
|
1247
|
-
customElements.get("px-a") || customElements.define("px-a", g);
|
|
1248
|
-
class it extends HTMLElement {
|
|
1249
|
-
constructor() {
|
|
1250
|
-
super(), this.template = `<px-a font-weight="bold" font-size="body-l" color="action-brand" variant="no-style">
|
|
1251
|
-
<slot></slot>
|
|
1252
|
-
</px-a>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template;
|
|
1253
|
-
const t = this.shadowRoot.querySelector("px-a");
|
|
1254
|
-
t && Array.from(this.attributes).forEach((e) => {
|
|
1255
|
-
t.setAttribute(e.name, e.value);
|
|
1256
|
-
});
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
customElements.get("px-mdd-a") || customElements.define("px-mdd-a", it);
|
|
1260
|
-
const at = "#panel-container{position:absolute;left:0;right:0;z-index:999}@media screen and (max-width: 767px){#panel-container{top:0;border-top:none}}#backdrop-filter{position:absolute;display:none;z-index:998;left:0;width:100vw;height:100%;background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}@media screen and (max-width: 767px){slot[name=header-entries]{display:none}}@media screen and (min-width: 768px){px-button-icon{display:none}}", E = new CSSStyleSheet();
|
|
1261
|
-
E.replaceSync(at);
|
|
1262
|
-
class nt extends k {
|
|
1263
|
-
constructor() {
|
|
1264
|
-
var t;
|
|
1265
|
-
super(E), this.template = `
|
|
1266
|
-
<div id="navigation-items-container">
|
|
1267
|
-
<slot name="skip"></slot>
|
|
1268
|
-
<px-section padding-block--mobile="s" padding-block="none" background-color="none">
|
|
1269
|
-
<px-hstack gap="after-element-default" wrap="wrap" align-items="center">
|
|
1270
|
-
<slot name="header-logo"></slot>
|
|
1271
|
-
<slot name="header-entries"></slot>
|
|
1272
|
-
<px-spacer></px-spacer>
|
|
1273
|
-
<px-hstack gap--mobile="none" gap="after-element-default">
|
|
1274
|
-
<slot name="header-actions"></slot>
|
|
1275
|
-
<px-button-icon variant="naked">
|
|
1276
|
-
<px-icon name="burger_menu" from="lavender"></px-icon>
|
|
1277
|
-
</px-button-icon>
|
|
1278
|
-
</px-hstack>
|
|
1279
|
-
</px-hstack>
|
|
1280
|
-
</px-section>
|
|
1281
|
-
<px-section id="panel-container" background-color="container-weak" padding="none" background-color="none">
|
|
1282
|
-
<slot name="header-panels">
|
|
1283
|
-
</px-section>
|
|
1284
|
-
<div id="backdrop-filter"></div>
|
|
1285
|
-
<slot name="main"></slot>
|
|
1286
|
-
</div>
|
|
1287
|
-
`, this.shadowRoot.innerHTML = this.template, this.internals = (t = this.attachInternals) == null ? void 0 : t.call(this), this.internals && (this.internals.role = "navigation", this.internals.ariaOrientation = "horizontal");
|
|
1288
|
-
}
|
|
1289
|
-
connectedCallback() {
|
|
1290
|
-
this.addEventListener("click", (t) => {
|
|
1291
|
-
const e = t.target.closest(
|
|
1292
|
-
"px-header-item"
|
|
1293
|
-
);
|
|
1294
|
-
e && e.for && (this.$backdropFilter.style.display = "block", this.$navigationItems.forEach((r) => {
|
|
1295
|
-
r.checked = !1;
|
|
1296
|
-
}), t.target.checked = !0, this.i11yEnableActions(!1), this.togglePanel(t.target.for));
|
|
1297
|
-
}), this.shadowRoot.addEventListener("click", (t) => {
|
|
1298
|
-
t.target.closest("px-button-icon") && (this.$backdropFilter.style.display = "block", this.$burgerMenu.setAttribute("tabindex", "0"), this.togglePanel("__lavender_mobile_menu"));
|
|
1299
|
-
}), this.addEventListener("section-item-click", (t) => {
|
|
1300
|
-
this.$backdropFilter.style.display = "block", this.$navigationItems.forEach((r) => {
|
|
1301
|
-
r.checked = !1;
|
|
1302
|
-
}), t.detail.for !== "__lavender_mobile_menu" && (this.querySelector(
|
|
1303
|
-
`px-header-item[for="${t.detail.for}"]`
|
|
1304
|
-
).checked = !0), this.i11yEnableActions(!1), this.togglePanel(t.detail.for);
|
|
1305
|
-
}), this.addEventListener("close-panel", () => {
|
|
1306
|
-
this.hidePanel(), this.i11yEnableActions(!0);
|
|
1307
|
-
}), this.$backdropFilter.addEventListener("click", () => {
|
|
1308
|
-
this.hidePanel(), this.i11yEnableActions(!0);
|
|
1309
|
-
}), this.createMobileMenuPanel();
|
|
1310
|
-
}
|
|
1311
|
-
createMobileMenuPanel() {
|
|
1312
|
-
var e;
|
|
1313
|
-
const t = `
|
|
1314
|
-
<px-mdd name="__lavender_mobile_menu">
|
|
1315
|
-
<span slot="title">Menu</span>
|
|
1316
|
-
<px-mdd-section>
|
|
1317
|
-
${[...this.$navigationItems].map(
|
|
1318
|
-
(r) => `<px-mdd-section-item for="${r.getAttribute("for")}">${r.innerText}</px-mdd-section-item>`
|
|
1319
|
-
).join("")}
|
|
1320
|
-
${[...this.$actionLinks].filter((r) => r.hasAttribute("promoted")).map(
|
|
1321
|
-
(r) => `<px-mdd-a href="${r.getAttribute("href")}" slot="footer">${r.innerText}</px-mdd-a>`
|
|
1322
|
-
).join("")}
|
|
1323
|
-
</px-mdd>
|
|
1324
|
-
`;
|
|
1325
|
-
(e = this.$megaDropdowns.item(0)) == null || e.insertAdjacentHTML("beforebegin", t);
|
|
1326
|
-
}
|
|
1327
|
-
i11yEnableActions(t = !0) {
|
|
1328
|
-
this.querySelectorAll('[slot="header-actions"]').forEach(
|
|
1329
|
-
(e) => {
|
|
1330
|
-
if (t) {
|
|
1331
|
-
e.removeAttribute("tabindex");
|
|
1332
|
-
return;
|
|
1333
|
-
}
|
|
1334
|
-
e.setAttribute("tabindex", "-1");
|
|
1335
|
-
}
|
|
1336
|
-
);
|
|
1337
|
-
}
|
|
1338
|
-
togglePanel(t) {
|
|
1339
|
-
this.$megaDropdowns.forEach((e) => {
|
|
1340
|
-
e.name === t && e.hidden && (e.hidden = !e.hidden, t !== "__lavender_mobile_menu" && (this.querySelector(`px-header-item[for="${t}"]`).checked = !e.hidden), document.body.style.overflow = e.hidden ? "auto" : "hidden"), e.name !== t && !e.hidden && (e.hidden = !0);
|
|
1341
|
-
});
|
|
1342
|
-
}
|
|
1343
|
-
hidePanel() {
|
|
1344
|
-
this.$backdropFilter.style.display = "none", this.$navigationItems.forEach((t) => {
|
|
1345
|
-
t.checked = !1, t.$button.setAttribute("tabindex", "0");
|
|
1346
|
-
}), this.$megaDropdowns.forEach((t) => {
|
|
1347
|
-
t.hidden = !0;
|
|
1348
|
-
}), this.i11yEnableActions(!0), document.body.style.overflow = "auto";
|
|
1349
|
-
}
|
|
1350
|
-
get $navigationItems() {
|
|
1351
|
-
return this.querySelectorAll("px-header-item");
|
|
1352
|
-
}
|
|
1353
|
-
get $megaDropdowns() {
|
|
1354
|
-
return this.querySelectorAll("px-mdd");
|
|
1355
|
-
}
|
|
1356
|
-
get $actionLinks() {
|
|
1357
|
-
return this.querySelectorAll("px-action-link");
|
|
1358
|
-
}
|
|
1359
|
-
get $backdropFilter() {
|
|
1360
|
-
return this.shadowRoot.querySelector("#backdrop-filter");
|
|
1361
|
-
}
|
|
1362
|
-
get $burgerMenu() {
|
|
1363
|
-
return this.shadowRoot.querySelector("px-button-icon");
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
customElements.get("px-header") || customElements.define("px-header", nt);
|
|
1367
|
-
export {
|
|
1368
|
-
nt as Header,
|
|
1369
|
-
tt as HeaderItem
|
|
1370
|
-
};
|