react-better-html 1.1.227 → 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 +34 -24
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -24
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1474,7 +1474,7 @@ var Image = (0, import_react4.forwardRef)(function Image2({ name, src, ...props
|
|
|
1474
1474
|
}
|
|
1475
1475
|
);
|
|
1476
1476
|
});
|
|
1477
|
-
Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size = 40, letters, backgroundColor, ...props }, ref) {
|
|
1477
|
+
Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size = 40, letters, letterColor, backgroundColor, ...props }, ref) {
|
|
1478
1478
|
const theme2 = (0, import_react_better_core4.useTheme)();
|
|
1479
1479
|
return letters ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1480
1480
|
Div_default.row,
|
|
@@ -1488,7 +1488,7 @@ Image.profileImage = (0, import_react4.forwardRef)(function ProfileImage({ size
|
|
|
1488
1488
|
...props,
|
|
1489
1489
|
width: size,
|
|
1490
1490
|
height: size,
|
|
1491
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text_default, { fontSize: size / 2.5, fontWeight: 700, children: letters.toUpperCase().slice(0, 2) })
|
|
1491
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text_default, { fontSize: size / 2.5, fontWeight: 700, color: letterColor ?? theme2.colors.textPrimary, children: letters.toUpperCase().slice(0, 2) })
|
|
1492
1492
|
}
|
|
1493
1493
|
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
1494
1494
|
Image,
|
|
@@ -2728,25 +2728,31 @@ function Alert2({ alert }) {
|
|
|
2728
2728
|
if (intervalRef.current) clearInterval(intervalRef.current);
|
|
2729
2729
|
if (defaultAlertDisplay === "prominent") return;
|
|
2730
2730
|
setIsRemoved(true);
|
|
2731
|
-
setTimeout(
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2731
|
+
setTimeout(
|
|
2732
|
+
() => {
|
|
2733
|
+
alertControls2.removeAlert(alert.id);
|
|
2734
|
+
if (!calledOnCloseRef.current) {
|
|
2735
|
+
alert.onClose?.(alert);
|
|
2736
|
+
calledOnCloseRef.current = true;
|
|
2737
|
+
}
|
|
2738
|
+
},
|
|
2739
|
+
0.2 * 1e3 - 10
|
|
2740
|
+
);
|
|
2738
2741
|
}
|
|
2739
2742
|
}, updateInterval);
|
|
2740
2743
|
}, [alert, progress, defaultAlertDisplay]);
|
|
2741
2744
|
const onClickCloseAlert = (0, import_react12.useCallback)(() => {
|
|
2742
2745
|
setIsRemoved(true);
|
|
2743
|
-
setTimeout(
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2746
|
+
setTimeout(
|
|
2747
|
+
() => {
|
|
2748
|
+
alertControls2.removeAlert(alert.id);
|
|
2749
|
+
if (!calledOnCloseRef.current) {
|
|
2750
|
+
alert.onClose?.(alert);
|
|
2751
|
+
calledOnCloseRef.current = true;
|
|
2752
|
+
}
|
|
2753
|
+
},
|
|
2754
|
+
0.2 * 1e3 - 10
|
|
2755
|
+
);
|
|
2750
2756
|
}, [alert]);
|
|
2751
2757
|
const onMouseEnter = (0, import_react12.useCallback)(() => {
|
|
2752
2758
|
setIsPaused(true);
|
|
@@ -2763,13 +2769,16 @@ function Alert2({ alert }) {
|
|
|
2763
2769
|
const onClickAlertModalDone = (0, import_react12.useCallback)(() => {
|
|
2764
2770
|
setIsRemoved(true);
|
|
2765
2771
|
modalRef.current?.close();
|
|
2766
|
-
setTimeout(
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2772
|
+
setTimeout(
|
|
2773
|
+
() => {
|
|
2774
|
+
alertControls2.removeAlert(alert.id);
|
|
2775
|
+
if (!calledOnCloseRef.current) {
|
|
2776
|
+
alert.onClose?.(alert);
|
|
2777
|
+
calledOnCloseRef.current = true;
|
|
2778
|
+
}
|
|
2779
|
+
},
|
|
2780
|
+
0.2 * 1e3 - 10
|
|
2781
|
+
);
|
|
2773
2782
|
}, [alert]);
|
|
2774
2783
|
const alertData = (0, import_react12.useMemo)(
|
|
2775
2784
|
() => ({
|
|
@@ -2863,7 +2872,7 @@ function Alert2({ alert }) {
|
|
|
2863
2872
|
),
|
|
2864
2873
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
2865
2874
|
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { fontSize: 18, fontWeight: 700, children: alertTitle }),
|
|
2866
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
2875
|
+
alert.message && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Text_default, { color: theme2.colors.textSecondary, children: alert.message })
|
|
2867
2876
|
] }),
|
|
2868
2877
|
pluginConfig.withCloseButton && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Button_default.icon, { icon: "XMark", alignSelf: "flex-start", onClick: onClickCloseAlert })
|
|
2869
2878
|
] }),
|
|
@@ -3657,6 +3666,7 @@ var DropdownComponent = (0, import_react18.forwardRef)(function Dropdown({
|
|
|
3657
3666
|
const onChangeValue = (0, import_react18.useCallback)(
|
|
3658
3667
|
(newValue) => {
|
|
3659
3668
|
setSearchQuery(newValue);
|
|
3669
|
+
setIsOpen.setTrue();
|
|
3660
3670
|
if (withDebounce) setDebouncedSearchQuery(newValue);
|
|
3661
3671
|
else onChangeSearch?.(newValue);
|
|
3662
3672
|
},
|