@proximus/lavender 1.4.4-beta.1 → 1.4.5-alpha.2
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 +91 -29
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -3648,7 +3648,6 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3648
3648
|
<slot name="title"></slot>
|
|
3649
3649
|
<slot name="description"></slot>
|
|
3650
3650
|
<slot name="content"></slot>
|
|
3651
|
-
|
|
3652
3651
|
</div>
|
|
3653
3652
|
</px-container>
|
|
3654
3653
|
</px-grid>
|
|
@@ -3681,6 +3680,11 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3681
3680
|
connectedCallback() {
|
|
3682
3681
|
var _a;
|
|
3683
3682
|
(_a = super.connectedCallback) == null ? void 0 : _a.call(this);
|
|
3683
|
+
if (this.reduced) {
|
|
3684
|
+
this.$container.setAttribute("padding", "m");
|
|
3685
|
+
} else {
|
|
3686
|
+
this.$container.setAttribute("padding", "l");
|
|
3687
|
+
}
|
|
3684
3688
|
this.createGridTemplateAreas();
|
|
3685
3689
|
this.createGridding();
|
|
3686
3690
|
}
|
|
@@ -3768,20 +3772,20 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3768
3772
|
}
|
|
3769
3773
|
createGridding(value) {
|
|
3770
3774
|
const breakpoints = [
|
|
3771
|
-
{ prop: "hasGridding",
|
|
3775
|
+
{ prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
|
|
3772
3776
|
{
|
|
3773
3777
|
prop: "hasGriddingMobile",
|
|
3774
|
-
|
|
3778
|
+
gridAttr: "grid-cols--mobile",
|
|
3775
3779
|
attr: "col-span--mobile"
|
|
3776
3780
|
},
|
|
3777
3781
|
{
|
|
3778
3782
|
prop: "hasGriddingTablet",
|
|
3779
|
-
|
|
3783
|
+
gridAttr: "grid-cols--tablet",
|
|
3780
3784
|
attr: "col-span--tablet"
|
|
3781
3785
|
},
|
|
3782
3786
|
{
|
|
3783
3787
|
prop: "hasGriddingLaptop",
|
|
3784
|
-
|
|
3788
|
+
gridAttr: "grid-cols--laptop",
|
|
3785
3789
|
attr: "col-span--laptop"
|
|
3786
3790
|
}
|
|
3787
3791
|
];
|
|
@@ -3789,16 +3793,16 @@ const _Banner = class _Banner extends VerticallyExtendedElement {
|
|
|
3789
3793
|
"px-grid > px-container"
|
|
3790
3794
|
);
|
|
3791
3795
|
if (value !== null) {
|
|
3792
|
-
breakpoints.forEach(({ prop,
|
|
3796
|
+
breakpoints.forEach(({ prop, gridAttr, attr }) => {
|
|
3793
3797
|
if (this[prop]) {
|
|
3794
|
-
this.$grid
|
|
3795
|
-
spanElement.setAttribute(attr, "2");
|
|
3798
|
+
this.$grid.setAttribute(gridAttr, "3");
|
|
3799
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "2");
|
|
3796
3800
|
}
|
|
3797
3801
|
});
|
|
3798
3802
|
} else {
|
|
3799
|
-
breakpoints.forEach(({
|
|
3800
|
-
this.$grid
|
|
3801
|
-
spanElement.
|
|
3803
|
+
breakpoints.forEach(({ gridAttr, attr }) => {
|
|
3804
|
+
this.$grid.setAttribute(gridAttr, "1");
|
|
3805
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "1");
|
|
3802
3806
|
});
|
|
3803
3807
|
}
|
|
3804
3808
|
}
|
|
@@ -6822,7 +6826,7 @@ class CellSwitch extends WithExtraAttributes {
|
|
|
6822
6826
|
return `
|
|
6823
6827
|
<div class="cell-switch">
|
|
6824
6828
|
<px-cell hoverable>
|
|
6825
|
-
<px-switch slot="action-indicator"
|
|
6829
|
+
<px-switch slot="action-indicator" inert></px-switch>
|
|
6826
6830
|
<slot name="visual" slot="visual"></slot>
|
|
6827
6831
|
<slot name="label" slot="label"></slot>
|
|
6828
6832
|
<slot name="description" slot="description"></slot>
|
|
@@ -7716,7 +7720,7 @@ class CellRadio extends WithExtraAttributes {
|
|
|
7716
7720
|
return `
|
|
7717
7721
|
<div class="cell-radio">
|
|
7718
7722
|
<px-cell hoverable>
|
|
7719
|
-
<px-radio slot="prefix"
|
|
7723
|
+
<px-radio slot="prefix" inert></px-radio>
|
|
7720
7724
|
<slot name="visual" slot="visual"></slot>
|
|
7721
7725
|
<slot name="label" slot="label"></slot>
|
|
7722
7726
|
<slot name="description" slot="description"></slot>
|
|
@@ -8993,20 +8997,20 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
8993
8997
|
}
|
|
8994
8998
|
createGridding(value) {
|
|
8995
8999
|
const breakpoints = [
|
|
8996
|
-
{ prop: "hasGridding",
|
|
9000
|
+
{ prop: "hasGridding", gridAttr: "grid-cols", attr: "col-span" },
|
|
8997
9001
|
{
|
|
8998
9002
|
prop: "hasGriddingMobile",
|
|
8999
|
-
|
|
9003
|
+
gridAttr: "grid-cols--mobile",
|
|
9000
9004
|
attr: "col-span--mobile"
|
|
9001
9005
|
},
|
|
9002
9006
|
{
|
|
9003
9007
|
prop: "hasGriddingTablet",
|
|
9004
|
-
|
|
9008
|
+
gridAttr: "grid-cols--tablet",
|
|
9005
9009
|
attr: "col-span--tablet"
|
|
9006
9010
|
},
|
|
9007
9011
|
{
|
|
9008
9012
|
prop: "hasGriddingLaptop",
|
|
9009
|
-
|
|
9013
|
+
gridAttr: "grid-cols--laptop",
|
|
9010
9014
|
attr: "col-span--laptop"
|
|
9011
9015
|
}
|
|
9012
9016
|
];
|
|
@@ -9014,16 +9018,16 @@ const _ContentHeader = class _ContentHeader extends PxElement {
|
|
|
9014
9018
|
"px-grid > px-container"
|
|
9015
9019
|
);
|
|
9016
9020
|
if (value !== null) {
|
|
9017
|
-
breakpoints.forEach(({ prop,
|
|
9021
|
+
breakpoints.forEach(({ prop, gridAttr, attr }) => {
|
|
9018
9022
|
if (this[prop]) {
|
|
9019
|
-
this.$grid
|
|
9020
|
-
spanElement.setAttribute(attr, "2");
|
|
9023
|
+
this.$grid.setAttribute(gridAttr, "3");
|
|
9024
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "2");
|
|
9021
9025
|
}
|
|
9022
9026
|
});
|
|
9023
9027
|
} else {
|
|
9024
|
-
breakpoints.forEach(({
|
|
9025
|
-
this.$grid
|
|
9026
|
-
spanElement.
|
|
9028
|
+
breakpoints.forEach(({ gridAttr, attr }) => {
|
|
9029
|
+
this.$grid.setAttribute(gridAttr, "1");
|
|
9030
|
+
spanElement == null ? void 0 : spanElement.setAttribute(attr, "1");
|
|
9027
9031
|
});
|
|
9028
9032
|
}
|
|
9029
9033
|
}
|
|
@@ -12501,19 +12505,19 @@ class MddSectionItem extends HTMLElement {
|
|
|
12501
12505
|
if (!customElements.get("px-mdd-section-item")) {
|
|
12502
12506
|
customElements.define("px-mdd-section-item", MddSectionItem);
|
|
12503
12507
|
}
|
|
12504
|
-
const styles$j =
|
|
12508
|
+
const styles$j = '*{box-sizing:border-box}#container{display:flex;flex-wrap:nowrap;font-family:var(--px-font-family);font-size:var(--px-font-size-base);color:var(--px-color-text-neutral-default);width:inherit;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);overflow:hidden}#container.info{border-left:5px var(--px-color-icon-brand-default) solid}#container.success{border-left:5px var(--px-color-icon-purpose-success-default) solid}#container.warning{border-left:5px var(--px-color-icon-purpose-warning-default) solid}#container.error{border-left:5px var(--px-color-icon-purpose-error-default) solid}#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-mobile)))}#content-container{padding:var(--px-padding-m-mobile);flex-grow:1}#media-container{display:none}::slotted(px-button-icon[slot="close-button"]){position:absolute;top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;transform:scale(.95);animation:modalIn .3s ease-out forwards}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{max-height:12.5em;overflow:auto}@media only screen and (min-width: 48em){#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-tablet)))}::slotted(px-button-icon[slot="close-button"]){position:absolute;top:var(--px-padding-m-tablet);right:var(--px-padding-m-tablet)}#content{max-height:25em}}@media only screen and (min-width: 64.0625em){#container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-laptop)))}::slotted(px-button-icon[slot="close-button"]){top:var(--px-padding-m-laptop);right:var(--px-padding-m-laptop)}:host([media-src]) #container.has-close-button #icon-container{max-width:100%}:host([media-src]) #media-container{display:block;background-size:cover;background-position:center center;background-repeat:no-repeat;flex-basis:25em;flex-shrink:0}}@media screen and (min-width: 1118px){#container{width:1080px}}@media only screen and (min-width: 90.0625em){:host(:not([media-src])) #container.has-close-button #icon-container{max-width:calc(100% - (var(--px-size-m) + var(--px-spacing-s-desktop)))}::slotted(px-button-icon[slot="close-button"]){position:absolute;top:var(--px-padding-m-desktop);right:var(--px-padding-m-desktop)}}@keyframes modalIn{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}';
|
|
12505
12509
|
const styleSheet$j = new CSSStyleSheet();
|
|
12506
12510
|
styleSheet$j.replaceSync(styles$j);
|
|
12507
12511
|
const CLOSE_EVENT$1 = "px.lavender.modal.close";
|
|
12508
12512
|
class Modal extends HTMLElement {
|
|
12509
12513
|
constructor() {
|
|
12510
12514
|
super();
|
|
12511
|
-
this.template =
|
|
12515
|
+
this.template = `<dialog>
|
|
12512
12516
|
<div id="container">
|
|
12513
12517
|
<div id="content-container">
|
|
12514
12518
|
<px-vstack gap="default" >
|
|
12515
12519
|
<px-hstack id="icon-container" gap="s" align-items="flex-start">
|
|
12516
|
-
<px-vstack gap="
|
|
12520
|
+
<px-vstack gap="xs">
|
|
12517
12521
|
<px-h1 variant="title-l">
|
|
12518
12522
|
<slot name="title"></slot>
|
|
12519
12523
|
</px-h1>
|
|
@@ -12548,6 +12552,9 @@ class Modal extends HTMLElement {
|
|
|
12548
12552
|
this.shadowRoot.adoptedStyleSheets = [styleSheet$j];
|
|
12549
12553
|
}
|
|
12550
12554
|
connectedCallback() {
|
|
12555
|
+
var _a, _b;
|
|
12556
|
+
this.toggleDescriptionVisibility = this.toggleDescriptionVisibility.bind(this);
|
|
12557
|
+
this.toggleCloseButtonSafeArea = this.toggleCloseButtonSafeArea.bind(this);
|
|
12551
12558
|
if (this.hasAttribute("open")) {
|
|
12552
12559
|
this.show();
|
|
12553
12560
|
}
|
|
@@ -12565,6 +12572,16 @@ class Modal extends HTMLElement {
|
|
|
12565
12572
|
if (this.hasAttribute("media-src")) {
|
|
12566
12573
|
this.updateMediaSrc(this.getAttribute("media-src"));
|
|
12567
12574
|
}
|
|
12575
|
+
this.toggleDescriptionVisibility();
|
|
12576
|
+
(_a = this.$slotDescription) == null ? void 0 : _a.addEventListener(
|
|
12577
|
+
"slotchange",
|
|
12578
|
+
this.toggleDescriptionVisibility
|
|
12579
|
+
);
|
|
12580
|
+
this.toggleCloseButtonSafeArea();
|
|
12581
|
+
(_b = this.$slotCloseButton) == null ? void 0 : _b.addEventListener(
|
|
12582
|
+
"slotchange",
|
|
12583
|
+
this.toggleCloseButtonSafeArea
|
|
12584
|
+
);
|
|
12568
12585
|
}
|
|
12569
12586
|
static get observedAttributes() {
|
|
12570
12587
|
return ["open", "status", "media-src", "openedby"];
|
|
@@ -12585,6 +12602,13 @@ class Modal extends HTMLElement {
|
|
|
12585
12602
|
break;
|
|
12586
12603
|
}
|
|
12587
12604
|
}
|
|
12605
|
+
disconnectedCallback() {
|
|
12606
|
+
var _a;
|
|
12607
|
+
(_a = this.$slotDescription) == null ? void 0 : _a.removeEventListener(
|
|
12608
|
+
"slotchange",
|
|
12609
|
+
this.toggleDescriptionVisibility
|
|
12610
|
+
);
|
|
12611
|
+
}
|
|
12588
12612
|
handleOpenChange() {
|
|
12589
12613
|
if (this.hasAttribute("open")) {
|
|
12590
12614
|
this.show();
|
|
@@ -12653,6 +12677,44 @@ class Modal extends HTMLElement {
|
|
|
12653
12677
|
(_c = this.$opener) == null ? void 0 : _c.addEventListener("click", () => this.show());
|
|
12654
12678
|
}
|
|
12655
12679
|
}
|
|
12680
|
+
toggleDescriptionVisibility() {
|
|
12681
|
+
if (!this.$slottedDescription) {
|
|
12682
|
+
this.$descriptionContainer.style.display = "none";
|
|
12683
|
+
} else {
|
|
12684
|
+
this.$descriptionContainer.style.display = "block";
|
|
12685
|
+
}
|
|
12686
|
+
}
|
|
12687
|
+
toggleCloseButtonSafeArea() {
|
|
12688
|
+
var _a, _b, _c;
|
|
12689
|
+
if (this.$slottedCloseButton) {
|
|
12690
|
+
(_a = this.$container) == null ? void 0 : _a.classList.add("has-close-button");
|
|
12691
|
+
} else {
|
|
12692
|
+
if ((_b = this.$container) == null ? void 0 : _b.classList.contains("has-close-button")) {
|
|
12693
|
+
(_c = this.$container) == null ? void 0 : _c.classList.remove("has-close-button");
|
|
12694
|
+
}
|
|
12695
|
+
}
|
|
12696
|
+
}
|
|
12697
|
+
get $slottedCloseButton() {
|
|
12698
|
+
return this.querySelector('[slot="close-button"]');
|
|
12699
|
+
}
|
|
12700
|
+
get $slotCloseButton() {
|
|
12701
|
+
return this.shadowRoot.querySelector(
|
|
12702
|
+
'slot[name="close-button"]'
|
|
12703
|
+
);
|
|
12704
|
+
}
|
|
12705
|
+
get $slottedDescription() {
|
|
12706
|
+
return this.querySelector('[slot="description"]');
|
|
12707
|
+
}
|
|
12708
|
+
get $slotDescription() {
|
|
12709
|
+
return this.shadowRoot.querySelector(
|
|
12710
|
+
'slot[name="description"]'
|
|
12711
|
+
);
|
|
12712
|
+
}
|
|
12713
|
+
get $descriptionContainer() {
|
|
12714
|
+
return this.shadowRoot.querySelector(
|
|
12715
|
+
'px-p[font-weight="title"]'
|
|
12716
|
+
);
|
|
12717
|
+
}
|
|
12656
12718
|
get $opener() {
|
|
12657
12719
|
return document.querySelector(
|
|
12658
12720
|
`px-button#${this.getAttribute("openedby")}`
|
|
@@ -15483,7 +15545,7 @@ class TileCheckbox extends WithExtraAttributes {
|
|
|
15483
15545
|
<div class="tile-checkbox">
|
|
15484
15546
|
<px-tile hoverable>
|
|
15485
15547
|
<slot name="prefix" slot="prefix"></slot>
|
|
15486
|
-
<px-checkbox slot="suffix"
|
|
15548
|
+
<px-checkbox slot="suffix" inert></px-checkbox>
|
|
15487
15549
|
<slot name="label" slot="label"></slot>
|
|
15488
15550
|
<slot name="description" slot="description"></slot>
|
|
15489
15551
|
</px-tile>
|
|
@@ -15763,7 +15825,7 @@ class TileRadio extends WithExtraAttributes {
|
|
|
15763
15825
|
<div class="tile-radio">
|
|
15764
15826
|
<px-tile hoverable>
|
|
15765
15827
|
<slot name="prefix" slot="prefix"></slot>
|
|
15766
|
-
<px-radio slot="suffix"
|
|
15828
|
+
<px-radio slot="suffix" inert></px-radio>
|
|
15767
15829
|
<slot name="label" slot="label"></slot>
|
|
15768
15830
|
<slot name="description" slot="description"></slot>
|
|
15769
15831
|
</px-tile>
|
|
@@ -16205,7 +16267,7 @@ class TileSwitch extends WithExtraAttributes {
|
|
|
16205
16267
|
<div class="tile-switch">
|
|
16206
16268
|
<px-tile hoverable>
|
|
16207
16269
|
<slot name="prefix" slot="prefix"></slot>
|
|
16208
|
-
<px-switch slot="suffix"
|
|
16270
|
+
<px-switch slot="suffix" inert></px-switch>
|
|
16209
16271
|
<slot name="label" slot="label"></slot>
|
|
16210
16272
|
<slot name="description" slot="description"></slot>
|
|
16211
16273
|
</px-tile>
|