@proximus/lavender 2.0.0-alpha.20 → 2.0.0-alpha.22

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.
@@ -14123,7 +14123,7 @@ let Card = _Card;
14123
14123
  if (!customElements.get("px-card")) {
14124
14124
  customElements.define("px-card", Card);
14125
14125
  }
14126
- 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;border-radius:var(--px-radius-main)}[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))}}";
14126
+ 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))}}";
14127
14127
  const contentHeaderStyles = new CSSStyleSheet();
14128
14128
  contentHeaderStyles.replaceSync(contentHeaderCss);
14129
14129
  const _ContentHeader = class _ContentHeader extends PxElement {
@@ -14132,16 +14132,20 @@ const _ContentHeader = class _ContentHeader extends PxElement {
14132
14132
  this.template = () => `<div class="content-header">
14133
14133
  <div class="contrast-helper"></div>
14134
14134
  <px-section padding-block="l">
14135
- <div class="content-header-content">
14136
- <px-vstack gap="heading-to-subtitle">
14137
- <px-h1 variant="title-3xl"><slot></slot></px-h1>
14138
- <slot name="subtitle"></slot>
14139
- </px-vstack>
14140
- ${this.$patchDescriptionSlot ? `<px-stack gap="s" direction="row" direction--mobile="column">
14141
- <slot name="patch" shrink></slot>
14142
- <slot name="patch-description"></slot>
14143
- </px-stack>` : ""}
14144
- </div>
14135
+ <px-grid gap="none">
14136
+ <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" >
14137
+ <div class="content-header-content">
14138
+ <px-vstack gap="heading-to-subtitle">
14139
+ <px-h1 variant="title-3xl"><slot></slot></px-h1>
14140
+ <slot name="subtitle"></slot>
14141
+ </px-vstack>
14142
+ ${this.$patchDescriptionSlot ? `<px-stack gap="s" direction="row" direction--mobile="column">
14143
+ <slot name="patch" shrink></slot>
14144
+ <slot name="patch-description"></slot>
14145
+ </px-stack>` : ""}
14146
+ </div>
14147
+ </px-container>
14148
+ </px-grid>
14145
14149
  ${this.$overlapSlot ? `<slot name="overlap" slot="overlap"></slot>` : ""}
14146
14150
  </px-section>
14147
14151
  </div>`;
@@ -14160,6 +14164,10 @@ const _ContentHeader = class _ContentHeader extends PxElement {
14160
14164
  "contrast-helper-gradient",
14161
14165
  "contrast-helper-overlay",
14162
14166
  "min-height",
14167
+ "has-gridding",
14168
+ "has-gridding--mobile",
14169
+ "has-gridding--tablet",
14170
+ "has-gridding--laptop",
14163
14171
  "inverted"
14164
14172
  ];
14165
14173
  }
@@ -14182,6 +14190,7 @@ const _ContentHeader = class _ContentHeader extends PxElement {
14182
14190
  this.$patchDescriptionSlot.setAttribute("size", "m");
14183
14191
  }
14184
14192
  }
14193
+ this.createGridding();
14185
14194
  }
14186
14195
  attributeChangedCallback(attrName, oldValue, newValue) {
14187
14196
  if (oldValue !== newValue) {
@@ -14210,6 +14219,12 @@ const _ContentHeader = class _ContentHeader extends PxElement {
14210
14219
  case "background-position":
14211
14220
  this.$section.backgroundPosition = newValue;
14212
14221
  break;
14222
+ case "has-gridding":
14223
+ case "has-gridding--mobile":
14224
+ case "has-gridding--tablet":
14225
+ case "has-gridding--laptop":
14226
+ this.createGridding();
14227
+ break;
14213
14228
  case "inverted":
14214
14229
  for (let i = 0; i < this.$children.length; i++) {
14215
14230
  if (!this.$children[i].hasAttribute("inverted")) {
@@ -14225,6 +14240,38 @@ const _ContentHeader = class _ContentHeader extends PxElement {
14225
14240
  }
14226
14241
  }
14227
14242
  }
14243
+ createGridding() {
14244
+ const breakpoints = [
14245
+ { prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
14246
+ {
14247
+ prop: "hasGriddingMobile",
14248
+ gridProp: "gridColsMobile",
14249
+ attr: "col-span--mobile"
14250
+ },
14251
+ {
14252
+ prop: "hasGriddingTablet",
14253
+ gridProp: "gridColsTablet",
14254
+ attr: "col-span--tablet"
14255
+ },
14256
+ {
14257
+ prop: "hasGriddingLaptop",
14258
+ gridProp: "gridColsLaptop",
14259
+ attr: "col-span--laptop"
14260
+ }
14261
+ ];
14262
+ const spanElement = this.shadowRoot.querySelector(
14263
+ "px-grid > px-container"
14264
+ );
14265
+ breakpoints.forEach(({ prop, gridProp, attr }) => {
14266
+ if (this[prop]) {
14267
+ this.$grid[gridProp] = "3";
14268
+ spanElement.setAttribute(attr, "2");
14269
+ }
14270
+ });
14271
+ }
14272
+ get $grid() {
14273
+ return this.shadowRoot.querySelector("px-grid");
14274
+ }
14228
14275
  get $section() {
14229
14276
  return this.shadowRoot.querySelector("px-section");
14230
14277
  }
@@ -14311,6 +14358,46 @@ const _ContentHeader = class _ContentHeader extends PxElement {
14311
14358
  this.removeAttribute("contrast-helper-overlay");
14312
14359
  }
14313
14360
  }
14361
+ get hasGridding() {
14362
+ return this.hasAttribute("has-gridding");
14363
+ }
14364
+ set hasGridding(value) {
14365
+ if (value) {
14366
+ this.setAttribute("has-gridding", "");
14367
+ } else {
14368
+ this.removeAttribute("has-gridding");
14369
+ }
14370
+ }
14371
+ get hasGriddingMobile() {
14372
+ return this.hasAttribute("has-gridding--mobile");
14373
+ }
14374
+ set hasGriddingMobile(value) {
14375
+ if (value) {
14376
+ this.setAttribute("has-gridding--mobile", "");
14377
+ } else {
14378
+ this.removeAttribute("has-gridding--mobile");
14379
+ }
14380
+ }
14381
+ get hasGriddingTablet() {
14382
+ return this.hasAttribute("has-gridding--tablet");
14383
+ }
14384
+ set hasGriddingTablet(value) {
14385
+ if (value) {
14386
+ this.setAttribute("has-gridding--tablet", "");
14387
+ } else {
14388
+ this.removeAttribute("has-gridding--tablet");
14389
+ }
14390
+ }
14391
+ get hasGriddingLaptop() {
14392
+ return this.hasAttribute("has-gridding--laptop");
14393
+ }
14394
+ set hasGriddingLaptop(value) {
14395
+ if (value) {
14396
+ this.setAttribute("has-gridding--laptop", "");
14397
+ } else {
14398
+ this.removeAttribute("has-gridding--laptop");
14399
+ }
14400
+ }
14314
14401
  get inverted() {
14315
14402
  return this.hasAttribute("inverted");
14316
14403
  }