muffin-admin 13.4.0 → 13.5.0

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.
@@ -33,7 +33,7 @@ export function MuffinAdmin(_a) {
33
33
  ]))
34
34
  : muffinTranslations);
35
35
  const { basename, authProvider = findBuilder(["auth-provider"])(auth), dataProvider = findBuilder(["data-provider"])(apiUrl), catchAll, dashboard = findBuilder(["dashboard"]), disableTelemetry, error, i18nProvider = muffinI18nProvider, layout = findBuilder(["layout"]), loading, loginPage = findBuilder(["loginpage"]), authCallbackPage, notification, queryClient, requireAuth = auth.required, store = localStorageStore(), ready, theme, defaultTheme, title = "React Admin", } = props;
36
- return (_jsx(AdminContext, { authProvider: authProvider, basename: basename, dataProvider: dataProvider, i18nProvider: i18nProvider, store: store, queryClient: queryClient, theme: theme, lightTheme: lightTheme, darkTheme: darkTheme, defaultTheme: defaultTheme, children: _jsx(ConfirmationProvider, { children: _jsx(AdminUI, { layout: layout, dashboard: dashboard, disableTelemetry: disableTelemetry, catchAll: catchAll, error: error, title: title, loading: loading, loginPage: loginPage, authCallbackPage: authCallbackPage, notification: notification, requireAuth: requireAuth, ready: ready, children: resources === null || resources === void 0 ? void 0 : resources.map(({ name }) => buildAdmin(["resource", name], { name })) }) }) }));
36
+ return (_jsx(AdminContext, { authProvider: authProvider, basename: basename, dataProvider: dataProvider, i18nProvider: i18nProvider, store: store, queryClient: queryClient, theme: theme !== null && theme !== void 0 ? theme : adminProps === null || adminProps === void 0 ? void 0 : adminProps.theme, lightTheme: lightTheme, darkTheme: darkTheme, defaultTheme: defaultTheme, children: _jsx(ConfirmationProvider, { children: _jsx(AdminUI, { layout: layout, dashboard: dashboard, disableTelemetry: disableTelemetry, catchAll: catchAll, error: error, title: title, loading: loading, loginPage: loginPage, authCallbackPage: authCallbackPage, notification: notification, requireAuth: requireAuth, ready: ready, children: resources === null || resources === void 0 ? void 0 : resources.map(({ name }) => buildAdmin(["resource", name], { name })) }) }) }));
37
37
  }
38
38
  setupAdmin(["admin"], MuffinAdmin);
39
39
  export function MuffinAdminLayout(props) {
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { ThemeOptions } from "@mui/material";
1
2
  export type TID = string | number;
2
3
  export type TProps = {
3
4
  [key: string]: any;
@@ -83,6 +84,7 @@ export type AdminOpts = {
83
84
  title: string;
84
85
  disableTelemetry?: boolean;
85
86
  mutationMode?: "optimistic" | "pessimistic" | "undoable";
87
+ theme?: ThemeOptions;
86
88
  };
87
89
  apiUrl: string;
88
90
  appBarLinks: [{
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "13.4.0";
1
+ export declare const VERSION = "13.5.0";
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "13.4.0";
1
+ export const VERSION = "13.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muffin-admin",
3
- "version": "13.4.0",
3
+ "version": "13.5.0",
4
4
  "description": "NPM package for https://github.com/klen/muffin-admin",
5
5
  "files": [
6
6
  "src",
@@ -73,7 +73,7 @@ export function MuffinAdmin({
73
73
  i18nProvider={i18nProvider}
74
74
  store={store}
75
75
  queryClient={queryClient}
76
- theme={theme}
76
+ theme={theme ?? adminProps?.theme}
77
77
  lightTheme={lightTheme}
78
78
  darkTheme={darkTheme}
79
79
  defaultTheme={defaultTheme}
package/src/types.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { ThemeOptions } from "@mui/material"
2
+
1
3
  export type TID = string | number
2
4
 
3
5
  export type TProps = {
@@ -126,6 +128,7 @@ export type AdminOpts = {
126
128
  title: string
127
129
  disableTelemetry?: boolean
128
130
  mutationMode?: "optimistic" | "pessimistic" | "undoable"
131
+ theme?: ThemeOptions
129
132
  }
130
133
  apiUrl: string
131
134
  appBarLinks: [{ url: string; title: string; icon?: string }]
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = "13.4.0"
1
+ export const VERSION = "13.5.0"