@moni-labs/moni-ui 0.4.16 → 0.4.17
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/browser/moni-ui.iife.min.js +5 -1
- package/dist/browser/moni-ui.iife.min.js.br +0 -0
- package/dist/browser/moni-ui.iife.min.js.gz +0 -0
- package/dist/browser/moni-ui.iife.min.js.map +1 -1
- package/dist/browser/moni-ui.min.js +25 -1
- package/dist/browser/moni-ui.min.js.br +0 -0
- package/dist/browser/moni-ui.min.js.gz +0 -0
- package/dist/browser/moni-ui.min.js.map +1 -1
- package/dist/cdn/components/moni-bottom-sheet.js +5 -1
- package/dist/cdn/importmap.json +98 -98
- package/dist/components/moni-bottom-sheet.d.ts.map +1 -1
- package/dist/components/moni-bottom-sheet.js +58 -0
- package/docs/api.json +1 -1
- package/package.json +1 -1
- package/src/components/moni-bottom-sheet.test.ts +62 -0
- package/src/components/moni-bottom-sheet.ts +58 -0
|
@@ -1943,7 +1943,27 @@ var Je = class extends W {
|
|
|
1943
1943
|
this.modal && e.target === this._dialog && this._animateAndClose();
|
|
1944
1944
|
}
|
|
1945
1945
|
updated(e) {
|
|
1946
|
-
super.updated(e), e.has("expandedHeight") && this.style.setProperty("--moni-bottom-sheet-expanded-height", this.expandedHeight), e.has("maxWidth") && this.style.setProperty("--moni-bottom-sheet-max-width", this.maxWidth || "100%"), e.has("open") && (this.open ? (this._isClosing = !1, this._isDragging = !1, this._lastDeltaY = 0, this._dialog && (this._dialog.classList.remove("dragging", "expanded"), this._dialog.style.transform = "", this._dialog.style.height = ""), e.get("open") !== void 0 && qe(this, "moni-open"), this.positioning === "body" && this.parentNode !== document.body && (this._originalParent = this.parentNode, this._originalSibling = this.nextSibling, document.body.appendChild(this)), e.get("open") !== void 0 && setTimeout(() => qe(this, "moni-opened"), 300)) : (this._isClosing = !1, this._isDragging = !1, this._lastDeltaY = 0, this._dialog && (this._dialog.classList.remove("expanded", "dragging"), this._dialog.style.transform = "", this._dialog.style.height = ""), this.positioning === "body" && this._originalParent && this.parentNode === document.body && (this._originalParent.insertBefore(this, this._originalSibling), this._originalParent = null, this._originalSibling = null)))
|
|
1946
|
+
if (super.updated(e), e.has("expandedHeight") && this.style.setProperty("--moni-bottom-sheet-expanded-height", this.expandedHeight), e.has("maxWidth") && this.style.setProperty("--moni-bottom-sheet-max-width", this.maxWidth || "100%"), e.has("open") && (this.open ? (this._isClosing = !1, this._isDragging = !1, this._lastDeltaY = 0, this._dialog && (this._dialog.classList.remove("dragging", "expanded"), this._dialog.style.transform = "", this._dialog.style.height = ""), e.get("open") !== void 0 && qe(this, "moni-open"), this.positioning === "body" && this.parentNode !== document.body && (this._originalParent = this.parentNode, this._originalSibling = this.nextSibling, document.body.appendChild(this)), e.get("open") !== void 0 && setTimeout(() => qe(this, "moni-opened"), 300)) : (this._isClosing = !1, this._isDragging = !1, this._lastDeltaY = 0, this._dialog && (this._dialog.classList.remove("expanded", "dragging"), this._dialog.style.transform = "", this._dialog.style.height = ""), this.positioning === "body" && this._originalParent && this.parentNode === document.body && (this._originalParent.insertBefore(this, this._originalSibling), this._originalParent = null, this._originalSibling = null)), this._dialog)) {
|
|
1947
|
+
let e = this._dialog;
|
|
1948
|
+
if (this.open) {
|
|
1949
|
+
if (this.modal && typeof e.showModal == "function") {
|
|
1950
|
+
let t = !1;
|
|
1951
|
+
try {
|
|
1952
|
+
t = this._dialog.matches(":modal");
|
|
1953
|
+
} catch {
|
|
1954
|
+
t = !1;
|
|
1955
|
+
}
|
|
1956
|
+
if (!t) try {
|
|
1957
|
+
e.showModal();
|
|
1958
|
+
} catch {}
|
|
1959
|
+
} else if (!this.modal && typeof e.show == "function") try {
|
|
1960
|
+
e.show();
|
|
1961
|
+
} catch {}
|
|
1962
|
+
else (this.modal && typeof e.showModal != "function" || !this.modal && typeof e.show != "function") && (this._dialog.open = !0);
|
|
1963
|
+
} else if (typeof e.close == "function") try {
|
|
1964
|
+
e.close();
|
|
1965
|
+
} catch {}
|
|
1966
|
+
}
|
|
1947
1967
|
}
|
|
1948
1968
|
disconnectedCallback() {
|
|
1949
1969
|
super.disconnectedCallback(), this.parentNode === document.body && this.positioning === "body" && this._originalParent && this._originalParent.insertBefore(this, this._originalSibling);
|
|
@@ -1987,6 +2007,10 @@ var Je = class extends W {
|
|
|
1987
2007
|
transform: translateY(0);
|
|
1988
2008
|
}
|
|
1989
2009
|
|
|
2010
|
+
dialog::backdrop {
|
|
2011
|
+
background-color: rgb(0 0 0 / 0.5);
|
|
2012
|
+
}
|
|
2013
|
+
|
|
1990
2014
|
dialog.fixed {
|
|
1991
2015
|
position: fixed;
|
|
1992
2016
|
inset: auto 0 0 0;
|
|
Binary file
|
|
Binary file
|