@iowas/toolpad 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,36 +1,40 @@
1
+ import {
2
+ AuthenticationContext,
3
+ BrandingContext,
4
+ DashboardSidebarPageItemContext,
5
+ DialogsContext,
6
+ NavigationContext,
7
+ NotificationsContext,
8
+ PaletteModeContext,
9
+ RouterContext,
10
+ SessionContext,
11
+ WindowContext,
12
+ useLocaleText
13
+ } from "./chunk-LUTZBKSG.mjs";
14
+ import {
15
+ warnOnce
16
+ } from "./chunk-F6JD4MSY.mjs";
1
17
  import {
2
18
  __objRest,
3
19
  __spreadProps,
4
20
  __spreadValues,
5
- useNonNullableContext,
6
- warnOnce
7
- } from "./chunk-6JQJK2JX.mjs";
21
+ useNonNullableContext
22
+ } from "./chunk-3JWXE2JW.mjs";
8
23
 
9
24
  // src/toolpad-core/Account/Account.tsx
10
- import * as React16 from "react";
11
- import PropTypes8 from "prop-types";
25
+ import * as React7 from "react";
26
+ import PropTypes6 from "prop-types";
12
27
  import Popover from "@mui/material/Popover";
13
28
  import Divider from "@mui/material/Divider";
14
29
  import Stack3 from "@mui/material/Stack";
15
30
 
16
31
  // src/toolpad-core/Account/SignInButton.tsx
17
- import * as React13 from "react";
18
- import PropTypes3 from "prop-types";
19
- import Button3 from "@mui/material/Button";
20
-
21
- // src/toolpad-core/AppProvider/AppProvider.tsx
22
- import * as React11 from "react";
23
- import PropTypes2 from "prop-types";
24
- import { createTheme } from "@mui/material/styles";
32
+ import * as React4 from "react";
33
+ import PropTypes from "prop-types";
34
+ import Button2 from "@mui/material/Button";
25
35
 
26
36
  // src/toolpad-core/useNotifications/useNotifications.tsx
27
- import * as React2 from "react";
28
-
29
- // src/toolpad-core/useNotifications/NotificationsContext.ts
30
37
  import * as React from "react";
