@proximus/lavender-price 1.4.6-beta.2 → 1.4.6
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 +7 -9
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PxElement as c, log as l } from "@proximus/lavender-common";
|
|
2
|
-
const d = ":host{font-size:var(--px-font-size-base)}.price{--price-s: var(--px-price-size-unit-s-mobile);--price-m: var(--px-price-size-unit-m-mobile);--price-l: var(--px-price-size-unit-l-mobile);font-family:var(--px-font-family);white-space:nowrap;font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default);font-size:var(--price-s);line-height:var(--px-line-height-ratio-l)}@media only screen and (min-width: 48em){.price{--price-s: var(--px-price-size-unit-s-tablet);--price-m: var(--px-price-size-unit-m-tablet);--price-l: var(--px-price-size-unit-l-tablet)}}@media only screen and (min-width: 64.0625em){.price{--price-s: var(--px-price-size-unit-s-laptop);--price-m: var(--px-price-size-unit-m-laptop);--price-l: var(--px-price-size-unit-l-laptop)}}.promo,.free{color:var(--px-color-text-purpose-promo-default)}.neutral{color:var(--px-color-text-neutral-default)}.exceeding{color:var(--px-color-text-purpose-error-default)}.disabled{color:var(--px-color-text-state-disabled-default)}:host([inverted]) .price{color:var(--px-color-text-brand-inverted)}:host([inverted]) .promo,:host([inverted]) .free{color:var(--px-color-text-purpose-promo-inverted)}:host([inverted]) .neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .exceeding{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .disabled{color:var(--px-color-text-state-disabled-inverted)}.price:not(.promo):not(.free) ::slotted(s){display:none}.euro{font-size:var(--px-price-ratio-l)}.decimals{font-size:var(--px-price-ratio-s)}.m{font-size:var(--price-m)}.l{font-size:var(--price-l)}",
|
|
3
|
-
|
|
2
|
+
const d = ":host{font-size:var(--px-font-size-base)}.price{--price-s: var(--px-price-size-unit-s-mobile);--price-m: var(--px-price-size-unit-m-mobile);--price-l: var(--px-price-size-unit-l-mobile);font-family:var(--px-font-family);white-space:nowrap;font-weight:var(--px-font-weight-title);color:var(--px-color-text-brand-default);font-size:var(--price-s);line-height:var(--px-line-height-ratio-l)}@media only screen and (min-width: 48em){.price{--price-s: var(--px-price-size-unit-s-tablet);--price-m: var(--px-price-size-unit-m-tablet);--price-l: var(--px-price-size-unit-l-tablet)}}@media only screen and (min-width: 64.0625em){.price{--price-s: var(--px-price-size-unit-s-laptop);--price-m: var(--px-price-size-unit-m-laptop);--price-l: var(--px-price-size-unit-l-laptop)}}.promo,.free{color:var(--px-color-text-purpose-promo-default)}.neutral{color:var(--px-color-text-neutral-default)}.exceeding{color:var(--px-color-text-purpose-error-default)}.disabled{color:var(--px-color-text-state-disabled-default)}:host([inverted]) .price{color:var(--px-color-text-brand-inverted)}:host([inverted]) .promo,:host([inverted]) .free{color:var(--px-color-text-purpose-promo-inverted)}:host([inverted]) .neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .exceeding{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .disabled{color:var(--px-color-text-state-disabled-inverted)}.price:not(.promo):not(.free) ::slotted(s){display:none}.euro{font-size:var(--px-price-ratio-l)}.decimals{font-size:var(--px-price-ratio-s)}.m{font-size:var(--price-m)}.l{font-size:var(--price-l)}", a = new CSSStyleSheet();
|
|
3
|
+
a.replaceSync(d);
|
|
4
4
|
const u = [
|
|
5
5
|
"default",
|
|
6
6
|
"promo",
|
|
@@ -8,9 +8,9 @@ const u = [
|
|
|
8
8
|
"neutral",
|
|
9
9
|
"exceeding",
|
|
10
10
|
"disabled"
|
|
11
|
-
], v = ["", "s", "m", "l"],
|
|
11
|
+
], v = ["", "s", "m", "l"], o = class o extends c {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(
|
|
13
|
+
super(a), this.template = () => '<span class="price"></span>', this.shadowRoot.innerHTML = this.template();
|
|
14
14
|
}
|
|
15
15
|
static get observedAttributes() {
|
|
16
16
|
return [...super.observedAttributes, "variant", "size", "inverted"];
|
|
@@ -20,9 +20,7 @@ const u = [
|
|
|
20
20
|
this.buildPrice();
|
|
21
21
|
}), this.observer.observe(this, {
|
|
22
22
|
childList: !0,
|
|
23
|
-
subtree: !0
|
|
24
|
-
// By observing characterData, we ensure that any changes to the text content of the price element will trigger a rebuild of the price display, allowing it to update correctly in response to dynamic data changes.
|
|
25
|
-
characterData: !0
|
|
23
|
+
subtree: !0
|
|
26
24
|
});
|
|
27
25
|
}
|
|
28
26
|
attributeChangedCallback(e, t, r) {
|
|
@@ -85,8 +83,8 @@ const u = [
|
|
|
85
83
|
super._updateBooleanAttribute("inverted", e);
|
|
86
84
|
}
|
|
87
85
|
};
|
|
88
|
-
|
|
89
|
-
let s =
|
|
86
|
+
o.nativeName = "span";
|
|
87
|
+
let s = o;
|
|
90
88
|
customElements.get("px-price") || customElements.define("px-price", s);
|
|
91
89
|
export {
|
|
92
90
|
s as Price,
|