@proximus/lavender 1.3.0-beta.6 → 1.4.1-alpha.1
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/lavender.cjs.js +1 -1
- package/dist/lavender.es.js +1169 -1146
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -84,6 +84,7 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
84
84
|
];
|
|
85
85
|
}
|
|
86
86
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
87
|
+
var _a;
|
|
87
88
|
if (WithExtraAttributes.observedAttributes.indexOf(name) === -1) {
|
|
88
89
|
return;
|
|
89
90
|
}
|
|
@@ -114,7 +115,7 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
114
115
|
name,
|
|
115
116
|
oldValue,
|
|
116
117
|
newValue,
|
|
117
|
-
this.
|
|
118
|
+
((_a = this.parentElement) == null ? void 0 : _a.localName) === "px-grid" ? cssGridAlignSelfValues : flexboxAlignSelfValues
|
|
118
119
|
);
|
|
119
120
|
break;
|
|
120
121
|
case "justify-self":
|
|
@@ -193,11 +194,19 @@ class WithExtraAttributes extends HTMLElement {
|
|
|
193
194
|
var _a;
|
|
194
195
|
return (_a = this.parentElement) == null ? void 0 : _a.tagName.toLowerCase();
|
|
195
196
|
}
|
|
196
|
-
get
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
197
|
+
get isInsideGridOrStack() {
|
|
198
|
+
let parent = this.parentElement;
|
|
199
|
+
while (parent) {
|
|
200
|
+
if (parent.localName === "px-grid" || parent.localName === "px-stack" && (parent == null ? void 0 : parent.getAttribute("direction")) === "row") {
|
|
201
|
+
return true;
|
|
202
|
+
}
|
|
203
|
+
if (window.getComputedStyle(parent).display === "contents") {
|
|
204
|
+
parent = parent.parentElement;
|
|
205
|
+
continue;
|
|
206
|
+
}
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
return false;
|
|
201
210
|
}
|
|
202
211
|
get grow() {
|
|
203
212
|
return this.getAttribute("grow");
|
|
@@ -456,7 +465,6 @@ class PxElement extends WithExtraAttributes {
|
|
|
456
465
|
}
|
|
457
466
|
}
|
|
458
467
|
connectedCallback() {
|
|
459
|
-
var _a;
|
|
460
468
|
for (const name of getSupportedPropertyNames(this.nativeName)) {
|
|
461
469
|
if (name === "constructor" || this.accessorExclusions.includes(name)) {
|
|
462
470
|
continue;
|
|
@@ -476,12 +484,9 @@ class PxElement extends WithExtraAttributes {
|
|
|
476
484
|
console.warn(`Could not create property ${name} for`, this.$el, e);
|
|
477
485
|
}
|
|
478
486
|
}
|
|
479
|
-
if (this.
|
|
480
|
-
const parentDirection = (_a = this.parentElement) == null ? void 0 : _a.getAttribute("direction");
|
|
487
|
+
if (this.isInsideGridOrStack) {
|
|
481
488
|
this.$el.style.display = "block";
|
|
482
|
-
|
|
483
|
-
this.$el.style.height = "100%";
|
|
484
|
-
}
|
|
489
|
+
this.$el.style.height = "100%";
|
|
485
490
|
}
|
|
486
491
|
}
|
|
487
492
|
get $el() {
|
|
@@ -1950,6 +1955,7 @@ class Icon extends WithExtraAttributes {
|
|
|
1950
1955
|
<use xlink:href="#icon-${this.name}"></use>
|
|
1951
1956
|
</svg>`);
|
|
1952
1957
|
this.shadowRoot.innerHTML = __privateGet(this, _template).call(this);
|
|
1958
|
+
this.role = "img";
|
|
1953
1959
|
__privateSet(this, _internals, (_a = this.attachInternals) == null ? void 0 : _a.call(this));
|
|
1954
1960
|
if (__privateGet(this, _internals)) {
|
|
1955
1961
|
__privateGet(this, _internals).role = "img";
|
|
@@ -2188,7 +2194,6 @@ if (!customElements.get("px-span")) {
|
|
|
2188
2194
|
const containerCss = ':host{display:block}.container{font-family:var(--px-font-family);background-color:var(--background-color);border-radius:var(--px-radius-main);box-sizing:border-box;height:100%}:host([background-image]) .container{background-image:var(--background-image)}:host([background-gradient]) .container{background-image:var(--background-gradient)}:host([inverted]) .container{background-color:var(--background-color-inverted);color:var(--px-color-text-neutral-inverted)}.border-none{border:none}.border-s{border:var(--px-size-border-s) solid var(--border-color)}.border-m{border:var(--px-size-border-m) solid var(--border-color)}.border-l{border:var(--px-size-border-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:3}::slotted([slot="anchor-right"]){right:var( --container-anchor-offset--mobile, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--mobile, 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:2}::slotted(px-vstack:only-of-type),::slotted(px-hstack:only-of-type),::slotted(px-stack:only-of-type),::slotted(px-grid:only-of-type){height:100%}.border-s ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-s) * -1);left:calc(var(--px-size-border-s) * -1)}.border-m ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-m) * -1);left:calc(var(--px-size-border-m) * -1)}.border-l ::slotted([slot="anchor-full"]){right:calc(var(--px-size-border-l) * -1);left:calc(var(--px-size-border-l) * -1)}@media only screen and (max-width: 47.938em){.container{background-color:var(--background-color--mobile, var(--background-color))}:host([background-image--mobile]) .container{background-image:var(--background-image--mobile, var(--background-image))}:host([background-gradient--mobile]) .container{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)}}@media only screen and (min-width: 48em) and (max-width: 64em){.container{background-color:var(--background-color--tablet, var(--background-color))}:host([background-image--tablet]) .container{background-image:var(--background-image--tablet, var(--background-image))}:host([background-gradient--tablet]) .container{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-anchor-offset--tablet, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--tablet, var( --container-padding-left, var(--container-padding-inline, var(--container-padding)) ) )}}@media only screen and (min-width: 64.0625em){.container{background-color:var(--background-color--laptop, var(--background-color))}:host([background-image--laptop]) .container{background-image:var(--background-image--laptop, var(--background-image))}:host([background-gradient--laptop]) .container{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-anchor-offset--laptop, var( --container-padding-right, var(--container-padding-inline, var(--container-padding)) ) )}::slotted([slot="anchor-left"]){left:var( --container-anchor-offset--laptop, 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}}';
|
|
2189
2195
|
const containerStyles = new CSSStyleSheet();
|
|
2190
2196
|
containerStyles.replaceSync(containerCss);
|
|
2191
|
-
const anchorValues = ["anchor-right", "anchor-left", "anchor-full"];
|
|
2192
2197
|
const attributeBreakpointCSSSelector$3 = (attributeName, attributeValue, device) => `:host([${attributeName}${device ? `--${device}` : ""}='${attributeValue}']) .container`;
|
|
2193
2198
|
const paddingPrefix$1 = "px-padding";
|
|
2194
2199
|
const _Container = class _Container extends PxElement {
|
|
@@ -2295,12 +2300,19 @@ const _Container = class _Container extends PxElement {
|
|
|
2295
2300
|
if (!this.borderColor) {
|
|
2296
2301
|
this.borderColor = "main";
|
|
2297
2302
|
}
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
if (anchorValues.includes(anchorSlot.getAttribute("slot"))) {
|
|
2301
|
-
this.shadowRoot.querySelector(".container").classList.toggle("anchored");
|
|
2302
|
-
}
|
|
2303
|
+
if (this.$slotAnchor) {
|
|
2304
|
+
this.addAnchorClass();
|
|
2303
2305
|
}
|
|
2306
|
+
this.contentObserver = new MutationObserver(() => {
|
|
2307
|
+
if (this.$slotAnchor) {
|
|
2308
|
+
this.addAnchorClass();
|
|
2309
|
+
}
|
|
2310
|
+
});
|
|
2311
|
+
this.contentObserver.observe(this, {
|
|
2312
|
+
childList: true,
|
|
2313
|
+
subtree: true,
|
|
2314
|
+
characterData: true
|
|
2315
|
+
});
|
|
2304
2316
|
this._bgObserver = new IntersectionObserver((entries) => {
|
|
2305
2317
|
entries.forEach((entry) => {
|
|
2306
2318
|
var _a;
|
|
@@ -2316,6 +2328,7 @@ const _Container = class _Container extends PxElement {
|
|
|
2316
2328
|
disconnectedCallback() {
|
|
2317
2329
|
var _a;
|
|
2318
2330
|
(_a = this._bgObserver) == null ? void 0 : _a.disconnect();
|
|
2331
|
+
this.contentObserver.disconnect();
|
|
2319
2332
|
}
|
|
2320
2333
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
2321
2334
|
if (oldValue !== newValue) {
|
|
@@ -2528,6 +2541,14 @@ const _Container = class _Container extends PxElement {
|
|
|
2528
2541
|
updateAnchorOffsetStyle(oldValue);
|
|
2529
2542
|
updateAnchorOffsetStyle(newValue);
|
|
2530
2543
|
}
|
|
2544
|
+
addAnchorClass() {
|
|
2545
|
+
if (!this.$el.classList.contains("anchored")) {
|
|
2546
|
+
this.$el.classList.add("anchored");
|
|
2547
|
+
}
|
|
2548
|
+
}
|
|
2549
|
+
get $slotAnchor() {
|
|
2550
|
+
return this.querySelector('[slot^="anchor"]');
|
|
2551
|
+
}
|
|
2531
2552
|
get padding() {
|
|
2532
2553
|
return this.getAttribute("padding");
|
|
2533
2554
|
}
|
|
@@ -2995,7 +3016,20 @@ const agGridTableThButtonCss = `:host{display:inline-flex;overflow:hidden;word-b
|
|
|
2995
3016
|
const agGridTableThButtonStyles = new CSSStyleSheet();
|
|
2996
3017
|
agGridTableThButtonStyles.replaceSync(agGridTableThButtonCss);
|
|
2997
3018
|
const sortingValues = ["none", "ascending", "descending"];
|
|
3019
|
+
const CLICK_EVENT$1 = "px.lavender.ag-grid-table-th-button.click";
|
|
2998
3020
|
const _AgGridTableThButton = class _AgGridTableThButton extends PxElement {
|
|
3021
|
+
constructor() {
|
|
3022
|
+
super(agGridTableThButtonStyles);
|
|
3023
|
+
this.clickHandler = (event) => {
|
|
3024
|
+
this.handleSortingCycle(event);
|
|
3025
|
+
};
|
|
3026
|
+
this.keypressHandler = (event) => {
|
|
3027
|
+
if (event.code === "Enter") {
|
|
3028
|
+
this.handleSortingCycle();
|
|
3029
|
+
}
|
|
3030
|
+
};
|
|
3031
|
+
this.shadowRoot.innerHTML = this.template();
|
|
3032
|
+
}
|
|
2999
3033
|
template() {
|
|
3000
3034
|
return `
|
|
3001
3035
|
<button class="ag-grid-table-th-button">
|
|
@@ -3004,15 +3038,6 @@ const _AgGridTableThButton = class _AgGridTableThButton extends PxElement {
|
|
|
3004
3038
|
</button>
|
|
3005
3039
|
`;
|
|
3006
3040
|
}
|
|
3007
|
-
constructor() {
|
|
3008
|
-
var _a;
|
|
3009
|
-
super(agGridTableThButtonStyles);
|
|
3010
|
-
this.shadowRoot.innerHTML = this.template();
|
|
3011
|
-
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
3012
|
-
if (this.internals) {
|
|
3013
|
-
this.internals.ariaHidden = "true";
|
|
3014
|
-
}
|
|
3015
|
-
}
|
|
3016
3041
|
connectedCallback() {
|
|
3017
3042
|
var _a, _b, _c;
|
|
3018
3043
|
super.connectedCallback();
|
|
@@ -3024,14 +3049,8 @@ const _AgGridTableThButton = class _AgGridTableThButton extends PxElement {
|
|
|
3024
3049
|
"aria-label",
|
|
3025
3050
|
"Sortable column header, press ctrl + enter to sort"
|
|
3026
3051
|
);
|
|
3027
|
-
this.addEventListener(
|
|
3028
|
-
|
|
3029
|
-
(event) => this.cycleToNextSortingValue(event)
|
|
3030
|
-
);
|
|
3031
|
-
(_c = this.$columnHeader) == null ? void 0 : _c.addEventListener(
|
|
3032
|
-
"keypress",
|
|
3033
|
-
(event) => this.setKeypressEvent(event)
|
|
3034
|
-
);
|
|
3052
|
+
this.addEventListener("click", this.clickHandler);
|
|
3053
|
+
(_c = this.$columnHeader) == null ? void 0 : _c.addEventListener("keypress", this.keypressHandler);
|
|
3035
3054
|
}
|
|
3036
3055
|
static get observedAttributes() {
|
|
3037
3056
|
return [
|
|
@@ -3063,8 +3082,8 @@ const _AgGridTableThButton = class _AgGridTableThButton extends PxElement {
|
|
|
3063
3082
|
}
|
|
3064
3083
|
disconnectedCallback() {
|
|
3065
3084
|
var _a;
|
|
3066
|
-
this.removeEventListener("click", this.
|
|
3067
|
-
(_a = this.$columnHeader) == null ? void 0 : _a.removeEventListener("keypress", this.
|
|
3085
|
+
this.removeEventListener("click", this.clickHandler);
|
|
3086
|
+
(_a = this.$columnHeader) == null ? void 0 : _a.removeEventListener("keypress", this.keypressHandler);
|
|
3068
3087
|
}
|
|
3069
3088
|
updateSorting(oldValue, newValue, attrValue) {
|
|
3070
3089
|
var _a, _b;
|
|
@@ -3090,21 +3109,25 @@ const _AgGridTableThButton = class _AgGridTableThButton extends PxElement {
|
|
|
3090
3109
|
(_b = this.$columnHeader) == null ? void 0 : _b.setAttribute("aria-label", newValue);
|
|
3091
3110
|
}
|
|
3092
3111
|
}
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3112
|
+
clickAgGridTableThButton(value) {
|
|
3113
|
+
this.dispatchEvent(
|
|
3114
|
+
new CustomEvent(CLICK_EVENT$1, {
|
|
3115
|
+
bubbles: true,
|
|
3116
|
+
composed: true,
|
|
3117
|
+
detail: { value }
|
|
3118
|
+
})
|
|
3119
|
+
);
|
|
3101
3120
|
}
|
|
3102
3121
|
cycleToNextSortingValue(event) {
|
|
3122
|
+
event == null ? void 0 : event.stopPropagation();
|
|
3123
|
+
event == null ? void 0 : event.preventDefault();
|
|
3103
3124
|
const currentSorting = sortingValues.indexOf(this.sorting);
|
|
3104
3125
|
const nextSorting = (currentSorting + 1) % sortingValues.length;
|
|
3105
3126
|
this.sorting = sortingValues[nextSorting];
|
|
3106
|
-
|
|
3107
|
-
|
|
3127
|
+
}
|
|
3128
|
+
handleSortingCycle(event) {
|
|
3129
|
+
this.cycleToNextSortingValue(event);
|
|
3130
|
+
this.clickAgGridTableThButton(this.sorting);
|
|
3108
3131
|
}
|
|
3109
3132
|
get $slottedThContent() {
|
|
3110
3133
|
return this.querySelector("px-ag-grid-table-th-content");
|
|
@@ -7848,32 +7871,39 @@ if (!customElements.get("px-color-option-link")) {
|
|
|
7848
7871
|
customElements.define("px-color-option-link", ColorOptionLink);
|
|
7849
7872
|
}
|
|
7850
7873
|
const contentHeaderCss = ":host{--min-height--mobile: 15.625em;--min-height--tablet: 17.5em;--min-height--laptop: 17.5em;--min-height--desktop: 17.5em}:host,:host>*{display:block;box-sizing:border-box}.content-header{position:relative;z-index:0}[min-height] .content-header-content{min-height:calc(var(--min-height--mobile) - (var(--px-spacing-l-mobile) * 2))}.content-header-content{display:flex;flex-direction:column;gap:var(--px-spacing-l-mobile);z-index:2;position:relative;box-sizing:border-box}.contrast-helper{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none;display:none}[contrast-helper-gradient] .contrast-helper{display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}[inverted] :is([contrast-helper-gradient] .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}[contrast-helper-overlay] .contrast-helper{display:block;background-color:#ffffffb3}[inverted] :is([contrast-helper-overlay] .contrast-helper){background-color:#0006}@media only screen and (min-width: 48em){.content-header-content{gap:var(--px-spacing-l-desktop)}[min-height] .content-header-content{min-height:calc(var(--min-height--tablet) - (var(--px-spacing-l-tablet) * 2))}}@media only screen and (min-width: 64.0625em){.content-header-content{gap:var(--px-spacing-l-laptop)}[min-height] .content-header-content{min-height:calc(var(--min-height--laptop) - (var(--px-spacing-l-laptop) * 2))}}";
|
|
7851
|
-
const
|
|
7852
|
-
|
|
7853
|
-
|
|
7874
|
+
const styles$w = ':host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:var(--px-content-wrapper-max-width-desktop)}@media only screen and (min-width: 77em){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-overlapped-mobile) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-mobile)}@media only screen and (min-width: 48em){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}@media only screen and (min-width: 64.0625em){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}';
|
|
7875
|
+
const styleSheet$q = new CSSStyleSheet();
|
|
7876
|
+
styleSheet$q.replaceSync(styles$w);
|
|
7877
|
+
class Section extends HTMLElement {
|
|
7854
7878
|
constructor() {
|
|
7855
|
-
super(
|
|
7856
|
-
this.template = () =>
|
|
7857
|
-
|
|
7858
|
-
<
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
<
|
|
7862
|
-
<
|
|
7863
|
-
|
|
7864
|
-
|
|
7865
|
-
|
|
7866
|
-
|
|
7867
|
-
|
|
7868
|
-
|
|
7869
|
-
|
|
7870
|
-
|
|
7871
|
-
|
|
7872
|
-
</px-grid>
|
|
7873
|
-
${this.$overlapSlot ? `<slot name="overlap" slot="overlap"></slot>` : ""}
|
|
7874
|
-
</px-section>
|
|
7875
|
-
</div>`;
|
|
7879
|
+
super();
|
|
7880
|
+
this.template = () => `
|
|
7881
|
+
<px-container border-radius="none" padding-inline="none" background-color="${this.backgroundColor}">
|
|
7882
|
+
<div class="content-wrapper ${this.$slotOverlap ? "overlapped" : ""}">
|
|
7883
|
+
<px-vstack gap="heading-to-content">
|
|
7884
|
+
<slot name="heading"></slot>
|
|
7885
|
+
<px-vstack gap="none">
|
|
7886
|
+
<slot></slot>
|
|
7887
|
+
</px-vstack>
|
|
7888
|
+
</px-vstack>
|
|
7889
|
+
</div>
|
|
7890
|
+
</px-container>
|
|
7891
|
+
<div class="content-wrapper">
|
|
7892
|
+
<slot name="overlap"></slot>
|
|
7893
|
+
</div>
|
|
7894
|
+
`;
|
|
7895
|
+
this.attachShadow({ mode: "open" });
|
|
7876
7896
|
this.shadowRoot.innerHTML = this.template();
|
|
7897
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$q];
|
|
7898
|
+
}
|
|
7899
|
+
connectedCallback() {
|
|
7900
|
+
const headingSlot = this.querySelector('[slot="heading"]');
|
|
7901
|
+
if (!this.paddingBlock && !this.paddingTop && !this.paddingBottom && !this.paddingBlockMobile && !this.paddingTopMobile && !this.paddingBottomMobile && !this.paddingBlockTablet && !this.paddingTopTablet && !this.paddingBottomTablet && !this.paddingBlockLaptop && !this.paddingTopLaptop && !this.paddingBottomLaptop) {
|
|
7902
|
+
this.$container.paddingBlock = "none";
|
|
7903
|
+
}
|
|
7904
|
+
if (!headingSlot) {
|
|
7905
|
+
this.shadowRoot.querySelector("px-vstack").setAttribute("gap", "none");
|
|
7906
|
+
}
|
|
7877
7907
|
}
|
|
7878
7908
|
static get observedAttributes() {
|
|
7879
7909
|
return [
|
|
@@ -7885,137 +7915,114 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
7885
7915
|
"background-image--laptop",
|
|
7886
7916
|
"background-size",
|
|
7887
7917
|
"background-position",
|
|
7888
|
-
"
|
|
7889
|
-
"
|
|
7890
|
-
"
|
|
7891
|
-
"
|
|
7892
|
-
"
|
|
7893
|
-
"
|
|
7894
|
-
"
|
|
7895
|
-
"
|
|
7918
|
+
"padding-block",
|
|
7919
|
+
"padding-top",
|
|
7920
|
+
"padding-bottom",
|
|
7921
|
+
"padding-block--mobile",
|
|
7922
|
+
"padding-top--mobile",
|
|
7923
|
+
"padding-bottom--mobile",
|
|
7924
|
+
"padding-block--tablet",
|
|
7925
|
+
"padding-top--tablet",
|
|
7926
|
+
"padding-bottom--tablet",
|
|
7927
|
+
"padding-block--laptop",
|
|
7928
|
+
"padding-top--laptop",
|
|
7929
|
+
"padding-bottom--laptop",
|
|
7930
|
+
"border",
|
|
7931
|
+
"border-side",
|
|
7932
|
+
"border-side--mobile",
|
|
7933
|
+
"border-side--tablet",
|
|
7934
|
+
"border-side--laptop"
|
|
7896
7935
|
];
|
|
7897
7936
|
}
|
|
7898
|
-
|
|
7899
|
-
|
|
7900
|
-
(_a = super.connectedCallback) == null ? void 0 : _a.call(this);
|
|
7901
|
-
if (this.$subtitleSlot) {
|
|
7902
|
-
this.$subtitleSlot.setAttribute("variant", "subtitle");
|
|
7903
|
-
}
|
|
7904
|
-
if (this.$patchDescriptionSlot) {
|
|
7905
|
-
if (this.$patchDescriptionSlot.localName === "px-p") {
|
|
7906
|
-
this.$patchDescriptionSlot.setAttribute("variant", "default");
|
|
7907
|
-
}
|
|
7908
|
-
if (this.$patchDescriptionSlot.localName === "px-p" || this.$patchDescriptionSlot.localName === "px-span") {
|
|
7909
|
-
this.$patchDescriptionSlot.setAttribute("font-size", "body-l");
|
|
7910
|
-
this.$patchDescriptionSlot.removeAttribute("font-weight");
|
|
7911
|
-
this.$patchDescriptionSlot.removeAttribute("color");
|
|
7912
|
-
}
|
|
7913
|
-
if (this.$patchDescriptionSlot.localName === "px-price") {
|
|
7914
|
-
this.$patchDescriptionSlot.setAttribute("size", "m");
|
|
7915
|
-
}
|
|
7916
|
-
}
|
|
7917
|
-
this.createGridding();
|
|
7937
|
+
get $container() {
|
|
7938
|
+
return this.shadowRoot.querySelector("px-container");
|
|
7918
7939
|
}
|
|
7919
|
-
attributeChangedCallback(
|
|
7940
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
|
7920
7941
|
if (oldValue !== newValue) {
|
|
7921
|
-
switch (
|
|
7942
|
+
switch (name) {
|
|
7922
7943
|
case "background-color":
|
|
7923
|
-
this.$
|
|
7944
|
+
this.$container.backgroundColor = backgroundColorValues.indexOf(newValue) > 0 ? newValue : "none";
|
|
7924
7945
|
break;
|
|
7925
7946
|
case "background-gradient":
|
|
7926
|
-
this.$
|
|
7947
|
+
this.$container.gradient = this.gradient;
|
|
7927
7948
|
break;
|
|
7928
7949
|
case "background-image":
|
|
7929
|
-
this.$
|
|
7950
|
+
this.$container.backgroundImage = newValue;
|
|
7930
7951
|
break;
|
|
7931
7952
|
case "background-image--mobile":
|
|
7932
|
-
this.$
|
|
7953
|
+
this.$container.backgroundImageMobile = newValue;
|
|
7933
7954
|
break;
|
|
7934
7955
|
case "background-image--tablet":
|
|
7935
|
-
this.$
|
|
7956
|
+
this.$container.backgroundImageTablet = newValue;
|
|
7936
7957
|
break;
|
|
7937
7958
|
case "background-image--laptop":
|
|
7938
|
-
this.$
|
|
7959
|
+
this.$container.backgroundImageLaptop = newValue;
|
|
7939
7960
|
break;
|
|
7940
7961
|
case "background-size":
|
|
7941
|
-
this.$
|
|
7962
|
+
this.$container.backgroundSize = newValue;
|
|
7942
7963
|
break;
|
|
7943
7964
|
case "background-position":
|
|
7944
|
-
this.$
|
|
7965
|
+
this.$container.backgroundPosition = newValue;
|
|
7945
7966
|
break;
|
|
7946
|
-
case "
|
|
7947
|
-
|
|
7948
|
-
case "has-gridding--tablet":
|
|
7949
|
-
case "has-gridding--laptop":
|
|
7950
|
-
this.createGridding();
|
|
7967
|
+
case "padding-block":
|
|
7968
|
+
this.$container.paddingBlock = newValue;
|
|
7951
7969
|
break;
|
|
7952
|
-
case "
|
|
7953
|
-
|
|
7954
|
-
if (!this.$children[i].hasAttribute("inverted")) {
|
|
7955
|
-
this.$children[i].toggleAttribute("inverted");
|
|
7956
|
-
}
|
|
7957
|
-
}
|
|
7958
|
-
this.$h1.toggleAttribute("inverted", newValue !== null);
|
|
7959
|
-
this.$el.toggleAttribute("inverted", newValue !== null);
|
|
7970
|
+
case "padding-top":
|
|
7971
|
+
this.$container.paddingTop = newValue;
|
|
7960
7972
|
break;
|
|
7961
|
-
|
|
7962
|
-
|
|
7973
|
+
case "padding-bottom":
|
|
7974
|
+
this.$container.paddingBottom = newValue;
|
|
7975
|
+
break;
|
|
7976
|
+
case "padding-block--mobile":
|
|
7977
|
+
this.$container.paddingBlockMobile = newValue;
|
|
7978
|
+
break;
|
|
7979
|
+
case "padding-top--mobile":
|
|
7980
|
+
this.$container.paddingTopMobile = newValue;
|
|
7981
|
+
break;
|
|
7982
|
+
case "padding-bottom--mobile":
|
|
7983
|
+
this.$container.paddingBottomMobile = newValue;
|
|
7984
|
+
break;
|
|
7985
|
+
case "padding-block--tablet":
|
|
7986
|
+
this.$container.paddingBlockTablet = newValue;
|
|
7987
|
+
break;
|
|
7988
|
+
case "padding-top--tablet":
|
|
7989
|
+
this.$container.paddingTopTablet = newValue;
|
|
7990
|
+
break;
|
|
7991
|
+
case "padding-bottom--tablet":
|
|
7992
|
+
this.$container.paddingBottomTablet = newValue;
|
|
7993
|
+
break;
|
|
7994
|
+
case "padding-block--laptop":
|
|
7995
|
+
this.$container.paddingBlockLaptop = newValue;
|
|
7996
|
+
break;
|
|
7997
|
+
case "padding-top--laptop":
|
|
7998
|
+
this.$container.paddingTopLaptop = newValue;
|
|
7999
|
+
break;
|
|
8000
|
+
case "padding-bottom--laptop":
|
|
8001
|
+
this.$container.paddingBottomLaptop = newValue;
|
|
8002
|
+
break;
|
|
8003
|
+
case "border":
|
|
8004
|
+
this.$container.border = newValue;
|
|
8005
|
+
break;
|
|
8006
|
+
case "border-side":
|
|
8007
|
+
this.$container.borderSide = newValue;
|
|
8008
|
+
break;
|
|
8009
|
+
case "border-side--mobile":
|
|
8010
|
+
this.$container.borderSideMobile = newValue;
|
|
8011
|
+
break;
|
|
8012
|
+
case "border-side--tablet":
|
|
8013
|
+
this.$container.borderSideTablet = newValue;
|
|
8014
|
+
break;
|
|
8015
|
+
case "border-side--laptop":
|
|
8016
|
+
this.$container.borderSideLaptop = newValue;
|
|
7963
8017
|
break;
|
|
7964
8018
|
}
|
|
7965
8019
|
}
|
|
7966
8020
|
}
|
|
7967
|
-
|
|
7968
|
-
const breakpoints = [
|
|
7969
|
-
{ prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
|
|
7970
|
-
{
|
|
7971
|
-
prop: "hasGriddingMobile",
|
|
7972
|
-
gridProp: "gridColsMobile",
|
|
7973
|
-
attr: "col-span--mobile"
|
|
7974
|
-
},
|
|
7975
|
-
{
|
|
7976
|
-
prop: "hasGriddingTablet",
|
|
7977
|
-
gridProp: "gridColsTablet",
|
|
7978
|
-
attr: "col-span--tablet"
|
|
7979
|
-
},
|
|
7980
|
-
{
|
|
7981
|
-
prop: "hasGriddingLaptop",
|
|
7982
|
-
gridProp: "gridColsLaptop",
|
|
7983
|
-
attr: "col-span--laptop"
|
|
7984
|
-
}
|
|
7985
|
-
];
|
|
7986
|
-
const spanElement = this.shadowRoot.querySelector(
|
|
7987
|
-
"px-grid > px-container"
|
|
7988
|
-
);
|
|
7989
|
-
breakpoints.forEach(({ prop, gridProp, attr }) => {
|
|
7990
|
-
if (this[prop]) {
|
|
7991
|
-
this.$grid[gridProp] = "3";
|
|
7992
|
-
spanElement.setAttribute(attr, "2");
|
|
7993
|
-
}
|
|
7994
|
-
});
|
|
7995
|
-
}
|
|
7996
|
-
get $grid() {
|
|
7997
|
-
return this.shadowRoot.querySelector("px-grid");
|
|
7998
|
-
}
|
|
7999
|
-
get $section() {
|
|
8000
|
-
return this.shadowRoot.querySelector("px-section");
|
|
8001
|
-
}
|
|
8002
|
-
get $h1() {
|
|
8003
|
-
return this.shadowRoot.querySelector("px-h1");
|
|
8004
|
-
}
|
|
8005
|
-
get $subtitleSlot() {
|
|
8006
|
-
return this.querySelector('[slot="subtitle"]');
|
|
8007
|
-
}
|
|
8008
|
-
get $patchDescriptionSlot() {
|
|
8009
|
-
return this.querySelector('[slot="patch-description"]');
|
|
8010
|
-
}
|
|
8011
|
-
get $overlapSlot() {
|
|
8021
|
+
get $slotOverlap() {
|
|
8012
8022
|
return this.querySelector('[slot="overlap"]');
|
|
8013
8023
|
}
|
|
8014
|
-
get $children() {
|
|
8015
|
-
return this.querySelectorAll("px-content-header > *");
|
|
8016
|
-
}
|
|
8017
8024
|
get backgroundColor() {
|
|
8018
|
-
return this.getAttribute("background-color");
|
|
8025
|
+
return this.getAttribute("background-color") || "none";
|
|
8019
8026
|
}
|
|
8020
8027
|
set backgroundColor(value) {
|
|
8021
8028
|
this.setAttribute("background-color", value);
|
|
@@ -8062,331 +8069,221 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8062
8069
|
set backgroundPosition(value) {
|
|
8063
8070
|
this.setAttribute("background-position", value);
|
|
8064
8071
|
}
|
|
8065
|
-
get
|
|
8066
|
-
return this.
|
|
8072
|
+
get paddingBlock() {
|
|
8073
|
+
return this.getAttribute("padding-block");
|
|
8067
8074
|
}
|
|
8068
|
-
set
|
|
8069
|
-
|
|
8070
|
-
this.setAttribute("contrast-helper-gradient", "");
|
|
8071
|
-
} else {
|
|
8072
|
-
this.removeAttribute("contrast-helper-gradient");
|
|
8073
|
-
}
|
|
8075
|
+
set paddingBlock(value) {
|
|
8076
|
+
this.setAttribute("padding-block", value);
|
|
8074
8077
|
}
|
|
8075
|
-
get
|
|
8076
|
-
return this.
|
|
8078
|
+
get paddingTop() {
|
|
8079
|
+
return this.getAttribute("padding-top");
|
|
8077
8080
|
}
|
|
8078
|
-
set
|
|
8079
|
-
|
|
8080
|
-
this.setAttribute("contrast-helper-overlay", "");
|
|
8081
|
-
} else {
|
|
8082
|
-
this.removeAttribute("contrast-helper-overlay");
|
|
8083
|
-
}
|
|
8081
|
+
set paddingTop(value) {
|
|
8082
|
+
this.setAttribute("padding-top", value);
|
|
8084
8083
|
}
|
|
8085
|
-
get
|
|
8086
|
-
return this.
|
|
8084
|
+
get paddingBottom() {
|
|
8085
|
+
return this.getAttribute("padding-bottom");
|
|
8087
8086
|
}
|
|
8088
|
-
set
|
|
8089
|
-
|
|
8090
|
-
this.setAttribute("has-gridding", "");
|
|
8091
|
-
} else {
|
|
8092
|
-
this.removeAttribute("has-gridding");
|
|
8093
|
-
}
|
|
8087
|
+
set paddingBottom(value) {
|
|
8088
|
+
this.setAttribute("padding-bottom", value);
|
|
8094
8089
|
}
|
|
8095
|
-
get
|
|
8096
|
-
return this.
|
|
8090
|
+
get paddingBlockMobile() {
|
|
8091
|
+
return this.getAttribute("padding-block--mobile");
|
|
8097
8092
|
}
|
|
8098
|
-
set
|
|
8099
|
-
|
|
8100
|
-
this.setAttribute("has-gridding--mobile", "");
|
|
8101
|
-
} else {
|
|
8102
|
-
this.removeAttribute("has-gridding--mobile");
|
|
8103
|
-
}
|
|
8093
|
+
set paddingBlockMobile(value) {
|
|
8094
|
+
this.setAttribute("padding-block--mobile", value);
|
|
8104
8095
|
}
|
|
8105
|
-
get
|
|
8106
|
-
return this.
|
|
8096
|
+
get paddingTopMobile() {
|
|
8097
|
+
return this.getAttribute("padding-top--mobile");
|
|
8107
8098
|
}
|
|
8108
|
-
set
|
|
8109
|
-
|
|
8110
|
-
this.setAttribute("has-gridding--tablet", "");
|
|
8111
|
-
} else {
|
|
8112
|
-
this.removeAttribute("has-gridding--tablet");
|
|
8113
|
-
}
|
|
8099
|
+
set paddingTopMobile(value) {
|
|
8100
|
+
this.setAttribute("padding-top--mobile", value);
|
|
8114
8101
|
}
|
|
8115
|
-
get
|
|
8116
|
-
return this.
|
|
8102
|
+
get paddingBottomMobile() {
|
|
8103
|
+
return this.getAttribute("padding-bottom--mobile");
|
|
8117
8104
|
}
|
|
8118
|
-
set
|
|
8119
|
-
|
|
8120
|
-
this.setAttribute("has-gridding--laptop", "");
|
|
8121
|
-
} else {
|
|
8122
|
-
this.removeAttribute("has-gridding--laptop");
|
|
8123
|
-
}
|
|
8105
|
+
set paddingBottomMobile(value) {
|
|
8106
|
+
this.setAttribute("padding-bottom--mobile", value);
|
|
8124
8107
|
}
|
|
8125
|
-
get
|
|
8126
|
-
return this.
|
|
8108
|
+
get paddingBlockTablet() {
|
|
8109
|
+
return this.getAttribute("padding-block--tablet");
|
|
8127
8110
|
}
|
|
8128
|
-
set
|
|
8129
|
-
|
|
8130
|
-
this.setAttribute("inverted", "");
|
|
8131
|
-
} else {
|
|
8132
|
-
this.removeAttribute("inverted");
|
|
8133
|
-
}
|
|
8111
|
+
set paddingBlockTablet(value) {
|
|
8112
|
+
this.setAttribute("padding-block--tablet", value);
|
|
8134
8113
|
}
|
|
8135
|
-
get
|
|
8136
|
-
return this.
|
|
8114
|
+
get paddingTopTablet() {
|
|
8115
|
+
return this.getAttribute("padding-top--tablet");
|
|
8137
8116
|
}
|
|
8138
|
-
set
|
|
8139
|
-
|
|
8140
|
-
this.setAttribute("min-height", "");
|
|
8141
|
-
} else {
|
|
8142
|
-
this.removeAttribute("min-height");
|
|
8143
|
-
}
|
|
8117
|
+
set paddingTopTablet(value) {
|
|
8118
|
+
this.setAttribute("padding-top--tablet", value);
|
|
8144
8119
|
}
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
let ContentHeader = _ContentHeader;
|
|
8148
|
-
if (!customElements.get("px-content-header")) {
|
|
8149
|
-
customElements.define("px-content-header", ContentHeader);
|
|
8150
|
-
}
|
|
8151
|
-
const styles$w = ".separator{--separator-size: var(--px-size-border-m);--separator-direction--mobile-border-width: var(--separator-size) 0 0;--separator-direction--mobile-width: initial;--separator-direction--mobile-height: initial;clear:both;margin:0;border-style:solid;border-color:var( --separator-color-default, var(--px-color-border-main-default) );border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-horizontal--mobile{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--mobile{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}:host([inverted]) .separator{border-color:var( --separator-color-inverted, var(--px-color-border-main-inverted) )}@media only screen and (min-width: 768px){.separator-direction-horizontal--tablet{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--tablet{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}}@media only screen and (min-width: 1025px){.separator-direction-horizontal--laptop{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--laptop{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}}@media only screen and (min-width: 1441px){.separator-direction-horizontal--desktop{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--desktop{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}}";
|
|
8152
|
-
const styleSheet$q = new CSSStyleSheet();
|
|
8153
|
-
styleSheet$q.replaceSync(styles$w);
|
|
8154
|
-
const separatorDirectionValues = [
|
|
8155
|
-
"",
|
|
8156
|
-
"default",
|
|
8157
|
-
"horizontal",
|
|
8158
|
-
"vertical"
|
|
8159
|
-
];
|
|
8160
|
-
const separatorSizeValues = ["", "default", "none", "s", "m", "l"];
|
|
8161
|
-
const separatorColorValues = [
|
|
8162
|
-
"",
|
|
8163
|
-
"main",
|
|
8164
|
-
"brand",
|
|
8165
|
-
"none",
|
|
8166
|
-
"neutral",
|
|
8167
|
-
"purpose-success",
|
|
8168
|
-
"purpose-warning",
|
|
8169
|
-
"purpose-error",
|
|
8170
|
-
"purpose-unlimited",
|
|
8171
|
-
"state-hover",
|
|
8172
|
-
"state-active"
|
|
8173
|
-
];
|
|
8174
|
-
const _Separator = class _Separator extends PxElement {
|
|
8175
|
-
constructor() {
|
|
8176
|
-
var _a;
|
|
8177
|
-
super(styleSheet$q);
|
|
8178
|
-
const $root = document.createElement(this.nativeName);
|
|
8179
|
-
$root.classList.add("separator");
|
|
8180
|
-
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
8181
|
-
this.shadowRoot.appendChild($root);
|
|
8120
|
+
get paddingBottomTablet() {
|
|
8121
|
+
return this.getAttribute("padding-bottom--tablet");
|
|
8182
8122
|
}
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
...super.observedAttributes,
|
|
8186
|
-
"direction",
|
|
8187
|
-
"direction--mobile",
|
|
8188
|
-
"direction--tablet",
|
|
8189
|
-
"direction--laptop",
|
|
8190
|
-
"direction--desktop",
|
|
8191
|
-
"size",
|
|
8192
|
-
"color",
|
|
8193
|
-
"inverted"
|
|
8194
|
-
];
|
|
8123
|
+
set paddingBottomTablet(value) {
|
|
8124
|
+
this.setAttribute("padding-bottom--tablet", value);
|
|
8195
8125
|
}
|
|
8196
|
-
|
|
8197
|
-
|
|
8198
|
-
switch (attrName) {
|
|
8199
|
-
case "direction":
|
|
8200
|
-
case "direction--mobile":
|
|
8201
|
-
case "direction--tablet":
|
|
8202
|
-
case "direction--laptop":
|
|
8203
|
-
case "direction--desktop":
|
|
8204
|
-
this.updateDirection(
|
|
8205
|
-
attrName,
|
|
8206
|
-
oldValue,
|
|
8207
|
-
newValue,
|
|
8208
|
-
separatorDirectionValues
|
|
8209
|
-
);
|
|
8210
|
-
break;
|
|
8211
|
-
case "size":
|
|
8212
|
-
this.updateSize(attrName, oldValue, newValue, separatorSizeValues);
|
|
8213
|
-
break;
|
|
8214
|
-
case "color":
|
|
8215
|
-
this.updateColor(attrName, oldValue, newValue, separatorColorValues);
|
|
8216
|
-
break;
|
|
8217
|
-
default:
|
|
8218
|
-
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
8219
|
-
break;
|
|
8220
|
-
}
|
|
8221
|
-
}
|
|
8126
|
+
get paddingBlockLaptop() {
|
|
8127
|
+
return this.getAttribute("padding-block--laptop");
|
|
8222
8128
|
}
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
if (value !== null && value !== "" && value !== "default") {
|
|
8226
|
-
this.$el.style.setProperty(
|
|
8227
|
-
"--separator-size",
|
|
8228
|
-
`var(--px-size-border-${value})`
|
|
8229
|
-
);
|
|
8230
|
-
}
|
|
8231
|
-
};
|
|
8232
|
-
if (!this.checkName(attrValue, newValue)) {
|
|
8233
|
-
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
8234
|
-
} else {
|
|
8235
|
-
updateSizeStyle(oldValue);
|
|
8236
|
-
updateSizeStyle(newValue);
|
|
8237
|
-
}
|
|
8129
|
+
set paddingBlockLaptop(value) {
|
|
8130
|
+
this.setAttribute("padding-block--laptop", value);
|
|
8238
8131
|
}
|
|
8239
|
-
|
|
8240
|
-
|
|
8241
|
-
if (value !== null && value !== "" && value !== "default") {
|
|
8242
|
-
this.$el.style.setProperty(
|
|
8243
|
-
`--separator-color-default`,
|
|
8244
|
-
`var(--px-color-border-${value}-default)`
|
|
8245
|
-
);
|
|
8246
|
-
this.$el.style.setProperty(
|
|
8247
|
-
`--separator-color-inverted`,
|
|
8248
|
-
`var(--px-color-border-${value}-inverted)`
|
|
8249
|
-
);
|
|
8250
|
-
}
|
|
8251
|
-
};
|
|
8252
|
-
if (!this.checkName(attrValue, newValue)) {
|
|
8253
|
-
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
8254
|
-
} else {
|
|
8255
|
-
updateColorStyle(oldValue);
|
|
8256
|
-
updateColorStyle(newValue);
|
|
8257
|
-
}
|
|
8132
|
+
get paddingTopLaptop() {
|
|
8133
|
+
return this.getAttribute("padding-top--laptop");
|
|
8258
8134
|
}
|
|
8259
|
-
|
|
8260
|
-
|
|
8261
|
-
if (value !== null && value !== "" && value !== "default") {
|
|
8262
|
-
this.$el.classList.add(`separator-direction-${value}--${breakpoint}`);
|
|
8263
|
-
}
|
|
8264
|
-
};
|
|
8265
|
-
if (!this.checkName(attrValue, newValue)) {
|
|
8266
|
-
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
8267
|
-
} else {
|
|
8268
|
-
if (attrName === "direction") {
|
|
8269
|
-
["mobile", "tablet", "laptop", "desktop"].forEach((breakpoint) => {
|
|
8270
|
-
const existingClass = Array.from(this.$el.classList).find(
|
|
8271
|
-
(className) => className.startsWith(`separator-direction-`) && className.endsWith(`--${breakpoint}`)
|
|
8272
|
-
);
|
|
8273
|
-
if (!existingClass) {
|
|
8274
|
-
updateDirectionClass(breakpoint, newValue);
|
|
8275
|
-
}
|
|
8276
|
-
});
|
|
8277
|
-
} else {
|
|
8278
|
-
const breakpoint = attrName.split("--")[1];
|
|
8279
|
-
const existingClass = Array.from(this.$el.classList).find(
|
|
8280
|
-
(className) => className.startsWith(`separator-direction-`) && className.endsWith(`--${breakpoint}`)
|
|
8281
|
-
);
|
|
8282
|
-
if (existingClass) {
|
|
8283
|
-
this.$el.classList.replace(
|
|
8284
|
-
existingClass,
|
|
8285
|
-
`separator-direction-${newValue}--${breakpoint}`
|
|
8286
|
-
);
|
|
8287
|
-
} else {
|
|
8288
|
-
updateDirectionClass(breakpoint, newValue);
|
|
8289
|
-
}
|
|
8290
|
-
}
|
|
8291
|
-
}
|
|
8292
|
-
}
|
|
8293
|
-
get direction() {
|
|
8294
|
-
return this.getAttribute("direction");
|
|
8295
|
-
}
|
|
8296
|
-
set direction(value) {
|
|
8297
|
-
this.setAttribute("direction", value);
|
|
8298
|
-
}
|
|
8299
|
-
get directionMobile() {
|
|
8300
|
-
return this.getAttribute("direction--mobile");
|
|
8301
|
-
}
|
|
8302
|
-
set directionMobile(value) {
|
|
8303
|
-
this.setAttribute("direction--mobile", value);
|
|
8135
|
+
set paddingTopLaptop(value) {
|
|
8136
|
+
this.setAttribute("padding-top--laptop", value);
|
|
8304
8137
|
}
|
|
8305
|
-
get
|
|
8306
|
-
return this.getAttribute("
|
|
8138
|
+
get paddingBottomLaptop() {
|
|
8139
|
+
return this.getAttribute("padding-bottom--laptop");
|
|
8307
8140
|
}
|
|
8308
|
-
set
|
|
8309
|
-
this.setAttribute("
|
|
8141
|
+
set paddingBottomLaptop(value) {
|
|
8142
|
+
this.setAttribute("padding-bottom--laptop", value);
|
|
8310
8143
|
}
|
|
8311
|
-
get
|
|
8312
|
-
return this.getAttribute("
|
|
8144
|
+
get border() {
|
|
8145
|
+
return this.getAttribute("border");
|
|
8313
8146
|
}
|
|
8314
|
-
set
|
|
8315
|
-
this.setAttribute("
|
|
8147
|
+
set border(value) {
|
|
8148
|
+
this.setAttribute("border", value);
|
|
8316
8149
|
}
|
|
8317
|
-
get
|
|
8318
|
-
return this.getAttribute("
|
|
8150
|
+
get borderSide() {
|
|
8151
|
+
return this.getAttribute("border-side");
|
|
8319
8152
|
}
|
|
8320
|
-
set
|
|
8321
|
-
this.setAttribute("
|
|
8153
|
+
set borderSide(value) {
|
|
8154
|
+
this.setAttribute("border-side", value);
|
|
8322
8155
|
}
|
|
8323
|
-
get
|
|
8324
|
-
return this.getAttribute("
|
|
8156
|
+
get borderSideMobile() {
|
|
8157
|
+
return this.getAttribute("border-side--mobile");
|
|
8325
8158
|
}
|
|
8326
|
-
set
|
|
8327
|
-
this.setAttribute("
|
|
8159
|
+
set borderSideMobile(value) {
|
|
8160
|
+
this.setAttribute("border-side--mobile", value);
|
|
8328
8161
|
}
|
|
8329
|
-
get
|
|
8330
|
-
return this.getAttribute("
|
|
8162
|
+
get borderSideTablet() {
|
|
8163
|
+
return this.getAttribute("border-side--tablet");
|
|
8331
8164
|
}
|
|
8332
|
-
set
|
|
8333
|
-
this.setAttribute("
|
|
8165
|
+
set borderSideTablet(value) {
|
|
8166
|
+
this.setAttribute("border-side--tablet", value);
|
|
8334
8167
|
}
|
|
8335
|
-
get
|
|
8336
|
-
return this.getAttribute("
|
|
8168
|
+
get borderSideLaptop() {
|
|
8169
|
+
return this.getAttribute("border-side--laptop");
|
|
8337
8170
|
}
|
|
8338
|
-
set
|
|
8339
|
-
this.setAttribute("
|
|
8171
|
+
set borderSideLaptop(value) {
|
|
8172
|
+
this.setAttribute("border-side--laptop", value);
|
|
8340
8173
|
}
|
|
8341
|
-
};
|
|
8342
|
-
_Separator.nativeName = "hr";
|
|
8343
|
-
let Separator = _Separator;
|
|
8344
|
-
if (!customElements.get("px-separator")) {
|
|
8345
|
-
customElements.define("px-separator", Separator);
|
|
8346
8174
|
}
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
const
|
|
8351
|
-
|
|
8352
|
-
class
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
|
|
8357
|
-
|
|
8358
|
-
|
|
8359
|
-
|
|
8360
|
-
|
|
8175
|
+
if (!customElements.get("px-section")) {
|
|
8176
|
+
customElements.define("px-section", Section);
|
|
8177
|
+
}
|
|
8178
|
+
const contentHeaderStyles = new CSSStyleSheet();
|
|
8179
|
+
contentHeaderStyles.replaceSync(contentHeaderCss);
|
|
8180
|
+
const _ContentHeader = class _ContentHeader extends PxElement {
|
|
8181
|
+
constructor() {
|
|
8182
|
+
super(contentHeaderStyles);
|
|
8183
|
+
this.template = () => `<div class="content-header">
|
|
8184
|
+
<div class="contrast-helper"></div>
|
|
8185
|
+
<px-section padding-block="l">
|
|
8186
|
+
<px-grid gap="none">
|
|
8187
|
+
<px-container padding="none" border-radius="none" background-color="none" >
|
|
8188
|
+
<div class="content-header-content">
|
|
8189
|
+
<px-vstack gap="heading-to-subtitle">
|
|
8190
|
+
<px-h1 variant="title-3xl"><slot></slot></px-h1>
|
|
8191
|
+
<slot name="subtitle"></slot>
|
|
8192
|
+
</px-vstack>
|
|
8193
|
+
${this.$patchDescriptionSlot ? `<px-stack gap="s" direction="row" direction--mobile="column">
|
|
8194
|
+
<slot name="patch" shrink></slot>
|
|
8195
|
+
<slot name="patch-description"></slot>
|
|
8196
|
+
</px-stack>` : ""}
|
|
8197
|
+
</div>
|
|
8198
|
+
</px-container>
|
|
8199
|
+
</px-grid>
|
|
8200
|
+
${this.$overlapSlot ? `<slot name="overlap" slot="overlap"></slot>` : ""}
|
|
8201
|
+
</px-section>
|
|
8202
|
+
</div>`;
|
|
8203
|
+
this.shadowRoot.innerHTML = this.template();
|
|
8361
8204
|
}
|
|
8362
8205
|
static get observedAttributes() {
|
|
8363
8206
|
return [
|
|
8364
|
-
|
|
8365
|
-
"
|
|
8366
|
-
"
|
|
8367
|
-
"
|
|
8368
|
-
"
|
|
8369
|
-
"
|
|
8370
|
-
"
|
|
8371
|
-
"
|
|
8207
|
+
"background-color",
|
|
8208
|
+
"background-gradient",
|
|
8209
|
+
"background-image",
|
|
8210
|
+
"background-image--mobile",
|
|
8211
|
+
"background-image--tablet",
|
|
8212
|
+
"background-image--laptop",
|
|
8213
|
+
"background-size",
|
|
8214
|
+
"background-position",
|
|
8215
|
+
"contrast-helper-gradient",
|
|
8216
|
+
"contrast-helper-overlay",
|
|
8217
|
+
"min-height",
|
|
8218
|
+
"has-gridding",
|
|
8219
|
+
"has-gridding--mobile",
|
|
8220
|
+
"has-gridding--tablet",
|
|
8221
|
+
"has-gridding--laptop",
|
|
8372
8222
|
"inverted"
|
|
8373
8223
|
];
|
|
8374
8224
|
}
|
|
8225
|
+
connectedCallback() {
|
|
8226
|
+
var _a;
|
|
8227
|
+
(_a = super.connectedCallback) == null ? void 0 : _a.call(this);
|
|
8228
|
+
if (this.$subtitleSlot) {
|
|
8229
|
+
this.$subtitleSlot.setAttribute("variant", "subtitle");
|
|
8230
|
+
}
|
|
8231
|
+
if (this.$patchDescriptionSlot) {
|
|
8232
|
+
if (this.$patchDescriptionSlot.localName === "px-p") {
|
|
8233
|
+
this.$patchDescriptionSlot.setAttribute("variant", "default");
|
|
8234
|
+
}
|
|
8235
|
+
if (this.$patchDescriptionSlot.localName === "px-p" || this.$patchDescriptionSlot.localName === "px-span") {
|
|
8236
|
+
this.$patchDescriptionSlot.setAttribute("font-size", "body-l");
|
|
8237
|
+
this.$patchDescriptionSlot.removeAttribute("font-weight");
|
|
8238
|
+
this.$patchDescriptionSlot.removeAttribute("color");
|
|
8239
|
+
}
|
|
8240
|
+
if (this.$patchDescriptionSlot.localName === "px-price") {
|
|
8241
|
+
this.$patchDescriptionSlot.setAttribute("size", "m");
|
|
8242
|
+
}
|
|
8243
|
+
}
|
|
8244
|
+
this.createGridding();
|
|
8245
|
+
}
|
|
8375
8246
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
8376
8247
|
if (oldValue !== newValue) {
|
|
8377
8248
|
switch (attrName) {
|
|
8378
|
-
case "
|
|
8379
|
-
this.
|
|
8249
|
+
case "background-color":
|
|
8250
|
+
this.$section.backgroundColor = backgroundColorValues.indexOf(newValue) > 0 ? newValue : "none";
|
|
8380
8251
|
break;
|
|
8381
|
-
case "
|
|
8382
|
-
this.
|
|
8252
|
+
case "background-gradient":
|
|
8253
|
+
this.$section.gradient = gradientValues.indexOf(newValue) > 0 ? newValue : "none";
|
|
8383
8254
|
break;
|
|
8384
|
-
case "
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
case "
|
|
8388
|
-
|
|
8389
|
-
|
|
8255
|
+
case "background-image":
|
|
8256
|
+
this.$section.backgroundImage = newValue;
|
|
8257
|
+
break;
|
|
8258
|
+
case "background-image--mobile":
|
|
8259
|
+
this.$section.backgroundImageMobile = newValue;
|
|
8260
|
+
break;
|
|
8261
|
+
case "background-image--tablet":
|
|
8262
|
+
this.$section.backgroundImageTablet = newValue;
|
|
8263
|
+
break;
|
|
8264
|
+
case "background-image--laptop":
|
|
8265
|
+
this.$section.backgroundImageLaptop = newValue;
|
|
8266
|
+
break;
|
|
8267
|
+
case "background-size":
|
|
8268
|
+
this.$section.backgroundSize = backgroundSizeValues.indexOf(newValue) > 0 ? newValue : "";
|
|
8269
|
+
break;
|
|
8270
|
+
case "background-position":
|
|
8271
|
+
this.$section.backgroundPosition = newValue;
|
|
8272
|
+
break;
|
|
8273
|
+
case "has-gridding":
|
|
8274
|
+
case "has-gridding--mobile":
|
|
8275
|
+
case "has-gridding--tablet":
|
|
8276
|
+
case "has-gridding--laptop":
|
|
8277
|
+
this.createGridding();
|
|
8278
|
+
break;
|
|
8279
|
+
case "inverted":
|
|
8280
|
+
for (let i = 0; i < this.$children.length; i++) {
|
|
8281
|
+
if (!this.$children[i].hasAttribute("inverted")) {
|
|
8282
|
+
this.$children[i].toggleAttribute("inverted");
|
|
8283
|
+
}
|
|
8284
|
+
}
|
|
8285
|
+
this.$h1.toggleAttribute("inverted", newValue !== null);
|
|
8286
|
+
this.$el.toggleAttribute("inverted", newValue !== null);
|
|
8390
8287
|
break;
|
|
8391
8288
|
default:
|
|
8392
8289
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
@@ -8394,38 +8291,468 @@ class AbstractHeading extends PxElement {
|
|
|
8394
8291
|
}
|
|
8395
8292
|
}
|
|
8396
8293
|
}
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8400
|
-
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8405
|
-
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8410
|
-
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
);
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8294
|
+
createGridding() {
|
|
8295
|
+
const breakpoints = [
|
|
8296
|
+
{ prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
|
|
8297
|
+
{
|
|
8298
|
+
prop: "hasGriddingMobile",
|
|
8299
|
+
gridProp: "gridColsMobile",
|
|
8300
|
+
attr: "col-span--mobile"
|
|
8301
|
+
},
|
|
8302
|
+
{
|
|
8303
|
+
prop: "hasGriddingTablet",
|
|
8304
|
+
gridProp: "gridColsTablet",
|
|
8305
|
+
attr: "col-span--tablet"
|
|
8306
|
+
},
|
|
8307
|
+
{
|
|
8308
|
+
prop: "hasGriddingLaptop",
|
|
8309
|
+
gridProp: "gridColsLaptop",
|
|
8310
|
+
attr: "col-span--laptop"
|
|
8311
|
+
}
|
|
8312
|
+
];
|
|
8313
|
+
const spanElement = this.shadowRoot.querySelector(
|
|
8314
|
+
"px-grid > px-container"
|
|
8315
|
+
);
|
|
8316
|
+
breakpoints.forEach(({ prop, gridProp, attr }) => {
|
|
8317
|
+
if (this[prop]) {
|
|
8318
|
+
this.$grid[gridProp] = "3";
|
|
8319
|
+
spanElement.setAttribute(attr, "2");
|
|
8320
|
+
}
|
|
8321
|
+
});
|
|
8322
|
+
}
|
|
8323
|
+
get $grid() {
|
|
8324
|
+
return this.shadowRoot.querySelector("px-grid");
|
|
8325
|
+
}
|
|
8326
|
+
get $section() {
|
|
8327
|
+
return this.shadowRoot.querySelector("px-section");
|
|
8328
|
+
}
|
|
8329
|
+
get $h1() {
|
|
8330
|
+
return this.shadowRoot.querySelector("px-h1");
|
|
8331
|
+
}
|
|
8332
|
+
get $subtitleSlot() {
|
|
8333
|
+
return this.querySelector('[slot="subtitle"]');
|
|
8334
|
+
}
|
|
8335
|
+
get $patchDescriptionSlot() {
|
|
8336
|
+
return this.querySelector('[slot="patch-description"]');
|
|
8337
|
+
}
|
|
8338
|
+
get $overlapSlot() {
|
|
8339
|
+
return this.querySelector('[slot="overlap"]');
|
|
8340
|
+
}
|
|
8341
|
+
get $children() {
|
|
8342
|
+
return this.querySelectorAll("px-content-header > *");
|
|
8343
|
+
}
|
|
8344
|
+
get backgroundColor() {
|
|
8345
|
+
return this.getAttribute("background-color");
|
|
8346
|
+
}
|
|
8347
|
+
set backgroundColor(value) {
|
|
8348
|
+
this.setAttribute("background-color", value);
|
|
8349
|
+
}
|
|
8350
|
+
get gradient() {
|
|
8351
|
+
return this.getAttribute("background-gradient");
|
|
8352
|
+
}
|
|
8353
|
+
set gradient(value) {
|
|
8354
|
+
this.setAttribute("background-gradient", value);
|
|
8355
|
+
}
|
|
8356
|
+
get backgroundImage() {
|
|
8357
|
+
return this.getAttribute("background-image");
|
|
8358
|
+
}
|
|
8359
|
+
set backgroundImage(value) {
|
|
8360
|
+
this.setAttribute("background-image", value);
|
|
8361
|
+
}
|
|
8362
|
+
get backgroundImageMobile() {
|
|
8363
|
+
return this.getAttribute("background-image--mobile");
|
|
8364
|
+
}
|
|
8365
|
+
set backgroundImageMobile(value) {
|
|
8366
|
+
this.setAttribute("background-image--mobile", value);
|
|
8367
|
+
}
|
|
8368
|
+
get backgroundImageTablet() {
|
|
8369
|
+
return this.getAttribute("background-image--tablet");
|
|
8370
|
+
}
|
|
8371
|
+
set backgroundImageTablet(value) {
|
|
8372
|
+
this.setAttribute("background-image--tablet", value);
|
|
8373
|
+
}
|
|
8374
|
+
get backgroundImageLaptop() {
|
|
8375
|
+
return this.getAttribute("background-image--laptop");
|
|
8376
|
+
}
|
|
8377
|
+
set backgroundImageLaptop(value) {
|
|
8378
|
+
this.setAttribute("background-image--laptop", value);
|
|
8379
|
+
}
|
|
8380
|
+
get backgroundSize() {
|
|
8381
|
+
return this.getAttribute("background-size");
|
|
8382
|
+
}
|
|
8383
|
+
set backgroundSize(value) {
|
|
8384
|
+
this.setAttribute("background-size", value);
|
|
8385
|
+
}
|
|
8386
|
+
get backgroundPosition() {
|
|
8387
|
+
return this.getAttribute("background-position");
|
|
8388
|
+
}
|
|
8389
|
+
set backgroundPosition(value) {
|
|
8390
|
+
this.setAttribute("background-position", value);
|
|
8391
|
+
}
|
|
8392
|
+
get gradientContrastHelper() {
|
|
8393
|
+
return this.hasAttribute("contrast-helper-gradient");
|
|
8394
|
+
}
|
|
8395
|
+
set gradientContrastHelper(value) {
|
|
8396
|
+
if (value) {
|
|
8397
|
+
this.setAttribute("contrast-helper-gradient", "");
|
|
8398
|
+
} else {
|
|
8399
|
+
this.removeAttribute("contrast-helper-gradient");
|
|
8400
|
+
}
|
|
8401
|
+
}
|
|
8402
|
+
get overlayContrastHelper() {
|
|
8403
|
+
return this.hasAttribute("contrast-helper-overlay");
|
|
8404
|
+
}
|
|
8405
|
+
set overlayContrastHelper(value) {
|
|
8406
|
+
if (value) {
|
|
8407
|
+
this.setAttribute("contrast-helper-overlay", "");
|
|
8408
|
+
} else {
|
|
8409
|
+
this.removeAttribute("contrast-helper-overlay");
|
|
8410
|
+
}
|
|
8411
|
+
}
|
|
8412
|
+
get hasGridding() {
|
|
8413
|
+
return this.hasAttribute("has-gridding");
|
|
8414
|
+
}
|
|
8415
|
+
set hasGridding(value) {
|
|
8416
|
+
if (value) {
|
|
8417
|
+
this.setAttribute("has-gridding", "");
|
|
8418
|
+
} else {
|
|
8419
|
+
this.removeAttribute("has-gridding");
|
|
8420
|
+
}
|
|
8421
|
+
}
|
|
8422
|
+
get hasGriddingMobile() {
|
|
8423
|
+
return this.hasAttribute("has-gridding--mobile");
|
|
8424
|
+
}
|
|
8425
|
+
set hasGriddingMobile(value) {
|
|
8426
|
+
if (value) {
|
|
8427
|
+
this.setAttribute("has-gridding--mobile", "");
|
|
8428
|
+
} else {
|
|
8429
|
+
this.removeAttribute("has-gridding--mobile");
|
|
8430
|
+
}
|
|
8431
|
+
}
|
|
8432
|
+
get hasGriddingTablet() {
|
|
8433
|
+
return this.hasAttribute("has-gridding--tablet");
|
|
8434
|
+
}
|
|
8435
|
+
set hasGriddingTablet(value) {
|
|
8436
|
+
if (value) {
|
|
8437
|
+
this.setAttribute("has-gridding--tablet", "");
|
|
8438
|
+
} else {
|
|
8439
|
+
this.removeAttribute("has-gridding--tablet");
|
|
8440
|
+
}
|
|
8441
|
+
}
|
|
8442
|
+
get hasGriddingLaptop() {
|
|
8443
|
+
return this.hasAttribute("has-gridding--laptop");
|
|
8444
|
+
}
|
|
8445
|
+
set hasGriddingLaptop(value) {
|
|
8446
|
+
if (value) {
|
|
8447
|
+
this.setAttribute("has-gridding--laptop", "");
|
|
8448
|
+
} else {
|
|
8449
|
+
this.removeAttribute("has-gridding--laptop");
|
|
8450
|
+
}
|
|
8451
|
+
}
|
|
8452
|
+
get inverted() {
|
|
8453
|
+
return this.hasAttribute("inverted");
|
|
8454
|
+
}
|
|
8455
|
+
set inverted(value) {
|
|
8456
|
+
if (value) {
|
|
8457
|
+
this.setAttribute("inverted", "");
|
|
8458
|
+
} else {
|
|
8459
|
+
this.removeAttribute("inverted");
|
|
8460
|
+
}
|
|
8461
|
+
}
|
|
8462
|
+
get minHeight() {
|
|
8463
|
+
return this.hasAttribute("min-height");
|
|
8464
|
+
}
|
|
8465
|
+
set minHeight(value) {
|
|
8466
|
+
if (value) {
|
|
8467
|
+
this.setAttribute("min-height", "");
|
|
8468
|
+
} else {
|
|
8469
|
+
this.removeAttribute("min-height");
|
|
8470
|
+
}
|
|
8471
|
+
}
|
|
8472
|
+
};
|
|
8473
|
+
_ContentHeader.nativeName = "div";
|
|
8474
|
+
let ContentHeader = _ContentHeader;
|
|
8475
|
+
if (!customElements.get("px-content-header")) {
|
|
8476
|
+
customElements.define("px-content-header", ContentHeader);
|
|
8477
|
+
}
|
|
8478
|
+
const styles$v = ".separator{--separator-size: var(--px-size-border-m);--separator-direction--mobile-border-width: var(--separator-size) 0 0;--separator-direction--mobile-width: initial;--separator-direction--mobile-height: initial;clear:both;margin:0;border-style:solid;border-color:var( --separator-color-default, var(--px-color-border-main-default) );border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-horizontal--mobile{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--mobile{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}:host([inverted]) .separator{border-color:var( --separator-color-inverted, var(--px-color-border-main-inverted) )}@media only screen and (min-width: 768px){.separator-direction-horizontal--tablet{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--tablet{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}}@media only screen and (min-width: 1025px){.separator-direction-horizontal--laptop{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--laptop{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}}@media only screen and (min-width: 1441px){.separator-direction-horizontal--desktop{border-width:var(--separator-size) 0 0;width:initial;height:initial}.separator-direction-vertical--desktop{width:var(--separator-size);height:100%;border-width:0 var(--separator-size) 0 0}}";
|
|
8479
|
+
const styleSheet$p = new CSSStyleSheet();
|
|
8480
|
+
styleSheet$p.replaceSync(styles$v);
|
|
8481
|
+
const separatorDirectionValues = [
|
|
8482
|
+
"",
|
|
8483
|
+
"default",
|
|
8484
|
+
"horizontal",
|
|
8485
|
+
"vertical"
|
|
8486
|
+
];
|
|
8487
|
+
const separatorSizeValues = ["", "default", "none", "s", "m", "l"];
|
|
8488
|
+
const separatorColorValues = [
|
|
8489
|
+
"",
|
|
8490
|
+
"main",
|
|
8491
|
+
"brand",
|
|
8492
|
+
"none",
|
|
8493
|
+
"neutral",
|
|
8494
|
+
"purpose-success",
|
|
8495
|
+
"purpose-warning",
|
|
8496
|
+
"purpose-error",
|
|
8497
|
+
"purpose-unlimited",
|
|
8498
|
+
"state-hover",
|
|
8499
|
+
"state-active"
|
|
8500
|
+
];
|
|
8501
|
+
const _Separator = class _Separator extends PxElement {
|
|
8502
|
+
constructor() {
|
|
8503
|
+
var _a;
|
|
8504
|
+
super(styleSheet$p);
|
|
8505
|
+
const $root = document.createElement(this.nativeName);
|
|
8506
|
+
$root.classList.add("separator");
|
|
8507
|
+
this.internals = (_a = this.attachInternals) == null ? void 0 : _a.call(this);
|
|
8508
|
+
this.shadowRoot.appendChild($root);
|
|
8509
|
+
}
|
|
8510
|
+
static get observedAttributes() {
|
|
8511
|
+
return [
|
|
8512
|
+
...super.observedAttributes,
|
|
8513
|
+
"direction",
|
|
8514
|
+
"direction--mobile",
|
|
8515
|
+
"direction--tablet",
|
|
8516
|
+
"direction--laptop",
|
|
8517
|
+
"direction--desktop",
|
|
8518
|
+
"size",
|
|
8519
|
+
"color",
|
|
8520
|
+
"inverted"
|
|
8521
|
+
];
|
|
8522
|
+
}
|
|
8523
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
8524
|
+
if (oldValue !== newValue) {
|
|
8525
|
+
switch (attrName) {
|
|
8526
|
+
case "direction":
|
|
8527
|
+
case "direction--mobile":
|
|
8528
|
+
case "direction--tablet":
|
|
8529
|
+
case "direction--laptop":
|
|
8530
|
+
case "direction--desktop":
|
|
8531
|
+
this.updateDirection(
|
|
8532
|
+
attrName,
|
|
8533
|
+
oldValue,
|
|
8534
|
+
newValue,
|
|
8535
|
+
separatorDirectionValues
|
|
8536
|
+
);
|
|
8537
|
+
break;
|
|
8538
|
+
case "size":
|
|
8539
|
+
this.updateSize(attrName, oldValue, newValue, separatorSizeValues);
|
|
8540
|
+
break;
|
|
8541
|
+
case "color":
|
|
8542
|
+
this.updateColor(attrName, oldValue, newValue, separatorColorValues);
|
|
8543
|
+
break;
|
|
8544
|
+
default:
|
|
8545
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
8546
|
+
break;
|
|
8547
|
+
}
|
|
8548
|
+
}
|
|
8549
|
+
}
|
|
8550
|
+
updateSize(attrName, oldValue, newValue, attrValue) {
|
|
8551
|
+
const updateSizeStyle = (value) => {
|
|
8552
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
8553
|
+
this.$el.style.setProperty(
|
|
8554
|
+
"--separator-size",
|
|
8555
|
+
`var(--px-size-border-${value})`
|
|
8556
|
+
);
|
|
8557
|
+
}
|
|
8558
|
+
};
|
|
8559
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
8560
|
+
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
8561
|
+
} else {
|
|
8562
|
+
updateSizeStyle(oldValue);
|
|
8563
|
+
updateSizeStyle(newValue);
|
|
8564
|
+
}
|
|
8565
|
+
}
|
|
8566
|
+
updateColor(attrName, oldValue, newValue, attrValue) {
|
|
8567
|
+
const updateColorStyle = (value) => {
|
|
8568
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
8569
|
+
this.$el.style.setProperty(
|
|
8570
|
+
`--separator-color-default`,
|
|
8571
|
+
`var(--px-color-border-${value}-default)`
|
|
8572
|
+
);
|
|
8573
|
+
this.$el.style.setProperty(
|
|
8574
|
+
`--separator-color-inverted`,
|
|
8575
|
+
`var(--px-color-border-${value}-inverted)`
|
|
8576
|
+
);
|
|
8577
|
+
}
|
|
8578
|
+
};
|
|
8579
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
8580
|
+
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
8581
|
+
} else {
|
|
8582
|
+
updateColorStyle(oldValue);
|
|
8583
|
+
updateColorStyle(newValue);
|
|
8584
|
+
}
|
|
8585
|
+
}
|
|
8586
|
+
updateDirection(attrName, oldValue, newValue, attrValue) {
|
|
8587
|
+
const updateDirectionClass = (breakpoint, value) => {
|
|
8588
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
8589
|
+
this.$el.classList.add(`separator-direction-${value}--${breakpoint}`);
|
|
8590
|
+
}
|
|
8591
|
+
};
|
|
8592
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
8593
|
+
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
8594
|
+
} else {
|
|
8595
|
+
if (attrName === "direction") {
|
|
8596
|
+
["mobile", "tablet", "laptop", "desktop"].forEach((breakpoint) => {
|
|
8597
|
+
const existingClass = Array.from(this.$el.classList).find(
|
|
8598
|
+
(className) => className.startsWith(`separator-direction-`) && className.endsWith(`--${breakpoint}`)
|
|
8599
|
+
);
|
|
8600
|
+
if (!existingClass) {
|
|
8601
|
+
updateDirectionClass(breakpoint, newValue);
|
|
8602
|
+
}
|
|
8603
|
+
});
|
|
8604
|
+
} else {
|
|
8605
|
+
const breakpoint = attrName.split("--")[1];
|
|
8606
|
+
const existingClass = Array.from(this.$el.classList).find(
|
|
8607
|
+
(className) => className.startsWith(`separator-direction-`) && className.endsWith(`--${breakpoint}`)
|
|
8608
|
+
);
|
|
8609
|
+
if (existingClass) {
|
|
8610
|
+
this.$el.classList.replace(
|
|
8611
|
+
existingClass,
|
|
8612
|
+
`separator-direction-${newValue}--${breakpoint}`
|
|
8613
|
+
);
|
|
8614
|
+
} else {
|
|
8615
|
+
updateDirectionClass(breakpoint, newValue);
|
|
8616
|
+
}
|
|
8617
|
+
}
|
|
8618
|
+
}
|
|
8619
|
+
}
|
|
8620
|
+
get direction() {
|
|
8621
|
+
return this.getAttribute("direction");
|
|
8622
|
+
}
|
|
8623
|
+
set direction(value) {
|
|
8624
|
+
this.setAttribute("direction", value);
|
|
8625
|
+
}
|
|
8626
|
+
get directionMobile() {
|
|
8627
|
+
return this.getAttribute("direction--mobile");
|
|
8628
|
+
}
|
|
8629
|
+
set directionMobile(value) {
|
|
8630
|
+
this.setAttribute("direction--mobile", value);
|
|
8631
|
+
}
|
|
8632
|
+
get directionTablet() {
|
|
8633
|
+
return this.getAttribute("direction--tablet");
|
|
8634
|
+
}
|
|
8635
|
+
set directionTablet(value) {
|
|
8636
|
+
this.setAttribute("direction--tablet", value);
|
|
8637
|
+
}
|
|
8638
|
+
get directionLaptop() {
|
|
8639
|
+
return this.getAttribute("direction--laptop");
|
|
8640
|
+
}
|
|
8641
|
+
set directionLaptop(value) {
|
|
8642
|
+
this.setAttribute("direction--laptop", value);
|
|
8643
|
+
}
|
|
8644
|
+
get directionDesktop() {
|
|
8645
|
+
return this.getAttribute("direction--desktop");
|
|
8646
|
+
}
|
|
8647
|
+
set directionDesktop(value) {
|
|
8648
|
+
this.setAttribute("direction--desktop", value);
|
|
8649
|
+
}
|
|
8650
|
+
get size() {
|
|
8651
|
+
return this.getAttribute("size");
|
|
8652
|
+
}
|
|
8653
|
+
set size(value) {
|
|
8654
|
+
this.setAttribute("size", value);
|
|
8655
|
+
}
|
|
8656
|
+
get color() {
|
|
8657
|
+
return this.getAttribute("color");
|
|
8658
|
+
}
|
|
8659
|
+
set color(value) {
|
|
8660
|
+
this.setAttribute("color", value);
|
|
8661
|
+
}
|
|
8662
|
+
get inverted() {
|
|
8663
|
+
return this.getAttribute("inverted");
|
|
8664
|
+
}
|
|
8665
|
+
set inverted(value) {
|
|
8666
|
+
this.setAttribute("inverted", value);
|
|
8667
|
+
}
|
|
8668
|
+
};
|
|
8669
|
+
_Separator.nativeName = "hr";
|
|
8670
|
+
let Separator = _Separator;
|
|
8671
|
+
if (!customElements.get("px-separator")) {
|
|
8672
|
+
customElements.define("px-separator", Separator);
|
|
8673
|
+
}
|
|
8674
|
+
const headingCss = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{margin:0;font-family:var(--px-font-family);color:var(--heading-color-default, var(--px-color-text-brand-default));text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-line-height-ratio-l);font-weight:var(--px-font-weight-title)}:host([inverted]) h1,:host([inverted]) .style-title-4xl,:host([inverted]) ::slotted(h1),:host([inverted]) h2,:host([inverted]) .style-title-3xl,:host([inverted]) ::slotted(h2),:host([inverted]) h3,:host([inverted]) .style-title-2xl,:host([inverted]) ::slotted(h3),:host([inverted]) h4,:host([inverted]) .style-title-xl,:host([inverted]) ::slotted(h4),:host([inverted]) h5,:host([inverted]) .style-title-l,:host([inverted]) ::slotted(h5),:host([inverted]) h6,:host([inverted]) .style-title-m,:host([inverted]) ::slotted(h6),:host([inverted]) .style-title-s,:host([inverted]) .style-subtitle{color:var(--heading-color-inverted, var(--px-color-text-brand-inverted))}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-3xl-mobile);line-height:var(--px-line-height-ratio-s);font-weight:var(--px-font-weight-title-large)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-2xl-mobile);line-height:var(--px-line-height-ratio-s);font-weight:var(--px-font-weight-title-large)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-xl-mobile);line-height:var(--px-line-height-ratio-s)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-l-mobile)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-m-mobile)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-base-mobile)}.style-subtitle{font-size:var(--px-text-size-heading-l-mobile);font-weight:var(--px-font-weight-subtitle)}.style-title-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--tablet, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-2xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-base-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media only screen and (min-width: 1025px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--laptop, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-2xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-base-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media screen and (min-width: 1441px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--desktop, left)}}";
|
|
8675
|
+
const headingStyles$2 = new CSSStyleSheet();
|
|
8676
|
+
headingStyles$2.replaceSync(headingCss);
|
|
8677
|
+
const typographyStyles$4 = new CSSStyleSheet();
|
|
8678
|
+
typographyStyles$4.replaceSync(typographyCss$1);
|
|
8679
|
+
class AbstractHeading extends PxElement {
|
|
8680
|
+
template() {
|
|
8681
|
+
return `<slot></slot>`;
|
|
8682
|
+
}
|
|
8683
|
+
constructor(tagName) {
|
|
8684
|
+
super(headingStyles$2, typographyStyles$4);
|
|
8685
|
+
const $root = document.createElement(tagName);
|
|
8686
|
+
$root.innerHTML = this.template();
|
|
8687
|
+
this.shadowRoot.appendChild($root);
|
|
8688
|
+
}
|
|
8689
|
+
static get observedAttributes() {
|
|
8690
|
+
return [
|
|
8691
|
+
...super.observedAttributes,
|
|
8692
|
+
"variant",
|
|
8693
|
+
"color",
|
|
8694
|
+
"text-align",
|
|
8695
|
+
"text-align--mobile",
|
|
8696
|
+
"text-align--tablet",
|
|
8697
|
+
"text-align--laptop",
|
|
8698
|
+
"text-align--desktop",
|
|
8699
|
+
"inverted"
|
|
8700
|
+
];
|
|
8701
|
+
}
|
|
8702
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
8703
|
+
if (oldValue !== newValue) {
|
|
8704
|
+
switch (attrName) {
|
|
8705
|
+
case "variant":
|
|
8706
|
+
this.updateAttribute(attrName, oldValue, newValue, headingValues);
|
|
8707
|
+
break;
|
|
8708
|
+
case "color":
|
|
8709
|
+
this.updateColor(oldValue, newValue, colorValues);
|
|
8710
|
+
break;
|
|
8711
|
+
case "text-align":
|
|
8712
|
+
case "text-align--mobile":
|
|
8713
|
+
case "text-align--tablet":
|
|
8714
|
+
case "text-align--laptop":
|
|
8715
|
+
case "text-align--desktop":
|
|
8716
|
+
this.updateTextAlign(attrName, oldValue, newValue, textalignValues);
|
|
8717
|
+
break;
|
|
8718
|
+
default:
|
|
8719
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
8720
|
+
break;
|
|
8721
|
+
}
|
|
8722
|
+
}
|
|
8723
|
+
}
|
|
8724
|
+
toggleClass(oldValue, newValue) {
|
|
8725
|
+
if (oldValue !== null && oldValue !== "" && oldValue !== "default") {
|
|
8726
|
+
this.$el.classList.toggle(`style-${oldValue}`);
|
|
8727
|
+
}
|
|
8728
|
+
if (newValue !== null && newValue !== "" && newValue !== "default") {
|
|
8729
|
+
this.$el.classList.toggle(`style-${newValue}`);
|
|
8730
|
+
}
|
|
8731
|
+
}
|
|
8732
|
+
updateAttribute(attrName, oldValue, newValue, attrValue) {
|
|
8733
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
8734
|
+
console.error(`${newValue} is not an allowed "${attrName}" value`);
|
|
8735
|
+
} else {
|
|
8736
|
+
this.toggleClass(oldValue, newValue);
|
|
8737
|
+
}
|
|
8738
|
+
}
|
|
8739
|
+
updateColor(oldValue, newValue, attrValue) {
|
|
8740
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
8741
|
+
console.error(`${newValue} is not a valid color value`);
|
|
8742
|
+
return;
|
|
8743
|
+
}
|
|
8744
|
+
const updateColorStyle = (value) => {
|
|
8745
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
8746
|
+
this.$el.style.setProperty(
|
|
8747
|
+
`--heading-color-default`,
|
|
8748
|
+
`var(--px-color-text-${value}-default)`
|
|
8749
|
+
);
|
|
8750
|
+
this.$el.style.setProperty(
|
|
8751
|
+
`--heading-color-inverted`,
|
|
8752
|
+
`var(--px-color-text-${value}-inverted)`
|
|
8753
|
+
);
|
|
8754
|
+
}
|
|
8755
|
+
};
|
|
8429
8756
|
updateColorStyle(oldValue);
|
|
8430
8757
|
updateColorStyle(newValue);
|
|
8431
8758
|
}
|
|
@@ -8562,9 +8889,9 @@ let H6 = _H6;
|
|
|
8562
8889
|
if (!customElements.get("px-h6")) {
|
|
8563
8890
|
customElements.define("px-h6", H6);
|
|
8564
8891
|
}
|
|
8565
|
-
const styles$
|
|
8566
|
-
const styleSheet$
|
|
8567
|
-
styleSheet$
|
|
8892
|
+
const styles$u = '#container{border:0;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);box-sizing:border-box}:host([showfrom="bottom"]) #container{height:auto;margin-bottom:0;width:100%}px-button-icon{position:absolute;top:var(--px-padding-l-desktop);right:var(--px-padding-l-desktop)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;width:75%}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{overflow:auto}@media screen and (min-width: 1080px){#container{height:100%;padding:var(--px-padding-l-desktop)}:host([showfrom="right"]) px-button-icon{right:10.625em}:host([showfrom="right"]) #container{padding-right:10.625em;border-radius:var(--px-radius-main) 0 0 var(--px-radius-main)}:host([showfrom="left"]) px-button-icon{right:var(--px-padding-l-desktop)}:host([showfrom="left"]) #container{padding-left:10.625em;border-radius:0 var(--px-radius-main) var(--px-radius-main) 0}:host([showfrom="bottom"]) #container{box-sizing:border-box}:host([showfrom="left"])>dialog{margin-left:0;animation:dialog-fade-in-left .3s;height:100%}:host([showfrom="bottom"])>dialog{margin-bottom:0;margin-inline:0;width:100%;animation:dialog-fade-in-bottom .3s}:host([showfrom="right"])>dialog{margin-right:0;animation:dialog-fade-in-right .3s;height:100%}#content{max-height:calc(100dvh - 22.625em)}}@media only screen and (max-width: 67.563em){dialog{width:100%}:host([showfrom="left"])>dialog,:host([showfrom="right"])>dialog,:host([showfrom="bottom"])>dialog{margin-bottom:0;margin-inline:0;height:revert;animation:dialog-fade-in-bottom .3s}#container{width:100%;box-sizing:border-box;padding:var(--px-padding-m-mobile);border-radius:var(--px-radius-main) var(--px-radius-main) 0 0}px-button-icon{top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}#content{min-height:2.813em;max-height:50dvh}}@keyframes dialog-fade-in-right{0%{margin-right:-67.5em}to{margin-right:0}}@keyframes dialog-fade-in-left{0%{margin-left:-67.5em}to{margin-left:0}}@keyframes dialog-fade-in-bottom{0%{margin-bottom:-12.5em}to{margin-bottom:0}}';
|
|
8893
|
+
const styleSheet$o = new CSSStyleSheet();
|
|
8894
|
+
styleSheet$o.replaceSync(styles$u);
|
|
8568
8895
|
const HIDE_EVENT = "px.lavender.drawer.hide";
|
|
8569
8896
|
class Drawer extends HTMLElement {
|
|
8570
8897
|
constructor() {
|
|
@@ -8602,7 +8929,7 @@ class Drawer extends HTMLElement {
|
|
|
8602
8929
|
</dialog>`;
|
|
8603
8930
|
this.attachShadow({ mode: "open" });
|
|
8604
8931
|
this.shadowRoot.innerHTML = this.template;
|
|
8605
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$
|
|
8932
|
+
this.shadowRoot.adoptedStyleSheets = [styleSheet$o];
|
|
8606
8933
|
if (!this.hasAttribute("showfrom")) {
|
|
8607
8934
|
this.setAttribute("showfrom", "bottom");
|
|
8608
8935
|
}
|
|
@@ -8700,7 +9027,7 @@ class Drawer extends HTMLElement {
|
|
|
8700
9027
|
if (!customElements.get("px-drawer")) {
|
|
8701
9028
|
customElements.define("px-drawer", Drawer);
|
|
8702
9029
|
}
|
|
8703
|
-
const styles$
|
|
9030
|
+
const styles$t = ':host{position:relative}::slotted([slot="popover"]){position:absolute;border-radius:var(--px-radius-main, 8px);background:var(--px-color-background-container-light-default, #fff);box-shadow:0 20px 25px -5px #25252514;margin:0;padding:var(--px-padding-xs-mobile) 0;border:0;right:0;width:auto}:host([grow]) ::slotted([slot="trigger"]):after{right:0;padding-right:var(--px-padding-xs-mobile)}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){top:auto}:host([anchoralignment="bottom-right"]) ::slotted([slot="popover"]){left:auto}@media screen and (max-width: 767px){::slotted([slot="trigger"]){display:block;width:100%}:host([anchoralignment="top-left"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}:host([anchoralignment="top-right"]) ::slotted([slot="popover"]){left:var(--px-padding-s-mobile)}}@media screen and (min-width: 768px){::slotted([slot="popover"]){padding-block:var(--px-padding-s-desktop);right:auto;width:auto}}';
|
|
8704
9031
|
const anchorAlignmentValues = [
|
|
8705
9032
|
"top-left",
|
|
8706
9033
|
"top-right",
|
|
@@ -8742,7 +9069,7 @@ function anchorPolyfill($trigger, $popoverElement, anchorAlignment = "bottom-lef
|
|
|
8742
9069
|
});
|
|
8743
9070
|
}
|
|
8744
9071
|
const stylesheet$8 = new CSSStyleSheet();
|
|
8745
|
-
stylesheet$8.replaceSync(styles$
|
|
9072
|
+
stylesheet$8.replaceSync(styles$t);
|
|
8746
9073
|
const defaultAnchorAlignment = "bottom-left";
|
|
8747
9074
|
class Dropdown extends WithExtraAttributes {
|
|
8748
9075
|
constructor() {
|
|
@@ -9597,251 +9924,43 @@ const _Link = class _Link extends PxElement {
|
|
|
9597
9924
|
return;
|
|
9598
9925
|
}
|
|
9599
9926
|
if (newValue !== null && newValue !== "") {
|
|
9600
|
-
this.$el.setAttribute(attrName, newValue);
|
|
9601
|
-
}
|
|
9602
|
-
}
|
|
9603
|
-
updateTypography(attrName, oldValue, newValue, attrValue) {
|
|
9604
|
-
if (oldValue !== null && oldValue !== "" && oldValue !== "default") {
|
|
9605
|
-
this.$el.classList.toggle(`${attrName}-${oldValue}`);
|
|
9606
|
-
}
|
|
9607
|
-
if (newValue !== null && newValue !== "" && newValue !== "default") {
|
|
9608
|
-
this.$el.classList.toggle(`${attrName}-${newValue}`);
|
|
9609
|
-
}
|
|
9610
|
-
if (!this.checkName(attrValue, newValue)) {
|
|
9611
|
-
console.error(`Bad ${attrName} value: ${newValue}`);
|
|
9612
|
-
}
|
|
9613
|
-
}
|
|
9614
|
-
updateExtended(attributeName, newValue) {
|
|
9615
|
-
if (newValue === null) {
|
|
9616
|
-
this.$el.style.setProperty(`--button-${attributeName}`, "");
|
|
9617
|
-
} else {
|
|
9618
|
-
this.$el.style.setProperty(`--button-${attributeName}`, "100%");
|
|
9619
|
-
}
|
|
9620
|
-
}
|
|
9621
|
-
get $before() {
|
|
9622
|
-
return this.querySelector('[slot="before"]');
|
|
9623
|
-
}
|
|
9624
|
-
get $after() {
|
|
9625
|
-
return this.querySelector('[slot="after"]');
|
|
9626
|
-
}
|
|
9627
|
-
get $iconNotBeforeAfter() {
|
|
9628
|
-
return this.querySelector(
|
|
9629
|
-
'px-icon:not([slot="before"], [slot="after"])'
|
|
9630
|
-
);
|
|
9631
|
-
}
|
|
9632
|
-
get disabled() {
|
|
9633
|
-
return this.getAttribute("disabled");
|
|
9634
|
-
}
|
|
9635
|
-
set disabled(value) {
|
|
9636
|
-
this.setAttribute("disabled", value);
|
|
9637
|
-
}
|
|
9638
|
-
get variant() {
|
|
9639
|
-
return this.getAttribute("variant");
|
|
9640
|
-
}
|
|
9641
|
-
set variant(value) {
|
|
9642
|
-
this.setAttribute("variant", value);
|
|
9643
|
-
}
|
|
9644
|
-
get shape() {
|
|
9645
|
-
return this.getAttribute("shape");
|
|
9646
|
-
}
|
|
9647
|
-
set shape(value) {
|
|
9648
|
-
this.setAttribute("shape", value);
|
|
9649
|
-
}
|
|
9650
|
-
get shapeMobile() {
|
|
9651
|
-
return this.getAttribute("shape--mobile");
|
|
9652
|
-
}
|
|
9653
|
-
set shapeMobile(value) {
|
|
9654
|
-
this.setAttribute("shape--mobile", value);
|
|
9655
|
-
}
|
|
9656
|
-
get shapeTablet() {
|
|
9657
|
-
return this.getAttribute("shape--tablet");
|
|
9658
|
-
}
|
|
9659
|
-
set shapeTablet(value) {
|
|
9660
|
-
this.setAttribute("shape--tablet", value);
|
|
9661
|
-
}
|
|
9662
|
-
get shapeLaptop() {
|
|
9663
|
-
return this.getAttribute("shape--laptop");
|
|
9664
|
-
}
|
|
9665
|
-
set shapeLaptop(value) {
|
|
9666
|
-
this.setAttribute("shape--laptop", value);
|
|
9667
|
-
}
|
|
9668
|
-
get shapeDesktop() {
|
|
9669
|
-
return this.getAttribute("shape--desktop");
|
|
9670
|
-
}
|
|
9671
|
-
set shapeDesktop(value) {
|
|
9672
|
-
this.setAttribute("shape--desktop", value);
|
|
9673
|
-
}
|
|
9674
|
-
get extended() {
|
|
9675
|
-
return this.getAttribute("extended");
|
|
9676
|
-
}
|
|
9677
|
-
set extended(value) {
|
|
9678
|
-
this.setAttribute("extended", value);
|
|
9679
|
-
}
|
|
9680
|
-
get extendedMobile() {
|
|
9681
|
-
return this.getAttribute("extended--mobile");
|
|
9682
|
-
}
|
|
9683
|
-
set extendedMobile(value) {
|
|
9684
|
-
this.setAttribute("extended--mobile", value);
|
|
9685
|
-
}
|
|
9686
|
-
get extendedTablet() {
|
|
9687
|
-
return this.getAttribute("extended--tablet");
|
|
9688
|
-
}
|
|
9689
|
-
set extendedTablet(value) {
|
|
9690
|
-
this.setAttribute("extended--tablet", value);
|
|
9691
|
-
}
|
|
9692
|
-
get extendedLaptop() {
|
|
9693
|
-
return this.getAttribute("extended--laptop");
|
|
9694
|
-
}
|
|
9695
|
-
set extendedLaptop(value) {
|
|
9696
|
-
this.setAttribute("extended--laptop", value);
|
|
9697
|
-
}
|
|
9698
|
-
get extendedDesktop() {
|
|
9699
|
-
return this.getAttribute("extended--desktop");
|
|
9700
|
-
}
|
|
9701
|
-
set extendedDesktop(value) {
|
|
9702
|
-
this.setAttribute("extended--desktop", value);
|
|
9703
|
-
}
|
|
9704
|
-
get inverted() {
|
|
9705
|
-
return this.getAttribute("inverted");
|
|
9706
|
-
}
|
|
9707
|
-
set inverted(value) {
|
|
9708
|
-
this.setAttribute("inverted", value);
|
|
9709
|
-
}
|
|
9710
|
-
get fontsize() {
|
|
9711
|
-
return this.getAttribute("font-size");
|
|
9712
|
-
}
|
|
9713
|
-
set fontsize(value) {
|
|
9714
|
-
this.setAttribute("font-size", value);
|
|
9715
|
-
}
|
|
9716
|
-
get color() {
|
|
9717
|
-
return this.getAttribute("color");
|
|
9718
|
-
}
|
|
9719
|
-
set color(value) {
|
|
9720
|
-
this.setAttribute("color", value);
|
|
9721
|
-
}
|
|
9722
|
-
get fontweight() {
|
|
9723
|
-
return this.getAttribute("font-weight");
|
|
9724
|
-
}
|
|
9725
|
-
set fontweight(value) {
|
|
9726
|
-
this.setAttribute("font-weight", value);
|
|
9727
|
-
}
|
|
9728
|
-
get title() {
|
|
9729
|
-
return this.getAttribute("title");
|
|
9730
|
-
}
|
|
9731
|
-
set title(value) {
|
|
9732
|
-
if (value) {
|
|
9733
|
-
this.setAttribute("title", value);
|
|
9734
|
-
} else {
|
|
9735
|
-
this.removeAttribute("title");
|
|
9736
|
-
}
|
|
9737
|
-
}
|
|
9738
|
-
};
|
|
9739
|
-
_Link.nativeName = "a";
|
|
9740
|
-
let Link = _Link;
|
|
9741
|
-
if (!customElements.get("px-a")) {
|
|
9742
|
-
customElements.define("px-a", Link);
|
|
9743
|
-
}
|
|
9744
|
-
const paragraphCss = "p,::slotted(p){font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);font-size:var(--px-text-size-body-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l);margin:0}.text-align-left{text-align:left}.text-align-center{text-align:center}.text-align-right{text-align:right}:host([inverted]) p,:host([inverted]) ::slotted(p){color:var(--px-color-text-neutral-inverted)}@media only screen and (max-width: 768px){.text-align-left--mobile{text-align:left}.text-align-center--mobile{text-align:center}.text-align-right--mobile{text-align:right}}@media only screen and (min-width: 768px){p,::slotted(p){font-size:var(--px-text-size-body-m-desktop)}.text-align-left--tablet{text-align:left}.text-align-center--tablet{text-align:center}.text-align-right--tablet{text-align:right}}@media only screen and (min-width: 1025px){p,::slotted(p){font-size:var(--px-text-size-body-m-desktop)}.text-align-left--laptop{text-align:left}.text-align-center--laptop{text-align:center}.text-align-right--laptop{text-align:right}}";
|
|
9745
|
-
const paragraphStyles$1 = new CSSStyleSheet();
|
|
9746
|
-
const typographyStyles$2 = new CSSStyleSheet();
|
|
9747
|
-
const headingStyles$1 = new CSSStyleSheet();
|
|
9748
|
-
paragraphStyles$1.replaceSync(paragraphCss);
|
|
9749
|
-
typographyStyles$2.replaceSync(typographyCss$1);
|
|
9750
|
-
headingStyles$1.replaceSync(headingCss);
|
|
9751
|
-
const _Paragraph = class _Paragraph extends PxElement {
|
|
9752
|
-
constructor() {
|
|
9753
|
-
super(typographyStyles$2, headingStyles$1, paragraphStyles$1);
|
|
9754
|
-
this.template = () => `<p><slot></slot></p>`;
|
|
9755
|
-
this.shadowRoot.innerHTML = this.template();
|
|
9756
|
-
}
|
|
9757
|
-
static get observedAttributes() {
|
|
9758
|
-
return [
|
|
9759
|
-
...super.observedAttributes,
|
|
9760
|
-
"variant",
|
|
9761
|
-
"color",
|
|
9762
|
-
"font-size",
|
|
9763
|
-
"font-weight",
|
|
9764
|
-
"text-align",
|
|
9765
|
-
"text-align--mobile",
|
|
9766
|
-
"text-align--tablet",
|
|
9767
|
-
"text-align--laptop",
|
|
9768
|
-
"inverted",
|
|
9769
|
-
"disabled"
|
|
9770
|
-
];
|
|
9771
|
-
}
|
|
9772
|
-
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
9773
|
-
if (oldValue !== newValue) {
|
|
9774
|
-
switch (attrName) {
|
|
9775
|
-
case "variant":
|
|
9776
|
-
this.updateVariant(attrName, oldValue, newValue, headingValues);
|
|
9777
|
-
break;
|
|
9778
|
-
case "color":
|
|
9779
|
-
this.updateTypography(attrName, oldValue, newValue, colorValues);
|
|
9780
|
-
break;
|
|
9781
|
-
case "font-size":
|
|
9782
|
-
this.updateTypography(attrName, oldValue, newValue, fontsizeValues);
|
|
9783
|
-
break;
|
|
9784
|
-
case "font-weight":
|
|
9785
|
-
this.updateTypography(attrName, oldValue, newValue, fontweightValues);
|
|
9786
|
-
break;
|
|
9787
|
-
case "text-align":
|
|
9788
|
-
case "text-align--mobile":
|
|
9789
|
-
case "text-align--tablet":
|
|
9790
|
-
case "text-align--laptop":
|
|
9791
|
-
this.updateTypography(attrName, oldValue, newValue, textalignValues);
|
|
9792
|
-
break;
|
|
9793
|
-
case "disabled":
|
|
9794
|
-
this.color = "state-disabled";
|
|
9795
|
-
break;
|
|
9796
|
-
default:
|
|
9797
|
-
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
9798
|
-
break;
|
|
9799
|
-
}
|
|
9800
|
-
}
|
|
9801
|
-
}
|
|
9802
|
-
toggleClass(oldValue, newValue) {
|
|
9803
|
-
if (oldValue !== null && oldValue !== "" && oldValue !== "default") {
|
|
9804
|
-
this.$el.classList.toggle(`style-${oldValue}`);
|
|
9805
|
-
}
|
|
9806
|
-
if (newValue !== null && newValue !== "" && newValue !== "default") {
|
|
9807
|
-
this.$el.classList.toggle(`style-${newValue}`);
|
|
9808
|
-
}
|
|
9809
|
-
}
|
|
9810
|
-
updateVariant(attrName, oldValue, newValue, attrValue) {
|
|
9811
|
-
if (!this.checkName(attrValue, newValue)) {
|
|
9812
|
-
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
9813
|
-
} else {
|
|
9814
|
-
this.toggleClass(oldValue, newValue);
|
|
9815
|
-
}
|
|
9816
|
-
}
|
|
9817
|
-
updateTypography(attrName, oldValue, newValue, attrValue) {
|
|
9818
|
-
if (!this.checkName(attrValue, newValue)) {
|
|
9819
|
-
console.error(`${newValue} is not an allowed ${attrName} value`);
|
|
9820
|
-
} else {
|
|
9821
|
-
const splitResult = this.splitAttrNameFromBreakpoint(attrName);
|
|
9822
|
-
const breakpoint = splitResult.breakpoint;
|
|
9823
|
-
if (oldValue !== null && oldValue !== "") {
|
|
9824
|
-
this.$el.classList.toggle(
|
|
9825
|
-
`${splitResult.attrName}-${oldValue}${breakpoint}`
|
|
9826
|
-
);
|
|
9827
|
-
}
|
|
9828
|
-
if (newValue !== null && newValue !== "") {
|
|
9829
|
-
this.$el.classList.toggle(
|
|
9830
|
-
`${splitResult.attrName}-${newValue}${breakpoint}`
|
|
9831
|
-
);
|
|
9832
|
-
}
|
|
9927
|
+
this.$el.setAttribute(attrName, newValue);
|
|
9833
9928
|
}
|
|
9834
9929
|
}
|
|
9835
|
-
|
|
9836
|
-
|
|
9837
|
-
|
|
9838
|
-
(suffix) => attrName.includes(suffix)
|
|
9839
|
-
)) {
|
|
9840
|
-
const attrNameSplit = attrName.split("--");
|
|
9841
|
-
attrName = attrNameSplit[0];
|
|
9842
|
-
breakpoint = `--${attrNameSplit[1]}`;
|
|
9930
|
+
updateTypography(attrName, oldValue, newValue, attrValue) {
|
|
9931
|
+
if (oldValue !== null && oldValue !== "" && oldValue !== "default") {
|
|
9932
|
+
this.$el.classList.toggle(`${attrName}-${oldValue}`);
|
|
9843
9933
|
}
|
|
9844
|
-
|
|
9934
|
+
if (newValue !== null && newValue !== "" && newValue !== "default") {
|
|
9935
|
+
this.$el.classList.toggle(`${attrName}-${newValue}`);
|
|
9936
|
+
}
|
|
9937
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
9938
|
+
console.error(`Bad ${attrName} value: ${newValue}`);
|
|
9939
|
+
}
|
|
9940
|
+
}
|
|
9941
|
+
updateExtended(attributeName, newValue) {
|
|
9942
|
+
if (newValue === null) {
|
|
9943
|
+
this.$el.style.setProperty(`--button-${attributeName}`, "");
|
|
9944
|
+
} else {
|
|
9945
|
+
this.$el.style.setProperty(`--button-${attributeName}`, "100%");
|
|
9946
|
+
}
|
|
9947
|
+
}
|
|
9948
|
+
get $before() {
|
|
9949
|
+
return this.querySelector('[slot="before"]');
|
|
9950
|
+
}
|
|
9951
|
+
get $after() {
|
|
9952
|
+
return this.querySelector('[slot="after"]');
|
|
9953
|
+
}
|
|
9954
|
+
get $iconNotBeforeAfter() {
|
|
9955
|
+
return this.querySelector(
|
|
9956
|
+
'px-icon:not([slot="before"], [slot="after"])'
|
|
9957
|
+
);
|
|
9958
|
+
}
|
|
9959
|
+
get disabled() {
|
|
9960
|
+
return this.getAttribute("disabled");
|
|
9961
|
+
}
|
|
9962
|
+
set disabled(value) {
|
|
9963
|
+
this.setAttribute("disabled", value);
|
|
9845
9964
|
}
|
|
9846
9965
|
get variant() {
|
|
9847
9966
|
return this.getAttribute("variant");
|
|
@@ -9849,515 +9968,419 @@ const _Paragraph = class _Paragraph extends PxElement {
|
|
|
9849
9968
|
set variant(value) {
|
|
9850
9969
|
this.setAttribute("variant", value);
|
|
9851
9970
|
}
|
|
9852
|
-
get
|
|
9853
|
-
return this.getAttribute("
|
|
9854
|
-
}
|
|
9855
|
-
set color(value) {
|
|
9856
|
-
this.setAttribute("color", value);
|
|
9857
|
-
}
|
|
9858
|
-
get fontSize() {
|
|
9859
|
-
return this.getAttribute("font-size");
|
|
9971
|
+
get shape() {
|
|
9972
|
+
return this.getAttribute("shape");
|
|
9860
9973
|
}
|
|
9861
|
-
set
|
|
9862
|
-
this.setAttribute("
|
|
9974
|
+
set shape(value) {
|
|
9975
|
+
this.setAttribute("shape", value);
|
|
9863
9976
|
}
|
|
9864
|
-
get
|
|
9865
|
-
return this.getAttribute("
|
|
9977
|
+
get shapeMobile() {
|
|
9978
|
+
return this.getAttribute("shape--mobile");
|
|
9866
9979
|
}
|
|
9867
|
-
set
|
|
9868
|
-
this.setAttribute("
|
|
9980
|
+
set shapeMobile(value) {
|
|
9981
|
+
this.setAttribute("shape--mobile", value);
|
|
9869
9982
|
}
|
|
9870
|
-
get
|
|
9871
|
-
return this.getAttribute("
|
|
9983
|
+
get shapeTablet() {
|
|
9984
|
+
return this.getAttribute("shape--tablet");
|
|
9872
9985
|
}
|
|
9873
|
-
set
|
|
9874
|
-
this.setAttribute("
|
|
9986
|
+
set shapeTablet(value) {
|
|
9987
|
+
this.setAttribute("shape--tablet", value);
|
|
9875
9988
|
}
|
|
9876
|
-
get
|
|
9877
|
-
return this.getAttribute("
|
|
9989
|
+
get shapeLaptop() {
|
|
9990
|
+
return this.getAttribute("shape--laptop");
|
|
9878
9991
|
}
|
|
9879
|
-
set
|
|
9880
|
-
this.setAttribute("
|
|
9992
|
+
set shapeLaptop(value) {
|
|
9993
|
+
this.setAttribute("shape--laptop", value);
|
|
9881
9994
|
}
|
|
9882
|
-
get
|
|
9883
|
-
return this.getAttribute("
|
|
9995
|
+
get shapeDesktop() {
|
|
9996
|
+
return this.getAttribute("shape--desktop");
|
|
9884
9997
|
}
|
|
9885
|
-
set
|
|
9886
|
-
this.setAttribute("
|
|
9998
|
+
set shapeDesktop(value) {
|
|
9999
|
+
this.setAttribute("shape--desktop", value);
|
|
9887
10000
|
}
|
|
9888
|
-
get
|
|
9889
|
-
return this.getAttribute("
|
|
10001
|
+
get extended() {
|
|
10002
|
+
return this.getAttribute("extended");
|
|
9890
10003
|
}
|
|
9891
|
-
set
|
|
9892
|
-
this.setAttribute("
|
|
10004
|
+
set extended(value) {
|
|
10005
|
+
this.setAttribute("extended", value);
|
|
9893
10006
|
}
|
|
9894
|
-
get
|
|
9895
|
-
return this.getAttribute("
|
|
10007
|
+
get extendedMobile() {
|
|
10008
|
+
return this.getAttribute("extended--mobile");
|
|
9896
10009
|
}
|
|
9897
|
-
set
|
|
9898
|
-
this.setAttribute("
|
|
10010
|
+
set extendedMobile(value) {
|
|
10011
|
+
this.setAttribute("extended--mobile", value);
|
|
9899
10012
|
}
|
|
9900
|
-
get
|
|
9901
|
-
return this.getAttribute("
|
|
10013
|
+
get extendedTablet() {
|
|
10014
|
+
return this.getAttribute("extended--tablet");
|
|
9902
10015
|
}
|
|
9903
|
-
set
|
|
9904
|
-
this.setAttribute("
|
|
10016
|
+
set extendedTablet(value) {
|
|
10017
|
+
this.setAttribute("extended--tablet", value);
|
|
9905
10018
|
}
|
|
9906
|
-
|
|
9907
|
-
|
|
9908
|
-
let Paragraph = _Paragraph;
|
|
9909
|
-
if (!customElements.get("px-p")) {
|
|
9910
|
-
customElements.define("px-p", Paragraph);
|
|
9911
|
-
}
|
|
9912
|
-
const _FooterSitemap = class _FooterSitemap extends PxElement {
|
|
9913
|
-
constructor() {
|
|
9914
|
-
super();
|
|
9915
|
-
this.template = () => `<div class="footer-sitemap">
|
|
9916
|
-
<px-grid grid-cols="4" grid-cols--mobile="1" role="list" gap--mobile="none">
|
|
9917
|
-
<slot></slot>
|
|
9918
|
-
</px-grid>
|
|
9919
|
-
</div>`;
|
|
9920
|
-
this.shadowRoot.innerHTML = this.template();
|
|
10019
|
+
get extendedLaptop() {
|
|
10020
|
+
return this.getAttribute("extended--laptop");
|
|
9921
10021
|
}
|
|
9922
|
-
|
|
9923
|
-
|
|
10022
|
+
set extendedLaptop(value) {
|
|
10023
|
+
this.setAttribute("extended--laptop", value);
|
|
9924
10024
|
}
|
|
9925
|
-
|
|
9926
|
-
|
|
9927
|
-
switch (attrName) {
|
|
9928
|
-
case "inverted":
|
|
9929
|
-
for (let i = 0; i < this.$children.length; i++) {
|
|
9930
|
-
if (!this.$children[i].hasAttribute("inverted")) {
|
|
9931
|
-
this.$children[i].toggleAttribute("inverted");
|
|
9932
|
-
}
|
|
9933
|
-
}
|
|
9934
|
-
break;
|
|
9935
|
-
default:
|
|
9936
|
-
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
9937
|
-
break;
|
|
9938
|
-
}
|
|
9939
|
-
}
|
|
10025
|
+
get extendedDesktop() {
|
|
10026
|
+
return this.getAttribute("extended--desktop");
|
|
9940
10027
|
}
|
|
9941
|
-
|
|
9942
|
-
|
|
10028
|
+
set extendedDesktop(value) {
|
|
10029
|
+
this.setAttribute("extended--desktop", value);
|
|
9943
10030
|
}
|
|
9944
10031
|
get inverted() {
|
|
9945
|
-
return this.
|
|
10032
|
+
return this.getAttribute("inverted");
|
|
9946
10033
|
}
|
|
9947
10034
|
set inverted(value) {
|
|
9948
|
-
|
|
9949
|
-
this.setAttribute("inverted", "");
|
|
9950
|
-
} else {
|
|
9951
|
-
this.removeAttribute("inverted");
|
|
9952
|
-
}
|
|
9953
|
-
}
|
|
9954
|
-
};
|
|
9955
|
-
_FooterSitemap.nativeName = "div";
|
|
9956
|
-
let FooterSitemap = _FooterSitemap;
|
|
9957
|
-
if (!customElements.get("px-footer-sitemap")) {
|
|
9958
|
-
customElements.define("px-footer-sitemap", FooterSitemap);
|
|
9959
|
-
}
|
|
9960
|
-
const styles$t = ":host,:host>*{display:block;box-sizing:border-box}::slotted(ul){margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}::slotted(ul.link-list-img){display:flex;flex-wrap:wrap;flex-direction:row;gap:20px}";
|
|
9961
|
-
const styleSheet$o = new CSSStyleSheet();
|
|
9962
|
-
styleSheet$o.replaceSync(styles$t);
|
|
9963
|
-
const _FooterSitemapItem = class _FooterSitemapItem extends PxElement {
|
|
9964
|
-
constructor() {
|
|
9965
|
-
super(styleSheet$o);
|
|
9966
|
-
this.templateMobile = () => `<div role="listitem">
|
|
9967
|
-
<px-accordion ${this.inverted ? "inverted" : ""}>
|
|
9968
|
-
<span slot="title"><slot name="links-list-title"></slot></span>
|
|
9969
|
-
<span slot="content">
|
|
9970
|
-
<slot name="links-list"></slot>
|
|
9971
|
-
</span>
|
|
9972
|
-
</px-accordion>
|
|
9973
|
-
</div>`;
|
|
9974
|
-
this.templateDesktop = () => `<div role="listitem">
|
|
9975
|
-
<px-vstack gap="default">
|
|
9976
|
-
<px-p variant="title-l" ${this.inverted ? "inverted" : ""}>
|
|
9977
|
-
<slot name="links-list-title"></slot>
|
|
9978
|
-
</px-p>
|
|
9979
|
-
<slot name="links-list"></slot>
|
|
9980
|
-
</px-vstack>
|
|
9981
|
-
</div>`;
|
|
9982
|
-
this.throttledLoadTemplate = throttle(this.loadTemplate.bind(this), 50);
|
|
9983
|
-
this.loadTemplate();
|
|
9984
|
-
}
|
|
9985
|
-
static get observedAttributes() {
|
|
9986
|
-
return [...super.observedAttributes, "inverted"];
|
|
10035
|
+
this.setAttribute("inverted", value);
|
|
9987
10036
|
}
|
|
9988
|
-
|
|
9989
|
-
|
|
9990
|
-
this.loadTemplate();
|
|
9991
|
-
window.addEventListener("resize", this.throttledLoadTemplate);
|
|
9992
|
-
if (!this.$ul) {
|
|
9993
|
-
console.error(
|
|
9994
|
-
"The footer sitemap item must contain a <ul> element with links."
|
|
9995
|
-
);
|
|
9996
|
-
} else {
|
|
9997
|
-
if (this.$ul.querySelector("px-img")) {
|
|
9998
|
-
this.$ul.classList.add("link-list-img");
|
|
9999
|
-
}
|
|
10000
|
-
}
|
|
10037
|
+
get fontsize() {
|
|
10038
|
+
return this.getAttribute("font-size");
|
|
10001
10039
|
}
|
|
10002
|
-
|
|
10003
|
-
|
|
10040
|
+
set fontsize(value) {
|
|
10041
|
+
this.setAttribute("font-size", value);
|
|
10004
10042
|
}
|
|
10005
|
-
|
|
10006
|
-
|
|
10007
|
-
const currentSize = window.innerWidth < 768 ? "mobile" : "desktop";
|
|
10008
|
-
if (previousSize !== currentSize) {
|
|
10009
|
-
if (currentSize === "mobile") {
|
|
10010
|
-
this.shadowRoot.innerHTML = this.templateMobile();
|
|
10011
|
-
} else {
|
|
10012
|
-
this.shadowRoot.innerHTML = this.templateDesktop();
|
|
10013
|
-
}
|
|
10014
|
-
this.lastSize = currentSize;
|
|
10015
|
-
}
|
|
10043
|
+
get color() {
|
|
10044
|
+
return this.getAttribute("color");
|
|
10016
10045
|
}
|
|
10017
|
-
|
|
10018
|
-
|
|
10019
|
-
switch (attrName) {
|
|
10020
|
-
case "inverted":
|
|
10021
|
-
for (let i = 0; i < this.$children.length; i++) {
|
|
10022
|
-
if (!this.$children[i].hasAttribute("inverted")) {
|
|
10023
|
-
this.$children[i].toggleAttribute("inverted");
|
|
10024
|
-
}
|
|
10025
|
-
}
|
|
10026
|
-
this.$ul.querySelectorAll("px-a").forEach((link) => {
|
|
10027
|
-
link.toggleAttribute("inverted");
|
|
10028
|
-
});
|
|
10029
|
-
break;
|
|
10030
|
-
default:
|
|
10031
|
-
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
10032
|
-
break;
|
|
10033
|
-
}
|
|
10034
|
-
}
|
|
10046
|
+
set color(value) {
|
|
10047
|
+
this.setAttribute("color", value);
|
|
10035
10048
|
}
|
|
10036
|
-
get
|
|
10037
|
-
return this.
|
|
10049
|
+
get fontweight() {
|
|
10050
|
+
return this.getAttribute("font-weight");
|
|
10038
10051
|
}
|
|
10039
|
-
|
|
10040
|
-
|
|
10052
|
+
set fontweight(value) {
|
|
10053
|
+
this.setAttribute("font-weight", value);
|
|
10041
10054
|
}
|
|
10042
|
-
get
|
|
10043
|
-
return this.
|
|
10055
|
+
get title() {
|
|
10056
|
+
return this.getAttribute("title");
|
|
10044
10057
|
}
|
|
10045
|
-
set
|
|
10058
|
+
set title(value) {
|
|
10046
10059
|
if (value) {
|
|
10047
|
-
this.setAttribute("
|
|
10060
|
+
this.setAttribute("title", value);
|
|
10048
10061
|
} else {
|
|
10049
|
-
this.removeAttribute("
|
|
10062
|
+
this.removeAttribute("title");
|
|
10050
10063
|
}
|
|
10051
10064
|
}
|
|
10052
10065
|
};
|
|
10053
|
-
|
|
10054
|
-
let
|
|
10055
|
-
if (!customElements.get("px-
|
|
10056
|
-
customElements.define("px-
|
|
10066
|
+
_Link.nativeName = "a";
|
|
10067
|
+
let Link = _Link;
|
|
10068
|
+
if (!customElements.get("px-a")) {
|
|
10069
|
+
customElements.define("px-a", Link);
|
|
10057
10070
|
}
|
|
10058
|
-
const
|
|
10059
|
-
const
|
|
10060
|
-
|
|
10061
|
-
|
|
10071
|
+
const paragraphCss = "p,::slotted(p){font-family:var(--px-font-family);color:var(--px-color-text-neutral-default);font-size:var(--px-text-size-body-m-mobile);font-weight:var(--px-font-weight-body);line-height:var(--px-line-height-ratio-l);margin:0}.text-align-left{text-align:left}.text-align-center{text-align:center}.text-align-right{text-align:right}:host([inverted]) p,:host([inverted]) ::slotted(p){color:var(--px-color-text-neutral-inverted)}@media only screen and (max-width: 768px){.text-align-left--mobile{text-align:left}.text-align-center--mobile{text-align:center}.text-align-right--mobile{text-align:right}}@media only screen and (min-width: 768px){p,::slotted(p){font-size:var(--px-text-size-body-m-desktop)}.text-align-left--tablet{text-align:left}.text-align-center--tablet{text-align:center}.text-align-right--tablet{text-align:right}}@media only screen and (min-width: 1025px){p,::slotted(p){font-size:var(--px-text-size-body-m-desktop)}.text-align-left--laptop{text-align:left}.text-align-center--laptop{text-align:center}.text-align-right--laptop{text-align:right}}";
|
|
10072
|
+
const paragraphStyles$1 = new CSSStyleSheet();
|
|
10073
|
+
const typographyStyles$2 = new CSSStyleSheet();
|
|
10074
|
+
const headingStyles$1 = new CSSStyleSheet();
|
|
10075
|
+
paragraphStyles$1.replaceSync(paragraphCss);
|
|
10076
|
+
typographyStyles$2.replaceSync(typographyCss$1);
|
|
10077
|
+
headingStyles$1.replaceSync(headingCss);
|
|
10078
|
+
const _Paragraph = class _Paragraph extends PxElement {
|
|
10062
10079
|
constructor() {
|
|
10063
|
-
super();
|
|
10064
|
-
this.template = () =>
|
|
10065
|
-
<px-container border-radius="none" padding-inline="none" background-color="${this.backgroundColor}">
|
|
10066
|
-
<div class="content-wrapper ${this.$slotOverlap ? "overlapped" : ""}">
|
|
10067
|
-
<px-vstack gap="heading-to-content">
|
|
10068
|
-
<slot name="heading"></slot>
|
|
10069
|
-
<px-vstack gap="none">
|
|
10070
|
-
<slot></slot>
|
|
10071
|
-
</px-vstack>
|
|
10072
|
-
</px-vstack>
|
|
10073
|
-
</div>
|
|
10074
|
-
</px-container>
|
|
10075
|
-
<div class="content-wrapper">
|
|
10076
|
-
<slot name="overlap"></slot>
|
|
10077
|
-
</div>
|
|
10078
|
-
`;
|
|
10079
|
-
this.attachShadow({ mode: "open" });
|
|
10080
|
+
super(typographyStyles$2, headingStyles$1, paragraphStyles$1);
|
|
10081
|
+
this.template = () => `<p><slot></slot></p>`;
|
|
10080
10082
|
this.shadowRoot.innerHTML = this.template();
|
|
10081
|
-
this.shadowRoot.adoptedStyleSheets = [styleSheet$n];
|
|
10082
|
-
}
|
|
10083
|
-
connectedCallback() {
|
|
10084
|
-
const headingSlot = this.querySelector('[slot="heading"]');
|
|
10085
|
-
if (!this.paddingBlock && !this.paddingTop && !this.paddingBottom && !this.paddingBlockMobile && !this.paddingTopMobile && !this.paddingBottomMobile && !this.paddingBlockTablet && !this.paddingTopTablet && !this.paddingBottomTablet && !this.paddingBlockLaptop && !this.paddingTopLaptop && !this.paddingBottomLaptop) {
|
|
10086
|
-
this.$container.paddingBlock = "none";
|
|
10087
|
-
}
|
|
10088
|
-
if (!headingSlot) {
|
|
10089
|
-
this.shadowRoot.querySelector("px-vstack").setAttribute("gap", "none");
|
|
10090
|
-
}
|
|
10091
10083
|
}
|
|
10092
10084
|
static get observedAttributes() {
|
|
10093
10085
|
return [
|
|
10094
|
-
|
|
10095
|
-
"
|
|
10096
|
-
"
|
|
10097
|
-
"
|
|
10098
|
-
"
|
|
10099
|
-
"
|
|
10100
|
-
"
|
|
10101
|
-
"
|
|
10102
|
-
"
|
|
10103
|
-
"
|
|
10104
|
-
"
|
|
10105
|
-
"padding-block--mobile",
|
|
10106
|
-
"padding-top--mobile",
|
|
10107
|
-
"padding-bottom--mobile",
|
|
10108
|
-
"padding-block--tablet",
|
|
10109
|
-
"padding-top--tablet",
|
|
10110
|
-
"padding-bottom--tablet",
|
|
10111
|
-
"padding-block--laptop",
|
|
10112
|
-
"padding-top--laptop",
|
|
10113
|
-
"padding-bottom--laptop",
|
|
10114
|
-
"border",
|
|
10115
|
-
"border-side",
|
|
10116
|
-
"border-side--mobile",
|
|
10117
|
-
"border-side--tablet",
|
|
10118
|
-
"border-side--laptop"
|
|
10086
|
+
...super.observedAttributes,
|
|
10087
|
+
"variant",
|
|
10088
|
+
"color",
|
|
10089
|
+
"font-size",
|
|
10090
|
+
"font-weight",
|
|
10091
|
+
"text-align",
|
|
10092
|
+
"text-align--mobile",
|
|
10093
|
+
"text-align--tablet",
|
|
10094
|
+
"text-align--laptop",
|
|
10095
|
+
"inverted",
|
|
10096
|
+
"disabled"
|
|
10119
10097
|
];
|
|
10120
10098
|
}
|
|
10121
|
-
|
|
10122
|
-
return this.shadowRoot.querySelector("px-container");
|
|
10123
|
-
}
|
|
10124
|
-
attributeChangedCallback(name, oldValue, newValue) {
|
|
10099
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10125
10100
|
if (oldValue !== newValue) {
|
|
10126
|
-
switch (
|
|
10127
|
-
case "
|
|
10128
|
-
this
|
|
10129
|
-
break;
|
|
10130
|
-
case "background-gradient":
|
|
10131
|
-
this.$container.gradient = this.gradient;
|
|
10132
|
-
break;
|
|
10133
|
-
case "background-image":
|
|
10134
|
-
this.$container.backgroundImage = newValue;
|
|
10135
|
-
break;
|
|
10136
|
-
case "background-image--mobile":
|
|
10137
|
-
this.$container.backgroundImageMobile = newValue;
|
|
10138
|
-
break;
|
|
10139
|
-
case "background-image--tablet":
|
|
10140
|
-
this.$container.backgroundImageTablet = newValue;
|
|
10141
|
-
break;
|
|
10142
|
-
case "background-image--laptop":
|
|
10143
|
-
this.$container.backgroundImageLaptop = newValue;
|
|
10144
|
-
break;
|
|
10145
|
-
case "background-size":
|
|
10146
|
-
this.$container.backgroundSize = newValue;
|
|
10147
|
-
break;
|
|
10148
|
-
case "background-position":
|
|
10149
|
-
this.$container.backgroundPosition = newValue;
|
|
10150
|
-
break;
|
|
10151
|
-
case "padding-block":
|
|
10152
|
-
this.$container.paddingBlock = newValue;
|
|
10153
|
-
break;
|
|
10154
|
-
case "padding-top":
|
|
10155
|
-
this.$container.paddingTop = newValue;
|
|
10156
|
-
break;
|
|
10157
|
-
case "padding-bottom":
|
|
10158
|
-
this.$container.paddingBottom = newValue;
|
|
10159
|
-
break;
|
|
10160
|
-
case "padding-block--mobile":
|
|
10161
|
-
this.$container.paddingBlockMobile = newValue;
|
|
10162
|
-
break;
|
|
10163
|
-
case "padding-top--mobile":
|
|
10164
|
-
this.$container.paddingTopMobile = newValue;
|
|
10165
|
-
break;
|
|
10166
|
-
case "padding-bottom--mobile":
|
|
10167
|
-
this.$container.paddingBottomMobile = newValue;
|
|
10168
|
-
break;
|
|
10169
|
-
case "padding-block--tablet":
|
|
10170
|
-
this.$container.paddingBlockTablet = newValue;
|
|
10171
|
-
break;
|
|
10172
|
-
case "padding-top--tablet":
|
|
10173
|
-
this.$container.paddingTopTablet = newValue;
|
|
10174
|
-
break;
|
|
10175
|
-
case "padding-bottom--tablet":
|
|
10176
|
-
this.$container.paddingBottomTablet = newValue;
|
|
10177
|
-
break;
|
|
10178
|
-
case "padding-block--laptop":
|
|
10179
|
-
this.$container.paddingBlockLaptop = newValue;
|
|
10180
|
-
break;
|
|
10181
|
-
case "padding-top--laptop":
|
|
10182
|
-
this.$container.paddingTopLaptop = newValue;
|
|
10101
|
+
switch (attrName) {
|
|
10102
|
+
case "variant":
|
|
10103
|
+
this.updateVariant(attrName, oldValue, newValue, headingValues);
|
|
10183
10104
|
break;
|
|
10184
|
-
case "
|
|
10185
|
-
this
|
|
10105
|
+
case "color":
|
|
10106
|
+
this.updateTypography(attrName, oldValue, newValue, colorValues);
|
|
10186
10107
|
break;
|
|
10187
|
-
case "
|
|
10188
|
-
this
|
|
10108
|
+
case "font-size":
|
|
10109
|
+
this.updateTypography(attrName, oldValue, newValue, fontsizeValues);
|
|
10189
10110
|
break;
|
|
10190
|
-
case "
|
|
10191
|
-
this
|
|
10111
|
+
case "font-weight":
|
|
10112
|
+
this.updateTypography(attrName, oldValue, newValue, fontweightValues);
|
|
10192
10113
|
break;
|
|
10193
|
-
case "
|
|
10194
|
-
|
|
10114
|
+
case "text-align":
|
|
10115
|
+
case "text-align--mobile":
|
|
10116
|
+
case "text-align--tablet":
|
|
10117
|
+
case "text-align--laptop":
|
|
10118
|
+
this.updateTypography(attrName, oldValue, newValue, textalignValues);
|
|
10195
10119
|
break;
|
|
10196
|
-
case "
|
|
10197
|
-
this
|
|
10120
|
+
case "disabled":
|
|
10121
|
+
this.color = "state-disabled";
|
|
10198
10122
|
break;
|
|
10199
|
-
|
|
10200
|
-
|
|
10123
|
+
default:
|
|
10124
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
10201
10125
|
break;
|
|
10202
10126
|
}
|
|
10203
10127
|
}
|
|
10204
10128
|
}
|
|
10205
|
-
|
|
10206
|
-
|
|
10207
|
-
|
|
10208
|
-
|
|
10209
|
-
|
|
10210
|
-
|
|
10211
|
-
|
|
10212
|
-
this.setAttribute("background-color", value);
|
|
10213
|
-
}
|
|
10214
|
-
get gradient() {
|
|
10215
|
-
return this.getAttribute("background-gradient");
|
|
10216
|
-
}
|
|
10217
|
-
set gradient(value) {
|
|
10218
|
-
this.setAttribute("background-gradient", value);
|
|
10219
|
-
}
|
|
10220
|
-
get backgroundImage() {
|
|
10221
|
-
return this.getAttribute("background-image");
|
|
10222
|
-
}
|
|
10223
|
-
set backgroundImage(value) {
|
|
10224
|
-
this.setAttribute("background-image", value);
|
|
10225
|
-
}
|
|
10226
|
-
get backgroundImageMobile() {
|
|
10227
|
-
return this.getAttribute("background-image--mobile");
|
|
10228
|
-
}
|
|
10229
|
-
set backgroundImageMobile(value) {
|
|
10230
|
-
this.setAttribute("background-image--mobile", value);
|
|
10231
|
-
}
|
|
10232
|
-
get backgroundImageTablet() {
|
|
10233
|
-
return this.getAttribute("background-image--tablet");
|
|
10234
|
-
}
|
|
10235
|
-
set backgroundImageTablet(value) {
|
|
10236
|
-
this.setAttribute("background-image--tablet", value);
|
|
10237
|
-
}
|
|
10238
|
-
get backgroundImageLaptop() {
|
|
10239
|
-
return this.getAttribute("background-image--laptop");
|
|
10129
|
+
toggleClass(oldValue, newValue) {
|
|
10130
|
+
if (oldValue !== null && oldValue !== "" && oldValue !== "default") {
|
|
10131
|
+
this.$el.classList.toggle(`style-${oldValue}`);
|
|
10132
|
+
}
|
|
10133
|
+
if (newValue !== null && newValue !== "" && newValue !== "default") {
|
|
10134
|
+
this.$el.classList.toggle(`style-${newValue}`);
|
|
10135
|
+
}
|
|
10240
10136
|
}
|
|
10241
|
-
|
|
10242
|
-
this.
|
|
10137
|
+
updateVariant(attrName, oldValue, newValue, attrValue) {
|
|
10138
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
10139
|
+
console.error(`${newValue} is not a valid value for ${attrName}`);
|
|
10140
|
+
} else {
|
|
10141
|
+
this.toggleClass(oldValue, newValue);
|
|
10142
|
+
}
|
|
10243
10143
|
}
|
|
10244
|
-
|
|
10245
|
-
|
|
10144
|
+
updateTypography(attrName, oldValue, newValue, attrValue) {
|
|
10145
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
10146
|
+
console.error(`${newValue} is not an allowed ${attrName} value`);
|
|
10147
|
+
} else {
|
|
10148
|
+
const splitResult = this.splitAttrNameFromBreakpoint(attrName);
|
|
10149
|
+
const breakpoint = splitResult.breakpoint;
|
|
10150
|
+
if (oldValue !== null && oldValue !== "") {
|
|
10151
|
+
this.$el.classList.toggle(
|
|
10152
|
+
`${splitResult.attrName}-${oldValue}${breakpoint}`
|
|
10153
|
+
);
|
|
10154
|
+
}
|
|
10155
|
+
if (newValue !== null && newValue !== "") {
|
|
10156
|
+
this.$el.classList.toggle(
|
|
10157
|
+
`${splitResult.attrName}-${newValue}${breakpoint}`
|
|
10158
|
+
);
|
|
10159
|
+
}
|
|
10160
|
+
}
|
|
10246
10161
|
}
|
|
10247
|
-
|
|
10248
|
-
|
|
10162
|
+
splitAttrNameFromBreakpoint(attrName) {
|
|
10163
|
+
let breakpoint = "";
|
|
10164
|
+
if (["--mobile", "--tablet", "--laptop"].some(
|
|
10165
|
+
(suffix) => attrName.includes(suffix)
|
|
10166
|
+
)) {
|
|
10167
|
+
const attrNameSplit = attrName.split("--");
|
|
10168
|
+
attrName = attrNameSplit[0];
|
|
10169
|
+
breakpoint = `--${attrNameSplit[1]}`;
|
|
10170
|
+
}
|
|
10171
|
+
return { attrName, breakpoint };
|
|
10249
10172
|
}
|
|
10250
|
-
get
|
|
10251
|
-
return this.getAttribute("
|
|
10173
|
+
get variant() {
|
|
10174
|
+
return this.getAttribute("variant");
|
|
10252
10175
|
}
|
|
10253
|
-
set
|
|
10254
|
-
this.setAttribute("
|
|
10176
|
+
set variant(value) {
|
|
10177
|
+
this.setAttribute("variant", value);
|
|
10255
10178
|
}
|
|
10256
|
-
get
|
|
10257
|
-
return this.getAttribute("
|
|
10179
|
+
get color() {
|
|
10180
|
+
return this.getAttribute("color");
|
|
10258
10181
|
}
|
|
10259
|
-
set
|
|
10260
|
-
this.setAttribute("
|
|
10182
|
+
set color(value) {
|
|
10183
|
+
this.setAttribute("color", value);
|
|
10261
10184
|
}
|
|
10262
|
-
get
|
|
10263
|
-
return this.getAttribute("
|
|
10185
|
+
get fontSize() {
|
|
10186
|
+
return this.getAttribute("font-size");
|
|
10264
10187
|
}
|
|
10265
|
-
set
|
|
10266
|
-
this.setAttribute("
|
|
10188
|
+
set fontSize(value) {
|
|
10189
|
+
this.setAttribute("font-size", value);
|
|
10267
10190
|
}
|
|
10268
|
-
get
|
|
10269
|
-
return this.getAttribute("
|
|
10191
|
+
get fontWeight() {
|
|
10192
|
+
return this.getAttribute("font-weight");
|
|
10270
10193
|
}
|
|
10271
|
-
set
|
|
10272
|
-
this.setAttribute("
|
|
10194
|
+
set fontWeight(value) {
|
|
10195
|
+
this.setAttribute("font-weight", value);
|
|
10273
10196
|
}
|
|
10274
|
-
get
|
|
10275
|
-
return this.getAttribute("
|
|
10197
|
+
get textAlign() {
|
|
10198
|
+
return this.getAttribute("text-align");
|
|
10276
10199
|
}
|
|
10277
|
-
set
|
|
10278
|
-
this.setAttribute("
|
|
10200
|
+
set textAlign(value) {
|
|
10201
|
+
this.setAttribute("text-align", value);
|
|
10279
10202
|
}
|
|
10280
|
-
get
|
|
10281
|
-
return this.getAttribute("
|
|
10203
|
+
get textAlignMobile() {
|
|
10204
|
+
return this.getAttribute("text-align--mobile");
|
|
10282
10205
|
}
|
|
10283
|
-
set
|
|
10284
|
-
this.setAttribute("
|
|
10206
|
+
set textAlignMobile(value) {
|
|
10207
|
+
this.setAttribute("text-align--mobile", value);
|
|
10285
10208
|
}
|
|
10286
|
-
get
|
|
10287
|
-
return this.getAttribute("
|
|
10209
|
+
get textAlignTablet() {
|
|
10210
|
+
return this.getAttribute("text-align--tablet");
|
|
10288
10211
|
}
|
|
10289
|
-
set
|
|
10290
|
-
this.setAttribute("
|
|
10212
|
+
set textAlignTablet(value) {
|
|
10213
|
+
this.setAttribute("text-align--tablet", value);
|
|
10291
10214
|
}
|
|
10292
|
-
get
|
|
10293
|
-
return this.getAttribute("
|
|
10215
|
+
get textAlignLaptop() {
|
|
10216
|
+
return this.getAttribute("text-align--laptop");
|
|
10294
10217
|
}
|
|
10295
|
-
set
|
|
10296
|
-
this.setAttribute("
|
|
10218
|
+
set textAlignLaptop(value) {
|
|
10219
|
+
this.setAttribute("text-align--laptop", value);
|
|
10297
10220
|
}
|
|
10298
|
-
get
|
|
10299
|
-
return this.getAttribute("
|
|
10221
|
+
get inverted() {
|
|
10222
|
+
return this.getAttribute("inverted");
|
|
10300
10223
|
}
|
|
10301
|
-
set
|
|
10302
|
-
this.setAttribute("
|
|
10224
|
+
set inverted(value) {
|
|
10225
|
+
this.setAttribute("inverted", value);
|
|
10303
10226
|
}
|
|
10304
|
-
get
|
|
10305
|
-
return this.getAttribute("
|
|
10227
|
+
get disabled() {
|
|
10228
|
+
return this.getAttribute("disabled");
|
|
10306
10229
|
}
|
|
10307
|
-
set
|
|
10308
|
-
this.setAttribute("
|
|
10230
|
+
set disabled(value) {
|
|
10231
|
+
this.setAttribute("disabled", value);
|
|
10309
10232
|
}
|
|
10310
|
-
|
|
10311
|
-
|
|
10233
|
+
};
|
|
10234
|
+
_Paragraph.nativeName = "p";
|
|
10235
|
+
let Paragraph = _Paragraph;
|
|
10236
|
+
if (!customElements.get("px-p")) {
|
|
10237
|
+
customElements.define("px-p", Paragraph);
|
|
10238
|
+
}
|
|
10239
|
+
const _FooterSitemap = class _FooterSitemap extends PxElement {
|
|
10240
|
+
constructor() {
|
|
10241
|
+
super();
|
|
10242
|
+
this.template = () => `<div class="footer-sitemap">
|
|
10243
|
+
<px-grid grid-cols="4" grid-cols--mobile="1" role="list" gap--mobile="none">
|
|
10244
|
+
<slot></slot>
|
|
10245
|
+
</px-grid>
|
|
10246
|
+
</div>`;
|
|
10247
|
+
this.shadowRoot.innerHTML = this.template();
|
|
10312
10248
|
}
|
|
10313
|
-
|
|
10314
|
-
|
|
10249
|
+
static get observedAttributes() {
|
|
10250
|
+
return [...super.observedAttributes, "inverted"];
|
|
10315
10251
|
}
|
|
10316
|
-
|
|
10317
|
-
|
|
10252
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10253
|
+
if (oldValue !== newValue) {
|
|
10254
|
+
switch (attrName) {
|
|
10255
|
+
case "inverted":
|
|
10256
|
+
for (let i = 0; i < this.$children.length; i++) {
|
|
10257
|
+
if (!this.$children[i].hasAttribute("inverted")) {
|
|
10258
|
+
this.$children[i].toggleAttribute("inverted");
|
|
10259
|
+
}
|
|
10260
|
+
}
|
|
10261
|
+
break;
|
|
10262
|
+
default:
|
|
10263
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
10264
|
+
break;
|
|
10265
|
+
}
|
|
10266
|
+
}
|
|
10318
10267
|
}
|
|
10319
|
-
|
|
10320
|
-
this.
|
|
10268
|
+
get $children() {
|
|
10269
|
+
return this.querySelectorAll("px-footer-sitemap > *");
|
|
10321
10270
|
}
|
|
10322
|
-
get
|
|
10323
|
-
return this.
|
|
10271
|
+
get inverted() {
|
|
10272
|
+
return this.hasAttribute("inverted");
|
|
10324
10273
|
}
|
|
10325
|
-
set
|
|
10326
|
-
|
|
10274
|
+
set inverted(value) {
|
|
10275
|
+
if (value) {
|
|
10276
|
+
this.setAttribute("inverted", "");
|
|
10277
|
+
} else {
|
|
10278
|
+
this.removeAttribute("inverted");
|
|
10279
|
+
}
|
|
10327
10280
|
}
|
|
10328
|
-
|
|
10329
|
-
|
|
10281
|
+
};
|
|
10282
|
+
_FooterSitemap.nativeName = "div";
|
|
10283
|
+
let FooterSitemap = _FooterSitemap;
|
|
10284
|
+
if (!customElements.get("px-footer-sitemap")) {
|
|
10285
|
+
customElements.define("px-footer-sitemap", FooterSitemap);
|
|
10286
|
+
}
|
|
10287
|
+
const styles$s = ":host,:host>*{display:block;box-sizing:border-box}::slotted(ul){margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:10px}::slotted(ul.link-list-img){display:flex;flex-wrap:wrap;flex-direction:row;gap:20px}";
|
|
10288
|
+
const styleSheet$n = new CSSStyleSheet();
|
|
10289
|
+
styleSheet$n.replaceSync(styles$s);
|
|
10290
|
+
const _FooterSitemapItem = class _FooterSitemapItem extends PxElement {
|
|
10291
|
+
constructor() {
|
|
10292
|
+
super(styleSheet$n);
|
|
10293
|
+
this.templateMobile = () => `<div role="listitem">
|
|
10294
|
+
<px-accordion ${this.inverted ? "inverted" : ""}>
|
|
10295
|
+
<span slot="title"><slot name="links-list-title"></slot></span>
|
|
10296
|
+
<span slot="content">
|
|
10297
|
+
<slot name="links-list"></slot>
|
|
10298
|
+
</span>
|
|
10299
|
+
</px-accordion>
|
|
10300
|
+
</div>`;
|
|
10301
|
+
this.templateDesktop = () => `<div role="listitem">
|
|
10302
|
+
<px-vstack gap="default">
|
|
10303
|
+
<px-p variant="title-l" ${this.inverted ? "inverted" : ""}>
|
|
10304
|
+
<slot name="links-list-title"></slot>
|
|
10305
|
+
</px-p>
|
|
10306
|
+
<slot name="links-list"></slot>
|
|
10307
|
+
</px-vstack>
|
|
10308
|
+
</div>`;
|
|
10309
|
+
this.throttledLoadTemplate = throttle(this.loadTemplate.bind(this), 50);
|
|
10310
|
+
this.loadTemplate();
|
|
10330
10311
|
}
|
|
10331
|
-
|
|
10332
|
-
|
|
10312
|
+
static get observedAttributes() {
|
|
10313
|
+
return [...super.observedAttributes, "inverted"];
|
|
10333
10314
|
}
|
|
10334
|
-
|
|
10335
|
-
|
|
10315
|
+
connectedCallback() {
|
|
10316
|
+
super.connectedCallback();
|
|
10317
|
+
this.loadTemplate();
|
|
10318
|
+
window.addEventListener("resize", this.throttledLoadTemplate);
|
|
10319
|
+
if (!this.$ul) {
|
|
10320
|
+
console.error(
|
|
10321
|
+
"The footer sitemap item must contain a <ul> element with links."
|
|
10322
|
+
);
|
|
10323
|
+
} else {
|
|
10324
|
+
if (this.$ul.querySelector("px-img")) {
|
|
10325
|
+
this.$ul.classList.add("link-list-img");
|
|
10326
|
+
}
|
|
10327
|
+
}
|
|
10336
10328
|
}
|
|
10337
|
-
|
|
10338
|
-
|
|
10329
|
+
disconnectedCallback() {
|
|
10330
|
+
window.removeEventListener("resize", this.throttledLoadTemplate);
|
|
10339
10331
|
}
|
|
10340
|
-
|
|
10341
|
-
|
|
10332
|
+
loadTemplate() {
|
|
10333
|
+
const previousSize = this.lastSize;
|
|
10334
|
+
const currentSize = window.innerWidth < 768 ? "mobile" : "desktop";
|
|
10335
|
+
if (previousSize !== currentSize) {
|
|
10336
|
+
if (currentSize === "mobile") {
|
|
10337
|
+
this.shadowRoot.innerHTML = this.templateMobile();
|
|
10338
|
+
} else {
|
|
10339
|
+
this.shadowRoot.innerHTML = this.templateDesktop();
|
|
10340
|
+
}
|
|
10341
|
+
this.lastSize = currentSize;
|
|
10342
|
+
}
|
|
10342
10343
|
}
|
|
10343
|
-
|
|
10344
|
-
|
|
10344
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10345
|
+
if (oldValue !== newValue) {
|
|
10346
|
+
switch (attrName) {
|
|
10347
|
+
case "inverted":
|
|
10348
|
+
for (let i = 0; i < this.$children.length; i++) {
|
|
10349
|
+
if (!this.$children[i].hasAttribute("inverted")) {
|
|
10350
|
+
this.$children[i].toggleAttribute("inverted");
|
|
10351
|
+
}
|
|
10352
|
+
}
|
|
10353
|
+
this.$ul.querySelectorAll("px-a").forEach((link) => {
|
|
10354
|
+
link.toggleAttribute("inverted");
|
|
10355
|
+
});
|
|
10356
|
+
break;
|
|
10357
|
+
default:
|
|
10358
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
10359
|
+
break;
|
|
10360
|
+
}
|
|
10361
|
+
}
|
|
10345
10362
|
}
|
|
10346
|
-
get
|
|
10347
|
-
return this.
|
|
10363
|
+
get $ul() {
|
|
10364
|
+
return this.querySelector("ul");
|
|
10348
10365
|
}
|
|
10349
|
-
|
|
10350
|
-
this.
|
|
10366
|
+
get $children() {
|
|
10367
|
+
return this.querySelectorAll("px-footer-sitemap-item > *");
|
|
10351
10368
|
}
|
|
10352
|
-
get
|
|
10353
|
-
return this.
|
|
10369
|
+
get inverted() {
|
|
10370
|
+
return this.hasAttribute("inverted");
|
|
10354
10371
|
}
|
|
10355
|
-
set
|
|
10356
|
-
|
|
10372
|
+
set inverted(value) {
|
|
10373
|
+
if (value) {
|
|
10374
|
+
this.setAttribute("inverted", "");
|
|
10375
|
+
} else {
|
|
10376
|
+
this.removeAttribute("inverted");
|
|
10377
|
+
}
|
|
10357
10378
|
}
|
|
10358
|
-
}
|
|
10359
|
-
|
|
10360
|
-
|
|
10379
|
+
};
|
|
10380
|
+
_FooterSitemapItem.nativeName = "div";
|
|
10381
|
+
let FooterSitemapItem = _FooterSitemapItem;
|
|
10382
|
+
if (!customElements.get("px-footer-sitemap-item")) {
|
|
10383
|
+
customElements.define("px-footer-sitemap-item", FooterSitemapItem);
|
|
10361
10384
|
}
|
|
10362
10385
|
const styles$r = ":host{display:block}:host *{box-sizing:border-box}button,a{display:block;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-font-line-height-l);color:var(--px-color-text-neutral-default);text-align:center;cursor:pointer;padding:2em 0;height:100%}button:after,a:after{content:attr(data-label);display:block;height:0;width:auto;visibility:hidden;overflow:hidden;-webkit-user-select:none;user-select:none;pointer-events:none;font-weight:var(--px-font-weight-title)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}button:hover,a:hover{font-weight:var(--px-font-weight-title);color:var(--px-color-background-container-primary-default);padding-block:calc(2em - 2px)}button{margin:0;border:0;border-bottom:2px solid rgba(0,0,0,0);outline:0;background:inherit}button[aria-expanded=true]{font-weight:var(--px-font-weight-title);color:var(--px-color-background-container-primary-default);border-bottom-color:var(--px-color-background-container-primary-default)}a{text-decoration:none}@media only screen and (min-width: 48em){button,a{font-size:var(--px-text-size-label-m-tablet)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media only screen and (min-width: 64.0625em){button,a{font-size:var(--px-text-size-label-m-laptop)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media only screen and (min-width: 90.0625em){button,a{font-size:var(--px-text-size-label-m-desktop)}button:focus-visible,a:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}";
|
|
10363
10386
|
const stylesheet$7 = new CSSStyleSheet();
|