@ory/elements-react 0.0.0-pr.e3d2b7e1 → 0.0.0-pr.f3c2f07

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 (183) hide show
  1. package/CHANGELOG.md +122 -0
  2. package/DEVELOPMENT.md +19 -4
  3. package/babel.config.js +10 -0
  4. package/dist/client/frontendClient.d.mts +5 -2
  5. package/dist/client/frontendClient.d.ts +5 -2
  6. package/dist/client/frontendClient.js +25 -2
  7. package/dist/client/frontendClient.js.map +1 -1
  8. package/dist/client/frontendClient.mjs +25 -2
  9. package/dist/client/frontendClient.mjs.map +1 -1
  10. package/dist/index.d.mts +46 -5
  11. package/dist/index.d.ts +46 -5
  12. package/dist/index.js +540 -115
  13. package/dist/index.js.map +1 -1
  14. package/dist/index.mjs +540 -116
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/theme/default/index.css +171 -118
  17. package/dist/theme/default/index.css.map +1 -1
  18. package/dist/theme/default/index.d.mts +30 -4
  19. package/dist/theme/default/index.d.ts +30 -4
  20. package/dist/theme/default/index.js +3842 -567
  21. package/dist/theme/default/index.js.map +1 -1
  22. package/dist/theme/default/index.mjs +3862 -521
  23. package/dist/theme/default/index.mjs.map +1 -1
  24. package/package.json +9 -3
  25. package/tsconfig.json +1 -1
  26. package/.storybook/global.css +0 -7
  27. package/.storybook/main.ts +0 -50
  28. package/.storybook/preview-head.html +0 -15
  29. package/.storybook/preview.tsx +0 -68
  30. package/.storybook/public/InterVariable.woff2 +0 -0
  31. package/.storybook/public/inter.css +0 -8
  32. package/.stub-responses/login/1fa/all-methods/initial-form.json +0 -245
  33. package/.stub-responses/login/1fa/all-methods/missing-email.json +0 -263
  34. package/.stub-responses/login/1fa/all-methods/wrong-credentials.json +0 -252
  35. package/.stub-responses/login/1fa/code/code-input.json +0 -135
  36. package/.stub-responses/login/1fa/code/initial-form.json +0 -173
  37. package/.stub-responses/login/1fa/code/invalid-account.json +0 -182
  38. package/.stub-responses/login/1fa/code/missing-email.json +0 -182
  39. package/.stub-responses/login/1fa/code/wrong-credentials.json +0 -124
  40. package/.stub-responses/login/1fa/none/initial-form.json +0 -33
  41. package/.stub-responses/login/1fa/oidc/credential-select-password.json +0 -120
  42. package/.stub-responses/login/1fa/oidc/credential-select.json +0 -81
  43. package/.stub-responses/login/1fa/oidc/initial-form.json +0 -279
  44. package/.stub-responses/login/1fa/passkey/initial-form.json +0 -122
  45. package/.stub-responses/login/1fa/password/initial-form.json +0 -154
  46. package/.stub-responses/login/1fa/password/missing-email.json +0 -172
  47. package/.stub-responses/login/1fa/password/wrong-credentials.json +0 -163
  48. package/.stub-responses/login/1fa/webauthn/initial-form.json +0 -76
  49. package/.stub-responses/login/1fa/webauthn/invalid-account.json +0 -83
  50. package/.stub-responses/login/1fa/webauthn/show-trigger.json +0 -105
  51. package/.stub-responses/recovery/disabled/initial-form.json +0 -9
  52. package/.stub-responses/recovery/none/initial-form.json +0 -9
  53. package/.stub-responses/registration/one-step/all-methods/initial-form.json +0 -334
  54. package/.stub-responses/registration/one-step/all-methods/missing-fields.json +0 -343
  55. package/.stub-responses/registration/one-step/disabled/initial-form.json +0 -10
  56. package/.stub-responses/registration/one-step/none/initial-form.json +0 -14
  57. package/.stub-responses/registration/one-step/oidc/initial-form.json +0 -338
  58. package/.stub-responses/registration/one-step/passkey/initial-form.json +0 -177
  59. package/.stub-responses/registration/one-step/password/initial-form.json +0 -154
  60. package/.stub-responses/registration/one-step/password/missing-fields.json +0 -172
  61. package/.stub-responses/registration/one-step/password/second-step.json +0 -164
  62. package/.stub-responses/registration/one-step/webauthn/initial-form.json +0 -185
  63. package/.stub-responses/registration/two-step/all-methods/enter-password.json +0 -242
  64. package/.stub-responses/registration/two-step/all-methods/initial-form.json +0 -180
  65. package/.stub-responses/registration/two-step/all-methods/missing-fields.json +0 -189
  66. package/.stub-responses/registration/two-step/all-methods/password-validation-error.json +0 -244
  67. package/.stub-responses/registration/two-step/password/enter-password.json +0 -108
  68. package/.stub-responses/registration/two-step/password/initial-form.json +0 -134
  69. package/.stub-responses/registration/two-step/password/missing-fields.json +0 -143
  70. package/.stub-responses/registration/two-step/password/password-validation-error.json +0 -110
  71. package/.stub-responses/settings/all-methods/change-password.json +0 -381
  72. package/.stub-responses/settings/all-methods/change-trait.json +0 -377
  73. package/.stub-responses/settings/all-methods/initial-form.json +0 -368
  74. package/.stub-responses/settings/oidc/with-provider.json +0 -229
  75. package/.stub-responses/settings/passkey/initial-form.json +0 -256
  76. package/.stub-responses/settings/webauthn/initial-form.json +0 -263
  77. package/.stub-responses/verification/disabled/initial-form.json +0 -9
  78. package/.stub-responses/verification/none/initial-form.json +0 -9
  79. package/dist/theme/default/tailwind/defaults.d.mts +0 -737
  80. package/dist/theme/default/tailwind/defaults.d.ts +0 -737
  81. package/stories/components/login/1fa/all.stories.ts +0 -46
  82. package/stories/components/login/1fa/code.stories.ts +0 -64
  83. package/stories/components/login/1fa/custom.stories.tsx +0 -74
  84. package/stories/components/login/1fa/none.stories.tsx +0 -28
  85. package/stories/components/login/1fa/oidc.stories.tsx +0 -140
  86. package/stories/components/login/1fa/passkey.stories.ts +0 -28
  87. package/stories/components/login/1fa/password.stories.ts +0 -46
  88. package/stories/components/login/1fa/webauthn.stories.ts +0 -46
  89. package/stories/components/registration/one-step/all-methods.stories.ts +0 -37
  90. package/stories/components/registration/one-step/password.stories.ts +0 -37
  91. package/stories/components/registration/one-step/webauthn.stories.ts +0 -28
  92. package/stories/components/registration/two-step/all-methods.stories.ts +0 -55
  93. package/stories/components/registration/two-step/password.stories.ts +0 -55
  94. package/stories/components/settings/all.stories.ts +0 -46
  95. package/stories/components/settings/oidc.stories.ts +0 -28
  96. package/stories/components/settings/passkey.stories.ts +0 -28
  97. package/stories/components/settings/webauthn.stories.ts +0 -28
  98. package/stories/pages/error.tsx +0 -29
  99. package/stories/utils.ts +0 -20
  100. package/storybook-static/InterVariable.woff2 +0 -0
  101. package/storybook-static/assets/Color-ERTF36HU-BdkKyVuV.js +0 -1
  102. package/storybook-static/assets/DocsRenderer-CFRXHY34-YqKt61zP.js +0 -595
  103. package/storybook-static/assets/all-methods.stories-B-rqPBX2.js +0 -11
  104. package/storybook-static/assets/all-methods.stories-CmMlhzsx.js +0 -21
  105. package/storybook-static/assets/all.stories-CtQ0yCQi.js +0 -16
  106. package/storybook-static/assets/all.stories-DgIVCzcZ.js +0 -16
  107. package/storybook-static/assets/chunk-H6MOWX77-DTQOW814.js +0 -1
  108. package/storybook-static/assets/code.stories-BbEryDcA.js +0 -26
  109. package/storybook-static/assets/custom.stories-DH2zHar9.js +0 -6
  110. package/storybook-static/assets/entry-preview-CcFGVifh.js +0 -10
  111. package/storybook-static/assets/entry-preview-docs-CyY-8bLe.js +0 -54
  112. package/storybook-static/assets/iframe-C5GAfuxh.js +0 -2
  113. package/storybook-static/assets/index-BVoBHvaS.js +0 -8
  114. package/storybook-static/assets/index-CfOt2XX2.js +0 -24
  115. package/storybook-static/assets/index-DPRSEdy-.js +0 -1
  116. package/storybook-static/assets/index-DrFu-skq.js +0 -6
  117. package/storybook-static/assets/index-FeUjBnvO.js +0 -1
  118. package/storybook-static/assets/index-uubelm5h.js +0 -9
  119. package/storybook-static/assets/initial-form-DWp_1F-f.js +0 -1
  120. package/storybook-static/assets/jsx-runtime-QvZ8i92b.js +0 -9
  121. package/storybook-static/assets/none.stories-TAeRhzd5.js +0 -6
  122. package/storybook-static/assets/oidc.stories-CniWBy7t.js +0 -58
  123. package/storybook-static/assets/oidc.stories-jhWzAyoQ.js +0 -6
  124. package/storybook-static/assets/passkey.stories-CBtjoVSN.js +0 -6
  125. package/storybook-static/assets/passkey.stories-CQU2Xw_t.js +0 -6
  126. package/storybook-static/assets/password.stories-0s6cDl0o.js +0 -11
  127. package/storybook-static/assets/password.stories-B2Wtckz_.js +0 -16
  128. package/storybook-static/assets/password.stories-DX0gkWjH.js +0 -21
  129. package/storybook-static/assets/preview-BBWR9nbA.js +0 -1
  130. package/storybook-static/assets/preview-BPAmP-pY.js +0 -2
  131. package/storybook-static/assets/preview-BWzBA1C2.js +0 -396
  132. package/storybook-static/assets/preview-BXtF2ySE.js +0 -234
  133. package/storybook-static/assets/preview-Cur_8nCX.css +0 -1
  134. package/storybook-static/assets/preview-D77C14du.js +0 -34
  135. package/storybook-static/assets/preview-DCjDUH0w.js +0 -27
  136. package/storybook-static/assets/preview-DFmD0pui.js +0 -1
  137. package/storybook-static/assets/preview-DGUiP6tS.js +0 -7
  138. package/storybook-static/assets/preview-aVwhiz9X.js +0 -1
  139. package/storybook-static/assets/react-18-CtsMCmcS.js +0 -1
  140. package/storybook-static/assets/settings-BqEFC2-V.css +0 -1
  141. package/storybook-static/assets/settings-Bx4osEmB.js +0 -2304
  142. package/storybook-static/assets/webauthn.stories-BzodmV0c.js +0 -6
  143. package/storybook-static/assets/webauthn.stories-DglGm7Ys.js +0 -6
  144. package/storybook-static/assets/webauthn.stories-G9E76Wjj.js +0 -16
  145. package/storybook-static/favicon.svg +0 -1
  146. package/storybook-static/iframe.html +0 -654
  147. package/storybook-static/index.html +0 -173
  148. package/storybook-static/index.json +0 -1
  149. package/storybook-static/inter.css +0 -8
  150. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  151. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  152. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  153. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  154. package/storybook-static/preview-stats.json +0 -2344
  155. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  156. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
  157. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
  158. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
  159. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -394
  160. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -0
  161. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
  162. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
  163. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
  164. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
  165. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
  166. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
  167. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
  168. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
  169. package/storybook-static/sb-addons/interactions-8/manager-bundle.js +0 -211
  170. package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
  171. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  172. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
  173. package/storybook-static/sb-common-assets/favicon.svg +0 -1
  174. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  175. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  176. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  177. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  178. package/storybook-static/sb-manager/globals-module-info.js +0 -1006
  179. package/storybook-static/sb-manager/globals-runtime.js +0 -54400
  180. package/storybook-static/sb-manager/globals.js +0 -48
  181. package/storybook-static/sb-manager/runtime.js +0 -12089
  182. package/storybook-static/sb-preview/globals.js +0 -33
  183. package/storybook-static/sb-preview/runtime.js +0 -9498
