react-better-html 1.1.222 → 1.1.223
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 +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7201,6 +7201,7 @@ import {
|
|
|
7201
7201
|
useTheme as useTheme29
|
|
7202
7202
|
} from "react-better-core";
|
|
7203
7203
|
import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
7204
|
+
var tabDotSize2 = 6;
|
|
7204
7205
|
var sideMenuContext = createContext2(void 0);
|
|
7205
7206
|
var SideMenuContextProvider = sideMenuContext.Provider;
|
|
7206
7207
|
var useSideMenuContext = () => {
|
|
@@ -7238,6 +7239,10 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
|
|
|
7238
7239
|
item.onClick?.(item);
|
|
7239
7240
|
}
|
|
7240
7241
|
}, [onClick, item, isCollapsed]);
|
|
7242
|
+
const childrenHaveDot = useMemo12(
|
|
7243
|
+
() => item.children?.some((child) => child.withDot) ?? false,
|
|
7244
|
+
[item.children]
|
|
7245
|
+
);
|
|
7241
7246
|
const isActive = activeItem && item.href && activeItem.href === item.href;
|
|
7242
7247
|
const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
|
|
7243
7248
|
const iconSize = 16;
|
|
@@ -7297,6 +7302,20 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
|
|
|
7297
7302
|
transform: isOpened ? "rotate(180deg)" : void 0,
|
|
7298
7303
|
transition: theme2.styles.transition
|
|
7299
7304
|
}
|
|
7305
|
+
),
|
|
7306
|
+
/* @__PURE__ */ jsx27(
|
|
7307
|
+
Div_default,
|
|
7308
|
+
{
|
|
7309
|
+
position: "absolute",
|
|
7310
|
+
top: (theme2.styles.space - tabDotSize2) / 2,
|
|
7311
|
+
right: (theme2.styles.space - tabDotSize2) / 2,
|
|
7312
|
+
width: tabDotSize2,
|
|
7313
|
+
height: tabDotSize2,
|
|
7314
|
+
backgroundColor: theme2.colors.primary,
|
|
7315
|
+
borderRadius: 999,
|
|
7316
|
+
opacity: item.withDot || childrenHaveDot && !isOpened ? 1 : 0,
|
|
7317
|
+
transition: theme2.styles.transition
|
|
7318
|
+
}
|
|
7300
7319
|
)
|
|
7301
7320
|
]
|
|
7302
7321
|
}
|