@proximus/lavender 1.4.13-beta.1 → 1.4.13-beta.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 +42 -3
- package/dist/lavender.umd.js +1 -1
- package/package.json +1 -1
package/dist/lavender.es.js
CHANGED
|
@@ -13918,7 +13918,7 @@ class MddSection extends HTMLElement {
|
|
|
13918
13918
|
if (!customElements.get("px-mdd-section")) {
|
|
13919
13919
|
customElements.define("px-mdd-section", MddSection);
|
|
13920
13920
|
}
|
|
13921
|
-
const styles$o = '.mdd-section-item-action-container{display:inline-flex;align-items:center}a{text-decoration:none;color:inherit}a ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-mobile)}a:hover{text-decoration:underline;color:var(--px-color-text-state-hover-default)}button{background:none;border:none;padding:0;margin:0;cursor:pointer;font:inherit;color:inherit;width:100%;text-align:left;font-weight:var(--px-font-weight-title)}a,button{display:block;font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}@media screen and (max-width: 47.9375rem){a,button{padding:var(--px-spacing-xs-mobile) 0}}@media screen and (min-width: 48rem) and (max-width: 64rem){a,button{padding:var(--px-spacing-xs-tablet) 0}}@media screen and (min-width: 48rem){a,button{font-size:var(--px-text-size-label-m-tablet)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media screen and (min-width: 64.0625rem){a{display:inline-block}a ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-laptop)}a,button{font-size:var(--px-text-size-label-m-laptop)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media screen and (min-width: 90.0625rem){a ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-desktop)}a,button{font-size:var(--px-text-size-label-m-desktop)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}';
|
|
13921
|
+
const styles$o = '.mdd-section-item-action-container{display:inline-flex;align-items:center}a{text-decoration:none;color:inherit}a ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-mobile)}a:hover{text-decoration:underline;color:var(--px-color-text-state-hover-default)}button{background:none;border:none;padding:0;margin:0;cursor:pointer;font:inherit;color:inherit;width:100%;text-align:left;font-weight:var(--px-font-weight-title)}a,button{display:block;font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-mobile);outline:var(--px-focus-outline-mobile) solid var(--px-color-border-focus-outline-default)}@media screen and (max-width: 47.9375rem){a,button{padding:var(--px-spacing-xs-mobile) 0}}@media screen and (min-width: 48rem) and (max-width: 64rem){a,button{padding:var(--px-spacing-xs-tablet) 0}}@media screen and (min-width: 48rem){a,button{font-size:var(--px-text-size-label-m-tablet)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-tablet);outline-width:var(--px-focus-outline-tablet)}}@media screen and (min-width: 64.0625rem){a{display:inline-block}a ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-laptop)}a,button{font-size:var(--px-text-size-label-m-laptop)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-laptop);outline-width:var(--px-focus-outline-laptop)}}@media screen and (min-width: 90.0625rem){a ::slotted([slot="after"]){margin-left:var(--px-spacing-2xs-desktop)}a,button{font-size:var(--px-text-size-label-m-desktop)}a:focus-visible,button:focus-visible{outline-offset:var(--px-focus-offset-desktop);outline-width:var(--px-focus-outline-desktop)}}';
|
|
13922
13922
|
const stylesheet$1 = new CSSStyleSheet();
|
|
13923
13923
|
stylesheet$1.replaceSync(styles$o);
|
|
13924
13924
|
class MddSectionItem extends HTMLElement {
|
|
@@ -15520,12 +15520,17 @@ const statusCardStateValues = [
|
|
|
15520
15520
|
"error",
|
|
15521
15521
|
"ongoing"
|
|
15522
15522
|
];
|
|
15523
|
+
const statusCardBackgroundColorValues = [
|
|
15524
|
+
"",
|
|
15525
|
+
"container-light",
|
|
15526
|
+
"container-default"
|
|
15527
|
+
];
|
|
15523
15528
|
const CLOSE_EVENT = "px.lavender.modal.close";
|
|
15524
15529
|
const _StatusCard = class _StatusCard extends PxElement {
|
|
15525
15530
|
constructor() {
|
|
15526
15531
|
super(statusCardStyles);
|
|
15527
15532
|
this.template = () => `<div class="status-card">
|
|
15528
|
-
<px-container background-color="container-default"
|
|
15533
|
+
<px-container padding="s" background-color="container-default">
|
|
15529
15534
|
<px-hstack gap="s" align-items="flex-start">
|
|
15530
15535
|
<px-icon name="information_fill" from="lavender" size="l" color="brand"></px-icon>
|
|
15531
15536
|
<px-vstack gap="s" grow="1">
|
|
@@ -15546,7 +15551,8 @@ const _StatusCard = class _StatusCard extends PxElement {
|
|
|
15546
15551
|
...super.observedAttributes,
|
|
15547
15552
|
"state",
|
|
15548
15553
|
"inverted",
|
|
15549
|
-
"status-icon-aria-label"
|
|
15554
|
+
"status-icon-aria-label",
|
|
15555
|
+
"background-color"
|
|
15550
15556
|
];
|
|
15551
15557
|
}
|
|
15552
15558
|
connectedCallback() {
|
|
@@ -15581,12 +15587,34 @@ const _StatusCard = class _StatusCard extends PxElement {
|
|
|
15581
15587
|
this.$statusIcon.removeAttribute("aria-label");
|
|
15582
15588
|
}
|
|
15583
15589
|
break;
|
|
15590
|
+
case "background-color":
|
|
15591
|
+
if (this.backgroundColor) {
|
|
15592
|
+
this.updateBackgroundColor(
|
|
15593
|
+
newValue,
|
|
15594
|
+
statusCardBackgroundColorValues
|
|
15595
|
+
);
|
|
15596
|
+
}
|
|
15597
|
+
break;
|
|
15584
15598
|
default:
|
|
15585
15599
|
super.attributeChangedCallback(attrName, oldValue, newValue);
|
|
15586
15600
|
break;
|
|
15587
15601
|
}
|
|
15588
15602
|
}
|
|
15589
15603
|
}
|
|
15604
|
+
updateBackgroundColor(newValue, allowedValues) {
|
|
15605
|
+
if (!this.checkName(allowedValues, newValue)) {
|
|
15606
|
+
log(
|
|
15607
|
+
`"${newValue}" is not a valid background-color value for ${this.tagName.toLowerCase()}.
|
|
15608
|
+
Allowed values are: "${allowedValues.join('", "')}".`
|
|
15609
|
+
);
|
|
15610
|
+
return;
|
|
15611
|
+
}
|
|
15612
|
+
if (newValue === null || newValue === "") {
|
|
15613
|
+
this.$container.setAttribute("background-color", "container-default");
|
|
15614
|
+
} else {
|
|
15615
|
+
this.$container.setAttribute("background-color", newValue);
|
|
15616
|
+
}
|
|
15617
|
+
}
|
|
15590
15618
|
updateState(state) {
|
|
15591
15619
|
if (!this.checkName(statusCardStateValues, state)) {
|
|
15592
15620
|
log(
|
|
@@ -15654,6 +15682,16 @@ const _StatusCard = class _StatusCard extends PxElement {
|
|
|
15654
15682
|
this.removeAttribute("status-icon-aria-label");
|
|
15655
15683
|
}
|
|
15656
15684
|
}
|
|
15685
|
+
get backgroundColor() {
|
|
15686
|
+
return this.getAttribute("background-color");
|
|
15687
|
+
}
|
|
15688
|
+
set backgroundColor(value) {
|
|
15689
|
+
if (value) {
|
|
15690
|
+
this.setAttribute("background-color", value);
|
|
15691
|
+
} else {
|
|
15692
|
+
this.removeAttribute("background-color");
|
|
15693
|
+
}
|
|
15694
|
+
}
|
|
15657
15695
|
};
|
|
15658
15696
|
_StatusCard.nativeName = "div";
|
|
15659
15697
|
let StatusCard = _StatusCard;
|
|
@@ -18753,6 +18791,7 @@ export {
|
|
|
18753
18791
|
skeletonsVariantValues,
|
|
18754
18792
|
sortingValues,
|
|
18755
18793
|
stateValues,
|
|
18794
|
+
statusCardBackgroundColorValues,
|
|
18756
18795
|
statusCardStateValues,
|
|
18757
18796
|
statusStateValues,
|
|
18758
18797
|
statusValues,
|