@proximus/lavender-light 2.0.0-alpha.17 → 2.0.0-alpha.19
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.
|
@@ -7869,7 +7869,7 @@ createMobileMenuPanelDropDowns_fn = function() {
|
|
|
7869
7869
|
if (!customElements.get("px-header-mobile-menu")) {
|
|
7870
7870
|
customElements.define("px-header-mobile-menu", HeaderMobileMenu);
|
|
7871
7871
|
}
|
|
7872
|
-
const contentHeaderCss = ":host{--min-height--mobile: 15.625em;--min-height--tablet: 17.5em;--min-height--laptop: 17.5em;--min-height--desktop: 17.5em}:host,:host>*{display:block;box-sizing:border-box}.content-header{position:relative;z-index:0}[min-height] .content-header-content{min-height:calc(var(--min-height--mobile) - (var(--px-spacing-l-mobile) * 2))}.content-header-content{display:flex;flex-direction:column;gap:var(--px-spacing-l-mobile);z-index:2;position:relative;box-sizing:border-box}.contrast-helper{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none;display:none
|
|
7872
|
+
const contentHeaderCss = ":host{--min-height--mobile: 15.625em;--min-height--tablet: 17.5em;--min-height--laptop: 17.5em;--min-height--desktop: 17.5em}:host,:host>*{display:block;box-sizing:border-box}.content-header{position:relative;z-index:0}[min-height] .content-header-content{min-height:calc(var(--min-height--mobile) - (var(--px-spacing-l-mobile) * 2))}.content-header-content{display:flex;flex-direction:column;gap:var(--px-spacing-l-mobile);z-index:2;position:relative;box-sizing:border-box}.contrast-helper{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;pointer-events:none;display:none}[contrast-helper-gradient] .contrast-helper{display:block;background-image:linear-gradient(90deg,#fff 23.43%,#fff0 81.69%)}[inverted] :is([contrast-helper-gradient] .contrast-helper){background-image:linear-gradient(90deg,#000 23.43%,#0000 81.69%)}[contrast-helper-overlay] .contrast-helper{display:block;background-color:#ffffffb3}[inverted] :is([contrast-helper-overlay] .contrast-helper){background-color:#0006}@media only screen and (min-width: 48em){.content-header-content{gap:var(--px-spacing-l-desktop)}[min-height] .content-header-content{min-height:calc(var(--min-height--tablet) - (var(--px-spacing-l-tablet) * 2))}}@media only screen and (min-width: 64.0625em){.content-header-content{gap:var(--px-spacing-l-laptop)}[min-height] .content-header-content{min-height:calc(var(--min-height--laptop) - (var(--px-spacing-l-laptop) * 2))}}";
|
|
7873
7873
|
const contentHeaderStyles = new CSSStyleSheet();
|
|
7874
7874
|
contentHeaderStyles.replaceSync(contentHeaderCss);
|
|
7875
7875
|
const _ContentHeader = class _ContentHeader extends PxElement {
|
|
@@ -7878,16 +7878,20 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
7878
7878
|
this.template = () => `<div class="content-header">
|
|
7879
7879
|
<div class="contrast-helper"></div>
|
|
7880
7880
|
<px-section padding-block="l">
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
<
|
|
7885
|
-
|
|
7886
|
-
|
|
7887
|
-
|
|
7888
|
-
|
|
7889
|
-
|
|
7890
|
-
|
|
7881
|
+
<px-grid gap="none">
|
|
7882
|
+
<px-container padding="none" border-radius="none" background-color="none" background-image="none" background-image--mobile="none" background-image--tablet="none" background-image--laptop="none" >
|
|
7883
|
+
<div class="content-header-content">
|
|
7884
|
+
<px-vstack gap="heading-to-subtitle">
|
|
7885
|
+
<px-h1 variant="title-3xl"><slot></slot></px-h1>
|
|
7886
|
+
<slot name="subtitle"></slot>
|
|
7887
|
+
</px-vstack>
|
|
7888
|
+
${this.$patchDescriptionSlot ? `<px-stack gap="s" direction="row" direction--mobile="column">
|
|
7889
|
+
<slot name="patch" shrink></slot>
|
|
7890
|
+
<slot name="patch-description"></slot>
|
|
7891
|
+
</px-stack>` : ""}
|
|
7892
|
+
</div>
|
|
7893
|
+
</px-container>
|
|
7894
|
+
</px-grid>
|
|
7891
7895
|
${this.$overlapSlot ? `<slot name="overlap" slot="overlap"></slot>` : ""}
|
|
7892
7896
|
</px-section>
|
|
7893
7897
|
</div>`;
|
|
@@ -7906,6 +7910,10 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
7906
7910
|
"contrast-helper-gradient",
|
|
7907
7911
|
"contrast-helper-overlay",
|
|
7908
7912
|
"min-height",
|
|
7913
|
+
"has-gridding",
|
|
7914
|
+
"has-gridding--mobile",
|
|
7915
|
+
"has-gridding--tablet",
|
|
7916
|
+
"has-gridding--laptop",
|
|
7909
7917
|
"inverted"
|
|
7910
7918
|
];
|
|
7911
7919
|
}
|
|
@@ -7928,6 +7936,7 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
7928
7936
|
this.$patchDescriptionSlot.setAttribute("size", "m");
|
|
7929
7937
|
}
|
|
7930
7938
|
}
|
|
7939
|
+
this.createGridding();
|
|
7931
7940
|
}
|
|
7932
7941
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
7933
7942
|
if (oldValue !== newValue) {
|
|
@@ -7956,6 +7965,12 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
7956
7965
|
case "background-position":
|
|
7957
7966
|
this.$section.backgroundPosition = newValue;
|
|
7958
7967
|
break;
|
|
7968
|
+
case "has-gridding":
|
|
7969
|
+
case "has-gridding--mobile":
|
|
7970
|
+
case "has-gridding--tablet":
|
|
7971
|
+
case "has-gridding--laptop":
|
|
7972
|
+
this.createGridding();
|
|
7973
|
+
break;
|
|
7959
7974
|
case "inverted":
|
|
7960
7975
|
for (let i = 0; i < this.$children.length; i++) {
|
|
7961
7976
|
if (!this.$children[i].hasAttribute("inverted")) {
|
|
@@ -7971,6 +7986,38 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
7971
7986
|
}
|
|
7972
7987
|
}
|
|
7973
7988
|
}
|
|
7989
|
+
createGridding() {
|
|
7990
|
+
const breakpoints = [
|
|
7991
|
+
{ prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
|
|
7992
|
+
{
|
|
7993
|
+
prop: "hasGriddingMobile",
|
|
7994
|
+
gridProp: "gridColsMobile",
|
|
7995
|
+
attr: "col-span--mobile"
|
|
7996
|
+
},
|
|
7997
|
+
{
|
|
7998
|
+
prop: "hasGriddingTablet",
|
|
7999
|
+
gridProp: "gridColsTablet",
|
|
8000
|
+
attr: "col-span--tablet"
|
|
8001
|
+
},
|
|
8002
|
+
{
|
|
8003
|
+
prop: "hasGriddingLaptop",
|
|
8004
|
+
gridProp: "gridColsLaptop",
|
|
8005
|
+
attr: "col-span--laptop"
|
|
8006
|
+
}
|
|
8007
|
+
];
|
|
8008
|
+
const spanElement = this.shadowRoot.querySelector(
|
|
8009
|
+
"px-grid > px-container"
|
|
8010
|
+
);
|
|
8011
|
+
breakpoints.forEach(({ prop, gridProp, attr }) => {
|
|
8012
|
+
if (this[prop]) {
|
|
8013
|
+
this.$grid[gridProp] = "3";
|
|
8014
|
+
spanElement.setAttribute(attr, "2");
|
|
8015
|
+
}
|
|
8016
|
+
});
|
|
8017
|
+
}
|
|
8018
|
+
get $grid() {
|
|
8019
|
+
return this.shadowRoot.querySelector("px-grid");
|
|
8020
|
+
}
|
|
7974
8021
|
get $section() {
|
|
7975
8022
|
return this.shadowRoot.querySelector("px-section");
|
|
7976
8023
|
}
|
|
@@ -8057,6 +8104,46 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8057
8104
|
this.removeAttribute("contrast-helper-overlay");
|
|
8058
8105
|
}
|
|
8059
8106
|
}
|
|
8107
|
+
get hasGridding() {
|
|
8108
|
+
return this.hasAttribute("has-gridding");
|
|
8109
|
+
}
|
|
8110
|
+
set hasGridding(value) {
|
|
8111
|
+
if (value) {
|
|
8112
|
+
this.setAttribute("has-gridding", "");
|
|
8113
|
+
} else {
|
|
8114
|
+
this.removeAttribute("has-gridding");
|
|
8115
|
+
}
|
|
8116
|
+
}
|
|
8117
|
+
get hasGriddingMobile() {
|
|
8118
|
+
return this.hasAttribute("has-gridding--mobile");
|
|
8119
|
+
}
|
|
8120
|
+
set hasGriddingMobile(value) {
|
|
8121
|
+
if (value) {
|
|
8122
|
+
this.setAttribute("has-gridding--mobile", "");
|
|
8123
|
+
} else {
|
|
8124
|
+
this.removeAttribute("has-gridding--mobile");
|
|
8125
|
+
}
|
|
8126
|
+
}
|
|
8127
|
+
get hasGriddingTablet() {
|
|
8128
|
+
return this.hasAttribute("has-gridding--tablet");
|
|
8129
|
+
}
|
|
8130
|
+
set hasGriddingTablet(value) {
|
|
8131
|
+
if (value) {
|
|
8132
|
+
this.setAttribute("has-gridding--tablet", "");
|
|
8133
|
+
} else {
|
|
8134
|
+
this.removeAttribute("has-gridding--tablet");
|
|
8135
|
+
}
|
|
8136
|
+
}
|
|
8137
|
+
get hasGriddingLaptop() {
|
|
8138
|
+
return this.hasAttribute("has-gridding--laptop");
|
|
8139
|
+
}
|
|
8140
|
+
set hasGriddingLaptop(value) {
|
|
8141
|
+
if (value) {
|
|
8142
|
+
this.setAttribute("has-gridding--laptop", "");
|
|
8143
|
+
} else {
|
|
8144
|
+
this.removeAttribute("has-gridding--laptop");
|
|
8145
|
+
}
|
|
8146
|
+
}
|
|
8060
8147
|
get inverted() {
|
|
8061
8148
|
return this.hasAttribute("inverted");
|
|
8062
8149
|
}
|