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.js
CHANGED
|
@@ -3153,6 +3153,11 @@ var GlobalStyle = import_styled_components9.createGlobalStyle`
|
|
|
3153
3153
|
-webkit-tap-highlight-color: transparent;
|
|
3154
3154
|
}
|
|
3155
3155
|
|
|
3156
|
+
:root {
|
|
3157
|
+
${(props) => Object.entries(props.theme.styles).map(([key, value]) => `--${key}: ${value}${typeof value === "number" ? "px" : ""};`)}
|
|
3158
|
+
${(props) => Object.entries(props.theme.colors).map(([key, value]) => `--${key}: ${value};`)}
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3156
3161
|
a {
|
|
3157
3162
|
text-decoration: none;
|
|
3158
3163
|
color: inherit;
|
|
@@ -3238,6 +3243,7 @@ function BetterHtmlProviderInternalContent({ children }) {
|
|
|
3238
3243
|
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3239
3244
|
GlobalStyle,
|
|
3240
3245
|
{
|
|
3246
|
+
theme: theme2,
|
|
3241
3247
|
fontFamily: theme2.styles.fontFamily,
|
|
3242
3248
|
color: theme2.colors.textPrimary,
|
|
3243
3249
|
backgroundColor: theme2.colors.backgroundBase
|
|
@@ -8375,9 +8381,10 @@ var SideMenuComponent = function SideMenu({
|
|
|
8375
8381
|
setActiveItem,
|
|
8376
8382
|
items: itemsState,
|
|
8377
8383
|
bottomItems: bottomItemsState,
|
|
8378
|
-
position
|
|
8384
|
+
position,
|
|
8385
|
+
withSideBar: sideBar !== void 0
|
|
8379
8386
|
}),
|
|
8380
|
-
[activeItem, itemsState, bottomItemsState, position]
|
|
8387
|
+
[activeItem, itemsState, bottomItemsState, position, sideBar]
|
|
8381
8388
|
);
|
|
8382
8389
|
const isCollapsable = collapsable && !mediaQuery.size1000;
|
|
8383
8390
|
const isCollapsed = sideMenuIsCollapsed && !mediaQuery.size1000;
|
|
@@ -8424,8 +8431,8 @@ var SideMenuComponent = function SideMenu({
|
|
|
8424
8431
|
gap: theme2.styles.gap / 2,
|
|
8425
8432
|
marginTop: "auto",
|
|
8426
8433
|
paddingTop: mediaQuery.size1000 ? theme2.styles.space : void 0,
|
|
8427
|
-
paddingInline: !
|
|
8428
|
-
paddingBottom: !
|
|
8434
|
+
paddingInline: !renderBottomItemsHolder ? theme2.styles.space : void 0,
|
|
8435
|
+
paddingBottom: !renderBottomItemsHolder ? !isCollapsable ? mediaQuery.size1000 && bottomItemsAdditionalComponent ? 0 : theme2.styles.space : void 0 : void 0,
|
|
8429
8436
|
children: readyBottomItems?.map((item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
8430
8437
|
MenuItemComponent,
|
|
8431
8438
|
{
|
|
@@ -8472,7 +8479,7 @@ var SideMenuComponent = function SideMenu({
|
|
|
8472
8479
|
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
8473
8480
|
Div_default.column,
|
|
8474
8481
|
{
|
|
8475
|
-
width: mediaQuery.size1000 ?
|
|
8482
|
+
width: mediaQuery.size1000 ? `calc(100% - ${sideBar ? sideBarWidth : 0}px)` : isCollapsed ? sideMenuCollapsedWidth : sideMenuWidth,
|
|
8476
8483
|
height: "100%",
|
|
8477
8484
|
borderRight: position === "left" ? readyBorder : void 0,
|
|
8478
8485
|
borderLeft: position === "right" ? border ?? `solid ${theme2.styles.borderWidth}px ${theme2.colors.border}` : void 0,
|
|
@@ -8611,10 +8618,11 @@ SideMenuComponent.pageHolder = function SideMenuPageHolder({
|
|
|
8611
8618
|
const theme2 = (0, import_react_better_core29.useTheme)();
|
|
8612
8619
|
const mediaQuery = useMediaQuery();
|
|
8613
8620
|
const { components, sideMenuIsCollapsed } = useBetterHtmlContextInternal();
|
|
8614
|
-
const { position } = useSideMenuContext();
|
|
8621
|
+
const { position, withSideBar } = useSideMenuContext();
|
|
8615
8622
|
const sideMenuWidth = components.sideMenu?.width ?? defaultSideMenuWidth;
|
|
8616
8623
|
const sideMenuCollapsedWidth = theme2.styles.space + theme2.styles.space * 2 + 16 + theme2.styles.space;
|
|
8617
|
-
const
|
|
8624
|
+
const sideBarWidth = components.sideMenu?.width ?? defaultSideBarWidth;
|
|
8625
|
+
const sideSpace = !mediaQuery.size1000 ? (!sideMenuIsCollapsed ? sideMenuWidth : sideMenuCollapsedWidth) + (withSideBar ? sideBarWidth : 0) : void 0;
|
|
8618
8626
|
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
8619
8627
|
Div_default,
|
|
8620
8628
|
{
|