@proximus/lavender-modal 1.0.0-alpha.21 → 1.0.0-alpha.23

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 +56 -59
  2. package/package.json +1 -1
package/dist/index.es.js CHANGED
@@ -25,27 +25,27 @@ const q = ["", "default", "small"], M = ["", "default", "secondary", "naked"], b
25
25
  super.connectedCallback();
26
26
  const t = this.querySelector("px-icon");
27
27
  if (t) {
28
- const e = t.getAttribute("size"), o = t.getAttribute("color");
28
+ const e = t.getAttribute("size"), i = t.getAttribute("color");
29
29
  t.addEventListener("click", () => {
30
30
  this.$el.focus();
31
- }), e || t.setAttribute("size", "s"), this.size === "small" && t.setAttribute("size", "2xs"), o || t.setAttribute("color", "inherit");
31
+ }), e || t.setAttribute("size", "s"), this.size === "small" && t.setAttribute("size", "xs"), i || t.setAttribute("color", "inherit");
32
32
  }
33
33
  L(this, this.$el);
34
34
  }
35
- attributeChangedCallback(t, e, o) {
36
- if (e !== o)
35
+ attributeChangedCallback(t, e, i) {
36
+ if (e !== i)
37
37
  switch (t) {
38
38
  case "loading":
39
39
  this.updateLoading();
40
40
  break;
41
41
  case "size":
42
- this.updateSize(e, o, q);
42
+ this.updateSize(e, i, q);
43
43
  break;
44
44
  case "variant":
45
- this.updateVariant(e, o, M);
45
+ this.updateVariant(e, i, M);
46
46
  break;
47
47
  default:
48
- super.attributeChangedCallback(t, e, o);
48
+ super.attributeChangedCallback(t, e, i);
49
49
  break;
50
50
  }
51
51
  }
@@ -58,11 +58,11 @@ const q = ["", "default", "small"], M = ["", "default", "secondary", "naked"], b
58
58
  updateLoading() {
59
59
  this.$el.classList.toggle("btn-icon--state-loading");
60
60
  }
61
- updateSize(t, e, o) {
62
- this.checkName(o, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`)) : console.error("Bad size value for", this.$el);
61
+ updateSize(t, e, i) {
62
+ this.checkName(i, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--size-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--size-${e}`)) : console.error(`${e} is not a valid size value`);
63
63
  }
