@proximus/lavender-status-card 2.0.0-alpha.6 → 2.0.0-alpha.60

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 +12 -10
  2. 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 l = ':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(l);
4
- const c = [
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
- ], d = "px.lavender.modal.close", a = class a extends n {
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">
@@ -30,7 +30,7 @@ const c = [
30
30
  return ["state", "inverted", "status-icon-aria-label"];
31
31
  }
32
32
  connectedCallback() {
33
- super.connectedCallback(), this.$closeButtonSlot.addEventListener("click", () => {
33
+ this.$closeButtonSlot.addEventListener("click", () => {
34
34
  this.close();
35
35
  });
36
36
  }
@@ -57,8 +57,10 @@ const c = [
57
57
  }
58
58
  }
59
59
  updateState(t) {
60
- if (!this.checkName(c, t)) {
61
- console.error(`${t} is not a valid state value`);
60
+ if (!this.checkName(d, t)) {
61
+ l(
62
+ `${t} is not an allowed state value for ${this.tagName.toLowerCase()}`
63
+ );
62
64
  return;
63
65
  }
64
66
  const s = {
@@ -72,7 +74,7 @@ const c = [
72
74
  }
73
75
  close() {
74
76
  this.remove(), this.dispatchEvent(
75
- new CustomEvent(d, {
77
+ new CustomEvent(u, {
76
78
  bubbles: !0,
77
79
  composed: !0
78
80
  })
@@ -116,5 +118,5 @@ let o = a;
116
118
  customElements.get("px-status-card") || customElements.define("px-status-card", o);
117
119
  export {
118
120
  o as StatusCard,
119
- c as statusCardStateValues
121
+ d as statusCardStateValues
120
122
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-status-card",
3
- "version": "2.0.0-alpha.6",
3
+ "version": "2.0.0-alpha.60",
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"