react-better-html 1.1.282 → 1.1.284
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.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3088,6 +3088,11 @@ var GlobalStyle = createGlobalStyle`
|
|
|
3088
3088
|
-webkit-tap-highlight-color: transparent;
|
|
3089
3089
|
}
|
|
3090
3090
|
|
|
3091
|
+
:root {
|
|
3092
|
+
${(props) => Object.entries(props.theme.styles).map(([key, value]) => `--${key}: ${value}${typeof value === "number" ? "px" : ""};`)}
|
|
3093
|
+
${(props) => Object.entries(props.theme.colors).map(([key, value]) => `--${key}: ${value};`)}
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3091
3096
|
a {
|
|
3092
3097
|
text-decoration: none;
|
|
3093
3098
|
color: inherit;
|
|
@@ -3173,6 +3178,7 @@ function BetterHtmlProviderInternalContent({ children }) {
|
|
|
3173
3178
|
/* @__PURE__ */ jsx12(
|
|
3174
3179
|
GlobalStyle,
|
|
3175
3180
|
{
|
|
3181
|
+
theme: theme2,
|
|
3176
3182
|
fontFamily: theme2.styles.fontFamily,
|
|
3177
3183
|
color: theme2.colors.textPrimary,
|
|
3178
3184
|
backgroundColor: theme2.colors.backgroundBase
|
|
@@ -8340,9 +8346,10 @@ var SideMenuComponent = function SideMenu({
|
|
|
8340
8346
|
setActiveItem,
|
|
8341
8347
|
items: itemsState,
|
|
8342
8348
|
bottomItems: bottomItemsState,
|
|
8343
|
-
position
|
|
8349
|
+
position,
|
|
8350
|
+
withSideBar: sideBar !== void 0
|
|
8344
8351
|
}),
|
|
8345
|
-
[activeItem, itemsState, bottomItemsState, position]
|
|
8352
|
+
[activeItem, itemsState, bottomItemsState, position, sideBar]
|
|
8346
8353
|
);
|
|
8347
8354
|
const isCollapsable = collapsable && !mediaQuery.size1000;
|
|
8348
8355
|
const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
|
|
@@ -8389,8 +8396,8 @@ var SideMenuComponent = function SideMenu({
|
|
|
8389
8396
|
gap: theme2.styles.gap / 2,
|
|
8390
8397
|
marginTop: "auto",
|
|
8391
8398
|
paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
|
|
8392
|
-
paddingInline: !
|
|
8393
|
-
paddingBottom: !
|
|
8399
|
+
paddingInline: !renderBottomItemsHolder ? theme2.styles.space : void 0,
|
|
8400
|
+
paddingBottom: !renderBottomItemsHolder ? !isCollapsable ? mediaQuery.size1000 && bottomItemsAdditionalComponent ? 0 : theme2.styles.space : void 0 : void 0,
|
|
8394
8401
|
children: readyBottomItems?.map((item) => /* @__PURE__ */ jsx28(
|
|
8395
8402
|
MenuItemComponent,
|
|
8396
8403
|
{
|
|
@@ -8437,7 +8444,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8437
8444
|
/* @__PURE__ */ jsxs24(
|
|
8438
8445
|
Div_default.column,
|
|
8439
8446
|
{
|
|
8440
|
-
width: mediaQuery.size1000 ?
|
|
8447
|
+
width: mediaQuery.size1000 ? `calc(100% - ${sideBar ? sideBarWidth : 0}px)` : isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth,
|
|
8441
8448
|
height: "100%",
|
|
8442
8449
|
borderRight: position === "left" ? readyBorder : void 0,
|
|
8443
8450
|
borderLeft: position === "right" ? border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
@@ -8576,10 +8583,11 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({
|
|
|
8576
8583
|
const theme2 = useTheme29();
|
|
8577
8584
|
const mediaQuery = useMediaQuery();
|
|
8578
8585
|
const { components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
|
|
8579
|
-
const { position } = useSideMenuContext();
|
|
8586
|
+
const { position, withSideBar } = useSideMenuContext();
|
|
8580
8587
|
const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
|
|
8581
8588
|
const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
|
|
8582
|
-
const
|
|
8589
|
+
const sideBarWidth = components.sideMenu?.width ?? defaultSideBarWidth;
|
|
8590
|
+
const sideSpace = !mediaQuery.size1000 ? (!sideMenuIsCollapsed ? sideMenuWidth : sideMenuCollapsedWidth) + (withSideBar ? sideBarWidth : 0) : void 0;
|
|
8583
8591
|
return /* @__PURE__ */ jsxs24(
|
|
8584
8592
|
Div_default,
|
|
8585
8593
|
{
|