react-better-html 1.1.185 → 1.1.187

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
@@ -9426,12 +9426,14 @@ var MenuItemComponent = memo26(function MenuItemComponent2({ item, onClick }) {
9426
9426
  });
9427
9427
  var SideMenuComponent = function SideMenu({
9428
9428
  items,
9429
+ bottomItems,
9429
9430
  topSpace = 0,
9430
9431
  logoAssetName,
9431
9432
  logoUrl,
9432
9433
  logoText,
9433
9434
  logoFontFamily,
9434
9435
  collapsable,
9436
+ withCloseButton,
9435
9437
  widthMobileHandle
9436
9438
  }) {
9437
9439
  const theme2 = useTheme();
@@ -9441,6 +9443,8 @@ var SideMenuComponent = function SideMenu({
9441
9443
  setSideMenuIsOpenMobile.setFalse();
9442
9444
  }, []);
9443
9445
  const readyItems = useMemo11(() => items.filter((item) => !item.hidden), [items]);
9446
+ const readyBottomItems = useMemo11(() => bottomItems?.filter((item) => !item.hidden), [bottomItems]);
9447
+ const isCollapsable = collapsable && !mediaQuery.size1000;
9444
9448
  const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
9445
9449
  const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
9446
9450
  const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
@@ -9457,15 +9461,13 @@ var SideMenuComponent = function SideMenu({
9457
9461
  backgroundColor: theme2.colors.backgroundContent,
9458
9462
  borderRight: `solid 1px ${theme2.colors.border}`,
9459
9463
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
9460
- paddingInline: theme2.styles.space,
9461
9464
  paddingTop: logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space,
9462
- paddingBottom: theme2.styles.space,
9463
9465
  transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
9464
9466
  userSelect: "none",
9465
- zIndex: 11,
9467
+ zIndex: 10,
9466
9468
  children: [
9467
9469
  /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", height: "100%", gap: theme2.styles.space, children: [
9468
- (logoAssetName || logoUrl || mediaQuery.size1000) && /* @__PURE__ */ jsxs22(Div_default.row, { alignItems: "center", children: [
9470
+ (logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs22(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
9469
9471
  (logoAssetName || logoUrl) && /* @__PURE__ */ jsx26(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs22(
9470
9472
  Div_default.row,
9471
9473
  {
@@ -9500,30 +9502,60 @@ var SideMenuComponent = function SideMenu({
9500
9502
  ]
9501
9503
  }
9502
9504
  ) }),
9503
- mediaQuery.size1000 && /* @__PURE__ */ jsx26(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
9505
+ withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx26(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
9504
9506
  ] }),
9505
- /* @__PURE__ */ jsx26(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx26(MenuItemComponent, { item, onClick: onClickXButton }, item.text)) }),
9506
- collapsable && !mediaQuery.size1000 && /* @__PURE__ */ jsx26(
9507
- Div_default.row,
9507
+ /* @__PURE__ */ jsx26(
9508
+ Div_default.column,
9508
9509
  {
9509
- alignItems: "center",
9510
- justifyContent: "center",
9511
- backgroundColor: theme2.colors.backgroundContent,
9512
- borderRadius: theme2.styles.borderRadius,
9510
+ width: "100%",
9511
+ height: "100%",
9512
+ overflowY: "auto",
9513
+ paddingInline: theme2.styles.space,
9514
+ paddingBottom: !isCollapsable && !readyBottomItems ? theme2.styles.space : void 0,
9515
+ children: /* @__PURE__ */ jsx26(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx26(MenuItemComponent, { item, onClick: onClickXButton }, item.text)) })
9516
+ }
9517
+ ),
9518
+ readyBottomItems && /* @__PURE__ */ jsx26(
9519
+ Div_default.column,
9520
+ {
9521
+ borderTop: `solid 1px ${theme2.colors.border}`,
9522
+ gap: theme2.styles.gap / 2,
9513
9523
  marginTop: "auto",
9514
- cursor: "pointer",
9515
- filterHover: filterHover().z1,
9516
- paddingBlock: theme2.styles.gap,
9517
- isTabAccessed: true,
9518
- onClick: setSideMenuIsCollapsed.toggle,
9524
+ paddingTop: theme2.styles.space,
9525
+ paddingInline: theme2.styles.space,
9526
+ paddingBottom: !isCollapsable ? theme2.styles.space : void 0,
9527
+ children: readyBottomItems.map((item) => /* @__PURE__ */ jsx26(MenuItemComponent, { item, onClick: onClickXButton }, item.text))
9528
+ }
9529
+ ),
9530
+ isCollapsable && /* @__PURE__ */ jsx26(
9531
+ Div_default,
9532
+ {
9533
+ borderTop: `solid 1px ${theme2.colors.border}`,
9534
+ marginTop: !readyBottomItems ? "auto" : void 0,
9535
+ paddingInline: theme2.styles.space,
9536
+ paddingBlock: theme2.styles.space,
9519
9537
  children: /* @__PURE__ */ jsx26(
9520
- Icon_default,
9538
+ Div_default.row,
9521
9539
  {
9522
- name: "chevronRight",
9523
- size: 20,
9524
- color: theme2.colors.textSecondary,
9525
- transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
9526
- transition: theme2.styles.transition
9540
+ alignItems: "center",
9541
+ justifyContent: "center",
9542
+ backgroundColor: theme2.colors.backgroundContent,
9543
+ borderRadius: theme2.styles.borderRadius,
9544
+ cursor: "pointer",
9545
+ filterHover: filterHover().z1,
9546
+ isTabAccessed: true,
9547
+ paddingBlock: theme2.styles.gap,
9548
+ onClick: setSideMenuIsCollapsed.toggle,
9549
+ children: /* @__PURE__ */ jsx26(
9550
+ Icon_default,
9551
+ {
9552
+ name: "chevronRight",
9553
+ size: 20,
9554
+ color: theme2.colors.textSecondary,
9555
+ transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
9556
+ transition: theme2.styles.transition
9557
+ }
9558
+ )
9527
9559
  }
9528
9560
  )
9529
9561
  }