@etsoo/toolpad 1.0.14 → 1.0.16

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.
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ContainerProps } from "@mui/material/Container";
2
+ import { StackProps } from "@mui/material/Stack";
3
3
  import { PageContainerToolbarProps } from "./PageContainerToolbar";
4
4
  export interface PageContainerSlotProps {
5
5
  toolbar: PageContainerToolbarProps;
@@ -32,7 +32,7 @@ export declare const PageDataContext: React.Context<{
32
32
  dispatch: React.Dispatch<PageDataAction>;
33
33
  }>;
34
34
  export declare function PageDataContextProvider(props: React.PropsWithChildren<PageData>): import("react/jsx-runtime").JSX.Element;
35
- export type PageContainerProps = React.PropsWithChildren<ContainerProps & {
35
+ export type PageContainerProps = React.PropsWithChildren<StackProps & {
36
36
  /**
37
37
  * The default title of the page.
38
38
  */
@@ -43,7 +43,6 @@ exports.PageContainer = PageContainer;
43
43
  const jsx_runtime_1 = require("react/jsx-runtime");
44
44
  const React = __importStar(require("react"));
45
45
  const Breadcrumbs_1 = __importDefault(require("@mui/material/Breadcrumbs"));
46
- const Container_1 = __importDefault(require("@mui/material/Container"));
47
46
  const Link_1 = __importDefault(require("@mui/material/Link"));
48
47
  const Stack_1 = __importDefault(require("@mui/material/Stack"));
49
48
  const Typography_1 = __importDefault(require("@mui/material/Typography"));
@@ -125,9 +124,9 @@ function PageContainer(props) {
125
124
  externalSlotProps: props?.slotProps?.toolbar,
126
125
  additionalProps: {}
127
126
  });
128
- return ((0, jsx_runtime_1.jsx)(Container_1.default, { ...rest, children: (0, jsx_runtime_1.jsxs)(Stack_1.default, { sx: { my: 2 }, spacing: 2, children: [(0, jsx_runtime_1.jsxs)(Stack_1.default, { children: [(0, jsx_runtime_1.jsx)(Breadcrumbs_1.default, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs
129
- ? resolvedBreadcrumbs.map((item, index) => {
130
- return index < resolvedBreadcrumbs.length - 1 ? ((0, jsx_runtime_1.jsx)(Link_1.default, { component: Link_2.Link, underline: "hover", color: "inherit", href: item.path, children: (0, navigation_1.getItemTitle)(item) }, item.path)) : ((0, jsx_runtime_1.jsx)(Typography_1.default, { color: "text.primary", children: (0, navigation_1.getItemTitle)(item) }, item.path));
131
- })
132
- : null }), (0, jsx_runtime_1.jsxs)(PageContentHeader, { children: [title ? (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "h4", children: title }) : null, (0, jsx_runtime_1.jsx)(ToolbarComponent, { ...toolbarSlotProps })] })] }), (0, jsx_runtime_1.jsx)("div", { children: children })] }) }));
127
+ return ((0, jsx_runtime_1.jsxs)(Stack_1.default, { sx: { my: 2 }, spacing: 2, ...rest, children: [(0, jsx_runtime_1.jsxs)(Stack_1.default, { children: [(0, jsx_runtime_1.jsx)(Breadcrumbs_1.default, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs
128
+ ? resolvedBreadcrumbs.map((item, index) => {
129
+ return index < resolvedBreadcrumbs.length - 1 ? ((0, jsx_runtime_1.jsx)(Link_1.default, { component: Link_2.Link, underline: "hover", color: "inherit", href: item.path, children: (0, navigation_1.getItemTitle)(item) }, item.path)) : ((0, jsx_runtime_1.jsx)(Typography_1.default, { color: "text.primary", children: (0, navigation_1.getItemTitle)(item) }, item.path));
130
+ })
131
+ : null }), (0, jsx_runtime_1.jsxs)(PageContentHeader, { children: [title ? (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "h4", children: title }) : null, (0, jsx_runtime_1.jsx)(ToolbarComponent, { ...toolbarSlotProps })] })] }), (0, jsx_runtime_1.jsx)("div", { children: children })] }));
133
132
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ContainerProps } from "@mui/material/Container";
2
+ import { StackProps } from "@mui/material/Stack";
3
3
  import { PageContainerToolbarProps } from "./PageContainerToolbar";
