@proximus/lavender-modal 1.4.3-beta.1 → 1.4.3-beta.2
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.
- package/dist/index.es.js +8 -8
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4,7 +4,7 @@ import "@proximus/lavender-layout";
|
|
|
4
4
|
import "@proximus/lavender-icon";
|
|
5
5
|
import "@proximus/lavender-heading";
|
|
6
6
|
import "@proximus/lavender-paragraph";
|
|
7
|
-
const n = "*{box-sizing:border-box}#container{
|
|
7
|
+
const n = "*{box-sizing:border-box}#container{display:flex;flex-wrap:nowrap;font-family:var(--px-font-family);font-size:var(--px-font-size-base);color:var(--px-color-text-neutral-default);width:1080px;border-radius:var(--px-radius-main);background-color:var(--px-color-background-surface-default);overflow:hidden}#container.info{border-left:5px var(--px-color-icon-brand-default) solid}#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}#content-container{padding:var(--px-padding-m-mobile);flex-grow:1}#media-container{display:none}::slotted(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:12.5em;overflow:auto}@media screen and (max-width: 1081px){#container{width:inherit}#content-container{padding:var(--px-padding-m-mobile)}::slotted(px-button-icon){top:var(--px-padding-m-mobile);right:var(--px-padding-m-mobile)}}@media only screen and (min-width: 48em){::slotted(px-button-icon){position:absolute;top:var(--px-padding-m-tablet);right:var(--px-padding-m-tablet)}#content{max-height:25em}}@media only screen and (min-width: 64.0625em){:host([media-src]) #media-container{display:block;background-size:cover;background-position:center center;background-repeat:no-repeat;flex-basis:25em;flex-shrink:0}}@keyframes modalIn{0%{transform:scale(.95);opacity:0}to{transform:scale(1);opacity:1}}", a = new CSSStyleSheet();
|
|
8
8
|
a.replaceSync(n);
|
|
9
9
|
const c = "px.lavender.modal.close";
|
|
10
10
|
class d extends HTMLElement {
|
|
@@ -67,16 +67,16 @@ class d extends HTMLElement {
|
|
|
67
67
|
static get observedAttributes() {
|
|
68
68
|
return ["open", "status", "media-src"];
|
|
69
69
|
}
|
|
70
|
-
attributeChangedCallback(t, e,
|
|
70
|
+
attributeChangedCallback(t, e, o) {
|
|
71
71
|
switch (t) {
|
|
72
72
|
case "open":
|
|
73
73
|
this.handleOpenChange();
|
|
74
74
|
break;
|
|
75
75
|
case "status":
|
|
76
|
-
this.handleStatusChange(e,
|
|
76
|
+
this.handleStatusChange(e, o);
|
|
77
77
|
break;
|
|
78
78
|
case "media-src":
|
|
79
|
-
this.updateMediaSrc(
|
|
79
|
+
this.updateMediaSrc(o);
|
|
80
80
|
break;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -84,12 +84,12 @@ class d extends HTMLElement {
|
|
|
84
84
|
this.hasAttribute("open") ? this.show() : this.close();
|
|
85
85
|
}
|
|
86
86
|
handleStatusChange(t, e) {
|
|
87
|
-
var
|
|
87
|
+
var o, s, r;
|
|
88
88
|
if (e === "info" ? this.$container.classList.add("info") : this.$container.classList.remove("info"), 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 && this.$statusIcon)
|
|
89
|
-
(
|
|
89
|
+
(o = this.$statusIcon) == null || o.remove();
|
|
90
90
|
else if (t === null && e && !this.$statusIcon) {
|
|
91
|
-
const
|
|
92
|
-
|
|
91
|
+
const i = document.createElement("px-icon");
|
|
92
|
+
i.setAttribute("name", this.getIcon(e)), i.setAttribute("from", "lavender"), i.setAttribute("color", `purpose-${e}`), i.setAttribute("size", "l"), this.$iconContainer.prepend(i);
|
|
93
93
|
} else
|
|
94
94
|
(s = this.$statusIcon) == null || s.setAttribute("name", this.getIcon(e)), (r = this.$statusIcon) == null || r.setAttribute("color", `purpose-${e}`);
|
|
95
95
|
}
|