@proximus/lavender-patch 1.0.0-alpha.25 → 1.0.0-alpha.27
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.js +13 -13
- package/package.json +9 -3
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const o = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s-mobile);height:1.
|
|
2
|
-
|
|
1
|
+
const o = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s-mobile);height:1.625em;border:var(--px-size-border-m) solid transparent;border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small);font-family:var(--px-font-family);font-weight:700;font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-font-line-height-m);text-align:center;background-color:var(--px-color-background-purpose-promo-default);color:var(--px-color-text-neutral-inverted)}.patch,.patch *{box-sizing:border-box}.bottom-right{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small) var(--px-radius-patch-big)}.bottom-left{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small)}.info{background-color:var(--px-color-background-purpose-info-default);color:var(--px-color-text-neutral-default)}.black-friday{background-color:var(--px-color-background-surface-dark);color:var(--px-color-text-neutral-inverted)}.eco{background-color:var(--px-color-background-purpose-success-default);color:var(--px-color-text-neutral-inverted)}.greyed{background-color:var(--px-color-background-state-disabled-default);color:var(--px-color-text-state-disabled-default)}:host([inverted]) .patch{background-color:var(--px-color-background-purpose-promo-inverted);color:var(--px-color-text-neutral-inverted)}:host([inverted]) .info{background-color:var(--px-color-background-purpose-info-inverted);color:var(--px-color-text-neutral-default)}:host([inverted]) .black-friday{background-color:var(--px-color-background-container-light-default);color:var(--px-color-text-neutral-default)}:host([inverted]) .eco{background-color:var(--px-color-background-purpose-success-inverted);color:var(--px-color-text-neutral-default)}:host([inverted]) .greyed{background-color:var(--px-color-background-state-disabled-inverted);color:var(--px-color-text-state-disabled-inverted)}@media only screen and (min-width: 768px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1025px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1441px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}", a = new CSSStyleSheet();
|
|
2
|
+
a.replaceSync(o);
|
|
3
3
|
const i = [
|
|
4
4
|
"",
|
|
5
5
|
"default",
|
|
@@ -7,8 +7,8 @@ const i = [
|
|
|
7
7
|
"black-friday",
|
|
8
8
|
"eco",
|
|
9
9
|
"greyed"
|
|
10
|
-
],
|
|
11
|
-
class
|
|
10
|
+
], s = ["", "default", "bottom-right", "bottom-left"];
|
|
11
|
+
class d extends HTMLElement {
|
|
12
12
|
template() {
|
|
13
13
|
return `
|
|
14
14
|
<div class="patch">
|
|
@@ -17,19 +17,19 @@ class s extends HTMLElement {
|
|
|
17
17
|
`;
|
|
18
18
|
}
|
|
19
19
|
constructor() {
|
|
20
|
-
super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [
|
|
20
|
+
super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [a];
|
|
21
21
|
}
|
|
22
22
|
static get observedAttributes() {
|
|
23
23
|
return ["variant", "shape", "inverted"];
|
|
24
24
|
}
|
|
25
|
-
attributeChangedCallback(t, e,
|
|
26
|
-
if (e !==
|
|
25
|
+
attributeChangedCallback(t, e, r) {
|
|
26
|
+
if (e !== r)
|
|
27
27
|
switch (t) {
|
|
28
28
|
case "variant":
|
|
29
|
-
this.updateVariant(e,
|
|
29
|
+
this.updateVariant(e, r);
|
|
30
30
|
break;
|
|
31
31
|
case "shape":
|
|
32
|
-
this.updateShape(e,
|
|
32
|
+
this.updateShape(e, r);
|
|
33
33
|
break;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -43,7 +43,7 @@ class s extends HTMLElement {
|
|
|
43
43
|
this._toggleClass(t, e), this.checkName(i, e) || console.error('Bad "variant" value for patch');
|
|
44
44
|
}
|
|
45
45
|
updateShape(t, e) {
|
|
46
|
-
this._toggleClass(t, e), this.checkName(
|
|
46
|
+
this._toggleClass(t, e), this.checkName(s, e) || console.error('Bad "shape" value for patch');
|
|
47
47
|
}
|
|
48
48
|
get $el() {
|
|
49
49
|
return this.shadowRoot.querySelector(".patch");
|
|
@@ -67,9 +67,9 @@ class s extends HTMLElement {
|
|
|
67
67
|
this.setAttribute("inverted", t);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
customElements.get("px-patch") || customElements.define("px-patch",
|
|
70
|
+
customElements.get("px-patch") || customElements.define("px-patch", d);
|
|
71
71
|
export {
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
d as Patch,
|
|
73
|
+
s as patchShapeValues,
|
|
74
74
|
i as patchVariantValues
|
|
75
75
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-patch",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.27",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"publishConfig": {
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "7683b6952d1da07fe58b0f4ddef292e3954ab85d",
|
|
28
28
|
"lerna": {
|
|
29
29
|
"command": {
|
|
30
30
|
"publish": {
|
|
@@ -32,7 +32,13 @@
|
|
|
32
32
|
"CHANGELOG.md",
|
|
33
33
|
"package.json",
|
|
34
34
|
"dist/*.js",
|
|
35
|
-
"dist
|
|
35
|
+
"dist/*.cjs",
|
|
36
|
+
"dist/css/**/*.css",
|
|
37
|
+
"dist/js/**/*.js",
|
|
38
|
+
"dist/*.svg",
|
|
39
|
+
"dist/*.ttf",
|
|
40
|
+
"dist/glyphmap.json",
|
|
41
|
+
"dist/*.d.ts"
|
|
36
42
|
]
|
|
37
43
|
}
|
|
38
44
|
}
|