react-better-html 1.1.137 → 1.1.139
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 +11 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3503,6 +3503,7 @@ var PageHolderComponent = forwardRef7(function PageHolder({ noMaxContentWidth, c
|
|
|
3503
3503
|
});
|
|
3504
3504
|
PageHolderComponent.center = forwardRef7(function Center({
|
|
3505
3505
|
pageBackgroundColor,
|
|
3506
|
+
contentMaxWidth,
|
|
3506
3507
|
sideImageSrc,
|
|
3507
3508
|
sideImageName,
|
|
3508
3509
|
sideImagePosition = "right",
|
|
@@ -3531,7 +3532,7 @@ PageHolderComponent.center = forwardRef7(function Center({
|
|
|
3531
3532
|
Div_default.box,
|
|
3532
3533
|
{
|
|
3533
3534
|
width: `calc(100% - ${theme2.styles.space}px * 2)`,
|
|
3534
|
-
maxWidth: !noMaxContentWidth ? app.contentMaxWidth / 2 : void 0,
|
|
3535
|
+
maxWidth: !noMaxContentWidth ? contentMaxWidth ?? app.contentMaxWidth / 2 : void 0,
|
|
3535
3536
|
marginInline: theme2.styles.space,
|
|
3536
3537
|
marginBlock: theme2.styles.space,
|
|
3537
3538
|
...props,
|
|
@@ -8666,7 +8667,7 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
8666
8667
|
const theme2 = useTheme();
|
|
8667
8668
|
const bodyRef = useRef9(null);
|
|
8668
8669
|
const [internalIsOpen, setInternalIsOpen] = useBooleanState(defaultOpen);
|
|
8669
|
-
const [bodyVirtualHeight, setBodyVirtualHeight] = useState12(
|
|
8670
|
+
const [bodyVirtualHeight, setBodyVirtualHeight] = useState12();
|
|
8670
8671
|
const isOpen = controlledIsOpen !== void 0 ? controlledIsOpen : internalIsOpen;
|
|
8671
8672
|
const open = useCallback14(() => {
|
|
8672
8673
|
if (controlledIsOpen === void 0) setInternalIsOpen.setTrue();
|
|
@@ -8682,7 +8683,14 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
8682
8683
|
}, [controlledIsOpen, isOpen, onOpenChange]);
|
|
8683
8684
|
useEffect13(() => {
|
|
8684
8685
|
if (!bodyRef.current) return;
|
|
8685
|
-
|
|
8686
|
+
const body = bodyRef.current;
|
|
8687
|
+
setBodyVirtualHeight(body.scrollHeight * 2);
|
|
8688
|
+
const timeout = setTimeout(() => {
|
|
8689
|
+
setBodyVirtualHeight(body.scrollHeight * 2);
|
|
8690
|
+
}, 0.2 * 1e3);
|
|
8691
|
+
return () => {
|
|
8692
|
+
clearTimeout(timeout);
|
|
8693
|
+
};
|
|
8686
8694
|
}, [isOpen]);
|
|
8687
8695
|
useImperativeHandle5(
|
|
8688
8696
|
ref,
|