@proximus/lavender-status-card 2.0.0-alpha.13 → 2.0.0-alpha.130
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,16 +1,16 @@
|
|
|
1
|
-
import { PxElement as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
const
|
|
1
|
+
import { PxElement as l, log as c } from "@proximus/lavender-common";
|
|
2
|
+
const d = ':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 screen and (min-width: 48rem){::slotted([slot="title"]){font-size:var(--px-text-size-heading-s-desktop)}}@media screen and (min-width: 64.0625rem){::slotted([slot="title"]){font-size:var(--px-text-size-heading-s-desktop)}}', n = new CSSStyleSheet();
|
|
3
|
+
n.replaceSync(d);
|
|
4
|
+
const i = [
|
|
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 l {
|
|
12
12
|
constructor() {
|
|
13
|
-
super(
|
|
13
|
+
super(n), this.template = () => `<div class="status-card">
|
|
14
14
|
<px-container background-color="container-default" padding="s">
|
|
15
15
|
<px-hstack gap="s" align-items="flex-start">
|
|
16
16
|
<px-icon name="information_fill" from="lavender" size="l" color="brand"></px-icon>
|
|
@@ -27,7 +27,12 @@ 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", () => {
|
|
@@ -57,8 +62,10 @@ const c = [
|
|
|
57
62
|
}
|
|
58
63
|
}
|
|
59
64
|
updateState(t) {
|
|
60
|
-
if (!this.checkName(
|
|
61
|
-
|
|
65
|
+
if (!this.checkName(i, t)) {
|
|
66
|
+
c(
|
|
67
|
+
`"${t}" is not a valid state value for ${this.tagName.toLowerCase()}. Allowed values are: "${i.join('", "')}".`
|
|
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
|
+
i 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.130",
|
|
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"
|