@etsoo/toolpad 1.0.22 → 1.0.24

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 (36) hide show
  1. package/build/cjs/AppProvider/AppThemeProvider.js +2 -2
  2. package/build/cjs/DashboardLayout/DashboardLayout.d.ts +1 -1
  3. package/build/cjs/DashboardLayout/DashboardLayout.js +2 -2
  4. package/build/cjs/DashboardLayout/DashboardSidebarSubNavigation.js +2 -2
  5. package/build/cjs/DashboardLayout/ThemeSwitcher.js +2 -2
  6. package/build/cjs/DashboardLayout/TitleBar.js +7 -5
  7. package/build/cjs/DashboardLayout/utils.d.ts +1 -1
  8. package/build/cjs/PageContainer/PageContainer.js +9 -5
  9. package/build/cjs/PageContainer/PageContainerToolbar.js +2 -2
  10. package/build/cjs/nextjs/AppProviderNextPages.js +1 -1
  11. package/build/cjs/shared/components.js +7 -5
  12. package/build/cjs/shared/context.d.ts +1 -1
  13. package/build/mjs/AppProvider/AppThemeProvider.js +1 -1
  14. package/build/mjs/DashboardLayout/DashboardLayout.d.ts +1 -1
  15. package/build/mjs/DashboardLayout/DashboardLayout.js +1 -1
  16. package/build/mjs/DashboardLayout/DashboardSidebarSubNavigation.js +1 -1
  17. package/build/mjs/DashboardLayout/ThemeSwitcher.js +1 -1
  18. package/build/mjs/DashboardLayout/TitleBar.js +3 -1
  19. package/build/mjs/DashboardLayout/utils.d.ts +1 -1
  20. package/build/mjs/PageContainer/PageContainer.js +8 -4
  21. package/build/mjs/PageContainer/PageContainerToolbar.js +1 -1
  22. package/build/mjs/nextjs/AppProviderNextPages.js +1 -1
  23. package/build/mjs/shared/components.js +3 -1
  24. package/build/mjs/shared/context.d.ts +1 -1
  25. package/package.json +10 -9
  26. package/src/AppProvider/AppThemeProvider.tsx +7 -2
  27. package/src/DashboardLayout/DashboardLayout.tsx +1 -1
  28. package/src/DashboardLayout/DashboardSidebarSubNavigation.tsx +1 -1
  29. package/src/DashboardLayout/ThemeSwitcher.tsx +1 -1
  30. package/src/DashboardLayout/TitleBar.tsx +3 -1
  31. package/src/DashboardLayout/utils.ts +1 -1
  32. package/src/PageContainer/PageContainer.tsx +9 -4
  33. package/src/PageContainer/PageContainerToolbar.tsx +1 -1
  34. package/src/nextjs/AppProviderNextPages.tsx +1 -1
  35. package/src/shared/components.tsx +3 -2
  36. package/src/shared/context.ts +1 -1
@@ -39,18 +39,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.AppThemeProvider = AppThemeProvider;
40
40
  const jsx_runtime_1 = require("react/jsx-runtime");
41
41
  const React = __importStar(require("react"));
42
- const material_1 = require("@mui/material");
43
42
  const styles_1 = require("@mui/material/styles");
44
43
  const InitColorSchemeScript_1 = __importDefault(require("@mui/material/InitColorSchemeScript"));
45
44
  const CssBaseline_1 = __importDefault(require("@mui/material/CssBaseline"));
46
45
  const invariant_1 = __importDefault(require("invariant"));
47
46
  const useLocalStorageState_1 = require("../useLocalStorageState");
48
47
  const context_1 = require("../shared/context");
48
+ const useMediaQuery_1 = __importDefault(require("@mui/material/useMediaQuery"));
49
49
  const COLOR_SCHEME_ATTRIBUTE = "data-toolpad-color-scheme";
50
50
  const COLOR_SCHEME_STORAGE_KEY = "toolpad-color-scheme";
51
51
  const MODE_STORAGE_KEY = "toolpad-mode";
