@proximus/lavender 1.0.0-alpha.19 → 1.0.0-alpha.21
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 +756 -145
- package/dist/lavender.umd.js +1 -1
- package/package.json +2 -2
package/dist/lavender.es.js
CHANGED
|
@@ -437,7 +437,7 @@ function getViewportFormat() {
|
|
|
437
437
|
return "mobile";
|
|
438
438
|
}
|
|
439
439
|
}
|
|
440
|
-
const styles$d = ".flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap
|
|
440
|
+
const styles$d = ".flex-container{display:flex;height:100%;width:100%;box-sizing:border-box;flex-direction:var(--flex-direction--mobile-value);gap:var(--flex-gap--mobile-value);flex-wrap:var(--flex-wrap--mobile-value);justify-content:var(--flex-justify-content--mobile-value);align-items:var(--flex-align-items--mobile-value)}@media screen and (min-width: 768px){.flex-container{flex-direction:var(--flex-direction--tablet-value);gap:var(--flex-gap--tablet-value);flex-wrap:var(--flex-wrap--tablet-value);justify-content:var(--flex-justify-content--tablet-value);align-items:var(--flex-align-items--tablet-value)}}@media screen and (min-width: 1025px){.flex-container{flex-direction:var(--flex-direction--laptop-value);gap:var(--flex-gap--laptop-value);flex-wrap:var(--flex-wrap--laptop-value);justify-content:var(--flex-justify-content--laptop-value);align-items:var(--flex-align-items--laptop-value)}}@media screen and (min-width: 1441px){.flex-container{flex-direction:var(--flex-direction--desktop-value);gap:var(--flex-gap--desktop-value);flex-wrap:var(--flex-wrap--desktop-value);justify-content:var(--flex-justify-content--desktop-value);align-items:var(--flex-align-items--desktop-value)}}";
|
|
441
441
|
const styleSheet$d = new CSSStyleSheet();
|
|
442
442
|
styleSheet$d.replaceSync(styles$d);
|
|
443
443
|
const gapValues = [
|
|
@@ -456,6 +456,34 @@ const gapValues = [
|
|
|
456
456
|
"inside-section-l",
|
|
457
457
|
"between-sections"
|
|
458
458
|
];
|
|
459
|
+
const directionValues = [
|
|
460
|
+
"",
|
|
461
|
+
"default",
|
|
462
|
+
"row",
|
|
463
|
+
"row-reverse",
|
|
464
|
+
"column",
|
|
465
|
+
"column-reverse"
|
|
466
|
+
];
|
|
467
|
+
const alignItemsValues = [
|
|
468
|
+
"",
|
|
469
|
+
"default",
|
|
470
|
+
"stretch",
|
|
471
|
+
"flex-start",
|
|
472
|
+
"flex-end",
|
|
473
|
+
"center",
|
|
474
|
+
"baseline"
|
|
475
|
+
];
|
|
476
|
+
const justifyContentValues = [
|
|
477
|
+
"",
|
|
478
|
+
"default",
|
|
479
|
+
"flex-start",
|
|
480
|
+
"flex-end",
|
|
481
|
+
"center",
|
|
482
|
+
"space-between",
|
|
483
|
+
"space-around",
|
|
484
|
+
"space-evenly"
|
|
485
|
+
];
|
|
486
|
+
const wrapValues = ["", "default", "nowrap", "wrap", "wrap-reverse"];
|
|
459
487
|
class Stack extends WithFlexAttributes {
|
|
460
488
|
constructor() {
|
|
461
489
|
super(styleSheet$d);
|
|
@@ -468,6 +496,18 @@ class Stack extends WithFlexAttributes {
|
|
|
468
496
|
if (!this.hasAttribute("direction")) {
|
|
469
497
|
this.direction = "row";
|
|
470
498
|
}
|
|
499
|
+
if (!this.hasAttribute("gap")) {
|
|
500
|
+
this.gap = "inside-section-none";
|
|
501
|
+
}
|
|
502
|
+
if (!this.hasAttribute("align-items")) {
|
|
503
|
+
this.alignItems = "stretch";
|
|
504
|
+
}
|
|
505
|
+
if (!this.hasAttribute("justify-content")) {
|
|
506
|
+
this.justifyContent = "flex-start";
|
|
507
|
+
}
|
|
508
|
+
if (!this.hasAttribute("wrap")) {
|
|
509
|
+
this.wrap = "nowrap";
|
|
510
|
+
}
|
|
471
511
|
}
|
|
472
512
|
static get observedAttributes() {
|
|
473
513
|
return [
|
|
@@ -478,6 +518,10 @@ class Stack extends WithFlexAttributes {
|
|
|
478
518
|
"direction--laptop",
|
|
479
519
|
"direction--desktop",
|
|
480
520
|
"gap",
|
|
521
|
+
"gap--mobile",
|
|
522
|
+
"gap--tablet",
|
|
523
|
+
"gap--laptop",
|
|
524
|
+
"gap--desktop",
|
|
481
525
|
"justify-content",
|
|
482
526
|
"justify-content--mobile",
|
|
483
527
|
"justify-content--tablet",
|
|
@@ -489,10 +533,10 @@ class Stack extends WithFlexAttributes {
|
|
|
489
533
|
"align-items--laptop",
|
|
490
534
|
"align-items--desktop",
|
|
491
535
|
"wrap",
|
|
492
|
-
"wrap
|
|
493
|
-
"wrap
|
|
494
|
-
"wrap
|
|
495
|
-
"wrap
|
|
536
|
+
"wrap--mobile",
|
|
537
|
+
"wrap--tablet",
|
|
538
|
+
"wrap--laptop",
|
|
539
|
+
"wrap--desktop"
|
|
496
540
|
];
|
|
497
541
|
}
|
|
498
542
|
attributeChangedCallback(name, oldValue, newValue) {
|
|
@@ -501,148 +545,97 @@ class Stack extends WithFlexAttributes {
|
|
|
501
545
|
}
|
|
502
546
|
switch (name) {
|
|
503
547
|
case "gap":
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
this
|
|
509
|
-
`--flex-gap-tablet-value`,
|
|
510
|
-
this.getGapCSSVariable(newValue, "tablet")
|
|
511
|
-
);
|
|
512
|
-
this.$el.style.setProperty(
|
|
513
|
-
`--flex-gap-laptop-value`,
|
|
514
|
-
this.getGapCSSVariable(newValue, "desktop")
|
|
515
|
-
);
|
|
516
|
-
this.$el.style.setProperty(
|
|
517
|
-
`--flex-gap-desktop-value`,
|
|
518
|
-
this.getGapCSSVariable(newValue, "desktop")
|
|
519
|
-
);
|
|
520
|
-
break;
|
|
521
|
-
case "direction":
|
|
522
|
-
if (!this.$el.style.getPropertyValue("--flex-direction--mobile-value")) {
|
|
523
|
-
this.$el.style.setProperty(
|
|
524
|
-
`--flex-direction--mobile-value`,
|
|
525
|
-
newValue
|
|
526
|
-
);
|
|
527
|
-
}
|
|
528
|
-
if (!this.$el.style.getPropertyValue("--flex-direction--tablet-value")) {
|
|
529
|
-
this.$el.style.setProperty(
|
|
530
|
-
`--flex-direction--tablet-value`,
|
|
531
|
-
newValue
|
|
532
|
-
);
|
|
533
|
-
}
|
|
534
|
-
if (!this.$el.style.getPropertyValue("--flex-direction--laptop-value")) {
|
|
535
|
-
this.$el.style.setProperty(
|
|
536
|
-
`--flex-direction--laptop-value`,
|
|
537
|
-
newValue
|
|
538
|
-
);
|
|
539
|
-
}
|
|
540
|
-
if (!this.$el.style.getPropertyValue("--flex-direction--desktop-value")) {
|
|
541
|
-
this.$el.style.setProperty(
|
|
542
|
-
`--flex-direction--desktop-value`,
|
|
543
|
-
newValue
|
|
544
|
-
);
|
|
545
|
-
}
|
|
548
|
+
case "gap--mobile":
|
|
549
|
+
case "gap--tablet":
|
|
550
|
+
case "gap--laptop":
|
|
551
|
+
case "gap--desktop":
|
|
552
|
+
this.updateFlexProperties(name, oldValue, newValue, gapValues);
|
|
546
553
|
break;
|
|
547
554
|
case "justify-content":
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
)) {
|
|
559
|
-
this.$el.style.setProperty(
|
|
560
|
-
`--flex-justify-content--tablet-value`,
|
|
561
|
-
newValue
|
|
562
|
-
);
|
|
563
|
-
}
|
|
564
|
-
if (!this.$el.style.getPropertyValue(
|
|
565
|
-
"--flex-justify-content--laptop-value"
|
|
566
|
-
)) {
|
|
567
|
-
this.$el.style.setProperty(
|
|
568
|
-
`--flex-justify-content--laptop-value`,
|
|
569
|
-
newValue
|
|
570
|
-
);
|
|
571
|
-
}
|
|
572
|
-
if (!this.$el.style.getPropertyValue(
|
|
573
|
-
"--flex-justify-content--desktop-value"
|
|
574
|
-
)) {
|
|
575
|
-
this.$el.style.setProperty(
|
|
576
|
-
`--flex-justify-content--desktop-value`,
|
|
577
|
-
newValue
|
|
578
|
-
);
|
|
579
|
-
}
|
|
555
|
+
case "justify-content--mobile":
|
|
556
|
+
case "justify-content--tablet":
|
|
557
|
+
case "justify-content--laptop":
|
|
558
|
+
case "justify-content--desktop":
|
|
559
|
+
this.updateFlexProperties(
|
|
560
|
+
name,
|
|
561
|
+
oldValue,
|
|
562
|
+
newValue,
|
|
563
|
+
justifyContentValues
|
|
564
|
+
);
|
|
580
565
|
break;
|
|
581
566
|
case "align-items":
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
}
|
|
588
|
-
if (!this.$el.style.getPropertyValue("--flex-align-items--tablet-value")) {
|
|
589
|
-
this.$el.style.setProperty(
|
|
590
|
-
`--flex-align-items--tablet-value`,
|
|
591
|
-
newValue
|
|
592
|
-
);
|
|
593
|
-
}
|
|
594
|
-
if (!this.$el.style.getPropertyValue("--flex-align-items--laptop-value")) {
|
|
595
|
-
this.$el.style.setProperty(
|
|
596
|
-
`--flex-align-items--laptop-value`,
|
|
597
|
-
newValue
|
|
598
|
-
);
|
|
599
|
-
}
|
|
600
|
-
if (!this.$el.style.getPropertyValue("--flex-align-items--desktop-value")) {
|
|
601
|
-
this.$el.style.setProperty(
|
|
602
|
-
`--flex-align-items--desktop-value`,
|
|
603
|
-
newValue
|
|
604
|
-
);
|
|
605
|
-
}
|
|
567
|
+
case "align-items--mobile":
|
|
568
|
+
case "align-items--tablet":
|
|
569
|
+
case "align-items--laptop":
|
|
570
|
+
case "align-items--desktop":
|
|
571
|
+
this.updateFlexProperties(name, oldValue, newValue, alignItemsValues);
|
|
606
572
|
break;
|
|
607
573
|
case "wrap":
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
}
|
|
614
|
-
if (!this.$el.style.getPropertyValue(`--flex-wrap-laptop-value`)) {
|
|
615
|
-
this.$el.style.setProperty(`--flex-wrap-laptop-value`, newValue);
|
|
616
|
-
}
|
|
617
|
-
if (!this.$el.style.getPropertyValue(`--flex-wrap-desktop-value`)) {
|
|
618
|
-
this.$el.style.setProperty(`--flex-wrap-desktop-value`, newValue);
|
|
619
|
-
}
|
|
574
|
+
case "wrap--mobile":
|
|
575
|
+
case "wrap--tablet":
|
|
576
|
+
case "wrap--laptop":
|
|
577
|
+
case "wrap--desktop":
|
|
578
|
+
this.updateFlexProperties(name, oldValue, newValue, wrapValues);
|
|
620
579
|
break;
|
|
580
|
+
case "direction":
|
|
621
581
|
case "direction--mobile":
|
|
622
582
|
case "direction--tablet":
|
|
623
583
|
case "direction--laptop":
|
|
624
584
|
case "direction--desktop":
|
|
625
|
-
|
|
626
|
-
case "justify-content--tablet":
|
|
627
|
-
case "justify-content--laptop":
|
|
628
|
-
case "justify-content--desktop":
|
|
629
|
-
case "align-items--mobile":
|
|
630
|
-
case "align-items--tablet":
|
|
631
|
-
case "align-items--laptop":
|
|
632
|
-
case "align-items--desktop":
|
|
633
|
-
case "wrap-mobile":
|
|
634
|
-
case "wrap-tablet":
|
|
635
|
-
case "wrap-laptop":
|
|
636
|
-
case "wrap-desktop":
|
|
637
|
-
this.$el.style.setProperty(`--flex-${name}-value`, newValue);
|
|
585
|
+
this.updateFlexProperties(name, oldValue, newValue, directionValues);
|
|
638
586
|
break;
|
|
639
587
|
default:
|
|
640
588
|
super.attributeChangedCallback(name, oldValue, newValue);
|
|
641
589
|
break;
|
|
642
590
|
}
|
|
643
591
|
}
|
|
644
|
-
|
|
645
|
-
|
|
592
|
+
updateFlexProperties(name, oldValue, newValue, attrValue) {
|
|
593
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
594
|
+
console.error(`Bad ${name} value for`, this.$el);
|
|
595
|
+
}
|
|
596
|
+
const hasBreakpoint = name.indexOf("--") > -1;
|
|
597
|
+
const cssPropertyName = hasBreakpoint ? name.split("--")[0] : name;
|
|
598
|
+
const breakpoints = [];
|
|
599
|
+
if (!hasBreakpoint) {
|
|
600
|
+
if (!this.getAttribute(cssPropertyName + "--mobile")) {
|
|
601
|
+
breakpoints.push("mobile");
|
|
602
|
+
}
|
|
603
|
+
if (!this.getAttribute(cssPropertyName + "--tablet")) {
|
|
604
|
+
breakpoints.push("tablet");
|
|
605
|
+
}
|
|
606
|
+
if (!this.getAttribute(cssPropertyName + "--laptop")) {
|
|
607
|
+
breakpoints.push("laptop");
|
|
608
|
+
}
|
|
609
|
+
if (!this.getAttribute(cssPropertyName + "--desktop")) {
|
|
610
|
+
breakpoints.push("desktop");
|
|
611
|
+
}
|
|
612
|
+
breakpoints.forEach((breakpoint) => {
|
|
613
|
+
this.updateStyle(cssPropertyName, breakpoint, oldValue, attrValue);
|
|
614
|
+
this.updateStyle(cssPropertyName, breakpoint, newValue, attrValue);
|
|
615
|
+
});
|
|
616
|
+
} else {
|
|
617
|
+
const breakpoint = name.split("--")[1];
|
|
618
|
+
this.updateStyle(cssPropertyName, breakpoint, oldValue, attrValue);
|
|
619
|
+
this.updateStyle(cssPropertyName, breakpoint, newValue, attrValue);
|
|
620
|
+
}
|
|
621
|
+
}
|
|
622
|
+
updateStyle(cssName, breakpoint, value, attrValue) {
|
|
623
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
624
|
+
if (cssName === "gap" && attrValue.includes(value)) {
|
|
625
|
+
this.$el.style.setProperty(
|
|
626
|
+
`--flex-${cssName}--${breakpoint}-value`,
|
|
627
|
+
`var(--px-spacing-${value}-${breakpoint === "laptop" ? "desktop" : breakpoint})`
|
|
628
|
+
);
|
|
629
|
+
} else {
|
|
630
|
+
this.$el.style.setProperty(
|
|
631
|
+
`--flex-${cssName}--${breakpoint}-value`,
|
|
632
|
+
value
|
|
633
|
+
);
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
checkName(values, value) {
|
|
638
|
+
return values.includes(value);
|
|
646
639
|
}
|
|
647
640
|
get direction() {
|
|
648
641
|
return this.getAttribute("direction");
|
|
@@ -765,28 +758,28 @@ class Stack extends WithFlexAttributes {
|
|
|
765
758
|
this.setAttribute("wrap", value);
|
|
766
759
|
}
|
|
767
760
|
get wrapMobile() {
|
|
768
|
-
return this.getAttribute("wrap
|
|
761
|
+
return this.getAttribute("wrap--mobile");
|
|
769
762
|
}
|
|
770
763
|
set wrapMobile(value) {
|
|
771
|
-
this.setAttribute("wrap
|
|
764
|
+
this.setAttribute("wrap--mobile", value);
|
|
772
765
|
}
|
|
773
766
|
get wrapTablet() {
|
|
774
|
-
return this.getAttribute("wrap
|
|
767
|
+
return this.getAttribute("wrap--tablet");
|
|
775
768
|
}
|
|
776
769
|
set wrapTablet(value) {
|
|
777
|
-
this.setAttribute("wrap
|
|
770
|
+
this.setAttribute("wrap--tablet", value);
|
|
778
771
|
}
|
|
779
772
|
get wrapLaptop() {
|
|
780
|
-
return this.getAttribute("wrap
|
|
773
|
+
return this.getAttribute("wrap--laptop");
|
|
781
774
|
}
|
|
782
775
|
set wrapLaptop(value) {
|
|
783
|
-
this.setAttribute("wrap
|
|
776
|
+
this.setAttribute("wrap--laptop", value);
|
|
784
777
|
}
|
|
785
778
|
get wrapDesktop() {
|
|
786
|
-
return this.getAttribute("wrap
|
|
779
|
+
return this.getAttribute("wrap--desktop");
|
|
787
780
|
}
|
|
788
781
|
set wrapDesktop(value) {
|
|
789
|
-
this.setAttribute("wrap
|
|
782
|
+
this.setAttribute("wrap--desktop", value);
|
|
790
783
|
}
|
|
791
784
|
get $el() {
|
|
792
785
|
return this.shadowRoot.querySelector(".flex-container");
|
|
@@ -1069,6 +1062,532 @@ class Page extends WithFlexAttributes {
|
|
|
1069
1062
|
if (customElements.get("px-page") === void 0) {
|
|
1070
1063
|
customElements.define("px-page", Page);
|
|
1071
1064
|
}
|
|
1065
|
+
const gridCss = ":host{--grid-cols: initial;--grid-cols--mobile: initial;--grid-cols--tablet: initial;--grid-cols--laptop: initial;--grid-cols--desktop: initial;--justify-content: initial;--justify-items: initial;--align-content: initial;--align-items: initial}.grid{display:grid;gap:var(--grid-gap--mobile, var(--px-spacing-inside-section-default-mobile));grid-template-columns:repeat(var(--grid-cols),minmax(0,1fr));justify-content:var(--justify-content);justify-items:var(--justify-items);align-content:var(--align-content);align-items:var(--align-items)}@media screen and (min-width: 768px){.grid{gap:var( --grid-gap--tablet, var(--px-spacing-inside-section-default-tablet) )}}@media screen and (min-width: 1025px){.grid{gap:var( --grid-gap--laptop, var(--px-spacing-inside-section-default-desktop) )}}.justify-content-normal{justify-content:normal}.justify-content-start{justify-content:start}.justify-content-end{justify-content:end}.justify-content-center{justify-content:center}.justify-content-space-between{justify-content:space-between}.justify-content-space-around{justify-content:space-around}.justify-content-space-evenly{justify-content:space-evenly}.justify-content-stretch{justify-content:stretch}.justify-items-start{justify-items:start}.justify-items-end{justify-items:end}.justify-items-center{justify-items:center}.justify-items-stretch{justify-items:stretch}.align-content-normal{align-content:normal}.align-content-start{align-content:start}.align-content-end{align-content:end}.align-content-center{align-content:center}.align-content-space-between{align-content:space-between}.align-content-space-around{align-content:space-around}.align-content-space-evenly{align-content:space-evenly}.align-content-stretch{align-content:stretch}.align-items-start{align-items:start}.align-items-end{align-items:end}.align-items-center{align-items:center}.align-items-stretch{align-items:stretch}@media only screen and (max-width: 767px){.grid{grid-template-columns:repeat(var(--grid-cols--mobile, var(--grid-cols)),minmax(0,1fr))}.justify-content-normal-mobile{justify-content:normal}.justify-content-start-mobile{justify-content:start}.justify-content-end-mobile{justify-content:end}.justify-content-center-mobile{justify-content:center}.justify-content-space-between-mobile{justify-content:space-between}.justify-content-space-around-mobile{justify-content:space-around}.justify-content-space-evenly-mobile{justify-content:space-evenly}.justify-content-stretch-mobile{justify-content:stretch}.justify-items-start-mobile{justify-items:start}.justify-items-end-mobile{justify-items:end}.justify-items-center-mobile{justify-items:center}.justify-items-stretch-mobile{justify-items:stretch}.align-content-normal-mobile{align-content:normal}.align-content-start-mobile{align-content:start}.align-content-end-mobile{align-content:end}.align-content-center-mobile{align-content:center}.align-content-space-between-mobile{align-content:space-between}.align-content-space-around-mobile{align-content:space-around}.align-content-space-evenly-mobile{align-content:space-evenly}.align-content-stretch-mobile{align-content:stretch}.align-items-start-mobile{align-items:start}.align-items-end-mobile{align-items:end}.align-items-center-mobile{align-items:center}.align-items-stretch-mobile{align-items:stretch}}@media only screen and (min-width: 768px) and (max-width: 1024px){.grid{grid-template-columns:repeat(var(--grid-cols--tablet, var(--grid-cols)),minmax(0,1fr))}.justify-content-normal-tablet{justify-content:normal}.justify-content-start-tablet{justify-content:start}.justify-content-end-tablet{justify-content:end}.justify-content-center-tablet{justify-content:center}.justify-content-space-between-tablet{justify-content:space-between}.justify-content-space-around-tablet{justify-content:space-around}.justify-content-space-evenly-tablet{justify-content:space-evenly}.justify-content-stretch-tablet{justify-content:stretch}.justify-items-start-tablet{justify-items:start}.justify-items-end-tablet{justify-items:end}.justify-items-center-tablet{justify-items:center}.justify-items-stretch-tablet{justify-items:stretch}.align-content-normal-tablet{align-content:normal}.align-content-start-tablet{align-content:start}.align-content-end-tablet{align-content:end}.align-content-center-tablet{align-content:center}.align-content-space-between-tablet{align-content:space-between}.align-content-space-around-tablet{align-content:space-around}.align-content-space-evenly-tablet{align-content:space-evenly}.align-content-stretch-tablet{align-content:stretch}.align-items-start-tablet{align-items:start}.align-items-end-tablet{align-items:end}.align-items-center-tablet{align-items:center}.align-items-stretch-tablet{align-items:stretch}}@media only screen and (min-width: 1025px){.grid{grid-template-columns:repeat(var(--grid-cols--laptop, var(--grid-cols)),minmax(0,1fr))}.justify-content-normal-laptop{justify-content:normal}.justify-content-start-laptop{justify-content:start}.justify-content-end-laptop{justify-content:end}.justify-content-center-laptop{justify-content:center}.justify-content-space-between-laptop{justify-content:space-between}.justify-content-space-around-laptop{justify-content:space-around}.justify-content-space-evenly-laptop{justify-content:space-evenly}.justify-content-stretch-laptop{justify-content:stretch}.justify-items-start-laptop{justify-items:start}.justify-items-end-laptop{justify-items:end}.justify-items-center-laptop{justify-items:center}.justify-items-stretch-laptop{justify-items:stretch}.align-content-normal-laptop{align-content:normal}.align-content-start-laptop{align-content:start}.align-content-end-laptop{align-content:end}.align-content-center-laptop{align-content:center}.align-content-space-between-laptop{align-content:space-between}.align-content-space-around-laptop{align-content:space-around}.align-content-space-evenly-laptop{align-content:space-evenly}.align-content-stretch-laptop{align-content:stretch}.align-items-start-laptop{align-items:start}.align-items-end-laptop{align-items:end}.align-items-center-laptop{align-items:center}.align-items-stretch-laptop{align-items:stretch}}";
|
|
1066
|
+
const gridItemCss = '::slotted([col-span="1"]){grid-column:span 1 / span 1}::slotted([col-span="2"]){grid-column:span 2 / span 2}::slotted([col-span="3"]){grid-column:span 3 / span 3}::slotted([col-span="4"]){grid-column:span 4 / span 4}::slotted([col-span="5"]){grid-column:span 5 / span 5}::slotted([col-span="6"]){grid-column:span 6 / span 6}::slotted([col-span="7"]){grid-column:span 7 / span 7}::slotted([col-span="8"]){grid-column:span 8 / span 8}::slotted([col-span="9"]){grid-column:span 9 / span 9}::slotted([col-span="10"]){grid-column:span 10 / span 10}::slotted([col-span="11"]){grid-column:span 11 / span 11}::slotted([col-span="12"]){grid-column:span 12 / span 12}::slotted([col-span="full"]){grid-column:1 / -1}::slotted([order="1"]){order:1}::slotted([order="2"]){order:2}::slotted([order="3"]){order:3}::slotted([order="4"]){order:4}::slotted([order="5"]){order:5}::slotted([order="6"]){order:6}::slotted([order="first"]){order:-9999}::slotted([order="last"]){order:9999}::slotted([order="none"]){order:0}::slotted([justify-self="auto"]){justify-self:auto}::slotted([justify-self="start"]){justify-self:start}::slotted([justify-self="end"]){justify-self:end}::slotted([justify-self="center"]){justify-self:center}::slotted([justify-self="stretch"]){justify-self:stretch}::slotted([align-self="auto"]){align-self:auto}::slotted([align-self="start"]){align-self:start}::slotted([align-self="end"]){align-self:end}::slotted([align-self="center"]){align-self:center}::slotted([align-self="stretch"]){align-self:stretch}::slotted([place-self="auto"]){place-self:auto}::slotted([place-self="start"]){place-self:start}::slotted([place-self="end"]){place-self:end}::slotted([place-self="center"]){place-self:center}::slotted([place-self="stretch"]){place-self:stretch}@media only screen and (max-width: 767px){::slotted([col--mobile="auto"]){grid-column:auto}::slotted([col-span--mobile="1"]){grid-column:span 1 / span 1}::slotted([col-span--mobile="2"]){grid-column:span 2 / span 2}::slotted([col-span--mobile="3"]){grid-column:span 3 / span 3}::slotted([col-span--mobile="4"]){grid-column:span 4 / span 4}::slotted([col-span--mobile="5"]){grid-column:span 5 / span 5}::slotted([col-span--mobile="6"]){grid-column:span 6 / span 6}::slotted([col-span--mobile="7"]){grid-column:span 7 / span 7}::slotted([col-span--mobile="8"]){grid-column:span 8 / span 8}::slotted([col-span--mobile="9"]){grid-column:span 9 / span 9}::slotted([col-span--mobile="10"]){grid-column:span 10 / span 10}::slotted([col-span--mobile="11"]){grid-column:span 11 / span 11}::slotted([col-span--mobile="12"]){grid-column:span 12 / span 12}::slotted([col-span--mobile="full"]){grid-column:1 / -1}::slotted([order--mobile="1"]){order:1}::slotted([order--mobile="2"]){order:2}::slotted([order--mobile="3"]){order:3}::slotted([order--mobile="4"]){order:4}::slotted([order--mobile="5"]){order:5}::slotted([order--mobile="6"]){order:6}::slotted([order--mobile="first"]){order:-9999}::slotted([order--mobile="last"]){order:9999}::slotted([order--mobile="none"]){order:0}::slotted([justify-self--mobile="auto"]){justify-self:auto}::slotted([justify-self--mobile="start"]){justify-self:start}::slotted([justify-self--mobile="end"]){justify-self:end}::slotted([justify-self--mobile="center"]){justify-self:center}::slotted([justify-self--mobile="stretch"]){justify-self:stretch}::slotted([align-self--mobile="auto"]){align-self:auto}::slotted([align-self--mobile="start"]){align-self:start}::slotted([align-self--mobile="end"]){align-self:end}::slotted([align-self--mobile="center"]){align-self:center}::slotted([align-self--mobile="stretch"]){align-self:stretch}::slotted([place-self--mobile="auto"]){place-self:auto}::slotted([place-self--mobile="start"]){place-self:start}::slotted([place-self--mobile="end"]){place-self:end}::slotted([place-self--mobile="center"]){place-self:center}::slotted([place-self--mobile="stretch"]){place-self:stretch}}@media only screen and (min-width: 768px) and (max-width: 1024px){::slotted([col--tablet="auto"]){grid-column:auto}::slotted([col-span--tablet="1"]){grid-column:span 1 / span 1}::slotted([col-span--tablet="2"]){grid-column:span 2 / span 2}::slotted([col-span--tablet="3"]){grid-column:span 3 / span 3}::slotted([col-span--tablet="4"]){grid-column:span 4 / span 4}::slotted([col-span--tablet="5"]){grid-column:span 5 / span 5}::slotted([col-span--tablet="6"]){grid-column:span 6 / span 6}::slotted([col-span--tablet="7"]){grid-column:span 7 / span 7}::slotted([col-span--tablet="8"]){grid-column:span 8 / span 8}::slotted([col-span--tablet="9"]){grid-column:span 9 / span 9}::slotted([col-span--tablet="10"]){grid-column:span 10 / span 10}::slotted([col-span--tablet="11"]){grid-column:span 11 / span 11}::slotted([col-span--tablet="12"]){grid-column:span 12 / span 12}::slotted([col-span--tablet="full"]){grid-column:1 / -1}::slotted([order--tablet="1"]){order:1}::slotted([order--tablet="2"]){order:2}::slotted([order--tablet="3"]){order:3}::slotted([order--tablet="4"]){order:4}::slotted([order--tablet="5"]){order:5}::slotted([order--tablet="6"]){order:6}::slotted([order--tablet="first"]){order:-9999}::slotted([order--tablet="last"]){order:9999}::slotted([order--tablet="none"]){order:0}::slotted([justify-self--tablet="auto"]){justify-self:auto}::slotted([justify-self--tablet="start"]){justify-self:start}::slotted([justify-self--tablet="end"]){justify-self:end}::slotted([justify-self--tablet="center"]){justify-self:center}::slotted([justify-self--tablet="stretch"]){justify-self:stretch}::slotted([align-self--tablet="auto"]){align-self:auto}::slotted([align-self--tablet="start"]){align-self:start}::slotted([align-self--tablet="end"]){align-self:end}::slotted([align-self--tablet="center"]){align-self:center}::slotted([align-self--tablet="stretch"]){align-self:stretch}::slotted([place-self--tablet="auto"]){place-self:auto}::slotted([place-self--tablet="start"]){place-self:start}::slotted([place-self--tablet="end"]){place-self:end}::slotted([place-self--tablet="center"]){place-self:center}::slotted([place-self--tablet="stretch"]){place-self:stretch}}@media only screen and (min-width: 1025px){::slotted([col--laptop="auto"]){grid-column:auto}::slotted([col-span--laptop="1"]){grid-column:span 1 / span 1}::slotted([col-span--laptop="2"]){grid-column:span 2 / span 2}::slotted([col-span--laptop="3"]){grid-column:span 3 / span 3}::slotted([col-span--laptop="4"]){grid-column:span 4 / span 4}::slotted([col-span--laptop="5"]){grid-column:span 5 / span 5}::slotted([col-span--laptop="6"]){grid-column:span 6 / span 6}::slotted([col-span--laptop="7"]){grid-column:span 7 / span 7}::slotted([col-span--laptop="8"]){grid-column:span 8 / span 8}::slotted([col-span--laptop="9"]){grid-column:span 9 / span 9}::slotted([col-span--laptop="10"]){grid-column:span 10 / span 10}::slotted([col-span--laptop="11"]){grid-column:span 11 / span 11}::slotted([col-span--laptop="12"]){grid-column:span 12 / span 12}::slotted([col-span--laptop="full"]){grid-column:1 / -1}::slotted([justify-self--laptop="auto"]){justify-self:auto}::slotted([justify-self--laptop="start"]){justify-self:start}::slotted([justify-self--laptop="end"]){justify-self:end}::slotted([justify-self--laptop="center"]){justify-self:center}::slotted([justify-self--laptop="stretch"]){justify-self:stretch}::slotted([align-self--laptop="auto"]){align-self:auto}::slotted([align-self--laptop="start"]){align-self:start}::slotted([align-self--laptop="end"]){align-self:end}::slotted([align-self--laptop="center"]){align-self:center}::slotted([align-self--laptop="stretch"]){align-self:stretch}::slotted([place-self--laptop="auto"]){place-self:auto}::slotted([place-self--laptop="start"]){place-self:start}::slotted([place-self--laptop="end"]){place-self:end}::slotted([place-self--laptop="center"]){place-self:center}::slotted([place-self--laptop="stretch"]){place-self:stretch}}';
|
|
1067
|
+
const gridStyles = new CSSStyleSheet();
|
|
1068
|
+
gridStyles.replaceSync(gridCss);
|
|
1069
|
+
const gridItemStyles = new CSSStyleSheet();
|
|
1070
|
+
gridItemStyles.replaceSync(gridItemCss);
|
|
1071
|
+
const gridColsValues = [
|
|
1072
|
+
"1",
|
|
1073
|
+
"2",
|
|
1074
|
+
"3",
|
|
1075
|
+
"4",
|
|
1076
|
+
"5",
|
|
1077
|
+
"6",
|
|
1078
|
+
"7",
|
|
1079
|
+
"8",
|
|
1080
|
+
"9",
|
|
1081
|
+
"10",
|
|
1082
|
+
"11",
|
|
1083
|
+
"12"
|
|
1084
|
+
];
|
|
1085
|
+
const contentAlignmentValues = [
|
|
1086
|
+
"",
|
|
1087
|
+
"start",
|
|
1088
|
+
"end",
|
|
1089
|
+
"center",
|
|
1090
|
+
"space-between",
|
|
1091
|
+
"space-around",
|
|
1092
|
+
"space-evenly",
|
|
1093
|
+
"stretch"
|
|
1094
|
+
];
|
|
1095
|
+
const itemsAlignmentValues = ["", "start", "end", "center", "stretch"];
|
|
1096
|
+
const _Grid = class _Grid extends PxElement {
|
|
1097
|
+
constructor() {
|
|
1098
|
+
super(gridStyles, gridItemStyles);
|
|
1099
|
+
this.template = () => `<div class="grid">
|
|
1100
|
+
<slot></slot>
|
|
1101
|
+
</div>`;
|
|
1102
|
+
this.shadowRoot.innerHTML = this.template();
|
|
1103
|
+
}
|
|
1104
|
+
static get observedAttributes() {
|
|
1105
|
+
return [
|
|
1106
|
+
...super.observedAttributes,
|
|
1107
|
+
"gap",
|
|
1108
|
+
"grid-cols",
|
|
1109
|
+
"grid-cols--mobile",
|
|
1110
|
+
"grid-cols--tablet",
|
|
1111
|
+
"grid-cols--laptop",
|
|
1112
|
+
"justify-content",
|
|
1113
|
+
"justify-items",
|
|
1114
|
+
"align-content",
|
|
1115
|
+
"align-items",
|
|
1116
|
+
"justify-content--mobile",
|
|
1117
|
+
"justify-items--mobile",
|
|
1118
|
+
"align-content--mobile",
|
|
1119
|
+
"align-items--mobile",
|
|
1120
|
+
"justify-content--tablet",
|
|
1121
|
+
"justify-items--tablet",
|
|
1122
|
+
"align-content--tablet",
|
|
1123
|
+
"align-items--tablet",
|
|
1124
|
+
"justify-content--laptop",
|
|
1125
|
+
"justify-items--laptop",
|
|
1126
|
+
"align-content--laptop",
|
|
1127
|
+
"align-items--laptop",
|
|
1128
|
+
"justify-content--desktop",
|
|
1129
|
+
"justify-items--desktop",
|
|
1130
|
+
"align-content--desktop",
|
|
1131
|
+
"align-items--desktop"
|
|
1132
|
+
];
|
|
1133
|
+
}
|
|
1134
|
+
connectedCallback() {
|
|
1135
|
+
super.connectedCallback();
|
|
1136
|
+
if (!this.gap) {
|
|
1137
|
+
this.gap = "inside-section-default";
|
|
1138
|
+
}
|
|
1139
|
+
if (!this.alignItems) {
|
|
1140
|
+
this.alignItems = "stretch";
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
1144
|
+
if (oldValue !== newValue) {
|
|
1145
|
+
switch (attrName) {
|
|
1146
|
+
case "gap":
|
|
1147
|
+
this.updateGap(oldValue, newValue, gridGapValues);
|
|
1148
|
+
break;
|
|
1149
|
+
case "grid-cols":
|
|
1150
|
+
case "grid-cols--mobile":
|
|
1151
|
+
case "grid-cols--tablet":
|
|
1152
|
+
case "grid-cols--laptop":
|
|
1153
|
+
this.updateAttribute(attrName, oldValue, newValue, gridColsValues);
|
|
1154
|
+
break;
|
|
1155
|
+
case "justify-content":
|
|
1156
|
+
case "align-content":
|
|
1157
|
+
case "justify-content--mobile":
|
|
1158
|
+
case "align-content--mobile":
|
|
1159
|
+
case "justify-content--tablet":
|
|
1160
|
+
case "align-content--tablet":
|
|
1161
|
+
case "justify-content--laptop":
|
|
1162
|
+
case "align-content--laptop":
|
|
1163
|
+
case "justify-content--desktop":
|
|
1164
|
+
case "align-content--desktop":
|
|
1165
|
+
this.updateAttribute(
|
|
1166
|
+
attrName,
|
|
1167
|
+
oldValue,
|
|
1168
|
+
newValue,
|
|
1169
|
+
contentAlignmentValues
|
|
1170
|
+
);
|
|
1171
|
+
break;
|
|
1172
|
+
case "justify-items":
|
|
1173
|
+
case "align-items":
|
|
1174
|
+
case "justify-items--mobile":
|
|
1175
|
+
case "align-items--mobile":
|
|
1176
|
+
case "justify-items--tablet":
|
|
1177
|
+
case "align-items--tablet":
|
|
1178
|
+
case "justify-items--laptop":
|
|
1179
|
+
case "align-items--laptop":
|
|
1180
|
+
case "justify-items--desktop":
|
|
1181
|
+
case "align-items--desktop":
|
|
1182
|
+
this.updateAttribute(
|
|
1183
|
+
attrName,
|
|
1184
|
+
oldValue,
|
|
1185
|
+
newValue,
|
|
1186
|
+
itemsAlignmentValues
|
|
1187
|
+
);
|
|
1188
|
+
break;
|
|
1189
|
+
default:
|
|
1190
|
+
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
1191
|
+
break;
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
updateGap(oldValue, newValue, attrValue) {
|
|
1196
|
+
if (!this.checkName(attrValue, newValue)) {
|
|
1197
|
+
console.error(`Bad gap value for`, this.$el);
|
|
1198
|
+
return;
|
|
1199
|
+
}
|
|
1200
|
+
const updateGapStyle = (value) => {
|
|
1201
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
1202
|
+
this.$el.style.setProperty(
|
|
1203
|
+
`--grid-gap--mobile`,
|
|
1204
|
+
`var(--px-spacing-${value}-mobile)`
|
|
1205
|
+
);
|
|
1206
|
+
this.$el.style.setProperty(
|
|
1207
|
+
`--grid-gap--tablet`,
|
|
1208
|
+
`var(--px-spacing-${value}-tablet)`
|
|
1209
|
+
);
|
|
1210
|
+
this.$el.style.setProperty(
|
|
1211
|
+
`--grid-gap--laptop`,
|
|
1212
|
+
`var(--px-spacing-${value}-desktop)`
|
|
1213
|
+
);
|
|
1214
|
+
}
|
|
1215
|
+
};
|
|
1216
|
+
updateGapStyle(oldValue);
|
|
1217
|
+
updateGapStyle(newValue);
|
|
1218
|
+
}
|
|
1219
|
+
updateAttribute(attrName, oldValue, newValue, attrValues) {
|
|
1220
|
+
if (!this.checkName(attrValues, newValue)) {
|
|
1221
|
+
console.error(
|
|
1222
|
+
`${newValue} is not an allowed ${attrName} value for ${this.$el}`
|
|
1223
|
+
);
|
|
1224
|
+
} else if (attrName === "grid-cols" || attrName === "grid-cols--mobile" || attrName === "grid-cols--tablet" || attrName === "grid-cols--laptop") {
|
|
1225
|
+
this.$el.style.setProperty(`--${attrName}`, newValue);
|
|
1226
|
+
} else {
|
|
1227
|
+
if (oldValue !== null && oldValue !== "" && oldValue !== "default") {
|
|
1228
|
+
this.$el.classList.toggle(`${attrName}-${oldValue}`);
|
|
1229
|
+
}
|
|
1230
|
+
if (newValue !== null && newValue !== "" && newValue !== "default") {
|
|
1231
|
+
this.$el.classList.toggle(`${attrName}-${newValue}`);
|
|
1232
|
+
}
|
|
1233
|
+
}
|
|
1234
|
+
}
|
|
1235
|
+
checkName(values, value) {
|
|
1236
|
+
return values.includes(value);
|
|
1237
|
+
}
|
|
1238
|
+
get gap() {
|
|
1239
|
+
return this.getAttribute("gap");
|
|
1240
|
+
}
|
|
1241
|
+
set gap(value) {
|
|
1242
|
+
this.setAttribute("gap", value);
|
|
1243
|
+
}
|
|
1244
|
+
get gridCols() {
|
|
1245
|
+
return this.getAttribute("grid-cols");
|
|
1246
|
+
}
|
|
1247
|
+
set gridCols(value) {
|
|
1248
|
+
this.setAttribute("grid-cols", value);
|
|
1249
|
+
}
|
|
1250
|
+
get gridColsMobile() {
|
|
1251
|
+
return this.getAttribute("grid-cols--mobile");
|
|
1252
|
+
}
|
|
1253
|
+
set gridColsMobile(value) {
|
|
1254
|
+
this.setAttribute("grid-cols--mobile", value);
|
|
1255
|
+
}
|
|
1256
|
+
get gridColsTablet() {
|
|
1257
|
+
return this.getAttribute("grid-cols--tablet");
|
|
1258
|
+
}
|
|
1259
|
+
set gridColsTablet(value) {
|
|
1260
|
+
this.setAttribute("grid-cols--tablet", value);
|
|
1261
|
+
}
|
|
1262
|
+
get gridColsLaptop() {
|
|
1263
|
+
return this.getAttribute("grid-cols--laptop");
|
|
1264
|
+
}
|
|
1265
|
+
set gridColsLaptop(value) {
|
|
1266
|
+
this.setAttribute("grid-cols--laptop", value);
|
|
1267
|
+
}
|
|
1268
|
+
get justifyContent() {
|
|
1269
|
+
return this.getAttribute("justify-content");
|
|
1270
|
+
}
|
|
1271
|
+
set justifyContent(value) {
|
|
1272
|
+
this.setAttribute("justify-content", value);
|
|
1273
|
+
}
|
|
1274
|
+
get justifyItems() {
|
|
1275
|
+
return this.getAttribute("justify-items");
|
|
1276
|
+
}
|
|
1277
|
+
set justifyItems(value) {
|
|
1278
|
+
this.setAttribute("justify-items", value);
|
|
1279
|
+
}
|
|
1280
|
+
get alignContent() {
|
|
1281
|
+
return this.getAttribute("align-content");
|
|
1282
|
+
}
|
|
1283
|
+
set alignContent(value) {
|
|
1284
|
+
this.setAttribute("align-content", value);
|
|
1285
|
+
}
|
|
1286
|
+
get alignItems() {
|
|
1287
|
+
return this.getAttribute("align-items");
|
|
1288
|
+
}
|
|
1289
|
+
set alignItems(value) {
|
|
1290
|
+
this.setAttribute("align-items", value);
|
|
1291
|
+
}
|
|
1292
|
+
get justifyContentMobile() {
|
|
1293
|
+
return this.getAttribute("justify-content--mobile");
|
|
1294
|
+
}
|
|
1295
|
+
set justifyContentMobile(value) {
|
|
1296
|
+
this.setAttribute("justify-content--mobile", value);
|
|
1297
|
+
}
|
|
1298
|
+
get justifyItemsMobile() {
|
|
1299
|
+
return this.getAttribute("justify-items--mobile");
|
|
1300
|
+
}
|
|
1301
|
+
set justifyItemsMobile(value) {
|
|
1302
|
+
this.setAttribute("justify-items--mobile", value);
|
|
1303
|
+
}
|
|
1304
|
+
get alignContentMobile() {
|
|
1305
|
+
return this.getAttribute("align-content--mobile");
|
|
1306
|
+
}
|
|
1307
|
+
set alignContentMobile(value) {
|
|
1308
|
+
this.setAttribute("align-content--mobile", value);
|
|
1309
|
+
}
|
|
1310
|
+
get alignItemsMobile() {
|
|
1311
|
+
return this.getAttribute("align-items--mobile");
|
|
1312
|
+
}
|
|
1313
|
+
set alignItemsMobile(value) {
|
|
1314
|
+
this.setAttribute("align-items--mobile", value);
|
|
1315
|
+
}
|
|
1316
|
+
get justifyContentTablet() {
|
|
1317
|
+
return this.getAttribute("justify-content--tablet");
|
|
1318
|
+
}
|
|
1319
|
+
set justifyContentTablet(value) {
|
|
1320
|
+
this.setAttribute("justify-content--tablet", value);
|
|
1321
|
+
}
|
|
1322
|
+
get justifyItemsTablet() {
|
|
1323
|
+
return this.getAttribute("justify-items--tablet");
|
|
1324
|
+
}
|
|
1325
|
+
set justifyItemsTablet(value) {
|
|
1326
|
+
this.setAttribute("justify-items--tablet", value);
|
|
1327
|
+
}
|
|
1328
|
+
get alignContentTablet() {
|
|
1329
|
+
return this.getAttribute("align-content--tablet");
|
|
1330
|
+
}
|
|
1331
|
+
set alignContentTablet(value) {
|
|
1332
|
+
this.setAttribute("align-content--tablet", value);
|
|
1333
|
+
}
|
|
1334
|
+
get alignItemsTablet() {
|
|
1335
|
+
return this.getAttribute("align-items--tablet");
|
|
1336
|
+
}
|
|
1337
|
+
set alignItemsTablet(value) {
|
|
1338
|
+
this.setAttribute("align-items--tablet", value);
|
|
1339
|
+
}
|
|
1340
|
+
get justifyContentLaptop() {
|
|
1341
|
+
return this.getAttribute("justify-content--laptop");
|
|
1342
|
+
}
|
|
1343
|
+
set justifyContentLaptop(value) {
|
|
1344
|
+
this.setAttribute("justify-content--laptop", value);
|
|
1345
|
+
}
|
|
1346
|
+
get justifyItemsLaptop() {
|
|
1347
|
+
return this.getAttribute("justify-items--laptop");
|
|
1348
|
+
}
|
|
1349
|
+
set justifyItemsLaptop(value) {
|
|
1350
|
+
this.setAttribute("justify-items--laptop", value);
|
|
1351
|
+
}
|
|
1352
|
+
get alignContentLaptop() {
|
|
1353
|
+
return this.getAttribute("align-content--laptop");
|
|
1354
|
+
}
|
|
1355
|
+
set alignContentLaptop(value) {
|
|
1356
|
+
this.setAttribute("align-content--laptop", value);
|
|
1357
|
+
}
|
|
1358
|
+
get alignItemsLaptop() {
|
|
1359
|
+
return this.getAttribute("align-items--laptop");
|
|
1360
|
+
}
|
|
1361
|
+
set alignItemsLaptop(value) {
|
|
1362
|
+
this.setAttribute("align-items--laptop", value);
|
|
1363
|
+
}
|
|
1364
|
+
get justifyContentDesktop() {
|
|
1365
|
+
return this.getAttribute("justify-content--desktop");
|
|
1366
|
+
}
|
|
1367
|
+
set justifyContentDesktop(value) {
|
|
1368
|
+
this.setAttribute("justify-content--desktop", value);
|
|
1369
|
+
}
|
|
1370
|
+
get justifyItemsDesktop() {
|
|
1371
|
+
return this.getAttribute("justify-items--desktop");
|
|
1372
|
+
}
|
|
1373
|
+
set justifyItemsDesktop(value) {
|
|
1374
|
+
this.setAttribute("justify-items--desktop", value);
|
|
1375
|
+
}
|
|
1376
|
+
get alignContentDesktop() {
|
|
1377
|
+
return this.getAttribute("align-content--desktop");
|
|
1378
|
+
}
|
|
1379
|
+
set alignContentDesktop(value) {
|
|
1380
|
+
this.setAttribute("align-content--desktop", value);
|
|
1381
|
+
}
|
|
1382
|
+
get alignItemsDesktop() {
|
|
1383
|
+
return this.getAttribute("align-items--desktop");
|
|
1384
|
+
}
|
|
1385
|
+
set alignItemsDesktop(value) {
|
|
1386
|
+
this.setAttribute("align-items--desktop", value);
|
|
1387
|
+
}
|
|
1388
|
+
};
|
|
1389
|
+
_Grid.nativeName = "div";
|
|
1390
|
+
let Grid = _Grid;
|
|
1391
|
+
customElements.define("px-grid", Grid);
|
|
1392
|
+
const _GridItem = class _GridItem extends Grid {
|
|
1393
|
+
constructor() {
|
|
1394
|
+
super();
|
|
1395
|
+
this.template = () => `<div class="grid-item">
|
|
1396
|
+
<slot></slot>
|
|
1397
|
+
</div>`;
|
|
1398
|
+
this.shadowRoot.innerHTML = this.template();
|
|
1399
|
+
}
|
|
1400
|
+
static get observedAttributes() {
|
|
1401
|
+
return [
|
|
1402
|
+
...super.observedAttributes,
|
|
1403
|
+
"col-span",
|
|
1404
|
+
"col-span--mobile",
|
|
1405
|
+
"col-span--tablet",
|
|
1406
|
+
"col-span--laptop",
|
|
1407
|
+
"col-span--desktop",
|
|
1408
|
+
"justify-self",
|
|
1409
|
+
"align-self",
|
|
1410
|
+
"place-self",
|
|
1411
|
+
"justify-self--mobile",
|
|
1412
|
+
"align-self--mobile",
|
|
1413
|
+
"place-self--mobile",
|
|
1414
|
+
"justify-self--tablet",
|
|
1415
|
+
"align-self--tablet",
|
|
1416
|
+
"place-self--tablet",
|
|
1417
|
+
"justify-self--laptop",
|
|
1418
|
+
"align-self--laptop",
|
|
1419
|
+
"place-self--laptop",
|
|
1420
|
+
"justify-self--desktop",
|
|
1421
|
+
"align-self--desktop",
|
|
1422
|
+
"place-self--desktop",
|
|
1423
|
+
"order",
|
|
1424
|
+
"order--mobile",
|
|
1425
|
+
"order--tablet",
|
|
1426
|
+
"order--laptop",
|
|
1427
|
+
"order--desktop"
|
|
1428
|
+
];
|
|
1429
|
+
}
|
|
1430
|
+
connectedCallback() {
|
|
1431
|
+
var _a;
|
|
1432
|
+
super.connectedCallback();
|
|
1433
|
+
if (((_a = this.parentElement) == null ? void 0 : _a.getAttribute("align-items")) === "stretch") {
|
|
1434
|
+
this.$el.style.height = "100%";
|
|
1435
|
+
}
|
|
1436
|
+
}
|
|
1437
|
+
get colSpan() {
|
|
1438
|
+
return this.getAttribute("col-span");
|
|
1439
|
+
}
|
|
1440
|
+
set colSpan(value) {
|
|
1441
|
+
this.setAttribute("col-span", value);
|
|
1442
|
+
}
|
|
1443
|
+
get colSpanMobile() {
|
|
1444
|
+
return this.getAttribute("col-span--mobile");
|
|
1445
|
+
}
|
|
1446
|
+
set colSpanMobile(value) {
|
|
1447
|
+
this.setAttribute("col-span--mobile", value);
|
|
1448
|
+
}
|
|
1449
|
+
get colSpanTablet() {
|
|
1450
|
+
return this.getAttribute("col-span--tablet");
|
|
1451
|
+
}
|
|
1452
|
+
set colSpanTablet(value) {
|
|
1453
|
+
this.setAttribute("col-span--tablet", value);
|
|
1454
|
+
}
|
|
1455
|
+
get colSpanLaptop() {
|
|
1456
|
+
return this.getAttribute("col-span--laptop");
|
|
1457
|
+
}
|
|
1458
|
+
set colSpanLaptop(value) {
|
|
1459
|
+
this.setAttribute("col-span--laptop", value);
|
|
1460
|
+
}
|
|
1461
|
+
get colSpanDesktop() {
|
|
1462
|
+
return this.getAttribute("col-span--desktop");
|
|
1463
|
+
}
|
|
1464
|
+
set colSpanDesktop(value) {
|
|
1465
|
+
this.setAttribute("col-span--desktop", value);
|
|
1466
|
+
}
|
|
1467
|
+
get justifySelf() {
|
|
1468
|
+
return this.getAttribute("justify-self");
|
|
1469
|
+
}
|
|
1470
|
+
set justifySelf(value) {
|
|
1471
|
+
this.setAttribute("justify-self", value);
|
|
1472
|
+
}
|
|
1473
|
+
get alignSelf() {
|
|
1474
|
+
return this.getAttribute("align-self");
|
|
1475
|
+
}
|
|
1476
|
+
set alignSelf(value) {
|
|
1477
|
+
this.setAttribute("align-self", value);
|
|
1478
|
+
}
|
|
1479
|
+
get placeSelf() {
|
|
1480
|
+
return this.getAttribute("place-self");
|
|
1481
|
+
}
|
|
1482
|
+
set placeSelf(value) {
|
|
1483
|
+
this.setAttribute("place-self", value);
|
|
1484
|
+
}
|
|
1485
|
+
get justifySelfMobile() {
|
|
1486
|
+
return this.getAttribute("justify-self--mobile");
|
|
1487
|
+
}
|
|
1488
|
+
set justifySelfMobile(value) {
|
|
1489
|
+
this.setAttribute("justify-self--mobile", value);
|
|
1490
|
+
}
|
|
1491
|
+
get alignSelfMobile() {
|
|
1492
|
+
return this.getAttribute("align-self--mobile");
|
|
1493
|
+
}
|
|
1494
|
+
set alignSelfMobile(value) {
|
|
1495
|
+
this.setAttribute("align-self--mobile", value);
|
|
1496
|
+
}
|
|
1497
|
+
get placeSelfMobile() {
|
|
1498
|
+
return this.getAttribute("place-self--mobile");
|
|
1499
|
+
}
|
|
1500
|
+
set placeSelfMobile(value) {
|
|
1501
|
+
this.setAttribute("place-self--mobile", value);
|
|
1502
|
+
}
|
|
1503
|
+
get justifySelfTablet() {
|
|
1504
|
+
return this.getAttribute("justify-self--tablet");
|
|
1505
|
+
}
|
|
1506
|
+
set justifySelfTablet(value) {
|
|
1507
|
+
this.setAttribute("justify-self--tablet", value);
|
|
1508
|
+
}
|
|
1509
|
+
get alignSelfTablet() {
|
|
1510
|
+
return this.getAttribute("align-self--tablet");
|
|
1511
|
+
}
|
|
1512
|
+
set alignSelfTablet(value) {
|
|
1513
|
+
this.setAttribute("align-self--tablet", value);
|
|
1514
|
+
}
|
|
1515
|
+
get placeSelfTablet() {
|
|
1516
|
+
return this.getAttribute("place-self--tablet");
|
|
1517
|
+
}
|
|
1518
|
+
set placeSelfTablet(value) {
|
|
1519
|
+
this.setAttribute("place-self--tablet", value);
|
|
1520
|
+
}
|
|
1521
|
+
get justifySelfLaptop() {
|
|
1522
|
+
return this.getAttribute("justify-self--laptop");
|
|
1523
|
+
}
|
|
1524
|
+
set justifySelfLaptop(value) {
|
|
1525
|
+
this.setAttribute("justify-self--laptop", value);
|
|
1526
|
+
}
|
|
1527
|
+
get alignSelfLaptop() {
|
|
1528
|
+
return this.getAttribute("align-self--laptop");
|
|
1529
|
+
}
|
|
1530
|
+
set alignSelfLaptop(value) {
|
|
1531
|
+
this.setAttribute("align-self--laptop", value);
|
|
1532
|
+
}
|
|
1533
|
+
get placeSelfLaptop() {
|
|
1534
|
+
return this.getAttribute("place-self--laptop");
|
|
1535
|
+
}
|
|
1536
|
+
set placeSelfLaptop(value) {
|
|
1537
|
+
this.setAttribute("place-self--laptop", value);
|
|
1538
|
+
}
|
|
1539
|
+
get justifySelfDesktop() {
|
|
1540
|
+
return this.getAttribute("justify-self--desktop");
|
|
1541
|
+
}
|
|
1542
|
+
set justifySelfDesktop(value) {
|
|
1543
|
+
this.setAttribute("justify-self--desktop", value);
|
|
1544
|
+
}
|
|
1545
|
+
get alignSelfDesktop() {
|
|
1546
|
+
return this.getAttribute("align-self--desktop");
|
|
1547
|
+
}
|
|
1548
|
+
set alignSelfDesktop(value) {
|
|
1549
|
+
this.setAttribute("align-self--desktop", value);
|
|
1550
|
+
}
|
|
1551
|
+
get placeSelfDesktop() {
|
|
1552
|
+
return this.getAttribute("place-self--desktop");
|
|
1553
|
+
}
|
|
1554
|
+
set placeSelfDesktop(value) {
|
|
1555
|
+
this.setAttribute("place-self--desktop", value);
|
|
1556
|
+
}
|
|
1557
|
+
get order() {
|
|
1558
|
+
return this.getAttribute("order");
|
|
1559
|
+
}
|
|
1560
|
+
set order(value) {
|
|
1561
|
+
this.setAttribute("order", value);
|
|
1562
|
+
}
|
|
1563
|
+
get orderMobile() {
|
|
1564
|
+
return this.getAttribute("order--mobile");
|
|
1565
|
+
}
|
|
1566
|
+
set orderMobile(value) {
|
|
1567
|
+
this.setAttribute("order--mobile", value);
|
|
1568
|
+
}
|
|
1569
|
+
get orderTablet() {
|
|
1570
|
+
return this.getAttribute("order--tablet");
|
|
1571
|
+
}
|
|
1572
|
+
set orderTablet(value) {
|
|
1573
|
+
this.setAttribute("order--tablet", value);
|
|
1574
|
+
}
|
|
1575
|
+
get orderLaptop() {
|
|
1576
|
+
return this.getAttribute("order--laptop");
|
|
1577
|
+
}
|
|
1578
|
+
set orderLaptop(value) {
|
|
1579
|
+
this.setAttribute("order--laptop", value);
|
|
1580
|
+
}
|
|
1581
|
+
get orderDesktop() {
|
|
1582
|
+
return this.getAttribute("order--desktop");
|
|
1583
|
+
}
|
|
1584
|
+
set orderDesktop(value) {
|
|
1585
|
+
this.setAttribute("order--desktop", value);
|
|
1586
|
+
}
|
|
1587
|
+
};
|
|
1588
|
+
_GridItem.nativeName = "div";
|
|
1589
|
+
let GridItem = _GridItem;
|
|
1590
|
+
customElements.define("px-grid-item", GridItem);
|
|
1072
1591
|
const buttonCss = '.btn{display:inline-flex;vertical-align:middle;align-items:center;justify-content:center;font-family:var(--px-font-family);font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-m);font-weight:700;gap:var(--px-spacing-after-element-2xs-mobile);cursor:pointer;text-decoration:none;--btn-transition: all .2s ease-in-out 0s;transition:var(--btn-transition);border:var(--px-border-size-m) solid transparent}.btn,.btn *{box-sizing:border-box}.btn ::slotted(px-icon){line-height:0}.btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-border-color-action-hover-default)}.btn:focus:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-border-color-focus-outline-default)}.btn:active{transform:scale(.95)}.btn[disabled],.btn[aria-disabled=true]{cursor:default;pointer-events:none}.btn.loading{cursor:inherit}.btn.loading ::slotted(px-spinner){line-height:0}.btn:not(.secondary,.tertiary,.patch){color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-primary-default);min-height:var(--px-action-size-l);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn:not(.secondary,.tertiary,.patch) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-mobile) * -1)}.btn:not(.secondary,.tertiary,.patch):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn:not(.secondary,.tertiary,.patch)[disabled],.btn:not(.secondary,.tertiary,.patch)[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}.btn:not(.secondary,.tertiary,.patch).loading{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-heading-brand-default);border-color:transparent}.btn:not(.secondary,.tertiary,.patch).extended{width:100%}.btn:not(.secondary,.tertiary,.patch).alternative{border-radius:var(--px-radius-button-small)}.btn.secondary{color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-secondary-default);min-height:var(--px-action-size-l);padding:var(--px-padding-xs-mobile) var(--px-padding-m-mobile);border-radius:var(--px-radius-button-small) var(--px-radius-button-small) var(--px-radius-button-big) var(--px-radius-button-small)}.btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn.secondary[disabled],.btn.secondary[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}.btn.secondary.loading{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-heading-brand-default);border-color:transparent}.btn.secondary.extended{width:100%}.btn.secondary.alternative{border-radius:var(--px-radius-button-small)}.btn.tertiary{background:none;color:var(--px-text-color-heading-brand-default);border-radius:var(--px-radius-pill);border:var(--px-border-size-m) solid transparent;padding:var(--px-padding-2xs-mobile) 0;gap:var(--px-spacing-after-element-xs-mobile)}.btn.tertiary ::slotted(px-icon){display:flex;align-items:center;justify-content:center;width:var(--px-icon-size-m-mobile);height:var(--px-icon-size-m-mobile);border-radius:var(--px-radius-pill);background:var(--px-background-color-action-secondary-default);transition:var(--btn-transition)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-mobile) var(--px-padding-s-mobile)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent;width:inherit;height:inherit}.btn.tertiary[disabled],.btn.tertiary[aria-disabled=true]{color:var(--px-text-color-action-disabled-default)}.btn.tertiary[disabled] ::slotted(px-icon),.btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-background-color-action-disabled-default)}.btn.tertiary.loading{color:var(--px-text-color-heading-brand-default);border-color:transparent}.btn.tertiary.loading ::slotted(px-spinner){display:flex;align-items:center;justify-content:center;width:var(--px-icon-size-m-mobile);height:var(--px-icon-size-m-mobile);border-radius:var(--px-radius-pill);background:var(--px-background-color-action-disabled-default)}.btn.patch{display:inline-flex}.btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-hover-bordered-default)}.btn.patch[disabled],.btn.patch[aria-disabled=true]{background:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}button.link{background:none;border:none;text-decoration:underline;padding:0;cursor:pointer}button.link[disabled],button.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-text-color-action-disabled-default)}:host([inverted]) .btn:hover:not([disabled],[aria-disabled=true],.loading){border-color:var(--px-border-color-action-hover-inverted)}:host([inverted]) .btn:focus:not([disabled],[aria-disabled=true]){outline-color:var(--px-border-color-focus-outline-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch){color:var(--px-text-color-heading-brand-default);background:var(--px-background-color-action-primary-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch):hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-hover-bordered-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch)[disabled],:host([inverted]) .btn:not(.secondary,.tertiary,.patch)[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn:not(.secondary,.tertiary,.patch).loading{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-heading-brand-inverted);border-color:transparent}:host([inverted]) .btn.secondary{color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-secondary-inverted)}:host([inverted]) .btn.secondary:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-inverted);background:var(--px-background-color-action-hover-bordered-inverted)}:host([inverted]) .btn.secondary[disabled],:host([inverted]) .btn.secondary[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn.secondary.loading{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-heading-brand-inverted);border-color:transparent}:host([inverted]) .btn.tertiary{color:var(--px-text-color-heading-brand-inverted)}:host([inverted]) .btn.tertiary ::slotted(px-icon){background:var(--px-background-color-action-secondary-inverted)}:host([inverted]) .btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading) ::slotted(px-icon){background:transparent}:host([inverted]) .btn.tertiary[disabled],:host([inverted]) .btn.tertiary[aria-disabled=true]{color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) .btn.tertiary[disabled] ::slotted(px-icon),:host([inverted]) .btn.tertiary[aria-disabled=true] ::slotted(px-icon){background:var(--px-background-color-action-disabled-inverted)}:host([inverted]) .btn.tertiary.loading{color:var(--px-text-color-heading-brand-inverted)}:host([inverted]) .btn.tertiary.loading ::slotted(px-spinner){background:var(--px-background-color-action-disabled-inverted)}:host([inverted]) .btn.patch:hover:not([disabled],[aria-disabled=true],.loading){color:var(--px-text-color-heading-brand-inverted);background:var( --px-background-color-action-hover-bordered-default-inverted )}:host([inverted]) .btn.patch[disabled],:host([inverted]) .btn.patch[aria-disabled=true]{background:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) button.link[disabled],:host([inverted]) button.link[aria-disabled=true]{color:var(--px-text-color-action-disabled-inverted)}@media only screen and (min-width: 768px){.btn{font-size:var(--px-text-size-label-m-tablet);gap:var(--px-spacing-after-element-2xs-tablet)}.btn:focus:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}.btn:not(.secondary,.tertiary,.patch){padding:var(--px-padding-xs-tablet) var(--px-padding-m-tablet)}.btn:not(.secondary,.tertiary,.patch) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-tablet) * -1)}.btn:not(.secondary,.tertiary,.patch) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-tablet) * -1)}.btn.secondary{padding:var(--px-padding-xs-tablet) var(--px-padding-m-tablet)}.btn.tertiary{padding:var(--px-padding-2xs-tablet) 0;gap:var(--px-spacing-after-element-xs-tablet)}.btn.tertiary ::slotted(px-icon){width:var(--px-icon-size-m-tablet);height:var(--px-icon-size-m-tablet)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-tablet) var(--px-padding-s-tablet)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-icon-size-m-tablet);height:var(--px-icon-size-m-tablet)}}@media only screen and (min-width: 1025px){.btn{font-size:var(--px-text-size-label-m-desktop);gap:var(--px-spacing-after-element-2xs-desktop)}.btn:focus:not([disabled],[aria-disabled=true]){outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}.btn:not(.secondary,.tertiary,.patch){padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn:not(.secondary,.tertiary,.patch) ::slotted([slot="after"]){margin-right:calc(var(--px-padding-xs-desktop) * -1)}.btn:not(.secondary,.tertiary,.patch) ::slotted([slot="before"]){margin-left:calc(var(--px-padding-xs-desktop) * -1)}.btn.secondary{padding:var(--px-padding-xs-desktop) var(--px-padding-m-desktop)}.btn.tertiary{padding:var(--px-padding-2xs-desktop) 0;gap:var(--px-spacing-after-element-xs-desktop)}.btn.tertiary ::slotted(px-icon){width:var(--px-icon-size-m-desktop);height:var(--px-icon-size-m-desktop)}.btn.tertiary:hover:not([disabled],[aria-disabled=true],.loading){padding:var(--px-padding-2xs-desktop) var(--px-padding-s-desktop)}.btn.tertiary.loading ::slotted(px-spinner){width:var(--px-icon-size-m-desktop);height:var(--px-icon-size-m-desktop)}}@keyframes anim-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}';
|
|
1073
1592
|
const linkCss = 'a,.link,::slotted(a){display:inline-flex;align-items:center;font-family:var(--px-font-family);font-size:var(--px-text-size-link-m-mobile);line-height:var(--px-line-height-m);font-weight:400;color:var(--px-text-color-heading-neutral-default)}a:hover,.link:hover{color:var(--px-text-color-action-hover-default)}a:focus,.link:focus{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-border-color-focus-outline-default)}a[aria-disabled=true],.link[aria-disabled=true]{cursor:default;pointer-events:none;color:var(--px-text-color-action-disabled-default)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-after-element-2xs-mobile)}a ::slotted(span[slot="after"]),a ::slotted(span[slot="before"]),.link ::slotted(span[slot="after"]),.link ::slotted(span[slot="before"]){display:inline-block}::slotted(a:hover){color:var(--px-text-color-action-hover-default)}a.no-style{color:inherit;text-decoration:none}a.no-style:hover,a.no-style:focus{color:inherit}a.skip-link{position:absolute;left:-10000px;top:auto;overflow:hidden;background-color:var(--px-background-color-container-weak);padding:var(--px-padding-xs-mobile)}a.skip-link:focus{left:auto;z-index:999}:host([inverted]) a,:host([inverted]) .link,:host([inverted]) ::slotted(a){color:var(--px-text-color-heading-neutral-inverted)}:host([inverted]) a:hover,:host([inverted]) .link:hover{color:var(--px-text-color-action-hover-inverted)}:host([inverted]) a:focus,:host([inverted]) .link:focus{outline-color:var(--px-border-color-focus-outline-inverted)}:host([inverted]) a[aria-disabled=true],:host([inverted]) .link[aria-disabled=true]{color:var(--px-text-color-action-disabled-inverted)}:host([inverted]) ::slotted(a:hover){color:var(--px-text-color-action-hover-inverted)}:host([inverted]) a.skip-link{background-color:var(--px-background-color-container-weak-inverted)}@media only screen and (min-width: 768px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-tablet)}a:focus,.link:focus{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-after-element-2xs-tablet)}a.skip-link{padding:var(--px-padding-xs-tablet)}}@media only screen and (min-width: 1025px){a,.link,::slotted(a){font-size:var(--px-text-size-link-m-desktop)}a:focus,.link:focus{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}a ::slotted([slot="after"]),.link ::slotted([slot="after"]){margin-left:var(--px-spacing-after-element-2xs-desktop)}a.skip-link{padding:var(--px-padding-xs-desktop)}}';
|
|
1074
1593
|
const styles$b = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s-mobile);height:1.625rem;border:var(--px-border-size-m) solid transparent;border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small);font-family:var(--px-font-family);font-weight:700;font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-m);text-align:center;background-color:var(--px-background-color-purpose-promo-default);color:var(--px-text-color-action-neutral-inverted)}.patch,.patch *{box-sizing:border-box}.bottom-right{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small) var(--px-radius-patch-big)}.bottom-left{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small)}.info{background-color:var(--px-background-color-purpose-info-default);color:var(--px-text-color-action-neutral-default)}.black-friday{background-color:var(--px-background-color-container-neutral-rich-default);color:var(--px-text-color-action-neutral-inverted)}.eco{background-color:var(--px-background-color-purpose-success-default);color:var(--px-text-color-action-neutral-inverted)}.greyed{background-color:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}:host([inverted]) .patch{background-color:var(--px-background-color-purpose-promo-inverted);color:var(--px-text-color-action-neutral-inverted)}:host([inverted]) .info{background-color:var(--px-background-color-purpose-info-inverted);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .black-friday{background-color:var(--px-background-color-container-neutral-bare-default);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .eco{background-color:var(--px-background-color-purpose-success-inverted);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .greyed{background-color:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}@media only screen and (min-width: 768px){.patch{padding:0 var(--px-padding-s-tablet);font-size:var(--px-text-size-label-m-tablet)}}@media only screen and (min-width: 1025px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1441px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}";
|
|
@@ -1501,7 +2020,7 @@ class FontIcon extends Icon {
|
|
|
1501
2020
|
}
|
|
1502
2021
|
}
|
|
1503
2022
|
customElements.define("px-icon-f", FontIcon);
|
|
1504
|
-
const containerCss = '.container{font-family:var(--px-font-family);background-color:var(--background-color);background-image:var(--background-image);background:var(--background-gradient);border-radius:var(--px-radius-main);padding:var(--container-padding-top--mobile) var(--container-padding-right--mobile) var(--container-padding-bottom--mobile) var(--container-padding-left--mobile);box-sizing:border-box}:host([inverted]) .container{background-color:var(--background-color-inverted)}.border-none{border:none}.border-s{border:var(--px-border-size-s) solid var(--border-color)}.border-m{border:var(--px-border-size-m) solid var(--border-color)}.border-l{border:var(--px-border-size-l) solid var(--border-color)}.border-side-top{border-bottom-style:none;border-right-style:none;border-left-style:none}.border-side-right{border-top-style:none;border-bottom-style:none;border-left-style:none}.border-side-bottom{border-top-style:none;border-right-style:none;border-left-style:none}.border-side-left{border-top-style:none;border-right-style:none;border-bottom-style:none}.border-side-block{border-inline-style:none}.border-side-inline{border-block-style:none}:host([inverted]) .border-s,:host([inverted]) .border-m,:host([inverted]) .border-l{border-color:var(--border-color-inverted)}.border-radius-main{border-radius:var(--px-radius-main)}.border-radius-pill{border-radius:var(--px-radius-pill)}.no-border-radius-top{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all,.border-radius-none{border-radius:var(--px-radius-none)}.bgimg{background-repeat:no-repeat}.background-size-cover{background-size:cover;background-position:center center}.background-size-contain{background-size:contain}.box-shadow-none{box-shadow:none}.box-shadow-s{box-shadow:0 1px 2px #2525251f}.box-shadow-m{box-shadow:0 4px 6px -1px #25252514}.box-shadow-l{box-shadow:0 10px 15px -3px #25252514}.box-shadow-xl{box-shadow:0 20px 25px -5px #25252514}.anchored{position:relative}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]),::slotted([slot="anchor-full"]){position:absolute;top:0}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]){transform:translateY(-50%);z-index:2}::slotted([slot="anchor-right"]){right:var(--container-padding-right--mobile)}::slotted([slot="anchor-left"]){left:var(--container-padding-left--mobile)}::slotted([slot="anchor-full"]){transform:translateY(-100%);right:0;left:0;text-align:center;z-index:1}@media only screen and (max-width: 640px){.container{background-color:var(--background-color--mobile, var(--background-color));background-image:var( --background-image--mobile, var( --background-image, var(--background-gradient--mobile, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--mobile, var(--background-color-inverted) )}.border-side-top--mobile{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--mobile{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--mobile{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--mobile{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--mobile{border-inline-style:none;border-block-style:solid}.border-side-inline--mobile{border-block-style:none;border-inline-style:solid}.no-border-radius-top--mobile{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--mobile{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--mobile{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--mobile{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--mobile{border-radius:var(--px-radius-none)}}.border-s ::slotted([slot="anchor-full"]){right:calc(var(--px-border-size-s) * -1);left:calc(var(--px-border-size-s) * -1)}.border-m ::slotted([slot="anchor-full"]){right:calc(var(--px-border-size-m) * -1);left:calc(var(--px-border-size-m) * -1)}.border-l ::slotted([slot="anchor-full"]){right:calc(var(--px-border-l) * -1);left:calc(var(--px-border-l) * -1)}@media only screen and (min-width: 768px) and (max-width: 1024px){.container{padding:var(--container-padding-top--tablet) var(--container-padding-right--tablet) var(--container-padding-bottom--tablet) var(--container-padding-left--tablet);background-color:var(--background-color--tablet, var(--background-color));background-image:var( --background-image--tablet, var( --background-image, var(--background-gradient--tablet, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--tablet, var(--background-color-inverted) )}.no-border-radius-top--tablet{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--tablet{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--tablet{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--tablet{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--tablet{border-radius:var(--px-radius-none)}.border-side-top--tablet{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--tablet{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--tablet{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--tablet{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--tablet{border-inline-style:none;border-block-style:solid}.border-side-inline--tablet{border-block-style:none;border-inline-style:solid}::slotted([slot="anchor-right"]){right:var(--container-padding-right--tablet)}::slotted([slot="anchor-left"]){left:var(--container-padding-left--tablet)}}@media only screen and (min-width: 1025px){.container{padding:var(--container-padding-top--laptop) var(--container-padding-right--laptop) var(--container-padding-bottom--laptop) var(--container-padding-left--laptop);background-color:var(--background-color--laptop, var(--background-color));background-image:var( --background-image--laptop, var( --background-image, var(--background-gradient--laptop, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--laptop, var(--background-color-inverted) )}.no-border-radius-top--laptop{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--laptop{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--laptop{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--laptop{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--laptop{border-radius:var(--px-radius-none)}::slotted([slot="anchor-right"]){right:var(--container-padding-right--laptop)}::slotted([slot="anchor-left"]){left:var(--container-padding-left--laptop)}.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}}';
|
|
2023
|
+
const containerCss = ':host{display:block}.container{font-family:var(--px-font-family);background-color:var(--background-color);background-image:var(--background-image);background:var(--background-gradient);border-radius:var(--px-radius-main);padding:var(--container-padding-top--mobile) var(--container-padding-right--mobile) var(--container-padding-bottom--mobile) var(--container-padding-left--mobile);box-sizing:border-box}:host([inverted]) .container{background-color:var(--background-color-inverted)}.border-none{border:none}.border-s{border:var(--px-border-size-s) solid var(--border-color)}.border-m{border:var(--px-border-size-m) solid var(--border-color)}.border-l{border:var(--px-border-size-l) solid var(--border-color)}.border-side-top{border-bottom-style:none;border-right-style:none;border-left-style:none}.border-side-right{border-top-style:none;border-bottom-style:none;border-left-style:none}.border-side-bottom{border-top-style:none;border-right-style:none;border-left-style:none}.border-side-left{border-top-style:none;border-right-style:none;border-bottom-style:none}.border-side-block{border-inline-style:none}.border-side-inline{border-block-style:none}:host([inverted]) .border-s,:host([inverted]) .border-m,:host([inverted]) .border-l{border-color:var(--border-color-inverted)}.border-radius-main{border-radius:var(--px-radius-main)}.border-radius-pill{border-radius:var(--px-radius-pill)}.no-border-radius-top{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all,.border-radius-none{border-radius:var(--px-radius-none)}.bgimg{background-repeat:no-repeat}.background-size-cover{background-size:cover;background-position:center center}.background-size-contain{background-size:contain}.box-shadow-none{box-shadow:none}.box-shadow-s{box-shadow:0 1px 2px #2525251f}.box-shadow-m{box-shadow:0 4px 6px -1px #25252514}.box-shadow-l{box-shadow:0 10px 15px -3px #25252514}.box-shadow-xl{box-shadow:0 20px 25px -5px #25252514}.anchored{position:relative}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]),::slotted([slot="anchor-full"]){position:absolute;top:0}::slotted([slot="anchor-right"]),::slotted([slot="anchor-left"]){transform:translateY(-50%);z-index:2}::slotted([slot="anchor-right"]){right:var(--container-padding-right--mobile)}::slotted([slot="anchor-left"]){left:var(--container-padding-left--mobile)}::slotted([slot="anchor-full"]){transform:translateY(-100%);right:0;left:0;text-align:center;z-index:1}@media only screen and (max-width: 640px){.container{background-color:var(--background-color--mobile, var(--background-color));background-image:var( --background-image--mobile, var( --background-image, var(--background-gradient--mobile, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--mobile, var(--background-color-inverted) )}.border-side-top--mobile{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--mobile{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--mobile{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--mobile{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--mobile{border-inline-style:none;border-block-style:solid}.border-side-inline--mobile{border-block-style:none;border-inline-style:solid}.no-border-radius-top--mobile{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--mobile{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--mobile{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--mobile{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--mobile{border-radius:var(--px-radius-none)}}.border-s ::slotted([slot="anchor-full"]){right:calc(var(--px-border-size-s) * -1);left:calc(var(--px-border-size-s) * -1)}.border-m ::slotted([slot="anchor-full"]){right:calc(var(--px-border-size-m) * -1);left:calc(var(--px-border-size-m) * -1)}.border-l ::slotted([slot="anchor-full"]){right:calc(var(--px-border-l) * -1);left:calc(var(--px-border-l) * -1)}@media only screen and (min-width: 768px) and (max-width: 1024px){.container{padding:var(--container-padding-top--tablet) var(--container-padding-right--tablet) var(--container-padding-bottom--tablet) var(--container-padding-left--tablet);background-color:var(--background-color--tablet, var(--background-color));background-image:var( --background-image--tablet, var( --background-image, var(--background-gradient--tablet, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--tablet, var(--background-color-inverted) )}.no-border-radius-top--tablet{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--tablet{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--tablet{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--tablet{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--tablet{border-radius:var(--px-radius-none)}.border-side-top--tablet{border-top-style:solid;border-right-style:none;border-bottom-style:none;border-left-style:none}.border-side-right--tablet{border-top-style:none;border-right-style:solid;border-bottom-style:none;border-left-style:none}.border-side-bottom--tablet{border-top-style:none;border-right-style:none;border-bottom-style:solid;border-left-style:none}.border-side-left--tablet{border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:solid}.border-side-block--tablet{border-inline-style:none;border-block-style:solid}.border-side-inline--tablet{border-block-style:none;border-inline-style:solid}::slotted([slot="anchor-right"]){right:var(--container-padding-right--tablet)}::slotted([slot="anchor-left"]){left:var(--container-padding-left--tablet)}}@media only screen and (min-width: 1025px){.container{padding:var(--container-padding-top--laptop) var(--container-padding-right--laptop) var(--container-padding-bottom--laptop) var(--container-padding-left--laptop);background-color:var(--background-color--laptop, var(--background-color));background-image:var( --background-image--laptop, var( --background-image, var(--background-gradient--laptop, var(--background-gradient)) ) )}:host([inverted]) .container{background-color:var( --background-color-inverted--laptop, var(--background-color-inverted) )}.no-border-radius-top--laptop{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--laptop{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--laptop{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--laptop{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--laptop{border-radius:var(--px-radius-none)}::slotted([slot="anchor-right"]){right:var(--container-padding-right--laptop)}::slotted([slot="anchor-left"]){left:var(--container-padding-left--laptop)}.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}}';
|
|
1505
2024
|
const containerStyles = new CSSStyleSheet();
|
|
1506
2025
|
containerStyles.replaceSync(containerCss);
|
|
1507
2026
|
const anchorValues = ["anchor-right", "anchor-left", "anchor-full"];
|
|
@@ -1603,7 +2122,7 @@ const _Container = class _Container extends PxElement {
|
|
|
1603
2122
|
}
|
|
1604
2123
|
}
|
|
1605
2124
|
if (((_c = this.parentElement) == null ? void 0 : _c.localName) === "px-grid-item" || ((_d = this.parentElement) == null ? void 0 : _d.localName) === "px-a") {
|
|
1606
|
-
this
|
|
2125
|
+
this.style.height = "100%";
|
|
1607
2126
|
}
|
|
1608
2127
|
}
|
|
1609
2128
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -2781,10 +3300,11 @@ const _Accordion = class _Accordion extends PxElement {
|
|
|
2781
3300
|
_Accordion.nativeName = "details";
|
|
2782
3301
|
let Accordion = _Accordion;
|
|
2783
3302
|
customElements.define("px-accordion", Accordion);
|
|
2784
|
-
const imgCss = 'img{display:inline-block;
|
|
3303
|
+
const imgCss = ':host{display:inline-block;line-height:0}picture{display:inline-block}img{display:inline-block;border-style:none;width:var(--img-width--mobile, auto);max-width:100%}.border-radius-main,.border-radius-main img{border-radius:var(--px-radius-main)}.border-radius-pill,.border-radius-pill img{border-radius:var(--px-radius-pill)}.no-border-radius-top,.no-border-radius-top img{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right,.no-border-radius-right img{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom,.no-border-radius-bottom img{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left,.no-border-radius-left img{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all,.no-border-radius-all img{border-radius:var(--px-radius-none)}@media only screen and (max-width: 767px){:host([hide-for="mobile"]),:host([show-for="tablet"]),:host([show-for="laptop"]),.hide-for-mobile,.show-for-tablet,.show-for-laptop{display:none}.no-border-radius-top--mobile,.no-border-radius-top--mobile img{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--mobile,.no-border-radius-right--mobile img{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--mobile,.no-border-radius-bottom--mobile img{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--mobile,.no-border-radius-left--mobile img{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--mobile,.no-border-radius-all--mobile img{border-radius:var(--px-radius-none)}}@media only screen and (min-width: 768px) and (max-width: 1024px){img{width:var(--img-width--tablet, auto)}:host([hide-for="tablet"]),:host([show-for="mobile"]),:host([show-for="laptop"]),.hide-for-tablet,.show-for-mobile,.show-for-laptop{display:none}.no-border-radius-top--tablet,.no-border-radius-top--tablet img{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--tablet,.no-border-radius-right--tablet img{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--tablet,.no-border-radius-bottom--tablet img{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--tablet,.no-border-radius-left--tablet img{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--tablet,.no-border-radius-all--tablet img{border-radius:var(--px-radius-none)}}@media only screen and (min-width: 1025px){img{width:var(--img-width--laptop, auto)}:host([hide-for="laptop"]),:host([show-for="mobile"]),:host([show-for="tablet"]),.hide-for-laptop,.show-for-mobile,.show-for-tablet{display:none}.no-border-radius-top--laptop,.no-border-radius-top--laptop img{border-top-left-radius:var(--px-radius-none);border-top-right-radius:var(--px-radius-none)}.no-border-radius-right--laptop,.no-border-radius-right--laptop img{border-top-right-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-bottom--laptop,.no-border-radius-bottom--laptop img{border-bottom-left-radius:var(--px-radius-none);border-bottom-right-radius:var(--px-radius-none)}.no-border-radius-left--laptop,.no-border-radius-left--laptop img{border-top-left-radius:var(--px-radius-none);border-bottom-left-radius:var(--px-radius-none)}.no-border-radius-all--laptop,.no-border-radius-all--laptop img{border-radius:var(--px-radius-none)}}@media only screen and (min-width: 1441px){img{width:var(--img-width--desktop, auto)}}';
|
|
2785
3304
|
const styleSheet$8 = new CSSStyleSheet();
|
|
2786
3305
|
styleSheet$8.replaceSync(imgCss);
|
|
2787
3306
|
const breakpointsValues = ["", "mobile", "tablet", "laptop"];
|
|
3307
|
+
const imageWidthValues = ["", "default", "s", "m", "l"];
|
|
2788
3308
|
class AbstractImage extends PxElement {
|
|
2789
3309
|
constructor() {
|
|
2790
3310
|
super(styleSheet$8);
|
|
@@ -2798,7 +3318,12 @@ class AbstractImage extends PxElement {
|
|
|
2798
3318
|
"no-border-radius",
|
|
2799
3319
|
"no-border-radius--mobile",
|
|
2800
3320
|
"no-border-radius--tablet",
|
|
2801
|
-
"no-border-radius--laptop"
|
|
3321
|
+
"no-border-radius--laptop",
|
|
3322
|
+
"width",
|
|
3323
|
+
"width--mobile",
|
|
3324
|
+
"width--tablet",
|
|
3325
|
+
"width--laptop",
|
|
3326
|
+
"width--desktop"
|
|
2802
3327
|
];
|
|
2803
3328
|
}
|
|
2804
3329
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
@@ -2827,12 +3352,60 @@ class AbstractImage extends PxElement {
|
|
|
2827
3352
|
noBorderRadiusValues
|
|
2828
3353
|
);
|
|
2829
3354
|
break;
|
|
3355
|
+
case "width":
|
|
3356
|
+
case "width--mobile":
|
|
3357
|
+
case "width--tablet":
|
|
3358
|
+
case "width--laptop":
|
|
3359
|
+
case "width--desktop":
|
|
3360
|
+
this.updateWidth(attrName, oldValue, newValue, imageWidthValues);
|
|
3361
|
+
break;
|
|
2830
3362
|
default:
|
|
2831
3363
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
2832
3364
|
break;
|
|
2833
3365
|
}
|
|
2834
3366
|
}
|
|
2835
3367
|
}
|
|
3368
|
+
updateWidth(attrName, oldValue, newValue, attrValues) {
|
|
3369
|
+
if (!this.checkName(attrValues, newValue)) {
|
|
3370
|
+
console.error(
|
|
3371
|
+
`${newValue} is not an allowed ${attrName} value for ${this.$el}`
|
|
3372
|
+
);
|
|
3373
|
+
return;
|
|
3374
|
+
}
|
|
3375
|
+
const hasBreakpoint = attrName.indexOf("--") > -1;
|
|
3376
|
+
const cssPropertyName = hasBreakpoint ? attrName.split("--")[0] : attrName;
|
|
3377
|
+
const breakpoints = [];
|
|
3378
|
+
if (!hasBreakpoint) {
|
|
3379
|
+
if (!this.getAttribute(cssPropertyName + "--mobile")) {
|
|
3380
|
+
breakpoints.push("mobile");
|
|
3381
|
+
}
|
|
3382
|
+
if (!this.getAttribute(cssPropertyName + "--tablet")) {
|
|
3383
|
+
breakpoints.push("tablet");
|
|
3384
|
+
}
|
|
3385
|
+
if (!this.getAttribute(cssPropertyName + "--laptop")) {
|
|
3386
|
+
breakpoints.push("laptop");
|
|
3387
|
+
}
|
|
3388
|
+
if (!this.getAttribute(cssPropertyName + "--desktop")) {
|
|
3389
|
+
breakpoints.push("desktop");
|
|
3390
|
+
}
|
|
3391
|
+
breakpoints.forEach((breakpoint) => {
|
|
3392
|
+
this.updateStyle(cssPropertyName, breakpoint, oldValue);
|
|
3393
|
+
this.updateStyle(cssPropertyName, breakpoint, newValue);
|
|
3394
|
+
});
|
|
3395
|
+
} else {
|
|
3396
|
+
const breakpoint = attrName.split("--")[1];
|
|
3397
|
+
this.updateStyle(cssPropertyName, breakpoint, oldValue);
|
|
3398
|
+
this.updateStyle(cssPropertyName, breakpoint, newValue);
|
|
3399
|
+
}
|
|
3400
|
+
}
|
|
3401
|
+
updateStyle(cssName, breakpoint, value) {
|
|
3402
|
+
if (value !== null && value !== "" && value !== "default") {
|
|
3403
|
+
this.$el.style.setProperty(
|
|
3404
|
+
`--img-${cssName}--${breakpoint}`,
|
|
3405
|
+
`var(--px-image-${value}-${breakpoint === "laptop" ? "desktop" : breakpoint})`
|
|
3406
|
+
);
|
|
3407
|
+
}
|
|
3408
|
+
}
|
|
2836
3409
|
updateAttribute(attrName, oldValue, newValue, attrValues) {
|
|
2837
3410
|
if (!this.checkName(attrValues, newValue)) {
|
|
2838
3411
|
console.error(
|
|
@@ -2910,6 +3483,36 @@ class AbstractImage extends PxElement {
|
|
|
2910
3483
|
set noBorderRadiusLaptop(value) {
|
|
2911
3484
|
this.setAttribute("no-border-radius--laptop", value);
|
|
2912
3485
|
}
|
|
3486
|
+
get width() {
|
|
3487
|
+
return this.getAttribute("width");
|
|
3488
|
+
}
|
|
3489
|
+
set width(value) {
|
|
3490
|
+
this.setAttribute("width", value);
|
|
3491
|
+
}
|
|
3492
|
+
get widthMobile() {
|
|
3493
|
+
return this.getAttribute("width--mobile");
|
|
3494
|
+
}
|
|
3495
|
+
set widthMobile(value) {
|
|
3496
|
+
this.setAttribute("width--mobile", value);
|
|
3497
|
+
}
|
|
3498
|
+
get widthTablet() {
|
|
3499
|
+
return this.getAttribute("width--tablet");
|
|
3500
|
+
}
|
|
3501
|
+
set widthTablet(value) {
|
|
3502
|
+
this.setAttribute("width--tablet", value);
|
|
3503
|
+
}
|
|
3504
|
+
get widthLaptop() {
|
|
3505
|
+
return this.getAttribute("width--laptop");
|
|
3506
|
+
}
|
|
3507
|
+
set widthLaptop(value) {
|
|
3508
|
+
this.setAttribute("width--laptop", value);
|
|
3509
|
+
}
|
|
3510
|
+
get widthDesktop() {
|
|
3511
|
+
return this.getAttribute("width--desktop");
|
|
3512
|
+
}
|
|
3513
|
+
set widthDesktop(value) {
|
|
3514
|
+
this.setAttribute("width--desktop", value);
|
|
3515
|
+
}
|
|
2913
3516
|
}
|
|
2914
3517
|
const _Image = class _Image extends AbstractImage {
|
|
2915
3518
|
constructor() {
|
|
@@ -3736,7 +4339,6 @@ class Tab extends HTMLElement {
|
|
|
3736
4339
|
if (!isFalsy(value)) {
|
|
3737
4340
|
this.$button.setAttribute("aria-selected", value);
|
|
3738
4341
|
this.$button.removeAttribute("tabindex");
|
|
3739
|
-
this.$button.focus();
|
|
3740
4342
|
} else {
|
|
3741
4343
|
this.$button.removeAttribute("aria-selected");
|
|
3742
4344
|
this.$button.tabIndex = -1;
|
|
@@ -4445,7 +5047,7 @@ const _Paragraph = class _Paragraph extends PxElement {
|
|
|
4445
5047
|
_Paragraph.nativeName = "p";
|
|
4446
5048
|
let Paragraph = _Paragraph;
|
|
4447
5049
|
customElements.define("px-p", Paragraph);
|
|
4448
|
-
const typographyCss = "*{font-family:var(--px-font-family)}::slotted(ul),::slotted(ol){margin:0 0 0 var(--px-spacing-inside-section-default-desktop);padding:0}::slotted(b),::slotted(strong){font-weight:700}:host([inverted]) slot{color:var(--px-color-
|
|
5050
|
+
const typographyCss = "*{font-family:var(--px-font-family)}::slotted(ul),::slotted(ol){margin:0 0 0 var(--px-spacing-inside-section-default-desktop);padding:0}::slotted(b),::slotted(strong){font-weight:700}:host([inverted]) slot{color:var(--px-text-color-body-neutral-strong-inverted)}";
|
|
4449
5051
|
const lightStyles = ".li{padding-bottom:var(--px-padding-xs)}";
|
|
4450
5052
|
const typographyStyles$1 = new CSSStyleSheet();
|
|
4451
5053
|
const headingStyles = new CSSStyleSheet();
|
|
@@ -4846,6 +5448,8 @@ export {
|
|
|
4846
5448
|
Container,
|
|
4847
5449
|
Entrypoint,
|
|
4848
5450
|
FontIcon,
|
|
5451
|
+
Grid,
|
|
5452
|
+
GridItem,
|
|
4849
5453
|
H1,
|
|
4850
5454
|
H2,
|
|
4851
5455
|
H3,
|
|
@@ -4881,6 +5485,7 @@ export {
|
|
|
4881
5485
|
VStack,
|
|
4882
5486
|
WithFlexAttributes,
|
|
4883
5487
|
addGlobalStylesheet,
|
|
5488
|
+
alignItemsValues,
|
|
4884
5489
|
backgroundColorValues,
|
|
4885
5490
|
backgroundSizeValues,
|
|
4886
5491
|
backgroundValues,
|
|
@@ -4892,16 +5497,21 @@ export {
|
|
|
4892
5497
|
buttonIconSizeValues,
|
|
4893
5498
|
buttonIconVariantValues,
|
|
4894
5499
|
colorValues,
|
|
5500
|
+
contentAlignmentValues,
|
|
5501
|
+
directionValues,
|
|
4895
5502
|
fontsizeValues,
|
|
4896
5503
|
fontweightValues,
|
|
4897
5504
|
gapValues,
|
|
4898
5505
|
getSupportedAttributeNames,
|
|
4899
5506
|
getViewportFormat,
|
|
4900
5507
|
gradientValues,
|
|
5508
|
+
gridColsValues,
|
|
4901
5509
|
gridGapValues,
|
|
4902
5510
|
headingValues,
|
|
4903
5511
|
iconSizeValues$1 as iconSizeValues,
|
|
4904
5512
|
isFalsy,
|
|
5513
|
+
itemsAlignmentValues,
|
|
5514
|
+
justifyContentValues,
|
|
4905
5515
|
linkShapeValues,
|
|
4906
5516
|
linkVariantValues,
|
|
4907
5517
|
noBorderRadiusValues,
|
|
@@ -4916,5 +5526,6 @@ export {
|
|
|
4916
5526
|
tagShapeValues,
|
|
4917
5527
|
tagVariantValues,
|
|
4918
5528
|
textalignValues,
|
|
4919
|
-
variantValues$1 as variantValues
|
|
5529
|
+
variantValues$1 as variantValues,
|
|
5530
|
+
wrapValues
|
|
4920
5531
|
};
|