@ttoss/layouts 0.4.17 → 0.4.19

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.
Files changed (2) hide show
  1. package/dist/esm/index.js +11 -8
  2. package/package.json +4 -4
package/dist/esm/index.js CHANGED
@@ -2278,9 +2278,6 @@ Icon2.displayName = "Icon";
2278
2278
  import { Box as Box3, Flex as Flex2, IconButton as IconButton2 } from "@ttoss/ui";
2279
2279
  import * as React5 from "react";
2280
2280
 
2281
- // src/components/LayoutProvider.tsx
2282
- import * as React3 from "react";
2283
-
2284
2281
  // src/useIsDesktop.ts
2285
2282
  import { useBreakpointIndex } from "@ttoss/ui";
2286
2283
  var useIsDesktop = () => {
@@ -2292,6 +2289,7 @@ var useIsDesktop = () => {
2292
2289
  };
2293
2290
 
2294
2291
  // src/components/LayoutProvider.tsx
2292
+ import * as React3 from "react";
2295
2293
  import { jsx as jsx3 } from "react/jsx-runtime";
2296
2294
  var LayoutContext = React3.createContext({
2297
2295
  isSidebarOpen: true,
@@ -2467,6 +2465,9 @@ var Header = ({
2467
2465
  isSidebarOpen,
2468
2466
  toggleSidebar
2469
2467
  } = useLayout();
2468
+ const {
2469
+ isDesktop
2470
+ } = useIsDesktop();
2470
2471
  const sidebarButton = React5.useMemo(() => {
2471
2472
  if (!showSidebarButton) {
2472
2473
  return null;
@@ -2494,9 +2495,9 @@ var Header = ({
2494
2495
  }
2495
2496
  return /* @__PURE__ */jsxs2(Flex2, {
2496
2497
  sx: {
2497
- minWidth: SIDEBAR_WIDTH,
2498
- width: SIDEBAR_WIDTH,
2499
- borderRight: "sm",
2498
+ minWidth: ["12rem", "3xs", SIDEBAR_WIDTH],
2499
+ width: ["12rem", "3xs", SIDEBAR_WIDTH],
2500
+ borderRight: isDesktop ? "sm" : "none",
2500
2501
  borderColor: "display.border.muted.default",
2501
2502
  alignItems: "center",
2502
2503
  gap: "2",
@@ -2504,7 +2505,7 @@ var Header = ({
2504
2505
  },
2505
2506
  children: [sidebarButton, sidebarSlot]
2506
2507
  });
2507
- }, [sidebarButton, sidebarSlot]);
2508
+ }, [isDesktop, sidebarButton, sidebarSlot]);
2508
2509
  return /* @__PURE__ */jsxs2(Flex2, {
2509
2510
  variant: "layout.header",
2510
2511
  ...boxProps,
@@ -2521,7 +2522,9 @@ var Header = ({
2521
2522
  },
2522
2523
  children: [memoizedSidebarSlot, /* @__PURE__ */jsx5(Box3, {
2523
2524
  sx: {
2524
- width: "100%",
2525
+ width: "full",
2526
+ display: ["flex", "unset", "unset"],
2527
+ justifyContent: ["center", "unset", "unset"],
2525
2528
  ...(sidebarSlot ? paddingSx : {})
2526
2529
  },
2527
2530
  children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/layouts",
3
- "version": "0.4.17",
3
+ "version": "0.4.19",
4
4
  "description": "Layout components for React",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -34,11 +34,11 @@
34
34
  "jest": "^29.7.0",
35
35
  "react": "^19.0.0",
36
36
  "tsup": "^8.3.5",
37
+ "@ttoss/components": "^2.2.9",
38
+ "@ttoss/config": "^1.35.2",
37
39
  "@ttoss/react-icons": "^0.4.9",
38
40
  "@ttoss/test-utils": "^2.1.22",
39
- "@ttoss/config": "^1.35.2",
40
- "@ttoss/ui": "^5.5.5",
41
- "@ttoss/components": "^2.2.9"
41
+ "@ttoss/ui": "^5.5.5"
42
42
  },
43
43
  "keywords": [
44
44
  "React"