52
52
  function usePreferredMode(window) {
53
- const prefersDarkMode = (0, material_1.useMediaQuery)("(prefers-color-scheme: dark)", window && {
53
+ const prefersDarkMode = (0, useMediaQuery_1.default)("(prefers-color-scheme: dark)", window && {
54
54
  matchMedia: window.matchMedia
55
55
  });
56
56
  return prefersDarkMode ? "dark" : "light";
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { type Theme, SxProps } from "@mui/material";
3
2
  import { type AccountProps } from "../Account";
3
+ import { SxProps, Theme } from "@mui/material/styles";
4
4
  export interface SidebarFooterProps {
5
5
  mini: boolean;
6
6
  }
@@ -40,7 +40,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.DashboardLayout = DashboardLayout;
41
41
  const jsx_runtime_1 = require("react/jsx-runtime");
42
42
  const React = __importStar(require("react"));
43
- const material_1 = require("@mui/material");
44
43
  const AppBar_1 = __importDefault(require("@mui/material/AppBar"));
45
44
  const Box_1 = __importDefault(require("@mui/material/Box"));
46
45
  const Drawer_1 = __importDefault(require("@mui/material/Drawer"));
@@ -59,6 +58,7 @@ const ThemeSwitcher_1 = require("./ThemeSwitcher");
59
58
  const utils_1 = require("./utils");
60
59
  const TitleBar_1 = require("./TitleBar");
61
60
  const LocaleContext_1 = require("../shared/locales/LocaleContext");
61
+ const styles_1 = require("@mui/material/styles");
62
62
  /**
63
63
  *
64
64
  * Demos:
@@ -71,7 +71,7 @@ const LocaleContext_1 = require("../shared/locales/LocaleContext");
71
71
  */
72
72
  function DashboardLayout(props) {
73
73
  const { children, disableCollapsibleSidebar = false, defaultSidebarCollapsed = false, hideNavigation = false, showThemeSwitcher = false, sidebarExpandedWidth = 320, slots, slotProps, sx } = props;
74
- const theme = (0, material_1.useTheme)();
74
+ const theme = (0, styles_1.useTheme)();
75
75
  const navigation = React.useContext(context_1.NavigationContext);
76
76
  const appWindow = React.useContext(context_1.WindowContext);
77
77
  const localeText = (0, LocaleContext_1.useLocaleText)();
@@ -40,7 +40,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.DashboardSidebarSubNavigation = DashboardSidebarSubNavigation;
41
41
  const jsx_runtime_1 = require("react/jsx-runtime");
42
42
  const React = __importStar(require("react"));
43
- const material_1 = require("@mui/material");
44
43
  const Avatar_1 = __importDefault(require("@mui/material/Avatar"));
45
44
  const Collapse_1 = __importDefault(require("@mui/material/Collapse"));
46
45
  const Divider_1 = __importDefault(require("@mui/material/Divider"));
@@ -57,7 +56,8 @@ const Link_1 = require("../shared/Link");
57
56
  const context_1 = require("../shared/context");
58
57
  const navigation_1 = require("../shared/navigation");
59
58
  const utils_1 = require("./utils");
60
- const NavigationListItemButton = (0, material_1.styled)(ListItemButton_1.default)(({ theme }) => ({
59
+ const styles_1 = require("@mui/material/styles");
60
+ const NavigationListItemButton = (0, styles_1.styled)(ListItemButton_1.default)(({ theme }) => ({
61
61
  borderRadius: 8,
62
62
  "&.Mui-selected": {
63
63
  "& .MuiListItemIcon-root": {
@@ -40,7 +40,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  exports.ThemeSwitcher = ThemeSwitcher;
41
41
  const jsx_runtime_1 = require("react/jsx-runtime");
42
42
  const React = __importStar(require("react"));
43
- const material_1 = require("@mui/material");
44
43
  const IconButton_1 = __importDefault(require("@mui/material/IconButton"));
45
44
  const Tooltip_1 = __importDefault(require("@mui/material/Tooltip"));
46
45
  const DarkMode_1 = __importDefault(require("@mui/icons-material/DarkMode"));
@@ -48,13 +47,14 @@ const LightMode_1 = __importDefault(require("@mui/icons-material/LightMode"));
48
47
  const context_1 = require("../shared/context");
49
48
  const useSsr_1 = __importDefault(require("../utils/hooks/useSsr"));
50
49
  const LocaleContext_1 = require("../shared/locales/LocaleContext");
50
+ const styles_1 = require("@mui/material/styles");
51
51
  // TODO: When we use this component as the default for a slot, make it non-internal
52
52
  /**
53
53
  * @ignore - internal component.
54
54
  */
55
55
  function ThemeSwitcher() {
56
56
  const isSsr = (0, useSsr_1.default)();
57
- const theme = (0, material_1.useTheme)();
57
+ const theme = (0, styles_1.useTheme)();
58
58
  const localeText = (0, LocaleContext_1.useLocaleText)();
59
59
  const { paletteMode, setPaletteMode, isDualTheme } = React.useContext(context_1.PaletteModeContext);
60
60
  const toggleMode = React.useCallback(() => {
@@ -5,11 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.TitleBar = TitleBar;
7
7
  const jsx_runtime_1 = require("react/jsx-runtime");
8
- const material_1 = require("@mui/material");
9
8
  const Link_1 = require("../shared/Link");
10
9
  const react_1 = __importDefault(require("react"));
11
10
  const context_1 = require("../shared/context");
12
- const LogoContainer = (0, material_1.styled)("div")({
11
+ const styles_1 = require("@mui/material/styles");
12
+ const Typography_1 = __importDefault(require("@mui/material/Typography"));
13
+ const Stack_1 = __importDefault(require("@mui/material/Stack"));
14
+ const LogoContainer = (0, styles_1.styled)("div")({
13
15
  position: "relative",
14
16
  height: 40,
15
17
  "& img": {
@@ -18,7 +20,7 @@ const LogoContainer = (0, material_1.styled)("div")({
18
20
  });
19
21
  function TitleBar() {
20
22
  // Theme
21
- const theme = (0, material_1.useTheme)();
23
+ const theme = (0, styles_1.useTheme)();
22
24
  // Branding
23
25
  const branding = react_1.default.useContext(context_1.BrandingContext);
24
26
  // Application title
@@ -37,7 +39,7 @@ function TitleBar() {
37
39
  titleString = title;
38
40
  }
39
41
  return [
40
- (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h6", sx: {
42
+ (0, jsx_runtime_1.jsx)(Typography_1.default, { variant: "h6", sx: {
41
43
  color: (theme.vars ?? theme).palette.primary.main,
42
44
  fontWeight: "700",
43
45
  ml: 0.5,
@@ -49,7 +51,7 @@ function TitleBar() {
49
51
  return [title, false];
50
52
  }, [title]);
51
53
  if (hasLink) {
52
- return ((0, jsx_runtime_1.jsx)(Link_1.Link, { href: "/", style: { color: "inherit", textDecoration: "none" }, children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", children: [branding?.logo && (0, jsx_runtime_1.jsx)(LogoContainer, { children: branding.logo }), titleUI] }) }));
54
+ return ((0, jsx_runtime_1.jsx)(Link_1.Link, { href: "/", style: { color: "inherit", textDecoration: "none" }, children: (0, jsx_runtime_1.jsxs)(Stack_1.default, { direction: "row", alignItems: "center", children: [branding?.logo && (0, jsx_runtime_1.jsx)(LogoContainer, { children: branding.logo }), titleUI] }) }));
53
55
  }
54
56
  else {
55
57
  return titleUI;
@@ -1,4 +1,4 @@
1
- import type { Theme } from "@mui/material";
1
+ import { Theme } from "@mui/material/styles";
2
2
  export declare function getDrawerSxTransitionMixin(isExpanded: boolean, property: string): {
3
3
  transition: (theme: Theme) => string;
4
4
  };
@@ -47,12 +47,12 @@ const Link_1 = __importDefault(require("@mui/material/Link"));
47
47
  const Stack_1 = __importDefault(require("@mui/material/Stack"));
48
48
  const Typography_1 = __importDefault(require("@mui/material/Typography"));
49
49
  const useSlotProps_1 = __importDefault(require("@mui/utils/useSlotProps"));
50
- const material_1 = require("@mui/material");
51
50
  const Link_2 = require("../shared/Link");
52
51
  const PageContainerToolbar_1 = require("./PageContainerToolbar");
53
52
  const navigation_1 = require("../shared/navigation");
54
53
  const useActivePage_1 = require("../useActivePage");
55
- const PageContentHeader = (0, material_1.styled)("div")(({ theme }) => ({
54
+ const styles_1 = require("@mui/material/styles");
55
+ const PageContentHeader = (0, styles_1.styled)("div")(({ theme }) => ({
56
56
  display: "flex",
57
57
  flexDirection: "row",
58
58
  justifyContent: "space-between",
@@ -64,7 +64,9 @@ function reducer(state, action) {
64
64
  // Reset the state
65
65
  if (state.breadcrumbs == null &&
66
66
  state.title == null &&
67
- state.page == null) {
67
+ state.page == null &&
68
+ state.noBreadcrumbs == null &&
69
+ state.noPageHeader == null) {
68
70
  return state;
69
71
  }
70
72
  else {
@@ -75,12 +77,14 @@ function reducer(state, action) {
75
77
  }
76
78
  function PageDataContextProvider(props) {
77
79
  // Destruct
78
- const { title, page, breadcrumbs, ...rest } = props;
80
+ const { title, page, breadcrumbs, noBreadcrumbs, noPageHeader, ...rest } = props;
79
81
  // useReducer hook to manage state with our reducer function and initial state
80
82
  const [state, dispatch] = React.useReducer(reducer, {
81
83
  title,
82
84
  page,
83
- breadcrumbs
85
+ breadcrumbs,
86
+ noBreadcrumbs,
87
+ noPageHeader
84
88
  });
85
89
  // Provide the state and dispatch function to the context value
86
90
  return (0, jsx_runtime_1.jsx)(exports.PageDataContext.Provider, { value: { state, dispatch }, ...rest });
@@ -3,8 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.PageContainerToolbar = PageContainerToolbar;
5
5
  const jsx_runtime_1 = require("react/jsx-runtime");
6
- const material_1 = require("@mui/material");
7
- const PageContainerToolbarRoot = (0, material_1.styled)("div")(({ theme }) => ({
6
+ const styles_1 = require("@mui/material/styles");
7
+ const PageContainerToolbarRoot = (0, styles_1.styled)("div")(({ theme }) => ({
8
8
  display: "flex",
9
9
  flexDirection: "row",
10
10
  gap: theme.spacing(1),
@@ -48,7 +48,7 @@ function AppProviderNextPages(props) {
48
48
  const params = new URLSearchParams();
49
49
  Object.entries(query ?? {}).forEach(([key, value]) => {
50
50
  (0, collections_1.asArray)(value ?? []).forEach((v) => {
51
- params.append(key, v);
51
+ params.append(key, v.toString());
52
52
  });
53
53
  });
54
54
  return params.toString();
@@ -6,9 +6,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ErrorOverlay = ErrorOverlay;
7
7
  exports.LoadingOverlay = LoadingOverlay;
8
8
  const jsx_runtime_1 = require("react/jsx-runtime");
9
- const material_1 = require("@mui/material");
10
9
  const Error_1 = __importDefault(require("@mui/icons-material/Error"));
11
- const OverlayRoot = (0, material_1.styled)("div")(({ theme }) => ({
10
+ const CircularProgress_1 = __importDefault(require("@mui/material/CircularProgress"));
11
+ const styles_1 = require("@mui/material/styles");
12
+ const Typography_1 = __importDefault(require("@mui/material/Typography"));
13
+ const OverlayRoot = (0, styles_1.styled)("div")(({ theme }) => ({
12
14
  position: "absolute",
13
15
  inset: "0 0 0 0",
14
16
  display: "flex",
@@ -18,13 +20,13 @@ const OverlayRoot = (0, material_1.styled)("div")(({ theme }) => ({
18
20
  padding: theme.spacing(2)
19
21
  }));
20
22
  function ErrorOverlay({ error }) {
21
- return ((0, jsx_runtime_1.jsxs)(OverlayRoot, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, { variant: "h6", sx: {
23
+ return ((0, jsx_runtime_1.jsxs)(OverlayRoot, { children: [(0, jsx_runtime_1.jsxs)(Typography_1.default, { variant: "h6", sx: {
22
24
  display: "flex",
23
25
  flexDirection: "row",
24
26
  gap: 1,
25
27
  alignItems: "center"
26
- }, children: [(0, jsx_runtime_1.jsx)(Error_1.default, { color: "error" }), " Error"] }), (0, jsx_runtime_1.jsx)(material_1.Typography, { textAlign: "center", children: error?.message ?? "Unknown error" })] }));
28
+ }, children: [(0, jsx_runtime_1.jsx)(Error_1.default, { color: "error" }), " Error"] }), (0, jsx_runtime_1.jsx)(Typography_1.default, { textAlign: "center", children: error?.message ?? "Unknown error" })] }));
27
29
  }
28
30
  function LoadingOverlay() {
29
- return ((0, jsx_runtime_1.jsx)(OverlayRoot, { children: (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {}) }));
31
+ return ((0, jsx_runtime_1.jsx)(OverlayRoot, { children: (0, jsx_runtime_1.jsx)(CircularProgress_1.default, {}) }));
30
32
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import type { PaletteMode } from "@mui/material";
3
2
  import type { Branding, Navigation, Router } from "../AppProvider";
3
+ import { PaletteMode } from "@mui/material/styles";
4
4
  export declare const BrandingContext: React.Context<Branding | null>;
5
5
  export declare const NavigationContext: React.Context<Navigation>;
6
6
  export declare const PaletteModeContext: React.Context<{
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
- import { useMediaQuery } from "@mui/material";
4
3
  import { ThemeProvider, useColorScheme } from "@mui/material/styles";
5
4
  import InitColorSchemeScript from "@mui/material/InitColorSchemeScript";
6
5
  import CssBaseline from "@mui/material/CssBaseline";
7
6
  import invariant from "invariant";
8
7
  import { useLocalStorageState } from "../useLocalStorageState";
9
8
  import { PaletteModeContext } from "../shared/context";
9
+ import useMediaQuery from "@mui/material/useMediaQuery";
10
10
  const COLOR_SCHEME_ATTRIBUTE = "data-toolpad-color-scheme";
11
11
  const COLOR_SCHEME_STORAGE_KEY = "toolpad-color-scheme";
12
12
  const MODE_STORAGE_KEY = "toolpad-mode";
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import { type Theme, SxProps } from "@mui/material";
3
2
  import { type AccountProps } from "../Account";
3
+ import { SxProps, Theme } from "@mui/material/styles";
4
4
  export interface SidebarFooterProps {
5
5
  mini: boolean;
6
6
  }
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { useTheme } from "@mui/material";
5
4
  import MuiAppBar from "@mui/material/AppBar";
6
5
  import Box from "@mui/material/Box";
7
6
  import Drawer from "@mui/material/Drawer";
@@ -20,6 +19,7 @@ import { ThemeSwitcher } from "./ThemeSwitcher";
20
19
  import { getDrawerSxTransitionMixin, getDrawerWidthTransitionMixin } from "./utils";
21
20
  import { TitleBar } from "./TitleBar";
22
21
  import { useLocaleText } from "../shared/locales/LocaleContext";
22
+ import { useTheme } from "@mui/material/styles";
23
23
  /**
24
24
  *
25
25
  * Demos:
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { styled } from "@mui/material";
5
4
  import Avatar from "@mui/material/Avatar";
6
5
  import Collapse from "@mui/material/Collapse";
7
6
  import Divider from "@mui/material/Divider";
@@ -18,6 +17,7 @@ import { Link } from "../shared/Link";
18
17
  import { RouterContext } from "../shared/context";
19
18
  import { getItemTitle, getPageItemFullPath, hasSelectedNavigationChildren, isPageItemSelected } from "../shared/navigation";
20
19
  import { getDrawerSxTransitionMixin } from "./utils";
20
+ import { styled } from "@mui/material/styles";
21
21
  const NavigationListItemButton = styled(ListItemButton)(({ theme }) => ({
22
22
  borderRadius: 8,
23
23
  "&.Mui-selected": {
@@ -1,7 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
- import { useTheme } from "@mui/material";
5
4
  import IconButton from "@mui/material/IconButton";
6
5
  import Tooltip from "@mui/material/Tooltip";
7
6
  import DarkModeIcon from "@mui/icons-material/DarkMode";
@@ -9,6 +8,7 @@ import LightModeIcon from "@mui/icons-material/LightMode";
9
8
  import { PaletteModeContext } from "../shared/context";
10
9
  import useSsr from "../utils/hooks/useSsr";
11
10
  import { useLocaleText } from "../shared/locales/LocaleContext";
11
+ import { useTheme } from "@mui/material/styles";
12
12
  // TODO: When we use this component as the default for a slot, make it non-internal
13
13
  /**
14
14
  * @ignore - internal component.
@@ -1,8 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Stack, styled, Typography, useTheme } from "@mui/material";
3
2
  import { Link } from "../shared/Link";
4
3
  import React from "react";
5
4
  import { BrandingContext } from "../shared/context";
5
+ import { styled, useTheme } from "@mui/material/styles";
6
+ import Typography from "@mui/material/Typography";
7
+ import Stack from "@mui/material/Stack";
6
8
  const LogoContainer = styled("div")({
7
9
  position: "relative",
8
10
  height: 40,
@@ -1,4 +1,4 @@
1
- import type { Theme } from "@mui/material";
1
+ import { Theme } from "@mui/material/styles";
2
2
  export declare function getDrawerSxTransitionMixin(isExpanded: boolean, property: string): {
3
3
  transition: (theme: Theme) => string;
4
4
  };
@@ -6,11 +6,11 @@ import Link from "@mui/material/Link";
6
6
  import Stack from "@mui/material/Stack";
7
7
  import Typography from "@mui/material/Typography";
8
8
  import useSlotProps from "@mui/utils/useSlotProps";
9
- import { styled } from "@mui/material";
10
9
  import { Link as ToolpadLink } from "../shared/Link";
11
10
  import { PageContainerToolbar } from "./PageContainerToolbar";
12
11
  import { getItemTitle } from "../shared/navigation";
13
12
  import { useActivePage } from "../useActivePage";
13
+ import { styled } from "@mui/material/styles";
14
14
  const PageContentHeader = styled("div")(({ theme }) => ({
15
15
  display: "flex",
16
16
  flexDirection: "row",
@@ -23,7 +23,9 @@ function reducer(state, action) {
23
23
  // Reset the state
24
24
  if (state.breadcrumbs == null &&
25
25
  state.title == null &&
26
- state.page == null) {
26
+ state.page == null &&
27
+ state.noBreadcrumbs == null &&
28
+ state.noPageHeader == null) {
27
29
  return state;
28
30
  }
29
31
  else {
@@ -34,12 +36,14 @@ function reducer(state, action) {
34
36
  }
35
37
  export function PageDataContextProvider(props) {
36
38
  // Destruct
37
- const { title, page, breadcrumbs, ...rest } = props;
39
+ const { title, page, breadcrumbs, noBreadcrumbs, noPageHeader, ...rest } = props;
38
40
  // useReducer hook to manage state with our reducer function and initial state
39
41
  const [state, dispatch] = React.useReducer(reducer, {
40
42
  title,
41
43
  page,
42
- breadcrumbs
44
+ breadcrumbs,
45
+ noBreadcrumbs,
46
+ noPageHeader
43
47
  });
44
48
  // Provide the state and dispatch function to the context value
45
49
  return _jsx(PageDataContext.Provider, { value: { state, dispatch }, ...rest });
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { styled } from "@mui/material";
3
+ import { styled } from "@mui/material/styles";
4
4
  const PageContainerToolbarRoot = styled("div")(({ theme }) => ({
5
5
  display: "flex",
6
6
  flexDirection: "row",
@@ -12,7 +12,7 @@ export function AppProviderNextPages(props) {
12
12
  const params = new URLSearchParams();
13
13
  Object.entries(query ?? {}).forEach(([key, value]) => {
14
14
  asArray(value ?? []).forEach((v) => {
15
- params.append(key, v);
15
+ params.append(key, v.toString());
16
16
  });
17
17
  });
18
18
  return params.toString();
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { CircularProgress, Typography, styled } from "@mui/material";
3
2
  import ErrorIcon from "@mui/icons-material/Error";
3
+ import CircularProgress from "@mui/material/CircularProgress";
4
+ import { styled } from "@mui/material/styles";
5
+ import Typography from "@mui/material/Typography";
4
6
  const OverlayRoot = styled("div")(({ theme }) => ({
5
7
  position: "absolute",
6
8
  inset: "0 0 0 0",
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import type { PaletteMode } from "@mui/material";
3
2
  import type { Branding, Navigation, Router } from "../AppProvider";
3
+ import { PaletteMode } from "@mui/material/styles";
4
4
  export declare const BrandingContext: React.Context<Branding | null>;
5
5
  export declare const NavigationContext: React.Context<Navigation>;
6
6
  export declare const PaletteModeContext: React.Context<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/toolpad",
3
- "version": "1.0.22",
3
+ "version": "1.0.24",
4
4
  "author": "ETSOO",
5
5
  "description": "Dashboard framework extention based on Toolpad Core",
6
6
  "main": "build/cjs/index.js",
@@ -47,31 +47,32 @@
47
47
  "dependencies": {
48
48
  "@emotion/react": "^11.14.0",
49
49
  "@emotion/styled": "^11.14.0",
50
- "@mui/icons-material": "6.4.8",
51
- "@mui/material": "6.4.8",
52
- "@mui/utils": "6.4.8",
50
+ "@mui/icons-material": "7.0.1",
51
+ "@mui/material": "7.0.1",
52
+ "@mui/utils": "7.0.1",
53
53
  "invariant": "2.2.4",
54
54
  "path-to-regexp": "6.3.0",
55
- "react": "^19.0.0"
55
+ "react": "^19.1.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@babel/cli": "^7.26.4",
58
+ "@babel/cli": "^7.27.0",
59
59
  "@babel/core": "^7.26.10",
60
60
  "@babel/plugin-transform-runtime": "^7.26.10",
61
61
  "@babel/preset-env": "^7.26.9",
62
- "@babel/runtime-corejs3": "^7.26.10",
62
+ "@babel/runtime-corejs3": "^7.27.0",
63
63
  "@testing-library/jest-dom": "^6.6.3",
64
64
  "@testing-library/react": "^16.2.0",
65
65
  "@types/invariant": "2.2.37",
66
+ "@types/node": "^22.13.14",
66
67
  "@types/react": "19.0.12",
67
68
  "@types/react-dom": "19.0.4",
68
69
  "@vitejs/plugin-react": "4.3.4",
69
70
  "@vitest/browser": "3.0.9",
70
71
  "jsdom": "^26.0.0",
71
- "next": "^15.2.3",
72
+ "next": "^15.2.4",
72
73
  "next-router-mock": "^0.9.13",
73
74
  "playwright": "^1.51.1",
74
- "react-router-dom": "7.4.0",
75
+ "react-router-dom": "7.4.1",
75
76
  "vitest": "3.0.9"
76
77
  },
77
78
  "peerDependenciesMeta": {
@@ -1,12 +1,17 @@
1
1
  import * as React from "react";
2
- import { PaletteMode, Theme, useMediaQuery } from "@mui/material";
3
- import { ThemeProvider, useColorScheme } from "@mui/material/styles";
2
+ import {
3
+ PaletteMode,
4
+ Theme,
5
+ ThemeProvider,
6
+ useColorScheme
7
+ } from "@mui/material/styles";
4
8
  import InitColorSchemeScript from "@mui/material/InitColorSchemeScript";
5
9
  import CssBaseline from "@mui/material/CssBaseline";
6
10
  import invariant from "invariant";
7
11
  import { useLocalStorageState } from "../useLocalStorageState";
8
12
  import { PaletteModeContext } from "../shared/context";
9
13
  import type { AppTheme } from "./AppProvider";
14
+ import useMediaQuery from "@mui/material/useMediaQuery";
10
15
 
11
16
  const COLOR_SCHEME_ATTRIBUTE = "data-toolpad-color-scheme";
12
17
  const COLOR_SCHEME_STORAGE_KEY = "toolpad-color-scheme";
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
- import { styled, useTheme, type Theme, SxProps } from "@mui/material";
4
3
  import MuiAppBar from "@mui/material/AppBar";
5
4
  import Box from "@mui/material/Box";
6
5
  import Drawer from "@mui/material/Drawer";
@@ -22,6 +21,7 @@ import {
22
21
  } from "./utils";
23
22
  import { TitleBar } from "./TitleBar";
24
23
  import { useLocaleText } from "../shared/locales/LocaleContext";
24
+ import { SxProps, Theme, useTheme } from "@mui/material/styles";
25
25
 
26
26
  export interface SidebarFooterProps {
27
27
  mini: boolean;
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
- import { styled } from "@mui/material";
4
3
  import Avatar from "@mui/material/Avatar";
5
4
  import Collapse from "@mui/material/Collapse";
6
5
  import Divider from "@mui/material/Divider";
@@ -24,6 +23,7 @@ import {
24
23
  isPageItemSelected
25
24
  } from "../shared/navigation";
26
25
  import { getDrawerSxTransitionMixin } from "./utils";
26
+ import { styled } from "@mui/material/styles";
27
27
 
28
28
  const NavigationListItemButton = styled(ListItemButton)(({ theme }) => ({
29
29
  borderRadius: 8,
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
  import * as React from "react";
3
- import { useTheme } from "@mui/material";
4
3
  import IconButton from "@mui/material/IconButton";
5
4
  import Tooltip from "@mui/material/Tooltip";
6
5
  import DarkModeIcon from "@mui/icons-material/DarkMode";
@@ -8,6 +7,7 @@ import LightModeIcon from "@mui/icons-material/LightMode";
8
7
  import { PaletteModeContext } from "../shared/context";
9
8
  import useSsr from "../utils/hooks/useSsr";
10
9
  import { useLocaleText } from "../shared/locales/LocaleContext";
10
+ import { useTheme } from "@mui/material/styles";
11
11
 
12
12
  // TODO: When we use this component as the default for a slot, make it non-internal
13
13
  /**
@@ -1,7 +1,9 @@
1
- import { Stack, styled, Typography, useTheme } from "@mui/material";
2
1
  import { Link } from "../shared/Link";
3
2
  import React from "react";
4
3
  import { BrandingContext } from "../shared/context";
4
+ import { styled, useTheme } from "@mui/material/styles";
5
+ import Typography from "@mui/material/Typography";
6
+ import Stack from "@mui/material/Stack";
5
7
 
6
8
  const LogoContainer = styled("div")({
7
9
  position: "relative",
@@ -1,4 +1,4 @@
1
- import type { Theme } from "@mui/material";
1
+ import { Theme } from "@mui/material/styles";
2
2
 
3
3
  export function getDrawerSxTransitionMixin(
4
4
  isExpanded: boolean,
@@ -5,7 +5,6 @@ import Link from "@mui/material/Link";
5
5
  import Stack, { StackProps } from "@mui/material/Stack";
6
6
  import Typography from "@mui/material/Typography";
7
7
  import useSlotProps from "@mui/utils/useSlotProps";
8
- import { styled } from "@mui/material";
9
8
  import { Link as ToolpadLink } from "../shared/Link";
10
9
  import {
11
10
  PageContainerToolbar,
@@ -13,6 +12,7 @@ import {
13
12
  } from "./PageContainerToolbar";
14
13
  import { getItemTitle } from "../shared/navigation";
15
14
  import { useActivePage } from "../useActivePage";
15
+ import { styled } from "@mui/material/styles";
16
16
 
17
17
  const PageContentHeader = styled("div")(({ theme }) => ({
18
18
  display: "flex",
@@ -65,7 +65,9 @@ function reducer(state: PageData, action: PageDataAction) {
65
65
  if (
66
66
  state.breadcrumbs == null &&
67
67
  state.title == null &&
68
- state.page == null
68
+ state.page == null &&
69
+ state.noBreadcrumbs == null &&
70
+ state.noPageHeader == null
69
71
  ) {
70
72
  return state;
71
73
  } else {
@@ -80,13 +82,16 @@ export function PageDataContextProvider(
80
82
  props: React.PropsWithChildren<PageData>
81
83
  ) {
82
84
  // Destruct
83
- const { title, page, breadcrumbs, ...rest } = props;
85
+ const { title, page, breadcrumbs, noBreadcrumbs, noPageHeader, ...rest } =
86
+ props;
84
87
 
85
88
  // useReducer hook to manage state with our reducer function and initial state
86
89
  const [state, dispatch] = React.useReducer(reducer, {
87
90
  title,
88
91
  page,
89
- breadcrumbs
92
+ breadcrumbs,
93
+ noBreadcrumbs,
94
+ noPageHeader
90
95
  });
91
96
 
92
97
  // Provide the state and dispatch function to the context value
@@ -1,6 +1,6 @@
1
1
  "use client";
2
+ import { styled } from "@mui/material/styles";
2
3
  import * as React from "react";
3
- import { styled } from "@mui/material";
4
4
 
5
5
  const PageContainerToolbarRoot = styled("div")(({ theme }) => ({
6
6
  display: "flex",
@@ -14,7 +14,7 @@ export function AppProviderNextPages(props: AppProviderProps) {
14
14
  const params = new URLSearchParams();
15
15
  Object.entries(query ?? {}).forEach(([key, value]) => {
16
16
  asArray(value ?? []).forEach((v) => {
17
- params.append(key, v);
17
+ params.append(key, v.toString());
18
18
  });
19
19
  });
20
20
  return params.toString();
@@ -1,6 +1,7 @@
1
- import * as React from "react";
2
- import { CircularProgress, Typography, styled } from "@mui/material";
3
1
  import ErrorIcon from "@mui/icons-material/Error";
2
+ import CircularProgress from "@mui/material/CircularProgress";
3
+ import { styled } from "@mui/material/styles";
4
+ import Typography from "@mui/material/Typography";
4
5
 
5
6
  const OverlayRoot = styled("div")(({ theme }) => ({
6
7
  position: "absolute",
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
- import type { PaletteMode } from "@mui/material";
3
2
  import type { Branding, Navigation, Router } from "../AppProvider";
3
+ import { PaletteMode } from "@mui/material/styles";
4
4
 
5
5
  export const BrandingContext = React.createContext<Branding | null>(null);
6
6