@ttoss/layouts 0.4.18 → 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.
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,
@@ -2454,7 +2452,7 @@ Sidebar.displayName = "Sidebar";
2454
2452
  // src/components/Header.tsx
2455
2453
  import { Fragment as Fragment2, jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
2456
2454
  var paddingSx = {
2457
- paddingX: ["2", "4", "4"],
2455
+ paddingX: "4",
2458
2456
  paddingY: "3"
2459
2457
  };
2460
2458
  var Header = ({
@@ -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;
@@ -2496,7 +2497,7 @@ var Header = ({
2496
2497
  sx: {
2497
2498
  minWidth: ["12rem", "3xs", SIDEBAR_WIDTH],
2498
2499
  width: ["12rem", "3xs", SIDEBAR_WIDTH],
2499
- borderRight: ["none", "sm", "sm"],
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/layouts",
3
- "version": "0.4.18",
3
+ "version": "0.4.19",
4
4
  "description": "Layout components for React",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -25,8 +25,8 @@
25
25
  "sideEffects": false,
26
26
  "peerDependencies": {
27
27
  "react": ">=16.8.0",
28
- "@ttoss/components": "^2.2.9",
29
- "@ttoss/ui": "^5.5.5"
28
+ "@ttoss/ui": "^5.5.5",
29
+ "@ttoss/components": "^2.2.9"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/jest": "^29.5.14",
@@ -35,10 +35,10 @@
35
35
  "react": "^19.0.0",
36
36
  "tsup": "^8.3.5",
37
37
  "@ttoss/components": "^2.2.9",
38
+ "@ttoss/config": "^1.35.2",
38
39
  "@ttoss/react-icons": "^0.4.9",
39
40
  "@ttoss/test-utils": "^2.1.22",
40
- "@ttoss/ui": "^5.5.5",
41
- "@ttoss/config": "^1.35.2"
41
+ "@ttoss/ui": "^5.5.5"
42
42
  },
43
43
  "keywords": [
44
44
  "React"