wacomm 3.3.0 → 3.5.0
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/html/img/SmartImage.d.ts +2 -1
- package/dist/modal/Modal.d.ts +4 -1
- package/dist/wacomm.cjs.js +2 -2
- package/dist/wacomm.es.js +23 -13
- package/package.json +1 -1
package/dist/wacomm.es.js
CHANGED
|
@@ -773,8 +773,8 @@ var $n = {
|
|
|
773
773
|
...e.content || {}
|
|
774
774
|
}
|
|
775
775
|
} : n ? er : $n;
|
|
776
|
-
function nr({ isOpen: e = !0, onClose: t, title: n, content: r, shouldCloseOnEsc: i = !0, shouldCloseOnOverlayClick: a = !0, isCloseIconHidden: o = !1, isHeaderHidden: s = !1,
|
|
777
|
-
let
|
|
776
|
+
function nr({ isOpen: e = !0, onClose: t, title: n, content: r, shouldCloseOnEsc: i = !0, shouldCloseOnOverlayClick: a = !0, isCloseIconHidden: o = !1, isHeaderHidden: s = !1, isContentFlush: c = !1, style: l = {} }) {
|
|
777
|
+
let u = N(), [d, f] = y(u ? window.innerWidth : b);
|
|
778
778
|
return p(() => {
|
|
779
779
|
if (typeof window < "u") {
|
|
780
780
|
let e = document.getElementById("__next") || document.getElementById("root");
|
|
@@ -782,14 +782,14 @@ function nr({ isOpen: e = !0, onClose: t, title: n, content: r, shouldCloseOnEsc
|
|
|
782
782
|
}
|
|
783
783
|
}, []), p(() => {
|
|
784
784
|
let e = () => {
|
|
785
|
-
|
|
785
|
+
f(u ? window.innerWidth : b);
|
|
786
786
|
};
|
|
787
787
|
return window.addEventListener("resize", e), () => {
|
|
788
788
|
window.removeEventListener("resize", e);
|
|
789
789
|
};
|
|
790
|
-
}, [
|
|
790
|
+
}, [u]), /* @__PURE__ */ U(st, {
|
|
791
791
|
isOpen: e,
|
|
792
|
-
style: tr(
|
|
792
|
+
style: tr(l, d, u),
|
|
793
793
|
shouldCloseOnEsc: i,
|
|
794
794
|
shouldCloseOnOverlayClick: a,
|
|
795
795
|
onRequestClose: t,
|
|
@@ -807,8 +807,10 @@ function nr({ isOpen: e = !0, onClose: t, title: n, content: r, shouldCloseOnEsc
|
|
|
807
807
|
flex: "1 1 auto",
|
|
808
808
|
minHeight: 0,
|
|
809
809
|
overflowY: "auto",
|
|
810
|
-
|
|
811
|
-
|
|
810
|
+
...c ? {} : {
|
|
811
|
+
scrollbarGutter: "stable",
|
|
812
|
+
paddingRight: 4
|
|
813
|
+
}
|
|
812
814
|
},
|
|
813
815
|
children: r
|
|
814
816
|
})]
|
|
@@ -998,19 +1000,25 @@ function fr({ src: e, alt: t, ref: n = null, className: r = "", containerClassNa
|
|
|
998
1000
|
}
|
|
999
1001
|
//#endregion
|
|
1000
1002
|
//#region src/html/img/SmartImage.tsx
|
|
1001
|
-
function pr({ src: e, fallbackSrc: t, alt: n, ref: r = null, className: i = "", containerClassName: a = "", onClick: o, style: s = void 0, onLoad: c = void 0 }) {
|
|
1002
|
-
let
|
|
1003
|
+
function pr({ src: e, fallbackSrc: t, alt: n, ref: r = null, className: i = "", containerClassName: a = "", onClick: o, style: s = void 0, onLoad: c = void 0, onExhausted: l = void 0 }) {
|
|
1004
|
+
let u = [e, t].filter((e) => !!e), [d, f] = y(0);
|
|
1003
1005
|
return /* @__PURE__ */ H(hn, {
|
|
1004
1006
|
className: a,
|
|
1005
1007
|
onClick: o,
|
|
1006
1008
|
children: /* @__PURE__ */ H("img", {
|
|
1007
1009
|
ref: r,
|
|
1008
|
-
src:
|
|
1010
|
+
src: u[d],
|
|
1009
1011
|
alt: n,
|
|
1010
1012
|
style: s,
|
|
1011
1013
|
className: i,
|
|
1012
1014
|
onLoad: c,
|
|
1013
|
-
onError: () =>
|
|
1015
|
+
onError: () => {
|
|
1016
|
+
if (d + 1 < u.length) {
|
|
1017
|
+
f(d + 1);
|
|
1018
|
+
return;
|
|
1019
|
+
}
|
|
1020
|
+
l?.();
|
|
1021
|
+
}
|
|
1014
1022
|
})
|
|
1015
1023
|
});
|
|
1016
1024
|
}
|
|
@@ -19493,12 +19501,14 @@ function VT({ letter: e, className: t = "", onClick: n }) {
|
|
|
19493
19501
|
//#endregion
|
|
19494
19502
|
//#region src/avatar/Avatar.tsx
|
|
19495
19503
|
function HT({ label: e = "N", className: t = "w-full h-full", imgSrc: n = "", fallbackImgSrc: r = "", onClick: i }) {
|
|
19496
|
-
|
|
19504
|
+
let [a, o] = y(!1);
|
|
19505
|
+
return p(() => o(!1), [n, r]), (n || r) && !a ? /* @__PURE__ */ H(pr, {
|
|
19497
19506
|
className: j("Avatar rounded-full w-full h-full", t),
|
|
19498
19507
|
src: n,
|
|
19499
19508
|
fallbackSrc: r,
|
|
19500
19509
|
alt: e,
|
|
19501
|
-
onClick: i
|
|
19510
|
+
onClick: i,
|
|
19511
|
+
onExhausted: () => o(!0)
|
|
19502
19512
|
}) : /* @__PURE__ */ H(VT, {
|
|
19503
19513
|
className: `LetterAvatar ${t}`,
|
|
19504
19514
|
onClick: i,
|