@proximus/lavender-banner 1.4.5-alpha.9 → 1.4.5
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/index.es.js +14 -13
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ import "@proximus/lavender-container";
|
|
|
2
2
|
import { cssTokenBreakpoints as b, gapValues as m, PxElement as h, log as c, VerticallyExtendedElement as f, backgroundSizeValues as y, gradientValues as j, backgroundColorValues as k } from "@proximus/lavender-common";
|
|
3
3
|
const A = ':host{position:relative}:host,:host>*{display:block;box-sizing:border-box}.banner{position:relative;min-height:8em;height:100%}.banner[reduced]{min-height:5em}px-container{height:100%}.banner-content{display:grid;grid-template-columns:1fr;grid-template-rows:minmax(0,auto);row-gap:var(--px-spacing-s-mobile);z-index:2;position:relative}[reduced] .banner-content{grid-template-columns:min-content minmax(0,1fr);column-gap:var(--px-spacing-default-mobile)}::slotted([slot="tag"]){grid-area:tag}::slotted([slot="media"]){grid-area:media;align-self:start}::slotted([slot="title"]){grid-area:title}::slotted([slot="description"]){grid-area:description}::slotted([slot="content"]){grid-area:content}::slotted([slot="action"]){grid-area:action;z-index:2}:host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-default-mobile) - var(--px-spacing-s-mobile))}.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){.banner-content{row-gap:var(--px-spacing-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-default-desktop) - var(--px-spacing-s-desktop))}}@media only screen and (min-width: 64.0625em){.banner-content{row-gap:var(--px-spacing-s-desktop)}[reduced] .banner-content{column-gap:var(--px-spacing-default-desktop)}.banner-content :host(:not([reduced])) ::slotted([slot="action"]){margin-top:calc(var(--px-spacing-default-desktop) - var(--px-spacing-s-desktop))}}', v = ":host{display:block;--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;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)}.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: 48em) and (max-width: 64em){.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: 64.0625em){.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}}", g = new CSSStyleSheet();
|
|
4
4
|
g.replaceSync(v);
|
|
5
|
-
const
|
|
5
|
+
const C = [
|
|
6
6
|
"1",
|
|
7
7
|
"2",
|
|
8
8
|
"3",
|
|
@@ -15,7 +15,7 @@ const x = [
|
|
|
15
15
|
"10",
|
|
16
16
|
"11",
|
|
17
17
|
"12"
|
|
18
|
-
],
|
|
18
|
+
], x = [
|
|
19
19
|
"",
|
|
20
20
|
"start",
|
|
21
21
|
"end",
|
|
@@ -75,7 +75,7 @@ const x = [
|
|
|
75
75
|
case "grid-cols--mobile":
|
|
76
76
|
case "grid-cols--tablet":
|
|
77
77
|
case "grid-cols--laptop":
|
|
78
|
-
this.updateAttribute(t, i, e,
|
|
78
|
+
this.updateAttribute(t, i, e, C);
|
|
79
79
|
break;
|
|
80
80
|
case "justify-content":
|
|
81
81
|
case "align-content":
|
|
@@ -91,7 +91,7 @@ const x = [
|
|
|
91
91
|
t,
|
|
92
92
|
i,
|
|
93
93
|
e,
|
|
94
|
-
|
|
94
|
+
x
|
|
95
95
|
);
|
|
96
96
|
break;
|
|
97
97
|
case "justify-items":
|
|
@@ -330,6 +330,7 @@ const l = class l extends f {
|
|
|
330
330
|
<slot name="title"></slot>
|
|
331
331
|
<slot name="description"></slot>
|
|
332
332
|
<slot name="content"></slot>
|
|
333
|
+
|
|
333
334
|
</div>
|
|
334
335
|
</px-container>
|
|
335
336
|
</px-grid>
|
|
@@ -361,7 +362,7 @@ const l = class l extends f {
|
|
|
361
362
|
}
|
|
362
363
|
connectedCallback() {
|
|
363
364
|
var t;
|
|
364
|
-
(t = super.connectedCallback) == null || t.call(this), this.
|
|
365
|
+
(t = super.connectedCallback) == null || t.call(this), this.createGridTemplateAreas(), this.createGridding();
|
|
365
366
|
}
|
|
366
367
|
attributeChangedCallback(t, i, e) {
|
|
367
368
|
if (i !== e)
|
|
@@ -433,29 +434,29 @@ const l = class l extends f {
|
|
|
433
434
|
}
|
|
434
435
|
createGridding(t) {
|
|
435
436
|
const i = [
|
|
436
|
-
{ prop: "hasGridding",
|
|
437
|
+
{ prop: "hasGridding", gridProp: "gridCols", attr: "col-span" },
|
|
437
438
|
{
|
|
438
439
|
prop: "hasGriddingMobile",
|
|
439
|
-
|
|
440
|
+
gridProp: "gridColsMobile",
|
|
440
441
|
attr: "col-span--mobile"
|
|
441
442
|
},
|
|
442
443
|
{
|
|
443
444
|
prop: "hasGriddingTablet",
|
|
444
|
-
|
|
445
|
+
gridProp: "gridColsTablet",
|
|
445
446
|
attr: "col-span--tablet"
|
|
446
447
|
},
|
|
447
448
|
{
|
|
448
449
|
prop: "hasGriddingLaptop",
|
|
449
|
-
|
|
450
|
+
gridProp: "gridColsLaptop",
|
|
450
451
|
attr: "col-span--laptop"
|
|
451
452
|
}
|
|
452
453
|
], e = this.shadowRoot.querySelector(
|
|
453
454
|
"px-grid > px-container"
|
|
454
455
|
);
|
|
455
|
-
t !== null ? i.forEach(({ prop: n,
|
|
456
|
-
this[n] && (this.$grid
|
|
457
|
-
}) : i.forEach(({
|
|
458
|
-
this.$grid
|
|
456
|
+
t !== null ? i.forEach(({ prop: n, gridProp: s, attr: p }) => {
|
|
457
|
+
this[n] && (this.$grid[s] = "3", e.setAttribute(p, "2"));
|
|
458
|
+
}) : i.forEach(({ gridProp: n, attr: s }) => {
|
|
459
|
+
this.$grid[n] = "1", e.removeAttribute(s);
|
|
459
460
|
});
|
|
460
461
|
}
|
|
461
462
|
get $grid() {
|