@proximus/lavender-patch 1.0.0-alpha.23 → 1.0.0-alpha.25

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.js +21 -21
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- const o = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s);height:1.625rem;border:var(--px-border-m) solid transparent;border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small);font-family:var(--px-font-family);font-weight:700;font-size:var(--px-text-size-base-mobile);line-height:var(--px-line-height-m);text-align:center;background-color:var(--px-color-bg-promo-default);color:var(--px-color-txt-primary-inverted)}.patch,.patch *{box-sizing:border-box}@media only screen and (min-width: 768px){.patch{font-size:var(--px-text-size-base-tablet)}}@media only screen and (min-width: 1025px){.patch{font-size:var(--px-text-size-base-desktop)}}:host([inverted]) .patch{background-color:var(--px-color-bg-promo-inverted);color:var(--px-color-txt-primary-inverted)}.bottom-right{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small) var(--px-radius-patch-big)}.bottom-left{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small)}.info{background-color:var(--px-color-illu-blue-core);color:var(--px-color-txt-body-default)}:host([inverted]) .info{background-color:var(--px-color-illu-blue-core);color:var(--px-color-txt-body-default)}.black-friday{background-color:var(--px-color-bg-container-rich-default);color:var(--px-color-txt-body-inverted)}:host([inverted]) .black-friday{background-color:var(--px-color-bg-container-rich-inverted);color:var(--px-color-txt-body-default)}.eco{background-color:var(--px-color-bg-success-default);color:var(--px-color-txt-body-inverted)}:host([inverted]) .eco{background-color:var(--px-color-bg-success-inverted);color:var(--px-color-txt-inverted-default)}.greyed{background-color:var(--px-color-bg-action-disabled-default);color:var(--px-color-icon-disabled-default)}:host([inverted]) .greyed{background-color:var(--px-color-bg-action-disabled-inverted);color:var(--px-color-icon-disabled-inverted)}", a = new CSSStyleSheet();
2
- a.replaceSync(o);
1
+ const o = ".patch{display:inline-flex;align-items:center;padding:0 var(--px-padding-s-mobile);height:1.625rem;border:var(--px-border-size-m) solid transparent;border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small);font-family:var(--px-font-family);font-weight:700;font-size:var(--px-text-size-label-m-mobile);line-height:var(--px-line-height-m);text-align:center;background-color:var(--px-background-color-purpose-promo-default);color:var(--px-text-color-action-neutral-inverted)}.patch,.patch *{box-sizing:border-box}.bottom-right{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small) var(--px-radius-patch-big)}.bottom-left{border-radius:var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-big) var(--px-radius-patch-small)}.info{background-color:var(--px-background-color-purpose-info-default);color:var(--px-text-color-action-neutral-default)}.black-friday{background-color:var(--px-background-color-container-neutral-rich-default);color:var(--px-text-color-action-neutral-inverted)}.eco{background-color:var(--px-background-color-purpose-success-default);color:var(--px-text-color-action-neutral-inverted)}.greyed{background-color:var(--px-background-color-action-disabled-default);color:var(--px-text-color-action-disabled-default)}:host([inverted]) .patch{background-color:var(--px-background-color-purpose-promo-inverted);color:var(--px-text-color-action-neutral-inverted)}:host([inverted]) .info{background-color:var(--px-background-color-purpose-info-inverted);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .black-friday{background-color:var(--px-background-color-container-neutral-bare-default);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .eco{background-color:var(--px-background-color-purpose-success-inverted);color:var(--px-text-color-action-neutral-default)}:host([inverted]) .greyed{background-color:var(--px-background-color-action-disabled-inverted);color:var(--px-text-color-action-disabled-inverted)}@media only screen and (min-width: 768px){.patch{padding:0 var(--px-padding-s-tablet);font-size:var(--px-text-size-label-m-tablet)}}@media only screen and (min-width: 1025px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}@media only screen and (min-width: 1441px){.patch{padding:0 var(--px-padding-s-desktop);font-size:var(--px-text-size-label-m-desktop)}}", r = new CSSStyleSheet();
2
+ r.replaceSync(o);
3
3
  const i = [
4
4
  "",
5
5
  "default",
@@ -7,8 +7,8 @@ const i = [
7
7
  "black-friday",
8
8
  "eco",
9
9
  "greyed"
10
- ], s = ["", "default", "bottom-right", "bottom-left"];
11
- class c extends HTMLElement {
10
+ ], c = ["", "default", "bottom-right", "bottom-left"];
11
+ class s extends HTMLElement {
12
12
  template() {
13
13
  return `
14
14
  <div class="patch">
@@ -17,33 +17,33 @@ class c extends HTMLElement {
17
17
  `;
18
18
  }
19
19
  constructor() {
20
- super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [a];
20
+ super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template(), this.shadowRoot.adoptedStyleSheets = [r];
21
21
  }
22
22
  static get observedAttributes() {
23
23
  return ["variant", "shape", "inverted"];
24
24
  }
25
- attributeChangedCallback(t, r, e) {
26
- if (r !== e)
25
+ attributeChangedCallback(t, e, a) {
26
+ if (e !== a)
27
27
  switch (t) {
28
28
  case "variant":
29
- this.updateVariant(r, e);
29
+ this.updateVariant(e, a);
30
30
  break;
31
31
  case "shape":
32
- this.updateShape(r, e);
32
+ this.updateShape(e, a);
33
33
  break;
34
34
  }
35
35
  }
36
- _toggleClass(t, r) {
37
- t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t), r !== null && r !== "" && r !== "default" && this.$el.classList.toggle(r);
36
+ _toggleClass(t, e) {
37
+ t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(t), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(e);
38
38
  }
39
- checkName(t, r) {
40
- return t.includes(r);
39
+ checkName(t, e) {
40
+ return t.includes(e);
41
41
  }
42
- updateVariant(t, r) {
43
- this._toggleClass(t, r), this.checkName(i, r) || console.error('Bad "variant" value for patch');
42
+ updateVariant(t, e) {
43
+ this._toggleClass(t, e), this.checkName(i, e) || console.error('Bad "variant" value for patch');
44
44
  }
45
- updateShape(t, r) {
46
- this._toggleClass(t, r), this.checkName(s, r) || console.error('Bad "shape" value for patch');
45
+ updateShape(t, e) {
46
+ this._toggleClass(t, e), this.checkName(c, e) || console.error('Bad "shape" value for patch');
47
47
  }
48
48
  get $el() {
49
49
  return this.shadowRoot.querySelector(".patch");
@@ -67,9 +67,9 @@ class c extends HTMLElement {
67
67
  this.setAttribute("inverted", t);
68
68
  }
69
69
  }
70
- customElements.get("px-patch") || customElements.define("px-patch", c);
70
+ customElements.get("px-patch") || customElements.define("px-patch", s);
71
71
  export {
72
- c as Patch,
73
- s as shapeValues,
74
- i as variantValues
72
+ s as Patch,
73
+ c as patchShapeValues,
74
+ i as patchVariantValues
75
75
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-patch",
3
- "version": "1.0.0-alpha.23",
3
+ "version": "1.0.0-alpha.25",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "exports": {
@@ -24,7 +24,7 @@
24
24
  "publishConfig": {
25
25
  "access": "public"
26
26
  },
27
- "gitHead": "0820404474bf245bd128ec808c3ba120cd94da21",
27
+ "gitHead": "671fab7ee21d1c0ec6498b45b0bb2fd47e6e6c84",
28
28
  "lerna": {
29
29
  "command": {
30
30
  "publish": {