react-better-html 1.1.186 → 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,6 +9426,7 @@ 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,
@@ -9442,6 +9443,8 @@ var SideMenuComponent = function SideMenu({
9442
9443
  setSideMenuIsOpenMobile.setFalse();
9443
9444
  }, []);
9444
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;
9445
9448
  const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
9446
9449
  const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
9447
9450
  const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
@@ -9458,15 +9461,13 @@ var SideMenuComponent = function SideMenu({
9458
9461
  backgroundColor: theme2.colors.backgroundContent,
9459
9462
  borderRight: `solid 1px ${theme2.colors.border}`,
9460
9463
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
9461
- paddingInline: theme2.styles.space,
9462
9464
  paddingTop: logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space,
9463
- paddingBottom: theme2.styles.space,
9464
9465
  transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
9465
9466
  userSelect: "none",
9466
- zIndex: 11,
9467
+ zIndex: 10,
9467
9468
  children: [
9468
9469
  /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", height: "100%", gap: theme2.styles.space, children: [
9469
- (logoAssetName || logoUrl || withCloseButton && 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: [
9470
9471
  (logoAssetName || logoUrl) && /* @__PURE__ */ jsx26(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs22(
9471
9472
  Div_default.row,
9472
9473
  {
@@ -9503,28 +9504,58 @@ var SideMenuComponent = function SideMenu({
9503
9504
  ) }),
9504
9505
  withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx26(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
9505
9506
  ] }),
9506
- /* @__PURE__ */ jsx26(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx26(MenuItemComponent, { item, onClick: onClickXButton }, item.text)) }),
9507
- collapsable && !mediaQuery.size1000 && /* @__PURE__ */ jsx26(
9508
- Div_default.row,
9507
+ /* @__PURE__ */ jsx26(
9508
+ Div_default.column,
9509
9509
  {
9510
- alignItems: "center",
9511
- justifyContent: "center",
9512
- backgroundColor: theme2.colors.backgroundContent,
9513
- 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,
9514
9523
  marginTop: "auto",
9515
- cursor: "pointer",
9516
- filterHover: filterHover().z1,
9517
- paddingBlock: theme2.styles.gap,
9518
- isTabAccessed: true,
9519
- 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,
9520
9537
  children: /* @__PURE__ */ jsx26(
9521
- Icon_default,
9538
+ Div_default.row,
9522
9539
  {
9523
- name: "chevronRight",
9524
- size: 20,
9525
- color: theme2.colors.textSecondary,
9526
- transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
9527
- 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
+ )
9528
9559
  }
9529
9560
  )
9530
9561
  }