@ory/elements-react 1.0.0-next.29 → 1.0.0-next.30
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/CHANGELOG.md +11 -0
- package/dist/index.d.mts +3 -6
- package/dist/index.d.ts +3 -6
- package/dist/index.js +253 -299
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +253 -299
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +258 -248
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +215 -205
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +3 -3
- package/.storybook/global.css +0 -7
- package/.storybook/main.ts +0 -50
- package/.storybook/preview-head.html +0 -15
- package/.storybook/preview.tsx +0 -68
- package/.storybook/public/InterVariable.woff2 +0 -0
- package/.storybook/public/inter.css +0 -8
- package/.stub-responses/login/1fa/all-methods/initial-form.json +0 -247
- package/.stub-responses/login/1fa/all-methods/missing-email.json +0 -265
- package/.stub-responses/login/1fa/all-methods/wrong-credentials.json +0 -254
- package/.stub-responses/login/1fa/code/code-input.json +0 -135
- package/.stub-responses/login/1fa/code/initial-form.json +0 -173
- package/.stub-responses/login/1fa/code/invalid-account.json +0 -182
- package/.stub-responses/login/1fa/code/missing-email.json +0 -182
- package/.stub-responses/login/1fa/code/wrong-credentials.json +0 -124
- package/.stub-responses/login/1fa/none/initial-form.json +0 -33
- package/.stub-responses/login/1fa/oidc/initial-form.json +0 -279
- package/.stub-responses/login/1fa/passkey/initial-form.json +0 -122
- package/.stub-responses/login/1fa/password/initial-form.json +0 -154
- package/.stub-responses/login/1fa/password/missing-email.json +0 -172
- package/.stub-responses/login/1fa/password/wrong-credentials.json +0 -163
- package/.stub-responses/login/1fa/webauthn/initial-form.json +0 -76
- package/.stub-responses/login/1fa/webauthn/invalid-account.json +0 -83
- package/.stub-responses/login/1fa/webauthn/show-trigger.json +0 -105
- package/.stub-responses/recovery/disabled/initial-form.json +0 -9
- package/.stub-responses/recovery/none/initial-form.json +0 -9
- package/.stub-responses/registration/one-step/all-methods/initial-form.json +0 -334
- package/.stub-responses/registration/one-step/all-methods/missing-fields.json +0 -343
- package/.stub-responses/registration/one-step/disabled/initial-form.json +0 -10
- package/.stub-responses/registration/one-step/none/initial-form.json +0 -14
- package/.stub-responses/registration/one-step/oidc/initial-form.json +0 -338
- package/.stub-responses/registration/one-step/passkey/initial-form.json +0 -177
- package/.stub-responses/registration/one-step/password/initial-form.json +0 -154
- package/.stub-responses/registration/one-step/password/missing-fields.json +0 -172
- package/.stub-responses/registration/one-step/password/second-step.json +0 -164
- package/.stub-responses/registration/one-step/webauthn/initial-form.json +0 -185
- package/.stub-responses/registration/two-step/all-methods/enter-password.json +0 -242
- package/.stub-responses/registration/two-step/all-methods/initial-form.json +0 -180
- package/.stub-responses/registration/two-step/all-methods/missing-fields.json +0 -189
- package/.stub-responses/registration/two-step/all-methods/password-validation-error.json +0 -244
- package/.stub-responses/registration/two-step/password/enter-password.json +0 -108
- package/.stub-responses/registration/two-step/password/initial-form.json +0 -134
- package/.stub-responses/registration/two-step/password/missing-fields.json +0 -143
- package/.stub-responses/registration/two-step/password/password-validation-error.json +0 -110
- package/.stub-responses/settings/all-methods/change-password.json +0 -381
- package/.stub-responses/settings/all-methods/change-trait.json +0 -377
- package/.stub-responses/settings/all-methods/initial-form.json +0 -368
- package/.stub-responses/settings/oidc/with-provider.json +0 -230
- package/.stub-responses/settings/passkey/initial-form.json +0 -256
- package/.stub-responses/settings/webauthn/initial-form.json +0 -263
- package/.stub-responses/verification/disabled/initial-form.json +0 -9
- package/.stub-responses/verification/none/initial-form.json +0 -9
- package/stories/components/login/1fa/all.stories.ts +0 -46
- package/stories/components/login/1fa/code.stories.ts +0 -64
- package/stories/components/login/1fa/custom.stories.tsx +0 -72
- package/stories/components/login/1fa/none.stories.tsx +0 -28
- package/stories/components/login/1fa/oidc.stories.tsx +0 -143
- package/stories/components/login/1fa/passkey.stories.ts +0 -28
- package/stories/components/login/1fa/password.stories.ts +0 -46
- package/stories/components/login/1fa/webauthn.stories.ts +0 -46
- package/stories/components/registration/one-step/all-methods.stories.ts +0 -37
- package/stories/components/registration/one-step/password.stories.ts +0 -37
- package/stories/components/registration/one-step/webauthn.stories.ts +0 -28
- package/stories/components/registration/two-step/all-methods.stories.ts +0 -55
- package/stories/components/registration/two-step/password.stories.ts +0 -55
- package/stories/components/settings/all.stories.ts +0 -46
- package/stories/components/settings/oidc.stories.ts +0 -28
- package/stories/components/settings/passkey.stories.ts +0 -28
- package/stories/components/settings/webauthn.stories.ts +0 -28
- package/stories/pages/error.tsx +0 -29
- package/stories/utils.ts +0 -20
- package/storybook-static/InterVariable.woff2 +0 -0
- package/storybook-static/assets/Color-ERTF36HU-BdkKyVuV.js +0 -1
- package/storybook-static/assets/DocsRenderer-CFRXHY34-YqKt61zP.js +0 -595
- package/storybook-static/assets/all-methods.stories-B-rqPBX2.js +0 -11
- package/storybook-static/assets/all-methods.stories-CmMlhzsx.js +0 -21
- package/storybook-static/assets/all.stories-CtQ0yCQi.js +0 -16
- package/storybook-static/assets/all.stories-DgIVCzcZ.js +0 -16
- package/storybook-static/assets/chunk-H6MOWX77-DTQOW814.js +0 -1
- package/storybook-static/assets/code.stories-BbEryDcA.js +0 -26
- package/storybook-static/assets/custom.stories-DH2zHar9.js +0 -6
- package/storybook-static/assets/entry-preview-CcFGVifh.js +0 -10
- package/storybook-static/assets/entry-preview-docs-CyY-8bLe.js +0 -54
- package/storybook-static/assets/iframe-C5GAfuxh.js +0 -2
- package/storybook-static/assets/index-BVoBHvaS.js +0 -8
- package/storybook-static/assets/index-CfOt2XX2.js +0 -24
- package/storybook-static/assets/index-DPRSEdy-.js +0 -1
- package/storybook-static/assets/index-DrFu-skq.js +0 -6
- package/storybook-static/assets/index-FeUjBnvO.js +0 -1
- package/storybook-static/assets/index-uubelm5h.js +0 -9
- package/storybook-static/assets/initial-form-DWp_1F-f.js +0 -1
- package/storybook-static/assets/jsx-runtime-QvZ8i92b.js +0 -9
- package/storybook-static/assets/none.stories-TAeRhzd5.js +0 -6
- package/storybook-static/assets/oidc.stories-CniWBy7t.js +0 -58
- package/storybook-static/assets/oidc.stories-jhWzAyoQ.js +0 -6
- package/storybook-static/assets/passkey.stories-CBtjoVSN.js +0 -6
- package/storybook-static/assets/passkey.stories-CQU2Xw_t.js +0 -6
- package/storybook-static/assets/password.stories-0s6cDl0o.js +0 -11
- package/storybook-static/assets/password.stories-B2Wtckz_.js +0 -16
- package/storybook-static/assets/password.stories-DX0gkWjH.js +0 -21
- package/storybook-static/assets/preview-BBWR9nbA.js +0 -1
- package/storybook-static/assets/preview-BPAmP-pY.js +0 -2
- package/storybook-static/assets/preview-BWzBA1C2.js +0 -396
- package/storybook-static/assets/preview-BXtF2ySE.js +0 -234
- package/storybook-static/assets/preview-Cur_8nCX.css +0 -1
- package/storybook-static/assets/preview-D77C14du.js +0 -34
- package/storybook-static/assets/preview-DCjDUH0w.js +0 -27
- package/storybook-static/assets/preview-DFmD0pui.js +0 -1
- package/storybook-static/assets/preview-DGUiP6tS.js +0 -7
- package/storybook-static/assets/preview-aVwhiz9X.js +0 -1
- package/storybook-static/assets/react-18-CtsMCmcS.js +0 -1
- package/storybook-static/assets/settings-BqEFC2-V.css +0 -1
- package/storybook-static/assets/settings-Bx4osEmB.js +0 -2304
- package/storybook-static/assets/webauthn.stories-BzodmV0c.js +0 -6
- package/storybook-static/assets/webauthn.stories-DglGm7Ys.js +0 -6
- package/storybook-static/assets/webauthn.stories-G9E76Wjj.js +0 -16
- package/storybook-static/favicon.svg +0 -1
- package/storybook-static/iframe.html +0 -654
- package/storybook-static/index.html +0 -173
- package/storybook-static/index.json +0 -1
- package/storybook-static/inter.css +0 -8
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/preview-stats.json +0 -2344
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
- package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -394
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js +0 -211
- package/storybook-static/sb-addons/interactions-8/manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/storybook-static/sb-common-assets/favicon.svg +0 -1
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +0 -1006
- package/storybook-static/sb-manager/globals-runtime.js +0 -54400
- package/storybook-static/sb-manager/globals.js +0 -48
- package/storybook-static/sb-manager/runtime.js +0 -12089
- package/storybook-static/sb-preview/globals.js +0 -33
- package/storybook-static/sb-preview/runtime.js +0 -9498
|
@@ -1,72 +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
|
-
OryFormGroups,
|
|
10
|
-
OryFormOidcButtons,
|
|
11
|
-
OryNodeOidcButtonProps,
|
|
12
|
-
} from "@ory/elements-react"
|
|
13
|
-
import { config } from "../../../utils"
|
|
14
|
-
|
|
15
|
-
import type { Meta, StoryObj } from "@storybook/react"
|
|
16
|
-
import { Login, LoginFlowContextProps } from "../../../../src/theme/default"
|
|
17
|
-
|
|
18
|
-
const CustomSocialButton = ({ node }: OryNodeOidcButtonProps) => (
|
|
19
|
-
<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">
|
|
20
|
-
Custom {node.meta.label?.text}
|
|
21
|
-
</div>
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
const CustomComponents = ({ flow, config }: LoginFlowContextProps) => {
|
|
25
|
-
return (
|
|
26
|
-
<Login
|
|
27
|
-
flow={flow}
|
|
28
|
-
components={{
|
|
29
|
-
Node: {
|
|
30
|
-
OidcButton: CustomSocialButton,
|
|
31
|
-
},
|
|
32
|
-
}}
|
|
33
|
-
config={config}
|
|
34
|
-
>
|
|
35
|
-
<OryCard>
|
|
36
|
-
<OryCardContent>
|
|
37
|
-
<OryForm>
|
|
38
|
-
<OryFormOidcButtons />
|
|
39
|
-
<div>
|
|
40
|
-
Even though the code method is available, we do not show it here
|
|
41
|
-
with our customization:
|
|
42
|
-
</div>
|
|
43
|
-
<OryFormGroups
|
|
44
|
-
groups={["default", "password" /* "code" */, "webauthn"]}
|
|
45
|
-
/>
|
|
46
|
-
</OryForm>
|
|
47
|
-
</OryCardContent>
|
|
48
|
-
</OryCard>
|
|
49
|
-
</Login>
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const meta = {
|
|
54
|
-
title: "Ory Elements/Custom Components",
|
|
55
|
-
component: CustomComponents,
|
|
56
|
-
parameters: {
|
|
57
|
-
layout: "centered",
|
|
58
|
-
},
|
|
59
|
-
} satisfies Meta<typeof Login>
|
|
60
|
-
|
|
61
|
-
export default meta
|
|
62
|
-
|
|
63
|
-
type Story = StoryObj<typeof meta>
|
|
64
|
-
|
|
65
|
-
export const CustomSocialSignInButton: Story = {
|
|
66
|
-
args: {
|
|
67
|
-
flow: LoginFlowFromJSON(
|
|
68
|
-
require("$snapshots/login/1fa/all-methods/initial-form.json"),
|
|
69
|
-
),
|
|
70
|
-
config,
|
|
71
|
-
},
|
|
72
|
-
}
|
|
@@ -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,143 +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
|
-
]
|
|
28
|
-
|
|
29
|
-
const listOnly = (providers: string[]): LoginFlow => {
|
|
30
|
-
return LoginFlowFromJSON({
|
|
31
|
-
...oidcNodes,
|
|
32
|
-
ui: {
|
|
33
|
-
...oidcNodes.ui,
|
|
34
|
-
nodes: oidcNodes.ui.nodes.filter((node) => {
|
|
35
|
-
if (node.group !== "oidc" || node.attributes.node_type !== "input") {
|
|
36
|
-
return true
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return providers.includes(
|
|
40
|
-
(node.attributes.value as string).toLowerCase(),
|
|
41
|
-
)
|
|
42
|
-
}),
|
|
43
|
-
},
|
|
44
|
-
})
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
type LoginProxy = Record<(typeof providers)[number], boolean>
|
|
48
|
-
|
|
49
|
-
function LoginProxy(providers: LoginProxy) {
|
|
50
|
-
const flow = providers
|
|
51
|
-
? listOnly(Object.keys(providers).filter((key) => providers[key]))
|
|
52
|
-
: LoginFlowFromJSON(oidcNodes)
|
|
53
|
-
|
|
54
|
-
return <Login flow={flow} config={config} />
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
const meta = {
|
|
58
|
-
title: "Ory Elements/First Factor Login/Methods/Social Sign In",
|
|
59
|
-
component: LoginProxy,
|
|
60
|
-
parameters: {
|
|
61
|
-
layout: "centered",
|
|
62
|
-
},
|
|
63
|
-
} satisfies Meta<typeof LoginProxy>
|
|
64
|
-
|
|
65
|
-
export default meta
|
|
66
|
-
|
|
67
|
-
type Story = StoryObj<typeof meta>
|
|
68
|
-
|
|
69
|
-
export const OneSocialButton: Story = {
|
|
70
|
-
args: {
|
|
71
|
-
google: true,
|
|
72
|
-
},
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export const TwoSocialButtons: Story = {
|
|
76
|
-
args: {
|
|
77
|
-
google: true,
|
|
78
|
-
x: true,
|
|
79
|
-
},
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export const ThreeSocialButtons: Story = {
|
|
83
|
-
args: {
|
|
84
|
-
google: true,
|
|
85
|
-
x: true,
|
|
86
|
-
github: true,
|
|
87
|
-
},
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export const FourSocialButtons: Story = {
|
|
91
|
-
args: {
|
|
92
|
-
google: true,
|
|
93
|
-
x: true,
|
|
94
|
-
github: true,
|
|
95
|
-
linkedin: true,
|
|
96
|
-
},
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
export const FiveSocialButtons: Story = {
|
|
100
|
-
args: {
|
|
101
|
-
google: true,
|
|
102
|
-
x: true,
|
|
103
|
-
github: true,
|
|
104
|
-
linkedin: true,
|
|
105
|
-
auth0: true,
|
|
106
|
-
},
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export const SixSocialButtons: Story = {
|
|
110
|
-
args: {
|
|
111
|
-
google: true,
|
|
112
|
-
x: true,
|
|
113
|
-
github: true,
|
|
114
|
-
linkedin: true,
|
|
115
|
-
auth0: true,
|
|
116
|
-
apple: true,
|
|
117
|
-
},
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
export const SevenSocialButtons: Story = {
|
|
121
|
-
args: {
|
|
122
|
-
google: true,
|
|
123
|
-
x: true,
|
|
124
|
-
github: true,
|
|
125
|
-
linkedin: true,
|
|
126
|
-
auth0: true,
|
|
127
|
-
apple: true,
|
|
128
|
-
microsoft: true,
|
|
129
|
-
},
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export const AllGenericButton: Story = {
|
|
133
|
-
args: {
|
|
134
|
-
x: true,
|
|
135
|
-
...Object.keys(providers).reduce(
|
|
136
|
-
(acc, key) => {
|
|
137
|
-
acc[key] = true
|
|
138
|
-
return acc
|
|
139
|
-
},
|
|
140
|
-
{} as Record<(typeof providers)[number], boolean>,
|
|
141
|
-
),
|
|
142
|
-
},
|
|
143
|
-
}
|
|
@@ -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
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// Copyright © 2024 Ory Corp
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { SettingsFlowFromJSON } from "@ory/client-fetch"
|
|
5
|
-
import { Meta, StoryObj } from "@storybook/react"
|
|
6
|
-
import { config } from "../../utils"
|
|
7
|
-
import { Settings } from "../../../src/theme/default"
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Ory Elements/Settings/Methods/Everything",
|
|
11
|
-
component: Settings,
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: "centered",
|
|
14
|
-
},
|
|
15
|
-
} satisfies Meta<typeof Settings>
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
|
|
19
|
-
type Story = StoryObj<typeof meta>
|
|
20
|
-
|
|
21
|
-
export const ShowForm: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
flow: SettingsFlowFromJSON(
|
|
24
|
-
require("$snapshots/settings/all-methods/initial-form.json"),
|
|
25
|
-
),
|
|
26
|
-
config,
|
|
27
|
-
},
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const ShowFormChangesSaved: Story = {
|
|
31
|
-
args: {
|
|
32
|
-
flow: SettingsFlowFromJSON(
|
|
33
|
-
require("$snapshots/settings/all-methods/change-password.json"),
|
|
34
|
-
),
|
|
35
|
-
config,
|
|
36
|
-
},
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export const ShowFormTraitValidationError: Story = {
|
|
40
|
-
args: {
|
|
41
|
-
flow: SettingsFlowFromJSON(
|
|
42
|
-
require("$snapshots/settings/all-methods/change-trait.json"),
|
|
43
|
-
),
|
|
44
|
-
config,
|
|
45
|
-
},
|
|
46
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// Copyright © 2024 Ory Corp
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { SettingsFlowFromJSON } from "@ory/client-fetch"
|
|
5
|
-
import { Meta, StoryObj } from "@storybook/react"
|
|
6
|
-
import { config } from "../../utils"
|
|
7
|
-
import { Settings } from "../../../src/theme/default"
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Ory Elements/Settings/Methods/OIDC",
|
|
11
|
-
component: Settings,
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: "centered",
|
|
14
|
-
},
|
|
15
|
-
} satisfies Meta<typeof Settings>
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
|
|
19
|
-
type Story = StoryObj<typeof meta>
|
|
20
|
-
|
|
21
|
-
export const WithUnlinkProvider: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
flow: SettingsFlowFromJSON(
|
|
24
|
-
require("$snapshots/settings/oidc/with-provider.json"),
|
|
25
|
-
),
|
|
26
|
-
config,
|
|
27
|
-
},
|
|
28
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
// Copyright © 2024 Ory Corp
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
import { SettingsFlowFromJSON } from "@ory/client-fetch"
|
|
5
|
-
import { Meta, StoryObj } from "@storybook/react"
|
|
6
|
-
import { config } from "../../utils"
|
|
7
|
-
import { Settings } from "../../../src/theme/default"
|
|
8
|
-
|
|
9
|
-
const meta = {
|
|
10
|
-
title: "Ory Elements/Settings/Methods/Passkey",
|
|
11
|
-
component: Settings,
|
|
12
|
-
parameters: {
|
|
13
|
-
layout: "centered",
|
|
14
|
-
},
|
|
15
|
-
} satisfies Meta<typeof Settings>
|
|
16
|
-
|
|
17
|
-
export default meta
|
|
18
|
-
|
|
19
|
-
type Story = StoryObj<typeof meta>
|
|
20
|
-
|
|
21
|
-
export const ShowForm: Story = {
|
|
22
|
-
args: {
|
|
23
|
-
flow: SettingsFlowFromJSON(
|
|
24
|
-
require("$snapshots/settings/passkey/initial-form.json"),
|
|
25
|
-
),
|
|
26
|
-
config,
|
|
27
|
-
},
|
|
28
|
-
}
|