31
- var NotificationsContext = React.createContext(null);
32
-
33
- // src/toolpad-core/useNotifications/useNotifications.tsx
34
38
  var serverNotifications = {
35
39
  show: () => {
36
40
  throw new Error("Not supported on server side");
@@ -40,223 +44,15 @@ var serverNotifications = {
40
44
  }
41
45
  };
42
46
  function useNotifications() {
43
- const context = React2.useContext(NotificationsContext);
47
+ const context = React.useContext(NotificationsContext);
44
48
  if (context) {
45
49
  return context;
46
50
  }
47
51
  return serverNotifications;
48
52
  }
49
53
 
50
- // src/toolpad-core/useNotifications/NotificationsProvider.tsx
51
- import * as React4 from "react";
52
- import {
53
- Alert,
54
- Badge,
55
- Button,
56
- IconButton,
57
- Snackbar,
58
- SnackbarContent
59
- } from "@mui/material";
60
- import CloseIcon from "@mui/icons-material/Close";
61
- import useSlotProps from "@mui/utils/useSlotProps";
62
-
63
- // src/toolpad-core/AppProvider/LocalizationProvider.tsx
64
- import * as React3 from "react";
65
- import PropTypes from "prop-types";
66
- import { useTheme } from "@mui/material/styles";
67
-
68
- // src/toolpad-core/locales/getLocalization.ts
69
- var getLocalization = (translations) => {
70
- return {
71
- components: {
72
- MuiLocalizationProvider: {
73
- defaultProps: {
74
- localeText: __spreadValues({}, translations)
75
- }
76
- }
77
- }
78
- };
79
- };
80
-
81
- // src/toolpad-core/locales/en.tsx
82
- var enLabels = {
83
- // Account
84
- accountSignInLabel: "Sign In",
85
- accountSignOutLabel: "Sign Out",
86
- // AccountPreview
87
- accountPreviewTitle: "Account",
88
- accountPreviewIconButtonLabel: "Current User",
89
- // SignInPage
90
- signInTitle: (brandingTitle) => brandingTitle ? `Sign in to ${brandingTitle}` : "Sign in",
91
- signInSubtitle: "Welcome user, please sign in to continue",
92
- signInRememberMe: "Remember Me",
93
- providerSignInTitle: (provider) => `Sign in with ${provider}`,
94
- // Common authentication labels
95
- email: "Email",
96
- password: "Password",
97
- username: "Username",
98
- passkey: "Passkey",
99
- // Common action labels
100
- save: "Save",
101
- cancel: "Cancel",
102
- ok: "Ok",
103
- or: "Or",
104
- to: "To",
105
- with: "With",
106
- close: "Close",
107
- delete: "Delete",
108
- alert: "Alert",
109
- confirm: "Confirm",
110
- loading: "Loading...",
111
- // CRUD
112
- createNewButtonLabel: "Create new",
113
- reloadButtonLabel: "Reload data",
114
- createLabel: "Create",
115
- createSuccessMessage: "Item created successfully.",
116
- createErrorMessage: "Failed to create item. Reason:",
117
- editLabel: "Edit",
118
- editSuccessMessage: "Item edited successfully.",
119
- editErrorMessage: "Failed to edit item. Reason:",
120
- deleteLabel: "Delete",
121
- deleteConfirmTitle: "Delete item?",
122
- deleteConfirmMessage: "Do you wish to delete this item?",
123
- deleteConfirmLabel: "Delete",
124
- deleteCancelLabel: "Cancel",
125
- deleteSuccessMessage: "Item deleted successfully.",
126
- deleteErrorMessage: "Failed to delete item. Reason:",
127
- deletedItemMessage: "This item has been deleted."
128
- };
129
- var en_default = getLocalization(enLabels);
130
-
131
- // src/toolpad-core/AppProvider/LocalizationProvider.tsx
132
- import { jsx } from "react/jsx-runtime";
133
- var LocalizationContext = React3.createContext({});
134
- var LocalizationProvider = function LocalizationProvider2(props) {
135
- var _a, _b, _c;
136
- const { localeText: propsLocaleText, children } = props;
137
- const theme = useTheme();
138
- 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;
139
- const defaultLocaleText3 = en_default.components.MuiLocalizationProvider.defaultProps.localeText;
140
- const localeText = React3.useMemo(
141
- () => __spreadValues(__spreadValues(__spreadValues({}, defaultLocaleText3), themeLocaleText), propsLocaleText),
142
- [defaultLocaleText3, themeLocaleText, propsLocaleText]
143
- );
144
- return /* @__PURE__ */ jsx(LocalizationContext.Provider, { value: localeText, children });
145
- };
146
- LocalizationProvider.propTypes = {
147
- // ┌────────────────────────────── Warning ──────────────────────────────┐
148
- // │ These PropTypes are generated from the TypeScript type definitions. │
149
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
150
- // └─────────────────────────────────────────────────────────────────────┘
151
- /**
152
- * @ignore
153
- */
154
- children: PropTypes.node,
155
- /**
156
- * Locale for components texts
157
- */
158
- localeText: PropTypes.object
159
- };
160
- function useLocaleText() {
161
- return React3.useContext(LocalizationContext);
162
- }
163
-
164
- // src/toolpad-core/useNotifications/NotificationsProvider.tsx
165
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
166
- var RootPropsContext = React4.createContext(null);
167
- var defaultLocaleText = {
168
- close: "Close"
169
- };
170
- function Notification({ notificationKey, open, message, options, badge }) {
171
- var _a, _b, _c;
172
- const globalLocaleText = useLocaleText();
173
- const localeText = __spreadValues(__spreadValues({}, defaultLocaleText), globalLocaleText);
174
- const { close } = useNonNullableContext(NotificationsContext);
175
- const { severity, actionText, onAction, autoHideDuration } = options;
176
- const handleClose = React4.useCallback(
177
- (event, reason) => {
178
- if (reason === "clickaway") {
179
- return;
180
- }
181
- close(notificationKey);
182
- },
183
- [notificationKey, close]
184
- );
185
- const action = /* @__PURE__ */ jsxs(React4.Fragment, { children: [
186
- onAction ? /* @__PURE__ */ jsx2(Button, { color: "inherit", size: "small", onClick: onAction, children: actionText != null ? actionText : "Action" }) : null,
187
- /* @__PURE__ */ jsx2(
188
- IconButton,
189
- {
190
- size: "small",
191
- "aria-label": localeText == null ? void 0 : localeText.close,
192
- title: localeText == null ? void 0 : localeText.close,
193
- color: "inherit",
194
- onClick: handleClose,
195
- children: /* @__PURE__ */ jsx2(CloseIcon, { fontSize: "small" })
196
- }
197
- )
198
- ] });
199
- const props = React4.useContext(RootPropsContext);
200
- const SnackbarComponent = (_b = (_a = props == null ? void 0 : props.slots) == null ? void 0 : _a.snackbar) != null ? _b : Snackbar;
201
- const snackbarSlotProps = useSlotProps({
202
- elementType: SnackbarComponent,
203
- ownerState: props,
204
- externalSlotProps: (_c = props == null ? void 0 : props.slotProps) == null ? void 0 : _c.snackbar,
205
- additionalProps: {
206
- open,
207
- autoHideDuration,
208
- onClose: handleClose,
209
- action
210
- }
211
- });
212
- return /* @__PURE__ */ jsx2(SnackbarComponent, __spreadProps(__spreadValues({}, snackbarSlotProps), { children: /* @__PURE__ */ jsx2(Badge, { badgeContent: badge, color: "primary", sx: { width: "100%" }, children: severity ? /* @__PURE__ */ jsx2(Alert, { severity, sx: { width: "100%" }, action, children: message }) : /* @__PURE__ */ jsx2(SnackbarContent, { message, action }) }) }), notificationKey);
213
- }
214
- function Notifications({ state }) {
215
- var _a;
216
- const currentNotification = (_a = state.queue[0]) != null ? _a : null;
217
- return currentNotification ? /* @__PURE__ */ jsx2(
218
- Notification,
219
- __spreadProps(__spreadValues({}, currentNotification), {
220
- badge: state.queue.length > 1 ? String(state.queue.length) : null
221
- })
222
- ) : null;
223
- }
224
- var nextId = 0;
225
- var generateId = () => {
226
- const id = nextId;
227
- nextId += 1;
228
- return id;
229
- };
230
- function NotificationsProvider(props) {
231
- const { children } = props;
232
- const [state, setState] = React4.useState({ queue: [] });
233
- const show = React4.useCallback((message, options = {}) => {
234
- var _a;
235
- const notificationKey = (_a = options.key) != null ? _a : `::toolpad-internal::notification::${generateId()}`;
236
- setState((prev) => {
237
- if (prev.queue.some((n) => n.notificationKey === notificationKey)) {
238
- return prev;
239
- }
240
- return __spreadProps(__spreadValues({}, prev), {
241
- queue: [...prev.queue, { message, options, notificationKey, open: true }]
242
- });
243
- });
244
- return notificationKey;
245
- }, []);
246
- const close = React4.useCallback((key) => {
247
- setState((prev) => __spreadProps(__spreadValues({}, prev), {
248
- queue: prev.queue.filter((n) => n.notificationKey !== key)
249
- }));
250
- }, []);
251
- const contextValue = React4.useMemo(() => ({ show, close }), [show, close]);
252
- return /* @__PURE__ */ jsx2(RootPropsContext.Provider, { value: props, children: /* @__PURE__ */ jsxs(NotificationsContext.Provider, { value: contextValue, children: [
253
- children,
254
- /* @__PURE__ */ jsx2(Notifications, { state })
255
- ] }) });
256
- }
257
-
258
54
  // src/toolpad-core/useDialogs/useDialogs.tsx
259
- import Button2 from "@mui/material/Button";
55
+ import Button from "@mui/material/Button";
260
56
  import Dialog from "@mui/material/Dialog";
261
57
  import DialogTitle from "@mui/material/DialogTitle";
262
58
  import DialogContent from "@mui/material/DialogContent";
@@ -264,37 +60,17 @@ import DialogActions from "@mui/material/DialogActions";
264
60
  import TextField from "@mui/material/TextField";
265
61
  import DialogContentText from "@mui/material/DialogContentText";
266
62
  import invariant from "invariant";
267
- import * as React7 from "react";
63
+ import * as React2 from "react";
268
64
  import useEventCallback from "@mui/utils/useEventCallback";
269
-
270
- // src/toolpad-core/useDialogs/DialogsContext.tsx
271
- import * as React5 from "react";
272
- var DialogsContext = React5.createContext(null);
273
-
274
- // src/toolpad-core/shared/context.ts
275
- import * as React6 from "react";
276
- var BrandingContext = React6.createContext(null);
277
- var NavigationContext = React6.createContext([]);
278
- var PaletteModeContext = React6.createContext({
279
- paletteMode: "light",
280
- setPaletteMode: () => {
281
- },
282
- isDualTheme: false
283
- });
284
- var RouterContext = React6.createContext(null);
285
- var DashboardSidebarPageItemContext = React6.createContext(null);
286
- var WindowContext = React6.createContext(void 0);
287
-
288
- // src/toolpad-core/useDialogs/useDialogs.tsx
289
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
290
- var defaultLocaleText2 = {
65
+ import { jsx, jsxs } from "react/jsx-runtime";
66
+ var defaultLocaleText = {
291
67
  alert: "Alert",
292
68
  confirm: "Confirm",
293
69
  cancel: "Cancel",
294
70
  ok: "Ok"
295
71
  };
296
72
  function useDialogLoadingButton(onClose) {
297
- const [loading, setLoading] = React7.useState(false);
73
+ const [loading, setLoading] = React2.useState(false);
298
74
  const handleClick = async () => {
299
75
  try {
300
76
  setLoading(true);
@@ -310,11 +86,11 @@ function useDialogLoadingButton(onClose) {
310
86
  }
311
87
  function AlertDialog({ open, payload, onClose }) {
312
88
  var _a, _b;
313
- const appWindowContext = React7.useContext(WindowContext);
89
+ const appWindowContext = React2.useContext(WindowContext);
314
90
  const globalLocaleText = useLocaleText();
315
- const localeText = __spreadValues(__spreadValues({}, defaultLocaleText2), globalLocaleText);
91
+ const localeText = __spreadValues(__spreadValues({}, defaultLocaleText), globalLocaleText);
316
92
  const okButtonProps = useDialogLoadingButton(() => onClose());
317
- return /* @__PURE__ */ jsxs2(
93
+ return /* @__PURE__ */ jsxs(
318
94
  Dialog,
319
95
  {
320
96
  maxWidth: "xs",
@@ -323,21 +99,21 @@ function AlertDialog({ open, payload, onClose }) {
323
99
  onClose: () => onClose(),
324
100
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
325
101
  children: [
326
- /* @__PURE__ */ jsx3(DialogTitle, { children: (_a = payload.title) != null ? _a : localeText.alert }),
327
- /* @__PURE__ */ jsx3(DialogContent, { children: payload.msg }),
328
- /* @__PURE__ */ jsx3(DialogActions, { children: /* @__PURE__ */ jsx3(Button2, __spreadProps(__spreadValues({ disabled: !open }, okButtonProps), { children: (_b = payload.okText) != null ? _b : localeText.ok })) })
102
+ /* @__PURE__ */ jsx(DialogTitle, { children: (_a = payload.title) != null ? _a : localeText.alert }),
103
+ /* @__PURE__ */ jsx(DialogContent, { children: payload.msg }),
104
+ /* @__PURE__ */ jsx(DialogActions, { children: /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({ disabled: !open }, okButtonProps), { children: (_b = payload.okText) != null ? _b : localeText.ok })) })
329
105
  ]
330
106
  }
331
107
  );
332
108
  }
333
109
  function ConfirmDialog({ open, payload, onClose }) {
334
110
  var _a, _b, _c;
335
- const appWindowContext = React7.useContext(WindowContext);
111
+ const appWindowContext = React2.useContext(WindowContext);
336
112
  const globalLocaleText = useLocaleText();
337
- const localeText = __spreadValues(__spreadValues({}, defaultLocaleText2), globalLocaleText);
113
+ const localeText = __spreadValues(__spreadValues({}, defaultLocaleText), globalLocaleText);
338
114
  const cancelButtonProps = useDialogLoadingButton(() => onClose(false));
339
115
  const okButtonProps = useDialogLoadingButton(() => onClose(true));
340
- return /* @__PURE__ */ jsxs2(
116
+ return /* @__PURE__ */ jsxs(
341
117
  Dialog,
342
118
  {
343
119
  maxWidth: "xs",
@@ -346,11 +122,11 @@ function ConfirmDialog({ open, payload, onClose }) {
346
122
  onClose: () => onClose(false),
347
123
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
348
124
  children: [
349
- /* @__PURE__ */ jsx3(DialogTitle, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
350
- /* @__PURE__ */ jsx3(DialogContent, { children: payload.msg }),
351
- /* @__PURE__ */ jsxs2(DialogActions, { children: [
352
- /* @__PURE__ */ jsx3(Button2, __spreadProps(__spreadValues({ autoFocus: true, disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
353
- /* @__PURE__ */ jsx3(Button2, __spreadProps(__spreadValues({ color: payload.severity, disabled: !open }, okButtonProps), { children: (_c = payload.okText) != null ? _c : localeText.ok }))
125
+ /* @__PURE__ */ jsx(DialogTitle, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
126
+ /* @__PURE__ */ jsx(DialogContent, { children: payload.msg }),
127
+ /* @__PURE__ */ jsxs(DialogActions, { children: [
128
+ /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({ autoFocus: true, disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
129
+ /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({ color: payload.severity, disabled: !open }, okButtonProps), { children: (_c = payload.okText) != null ? _c : localeText.ok }))
354
130
  ] })
355
131
  ]
356
132
  }
@@ -358,14 +134,14 @@ function ConfirmDialog({ open, payload, onClose }) {
358
134
  }
359
135
  function PromptDialog({ open, payload, onClose }) {
360
136
  var _a, _b, _c;
361
- const appWindowContext = React7.useContext(WindowContext);
137
+ const appWindowContext = React2.useContext(WindowContext);
362
138
  const globalLocaleText = useLocaleText();
363
- const localeText = __spreadValues(__spreadValues({}, defaultLocaleText2), globalLocaleText);
364
- const [input, setInput] = React7.useState("");
139
+ const localeText = __spreadValues(__spreadValues({}, defaultLocaleText), globalLocaleText);
140
+ const [input, setInput] = React2.useState("");
365
141
  const cancelButtonProps = useDialogLoadingButton(() => onClose(null));
366
- const [loading, setLoading] = React7.useState(false);
142
+ const [loading, setLoading] = React2.useState(false);
367
143
  const name = "input";
368
- return /* @__PURE__ */ jsxs2(
144
+ return /* @__PURE__ */ jsxs(
369
145
  Dialog,
370
146
  {
371
147
  maxWidth: "xs",
@@ -390,13 +166,13 @@ function PromptDialog({ open, payload, onClose }) {
390
166
  },
391
167
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
392
168
  children: [
393
- /* @__PURE__ */ jsx3(DialogTitle, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
394
- /* @__PURE__ */ jsxs2(DialogContent, { children: [
395
- /* @__PURE__ */ jsxs2(DialogContentText, { children: [
169
+ /* @__PURE__ */ jsx(DialogTitle, { children: (_a = payload.title) != null ? _a : localeText.confirm }),
170
+ /* @__PURE__ */ jsxs(DialogContent, { children: [
171
+ /* @__PURE__ */ jsxs(DialogContentText, { children: [
396
172
  payload.msg,
397
173
  " "
398
174
  ] }),
399
- /* @__PURE__ */ jsx3(
175
+ /* @__PURE__ */ jsx(
400
176
  TextField,
401
177
  {
402
178
  autoFocus: true,
@@ -412,9 +188,9 @@ function PromptDialog({ open, payload, onClose }) {
412
188
  }
413
189
  )
414
190
  ] }),
415
- /* @__PURE__ */ jsxs2(DialogActions, { children: [
416
- /* @__PURE__ */ jsx3(Button2, __spreadProps(__spreadValues({ disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
417
- /* @__PURE__ */ jsx3(Button2, { disabled: !open, loading, type: "submit", children: (_c = payload.okText) != null ? _c : localeText.ok })
191
+ /* @__PURE__ */ jsxs(DialogActions, { children: [
192
+ /* @__PURE__ */ jsx(Button, __spreadProps(__spreadValues({ disabled: !open }, cancelButtonProps), { children: (_b = payload.cancelText) != null ? _b : localeText.cancel })),
193
+ /* @__PURE__ */ jsx(Button, { disabled: !open, loading, type: "submit", children: (_c = payload.okText) != null ? _c : localeText.ok })
418
194
  ] })
419
195
  ]
420
196
  }
@@ -440,7 +216,7 @@ function useDialogs() {
440
216
  return open(PromptDialog, __spreadProps(__spreadValues({}, options), { msg }), { onClose });
441
217
  }
442
218
  );
443
- return React7.useMemo(
219
+ return React2.useMemo(
444
220
  () => ({
445
221
  alert,
446
222
  confirm,
@@ -452,467 +228,19 @@ function useDialogs() {
452
228
  );
453
229
  }
454
230
 
455
- // src/toolpad-core/useDialogs/DialogsProvider.tsx
456
- import invariant2 from "invariant";
457
- import * as React8 from "react";
458
- import useEventCallback2 from "@mui/utils/useEventCallback";
459
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
460
- function DialogsProvider(props) {
461
- const { children, unmountAfter = 1e3 } = props;
462
- const [stack, setStack] = React8.useState([]);
463
- const keyPrefix = React8.useId();
464
- const nextId2 = React8.useRef(0);
465
- const dialogMetadata = React8.useRef(/* @__PURE__ */ new WeakMap());
466
- const requestDialog = useEventCallback2(function open(Component, payload, options = {}) {
467
- const { onClose = async () => {
468
- } } = options;
469
- let resolve;
470
- const promise = new Promise((resolveImpl) => {
471
- resolve = resolveImpl;
472
- });
473
- invariant2(resolve, "resolve not set");
474
- const key = `${keyPrefix}-${nextId2.current}`;
475
- nextId2.current += 1;
476
- const newEntry = {
477
- key,
478
- open: true,
479
- promise,
480
- Component,
481
- payload,
482
- onClose,
483
- resolve
484
- };
485
- dialogMetadata.current.set(promise, newEntry);
486
- setStack((prevStack) => [...prevStack, newEntry]);
487
- return promise;
488
- });
489
- const closeDialogUi = useEventCallback2(function closeDialogUi2(dialog) {
490
- setStack(
491
- (prevStack) => prevStack.map((entry) => entry.promise === dialog ? __spreadProps(__spreadValues({}, entry), { open: false }) : entry)
492
- );
493
- setTimeout(() => {
494
- setStack((prevStack) => prevStack.filter((entry) => entry.promise !== dialog));
495
- }, unmountAfter);
496
- });
497
- const closeDialog = useEventCallback2(async function closeDialog2(dialog, result) {
498
- const entryToClose = dialogMetadata.current.get(dialog);
499
- invariant2(entryToClose, "dialog not found");
500
- try {
501
- await entryToClose.onClose(result);
502
- } finally {
503
- entryToClose.resolve(result);
504
- closeDialogUi(dialog);
505
- }
506
- return dialog;
507
- });
508
- const contextValue = React8.useMemo(
509
- () => ({ open: requestDialog, close: closeDialog }),
510
- [requestDialog, closeDialog]
511
- );
512
- return /* @__PURE__ */ jsxs3(DialogsContext.Provider, { value: contextValue, children: [
513
- children,
514
- stack.map(({ key, open, Component, payload, promise }) => /* @__PURE__ */ jsx4(
515
- Component,
516
- {
517
- payload,
518
- open,
519
- onClose: async (result) => {
520
- await closeDialog(promise, result);
521
- }
522
- },
523
- key
524
- ))
525
- ] });
526
- }
527
-
528
- // src/toolpad-core/AppProvider/AppThemeProvider.tsx
529
- import * as React10 from "react";
530
- import { useMediaQuery } from "@mui/material";
531
- import { ThemeProvider, useColorScheme } from "@mui/material/styles";
532
- import InitColorSchemeScript from "@mui/material/InitColorSchemeScript";
533
- import CssBaseline from "@mui/material/CssBaseline";
534
- import invariant3 from "invariant";
535
-
536
- // src/toolpad-core/persistence/useStorageState.tsx
537
- import * as React9 from "react";
538
-
539
- // src/toolpad-core/persistence/codec.tsx
540
- var CODEC_STRING = {
541
- parse: (value) => value,
542
- stringify: (value) => value
543
- };
544
-
545
- // src/toolpad-core/persistence/useStorageState.tsx
546
- var currentTabChangeListeners = /* @__PURE__ */ new Map();
547
- function onCurrentTabStorageChange(key, handler) {
548
- let listeners = currentTabChangeListeners.get(key);
549
- if (!listeners) {
550
- listeners = /* @__PURE__ */ new Set();
551
- currentTabChangeListeners.set(key, listeners);
552
- }
553
- listeners.add(handler);
554
- }
555
- function offCurrentTabStorageChange(key, handler) {
556
- const listeners = currentTabChangeListeners.get(key);
557
- if (!listeners) {
558
- return;
559
- }
560
- listeners.delete(handler);
561
- if (listeners.size === 0) {
562
- currentTabChangeListeners.delete(key);
563
- }
564
- }
565
- function emitCurrentTabStorageChange(key) {
566
- const listeners = currentTabChangeListeners.get(key);
567
- if (listeners) {
568
- listeners.forEach((listener) => listener());
569
- }
570
- }
571
- if (typeof window !== "undefined") {
572
- const origSetItem = window.localStorage.setItem;
573
- window.localStorage.setItem = function setItem(key, value) {
574
- const result = origSetItem.call(this, key, value);
575
- emitCurrentTabStorageChange(key);
576
- return result;
577
- };
578
- }
579
- function subscribe(area, key, callback) {
580
- if (!key) {
581
- return () => {
582
- };
583
- }
584
- const storageHandler = (event) => {
585
- if (event.storageArea === area && event.key === key) {
586
- callback();
587
- }
588
- };
589
- window.addEventListener("storage", storageHandler);
590
- onCurrentTabStorageChange(key, callback);
591
- return () => {
592
- window.removeEventListener("storage", storageHandler);
593
- offCurrentTabStorageChange(key, callback);
594
- };
595
- }
596
- function getSnapshot(area, key) {
597
- if (!key) {
598
- return null;
599
- }
600
- try {
601
- return area.getItem(key);
602
- } catch (e) {
603
- return null;
604
- }
605
- }
606
- function setValue(area, key, value) {
607
- if (!key) {
608
- return;
609
- }
610
- try {
611
- if (value === null) {
612
- area.removeItem(key);
613
- } else {
614
- area.setItem(key, String(value));
615
- }
616
- } catch (e) {
617
- return;
618
- }
619
- emitCurrentTabStorageChange(key);
620
- }
621
- var serverValue = [null, () => {
622
- }];
623
- function useStorageStateServer() {
624
- return serverValue;
625
- }
626
- function encode(codec, value) {
627
- return value === null ? null : codec.stringify(value);
628
- }
629
- function decode(codec, value) {
630
- return value === null ? null : codec.parse(value);
631
- }
632
- var getKeyServerSnapshot = () => null;
633
- function useStorageState(area, key, initializer = null, options) {
634
- var _a;
635
- const codec = (_a = options == null ? void 0 : options.codec) != null ? _a : CODEC_STRING;
636
- const [initialValue] = React9.useState(initializer);
637
- const encodedInitialValue = React9.useMemo(
638
- () => encode(codec, initialValue),
639
- [codec, initialValue]
640
- );
641
- const subscribeKey = React9.useCallback(
642
- (callback) => subscribe(area, key, callback),
643
- [area, key]
644
- );
645
- const getKeySnapshot = React9.useCallback(
646
- () => {
647
- var _a2;
648
- return (_a2 = getSnapshot(area, key)) != null ? _a2 : encodedInitialValue;
649
- },
650
- [area, encodedInitialValue, key]
651
- );
652
- const encodedStoredValue = React9.useSyncExternalStore(
653
- subscribeKey,
654
- getKeySnapshot,
655
- getKeyServerSnapshot
656
- );
657
- const storedValue = React9.useMemo(
658
- () => decode(codec, encodedStoredValue),
659
- [codec, encodedStoredValue]
660
- );
661
- const setStoredValue = React9.useCallback(
662
- (value) => {
663
- const valueToStore = value instanceof Function ? value(storedValue) : value;
664
- const encodedValueToStore = encode(codec, valueToStore);
665
- setValue(area, key, encodedValueToStore);
666
- },
667
- [area, codec, storedValue, key]
668
- );
669
- const [nonStoredValue, setNonStoredValue] = React9.useState(initialValue);
670
- if (!key) {
671
- return [nonStoredValue, setNonStoredValue];
672
- }
673
- return [storedValue, setStoredValue];
674
- }
675
-
676
- // src/toolpad-core/useLocalStorageState/useLocalStorageState.tsx
677
- var useLocalStorageStateBrowser = (...args) => useStorageState(window.localStorage, ...args);
678
- var useLocalStorageState = typeof window === "undefined" ? useStorageStateServer : useLocalStorageStateBrowser;
679
-
680
- // src/toolpad-core/AppProvider/AppThemeProvider.tsx
681
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
682
- var COLOR_SCHEME_STORAGE_KEY = "toolpad-color-scheme";
683
- var MODE_STORAGE_KEY = "toolpad-mode";
684
- function usePreferredMode(window2) {
685
- const prefersDarkMode = useMediaQuery(
686
- "(prefers-color-scheme: dark)",
687
- window2 && {
688
- matchMedia: window2.matchMedia
689
- }
690
- );
691
- return prefersDarkMode ? "dark" : "light";
692
- }
693
- function isCssVarsTheme(theme) {
694
- return "vars" in theme;
695
- }
696
- function LegacyThemeProvider(props) {
697
- const { children, theme, window: appWindow } = props;
698
- invariant3(!isCssVarsTheme(theme), "This provider only accepts legacy themes.");
699
- const isDualTheme = "light" in theme || "dark" in theme;
700
- const preferredMode = usePreferredMode(appWindow);
701
- const [userMode, setUserMode] = useLocalStorageState(MODE_STORAGE_KEY, "system");
702
- const paletteMode = !userMode || userMode === "system" ? preferredMode : userMode;
703
- const dualAwareTheme = React10.useMemo(
704
- () => {
705
- var _a;
706
- return isDualTheme ? (_a = theme[paletteMode === "dark" ? "dark" : "light"]) != null ? _a : theme[paletteMode === "dark" ? "light" : "dark"] : theme;
707
- },
708
- [isDualTheme, paletteMode, theme]
709
- );
710
- const paletteModeContextValue = React10.useMemo(
711
- () => ({
712
- paletteMode,
713
- setPaletteMode: setUserMode,
714
- isDualTheme
715
- }),
716
- [isDualTheme, paletteMode, setUserMode]
717
- );
718
- return /* @__PURE__ */ jsx5(ThemeProvider, { theme: dualAwareTheme, children: /* @__PURE__ */ jsxs4(PaletteModeContext.Provider, { value: paletteModeContextValue, children: [
719
- /* @__PURE__ */ jsx5(CssBaseline, { enableColorScheme: true }),
720
- children
721
- ] }) });
722
- }
723
- function CssVarsPaletteModeProvider(props) {
724
- const { children, window: appWindow } = props;
725
- const preferredMode = usePreferredMode(appWindow);
726
- const { mode, setMode, allColorSchemes } = useColorScheme();
727
- const paletteModeContextValue = React10.useMemo(() => {
728
- return {
729
- paletteMode: !mode || mode === "system" ? preferredMode : mode,
730
- setPaletteMode: setMode,
731
- isDualTheme: allColorSchemes.length > 1
732
- };
733
- }, [allColorSchemes, mode, preferredMode, setMode]);
734
- return /* @__PURE__ */ jsx5(PaletteModeContext.Provider, { value: paletteModeContextValue, children });
735
- }
736
- function CssVarsThemeProvider(props) {
737
- const { children, theme, window: appWindow, nonce } = props;
738
- invariant3(isCssVarsTheme(theme), "This provider only accepts CSS vars themes.");
739
- return /* @__PURE__ */ jsxs4(
740
- ThemeProvider,
741
- {
742
- theme,
743
- documentNode: appWindow == null ? void 0 : appWindow.document,
744
- colorSchemeNode: appWindow == null ? void 0 : appWindow.document.documentElement,
745
- disableNestedContext: true,
746
- colorSchemeStorageKey: COLOR_SCHEME_STORAGE_KEY,
747
- modeStorageKey: MODE_STORAGE_KEY,
748
- children: [
749
- /* @__PURE__ */ jsx5(
750
- InitColorSchemeScript,
751
- {
752
- attribute: theme.colorSchemeSelector,
753
- colorSchemeStorageKey: COLOR_SCHEME_STORAGE_KEY,
754
- modeStorageKey: MODE_STORAGE_KEY,
755
- nonce
756
- }
757
- ),
758
- /* @__PURE__ */ jsxs4(CssVarsPaletteModeProvider, { window: appWindow, children: [
759
- /* @__PURE__ */ jsx5(CssBaseline, { enableColorScheme: true }),
760
- children
761
- ] })
762
- ]
763
- }
764
- );
765
- }
766
- function AppThemeProvider(props) {
767
- const _a = props, { children, theme } = _a, rest = __objRest(_a, ["children", "theme"]);
768
- const useCssVarsProvider = isCssVarsTheme(theme);
769
- return useCssVarsProvider ? /* @__PURE__ */ jsx5(CssVarsThemeProvider, __spreadProps(__spreadValues({ theme }, rest), { children })) : /* @__PURE__ */ jsx5(LegacyThemeProvider, __spreadProps(__spreadValues({ theme }, rest), { children }));
770
- }
771
-
772
- // src/toolpad-core/AppProvider/AppProvider.tsx
773
- import { jsx as jsx6 } from "react/jsx-runtime";
774
- var AuthenticationContext = React11.createContext(null);
775
- var SessionContext = React11.createContext(null);
776
- function createDefaultTheme() {
777
- return createTheme({
778
- cssVariables: {
779
- colorSchemeSelector: "data-toolpad-color-scheme"
780
- },
781
- colorSchemes: { dark: true }
782
- });
783
- }
784
- function AppProvider(props) {
785
- const {
786
- children,
787
- theme = createDefaultTheme(),
788
- branding = null,
789
- navigation = [],
790
- localeText,
791
- router = null,
792
- authentication = null,
793
- session = null,
794
- window: appWindow,
795
- nonce
796
- } = props;
797
- return /* @__PURE__ */ jsx6(WindowContext.Provider, { value: appWindow, children: /* @__PURE__ */ jsx6(AuthenticationContext.Provider, { value: authentication, children: /* @__PURE__ */ jsx6(SessionContext.Provider, { value: session, children: /* @__PURE__ */ jsx6(RouterContext.Provider, { value: router, children: /* @__PURE__ */ jsx6(AppThemeProvider, { theme, window: appWindow, nonce, children: /* @__PURE__ */ jsx6(LocalizationProvider, { localeText, children: /* @__PURE__ */ jsx6(NotificationsProvider, { children: /* @__PURE__ */ jsx6(DialogsProvider, { children: /* @__PURE__ */ jsx6(BrandingContext.Provider, { value: branding, children: /* @__PURE__ */ jsx6(NavigationContext.Provider, { value: navigation, children }) }) }) }) }) }) }) }) }) });
798
- }
799
- AppProvider.propTypes = {
800
- // ┌────────────────────────────── Warning ──────────────────────────────┐
801
- // │ These PropTypes are generated from the TypeScript type definitions. │
802
- // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
803
- // └─────────────────────────────────────────────────────────────────────┘
804
- /**
805
- * Authentication methods.
806
- * @default null
807
- */
808
- authentication: PropTypes2.shape({
809
- signIn: PropTypes2.func.isRequired,
810
- signOut: PropTypes2.func.isRequired
811
- }),
812
- /**
813
- * Branding options for the app.
814
- * @default null
815
- */
816
- branding: PropTypes2.shape({
817
- homeUrl: PropTypes2.string,
818
- logo: PropTypes2.node,
819
- title: PropTypes2.string
820
- }),
821
- /**
822
- * The content of the app provider.
823
- */
824
- children: PropTypes2.node,
825
- /**
826
- * Locale text for components
827
- */
828
- localeText: PropTypes2.object,
829
- /**
830
- * Navigation definition for the app. [Find out more](https://mui.com/toolpad/core/react-app-provider/#navigation).
831
- * @default []
832
- */
833
- navigation: PropTypes2.arrayOf(
834
- PropTypes2.oneOfType([
835
- PropTypes2.shape({
836
- action: PropTypes2.node,
837
- children: PropTypes2.arrayOf(
838
- PropTypes2.oneOfType([
839
- PropTypes2.object,
840
- PropTypes2.shape({
841
- kind: PropTypes2.oneOf(["header"]).isRequired,
842
- title: PropTypes2.string.isRequired
843
- }),
844
- PropTypes2.shape({
845
- kind: PropTypes2.oneOf(["divider"]).isRequired
846
- })
847
- ]).isRequired
848
- ),
849
- icon: PropTypes2.node,
850
- kind: PropTypes2.oneOf(["page"]),
851
- pattern: PropTypes2.string,
852
- segment: PropTypes2.string,
853
- title: PropTypes2.string
854
- }),
855
- PropTypes2.shape({
856
- kind: PropTypes2.oneOf(["header"]).isRequired,
857
- title: PropTypes2.string.isRequired
858
- }),
859
- PropTypes2.shape({
860
- kind: PropTypes2.oneOf(["divider"]).isRequired
861
- })
862
- ]).isRequired
863
- ),
864
- /**
865
- * The nonce to be used for inline scripts.
866
- */
867
- nonce: PropTypes2.string,
868
- /**
869
- * Router implementation used inside Toolpad components.
870
- * @default null
871
- */
872
- router: PropTypes2.shape({
873
- Link: PropTypes2.elementType,
874
- navigate: PropTypes2.func.isRequired,
875
- pathname: PropTypes2.string.isRequired,
876
- searchParams: PropTypes2.instanceOf(URLSearchParams).isRequired
877
- }),
878
- /**
879
- * Session info about the current user.
880
- * @default null
881
- */
882
- session: PropTypes2.shape({
883
- user: PropTypes2.shape({
884
- email: PropTypes2.string,
885
- id: PropTypes2.string,
886
- image: PropTypes2.string,
887
- name: PropTypes2.string
888
- })
889
- }),
890
- /**
891
- * [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.
892
- * @default createDefaultTheme()
893
- */
894
- theme: PropTypes2.object,
895
- /**
896
- * The window where the application is rendered.
897
- * This is needed when rendering the app inside an iframe, for example.
898
- * @default window
899
- */
900
- window: PropTypes2.object
901
- };
902
-
903
231
  // src/toolpad-core/Account/AccountLocaleContext.tsx
904
- import * as React12 from "react";
905
- var AccountLocaleContext = React12.createContext(null);
232
+ import * as React3 from "react";
233
+ var AccountLocaleContext = React3.createContext(null);
906
234
 
907
235
  // src/toolpad-core/Account/SignInButton.tsx
908
- import { jsx as jsx7 } from "react/jsx-runtime";
236
+ import { jsx as jsx2 } from "react/jsx-runtime";
909
237
  function SignInButton(props) {
910
- const authentication = React13.useContext(AuthenticationContext);
238
+ const authentication = React4.useContext(AuthenticationContext);
911
239
  const globalLocaleText = useLocaleText();
912
- const accountLocaleText = React13.useContext(AccountLocaleContext);
240
+ const accountLocaleText = React4.useContext(AccountLocaleContext);
913
241
  const localeText = __spreadValues(__spreadValues({}, globalLocaleText), accountLocaleText);
914
- return /* @__PURE__ */ jsx7(
915
- Button3,
242
+ return /* @__PURE__ */ jsx2(
243
+ Button2,
916
244
  __spreadProps(__spreadValues({
917
245
  disableElevation: true,
918
246
  variant: "contained",
@@ -941,22 +269,22 @@ SignInButton.propTypes = {
941
269
  /**
942
270
  * The content of the component.
943
271
  */
944
- children: PropTypes3.node
272
+ children: PropTypes.node
945
273
  };
946
274
 
947
275
  // src/toolpad-core/Account/SignOutButton.tsx
948
- import * as React14 from "react";
949
- import PropTypes4 from "prop-types";
950
- import Button4 from "@mui/material/Button";
276
+ import * as React5 from "react";
277
+ import PropTypes2 from "prop-types";
278
+ import Button3 from "@mui/material/Button";
951
279
  import LogoutIcon from "@mui/icons-material/Logout";
952
- import { jsx as jsx8 } from "react/jsx-runtime";
280
+ import { jsx as jsx3 } from "react/jsx-runtime";
953
281
  function SignOutButton(props) {
954
- const authentication = React14.useContext(AuthenticationContext);
282
+ const authentication = React5.useContext(AuthenticationContext);
955
283
  const globalLocaleText = useLocaleText();
956
- const accountLocaleText = React14.useContext(AccountLocaleContext);
284
+ const accountLocaleText = React5.useContext(AccountLocaleContext);
957
285
  const localeText = __spreadValues(__spreadValues({}, globalLocaleText), accountLocaleText);
958
- return /* @__PURE__ */ jsx8(
959
- Button4,
286
+ return /* @__PURE__ */ jsx3(
287
+ Button3,
960
288
  __spreadProps(__spreadValues({
961
289
  disabled: !authentication,
962
290
  variant: "outlined",
@@ -972,7 +300,7 @@ function SignOutButton(props) {
972
300
  filter: "opacity(1)"
973
301
  }
974
302
  },
975
- startIcon: /* @__PURE__ */ jsx8(LogoutIcon, {})
303
+ startIcon: /* @__PURE__ */ jsx3(LogoutIcon, {})
976
304
  }, props), {
977
305
  children: localeText == null ? void 0 : localeText.accountSignOutLabel
978
306
  })
@@ -986,30 +314,30 @@ SignOutButton.propTypes = {
986
314
  /**
987
315
  * The content of the component.
988
316
  */
989
- children: PropTypes4.node
317
+ children: PropTypes2.node
990
318
  };
991
319
 
992
320
  // src/toolpad-core/Account/AccountPreview.tsx
993
- import * as React15 from "react";
994
- import PropTypes5 from "prop-types";
321
+ import * as React6 from "react";
322
+ import PropTypes3 from "prop-types";
995
323
  import Avatar from "@mui/material/Avatar";
996
324
  import Typography from "@mui/material/Typography";
997
325
  import Tooltip from "@mui/material/Tooltip";
998
326
  import Stack from "@mui/material/Stack";
999
- import IconButton2 from "@mui/material/IconButton";
327
+ import IconButton from "@mui/material/IconButton";
1000
328
  import MoreVertIcon from "@mui/icons-material/MoreVert";
1001
- import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
329
+ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
1002
330
  function AccountPreview(props) {
1003
331
  var _a, _b, _c, _d, _e, _f, _g, _h;
1004
332
  const { slots, variant = "condensed", slotProps, open, handleClick, sx } = props;
1005
- const session = React15.useContext(SessionContext);
333
+ const session = React6.useContext(SessionContext);
1006
334
  const globalLocaleText = useLocaleText();
1007
- const accountLocaleText = React15.useContext(AccountLocaleContext);
335
+ const accountLocaleText = React6.useContext(AccountLocaleContext);
1008
336
  const localeText = __spreadValues(__spreadValues({}, globalLocaleText), accountLocaleText);
1009
337
  if (!session || !session.user) {
1010
338
  return null;
1011
339
  }
1012
- const avatarContent = (slots == null ? void 0 : slots.avatar) ? /* @__PURE__ */ jsx9(slots.avatar, {}) : /* @__PURE__ */ jsx9(
340
+ const avatarContent = (slots == null ? void 0 : slots.avatar) ? /* @__PURE__ */ jsx4(slots.avatar, {}) : /* @__PURE__ */ jsx4(
1013
341
  Avatar,
1014
342
  __spreadValues({
1015
343
  src: ((_a = session.user) == null ? void 0 : _a.image) || "",
@@ -1018,28 +346,28 @@ function AccountPreview(props) {
1018
346
  }, slotProps == null ? void 0 : slotProps.avatar)
1019
347
  );
1020
348
  if (variant === "expanded") {
1021
- return /* @__PURE__ */ jsxs5(Stack, { direction: "row", justifyContent: "space-between", sx: __spreadValues({ py: 1, px: 2, gap: 2 }, sx), children: [
1022
- /* @__PURE__ */ jsxs5(Stack, { direction: "row", justifyContent: "flex-start", spacing: 2, overflow: "hidden", children: [
349
+ return /* @__PURE__ */ jsxs2(Stack, { direction: "row", justifyContent: "space-between", sx: __spreadValues({ py: 1, px: 2, gap: 2 }, sx), children: [
350
+ /* @__PURE__ */ jsxs2(Stack, { direction: "row", justifyContent: "flex-start", spacing: 2, overflow: "hidden", children: [
1023
351
  avatarContent,
1024
- /* @__PURE__ */ jsxs5(Stack, { direction: "column", justifyContent: "space-evenly", overflow: "hidden", children: [
1025
- /* @__PURE__ */ jsx9(Typography, { variant: "body2", fontWeight: "bolder", noWrap: true, children: (_d = session.user) == null ? void 0 : _d.name }),
1026
- /* @__PURE__ */ jsx9(Typography, { variant: "caption", noWrap: true, children: (_e = session.user) == null ? void 0 : _e.email })
352
+ /* @__PURE__ */ jsxs2(Stack, { direction: "column", justifyContent: "space-evenly", overflow: "hidden", children: [
353
+ /* @__PURE__ */ jsx4(Typography, { variant: "body2", fontWeight: "bolder", noWrap: true, children: (_d = session.user) == null ? void 0 : _d.name }),
354
+ /* @__PURE__ */ jsx4(Typography, { variant: "caption", noWrap: true, children: (_e = session.user) == null ? void 0 : _e.email })
1027
355
  ] })
1028
356
  ] }),
1029
- handleClick && ((slots == null ? void 0 : slots.moreIconButton) ? /* @__PURE__ */ jsx9(slots.moreIconButton, {}) : /* @__PURE__ */ jsx9(
1030
- IconButton2,
357
+ handleClick && ((slots == null ? void 0 : slots.moreIconButton) ? /* @__PURE__ */ jsx4(slots.moreIconButton, {}) : /* @__PURE__ */ jsx4(
358
+ IconButton,
1031
359
  __spreadProps(__spreadValues({
1032
360
  size: "small",
1033
361
  onClick: handleClick
1034
362
  }, slotProps == null ? void 0 : slotProps.moreIconButton), {
1035
363
  sx: __spreadValues({ alignSelf: "center" }, (_f = slotProps == null ? void 0 : slotProps.moreIconButton) == null ? void 0 : _f.sx),
1036
- children: /* @__PURE__ */ jsx9(MoreVertIcon, { fontSize: "small" })
364
+ children: /* @__PURE__ */ jsx4(MoreVertIcon, { fontSize: "small" })
1037
365
  })
1038
366
  ))
1039
367
  ] });
1040
368
  }
1041
- return /* @__PURE__ */ jsx9(Tooltip, { title: (_g = session.user.name) != null ? _g : accountLocaleText == null ? void 0 : accountLocaleText.accountPreviewTitle, children: (slots == null ? void 0 : slots.avatarIconButton) ? /* @__PURE__ */ jsx9(slots.avatarIconButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.avatarIconButton)) : /* @__PURE__ */ jsx9(Stack, { sx: __spreadValues({ py: 0.5 }, sx), children: /* @__PURE__ */ jsx9(
1042
- IconButton2,
369
+ return /* @__PURE__ */ jsx4(Tooltip, { title: (_g = session.user.name) != null ? _g : accountLocaleText == null ? void 0 : accountLocaleText.accountPreviewTitle, children: (slots == null ? void 0 : slots.avatarIconButton) ? /* @__PURE__ */ jsx4(slots.avatarIconButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.avatarIconButton)) : /* @__PURE__ */ jsx4(Stack, { sx: __spreadValues({ py: 0.5 }, sx), children: /* @__PURE__ */ jsx4(
370
+ IconButton,
1043
371
  __spreadProps(__spreadValues({
1044
372
  onClick: handleClick,
1045
373
  "aria-label": localeText == null ? void 0 : localeText.accountPreviewIconButtonLabel,
@@ -1061,35 +389,35 @@ AccountPreview.propTypes = {
1061
389
  /**
1062
390
  * The handler used when the preview is expanded
1063
391
  */
1064
- handleClick: PropTypes5.func,
392
+ handleClick: PropTypes3.func,
1065
393
  /**
1066
394
  * The state of the Account popover
1067
395
  * @default false
1068
396
  */
1069
- open: PropTypes5.bool,
397
+ open: PropTypes3.bool,
1070
398
  /**
1071
399
  * The props used for each slot inside.
1072
400
  */
1073
- slotProps: PropTypes5.shape({
1074
- avatar: PropTypes5.object,
1075
- avatarIconButton: PropTypes5.object,
1076
- moreIconButton: PropTypes5.object
401
+ slotProps: PropTypes3.shape({
402
+ avatar: PropTypes3.object,
403
+ avatarIconButton: PropTypes3.object,
404
+ moreIconButton: PropTypes3.object
1077
405
  }),
1078
406
  /**
1079
407
  * The components used for each slot inside.
1080
408
  */
1081
- slots: PropTypes5.shape({
1082
- avatar: PropTypes5.elementType,
1083
- avatarIconButton: PropTypes5.elementType,
1084
- moreIconButton: PropTypes5.elementType
409
+ slots: PropTypes3.shape({
410
+ avatar: PropTypes3.elementType,
411
+ avatarIconButton: PropTypes3.elementType,
412
+ moreIconButton: PropTypes3.elementType
1085
413
  }),
1086
414
  /**
1087
415
  * The prop used to customize the styling of the preview
1088
416
  */
1089
- sx: PropTypes5.oneOfType([
1090
- PropTypes5.arrayOf(PropTypes5.oneOfType([PropTypes5.func, PropTypes5.object, PropTypes5.bool])),
1091
- PropTypes5.func,
1092
- PropTypes5.object
417
+ sx: PropTypes3.oneOfType([
418
+ PropTypes3.arrayOf(PropTypes3.oneOfType([PropTypes3.func, PropTypes3.object, PropTypes3.bool])),
419
+ PropTypes3.func,
420
+ PropTypes3.object
1093
421
  ]),
1094
422
  /**
1095
423
  * The type of account details to display.
@@ -1097,16 +425,16 @@ AccountPreview.propTypes = {
1097
425
  * @property {'expanded'} expanded - Displays the user's avatar, name, and email if available.
1098
426
  * @default 'condensed'
1099
427
  */
1100
- variant: PropTypes5.oneOf(["condensed", "expanded"])
428
+ variant: PropTypes3.oneOf(["condensed", "expanded"])
1101
429
  };
1102
430
 
1103
431
  // src/toolpad-core/Account/AccountPopoverHeader.tsx
1104
- import PropTypes6 from "prop-types";
432
+ import PropTypes4 from "prop-types";
1105
433
  import Stack2 from "@mui/material/Stack";
1106
- import { jsx as jsx10 } from "react/jsx-runtime";
434
+ import { jsx as jsx5 } from "react/jsx-runtime";
1107
435
  function AccountPopoverHeader(props) {
1108
436
  const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
1109
- return /* @__PURE__ */ jsx10(Stack2, __spreadProps(__spreadValues({}, rest), { children }));
437
+ return /* @__PURE__ */ jsx5(Stack2, __spreadProps(__spreadValues({}, rest), { children }));
1110
438
  }
1111
439
  AccountPopoverHeader.propTypes = {
1112
440
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -1116,16 +444,16 @@ AccountPopoverHeader.propTypes = {
1116
444
  /**
1117
445
  * The content of the component.
1118
446
  */
1119
- children: PropTypes6.node
447
+ children: PropTypes4.node
1120
448
  };
1121
449
 
1122
450
  // src/toolpad-core/Account/AccountPopoverFooter.tsx
1123
- import PropTypes7 from "prop-types";
451
+ import PropTypes5 from "prop-types";
1124
452
  import Box from "@mui/material/Box";
1125
- import { jsx as jsx11 } from "react/jsx-runtime";
453
+ import { jsx as jsx6 } from "react/jsx-runtime";
1126
454
  function AccountPopoverFooter(props) {
1127
455
  const _a = props, { children } = _a, rest = __objRest(_a, ["children"]);
1128
- return /* @__PURE__ */ jsx11(
456
+ return /* @__PURE__ */ jsx6(
1129
457
  Box,
1130
458
  __spreadProps(__spreadValues({}, rest), {
1131
459
  sx: __spreadValues({ display: "flex", flexDirection: "row", p: 1, justifyContent: "flex-end" }, rest.sx),
@@ -1141,19 +469,19 @@ AccountPopoverFooter.propTypes = {
1141
469
  /**
1142
470
  * @ignore
1143
471
  */
1144
- children: PropTypes7.node,
472
+ children: PropTypes5.node,
1145
473
  /**
1146
474
  * The system prop that allows defining system overrides as well as additional CSS styles.
1147
475
  */
1148
- sx: PropTypes7.oneOfType([
1149
- PropTypes7.arrayOf(PropTypes7.oneOfType([PropTypes7.func, PropTypes7.object, PropTypes7.bool])),
1150
- PropTypes7.func,
1151
- PropTypes7.object
476
+ sx: PropTypes5.oneOfType([
477
+ PropTypes5.arrayOf(PropTypes5.oneOfType([PropTypes5.func, PropTypes5.object, PropTypes5.bool])),
478
+ PropTypes5.func,
479
+ PropTypes5.object
1152
480
  ])
1153
481
  };
1154
482
 
1155
483
  // src/toolpad-core/Account/Account.tsx
1156
- import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
484
+ import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
1157
485
  var defaultAccountLocaleText = {
1158
486
  accountPreviewIconButtonLabel: "Current User",
1159
487
  accountPreviewTitle: "Account",
@@ -1164,14 +492,14 @@ function Account(props) {
1164
492
  var _a;
1165
493
  const { localeText: propsLocaleText } = props;
1166
494
  const globalLocaleText = useLocaleText();
1167
- const localeText = React16.useMemo(
495
+ const localeText = React7.useMemo(
1168
496
  () => __spreadValues(__spreadValues(__spreadValues({}, defaultAccountLocaleText), globalLocaleText), propsLocaleText),
1169
497
  [globalLocaleText, propsLocaleText]
1170
498
  );
1171
499
  const { slots, slotProps } = props;
1172
- const [anchorEl, setAnchorEl] = React16.useState(null);
1173
- const session = React16.useContext(SessionContext);
1174
- const authentication = React16.useContext(AuthenticationContext);
500
+ const [anchorEl, setAnchorEl] = React7.useState(null);
501
+ const session = React7.useContext(SessionContext);
502
+ const authentication = React7.useContext(AuthenticationContext);
1175
503
  const open = Boolean(anchorEl);
1176
504
  const handleClick = (event) => {
1177
505
  setAnchorEl(event.currentTarget);
@@ -1184,10 +512,10 @@ function Account(props) {
1184
512
  }
1185
513
  let accountContent = null;
1186
514
  if (!(session == null ? void 0 : session.user)) {
1187
- accountContent = (slots == null ? void 0 : slots.signInButton) ? /* @__PURE__ */ jsx12(slots.signInButton, { onClick: authentication.signIn }) : /* @__PURE__ */ jsx12(SignInButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signInButton));
515
+ accountContent = (slots == null ? void 0 : slots.signInButton) ? /* @__PURE__ */ jsx7(slots.signInButton, { onClick: authentication.signIn }) : /* @__PURE__ */ jsx7(SignInButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signInButton));
1188
516
  } else {
1189
- accountContent = /* @__PURE__ */ jsxs6(React16.Fragment, { children: [
1190
- (slots == null ? void 0 : slots.preview) ? /* @__PURE__ */ jsx12(slots.preview, { handleClick, open }) : /* @__PURE__ */ jsx12(
517
+ accountContent = /* @__PURE__ */ jsxs3(React7.Fragment, { children: [
518
+ (slots == null ? void 0 : slots.preview) ? /* @__PURE__ */ jsx7(slots.preview, { handleClick, open }) : /* @__PURE__ */ jsx7(
1191
519
  AccountPreview,
1192
520
  __spreadValues({
1193
521
  variant: "condensed",
@@ -1195,14 +523,14 @@ function Account(props) {
1195
523
  open
1196
524
  }, slotProps == null ? void 0 : slotProps.preview)
1197
525
  ),
1198
- (slots == null ? void 0 : slots.popover) ? /* @__PURE__ */ jsx12(
526
+ (slots == null ? void 0 : slots.popover) ? /* @__PURE__ */ jsx7(
1199
527
  slots.popover,
1200
528
  __spreadValues({
1201
529
  open,
1202
530
  onClick: handleClick,
1203
531
  onClose: handleClose
1204
532
  }, slotProps == null ? void 0 : slotProps.popover)
1205
- ) : /* @__PURE__ */ jsx12(
533
+ ) : /* @__PURE__ */ jsx7(
1206
534
  Popover,
1207
535
  __spreadProps(__spreadValues({
1208
536
  anchorEl,
@@ -1235,16 +563,16 @@ function Account(props) {
1235
563
  }
1236
564
  }
1237
565
  }, (_a = slotProps == null ? void 0 : slotProps.popover) == null ? void 0 : _a.slotProps),
1238
- children: (slots == null ? void 0 : slots.popoverContent) ? /* @__PURE__ */ jsx12(slots.popoverContent, __spreadValues({}, slotProps == null ? void 0 : slotProps.popoverContent)) : /* @__PURE__ */ jsxs6(Stack3, __spreadProps(__spreadValues({ direction: "column" }, slotProps == null ? void 0 : slotProps.popoverContent), { children: [
1239
- /* @__PURE__ */ jsx12(AccountPopoverHeader, { children: /* @__PURE__ */ jsx12(AccountPreview, { variant: "expanded" }) }),
1240
- /* @__PURE__ */ jsx12(Divider, {}),
1241
- /* @__PURE__ */ jsx12(AccountPopoverFooter, { children: /* @__PURE__ */ jsx12(SignOutButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signOutButton)) })
566
+ children: (slots == null ? void 0 : slots.popoverContent) ? /* @__PURE__ */ jsx7(slots.popoverContent, __spreadValues({}, slotProps == null ? void 0 : slotProps.popoverContent)) : /* @__PURE__ */ jsxs3(Stack3, __spreadProps(__spreadValues({ direction: "column" }, slotProps == null ? void 0 : slotProps.popoverContent), { children: [
567
+ /* @__PURE__ */ jsx7(AccountPopoverHeader, { children: /* @__PURE__ */ jsx7(AccountPreview, { variant: "expanded" }) }),
568
+ /* @__PURE__ */ jsx7(Divider, {}),
569
+ /* @__PURE__ */ jsx7(AccountPopoverFooter, { children: /* @__PURE__ */ jsx7(SignOutButton, __spreadValues({}, slotProps == null ? void 0 : slotProps.signOutButton)) })
1242
570
  ] }))
1243
571
  })
1244
572
  )
1245
573
  ] });
1246
574
  }
1247
- return /* @__PURE__ */ jsx12(AccountLocaleContext.Provider, { value: localeText, children: accountContent });
575
+ return /* @__PURE__ */ jsx7(AccountLocaleContext.Provider, { value: localeText, children: accountContent });
1248
576
  }
1249
577
  Account.propTypes = {
1250
578
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -1254,64 +582,64 @@ Account.propTypes = {
1254
582
  /**
1255
583
  * The labels for the account component.
1256
584
  */
1257
- localeText: PropTypes8.object,
585
+ localeText: PropTypes6.object,
1258
586
  /**
1259
587
  * The props used for each slot inside.
1260
588
  */
1261
- slotProps: PropTypes8.shape({
1262
- popover: PropTypes8.object,
1263
- popoverContent: PropTypes8.object,
1264
- preview: PropTypes8.shape({
1265
- handleClick: PropTypes8.func,
1266
- open: PropTypes8.bool,
1267
- slotProps: PropTypes8.shape({
1268
- avatar: PropTypes8.object,
1269
- avatarIconButton: PropTypes8.object,
1270
- moreIconButton: PropTypes8.object
589
+ slotProps: PropTypes6.shape({
590
+ popover: PropTypes6.object,
591
+ popoverContent: PropTypes6.object,
592
+ preview: PropTypes6.shape({
593
+ handleClick: PropTypes6.func,
594
+ open: PropTypes6.bool,
595
+ slotProps: PropTypes6.shape({
596
+ avatar: PropTypes6.object,
597
+ avatarIconButton: PropTypes6.object,
598
+ moreIconButton: PropTypes6.object
1271
599
  }),
1272
- slots: PropTypes8.shape({
1273
- avatar: PropTypes8.elementType,
1274
- avatarIconButton: PropTypes8.elementType,
1275
- moreIconButton: PropTypes8.elementType
600
+ slots: PropTypes6.shape({
601
+ avatar: PropTypes6.elementType,
602
+ avatarIconButton: PropTypes6.elementType,
603
+ moreIconButton: PropTypes6.elementType
1276
604
  }),
1277
- sx: PropTypes8.oneOfType([
1278
- PropTypes8.arrayOf(PropTypes8.oneOfType([PropTypes8.func, PropTypes8.object, PropTypes8.bool])),
1279
- PropTypes8.func,
1280
- PropTypes8.object
605
+ sx: PropTypes6.oneOfType([
606
+ PropTypes6.arrayOf(PropTypes6.oneOfType([PropTypes6.func, PropTypes6.object, PropTypes6.bool])),
607
+ PropTypes6.func,
608
+ PropTypes6.object
1281
609
  ]),
1282
- variant: PropTypes8.oneOf(["condensed", "expanded"])
610
+ variant: PropTypes6.oneOf(["condensed", "expanded"])
1283
611
  }),
1284
- signInButton: PropTypes8.object,
1285
- signOutButton: PropTypes8.object
612
+ signInButton: PropTypes6.object,
613
+ signOutButton: PropTypes6.object
1286
614
  }),
1287
615
  /**
1288
616
  * The components used for each slot inside.
1289
617
  */
1290
- slots: PropTypes8.shape({
1291
- popover: PropTypes8.elementType,
1292
- popoverContent: PropTypes8.elementType,
1293
- preview: PropTypes8.elementType,
1294
- signInButton: PropTypes8.elementType,
1295
- signOutButton: PropTypes8.elementType
618
+ slots: PropTypes6.shape({
619
+ popover: PropTypes6.elementType,
620
+ popoverContent: PropTypes6.elementType,
621
+ preview: PropTypes6.elementType,
622
+ signInButton: PropTypes6.elementType,
623
+ signOutButton: PropTypes6.elementType
1296
624
  })
1297
625
  };
1298
626
 
1299
627
  // src/toolpad-core/DashboardLayout/DashboardLayout.tsx
1300
- import * as React25 from "react";
1301
- import PropTypes11 from "prop-types";
1302
- import { useTheme as useTheme4 } from "@mui/material/styles";
1303
- import useMediaQuery2 from "@mui/material/useMediaQuery";
628
+ import * as React16 from "react";
629
+ import PropTypes9 from "prop-types";
630
+ import { useTheme as useTheme3 } from "@mui/material/styles";
631
+ import useMediaQuery from "@mui/material/useMediaQuery";
1304
632
  import Box4 from "@mui/material/Box";
1305
633
  import Drawer from "@mui/material/Drawer";
1306
634
  import Toolbar2 from "@mui/material/Toolbar";
1307
635
 
1308
636
  // src/toolpad-core/DashboardLayout/DashboardHeader.tsx
1309
- import * as React21 from "react";
1310
- import PropTypes9 from "prop-types";
637
+ import * as React12 from "react";
638
+ import PropTypes7 from "prop-types";
1311
639
  import { styled as styled2 } from "@mui/material/styles";
1312
640
  import Box2 from "@mui/material/Box";
1313
641
  import MuiAppBar from "@mui/material/AppBar";
1314
- import IconButton4 from "@mui/material/IconButton";
642
+ import IconButton3 from "@mui/material/IconButton";
1315
643
  import Toolbar from "@mui/material/Toolbar";
1316
644
  import Tooltip3 from "@mui/material/Tooltip";
1317
645
  import MenuIcon from "@mui/icons-material/Menu";
@@ -1321,15 +649,15 @@ import Stack6 from "@mui/material/Stack";
1321
649
  // src/toolpad-core/DashboardLayout/AppTitle.tsx
1322
650
  import Typography2 from "@mui/material/Typography";
1323
651
  import Stack4 from "@mui/material/Stack";
1324
- import { styled, useTheme as useTheme2 } from "@mui/material";
652
+ import { styled, useTheme } from "@mui/material";
1325
653
 
1326
654
  // src/toolpad-core/shared/Link.tsx
1327
- import * as React17 from "react";
1328
- import { jsx as jsx13 } from "react/jsx-runtime";
1329
- var DefaultLink = React17.forwardRef(function Link(props, ref) {
655
+ import * as React8 from "react";
656
+ import { jsx as jsx8 } from "react/jsx-runtime";
657
+ var DefaultLink = React8.forwardRef(function Link(props, ref) {
1330
658
  const _a = props, { children, href, onClick, history } = _a, rest = __objRest(_a, ["children", "href", "onClick", "history"]);
1331
- const routerContext = React17.useContext(RouterContext);
1332
- const handleLinkClick = React17.useMemo(() => {
659
+ const routerContext = React8.useContext(RouterContext);
660
+ const handleLinkClick = React8.useMemo(() => {
1333
661
  if (!routerContext) {
1334
662
  return onClick;
1335
663
  }
@@ -1340,25 +668,25 @@ var DefaultLink = React17.forwardRef(function Link(props, ref) {
1340
668
  onClick == null ? void 0 : onClick(event);
1341
669
  };
1342
670
  }, [routerContext, onClick, history]);
1343
- return /* @__PURE__ */ jsx13("a", __spreadProps(__spreadValues({ ref, href }, rest), { onClick: handleLinkClick, children }));
671
+ return /* @__PURE__ */ jsx8("a", __spreadProps(__spreadValues({ ref, href }, rest), { onClick: handleLinkClick, children }));
1344
672
  });
1345
- var Link2 = React17.forwardRef(function Link3(props, ref) {
673
+ var Link2 = React8.forwardRef(function Link3(props, ref) {
1346
674
  var _a;
1347
- const routerContext = React17.useContext(RouterContext);
675
+ const routerContext = React8.useContext(RouterContext);
1348
676
  const LinkComponent = (_a = routerContext == null ? void 0 : routerContext.Link) != null ? _a : DefaultLink;
1349
- return /* @__PURE__ */ jsx13(LinkComponent, __spreadProps(__spreadValues({ ref }, props), { children: props.children }));
677
+ return /* @__PURE__ */ jsx8(LinkComponent, __spreadProps(__spreadValues({ ref }, props), { children: props.children }));
1350
678
  });
1351
679
 
1352
680
  // src/toolpad-core/DashboardLayout/ToolpadLogo.tsx
1353
- import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
681
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1354
682
  function ToolpadLogo({ size = 40 }) {
1355
- return /* @__PURE__ */ jsxs7("svg", { width: size, height: size, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
1356
- /* @__PURE__ */ jsxs7("g", { mask: "url(#a)", children: [
1357
- /* @__PURE__ */ jsx14("path", { d: "M22.74 27.73v-7.6l6.64-3.79v7.6l-6.64 3.79Z", fill: "#007FFF" }),
1358
- /* @__PURE__ */ jsx14("path", { d: "M16.1 23.93v-7.59l6.64 3.8v7.59l-6.65-3.8Z", fill: "#39F" }),
1359
- /* @__PURE__ */ jsx14("path", { d: "m16.1 16.34 6.64-3.8 6.64 3.8-6.64 3.8-6.65-3.8Z", fill: "#A5D8FF" })
683
+ return /* @__PURE__ */ jsxs4("svg", { width: size, height: size, fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
684
+ /* @__PURE__ */ jsxs4("g", { mask: "url(#a)", children: [
685
+ /* @__PURE__ */ jsx9("path", { d: "M22.74 27.73v-7.6l6.64-3.79v7.6l-6.64 3.79Z", fill: "#007FFF" }),
686
+ /* @__PURE__ */ jsx9("path", { d: "M16.1 23.93v-7.59l6.64 3.8v7.59l-6.65-3.8Z", fill: "#39F" }),
687
+ /* @__PURE__ */ jsx9("path", { d: "m16.1 16.34 6.64-3.8 6.64 3.8-6.64 3.8-6.65-3.8Z", fill: "#A5D8FF" })
1360
688
  ] }),
1361
- /* @__PURE__ */ jsx14(
689
+ /* @__PURE__ */ jsx9(
1362
690
  "mask",
1363
691
  {
1364
692
  id: "b",
@@ -1370,7 +698,7 @@ function ToolpadLogo({ size = 40 }) {
1370
698
  y: "17",
1371
699
  width: "14",
1372
700
  height: "15",
1373
- children: /* @__PURE__ */ jsx14(
701
+ children: /* @__PURE__ */ jsx9(
1374
702
  "path",
1375
703
  {
1376
704
  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",
@@ -1379,12 +707,12 @@ function ToolpadLogo({ size = 40 }) {
1379
707
  )
1380
708
  }
1381
709
  ),
1382
- /* @__PURE__ */ jsxs7("g", { mask: "url(#b)", children: [
1383
- /* @__PURE__ */ jsx14("path", { d: "M15.14 32v-7.6l6.65-3.8v7.6L15.14 32Z", fill: "#007FFF" }),
1384
- /* @__PURE__ */ jsx14("path", { d: "M8.5 28.2v-7.6l6.64 3.8V32L8.5 28.2Z", fill: "#39F" }),
1385
- /* @__PURE__ */ jsx14("path", { d: "m8.5 20.6 6.64-3.79 6.65 3.8-6.65 3.8-6.64-3.8Z", fill: "#A5D8FF" })
710
+ /* @__PURE__ */ jsxs4("g", { mask: "url(#b)", children: [
711
+ /* @__PURE__ */ jsx9("path", { d: "M15.14 32v-7.6l6.65-3.8v7.6L15.14 32Z", fill: "#007FFF" }),
712
+ /* @__PURE__ */ jsx9("path", { d: "M8.5 28.2v-7.6l6.64 3.8V32L8.5 28.2Z", fill: "#39F" }),
713
+ /* @__PURE__ */ jsx9("path", { d: "m8.5 20.6 6.64-3.79 6.65 3.8-6.65 3.8-6.64-3.8Z", fill: "#A5D8FF" })
1386
714
  ] }),
1387
- /* @__PURE__ */ jsx14(
715
+ /* @__PURE__ */ jsx9(
1388
716
  "mask",
1389
717
  {
1390
718
  id: "c",
@@ -1396,7 +724,7 @@ function ToolpadLogo({ size = 40 }) {
1396
724
  y: "4",
1397
725
  width: "22",
1398
726
  height: "20",
1399
- children: /* @__PURE__ */ jsx14(
727
+ children: /* @__PURE__ */ jsx9(
1400
728
  "path",
1401
729
  {
1402
730
  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",
@@ -1405,24 +733,24 @@ function ToolpadLogo({ size = 40 }) {
1405
733
  )
1406
734
  }
1407
735
  ),
1408
- /* @__PURE__ */ jsxs7("g", { mask: "url(#c)", children: [
1409
- /* @__PURE__ */ jsx14("path", { d: "M15.14 23.46v-7.6L29.38 7.8v7.59l-14.24 8.07Z", fill: "#007FFF" }),
1410
- /* @__PURE__ */ jsx14("path", { d: "M8.5 19.66v-7.6l6.64 3.8v7.6l-6.64-3.8Z", fill: "#39F" }),
1411
- /* @__PURE__ */ jsx14("path", { d: "M8.5 12.07 22.74 4l6.64 3.8-14.24 8.06-6.64-3.8Z", fill: "#A5D8FF" })
736
+ /* @__PURE__ */ jsxs4("g", { mask: "url(#c)", children: [
737
+ /* @__PURE__ */ jsx9("path", { d: "M15.14 23.46v-7.6L29.38 7.8v7.59l-14.24 8.07Z", fill: "#007FFF" }),
738
+ /* @__PURE__ */ jsx9("path", { d: "M8.5 19.66v-7.6l6.64 3.8v7.6l-6.64-3.8Z", fill: "#39F" }),
739
+ /* @__PURE__ */ jsx9("path", { d: "M8.5 12.07 22.74 4l6.64 3.8-14.24 8.06-6.64-3.8Z", fill: "#A5D8FF" })
1412
740
  ] })
1413
741
  ] });
1414
742
  }
1415
743
 
1416
744
  // src/toolpad-core/shared/branding.ts
1417
- import * as React18 from "react";
745
+ import * as React9 from "react";
1418
746
  function useApplicationTitle() {
1419
747
  var _a;
1420
- const branding = React18.useContext(BrandingContext);
748
+ const branding = React9.useContext(BrandingContext);
1421
749
  return (_a = branding == null ? void 0 : branding.title) != null ? _a : "Toolpad";
1422
750
  }
1423
751
 
1424
752
  // src/toolpad-core/DashboardLayout/AppTitle.tsx
1425
- import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
753
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1426
754
  var LogoContainer = styled("div")({
1427
755
  position: "relative",
1428
756
  height: 40,
@@ -1434,12 +762,12 @@ var LogoContainer = styled("div")({
1434
762
  });
1435
763
  function AppTitle(props) {
1436
764
  var _a, _b, _c, _d, _e, _f, _g;
1437
- const theme = useTheme2();
765
+ const theme = useTheme();
1438
766
  const defaultTitle = useApplicationTitle();
1439
767
  const title = (_b = (_a = props == null ? void 0 : props.branding) == null ? void 0 : _a.title) != null ? _b : defaultTitle;
1440
- return /* @__PURE__ */ jsx15(Link2, { href: (_d = (_c = props == null ? void 0 : props.branding) == null ? void 0 : _c.homeUrl) != null ? _d : "/", style: { textDecoration: "none" }, children: /* @__PURE__ */ jsxs8(Stack4, { direction: "row", alignItems: "center", children: [
1441
- /* @__PURE__ */ jsx15(LogoContainer, { children: (_f = (_e = props == null ? void 0 : props.branding) == null ? void 0 : _e.logo) != null ? _f : /* @__PURE__ */ jsx15(ToolpadLogo, { size: 40 }) }),
1442
- /* @__PURE__ */ jsx15(
768
+ return /* @__PURE__ */ jsx10(Link2, { href: (_d = (_c = props == null ? void 0 : props.branding) == null ? void 0 : _c.homeUrl) != null ? _d : "/", style: { textDecoration: "none" }, children: /* @__PURE__ */ jsxs5(Stack4, { direction: "row", alignItems: "center", children: [
769
+ /* @__PURE__ */ jsx10(LogoContainer, { children: (_f = (_e = props == null ? void 0 : props.branding) == null ? void 0 : _e.logo) != null ? _f : /* @__PURE__ */ jsx10(ToolpadLogo, { size: 40 }) }),
770
+ /* @__PURE__ */ jsx10(
1443
771
  Typography2,
1444
772
  {
1445
773
  variant: "h6",
@@ -1460,54 +788,54 @@ function AppTitle(props) {
1460
788
  import Stack5 from "@mui/material/Stack";
1461
789
 
1462
790
  // src/toolpad-core/DashboardLayout/ThemeSwitcher.tsx
1463
- import * as React20 from "react";
1464
- import { useTheme as useTheme3 } from "@mui/material";
1465
- import IconButton3 from "@mui/material/IconButton";
791
+ import * as React11 from "react";
792
+ import { useTheme as useTheme2 } from "@mui/material";
793
+ import IconButton2 from "@mui/material/IconButton";
1466
794
  import Tooltip2 from "@mui/material/Tooltip";
1467
795
  import DarkModeIcon from "@mui/icons-material/DarkMode";
1468
796
  import LightModeIcon from "@mui/icons-material/LightMode";
1469
797
 
1470
798
  // src/toolpad-utils/hooks/useSsr.ts
1471
- import * as React19 from "react";
1472
- function subscribe2() {
799
+ import * as React10 from "react";
800
+ function subscribe() {
1473
801
  return () => {
1474
802
  };
1475
803
  }
1476
- function getSnapshot2() {
804
+ function getSnapshot() {
1477
805
  return false;
1478
806
  }
1479
807
  function getServerSnapshot() {
1480
808
  return true;
1481
809
  }
1482
810
  function useSsr() {
1483
- return React19.useSyncExternalStore(subscribe2, getSnapshot2, getServerSnapshot);
811
+ return React10.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1484
812
  }
1485
813
 
1486
814
  // src/toolpad-core/DashboardLayout/ThemeSwitcher.tsx
1487
- import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
815
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1488
816
  function ThemeSwitcher() {
1489
817
  var _a;
1490
818
  const isSsr = useSsr();
1491
- const theme = useTheme3();
1492
- const { paletteMode, setPaletteMode, isDualTheme } = React20.useContext(PaletteModeContext);
1493
- const toggleMode = React20.useCallback(() => {
819
+ const theme = useTheme2();
820
+ const { paletteMode, setPaletteMode, isDualTheme } = React11.useContext(PaletteModeContext);
821
+ const toggleMode = React11.useCallback(() => {
1494
822
  setPaletteMode(paletteMode === "dark" ? "light" : "dark");
1495
823
  }, [paletteMode, setPaletteMode]);
1496
- return isDualTheme ? /* @__PURE__ */ jsx16(
824
+ return isDualTheme ? /* @__PURE__ */ jsx11(
1497
825
  Tooltip2,
1498
826
  {
1499
827
  title: isSsr ? "Switch mode" : `${paletteMode === "dark" ? "Light" : "Dark"} mode`,
1500
828
  enterDelay: 1e3,
1501
- children: /* @__PURE__ */ jsx16("div", { children: /* @__PURE__ */ jsx16(
1502
- IconButton3,
829
+ children: /* @__PURE__ */ jsx11("div", { children: /* @__PURE__ */ jsx11(
830
+ IconButton2,
1503
831
  {
1504
832
  "aria-label": isSsr ? "Switch theme mode" : `Switch to ${paletteMode === "dark" ? "light" : "dark"} mode`,
1505
833
  onClick: toggleMode,
1506
834
  sx: {
1507
835
  color: ((_a = theme.vars) != null ? _a : theme).palette.primary.dark
1508
836
  },
1509
- children: theme.getColorSchemeSelector ? /* @__PURE__ */ jsxs9(React20.Fragment, { children: [
1510
- /* @__PURE__ */ jsx16(
837
+ children: theme.getColorSchemeSelector ? /* @__PURE__ */ jsxs6(React11.Fragment, { children: [
838
+ /* @__PURE__ */ jsx11(
1511
839
  DarkModeIcon,
1512
840
  {
1513
841
  sx: {
@@ -1518,7 +846,7 @@ function ThemeSwitcher() {
1518
846
  }
1519
847
  }
1520
848
  ),
1521
- /* @__PURE__ */ jsx16(
849
+ /* @__PURE__ */ jsx11(
1522
850
  LightModeIcon,
1523
851
  {
1524
852
  sx: {
@@ -1529,7 +857,7 @@ function ThemeSwitcher() {
1529
857
  }
1530
858
  }
1531
859
  )
1532
- ] }) : /* @__PURE__ */ jsx16(React20.Fragment, { children: isSsr || paletteMode !== "dark" ? /* @__PURE__ */ jsx16(DarkModeIcon, {}) : /* @__PURE__ */ jsx16(LightModeIcon, {}) })
860
+ ] }) : /* @__PURE__ */ jsx11(React11.Fragment, { children: isSsr || paletteMode !== "dark" ? /* @__PURE__ */ jsx11(DarkModeIcon, {}) : /* @__PURE__ */ jsx11(LightModeIcon, {}) })
1533
861
  }
1534
862
  ) })
1535
863
  }
@@ -1537,16 +865,16 @@ function ThemeSwitcher() {
1537
865
  }
1538
866
 
1539
867
  // src/toolpad-core/DashboardLayout/ToolbarActions.tsx
1540
- import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
868
+ import { jsx as jsx12, jsxs as jsxs7 } from "react/jsx-runtime";
1541
869
  function ToolbarActions() {
1542
- return /* @__PURE__ */ jsxs10(Stack5, { direction: "row", alignItems: "center", children: [
1543
- /* @__PURE__ */ jsx17(ThemeSwitcher, {}),
1544
- /* @__PURE__ */ jsx17(Account, {})
870
+ return /* @__PURE__ */ jsxs7(Stack5, { direction: "row", alignItems: "center", children: [
871
+ /* @__PURE__ */ jsx12(ThemeSwitcher, {}),
872
+ /* @__PURE__ */ jsx12(Account, {})
1545
873
  ] });
1546
874
  }
1547
875
 
1548
876
  // src/toolpad-core/DashboardLayout/DashboardHeader.tsx
1549
- import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
877
+ import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
1550
878
  var AppBar = styled2(MuiAppBar)(({ theme }) => {
1551
879
  var _a;
1552
880
  return {
@@ -1568,26 +896,26 @@ function DashboardHeader(props) {
1568
896
  slots,
1569
897
  slotProps
1570
898
  } = props;
1571
- const brandingContext = React21.useContext(BrandingContext);
899
+ const brandingContext = React12.useContext(BrandingContext);
1572
900
  const branding = __spreadValues(__spreadValues({}, brandingContext), brandingProp);
1573
- const handleMenuOpen = React21.useCallback(() => {
901
+ const handleMenuOpen = React12.useCallback(() => {
1574
902
  onToggleMenu(!menuOpen);
1575
903
  }, [menuOpen, onToggleMenu]);
1576
- const getMenuIcon = React21.useCallback(
904
+ const getMenuIcon = React12.useCallback(
1577
905
  (isExpanded) => {
1578
906
  const expandMenuActionText = "Expand";
1579
907
  const collapseMenuActionText = "Collapse";
1580
- return /* @__PURE__ */ jsx18(
908
+ return /* @__PURE__ */ jsx13(
1581
909
  Tooltip3,
1582
910
  {
1583
911
  title: `${isExpanded ? collapseMenuActionText : expandMenuActionText} menu`,
1584
912
  enterDelay: 1e3,
1585
- children: /* @__PURE__ */ jsx18("div", { children: /* @__PURE__ */ jsx18(
1586
- IconButton4,
913
+ children: /* @__PURE__ */ jsx13("div", { children: /* @__PURE__ */ jsx13(
914
+ IconButton3,
1587
915
  {
1588
916
  "aria-label": `${isExpanded ? collapseMenuActionText : expandMenuActionText} navigation menu`,
1589
917
  onClick: handleMenuOpen,
1590
- children: isExpanded ? /* @__PURE__ */ jsx18(MenuOpenIcon, {}) : /* @__PURE__ */ jsx18(MenuIcon, {})
918
+ children: isExpanded ? /* @__PURE__ */ jsx13(MenuOpenIcon, {}) : /* @__PURE__ */ jsx13(MenuIcon, {})
1591
919
  }
1592
920
  ) })
1593
921
  }
@@ -1597,7 +925,7 @@ function DashboardHeader(props) {
1597
925
  );
1598
926
  const ToolbarActionsSlot = (_a = slots == null ? void 0 : slots.toolbarActions) != null ? _a : ToolbarActions;
1599
927
  const ToolbarAccountSlot = (_b = slots == null ? void 0 : slots.toolbarAccount) != null ? _b : (() => null);
1600
- return /* @__PURE__ */ jsx18(AppBar, { color: "inherit", position: "absolute", sx: { displayPrint: "none" }, children: /* @__PURE__ */ jsx18(Toolbar, { sx: { backgroundColor: "inherit", mx: { xs: -0.75, sm: -1 } }, children: /* @__PURE__ */ jsxs11(
928
+ return /* @__PURE__ */ jsx13(AppBar, { color: "inherit", position: "absolute", sx: { displayPrint: "none" }, children: /* @__PURE__ */ jsx13(Toolbar, { sx: { backgroundColor: "inherit", mx: { xs: -0.75, sm: -1 } }, children: /* @__PURE__ */ jsxs8(
1601
929
  Stack6,
1602
930
  {
1603
931
  direction: "row",
@@ -1608,9 +936,9 @@ function DashboardHeader(props) {
1608
936
  width: "100%"
1609
937
  },
1610
938
  children: [
1611
- /* @__PURE__ */ jsxs11(Stack6, { direction: "row", children: [
1612
- !hideMenuButton ? /* @__PURE__ */ jsxs11(React21.Fragment, { children: [
1613
- /* @__PURE__ */ jsx18(
939
+ /* @__PURE__ */ jsxs8(Stack6, { direction: "row", children: [
940
+ !hideMenuButton ? /* @__PURE__ */ jsxs8(React12.Fragment, { children: [
941
+ /* @__PURE__ */ jsx13(
1614
942
  Box2,
1615
943
  {
1616
944
  sx: {
@@ -1620,7 +948,7 @@ function DashboardHeader(props) {
1620
948
  children: getMenuIcon(menuOpen)
1621
949
  }
1622
950
  ),
1623
- /* @__PURE__ */ jsx18(
951
+ /* @__PURE__ */ jsx13(
1624
952
  Box2,
1625
953
  {
1626
954
  sx: {
@@ -1631,18 +959,18 @@ function DashboardHeader(props) {
1631
959
  }
1632
960
  )
1633
961
  ] }) : null,
1634
- (slots == null ? void 0 : slots.appTitle) ? /* @__PURE__ */ jsx18(slots.appTitle, __spreadValues({}, slotProps == null ? void 0 : slotProps.appTitle)) : (
962
+ (slots == null ? void 0 : slots.appTitle) ? /* @__PURE__ */ jsx13(slots.appTitle, __spreadValues({}, slotProps == null ? void 0 : slotProps.appTitle)) : (
1635
963
  /* Hierarchy of application of `branding`
1636
964
  * 1. Branding prop passed in the `slotProps.appTitle`
1637
965
  * 2. Branding prop passed to the `DashboardLayout`
1638
966
  * 3. Branding prop passed to the `AppProvider`
1639
967
  */
1640
- /* @__PURE__ */ jsx18(AppTitle, __spreadValues({ branding }, slotProps == null ? void 0 : slotProps.appTitle))
968
+ /* @__PURE__ */ jsx13(AppTitle, __spreadValues({ branding }, slotProps == null ? void 0 : slotProps.appTitle))
1641
969
  )
1642
970
  ] }),
1643
- /* @__PURE__ */ jsxs11(Stack6, { direction: "row", alignItems: "center", spacing: 1, sx: { marginLeft: "auto" }, children: [
1644
- /* @__PURE__ */ jsx18(ToolbarActionsSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarActions)),
1645
- /* @__PURE__ */ jsx18(ToolbarAccountSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarAccount))
971
+ /* @__PURE__ */ jsxs8(Stack6, { direction: "row", alignItems: "center", spacing: 1, sx: { marginLeft: "auto" }, children: [
972
+ /* @__PURE__ */ jsx13(ToolbarActionsSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarActions)),
973
+ /* @__PURE__ */ jsx13(ToolbarAccountSlot, __spreadValues({}, slotProps == null ? void 0 : slotProps.toolbarAccount))
1646
974
  ] })
1647
975
  ]
1648
976
  }
@@ -1657,75 +985,75 @@ DashboardHeader.propTypes = {
1657
985
  * Branding options for the header.
1658
986
  * @default null
1659
987
  */
1660
- branding: PropTypes9.shape({
1661
- homeUrl: PropTypes9.string,
1662
- logo: PropTypes9.node,
1663
- title: PropTypes9.string
988
+ branding: PropTypes7.shape({
989
+ homeUrl: PropTypes7.string,
990
+ logo: PropTypes7.node,
991
+ title: PropTypes7.string
1664
992
  }),
1665
993
  /**
1666
994
  * Whether the menu icon should always be hidden.
1667
995
  * @default false
1668
996
  */
1669
- hideMenuButton: PropTypes9.bool,
997
+ hideMenuButton: PropTypes7.bool,
1670
998
  /**
1671
999
  * If `true`, show menu button as if menu is expanded, otherwise show it as if menu is collapsed.
1672
1000
  */
1673
- menuOpen: PropTypes9.bool.isRequired,
1001
+ menuOpen: PropTypes7.bool.isRequired,
1674
1002
  /**
1675
1003
  * Callback fired when the menu button is clicked.
1676
1004
  */
1677
- onToggleMenu: PropTypes9.func.isRequired,
1005
+ onToggleMenu: PropTypes7.func.isRequired,
1678
1006
  /**
1679
1007
  * The props used for each slot inside.
1680
1008
  * @default {}
1681
1009
  */
1682
- slotProps: PropTypes9.shape({
1683
- appTitle: PropTypes9.shape({
1684
- branding: PropTypes9.shape({
1685
- homeUrl: PropTypes9.string,
1686
- logo: PropTypes9.node,
1687
- title: PropTypes9.string
1010
+ slotProps: PropTypes7.shape({
1011
+ appTitle: PropTypes7.shape({
1012
+ branding: PropTypes7.shape({
1013
+ homeUrl: PropTypes7.string,
1014
+ logo: PropTypes7.node,
1015
+ title: PropTypes7.string
1688
1016
  })
1689
1017
  }),
1690
- toolbarAccount: PropTypes9.shape({
1691
- localeText: PropTypes9.object,
1692
- slotProps: PropTypes9.shape({
1693
- popover: PropTypes9.object,
1694
- popoverContent: PropTypes9.object,
1695
- preview: PropTypes9.object,
1696
- signInButton: PropTypes9.object,
1697
- signOutButton: PropTypes9.object
1018
+ toolbarAccount: PropTypes7.shape({
1019
+ localeText: PropTypes7.object,
1020
+ slotProps: PropTypes7.shape({
1021
+ popover: PropTypes7.object,
1022
+ popoverContent: PropTypes7.object,
1023
+ preview: PropTypes7.object,
1024
+ signInButton: PropTypes7.object,
1025
+ signOutButton: PropTypes7.object
1698
1026
  }),
1699
- slots: PropTypes9.shape({
1700
- popover: PropTypes9.elementType,
1701
- popoverContent: PropTypes9.elementType,
1702
- preview: PropTypes9.elementType,
1703
- signInButton: PropTypes9.elementType,
1704
- signOutButton: PropTypes9.elementType
1027
+ slots: PropTypes7.shape({
1028
+ popover: PropTypes7.elementType,
1029
+ popoverContent: PropTypes7.elementType,
1030
+ preview: PropTypes7.elementType,
1031
+ signInButton: PropTypes7.elementType,
1032
+ signOutButton: PropTypes7.elementType
1705
1033
  })
1706
1034
  }),
1707
- toolbarActions: PropTypes9.object
1035
+ toolbarActions: PropTypes7.object
1708
1036
  }),
1709
1037
  /**
1710
1038
  * The components used for each slot inside.
1711
1039
  * @default {}
1712
1040
  */
1713
- slots: PropTypes9.shape({
1714
- appTitle: PropTypes9.elementType,
1715
- toolbarAccount: PropTypes9.elementType,
1716
- toolbarActions: PropTypes9.elementType
1041
+ slots: PropTypes7.shape({
1042
+ appTitle: PropTypes7.elementType,
1043
+ toolbarAccount: PropTypes7.elementType,
1044
+ toolbarActions: PropTypes7.elementType
1717
1045
  })
1718
1046
  };
1719
1047
 
1720
1048
  // src/toolpad-core/DashboardLayout/DashboardSidebarSubNavigation.tsx
1721
- import * as React24 from "react";
1049
+ import * as React15 from "react";
1722
1050
  import Divider2 from "@mui/material/Divider";
1723
1051
  import List from "@mui/material/List";
1724
1052
  import ListSubheader from "@mui/material/ListSubheader";
1725
1053
 
1726
1054
  // src/toolpad-core/shared/navigation.tsx
1727
1055
  import { pathToRegexp } from "path-to-regexp";
1728
- import invariant4 from "invariant";
1056
+ import invariant2 from "invariant";
1729
1057
  var getItemKind = (item) => {
1730
1058
  var _a;
1731
1059
  return (_a = item.kind) != null ? _a : "page";
@@ -1811,7 +1139,7 @@ function matchPath(navigation, path) {
1811
1139
  function getItemPath(navigation, item) {
1812
1140
  const map = getItemToPathMap(navigation);
1813
1141
  const path = map.get(item);
1814
- invariant4(path, `Item not found in navigation: ${item.title}`);
1142
+ invariant2(path, `Item not found in navigation: ${item.title}`);
1815
1143
  return path;
1816
1144
  }
1817
1145
  function hasSelectedNavigationChildren(navigation, item, activePagePath) {
@@ -1845,15 +1173,15 @@ function getDrawerWidthTransitionMixin(isExpanded) {
1845
1173
  }
1846
1174
 
1847
1175
  // src/toolpad-core/useActivePage/useActivePage.ts
1848
- import * as React22 from "react";
1176
+ import * as React13 from "react";
1849
1177
  function useActivePage() {
1850
1178
  var _a;
1851
- const navigationContext = React22.useContext(NavigationContext);
1852
- const routerContext = React22.useContext(RouterContext);
1179
+ const navigationContext = React13.useContext(NavigationContext);
1180
+ const routerContext = React13.useContext(RouterContext);
1853
1181
  const pathname = (_a = routerContext == null ? void 0 : routerContext.pathname) != null ? _a : "/";
1854
1182
  const activeItem = matchPath(navigationContext, pathname);
1855
1183
  const rootItem = matchPath(navigationContext, "/");
1856
- return React22.useMemo(() => {
1184
+ return React13.useMemo(() => {
1857
1185
  if (!activeItem) {
1858
1186
  return null;
1859
1187
  }
@@ -1891,8 +1219,8 @@ function useActivePage() {
1891
1219
  }
1892
1220
 
1893
1221
  // src/toolpad-core/DashboardLayout/DashboardSidebarPageItem.tsx
1894
- import * as React23 from "react";
1895
- import PropTypes10 from "prop-types";
1222
+ import * as React14 from "react";
1223
+ import PropTypes8 from "prop-types";
1896
1224
  import { styled as styled3 } from "@mui/material";
1897
1225
  import Avatar2 from "@mui/material/Avatar";
1898
1226
  import Box3 from "@mui/material/Box";
@@ -1905,13 +1233,13 @@ import ListItemText from "@mui/material/ListItemText";
1905
1233
  import Paper from "@mui/material/Paper";
1906
1234
  import Typography3 from "@mui/material/Typography";
1907
1235
  import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
1908
- import invariant5 from "invariant";
1236
+ import invariant3 from "invariant";
1909
1237
 
1910
1238
  // src/toolpad-core/DashboardLayout/shared.ts
1911
1239
  var MINI_DRAWER_WIDTH = 84;
1912
1240
 
1913
1241
  // src/toolpad-core/DashboardLayout/DashboardSidebarPageItem.tsx
1914
- import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
1242
+ import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
1915
1243
  var NavigationListItemButton = styled3(ListItemButton)(({ theme }) => {
1916
1244
  var _a, _b, _c, _d, _e, _f, _g;
1917
1245
  return {
@@ -1944,9 +1272,9 @@ var NavigationListItemButton = styled3(ListItemButton)(({ theme }) => {
1944
1272
  var LIST_ITEM_ICON_SIZE = 34;
1945
1273
  function DashboardSidebarPageItem(props) {
1946
1274
  var _a;
1947
- const navigationContext = React23.useContext(NavigationContext);
1948
- const pageItemContextProps = React23.useContext(DashboardSidebarPageItemContext);
1949
- invariant5(pageItemContextProps, "No navigation page item context provided.");
1275
+ const navigationContext = React14.useContext(NavigationContext);
1276
+ const pageItemContextProps = React14.useContext(DashboardSidebarPageItemContext);
1277
+ invariant3(pageItemContextProps, "No navigation page item context provided.");
1950
1278
  const contextAwareProps = __spreadValues(__spreadValues({}, pageItemContextProps), props);
1951
1279
  const {
1952
1280
  item,
@@ -1962,10 +1290,10 @@ function DashboardSidebarPageItem(props) {
1962
1290
  isSidebarFullyCollapsed = false,
1963
1291
  renderNestedNavigation
1964
1292
  } = contextAwareProps;
1965
- const [hoveredMiniSidebarItemId, setHoveredMiniSidebarItemId] = React23.useState(
1293
+ const [hoveredMiniSidebarItemId, setHoveredMiniSidebarItemId] = React14.useState(
1966
1294
  null
1967
1295
  );
1968
- const handleClick = React23.useCallback(() => {
1296
+ const handleClick = React14.useCallback(() => {
1969
1297
  onClick(id, item);
1970
1298
  }, [id, item, onClick]);
1971
1299
  let nestedNavigationCollapseSx = { display: "none" };
@@ -1990,7 +1318,7 @@ function DashboardSidebarPageItem(props) {
1990
1318
  const hasExternalHref = href.startsWith("http://") || href.startsWith("https://");
1991
1319
  const LinkComponent = LinkComponentProp != null ? LinkComponentProp : hasExternalHref ? "a" : Link2;
1992
1320
  const title = getItemTitle(item);
1993
- const listItem = /* @__PURE__ */ jsxs12(
1321
+ const listItem = /* @__PURE__ */ jsxs9(
1994
1322
  ListItem,
1995
1323
  __spreadProps(__spreadValues({}, item.children && isMini ? {
1996
1324
  onMouseEnter: () => {
@@ -2006,7 +1334,7 @@ function DashboardSidebarPageItem(props) {
2006
1334
  overflowX: "hidden"
2007
1335
  },
2008
1336
  children: [
2009
- /* @__PURE__ */ jsxs12(
1337
+ /* @__PURE__ */ jsxs9(
2010
1338
  NavigationListItemButton,
2011
1339
  __spreadProps(__spreadValues(__spreadValues({
2012
1340
  selected,
@@ -2027,7 +1355,7 @@ function DashboardSidebarPageItem(props) {
2027
1355
  onClick: handleClick
2028
1356
  }) : {}), {
2029
1357
  children: [
2030
- item.icon || isMini ? /* @__PURE__ */ jsxs12(
1358
+ item.icon || isMini ? /* @__PURE__ */ jsxs9(
2031
1359
  Box3,
2032
1360
  {
2033
1361
  sx: isMini ? {
@@ -2037,7 +1365,7 @@ function DashboardSidebarPageItem(props) {
2037
1365
  transform: "translate(-50%, -50%)"
2038
1366
  } : {},
2039
1367
  children: [
2040
- /* @__PURE__ */ jsxs12(
1368
+ /* @__PURE__ */ jsxs9(
2041
1369
  ListItemIcon,
2042
1370
  {
2043
1371
  sx: {
@@ -2048,7 +1376,7 @@ function DashboardSidebarPageItem(props) {
2048
1376
  },
2049
1377
  children: [
2050
1378
  (_a = item.icon) != null ? _a : null,
2051
- !item.icon && isMini ? /* @__PURE__ */ jsx19(
1379
+ !item.icon && isMini ? /* @__PURE__ */ jsx14(
2052
1380
  Avatar2,
2053
1381
  {
2054
1382
  sx: {
@@ -2062,7 +1390,7 @@ function DashboardSidebarPageItem(props) {
2062
1390
  ]
2063
1391
  }
2064
1392
  ),
2065
- isMini ? /* @__PURE__ */ jsx19(
1393
+ isMini ? /* @__PURE__ */ jsx14(
2066
1394
  Typography3,
2067
1395
  {
2068
1396
  variant: "caption",
@@ -2085,7 +1413,7 @@ function DashboardSidebarPageItem(props) {
2085
1413
  ]
2086
1414
  }
2087
1415
  ) : null,
2088
- !isMini ? /* @__PURE__ */ jsx19(
1416
+ !isMini ? /* @__PURE__ */ jsx14(
2089
1417
  ListItemText,
2090
1418
  {
2091
1419
  primary: title,
@@ -2097,11 +1425,11 @@ function DashboardSidebarPageItem(props) {
2097
1425
  }
2098
1426
  ) : null,
2099
1427
  item.action && !isMini && isSidebarFullyExpanded ? item.action : null,
2100
- item.children ? /* @__PURE__ */ jsx19(ExpandMoreIcon, { sx: nestedNavigationCollapseSx }) : null
1428
+ item.children ? /* @__PURE__ */ jsx14(ExpandMoreIcon, { sx: nestedNavigationCollapseSx }) : null
2101
1429
  ]
2102
1430
  })
2103
1431
  ),
2104
- item.children && isMini ? /* @__PURE__ */ jsx19(Grow, { in: id === hoveredMiniSidebarItemId, children: /* @__PURE__ */ jsx19(
1432
+ item.children && isMini ? /* @__PURE__ */ jsx14(Grow, { in: id === hoveredMiniSidebarItemId, children: /* @__PURE__ */ jsx14(
2105
1433
  Box3,
2106
1434
  {
2107
1435
  sx: {
@@ -2109,7 +1437,7 @@ function DashboardSidebarPageItem(props) {
2109
1437
  left: MINI_DRAWER_WIDTH - 2,
2110
1438
  pl: "6px"
2111
1439
  },
2112
- children: /* @__PURE__ */ jsx19(
1440
+ children: /* @__PURE__ */ jsx14(
2113
1441
  Paper,
2114
1442
  {
2115
1443
  sx: {
@@ -2125,9 +1453,9 @@ function DashboardSidebarPageItem(props) {
2125
1453
  ]
2126
1454
  })
2127
1455
  );
2128
- return /* @__PURE__ */ jsxs12(React23.Fragment, { children: [
1456
+ return /* @__PURE__ */ jsxs9(React14.Fragment, { children: [
2129
1457
  listItem,
2130
- item.children && !isMini ? /* @__PURE__ */ jsx19(Collapse, { in: expanded, timeout: "auto", unmountOnExit: true, children: renderNestedNavigation(item.children) }) : null
1458
+ item.children && !isMini ? /* @__PURE__ */ jsx14(Collapse, { in: expanded, timeout: "auto", unmountOnExit: true, children: renderNestedNavigation(item.children) }) : null
2131
1459
  ] }, id);
2132
1460
  }
2133
1461
  DashboardSidebarPageItem.propTypes = {
@@ -2139,54 +1467,54 @@ DashboardSidebarPageItem.propTypes = {
2139
1467
  * If `true`, the item is disabled.
2140
1468
  * @default false
2141
1469
  */
2142
- disabled: PropTypes10.bool,
1470
+ disabled: PropTypes8.bool,
2143
1471
  /**
2144
1472
  * If `true`, expands any nested navigation in the item, otherwise collapse it.
2145
1473
  * @default false
2146
1474
  */
2147
- expanded: PropTypes10.bool,
1475
+ expanded: PropTypes8.bool,
2148
1476
  /**
2149
1477
  * Link `href` for when the item is rendered as a link.
2150
1478
  * @default getItemPath(navigationContext, item)
2151
1479
  */
2152
- href: PropTypes10.string,
1480
+ href: PropTypes8.string,
2153
1481
  /**
2154
1482
  * Navigation page item definition.
2155
1483
  */
2156
- item: PropTypes10.shape({
2157
- action: PropTypes10.node,
2158
- children: PropTypes10.arrayOf(
2159
- PropTypes10.oneOfType([
2160
- PropTypes10.object,
2161
- PropTypes10.shape({
2162
- kind: PropTypes10.oneOf(["header"]).isRequired,
2163
- title: PropTypes10.string.isRequired
1484
+ item: PropTypes8.shape({
1485
+ action: PropTypes8.node,
1486
+ children: PropTypes8.arrayOf(
1487
+ PropTypes8.oneOfType([
1488
+ PropTypes8.object,
1489
+ PropTypes8.shape({
1490
+ kind: PropTypes8.oneOf(["header"]).isRequired,
1491
+ title: PropTypes8.string.isRequired
2164
1492
  }),
2165
- PropTypes10.shape({
2166
- kind: PropTypes10.oneOf(["divider"]).isRequired
1493
+ PropTypes8.shape({
1494
+ kind: PropTypes8.oneOf(["divider"]).isRequired
2167
1495
  })
2168
1496
  ]).isRequired
2169
1497
  ),
2170
- icon: PropTypes10.node,
2171
- kind: PropTypes10.oneOf(["page"]),
2172
- pattern: PropTypes10.string,
2173
- segment: PropTypes10.string,
2174
- title: PropTypes10.string
1498
+ icon: PropTypes8.node,
1499
+ kind: PropTypes8.oneOf(["page"]),
1500
+ pattern: PropTypes8.string,
1501
+ segment: PropTypes8.string,
1502
+ title: PropTypes8.string
2175
1503
  }).isRequired,
2176
1504
  /**
2177
1505
  * The component used to render the item as a link.
2178
1506
  * @default Link
2179
1507
  */
2180
- LinkComponent: PropTypes10.elementType,
1508
+ LinkComponent: PropTypes8.elementType,
2181
1509
  /**
2182
1510
  * Use to apply selected styling.
2183
1511
  * @default false
2184
1512
  */
2185
- selected: PropTypes10.bool
1513
+ selected: PropTypes8.bool
2186
1514
  };
2187
1515
 
2188
1516
  // src/toolpad-core/DashboardLayout/DashboardSidebarSubNavigation.tsx
2189
- import { jsx as jsx20 } from "react/jsx-runtime";
1517
+ import { jsx as jsx15 } from "react/jsx-runtime";
2190
1518
  function DashboardSidebarSubNavigationPageItem({
2191
1519
  id,
2192
1520
  item,
@@ -2200,11 +1528,11 @@ function DashboardSidebarSubNavigationPageItem({
2200
1528
  sidebarExpandedWidth,
2201
1529
  renderPageItem
2202
1530
  }) {
2203
- const navigationContext = React24.useContext(NavigationContext);
1531
+ const navigationContext = React15.useContext(NavigationContext);
2204
1532
  const activePage = useActivePage();
2205
1533
  const isActive = !!activePage && activePage.path === getItemPath(navigationContext, item);
2206
1534
  const isSelected = activePage && item.children && isMini ? hasSelectedNavigationChildren(navigationContext, item, activePage.path) : isActive && !item.children;
2207
- const pageItemContextProps = React24.useMemo(
1535
+ const pageItemContextProps = React15.useMemo(
2208
1536
  () => ({
2209
1537
  expanded: isExpanded,
2210
1538
  selected: isSelected,
@@ -2215,7 +1543,7 @@ function DashboardSidebarSubNavigationPageItem({
2215
1543
  isSidebarFullyCollapsed: isFullyCollapsed,
2216
1544
  renderNestedNavigation: () => {
2217
1545
  var _a;
2218
- return /* @__PURE__ */ jsx20(
1546
+ return /* @__PURE__ */ jsx15(
2219
1547
  DashboardSidebarSubNavigation,
2220
1548
  {
2221
1549
  subNavigation: (_a = item.children) != null ? _a : [],
@@ -2241,7 +1569,7 @@ function DashboardSidebarSubNavigationPageItem({
2241
1569
  sidebarExpandedWidth
2242
1570
  ]
2243
1571
  );
2244
- return /* @__PURE__ */ jsx20(DashboardSidebarPageItemContext.Provider, { value: pageItemContextProps, children: renderPageItem ? renderPageItem(item, { mini: isMini }) : /* @__PURE__ */ jsx20(DashboardSidebarPageItem, { item }) });
1572
+ return /* @__PURE__ */ jsx15(DashboardSidebarPageItemContext.Provider, { value: pageItemContextProps, children: renderPageItem ? renderPageItem(item, { mini: isMini }) : /* @__PURE__ */ jsx15(DashboardSidebarPageItem, { item }) });
2245
1573
  }
2246
1574
  function DashboardSidebarSubNavigation({
2247
1575
  subNavigation,
@@ -2255,9 +1583,9 @@ function DashboardSidebarSubNavigation({
2255
1583
  sidebarExpandedWidth,
2256
1584
  renderPageItem
2257
1585
  }) {
2258
- const navigationContext = React24.useContext(NavigationContext);
1586
+ const navigationContext = React15.useContext(NavigationContext);
2259
1587
  const activePage = useActivePage();
2260
- const initialExpandedItemIds = React24.useMemo(
1588
+ const initialExpandedItemIds = React15.useMemo(
2261
1589
  () => subNavigation.map((navigationItem, navigationItemIndex) => ({
2262
1590
  navigationItem,
2263
1591
  originalIndex: navigationItemIndex
@@ -2266,8 +1594,8 @@ function DashboardSidebarSubNavigation({
2266
1594
  ).map(({ originalIndex }) => `page-${depth}-${originalIndex}`),
2267
1595
  [activePage, depth, navigationContext, subNavigation]
2268
1596
  );
2269
- const [expandedItemIds, setExpandedItemIds] = React24.useState(initialExpandedItemIds);
2270
- const handlePageItemClick = React24.useCallback(
1597
+ const [expandedItemIds, setExpandedItemIds] = React15.useState(initialExpandedItemIds);
1598
+ const handlePageItemClick = React15.useCallback(
2271
1599
  (itemId, item) => {
2272
1600
  if (item.children && !isMini) {
2273
1601
  setExpandedItemIds(
@@ -2279,7 +1607,7 @@ function DashboardSidebarSubNavigation({
2279
1607
  },
2280
1608
  [isMini, onLinkClick]
2281
1609
  );
2282
- return /* @__PURE__ */ jsx20(
1610
+ return /* @__PURE__ */ jsx15(
2283
1611
  List,
2284
1612
  {
2285
1613
  sx: {
@@ -2292,7 +1620,7 @@ function DashboardSidebarSubNavigation({
2292
1620
  },
2293
1621
  children: subNavigation.map((navigationItem, navigationItemIndex) => {
2294
1622
  if (navigationItem.kind === "header") {
2295
- return /* @__PURE__ */ jsx20(
1623
+ return /* @__PURE__ */ jsx15(
2296
1624
  ListSubheader,
2297
1625
  {
2298
1626
  sx: __spreadProps(__spreadValues({
@@ -2314,7 +1642,7 @@ function DashboardSidebarSubNavigation({
2314
1642
  }
2315
1643
  if (navigationItem.kind === "divider") {
2316
1644
  const nextItem = subNavigation[navigationItemIndex + 1];
2317
- return /* @__PURE__ */ jsx20("li", { children: /* @__PURE__ */ jsx20(
1645
+ return /* @__PURE__ */ jsx15("li", { children: /* @__PURE__ */ jsx15(
2318
1646
  Divider2,
2319
1647
  {
2320
1648
  sx: __spreadValues({
@@ -2327,7 +1655,7 @@ function DashboardSidebarSubNavigation({
2327
1655
  ) }, `divider-${depth}-${navigationItemIndex}`);
2328
1656
  }
2329
1657
  const pageItemId = `page-${depth}-${navigationItemIndex}`;
2330
- return /* @__PURE__ */ jsx20(
1658
+ return /* @__PURE__ */ jsx15(
2331
1659
  DashboardSidebarSubNavigationPageItem,
2332
1660
  {
2333
1661
  id: pageItemId,
@@ -2350,7 +1678,7 @@ function DashboardSidebarSubNavigation({
2350
1678
  }
2351
1679
 
2352
1680
  // src/toolpad-core/DashboardLayout/DashboardLayout.tsx
2353
- import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
1681
+ import { jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
2354
1682
  function DashboardLayout(props) {
2355
1683
  var _a, _b;
2356
1684
  const {
@@ -2371,26 +1699,26 @@ function DashboardLayout(props) {
2371
1699
  "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)."
2372
1700
  );
2373
1701
  }
2374
- const theme = useTheme4();
2375
- const navigationContext = React25.useContext(NavigationContext);
2376
- const appWindowContext = React25.useContext(WindowContext);
1702
+ const theme = useTheme3();
1703
+ const navigationContext = React16.useContext(NavigationContext);
1704
+ const appWindowContext = React16.useContext(WindowContext);
2377
1705
  const navigation = navigationProp != null ? navigationProp : navigationContext;
2378
- const [isDesktopNavigationExpanded, setIsDesktopNavigationExpanded] = React25.useState(!defaultSidebarCollapsed);
2379
- const [isMobileNavigationExpanded, setIsMobileNavigationExpanded] = React25.useState(false);
2380
- const isOverSmViewport = useMediaQuery2(
1706
+ const [isDesktopNavigationExpanded, setIsDesktopNavigationExpanded] = React16.useState(!defaultSidebarCollapsed);
1707
+ const [isMobileNavigationExpanded, setIsMobileNavigationExpanded] = React16.useState(false);
1708
+ const isOverSmViewport = useMediaQuery(
2381
1709
  theme.breakpoints.up("sm"),
2382
1710
  appWindowContext && {
2383
1711
  matchMedia: appWindowContext.matchMedia
2384
1712
  }
2385
1713
  );
2386
- const isOverMdViewport = useMediaQuery2(
1714
+ const isOverMdViewport = useMediaQuery(
2387
1715
  theme.breakpoints.up("md"),
2388
1716
  appWindowContext && {
2389
1717
  matchMedia: appWindowContext.matchMedia
2390
1718
  }
2391
1719
  );
2392
1720
  const isNavigationExpanded = isOverMdViewport ? isDesktopNavigationExpanded : isMobileNavigationExpanded;
2393
- const setIsNavigationExpanded = React25.useCallback(
1721
+ const setIsNavigationExpanded = React16.useCallback(
2394
1722
  (newExpanded) => {
2395
1723
  if (isOverMdViewport) {
2396
1724
  setIsDesktopNavigationExpanded(newExpanded);
@@ -2400,9 +1728,9 @@ function DashboardLayout(props) {
2400
1728
  },
2401
1729
  [isOverMdViewport]
2402
1730
  );
2403
- const [isNavigationFullyExpanded, setIsNavigationFullyExpanded] = React25.useState(isNavigationExpanded);
2404
- const [isNavigationFullyCollapsed, setIsNavigationFullyCollapsed] = React25.useState(!isNavigationExpanded);
2405
- React25.useEffect(() => {
1731
+ const [isNavigationFullyExpanded, setIsNavigationFullyExpanded] = React16.useState(isNavigationExpanded);
1732
+ const [isNavigationFullyCollapsed, setIsNavigationFullyCollapsed] = React16.useState(!isNavigationExpanded);
1733
+ React16.useEffect(() => {
2406
1734
  if (isNavigationExpanded) {
2407
1735
  const drawerWidthTransitionTimeout = setTimeout(() => {
2408
1736
  setIsNavigationFullyExpanded(true);
@@ -2413,7 +1741,7 @@ function DashboardLayout(props) {
2413
1741
  return () => {
2414
1742
  };
2415
1743
  }, [isNavigationExpanded, theme]);
2416
- React25.useEffect(() => {
1744
+ React16.useEffect(() => {
2417
1745
  if (!isNavigationExpanded) {
2418
1746
  const drawerWidthTransitionTimeout = setTimeout(() => {
2419
1747
  setIsNavigationFullyCollapsed(true);
@@ -2424,19 +1752,19 @@ function DashboardLayout(props) {
2424
1752
  return () => {
2425
1753
  };
2426
1754
  }, [isNavigationExpanded, theme]);
2427
- const handleSetNavigationExpanded = React25.useCallback(
1755
+ const handleSetNavigationExpanded = React16.useCallback(
2428
1756
  (newExpanded) => () => {
2429
1757
  setIsNavigationExpanded(newExpanded);
2430
1758
  },
2431
1759
  [setIsNavigationExpanded]
2432
1760
  );
2433
- const handleToggleHeaderMenu = React25.useCallback(
1761
+ const handleToggleHeaderMenu = React16.useCallback(
2434
1762
  (isExpanded) => {
2435
1763
  setIsNavigationExpanded(isExpanded);
2436
1764
  },
2437
1765
  [setIsNavigationExpanded]
2438
1766
  );
2439
- const handleNavigationLinkClick = React25.useCallback(() => {
1767
+ const handleNavigationLinkClick = React16.useCallback(() => {
2440
1768
  setIsMobileNavigationExpanded(false);
2441
1769
  }, [setIsMobileNavigationExpanded]);
2442
1770
  const isDesktopMini = !disableCollapsibleSidebar && !isDesktopNavigationExpanded;
@@ -2444,7 +1772,7 @@ function DashboardLayout(props) {
2444
1772
  const hasDrawerTransitions = isOverSmViewport && (!disableCollapsibleSidebar || isOverMdViewport);
2445
1773
  const SidebarFooterSlot = (_a = slots == null ? void 0 : slots.sidebarFooter) != null ? _a : null;
2446
1774
  const HeaderSlot = (_b = slots == null ? void 0 : slots.header) != null ? _b : DashboardHeader;
2447
- const headerSlotProps = React25.useMemo(
1775
+ const headerSlotProps = React16.useMemo(
2448
1776
  () => __spreadValues({
2449
1777
  branding,
2450
1778
  menuOpen: isNavigationExpanded,
@@ -2472,12 +1800,12 @@ function DashboardLayout(props) {
2472
1800
  slots
2473
1801
  ]
2474
1802
  );
2475
- const getDrawerContent = React25.useCallback(
1803
+ const getDrawerContent = React16.useCallback(
2476
1804
  (isMini, viewport) => {
2477
1805
  var _a2;
2478
- return /* @__PURE__ */ jsxs13(React25.Fragment, { children: [
2479
- /* @__PURE__ */ jsx21(Toolbar2, {}),
2480
- /* @__PURE__ */ jsxs13(
1806
+ return /* @__PURE__ */ jsxs10(React16.Fragment, { children: [
1807
+ /* @__PURE__ */ jsx16(Toolbar2, {}),
1808
+ /* @__PURE__ */ jsxs10(
2481
1809
  Box4,
2482
1810
  {
2483
1811
  component: "nav",
@@ -2493,7 +1821,7 @@ function DashboardLayout(props) {
2493
1821
  pt: ((_a2 = navigation[0]) == null ? void 0 : _a2.kind) === "header" && !isMini ? 0 : 2
2494
1822
  }, hasDrawerTransitions ? getDrawerSxTransitionMixin(isNavigationFullyExpanded, "padding") : {}),
2495
1823
  children: [
2496
- /* @__PURE__ */ jsx21(
1824
+ /* @__PURE__ */ jsx16(
2497
1825
  DashboardSidebarSubNavigation,
2498
1826
  {
2499
1827
  subNavigation: navigation,
@@ -2506,7 +1834,7 @@ function DashboardLayout(props) {
2506
1834
  renderPageItem
2507
1835
  }
2508
1836
  ),
2509
- SidebarFooterSlot ? /* @__PURE__ */ jsx21(SidebarFooterSlot, __spreadValues({ mini: isMini }, slotProps == null ? void 0 : slotProps.sidebarFooter)) : null
1837
+ SidebarFooterSlot ? /* @__PURE__ */ jsx16(SidebarFooterSlot, __spreadValues({ mini: isMini }, slotProps == null ? void 0 : slotProps.sidebarFooter)) : null
2510
1838
  ]
2511
1839
  }
2512
1840
  )
@@ -2524,7 +1852,7 @@ function DashboardLayout(props) {
2524
1852
  slotProps == null ? void 0 : slotProps.sidebarFooter
2525
1853
  ]
2526
1854
  );
2527
- const getDrawerSharedSx = React25.useCallback(
1855
+ const getDrawerSharedSx = React16.useCallback(
2528
1856
  (isMini, isTemporary) => {
2529
1857
  const drawerWidth = isMini ? MINI_DRAWER_WIDTH : sidebarExpandedWidth;
2530
1858
  return __spreadProps(__spreadValues(__spreadValues({
@@ -2542,7 +1870,7 @@ function DashboardLayout(props) {
2542
1870
  },
2543
1871
  [isNavigationExpanded, sidebarExpandedWidth]
2544
1872
  );
2545
- return /* @__PURE__ */ jsxs13(
1873
+ return /* @__PURE__ */ jsxs10(
2546
1874
  Box4,
2547
1875
  {
2548
1876
  sx: __spreadValues({
@@ -2553,9 +1881,9 @@ function DashboardLayout(props) {
2553
1881
  width: "100vw"
2554
1882
  }, sx),
2555
1883
  children: [
2556
- /* @__PURE__ */ jsx21(HeaderSlot, __spreadValues({}, headerSlotProps)),
2557
- !hideNavigation ? /* @__PURE__ */ jsxs13(React25.Fragment, { children: [
2558
- /* @__PURE__ */ jsx21(
1884
+ /* @__PURE__ */ jsx16(HeaderSlot, __spreadValues({}, headerSlotProps)),
1885
+ !hideNavigation ? /* @__PURE__ */ jsxs10(React16.Fragment, { children: [
1886
+ /* @__PURE__ */ jsx16(
2559
1887
  Drawer,
2560
1888
  {
2561
1889
  container: appWindowContext == null ? void 0 : appWindowContext.document.body,
@@ -2576,7 +1904,7 @@ function DashboardLayout(props) {
2576
1904
  children: getDrawerContent(false, "phone")
2577
1905
  }
2578
1906
  ),
2579
- /* @__PURE__ */ jsx21(
1907
+ /* @__PURE__ */ jsx16(
2580
1908
  Drawer,
2581
1909
  {
2582
1910
  variant: "permanent",
@@ -2590,7 +1918,7 @@ function DashboardLayout(props) {
2590
1918
  children: getDrawerContent(isMobileMini, "tablet")
2591
1919
  }
2592
1920
  ),
2593
- /* @__PURE__ */ jsx21(
1921
+ /* @__PURE__ */ jsx16(
2594
1922
  Drawer,
2595
1923
  {
2596
1924
  variant: "permanent",
@@ -2601,7 +1929,7 @@ function DashboardLayout(props) {
2601
1929
  }
2602
1930
  )
2603
1931
  ] }) : null,
2604
- /* @__PURE__ */ jsxs13(
1932
+ /* @__PURE__ */ jsxs10(
2605
1933
  Box4,
2606
1934
  {
2607
1935
  sx: {
@@ -2611,8 +1939,8 @@ function DashboardLayout(props) {
2611
1939
  minWidth: 0
2612
1940
  },
2613
1941
  children: [
2614
- /* @__PURE__ */ jsx21(Toolbar2, { sx: { displayPrint: "none" } }),
2615
- /* @__PURE__ */ jsx21(
1942
+ /* @__PURE__ */ jsx16(Toolbar2, { sx: { displayPrint: "none" } }),
1943
+ /* @__PURE__ */ jsx16(
2616
1944
  Box4,
2617
1945
  {
2618
1946
  component: "main",
@@ -2641,63 +1969,63 @@ DashboardLayout.propTypes = {
2641
1969
  * Branding options for the dashboard.
2642
1970
  * @default null
2643
1971
  */
2644
- branding: PropTypes11.shape({
2645
- homeUrl: PropTypes11.string,
2646
- logo: PropTypes11.node,
2647
- title: PropTypes11.string
1972
+ branding: PropTypes9.shape({
1973
+ homeUrl: PropTypes9.string,
1974
+ logo: PropTypes9.node,
1975
+ title: PropTypes9.string
2648
1976
  }),
2649
1977
  /**
2650
1978
  * The content of the dashboard.
2651
1979
  */
2652
- children: PropTypes11.node,
1980
+ children: PropTypes9.node,
2653
1981
  /**
2654
1982
  * Whether the sidebar should start collapsed in desktop size screens.
2655
1983
  * @default false
2656
1984
  */
2657
- defaultSidebarCollapsed: PropTypes11.bool,
1985
+ defaultSidebarCollapsed: PropTypes9.bool,
2658
1986
  /**
2659
1987
  * Whether the sidebar should not be collapsible to a mini variant in desktop and tablet viewports.
2660
1988
  * @default false
2661
1989
  */
2662
- disableCollapsibleSidebar: PropTypes11.bool,
1990
+ disableCollapsibleSidebar: PropTypes9.bool,
2663
1991
  /**
2664
1992
  * Whether the navigation bar and menu icon should be hidden.
2665
1993
  * @default false
2666
1994
  */
2667
- hideNavigation: PropTypes11.bool,
1995
+ hideNavigation: PropTypes9.bool,
2668
1996
  /**
2669
1997
  * Navigation definition for the dashboard. [Find out more](https://mui.com/toolpad/core/react-dashboard-layout/#navigation).
2670
1998
  * @default []
2671
1999
  * @deprecated Set the navigation in the [AppProvider](https://mui.com/toolpad/core/react-app-provider/#navigation) instead.
2672
2000
  */
2673
- navigation: PropTypes11.arrayOf(
2674
- PropTypes11.oneOfType([
2675
- PropTypes11.shape({
2676
- action: PropTypes11.node,
2677
- children: PropTypes11.arrayOf(
2678
- PropTypes11.oneOfType([
2679
- PropTypes11.object,
2680
- PropTypes11.shape({
2681
- kind: PropTypes11.oneOf(["header"]).isRequired,
2682
- title: PropTypes11.string.isRequired
2001
+ navigation: PropTypes9.arrayOf(
2002
+ PropTypes9.oneOfType([
2003
+ PropTypes9.shape({
2004
+ action: PropTypes9.node,
2005
+ children: PropTypes9.arrayOf(
2006
+ PropTypes9.oneOfType([
2007
+ PropTypes9.object,
2008
+ PropTypes9.shape({
2009
+ kind: PropTypes9.oneOf(["header"]).isRequired,
2010
+ title: PropTypes9.string.isRequired
2683
2011
  }),
2684
- PropTypes11.shape({
2685
- kind: PropTypes11.oneOf(["divider"]).isRequired
2012
+ PropTypes9.shape({
2013
+ kind: PropTypes9.oneOf(["divider"]).isRequired
2686
2014
  })
2687
2015
  ]).isRequired
2688
2016
  ),
2689
- icon: PropTypes11.node,
2690
- kind: PropTypes11.oneOf(["page"]),
2691
- pattern: PropTypes11.string,
2692
- segment: PropTypes11.string,
2693
- title: PropTypes11.string
2017
+ icon: PropTypes9.node,
2018
+ kind: PropTypes9.oneOf(["page"]),
2019
+ pattern: PropTypes9.string,
2020
+ segment: PropTypes9.string,
2021
+ title: PropTypes9.string
2694
2022
  }),
2695
- PropTypes11.shape({
2696
- kind: PropTypes11.oneOf(["header"]).isRequired,
2697
- title: PropTypes11.string.isRequired
2023
+ PropTypes9.shape({
2024
+ kind: PropTypes9.oneOf(["header"]).isRequired,
2025
+ title: PropTypes9.string.isRequired
2698
2026
  }),
2699
- PropTypes11.shape({
2700
- kind: PropTypes11.oneOf(["divider"]).isRequired
2027
+ PropTypes9.shape({
2028
+ kind: PropTypes9.oneOf(["divider"]).isRequired
2701
2029
  })
2702
2030
  ]).isRequired
2703
2031
  ),
@@ -2708,106 +2036,106 @@ DashboardLayout.propTypes = {
2708
2036
  * @param {{ mini: boolean }} params
2709
2037
  * @returns {ReactNode}
2710
2038
  */
2711
- renderPageItem: PropTypes11.func,
2039
+ renderPageItem: PropTypes9.func,
2712
2040
  /**
2713
2041
  * Width of the sidebar when expanded.
2714
2042
  * @default 320
2715
2043
  */
2716
- sidebarExpandedWidth: PropTypes11.oneOfType([PropTypes11.number, PropTypes11.string]),
2044
+ sidebarExpandedWidth: PropTypes9.oneOfType([PropTypes9.number, PropTypes9.string]),
2717
2045
  /**
2718
2046
  * The props used for each slot inside.
2719
2047
  * @default {}
2720
2048
  */
2721
- slotProps: PropTypes11.shape({
2722
- appTitle: PropTypes11.shape({
2723
- branding: PropTypes11.shape({
2724
- homeUrl: PropTypes11.string,
2725
- logo: PropTypes11.node,
2726
- title: PropTypes11.string
2049
+ slotProps: PropTypes9.shape({
2050
+ appTitle: PropTypes9.shape({
2051
+ branding: PropTypes9.shape({
2052
+ homeUrl: PropTypes9.string,
2053
+ logo: PropTypes9.node,
2054
+ title: PropTypes9.string
2727
2055
  })
2728
2056
  }),
2729
- header: PropTypes11.shape({
2730
- branding: PropTypes11.shape({
2731
- homeUrl: PropTypes11.string,
2732
- logo: PropTypes11.node,
2733
- title: PropTypes11.string
2057
+ header: PropTypes9.shape({
2058
+ branding: PropTypes9.shape({
2059
+ homeUrl: PropTypes9.string,
2060
+ logo: PropTypes9.node,
2061
+ title: PropTypes9.string
2734
2062
  }),
2735
- hideMenuButton: PropTypes11.bool,
2736
- menuOpen: PropTypes11.bool.isRequired,
2737
- onToggleMenu: PropTypes11.func.isRequired,
2738
- slotProps: PropTypes11.shape({
2739
- appTitle: PropTypes11.object,
2740
- toolbarAccount: PropTypes11.object,
2741
- toolbarActions: PropTypes11.object
2063
+ hideMenuButton: PropTypes9.bool,
2064
+ menuOpen: PropTypes9.bool.isRequired,
2065
+ onToggleMenu: PropTypes9.func.isRequired,
2066
+ slotProps: PropTypes9.shape({
2067
+ appTitle: PropTypes9.object,
2068
+ toolbarAccount: PropTypes9.object,
2069
+ toolbarActions: PropTypes9.object
2742
2070
  }),
2743
- slots: PropTypes11.shape({
2744
- appTitle: PropTypes11.elementType,
2745
- toolbarAccount: PropTypes11.elementType,
2746
- toolbarActions: PropTypes11.elementType
2071
+ slots: PropTypes9.shape({
2072
+ appTitle: PropTypes9.elementType,
2073
+ toolbarAccount: PropTypes9.elementType,
2074
+ toolbarActions: PropTypes9.elementType
2747
2075
  })
2748
2076
  }),
2749
- sidebarFooter: PropTypes11.shape({
2750
- mini: PropTypes11.bool.isRequired
2077
+ sidebarFooter: PropTypes9.shape({
2078
+ mini: PropTypes9.bool.isRequired
2751
2079
  }),
2752
- toolbarAccount: PropTypes11.shape({
2753
- localeText: PropTypes11.object,
2754
- slotProps: PropTypes11.shape({
2755
- popover: PropTypes11.object,
2756
- popoverContent: PropTypes11.object,
2757
- preview: PropTypes11.object,
2758
- signInButton: PropTypes11.object,
2759
- signOutButton: PropTypes11.object
2080
+ toolbarAccount: PropTypes9.shape({
2081
+ localeText: PropTypes9.object,
2082
+ slotProps: PropTypes9.shape({
2083
+ popover: PropTypes9.object,
2084
+ popoverContent: PropTypes9.object,
2085
+ preview: PropTypes9.object,
2086
+ signInButton: PropTypes9.object,
2087
+ signOutButton: PropTypes9.object
2760
2088
  }),
2761
- slots: PropTypes11.shape({
2762
- popover: PropTypes11.elementType,
2763
- popoverContent: PropTypes11.elementType,
2764
- preview: PropTypes11.elementType,
2765
- signInButton: PropTypes11.elementType,
2766
- signOutButton: PropTypes11.elementType
2089
+ slots: PropTypes9.shape({
2090
+ popover: PropTypes9.elementType,
2091
+ popoverContent: PropTypes9.elementType,
2092
+ preview: PropTypes9.elementType,
2093
+ signInButton: PropTypes9.elementType,
2094
+ signOutButton: PropTypes9.elementType
2767
2095
  })
2768
2096
  }),
2769
- toolbarActions: PropTypes11.object
2097
+ toolbarActions: PropTypes9.object
2770
2098
  }),
2771
2099
  /**
2772
2100
  * The components used for each slot inside.
2773
2101
  * @default {}
2774
2102
  */
2775
- slots: PropTypes11.shape({
2776
- appTitle: PropTypes11.elementType,
2777
- header: PropTypes11.elementType,
2778
- sidebarFooter: PropTypes11.elementType,
2779
- toolbarAccount: PropTypes11.elementType,
2780
- toolbarActions: PropTypes11.elementType
2103
+ slots: PropTypes9.shape({
2104
+ appTitle: PropTypes9.elementType,
2105
+ header: PropTypes9.elementType,
2106
+ sidebarFooter: PropTypes9.elementType,
2107
+ toolbarAccount: PropTypes9.elementType,
2108
+ toolbarActions: PropTypes9.elementType
2781
2109
  }),
2782
2110
  /**
2783
2111
  * The system prop that allows defining system overrides as well as additional CSS styles.
2784
2112
  */
2785
- sx: PropTypes11.oneOfType([
2786
- PropTypes11.arrayOf(PropTypes11.oneOfType([PropTypes11.func, PropTypes11.object, PropTypes11.bool])),
2787
- PropTypes11.func,
2788
- PropTypes11.object
2113
+ sx: PropTypes9.oneOfType([
2114
+ PropTypes9.arrayOf(PropTypes9.oneOfType([PropTypes9.func, PropTypes9.object, PropTypes9.bool])),
2115
+ PropTypes9.func,
2116
+ PropTypes9.object
2789
2117
  ])
2790
2118
  };
2791
2119
 
2792
2120
  // src/toolpad-core/PageContainer/PageContainer.tsx
2793
- import PropTypes14 from "prop-types";
2121
+ import PropTypes12 from "prop-types";
2794
2122
  import Box5 from "@mui/material/Box";
2795
2123
  import Container from "@mui/material/Container";
2796
2124
  import Stack8 from "@mui/material/Stack";
2797
2125
 
2798
2126
  // src/toolpad-core/PageContainer/PageHeader.tsx
2799
- import PropTypes13 from "prop-types";
2127
+ import PropTypes11 from "prop-types";
2800
2128
  import Breadcrumbs from "@mui/material/Breadcrumbs";
2801
2129
  import Link4 from "@mui/material/Link";
2802
2130
  import Stack7 from "@mui/material/Stack";
2803
2131
  import Typography4 from "@mui/material/Typography";
2804
- import useSlotProps2 from "@mui/utils/useSlotProps";
2132
+ import useSlotProps from "@mui/utils/useSlotProps";
2805
2133
  import { styled as styled5 } from "@mui/material";
2806
2134
 
2807
2135
  // src/toolpad-core/PageContainer/PageHeaderToolbar.tsx
2808
- import PropTypes12 from "prop-types";
2136
+ import PropTypes10 from "prop-types";
2809
2137
  import { styled as styled4 } from "@mui/material";
2810
- import { jsx as jsx22 } from "react/jsx-runtime";
2138
+ import { jsx as jsx17 } from "react/jsx-runtime";
2811
2139
  var PageHeaderToolbarRoot = styled4("div")(({ theme }) => ({
2812
2140
  display: "flex",
2813
2141
  flexDirection: "row",
@@ -2816,7 +2144,7 @@ var PageHeaderToolbarRoot = styled4("div")(({ theme }) => ({
2816
2144
  marginLeft: "auto"
2817
2145
  }));
2818
2146
  function PageHeaderToolbar(props) {
2819
- return /* @__PURE__ */ jsx22(PageHeaderToolbarRoot, __spreadValues({}, props));
2147
+ return /* @__PURE__ */ jsx17(PageHeaderToolbarRoot, __spreadValues({}, props));
2820
2148
  }
2821
2149
  PageHeaderToolbar.propTypes = {
2822
2150
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -2826,11 +2154,11 @@ PageHeaderToolbar.propTypes = {
2826
2154
  /**
2827
2155
  * @ignore
2828
2156
  */
2829
- children: PropTypes12.node
2157
+ children: PropTypes10.node
2830
2158
  };
2831
2159
 
2832
2160
  // src/toolpad-core/PageContainer/PageHeader.tsx
2833
- import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
2161
+ import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
2834
2162
  var PageContentHeader = styled5("div")(({ theme }) => ({
2835
2163
  display: "flex",
2836
2164
  flexDirection: "row",
@@ -2844,15 +2172,15 @@ function PageHeader(props) {
2844
2172
  const resolvedBreadcrumbs = (_a = breadcrumbs != null ? breadcrumbs : activePage == null ? void 0 : activePage.breadcrumbs) != null ? _a : [];
2845
2173
  const resolvedTitle = (_b = title != null ? title : activePage == null ? void 0 : activePage.title) != null ? _b : "";
2846
2174
  const ToolbarComponent = (_d = (_c = props == null ? void 0 : props.slots) == null ? void 0 : _c.toolbar) != null ? _d : PageHeaderToolbar;
2847
- const toolbarSlotProps = useSlotProps2({
2175
+ const toolbarSlotProps = useSlotProps({
2848
2176
  elementType: ToolbarComponent,
2849
2177
  ownerState: props,
2850
2178
  externalSlotProps: (_e = props == null ? void 0 : props.slotProps) == null ? void 0 : _e.toolbar,
2851
2179
  additionalProps: {}
2852
2180
  });
2853
- return /* @__PURE__ */ jsxs14(Stack7, { children: [
2854
- /* @__PURE__ */ jsx23(Breadcrumbs, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs ? resolvedBreadcrumbs.map((item, index) => {
2855
- return item.path ? /* @__PURE__ */ jsx23(
2181
+ return /* @__PURE__ */ jsxs11(Stack7, { children: [
2182
+ /* @__PURE__ */ jsx18(Breadcrumbs, { "aria-label": "breadcrumb", children: resolvedBreadcrumbs ? resolvedBreadcrumbs.map((item, index) => {
2183
+ return item.path ? /* @__PURE__ */ jsx18(
2856
2184
  Link4,
2857
2185
  {
2858
2186
  component: Link2,
@@ -2862,11 +2190,11 @@ function PageHeader(props) {
2862
2190
  children: getItemTitle(item)
2863
2191
  },
2864
2192
  index
2865
- ) : /* @__PURE__ */ jsx23(Typography4, { color: "text.primary", children: getItemTitle(item) }, index);
2193
+ ) : /* @__PURE__ */ jsx18(Typography4, { color: "text.primary", children: getItemTitle(item) }, index);
2866
2194
  }) : null }),
2867
- /* @__PURE__ */ jsxs14(PageContentHeader, { children: [
2868
- resolvedTitle ? /* @__PURE__ */ jsx23(Typography4, { variant: "h4", children: resolvedTitle }) : null,
2869
- /* @__PURE__ */ jsx23(ToolbarComponent, __spreadValues({}, toolbarSlotProps))
2195
+ /* @__PURE__ */ jsxs11(PageContentHeader, { children: [
2196
+ resolvedTitle ? /* @__PURE__ */ jsx18(Typography4, { variant: "h4", children: resolvedTitle }) : null,
2197
+ /* @__PURE__ */ jsx18(ToolbarComponent, __spreadValues({}, toolbarSlotProps))
2870
2198
  ] })
2871
2199
  ] });
2872
2200
  }
@@ -2878,41 +2206,41 @@ PageHeader.propTypes = {
2878
2206
  /**
2879
2207
  * The breadcrumbs of the page. Leave blank to use the active page breadcrumbs.
2880
2208
  */
2881
- breadcrumbs: PropTypes13.arrayOf(
2882
- PropTypes13.shape({
2883
- path: PropTypes13.string,
2884
- title: PropTypes13.string.isRequired
2209
+ breadcrumbs: PropTypes11.arrayOf(
2210
+ PropTypes11.shape({
2211
+ path: PropTypes11.string,
2212
+ title: PropTypes11.string.isRequired
2885
2213
  })
2886
2214
  ),
2887
2215
  /**
2888
2216
  * The props used for each slot inside.
2889
2217
  */
2890
- slotProps: PropTypes13.shape({
2891
- toolbar: PropTypes13.shape({
2892
- children: PropTypes13.node
2218
+ slotProps: PropTypes11.shape({
2219
+ toolbar: PropTypes11.shape({
2220
+ children: PropTypes11.node
2893
2221
  }).isRequired
2894
2222
  }),
2895
2223
  /**
2896
2224
  * The components used for each slot inside.
2897
2225
  */
2898
- slots: PropTypes13.shape({
2899
- toolbar: PropTypes13.elementType
2226
+ slots: PropTypes11.shape({
2227
+ toolbar: PropTypes11.elementType
2900
2228
  }),
2901
2229
  /**
2902
2230
  * The title of the page. Leave blank to use the active page title.
2903
2231
  */
2904
- title: PropTypes13.string
2232
+ title: PropTypes11.string
2905
2233
  };
2906
2234
 
2907
2235
  // src/toolpad-core/PageContainer/PageContainer.tsx
2908
- import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
2236
+ import { jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
2909
2237
  function PageContainer(props) {
2910
2238
  var _b;
2911
2239
  const _a = props, { children, breadcrumbs, slots, slotProps, title } = _a, rest = __objRest(_a, ["children", "breadcrumbs", "slots", "slotProps", "title"]);
2912
2240
  const PageHeaderSlot = (_b = slots == null ? void 0 : slots.header) != null ? _b : PageHeader;
2913
- return /* @__PURE__ */ jsx24(Container, __spreadProps(__spreadValues({}, rest), { sx: __spreadValues({ flex: 1, display: "flex", flexDirection: "column" }, rest.sx), children: /* @__PURE__ */ jsxs15(Stack8, { sx: { flex: 1, my: 2 }, spacing: 2, children: [
2914
- /* @__PURE__ */ jsx24(PageHeaderSlot, __spreadValues({ title, breadcrumbs }, slotProps == null ? void 0 : slotProps.header)),
2915
- /* @__PURE__ */ jsx24(Box5, { sx: { flex: 1, display: "flex", flexDirection: "column" }, children })
2241
+ return /* @__PURE__ */ jsx19(Container, __spreadProps(__spreadValues({}, rest), { sx: __spreadValues({ flex: 1, display: "flex", flexDirection: "column" }, rest.sx), children: /* @__PURE__ */ jsxs12(Stack8, { sx: { flex: 1, my: 2 }, spacing: 2, children: [
2242
+ /* @__PURE__ */ jsx19(PageHeaderSlot, __spreadValues({ title, breadcrumbs }, slotProps == null ? void 0 : slotProps.header)),
2243
+ /* @__PURE__ */ jsx19(Box5, { sx: { flex: 1, display: "flex", flexDirection: "column" }, children })
2916
2244
  ] }) }));
2917
2245
  }
2918
2246
  PageContainer.propTypes = {
@@ -2923,74 +2251,62 @@ PageContainer.propTypes = {
2923
2251
  /**
2924
2252
  * The breadcrumbs of the page. Leave blank to use the active page breadcrumbs.
2925
2253
  */
2926
- breadcrumbs: PropTypes14.arrayOf(
2927
- PropTypes14.shape({
2928
- path: PropTypes14.string,
2929
- title: PropTypes14.string.isRequired
2254
+ breadcrumbs: PropTypes12.arrayOf(
2255
+ PropTypes12.shape({
2256
+ path: PropTypes12.string,
2257
+ title: PropTypes12.string.isRequired
2930
2258
  })
2931
2259
  ),
2932
2260
  /**
2933
2261
  * @ignore
2934
2262
  */
2935
- children: PropTypes14.node,
2263
+ children: PropTypes12.node,
2936
2264
  /**
2937
2265
  * The props used for each slot inside.
2938
2266
  */
2939
- slotProps: PropTypes14.shape({
2940
- header: PropTypes14.shape({
2941
- breadcrumbs: PropTypes14.arrayOf(
2942
- PropTypes14.shape({
2943
- path: PropTypes14.string,
2944
- title: PropTypes14.string.isRequired
2267
+ slotProps: PropTypes12.shape({
2268
+ header: PropTypes12.shape({
2269
+ breadcrumbs: PropTypes12.arrayOf(
2270
+ PropTypes12.shape({
2271
+ path: PropTypes12.string,
2272
+ title: PropTypes12.string.isRequired
2945
2273
  })
2946
2274
  ),
2947
- slotProps: PropTypes14.shape({
2948
- toolbar: PropTypes14.object.isRequired
2275
+ slotProps: PropTypes12.shape({
2276
+ toolbar: PropTypes12.object.isRequired
2949
2277
  }),
2950
- slots: PropTypes14.shape({
2951
- toolbar: PropTypes14.elementType
2278
+ slots: PropTypes12.shape({
2279
+ toolbar: PropTypes12.elementType
2952
2280
  }),
2953
- title: PropTypes14.string
2281
+ title: PropTypes12.string
2954
2282
  }).isRequired
2955
2283
  }),
2956
2284
  /**
2957
2285
  * The components used for each slot inside.
2958
2286
  */
2959
- slots: PropTypes14.shape({
2960
- header: PropTypes14.elementType
2287
+ slots: PropTypes12.shape({
2288
+ header: PropTypes12.elementType
2961
2289
  }),
2962
2290
  /**
2963
2291
  * The system prop that allows defining system overrides as well as additional CSS styles.
2964
2292
  */
2965
- sx: PropTypes14.oneOfType([
2966
- PropTypes14.arrayOf(PropTypes14.oneOfType([PropTypes14.func, PropTypes14.object, PropTypes14.bool])),
2967
- PropTypes14.func,
2968
- PropTypes14.object
2293
+ sx: PropTypes12.oneOfType([
2294
+ PropTypes12.arrayOf(PropTypes12.oneOfType([PropTypes12.func, PropTypes12.object, PropTypes12.bool])),
2295
+ PropTypes12.func,
2296
+ PropTypes12.object
2969
2297
  ]),
2970
2298
  /**
2971
2299
  * The title of the page. Leave blank to use the active page title.
2972
2300
  */
2973
- title: PropTypes14.string
2301
+ title: PropTypes12.string
2974
2302
  };
2975
2303
 
2976
2304
  export {
2977
2305
  useNotifications,
2978
- en_default,
2979
- LocalizationContext,
2980
- LocalizationProvider,
2981
- useLocaleText,
2982
- NotificationsProvider,
2983
2306
  AlertDialog,
2984
2307
  ConfirmDialog,
2985
2308
  PromptDialog,
2986
2309
  useDialogs,
2987
- DialogsProvider,
2988
- useStorageStateServer,
2989
- useStorageState,
2990
- useLocalStorageState,
2991
- AuthenticationContext,
2992
- SessionContext,
2993
- AppProvider,
2994
2310
  SignInButton,
2995
2311
  SignOutButton,
2996
2312
  AccountPreview,