react-better-html 1.1.228 → 1.1.229
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.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +33 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +33 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1403,7 +1403,7 @@ var Image = forwardRef3(function Image2({ name, src, ...props }, ref) {
|
|
|
1403
1403
|
}
|
|
1404
1404
|
);
|
|
1405
1405
|
});
|
|
1406
|
-
Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, backgroundColor, ...props }, ref) {
|
|
1406
|
+
Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, letterColor, backgroundColor, ...props }, ref) {
|
|
1407
1407
|
const theme2 = useTheme4();
|
|
1408
1408
|
return letters ? /* @__PURE__ */ jsx3(
|
|
1409
1409
|
Div_default.row,
|
|
@@ -1417,7 +1417,7 @@ Image.profileImage = forwardRef3(function ProfileImage({ size = 40, letters, bac
|
|
|
1417
1417
|
...props,
|
|
1418
1418
|
width: size,
|
|
1419
1419
|
height: size,
|
|
1420
|
-
children: /* @__PURE__ */ jsx3(Text_default, { fontSize: size / 2.5, fontWeight: 700, children: letters.toUpperCase().slice(0, 2) })
|
|
1420
|
+
children: /* @__PURE__ */ jsx3(Text_default, { fontSize: size / 2.5, fontWeight: 700, color: letterColor ?? theme2.colors.textPrimary, children: letters.toUpperCase().slice(0, 2) })
|
|
1421
1421
|
}
|
|
1422
1422
|
) : /* @__PURE__ */ jsx3(
|
|
1423
1423
|
Image,
|
|
@@ -2665,25 +2665,31 @@ function Alert2({ alert }) {
|
|
|
2665
2665
|
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
2666
2666
|
if (defaultAlertDisplay === "prominent") return;
|
|
2667
2667
|
setIsRemoved(true);
|
|
2668
|
-
setTimeout(
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2668
|
+
setTimeout(
|
|
2669
|
+
() => {
|
|
2670
|
+
alertControls2.removeAlert(alert.id);
|
|
2671
|
+
if (!calledOnCloseRef.current) {
|
|
2672
|
+
alert.onClose?.(alert);
|
|
2673
|
+
calledOnCloseRef.current = true;
|
|
2674
|
+
}
|
|
2675
|
+
},
|
|
2676
|
+
0.2 * 1e3 - 10
|
|
2677
|
+
);
|
|
2675
2678
|
}
|
|
2676
2679
|
}, updateInterval);
|
|
2677
2680
|
}, [alert, progress, defaultAlertDisplay]);
|
|
2678
2681
|
const onClickCloseAlert = useCallback5(() => {
|
|
2679
2682
|
setIsRemoved(true);
|
|
2680
|
-
setTimeout(
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2683
|
+
setTimeout(
|
|
2684
|
+
() => {
|
|
2685
|
+
alertControls2.removeAlert(alert.id);
|
|
2686
|
+
if (!calledOnCloseRef.current) {
|
|
2687
|
+
alert.onClose?.(alert);
|
|
2688
|
+
calledOnCloseRef.current = true;
|
|
2689
|
+
}
|
|
2690
|
+
},
|
|
2691
|
+
0.2 * 1e3 - 10
|
|
2692
|
+
);
|
|
2687
2693
|
}, [alert]);
|
|
2688
2694
|
const onMouseEnter = useCallback5(() => {
|
|
2689
2695
|
setIsPaused(true);
|
|
@@ -2700,13 +2706,16 @@ function Alert2({ alert }) {
|
|
|
2700
2706
|
const onClickAlertModalDone = useCallback5(() => {
|
|
2701
2707
|
setIsRemoved(true);
|
|
2702
2708
|
modalRef.current?.close();
|
|
2703
|
-
setTimeout(
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2709
|
+
setTimeout(
|
|
2710
|
+
() => {
|
|
2711
|
+
alertControls2.removeAlert(alert.id);
|
|
2712
|
+
if (!calledOnCloseRef.current) {
|
|
2713
|
+
alert.onClose?.(alert);
|
|
2714
|
+
calledOnCloseRef.current = true;
|
|
2715
|
+
}
|
|
2716
|
+
},
|
|
2717
|
+
0.2 * 1e3 - 10
|
|
2718
|
+
);
|
|
2710
2719
|
}, [alert]);
|
|
2711
2720
|
const alertData = useMemo2(
|
|
2712
2721
|
() => ({
|
|
@@ -2800,7 +2809,7 @@ function Alert2({ alert }) {
|
|
|
2800
2809
|
),
|
|
2801
2810
|
/* @__PURE__ */ jsxs7(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
2802
2811
|
/* @__PURE__ */ jsx10(Text_default, { fontSize: 18, fontWeight: 700, children: alertTitle }),
|
|
2803
|
-
/* @__PURE__ */ jsx10(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
2812
|
+
alert.message && /* @__PURE__ */ jsx10(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
2804
2813
|
] }),
|
|
2805
2814
|
pluginConfig.withCloseButton && /* @__PURE__ */ jsx10(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
|
|
2806
2815
|
] }),
|