react-better-html 1.1.222 → 1.1.224

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.mjs CHANGED
@@ -1569,7 +1569,7 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
1569
1569
  justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
1570
1570
  gap: theme2.styles.space,
1571
1571
  children: [
1572
- /* @__PURE__ */ jsx5(
1572
+ typeof title === "string" ? /* @__PURE__ */ jsx5(
1573
1573
  Text_default,
1574
1574
  {
1575
1575
  as: titleAs,
@@ -1577,12 +1577,12 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
1577
1577
  color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
1578
1578
  children: title
1579
1579
  }
1580
- ),
1580
+ ) : title,
1581
1581
  titleRightElement
1582
1582
  ]
1583
1583
  }
1584
1584
  ),
1585
- description && /* @__PURE__ */ jsx5(
1585
+ description && (typeof description === "string" ? /* @__PURE__ */ jsx5(
1586
1586
  Text_default,
1587
1587
  {
1588
1588
  maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
@@ -1591,7 +1591,7 @@ var PageHeaderComponent = forwardRef5(function PageHeader({
1591
1591
  opacity: lightMode ? 0.7 : void 0,
1592
1592
  children: description
1593
1593
  }
1594
- )
1594
+ ) : description)
1595
1595
  ]
1596
1596
  }
1597
1597
  ),
@@ -1694,8 +1694,11 @@ DivComponent.grid = forwardRef6(function Grid(props, ref) {
1694
1694
  return /* @__PURE__ */ jsx6(DivComponent, { display: "grid", ref, ...props });
1695
1695
  });
1696
1696
  DivComponent.box = forwardRef6(function Box({
1697
+ icon,
1698
+ image,
1697
1699
  imageUrl,
1698
1700
  imageSize,
1701
+ imageAzProfileImage,
1699
1702
  title,
1700
1703
  titleAs,
1701
1704
  titleColor,
@@ -1744,8 +1747,11 @@ DivComponent.box = forwardRef6(function Box({
1744
1747
  /* @__PURE__ */ jsx6(
1745
1748
  PageHeader_default,
1746
1749
  {
1750
+ icon,
1751
+ image,
1747
1752
  imageUrl,
1748
1753
  imageSize,
1754
+ imageAzProfileImage,
1749
1755
  title,
1750
1756
  titleAs,
1751
1757
  titleColor,
@@ -7201,6 +7207,7 @@ import {
7201
7207
  useTheme as useTheme29
7202
7208
  } from "react-better-core";
7203
7209
  import { Fragment as Fragment8, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
7210
+ var tabDotSize2 = 6;
7204
7211
  var sideMenuContext = createContext2(void 0);
7205
7212
  var SideMenuContextProvider = sideMenuContext.Provider;
7206
7213
  var useSideMenuContext = () => {
@@ -7238,6 +7245,10 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7238
7245
  item.onClick?.(item);
7239
7246
  }
7240
7247
  }, [onClick, item, isCollapsed]);
7248
+ const childrenHaveDot = useMemo12(
7249
+ () => item.children?.some((child) => child.withDot) ?? false,
7250
+ [item.children]
7251
+ );
7241
7252
  const isActive = activeItem && item.href && activeItem.href === item.href;
7242
7253
  const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
7243
7254
  const iconSize = 16;
@@ -7297,6 +7308,20 @@ var MenuItemComponent = memo27(function MenuItemComponent2({ item, backgroundCol
7297
7308
  transform: isOpened ? "rotate(180deg)" : void 0,
7298
7309
  transition: theme2.styles.transition
7299
7310
  }
7311
+ ),
7312
+ /* @__PURE__ */ jsx27(
7313
+ Div_default,
7314
+ {
7315
+ position: "absolute",
7316
+ top: (theme2.styles.space - tabDotSize2) / 2,
7317
+ right: (theme2.styles.space - tabDotSize2) / 2,
7318
+ width: tabDotSize2,
7319
+ height: tabDotSize2,
7320
+ backgroundColor: theme2.colors.primary,
7321
+ borderRadius: 999,
7322
+ opacity: item.withDot || childrenHaveDot && !isOpened ? 1 : 0,
7323
+ transition: theme2.styles.transition
7324
+ }
7300
7325
  )
7301
7326
  ]
7302
7327
  }