@@ -1,46 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { LoginFlowFromJSON } from "@ory/client-fetch"
5
- import type { Meta, StoryObj } from "@storybook/react"
6
- import { config } from "../../../utils"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/First Factor Login/Methods/Everything",
11
- component: Login,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Login>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: LoginFlowFromJSON(
24
- require("$snapshots/login/1fa/all-methods/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const ValidationMissingFields: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/login/1fa/all-methods/missing-email.json"),
34
- ),
35
- config,
36
- },
37
- }
38
-
39
- export const ValidationIncorrectCredentials: Story = {
40
- args: {
41
- flow: LoginFlowFromJSON(
42
- require("$snapshots/login/1fa/all-methods/wrong-credentials.json"),
43
- ),
44
- config,
45
- },
46
- }
@@ -1,64 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { LoginFlowFromJSON } from "@ory/client-fetch"
5
- import type { Meta, StoryObj } from "@storybook/react"
6
- import { config } from "../../../utils"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/First Factor Login/Methods/Code",
11
- component: Login,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Login>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: LoginFlowFromJSON(
24
- require("$snapshots/login/1fa/code/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const ValidationMissingFields: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/login/1fa/code/missing-email.json"),
34
- ),
35
- config,
36
- },
37
- }
38
-
39
- export const ValidationInvalidAccount: Story = {
40
- args: {
41
- flow: LoginFlowFromJSON(
42
- require("$snapshots/login/1fa/code/invalid-account.json"),
43
- ),
44
- config,
45
- },
46
- }
47
-
48
- export const CodeInput: Story = {
49
- args: {
50
- flow: LoginFlowFromJSON(
51
- require("$snapshots/login/1fa/code/code-input.json"),
52
- ),
53
- config,
54
- },
55
- }
56
-
57
- export const ValidationIncorrectCode: Story = {
58
- args: {
59
- flow: LoginFlowFromJSON(
60
- require("$snapshots/login/1fa/code/wrong-credentials.json"),
61
- ),
62
- config,
63
- },
64
- }
@@ -1,74 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { LoginFlowFromJSON } from "@ory/client-fetch"
5
- import {
6
- OryCard,
7
- OryCardContent,
8
- OryForm,
9
- OryFormGroupDivider,
10
- OryFormGroups,
11
- OryFormOidcButtons,
12
- OryNodeOidcButtonProps,
13
- } from "@ory/elements-react"
14
- import { config } from "../../../utils"
15
-
16
- import type { Meta, StoryObj } from "@storybook/react"
17
- import { Login, LoginFlowContextProps } from "../../../../src/theme/default"
18
-
19
- const CustomSocialButton = ({ node }: OryNodeOidcButtonProps) => (
20
- <div className="antialiased rounded-buttons border border-interface-background-default-inverted leading-none bg-button-primary-background-default hover:bg-button-primary-background-hover transition-colors text-button-primary-foreground-default hover:text-button-primary-foreground-hover px-4 py-4.5 text-sm font-medium">
21
- Custom {node.meta.label?.text}
22
- </div>
23
- )
24
-
25
- const CustomComponents = ({ flow, config }: LoginFlowContextProps) => {
26
- return (
27
- <Login
28
- flow={flow}
29
- components={{
30
- Node: {
31
- OidcButton: CustomSocialButton,
32
- },
33
- }}
34
- config={config}
35
- >
36
- <OryCard>
37
- <OryCardContent>
38
- <OryForm>
39
- <OryFormOidcButtons />
40
- <OryFormGroupDivider />
41
- <div>
42
- Even though the code method is available, we do not show it here
43
- with our customization:
44
- </div>
45
- <OryFormGroups
46
- groups={["default", "password" /* "code" */, "webauthn"]}
47
- />
48
- </OryForm>
49
- </OryCardContent>
50
- </OryCard>
51
- </Login>
52
- )
53
- }
54
-
55
- const meta = {
56
- title: "Ory Elements/Custom Components",
57
- component: CustomComponents,
58
- parameters: {
59
- layout: "centered",
60
- },
61
- } satisfies Meta<typeof Login>
62
-
63
- export default meta
64
-
65
- type Story = StoryObj<typeof meta>
66
-
67
- export const CustomSocialSignInButton: Story = {
68
- args: {
69
- flow: LoginFlowFromJSON(
70
- require("$snapshots/login/1fa/all-methods/initial-form.json"),
71
- ),
72
- config,
73
- },
74
- }
@@ -1,28 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/First Factor Login/Methods/None",
11
- component: Login,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Login>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const NoMethodsAvailable: Story = {
22
- args: {
23
- flow: LoginFlowFromJSON(
24
- require("$snapshots/login/1fa/none/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
@@ -1,140 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { LoginFlow, LoginFlowFromJSON } from "@ory/client-fetch"
5
- import type { Meta, StoryObj } from "@storybook/react"
6
- import { config } from "../../../utils"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const oidcNodes = LoginFlowFromJSON(
10
- require("$snapshots/login/1fa/oidc/initial-form.json"),
11
- )
12
-
13
- const providers = [
14
- "apple",
15
- "auth0",
16
- "discord",
17
- "facebook",
18
- "generic",
19
- "github",
20
- "gitlab",
21
- "google",
22
- "linkedin",
23
- "microsoft",
24
- "slack",
25
- "spotify",
26
- "yandex",
27
- "x",
28
- ]
29
-
30
- const listOnly = (providers: string[]): LoginFlow => {
31
- return LoginFlowFromJSON({
32
- ...oidcNodes,
33
- ui: {
34
- ...oidcNodes.ui,
35
- nodes: oidcNodes.ui.nodes.filter((node) => {
36
- if (node.group !== "oidc" || node.attributes.node_type !== "input") {
37
- return true
38
- }
39
-
40
- return providers.includes(
41
- (node.attributes.value as string).toLowerCase(),
42
- )
43
- }),
44
- },
45
- })
46
- }
47
-
48
- const meta = {
49
- title: "Ory Elements/First Factor Login/Methods/Social Sign In",
50
- component: Login,
51
- parameters: {
52
- layout: "centered",
53
- },
54
- } satisfies Meta<typeof Login>
55
-
56
- export default meta
57
-
58
- type Story = StoryObj<typeof meta>
59
-
60
- export const OneSocialButton: Story = {
61
- args: {
62
- flow: listOnly(["google"]),
63
- config,
64
- },
65
- }
66
-
67
- export const TwoSocialButtons: Story = {
68
- args: {
69
- flow: listOnly(["google", "x"]),
70
- config,
71
- },
72
- }
73
-
74
- export const ThreeSocialButtons: Story = {
75
- args: {
76
- flow: listOnly(["google", "x", "github"]),
77
- config,
78
- },
79
- }
80
-
81
- export const FourSocialButtons: Story = {
82
- args: {
83
- flow: listOnly(["google", "x", "github", "linkedin"]),
84
- config,
85
- },
86
- }
87
-
88
- export const FiveSocialButtons: Story = {
89
- args: {
90
- flow: listOnly(["google", "x", "github", "linkedin", "auth0"]),
91
- config,
92
- },
93
- }
94
-
95
- export const SixSocialButtons: Story = {
96
- args: {
97
- flow: listOnly(["google", "x", "github", "linkedin", "auth0", "apple"]),
98
- config,
99
- },
100
- }
101
-
102
- export const SevenSocialButtons: Story = {
103
- args: {
104
- flow: listOnly([
105
- "google",
106
- "x",
107
- "github",
108
- "linkedin",
109
- "auth0",
110
- "apple",
111
- "microsoft",
112
- ]),
113
- config,
114
- },
115
- }
116
-
117
- export const AllGenericButton: Story = {
118
- args: {
119
- flow: listOnly(providers),
120
- config,
121
- },
122
- }
123
-
124
- export const CredentialSelect: Story = {
125
- args: {
126
- flow: LoginFlowFromJSON(
127
- require("$snapshots/login/1fa/oidc/credential-select.json"),
128
- ),
129
- config,
130
- },
131
- }
132
-
133
- export const CredentialSelectWithMethodSelect: Story = {
134
- args: {
135
- flow: LoginFlowFromJSON(
136
- require("$snapshots/login/1fa/oidc/credential-select-password.json"),
137
- ),
138
- config,
139
- },
140
- }
@@ -1,28 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/First Factor Login/Methods/Passkey",
11
- component: Login,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Login>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: LoginFlowFromJSON(
24
- require("$snapshots/login/1fa/passkey/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
@@ -1,46 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/First Factor Login/Methods/Password",
11
- component: Login,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Login>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: LoginFlowFromJSON(
24
- require("$snapshots/login/1fa/password/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const ValidationMissingFields: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/login/1fa/password/missing-email.json"),
34
- ),
35
- config,
36
- },
37
- }
38
-
39
- export const ValidationIncorrectCredentials: Story = {
40
- args: {
41
- flow: LoginFlowFromJSON(
42
- require("$snapshots/login/1fa/password/wrong-credentials.json"),
43
- ),
44
- config,
45
- },
46
- }
@@ -1,46 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Login } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/First Factor Login/Methods/WebAuthn",
11
- component: Login,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Login>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: LoginFlowFromJSON(
24
- require("$snapshots/login/1fa/webauthn/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const InvalidAccount: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/login/1fa/webauthn/invalid-account.json"),
34
- ),
35
- config,
36
- },
37
- }
38
-
39
- export const ShowTrigger: Story = {
40
- args: {
41
- flow: LoginFlowFromJSON(
42
- require("$snapshots/login/1fa/webauthn/show-trigger.json"),
43
- ),
44
- config,
45
- },
46
- }
@@ -1,37 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Registration } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/One Step Registration/Methods/Everything",
11
- component: Registration,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Registration>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: RegistrationFlowFromJSON(
24
- require("$snapshots/registration/one-step/all-methods/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const ValidationError: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/registration/one-step/all-methods/missing-fields.json"),
34
- ),
35
- config,
36
- },
37
- }
@@ -1,37 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Registration } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/One Step Registration/Methods/Password",
11
- component: Registration,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Registration>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: RegistrationFlowFromJSON(
24
- require("$snapshots/registration/one-step/password/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const ValidationError: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/registration/one-step/password/missing-fields.json"),
34
- ),
35
- config,
36
- },
37
- }
@@ -1,28 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { RegistrationFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Registration } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/One Step Registration/Methods/WebAuthn",
11
- component: Registration,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Registration>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: RegistrationFlowFromJSON(
24
- require("$snapshots/registration/one-step/webauthn/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
@@ -1,55 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Registration } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/Two Step Registration/Methods/Everything",
11
- component: Registration,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Registration>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: RegistrationFlowFromJSON(
24
- require("$snapshots/registration/two-step/all-methods/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const FirstStepValidationError: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/registration/two-step/all-methods/missing-fields.json"),
34
- ),
35
- config,
36
- },
37
- }
38
-
39
- export const EnterPassword: Story = {
40
- args: {
41
- flow: LoginFlowFromJSON(
42
- require("$snapshots/registration/two-step/all-methods/enter-password.json"),
43
- ),
44
- config,
45
- },
46
- }
47
-
48
- export const SecondStepValidationError: Story = {
49
- args: {
50
- flow: LoginFlowFromJSON(
51
- require("$snapshots/registration/two-step/all-methods/password-validation-error.json"),
52
- ),
53
- config,
54
- },
55
- }
@@ -1,55 +0,0 @@
1
- // Copyright © 2024 Ory Corp
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- import { config } from "../../../utils"
5
- import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch"
6
- import type { Meta, StoryObj } from "@storybook/react"
7
- import { Registration } from "../../../../src/theme/default"
8
-
9
- const meta = {
10
- title: "Ory Elements/Two Step Registration/Methods/Password",
11
- component: Registration,
12
- parameters: {
13
- layout: "centered",
14
- },
15
- } satisfies Meta<typeof Registration>
16
-
17
- export default meta
18
-
19
- type Story = StoryObj<typeof meta>
20
-
21
- export const ShowForm: Story = {
22
- args: {
23
- flow: RegistrationFlowFromJSON(
24
- require("$snapshots/registration/two-step/password/initial-form.json"),
25
- ),
26
- config,
27
- },
28
- }
29
-
30
- export const FirstStepValidationError: Story = {
31
- args: {
32
- flow: LoginFlowFromJSON(
33
- require("$snapshots/registration/two-step/password/missing-fields.json"),
34
- ),
35
- config,
36
- },
37
- }
38
-
39
- export const EnterPassword: Story = {
40
- args: {
41
- flow: LoginFlowFromJSON(
42
- require("$snapshots/registration/two-step/password/enter-password.json"),
43
- ),
44
- config,
45
- },
46
- }
47
-
48
- export const SecondStepValidationError: Story = {
49
- args: {
50
- flow: LoginFlowFromJSON(
51
- require("$snapshots/registration/two-step/password/password-validation-error.json"),
52
- ),
53
- config,
54
- },
55
- }