@ethora/chat-component 26.5.5 → 26.5.6
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/main.js +26 -18
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -22446,9 +22446,14 @@ const KD = (e) => e.length === 0 ? "" : e.length === 1 ? `${e[0]} is typing` : e
|
|
|
22446
22446
|
zD,
|
|
22447
22447
|
{
|
|
22448
22448
|
onClick: T,
|
|
22449
|
-
color: i?.colors?.primary,
|
|
22449
|
+
color: i?.colors?.iconsBg || i?.colors?.primary,
|
|
22450
22450
|
children: [
|
|
22451
|
-
/* @__PURE__ */ g(
|
|
22451
|
+
/* @__PURE__ */ g(
|
|
22452
|
+
B4,
|
|
22453
|
+
{
|
|
22454
|
+
color: i?.colors?.icons || i?.colors?.secondary || "white"
|
|
22455
|
+
}
|
|
22456
|
+
),
|
|
22452
22457
|
A > 0 && /* @__PURE__ */ g("span", { className: "count", children: A })
|
|
22453
22458
|
]
|
|
22454
22459
|
}
|
|
@@ -39720,31 +39725,34 @@ const Ki = ({
|
|
|
39720
39725
|
placeholderIcon: o,
|
|
39721
39726
|
disableOverlay: u
|
|
39722
39727
|
}) => {
|
|
39723
|
-
const {
|
|
39724
|
-
if (!
|
|
39725
|
-
const
|
|
39726
|
-
return
|
|
39727
|
-
},
|
|
39728
|
-
const
|
|
39729
|
-
|
|
39730
|
-
},
|
|
39728
|
+
const { config: c } = ot(), l = c?.colors?.iconsBg, d = c?.colors?.icons, { backgroundColor: f } = Ww(e), h = l || f, m = (C) => {
|
|
39729
|
+
if (!C) return "";
|
|
39730
|
+
const E = C.normalize("NFD").replace(/[\u0300-\u036f]/g, "").trim().split(/\s+/), w = (R) => R && /^[\p{L}\p{N}\p{P}]/u.test(R[0]) ? R[0].toUpperCase() : "", v = w(E[0] || ""), _ = w(E[1] || "");
|
|
39731
|
+
return v + _;
|
|
39732
|
+
}, A = () => !t && e ? m(e) : "", b = (C) => {
|
|
39733
|
+
const k = C.target.files?.[0];
|
|
39734
|
+
k && i?.onUpload && i.onUpload(k);
|
|
39735
|
+
}, y = () => {
|
|
39731
39736
|
i?.active && document.getElementById("avatar-file-input")?.click();
|
|
39732
39737
|
};
|
|
39733
39738
|
return /* @__PURE__ */ U(
|
|
39734
39739
|
LD,
|
|
39735
39740
|
{
|
|
39736
|
-
bgColor: t ? "transparent" :
|
|
39741
|
+
bgColor: t ? "transparent" : h,
|
|
39737
39742
|
size: n,
|
|
39738
39743
|
isClickable: a || !!i?.active,
|
|
39739
39744
|
children: [
|
|
39740
39745
|
/* @__PURE__ */ U(
|
|
39741
39746
|
BD,
|
|
39742
39747
|
{
|
|
39743
|
-
bgColor: t ? "transparent" :
|
|
39748
|
+
bgColor: t ? "transparent" : h,
|
|
39744
39749
|
size: n,
|
|
39745
39750
|
isClickable: a || s === "participant" && !!i?.active,
|
|
39746
|
-
onClick:
|
|
39747
|
-
style: {
|
|
39751
|
+
onClick: y,
|
|
39752
|
+
style: {
|
|
39753
|
+
fontSize: n >= 64 ? "24px" : "18px",
|
|
39754
|
+
...d ? { color: d } : {}
|
|
39755
|
+
},
|
|
39748
39756
|
children: [
|
|
39749
39757
|
t ? /* @__PURE__ */ g(
|
|
39750
39758
|
FD,
|
|
@@ -39753,7 +39761,7 @@ const Ki = ({
|
|
|
39753
39761
|
alt: "avatar icon",
|
|
39754
39762
|
size: n
|
|
39755
39763
|
}
|
|
39756
|
-
) : o ||
|
|
39764
|
+
) : o || A(),
|
|
39757
39765
|
i?.active && /* @__PURE__ */ U(He, { children: [
|
|
39758
39766
|
/* @__PURE__ */ g(
|
|
39759
39767
|
UD,
|
|
@@ -39761,7 +39769,7 @@ const Ki = ({
|
|
|
39761
39769
|
type: "file",
|
|
39762
39770
|
id: "avatar-file-input",
|
|
39763
39771
|
accept: "image/png, image/jpeg",
|
|
39764
|
-
onChange:
|
|
39772
|
+
onChange: b
|
|
39765
39773
|
}
|
|
39766
39774
|
),
|
|
39767
39775
|
!u && /* @__PURE__ */ g(jD, { children: /* @__PURE__ */ g(Pc, { style: { fontSize: n / 2 }, color: "#fff" }) })
|
|
@@ -39772,8 +39780,8 @@ const Ki = ({
|
|
|
39772
39780
|
r?.enabled && t && s !== "participant" && /* @__PURE__ */ g(
|
|
39773
39781
|
HD,
|
|
39774
39782
|
{
|
|
39775
|
-
onClick: (
|
|
39776
|
-
|
|
39783
|
+
onClick: (C) => {
|
|
39784
|
+
C.stopPropagation(), r.onRemoveClick();
|
|
39777
39785
|
},
|
|
39778
39786
|
children: "×"
|
|
39779
39787
|
}
|