4
4
  export interface PageContainerSlotProps {
5
5
  toolbar: PageContainerToolbarProps;
@@ -32,7 +32,7 @@ export declare const PageDataContext: React.Context<{
32
32
  dispatch: React.Dispatch<PageDataAction>;
33
33
  }>;
34
34
  export declare function PageDataContextProvider(props: React.PropsWithChildren<PageData>): import("react/jsx-runtime").JSX.Element;
35
- export type PageContainerProps = React.PropsWithChildren<ContainerProps & {
35
+ export type PageContainerProps = React.PropsWithChildren<StackProps & {
36
36
  /**
37
37
  * The default title of the page.
38
38
  */
@@ -2,7 +2,6 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
4
  import Breadcrumbs from "@mui/material/Breadcrumbs";
5
- import Container from "@mui/material/Container";
6
5
  import Link from "@mui/material/Link";
7
6
  import Stack from "@mui/material/Stack";
8
7
  import Typography from "@mui/material/Typography";
@@ -84,10 +83,10 @@ function PageContainer(props) {
84
83
  externalSlotProps: props?.slotProps?.toolbar,
85
84
  additionalProps: {}
86
85
  });
87
- return (_jsx(Container, { ...rest, children: _jsxs(Stack, { sx: { my: 2 }, spacing: 2, children: [_jsxs(Stack, { children: [_jsx(Breadcrumbs, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs
88
- ? resolvedBreadcrumbs.map((item, index) => {
89
- return index < resolvedBreadcrumbs.length - 1 ? (_jsx(Link, { component: ToolpadLink, underline: "hover", color: "inherit", href: item.path, children: getItemTitle(item) }, item.path)) : (_jsx(Typography, { color: "text.primary", children: getItemTitle(item) }, item.path));
90
- })
91
- : null }), _jsxs(PageContentHeader, { children: [title ? _jsx(Typography, { variant: "h4", children: title }) : null, _jsx(ToolbarComponent, { ...toolbarSlotProps })] })] }), _jsx("div", { children: children })] }) }));
86
+ return (_jsxs(Stack, { sx: { my: 2 }, spacing: 2, ...rest, children: [_jsxs(Stack, { children: [_jsx(Breadcrumbs, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs
87
+ ? resolvedBreadcrumbs.map((item, index) => {
88
+ return index < resolvedBreadcrumbs.length - 1 ? (_jsx(Link, { component: ToolpadLink, underline: "hover", color: "inherit", href: item.path, children: getItemTitle(item) }, item.path)) : (_jsx(Typography, { color: "text.primary", children: getItemTitle(item) }, item.path));
89
+ })
90
+ : null }), _jsxs(PageContentHeader, { children: [title ? _jsx(Typography, { variant: "h4", children: title }) : null, _jsx(ToolbarComponent, { ...toolbarSlotProps })] })] }), _jsx("div", { children: children })] }));
92
91
  }
93
92
  export { PageContainer };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/toolpad",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "author": "ETSOO",
5
5
  "description": "Dashboard framework extention based on Toolpad Core",
6
6
  "main": "build/cjs/index.js",
@@ -47,32 +47,32 @@
47
47
  "dependencies": {
48
48
  "@emotion/react": "^11.14.0",
49
49
  "@emotion/styled": "^11.14.0",
50
- "@mui/icons-material": "6.3.1",
51
- "@mui/material": "6.3.1",
52
- "@mui/utils": "6.3.1",
50
+ "@mui/icons-material": "6.4.5",
51
+ "@mui/material": "6.4.5",
52
+ "@mui/utils": "6.4.3",
53
53
  "invariant": "2.2.4",
54
54
  "path-to-regexp": "6.3.0",
55
55
  "react": "^19.0.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@babel/cli": "^7.26.4",
59
- "@babel/core": "^7.26.0",
60
- "@babel/plugin-transform-runtime": "^7.25.9",
61
- "@babel/preset-env": "^7.26.0",
62
- "@babel/runtime-corejs3": "^7.26.0",
59
+ "@babel/core": "^7.26.9",
60
+ "@babel/plugin-transform-runtime": "^7.26.9",
61
+ "@babel/preset-env": "^7.26.9",
62
+ "@babel/runtime-corejs3": "^7.26.9",
63
63
  "@testing-library/jest-dom": "^6.6.3",
64
- "@testing-library/react": "^16.1.0",
64
+ "@testing-library/react": "^16.2.0",
65
65
  "@types/invariant": "2.2.37",
66
- "@types/react": "19.0.7",
67
- "@types/react-dom": "19.0.3",
66
+ "@types/react": "19.0.10",
67
+ "@types/react-dom": "19.0.4",
68
68
  "@vitejs/plugin-react": "4.3.4",
69
- "@vitest/browser": "2.1.8",
69
+ "@vitest/browser": "3.0.6",
70
70
  "jsdom": "^26.0.0",
71
- "next": "^15.1.4",
71
+ "next": "^15.1.7",
72
72
  "next-router-mock": "^0.9.13",
73
- "playwright": "^1.49.1",
74
- "react-router-dom": "7.1.1",
75
- "vitest": "2.1.8"
73
+ "playwright": "^1.50.1",
74
+ "react-router-dom": "7.2.0",
75
+ "vitest": "3.0.6"
76
76
  },
