@proximus/lavender-status-card 2.0.0-alpha.16 → 2.0.0-alpha.160

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.
Files changed (2) hide show
  1. package/dist/index.es.js +16 -11
  2. package/package.json +2 -2
package/dist/index.es.js CHANGED
@@ -1,16 +1,16 @@
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 = [
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
- ], u = "px.lavender.modal.close", a = class a extends n {
11
+ ], u = "px.lavender.modal.close", a = class a extends l {
12
12
  constructor() {
13
- super(i), this.template = () => `<div class="status-card">
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 d = [
27
27
  </div>`, this.shadowRoot.innerHTML = this.template();
28
28
  }
29
29
  static get observedAttributes() {
30
- return ["state", "inverted", "status-icon-aria-label"];
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,9 +62,9 @@ const d = [
57
62
  }
58
63
  }
59
64
  updateState(t) {
60
- if (!this.checkName(d, t)) {
61
- l(
62
- `${t} is not an allowed state value for ${this.tagName.toLowerCase()}`
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('", "')}".`
63
68
  );
64
69
  return;
65
70
  }
@@ -118,5 +123,5 @@ let o = a;
118
123
  customElements.get("px-status-card") || customElements.define("px-status-card", o);
119
124
  export {
120
125
  o as StatusCard,
121
- d as statusCardStateValues
126
+ i as statusCardStateValues
122
127
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-status-card",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.160",
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 ../custom-elements-manifest.config.js --outdir dist"
16
+ "wc-manifest": "cem analyze --globs \"src/*\" --config ../../custom-elements-manifest.config.js --outdir dist"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"