@iowas/toolpad 1.0.4 → 1.0.6

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/core.js CHANGED
@@ -1,12 +1,132 @@
1
- "use strict";
2
- var __create = Object.create;
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ var React26 = require('react');
5
+ var PropTypes11 = require('prop-types');
6
+ var Popover = require('@mui/material/Popover');
7
+ var Divider = require('@mui/material/Divider');
8
+ var Stack = require('@mui/material/Stack');
9
+ var Button2 = require('@mui/material/Button');
10
+ var styles = require('@mui/material/styles');
11
+ var material = require('@mui/material');
12
+ var CloseIcon = require('@mui/icons-material/Close');
13
+ var useSlotProps = require('@mui/utils/useSlotProps');
14
+ var jsxRuntime = require('react/jsx-runtime');
15
+ require('react-is');
16
+ var Dialog = require('@mui/material/Dialog');
17
+ var DialogTitle = require('@mui/material/DialogTitle');
18
+ var DialogContent = require('@mui/material/DialogContent');
19
+ var DialogActions = require('@mui/material/DialogActions');
20
+ var TextField = require('@mui/material/TextField');
21
+ var DialogContentText = require('@mui/material/DialogContentText');
22
+ var invariant2 = require('invariant');
23
+ var useEventCallback = require('@mui/utils/useEventCallback');
24
+ var InitColorSchemeScript = require('@mui/material/InitColorSchemeScript');
25
+ var CssBaseline = require('@mui/material/CssBaseline');
26
+ var LogoutIcon = require('@mui/icons-material/Logout');
27
+ var Avatar = require('@mui/material/Avatar');
28
+ var Typography = require('@mui/material/Typography');
29
+ var Tooltip = require('@mui/material/Tooltip');
30
+ var IconButton2 = require('@mui/material/IconButton');
31
+ var MoreVertIcon = require('@mui/icons-material/MoreVert');
32
+ var Box4 = require('@mui/material/Box');
33
+ var useMediaQuery2 = require('@mui/material/useMediaQuery');
34
+ var Drawer = require('@mui/material/Drawer');
35
+ var Toolbar2 = require('@mui/material/Toolbar');
36
+ var MuiAppBar = require('@mui/material/AppBar');
37
+ var MenuIcon = require('@mui/icons-material/Menu');
38
+ var MenuOpenIcon = require('@mui/icons-material/MenuOpen');
39
+ var DarkModeIcon = require('@mui/icons-material/DarkMode');
40
+ var LightModeIcon = require('@mui/icons-material/LightMode');
41
+ var List = require('@mui/material/List');
42
+ var ListSubheader = require('@mui/material/ListSubheader');
43
+ var pathToRegexp = require('path-to-regexp');
44
+ var Collapse = require('@mui/material/Collapse');
45
+ var Grow = require('@mui/material/Grow');
46
+ var ListItem = require('@mui/material/ListItem');
47
+ var ListItemButton = require('@mui/material/ListItemButton');
48
+ var ListItemIcon = require('@mui/material/ListItemIcon');
49
+ var ListItemText = require('@mui/material/ListItemText');
50
+ var Paper = require('@mui/material/Paper');
51
+ var ExpandMoreIcon = require('@mui/icons-material/ExpandMore');
52
+ var Container = require('@mui/material/Container');
53
+ var Breadcrumbs = require('@mui/material/Breadcrumbs');
54
+ var Link4 = require('@mui/material/Link');
55
+ var NextLink = require('next/link.js');
56
+ var navigation_js = require('next/navigation.js');
57
+
58
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
59
+
60
+ function _interopNamespace(e) {
61
+ if (e && e.__esModule) return e;
62
+ var n = Object.create(null);
63
+ if (e) {
64
+ Object.keys(e).forEach(function (k) {
65
+ if (k !== 'default') {
66
+ var d = Object.getOwnPropertyDescriptor(e, k);
67
+ Object.defineProperty(n, k, d.get ? d : {
68
+ enumerable: true,
69
+ get: function () { return e[k]; }
70
+ });
71
+ }
72
+ });
73
+ }
74
+ n.default = e;
75
+ return Object.freeze(n);
76
+ }
77
+
78
+ var React26__namespace = /*#__PURE__*/_interopNamespace(React26);
79
+ var PropTypes11__default = /*#__PURE__*/_interopDefault(PropTypes11);
80
+ var Popover__default = /*#__PURE__*/_interopDefault(Popover);
81
+ var Divider__default = /*#__PURE__*/_interopDefault(Divider);
82
+ var Stack__default = /*#__PURE__*/_interopDefault(Stack);
83
+ var Button2__default = /*#__PURE__*/_interopDefault(Button2);
84
+ var CloseIcon__default = /*#__PURE__*/_interopDefault(CloseIcon);
85
+ var useSlotProps__default = /*#__PURE__*/_interopDefault(useSlotProps);
86
+ var Dialog__default = /*#__PURE__*/_interopDefault(Dialog);
87
+ var DialogTitle__default = /*#__PURE__*/_interopDefault(DialogTitle);
88
+ var DialogContent__default = /*#__PURE__*/_interopDefault(DialogContent);
89
+ var DialogActions__default = /*#__PURE__*/_interopDefault(DialogActions);
90
+ var TextField__default = /*#__PURE__*/_interopDefault(TextField);
91
+ var DialogContentText__default = /*#__PURE__*/_interopDefault(DialogContentText);
92
+ var invariant2__default = /*#__PURE__*/_interopDefault(invariant2);
93
+ var useEventCallback__default = /*#__PURE__*/_interopDefault(useEventCallback);
94
+ var InitColorSchemeScript__default = /*#__PURE__*/_interopDefault(InitColorSchemeScript);
95
+ var CssBaseline__default = /*#__PURE__*/_interopDefault(CssBaseline);
96
+ var LogoutIcon__default = /*#__PURE__*/_interopDefault(LogoutIcon);
97
+ var Avatar__default = /*#__PURE__*/_interopDefault(Avatar);
98
+ var Typography__default = /*#__PURE__*/_interopDefault(Typography);
99
+ var Tooltip__default = /*#__PURE__*/_interopDefault(Tooltip);
100
+ var IconButton2__default = /*#__PURE__*/_interopDefault(IconButton2);
101
+ var MoreVertIcon__default = /*#__PURE__*/_interopDefault(MoreVertIcon);
102
+ var Box4__default = /*#__PURE__*/_interopDefault(Box4);
103
+ var useMediaQuery2__default = /*#__PURE__*/_interopDefault(useMediaQuery2);
104
+ var Drawer__default = /*#__PURE__*/_interopDefault(Drawer);
105
+ var Toolbar2__default = /*#__PURE__*/_interopDefault(Toolbar2);
106
+ var MuiAppBar__default = /*#__PURE__*/_interopDefault(MuiAppBar);
107
+ var MenuIcon__default = /*#__PURE__*/_interopDefault(MenuIcon);
108
+ var MenuOpenIcon__default = /*#__PURE__*/_interopDefault(MenuOpenIcon);
109
+ var DarkModeIcon__default = /*#__PURE__*/_interopDefault(DarkModeIcon);
110
+ var LightModeIcon__default = /*#__PURE__*/_interopDefault(LightModeIcon);
111
+ var List__default = /*#__PURE__*/_interopDefault(List);
112
+ var ListSubheader__default = /*#__PURE__*/_interopDefault(ListSubheader);
113
+ var Collapse__default = /*#__PURE__*/_interopDefault(Collapse);
114
+ var Grow__default = /*#__PURE__*/_interopDefault(Grow);
115
+ var ListItem__default = /*#__PURE__*/_interopDefault(ListItem);
116
+ var ListItemButton__default = /*#__PURE__*/_interopDefault(ListItemButton);
117
+ var ListItemIcon__default = /*#__PURE__*/_interopDefault(ListItemIcon);
118
+ var ListItemText__default = /*#__PURE__*/_interopDefault(ListItemText);
119
+ var Paper__default = /*#__PURE__*/_interopDefault(Paper);
120
+ var ExpandMoreIcon__default = /*#__PURE__*/_interopDefault(ExpandMoreIcon);
121
+ var Container__default = /*#__PURE__*/_interopDefault(Container);
122
+ var Breadcrumbs__default = /*#__PURE__*/_interopDefault(Breadcrumbs);
123
+ var Link4__default = /*#__PURE__*/_interopDefault(Link4);
124
+ var NextLink__default = /*#__PURE__*/_interopDefault(NextLink);
125
+
3
126
  var __defProp = Object.defineProperty;
4
127
  var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
128
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
129
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __getProtoOf = Object.getPrototypeOf;
10
130
  var __hasOwnProp = Object.prototype.hasOwnProperty;
11
131
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
12
132
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -34,89 +154,7 @@ var __objRest = (source, exclude) => {
34
154
  }
35
155
  return target;
36
156
  };
37
- var __export = (target, all) => {
38
- for (var name in all)
39
- __defProp(target, name, { get: all[name], enumerable: true });
40
- };
41
- var __copyProps = (to, from, except, desc) => {
42
- if (from && typeof from === "object" || typeof from === "function") {
43
- for (let key of __getOwnPropNames(from))
44
- if (!__hasOwnProp.call(to, key) && key !== except)
45
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
46
- }
47
- return to;
48
- };
49
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
50
- // If the importer is in node compatibility mode or this is not an ESM
51
- // file that has been converted to a CommonJS file using a Babel-
52
- // compatible transform (i.e. "__esModule" has not been set), then set
53
- // "default" to the CommonJS "module.exports" for node compatibility.
54
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
55
- mod
56
- ));
57
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
58
-
59
- // src/core.ts
60
- var core_exports = {};
61
- __export(core_exports, {
62
- Account: () => Account,
63
- AccountPopoverFooter: () => AccountPopoverFooter,
64
- AccountPopoverHeader: () => AccountPopoverHeader,
65
- AccountPreview: () => AccountPreview,
66
- AlertDialog: () => AlertDialog,
67
- AppProvider: () => AppProvider,
68
- AuthenticationContext: () => AuthenticationContext,
69
- ConfirmDialog: () => ConfirmDialog,
70
- DashboardHeader: () => DashboardHeader,
71
- DashboardLayout: () => DashboardLayout,
72
- DashboardSidebarPageItem: () => DashboardSidebarPageItem,
73
- DialogsProvider: () => DialogsProvider,
74
- LocalizationContext: () => LocalizationContext,
75
- LocalizationProvider: () => LocalizationProvider,
76
- NotificationsProvider: () => NotificationsProvider,
77
- PageContainer: () => PageContainer,
78
- PageHeader: () => PageHeader,
79
- PageHeaderToolbar: () => PageHeaderToolbar,
80
- PromptDialog: () => PromptDialog,
81
- SessionContext: () => SessionContext,
82
- SignInButton: () => SignInButton,
83
- SignOutButton: () => SignOutButton,
84
- ThemeSwitcher: () => ThemeSwitcher,
85
- ToolbarActions: () => ToolbarActions,
86
- en: () => en_default,
87
- useActivePage: () => useActivePage,
88
- useDialogs: () => useDialogs,
89
- useLocalStorageState: () => useLocalStorageState,
90
- useLocaleText: () => useLocaleText,
91
- useNotifications: () => useNotifications,
92
- useStorageState: () => useStorageState,
93
- useStorageStateServer: () => useStorageStateServer
94
- });
95
- module.exports = __toCommonJS(core_exports);
96
-
97
- // src/toolpad-core/Account/Account.tsx
98
- var React17 = __toESM(require("react"));
99
- var import_prop_types8 = __toESM(require("prop-types"));
100
- var import_Popover = __toESM(require("@mui/material/Popover"));
101
- var import_Divider = __toESM(require("@mui/material/Divider"));
102
- var import_Stack3 = __toESM(require("@mui/material/Stack"));
103
-
104
- // src/toolpad-core/Account/SignInButton.tsx
105
- var React14 = __toESM(require("react"));
106
- var import_prop_types3 = __toESM(require("prop-types"));
107
- var import_Button2 = __toESM(require("@mui/material/Button"));
108
-
109
- // src/toolpad-core/AppProvider/AppProvider.tsx
110
- var React12 = __toESM(require("react"));
111
- var import_prop_types2 = __toESM(require("prop-types"));
112
- var import_styles3 = require("@mui/material/styles");
113
-
114
- // src/toolpad-core/useNotifications/useNotifications.tsx
115
- var React2 = __toESM(require("react"));
116
-
117
- // src/toolpad-core/useNotifications/NotificationsContext.ts
118
- var React = __toESM(require("react"));
119
- var NotificationsContext = React.createContext(null);
157
+ var NotificationsContext = React26__namespace.createContext(null);
120
158
 
121
159
  // src/toolpad-core/useNotifications/useNotifications.tsx
122
160
  var serverNotifications = {
@@ -128,24 +166,13 @@ var serverNotifications = {
128
166
  }
129
167
  };
130
168
  function useNotifications() {
131
- const context = React2.useContext(NotificationsContext);
169
+ const context = React26__namespace.useContext(NotificationsContext);
132
170
  if (context) {
133
171
  return context;
134
172
  }
135
173
  return serverNotifications;
136
174
  }
137
175
 
138
- // src/toolpad-core/useNotifications/NotificationsProvider.tsx
139
- var React5 = __toESM(require("react"));
140
- var import_material = require("@mui/material");
141
- var import_Close = __toESM(require("@mui/icons-material/Close"));
142
- var import_useSlotProps = __toESM(require("@mui/utils/useSlotProps"));
143
-
144
- // src/toolpad-core/AppProvider/LocalizationProvider.tsx
145
- var React3 = __toESM(require("react"));
146
- var import_prop_types = __toESM(require("prop-types"));
147
- var import_styles = require("@mui/material/styles");
148
-
149
176
  // src/toolpad-core/locales/getLocalization.ts
