@kirill.konshin/mui 0.0.3 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,95 @@
1
+ # @kirill.konshin/mui
2
+
3
+ MUI utilities (main entry) and Toolpad admin components (`/admin` entry).
4
+
5
+ # Peer versions
6
+
7
+ `@mui/material` is pinned to `^7` on purpose, even though MUI itself is already on v9: `@toolpad/core` (0.16, latest) still peers on `^7`, so v7 is the correct — and only working — choice today. Bump both together once Toolpad ships v9 support.
8
+
9
+ `@kirill.konshin/auth` is an OPTIONAL peer and is only referenced in types: the `/admin` entry has no runtime dependency on it, so `AdminAppProvider` and `AdminDashboardLayout` work in apps with no auth at all. Install `@kirill.konshin/auth` only when you use `AdminSignInPage`.
10
+
11
+ # Admin — `@kirill.konshin/mui/admin`
12
+
13
+ Preconfigured [`@toolpad/core`](https://mui.com/toolpad/core/introduction/) building blocks for password-protected admin apps, wired to [`@kirill.konshin/auth`](https://github.com/kirill-konshin/utils/tree/main/packages/auth):
14
+
15
+ - `AdminAppProvider` — `NextAppProvider` with sign-out built from a `logoutAction` server action
16
+ - `AdminDashboardLayout` — `DashboardLayout` (sidebar collapsed by default) wrapping children in `PageContainer`; also works around Toolpad 0.16 modules missing `'use client'` banners
17
+ - `AdminSignInPage` — `SignInPage` for password-only login: single credentials provider, no email/rememberMe, takes `auth.loginFormAction`, renders setup instructions when `isConfigured` is false; on a dedicated login page pass `state={auth.getReturnTo(await searchParams)}` to return users to the page they came from
18
+
19
+ ```tsx
20
+ // app/admin/layout.tsx — Server Component, passes the actions from @/auth down as props
21
+ import { auth, loginAction, logoutAction } from '@/auth';
22
+ import { AdminShell } from './AdminShell';
23
+ import { AdminSignIn } from './AdminSignIn';
24
+
25
+ export default async function AdminLayout({ children }: LayoutProps<'/admin'>) {
26
+ const isConfigured = auth.isConfigured();
27
+ if (!isConfigured || !(await auth.isAuthenticated())) {
28
+ return <AdminSignIn loginAction={loginAction} isConfigured={isConfigured} />;
29
+ }
30
+ return <AdminShell logoutAction={logoutAction}>{children}</AdminShell>;
31
+ }
32
+ ```
33
+
34
+ ```tsx
35
+ // app/admin/AdminShell.tsx — theme/navigation/branding stay app-specific
36
+ 'use client';
37
+
38
+ import type { PasswordAuth } from '@kirill.konshin/auth';
39
+ import { AdminAppProvider, AdminDashboardLayout } from '@kirill.konshin/mui/admin';
40
+ import DashboardIcon from '@mui/icons-material/Dashboard';
41
+
42
+ const NAVIGATION = [{ segment: 'admin', title: 'Dashboard', icon: <DashboardIcon /> }];
43
+
44
+ export function AdminShell({
45
+ children,
46
+ logoutAction,
47
+ }: {
48
+ children: React.ReactNode;
49
+ logoutAction: PasswordAuth['logout'];
50
+ }) {
51
+ return (
52
+ <AdminAppProvider
53
+ branding={{ title: 'Admin', homeUrl: '/admin' }}
54
+ navigation={NAVIGATION}
55
+ logoutAction={logoutAction}
56
+ >
57
+ <AdminDashboardLayout>{children}</AdminDashboardLayout>
58
+ </AdminAppProvider>
59
+ );
60
+ }
61
+ ```
62
+
63
+ ```tsx
64
+ // app/admin/AdminSignIn.tsx
65
+ 'use client';
66
+
67
+ import type { PasswordAuth } from '@kirill.konshin/auth';
68
+ import { AdminAppProvider, AdminSignInPage } from '@kirill.konshin/mui/admin';
69
+
70
+ export function AdminSignIn({
71
+ loginAction,
72
+ isConfigured,
73
+ }: {
74
+ loginAction: PasswordAuth['loginFormAction'];
75
+ isConfigured: boolean;
76
+ }) {
77
+ return (
78
+ <AdminAppProvider branding={{ title: 'Admin' }}>
79
+ <AdminSignInPage loginAction={loginAction} isConfigured={isConfigured} />
80
+ </AdminAppProvider>
81
+ );
82
+ }
83
+ ```
84
+
85
+ Root layout still needs `AppRouterCacheProvider` from `@mui/material-nextjs/v15-appRouter` (with `options={{ enableCssLayer: true }}`) and your theme.
86
+
87
+ Wrap `AdminAppProvider` in `<Suspense>`: Toolpad's `NextAppProvider` calls `useSearchParams()`, and `cacheComponents` (set by `defineNextConfig`, see `@kirill.konshin/next`) fails the prerender of any client hook reading URL data outside a boundary.
88
+
89
+ # Utilities (main entry)
90
+
91
+ `AppBarOffset`, `FormControlFieldset`, `FormLabelLegend`, `GenericControl`, `ReadOnly` — see stories.
92
+
93
+ ## Prior Art
94
+
95
+ https://codesandbox.io/p/sandbox/l7vykxl57q MUI v4
@@ -0,0 +1,18 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { NextAppProvider } from '@toolpad/core/nextjs';
3
+ export type AdminAppProviderProps = ComponentProps<typeof NextAppProvider> & {
4
+ /** Server action that destroys the session, wired into Toolpad `authentication.signOut` */
5
+ logoutAction?: () => Promise<void>;
6
+ /**
7
+ * Login page (`auth.urls.login`) — Toolpad calls `authentication.signIn` from the account menu
8
+ * when no session is present, and the sign-in UI is `AdminSignInPage` living there. Default `/login`
9
+ */
10
+ loginUrl?: string;
11
+ };
12
+ /**
13
+ * `NextAppProvider` preconfigured for password-protected admin apps: pass `logoutAction` (e.g.
14
+ * `auth.logout` re-exported from a `'use server'` file) to get a sign-out button with a default
15
+ * `Admin` session; `authentication`/`session` props still win when provided.
16
+ */
17
+ export declare const AdminAppProvider: FC<AdminAppProviderProps>;
18
+ //# sourceMappingURL=appProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appProvider.d.ts","sourceRoot":"","sources":["../../src/admin/appProvider.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,cAAc,EAAE,KAAK,EAAE,EAAiB,MAAM,OAAO,CAAC;AAG3E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAGvD,MAAM,MAAM,qBAAqB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,GAAG;IACzE,2FAA2F;IAC3F,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAyBrD,CAAC"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { memo, useMemo } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { NextAppProvider } from "@toolpad/core/nextjs";
5
+ import { useRouter } from "next/navigation";
6
+ //#region src/admin/appProvider.tsx
7
+ var DEFAULT_SESSION = { user: { name: "Admin" } };
8
+ /**
9
+ * `NextAppProvider` preconfigured for password-protected admin apps: pass `logoutAction` (e.g.
10
+ * `auth.logout` re-exported from a `'use server'` file) to get a sign-out button with a default
11
+ * `Admin` session; `authentication`/`session` props still win when provided.
12
+ */
13
+ var AdminAppProvider = memo(function AdminAppProvider({ logoutAction, loginUrl = "/login", authentication, session, ...props }) {
14
+ const router = useRouter();
15
+ const defaultAuthentication = useMemo(() => logoutAction && {
16
+ signIn: () => router.push(loginUrl),
17
+ signOut: () => void logoutAction()
18
+ }, [
19
+ logoutAction,
20
+ loginUrl,
21
+ router
22
+ ]);
23
+ return /* @__PURE__ */ jsx(NextAppProvider, {
24
+ authentication: authentication ?? defaultAuthentication,
25
+ session: session ?? (logoutAction ? DEFAULT_SESSION : void 0),
26
+ ...props
27
+ });
28
+ });
29
+ //#endregion
30
+ export { AdminAppProvider };
31
+
32
+ //# sourceMappingURL=appProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appProvider.js","names":[],"sources":["../../src/admin/appProvider.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ComponentProps, type FC, memo, useMemo } from 'react';\n\nimport { type Authentication, type Session } from '@toolpad/core/AppProvider';\nimport { NextAppProvider } from '@toolpad/core/nextjs';\nimport { useRouter } from 'next/navigation';\n\nexport type AdminAppProviderProps = ComponentProps<typeof NextAppProvider> & {\n /** Server action that destroys the session, wired into Toolpad `authentication.signOut` */\n logoutAction?: () => Promise<void>;\n /**\n * Login page (`auth.urls.login`) — Toolpad calls `authentication.signIn` from the account menu\n * when no session is present, and the sign-in UI is `AdminSignInPage` living there. Default `/login`\n */\n loginUrl?: string;\n};\n\nconst DEFAULT_SESSION: Session = { user: { name: 'Admin' } };\n\n/**\n * `NextAppProvider` preconfigured for password-protected admin apps: pass `logoutAction` (e.g.\n * `auth.logout` re-exported from a `'use server'` file) to get a sign-out button with a default\n * `Admin` session; `authentication`/`session` props still win when provided.\n */\nexport const AdminAppProvider: FC<AdminAppProviderProps> = memo(function AdminAppProvider({\n logoutAction,\n loginUrl = '/login',\n authentication,\n session,\n ...props\n}) {\n const router = useRouter();\n\n const defaultAuthentication = useMemo<Authentication | undefined>(\n () =>\n logoutAction && {\n signIn: () => router.push(loginUrl), // the login page renders AdminSignInPage\n signOut: () => void logoutAction(),\n },\n [logoutAction, loginUrl, router],\n );\n\n return (\n <NextAppProvider\n authentication={authentication ?? defaultAuthentication}\n session={session ?? (logoutAction ? DEFAULT_SESSION : undefined)}\n {...props}\n />\n );\n});\n"],"mappings":";;;;;;AAkBA,IAAM,kBAA2B,EAAE,MAAM,EAAE,MAAM,QAAQ,EAAE;;;;;;AAO3D,IAAa,mBAA8C,KAAK,SAAS,iBAAiB,EACtF,cACA,WAAW,UACX,gBACA,SACA,GAAG,SACJ;CACC,MAAM,SAAS,UAAU;CAEzB,MAAM,wBAAwB,cAEtB,gBAAgB;EACZ,cAAc,OAAO,KAAK,QAAQ;EAClC,eAAe,KAAK,aAAa;CACrC,GACJ;EAAC;EAAc;EAAU;CAAM,CACnC;CAEA,OACI,oBAAC,iBAAD;EACI,gBAAgB,kBAAkB;EAClC,SAAS,YAAY,eAAe,kBAAkB,KAAA;EACtD,GAAI;CACP,CAAA;AAET,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { DashboardLayout } from '@toolpad/core/DashboardLayout';
3
+ export type AdminDashboardLayoutProps = ComponentProps<typeof DashboardLayout> & {
4
+ /** Wrap children in Toolpad `PageContainer`, default true */
5
+ pageContainer?: boolean;
6
+ };
7
+ export declare const AdminDashboardLayout: FC<AdminDashboardLayoutProps>;
8
+ //# sourceMappingURL=dashboardLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboardLayout.d.ts","sourceRoot":"","sources":["../../src/admin/dashboardLayout.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,cAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAGhE,MAAM,MAAM,yBAAyB,GAAG,cAAc,CAAC,OAAO,eAAe,CAAC,GAAG;IAC7E,6DAA6D;IAC7D,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAKF,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,yBAAyB,CAU7D,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { memo } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { DashboardLayout } from "@toolpad/core/DashboardLayout";
5
+ import { PageContainer } from "@toolpad/core/PageContainer";
6
+ //#region src/admin/dashboardLayout.tsx
7
+ var AdminDashboardLayout = memo(function AdminDashboardLayout({ children, pageContainer = true, ...props }) {
8
+ return /* @__PURE__ */ jsx(DashboardLayout, {
9
+ defaultSidebarCollapsed: true,
10
+ ...props,
11
+ children: pageContainer ? /* @__PURE__ */ jsx(PageContainer, { children }) : children
12
+ });
13
+ });
14
+ //#endregion
15
+ export { AdminDashboardLayout };
16
+
17
+ //# sourceMappingURL=dashboardLayout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboardLayout.js","names":[],"sources":["../../src/admin/dashboardLayout.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ComponentProps, type FC, memo } from 'react';\n\nimport { DashboardLayout } from '@toolpad/core/DashboardLayout';\nimport { PageContainer } from '@toolpad/core/PageContainer';\n\nexport type AdminDashboardLayoutProps = ComponentProps<typeof DashboardLayout> & {\n /** Wrap children in Toolpad `PageContainer`, default true */\n pageContainer?: boolean;\n};\n\n// Client wrapper is mandatory: @toolpad/core ships some DashboardLayout modules without\n// 'use client' banners (AppTitle, DashboardHeader — verified still missing in 0.16), which crash\n// when evaluated in the server graph. Re-check on Toolpad upgrades.\nexport const AdminDashboardLayout: FC<AdminDashboardLayoutProps> = memo(function AdminDashboardLayout({\n children,\n pageContainer = true,\n ...props\n}) {\n return (\n <DashboardLayout defaultSidebarCollapsed {...props}>\n {pageContainer ? <PageContainer>{children}</PageContainer> : children}\n </DashboardLayout>\n );\n});\n"],"mappings":";;;;;;AAeA,IAAa,uBAAsD,KAAK,SAAS,qBAAqB,EAClG,UACA,gBAAgB,MAChB,GAAG,SACJ;CACC,OACI,oBAAC,iBAAD;EAAiB,yBAAA;EAAwB,GAAI;EACxC,UAAA,gBAAgB,oBAAC,eAAD,EAAgB,SAAwB,CAAA,IAAI;CAChD,CAAA;AAEzB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './appProvider.js';
2
+ export * from './dashboardLayout.js';
3
+ export * from './signInPage.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/admin/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AdminAppProvider } from "./appProvider.js";
2
+ import { AdminDashboardLayout } from "./dashboardLayout.js";
3
+ import { AdminSignInPage } from "./signInPage.js";
4
+ export { AdminAppProvider, AdminDashboardLayout, AdminSignInPage };
@@ -0,0 +1,22 @@
1
+ import { ComponentProps, FC } from 'react';
2
+ import { PasswordAuth } from '@kirill.konshin/auth';
3
+ import { SignInPage } from '@toolpad/core/SignInPage';
4
+ type SignInPageProps = ComponentProps<typeof SignInPage>;
5
+ export type AdminSignInPageProps = Omit<SignInPageProps, 'signIn'> & {
6
+ /** `auth.loginFormAction` from `@kirill.konshin/auth`, re-exported from a `'use server'` file */
7
+ loginAction: PasswordAuth['loginFormAction'];
8
+ /** Pass `auth.isConfigured()` to render setup instructions instead of the form, default true */
9
+ isConfigured?: boolean;
10
+ /** Subtitle shown when not configured */
11
+ notConfiguredSubtitle?: string;
12
+ /** Sanitized return URL (`auth.getState(await searchParams)`), threaded into the login form */
13
+ state?: string;
14
+ };
15
+ /**
16
+ * Toolpad `SignInPage` preconfigured for the password-only login of `@kirill.konshin/auth`: single
17
+ * credentials provider, no email/rememberMe fields, errors surfaced through the form. On success
18
+ * `loginAction` redirects (handled by Next.js), on failure its message is shown.
19
+ */
20
+ export declare const AdminSignInPage: FC<AdminSignInPageProps>;
21
+ export {};
22
+ //# sourceMappingURL=signInPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signInPage.d.ts","sourceRoot":"","sources":["../../src/admin/signInPage.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,KAAK,cAAc,EAAE,KAAK,EAAE,EAAqB,MAAM,OAAO,CAAC;AAE/E,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,KAAK,eAAe,GAAG,cAAc,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzD,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,GAAG;IACjE,iGAAiG;IACjG,WAAW,EAAE,YAAY,CAAC,iBAAiB,CAAC,CAAC;IAC7C,gGAAgG;IAChG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,yCAAyC;IACzC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,+FAA+F;IAC/F,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAcF;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CA2DnD,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use client";
2
+ import { memo, useCallback } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { formLabelClasses } from "@mui/material/FormLabel";
5
+ import { SignInPage } from "@toolpad/core/SignInPage";
6
+ //#region src/admin/signInPage.tsx
7
+ var STATE_PARAM = "state";
8
+ var DEFAULT_PROVIDERS = [{
9
+ id: "credentials",
10
+ name: "password"
11
+ }];
12
+ var NOT_CONFIGURED_SUBTITLE = "Set ADMIN_PASSWORD and a SESSION_SECRET of at least 32 characters, then restart.";
13
+ /**
14
+ * Toolpad `SignInPage` preconfigured for the password-only login of `@kirill.konshin/auth`: single
15
+ * credentials provider, no email/rememberMe fields, errors surfaced through the form. On success
16
+ * `loginAction` redirects (handled by Next.js), on failure its message is shown.
17
+ */
18
+ var AdminSignInPage = memo(function AdminSignInPage({ loginAction, isConfigured = true, notConfiguredSubtitle = NOT_CONFIGURED_SUBTITLE, providers = DEFAULT_PROVIDERS, state, localeText, slots, slotProps, ...props }) {
19
+ const signIn = useCallback(async (_provider, formData) => {
20
+ if (!(formData instanceof FormData)) return { error: "Password is required" };
21
+ if (state) formData.set(STATE_PARAM, state);
22
+ const error = await loginAction(null, formData);
23
+ return error ? { error } : {};
24
+ }, [loginAction, state]);
25
+ return /* @__PURE__ */ jsx(SignInPage, {
26
+ signIn,
27
+ providers: isConfigured ? providers : [],
28
+ localeText: isConfigured ? localeText : {
29
+ signInTitle: "Authentication needs configuration",
30
+ signInSubtitle: notConfiguredSubtitle,
31
+ ...localeText
32
+ },
33
+ slots: {
34
+ emailField: () => null,
35
+ rememberMe: () => null,
36
+ subtitle: () => null,
37
+ ...slots
38
+ },
39
+ slotProps: {
40
+ ...slotProps,
41
+ form: {
42
+ noValidate: true,
43
+ ...slotProps?.form
44
+ },
45
+ passwordField: {
46
+ autoFocus: true,
47
+ sx: { [`& .${formLabelClasses.root}`]: { top: "-2px" } },
48
+ ...slotProps?.passwordField
49
+ },
50
+ submitButton: {
51
+ variant: "contained",
52
+ ...slotProps?.submitButton
53
+ }
54
+ },
55
+ ...props
56
+ });
57
+ });
58
+ //#endregion
59
+ export { AdminSignInPage };
60
+
61
+ //# sourceMappingURL=signInPage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signInPage.js","names":[],"sources":["../../src/admin/signInPage.tsx"],"sourcesContent":["'use client';\n\nimport React, { type ComponentProps, type FC, memo, useCallback } from 'react';\n\nimport { type PasswordAuth } from '@kirill.konshin/auth';\nimport type { STATE_PARAM as StateParam } from '@kirill.konshin/auth/client';\nimport { formLabelClasses } from '@mui/material/FormLabel';\nimport { SignInPage } from '@toolpad/core/SignInPage';\n\ntype SignInPageProps = ComponentProps<typeof SignInPage>;\n\nexport type AdminSignInPageProps = Omit<SignInPageProps, 'signIn'> & {\n /** `auth.loginFormAction` from `@kirill.konshin/auth`, re-exported from a `'use server'` file */\n loginAction: PasswordAuth['loginFormAction'];\n /** Pass `auth.isConfigured()` to render setup instructions instead of the form, default true */\n isConfigured?: boolean;\n /** Subtitle shown when not configured */\n notConfiguredSubtitle?: string;\n /** Sanitized return URL (`auth.getState(await searchParams)`), threaded into the login form */\n state?: string;\n};\n\n/*\n * Inlined, NOT imported at runtime: `@kirill.konshin/auth` is an OPTIONAL peer, so importing\n * `@kirill.konshin/auth/client` here would make the whole `/admin` entry unresolvable in apps that\n * only use `AdminAppProvider`/`AdminDashboardLayout` (the barrel re-exports this module). The\n * annotation is a compile-time guard: it stops resolving the day auth renames the param.\n */\nconst STATE_PARAM: typeof StateParam = 'state';\n\nconst DEFAULT_PROVIDERS: SignInPageProps['providers'] = [{ id: 'credentials', name: 'password' }];\n\nconst NOT_CONFIGURED_SUBTITLE = 'Set ADMIN_PASSWORD and a SESSION_SECRET of at least 32 characters, then restart.';\n\n/**\n * Toolpad `SignInPage` preconfigured for the password-only login of `@kirill.konshin/auth`: single\n * credentials provider, no email/rememberMe fields, errors surfaced through the form. On success\n * `loginAction` redirects (handled by Next.js), on failure its message is shown.\n */\nexport const AdminSignInPage: FC<AdminSignInPageProps> = memo(function AdminSignInPage({\n loginAction,\n isConfigured = true,\n notConfiguredSubtitle = NOT_CONFIGURED_SUBTITLE,\n providers = DEFAULT_PROVIDERS,\n state,\n localeText,\n slots,\n slotProps,\n ...props\n}) {\n const signIn = useCallback<NonNullable<SignInPageProps['signIn']>>(\n async (_provider, formData) => {\n if (!(formData instanceof FormData)) return { error: 'Password is required' };\n // thread the return URL through the form only — never store it in the session,\n // multiple tabs logging in concurrently would clash\n if (state) formData.set(STATE_PARAM, state);\n const error = await loginAction(null, formData);\n return error ? { error } : {};\n },\n [loginAction, state],\n );\n\n return (\n <SignInPage\n signIn={signIn}\n providers={isConfigured ? providers : []}\n localeText={\n isConfigured\n ? localeText\n : {\n signInTitle: 'Authentication needs configuration',\n signInSubtitle: notConfiguredSubtitle,\n ...localeText,\n }\n }\n slots={{\n emailField: () => null,\n rememberMe: () => null,\n subtitle: () => null,\n ...slots,\n }}\n slotProps={{\n ...slotProps,\n // FIXME https://github.com/mui/toolpad/issues/4572 — still relevant in 0.16:\n // browser validation popups fight the server-side errors (noValidate is settable\n // declaratively through the form slot) and the password label renders misaligned;\n // re-check on Toolpad upgrades\n form: { noValidate: true, ...slotProps?.form },\n passwordField: {\n autoFocus: true,\n sx: { [`& .${formLabelClasses.root}`]: { top: '-2px' } },\n ...slotProps?.passwordField,\n },\n submitButton: { variant: 'contained', ...slotProps?.submitButton },\n }}\n {...props}\n />\n );\n});\n"],"mappings":";;;;;;AA4BA,IAAM,cAAiC;AAEvC,IAAM,oBAAkD,CAAC;CAAE,IAAI;CAAe,MAAM;AAAW,CAAC;AAEhG,IAAM,0BAA0B;;;;;;AAOhC,IAAa,kBAA4C,KAAK,SAAS,gBAAgB,EACnF,aACA,eAAe,MACf,wBAAwB,yBACxB,YAAY,mBACZ,OACA,YACA,OACA,WACA,GAAG,SACJ;CACC,MAAM,SAAS,YACX,OAAO,WAAW,aAAa;EAC3B,IAAI,EAAE,oBAAoB,WAAW,OAAO,EAAE,OAAO,uBAAuB;EAG5E,IAAI,OAAO,SAAS,IAAI,aAAa,KAAK;EAC1C,MAAM,QAAQ,MAAM,YAAY,MAAM,QAAQ;EAC9C,OAAO,QAAQ,EAAE,MAAM,IAAI,CAAC;CAChC,GACA,CAAC,aAAa,KAAK,CACvB;CAEA,OACI,oBAAC,YAAD;EACY;EACR,WAAW,eAAe,YAAY,CAAC;EACvC,YACI,eACM,aACA;GACI,aAAa;GACb,gBAAgB;GAChB,GAAG;EACP;EAEV,OAAO;GACH,kBAAkB;GAClB,kBAAkB;GAClB,gBAAgB;GAChB,GAAG;EACP;EACA,WAAW;GACP,GAAG;GAKH,MAAM;IAAE,YAAY;IAAM,GAAG,WAAW;GAAK;GAC7C,eAAe;IACX,WAAW;IACX,IAAI,GAAG,MAAM,iBAAiB,SAAS,EAAE,KAAK,OAAO,EAAE;IACvD,GAAG,WAAW;GAClB;GACA,cAAc;IAAE,SAAS;IAAa,GAAG,WAAW;GAAa;EACrE;EACA,GAAI;CACP,CAAA;AAET,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"appBarOffset.d.ts","sourceRoot":"","sources":["../src/appBarOffset.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAkB,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAE7C,CAAC"}
1
+ {"version":3,"file":"appBarOffset.d.ts","sourceRoot":"","sources":["../src/appBarOffset.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,mBAAmB,CAAC;AAElE,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAE7C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"appBarOffset.js","names":[],"sources":["../src/appBarOffset.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\nimport { default as Box, type BoxProps } from '@mui/material/Box';\n\nexport type AppBarOffsetProps = BoxProps;\n\nexport const AppBarOffset: FC<AppBarOffsetProps> = memo(function AppBarOffset({ sx, ...props }) {\n return <Box {...props} sx={[({ mixins }) => mixins.toolbar, ...(Array.isArray(sx) ? sx : [sx])]} />;\n});\n"],"mappings":";;;;AAKA,IAAa,eAAsC,KAAK,SAAS,aAAa,EAAE,IAAI,GAAG,SAAS;CAC5F,OAAO,oBAAC,KAAD;EAAK,GAAI;EAAO,IAAI,EAAE,EAAE,aAAa,OAAO,SAAS,GAAI,MAAM,QAAQ,EAAE,IAAI,KAAK,CAAC,EAAE,CAAE;CAAI,CAAA;AACtG,CAAC"}
1
+ {"version":3,"file":"appBarOffset.js","names":[],"sources":["../src/appBarOffset.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\n\nimport { type BoxProps, default as Box } from '@mui/material/Box';\n\nexport type AppBarOffsetProps = BoxProps;\n\nexport const AppBarOffset: FC<AppBarOffsetProps> = memo(function AppBarOffset({ sx, ...props }) {\n return <Box {...props} sx={[({ mixins }) => mixins.toolbar, ...(Array.isArray(sx) ? sx : [sx])]} />;\n});\n"],"mappings":";;;;AAMA,IAAa,eAAsC,KAAK,SAAS,aAAa,EAAE,IAAI,GAAG,SAAS;CAC5F,OAAO,oBAAC,KAAD;EAAK,GAAI;EAAO,IAAI,EAAE,EAAE,aAAa,OAAO,SAAS,GAAI,MAAM,QAAQ,EAAE,IAAI,KAAK,CAAC,EAAE,CAAE;CAAI,CAAA;AACtG,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formControlFieldset.d.ts","sourceRoot":"","sources":["../src/formControlFieldset.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5E,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAmB3D,CAAC"}
1
+ {"version":3,"file":"formControlFieldset.d.ts","sourceRoot":"","sources":["../src/formControlFieldset.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAI7C,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5E,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAE3D,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,wBAAwB,CAmB3D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formControlFieldset.js","names":[],"sources":["../src/formControlFieldset.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\nimport { GenericControl, type GenericControlProps } from './genericControl';\nimport { inputClasses } from '@mui/material/Input';\n\nexport type FormControlFieldsetProps = GenericControlProps;\n\nexport const FormControlFieldset: FC<FormControlFieldsetProps> = memo(function FormControlFieldset({\n children,\n sx,\n ...props\n}) {\n return (\n <GenericControl\n {...props}\n component=\"fieldset\"\n sx={{\n ...sx,\n [`legend + .${inputClasses.root}`]: {\n marginTop: 2, //FIXME 16px, hardcoded from @mui/material/Input/Input.js @ 59\n },\n }}\n >\n {children}\n </GenericControl>\n );\n});\n"],"mappings":";;;;;AAMA,IAAa,sBAAoD,KAAK,SAAS,oBAAoB,EAC/F,UACA,IACA,GAAG,SACJ;CACC,OACI,oBAAC,gBAAD;EACI,GAAI;EACJ,WAAU;EACV,IAAI;GACA,GAAG;IACF,aAAa,aAAa,SAAS,EAChC,WAAW,EACf;EACJ;EAEC;CACW,CAAA;AAExB,CAAC"}
1
+ {"version":3,"file":"formControlFieldset.js","names":[],"sources":["../src/formControlFieldset.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\n\nimport { inputClasses } from '@mui/material/Input';\n\nimport { GenericControl, type GenericControlProps } from './genericControl';\n\nexport type FormControlFieldsetProps = GenericControlProps;\n\nexport const FormControlFieldset: FC<FormControlFieldsetProps> = memo(function FormControlFieldset({\n children,\n sx,\n ...props\n}) {\n return (\n <GenericControl\n {...props}\n component=\"fieldset\"\n sx={{\n ...sx,\n [`legend + .${inputClasses.root}`]: {\n marginTop: 2, //FIXME 16px, hardcoded from @mui/material/Input/Input.js @ 59\n },\n }}\n >\n {children}\n </GenericControl>\n );\n});\n"],"mappings":";;;;;AAQA,IAAa,sBAAoD,KAAK,SAAS,oBAAoB,EAC/F,UACA,IACA,GAAG,SACJ;CACC,OACI,oBAAC,gBAAD;EACI,GAAI;EACJ,WAAU;EACV,IAAI;GACA,GAAG;IACF,aAAa,aAAa,SAAS,EAChC,WAAW,EACf;EACJ;EAEC;CACW,CAAA;AAExB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formControlFieldset.stories.d.ts","sourceRoot":"","sources":["../src/formControlFieldset.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAMlD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CA6CC,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
1
+ {"version":3,"file":"formControlFieldset.stories.d.ts","sourceRoot":"","sources":["../src/formControlFieldset.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAIlD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CA6CC,CAAC;AAExC,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAQnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formLabelLegend.d.ts","sourceRoot":"","sources":["../src/formLabelLegend.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEvF,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAOnD,CAAC"}
1
+ {"version":3,"file":"formLabelLegend.d.ts","sourceRoot":"","sources":["../src/formLabelLegend.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAyB,KAAK,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAEvF,MAAM,MAAM,oBAAoB,GAAG,eAAe,CAAC;AAEnD,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAOnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formLabelLegend.js","names":[],"sources":["../src/formLabelLegend.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\nimport { default as InputLabel, type InputLabelProps } from '@mui/material/InputLabel';\n\nexport type FormLabelLegendProps = InputLabelProps;\n\nexport const FormLabelLegend: FC<FormLabelLegendProps> = memo(function FormLabelLegend({ children, ...props }) {\n return (\n // sx={(theme) => theme.typography.caption}\n <InputLabel {...props} shrink={true} component={'legend' as any}>\n {children}\n </InputLabel>\n );\n});\n"],"mappings":";;;;AAKA,IAAa,kBAA4C,KAAK,SAAS,gBAAgB,EAAE,UAAU,GAAG,SAAS;CAC3G,OAEI,oBAAC,YAAD;EAAY,GAAI;EAAO,QAAQ;EAAM,WAAW;EAC3C;CACO,CAAA;AAEpB,CAAC"}
1
+ {"version":3,"file":"formLabelLegend.js","names":[],"sources":["../src/formLabelLegend.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\n\nimport { default as InputLabel, type InputLabelProps } from '@mui/material/InputLabel';\n\nexport type FormLabelLegendProps = InputLabelProps;\n\nexport const FormLabelLegend: FC<FormLabelLegendProps> = memo(function FormLabelLegend({ children, ...props }) {\n return (\n // sx={(theme) => theme.typography.caption}\n <InputLabel {...props} shrink={true} component={'legend' as any}>\n {children}\n </InputLabel>\n );\n});\n"],"mappings":";;;;AAMA,IAAa,kBAA4C,KAAK,SAAS,gBAAgB,EAAE,UAAU,GAAG,SAAS;CAC3G,OAEI,oBAAC,YAAD;EAAY,GAAI;EAAO,QAAQ;EAAM,WAAW;EAC3C;CACO,CAAA;AAEpB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"formLabelLegend.stories.d.ts","sourceRoot":"","sources":["../src/formLabelLegend.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAatC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAa5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAqBtC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAoB/B,CAAC"}
1
+ {"version":3,"file":"formLabelLegend.stories.d.ts","sourceRoot":"","sources":["../src/formLabelLegend.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAIpD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAatC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAa5B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAWvB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAWtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAqBtC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAoB/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"genericControl.d.ts","sourceRoot":"","sources":["../src/genericControl.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,2BAA2B,CAAC;AAG1F,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,CAAC;AAEvE,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAejD,CAAC"}
1
+ {"version":3,"file":"genericControl.d.ts","sourceRoot":"","sources":["../src/genericControl.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAE7C,OAAO,EAA0B,KAAK,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG1F,MAAM,MAAM,mBAAmB,GAAG,gBAAgB,GAAG;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,CAAC;AAEvE,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAejD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { memo } from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
- import FormControl from "@mui/material/FormControl";
4
3
  import { inputClasses } from "@mui/material/Input";
4
+ import FormControl from "@mui/material/FormControl";
5
5
  //#region src/genericControl.tsx
6
6
  var GenericControl = memo(function GenericControl({ children, sx, ...props }) {
7
7
  return /* @__PURE__ */ jsx(FormControl, {
@@ -1 +1 @@
1
- {"version":3,"file":"genericControl.js","names":[],"sources":["../src/genericControl.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\nimport { type FormControlProps, default as FormControl } from '@mui/material/FormControl';\nimport { inputClasses } from '@mui/material/Input';\n\nexport type GenericControlProps = FormControlProps & { children: any };\n\nexport const GenericControl: FC<GenericControlProps> = memo(function GenericControl({ children, sx, ...props }) {\n return (\n <FormControl\n variant=\"standard\"\n sx={{\n ...sx,\n [`& .${inputClasses.root}`]: {\n '&:before, &:after': { display: 'none' },\n },\n }}\n {...props}\n >\n {children}\n </FormControl>\n );\n});\n"],"mappings":";;;;;AAMA,IAAa,iBAA0C,KAAK,SAAS,eAAe,EAAE,UAAU,IAAI,GAAG,SAAS;CAC5G,OACI,oBAAC,aAAD;EACI,SAAQ;EACR,IAAI;GACA,GAAG;IACF,MAAM,aAAa,SAAS,EACzB,qBAAqB,EAAE,SAAS,OAAO,EAC3C;EACJ;EACA,GAAI;EAEH;CACQ,CAAA;AAErB,CAAC"}
1
+ {"version":3,"file":"genericControl.js","names":[],"sources":["../src/genericControl.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\n\nimport { default as FormControl, type FormControlProps } from '@mui/material/FormControl';\nimport { inputClasses } from '@mui/material/Input';\n\nexport type GenericControlProps = FormControlProps & { children: any };\n\nexport const GenericControl: FC<GenericControlProps> = memo(function GenericControl({ children, sx, ...props }) {\n return (\n <FormControl\n variant=\"standard\"\n sx={{\n ...sx,\n [`& .${inputClasses.root}`]: {\n '&:before, &:after': { display: 'none' },\n },\n }}\n {...props}\n >\n {children}\n </FormControl>\n );\n});\n"],"mappings":";;;;;AAOA,IAAa,iBAA0C,KAAK,SAAS,eAAe,EAAE,UAAU,IAAI,GAAG,SAAS;CAC5G,OACI,oBAAC,aAAD;EACI,SAAQ;EACR,IAAI;GACA,GAAG;IACF,MAAM,aAAa,SAAS,EACzB,qBAAqB,EAAE,SAAS,OAAO,EAC3C;EACJ;EACA,GAAI;EAEH;CACQ,CAAA;AAErB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"genericControl.stories.d.ts","sourceRoot":"","sources":["../src/genericControl.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAarC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAkBrC,CAAC"}
1
+ {"version":3,"file":"genericControl.stories.d.ts","sourceRoot":"","sources":["../src/genericControl.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,cAAc,CAarC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KASrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAkBrC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export * from './formControlFieldset.js';
3
3
  export * from './formLabelLegend.js';
4
4
  export * from './genericControl.js';
5
5
  export * from './readOnly.js';
6
+ export * from './admin/index.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
package/dist/index.js CHANGED
@@ -3,4 +3,8 @@ import { GenericControl } from "./genericControl.js";
3
3
  import { FormControlFieldset } from "./formControlFieldset.js";
4
4
  import { FormLabelLegend } from "./formLabelLegend.js";
5
5
  import { ReadOnly } from "./readOnly.js";
6
- export { AppBarOffset, FormControlFieldset, FormLabelLegend, GenericControl, ReadOnly };
6
+ import { AdminAppProvider } from "./admin/appProvider.js";
7
+ import { AdminDashboardLayout } from "./admin/dashboardLayout.js";
8
+ import { AdminSignInPage } from "./admin/signInPage.js";
9
+ import "./admin/index.js";
10
+ export { AdminAppProvider, AdminDashboardLayout, AdminSignInPage, AppBarOffset, FormControlFieldset, FormLabelLegend, GenericControl, ReadOnly };
@@ -1 +1 @@
1
- {"version":3,"file":"readOnly.d.ts","sourceRoot":"","sources":["../src/readOnly.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,CAAC;AAE3D,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAErC,CAAC"}
1
+ {"version":3,"file":"readOnly.d.ts","sourceRoot":"","sources":["../src/readOnly.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAQ,MAAM,OAAO,CAAC;AAE7C,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAExE,MAAM,MAAM,aAAa,GAAG,UAAU,GAAG;IAAE,QAAQ,EAAE,GAAG,CAAA;CAAE,CAAC;AAE3D,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAErC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"readOnly.js","names":[],"sources":["../src/readOnly.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\nimport { default as Input, type InputProps } from '@mui/material/Input';\n\nexport type ReadOnlyProps = InputProps & { children: any };\n\nexport const ReadOnly: FC<ReadOnlyProps> = memo(function ReadOnly({ children, inputProps, ...props }) {\n return <Input {...props} inputComponent={'div' as any} inputProps={{ ...inputProps, children }}></Input>;\n});\n"],"mappings":";;;;AAKA,IAAa,WAA8B,KAAK,SAAS,SAAS,EAAE,UAAU,YAAY,GAAG,SAAS;CAClG,OAAO,oBAAC,OAAD;EAAO,GAAI;EAAO,gBAAgB;EAAc,YAAY;GAAE,GAAG;GAAY;EAAS;CAAU,CAAA;AAC3G,CAAC"}
1
+ {"version":3,"file":"readOnly.js","names":[],"sources":["../src/readOnly.tsx"],"sourcesContent":["import React, { type FC, memo } from 'react';\n\nimport { default as Input, type InputProps } from '@mui/material/Input';\n\nexport type ReadOnlyProps = InputProps & { children: any };\n\nexport const ReadOnly: FC<ReadOnlyProps> = memo(function ReadOnly({ children, inputProps, ...props }) {\n return <Input {...props} inputComponent={'div' as any} inputProps={{ ...inputProps, children }}></Input>;\n});\n"],"mappings":";;;;AAMA,IAAa,WAA8B,KAAK,SAAS,SAAS,EAAE,UAAU,YAAY,GAAG,SAAS;CAClG,OAAO,oBAAC,OAAD;EAAO,GAAI;EAAO,gBAAgB;EAAc,YAAY;GAAE,GAAG;GAAY;EAAS;CAAU,CAAA;AAC3G,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"readOnly.stories.d.ts","sourceRoot":"","sources":["../src/readOnly.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAI5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAGtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAY/B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAqB5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAyBrC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC"}
1
+ {"version":3,"file":"readOnly.stories.d.ts","sourceRoot":"","sources":["../src/readOnly.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,QAAQ,CAY/B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAIrB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAOvB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAS7B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAqB5B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,KAyBrC,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirill.konshin/mui",
3
3
  "description": "Utilities",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "type": "module",
6
6
  "hasStorybook": true,
7
7
  "scripts": {
@@ -19,19 +19,34 @@
19
19
  },
20
20
  "devDependencies": {
21
21
  "@emotion/react": "^11.14.0",
22
- "@emotion/styled": "^11.14.0",
22
+ "@emotion/styled": "^11.14.1",
23
+ "@kirill.konshin/auth": "*",
23
24
  "@kirill.konshin/utils-private": "*",
24
- "@mui/material": "^7.3.0",
25
- "react": "^19.1.1"
25
+ "@mui/material": "^9.3.1",
26
+ "@toolpad/core": "^0.16.0",
27
+ "next": "^16.3.0",
28
+ "react": "^19.2.8"
26
29
  },
27
30
  "peerDependencies": {
28
- "@mui/material": "^7",
31
+ "@kirill.konshin/auth": "*",
32
+ "@mui/material": "^9",
33
+ "@toolpad/core": "^0.16",
34
+ "next": "^16",
29
35
  "react": "^19"
30
36
  },
31
37
  "peerDependenciesMeta": {
38
+ "@kirill.konshin/auth": {
39
+ "optional": true
40
+ },
32
41
  "@mui/material": {
33
42
  "optional": true
34
43
  },
44
+ "@toolpad/core": {
45
+ "optional": true
46
+ },
47
+ "next": {
48
+ "optional": true
49
+ },
35
50
  "react": {
36
51
  "optional": true
37
52
  }
@@ -43,10 +58,14 @@
43
58
  "license": "MIT",
44
59
  "exports": {
45
60
  ".": {
46
- "import": {
47
- "import": "./dist/index.js",
48
- "types": "./dist/index.d.ts"
49
- }
61
+ "types": "./dist/index.d.ts",
62
+ "import": "./dist/index.js",
63
+ "default": "./dist/index.js"
64
+ },
65
+ "./admin": {
66
+ "types": "./dist/admin/index.d.ts",
67
+ "import": "./dist/admin/index.js",
68
+ "default": "./dist/admin/index.js"
50
69
  }
51
70
  },
52
71
  "main": "./dist/index.js",
@@ -59,7 +78,7 @@
59
78
  },
60
79
  "nx": {
61
80
  "tags": [
62
- "platform:react"
81
+ "platform:next"
63
82
  ]
64
83
  },
65
84
  "files": [