@proximus/lavender-status-card 2.0.0-alpha.8 → 2.0.0-alpha.80
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 +18 -11
- package/package.json +2 -2
package/dist/index.es.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { PxElement as n } from "@proximus/lavender-common";
|
|
2
|
-
const
|
|
3
|
-
i.replaceSync(
|
|
4
|
-
const
|
|
1
|
+
import { PxElement as n, log as l } from "@proximus/lavender-common";
|
|
2
|
+
const c = ':host,:host>*{display:block;box-sizing:border-box}px-container{height:100%}.status-card{position:relative}.status-card:before{content:"";position:absolute;display:block;border-left:5px solid var(--px-color-border-brand-default);height:100%;left:0;top:0;border-radius:var(--px-radius-main) 0 0 var(--px-radius-main)}.status-card.success:before{border-color:var(--px-color-border-purpose-success-default)}.status-card.warning:before,.status-card.ongoing:before{border-color:var(--px-color-border-purpose-warning-default)}.status-card.error:before{border-color:var(--px-color-border-purpose-error-default)}::slotted([slot="title"]){display:block;font-size:var(--px-text-size-heading-s-mobile);font-weight:var(--px-font-weight-title);line-height:var(--px-line-height-ratio-l);color:var(--px-color-text-neutral-default)}:host([inverted]) .status-card:before{border-color:var(--px-color-border-brand-inverted)}:host([inverted]) .status-card.success:before{border-color:var(--px-color-border-purpose-success-inverted)}:host([inverted]) .status-card.warning:before,:host([inverted]) .status-card.ongoing:before{border-color:var(--px-color-border-purpose-warning-inverted)}:host([inverted]) .status-card.error:before{border-color:var(--px-color-border-purpose-error-inverted)}:host([inverted]) ::slotted([slot="title"]){color:var(--px-color-text-neutral-inverted)}@media only screen and (min-width: 768px){::slotted([slot="title"]){font-size:var(--px-text-size-heading-s-desktop)}}@media only screen and (min-width: 1025px){::slotted([slot="title"]){font-size:var(--px-text-size-heading-s-desktop)}}', i = new CSSStyleSheet();
|
|
3
|
+
i.replaceSync(c);
|
|
4
|
+
const d = [
|
|
5
5
|
"",
|
|
6
6
|
"info",
|
|
7
7
|
"success",
|
|
8
8
|
"warning",
|
|
9
9
|
"error",
|
|
10
10
|
"ongoing"
|
|
11
|
-
],
|
|
11
|
+
], u = "px.lavender.modal.close", a = class a extends n {
|
|
12
12
|
constructor() {
|
|
13
13
|
super(i), this.template = () => `<div class="status-card">
|
|
14
14
|
<px-container background-color="container-default" padding="s">
|
|
@@ -27,10 +27,15 @@ const c = [
|
|
|
27
27
|
</div>`, this.shadowRoot.innerHTML = this.template();
|
|
28
28
|
}
|
|
29
29
|
static get observedAttributes() {
|
|
30
|
-
return [
|
|
30
|
+
return [
|
|
31
|
+
...super.observedAttributes,
|
|
32
|
+
"state",
|
|
33
|
+
"inverted",
|
|
34
|
+
"status-icon-aria-label"
|
|
35
|
+
];
|
|
31
36
|
}
|
|
32
37
|
connectedCallback() {
|
|
33
|
-
|
|
38
|
+
this.$closeButtonSlot.addEventListener("click", () => {
|
|
34
39
|
this.close();
|
|
35
40
|
});
|
|
36
41
|
}
|
|
@@ -57,8 +62,10 @@ const c = [
|
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
updateState(t) {
|
|
60
|
-
if (!this.checkName(
|
|
61
|
-
|
|
65
|
+
if (!this.checkName(d, t)) {
|
|
66
|
+
l(
|
|
67
|
+
`${t} is not an allowed state value for ${this.tagName.toLowerCase()}`
|
|
68
|
+
);
|
|
62
69
|
return;
|
|
63
70
|
}
|
|
64
71
|
const s = {
|
|
@@ -72,7 +79,7 @@ const c = [
|
|
|
72
79
|
}
|
|
73
80
|
close() {
|
|
74
81
|
this.remove(), this.dispatchEvent(
|
|
75
|
-
new CustomEvent(
|
|
82
|
+
new CustomEvent(u, {
|
|
76
83
|
bubbles: !0,
|
|
77
84
|
composed: !0
|
|
78
85
|
})
|
|
@@ -116,5 +123,5 @@ let o = a;
|
|
|
116
123
|
customElements.get("px-status-card") || customElements.define("px-status-card", o);
|
|
117
124
|
export {
|
|
118
125
|
o as StatusCard,
|
|
119
|
-
|
|
126
|
+
d as statusCardStateValues
|
|
120
127
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proximus/lavender-status-card",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.80",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.es.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"clean": "rm -rf dist",
|
|
14
14
|
"build": "npm run clean && NODE_ENV=development vite build && tsc && npm run transform-package-json && npm run wc-manifest",
|
|
15
15
|
"test": "vitest run --coverage",
|
|
16
|
-
"wc-manifest": "cem analyze --globs \"src/*\" --config
|
|
16
|
+
"wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"access": "public"
|