keycloakify 10.0.0-rc.41 → 10.0.0-rc.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bin/453.index.js +4 -4
  2. package/bin/shared/buildContext.d.ts +49 -0
  3. package/package.json +2 -1
  4. package/src/bin/eject-page.ts +4 -4
  5. package/stories/account/pages/Account.stories.tsx +5 -5
  6. package/stories/account/pages/FederatedIdentity.stories.tsx +6 -6
  7. package/stories/account/pages/Log.stories.tsx +5 -5
  8. package/stories/account/pages/Password.stories.tsx +6 -6
  9. package/stories/account/pages/Sessions.stories.tsx +6 -6
  10. package/stories/account/pages/Totp.stories.tsx +8 -8
  11. package/stories/login/pages/Code.stories.tsx +5 -5
  12. package/stories/login/pages/DeleteAccountConfirm.stories.tsx +5 -5
  13. package/stories/login/pages/DeleteCredential.stories.tsx +5 -5
  14. package/stories/login/pages/Error.stories.tsx +6 -6
  15. package/stories/login/pages/FrontchannelLogout.stories.tsx +5 -5
  16. package/stories/login/pages/IdpReviewUserProfile.stories.tsx +5 -5
  17. package/stories/login/pages/Info.stories.tsx +7 -7
  18. package/stories/login/pages/Login.stories.tsx +13 -13
  19. package/stories/login/pages/LoginConfigTotp.stories.tsx +7 -7
  20. package/stories/login/pages/LoginDeviceVerifyUserCode.stories.tsx +5 -5
  21. package/stories/login/pages/LoginIdpLinkConfirm.stories.tsx +5 -5
  22. package/stories/login/pages/LoginIdpLinkEmail.stories.tsx +5 -5
  23. package/stories/login/pages/LoginOauth2DeviceVerifyUserCode.stories.tsx +5 -5
  24. package/stories/login/pages/LoginOauthGrant.stories.tsx +5 -5
  25. package/stories/login/pages/LoginOtp.stories.tsx +5 -5
  26. package/stories/login/pages/LoginPageExpired.stories.tsx +5 -5
  27. package/stories/login/pages/LoginPassword.stories.tsx +5 -5
  28. package/stories/login/pages/LoginRecoveryAuthnCodeConfig.stories.tsx +5 -5
  29. package/stories/login/pages/LoginRecoveryAuthnCodeInput.stories.tsx +5 -5
  30. package/stories/login/pages/LoginResetOtp.stories.tsx +5 -5
  31. package/stories/login/pages/LoginResetPassword.stories.tsx +6 -6
  32. package/stories/login/pages/LoginUpdatePassword.stories.tsx +5 -5
  33. package/stories/login/pages/LoginUpdateProfile.stories.tsx +5 -5
  34. package/stories/login/pages/LoginUsername.stories.tsx +6 -6
  35. package/stories/login/pages/LoginVerifyEmail.stories.tsx +5 -5
  36. package/stories/login/pages/LoginX509Info.stories.tsx +5 -5
  37. package/stories/login/pages/LogoutConfirm.stories.tsx +5 -5
  38. package/stories/login/pages/Register.stories.tsx +11 -11
  39. package/stories/login/pages/SamlPostForm.stories.tsx +5 -5
  40. package/stories/login/pages/SelectAuthenticator.stories.tsx +6 -6
  41. package/stories/login/pages/Terms.stories.tsx +7 -7
  42. package/stories/login/pages/UpdateEmail.stories.tsx +5 -5
  43. package/stories/login/pages/WebauthnAuthenticate.stories.tsx +5 -5
  44. package/stories/login/pages/WebauthnError.stories.tsx +5 -5
  45. package/stories/login/pages/WebauthnRegister.stories.tsx +5 -5
package/bin/453.index.js CHANGED
@@ -109,7 +109,7 @@ async function command(params) {
109
109
  pageIdOrComponent !== userProfileFormFieldsValue) {
110
110
  break edit_KcApp;
111
111
  }
