@proximus/lavender-status-card 1.4.19-beta.2 → 1.4.20-alpha.10

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.
@@ -7,6 +7,7 @@ export declare const statusCardBackgroundColorValues: string[];
7
7
  export declare class StatusCard extends PxElement<HTMLDivElement> {
8
8
  protected static readonly template: HTMLTemplateElement;
9
9
  static nativeName: string;
10
+ static nativeAttributes: {};
10
11
  constructor();
11
12
  static get observedAttributes(): string[];
12
13
  connectedCallback(): void;
@@ -43,6 +43,15 @@
43
43
  "static": true,
44
44
  "default": "'div'"
45
45
  },
46
+ {
47
+ "kind": "field",
48
+ "name": "nativeAttributes",
49
+ "type": {
50
+ "text": "object"
51
+ },
52
+ "static": true,
53
+ "default": "{}"
54
+ },
46
55
  {
47
56
  "kind": "method",
48
57
  "name": "updateBackgroundColor",
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { PxElement as e, createTemplate as t, log as n, renderTemplate as r } from "@proximus/lavender-common";
2
- // src/statuscard.css?inline
2
+ //#region src/statuscard.css?inline
3
3
  var i = ":host,:host>*{box-sizing:border-box;display:block}px-container{height:100%}.status-card{position:relative}.status-card:before{content:\"\";border-left:5px solid var(--px-color-border-brand-default);border-radius:var(--px-radius-main) 0 0 var(--px-radius-main);height:100%;display:block;position:absolute;top:0;left:0}.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]){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);display:block}: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 (width<=47.938rem){.status-card-content{margin-top:3px}}@media screen and (width>=48rem){::slotted([slot=title]){font-size:var(--px-text-size-heading-s-tablet)}}@media screen and (width>=64.0625rem){::slotted([slot=title]){font-size:var(--px-text-size-heading-s-laptop)}}", a = new CSSStyleSheet();
4
4
  a.replaceSync(i);
5
5
  var o = [
@@ -20,6 +20,9 @@ var o = [
20
20
  static {
21
21
  this.nativeName = "div";
22
22
  }
23
+ static {
24
+ this.nativeAttributes = {};
25
+ }
23
26
  constructor() {
24
27
  super(a), r(this.shadowRoot, i.template);
25
28
  }
@@ -56,8 +59,12 @@ var o = [
56
59
  }
57
60
  }
58
61
  updateBackgroundColor(e, t) {
59
- this.checkName(t, e) ? e === null || e === "" ? this.$container.setAttribute("background-color", "container-default") : this.$container.setAttribute("background-color", e) : n(`"${e}" is not a valid background-color value for ${this.tagName.toLowerCase()}.
62
+ if (!this.checkName(t, e)) {
63
+ n(`"${e}" is not a valid background-color value for ${this.tagName.toLowerCase()}.
60
64
  Allowed values are: "${t.join("\", \"")}".`);
65
+ return;
66
+ }
67
+ e === null || e === "" ? this.$container.setAttribute("background-color", "container-default") : this.$container.setAttribute("background-color", e);
61
68
  }
62
69
  updateState(e) {
63
70
  if (!this.checkName(o, e)) {
@@ -132,4 +139,5 @@ var o = [
132
139
  }
133
140
  };
134
141
  customElements.get("px-status-card") || customElements.define("px-status-card", l);
142
+ //#endregion
135
143
  export { l as StatusCard, s as statusCardBackgroundColorValues, o as statusCardStateValues };
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@proximus/lavender-status-card",
4
- "version": "1.4.19-beta.2",
4
+ "version": "1.4.20-alpha.10",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
8
8
  "elements": [
9
9
  {
10
10
  "name": "px-status-card",
11
- "description": "\n---\n\n\n### **Events:**\n - **CLOSE_EVENT**",
11
+ "description": "\n\n---\n\n\n### **Events:**\n - **CLOSE_EVENT**",
12
12
  "doc-url": "",
13
13
  "attributes": [
14
14
  { "name": "state", "value": { "type": "string" } },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-status-card",
3
- "version": "1.4.19-beta.2",
3
+ "version": "1.4.20-alpha.10",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",