react-better-html 1.1.236 → 1.1.237

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
@@ -5514,7 +5514,12 @@ var FormComponent = forwardRef13(function Form({
5514
5514
  return /* @__PURE__ */ jsx19(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs16("form", { name, onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
5515
5515
  gap !== void 0 || withDividers ? /* @__PURE__ */ jsx19(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs16(Fragment5, { children: [
5516
5516
  child,
5517
- index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(Divider_default.horizontal, { width: theme2.styles.borderWidth })
5517
+ index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(
5518
+ Divider_default.horizontal,
5519
+ {
5520
+ width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth
5521
+ }
5522
+ )
5518
5523
  ] }, index)) : children }) : children,
5519
5524
  submitButtonText && /* @__PURE__ */ jsxs16(
5520
5525
  Div_default.row,
@@ -6967,7 +6972,15 @@ TooltipComponent.item = forwardRef16(function Item({
6967
6972
  });
6968
6973
  TooltipComponent.divider = forwardRef16(function DividerComponent(props, ref) {
6969
6974
  const theme2 = useTheme26();
6970
- return /* @__PURE__ */ jsx24(Divider_default.horizontal, { width: theme2.styles.borderWidth, marginBlock: theme2.styles.gap, ...props, ref });
6975
+ return /* @__PURE__ */ jsx24(
6976
+ Divider_default.horizontal,
6977
+ {
6978
+ width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth,
6979
+ marginBlock: theme2.styles.gap,
6980
+ ...props,
6981
+ ref
6982
+ }
6983
+ );
6971
6984
  });
6972
6985
  TooltipComponent.sectionTitle = forwardRef16(function SectionTitle({ text, ...props }, ref) {
6973
6986
  const theme2 = useTheme26();
@@ -7298,7 +7311,7 @@ var FoldableComponent = forwardRef18(function Foldable({
7298
7311
  ]
7299
7312
  }
7300
7313
  ),
7301
- /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, { width: theme2.styles.borderWidth }) }),
7314
+ /* @__PURE__ */ jsx26(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx26(Divider_default.horizontal, { width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth }) }),
7302
7315
  /* @__PURE__ */ jsx26(
7303
7316
  Div_default,
7304
7317
  {
@@ -7562,10 +7575,16 @@ var SideMenuComponent = function SideMenu({
7562
7575
  withCloseButton,
7563
7576
  widthMobileHandle,
7564
7577
  absoluteComponent,
7565
- additionalComponent,
7578
+ itemsAdditionalComponent,
7579
+ betweenItemsAdditionalComponent,
7580
+ bottomItemsAdditionalComponent,
7566
7581
  isLoading,
7567
7582
  backgroundColor,
7568
- paddingTop
7583
+ gap,
7584
+ paddingTop,
7585
+ paddingBottom,
7586
+ renderItemsHolder,
7587
+ renderBottomItemsHolder
7569
7588
  }) {
7570
7589
  const theme2 = useTheme29();
7571
7590
  const mediaQuery = useMediaQuery();
@@ -7590,9 +7609,49 @@ var SideMenuComponent = function SideMenu({
7590
7609
  const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
7591
7610
  const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
7592
7611
  const logoSize = sideMenuCollapsedWidth - theme2.styles.space * 2;
7612
+ const itemsComponent = /* @__PURE__ */ jsx27(
7613
+ Div_default.column,
7614
+ {
7615
+ width: "100%",
7616
+ height: "100%",
7617
+ overflowY: !isCollapsed ? "auto" : void 0,
7618
+ paddingInline: !renderItemsHolder ? theme2.styles.space : void 0,
7619
+ paddingBottom: !renderItemsHolder ? !isCollapsable && !readyBottomItems ? theme2.styles.space : void 0 : void 0,
7620
+ children: /* @__PURE__ */ jsx27(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx27(
7621
+ MenuItemComponent,
7622
+ {
7623
+ item,
7624
+ backgroundColor: readyBackgroundColor,
7625
+ onClick: onClickXButton
7626
+ },
7627
+ item.text
7628
+ )) })
7629
+ }
7630
+ );
7631
+ const bottomItemsComponent = /* @__PURE__ */ jsx27(
7632
+ Div_default.column,
7633
+ {
7634
+ borderTop: mediaQuery.size1000 ? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
7635
+ gap: theme2.styles.gap / 2,
7636
+ marginTop: "auto",
7637
+ paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
7638
+ paddingInline: !renderItemsHolder ? theme2.styles.space : void 0,
7639
+ paddingBottom: !renderItemsHolder ? !isCollapsable ? theme2.styles.space : void 0 : void 0,
7640
+ children: readyBottomItems?.map((item) => /* @__PURE__ */ jsx27(
7641
+ MenuItemComponent,
7642
+ {
7643
+ item,
7644
+ backgroundColor: readyBackgroundColor,
7645
+ onClick: onClickXButton
7646
+ },
7647
+ item.text
7648
+ ))
7649
+ }
7650
+ );
7593
7651
  return /* @__PURE__ */ jsx27(SideMenuContextProvider, { value: contextValue, children: /* @__PURE__ */ jsxs24(
7594
7652
  Div_default.column,
7595
7653
  {
7654
+ as: "aside",
7596
7655
  position: "fixed",
7597
7656
  width: mediaQuery.size1000 ? "100%" : isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth,
7598
7657
  height: `calc(100svh - ${topSpace}px)`,
@@ -7602,11 +7661,12 @@ var SideMenuComponent = function SideMenu({
7602
7661
  borderRight: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
7603
7662
  transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : "translateX(-100%)",
7604
7663
  paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
7664
+ paddingBottom,
7605
7665
  transition: mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition,
7606
7666
  userSelect: "none",
7607
7667
  zIndex: 10,
7608
7668
  children: [
7609
- /* @__PURE__ */ jsxs24(Div_default.column, { width: "100%", height: "100%", gap: theme2.styles.space, children: [
7669
+ /* @__PURE__ */ jsxs24(Div_default.column, { width: "100%", height: "100%", gap: gap ?? theme2.styles.space, children: [
7610
7670
  (logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs24(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
7611
7671
  (logoAssetName || logoUrl) && /* @__PURE__ */ jsx27(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs24(
7612
7672
  Div_default.row,
@@ -7644,48 +7704,13 @@ var SideMenuComponent = function SideMenu({
7644
7704
  ) }),
7645
7705
  withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx27(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
7646
7706
  ] }),
7707
+ itemsAdditionalComponent,
7647
7708
  !isLoading ? /* @__PURE__ */ jsxs24(Fragment8, { children: [
7648
- /* @__PURE__ */ jsx27(
7649
- Div_default.column,
7650
- {
7651
- width: "100%",
7652
- height: "100%",
7653
- overflowY: !isCollapsed ? "auto" : void 0,
7654
- paddingInline: theme2.styles.space,
7655
- paddingBottom: !isCollapsable && !readyBottomItems ? theme2.styles.space : void 0,
7656
- children: /* @__PURE__ */ jsx27(Div_default.column, { gap: theme2.styles.gap / 2, children: readyItems.map((item) => /* @__PURE__ */ jsx27(
7657
- MenuItemComponent,
7658
- {
7659
- item,
7660
- backgroundColor: readyBackgroundColor,
7661
- onClick: onClickXButton
7662
- },
7663
- item.text
7664
- )) })
7665
- }
7666
- ),
7667
- readyBottomItems && /* @__PURE__ */ jsx27(
7668
- Div_default.column,
7669
- {
7670
- borderTop: mediaQuery.size1000 ? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
7671
- gap: theme2.styles.gap / 2,
7672
- marginTop: "auto",
7673
- paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
7674
- paddingInline: theme2.styles.space,
7675
- paddingBottom: !isCollapsable ? theme2.styles.space : void 0,
7676
- children: readyBottomItems.map((item) => /* @__PURE__ */ jsx27(
7677
- MenuItemComponent,
7678
- {
7679
- item,
7680
- backgroundColor: readyBackgroundColor,
7681
- onClick: onClickXButton
7682
- },
7683
- item.text
7684
- ))
7685
- }
7686
- )
7709
+ renderItemsHolder ? renderItemsHolder(itemsComponent) : itemsComponent,
7710
+ betweenItemsAdditionalComponent,
7711
+ readyBottomItems && /* @__PURE__ */ jsx27(Fragment8, { children: renderBottomItemsHolder ? renderBottomItemsHolder(bottomItemsComponent) : bottomItemsComponent })
7687
7712
  ] }) : /* @__PURE__ */ jsx27(Div_default, { flex: 1, children: /* @__PURE__ */ jsx27(Loader_default.box, { text: isCollapsed ? "" : void 0 }) }),
7688
- additionalComponent,
7713
+ bottomItemsAdditionalComponent,
7689
7714
  isCollapsable && /* @__PURE__ */ jsx27(
7690
7715
  Div_default,
7691
7716
  {