150
177
  var getLocalization = (translations) => {
151
178
  return {
@@ -208,21 +235,18 @@ var enLabels = {
208
235
  deletedItemMessage: "This item has been deleted."
209
236
  };
210
237
  var en_default = getLocalization(enLabels);
211
-
212
- // src/toolpad-core/AppProvider/LocalizationProvider.tsx
213
- var import_jsx_runtime = require("react/jsx-runtime");
214
- var LocalizationContext = React3.createContext({});
238
+ var LocalizationContext = React26__namespace.createContext({});
215
239
  var LocalizationProvider = function LocalizationProvider2(props) {
216
240
  var _a, _b, _c;
217
241
  const { localeText: propsLocaleText, children } = props;
218
- const theme = (0, import_styles.useTheme)();
242
+ const theme = styles.useTheme();
219
243
  const themeLocaleText = (_c = (_b = (_a = theme == null ? void 0 : theme.components) == null ? void 0 : _a.MuiLocalizationProvider) == null ? void 0 : _b.defaultProps) == null ? void 0 : _c.localeText;
220
244
  const defaultLocaleText3 = en_default.components.MuiLocalizationProvider.defaultProps.localeText;
221
- const localeText = React3.useMemo(
245
+ const localeText = React26__namespace.useMemo(
222
246
  () => __spreadValues(__spreadValues(__spreadValues({}, defaultLocaleText3), themeLocaleText), propsLocaleText),
223
247
  [defaultLocaleText3, themeLocaleText, propsLocaleText]
224
248
  );
225
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(LocalizationContext.Provider, { value: localeText, children });
249
+ return /* @__PURE__ */ jsxRuntime.jsx(LocalizationContext.Provider, { value: localeText, children });
226
250
  };
227
251
  LocalizationProvider.propTypes = {
228
252
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -232,31 +256,23 @@ LocalizationProvider.propTypes = {
232
256
  /**
233
257
  * @ignore
234
258
  */
235
- children: import_prop_types.default.node,
259
+ children: PropTypes11__default.default.node,
236
260
  /**
237
261
  * Locale for components texts
238
262
  */
239
- localeText: import_prop_types.default.object
263
+ localeText: PropTypes11__default.default.object
240
264
  };
241
265
  function useLocaleText() {
242
- return React3.useContext(LocalizationContext);
266
+ return React26__namespace.useContext(LocalizationContext);
243
267
  }
244
-
245
- // src/toolpad-utils/react.tsx
246
- var React4 = __toESM(require("react"));
247
- var ReactIs = __toESM(require("react-is"));
248
- var import_jsx_runtime2 = require("react/jsx-runtime");
249
268
  function useNonNullableContext(context, name) {
250
- const maybeContext = React4.useContext(context);
269
+ const maybeContext = React26__namespace.useContext(context);
251
270
  if (maybeContext === null || maybeContext === void 0) {
252
271
  throw new Error(`context "${name}" was used without a Provider`);
253
272
  }
254
273
  return maybeContext;
255
274
  }
256
-
257
- // src/toolpad-core/useNotifications/NotificationsProvider.tsx
258
- var import_jsx_runtime3 = require("react/jsx-runtime");
259
- var RootPropsContext = React5.createContext(null);
275
+ var RootPropsContext = React26__namespace.createContext(null);
260
276
  var defaultLocaleText = {
261
277
  close: "Close"
262
278
  };
@@ -266,7 +282,7 @@ function Notification({ notificationKey, open, message, options, badge }) {
266
282
  const localeText = __spreadValues(__spreadValues({}, defaultLocaleText), globalLocaleText);
267
283
  const { close } = useNonNullableContext(NotificationsContext);
268
284
  const { severity, actionText, onAction, autoHideDuration } = options;
269
- const handleClose = React5.useCallback(
285
+ const handleClose = React26__namespace.useCallback(
270
286
  (event, reason) => {
271
287
  if (reason === "clickaway") {
272
288
  return;
@@ -275,23 +291,23 @@ function Notification({ notificationKey, open, message, options, badge }) {
275
291
  },
276
292
  [notificationKey, close]
277
293
  );
278
- const action = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(React5.Fragment, { children: [
279
- onAction ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material.Button, { color: "inherit", size: "small", onClick: onAction, children: actionText != null ? actionText : "Action" }) : null,
280
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
281
- import_material.IconButton,
294
+ const action = /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
295
+ onAction ? /* @__PURE__ */ jsxRuntime.jsx(material.Button, { color: "inherit", size: "small", onClick: onAction, children: actionText != null ? actionText : "Action" }) : null,
296
+ /* @__PURE__ */ jsxRuntime.jsx(
297
+ material.IconButton,
282
298
  {
283
299
  size: "small",
284
300
  "aria-label": localeText == null ? void 0 : localeText.close,
285
301
  title: localeText == null ? void 0 : localeText.close,
286
302
  color: "inherit",
287
303
  onClick: handleClose,
288
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_Close.default, { fontSize: "small" })
304
+ children: /* @__PURE__ */ jsxRuntime.jsx(CloseIcon__default.default, { fontSize: "small" })
289
305
  }
290
306
  )
291
307
  ] });
292
- const props = React5.useContext(RootPropsContext);
293
- const SnackbarComponent = (_b = (_a = props == null ? void 0 : props.slots) == null ? void 0 : _a.snackbar) != null ? _b : import_material.Snackbar;
294
- const snackbarSlotProps = (0, import_useSlotProps.default)({
308
+ const props = React26__namespace.useContext(RootPropsContext);
309
+ const SnackbarComponent = (_b = (_a = props == null ? void 0 : props.slots) == null ? void 0 : _a.snackbar) != null ? _b : material.Snackbar;
310
+ const snackbarSlotProps = useSlotProps__default.default({
295
311
  elementType: SnackbarComponent,
296
312
  ownerState: props,
297
313
  externalSlotProps: (_c = props == null ? void 0 : props.slotProps) == null ? void 0 : _c.snackbar,
@@ -302,12 +318,12 @@ function Notification({ notificationKey, open, message, options, badge }) {
302
318
  action
303
319
  }
304
320
  });
305
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SnackbarComponent, __spreadProps(__spreadValues({}, snackbarSlotProps), { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material.Badge, { badgeContent: badge, color: "primary", sx: { width: "100%" }, children: severity ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material.Alert, { severity, sx: { width: "100%" }, action, children: message }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_material.SnackbarContent, { message, action }) }) }), notificationKey);
321
+ return /* @__PURE__ */ jsxRuntime.jsx(SnackbarComponent, __spreadProps(__spreadValues({}, snackbarSlotProps), { children: /* @__PURE__ */ jsxRuntime.jsx(material.Badge, { badgeContent: badge, color: "primary", sx: { width: "100%" }, children: severity ? /* @__PURE__ */ jsxRuntime.jsx(material.Alert, { severity, sx: { width: "100%" }, action, children: message }) : /* @__PURE__ */ jsxRuntime.jsx(material.SnackbarContent, { message, action }) }) }), notificationKey);
306
322
  }
307
323
  function Notifications({ state }) {
308
324
  var _a;
309
325
  const currentNotification = (_a = state.queue[0]) != null ? _a : null;
310
- return currentNotification ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
326
+ return currentNotification ? /* @__PURE__ */ jsxRuntime.jsx(
311
327
  Notification,
312
328
  __spreadProps(__spreadValues({}, currentNotification), {
313
329
  badge: state.queue.length > 1 ? String(state.queue.length) : null
@@ -322,8 +338,8 @@ var generateId = () => {
322
338
  };
323
339
  function NotificationsProvider(props) {
324
340
  const { children } = props;
325
- const [state, setState] = React5.useState({ queue: [] });
326
- const show = React5.useCallback((message, options = {}) => {
341
+ const [state, setState] = React26__namespace.useState({ queue: [] });
342
+ const show = React26__namespace.useCallback((message, options = {}) => {
327
343
  var _a;
328
344
  const notificationKey = (_a = options.key) != null ? _a : `::toolpad-internal::notification::${generateId()}`;
329
345
  setState((prev) => {
@@ -336,50 +352,29 @@ function NotificationsProvider(props) {
336
352
  });
337
353
  return notificationKey;
338
354
  }, []);
339
- const close = React5.useCallback((key) => {
355
+ const close = React26__namespace.useCallback((key) => {
340
356
  setState((prev) => __spreadProps(__spreadValues({}, prev), {
341
357
  queue: prev.queue.filter((n) => n.notificationKey !== key)
342
358
  }));
343
359
  }, []);
344
- const contextValue = React5.useMemo(() => ({ show, close }), [show, close]);
345
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(RootPropsContext.Provider, { value: props, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(NotificationsContext.Provider, { value: contextValue, children: [
360
+ const contextValue = React26__namespace.useMemo(() => ({ show, close }), [show, close]);
361
+ return /* @__PURE__ */ jsxRuntime.jsx(RootPropsContext.Provider, { value: props, children: /* @__PURE__ */ jsxRuntime.jsxs(NotificationsContext.Provider, { value: contextValue, children: [
346
362
  children,
347
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Notifications, { state })
363
+ /* @__PURE__ */ jsxRuntime.jsx(Notifications, { state })
348
364
  ] }) });
349
365
  }
350
-
351
- // src/toolpad-core/useDialogs/useDialogs.tsx
352
- var import_Button = __toESM(require("@mui/material/Button"));
353
- var import_Dialog = __toESM(require("@mui/material/Dialog"));
354
- var import_DialogTitle = __toESM(require("@mui/material/DialogTitle"));
355
- var import_DialogContent = __toESM(require("@mui/material/DialogContent"));
356
- var import_DialogActions = __toESM(require("@mui/material/DialogActions"));
357
- var import_TextField = __toESM(require("@mui/material/TextField"));
358
- var import_DialogContentText = __toESM(require("@mui/material/DialogContentText"));
359
- var import_invariant = __toESM(require("invariant"));
360
- var React8 = __toESM(require("react"));
361
- var import_useEventCallback = __toESM(require("@mui/utils/useEventCallback"));
362
-
363
- // src/toolpad-core/useDialogs/DialogsContext.tsx
364
- var React6 = __toESM(require("react"));
365
- var DialogsContext = React6.createContext(null);
366
-
367
- // src/toolpad-core/shared/context.ts
368
- var React7 = __toESM(require("react"));
369
- var BrandingContext = React7.createContext(null);
370
- var NavigationContext = React7.createContext([]);
371
- var PaletteModeContext = React7.createContext({
366
+ var DialogsContext = React26__namespace.createContext(null);
367
+ var BrandingContext = React26__namespace.createContext(null);
368
+ var NavigationContext = React26__namespace.createContext([]);
369
+ var PaletteModeContext = React26__namespace.createContext({
372
370
  paletteMode: "light",
373
371
  setPaletteMode: () => {
374
372
  },
375
373
  isDualTheme: false
376
374
  });
377
- var RouterContext = React7.createContext(null);
378
- var DashboardSidebarPageItemContext = React7.createContext(null);
379
- var WindowContext = React7.createContext(void 0);
380
-
381
- // src/toolpad-core/useDialogs/useDialogs.tsx
382
- var import_jsx_runtime4 = require("react/jsx-runtime");
375
+ var RouterContext = React26__namespace.createContext(null);
376
+ var DashboardSidebarPageItemContext = React26__namespace.createContext(null);
377
+ var WindowContext = React26__namespace.createContext(void 0);
383
378
  var defaultLocaleText2 = {
384
379
  alert: "Alert",
385
380
  confirm: "Confirm",
@@ -387,7 +382,7 @@ var defaultLocaleText2 = {
387
382
  ok: "Ok"
388
383
  };
389
384
  function useDialogLoadingButton(onClose) {
390
- const [loading, setLoading] = React8.useState(false);
385
+ const [loading, setLoading] = React26__namespace.useState(false);
391
386
  const handleClick = async () => {
392
387
  try {
393
388
  setLoading(true);
@@ -403,12 +398,12 @@ function useDialogLoadingButton(onClose) {
403
398
  }
404
399
  function AlertDialog({ open, payload, onClose }) {
405
400
  var _a, _b;
406
- const appWindowContext = React8.useContext(WindowContext);
401
+ const appWindowContext = React26__namespace.useContext(WindowContext);
407
402
  const globalLocaleText = useLocaleText();
408
403
  const localeText = __spreadValues(__spreadValues({}, defaultLocaleText2), globalLocaleText);
409
404
  const okButtonProps = useDialogLoadingButton(() => onClose());
410
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
411
- import_Dialog.default,
405
+ return /* @__PURE__ */ jsxRuntime.jsxs(
406
+ Dialog__default.default,
412
407
  {
413
408
  maxWidth: "xs",
414
409
  fullWidth: true,
@@ -416,22 +411,22 @@ function AlertDialog({ open, payload, onClose }) {
416
411
  onClose: () => onClose(),
417
412
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
418
413
  children: [
419
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DialogTitle.default, { children: (_a = payload.title) != null ? _a : localeText.alert }),
420
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DialogContent.default, { children: payload.msg }),
421
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DialogActions.default, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Button.default, __spreadProps(__spreadValues({ disabled: !open }, okButtonProps), { children: (_b = payload.okText) != null ? _b : localeText.ok })) })
414
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: (_a = payload.title) != null ? _a : localeText.alert }),
415
+ /* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: payload.msg }),
416
+ /* @__PURE__ */ jsxRuntime.jsx(DialogActions__default.default, { children: /* @__PURE__ */ jsxRuntime.jsx(Button2__default.default, __spreadProps(__spreadValues({ disabled: !open }, okButtonProps), { children: (_b = payload.okText) != null ? _b : localeText.ok })) })
422
417
  ]
423
418
  }
424
419
  );
425
420
  }
426
421
  function ConfirmDialog({ open, payload, onClose }) {
427
422
  var _a, _b, _c;
428
- const appWindowContext = React8.useContext(WindowContext);
423
+ const appWindowContext = React26__namespace.useContext(WindowContext);
429
424
  const globalLocaleText = useLocaleText();
430
425
  const localeText = __spreadValues(__spreadValues({}, defaultLocaleText2), globalLocaleText);
431
426
  const cancelButtonProps = useDialogLoadingButton(() => onClose(false));
432
427
  const okButtonProps = useDialogLoadingButton(() => onClose(true));
433
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
434
- import_Dialog.default,
428
+ return /* @__PURE__ */ jsxRuntime.jsxs(
429
+ Dialog__default.default,
435
430
  {
436
431
  maxWidth: "xs",
437
432
  fullWidth: true,
@@ -439,11 +434,11 @@ function ConfirmDialog({ open, payload, onClose }) {
439
434
  onClose: () => onClose(false),
440
435
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
441
436
  children: [
442
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DialogTitle.default, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
443
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DialogContent.default, { children: payload.msg }),
444
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_DialogActions.default, { children: [
445
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Button.default, __spreadProps(__spreadValues({ autoFocus: true, disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
446
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Button.default, __spreadProps(__spreadValues({ color: payload.severity, disabled: !open }, okButtonProps), { children: (_c = payload.okText) != null ? _c : localeText.ok }))
437
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
438
+ /* @__PURE__ */ jsxRuntime.jsx(DialogContent__default.default, { children: payload.msg }),
439
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { children: [
440
+ /* @__PURE__ */ jsxRuntime.jsx(Button2__default.default, __spreadProps(__spreadValues({ autoFocus: true, disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
441
+ /* @__PURE__ */ jsxRuntime.jsx(Button2__default.default, __spreadProps(__spreadValues({ color: payload.severity, disabled: !open }, okButtonProps), { children: (_c = payload.okText) != null ? _c : localeText.ok }))
447
442
  ] })
448
443
  ]
449
444
  }
@@ -451,15 +446,15 @@ function ConfirmDialog({ open, payload, onClose }) {
451
446
  }
452
447
  function PromptDialog({ open, payload, onClose }) {
453
448
  var _a, _b, _c;
454
- const appWindowContext = React8.useContext(WindowContext);
449
+ const appWindowContext = React26__namespace.useContext(WindowContext);
455
450
  const globalLocaleText = useLocaleText();
456
451
  const localeText = __spreadValues(__spreadValues({}, defaultLocaleText2), globalLocaleText);
457
- const [input, setInput] = React8.useState("");
452
+ const [input, setInput] = React26__namespace.useState("");
458
453
  const cancelButtonProps = useDialogLoadingButton(() => onClose(null));
459
- const [loading, setLoading] = React8.useState(false);
454
+ const [loading, setLoading] = React26__namespace.useState(false);
460
455
  const name = "input";
461
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
462
- import_Dialog.default,
456
+ return /* @__PURE__ */ jsxRuntime.jsxs(
457
+ Dialog__default.default,
463
458
  {
464
459
  maxWidth: "xs",
465
460
  fullWidth: true,
@@ -474,7 +469,7 @@ function PromptDialog({ open, payload, onClose }) {
474
469
  setLoading(true);
475
470
  const formData = new FormData(event.currentTarget);
476
471
  const value = (_a2 = formData.get(name)) != null ? _a2 : "";
477
- (0, import_invariant.default)(typeof value === "string", "Value must come from a text input");
472
+ invariant2__default.default(typeof value === "string", "Value must come from a text input");
478
473
  await onClose(value);
479
474
  } finally {
480
475
  setLoading(false);
@@ -483,14 +478,14 @@ function PromptDialog({ open, payload, onClose }) {
483
478
  },
484
479
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
485
480
  children: [
486
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_DialogTitle.default, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
487
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_DialogContent.default, { children: [
488
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_DialogContentText.default, { children: [
481
+ /* @__PURE__ */ jsxRuntime.jsx(DialogTitle__default.default, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
482
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogContent__default.default, { children: [
483
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogContentText__default.default, { children: [
489
484
  payload.msg,
490
485
  " "
491
486
  ] }),
492
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
493
- import_TextField.default,
487
+ /* @__PURE__ */ jsxRuntime.jsx(
488
+ TextField__default.default,
494
489
  {
495
490
  autoFocus: true,
496
491
  required: true,
@@ -505,9 +500,9 @@ function PromptDialog({ open, payload, onClose }) {
505
500
  }
506
501
  )
507
502
  ] }),
508
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_DialogActions.default, { children: [
509
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Button.default, __spreadProps(__spreadValues({ disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
510
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_Button.default, { disabled: !open, loading, type: "submit", children: (_c = payload.okText) != null ? _c : localeText.ok })
503
+ /* @__PURE__ */ jsxRuntime.jsxs(DialogActions__default.default, { children: [
504
+ /* @__PURE__ */ jsxRuntime.jsx(Button2__default.default, __spreadProps(__spreadValues({ disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
505
+ /* @__PURE__ */ jsxRuntime.jsx(Button2__default.default, { disabled: !open, loading, type: "submit", children: (_c = payload.okText) != null ? _c : localeText.ok })
511
506
  ] })
512
507
  ]
513
508
  }
@@ -515,25 +510,25 @@ function PromptDialog({ open, payload, onClose }) {
515
510
  }
516
511
  function useDialogs() {
517
512
  const { open, close } = useNonNullableContext(DialogsContext);
518
- const alert = (0, import_useEventCallback.default)(
513
+ const alert = useEventCallback__default.default(
519
514
  (msg, _a = {}) => {
520
515
  var _b = _a, { onClose } = _b, options = __objRest(_b, ["onClose"]);
521
516
  return open(AlertDialog, __spreadProps(__spreadValues({}, options), { msg }), { onClose });
522
517
  }
523
518
  );
524
- const confirm = (0, import_useEventCallback.default)(
519
+ const confirm = useEventCallback__default.default(
525
520
  (msg, _c = {}) => {
526
521
  var _d = _c, { onClose } = _d, options = __objRest(_d, ["onClose"]);
527
522
  return open(ConfirmDialog, __spreadProps(__spreadValues({}, options), { msg }), { onClose });
528
523
  }
529
524
  );
530
- const prompt = (0, import_useEventCallback.default)(
525
+ const prompt = useEventCallback__default.default(
531
526
  (msg, _e = {}) => {
532
527
  var _f = _e, { onClose } = _f, options = __objRest(_f, ["onClose"]);
533
528
  return open(PromptDialog, __spreadProps(__spreadValues({}, options), { msg }), { onClose });
534
529
  }
535
530
  );
536
- return React8.useMemo(
531
+ return React26__namespace.useMemo(
537
532
  () => ({
538
533
  alert,
539
534
  confirm,
@@ -544,26 +539,20 @@ function useDialogs() {
544
539
  [alert, close, confirm, open, prompt]
545
540
  );
546
541
  }
547
-
548
- // src/toolpad-core/useDialogs/DialogsProvider.tsx
549
- var import_invariant2 = __toESM(require("invariant"));
550
- var React9 = __toESM(require("react"));
551
- var import_useEventCallback2 = __toESM(require("@mui/utils/useEventCallback"));
552
- var import_jsx_runtime5 = require("react/jsx-runtime");
553
542
  function DialogsProvider(props) {
554
543
  const { children, unmountAfter = 1e3 } = props;
555
- const [stack, setStack] = React9.useState([]);
556
- const keyPrefix = React9.useId();
557
- const nextId2 = React9.useRef(0);
558
- const dialogMetadata = React9.useRef(/* @__PURE__ */ new WeakMap());
559
- const requestDialog = (0, import_useEventCallback2.default)(function open(Component, payload, options = {}) {
544
+ const [stack, setStack] = React26__namespace.useState([]);
545
+ const keyPrefix = React26__namespace.useId();
546
+ const nextId2 = React26__namespace.useRef(0);
547
+ const dialogMetadata = React26__namespace.useRef(/* @__PURE__ */ new WeakMap());
548
+ const requestDialog = useEventCallback__default.default(function open(Component, payload, options = {}) {
560
549
  const { onClose = async () => {
561
550
  } } = options;
562
551
  let resolve;
563
552
  const promise = new Promise((resolveImpl) => {
564
553
  resolve = resolveImpl;
565
554
  });
566
- (0, import_invariant2.default)(resolve, "resolve not set");
555
+ invariant2__default.default(resolve, "resolve not set");
567
556
  const key = `${keyPrefix}-${nextId2.current}`;
568
557
  nextId2.current += 1;
569
558
  const newEntry = {
@@ -579,7 +568,7 @@ function DialogsProvider(props) {
579
568
  setStack((prevStack) => [...prevStack, newEntry]);
580
569
  return promise;
581
570
  });
582
- const closeDialogUi = (0, import_useEventCallback2.default)(function closeDialogUi2(dialog) {
571
+ const closeDialogUi = useEventCallback__default.default(function closeDialogUi2(dialog) {
583
572
  setStack(
584
573
  (prevStack) => prevStack.map((entry) => entry.promise === dialog ? __spreadProps(__spreadValues({}, entry), { open: false }) : entry)
585
574
  );
@@ -587,9 +576,9 @@ function DialogsProvider(props) {
587
576
  setStack((prevStack) => prevStack.filter((entry) => entry.promise !== dialog));
588
577
  }, unmountAfter);
589
578
  });
590
- const closeDialog = (0, import_useEventCallback2.default)(async function closeDialog2(dialog, result) {
579
+ const closeDialog = useEventCallback__default.default(async function closeDialog2(dialog, result) {
591
580
  const entryToClose = dialogMetadata.current.get(dialog);
592
- (0, import_invariant2.default)(entryToClose, "dialog not found");
581
+ invariant2__default.default(entryToClose, "dialog not found");
593
582
  try {
594
583
  await entryToClose.onClose(result);
595
584
  } finally {
@@ -598,13 +587,13 @@ function DialogsProvider(props) {
598
587
  }
599
588
  return dialog;
600
589
  });
601
- const contextValue = React9.useMemo(
590
+ const contextValue = React26__namespace.useMemo(
602
591
  () => ({ open: requestDialog, close: closeDialog }),
603
592
  [requestDialog, closeDialog]
604
593
  );
605
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(DialogsContext.Provider, { value: contextValue, children: [
594
+ return /* @__PURE__ */ jsxRuntime.jsxs(DialogsContext.Provider, { value: contextValue, children: [
606
595
  children,
607
- stack.map(({ key, open, Component, payload, promise }) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
596
+ stack.map(({ key, open, Component, payload, promise }) => /* @__PURE__ */ jsxRuntime.jsx(
608
597
  Component,
609
598
  {
610
599
  payload,
@@ -618,17 +607,6 @@ function DialogsProvider(props) {
618
607
  ] });
619
608
  }
620
609
 
621
- // src/toolpad-core/AppProvider/AppThemeProvider.tsx
622
- var React11 = __toESM(require("react"));
623
- var import_material2 = require("@mui/material");
624
- var import_styles2 = require("@mui/material/styles");
625
- var import_InitColorSchemeScript = __toESM(require("@mui/material/InitColorSchemeScript"));
626
- var import_CssBaseline = __toESM(require("@mui/material/CssBaseline"));
627
- var import_invariant3 = __toESM(require("invariant"));
628
-
629
- // src/toolpad-core/persistence/useStorageState.tsx
630
- var React10 = __toESM(require("react"));
631
-
632
610
  // src/toolpad-core/persistence/codec.tsx
633
611
  var CODEC_STRING = {
634
612
  parse: (value) => value,
@@ -726,32 +704,32 @@ var getKeyServerSnapshot = () => null;
726
704
  function useStorageState(area, key, initializer = null, options) {
727
705
  var _a;
728
706
  const codec = (_a = options == null ? void 0 : options.codec) != null ? _a : CODEC_STRING;
729
- const [initialValue] = React10.useState(initializer);
730
- const encodedInitialValue = React10.useMemo(
707
+ const [initialValue] = React26__namespace.useState(initializer);
708
+ const encodedInitialValue = React26__namespace.useMemo(
731
709
  () => encode(codec, initialValue),
732
710
  [codec, initialValue]
733
711
  );
734
- const subscribeKey = React10.useCallback(
712
+ const subscribeKey = React26__namespace.useCallback(
735
713
  (callback) => subscribe(area, key, callback),
736
714
  [area, key]
737
715
  );
738
- const getKeySnapshot = React10.useCallback(
716
+ const getKeySnapshot = React26__namespace.useCallback(
739
717
  () => {
740
718
  var _a2;
741
719
  return (_a2 = getSnapshot(area, key)) != null ? _a2 : encodedInitialValue;
742
720
  },
743
721
  [area, encodedInitialValue, key]
744
722
  );
745
- const encodedStoredValue = React10.useSyncExternalStore(
723
+ const encodedStoredValue = React26__namespace.useSyncExternalStore(
746
724
  subscribeKey,
747
725
  getKeySnapshot,
748
726
  getKeyServerSnapshot
749
727
  );
750
- const storedValue = React10.useMemo(
728
+ const storedValue = React26__namespace.useMemo(
751
729
  () => decode(codec, encodedStoredValue),
752
730
  [codec, encodedStoredValue]
753
731
  );
754
- const setStoredValue = React10.useCallback(
732
+ const setStoredValue = React26__namespace.useCallback(
755
733
  (value) => {
756
734
  const valueToStore = value instanceof Function ? value(storedValue) : value;
757
735
  const encodedValueToStore = encode(codec, valueToStore);
@@ -759,7 +737,7 @@ function useStorageState(area, key, initializer = null, options) {
759
737
  },
760
738
  [area, codec, storedValue, key]
761
739
  );
762
- const [nonStoredValue, setNonStoredValue] = React10.useState(initialValue);
740
+ const [nonStoredValue, setNonStoredValue] = React26__namespace.useState(initialValue);
763
741
  if (!key) {
764
742
  return [nonStoredValue, setNonStoredValue];
765
743
  }
@@ -769,13 +747,10 @@ function useStorageState(area, key, initializer = null, options) {
769
747
  // src/toolpad-core/useLocalStorageState/useLocalStorageState.tsx
770
748
  var useLocalStorageStateBrowser = (...args) => useStorageState(window.localStorage, ...args);
771
749
  var useLocalStorageState = typeof window === "undefined" ? useStorageStateServer : useLocalStorageStateBrowser;
772
-
773
- // src/toolpad-core/AppProvider/AppThemeProvider.tsx
774
- var import_jsx_runtime6 = require("react/jsx-runtime");
775
750
  var COLOR_SCHEME_STORAGE_KEY = "toolpad-color-scheme";
776
751
  var MODE_STORAGE_KEY = "toolpad-mode";
777
752
  function usePreferredMode(window2) {
778
- const prefersDarkMode = (0, import_material2.useMediaQuery)(
753
+ const prefersDarkMode = material.useMediaQuery(
779
754
  "(prefers-color-scheme: dark)",
780
755
  window2 && {
781
756
  matchMedia: window2.matchMedia
@@ -788,19 +763,19 @@ function isCssVarsTheme(theme) {
788
763
  }
789
764
  function LegacyThemeProvider(props) {
790
765
  const { children, theme, window: appWindow } = props;
791
- (0, import_invariant3.default)(!isCssVarsTheme(theme), "This provider only accepts legacy themes.");
766
+ invariant2__default.default(!isCssVarsTheme(theme), "This provider only accepts legacy themes.");
792
767
  const isDualTheme = "light" in theme || "dark" in theme;
793
768
  const preferredMode = usePreferredMode(appWindow);
794
769
  const [userMode, setUserMode] = useLocalStorageState(MODE_STORAGE_KEY, "system");
795
770
  const paletteMode = !userMode || userMode === "system" ? preferredMode : userMode;
796
- const dualAwareTheme = React11.useMemo(
771
+ const dualAwareTheme = React26__namespace.useMemo(
797
772
  () => {
798
773
  var _a;
799
774
  return isDualTheme ? (_a = theme[paletteMode === "dark" ? "dark" : "light"]) != null ? _a : theme[paletteMode === "dark" ? "light" : "dark"] : theme;
800
775
  },
801
776
  [isDualTheme, paletteMode, theme]
802
777
  );
803
- const paletteModeContextValue = React11.useMemo(
778
+ const paletteModeContextValue = React26__namespace.useMemo(
804
779
  () => ({
805
780
  paletteMode,
806
781
  setPaletteMode: setUserMode,
@@ -808,29 +783,29 @@ function LegacyThemeProvider(props) {
808
783
  }),
809
784
  [isDualTheme, paletteMode, setUserMode]
810
785
  );
811
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_styles2.ThemeProvider, { theme: dualAwareTheme, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(PaletteModeContext.Provider, { value: paletteModeContextValue, children: [
812
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CssBaseline.default, { enableColorScheme: true }),
786
+ return /* @__PURE__ */ jsxRuntime.jsx(styles.ThemeProvider, { theme: dualAwareTheme, children: /* @__PURE__ */ jsxRuntime.jsxs(PaletteModeContext.Provider, { value: paletteModeContextValue, children: [
787
+ /* @__PURE__ */ jsxRuntime.jsx(CssBaseline__default.default, { enableColorScheme: true }),
813
788
  children
814
789
  ] }) });
815
790
  }
816
791
  function CssVarsPaletteModeProvider(props) {
817
792
  const { children, window: appWindow } = props;
818
793
  const preferredMode = usePreferredMode(appWindow);
819
- const { mode, setMode, allColorSchemes } = (0, import_styles2.useColorScheme)();
820
- const paletteModeContextValue = React11.useMemo(() => {
794
+ const { mode, setMode, allColorSchemes } = styles.useColorScheme();
795
+ const paletteModeContextValue = React26__namespace.useMemo(() => {
821
796
  return {
822
797
  paletteMode: !mode || mode === "system" ? preferredMode : mode,
823
798
  setPaletteMode: setMode,
824
799
  isDualTheme: allColorSchemes.length > 1
825
800
  };
826
801
  }, [allColorSchemes, mode, preferredMode, setMode]);
827
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PaletteModeContext.Provider, { value: paletteModeContextValue, children });
802
+ return /* @__PURE__ */ jsxRuntime.jsx(PaletteModeContext.Provider, { value: paletteModeContextValue, children });
828
803
  }
829
804
  function CssVarsThemeProvider(props) {
830
805
  const { children, theme, window: appWindow, nonce } = props;
831
- (0, import_invariant3.default)(isCssVarsTheme(theme), "This provider only accepts CSS vars themes.");
832
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
833
- import_styles2.ThemeProvider,
806
+ invariant2__default.default(isCssVarsTheme(theme), "This provider only accepts CSS vars themes.");
807
+ return /* @__PURE__ */ jsxRuntime.jsxs(
808
+ styles.ThemeProvider,
834
809
  {
835
810
  theme,
836
811
  documentNode: appWindow == null ? void 0 : appWindow.document,
@@ -839,8 +814,8 @@ function CssVarsThemeProvider(props) {
839
814
  colorSchemeStorageKey: COLOR_SCHEME_STORAGE_KEY,
840
815
  modeStorageKey: MODE_STORAGE_KEY,
841
816
  children: [
842
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
843
- import_InitColorSchemeScript.default,
817
+ /* @__PURE__ */ jsxRuntime.jsx(
818
+ InitColorSchemeScript__default.default,
844
819
  {
845
820
  attribute: theme.colorSchemeSelector,
846
821
  colorSchemeStorageKey: COLOR_SCHEME_STORAGE_KEY,
@@ -848,8 +823,8 @@ function CssVarsThemeProvider(props) {
848
823
  nonce
849
824
  }
850
825
  ),
851
- /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(CssVarsPaletteModeProvider, { window: appWindow, children: [
852
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_CssBaseline.default, { enableColorScheme: true }),
826
+ /* @__PURE__ */ jsxRuntime.jsxs(CssVarsPaletteModeProvider, { window: appWindow, children: [
827
+ /* @__PURE__ */ jsxRuntime.jsx(CssBaseline__default.default, { enableColorScheme: true }),
853
828
  children
854
829
  ] })
855
830
  ]
@@ -859,15 +834,12 @@ function CssVarsThemeProvider(props) {
859
834
  function AppThemeProvider(props) {
860
835
  const _a = props, { children, theme } = _a, rest = __objRest(_a, ["children", "theme"]);
861
836
  const useCssVarsProvider = isCssVarsTheme(theme);
862
- return useCssVarsProvider ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CssVarsThemeProvider, __spreadProps(__spreadValues({ theme }, rest), { children })) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(LegacyThemeProvider, __spreadProps(__spreadValues({ theme }, rest), { children }));
837
+ return useCssVarsProvider ? /* @__PURE__ */ jsxRuntime.jsx(CssVarsThemeProvider, __spreadProps(__spreadValues({ theme }, rest), { children })) : /* @__PURE__ */ jsxRuntime.jsx(LegacyThemeProvider, __spreadProps(__spreadValues({ theme }, rest), { children }));
863
838
  }
864
-
865
- // src/toolpad-core/AppProvider/AppProvider.tsx
866
- var import_jsx_runtime7 = require("react/jsx-runtime");
867
- var AuthenticationContext = React12.createContext(null);
868
- var SessionContext = React12.createContext(null);
839
+ var AuthenticationContext = React26__namespace.createContext(null);
840
+ var SessionContext = React26__namespace.createContext(null);
869
841
  function createDefaultTheme() {
870
- return (0, import_styles3.createTheme)({
842
+ return styles.createTheme({
871
843
  cssVariables: {
872
844
  colorSchemeSelector: "data-toolpad-color-scheme"
873
845
  },
@@ -887,7 +859,7 @@ function AppProvider(props) {
887
859
  window: appWindow,
888
860
  nonce
889
861
  } = props;
890
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(WindowContext.Provider, { value: appWindow, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AuthenticationContext.Provider, { value: authentication, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(SessionContext.Provider, { value: session, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(RouterContext.Provider, { value: router, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(AppThemeProvider, { theme, window: appWindow, nonce, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(LocalizationProvider, { localeText, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NotificationsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(DialogsProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(BrandingContext.Provider, { value: branding, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(NavigationContext.Provider, { value: navigation, children }) }) }) }) }) }) }) }) }) });
862
+ return /* @__PURE__ */ jsxRuntime.jsx(WindowContext.Provider, { value: appWindow, children: /* @__PURE__ */ jsxRuntime.jsx(AuthenticationContext.Provider, { value: authentication, children: /* @__PURE__ */ jsxRuntime.jsx(SessionContext.Provider, { value: session, children: /* @__PURE__ */ jsxRuntime.jsx(RouterContext.Provider, { value: router, children: /* @__PURE__ */ jsxRuntime.jsx(AppThemeProvider, { theme, window: appWindow, nonce, children: /* @__PURE__ */ jsxRuntime.jsx(LocalizationProvider, { localeText, children: /* @__PURE__ */ jsxRuntime.jsx(NotificationsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(DialogsProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(BrandingContext.Provider, { value: branding, children: /* @__PURE__ */ jsxRuntime.jsx(NavigationContext.Provider, { value: navigation, children }) }) }) }) }) }) }) }) }) });
891
863
  }
892
864
  AppProvider.propTypes = {
893
865
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -898,114 +870,108 @@ AppProvider.propTypes = {
898
870
  * Authentication methods.
899
871
  * @default null
900
872
  */
901
- authentication: import_prop_types2.default.shape({
902
- signIn: import_prop_types2.default.func.isRequired,
903
- signOut: import_prop_types2.default.func.isRequired
873
+ authentication: PropTypes11__default.default.shape({
874
+ signIn: PropTypes11__default.default.func.isRequired,
875
+ signOut: PropTypes11__default.default.func.isRequired
904
876
  }),
905
877
  /**
906
878
  * Branding options for the app.
907
879
  * @default null
908
880
  */
909
- branding: import_prop_types2.default.shape({
910
- homeUrl: import_prop_types2.default.string,
911
- logo: import_prop_types2.default.node,
912
- title: import_prop_types2.default.string
881
+ branding: PropTypes11__default.default.shape({
882
+ homeUrl: PropTypes11__default.default.string,
883
+ logo: PropTypes11__default.default.node,
884
+ title: PropTypes11__default.default.string
913
885
  }),
914
886
  /**
915
887
  * The content of the app provider.
916
888
  */
917
- children: import_prop_types2.default.node,
889
+ children: PropTypes11__default.default.node,
918
890
  /**
919
891
  * Locale text for components
920
892
  */
921
- localeText: import_prop_types2.default.object,
893
+ localeText: PropTypes11__default.default.object,
922
894
  /**
923
895
  * Navigation definition for the app. [Find out more](https://mui.com/toolpad/core/react-app-provider/#navigation).
924
896
  * @default []
925
897
  */
926
- navigation: import_prop_types2.default.arrayOf(
927
- import_prop_types2.default.oneOfType([
928
- import_prop_types2.default.shape({
929
- action: import_prop_types2.default.node,
930
- children: import_prop_types2.default.arrayOf(
931
- import_prop_types2.default.oneOfType([
932
- import_prop_types2.default.object,
933
- import_prop_types2.default.shape({
934
- kind: import_prop_types2.default.oneOf(["header"]).isRequired,
935
- title: import_prop_types2.default.string.isRequired
898
+ navigation: PropTypes11__default.default.arrayOf(
899
+ PropTypes11__default.default.oneOfType([
900
+ PropTypes11__default.default.shape({
901
+ action: PropTypes11__default.default.node,
902
+ children: PropTypes11__default.default.arrayOf(
903
+ PropTypes11__default.default.oneOfType([
904
+ PropTypes11__default.default.object,
905
+ PropTypes11__default.default.shape({
906
+ kind: PropTypes11__default.default.oneOf(["header"]).isRequired,
907
+ title: PropTypes11__default.default.string.isRequired
936
908
  }),
937
- import_prop_types2.default.shape({
938
- kind: import_prop_types2.default.oneOf(["divider"]).isRequired
909
+ PropTypes11__default.default.shape({
910
+ kind: PropTypes11__default.default.oneOf(["divider"]).isRequired
939
911
  })
940
912
  ]).isRequired
941
913
  ),
942
- icon: import_prop_types2.default.node,
943
- kind: import_prop_types2.default.oneOf(["page"]),
944
- pattern: import_prop_types2.default.string,
945
- segment: import_prop_types2.default.string,
946
- title: import_prop_types2.default.string
914
+ icon: PropTypes11__default.default.node,
915
+ kind: PropTypes11__default.default.oneOf(["page"]),
916
+ pattern: PropTypes11__default.default.string,
917
+ segment: PropTypes11__default.default.string,
918
+ title: PropTypes11__default.default.string
947
919
  }),
948
- import_prop_types2.default.shape({
949
- kind: import_prop_types2.default.oneOf(["header"]).isRequired,
950
- title: import_prop_types2.default.string.isRequired
920
+ PropTypes11__default.default.shape({
921
+ kind: PropTypes11__default.default.oneOf(["header"]).isRequired,
922
+ title: PropTypes11__default.default.string.isRequired
951
923
  }),
952
- import_prop_types2.default.shape({
953
- kind: import_prop_types2.default.oneOf(["divider"]).isRequired
924
+ PropTypes11__default.default.shape({
925
+ kind: PropTypes11__default.default.oneOf(["divider"]).isRequired
954
926
  })
955
927
  ]).isRequired
956
928
  ),
957
929
  /**
958
930
  * The nonce to be used for inline scripts.
959
931
  */
960
- nonce: import_prop_types2.default.string,
932
+ nonce: PropTypes11__default.default.string,
961
933
  /**
962
934
  * Router implementation used inside Toolpad components.
963
935
  * @default null
964
936
  */
965
- router: import_prop_types2.default.shape({
966
- Link: import_prop_types2.default.elementType,
967
- navigate: import_prop_types2.default.func.isRequired,
968
- pathname: import_prop_types2.default.string.isRequired,
969
- searchParams: import_prop_types2.default.instanceOf(URLSearchParams).isRequired
937
+ router: PropTypes11__default.default.shape({
938
+ Link: PropTypes11__default.default.elementType,
939
+ navigate: PropTypes11__default.default.func.isRequired,
940
+ pathname: PropTypes11__default.default.string.isRequired,
941
+ searchParams: PropTypes11__default.default.instanceOf(URLSearchParams).isRequired
970
942
  }),
971
943
  /**
972
944
  * Session info about the current user.
973
945
  * @default null
974
946
  */
975
- session: import_prop_types2.default.shape({
976
- user: import_prop_types2.default.shape({
977
- email: import_prop_types2.default.string,
978
- id: import_prop_types2.default.string,
979
- image: import_prop_types2.default.string,
980
- name: import_prop_types2.default.string
947
+ session: PropTypes11__default.default.shape({
948
+ user: PropTypes11__default.default.shape({
949
+ email: PropTypes11__default.default.string,
950
+ id: PropTypes11__default.default.string,
951
+ image: PropTypes11__default.default.string,
952
+ name: PropTypes11__default.default.string
981
953
  })
982
954
  }),
983
955
  /**
984
956
  * [Theme or themes](https://mui.com/toolpad/core/react-app-provider/#theming) to be used by the app in light/dark mode. A [CSS variables theme](https://mui.com/material-ui/customization/css-theme-variables/overview/) is recommended.
985
957
  * @default createDefaultTheme()
986
958
  */
987
- theme: import_prop_types2.default.object,
959
+ theme: PropTypes11__default.default.object,
988
960
  /**
989
961
  * The window where the application is rendered.
990
962
  * This is needed when rendering the app inside an iframe, for example.
991
963
  * @default window
992
964
  */
993
- window: import_prop_types2.default.object
965
+ window: PropTypes11__default.default.object
994
966
  };
995
-
996
- // src/toolpad-core/Account/AccountLocaleContext.tsx
997
- var React13 = __toESM(require("react"));
998
- var AccountLocaleContext = React13.createContext(null);
999
-
1000
- // src/toolpad-core/Account/SignInButton.tsx
1001
- var import_jsx_runtime8 = require("react/jsx-runtime");
967
+ var AccountLocaleContext = React26__namespace.createContext(null);
1002
968
  function SignInButton(props) {
1003
- const authentication = React14.useContext(AuthenticationContext);
969
+ const authentication = React26__namespace.useContext(AuthenticationContext);
1004
970
  const globalLocaleText = useLocaleText();
1005
- const accountLocaleText = React14.useContext(AccountLocaleContext);
971
+ const accountLocaleText = React26__namespace.useContext(AccountLocaleContext);
1006
972
  const localeText = __spreadValues(__spreadValues({}, globalLocaleText), accountLocaleText);
1007
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1008
- import_Button2.default,
973
+ return /* @__PURE__ */ jsxRuntime.jsx(
974
+ Button2__default.default,
1009
975
  __spreadProps(__spreadValues({
1010
976
  disableElevation: true,
1011
977
  variant: "contained",
@@ -1034,22 +1000,15 @@ SignInButton.propTypes = {
1034
1000
  /**
1035
1001
  * The content of the component.
1036
1002
  */
1037
- children: import_prop_types3.default.node
1003
+ children: PropTypes11__default.default.node
1038
1004
  };
1039
-
1040
- // src/toolpad-core/Account/SignOutButton.tsx
1041
- var React15 = __toESM(require("react"));
1042
- var import_prop_types4 = __toESM(require("prop-types"));
1043
- var import_Button3 = __toESM(require("@mui/material/Button"));
1044
- var import_Logout = __toESM(require("@mui/icons-material/Logout"));
1045
- var import_jsx_runtime9 = require("react/jsx-runtime");
1046
1005
  function SignOutButton(props) {
1047
- const authentication = React15.useContext(AuthenticationContext);
1006
+ const authentication = React26__namespace.useContext(AuthenticationContext);
1048
1007
  const globalLocaleText = useLocaleText();
1049
- const accountLocaleText = React15.useContext(AccountLocaleContext);
1008
+ const accountLocaleText = React26__namespace.useContext(AccountLocaleContext);
1050
1009
  const localeText = __spreadValues(__spreadValues({}, globalLocaleText), accountLocaleText);
1051
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1052
- import_Button3.default,
1010
+ return /* @__PURE__ */ jsxRuntime.jsx(
1011
+ Button2__default.default,
1053
1012
  __spreadProps(__spreadValues({
1054
1013
  disabled: !authentication,
1055
1014
  variant: "outlined",
@@ -1065,7 +1024,7 @@ function SignOutButton(props) {
1065
1024
  filter: "opacity(1)"
1066
1025
  }
1067
1026
  },
1068
- startIcon: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_Logout.default, {})
1027
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(LogoutIcon__default.default, {})
1069
1028
  }, props), {
1070
1029
  children: localeText == null ? void 0 : localeText.accountSignOutLabel
1071
1030
  })
@@ -1079,31 +1038,20 @@ SignOutButton.propTypes = {
1079
1038
  /**
1080
1039
  * The content of the component.
1081
1040
  */
1082
- children: import_prop_types4.default.node
1041
+ children: PropTypes11__default.default.node
1083
1042
  };
1084
-
1085
- // src/toolpad-core/Account/AccountPreview.tsx
1086
- var React16 = __toESM(require("react"));
1087
- var import_prop_types5 = __toESM(require("prop-types"));
1088
- var import_Avatar = __toESM(require("@mui/material/Avatar"));
1089
- var import_Typography = __toESM(require("@mui/material/Typography"));
1090
- var import_Tooltip = __toESM(require("@mui/material/Tooltip"));
1091
- var import_Stack = __toESM(require("@mui/material/Stack"));
1092
- var import_IconButton = __toESM(require("@mui/material/IconButton"));
1093
- var import_MoreVert = __toESM(require("@mui/icons-material/MoreVert"));
1094
- var import_jsx_runtime10 = require("react/jsx-runtime");
1095
1043
  function AccountPreview(props) {
1096
1044
  var _a, _b, _c, _d, _e, _f, _g, _h;
1097
1045
  const { slots, variant = "condensed", slotProps, open, handleClick, sx } = props;
1098
- const session = React16.useContext(SessionContext);
1046
+ const session = React26__namespace.useContext(SessionContext);
1099
1047
  const globalLocaleText = useLocaleText();
1100
- const accountLocaleText = React16.useContext(AccountLocaleContext);
1048
+ const accountLocaleText = React26__namespace.useContext(AccountLocaleContext);
1101
1049
  const localeText = __spreadValues(__spreadValues({}, globalLocaleText), accountLocaleText);
1102
1050
  if (!session || !session.user) {
1103
1051
  return null;
1104
1052
  }
1105
- const avatarContent = (slots == null ? void 0 : slots.avatar) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(slots.avatar, {}) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1106
- import_Avatar.default,
1053
+ const avatarContent = (slots == null ? void 0 : slots.avatar) ? /* @__PURE__ */ jsxRuntime.jsx(slots.avatar, {}) : /* @__PURE__ */ jsxRuntime.jsx(
1054
+ Avatar__default.default,
1107
1055
  __spreadValues({
1108
1056
  src: ((_a = session.user) == null ? void 0 : _a.image) || "",
1109
1057
  alt: ((_b = session.user) == null ? void 0 : _b.name) || ((_c = session.user) == null ? void 0 : _c.email) || "",
@@ -1111,28 +1059,28 @@ function AccountPreview(props) {
1111
1059
  }, slotProps == null ? void 0 : slotProps.avatar)
1112
1060
  );
1113
1061
  if (variant === "expanded") {
1114
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_Stack.default, { direction: "row", justifyContent: "space-between", sx: __spreadValues({ py: 1, px: 2, gap: 2 }, sx), children: [
1115
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_Stack.default, { direction: "row", justifyContent: "flex-start", spacing: 2, overflow: "hidden", children: [
1062
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "row", justifyContent: "space-between", sx: __spreadValues({ py: 1, px: 2, gap: 2 }, sx), children: [
1063
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "row", justifyContent: "flex-start", spacing: 2, overflow: "hidden", children: [
1116
1064
  avatarContent,
1117
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_Stack.default, { direction: "column", justifyContent: "space-evenly", overflow: "hidden", children: [
1118
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Typography.default, { variant: "body2", fontWeight: "bolder", noWrap: true, children: (_d = session.user) == null ? void 0 : _d.name }),
1119
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Typography.default, { variant: "caption", noWrap: true, children: (_e = session.user) == null ? void 0 : _e.email })
1065
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "column", justifyContent: "space-evenly", overflow: "hidden", children: [
1066
+ /* @__PURE__ */ jsxRuntime.jsx(Typography__default.default, { variant: "body2", fontWeight: "bolder", noWrap: true, children: (_d = session.user) == null ? void 0 : _d.name }),
1067
+ /* @__PURE__ */ jsxRuntime.jsx(Typography__default.default, { variant: "caption", noWrap: true, children: (_e = session.user) == null ? void 0 : _e.email })
1120
1068
  ] })
1121
1069
  ] }),
1122
- handleClick && ((slots == null ? void 0 : slots.moreIconButton) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(slots.moreIconButton, {}) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1123
- import_IconButton.default,
1070
+ handleClick && ((slots == null ? void 0 : slots.moreIconButton) ? /* @__PURE__ */ jsxRuntime.jsx(slots.moreIconButton, {}) : /* @__PURE__ */ jsxRuntime.jsx(
1071
+ IconButton2__default.default,
1124
1072
  __spreadProps(__spreadValues({
1125
1073
  size: "small",
1126
1074
  onClick: handleClick
1127
1075
  }, slotProps == null ? void 0 : slotProps.moreIconButton), {
1128
1076
  sx: __spreadValues({ alignSelf: "center" }, (_f = slotProps == null ? void 0 : slotProps.moreIconButton) == null ? void 0 : _f.sx),
1129
- children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_MoreVert.default, { fontSize: "small" })
1077
+ children: /* @__PURE__ */ jsxRuntime.jsx(MoreVertIcon__default.default, { fontSize: "small" })
1130
1078
  })
1131
1079
  ))
1132
1080
  ] });
1133
1081
  }
1134
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Tooltip.default, { title: (_g = session.user.name) != null ? _g : accountLocaleText == null ? void 0 : accountLocaleText.accountPreviewTitle, children: (slots == null ? void 0 : slots.avatarIconButton) ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(slots.avatarIconButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.avatarIconButton)) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_Stack.default, { sx: __spreadValues({ py: 0.5 }, sx), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1135
- import_IconButton.default,
1082
+ return /* @__PURE__ */ jsxRuntime.jsx(Tooltip__default.default, { title: (_g = session.user.name) != null ? _g : accountLocaleText == null ? void 0 : accountLocaleText.accountPreviewTitle, children: (slots == null ? void 0 : slots.avatarIconButton) ? /* @__PURE__ */ jsxRuntime.jsx(slots.avatarIconButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.avatarIconButton)) : /* @__PURE__ */ jsxRuntime.jsx(Stack__default.default, { sx: __spreadValues({ py: 0.5 }, sx), children: /* @__PURE__ */ jsxRuntime.jsx(
1083
+ IconButton2__default.default,
1136
1084
  __spreadProps(__spreadValues({
1137
1085
  onClick: handleClick,
1138
1086
  "aria-label": localeText == null ? void 0 : localeText.accountPreviewIconButtonLabel,
@@ -1154,35 +1102,35 @@ AccountPreview.propTypes = {
1154
1102
  /**
1155
1103
  * The handler used when the preview is expanded
1156
1104
  */
1157
- handleClick: import_prop_types5.default.func,
1105
+ handleClick: PropTypes11__default.default.func,
1158
1106
  /**
1159
1107
  * The state of the Account popover
1160
1108
  * @default false
1161
1109
  */
1162
- open: import_prop_types5.default.bool,
1110
+ open: PropTypes11__default.default.bool,
1163
1111
  /**
1164
1112
  * The props used for each slot inside.
1165
1113
  */
1166
- slotProps: import_prop_types5.default.shape({
1167
- avatar: import_prop_types5.default.object,
1168
- avatarIconButton: import_prop_types5.default.object,
1169
- moreIconButton: import_prop_types5.default.object
1114
+ slotProps: PropTypes11__default.default.shape({
1115
+ avatar: PropTypes11__default.default.object,
1116
+ avatarIconButton: PropTypes11__default.default.object,
1117
+ moreIconButton: PropTypes11__default.default.object
1170
1118
  }),
1171
1119
  /**
1172
1120
  * The components used for each slot inside.
1173
1121
  */
1174
- slots: import_prop_types5.default.shape({
1175
- avatar: import_prop_types5.default.elementType,
1176
- avatarIconButton: import_prop_types5.default.elementType,
1177
- moreIconButton: import_prop_types5.default.elementType
1122
+ slots: PropTypes11__default.default.shape({
1123
+ avatar: PropTypes11__default.default.elementType,
1124
+ avatarIconButton: PropTypes11__default.default.elementType,
1125
+ moreIconButton: PropTypes11__default.default.elementType
1178
1126
  }),
1179
1127
  /**
1180
1128
  * The prop used to customize the styling of the preview
1181
1129
  */
1182
- sx: import_prop_types5.default.oneOfType([
1183
- import_prop_types5.default.arrayOf(import_prop_types5.default.oneOfType([import_prop_types5.default.func, import_prop_types5.default.object, import_prop_types5.default.bool])),
1184
- import_prop_types5.default.func,
1185
- import_prop_types5.default.object
1130
+ sx: PropTypes11__default.default.oneOfType([
1131
+ PropTypes11__default.default.arrayOf(PropTypes11__default.default.oneOfType([PropTypes11__default.default.func, PropTypes11__default.default.object, PropTypes11__default.default.bool])),
1132
+ PropTypes11__default.default.func,
1133
+ PropTypes11__default.default.object
1186
1134
  ]),
1187
1135
  /**
1188
1136
  * The type of account details to display.
@@ -1190,16 +1138,11 @@ AccountPreview.propTypes = {
1190
1138
  * @property {'expanded'} expanded - Displays the user's avatar, name, and email if available.
1191
1139
  * @default 'condensed'
1192
1140
  */
1193
- variant: import_prop_types5.default.oneOf(["condensed", "expanded"])
1141
+ variant: PropTypes11__default.default.oneOf(["condensed", "expanded"])
1194
1142
  };
1195
-
1196
- // src/toolpad-core/Account/AccountPopoverHeader.tsx
1197
- var import_prop_types6 = __toESM(require("prop-types"));
1198
- var import_Stack2 = __toESM(require("@mui/material/Stack"));
1199
- var import_jsx_runtime11 = require("react/jsx-runtime");
1200
1143
  function AccountPopoverHeader(props) {
1201
1144
  const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
1202
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_Stack2.default, __spreadProps(__spreadValues({}, rest), { children }));
1145
+ return /* @__PURE__ */ jsxRuntime.jsx(Stack__default.default, __spreadProps(__spreadValues({}, rest), { children }));
1203
1146
  }
1204
1147
  AccountPopoverHeader.propTypes = {
1205
1148
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -1209,17 +1152,12 @@ AccountPopoverHeader.propTypes = {
1209
1152
  /**
1210
1153
  * The content of the component.
1211
1154
  */
1212
- children: import_prop_types6.default.node
1155
+ children: PropTypes11__default.default.node
1213
1156
  };
1214
-
1215
- // src/toolpad-core/Account/AccountPopoverFooter.tsx
1216
- var import_prop_types7 = __toESM(require("prop-types"));
1217
- var import_Box = __toESM(require("@mui/material/Box"));
1218
- var import_jsx_runtime12 = require("react/jsx-runtime");
1219
1157
  function AccountPopoverFooter(props) {
1220
1158
  const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
1221
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1222
- import_Box.default,
1159
+ return /* @__PURE__ */ jsxRuntime.jsx(
1160
+ Box4__default.default,
1223
1161
  __spreadProps(__spreadValues({}, rest), {
1224
1162
  sx: __spreadValues({ display: "flex", flexDirection: "row", p: 1, justifyContent: "flex-end" }, rest.sx),
1225
1163
  children
@@ -1234,19 +1172,16 @@ AccountPopoverFooter.propTypes = {
1234
1172
  /**
1235
1173
  * @ignore
1236
1174
  */
1237
- children: import_prop_types7.default.node,
1175
+ children: PropTypes11__default.default.node,
1238
1176
  /**
1239
1177
  * The system prop that allows defining system overrides as well as additional CSS styles.
1240
1178
  */
1241
- sx: import_prop_types7.default.oneOfType([
1242
- import_prop_types7.default.arrayOf(import_prop_types7.default.oneOfType([import_prop_types7.default.func, import_prop_types7.default.object, import_prop_types7.default.bool])),
1243
- import_prop_types7.default.func,
1244
- import_prop_types7.default.object
1179
+ sx: PropTypes11__default.default.oneOfType([
1180
+ PropTypes11__default.default.arrayOf(PropTypes11__default.default.oneOfType([PropTypes11__default.default.func, PropTypes11__default.default.object, PropTypes11__default.default.bool])),
1181
+ PropTypes11__default.default.func,
1182
+ PropTypes11__default.default.object
1245
1183
  ])
1246
1184
  };
1247
-
1248
- // src/toolpad-core/Account/Account.tsx
1249
- var import_jsx_runtime13 = require("react/jsx-runtime");
1250
1185
  var defaultAccountLocaleText = {
1251
1186
  accountPreviewIconButtonLabel: "Current User",
1252
1187
  accountPreviewTitle: "Account",
@@ -1257,14 +1192,14 @@ function Account(props) {
1257
1192
  var _a;
1258
1193
  const { localeText: propsLocaleText } = props;
1259
1194
  const globalLocaleText = useLocaleText();
1260
- const localeText = React17.useMemo(
1195
+ const localeText = React26__namespace.useMemo(
1261
1196
  () => __spreadValues(__spreadValues(__spreadValues({}, defaultAccountLocaleText), globalLocaleText), propsLocaleText),
1262
1197
  [globalLocaleText, propsLocaleText]
1263
1198
  );
1264
1199
  const { slots, slotProps } = props;
1265
- const [anchorEl, setAnchorEl] = React17.useState(null);
1266
- const session = React17.useContext(SessionContext);
1267
- const authentication = React17.useContext(AuthenticationContext);
1200
+ const [anchorEl, setAnchorEl] = React26__namespace.useState(null);
1201
+ const session = React26__namespace.useContext(SessionContext);
1202
+ const authentication = React26__namespace.useContext(AuthenticationContext);
1268
1203
  const open = Boolean(anchorEl);
1269
1204
  const handleClick = (event) => {
1270
1205
  setAnchorEl(event.currentTarget);
@@ -1277,10 +1212,10 @@ function Account(props) {
1277
1212
  }
1278
1213
  let accountContent = null;
1279
1214
  if (!(session == null ? void 0 : session.user)) {
1280
- accountContent = (slots == null ? void 0 : slots.signInButton) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(slots.signInButton, { onClick: authentication.signIn }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SignInButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signInButton));
1215
+ accountContent = (slots == null ? void 0 : slots.signInButton) ? /* @__PURE__ */ jsxRuntime.jsx(slots.signInButton, { onClick: authentication.signIn }) : /* @__PURE__ */ jsxRuntime.jsx(SignInButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signInButton));
1281
1216
  } else {
1282
- accountContent = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(React17.Fragment, { children: [
1283
- (slots == null ? void 0 : slots.preview) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(slots.preview, { handleClick, open }) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1217
+ accountContent = /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
1218
+ (slots == null ? void 0 : slots.preview) ? /* @__PURE__ */ jsxRuntime.jsx(slots.preview, { handleClick, open }) : /* @__PURE__ */ jsxRuntime.jsx(
1284
1219
  AccountPreview,
1285
1220
  __spreadValues({
1286
1221
  variant: "condensed",
@@ -1288,15 +1223,15 @@ function Account(props) {
1288
1223
  open
1289
1224
  }, slotProps == null ? void 0 : slotProps.preview)
1290
1225
  ),
1291
- (slots == null ? void 0 : slots.popover) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1226
+ (slots == null ? void 0 : slots.popover) ? /* @__PURE__ */ jsxRuntime.jsx(
1292
1227
  slots.popover,
1293
1228
  __spreadValues({
1294
1229
  open,
1295
1230
  onClick: handleClick,
1296
1231
  onClose: handleClose
1297
1232
  }, slotProps == null ? void 0 : slotProps.popover)
1298
- ) : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1299
- import_Popover.default,
1233
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1234
+ Popover__default.default,
1300
1235
  __spreadProps(__spreadValues({
1301
1236
  anchorEl,
1302
1237
  id: "account-menu",
@@ -1328,16 +1263,16 @@ function Account(props) {
1328
1263
  }
1329
1264
  }
1330
1265
  }, (_a = slotProps == null ? void 0 : slotProps.popover) == null ? void 0 : _a.slotProps),
1331
- children: (slots == null ? void 0 : slots.popoverContent) ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(slots.popoverContent, __spreadValues({}, slotProps == null ? void 0 : slotProps.popoverContent)) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_Stack3.default, __spreadProps(__spreadValues({ direction: "column" }, slotProps == null ? void 0 : slotProps.popoverContent), { children: [
1332
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccountPopoverHeader, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccountPreview, { variant: "expanded" }) }),
1333
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_Divider.default, {}),
1334
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccountPopoverFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(SignOutButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signOutButton)) })
1266
+ children: (slots == null ? void 0 : slots.popoverContent) ? /* @__PURE__ */ jsxRuntime.jsx(slots.popoverContent, __spreadValues({}, slotProps == null ? void 0 : slotProps.popoverContent)) : /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, __spreadProps(__spreadValues({ direction: "column" }, slotProps == null ? void 0 : slotProps.popoverContent), { children: [
1267
+ /* @__PURE__ */ jsxRuntime.jsx(AccountPopoverHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(AccountPreview, { variant: "expanded" }) }),
1268
+ /* @__PURE__ */ jsxRuntime.jsx(Divider__default.default, {}),
1269
+ /* @__PURE__ */ jsxRuntime.jsx(AccountPopoverFooter, { children: /* @__PURE__ */ jsxRuntime.jsx(SignOutButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signOutButton)) })
1335
1270
  ] }))
1336
1271
  })
1337
1272
  )
1338
1273
  ] });
1339
1274
  }
1340
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(AccountLocaleContext.Provider, { value: localeText, children: accountContent });
1275
+ return /* @__PURE__ */ jsxRuntime.jsx(AccountLocaleContext.Provider, { value: localeText, children: accountContent });
1341
1276
  }
1342
1277
  Account.propTypes = {
1343
1278
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -1347,82 +1282,51 @@ Account.propTypes = {
1347
1282
  /**
1348
1283
  * The labels for the account component.
1349
1284
  */
1350
- localeText: import_prop_types8.default.object,
1285
+ localeText: PropTypes11__default.default.object,
1351
1286
  /**
1352
1287
  * The props used for each slot inside.
1353
1288
  */
1354
- slotProps: import_prop_types8.default.shape({
1355
- popover: import_prop_types8.default.object,
1356
- popoverContent: import_prop_types8.default.object,
1357
- preview: import_prop_types8.default.shape({
1358
- handleClick: import_prop_types8.default.func,
1359
- open: import_prop_types8.default.bool,
1360
- slotProps: import_prop_types8.default.shape({
1361
- avatar: import_prop_types8.default.object,
1362
- avatarIconButton: import_prop_types8.default.object,
1363
- moreIconButton: import_prop_types8.default.object
1289
+ slotProps: PropTypes11__default.default.shape({
1290
+ popover: PropTypes11__default.default.object,
1291
+ popoverContent: PropTypes11__default.default.object,
1292
+ preview: PropTypes11__default.default.shape({
1293
+ handleClick: PropTypes11__default.default.func,
1294
+ open: PropTypes11__default.default.bool,
1295
+ slotProps: PropTypes11__default.default.shape({
1296
+ avatar: PropTypes11__default.default.object,
1297
+ avatarIconButton: PropTypes11__default.default.object,
1298
+ moreIconButton: PropTypes11__default.default.object
1364
1299
  }),
1365
- slots: import_prop_types8.default.shape({
1366
- avatar: import_prop_types8.default.elementType,
1367
- avatarIconButton: import_prop_types8.default.elementType,
1368
- moreIconButton: import_prop_types8.default.elementType
1300
+ slots: PropTypes11__default.default.shape({
1301
+ avatar: PropTypes11__default.default.elementType,
1302
+ avatarIconButton: PropTypes11__default.default.elementType,
1303
+ moreIconButton: PropTypes11__default.default.elementType
1369
1304
  }),
1370
- sx: import_prop_types8.default.oneOfType([
1371
- import_prop_types8.default.arrayOf(import_prop_types8.default.oneOfType([import_prop_types8.default.func, import_prop_types8.default.object, import_prop_types8.default.bool])),
1372
- import_prop_types8.default.func,
1373
- import_prop_types8.default.object
1305
+ sx: PropTypes11__default.default.oneOfType([
1306
+ PropTypes11__default.default.arrayOf(PropTypes11__default.default.oneOfType([PropTypes11__default.default.func, PropTypes11__default.default.object, PropTypes11__default.default.bool])),
1307
+ PropTypes11__default.default.func,
1308
+ PropTypes11__default.default.object
1374
1309
  ]),
1375
- variant: import_prop_types8.default.oneOf(["condensed", "expanded"])
1310
+ variant: PropTypes11__default.default.oneOf(["condensed", "expanded"])
1376
1311
  }),
1377
- signInButton: import_prop_types8.default.object,
1378
- signOutButton: import_prop_types8.default.object
1312
+ signInButton: PropTypes11__default.default.object,
1313
+ signOutButton: PropTypes11__default.default.object
1379
1314
  }),
1380
1315
  /**
1381
1316
  * The components used for each slot inside.
1382
1317
  */
1383
- slots: import_prop_types8.default.shape({
1384
- popover: import_prop_types8.default.elementType,
1385
- popoverContent: import_prop_types8.default.elementType,
1386
- preview: import_prop_types8.default.elementType,
1387
- signInButton: import_prop_types8.default.elementType,
1388
- signOutButton: import_prop_types8.default.elementType
1318
+ slots: PropTypes11__default.default.shape({
1319
+ popover: PropTypes11__default.default.elementType,
1320
+ popoverContent: PropTypes11__default.default.elementType,
1321
+ preview: PropTypes11__default.default.elementType,
1322
+ signInButton: PropTypes11__default.default.elementType,
1323
+ signOutButton: PropTypes11__default.default.elementType
1389
1324
  })
1390
1325
  };
1391
-
1392
- // src/toolpad-core/DashboardLayout/DashboardLayout.tsx
1393
- var React26 = __toESM(require("react"));
1394
- var import_prop_types11 = __toESM(require("prop-types"));
1395
- var import_styles5 = require("@mui/material/styles");
1396
- var import_useMediaQuery = __toESM(require("@mui/material/useMediaQuery"));
1397
- var import_Box4 = __toESM(require("@mui/material/Box"));
1398
- var import_Drawer = __toESM(require("@mui/material/Drawer"));
1399
- var import_Toolbar2 = __toESM(require("@mui/material/Toolbar"));
1400
-
1401
- // src/toolpad-core/DashboardLayout/DashboardHeader.tsx
1402
- var React22 = __toESM(require("react"));
1403
- var import_prop_types9 = __toESM(require("prop-types"));
1404
- var import_styles4 = require("@mui/material/styles");
1405
- var import_Box2 = __toESM(require("@mui/material/Box"));
1406
- var import_AppBar = __toESM(require("@mui/material/AppBar"));
1407
- var import_IconButton3 = __toESM(require("@mui/material/IconButton"));
1408
- var import_Toolbar = __toESM(require("@mui/material/Toolbar"));
1409
- var import_Tooltip3 = __toESM(require("@mui/material/Tooltip"));
1410
- var import_Menu = __toESM(require("@mui/icons-material/Menu"));
1411
- var import_MenuOpen = __toESM(require("@mui/icons-material/MenuOpen"));
1412
- var import_Stack6 = __toESM(require("@mui/material/Stack"));
1413
-
1414
- // src/toolpad-core/DashboardLayout/AppTitle.tsx
1415
- var import_Typography2 = __toESM(require("@mui/material/Typography"));
1416
- var import_Stack4 = __toESM(require("@mui/material/Stack"));
1417
- var import_material3 = require("@mui/material");
1418
-
1419
- // src/toolpad-core/shared/Link.tsx
1420
- var React18 = __toESM(require("react"));
1421
- var import_jsx_runtime14 = require("react/jsx-runtime");
1422
- var DefaultLink = React18.forwardRef(function Link(props, ref) {
1326
+ var DefaultLink = React26__namespace.forwardRef(function Link(props, ref) {
1423
1327
  const _a = props, { children, href, onClick, history: history2 } = _a, rest = __objRest(_a, ["children", "href", "onClick", "history"]);
1424
- const routerContext = React18.useContext(RouterContext);
1425
- const handleLinkClick = React18.useMemo(() => {
1328
+ const routerContext = React26__namespace.useContext(RouterContext);
1329
+ const handleLinkClick = React26__namespace.useMemo(() => {
1426
1330
  if (!routerContext) {
1427
1331
  return onClick;
1428
1332
  }
@@ -1433,25 +1337,22 @@ var DefaultLink = React18.forwardRef(function Link(props, ref) {
1433
1337
  onClick == null ? void 0 : onClick(event);
1434
1338
  };
1435
1339
  }, [routerContext, onClick, history2]);
1436
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("a", __spreadProps(__spreadValues({ ref, href }, rest), { onClick: handleLinkClick, children }));
1340
+ return /* @__PURE__ */ jsxRuntime.jsx("a", __spreadProps(__spreadValues({ ref, href }, rest), { onClick: handleLinkClick, children }));
1437
1341
  });
1438
- var Link2 = React18.forwardRef(function Link3(props, ref) {
1342
+ var Link2 = React26__namespace.forwardRef(function Link3(props, ref) {
1439
1343
  var _a;
1440
- const routerContext = React18.useContext(RouterContext);
1344
+ const routerContext = React26__namespace.useContext(RouterContext);
1441
1345
  const LinkComponent = (_a = routerContext == null ? void 0 : routerContext.Link) != null ? _a : DefaultLink;
1442
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(LinkComponent, __spreadProps(__spreadValues({ ref }, props), { children: props.children }));
1346
+ return /* @__PURE__ */ jsxRuntime.jsx(LinkComponent, __spreadProps(__spreadValues({ ref }, props), { children: props.children }));
1443
1347
  });
1444
-
1445
- // src/toolpad-core/DashboardLayout/ToolpadLogo.tsx
1446
- var import_jsx_runtime15 = require("react/jsx-runtime");
1447
1348
  function ToolpadLogo({ size = 40 }) {
1448
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("svg", { width: size, height: size, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1449
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("g", { mask: "url(#a)", children: [
1450
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M22.74 27.73v-7.6l6.64-3.79v7.6l-6.64 3.79Z", fill: "#007FFF" }),
1451
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M16.1 23.93v-7.59l6.64 3.8v7.59l-6.65-3.8Z", fill: "#39F" }),
1452
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "m16.1 16.34 6.64-3.8 6.64 3.8-6.64 3.8-6.65-3.8Z", fill: "#A5D8FF" })
1349
+ return /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: size, height: size, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1350
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#a)", children: [
1351
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M22.74 27.73v-7.6l6.64-3.79v7.6l-6.64 3.79Z", fill: "#007FFF" }),
1352
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M16.1 23.93v-7.59l6.64 3.8v7.59l-6.65-3.8Z", fill: "#39F" }),
1353
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m16.1 16.34 6.64-3.8 6.64 3.8-6.64 3.8-6.65-3.8Z", fill: "#A5D8FF" })
1453
1354
  ] }),
1454
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1355
+ /* @__PURE__ */ jsxRuntime.jsx(
1455
1356
  "mask",
1456
1357
  {
1457
1358
  id: "b",
@@ -1463,7 +1364,7 @@ function ToolpadLogo({ size = 40 }) {
1463
1364
  y: "17",
1464
1365
  width: "14",
1465
1366
  height: "15",
1466
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1367
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1467
1368
  "path",
1468
1369
  {
1469
1370
  d: "M8.5 22.3c0-1.05.56-2 1.46-2.53l3.75-2.14c.89-.5 1.98-.5 2.87 0l3.75 2.14a2.9 2.9 0 0 1 1.46 2.52v4.23c0 1.04-.56 2-1.46 2.52l-3.75 2.14c-.89.5-1.98.5-2.87 0l-3.75-2.14a2.9 2.9 0 0 1-1.46-2.52v-4.23Z",
@@ -1472,12 +1373,12 @@ function ToolpadLogo({ size = 40 }) {
1472
1373
  )
1473
1374
  }
1474
1375
  ),
1475
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("g", { mask: "url(#b)", children: [
1476
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M15.14 32v-7.6l6.65-3.8v7.6L15.14 32Z", fill: "#007FFF" }),
1477
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M8.5 28.2v-7.6l6.64 3.8V32L8.5 28.2Z", fill: "#39F" }),
1478
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "m8.5 20.6 6.64-3.79 6.65 3.8-6.65 3.8-6.64-3.8Z", fill: "#A5D8FF" })
1376
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#b)", children: [
1377
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.14 32v-7.6l6.65-3.8v7.6L15.14 32Z", fill: "#007FFF" }),
1378
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.5 28.2v-7.6l6.64 3.8V32L8.5 28.2Z", fill: "#39F" }),
1379
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "m8.5 20.6 6.64-3.79 6.65 3.8-6.65 3.8-6.64-3.8Z", fill: "#A5D8FF" })
1479
1380
  ] }),
1480
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1381
+ /* @__PURE__ */ jsxRuntime.jsx(
1481
1382
  "mask",
1482
1383
  {
1483
1384
  id: "c",
@@ -1489,7 +1390,7 @@ function ToolpadLogo({ size = 40 }) {
1489
1390
  y: "4",
1490
1391
  width: "22",
1491
1392
  height: "20",
1492
- children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1393
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1493
1394
  "path",
1494
1395
  {
1495
1396
  d: "M24.17 4.82a2.9 2.9 0 0 0-2.87 0L9.97 11.22a2.9 2.9 0 0 0-1.47 2.53v4.22c0 1.04.56 2 1.46 2.52l3.75 2.14c.89.5 1.98.5 2.87 0l11.33-6.42a2.9 2.9 0 0 0 1.47-2.52V9.48c0-1.04-.56-2-1.46-2.52l-3.75-2.14Z",
@@ -1498,25 +1399,19 @@ function ToolpadLogo({ size = 40 }) {
1498
1399
  )
1499
1400
  }
1500
1401
  ),
1501
- /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("g", { mask: "url(#c)", children: [
1502
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M15.14 23.46v-7.6L29.38 7.8v7.59l-14.24 8.07Z", fill: "#007FFF" }),
1503
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M8.5 19.66v-7.6l6.64 3.8v7.6l-6.64-3.8Z", fill: "#39F" }),
1504
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M8.5 12.07 22.74 4l6.64 3.8-14.24 8.06-6.64-3.8Z", fill: "#A5D8FF" })
1402
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { mask: "url(#c)", children: [
1403
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M15.14 23.46v-7.6L29.38 7.8v7.59l-14.24 8.07Z", fill: "#007FFF" }),
1404
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.5 19.66v-7.6l6.64 3.8v7.6l-6.64-3.8Z", fill: "#39F" }),
1405
+ /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M8.5 12.07 22.74 4l6.64 3.8-14.24 8.06-6.64-3.8Z", fill: "#A5D8FF" })
1505
1406
  ] })
1506
1407
  ] });
1507
1408
  }
1508
-
1509
- // src/toolpad-core/shared/branding.ts
1510
- var React19 = __toESM(require("react"));
1511
1409
  function useApplicationTitle() {
1512
1410
  var _a;
1513
- const branding = React19.useContext(BrandingContext);
1411
+ const branding = React26__namespace.useContext(BrandingContext);
1514
1412
  return (_a = branding == null ? void 0 : branding.title) != null ? _a : "Toolpad";
1515
1413
  }
1516
-
1517
- // src/toolpad-core/DashboardLayout/AppTitle.tsx
1518
- var import_jsx_runtime16 = require("react/jsx-runtime");
1519
- var LogoContainer = (0, import_material3.styled)("div")({
1414
+ var LogoContainer = material.styled("div")({
1520
1415
  position: "relative",
1521
1416
  height: 40,
1522
1417
  display: "flex",
@@ -1527,13 +1422,13 @@ var LogoContainer = (0, import_material3.styled)("div")({
1527
1422
  });
1528
1423
  function AppTitle(props) {
1529
1424
  var _a, _b, _c, _d, _e, _f, _g;
1530
- const theme = (0, import_material3.useTheme)();
1425
+ const theme = material.useTheme();
1531
1426
  const defaultTitle = useApplicationTitle();
1532
1427
  const title = (_b = (_a = props == null ? void 0 : props.branding) == null ? void 0 : _a.title) != null ? _b : defaultTitle;
1533
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Link2, { href: (_d = (_c = props == null ? void 0 : props.branding) == null ? void 0 : _c.homeUrl) != null ? _d : "/", style: { textDecoration: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_Stack4.default, { direction: "row", alignItems: "center", children: [
1534
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(LogoContainer, { children: (_f = (_e = props == null ? void 0 : props.branding) == null ? void 0 : _e.logo) != null ? _f : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ToolpadLogo, { size: 40 }) }),
1535
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1536
- import_Typography2.default,
1428
+ return /* @__PURE__ */ jsxRuntime.jsx(Link2, { href: (_d = (_c = props == null ? void 0 : props.branding) == null ? void 0 : _c.homeUrl) != null ? _d : "/", style: { textDecoration: "none" }, children: /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "row", alignItems: "center", children: [
1429
+ /* @__PURE__ */ jsxRuntime.jsx(LogoContainer, { children: (_f = (_e = props == null ? void 0 : props.branding) == null ? void 0 : _e.logo) != null ? _f : /* @__PURE__ */ jsxRuntime.jsx(ToolpadLogo, { size: 40 }) }),
1430
+ /* @__PURE__ */ jsxRuntime.jsx(
1431
+ Typography__default.default,
1537
1432
  {
1538
1433
  variant: "h6",
1539
1434
  sx: {
@@ -1548,20 +1443,6 @@ function AppTitle(props) {
1548
1443
  )
1549
1444
  ] }) });
1550
1445
  }
1551
-
1552
- // src/toolpad-core/DashboardLayout/ToolbarActions.tsx
1553
- var import_Stack5 = __toESM(require("@mui/material/Stack"));
1554
-
1555
- // src/toolpad-core/DashboardLayout/ThemeSwitcher.tsx
1556
- var React21 = __toESM(require("react"));
1557
- var import_material4 = require("@mui/material");
1558
- var import_IconButton2 = __toESM(require("@mui/material/IconButton"));
1559
- var import_Tooltip2 = __toESM(require("@mui/material/Tooltip"));
1560
- var import_DarkMode = __toESM(require("@mui/icons-material/DarkMode"));
1561
- var import_LightMode = __toESM(require("@mui/icons-material/LightMode"));
1562
-
1563
- // src/toolpad-utils/hooks/useSsr.ts
1564
- var React20 = __toESM(require("react"));
1565
1446
  function subscribe2() {
1566
1447
  return () => {
1567
1448
  };
@@ -1573,35 +1454,32 @@ function getServerSnapshot() {
1573
1454
  return true;
1574
1455
  }
1575
1456
  function useSsr() {
1576
- return React20.useSyncExternalStore(subscribe2, getSnapshot2, getServerSnapshot);
1457
+ return React26__namespace.useSyncExternalStore(subscribe2, getSnapshot2, getServerSnapshot);
1577
1458
  }
1578
-
1579
- // src/toolpad-core/DashboardLayout/ThemeSwitcher.tsx
1580
- var import_jsx_runtime17 = require("react/jsx-runtime");
1581
1459
  function ThemeSwitcher() {
1582
1460
  var _a;
1583
1461
  const isSsr = useSsr();
1584
- const theme = (0, import_material4.useTheme)();
1585
- const { paletteMode, setPaletteMode, isDualTheme } = React21.useContext(PaletteModeContext);
1586
- const toggleMode = React21.useCallback(() => {
1462
+ const theme = material.useTheme();
1463
+ const { paletteMode, setPaletteMode, isDualTheme } = React26__namespace.useContext(PaletteModeContext);
1464
+ const toggleMode = React26__namespace.useCallback(() => {
1587
1465
  setPaletteMode(paletteMode === "dark" ? "light" : "dark");
1588
1466
  }, [paletteMode, setPaletteMode]);
1589
- return isDualTheme ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1590
- import_Tooltip2.default,
1467
+ return isDualTheme ? /* @__PURE__ */ jsxRuntime.jsx(
1468
+ Tooltip__default.default,
1591
1469
  {
1592
1470
  title: isSsr ? "Switch mode" : `${paletteMode === "dark" ? "Light" : "Dark"} mode`,
1593
1471
  enterDelay: 1e3,
1594
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1595
- import_IconButton2.default,
1472
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
1473
+ IconButton2__default.default,
1596
1474
  {
1597
1475
  "aria-label": isSsr ? "Switch theme mode" : `Switch to ${paletteMode === "dark" ? "light" : "dark"} mode`,
1598
1476
  onClick: toggleMode,
1599
1477
  sx: {
1600
1478
  color: ((_a = theme.vars) != null ? _a : theme).palette.primary.dark
1601
1479
  },
1602
- children: theme.getColorSchemeSelector ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(React21.Fragment, { children: [
1603
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1604
- import_DarkMode.default,
1480
+ children: theme.getColorSchemeSelector ? /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
1481
+ /* @__PURE__ */ jsxRuntime.jsx(
1482
+ DarkModeIcon__default.default,
1605
1483
  {
1606
1484
  sx: {
1607
1485
  display: "inline",
@@ -1611,8 +1489,8 @@ function ThemeSwitcher() {
1611
1489
  }
1612
1490
  }
1613
1491
  ),
1614
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1615
- import_LightMode.default,
1492
+ /* @__PURE__ */ jsxRuntime.jsx(
1493
+ LightModeIcon__default.default,
1616
1494
  {
1617
1495
  sx: {
1618
1496
  display: "none",
@@ -1622,25 +1500,19 @@ function ThemeSwitcher() {
1622
1500
  }
1623
1501
  }
1624
1502
  )
1625
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(React21.Fragment, { children: isSsr || paletteMode !== "dark" ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_DarkMode.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_LightMode.default, {}) })
1503
+ ] }) : /* @__PURE__ */ jsxRuntime.jsx(React26__namespace.Fragment, { children: isSsr || paletteMode !== "dark" ? /* @__PURE__ */ jsxRuntime.jsx(DarkModeIcon__default.default, {}) : /* @__PURE__ */ jsxRuntime.jsx(LightModeIcon__default.default, {}) })
1626
1504
  }
1627
1505
  ) })
1628
1506
  }
1629
1507
  ) : null;
1630
1508
  }
1631
-
1632
- // src/toolpad-core/DashboardLayout/ToolbarActions.tsx
1633
- var import_jsx_runtime18 = require("react/jsx-runtime");
1634
1509
  function ToolbarActions() {
1635
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_Stack5.default, { direction: "row", alignItems: "center", children: [
1636
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(ThemeSwitcher, {}),
1637
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Account, {})
1510
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "row", alignItems: "center", children: [
1511
+ /* @__PURE__ */ jsxRuntime.jsx(ThemeSwitcher, {}),
1512
+ /* @__PURE__ */ jsxRuntime.jsx(Account, {})
1638
1513
  ] });
1639
1514
  }
1640
-
1641
- // src/toolpad-core/DashboardLayout/DashboardHeader.tsx
1642
- var import_jsx_runtime19 = require("react/jsx-runtime");
1643
- var AppBar = (0, import_styles4.styled)(import_AppBar.default)(({ theme }) => {
1515
+ var AppBar = styles.styled(MuiAppBar__default.default)(({ theme }) => {
1644
1516
  var _a;
1645
1517
  return {
1646
1518
  borderWidth: 0,
@@ -1661,26 +1533,26 @@ function DashboardHeader(props) {
1661
1533
  slots,
1662
1534
  slotProps
1663
1535
  } = props;
1664
- const brandingContext = React22.useContext(BrandingContext);
1536
+ const brandingContext = React26__namespace.useContext(BrandingContext);
1665
1537
  const branding = __spreadValues(__spreadValues({}, brandingContext), brandingProp);
1666
- const handleMenuOpen = React22.useCallback(() => {
1538
+ const handleMenuOpen = React26__namespace.useCallback(() => {
1667
1539
  onToggleMenu(!menuOpen);
1668
1540
  }, [menuOpen, onToggleMenu]);
1669
- const getMenuIcon = React22.useCallback(
1541
+ const getMenuIcon = React26__namespace.useCallback(
1670
1542
  (isExpanded) => {
1671
1543
  const expandMenuActionText = "Expand";
1672
1544
  const collapseMenuActionText = "Collapse";
1673
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1674
- import_Tooltip3.default,
1545
+ return /* @__PURE__ */ jsxRuntime.jsx(
1546
+ Tooltip__default.default,
1675
1547
  {
1676
1548
  title: `${isExpanded ? collapseMenuActionText : expandMenuActionText} menu`,
1677
1549
  enterDelay: 1e3,
1678
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1679
- import_IconButton3.default,
1550
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
1551
+ IconButton2__default.default,
1680
1552
  {
1681
1553
  "aria-label": `${isExpanded ? collapseMenuActionText : expandMenuActionText} navigation menu`,
1682
1554
  onClick: handleMenuOpen,
1683
- children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_MenuOpen.default, {}) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Menu.default, {})
1555
+ children: isExpanded ? /* @__PURE__ */ jsxRuntime.jsx(MenuOpenIcon__default.default, {}) : /* @__PURE__ */ jsxRuntime.jsx(MenuIcon__default.default, {})
1684
1556
  }
1685
1557
  ) })
1686
1558
  }
@@ -1690,8 +1562,8 @@ function DashboardHeader(props) {
1690
1562
  );
1691
1563
  const ToolbarActionsSlot = (_a = slots == null ? void 0 : slots.toolbarActions) != null ? _a : ToolbarActions;
1692
1564
  const ToolbarAccountSlot = (_b = slots == null ? void 0 : slots.toolbarAccount) != null ? _b : (() => null);
1693
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppBar, { color: "inherit", position: "absolute", sx: { displayPrint: "none" }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_Toolbar.default, { sx: { backgroundColor: "inherit", mx: { xs: -0.75, sm: -1 } }, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1694
- import_Stack6.default,
1565
+ return /* @__PURE__ */ jsxRuntime.jsx(AppBar, { color: "inherit", position: "absolute", sx: { displayPrint: "none" }, children: /* @__PURE__ */ jsxRuntime.jsx(Toolbar2__default.default, { sx: { backgroundColor: "inherit", mx: { xs: -0.75, sm: -1 } }, children: /* @__PURE__ */ jsxRuntime.jsxs(
1566
+ Stack__default.default,
1695
1567
  {
1696
1568
  direction: "row",
1697
1569
  justifyContent: "space-between",
@@ -1701,10 +1573,10 @@ function DashboardHeader(props) {
1701
1573
  width: "100%"
1702
1574
  },
1703
1575
  children: [
1704
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_Stack6.default, { direction: "row", children: [
1705
- !hideMenuButton ? /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(React22.Fragment, { children: [
1706
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1707
- import_Box2.default,
1576
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "row", children: [
1577
+ !hideMenuButton ? /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
1578
+ /* @__PURE__ */ jsxRuntime.jsx(
1579
+ Box4__default.default,
1708
1580
  {
1709
1581
  sx: {
1710
1582
  display: { xs: "block", md: "none" },
@@ -1713,8 +1585,8 @@ function DashboardHeader(props) {
1713
1585
  children: getMenuIcon(menuOpen)
1714
1586
  }
1715
1587
  ),
1716
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1717
- import_Box2.default,
1588
+ /* @__PURE__ */ jsxRuntime.jsx(
1589
+ Box4__default.default,
1718
1590
  {
1719
1591
  sx: {
1720
1592
  display: { xs: "none", md: "block" },
@@ -1724,18 +1596,18 @@ function DashboardHeader(props) {
1724
1596
  }
1725
1597
  )
1726
1598
  ] }) : null,
1727
- (slots == null ? void 0 : slots.appTitle) ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(slots.appTitle, __spreadValues({}, slotProps == null ? void 0 : slotProps.appTitle)) : (
1599
+ (slots == null ? void 0 : slots.appTitle) ? /* @__PURE__ */ jsxRuntime.jsx(slots.appTitle, __spreadValues({}, slotProps == null ? void 0 : slotProps.appTitle)) : (
1728
1600
  /* Hierarchy of application of `branding`
1729
1601
  * 1. Branding prop passed in the `slotProps.appTitle`
1730
1602
  * 2. Branding prop passed to the `DashboardLayout`
1731
1603
  * 3. Branding prop passed to the `AppProvider`
1732
1604
  */
1733
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(AppTitle, __spreadValues({ branding }, slotProps == null ? void 0 : slotProps.appTitle))
1605
+ /* @__PURE__ */ jsxRuntime.jsx(AppTitle, __spreadValues({ branding }, slotProps == null ? void 0 : slotProps.appTitle))
1734
1606
  )
1735
1607
  ] }),
1736
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_Stack6.default, { direction: "row", alignItems: "center", spacing: 1, sx: { marginLeft: "auto" }, children: [
1737
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ToolbarActionsSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarActions)),
1738
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ToolbarAccountSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarAccount))
1608
+ /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { direction: "row", alignItems: "center", spacing: 1, sx: { marginLeft: "auto" }, children: [
1609
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarActionsSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarActions)),
1610
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarAccountSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarAccount))
1739
1611
  ] })
1740
1612
  ]
1741
1613
  }
@@ -1750,75 +1622,65 @@ DashboardHeader.propTypes = {
1750
1622
  * Branding options for the header.
1751
1623
  * @default null
1752
1624
  */
1753
- branding: import_prop_types9.default.shape({
1754
- homeUrl: import_prop_types9.default.string,
1755
- logo: import_prop_types9.default.node,
1756
- title: import_prop_types9.default.string
1625
+ branding: PropTypes11__default.default.shape({
1626
+ homeUrl: PropTypes11__default.default.string,
1627
+ logo: PropTypes11__default.default.node,
1628
+ title: PropTypes11__default.default.string
1757
1629
  }),
1758
1630
  /**
1759
1631
  * Whether the menu icon should always be hidden.
1760
1632
  * @default false
1761
1633
  */
1762
- hideMenuButton: import_prop_types9.default.bool,
1634
+ hideMenuButton: PropTypes11__default.default.bool,
1763
1635
  /**
1764
1636
  * If `true`, show menu button as if menu is expanded, otherwise show it as if menu is collapsed.
1765
1637
  */
1766
- menuOpen: import_prop_types9.default.bool.isRequired,
1638
+ menuOpen: PropTypes11__default.default.bool.isRequired,
1767
1639
  /**
1768
1640
  * Callback fired when the menu button is clicked.
1769
1641
  */
1770
- onToggleMenu: import_prop_types9.default.func.isRequired,
1642
+ onToggleMenu: PropTypes11__default.default.func.isRequired,
1771
1643
  /**
1772
1644
  * The props used for each slot inside.
1773
1645
  * @default {}
1774
1646
  */
1775
- slotProps: import_prop_types9.default.shape({
1776
- appTitle: import_prop_types9.default.shape({
1777
- branding: import_prop_types9.default.shape({
1778
- homeUrl: import_prop_types9.default.string,
1779
- logo: import_prop_types9.default.node,
1780
- title: import_prop_types9.default.string
1647
+ slotProps: PropTypes11__default.default.shape({
1648
+ appTitle: PropTypes11__default.default.shape({
1649
+ branding: PropTypes11__default.default.shape({
1650
+ homeUrl: PropTypes11__default.default.string,
1651
+ logo: PropTypes11__default.default.node,
1652
+ title: PropTypes11__default.default.string
1781
1653
  })
1782
1654
  }),
1783
- toolbarAccount: import_prop_types9.default.shape({
1784
- localeText: import_prop_types9.default.object,
1785
- slotProps: import_prop_types9.default.shape({
1786
- popover: import_prop_types9.default.object,
1787
- popoverContent: import_prop_types9.default.object,
1788
- preview: import_prop_types9.default.object,
1789
- signInButton: import_prop_types9.default.object,
1790
- signOutButton: import_prop_types9.default.object
1655
+ toolbarAccount: PropTypes11__default.default.shape({
1656
+ localeText: PropTypes11__default.default.object,
1657
+ slotProps: PropTypes11__default.default.shape({
1658
+ popover: PropTypes11__default.default.object,
1659
+ popoverContent: PropTypes11__default.default.object,
1660
+ preview: PropTypes11__default.default.object,
1661
+ signInButton: PropTypes11__default.default.object,
1662
+ signOutButton: PropTypes11__default.default.object
1791
1663
  }),
1792
- slots: import_prop_types9.default.shape({
1793
- popover: import_prop_types9.default.elementType,
1794
- popoverContent: import_prop_types9.default.elementType,
1795
- preview: import_prop_types9.default.elementType,
1796
- signInButton: import_prop_types9.default.elementType,
1797
- signOutButton: import_prop_types9.default.elementType
1664
+ slots: PropTypes11__default.default.shape({
1665
+ popover: PropTypes11__default.default.elementType,
1666
+ popoverContent: PropTypes11__default.default.elementType,
1667
+ preview: PropTypes11__default.default.elementType,
1668
+ signInButton: PropTypes11__default.default.elementType,
1669
+ signOutButton: PropTypes11__default.default.elementType
1798
1670
  })
1799
1671
  }),
1800
- toolbarActions: import_prop_types9.default.object
1672
+ toolbarActions: PropTypes11__default.default.object
1801
1673
  }),
1802
1674
  /**
1803
1675
  * The components used for each slot inside.
1804
1676
  * @default {}
1805
1677
  */
1806
- slots: import_prop_types9.default.shape({
1807
- appTitle: import_prop_types9.default.elementType,
1808
- toolbarAccount: import_prop_types9.default.elementType,
1809
- toolbarActions: import_prop_types9.default.elementType
1678
+ slots: PropTypes11__default.default.shape({
1679
+ appTitle: PropTypes11__default.default.elementType,
1680
+ toolbarAccount: PropTypes11__default.default.elementType,
1681
+ toolbarActions: PropTypes11__default.default.elementType
1810
1682
  })
1811
1683
  };
1812
-
1813
- // src/toolpad-core/DashboardLayout/DashboardSidebarSubNavigation.tsx
1814
- var React25 = __toESM(require("react"));
1815
- var import_Divider2 = __toESM(require("@mui/material/Divider"));
1816
- var import_List = __toESM(require("@mui/material/List"));
1817
- var import_ListSubheader = __toESM(require("@mui/material/ListSubheader"));
1818
-
1819
- // src/toolpad-core/shared/navigation.tsx
1820
- var import_path_to_regexp = require("path-to-regexp");
1821
- var import_invariant4 = __toESM(require("invariant"));
1822
1684
  var getItemKind = (item) => {
1823
1685
  var _a;
1824
1686
  return (_a = item.kind) != null ? _a : "page";
@@ -1866,7 +1728,7 @@ function buildItemLookup(navigation) {
1866
1728
  map.set(path, item);
1867
1729
  if (item.pattern) {
1868
1730
  const basePath = item.segment ? path.slice(0, -item.segment.length) : path;
1869
- map.set((0, import_path_to_regexp.pathToRegexp)(basePath + item.pattern).regexp, item);
1731
+ map.set(pathToRegexp.pathToRegexp(basePath + item.pattern).regexp, item);
1870
1732
  }
1871
1733
  if (item.children) {
1872
1734
  for (const child of item.children) {
@@ -1904,7 +1766,7 @@ function matchPath(navigation, path) {
1904
1766
  function getItemPath(navigation, item) {
1905
1767
  const map = getItemToPathMap(navigation);
1906
1768
  const path = map.get(item);
1907
- (0, import_invariant4.default)(path, `Item not found in navigation: ${item.title}`);
1769
+ invariant2__default.default(path, `Item not found in navigation: ${item.title}`);
1908
1770
  return path;
1909
1771
  }
1910
1772
  function hasSelectedNavigationChildren(navigation, item, activePagePath) {
@@ -1936,17 +1798,14 @@ function getDrawerWidthTransitionMixin(isExpanded) {
1936
1798
  overflowX: "hidden"
1937
1799
  });
1938
1800
  }
1939
-
1940
- // src/toolpad-core/useActivePage/useActivePage.ts
1941
- var React23 = __toESM(require("react"));
1942
1801
  function useActivePage() {
1943
1802
  var _a;
1944
- const navigationContext = React23.useContext(NavigationContext);
1945
- const routerContext = React23.useContext(RouterContext);
1803
+ const navigationContext = React26__namespace.useContext(NavigationContext);
1804
+ const routerContext = React26__namespace.useContext(RouterContext);
1946
1805
  const pathname = (_a = routerContext == null ? void 0 : routerContext.pathname) != null ? _a : "/";
1947
1806
  const activeItem = matchPath(navigationContext, pathname);
1948
1807
  const rootItem = matchPath(navigationContext, "/");
1949
- return React23.useMemo(() => {
1808
+ return React26__namespace.useMemo(() => {
1950
1809
  if (!activeItem) {
1951
1810
  return null;
1952
1811
  }
@@ -1983,29 +1842,9 @@ function useActivePage() {
1983
1842
  }, [activeItem, rootItem, pathname, navigationContext]);
1984
1843
  }
1985
1844
 
1986
- // src/toolpad-core/DashboardLayout/DashboardSidebarPageItem.tsx
1987
- var React24 = __toESM(require("react"));
1988
- var import_prop_types10 = __toESM(require("prop-types"));
1989
- var import_material5 = require("@mui/material");
1990
- var import_Avatar2 = __toESM(require("@mui/material/Avatar"));
1991
- var import_Box3 = __toESM(require("@mui/material/Box"));
1992
- var import_Collapse = __toESM(require("@mui/material/Collapse"));
1993
- var import_Grow = __toESM(require("@mui/material/Grow"));
1994
- var import_ListItem = __toESM(require("@mui/material/ListItem"));
1995
- var import_ListItemButton = __toESM(require("@mui/material/ListItemButton"));
1996
- var import_ListItemIcon = __toESM(require("@mui/material/ListItemIcon"));
1997
- var import_ListItemText = __toESM(require("@mui/material/ListItemText"));
1998
- var import_Paper = __toESM(require("@mui/material/Paper"));
1999
- var import_Typography3 = __toESM(require("@mui/material/Typography"));
2000
- var import_ExpandMore = __toESM(require("@mui/icons-material/ExpandMore"));
2001
- var import_invariant5 = __toESM(require("invariant"));
2002
-
2003
1845
  // src/toolpad-core/DashboardLayout/shared.ts
2004
1846
  var MINI_DRAWER_WIDTH = 84;
2005
-
2006
- // src/toolpad-core/DashboardLayout/DashboardSidebarPageItem.tsx
2007
- var import_jsx_runtime20 = require("react/jsx-runtime");
2008
- var NavigationListItemButton = (0, import_material5.styled)(import_ListItemButton.default)(({ theme }) => {
1847
+ var NavigationListItemButton = material.styled(ListItemButton__default.default)(({ theme }) => {
2009
1848
  var _a, _b, _c, _d, _e, _f, _g;
2010
1849
  return {
2011
1850
  borderRadius: 8,
@@ -2037,9 +1876,9 @@ var NavigationListItemButton = (0, import_material5.styled)(import_ListItemButto
2037
1876
  var LIST_ITEM_ICON_SIZE = 34;
2038
1877
  function DashboardSidebarPageItem(props) {
2039
1878
  var _a;
2040
- const navigationContext = React24.useContext(NavigationContext);
2041
- const pageItemContextProps = React24.useContext(DashboardSidebarPageItemContext);
2042
- (0, import_invariant5.default)(pageItemContextProps, "No navigation page item context provided.");
1879
+ const navigationContext = React26__namespace.useContext(NavigationContext);
1880
+ const pageItemContextProps = React26__namespace.useContext(DashboardSidebarPageItemContext);
1881
+ invariant2__default.default(pageItemContextProps, "No navigation page item context provided.");
2043
1882
  const contextAwareProps = __spreadValues(__spreadValues({}, pageItemContextProps), props);
2044
1883
  const {
2045
1884
  item,
@@ -2055,10 +1894,10 @@ function DashboardSidebarPageItem(props) {
2055
1894
  isSidebarFullyCollapsed = false,
2056
1895
  renderNestedNavigation
2057
1896
  } = contextAwareProps;
2058
- const [hoveredMiniSidebarItemId, setHoveredMiniSidebarItemId] = React24.useState(
1897
+ const [hoveredMiniSidebarItemId, setHoveredMiniSidebarItemId] = React26__namespace.useState(
2059
1898
  null
2060
1899
  );
2061
- const handleClick = React24.useCallback(() => {
1900
+ const handleClick = React26__namespace.useCallback(() => {
2062
1901
  onClick(id, item);
2063
1902
  }, [id, item, onClick]);
2064
1903
  let nestedNavigationCollapseSx = { display: "none" };
@@ -2083,8 +1922,8 @@ function DashboardSidebarPageItem(props) {
2083
1922
  const hasExternalHref = href.startsWith("http://") || href.startsWith("https://");
2084
1923
  const LinkComponent = LinkComponentProp != null ? LinkComponentProp : hasExternalHref ? "a" : Link2;
2085
1924
  const title = getItemTitle(item);
2086
- const listItem = /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2087
- import_ListItem.default,
1925
+ const listItem = /* @__PURE__ */ jsxRuntime.jsxs(
1926
+ ListItem__default.default,
2088
1927
  __spreadProps(__spreadValues({}, item.children && isMini ? {
2089
1928
  onMouseEnter: () => {
2090
1929
  setHoveredMiniSidebarItemId(id);
@@ -2099,7 +1938,7 @@ function DashboardSidebarPageItem(props) {
2099
1938
  overflowX: "hidden"
2100
1939
  },
2101
1940
  children: [
2102
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
1941
+ /* @__PURE__ */ jsxRuntime.jsxs(
2103
1942
  NavigationListItemButton,
2104
1943
  __spreadProps(__spreadValues(__spreadValues({
2105
1944
  selected,
@@ -2120,8 +1959,8 @@ function DashboardSidebarPageItem(props) {
2120
1959
  onClick: handleClick
2121
1960
  }) : {}), {
2122
1961
  children: [
2123
- item.icon || isMini ? /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2124
- import_Box3.default,
1962
+ item.icon || isMini ? /* @__PURE__ */ jsxRuntime.jsxs(
1963
+ Box4__default.default,
2125
1964
  {
2126
1965
  sx: isMini ? {
2127
1966
  position: "absolute",
@@ -2130,8 +1969,8 @@ function DashboardSidebarPageItem(props) {
2130
1969
  transform: "translate(-50%, -50%)"
2131
1970
  } : {},
2132
1971
  children: [
2133
- /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
2134
- import_ListItemIcon.default,
1972
+ /* @__PURE__ */ jsxRuntime.jsxs(
1973
+ ListItemIcon__default.default,
2135
1974
  {
2136
1975
  sx: {
2137
1976
  display: "flex",
@@ -2141,8 +1980,8 @@ function DashboardSidebarPageItem(props) {
2141
1980
  },
2142
1981
  children: [
2143
1982
  (_a = item.icon) != null ? _a : null,
2144
- !item.icon && isMini ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2145
- import_Avatar2.default,
1983
+ !item.icon && isMini ? /* @__PURE__ */ jsxRuntime.jsx(
1984
+ Avatar__default.default,
2146
1985
  {
2147
1986
  sx: {
2148
1987
  width: LIST_ITEM_ICON_SIZE - 7,
@@ -2155,8 +1994,8 @@ function DashboardSidebarPageItem(props) {
2155
1994
  ]
2156
1995
  }
2157
1996
  ),
2158
- isMini ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2159
- import_Typography3.default,
1997
+ isMini ? /* @__PURE__ */ jsxRuntime.jsx(
1998
+ Typography__default.default,
2160
1999
  {
2161
2000
  variant: "caption",
2162
2001
  sx: {
@@ -2178,8 +2017,8 @@ function DashboardSidebarPageItem(props) {
2178
2017
  ]
2179
2018
  }
2180
2019
  ) : null,
2181
- !isMini ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2182
- import_ListItemText.default,
2020
+ !isMini ? /* @__PURE__ */ jsxRuntime.jsx(
2021
+ ListItemText__default.default,
2183
2022
  {
2184
2023
  primary: title,
2185
2024
  sx: {
@@ -2190,20 +2029,20 @@ function DashboardSidebarPageItem(props) {
2190
2029
  }
2191
2030
  ) : null,
2192
2031
  item.action && !isMini && isSidebarFullyExpanded ? item.action : null,
2193
- item.children ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_ExpandMore.default, { sx: nestedNavigationCollapseSx }) : null
2032
+ item.children ? /* @__PURE__ */ jsxRuntime.jsx(ExpandMoreIcon__default.default, { sx: nestedNavigationCollapseSx }) : null
2194
2033
  ]
2195
2034
  })
2196
2035
  ),
2197
- item.children && isMini ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Grow.default, { in: id === hoveredMiniSidebarItemId, children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2198
- import_Box3.default,
2036
+ item.children && isMini ? /* @__PURE__ */ jsxRuntime.jsx(Grow__default.default, { in: id === hoveredMiniSidebarItemId, children: /* @__PURE__ */ jsxRuntime.jsx(
2037
+ Box4__default.default,
2199
2038
  {
2200
2039
  sx: {
2201
2040
  position: "fixed",
2202
2041
  left: MINI_DRAWER_WIDTH - 2,
2203
2042
  pl: "6px"
2204
2043
  },
2205
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2206
- import_Paper.default,
2044
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2045
+ Paper__default.default,
2207
2046
  {
2208
2047
  sx: {
2209
2048
  pt: 0.5,
@@ -2218,9 +2057,9 @@ function DashboardSidebarPageItem(props) {
2218
2057
  ]
2219
2058
  })
2220
2059
  );
2221
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(React24.Fragment, { children: [
2060
+ return /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
2222
2061
  listItem,
2223
- item.children && !isMini ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_Collapse.default, { in: expanded, timeout: "auto", unmountOnExit: true, children: renderNestedNavigation(item.children) }) : null
2062
+ item.children && !isMini ? /* @__PURE__ */ jsxRuntime.jsx(Collapse__default.default, { in: expanded, timeout: "auto", unmountOnExit: true, children: renderNestedNavigation(item.children) }) : null
2224
2063
  ] }, id);
2225
2064
  }
2226
2065
  DashboardSidebarPageItem.propTypes = {
@@ -2232,54 +2071,51 @@ DashboardSidebarPageItem.propTypes = {
2232
2071
  * If `true`, the item is disabled.
2233
2072
  * @default false
2234
2073
  */
2235
- disabled: import_prop_types10.default.bool,
2074
+ disabled: PropTypes11__default.default.bool,
2236
2075
  /**
2237
2076
  * If `true`, expands any nested navigation in the item, otherwise collapse it.
2238
2077
  * @default false
2239
2078
  */
2240
- expanded: import_prop_types10.default.bool,
2079
+ expanded: PropTypes11__default.default.bool,
2241
2080
  /**
2242
2081
  * Link `href` for when the item is rendered as a link.
2243
2082
  * @default getItemPath(navigationContext, item)
2244
2083
  */
2245
- href: import_prop_types10.default.string,
2084
+ href: PropTypes11__default.default.string,
2246
2085
  /**
2247
2086
  * Navigation page item definition.
2248
2087
  */
2249
- item: import_prop_types10.default.shape({
2250
- action: import_prop_types10.default.node,
2251
- children: import_prop_types10.default.arrayOf(
2252
- import_prop_types10.default.oneOfType([
2253
- import_prop_types10.default.object,
2254
- import_prop_types10.default.shape({
2255
- kind: import_prop_types10.default.oneOf(["header"]).isRequired,
2256
- title: import_prop_types10.default.string.isRequired
2088
+ item: PropTypes11__default.default.shape({
2089
+ action: PropTypes11__default.default.node,
2090
+ children: PropTypes11__default.default.arrayOf(
2091
+ PropTypes11__default.default.oneOfType([
2092
+ PropTypes11__default.default.object,
2093
+ PropTypes11__default.default.shape({
2094
+ kind: PropTypes11__default.default.oneOf(["header"]).isRequired,
2095
+ title: PropTypes11__default.default.string.isRequired
2257
2096
  }),
2258
- import_prop_types10.default.shape({
2259
- kind: import_prop_types10.default.oneOf(["divider"]).isRequired
2097
+ PropTypes11__default.default.shape({
2098
+ kind: PropTypes11__default.default.oneOf(["divider"]).isRequired
2260
2099
  })
2261
2100
  ]).isRequired
2262
2101
  ),
2263
- icon: import_prop_types10.default.node,
2264
- kind: import_prop_types10.default.oneOf(["page"]),
2265
- pattern: import_prop_types10.default.string,
2266
- segment: import_prop_types10.default.string,
2267
- title: import_prop_types10.default.string
2102
+ icon: PropTypes11__default.default.node,
2103
+ kind: PropTypes11__default.default.oneOf(["page"]),
2104
+ pattern: PropTypes11__default.default.string,
2105
+ segment: PropTypes11__default.default.string,
2106
+ title: PropTypes11__default.default.string
2268
2107
  }).isRequired,
2269
2108
  /**
2270
2109
  * The component used to render the item as a link.
2271
2110
  * @default Link
2272
2111
  */
2273
- LinkComponent: import_prop_types10.default.elementType,
2112
+ LinkComponent: PropTypes11__default.default.elementType,
2274
2113
  /**
2275
2114
  * Use to apply selected styling.
2276
2115
  * @default false
2277
2116
  */
2278
- selected: import_prop_types10.default.bool
2117
+ selected: PropTypes11__default.default.bool
2279
2118
  };
2280
-
2281
- // src/toolpad-core/DashboardLayout/DashboardSidebarSubNavigation.tsx
2282
- var import_jsx_runtime21 = require("react/jsx-runtime");
2283
2119
  function DashboardSidebarSubNavigationPageItem({
2284
2120
  id,
2285
2121
  item,
@@ -2293,11 +2129,11 @@ function DashboardSidebarSubNavigationPageItem({
2293
2129
  sidebarExpandedWidth,
2294
2130
  renderPageItem
2295
2131
  }) {
2296
- const navigationContext = React25.useContext(NavigationContext);
2132
+ const navigationContext = React26__namespace.useContext(NavigationContext);
2297
2133
  const activePage = useActivePage();
2298
2134
  const isActive = !!activePage && activePage.path === getItemPath(navigationContext, item);
2299
2135
  const isSelected = activePage && item.children && isMini ? hasSelectedNavigationChildren(navigationContext, item, activePage.path) : isActive && !item.children;
2300
- const pageItemContextProps = React25.useMemo(
2136
+ const pageItemContextProps = React26__namespace.useMemo(
2301
2137
  () => ({
2302
2138
  expanded: isExpanded,
2303
2139
  selected: isSelected,
@@ -2308,7 +2144,7 @@ function DashboardSidebarSubNavigationPageItem({
2308
2144
  isSidebarFullyCollapsed: isFullyCollapsed,
2309
2145
  renderNestedNavigation: () => {
2310
2146
  var _a;
2311
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2147
+ return /* @__PURE__ */ jsxRuntime.jsx(
2312
2148
  DashboardSidebarSubNavigation,
2313
2149
  {
2314
2150
  subNavigation: (_a = item.children) != null ? _a : [],
@@ -2334,7 +2170,7 @@ function DashboardSidebarSubNavigationPageItem({
2334
2170
  sidebarExpandedWidth
2335
2171
  ]
2336
2172
  );
2337
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DashboardSidebarPageItemContext.Provider, { value: pageItemContextProps, children: renderPageItem ? renderPageItem(item, { mini: isMini }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DashboardSidebarPageItem, { item }) });
2173
+ return /* @__PURE__ */ jsxRuntime.jsx(DashboardSidebarPageItemContext.Provider, { value: pageItemContextProps, children: renderPageItem ? renderPageItem(item, { mini: isMini }) : /* @__PURE__ */ jsxRuntime.jsx(DashboardSidebarPageItem, { item }) });
2338
2174
  }
2339
2175
  function DashboardSidebarSubNavigation({
2340
2176
  subNavigation,
@@ -2348,9 +2184,9 @@ function DashboardSidebarSubNavigation({
2348
2184
  sidebarExpandedWidth,
2349
2185
  renderPageItem
2350
2186
  }) {
2351
- const navigationContext = React25.useContext(NavigationContext);
2187
+ const navigationContext = React26__namespace.useContext(NavigationContext);
2352
2188
  const activePage = useActivePage();
2353
- const initialExpandedItemIds = React25.useMemo(
2189
+ const initialExpandedItemIds = React26__namespace.useMemo(
2354
2190
  () => subNavigation.map((navigationItem, navigationItemIndex) => ({
2355
2191
  navigationItem,
2356
2192
  originalIndex: navigationItemIndex
@@ -2359,8 +2195,8 @@ function DashboardSidebarSubNavigation({
2359
2195
  ).map(({ originalIndex }) => `page-${depth}-${originalIndex}`),
2360
2196
  [activePage, depth, navigationContext, subNavigation]
2361
2197
  );
2362
- const [expandedItemIds, setExpandedItemIds] = React25.useState(initialExpandedItemIds);
2363
- const handlePageItemClick = React25.useCallback(
2198
+ const [expandedItemIds, setExpandedItemIds] = React26__namespace.useState(initialExpandedItemIds);
2199
+ const handlePageItemClick = React26__namespace.useCallback(
2364
2200
  (itemId, item) => {
2365
2201
  if (item.children && !isMini) {
2366
2202
  setExpandedItemIds(
@@ -2372,8 +2208,8 @@ function DashboardSidebarSubNavigation({
2372
2208
  },
2373
2209
  [isMini, onLinkClick]
2374
2210
  );
2375
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2376
- import_List.default,
2211
+ return /* @__PURE__ */ jsxRuntime.jsx(
2212
+ List__default.default,
2377
2213
  {
2378
2214
  sx: {
2379
2215
  padding: 0,
@@ -2385,8 +2221,8 @@ function DashboardSidebarSubNavigation({
2385
2221
  },
2386
2222
  children: subNavigation.map((navigationItem, navigationItemIndex) => {
2387
2223
  if (navigationItem.kind === "header") {
2388
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2389
- import_ListSubheader.default,
2224
+ return /* @__PURE__ */ jsxRuntime.jsx(
2225
+ ListSubheader__default.default,
2390
2226
  {
2391
2227
  sx: __spreadProps(__spreadValues({
2392
2228
  fontSize: 12,
@@ -2407,8 +2243,8 @@ function DashboardSidebarSubNavigation({
2407
2243
  }
2408
2244
  if (navigationItem.kind === "divider") {
2409
2245
  const nextItem = subNavigation[navigationItemIndex + 1];
2410
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2411
- import_Divider2.default,
2246
+ return /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsx(
2247
+ Divider__default.default,
2412
2248
  {
2413
2249
  sx: __spreadValues({
2414
2250
  borderBottomWidth: 2,
@@ -2420,7 +2256,7 @@ function DashboardSidebarSubNavigation({
2420
2256
  ) }, `divider-${depth}-${navigationItemIndex}`);
2421
2257
  }
2422
2258
  const pageItemId = `page-${depth}-${navigationItemIndex}`;
2423
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2259
+ return /* @__PURE__ */ jsxRuntime.jsx(
2424
2260
  DashboardSidebarSubNavigationPageItem,
2425
2261
  {
2426
2262
  id: pageItemId,
@@ -2450,9 +2286,6 @@ function warnOnce(msg) {
2450
2286
  console.warn(msg);
2451
2287
  }
2452
2288
  }
2453
-
2454
- // src/toolpad-core/DashboardLayout/DashboardLayout.tsx
2455
- var import_jsx_runtime22 = require("react/jsx-runtime");
2456
2289
  function DashboardLayout(props) {
2457
2290
  var _a, _b;
2458
2291
  const {
@@ -2473,26 +2306,26 @@ function DashboardLayout(props) {
2473
2306
  "The navigation prop in the DashboardLayout component is deprecated and will eventually be removed. Set the navigation prop in the AppProvider instead (https://mui.com/toolpad/core/react-app-provider/#navigation)."
2474
2307
  );
2475
2308
  }
2476
- const theme = (0, import_styles5.useTheme)();
2477
- const navigationContext = React26.useContext(NavigationContext);
2478
- const appWindowContext = React26.useContext(WindowContext);
2309
+ const theme = styles.useTheme();
2310
+ const navigationContext = React26__namespace.useContext(NavigationContext);
2311
+ const appWindowContext = React26__namespace.useContext(WindowContext);
2479
2312
  const navigation = navigationProp != null ? navigationProp : navigationContext;
2480
- const [isDesktopNavigationExpanded, setIsDesktopNavigationExpanded] = React26.useState(!defaultSidebarCollapsed);
2481
- const [isMobileNavigationExpanded, setIsMobileNavigationExpanded] = React26.useState(false);
2482
- const isOverSmViewport = (0, import_useMediaQuery.default)(
2313
+ const [isDesktopNavigationExpanded, setIsDesktopNavigationExpanded] = React26__namespace.useState(!defaultSidebarCollapsed);
2314
+ const [isMobileNavigationExpanded, setIsMobileNavigationExpanded] = React26__namespace.useState(false);
2315
+ const isOverSmViewport = useMediaQuery2__default.default(
2483
2316
  theme.breakpoints.up("sm"),
2484
2317
  appWindowContext && {
2485
2318
  matchMedia: appWindowContext.matchMedia
2486
2319
  }
2487
2320
  );
2488
- const isOverMdViewport = (0, import_useMediaQuery.default)(
2321
+ const isOverMdViewport = useMediaQuery2__default.default(
2489
2322
  theme.breakpoints.up("md"),
2490
2323
  appWindowContext && {
2491
2324
  matchMedia: appWindowContext.matchMedia
2492
2325
  }
2493
2326
  );
2494
2327
  const isNavigationExpanded = isOverMdViewport ? isDesktopNavigationExpanded : isMobileNavigationExpanded;
2495
- const setIsNavigationExpanded = React26.useCallback(
2328
+ const setIsNavigationExpanded = React26__namespace.useCallback(
2496
2329
  (newExpanded) => {
2497
2330
  if (isOverMdViewport) {
2498
2331
  setIsDesktopNavigationExpanded(newExpanded);
@@ -2502,9 +2335,9 @@ function DashboardLayout(props) {
2502
2335
  },
2503
2336
  [isOverMdViewport]
2504
2337
  );
2505
- const [isNavigationFullyExpanded, setIsNavigationFullyExpanded] = React26.useState(isNavigationExpanded);
2506
- const [isNavigationFullyCollapsed, setIsNavigationFullyCollapsed] = React26.useState(!isNavigationExpanded);
2507
- React26.useEffect(() => {
2338
+ const [isNavigationFullyExpanded, setIsNavigationFullyExpanded] = React26__namespace.useState(isNavigationExpanded);
2339
+ const [isNavigationFullyCollapsed, setIsNavigationFullyCollapsed] = React26__namespace.useState(!isNavigationExpanded);
2340
+ React26__namespace.useEffect(() => {
2508
2341
  if (isNavigationExpanded) {
2509
2342
  const drawerWidthTransitionTimeout = setTimeout(() => {
2510
2343
  setIsNavigationFullyExpanded(true);
@@ -2515,7 +2348,7 @@ function DashboardLayout(props) {
2515
2348
  return () => {
2516
2349
  };
2517
2350
  }, [isNavigationExpanded, theme]);
2518
- React26.useEffect(() => {
2351
+ React26__namespace.useEffect(() => {
2519
2352
  if (!isNavigationExpanded) {
2520
2353
  const drawerWidthTransitionTimeout = setTimeout(() => {
2521
2354
  setIsNavigationFullyCollapsed(true);
@@ -2526,19 +2359,19 @@ function DashboardLayout(props) {
2526
2359
  return () => {
2527
2360
  };
2528
2361
  }, [isNavigationExpanded, theme]);
2529
- const handleSetNavigationExpanded = React26.useCallback(
2362
+ const handleSetNavigationExpanded = React26__namespace.useCallback(
2530
2363
  (newExpanded) => () => {
2531
2364
  setIsNavigationExpanded(newExpanded);
2532
2365
  },
2533
2366
  [setIsNavigationExpanded]
2534
2367
  );
2535
- const handleToggleHeaderMenu = React26.useCallback(
2368
+ const handleToggleHeaderMenu = React26__namespace.useCallback(
2536
2369
  (isExpanded) => {
2537
2370
  setIsNavigationExpanded(isExpanded);
2538
2371
  },
2539
2372
  [setIsNavigationExpanded]
2540
2373
  );
2541
- const handleNavigationLinkClick = React26.useCallback(() => {
2374
+ const handleNavigationLinkClick = React26__namespace.useCallback(() => {
2542
2375
  setIsMobileNavigationExpanded(false);
2543
2376
  }, [setIsMobileNavigationExpanded]);
2544
2377
  const isDesktopMini = !disableCollapsibleSidebar && !isDesktopNavigationExpanded;
@@ -2546,7 +2379,7 @@ function DashboardLayout(props) {
2546
2379
  const hasDrawerTransitions = isOverSmViewport && (!disableCollapsibleSidebar || isOverMdViewport);
2547
2380
  const SidebarFooterSlot = (_a = slots == null ? void 0 : slots.sidebarFooter) != null ? _a : null;
2548
2381
  const HeaderSlot = (_b = slots == null ? void 0 : slots.header) != null ? _b : DashboardHeader;
2549
- const headerSlotProps = React26.useMemo(
2382
+ const headerSlotProps = React26__namespace.useMemo(
2550
2383
  () => __spreadValues({
2551
2384
  branding,
2552
2385
  menuOpen: isNavigationExpanded,
@@ -2574,13 +2407,13 @@ function DashboardLayout(props) {
2574
2407
  slots
2575
2408
  ]
2576
2409
  );
2577
- const getDrawerContent = React26.useCallback(
2410
+ const getDrawerContent = React26__namespace.useCallback(
2578
2411
  (isMini, viewport) => {
2579
2412
  var _a2;
2580
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(React26.Fragment, { children: [
2581
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_Toolbar2.default, {}),
2582
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2583
- import_Box4.default,
2413
+ return /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
2414
+ /* @__PURE__ */ jsxRuntime.jsx(Toolbar2__default.default, {}),
2415
+ /* @__PURE__ */ jsxRuntime.jsxs(
2416
+ Box4__default.default,
2584
2417
  {
2585
2418
  component: "nav",
2586
2419
  "aria-label": `${viewport.charAt(0).toUpperCase()}${viewport.slice(1)}`,
@@ -2595,7 +2428,7 @@ function DashboardLayout(props) {
2595
2428
  pt: ((_a2 = navigation[0]) == null ? void 0 : _a2.kind) === "header" && !isMini ? 0 : 2
2596
2429
  }, hasDrawerTransitions ? getDrawerSxTransitionMixin(isNavigationFullyExpanded, "padding") : {}),
2597
2430
  children: [
2598
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2431
+ /* @__PURE__ */ jsxRuntime.jsx(
2599
2432
  DashboardSidebarSubNavigation,
2600
2433
  {
2601
2434
  subNavigation: navigation,
@@ -2608,7 +2441,7 @@ function DashboardLayout(props) {
2608
2441
  renderPageItem
2609
2442
  }
2610
2443
  ),
2611
- SidebarFooterSlot ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(SidebarFooterSlot, __spreadValues({ mini: isMini }, slotProps == null ? void 0 : slotProps.sidebarFooter)) : null
2444
+ SidebarFooterSlot ? /* @__PURE__ */ jsxRuntime.jsx(SidebarFooterSlot, __spreadValues({ mini: isMini }, slotProps == null ? void 0 : slotProps.sidebarFooter)) : null
2612
2445
  ]
2613
2446
  }
2614
2447
  )
@@ -2626,7 +2459,7 @@ function DashboardLayout(props) {
2626
2459
  slotProps == null ? void 0 : slotProps.sidebarFooter
2627
2460
  ]
2628
2461
  );
2629
- const getDrawerSharedSx = React26.useCallback(
2462
+ const getDrawerSharedSx = React26__namespace.useCallback(
2630
2463
  (isMini, isTemporary) => {
2631
2464
  const drawerWidth = isMini ? MINI_DRAWER_WIDTH : sidebarExpandedWidth;
2632
2465
  return __spreadProps(__spreadValues(__spreadValues({
@@ -2644,8 +2477,8 @@ function DashboardLayout(props) {
2644
2477
  },
2645
2478
  [isNavigationExpanded, sidebarExpandedWidth]
2646
2479
  );
2647
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2648
- import_Box4.default,
2480
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2481
+ Box4__default.default,
2649
2482
  {
2650
2483
  sx: __spreadValues({
2651
2484
  position: "relative",
@@ -2655,10 +2488,10 @@ function DashboardLayout(props) {
2655
2488
  width: "100vw"
2656
2489
  }, sx),
2657
2490
  children: [
2658
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(HeaderSlot, __spreadValues({}, headerSlotProps)),
2659
- !hideNavigation ? /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(React26.Fragment, { children: [
2660
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2661
- import_Drawer.default,
2491
+ /* @__PURE__ */ jsxRuntime.jsx(HeaderSlot, __spreadValues({}, headerSlotProps)),
2492
+ !hideNavigation ? /* @__PURE__ */ jsxRuntime.jsxs(React26__namespace.Fragment, { children: [
2493
+ /* @__PURE__ */ jsxRuntime.jsx(
2494
+ Drawer__default.default,
2662
2495
  {
2663
2496
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
2664
2497
  variant: "temporary",
@@ -2678,8 +2511,8 @@ function DashboardLayout(props) {
2678
2511
  children: getDrawerContent(false, "phone")
2679
2512
  }
2680
2513
  ),
2681
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2682
- import_Drawer.default,
2514
+ /* @__PURE__ */ jsxRuntime.jsx(
2515
+ Drawer__default.default,
2683
2516
  {
2684
2517
  variant: "permanent",
2685
2518
  sx: __spreadValues({
@@ -2692,8 +2525,8 @@ function DashboardLayout(props) {
2692
2525
  children: getDrawerContent(isMobileMini, "tablet")
2693
2526
  }
2694
2527
  ),
2695
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2696
- import_Drawer.default,
2528
+ /* @__PURE__ */ jsxRuntime.jsx(
2529
+ Drawer__default.default,
2697
2530
  {
2698
2531
  variant: "permanent",
2699
2532
  sx: __spreadValues({
@@ -2703,8 +2536,8 @@ function DashboardLayout(props) {
2703
2536
  }
2704
2537
  )
2705
2538
  ] }) : null,
2706
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2707
- import_Box4.default,
2539
+ /* @__PURE__ */ jsxRuntime.jsxs(
2540
+ Box4__default.default,
2708
2541
  {
2709
2542
  sx: {
2710
2543
  display: "flex",
@@ -2713,9 +2546,9 @@ function DashboardLayout(props) {
2713
2546
  minWidth: 0
2714
2547
  },
2715
2548
  children: [
2716
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_Toolbar2.default, { sx: { displayPrint: "none" } }),
2717
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2718
- import_Box4.default,
2549
+ /* @__PURE__ */ jsxRuntime.jsx(Toolbar2__default.default, { sx: { displayPrint: "none" } }),
2550
+ /* @__PURE__ */ jsxRuntime.jsx(
2551
+ Box4__default.default,
2719
2552
  {
2720
2553
  component: "main",
2721
2554
  sx: {
@@ -2743,63 +2576,63 @@ DashboardLayout.propTypes = {
2743
2576
  * Branding options for the dashboard.
2744
2577
  * @default null
2745
2578
  */
2746
- branding: import_prop_types11.default.shape({
2747
- homeUrl: import_prop_types11.default.string,
2748
- logo: import_prop_types11.default.node,
2749
- title: import_prop_types11.default.string
2579
+ branding: PropTypes11__default.default.shape({
2580
+ homeUrl: PropTypes11__default.default.string,
2581
+ logo: PropTypes11__default.default.node,
2582
+ title: PropTypes11__default.default.string
2750
2583
  }),
2751
2584
  /**
2752
2585
  * The content of the dashboard.
2753
2586
  */
2754
- children: import_prop_types11.default.node,
2587
+ children: PropTypes11__default.default.node,
2755
2588
  /**
2756
2589
  * Whether the sidebar should start collapsed in desktop size screens.
2757
2590
  * @default false
2758
2591
  */
2759
- defaultSidebarCollapsed: import_prop_types11.default.bool,
2592
+ defaultSidebarCollapsed: PropTypes11__default.default.bool,
2760
2593
  /**
2761
2594
  * Whether the sidebar should not be collapsible to a mini variant in desktop and tablet viewports.
2762
2595
  * @default false
2763
2596
  */
2764
- disableCollapsibleSidebar: import_prop_types11.default.bool,
2597
+ disableCollapsibleSidebar: PropTypes11__default.default.bool,
2765
2598
  /**
2766
2599
  * Whether the navigation bar and menu icon should be hidden.
2767
2600
  * @default false
2768
2601
  */
2769
- hideNavigation: import_prop_types11.default.bool,
2602
+ hideNavigation: PropTypes11__default.default.bool,
2770
2603
  /**
2771
2604
  * Navigation definition for the dashboard. [Find out more](https://mui.com/toolpad/core/react-dashboard-layout/#navigation).
2772
2605
  * @default []
2773
2606
  * @deprecated Set the navigation in the [AppProvider](https://mui.com/toolpad/core/react-app-provider/#navigation) instead.
2774
2607
  */
2775
- navigation: import_prop_types11.default.arrayOf(
2776
- import_prop_types11.default.oneOfType([
2777
- import_prop_types11.default.shape({
2778
- action: import_prop_types11.default.node,
2779
- children: import_prop_types11.default.arrayOf(
2780
- import_prop_types11.default.oneOfType([
2781
- import_prop_types11.default.object,
2782
- import_prop_types11.default.shape({
2783
- kind: import_prop_types11.default.oneOf(["header"]).isRequired,
2784
- title: import_prop_types11.default.string.isRequired
2608
+ navigation: PropTypes11__default.default.arrayOf(
2609
+ PropTypes11__default.default.oneOfType([
2610
+ PropTypes11__default.default.shape({
2611
+ action: PropTypes11__default.default.node,
2612
+ children: PropTypes11__default.default.arrayOf(
2613
+ PropTypes11__default.default.oneOfType([
2614
+ PropTypes11__default.default.object,
2615
+ PropTypes11__default.default.shape({
2616
+ kind: PropTypes11__default.default.oneOf(["header"]).isRequired,
2617
+ title: PropTypes11__default.default.string.isRequired
2785
2618
  }),
2786
- import_prop_types11.default.shape({
2787
- kind: import_prop_types11.default.oneOf(["divider"]).isRequired
2619
+ PropTypes11__default.default.shape({
2620
+ kind: PropTypes11__default.default.oneOf(["divider"]).isRequired
2788
2621
  })
2789
2622
  ]).isRequired
2790
2623
  ),
2791
- icon: import_prop_types11.default.node,
2792
- kind: import_prop_types11.default.oneOf(["page"]),
2793
- pattern: import_prop_types11.default.string,
2794
- segment: import_prop_types11.default.string,
2795
- title: import_prop_types11.default.string
2624
+ icon: PropTypes11__default.default.node,
2625
+ kind: PropTypes11__default.default.oneOf(["page"]),
2626
+ pattern: PropTypes11__default.default.string,
2627
+ segment: PropTypes11__default.default.string,
2628
+ title: PropTypes11__default.default.string
2796
2629
  }),
2797
- import_prop_types11.default.shape({
2798
- kind: import_prop_types11.default.oneOf(["header"]).isRequired,
2799
- title: import_prop_types11.default.string.isRequired
2630
+ PropTypes11__default.default.shape({
2631
+ kind: PropTypes11__default.default.oneOf(["header"]).isRequired,
2632
+ title: PropTypes11__default.default.string.isRequired
2800
2633
  }),
2801
- import_prop_types11.default.shape({
2802
- kind: import_prop_types11.default.oneOf(["divider"]).isRequired
2634
+ PropTypes11__default.default.shape({
2635
+ kind: PropTypes11__default.default.oneOf(["divider"]).isRequired
2803
2636
  })
2804
2637
  ]).isRequired
2805
2638
  ),
@@ -2810,107 +2643,87 @@ DashboardLayout.propTypes = {
2810
2643
  * @param {{ mini: boolean }} params
2811
2644
  * @returns {ReactNode}
2812
2645
  */
2813
- renderPageItem: import_prop_types11.default.func,
2646
+ renderPageItem: PropTypes11__default.default.func,
2814
2647
  /**
2815
2648
  * Width of the sidebar when expanded.
2816
2649
  * @default 320
2817
2650
  */
2818
- sidebarExpandedWidth: import_prop_types11.default.oneOfType([import_prop_types11.default.number, import_prop_types11.default.string]),
2651
+ sidebarExpandedWidth: PropTypes11__default.default.oneOfType([PropTypes11__default.default.number, PropTypes11__default.default.string]),
2819
2652
  /**
2820
2653
  * The props used for each slot inside.
2821
2654
  * @default {}
2822
2655
  */
2823
- slotProps: import_prop_types11.default.shape({
2824
- appTitle: import_prop_types11.default.shape({
2825
- branding: import_prop_types11.default.shape({
2826
- homeUrl: import_prop_types11.default.string,
2827
- logo: import_prop_types11.default.node,
2828
- title: import_prop_types11.default.string
2656
+ slotProps: PropTypes11__default.default.shape({
2657
+ appTitle: PropTypes11__default.default.shape({
2658
+ branding: PropTypes11__default.default.shape({
2659
+ homeUrl: PropTypes11__default.default.string,
2660
+ logo: PropTypes11__default.default.node,
2661
+ title: PropTypes11__default.default.string
2829
2662
  })
2830
2663
  }),
2831
- header: import_prop_types11.default.shape({
2832
- branding: import_prop_types11.default.shape({
2833
- homeUrl: import_prop_types11.default.string,
2834
- logo: import_prop_types11.default.node,
2835
- title: import_prop_types11.default.string
2664
+ header: PropTypes11__default.default.shape({
2665
+ branding: PropTypes11__default.default.shape({
2666
+ homeUrl: PropTypes11__default.default.string,
2667
+ logo: PropTypes11__default.default.node,
2668
+ title: PropTypes11__default.default.string
2836
2669
  }),
2837
- hideMenuButton: import_prop_types11.default.bool,
2838
- menuOpen: import_prop_types11.default.bool.isRequired,
2839
- onToggleMenu: import_prop_types11.default.func.isRequired,
2840
- slotProps: import_prop_types11.default.shape({
2841
- appTitle: import_prop_types11.default.object,
2842
- toolbarAccount: import_prop_types11.default.object,
2843
- toolbarActions: import_prop_types11.default.object
2670
+ hideMenuButton: PropTypes11__default.default.bool,
2671
+ menuOpen: PropTypes11__default.default.bool.isRequired,
2672
+ onToggleMenu: PropTypes11__default.default.func.isRequired,
2673
+ slotProps: PropTypes11__default.default.shape({
2674
+ appTitle: PropTypes11__default.default.object,
2675
+ toolbarAccount: PropTypes11__default.default.object,
2676
+ toolbarActions: PropTypes11__default.default.object
2844
2677
  }),
2845
- slots: import_prop_types11.default.shape({
2846
- appTitle: import_prop_types11.default.elementType,
2847
- toolbarAccount: import_prop_types11.default.elementType,
2848
- toolbarActions: import_prop_types11.default.elementType
2678
+ slots: PropTypes11__default.default.shape({
2679
+ appTitle: PropTypes11__default.default.elementType,
2680
+ toolbarAccount: PropTypes11__default.default.elementType,
2681
+ toolbarActions: PropTypes11__default.default.elementType
2849
2682
  })
2850
2683
  }),
2851
- sidebarFooter: import_prop_types11.default.shape({
2852
- mini: import_prop_types11.default.bool.isRequired
2684
+ sidebarFooter: PropTypes11__default.default.shape({
2685
+ mini: PropTypes11__default.default.bool.isRequired
2853
2686
  }),
2854
- toolbarAccount: import_prop_types11.default.shape({
2855
- localeText: import_prop_types11.default.object,
2856
- slotProps: import_prop_types11.default.shape({
2857
- popover: import_prop_types11.default.object,
2858
- popoverContent: import_prop_types11.default.object,
2859
- preview: import_prop_types11.default.object,
2860
- signInButton: import_prop_types11.default.object,
2861
- signOutButton: import_prop_types11.default.object
2687
+ toolbarAccount: PropTypes11__default.default.shape({
2688
+ localeText: PropTypes11__default.default.object,
2689
+ slotProps: PropTypes11__default.default.shape({
2690
+ popover: PropTypes11__default.default.object,
2691
+ popoverContent: PropTypes11__default.default.object,
2692
+ preview: PropTypes11__default.default.object,
2693
+ signInButton: PropTypes11__default.default.object,
2694
+ signOutButton: PropTypes11__default.default.object
2862
2695
  }),
2863
- slots: import_prop_types11.default.shape({
2864
- popover: import_prop_types11.default.elementType,
2865
- popoverContent: import_prop_types11.default.elementType,
2866
- preview: import_prop_types11.default.elementType,
2867
- signInButton: import_prop_types11.default.elementType,
2868
- signOutButton: import_prop_types11.default.elementType
2696
+ slots: PropTypes11__default.default.shape({
2697
+ popover: PropTypes11__default.default.elementType,
2698
+ popoverContent: PropTypes11__default.default.elementType,
2699
+ preview: PropTypes11__default.default.elementType,
2700
+ signInButton: PropTypes11__default.default.elementType,
2701
+ signOutButton: PropTypes11__default.default.elementType
2869
2702
  })
2870
2703
  }),
2871
- toolbarActions: import_prop_types11.default.object
2704
+ toolbarActions: PropTypes11__default.default.object
2872
2705
  }),
2873
2706
  /**
2874
2707
  * The components used for each slot inside.
2875
2708
  * @default {}
2876
2709
  */
2877
- slots: import_prop_types11.default.shape({
2878
- appTitle: import_prop_types11.default.elementType,
2879
- header: import_prop_types11.default.elementType,
2880
- sidebarFooter: import_prop_types11.default.elementType,
2881
- toolbarAccount: import_prop_types11.default.elementType,
2882
- toolbarActions: import_prop_types11.default.elementType
2710
+ slots: PropTypes11__default.default.shape({
2711
+ appTitle: PropTypes11__default.default.elementType,
2712
+ header: PropTypes11__default.default.elementType,
2713
+ sidebarFooter: PropTypes11__default.default.elementType,
2714
+ toolbarAccount: PropTypes11__default.default.elementType,
2715
+ toolbarActions: PropTypes11__default.default.elementType
2883
2716
  }),
2884
2717
  /**
2885
2718
  * The system prop that allows defining system overrides as well as additional CSS styles.
2886
2719
  */
2887
- sx: import_prop_types11.default.oneOfType([
2888
- import_prop_types11.default.arrayOf(import_prop_types11.default.oneOfType([import_prop_types11.default.func, import_prop_types11.default.object, import_prop_types11.default.bool])),
2889
- import_prop_types11.default.func,
2890
- import_prop_types11.default.object
2720
+ sx: PropTypes11__default.default.oneOfType([
2721
+ PropTypes11__default.default.arrayOf(PropTypes11__default.default.oneOfType([PropTypes11__default.default.func, PropTypes11__default.default.object, PropTypes11__default.default.bool])),
2722
+ PropTypes11__default.default.func,
2723
+ PropTypes11__default.default.object
2891
2724
  ])
2892
2725
  };
2893
-
2894
- // src/toolpad-core/PageContainer/PageContainer.tsx
2895
- var import_prop_types14 = __toESM(require("prop-types"));
2896
- var import_Box5 = __toESM(require("@mui/material/Box"));
2897
- var import_Container = __toESM(require("@mui/material/Container"));
2898
- var import_Stack8 = __toESM(require("@mui/material/Stack"));
2899
-
2900
- // src/toolpad-core/PageContainer/PageHeader.tsx
2901
- var import_prop_types13 = __toESM(require("prop-types"));
2902
- var import_Breadcrumbs = __toESM(require("@mui/material/Breadcrumbs"));
2903
- var import_Link3 = __toESM(require("@mui/material/Link"));
2904
- var import_Stack7 = __toESM(require("@mui/material/Stack"));
2905
- var import_Typography4 = __toESM(require("@mui/material/Typography"));
2906
- var import_useSlotProps2 = __toESM(require("@mui/utils/useSlotProps"));
2907
- var import_material7 = require("@mui/material");
2908
-
2909
- // src/toolpad-core/PageContainer/PageHeaderToolbar.tsx
2910
- var import_prop_types12 = __toESM(require("prop-types"));
2911
- var import_material6 = require("@mui/material");
2912
- var import_jsx_runtime23 = require("react/jsx-runtime");
2913
- var PageHeaderToolbarRoot = (0, import_material6.styled)("div")(({ theme }) => ({
2726
+ var PageHeaderToolbarRoot = material.styled("div")(({ theme }) => ({
2914
2727
  display: "flex",
2915
2728
  flexDirection: "row",
2916
2729
  gap: theme.spacing(1),
@@ -2918,7 +2731,7 @@ var PageHeaderToolbarRoot = (0, import_material6.styled)("div")(({ theme }) => (
2918
2731
  marginLeft: "auto"
2919
2732
  }));
2920
2733
  function PageHeaderToolbar(props) {
2921
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PageHeaderToolbarRoot, __spreadValues({}, props));
2734
+ return /* @__PURE__ */ jsxRuntime.jsx(PageHeaderToolbarRoot, __spreadValues({}, props));
2922
2735
  }
2923
2736
  PageHeaderToolbar.propTypes = {
2924
2737
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -2928,12 +2741,9 @@ PageHeaderToolbar.propTypes = {
2928
2741
  /**
2929
2742
  * @ignore
2930
2743
  */
2931
- children: import_prop_types12.default.node
2744
+ children: PropTypes11__default.default.node
2932
2745
  };
2933
-
2934
- // src/toolpad-core/PageContainer/PageHeader.tsx
2935
- var import_jsx_runtime24 = require("react/jsx-runtime");
2936
- var PageContentHeader = (0, import_material7.styled)("div")(({ theme }) => ({
2746
+ var PageContentHeader = material.styled("div")(({ theme }) => ({
2937
2747
  display: "flex",
2938
2748
  flexDirection: "row",
2939
2749
  justifyContent: "space-between",
@@ -2946,16 +2756,16 @@ function PageHeader(props) {
2946
2756
  const resolvedBreadcrumbs = (_a = breadcrumbs != null ? breadcrumbs : activePage == null ? void 0 : activePage.breadcrumbs) != null ? _a : [];
2947
2757
  const resolvedTitle = (_b = title != null ? title : activePage == null ? void 0 : activePage.title) != null ? _b : "";
2948
2758
  const ToolbarComponent = (_d = (_c = props == null ? void 0 : props.slots) == null ? void 0 : _c.toolbar) != null ? _d : PageHeaderToolbar;
2949
- const toolbarSlotProps = (0, import_useSlotProps2.default)({
2759
+ const toolbarSlotProps = useSlotProps__default.default({
2950
2760
  elementType: ToolbarComponent,
2951
2761
  ownerState: props,
2952
2762
  externalSlotProps: (_e = props == null ? void 0 : props.slotProps) == null ? void 0 : _e.toolbar,
2953
2763
  additionalProps: {}
2954
2764
  });
2955
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_Stack7.default, { children: [
2956
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_Breadcrumbs.default, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs ? resolvedBreadcrumbs.map((item, index) => {
2957
- return item.path ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2958
- import_Link3.default,
2765
+ return /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { children: [
2766
+ /* @__PURE__ */ jsxRuntime.jsx(Breadcrumbs__default.default, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs ? resolvedBreadcrumbs.map((item, index) => {
2767
+ return item.path ? /* @__PURE__ */ jsxRuntime.jsx(
2768
+ Link4__default.default,
2959
2769
  {
2960
2770
  component: Link2,
2961
2771
  underline: "hover",
@@ -2964,11 +2774,11 @@ function PageHeader(props) {
2964
2774
  children: getItemTitle(item)
2965
2775
  },
2966
2776
  index
2967
- ) : /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_Typography4.default, { color: "text.primary", children: getItemTitle(item) }, index);
2777
+ ) : /* @__PURE__ */ jsxRuntime.jsx(Typography__default.default, { color: "text.primary", children: getItemTitle(item) }, index);
2968
2778
  }) : null }),
2969
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(PageContentHeader, { children: [
2970
- resolvedTitle ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_Typography4.default, { variant: "h4", children: resolvedTitle }) : null,
2971
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(ToolbarComponent, __spreadValues({}, toolbarSlotProps))
2779
+ /* @__PURE__ */ jsxRuntime.jsxs(PageContentHeader, { children: [
2780
+ resolvedTitle ? /* @__PURE__ */ jsxRuntime.jsx(Typography__default.default, { variant: "h4", children: resolvedTitle }) : null,
2781
+ /* @__PURE__ */ jsxRuntime.jsx(ToolbarComponent, __spreadValues({}, toolbarSlotProps))
2972
2782
  ] })
2973
2783
  ] });
2974
2784
  }
@@ -2980,41 +2790,38 @@ PageHeader.propTypes = {
2980
2790
  /**
2981
2791
  * The breadcrumbs of the page. Leave blank to use the active page breadcrumbs.
2982
2792
  */
2983
- breadcrumbs: import_prop_types13.default.arrayOf(
2984
- import_prop_types13.default.shape({
2985
- path: import_prop_types13.default.string,
2986
- title: import_prop_types13.default.string.isRequired
2793
+ breadcrumbs: PropTypes11__default.default.arrayOf(
2794
+ PropTypes11__default.default.shape({
2795
+ path: PropTypes11__default.default.string,
2796
+ title: PropTypes11__default.default.string.isRequired
2987
2797
  })
2988
2798
  ),
2989
2799
  /**
2990
2800
  * The props used for each slot inside.
2991
2801
  */
2992
- slotProps: import_prop_types13.default.shape({
2993
- toolbar: import_prop_types13.default.shape({
2994
- children: import_prop_types13.default.node
2802
+ slotProps: PropTypes11__default.default.shape({
2803
+ toolbar: PropTypes11__default.default.shape({
2804
+ children: PropTypes11__default.default.node
2995
2805
  }).isRequired
2996
2806
  }),
2997
2807
  /**
2998
2808
  * The components used for each slot inside.
2999
2809
  */
3000
- slots: import_prop_types13.default.shape({
3001
- toolbar: import_prop_types13.default.elementType
2810
+ slots: PropTypes11__default.default.shape({
2811
+ toolbar: PropTypes11__default.default.elementType
3002
2812
  }),
3003
2813
  /**
3004
2814
  * The title of the page. Leave blank to use the active page title.
3005
2815
  */
3006
- title: import_prop_types13.default.string
2816
+ title: PropTypes11__default.default.string
3007
2817
  };
3008
-
3009
- // src/toolpad-core/PageContainer/PageContainer.tsx
3010
- var import_jsx_runtime25 = require("react/jsx-runtime");
3011
2818
  function PageContainer(props) {
3012
2819
  var _b;
3013
2820
  const _a = props, { children, breadcrumbs, slots, slotProps, title } = _a, rest = __objRest(_a, ["children", "breadcrumbs", "slots", "slotProps", "title"]);
3014
2821
  const PageHeaderSlot = (_b = slots == null ? void 0 : slots.header) != null ? _b : PageHeader;
3015
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_Container.default, __spreadProps(__spreadValues({}, rest), { sx: __spreadValues({ flex: 1, display: "flex", flexDirection: "column" }, rest.sx), children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_Stack8.default, { sx: { flex: 1, my: 2 }, spacing: 2, children: [
3016
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(PageHeaderSlot, __spreadValues({ title, breadcrumbs }, slotProps == null ? void 0 : slotProps.header)),
3017
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_Box5.default, { sx: { flex: 1, display: "flex", flexDirection: "column" }, children })
2822
+ return /* @__PURE__ */ jsxRuntime.jsx(Container__default.default, __spreadProps(__spreadValues({}, rest), { sx: __spreadValues({ flex: 1, display: "flex", flexDirection: "column" }, rest.sx), children: /* @__PURE__ */ jsxRuntime.jsxs(Stack__default.default, { sx: { flex: 1, my: 2 }, spacing: 2, children: [
2823
+ /* @__PURE__ */ jsxRuntime.jsx(PageHeaderSlot, __spreadValues({ title, breadcrumbs }, slotProps == null ? void 0 : slotProps.header)),
2824
+ /* @__PURE__ */ jsxRuntime.jsx(Box4__default.default, { sx: { flex: 1, display: "flex", flexDirection: "column" }, children })
3018
2825
  ] }) }));
3019
2826
  }
3020
2827
  PageContainer.propTypes = {
@@ -3025,87 +2832,121 @@ PageContainer.propTypes = {
3025
2832
  /**
3026
2833
  * The breadcrumbs of the page. Leave blank to use the active page breadcrumbs.
3027
2834
  */
3028
- breadcrumbs: import_prop_types14.default.arrayOf(
3029
- import_prop_types14.default.shape({
3030
- path: import_prop_types14.default.string,
3031
- title: import_prop_types14.default.string.isRequired
2835
+ breadcrumbs: PropTypes11__default.default.arrayOf(
2836
+ PropTypes11__default.default.shape({
2837
+ path: PropTypes11__default.default.string,
2838
+ title: PropTypes11__default.default.string.isRequired
3032
2839
  })
3033
2840
  ),
3034
2841
  /**
3035
2842
  * @ignore
3036
2843
  */
3037
- children: import_prop_types14.default.node,
2844
+ children: PropTypes11__default.default.node,
3038
2845
  /**
3039
2846
  * The props used for each slot inside.
3040
2847
  */
3041
- slotProps: import_prop_types14.default.shape({
3042
- header: import_prop_types14.default.shape({
3043
- breadcrumbs: import_prop_types14.default.arrayOf(
3044
- import_prop_types14.default.shape({
3045
- path: import_prop_types14.default.string,
3046
- title: import_prop_types14.default.string.isRequired
2848
+ slotProps: PropTypes11__default.default.shape({
2849
+ header: PropTypes11__default.default.shape({
2850
+ breadcrumbs: PropTypes11__default.default.arrayOf(
2851
+ PropTypes11__default.default.shape({
2852
+ path: PropTypes11__default.default.string,
2853
+ title: PropTypes11__default.default.string.isRequired
3047
2854
  })
3048
2855
  ),
3049
- slotProps: import_prop_types14.default.shape({
3050
- toolbar: import_prop_types14.default.object.isRequired
2856
+ slotProps: PropTypes11__default.default.shape({
2857
+ toolbar: PropTypes11__default.default.object.isRequired
3051
2858
  }),
3052
- slots: import_prop_types14.default.shape({
3053
- toolbar: import_prop_types14.default.elementType
2859
+ slots: PropTypes11__default.default.shape({
2860
+ toolbar: PropTypes11__default.default.elementType
3054
2861
  }),
3055
- title: import_prop_types14.default.string
2862
+ title: PropTypes11__default.default.string
3056
2863
  }).isRequired
3057
2864
  }),
3058
2865
  /**
3059
2866
  * The components used for each slot inside.
3060
2867
  */
3061
- slots: import_prop_types14.default.shape({
3062
- header: import_prop_types14.default.elementType
2868
+ slots: PropTypes11__default.default.shape({
2869
+ header: PropTypes11__default.default.elementType
3063
2870
  }),
3064
2871
  /**
3065
2872
  * The system prop that allows defining system overrides as well as additional CSS styles.
3066
2873
  */
3067
- sx: import_prop_types14.default.oneOfType([
3068
- import_prop_types14.default.arrayOf(import_prop_types14.default.oneOfType([import_prop_types14.default.func, import_prop_types14.default.object, import_prop_types14.default.bool])),
3069
- import_prop_types14.default.func,
3070
- import_prop_types14.default.object
2874
+ sx: PropTypes11__default.default.oneOfType([
2875
+ PropTypes11__default.default.arrayOf(PropTypes11__default.default.oneOfType([PropTypes11__default.default.func, PropTypes11__default.default.object, PropTypes11__default.default.bool])),
2876
+ PropTypes11__default.default.func,
2877
+ PropTypes11__default.default.object
3071
2878
  ]),
3072
2879
  /**
3073
2880
  * The title of the page. Leave blank to use the active page title.
3074
2881
  */
3075
- title: import_prop_types14.default.string
2882
+ title: PropTypes11__default.default.string
3076
2883
  };
3077
- // Annotate the CommonJS export names for ESM import in node:
3078
- 0 && (module.exports = {
3079
- Account,
3080
- AccountPopoverFooter,
3081
- AccountPopoverHeader,
3082
- AccountPreview,
3083
- AlertDialog,
3084
- AppProvider,
3085
- AuthenticationContext,
3086
- ConfirmDialog,
3087
- DashboardHeader,
3088
- DashboardLayout,
3089
- DashboardSidebarPageItem,
3090
- DialogsProvider,
3091
- LocalizationContext,
3092
- LocalizationProvider,
3093
- NotificationsProvider,
3094
- PageContainer,
3095
- PageHeader,
3096
- PageHeaderToolbar,
3097
- PromptDialog,
3098
- SessionContext,
3099
- SignInButton,
3100
- SignOutButton,
3101
- ThemeSwitcher,
3102
- ToolbarActions,
3103
- en,
3104
- useActivePage,
3105
- useDialogs,
3106
- useLocalStorageState,
3107
- useLocaleText,
3108
- useNotifications,
3109
- useStorageState,
3110
- useStorageStateServer
2884
+ var Link5 = React26__namespace.forwardRef((props, ref) => {
2885
+ const _a = props, { href, history: history2 } = _a, rest = __objRest(_a, ["href", "history"]);
2886
+ return /* @__PURE__ */ jsxRuntime.jsx(NextLink__default.default, __spreadValues({ ref, href, replace: history2 === "replace" }, rest));
3111
2887
  });
2888
+ function NextAppProviderApp(props) {
2889
+ const pathname = navigation_js.usePathname();
2890
+ const searchParams = navigation_js.useSearchParams();
2891
+ const { push, replace } = navigation_js.useRouter();
2892
+ const navigate = React26__namespace.useCallback(
2893
+ (url, { history: history2 = "auto" } = {}) => {
2894
+ if (history2 === "auto" || history2 === "push") {
2895
+ return push(String(url));
2896
+ }
2897
+ if (history2 === "replace") {
2898
+ return replace(String(url));
2899
+ }
2900
+ throw new Error(`Invalid history option: ${history2}`);
2901
+ },
2902
+ [push, replace]
2903
+ );
2904
+ const routerImpl = React26__namespace.useMemo(
2905
+ () => ({
2906
+ pathname,
2907
+ searchParams,
2908
+ navigate,
2909
+ Link: Link5
2910
+ }),
2911
+ [pathname, navigate, searchParams]
2912
+ );
2913
+ return /* @__PURE__ */ jsxRuntime.jsx(AppProvider, __spreadValues({ router: routerImpl }, props));
2914
+ }
2915
+ function NextAppProvider(props) {
2916
+ const AppProvider2 = NextAppProviderApp;
2917
+ return /* @__PURE__ */ jsxRuntime.jsx(AppProvider2, __spreadValues({}, props));
2918
+ }
2919
+
2920
+ exports.Account = Account;
2921
+ exports.AccountPopoverFooter = AccountPopoverFooter;
2922
+ exports.AccountPopoverHeader = AccountPopoverHeader;
2923
+ exports.AccountPreview = AccountPreview;
2924
+ exports.AlertDialog = AlertDialog;
2925
+ exports.AppProvider = AppProvider;
2926
+ exports.AuthenticationContext = AuthenticationContext;
2927
+ exports.ConfirmDialog = ConfirmDialog;
2928
+ exports.DashboardHeader = DashboardHeader;
2929
+ exports.DashboardLayout = DashboardLayout;
2930
+ exports.DashboardSidebarPageItem = DashboardSidebarPageItem;
2931
+ exports.DialogsProvider = DialogsProvider;
2932
+ exports.LocalizationContext = LocalizationContext;
2933
+ exports.LocalizationProvider = LocalizationProvider;
2934
+ exports.NextAppProvider = NextAppProvider;
2935
+ exports.NotificationsProvider = NotificationsProvider;
2936
+ exports.PageContainer = PageContainer;
2937
+ exports.PageHeader = PageHeader;
2938
+ exports.PageHeaderToolbar = PageHeaderToolbar;
2939
+ exports.PromptDialog = PromptDialog;
2940
+ exports.SessionContext = SessionContext;
2941
+ exports.SignInButton = SignInButton;
2942
+ exports.SignOutButton = SignOutButton;
2943
+ exports.ThemeSwitcher = ThemeSwitcher;
2944
+ exports.ToolbarActions = ToolbarActions;
2945
+ exports.en = en_default;
2946
+ exports.useActivePage = useActivePage;
2947
+ exports.useDialogs = useDialogs;
2948
+ exports.useLocalStorageState = useLocalStorageState;
2949
+ exports.useLocaleText = useLocaleText;
2950
+ exports.useNotifications = useNotifications;
2951
+ exports.useStorageState = useStorageState;
2952
+ exports.useStorageStateServer = useStorageStateServer;