react-better-html 1.1.249 → 1.1.251
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 +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -989,6 +989,8 @@ type TooltipProps = {
|
|
|
989
989
|
contentWidth?: React.CSSProperties["width"];
|
|
990
990
|
contentMinWidth?: React.CSSProperties["minWidth"];
|
|
991
991
|
contentPointerEvents?: React.CSSProperties["pointerEvents"];
|
|
992
|
+
contentPaddingBlock?: React.CSSProperties["paddingBlock"];
|
|
993
|
+
contentPaddingInline?: React.CSSProperties["paddingInline"];
|
|
992
994
|
/** @default "fit-content" */
|
|
993
995
|
childrenWrapperWidth?: React.CSSProperties["width"];
|
|
994
996
|
childrenWrapperHeight?: React.CSSProperties["height"];
|
|
@@ -1108,6 +1110,8 @@ type SideMenuProps = {
|
|
|
1108
1110
|
gap?: React.CSSProperties["gap"];
|
|
1109
1111
|
paddingTop?: React.CSSProperties["paddingTop"];
|
|
1110
1112
|
paddingBottom?: React.CSSProperties["paddingBottom"];
|
|
1113
|
+
/** @default "left" */
|
|
1114
|
+
mobileFoldToPosition?: "left" | "right";
|
|
1111
1115
|
renderItemsHolder?: (items: React.ReactNode) => React.ReactNode;
|
|
1112
1116
|
renderBottomItemsHolder?: (items: React.ReactNode) => React.ReactNode;
|
|
1113
1117
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -989,6 +989,8 @@ type TooltipProps = {
|
|
|
989
989
|
contentWidth?: React.CSSProperties["width"];
|
|
990
990
|
contentMinWidth?: React.CSSProperties["minWidth"];
|
|
991
991
|
contentPointerEvents?: React.CSSProperties["pointerEvents"];
|
|
992
|
+
contentPaddingBlock?: React.CSSProperties["paddingBlock"];
|
|
993
|
+
contentPaddingInline?: React.CSSProperties["paddingInline"];
|
|
992
994
|
/** @default "fit-content" */
|
|
993
995
|
childrenWrapperWidth?: React.CSSProperties["width"];
|
|
994
996
|
childrenWrapperHeight?: React.CSSProperties["height"];
|
|
@@ -1108,6 +1110,8 @@ type SideMenuProps = {
|
|
|
1108
1110
|
gap?: React.CSSProperties["gap"];
|
|
1109
1111
|
paddingTop?: React.CSSProperties["paddingTop"];
|
|
1110
1112
|
paddingBottom?: React.CSSProperties["paddingBottom"];
|
|
1113
|
+
/** @default "left" */
|
|
1114
|
+
mobileFoldToPosition?: "left" | "right";
|
|
1111
1115
|
renderItemsHolder?: (items: React.ReactNode) => React.ReactNode;
|
|
1112
1116
|
renderBottomItemsHolder?: (items: React.ReactNode) => React.ReactNode;
|
|
1113
1117
|
};
|
package/dist/index.js
CHANGED
|
@@ -1271,7 +1271,7 @@ function useForm(options) {
|
|
|
1271
1271
|
setErrors({});
|
|
1272
1272
|
}, [defaultValues]);
|
|
1273
1273
|
const isDirty = (0, import_react.useMemo)(
|
|
1274
|
-
() => Object.keys(defaultValues).some((key) => defaultValues[key] !== values[key]),
|
|
1274
|
+
() => Object.keys(defaultValues).some((key) => JSON.stringify(defaultValues[key]) !== JSON.stringify(values[key])),
|
|
1275
1275
|
[defaultValues, values]
|
|
1276
1276
|
);
|
|
1277
1277
|
const isValid = (0, import_react.useMemo)(() => {
|
|
@@ -2259,8 +2259,8 @@ var ButtonComponent = function Button(buttonProps) {
|
|
|
2259
2259
|
isLoading: isLoadingElement,
|
|
2260
2260
|
withNoBorder: theme2.styles.borderWidth === 0,
|
|
2261
2261
|
disabled,
|
|
2262
|
-
to: href,
|
|
2263
|
-
href,
|
|
2262
|
+
to: !disabled && !isLoadingElement ? href : void 0,
|
|
2263
|
+
href: !disabled && !isLoadingElement ? href : void 0,
|
|
2264
2264
|
download,
|
|
2265
2265
|
target,
|
|
2266
2266
|
type: isSubmit && !isLoadingElement ? "submit" : "button",
|
|
@@ -7173,6 +7173,8 @@ var TooltipComponent = (0, import_react28.forwardRef)(function Tooltip({
|
|
|
7173
7173
|
contentWidth,
|
|
7174
7174
|
contentMinWidth,
|
|
7175
7175
|
contentPointerEvents = "auto",
|
|
7176
|
+
contentPaddingBlock,
|
|
7177
|
+
contentPaddingInline,
|
|
7176
7178
|
childrenWrapperWidth = "fit-content",
|
|
7177
7179
|
childrenWrapperHeight,
|
|
7178
7180
|
disabled,
|
|
@@ -7312,8 +7314,8 @@ var TooltipComponent = (0, import_react28.forwardRef)(function Tooltip({
|
|
|
7312
7314
|
minWidth: contentMinWidth,
|
|
7313
7315
|
backgroundColor: backgroundColor ?? theme2.colors.backgroundContent,
|
|
7314
7316
|
boxShadow: "0px 10px 20px #00000020",
|
|
7315
|
-
paddingBlock: isSmall ? theme2.styles.gap / 2 : theme2.styles.gap,
|
|
7316
|
-
paddingInline: asContextMenu ? 0 : isSmall ? theme2.styles.space / 2 : theme2.styles.space,
|
|
7317
|
+
paddingBlock: contentPaddingBlock ?? (isSmall ? theme2.styles.gap / 2 : theme2.styles.gap),
|
|
7318
|
+
paddingInline: contentPaddingInline ?? (asContextMenu ? 0 : isSmall ? theme2.styles.space / 2 : theme2.styles.space),
|
|
7317
7319
|
overflow: asContextMenu ? "hidden" : void 0,
|
|
7318
7320
|
children: content
|
|
7319
7321
|
}
|
|
@@ -8019,6 +8021,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8019
8021
|
gap,
|
|
8020
8022
|
paddingTop,
|
|
8021
8023
|
paddingBottom,
|
|
8024
|
+
mobileFoldToPosition = "left",
|
|
8022
8025
|
renderItemsHolder,
|
|
8023
8026
|
renderBottomItemsHolder
|
|
8024
8027
|
}) {
|
|
@@ -8099,7 +8102,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8099
8102
|
left: 0,
|
|
8100
8103
|
backgroundColor: readyBackgroundColor,
|
|
8101
8104
|
borderRight: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8102
|
-
transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" :
|
|
8105
|
+
transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : `translateX(${mobileFoldToPosition === "left" ? "-" : ""}100%)`,
|
|
8103
8106
|
paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
|
|
8104
8107
|
paddingBottom,
|
|
8105
8108
|
transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
|