112
- const kcAppTsxPath = (0,path__WEBPACK_IMPORTED_MODULE_5__.join)(themeSrcDirPath, themeType, "KcApp.tsx");
112
+ const kcAppTsxPath = (0,path__WEBPACK_IMPORTED_MODULE_5__.join)(themeSrcDirPath, themeType, "KcPage.tsx");
113
113
  const kcAppTsxCode = fs__WEBPACK_IMPORTED_MODULE_4__.readFileSync(kcAppTsxPath).toString("utf8");
114
114
  const modifiedKcAppTsxCode = (() => {
115
115
  switch (pageIdOrComponent) {
@@ -121,7 +121,7 @@ async function command(params) {
121
121
  (0,tsafe_assert__WEBPACK_IMPORTED_MODULE_7__.assert)(false);
122
122
  })();
123
123
  if (kcAppTsxCode === modifiedKcAppTsxCode) {
124
- console.log(chalk__WEBPACK_IMPORTED_MODULE_10___default().red("Unable to automatically update KcApp.tsx, please update it manually"));
124
+ console.log(chalk__WEBPACK_IMPORTED_MODULE_10___default().red("Unable to automatically update KcPage.tsx, please update it manually"));
125
125
  return;
126
126
  }
127
127
  fs__WEBPACK_IMPORTED_MODULE_4__.writeFileSync(kcAppTsxPath, Buffer.from(modifiedKcAppTsxCode, "utf8"));
@@ -133,14 +133,14 @@ async function command(params) {
133
133
  ``,
134
134
  `You now need to update your page router:`,
135
135
  ``,
136
- `${chalk__WEBPACK_IMPORTED_MODULE_10___default().bold((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_5__.relative)(process.cwd(), themeSrcDirPath), themeType, "KcApp.tsx"))}:`,
136
+ `${chalk__WEBPACK_IMPORTED_MODULE_10___default().bold((0,path__WEBPACK_IMPORTED_MODULE_5__.join)(".", (0,path__WEBPACK_IMPORTED_MODULE_5__.relative)(process.cwd(), themeSrcDirPath), themeType, "KcPage.tsx"))}:`,
137
137
  chalk__WEBPACK_IMPORTED_MODULE_10___default().grey("```"),
138
138
  `// ...`,
139
139
  ``,
140
140
  chalk__WEBPACK_IMPORTED_MODULE_10___default().green(`+const ${componentBasename.replace(/.tsx$/, "")} = lazy(() => import("./pages/${componentBasename}"));`),
141
141
  ...[
142
142
  ``,
143
- ` export default function KcApp(props: { kcContext: KcContext; }) {`,
143
+ ` export default function KcPage(props: { kcContext: KcContext; }) {`,
144
144
  ``,
145
145
  ` // ...`,
146
146
  ``,
@@ -0,0 +1,49 @@
1
+ import type { CliCommandOptions } from "../main";
2
+ export type BuildContext = {
3
+ bundler: "vite" | "webpack";
4
+ themeVersion: string;
5
+ themeNames: string[];
6
+ extraThemeProperties: string[] | undefined;
7
+ groupId: string;
8
+ artifactId: string;
9
+ loginThemeResourcesFromKeycloakVersion: string;
10
+ projectDirPath: string;
11
+ projectBuildDirPath: string;
12
+ /** Directory that keycloakify outputs to. Defaults to {cwd}/build_keycloak */
13
+ keycloakifyBuildDirPath: string;
14
+ publicDirPath: string;
15
+ cacheDirPath: string;
16
+ /** If your app is hosted under a subpath, it's the case in CRA if you have "homepage": "https://example.com/my-app" in your package.json
17
+ * In this case the urlPathname will be "/my-app/" */
18
+ urlPathname: string | undefined;
19
+ assetsDirPath: string;
20
+ npmWorkspaceRootDirPath: string;
21
+ kcContextExclusionsFtlCode: string | undefined;
22
+ environmentVariables: {
23
+ name: string;
24
+ default: string;
25
+ }[];
26
+ };
27
+ export type BuildOptions = {
28
+ themeName?: string | string[];
29
+ environmentVariables?: {
30
+ name: string;
31
+ default: string;
32
+ }[];
33
+ extraThemeProperties?: string[];
34
+ artifactId?: string;
35
+ groupId?: string;
36
+ loginThemeResourcesFromKeycloakVersion?: string;
37
+ keycloakifyBuildDirPath?: string;
38
+ kcContextExclusionsFtl?: string;
39
+ };
40
+ export type ResolvedViteConfig = {
41
+ buildDir: string;
42
+ publicDir: string;
43
+ assetsDir: string;
44
+ urlPathname: string | undefined;
45
+ buildOptions: BuildOptions;
46
+ };
47
+ export declare function getBuildContext(params: {
48
+ cliCommandOptions: CliCommandOptions;
49
+ }): BuildContext;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "keycloakify",
3
- "version": "10.0.0-rc.41",
3
+ "version": "10.0.0-rc.43",
4
4
  "description": "Create Keycloak themes using React",
5
5
  "repository": {
6
6
  "type": "git",
@@ -788,6 +788,7 @@
788
788
  "bin/shared/constants.js",
789
789
  "bin/shared/constants.d.ts",
790
790
  "bin/shared/constants.js.map",
791
+ "bin/shared/buildContext.d.ts",
791
792
  "vite-plugin/index.d.ts",
792
793
  "vite-plugin/vite-plugin.d.ts",
793
794
  "vite-plugin/index.js"
@@ -149,7 +149,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
149
149
  break edit_KcApp;
150
150
  }
151
151
 
152
- const kcAppTsxPath = pathJoin(themeSrcDirPath, themeType, "KcApp.tsx");
152
+ const kcAppTsxPath = pathJoin(themeSrcDirPath, themeType, "KcPage.tsx");
153
153
 
154
154
  const kcAppTsxCode = fs.readFileSync(kcAppTsxPath).toString("utf8");
155
155
 
@@ -172,7 +172,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
172
172
  if (kcAppTsxCode === modifiedKcAppTsxCode) {
173
173
  console.log(
174
174
  chalk.red(
175
- "Unable to automatically update KcApp.tsx, please update it manually"
175
+ "Unable to automatically update KcPage.tsx, please update it manually"
176
176
  )
177
177
  );
178
178
  return;
@@ -201,7 +201,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
201
201
  ".",
202
202
  pathRelative(process.cwd(), themeSrcDirPath),
203
203
  themeType,
204
- "KcApp.tsx"
204
+ "KcPage.tsx"
205
205
  )
206
206
  )}:`,
207
207
  chalk.grey("```"),
@@ -215,7 +215,7 @@ export async function command(params: { cliCommandOptions: CliCommandOptions })
215
215
  ),
216
216
  ...[
217
217
  ``,
218
- ` export default function KcApp(props: { kcContext: KcContext; }) {`,
218
+ ` export default function KcPage(props: { kcContext: KcContext; }) {`,
219
219
  ``,
220
220
  ` // ...`,
221
221
  ``,
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "account.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "account.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "account/account.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
@@ -1,25 +1,25 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "federatedIdentity.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "federatedIdentity.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "account/federatedIdentity.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
19
19
 
20
20
  export const NotConnected: Story = {
21
21
  render: () => (
22
- <PageStory
22
+ <KcPageStory
23
23
  kcContext={{
24
24
  pageId: "federatedIdentity.ftl",
25
25
  federatedIdentity: {
@@ -1,15 +1,15 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({
5
+ const { KcPageStory } = createKcPageStory({
6
6
  pageId: "log.ftl"
7
7
  });
8
8
 
9
9
  const meta = {
10
10
  title: "account/log.ftl",
11
- component: PageStory
12
- } satisfies Meta<typeof PageStory>;
11
+ component: KcPageStory
12
+ } satisfies Meta<typeof KcPageStory>;
13
13
 
14
14
  export default meta;
15
15
 
@@ -17,7 +17,7 @@ type Story = StoryObj<typeof meta>;
17
17
 
18
18
  export const Default: Story = {
19
19
  render: () => (
20
- <PageStory
20
+ <KcPageStory
21
21
  kcContext={{
22
22
  log: {
23
23
  events: [
@@ -1,25 +1,25 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "password.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "password.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "account/password.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
19
19
 
20
20
  export const WithMessage: Story = {
21
21
  render: () => (
22
- <PageStory
22
+ <KcPageStory
23
23
  kcContext={{
24
24
  message: { type: "success", summary: "This is a test message" }
25
25
  }}
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "sessions.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "sessions.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "account/sessions.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
@@ -15,7 +15,7 @@ type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
17
  render: () => (
18
- <PageStory
18
+ <KcPageStory
19
19
  kcContext={{
20
20
  sessions: {
21
21
  sessions: [
@@ -45,7 +45,7 @@ export const Default: Story = {
45
45
 
46
46
  export const WithError: Story = {
47
47
  render: () => (
48
- <PageStory
48
+ <KcPageStory
49
49
  kcContext={{
50
50
  url: { passwordUrl: "/auth/realms/keycloakify/account/password" },
51
51
  stateChecker: "xQ7EOgFrLi4EvnJ8dbXKhwFGWk_bkOp0X89mhilt1os",
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "totp.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "totp.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "account/totp.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
@@ -15,7 +15,7 @@ type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
17
  render: () => (
18
- <PageStory
18
+ <KcPageStory
19
19
  kcContext={{
20
20
  totp: {
21
21
  enabled: false,
@@ -51,7 +51,7 @@ export const Default: Story = {
51
51
 
52
52
  export const WithTotpEnabled: Story = {
53
53
  render: () => (
54
- <PageStory
54
+ <KcPageStory
55
55
  kcContext={{
56
56
  totp: {
57
57
  enabled: true,
@@ -98,7 +98,7 @@ export const WithTotpEnabled: Story = {
98
98
 
99
99
  export const WithManualMode: Story = {
100
100
  render: () => (
101
- <PageStory
101
+ <KcPageStory
102
102
  kcContext={{
103
103
  mode: "manual",
104
104
  totp: {
@@ -136,7 +136,7 @@ export const WithManualMode: Story = {
136
136
 
137
137
  export const MoreThanOneTotpProviders: Story = {
138
138
  render: () => (
139
- <PageStory
139
+ <KcPageStory
140
140
  kcContext={{
141
141
  totp: {
142
142
  enabled: true,
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "code.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "code.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/code.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "delete-account-confirm.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "delete-account-confirm.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/delete-account-confirm.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "delete-credential.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "delete-credential.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/delete-credential.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
@@ -1,25 +1,25 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "error.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "error.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/error.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
19
19
 
20
20
  export const WithAnotherMessage: Story = {
21
21
  render: () => (
22
- <PageStory
22
+ <KcPageStory
23
23
  kcContext={{
24
24
  message: { summary: "With another error message" }
25
25
  }}
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "frontchannel-logout.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "frontchannel-logout.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/frontchannel-logout.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
@@ -1,18 +1,18 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "idp-review-user-profile.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "idp-review-user-profile.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/idp-review-user-profile.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "info.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "info.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/info.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
@@ -15,7 +15,7 @@ type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
17
  render: () => (
18
- <PageStory
18
+ <KcPageStory
19
19
  kcContext={{
20
20
  message: {
21
21
  summary: "Server info message"
@@ -27,7 +27,7 @@ export const Default: Story = {
27
27
 
28
28
  export const WithLinkBack: Story = {
29
29
  render: () => (
30
- <PageStory
30
+ <KcPageStory
31
31
  kcContext={{
32
32
  message: {
33
33
  summary: "Server message"
@@ -40,7 +40,7 @@ export const WithLinkBack: Story = {
40
40
 
41
41
  export const WithRequiredActions: Story = {
42
42
  render: () => (
43
- <PageStory
43
+ <KcPageStory
44
44
  kcContext={{
45
45
  message: {
46
46
  summary: "Server message"
@@ -1,25 +1,25 @@
1
1
  import React from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react";
3
- import { createPageStory } from "../PageStory";
3
+ import { createKcPageStory } from "../KcPageStory";
4
4
 
5
- const { PageStory } = createPageStory({ pageId: "login.ftl" });
5
+ const { KcPageStory } = createKcPageStory({ pageId: "login.ftl" });
6
6
 
7
7
  const meta = {
8
8
  title: "login/login.ftl",
9
- component: PageStory
10
- } satisfies Meta<typeof PageStory>;
9
+ component: KcPageStory
10
+ } satisfies Meta<typeof KcPageStory>;
11
11
 
12
12
  export default meta;
13
13
 
14
14
  type Story = StoryObj<typeof meta>;
15
15
 
16
16
  export const Default: Story = {
17
- render: () => <PageStory />
17
+ render: () => <KcPageStory />
18
18
  };
19
19
 
20
20
  export const WithoutRegistration: Story = {
21
21
  render: () => (
22
- <PageStory
22
+ <KcPageStory
23
23
  kcContext={{
24
24
  realm: { registrationAllowed: false }
25
25
  }}
@@ -29,7 +29,7 @@ export const WithoutRegistration: Story = {
29
29
 
30
30
  export const WithoutRememberMe: Story = {
31
31
  render: () => (
32
- <PageStory
32
+ <KcPageStory
33
33
  kcContext={{
34
34
  realm: { rememberMe: false }
35
35
  }}
@@ -39,7 +39,7 @@ export const WithoutRememberMe: Story = {
39
39
 
40
40
  export const WithoutPasswordReset: Story = {
41
41
  render: () => (
42
- <PageStory
42
+ <KcPageStory
43
43
  kcContext={{
44
44
  realm: { resetPasswordAllowed: false }
45
45
  }}
@@ -49,7 +49,7 @@ export const WithoutPasswordReset: Story = {
49
49
 
50
50
  export const WithEmailAsUsername: Story = {
51
51
  render: () => (
52
- <PageStory
52
+ <KcPageStory
53
53
  kcContext={{
54
54
  realm: { loginWithEmailAllowed: false }
55
55
  }}
@@ -59,7 +59,7 @@ export const WithEmailAsUsername: Story = {
59
59
 
60
60
  export const WithPresetUsername: Story = {
61
61
  render: () => (
62
- <PageStory
62
+ <KcPageStory
63
63
  kcContext={{
64
64
  login: { username: "max.mustermann@mail.com" }
65
65
  }}
@@ -69,7 +69,7 @@ export const WithPresetUsername: Story = {
69
69
 
70
70
  export const WithImmutablePresetUsername: Story = {
71
71
  render: () => (
72
- <PageStory
72
+ <KcPageStory
73
73
  kcContext={{
74
74
  auth: {
75
75
  attemptedUsername: "max.mustermann@mail.com",
@@ -87,7 +87,7 @@ export const WithImmutablePresetUsername: Story = {
87
87
 
88
88
  export const WithSocialProviders: Story = {
89
89
  render: () => (
90
- <PageStory
90
+ <KcPageStory
91
91
  kcContext={{
92
92
  social: {
93
93
  displayInfo: true,
@@ -173,7 +173,7 @@ export const WithSocialProviders: Story = {
173
173
 
174
174
  export const WithoutPasswordField: Story = {
175
175
  render: () => (
176
- <PageStory
176
+ <KcPageStory
177
177
  kcContext={{
178
178
  realm: { password: false }
179
179
  }}