64
- updateVariant(t, e, o) {
65
- this.checkName(o, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`)) : console.error(`Bad "variant" value for ${this.$el}`);
64
+ updateVariant(t, e, i) {
65
+ this.checkName(i, e) ? (t !== null && t !== "" && t !== "default" && this.$el.classList.toggle(`btn-icon--variant-${t}`), e !== null && e !== "" && e !== "default" && this.$el.classList.toggle(`btn-icon--variant-${e}`)) : console.error(`${e} is not a valid variant value`);
66
66
  }
67
67
  get inverted() {
68
68
  return this.getAttribute("inverted");
@@ -92,16 +92,16 @@ const q = ["", "default", "small"], M = ["", "default", "secondary", "naked"], b
92
92
  b.nativeName = "button";
93
93
  let a = b;
94
94
  customElements.get("px-button-icon") || customElements.define("px-button-icon", a);
95
- const R = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{margin:0;font-family:var(--px-font-family);color:var( --heading-color-default, var(--px-color-text-brand-default) );text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-font-line-height-m);font-weight:700}:host([inverted]) h1,:host([inverted]) .style-title-4xl,:host([inverted]) ::slotted(h1),:host([inverted]) h2,:host([inverted]) .style-title-3xl,:host([inverted]) ::slotted(h2),:host([inverted]) h3,:host([inverted]) .style-title-2xl,:host([inverted]) ::slotted(h3),:host([inverted]) h4,:host([inverted]) .style-title-xl,:host([inverted]) ::slotted(h4),:host([inverted]) h5,:host([inverted]) .style-title-l,:host([inverted]) ::slotted(h5),:host([inverted]) h6,:host([inverted]) .style-title-m,:host([inverted]) ::slotted(h6),:host([inverted]) .style-title-s,:host([inverted]) .style-subtitle{color:var( --heading-color-inverted, var(--px-color-text-brand-inverted) )}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-mobile);line-height:var(--px-font-line-height-s);font-weight:900}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-mobile);line-height:var(--px-font-line-height-s);font-weight:900}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-mobile);line-height:var(--px-font-line-height-s)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-mobile)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-mobile)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-mobile)}.style-subtitle{font-size:var(--px-text-size-heading-xl-mobile);font-weight:300}.style-title-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--tablet, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-s-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media only screen and (min-width: 1025px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--laptop, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-s-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media screen and (min-width: 1441px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--desktop, left)}}", B = ":host>*:first-child{--font-weight-light: 300;--font-weight-regular: 400;--font-weight-bold: 700;--font-weight-extrabold: 900}.color-inherit{color:inherit}.color-brand{color:var(--px-color-text-brand-default)}.color-action-neutral{color:var(--px-color-text-neutral-default)}.color-action-hover{color:var(--px-color-text-state-hover-default)}.color-action-active{color:var(--px-color-text-state-active-default)}.color-action-disabled{color:var(--px-color-text-state-disabled-default)}.color-body-neutral-strong{color:var(--px-color-text-neutral-default)}.color-body-neutral-weak{color:var(--px-color-text-dimmed-default)}.color-heading-brand{color:var(--px-color-text-brand-default)}.color-heading-neutral{color:var(--px-color-text-neutral-default)}.color-purpose-success{color:var(--px-color-text-purpose-success-default)}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)}.color-purpose-error{color:var(--px-color-text-purpose-error-default)}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)}:host([inverted]) .color-inherit{color:inherit}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-action-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-action-hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) .color-action-active{color:var(--px-color-text-state-active-inverted)}:host([inverted]) .color-action-disabled{color:var(--px-color-text-state-disabled-inverted)}:host([inverted]) .color-body-neutral-strong{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-body-neutral-weak{color:var(--px-color-text-dimmed-inverted)}:host([inverted]) .color-heading-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-heading-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-purpose-promo-inverted)}.font-size-inherit{font-size:inherit;line-height:inherit}.font-size-body-l{font-size:var(--px-text-size-body-l-mobile)}.font-size-body-m{font-size:var(--px-text-size-body-m-mobile)}.font-size-body-s{font-size:var(--px-text-size-body-s-mobile)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-mobile)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-mobile)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-mobile)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-mobile)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-mobile)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-mobile)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-mobile)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-mobile)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}}@media only screen and (min-width: 1025px){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-normal{font-weight:var(--font-weight-regular)}.font-weight-bold{font-weight:var(--font-weight-bold)}.font-weight-extrabold{font-weight:var(--font-weight-extrabold)}.font-weight-light{font-weight:var(--font-weight-light)}", $ = new CSSStyleSheet();
95
+ const R = "h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{margin:0;font-family:var(--px-font-family);color:var(--heading-color-default, var(--px-color-text-brand-default));text-align:var(--heading-text-align--mobile, left);font-size:var(--px-text-size-heading-s-mobile);line-height:var(--px-font-line-height-m);font-weight:var(--px-font-weight-title)}:host([inverted]) h1,:host([inverted]) .style-title-4xl,:host([inverted]) ::slotted(h1),:host([inverted]) h2,:host([inverted]) .style-title-3xl,:host([inverted]) ::slotted(h2),:host([inverted]) h3,:host([inverted]) .style-title-2xl,:host([inverted]) ::slotted(h3),:host([inverted]) h4,:host([inverted]) .style-title-xl,:host([inverted]) ::slotted(h4),:host([inverted]) h5,:host([inverted]) .style-title-l,:host([inverted]) ::slotted(h5),:host([inverted]) h6,:host([inverted]) .style-title-m,:host([inverted]) ::slotted(h6),:host([inverted]) .style-title-s,:host([inverted]) .style-subtitle{color:var(--heading-color-inverted, var(--px-color-text-brand-inverted))}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-mobile);line-height:var(--px-font-line-height-s);font-weight:var(--px-font-weight-title-large)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-mobile);line-height:var(--px-font-line-height-s);font-weight:var(--px-font-weight-title-large)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-mobile);line-height:var(--px-font-line-height-s)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-mobile)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-mobile)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-mobile)}.style-subtitle{font-size:var(--px-text-size-heading-xl-mobile);font-weight:var(--px-font-weight-subtitle)}.style-title-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 768px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--tablet, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-s-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media only screen and (min-width: 1025px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--laptop, left)}h1,.style-title-4xl,::slotted(h1){font-size:var(--px-text-size-heading-5xl-desktop)}h2,.style-title-3xl,::slotted(h2){font-size:var(--px-text-size-heading-4xl-desktop)}h3,.style-title-2xl,::slotted(h3){font-size:var(--px-text-size-heading-3xl-desktop)}h4,.style-title-xl,::slotted(h4){font-size:var(--px-text-size-heading-2xl-desktop)}h5,.style-title-l,::slotted(h5){font-size:var(--px-text-size-heading-l-desktop)}h6,.style-title-m,::slotted(h6){font-size:var(--px-text-size-heading-m-desktop)}.style-title-s{font-size:var(--px-text-size-heading-s-desktop)}.style-subtitle{font-size:var(--px-text-size-heading-xl-desktop)}}@media screen and (min-width: 1441px){h1,.style-title-4xl,::slotted(h1),h2,.style-title-3xl,::slotted(h2),h3,.style-title-2xl,::slotted(h3),h4,.style-title-xl,::slotted(h4),h5,.style-title-l,::slotted(h5),h6,.style-title-m,::slotted(h6),.style-title-s,.style-subtitle{text-align:var(--heading-text-align--desktop, left)}}", P = ".color-inherit{color:inherit}.color-brand{color:var(--px-color-text-brand-default)}.color-neutral{color:var(--px-color-text-neutral-default)}.color-dimmed{color:var(--px-color-text-dimmed-default)}.color-purpose-success{color:var(--px-color-text-purpose-success-default)}.color-purpose-warning{color:var(--px-color-text-purpose-warning-default)}.color-purpose-error{color:var(--px-color-text-purpose-error-default)}.color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-default)}.color-purpose-promo{color:var(--px-color-text-purpose-promo-default)}.color-state-hover{color:var(--px-color-text-state-hover-default)}.color-state-active{color:var(--px-color-text-state-active-default)}.color-state-disabled{color:var(--px-color-text-state-disabled-default)}:host([inverted]) .color-inherit{color:inherit}:host([inverted]) .color-brand{color:var(--px-color-text-brand-inverted)}:host([inverted]) .color-neutral{color:var(--px-color-text-neutral-inverted)}:host([inverted]) .color-dimmed{color:var(--px-color-text-dimmed-inverted)}:host([inverted]) .color-purpose-success{color:var(--px-color-text-purpose-success-inverted)}:host([inverted]) .color-purpose-warning{color:var(--px-color-text-purpose-warning-inverted)}:host([inverted]) .color-purpose-error{color:var(--px-color-text-purpose-error-inverted)}:host([inverted]) .color-purpose-unlimited{color:var(--px-color-text-purpose-unlimited-inverted)}:host([inverted]) .color-purpose-promo{color:var(--px-color-text-purpose-promo-inverted)}:host([inverted]) .color-state-hover{color:var(--px-color-text-state-hover-inverted)}:host([inverted]) .color-state-active{color:var(--px-color-text-state-active-inverted)}:host([inverted]) .color-state-disabled{color:var(--px-color-text-state-disabled-inverted)}.font-size-inherit{font-size:inherit;line-height:inherit}.font-size-body-l{font-size:var(--px-text-size-body-l-mobile)}.font-size-body-m{font-size:var(--px-text-size-body-m-mobile)}.font-size-body-s{font-size:var(--px-text-size-body-s-mobile)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-mobile)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-mobile)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-mobile)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-mobile)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-mobile)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-mobile)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-mobile)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-mobile)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-mobile)}@media only screen and (min-width: 48em){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}}@media only screen and (min-width: 64.0625em){.font-size-body-l{font-size:var(--px-text-size-body-l-desktop)}.font-size-body-m{font-size:var(--px-text-size-body-m-desktop)}.font-size-body-s{font-size:var(--px-text-size-body-s-desktop)}.font-size-body-xs{font-size:var(--px-text-size-body-xs-desktop)}.font-size-heading-5xl{font-size:var(--px-text-size-heading-5xl-desktop)}.font-size-heading-4xl{font-size:var(--px-text-size-heading-4xl-desktop)}.font-size-heading-3xl{font-size:var(--px-text-size-heading-3xl-desktop)}.font-size-heading-2xl{font-size:var(--px-text-size-heading-2xl-desktop)}.font-size-heading-xl{font-size:var(--px-text-size-heading-xl-desktop)}.font-size-heading-l{font-size:var(--px-text-size-heading-l-desktop)}.font-size-heading-m{font-size:var(--px-text-size-heading-m-desktop)}.font-size-heading-s{font-size:var(--px-text-size-heading-s-desktop)}}.font-weight-inherit{font-weight:inherit}.font-weight-body{font-weight:var(--px-font-weight-body)}.font-weight-title{font-weight:var(--px-font-weight-title)}.font-weight-title-large{font-weight:var(--px-font-weight-title-large)}.font-weight-subtitle{font-weight:var(--px-font-weight-subtitle)}", $ = new CSSStyleSheet();
96
96
  $.replaceSync(R);
97
- const w = new CSSStyleSheet();
98
- w.replaceSync(B);
97
+ const C = new CSSStyleSheet();
98
+ C.replaceSync(P);
99
99
  class n extends k {
100
100
  template() {
101
101
  return "<slot></slot>";
102
102
  }
103
103
  constructor(t) {
104
- super($, w);
104
+ super($, C);
105
105
  const e = document.createElement(t);
106
106
  e.innerHTML = this.template(), this.shadowRoot.appendChild(e);
107
107
  }
@@ -118,24 +118,24 @@ class n extends k {
118
118
  "inverted"
119
119
  ];
120
120
  }
121
- attributeChangedCallback(t, e, o) {
122
- if (e !== o)
121
+ attributeChangedCallback(t, e, i) {
122
+ if (e !== i)
123
123
  switch (t) {
124
124
  case "variant":
125
- this.updateAttribute(t, e, o, N);
125
+ this.updateAttribute(t, e, i, N);
126
126
  break;
127
127
  case "color":
128
- this.updateColor(e, o, I);
128
+ this.updateColor(e, i, I);
129
129
  break;
130
130
  case "text-align":
131
131
  case "text-align--mobile":
132
132
  case "text-align--tablet":
133
133
  case "text-align--laptop":
134
134
  case "text-align--desktop":
135
- this.updateTextAlign(t, e, o, E);
135
+ this.updateTextAlign(t, e, i, E);
136
136
  break;
137
137
  default:
138
- super.attributeChangedCallback(t, e, o);
138
+ super.attributeChangedCallback(t, e, i);
139
139
  break;
140
140
  }
141
141
  }
@@ -145,34 +145,31 @@ class n extends k {
145
145
  checkName(t, e) {
146
146
  return t.includes(e);
147
147
  }
148
- updateAttribute(t, e, o, r) {
149
- this.checkName(r, o) ? this.toggleClass(e, o) : console.error(
150
- `${o} is not an allowed "${t}" value for`,
151
- this.$el
152
- );
148
+ updateAttribute(t, e, i, r) {
149
+ this.checkName(r, i) ? this.toggleClass(e, i) : console.error(`${i} is not an allowed "${t}" value`);
153
150
  }
154
- updateColor(t, e, o) {
155
- if (!this.checkName(o, e)) {
156
- console.error("Bad color value for", this.$el);
151
+ updateColor(t, e, i) {
152
+ if (!this.checkName(i, e)) {
153
+ console.error(`${e} is not a valid color value`);
157
154
  return;
158
155
  }
159
- const r = (i) => {
160
- i !== null && i !== "" && i !== "default" && (this.$el.style.setProperty(
156
+ const r = (o) => {
157
+ o !== null && o !== "" && o !== "default" && (this.$el.style.setProperty(
161
158
  "--heading-color-default",
162
- `var(--px-text-color-${i}-default)`
159
+ `var(--px-color-text-${o}-default)`
163
160
  ), this.$el.style.setProperty(
164
161
  "--heading-color-inverted",
165
- `var(--px-text-color-${i}-inverted)`
162
+ `var(--px-color-text-${o}-inverted)`
166
163
  ));
167
164
  };
168
165
  r(t), r(e);
169
166
  }
170
- updateTextAlign(t, e, o, r) {
171
- if (!this.checkName(r, o)) {
172
- console.error(`Bad ${t} value for`, this.$el);
167
+ updateTextAlign(t, e, i, r) {
168
+ if (!this.checkName(r, i)) {
169
+ console.error(`${i} is not a valid value for ${t}`);
173
170
  return;
174
171
  }
175
- const i = (s, l) => {
172
+ const o = (s, l) => {
176
173
  l !== null && l !== "" && l !== "default" && this.$el.style.setProperty(
177
174
  `--heading-text-align--${s}`,
178
175
  l
@@ -180,11 +177,11 @@ class n extends k {
180
177
  };
181
178
  if (t === "text-align")
182
179
  ["mobile", "tablet", "laptop", "desktop"].forEach((s) => {
183
- i(s, e), i(s, o);
180
+ o(s, e), o(s, i);
184
181
  });
185
182
  else {
186
183
  const s = t.split("--")[1];
187
- i(s, e), i(s, o);
184
+ o(s, e), o(s, i);
188
185
  }
189
186
  }
190
187
  get variant() {
@@ -236,21 +233,21 @@ class n extends k {
236
233
  this.setAttribute("inverted", t);
237
234
  }
238
235
  }
239
- const u = class u extends n {
236
+ const v = class v extends n {
240
237
  constructor() {
241
238
  super("h1");
242
239
  }
243
240
  };
244
- u.nativeName = "h1";
245
- let d = u;
241
+ v.nativeName = "h1";
242
+ let d = v;
246
243
  customElements.define("px-h1", d);
247
- const v = class v extends n {
244
+ const u = class u extends n {
248
245
  constructor() {
249
246
  super("h2");
250
247
  }
251
248
  };
252
- v.nativeName = "h2";
253
- let c = v;
249
+ u.nativeName = "h2";
250
+ let c = u;
254
251
  customElements.define("px-h2", c);
255
252
  const f = class f extends n {
256
253
  constructor() {
@@ -284,10 +281,10 @@ const y = class y extends n {
284
281
  y.nativeName = "h6";
285
282
  let g = y;
286
283
  customElements.define("px-h6", g);
287
- const P = "#container{width:1080px;display:block;border:0;border-radius:var(--px-radius-main);padding:var(--px-padding-m-desktop);background-color:var(--px-color-background-surface-default)}#container.success{border-left:5px var(--px-color-icon-purpose-success-default) solid}#container.warning{border-left:5px var(--px-color-icon-purpose-warning-default) solid}#container.error{border-left:5px var(--px-color-icon-purpose-error-default) solid}px-button-icon{position:absolute;top:var(--px-padding-m-desktop);right:var(--px-padding-m-desktop)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;transform:scale(.95);animation:modalIn .3s ease-out forwards}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{max-height:90vh;overflow:auto;padding:var(--px-padding-m-desktop)}@media screen and (max-width: 1081px){#container{width:inherit;padding:var(--px-padding-m-mobile)}px-button-icon{top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}#content{padding:var(--px-padding-m-mobile)}}@keyframes modalIn{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}", C = new CSSStyleSheet();
288
- C.replaceSync(P);
289
- const O = "px.lavender.modal.close";
290
- class j extends HTMLElement {
284
+ const O = "#container{width:1080px;display:block;border:0;border-radius:var(--px-radius-main);padding:var(--px-padding-m-desktop);background-color:var(--px-color-background-surface-default)}#container.success{border-left:5px var(--px-color-icon-purpose-success-default) solid}#container.warning{border-left:5px var(--px-color-icon-purpose-warning-default) solid}#container.error{border-left:5px var(--px-color-icon-purpose-error-default) solid}px-button-icon{position:absolute;top:var(--px-padding-m-desktop);right:var(--px-padding-m-desktop)}dialog{background:transparent;border-radius:0;box-shadow:none;padding:0;border:0;box-sizing:border-box;transform:scale(.95);animation:modalIn .3s ease-out forwards}::backdrop{background:#0000004d;-webkit-backdrop-filter:saturate(180%) blur(15px);backdrop-filter:saturate(180%) blur(15px)}#content{max-height:90vh;overflow:auto;padding:var(--px-padding-m-desktop)}@media screen and (max-width: 1081px){#container{width:inherit;padding:var(--px-padding-m-mobile)}px-button-icon{top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}#content{padding:var(--px-padding-m-mobile)}}@keyframes modalIn{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}", w = new CSSStyleSheet();
285
+ w.replaceSync(O);
286
+ const j = "px.lavender.modal.close";
287
+ class D extends HTMLElement {
291
288
  constructor() {
292
289
  super(), this.template = ` <dialog>
293
290
  <div id="container">
@@ -299,7 +296,7 @@ class j extends HTMLElement {
299
296
  <px-h1 variant="title-l">
300
297
  <slot name="title"></slot>
301
298
  </px-h1>
302
- <px-p font-weight="bold">
299
+ <px-p font-weight="title">
303
300
  <slot name="description"></slot>
304
301
  </px-p>
305
302
  </px-vstack>
@@ -322,7 +319,7 @@ class j extends HTMLElement {
322
319
  <px-icon name="cross" from="lavender"></px-icon>
323
320
  </px-button-icon>
324
321
  </div>
325
- </dialog>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [C];
322
+ </dialog>`, this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = this.template, this.shadowRoot.adoptedStyleSheets = [w];
326
323
  }
327
324
  connectedCallback() {
328
325
  if (this.hasAttribute("open") && this.show(), this.handleStatusChange("notnull", this.getAttribute("status")), this.hasAttribute("closedby")) {
@@ -348,13 +345,13 @@ class j extends HTMLElement {
348
345
  static get observedAttributes() {
349
346
  return ["open", "status"];
350
347
  }
351
- attributeChangedCallback(t, e, o) {
348
+ attributeChangedCallback(t, e, i) {
352
349
  switch (t) {
353
350
  case "open":
354
351
  this.handleOpenChange();
355
352
  break;
356
353
  case "status":
357
- this.handleStatusChange(e, o);
354
+ this.handleStatusChange(e, i);
358
355
  break;
359
356
  }
360
357
  }
@@ -362,14 +359,14 @@ class j extends HTMLElement {
362
359
  this.hasAttribute("open") ? this.show() : this.close();
363
360
  }
364
361
  handleStatusChange(t, e) {
365
- var o, r, i;
362
+ var i, r, o;
366
363
  if (e === "success" ? this.$container.classList.add("success") : this.$container.classList.remove("success"), e === "error" ? this.$container.classList.add("error") : this.$container.classList.remove("error"), e === "warning" ? this.$container.classList.add("warning") : this.$container.classList.remove("warning"), e === null)
367
- (o = this.$statusIcon) == null || o.remove();
364
+ (i = this.$statusIcon) == null || i.remove();
368
365
  else if (t === null && e && !this.$statusIcon) {
369
366
  const s = document.createElement("px-icon");
370
367
  s.setAttribute("name", this.getIcon(e)), s.setAttribute("from", "lavender"), s.setAttribute("color", `purpose-${e}`), this.$iconContainer.appendChild(s);
371
368
  } else
372
- (r = this.$statusIcon) == null || r.setAttribute("name", this.getIcon(e)), (i = this.$statusIcon) == null || i.setAttribute("color", `purpose-${e}`);
369
+ (r = this.$statusIcon) == null || r.setAttribute("name", this.getIcon(e)), (o = this.$statusIcon) == null || o.setAttribute("color", `purpose-${e}`);
373
370
  }
374
371
  getIcon(t) {
375
372
  return t === "success" ? "checkmark_fill" : t === "warning" ? "exclamation_mark_fill" : "minus_fill";
@@ -379,7 +376,7 @@ class j extends HTMLElement {
379
376
  }
380
377
  close() {
381
378
  this.$dialog.close(), this.dispatchEvent(
382
- new CustomEvent(O, {
379
+ new CustomEvent(j, {
383
380
  bubbles: !0,
384
381
  composed: !0
385
382
  })
@@ -406,7 +403,7 @@ class j extends HTMLElement {
406
403
  return this.$dialog.open;
407
404
  }
408
405
  }
409
- customElements.get("px-modal") || customElements.define("px-modal", j);
406
+ customElements.get("px-modal") || customElements.define("px-modal", D);
410
407
  export {
411
- j as Modal
408
+ D as Modal
412
409
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proximus/lavender-modal",
3
- "version": "1.0.0-alpha.21",
3
+ "version": "1.0.0-alpha.23",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "files": [