77
77
  "peerDependenciesMeta": {
78
78
  "next": {
@@ -1,9 +1,8 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
3
  import Breadcrumbs from "@mui/material/Breadcrumbs";
4
- import Container, { ContainerProps } from "@mui/material/Container";
5
4
  import Link from "@mui/material/Link";
6
- import Stack from "@mui/material/Stack";
5
+ import Stack, { StackProps } from "@mui/material/Stack";
7
6
  import Typography from "@mui/material/Typography";
8
7
  import useSlotProps from "@mui/utils/useSlotProps";
9
8
  import { styled } from "@mui/material";
@@ -93,7 +92,7 @@ export function PageDataContextProvider(
93
92
  }
94
93
 
95
94
  export type PageContainerProps = React.PropsWithChildren<
96
- ContainerProps & {
95
+ StackProps & {
97
96
  /**
98
97
  * The default title of the page.
99
98
  */
@@ -155,39 +154,37 @@ function PageContainer(props: PageContainerProps) {
155
154
  });
156
155
 
157
156
  return (
158
- <Container {...rest}>
159
- <Stack sx={{ my: 2 }} spacing={2}>
160
- <Stack>
161
- <Breadcrumbs aria-label="breadcrumb">
162
- {resolvedBreadcrumbs
163
- ? resolvedBreadcrumbs.map((item, index) => {
164
- return index < resolvedBreadcrumbs.length - 1 ? (
165
- <Link
166
- key={item.path}
167
- component={ToolpadLink}
168
- underline="hover"
169
- color="inherit"
170
- href={item.path}
171
- >
172
- {getItemTitle(item)}
173
- </Link>
174
- ) : (
175
- <Typography key={item.path} color="text.primary">
176
- {getItemTitle(item)}
177
- </Typography>
178
- );
179
- })
180
- : null}
181
- </Breadcrumbs>
182
-
183
- <PageContentHeader>
184
- {title ? <Typography variant="h4">{title}</Typography> : null}
185
- <ToolbarComponent {...toolbarSlotProps} />
186
- </PageContentHeader>
187
- </Stack>
188
- <div>{children}</div>
157
+ <Stack sx={{ my: 2 }} spacing={2} {...rest}>
158
+ <Stack>
159
+ <Breadcrumbs aria-label="breadcrumb">
160
+ {resolvedBreadcrumbs
161
+ ? resolvedBreadcrumbs.map((item, index) => {
162
+ return index < resolvedBreadcrumbs.length - 1 ? (
163
+ <Link
164
+ key={item.path}
165
+ component={ToolpadLink}
166
+ underline="hover"
167
+ color="inherit"
168
+ href={item.path}
169
+ >
170
+ {getItemTitle(item)}
171
+ </Link>
172
+ ) : (
173
+ <Typography key={item.path} color="text.primary">
174
+ {getItemTitle(item)}
175
+ </Typography>
176
+ );
177
+ })
178
+ : null}
179
+ </Breadcrumbs>
180
+
181
+ <PageContentHeader>
182
+ {title ? <Typography variant="h4">{title}</Typography> : null}
183
+ <ToolbarComponent {...toolbarSlotProps} />
184
+ </PageContentHeader>
189
185
  </Stack>
190
- </Container>
186
+ <div>{children}</div>
187
+ </Stack>
191
188
  );
192
189
  }
193
190