@proximus/lavender 2.0.0-alpha.123 → 2.0.0-alpha.124
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 +75 -28
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -9392,7 +9392,7 @@ let ColorOptionLink = _ColorOptionLink;
|
|
|
9392
9392
|
if (!customElements.get("px-color-option-link")) {
|
|
9393
9393
|
customElements.define("px-color-option-link", ColorOptionLink);
|
|
9394
9394
|
}
|
|
9395
|
-
const contentHeaderCss =
|
|
9395
|
+
const contentHeaderCss = ':host{--min-height--mobile: 15.625rem;--min-height--tablet: 17.5rem;--min-height--laptop: 17.5rem;--min-height--desktop: 17.5rem}: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;z-index:2;position:relative;box-sizing:border-box}.content-header-content ::slotted([slot="patch"]){margin-top:var(--px-spacing-l-mobile)}.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 screen and (min-width: 48rem){.content-header-content ::slotted([slot="patch"]){flex-shrink:0}.content-header-content ::slotted([slot="patch"]),.content-header-content ::slotted([slot="patch-description"]){margin-top:var(--px-spacing-l-tablet)}[min-height] .content-header-content{min-height:calc(var(--min-height--tablet) - (var(--px-spacing-l-tablet) * 2))}}@media screen and (min-width: 64.0625rem){.content-header-content ::slotted([slot="patch"]),.content-header-content ::slotted([slot="patch-description"]){margin-top:var(--px-spacing-l-laptop)}[min-height] .content-header-content{min-height:calc(var(--min-height--laptop) - (var(--px-spacing-l-laptop) * 2))}}@media screen and (min-width: 90.0625rem){.content-header-content ::slotted([slot="patch"]),.content-header-content ::slotted([slot="patch-description"]){margin-top:var(--px-spacing-l-desktop)}[min-height] .content-header-content{min-height:calc(var(--min-height--desktop) - (var(--px-spacing-l-desktop) * 2))}}';
|
|
9396
9396
|
const styles$A = ':host{display:block}:host,:host *{box-sizing:border-box}.content-wrapper{margin-inline:var(--px-padding-s-mobile);max-width:var(--px-content-wrapper-max-width-desktop)}@media screen and (min-width: 77rem){.content-wrapper{margin-inline:auto}}.overlapped{margin-bottom:calc(var(--px-overlapped-mobile) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-mobile)}@media screen and (min-width: 48rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}@media screen and (min-width: 64.0625rem){.overlapped{margin-bottom:calc(var(--px-overlapped-desktop) * -1)}::slotted([slot="overlap"]){margin-top:var(--px-overlapped-desktop)}}';
|
|
9397
9397
|
const styleSheet$t = new CSSStyleSheet();
|
|
9398
9398
|
styleSheet$t.replaceSync(styles$A);
|
|
@@ -10015,6 +10015,10 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10015
10015
|
<px-h1><slot></slot></px-h1>
|
|
10016
10016
|
<slot name="subtitle"></slot>
|
|
10017
10017
|
</px-vstack>
|
|
10018
|
+
<px-stack gap="s" direction="row" direction--mobile="column">
|
|
10019
|
+
<slot name="patch" shrink></slot>
|
|
10020
|
+
<slot name="patch-description"></slot>
|
|
10021
|
+
</px-stack>
|
|
10018
10022
|
</div>
|
|
10019
10023
|
</px-container>
|
|
10020
10024
|
</px-grid>
|
|
@@ -10040,38 +10044,22 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10040
10044
|
"has-gridding--mobile",
|
|
10041
10045
|
"has-gridding--tablet",
|
|
10042
10046
|
"has-gridding--laptop",
|
|
10047
|
+
"has-gridding--desktop",
|
|
10043
10048
|
"inverted"
|
|
10044
10049
|
];
|
|
10045
10050
|
}
|
|
10046
10051
|
connectedCallback() {
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
`<px-stack gap="s" direction="row" direction--mobile="column">
|
|
10053
|
-
<slot name="patch" shrink></slot>
|
|
10054
|
-
<slot name="patch-description"></slot>
|
|
10055
|
-
</px-stack>`
|
|
10056
|
-
);
|
|
10057
|
-
}
|
|
10058
|
-
if (this.$subtitleSlot) {
|
|
10059
|
-
this.$subtitleSlot.setAttribute("variant", "subtitle");
|
|
10060
|
-
}
|
|
10061
|
-
if (this.$patchDescriptionSlot) {
|
|
10062
|
-
if (this.$patchDescriptionSlot.localName === "px-p") {
|
|
10063
|
-
this.$patchDescriptionSlot.setAttribute("variant", "default");
|
|
10064
|
-
}
|
|
10065
|
-
if (this.$patchDescriptionSlot.localName === "px-p" || this.$patchDescriptionSlot.localName === "px-span") {
|
|
10066
|
-
this.$patchDescriptionSlot.setAttribute("font-size", "body-l");
|
|
10067
|
-
this.$patchDescriptionSlot.removeAttribute("font-weight");
|
|
10068
|
-
this.$patchDescriptionSlot.removeAttribute("color");
|
|
10069
|
-
}
|
|
10070
|
-
if (this.$patchDescriptionSlot.localName === "px-price") {
|
|
10071
|
-
this.$patchDescriptionSlot.setAttribute("size", "m");
|
|
10072
|
-
}
|
|
10073
|
-
}
|
|
10052
|
+
var _a, _b;
|
|
10053
|
+
this.styleSubtitleSlot = this.styleSubtitleSlot.bind(this);
|
|
10054
|
+
this.stylepatchDescriptionSlotted = this.stylepatchDescriptionSlotted.bind(this);
|
|
10055
|
+
this.styleSubtitleSlot();
|
|
10056
|
+
this.stylepatchDescriptionSlotted();
|
|
10074
10057
|
this.createGridding();
|
|
10058
|
+
(_a = this.$subtitleSlot) == null ? void 0 : _a.addEventListener("slotchange", this.styleSubtitleSlot);
|
|
10059
|
+
(_b = this.$patchDescriptionSlot) == null ? void 0 : _b.addEventListener(
|
|
10060
|
+
"slotchange",
|
|
10061
|
+
this.stylepatchDescriptionSlotted
|
|
10062
|
+
);
|
|
10075
10063
|
}
|
|
10076
10064
|
attributeChangedCallback(attrName, oldValue, newValue) {
|
|
10077
10065
|
if (oldValue !== newValue) {
|
|
@@ -10104,6 +10092,7 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10104
10092
|
case "has-gridding--mobile":
|
|
10105
10093
|
case "has-gridding--tablet":
|
|
10106
10094
|
case "has-gridding--laptop":
|
|
10095
|
+
case "has-gridding--desktop":
|
|
10107
10096
|
this.createGridding(newValue);
|
|
10108
10097
|
break;
|
|
10109
10098
|
case "inverted":
|
|
@@ -10121,6 +10110,37 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10121
10110
|
}
|
|
10122
10111
|
}
|
|
10123
10112
|
}
|
|
10113
|
+
disconnectedCallback() {
|
|
10114
|
+
var _a, _b;
|
|
10115
|
+
(_a = this.$subtitleSlot) == null ? void 0 : _a.removeEventListener(
|
|
10116
|
+
"slotchange",
|
|
10117
|
+
this.styleSubtitleSlot
|
|
10118
|
+
);
|
|
10119
|
+
(_b = this.$patchDescriptionSlot) == null ? void 0 : _b.removeEventListener(
|
|
10120
|
+
"slotchange",
|
|
10121
|
+
this.stylepatchDescriptionSlotted
|
|
10122
|
+
);
|
|
10123
|
+
}
|
|
10124
|
+
stylepatchDescriptionSlotted() {
|
|
10125
|
+
if (this.$patchDescriptionSlotted) {
|
|
10126
|
+
if (this.$patchDescriptionSlotted.localName === "px-p") {
|
|
10127
|
+
this.$patchDescriptionSlotted.setAttribute("variant", "default");
|
|
10128
|
+
}
|
|
10129
|
+
if (this.$patchDescriptionSlotted.localName === "px-p" || this.$patchDescriptionSlotted.localName === "px-span") {
|
|
10130
|
+
this.$patchDescriptionSlotted.setAttribute("font-size", "body-l");
|
|
10131
|
+
this.$patchDescriptionSlotted.removeAttribute("font-weight");
|
|
10132
|
+
this.$patchDescriptionSlotted.removeAttribute("color");
|
|
10133
|
+
}
|
|
10134
|
+
if (this.$patchDescriptionSlotted.localName === "px-price") {
|
|
10135
|
+
this.$patchDescriptionSlotted.setAttribute("size", "m");
|
|
10136
|
+
}
|
|
10137
|
+
}
|
|
10138
|
+
}
|
|
10139
|
+
styleSubtitleSlot() {
|
|
10140
|
+
if (this.$subtitleSlotted) {
|
|
10141
|
+
this.$subtitleSlotted.setAttribute("variant", "subtitle");
|
|
10142
|
+
}
|
|
10143
|
+
}
|
|
10124
10144
|
createGridding(value) {
|
|
10125
10145
|
const breakpoints = [
|
|
10126
10146
|
{ prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
|
|
@@ -10138,6 +10158,11 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10138
10158
|
prop: "hasGriddingLaptop",
|
|
10139
10159
|
gridAttr: "grid-cols--laptop",
|
|
10140
10160
|
attr: "col-span--laptop"
|
|
10161
|
+
},
|
|
10162
|
+
{
|
|
10163
|
+
prop: "hasGriddingDesktop",
|
|
10164
|
+
gridAttr: "grid-cols--desktop",
|
|
10165
|
+
attr: "col-span--desktop"
|
|
10141
10166
|
}
|
|
10142
10167
|
];
|
|
10143
10168
|
const spanElement = this.shadowRoot.querySelector(
|
|
@@ -10167,9 +10192,21 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10167
10192
|
return this.shadowRoot.querySelector("px-h1");
|
|
10168
10193
|
}
|
|
10169
10194
|
get $subtitleSlot() {
|
|
10195
|
+
var _a;
|
|
10196
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
10197
|
+
'slot[name="subtitle"]'
|
|
10198
|
+
);
|
|
10199
|
+
}
|
|
10200
|
+
get $subtitleSlotted() {
|
|
10170
10201
|
return this.querySelector('[slot="subtitle"]');
|
|
10171
10202
|
}
|
|
10172
10203
|
get $patchDescriptionSlot() {
|
|
10204
|
+
var _a;
|
|
10205
|
+
return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector(
|
|
10206
|
+
'slot[name="patch-description"]'
|
|
10207
|
+
);
|
|
10208
|
+
}
|
|
10209
|
+
get $patchDescriptionSlotted() {
|
|
10173
10210
|
return this.querySelector('[slot="patch-description"]');
|
|
10174
10211
|
}
|
|
10175
10212
|
get $overlapSlot() {
|
|
@@ -10286,6 +10323,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
10286
10323
|
this.removeAttribute("has-gridding--laptop");
|
|
10287
10324
|
}
|
|
10288
10325
|
}
|
|
10326
|
+
get hasGriddingDesktop() {
|
|
10327
|
+
return this.hasAttribute("has-gridding--desktop");
|
|
10328
|
+
}
|
|
10329
|
+
set hasGriddingDesktop(value) {
|
|
10330
|
+
if (value) {
|
|
10331
|
+
this.setAttribute("has-gridding--desktop", "");
|
|
10332
|
+
} else {
|
|
10333
|
+
this.removeAttribute("has-gridding--desktop");
|
|
10334
|
+
}
|
|
10335
|
+
}
|
|
10289
10336
|
get inverted() {
|
|
10290
10337
|
return this.hasAttribute("inverted");
|
|
10291
10338
|
}
|