react-better-html 1.1.277 → 1.1.279
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 +15 -2
- package/dist/index.d.ts +15 -2
- package/dist/index.js +199 -140
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +199 -140
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -42,6 +42,7 @@ var appConfig = {
|
|
|
42
42
|
};
|
|
43
43
|
var defaultAlertDuration = 2.3 * 1e3;
|
|
44
44
|
var defaultSideMenuWidth = 300;
|
|
45
|
+
var defaultSideBarWidth = 80;
|
|
45
46
|
|
|
46
47
|
// src/constants/theme.ts
|
|
47
48
|
var theme = {};
|
|
@@ -7630,6 +7631,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7630
7631
|
accentColor,
|
|
7631
7632
|
style = "default",
|
|
7632
7633
|
gap,
|
|
7634
|
+
borderRadius,
|
|
7633
7635
|
noBottomLine,
|
|
7634
7636
|
keepUrlHistory = true,
|
|
7635
7637
|
onChange,
|
|
@@ -7642,7 +7644,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7642
7644
|
const { language, componentsState } = useBetterHtmlContextInternal();
|
|
7643
7645
|
const firstRenderPassedRef = useRef8(false);
|
|
7644
7646
|
const tabsRef = useRef8({});
|
|
7645
|
-
const tabsGap = gap ?? (style === "box" ? theme2.styles.gap / 2 : 0);
|
|
7647
|
+
const tabsGap = gap ?? (style === "box" || style === "bubble" ? theme2.styles.gap / 2 : 0);
|
|
7646
7648
|
const [selectedTabId, setSelectedTabId] = useState13(() => {
|
|
7647
7649
|
const selectedTabId2 = tabs[0];
|
|
7648
7650
|
if (!selectedTabId2) return "";
|
|
@@ -7734,9 +7736,10 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7734
7736
|
selectTab: onClickTab
|
|
7735
7737
|
};
|
|
7736
7738
|
}, [selectedTabId, onClickTab]);
|
|
7739
|
+
const readyBorderRadius = borderRadius ?? (style === "bubble" ? theme2.styles.borderRadius : void 0);
|
|
7737
7740
|
return /* @__PURE__ */ jsxs22(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
|
|
7738
7741
|
/* @__PURE__ */ jsxs22(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
|
|
7739
|
-
/* @__PURE__ */ jsx26(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
|
|
7742
|
+
/* @__PURE__ */ jsx26(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", zIndex: 2, children: tabs.map((tab) => {
|
|
7740
7743
|
const selected = tab.id === selectedTabId;
|
|
7741
7744
|
return /* @__PURE__ */ jsxs22(
|
|
7742
7745
|
Div_default,
|
|
@@ -7744,8 +7747,9 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7744
7747
|
className: `react-better-html-tabs-tab${selected ? " react-better-html-tabs-tab-selected" : ""}`,
|
|
7745
7748
|
position: "relative",
|
|
7746
7749
|
width: "fit-content",
|
|
7747
|
-
backgroundColor: style === "box" ? selected ? accentColor ?? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
7748
|
-
|
|
7750
|
+
backgroundColor: style === "bubble" ? theme2.colors.textPrimary + "00" : style === "box" ? selected ? accentColor ?? theme2.colors.primary : theme2.colors.backgroundContent : theme2.colors.backgroundBase,
|
|
7751
|
+
backgroundColorHover: style === "bubble" ? theme2.colors.textPrimary + "20" : void 0,
|
|
7752
|
+
borderRadius: readyBorderRadius ?? (style === "box" ? theme2.styles.borderRadius : void 0),
|
|
7749
7753
|
borderTopLeftRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
|
|
7750
7754
|
borderTopRightRadius: style === "borderRadiusTop" ? theme2.styles.borderRadius : void 0,
|
|
7751
7755
|
border: style === "box" ? `${theme2.styles.borderWidth}px solid ${selected ? "transparent" : theme2.colors.border}` : void 0,
|
|
@@ -7778,7 +7782,7 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7778
7782
|
Text_default,
|
|
7779
7783
|
{
|
|
7780
7784
|
fontWeight: 700,
|
|
7781
|
-
color: !selected ? theme2.colors.textSecondary : style === "box" ? theme2.colors.base : void 0,
|
|
7785
|
+
color: !selected ? theme2.colors.textSecondary : style === "box" || style === "bubble" ? theme2.colors.base : void 0,
|
|
7782
7786
|
transition: theme2.styles.transition,
|
|
7783
7787
|
whiteSpace: "nowrap",
|
|
7784
7788
|
children: tab.label ?? tab.id
|
|
@@ -7789,7 +7793,20 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7789
7793
|
tab.id
|
|
7790
7794
|
);
|
|
7791
7795
|
}) }),
|
|
7792
|
-
style !== "box" && !noBottomLine && /* @__PURE__ */ jsx26(
|
|
7796
|
+
style !== "box" && !noBottomLine && (style === "bubble" ? /* @__PURE__ */ jsx26(
|
|
7797
|
+
Div_default,
|
|
7798
|
+
{
|
|
7799
|
+
position: "absolute",
|
|
7800
|
+
width,
|
|
7801
|
+
height: "100%",
|
|
7802
|
+
bottom: 0,
|
|
7803
|
+
left: leftSpacing,
|
|
7804
|
+
backgroundColor: accentColor ?? theme2.colors.primary,
|
|
7805
|
+
borderRadius: readyBorderRadius,
|
|
7806
|
+
transition: firstRenderPassedRef.current ? theme2.styles.transition : "none",
|
|
7807
|
+
zIndex: 1
|
|
7808
|
+
}
|
|
7809
|
+
) : /* @__PURE__ */ jsx26(
|
|
7793
7810
|
Div_default,
|
|
7794
7811
|
{
|
|
7795
7812
|
position: "absolute",
|
|
@@ -7798,9 +7815,10 @@ var TabsComponent = forwardRef17(function Tabs({
|
|
|
7798
7815
|
bottom: 0,
|
|
7799
7816
|
left: leftSpacing,
|
|
7800
7817
|
backgroundColor: accentColor ?? theme2.colors.primary,
|
|
7801
|
-
transition: firstRenderPassedRef.current ? theme2.styles.transition : "none"
|
|
7818
|
+
transition: firstRenderPassedRef.current ? theme2.styles.transition : "none",
|
|
7819
|
+
zIndex: 2
|
|
7802
7820
|
}
|
|
7803
|
-
)
|
|
7821
|
+
))
|
|
7804
7822
|
] }),
|
|
7805
7823
|
children && /* @__PURE__ */ jsx26(Div_default, { width: "100%", children })
|
|
7806
7824
|
] });
|
|
@@ -7837,6 +7855,7 @@ var animationDurationOpen = animationDurationClose * 2;
|
|
|
7837
7855
|
var FoldableComponent = forwardRef18(function Foldable({
|
|
7838
7856
|
isOpen: controlledIsOpen,
|
|
7839
7857
|
defaultOpen = false,
|
|
7858
|
+
withoutLine,
|
|
7840
7859
|
icon,
|
|
7841
7860
|
iconColor,
|
|
7842
7861
|
iconSize,
|
|
@@ -7954,7 +7973,7 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
7954
7973
|
]
|
|
7955
7974
|
}
|
|
7956
7975
|
),
|
|
7957
|
-
/* @__PURE__ */ jsx27(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx27(Divider_default.horizontal, { width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth }) }),
|
|
7976
|
+
!withoutLine && /* @__PURE__ */ jsx27(Div_default, { height: isOpen ? 1 : 0, opacity: isOpen ? 1 : 0, transition: theme2.styles.transition, children: /* @__PURE__ */ jsx27(Divider_default.horizontal, { width: theme2.styles.borderWidth === 0 ? 1 : theme2.styles.borderWidth }) }),
|
|
7958
7977
|
/* @__PURE__ */ jsx27(
|
|
7959
7978
|
Div_default,
|
|
7960
7979
|
{
|
|
@@ -8254,6 +8273,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8254
8273
|
items,
|
|
8255
8274
|
bottomItems,
|
|
8256
8275
|
location,
|
|
8276
|
+
position = "left",
|
|
8257
8277
|
topSpace = 0,
|
|
8258
8278
|
logoAssetName,
|
|
8259
8279
|
logoUrl,
|
|
@@ -8266,6 +8286,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8266
8286
|
itemsAdditionalComponent,
|
|
8267
8287
|
betweenItemsAdditionalComponent,
|
|
8268
8288
|
bottomItemsAdditionalComponent,
|
|
8289
|
+
border,
|
|
8269
8290
|
isLoading,
|
|
8270
8291
|
backgroundColor,
|
|
8271
8292
|
activeItemColor,
|
|
@@ -8274,8 +8295,10 @@ var SideMenuComponent = function SideMenu({
|
|
|
8274
8295
|
paddingTop,
|
|
8275
8296
|
paddingBottom,
|
|
8276
8297
|
mobileFoldToPosition = "left",
|
|
8298
|
+
sideBar,
|
|
8277
8299
|
renderItemsHolder,
|
|
8278
|
-
renderBottomItemsHolder
|
|
8300
|
+
renderBottomItemsHolder,
|
|
8301
|
+
children
|
|
8279
8302
|
}) {
|
|
8280
8303
|
const theme2 = useTheme29();
|
|
8281
8304
|
const mediaQuery = useMediaQuery();
|
|
@@ -8293,17 +8316,21 @@ var SideMenuComponent = function SideMenu({
|
|
|
8293
8316
|
activeItem,
|
|
8294
8317
|
setActiveItem,
|
|
8295
8318
|
items: itemsState,
|
|
8296
|
-
bottomItems: bottomItemsState
|
|
8319
|
+
bottomItems: bottomItemsState,
|
|
8320
|
+
position
|
|
8297
8321
|
}),
|
|
8298
|
-
[activeItem, itemsState, bottomItemsState]
|
|
8322
|
+
[activeItem, itemsState, bottomItemsState, position]
|
|
8299
8323
|
);
|
|
8300
8324
|
const isCollapsable = collapsable && !mediaQuery.size1000;
|
|
8301
8325
|
const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
|
|
8302
8326
|
const LinkComponentTag = components.button?.tagReplacement?.linkComponent ?? "a";
|
|
8303
8327
|
const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
|
|
8304
8328
|
const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
|
|
8329
|
+
const sideBarWidth = components.sideMenu?.width ?? defaultSideBarWidth;
|
|
8305
8330
|
const readyBackgroundColor = backgroundColor ?? theme2.colors.backgroundContent;
|
|
8306
8331
|
const logoSize = sideMenuCollapsedWidth - theme2.styles.space * 2;
|
|
8332
|
+
const readyBorder = border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`;
|
|
8333
|
+
const readyTransition = mediaQuery.size1000 ? !isCollapsed ? `transform ${theme2.styles.transition}` : "none" : theme2.styles.transition;
|
|
8307
8334
|
useEffect16(() => {
|
|
8308
8335
|
setItemsState(items);
|
|
8309
8336
|
}, [items]);
|
|
@@ -8355,139 +8382,168 @@ var SideMenuComponent = function SideMenu({
|
|
|
8355
8382
|
))
|
|
8356
8383
|
}
|
|
8357
8384
|
);
|
|
8358
|
-
|
|
8359
|
-
Div_default
|
|
8385
|
+
const sideBarComponent = sideBar ? /* @__PURE__ */ jsx28(
|
|
8386
|
+
Div_default,
|
|
8360
8387
|
{
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8366
|
-
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
|
|
8373
|
-
|
|
8374
|
-
|
|
8375
|
-
|
|
8376
|
-
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8382
|
-
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
|
|
8388
|
-
|
|
8389
|
-
{
|
|
8390
|
-
name: logoAssetName,
|
|
8391
|
-
src: logoUrl,
|
|
8392
|
-
width: logoSize,
|
|
8393
|
-
height: logoSize,
|
|
8394
|
-
objectFit: "contain"
|
|
8395
|
-
}
|
|
8396
|
-
),
|
|
8397
|
-
logoText && /* @__PURE__ */ jsx28(
|
|
8398
|
-
Text_default,
|
|
8399
|
-
{
|
|
8400
|
-
fontFamily: logoFontFamily,
|
|
8401
|
-
fontSize: 22,
|
|
8402
|
-
fontWeight: 800,
|
|
8403
|
-
opacity: !isCollapsed ? 1 : 0,
|
|
8404
|
-
transition: theme2.styles.transition,
|
|
8405
|
-
userSelect: "none",
|
|
8406
|
-
children: logoText
|
|
8407
|
-
}
|
|
8408
|
-
)
|
|
8409
|
-
]
|
|
8410
|
-
}
|
|
8411
|
-
) }),
|
|
8412
|
-
withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx28(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
|
|
8413
|
-
] }),
|
|
8414
|
-
itemsAdditionalComponent,
|
|
8415
|
-
!isLoading ? /* @__PURE__ */ jsxs24(Fragment10, { children: [
|
|
8416
|
-
renderItemsHolder ? renderItemsHolder(itemsComponent) : itemsComponent,
|
|
8417
|
-
betweenItemsAdditionalComponent,
|
|
8418
|
-
readyBottomItems && /* @__PURE__ */ jsx28(Fragment10, { children: renderBottomItemsHolder ? renderBottomItemsHolder(bottomItemsComponent) : bottomItemsComponent })
|
|
8419
|
-
] }) : /* @__PURE__ */ jsx28(Div_default, { flex: 1, children: /* @__PURE__ */ jsx28(Loader_default.box, { text: isCollapsed ? "" : void 0 }) }),
|
|
8420
|
-
bottomItemsAdditionalComponent,
|
|
8421
|
-
isCollapsable && /* @__PURE__ */ jsx28(
|
|
8422
|
-
Div_default,
|
|
8388
|
+
width: sideBarWidth,
|
|
8389
|
+
height: "100%",
|
|
8390
|
+
flexShrink: 0,
|
|
8391
|
+
borderRight: position === "left" ? readyBorder : void 0,
|
|
8392
|
+
borderLeft: position === "right" ? border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
8393
|
+
children: sideBar
|
|
8394
|
+
}
|
|
8395
|
+
) : sideBar;
|
|
8396
|
+
return /* @__PURE__ */ jsxs24(SideMenuContextProvider, { value: contextValue, children: [
|
|
8397
|
+
/* @__PURE__ */ jsxs24(
|
|
8398
|
+
Div_default.row,
|
|
8399
|
+
{
|
|
8400
|
+
as: "aside",
|
|
8401
|
+
position: "fixed",
|
|
8402
|
+
width: mediaQuery.size1000 ? "100%" : (isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth) + (sideBar ? sideBarWidth : 0),
|
|
8403
|
+
height: `calc(100svh - ${topSpace}px)`,
|
|
8404
|
+
top: topSpace,
|
|
8405
|
+
left: position === "left" ? 0 : void 0,
|
|
8406
|
+
right: position === "right" ? 0 : void 0,
|
|
8407
|
+
backgroundColor: readyBackgroundColor,
|
|
8408
|
+
transform: !mediaQuery.size1000 || sideMenuIsOpenMobile ? "translateX(0)" : `translateX(${mobileFoldToPosition === "left" ? "-" : ""}100%)`,
|
|
8409
|
+
transition: readyTransition,
|
|
8410
|
+
userSelect: "none",
|
|
8411
|
+
zIndex: 10,
|
|
8412
|
+
children: [
|
|
8413
|
+
position === "left" && sideBarComponent,
|
|
8414
|
+
/* @__PURE__ */ jsxs24(
|
|
8415
|
+
Div_default.column,
|
|
8423
8416
|
{
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8417
|
+
width: mediaQuery.size1000 ? "100%" : isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth,
|
|
8418
|
+
height: "100%",
|
|
8419
|
+
borderRight: position === "left" ? readyBorder : void 0,
|
|
8420
|
+
borderLeft: position === "right" ? border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
8421
|
+
flexShrink: 0,
|
|
8422
|
+
paddingTop: paddingTop ?? (logoAssetName || logoUrl ? theme2.styles.gap : theme2.styles.space),
|
|
8423
|
+
paddingBottom,
|
|
8424
|
+
transition: readyTransition,
|
|
8425
|
+
children: [
|
|
8426
|
+
/* @__PURE__ */ jsxs24(Div_default.column, { width: "100%", height: "100%", gap: gap ?? theme2.styles.space, children: [
|
|
8427
|
+
(logoAssetName || logoUrl || withCloseButton && mediaQuery.size1000) && /* @__PURE__ */ jsxs24(Div_default.row, { alignItems: "center", paddingInline: theme2.styles.space, children: [
|
|
8428
|
+
(logoAssetName || logoUrl) && /* @__PURE__ */ jsx28(LinkComponentTag, { to: "/", href: "/", onClick: onClickXButton, children: /* @__PURE__ */ jsxs24(
|
|
8429
|
+
Div_default.row,
|
|
8430
|
+
{
|
|
8431
|
+
alignItems: "center",
|
|
8432
|
+
width: sideMenuCollapsedWidth ? logoSize : void 0,
|
|
8433
|
+
height: logoSize,
|
|
8434
|
+
whiteSpace: "nowrap",
|
|
8435
|
+
gap: theme2.styles.gap,
|
|
8436
|
+
children: [
|
|
8437
|
+
/* @__PURE__ */ jsx28(
|
|
8438
|
+
Image_default,
|
|
8439
|
+
{
|
|
8440
|
+
name: logoAssetName,
|
|
8441
|
+
src: logoUrl,
|
|
8442
|
+
width: logoSize,
|
|
8443
|
+
height: logoSize,
|
|
8444
|
+
objectFit: "contain"
|
|
8445
|
+
}
|
|
8446
|
+
),
|
|
8447
|
+
logoText && /* @__PURE__ */ jsx28(
|
|
8448
|
+
Text_default,
|
|
8449
|
+
{
|
|
8450
|
+
fontFamily: logoFontFamily,
|
|
8451
|
+
fontSize: 22,
|
|
8452
|
+
fontWeight: 800,
|
|
8453
|
+
opacity: !isCollapsed ? 1 : 0,
|
|
8454
|
+
transition: theme2.styles.transition,
|
|
8455
|
+
userSelect: "none",
|
|
8456
|
+
children: logoText
|
|
8457
|
+
}
|
|
8458
|
+
)
|
|
8459
|
+
]
|
|
8460
|
+
}
|
|
8461
|
+
) }),
|
|
8462
|
+
withCloseButton && mediaQuery.size1000 && /* @__PURE__ */ jsx28(Button_default.icon, { icon: "XMark", marginLeft: "auto", onClick: onClickXButton })
|
|
8463
|
+
] }),
|
|
8464
|
+
itemsAdditionalComponent,
|
|
8465
|
+
!isLoading ? /* @__PURE__ */ jsxs24(Fragment10, { children: [
|
|
8466
|
+
renderItemsHolder ? renderItemsHolder(itemsComponent) : itemsComponent,
|
|
8467
|
+
betweenItemsAdditionalComponent,
|
|
8468
|
+
readyBottomItems && /* @__PURE__ */ jsx28(Fragment10, { children: renderBottomItemsHolder ? renderBottomItemsHolder(bottomItemsComponent) : bottomItemsComponent })
|
|
8469
|
+
] }) : /* @__PURE__ */ jsx28(Div_default, { flex: 1, children: /* @__PURE__ */ jsx28(Loader_default.box, { text: isCollapsed ? "" : void 0 }) }),
|
|
8470
|
+
bottomItemsAdditionalComponent,
|
|
8471
|
+
isCollapsable && /* @__PURE__ */ jsx28(
|
|
8472
|
+
Div_default,
|
|
8442
8473
|
{
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8474
|
+
borderTop: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8475
|
+
marginTop: !readyBottomItems ? "auto" : void 0,
|
|
8476
|
+
paddingInline: theme2.styles.space,
|
|
8477
|
+
paddingBlock: theme2.styles.space,
|
|
8478
|
+
children: /* @__PURE__ */ jsx28(
|
|
8479
|
+
Div_default.row,
|
|
8480
|
+
{
|
|
8481
|
+
alignItems: "center",
|
|
8482
|
+
justifyContent: "center",
|
|
8483
|
+
backgroundColor: readyBackgroundColor,
|
|
8484
|
+
borderRadius: theme2.styles.borderRadius,
|
|
8485
|
+
cursor: "pointer",
|
|
8486
|
+
filterHover: filterHover().z1,
|
|
8487
|
+
isTabAccessed: true,
|
|
8488
|
+
paddingBlock: theme2.styles.gap,
|
|
8489
|
+
onClick: setSideMenuIsCollapsed.toggle,
|
|
8490
|
+
children: /* @__PURE__ */ jsx28(
|
|
8491
|
+
Icon_default,
|
|
8492
|
+
{
|
|
8493
|
+
name: position === "left" ? "chevronRight" : "chevronLeft",
|
|
8494
|
+
size: 20,
|
|
8495
|
+
color: theme2.colors.textSecondary,
|
|
8496
|
+
transform: `rotate(${isCollapsed ? 0 : 180}deg)`,
|
|
8497
|
+
transition: theme2.styles.transition
|
|
8498
|
+
}
|
|
8499
|
+
)
|
|
8500
|
+
}
|
|
8501
|
+
)
|
|
8448
8502
|
}
|
|
8449
8503
|
)
|
|
8450
|
-
}
|
|
8451
|
-
|
|
8504
|
+
] }),
|
|
8505
|
+
widthMobileHandle && /* @__PURE__ */ jsx28(
|
|
8506
|
+
Div_default.row,
|
|
8507
|
+
{
|
|
8508
|
+
position: "absolute",
|
|
8509
|
+
top: theme2.styles.space,
|
|
8510
|
+
left: "100%",
|
|
8511
|
+
backgroundColor: readyBackgroundColor,
|
|
8512
|
+
border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8513
|
+
borderLeft: "none",
|
|
8514
|
+
borderTopRightRadius: theme2.styles.borderRadius,
|
|
8515
|
+
borderBottomRightRadius: theme2.styles.borderRadius,
|
|
8516
|
+
alignItems: "center",
|
|
8517
|
+
cursor: "pointer",
|
|
8518
|
+
opacity: !mediaQuery.size1000 ? 0 : void 0,
|
|
8519
|
+
pointerEvents: !mediaQuery.size1000 ? "none" : void 0,
|
|
8520
|
+
padding: theme2.styles.gap,
|
|
8521
|
+
paddingRight: (theme2.styles.space + theme2.styles.gap) / 2,
|
|
8522
|
+
transform: !mediaQuery.size1000 ? "translateX(-100%)" : void 0,
|
|
8523
|
+
transition: theme2.styles.transition,
|
|
8524
|
+
onClick: setSideMenuIsOpenMobile.toggle,
|
|
8525
|
+
children: /* @__PURE__ */ jsx28(
|
|
8526
|
+
Icon_default,
|
|
8527
|
+
{
|
|
8528
|
+
name: "chevronRight",
|
|
8529
|
+
size: 20,
|
|
8530
|
+
color: theme2.colors.textSecondary,
|
|
8531
|
+
transform: sideMenuIsOpenMobile ? "rotate(180deg)" : void 0,
|
|
8532
|
+
transition: theme2.styles.transition
|
|
8533
|
+
}
|
|
8534
|
+
)
|
|
8535
|
+
}
|
|
8536
|
+
),
|
|
8537
|
+
absoluteComponent && /* @__PURE__ */ jsx28(Div_default, { position: "absolute", top: 0, left: 0, pointerEvents: "none", zIndex: 2, children: /* @__PURE__ */ jsx28(Div_default, { pointerEvents: "all", children: absoluteComponent }) })
|
|
8538
|
+
]
|
|
8452
8539
|
}
|
|
8453
|
-
)
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
left: "100%",
|
|
8461
|
-
backgroundColor: readyBackgroundColor,
|
|
8462
|
-
border: `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}`,
|
|
8463
|
-
borderLeft: "none",
|
|
8464
|
-
borderTopRightRadius: theme2.styles.borderRadius,
|
|
8465
|
-
borderBottomRightRadius: theme2.styles.borderRadius,
|
|
8466
|
-
alignItems: "center",
|
|
8467
|
-
cursor: "pointer",
|
|
8468
|
-
opacity: !mediaQuery.size1000 ? 0 : void 0,
|
|
8469
|
-
pointerEvents: !mediaQuery.size1000 ? "none" : void 0,
|
|
8470
|
-
padding: theme2.styles.gap,
|
|
8471
|
-
paddingRight: (theme2.styles.space + theme2.styles.gap) / 2,
|
|
8472
|
-
transform: !mediaQuery.size1000 ? "translateX(-100%)" : void 0,
|
|
8473
|
-
transition: theme2.styles.transition,
|
|
8474
|
-
onClick: setSideMenuIsOpenMobile.toggle,
|
|
8475
|
-
children: /* @__PURE__ */ jsx28(
|
|
8476
|
-
Icon_default,
|
|
8477
|
-
{
|
|
8478
|
-
name: "chevronRight",
|
|
8479
|
-
size: 20,
|
|
8480
|
-
color: theme2.colors.textSecondary,
|
|
8481
|
-
transform: sideMenuIsOpenMobile ? "rotate(180deg)" : void 0,
|
|
8482
|
-
transition: theme2.styles.transition
|
|
8483
|
-
}
|
|
8484
|
-
)
|
|
8485
|
-
}
|
|
8486
|
-
),
|
|
8487
|
-
absoluteComponent && /* @__PURE__ */ jsx28(Div_default, { position: "absolute", top: 0, left: 0, pointerEvents: "none", zIndex: 2, children: /* @__PURE__ */ jsx28(Div_default, { pointerEvents: "all", children: absoluteComponent }) })
|
|
8488
|
-
]
|
|
8489
|
-
}
|
|
8490
|
-
) });
|
|
8540
|
+
),
|
|
8541
|
+
position === "right" && sideBarComponent
|
|
8542
|
+
]
|
|
8543
|
+
}
|
|
8544
|
+
),
|
|
8545
|
+
children
|
|
8546
|
+
] });
|
|
8491
8547
|
};
|
|
8492
8548
|
SideMenuComponent.pageHolder = function SideMenuPageHolder({
|
|
8493
8549
|
additionalTopComponent,
|
|
@@ -8497,14 +8553,17 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({
|
|
|
8497
8553
|
const theme2 = useTheme29();
|
|
8498
8554
|
const mediaQuery = useMediaQuery();
|
|
8499
8555
|
const { components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
|
|
8556
|
+
const { position } = useSideMenuContext();
|
|
8500
8557
|
const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
|
|
8501
8558
|
const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
|
|
8559
|
+
const sideSpace = !mediaQuery.size1000 ? !sideMenuIsCollapsed ? sideMenuWidth : sideMenuCollapsedWidth : void 0;
|
|
8502
8560
|
return /* @__PURE__ */ jsxs24(
|
|
8503
8561
|
Div_default,
|
|
8504
8562
|
{
|
|
8505
8563
|
position: "relative",
|
|
8506
8564
|
width: "100%",
|
|
8507
|
-
paddingLeft:
|
|
8565
|
+
paddingLeft: position === "left" ? sideSpace : void 0,
|
|
8566
|
+
paddingRight: position === "right" ? sideSpace : void 0,
|
|
8508
8567
|
transition: theme2.styles.transition,
|
|
8509
8568
|
children: [
|
|
8510
8569
|
additionalTopComponent,
|