diff --git a/.prettierignore b/.prettierignore index e794a80b7..b3cfa0949 100644 --- a/.prettierignore +++ b/.prettierignore @@ -10,3 +10,4 @@ CONTRIBUTING.md docs .next .cache +api-report/* \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ca298e33b..69cbf5659 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13099,6 +13099,16 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/lodash.merge": { + "version": "4.6.9", + "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.9.tgz", + "integrity": "sha512-23sHDPmzd59kUgWyKGiOMO2Qb9YtqRO/x4IhkgNUiPQ1+5MUVqi6bCZeq9nBJ17msjIMbEIO5u+XW4Kz6aGUhQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/lodash": "*" + } + }, "node_modules/@types/mdx": { "version": "2.0.13", "resolved": "https://registry.npmjs.org/@types/mdx/-/mdx-2.0.13.tgz", @@ -25822,7 +25832,6 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, "license": "MIT" }, "node_modules/lodash.sortby": { @@ -34193,6 +34202,7 @@ "@ory/client-fetch": "^1.15.4", "clsx": "2.1.1", "input-otp": "1.2.4", + "lodash.merge": "4.6.2", "react-hook-form": "7.53.0", "react-intl": "6.7.0", "tailwind-merge": "2.5.2" @@ -34200,6 +34210,7 @@ "devDependencies": { "@hookform/devtools": "^4.3.1", "@svgr/plugin-svgo": "^8.1.0", + "@types/lodash.merge": "4.6.9", "esbuild-plugin-svgr": "^2.1.0", "eslint-plugin-react": "7.37.0", "postcss": "8.4.47", diff --git a/packages/elements-react-stories/.storybook/preview.tsx b/packages/elements-react-stories/.storybook/preview.tsx index 9ae98f12c..a3e59cdbf 100644 --- a/packages/elements-react-stories/.storybook/preview.tsx +++ b/packages/elements-react-stories/.storybook/preview.tsx @@ -1,4 +1,3 @@ -import { IntlProvider } from "@ory/elements-react" import type { Decorator, Preview } from "@storybook/react" import { chromaticModes } from "./modes" import "@ory/elements-react/theme/styles.css" @@ -28,11 +27,8 @@ const preview: Preview = { const withI18next: Decorator = (Story, context) => { const { locale } = context.globals - return ( - - - - ) + // TODO: this needs a refactor, because it doesn't pass the locale to the Ory Provider at the moment. + return } // export decorators for storybook to wrap your stories in diff --git a/packages/elements-react-stories/src/elements-react/components/login/1fa/all.stories.ts b/packages/elements-react-stories/src/elements-react/components/login/1fa/all.stories.ts index b5d41da30..3197882dc 100644 --- a/packages/elements-react-stories/src/elements-react/components/login/1fa/all.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/login/1fa/all.stories.ts @@ -3,7 +3,7 @@ import { LoginFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" -import { Login } from "../../../pages/login" +import { Login } from "@ory/elements-react/theme" import { config } from "../../../utils" const meta = { diff --git a/packages/elements-react-stories/src/elements-react/components/login/1fa/code.stories.ts b/packages/elements-react-stories/src/elements-react/components/login/1fa/code.stories.ts index 4a95de5cd..93b9bd77b 100644 --- a/packages/elements-react-stories/src/elements-react/components/login/1fa/code.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/login/1fa/code.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Login } from "../../../pages/login" +import { Login } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/login/1fa/custom.stories.tsx b/packages/elements-react-stories/src/elements-react/components/login/1fa/custom.stories.tsx index 7b145d092..b94537756 100644 --- a/packages/elements-react-stories/src/elements-react/components/login/1fa/custom.stories.tsx +++ b/packages/elements-react-stories/src/elements-react/components/login/1fa/custom.stories.tsx @@ -1,18 +1,18 @@ +import { LoginFlowFromJSON } from "@ory/client-fetch" import { - HeadlessSocialButtonProps, OryCard, OryCardContent, OryForm, OryFormGroups, OryFormSocialButtons, + OryNodeOIDCButtonProps, } from "@ory/elements-react" -import { FlowContextProps, Login } from "../../../pages/login" +import { Login, LoginFlowContextProps } from "@ory/elements-react/theme" import { config } from "../../../utils" -import { LoginFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" -const CustomSocialButton = ({ node }: HeadlessSocialButtonProps) => ( +const CustomSocialButton = ({ node }: OryNodeOIDCButtonProps) => (
(
) -const CustomComponents = ({ flow, config }: FlowContextProps) => { +const CustomComponents = ({ flow, config }: LoginFlowContextProps) => { return ( diff --git a/packages/elements-react-stories/src/elements-react/components/login/1fa/passkey.stories.ts b/packages/elements-react-stories/src/elements-react/components/login/1fa/passkey.stories.ts index 7360cfbcc..b5c85958c 100644 --- a/packages/elements-react-stories/src/elements-react/components/login/1fa/passkey.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/login/1fa/passkey.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Login } from "../../../pages/login" +import { Login } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/login/1fa/password.stories.ts b/packages/elements-react-stories/src/elements-react/components/login/1fa/password.stories.ts index 5152ad7b0..8ce8957fc 100644 --- a/packages/elements-react-stories/src/elements-react/components/login/1fa/password.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/login/1fa/password.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Login } from "../../../pages/login" +import { Login } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/registration/one-step/all-methods.stories.ts b/packages/elements-react-stories/src/elements-react/components/registration/one-step/all-methods.stories.ts index 0c811680b..5edb629d6 100644 --- a/packages/elements-react-stories/src/elements-react/components/registration/one-step/all-methods.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/registration/one-step/all-methods.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Registration } from "../../../pages/registration" +import { Registration } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/registration/one-step/password.stories.ts b/packages/elements-react-stories/src/elements-react/components/registration/one-step/password.stories.ts index e98aed4a5..1521783b9 100644 --- a/packages/elements-react-stories/src/elements-react/components/registration/one-step/password.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/registration/one-step/password.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Registration } from "../../../pages/registration" +import { Registration } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/registration/one-step/webauthn.stories.ts b/packages/elements-react-stories/src/elements-react/components/registration/one-step/webauthn.stories.ts index 0015fcabb..82416bf45 100644 --- a/packages/elements-react-stories/src/elements-react/components/registration/one-step/webauthn.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/registration/one-step/webauthn.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Registration } from "../../../pages/registration" +import { Registration } from "@ory/elements-react/theme" import { config } from "../../../utils" import { RegistrationFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/registration/two-step/all-methods.stories.ts b/packages/elements-react-stories/src/elements-react/components/registration/two-step/all-methods.stories.ts index f6f959ffa..d7cba7350 100644 --- a/packages/elements-react-stories/src/elements-react/components/registration/two-step/all-methods.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/registration/two-step/all-methods.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Registration } from "../../../pages/registration" +import { Registration } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/components/registration/two-step/password.stories.ts b/packages/elements-react-stories/src/elements-react/components/registration/two-step/password.stories.ts index fad32f600..ce50fac68 100644 --- a/packages/elements-react-stories/src/elements-react/components/registration/two-step/password.stories.ts +++ b/packages/elements-react-stories/src/elements-react/components/registration/two-step/password.stories.ts @@ -1,7 +1,7 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -import { Registration } from "../../../pages/registration" +import { Registration } from "@ory/elements-react/theme" import { config } from "../../../utils" import { LoginFlowFromJSON, RegistrationFlowFromJSON } from "@ory/client-fetch" import type { Meta, StoryObj } from "@storybook/react" diff --git a/packages/elements-react-stories/src/elements-react/pages/login.tsx b/packages/elements-react-stories/src/elements-react/pages/login.tsx deleted file mode 100644 index 7fdfc9fb8..000000000 --- a/packages/elements-react-stories/src/elements-react/pages/login.tsx +++ /dev/null @@ -1,34 +0,0 @@ -"use client" -import { FlowType, LoginFlow } from "@ory/client-fetch" -import { - OryCard, - OryClientConfiguration, - OryFlowComponents, - OryProvider, -} from "@ory/elements-react" -import { OryDefaultComponents } from "@ory/elements-react/theme" -import { PropsWithChildren } from "react" - -export type FlowContextProps = { - flow: LoginFlow - components?: Partial - config: OryClientConfiguration -} - -export function Login({ - flow, - config, - children, - components, -}: PropsWithChildren) { - return ( - - {children || } - - ) -} diff --git a/packages/elements-react-stories/src/elements-react/pages/registration.tsx b/packages/elements-react-stories/src/elements-react/pages/registration.tsx deleted file mode 100644 index c1076ee8d..000000000 --- a/packages/elements-react-stories/src/elements-react/pages/registration.tsx +++ /dev/null @@ -1,35 +0,0 @@ -"use client" - -import { Configuration, FlowType, RegistrationFlow } from "@ory/client-fetch" -import { - OryCard, - OryClientConfiguration, - OryFlowComponents, - OryProvider, -} from "@ory/elements-react" -import { OryDefaultComponents } from "@ory/elements-react/theme" -import { PropsWithChildren } from "react" - -export type FlowContextProps = { - flow: RegistrationFlow - components?: Partial - config: OryClientConfiguration -} - -export function Registration({ - flow, - config, - children, - components, -}: PropsWithChildren) { - return ( - - {children || } - - ) -} diff --git a/packages/elements-react/.gitignore b/packages/elements-react/.gitignore index 09370e39a..c07f23812 100644 --- a/packages/elements-react/.gitignore +++ b/packages/elements-react/.gitignore @@ -1,5 +1,4 @@ playwright/.cache/ playwright-report/* .last-run.json - -api-report/temp \ No newline at end of file +api-report/temp diff --git a/packages/elements-react/api-report/elements-react-theme.api.json b/packages/elements-react/api-report/elements-react-theme.api.json index af39ddd85..09698e725 100644 --- a/packages/elements-react/api-report/elements-react-theme.api.json +++ b/packages/elements-react/api-report/elements-react-theme.api.json @@ -184,7 +184,7 @@ { "kind": "Reference", "text": "OryCardProps", - "canonicalReference": "@ory/elements-react!~OryCardProps:type" + "canonicalReference": "@ory/elements-react!~OryCardRootProps:type" }, { "kind": "Content", @@ -377,8 +377,8 @@ }, { "kind": "Reference", - "text": "HeadlessFormProps", - "canonicalReference": "@ory/elements-react!~HeadlessFormProps:type" + "text": "OryFormRootProps", + "canonicalReference": "@ory/elements-react!~OryFormRootProps:type" }, { "kind": "Content", @@ -428,8 +428,8 @@ }, { "kind": "Reference", - "text": "HeadlessMessageProps", - "canonicalReference": "@ory/elements-react!~HeadlessMessageProps:type" + "text": "OryMessageContentProps", + "canonicalReference": "@ory/elements-react!~OryMessageContentProps:type" }, { "kind": "Content", @@ -730,21 +730,12 @@ }, { "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" + "text": "OryFlowComponentOverrides", + "canonicalReference": "@ory/elements-react!~OryFlowComponentOverrides:type" }, { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "OryFlowComponents", - "canonicalReference": "@ory/elements-react!~OryFlowComponents:type" - }, - { - "kind": "Content", - "text": ">;\n config: " + "text": ";\n config: " }, { "kind": "Reference", @@ -765,7 +756,7 @@ "name": "LoginFlowContextProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 10 + "endIndex": 8 } }, { diff --git a/packages/elements-react/api-report/elements-react-theme.api.md b/packages/elements-react/api-report/elements-react-theme.api.md index 2a4341bd3..5a3b9d45f 100644 --- a/packages/elements-react/api-report/elements-react-theme.api.md +++ b/packages/elements-react/api-report/elements-react-theme.api.md @@ -27,10 +27,10 @@ import { UiNodeTextAttributes } from '@ory/client-fetch'; import { UiText } from '@ory/client-fetch'; import { VerificationFlow } from '@ory/client-fetch'; -// Warning: (ae-forgotten-export) The symbol "OryCardProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "OryCardRootProps" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export function DefaultCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element; +export function DefaultCard({ children }: OryCardRootProps): react_jsx_runtime.JSX.Element; // Warning: (ae-forgotten-export) The symbol "OryCardContentProps" needs to be exported by the entry point index.d.ts // @@ -46,15 +46,15 @@ export function DefaultCardHeader(): react_jsx_runtime.JSX.Element; // @public (undocumented) export function DefaultCardLogo(): react_jsx_runtime.JSX.Element; -// Warning: (ae-forgotten-export) The symbol "HeadlessFormProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "OryFormRootProps" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren): react_jsx_runtime.JSX.Element; +export function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren): react_jsx_runtime.JSX.Element; -// Warning: (ae-forgotten-export) The symbol "HeadlessMessageProps" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "OryMessageContentProps" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export function DefaultMessage({ message }: HeadlessMessageProps): react_jsx_runtime.JSX.Element; +export function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element; // @public (undocumented) export function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null; @@ -76,7 +76,7 @@ export function Login({ flow, config, children, components: flowOverrideComponen // @public (undocumented) export type LoginFlowContextProps = { flow: LoginFlow; - components?: Partial; + components?: OryFlowComponentOverrides; config: OryClientConfiguration; }; @@ -122,6 +122,7 @@ export type VerificationFlowContextProps = { // // dist/theme/default/index.d.ts:25:5 - (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts // dist/theme/default/index.d.ts:26:5 - (ae-forgotten-export) The symbol "OryClientConfiguration" needs to be exported by the entry point index.d.ts +// dist/theme/default/index.d.ts:32:5 - (ae-forgotten-export) The symbol "OryFlowComponentOverrides" needs to be exported by the entry point index.d.ts // (No @packageDocumentation comment for this package) diff --git a/packages/elements-react/api-report/elements-react.api.json b/packages/elements-react/api-report/elements-react.api.json index 86f8d62e9..8a6165538 100644 --- a/packages/elements-react/api-report/elements-react.api.json +++ b/packages/elements-react/api-report/elements-react.api.json @@ -172,125 +172,10 @@ "name": "", "preserveMemberOrder": false, "members": [ - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!CustomLanguageFormats:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type CustomLanguageFormats = " - }, - { - "kind": "Content", - "text": "{\n [k in (typeof " - }, - { - "kind": "Reference", - "text": "LanguageCodes", - "canonicalReference": "@ory/elements-react!LanguageCodes:var" - }, - { - "kind": "Content", - "text": ")[number]]?: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "TranslationFile", - "canonicalReference": "@ory/elements-react!TranslationFile:type" - }, - { - "kind": "Content", - "text": ">;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "CustomLanguageFormats", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 8 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!CustomTranslations:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type CustomTranslations = " - }, - { - "kind": "Content", - "text": "{\n customTranslations: " - }, - { - "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "CustomLanguageFormats", - "canonicalReference": "@ory/elements-react!CustomLanguageFormats:type" - }, - { - "kind": "Content", - "text": ">;\n locale: (typeof " - }, - { - "kind": "Reference", - "text": "LanguageCodes", - "canonicalReference": "@ory/elements-react!LanguageCodes:var" - }, - { - "kind": "Content", - "text": ")[number];\n defaultLocale: (typeof " - }, - { - "kind": "Reference", - "text": "LanguageCodes", - "canonicalReference": "@ory/elements-react!LanguageCodes:var" - }, - { - "kind": "Content", - "text": ")[number];\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "CustomTranslations", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!ErrorFlowContainer:type", - "docComment": "", + "docComment": "/**\n * A flow container for the error flow\n *\n * @see\n *\n * OryFlow\n *\n * @see\n *\n * FlowError (Error flow)\n */\n", "excerptTokens": [ { "kind": "Content", @@ -298,8 +183,8 @@ }, { "kind": "Reference", - "text": "BaseFlow", - "canonicalReference": "@ory/elements-react!~BaseFlow:type" + "text": "OryFlow", + "canonicalReference": "@ory/elements-react!~OryFlow:type" }, { "kind": "Content", @@ -336,73 +221,10 @@ "endIndex": 7 } }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!FlowContainer:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type FlowContainer = " - }, - { - "kind": "Reference", - "text": "LoginFlowContainer", - "canonicalReference": "@ory/elements-react!LoginFlowContainer:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RegistrationFlowContainer", - "canonicalReference": "@ory/elements-react!RegistrationFlowContainer:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "RecoveryFlowContainer", - "canonicalReference": "@ory/elements-react!RecoveryFlowContainer:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "VerificationFlowContainer", - "canonicalReference": "@ory/elements-react!VerificationFlowContainer:type" - }, - { - "kind": "Content", - "text": " | " - }, - { - "kind": "Reference", - "text": "SettingsFlowContainer", - "canonicalReference": "@ory/elements-react!SettingsFlowContainer:type" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "FlowContainer", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } - }, { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!FlowContainerSetter:type", - "docComment": "", + "docComment": "/**\n * Function to set the flow container.\n */\n", "excerptTokens": [ { "kind": "Content", @@ -428,8 +250,8 @@ }, { "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" + "text": "OryFlowContainer", + "canonicalReference": "@ory/elements-react!OryFlowContainer:type" }, { "kind": "Content", @@ -451,7 +273,7 @@ { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!FlowContextValue:type", - "docComment": "", + "docComment": "/**\n * The return value of the OryFlowContext.\n */\n", "excerptTokens": [ { "kind": "Content", @@ -459,8 +281,8 @@ }, { "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" + "text": "OryFlowContainer", + "canonicalReference": "@ory/elements-react!OryFlowContainer:type" }, { "kind": "Content", @@ -488,73 +310,6 @@ "endIndex": 5 } }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!formatMessage:function(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function formatMessage(uiText: " - }, - { - "kind": "Reference", - "text": "UiText", - "canonicalReference": "@ory/client-fetch!UiText:interface" - }, - { - "kind": "Content", - "text": " | undefined" - }, - { - "kind": "Content", - "text": ", intl: " - }, - { - "kind": "Reference", - "text": "IntlShape", - "canonicalReference": "react-intl!IntlShape:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "string" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "uiText", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "isOptional": false - }, - { - "parameterName": "intl", - "parameterTypeTokenRange": { - "startIndex": 4, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "formatMessage" - }, { "kind": "Function", "canonicalReference": "@ory/elements-react!formElementId:function(1)", @@ -678,16 +433,39 @@ }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessAuthMethodListItemProps:type", + "canonicalReference": "@ory/elements-react!IntlProviderProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessAuthMethodListItemProps = " + "text": "type OryIntlProviderProps = " }, { "kind": "Content", - "text": "{\n onClick: () => void;\n group: string;\n}" + "text": "Translation extends " + }, + { + "kind": "Reference", + "text": "CustomTranslations", + "canonicalReference": "@ory/elements-react!~CustomTranslations:type" + }, + { + "kind": "Content", + "text": " ? " + }, + { + "kind": "Reference", + "text": "CustomTranslations", + "canonicalReference": "@ory/elements-react!~CustomTranslations:type" + }, + { + "kind": "Content", + "text": " : " + }, + { + "kind": "Reference", + "text": "SupportedTranslations", + "canonicalReference": "@ory/elements-react!SupportedTranslations:type" }, { "kind": "Content", @@ -696,60 +474,91 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessAuthMethodListItemProps", + "name": "IntlProviderProps", + "typeParameters": [ + { + "typeParameterName": "Translation", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], "typeTokenRange": { "startIndex": 1, - "endIndex": 2 + "endIndex": 7 } }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessButtonProps:type", + "canonicalReference": "@ory/elements-react!Locale:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessButtonProps = " + "text": "type Locale = " }, { "kind": "Content", - "text": "{\n attributes: " + "text": "keyof typeof " }, { "kind": "Reference", - "text": "UiNodeInputAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" + "text": "locales", + "canonicalReference": "@ory/elements-react!OryLocales:namespace" }, { "kind": "Content", - "text": ";\n node: " + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "Locale", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!LoginFlowContainer:type", + "docComment": "/**\n * A flow container for the login flow\n *\n * @see\n *\n * OryFlow\n *\n * @see\n *\n * LoginFlow\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type LoginFlowContainer = " }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "OryFlow", + "canonicalReference": "@ory/elements-react!~OryFlow:type" }, { "kind": "Content", - "text": ";\n} & " + "text": "<" }, { "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" + "text": "FlowType.Login", + "canonicalReference": "@ory/client-fetch!FlowType.Login:member" }, { "kind": "Content", - "text": "<" + "text": ", " }, { "kind": "Reference", - "text": "ComponentPropsWithoutRef", - "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" + "text": "LoginFlow", + "canonicalReference": "@ory/client-fetch!LoginFlow:interface" }, { "kind": "Content", - "text": "<\"button\">, \"children\">" + "text": ">" }, { "kind": "Content", @@ -758,60 +567,33 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessButtonProps", + "name": "LoginFlowContainer", "typeTokenRange": { "startIndex": 1, - "endIndex": 10 + "endIndex": 7 } }, { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessCurrentIdentifierProps:type", + "kind": "Function", + "canonicalReference": "@ory/elements-react!messageTestId:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessCurrentIdentifierProps = " - }, - { - "kind": "Content", - "text": "{\n attributes: " - }, - { - "kind": "Reference", - "text": "UiNodeInputAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" - }, - { - "kind": "Content", - "text": ";\n node: " - }, - { - "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" - }, - { - "kind": "Content", - "text": ";\n onClick?: () => void;\n href?: string;\n} & " + "text": "declare function messageTestId(message: " }, { "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" + "text": "UiText", + "canonicalReference": "@ory/client-fetch!UiText:interface" }, { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ComponentPropsWithoutRef", - "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" + "text": "): " }, { "kind": "Content", - "text": "<\"button\">, \"children\" | \"onClick\">" + "text": "{\n \"data-testid\": string;\n}" }, { "kind": "Content", @@ -819,115 +601,99 @@ } ], "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, "releaseTag": "Public", - "name": "HeadlessCurrentIdentifierProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 10 - } + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "messageTestId" }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessFormProps:type", + "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessFormProps = " + "text": "type OnSubmitHandlerProps & {\n onSubmit: " + "text": " | " }, { "kind": "Reference", - "text": "FormEventHandler", - "canonicalReference": "@types/react!React.FormEventHandler:type" + "text": "UpdateRegistrationFlowBody", + "canonicalReference": "@ory/client-fetch!UpdateRegistrationFlowBody:type" }, { "kind": "Content", - "text": "<" + "text": " | " }, { "kind": "Reference", - "text": "HTMLFormElement", - "canonicalReference": "!HTMLFormElement:interface" + "text": "UpdateVerificationFlowBody", + "canonicalReference": "@ory/client-fetch!UpdateVerificationFlowBody:type" }, { "kind": "Content", - "text": ">;\n}" + "text": " | " }, { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "HeadlessFormProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessGroupContainerProps:type", - "docComment": "", - "excerptTokens": [ + "kind": "Reference", + "text": "UpdateRecoveryFlowBody", + "canonicalReference": "@ory/client-fetch!UpdateRecoveryFlowBody:type" + }, { "kind": "Content", - "text": "type HeadlessGroupContainerProps = " + "text": " | " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "UpdateSettingsFlowBody", + "canonicalReference": "@ory/client-fetch!UpdateSettingsFlowBody:type" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "HeadlessGroupContainerProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessGroupProps:type", - "docComment": "", - "excerptTokens": [ + "text": "> = " + }, { "kind": "Content", - "text": "type HeadlessGroupProps = " + "text": "{\n setFlowContainer: (flowContainer: " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "OryFlowContainer", + "canonicalReference": "@ory/elements-react!OryFlowContainer:type" }, { "kind": "Content", - "text": "<{\n groups: " + "text": ") => void;\n body: T;\n onRedirect: " }, { "kind": "Reference", - "text": "UiNodeGroupEnum", - "canonicalReference": "@ory/client-fetch!UiNodeGroupEnum:type" + "text": "OnRedirectHandler", + "canonicalReference": "@ory/client-fetch!OnRedirectHandler:type" }, { "kind": "Content", - "text": "[];\n}>" + "text": ";\n}" }, { "kind": "Content", @@ -936,42 +702,84 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessGroupProps", + "name": "OnSubmitHandlerProps", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 10 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], "typeTokenRange": { - "startIndex": 1, - "endIndex": 5 + "startIndex": 11, + "endIndex": 16 } }, { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessImageProps:type", + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryCard:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessImageProps = " + "text": "declare function OryCard({ children }: " + }, + { + "kind": "Reference", + "text": "PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" }, { "kind": "Content", - "text": "{\n attributes: " + "text": "): " }, { "kind": "Reference", - "text": "UiNodeImageAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeImageAttributes:interface" + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" }, { "kind": "Content", - "text": ";\n node: " - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ { - "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "OryCard" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryCardAuthMethodListItemProps:type", + "docComment": "/**\n * Props for the AuthMethodListItem component. This component is used to render a single auth method in the AuthMethodList component.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type OryCardAuthMethodListItemProps = " }, { "kind": "Content", - "text": ";\n}" + "text": "{\n onClick: () => void;\n group: string;\n}" }, { "kind": "Content", @@ -980,51 +788,72 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessImageProps", + "name": "OryCardAuthMethodListItemProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 6 + "endIndex": 2 } }, { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessInputProps:type", + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryCardContent:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessInputProps = " - }, - { - "kind": "Content", - "text": "{\n attributes: " + "text": "declare function OryCardContent({ children }: " }, { "kind": "Reference", - "text": "UiNodeInputAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" + "text": "OryCardContentProps", + "canonicalReference": "@ory/elements-react!OryCardContentProps:type" }, { "kind": "Content", - "text": ";\n node: " + "text": "): " }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" }, { "kind": "Content", - "text": ";\n onClick?: " - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ { - "kind": "Reference", - "text": "MouseEventHandler", - "canonicalReference": "@types/react!React.MouseEventHandler:type" - }, + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "OryCardContent" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryCardContentProps:type", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": ";\n}" + "text": "type OryCardContentProps = " + }, + { + "kind": "Reference", + "text": "PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" }, { "kind": "Content", @@ -1033,51 +862,89 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessInputProps", + "name": "OryCardContentProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 8 + "endIndex": 2 } }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessLabelProps:type", + "canonicalReference": "@ory/elements-react!OryCardDividerProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessLabelProps = " + "text": "type OryCardDividerProps = " }, { - "kind": "Content", - "text": "{\n attributes: " + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" }, { - "kind": "Reference", - "text": "UiNodeInputAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" + "kind": "Content", + "text": "" }, { "kind": "Content", - "text": ";\n node: " + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryCardDividerProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryCardFooter:function(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "declare function OryCardFooter(): " }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" }, { "kind": "Content", - "text": ";\n} & " + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OryCardFooter" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryCardFooterProps:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type OryCardFooterProps = " }, { "kind": "Reference", - "text": "ComponentPropsWithoutRef", - "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" + "text": "Record", + "canonicalReference": "!Record:type" }, { "kind": "Content", - "text": "<\"label\">" + "text": "" }, { "kind": "Content", @@ -1086,60 +953,85 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessLabelProps", + "name": "OryCardFooterProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 8 + "endIndex": 3 } }, { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessLinkButtonProps:type", + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryCardHeader:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessLinkButtonProps = " - }, - { - "kind": "Content", - "text": "{\n attributes: " + "text": "declare function OryCardHeader(): " }, { "kind": "Reference", - "text": "UiNodeAnchorAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeAnchorAttributes:interface" + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" }, { "kind": "Content", - "text": ";\n node: " + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OryCardHeader" + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryCardHeaderProps:type", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "type OryCardHeaderProps = " }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "Record", + "canonicalReference": "!Record:type" }, { "kind": "Content", - "text": ";\n} & " + "text": "" }, { - "kind": "Reference", - "text": "Omit", - "canonicalReference": "!Omit:type" - }, + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryCardHeaderProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryCardProps:type", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": "<" + "text": "type OryCardRootProps = " }, { "kind": "Reference", - "text": "ComponentPropsWithoutRef", - "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" - }, - { - "kind": "Content", - "text": "<\"a\">, \"children\">" + "text": "PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" }, { "kind": "Content", @@ -1148,25 +1040,25 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessLinkButtonProps", + "name": "OryCardProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 10 + "endIndex": 2 } }, { "kind": "Function", - "canonicalReference": "@ory/elements-react!HeadlessMessage:function(1)", + "canonicalReference": "@ory/elements-react!OryCardValidationMessages:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function HeadlessMessage({ message }: " + "text": "declare function OryCardValidationMessages({ ...props }: " }, { "kind": "Reference", - "text": "HeadlessMessageProps", - "canonicalReference": "@ory/elements-react!HeadlessMessageProps:type" + "text": "OryMessageRootProps", + "canonicalReference": "@ory/elements-react!OryMessageRootProps:type" }, { "kind": "Content", @@ -1177,6 +1069,10 @@ "text": "react_jsx_runtime.JSX.Element", "canonicalReference": "@types/react!JSX.Element:interface" }, + { + "kind": "Content", + "text": " | null" + }, { "kind": "Content", "text": ";" @@ -1185,13 +1081,13 @@ "fileUrlPath": "dist/index.d.ts", "returnTypeTokenRange": { "startIndex": 3, - "endIndex": 4 + "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { - "parameterName": "{ message }", + "parameterName": "{ ...props }", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -1199,29 +1095,38 @@ "isOptional": false } ], - "name": "HeadlessMessage" + "name": "OryCardValidationMessages" }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessMessageProps:type", + "canonicalReference": "@ory/elements-react!OryClientConfiguration:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessMessageProps = " + "text": "type OryClientConfiguration = " }, { "kind": "Content", - "text": "{\n message: " + "text": "{\n name: string;\n logoUrl?: string;\n stylesheet?: string;\n favicon?: string;\n sdk: {\n url: string;\n options?: " }, { "kind": "Reference", - "text": "UiText", - "canonicalReference": "@ory/client-fetch!UiText:interface" + "text": "Partial", + "canonicalReference": "!Partial:type" }, { "kind": "Content", - "text": ";\n}" + "text": "<" + }, + { + "kind": "Reference", + "text": "ConfigurationParameters", + "canonicalReference": "@ory/client-fetch!ConfigurationParameters:interface" + }, + { + "kind": "Content", + "text": ">;\n };\n project: {\n registration_enabled: boolean;\n verification_enabled: boolean;\n recovery_enabled: boolean;\n recovery_ui_url: string;\n registration_ui_url: string;\n verification_ui_url: string;\n login_ui_url: string;\n };\n}" }, { "kind": "Content", @@ -1230,56 +1135,60 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessMessageProps", + "name": "OryClientConfiguration", "typeTokenRange": { "startIndex": 1, - "endIndex": 4 + "endIndex": 6 } }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessMessagesProps:type", + "canonicalReference": "@ory/elements-react!OryCurrentIdentifierProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessMessagesProps = " + "text": "type OryCurrentIdentifierProps = " + }, + { + "kind": "Content", + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "DetailedHTMLProps", - "canonicalReference": "@types/react!React.DetailedHTMLProps:type" + "text": "UiNodeInputAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" }, { "kind": "Content", - "text": "<" + "text": ";\n node: " }, { "kind": "Reference", - "text": "HTMLAttributes", - "canonicalReference": "@types/react!React.HTMLAttributes:interface" + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" }, { "kind": "Content", - "text": "<" + "text": ";\n onClick?: () => void;\n href?: string;\n} & " }, { "kind": "Reference", - "text": "HTMLDivElement", - "canonicalReference": "!HTMLDivElement:interface" + "text": "Omit", + "canonicalReference": "!Omit:type" }, { "kind": "Content", - "text": ">, " + "text": "<" }, { "kind": "Reference", - "text": "HTMLDivElement", - "canonicalReference": "!HTMLDivElement:interface" + "text": "ComponentPropsWithoutRef", + "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" }, { "kind": "Content", - "text": ">" + "text": "<\"button\">, \"children\" | \"onClick\">" }, { "kind": "Content", @@ -1288,38 +1197,38 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessMessagesProps", + "name": "OryCurrentIdentifierProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 9 + "endIndex": 10 } }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessSocialButtonContainerProps:type", + "canonicalReference": "@ory/elements-react!OryFlowComponentOverrides:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessSocialButtonContainerProps = " + "text": "type OryFlowComponentOverrides = " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "DeepPartialTwoLevels", + "canonicalReference": "@ory/elements-react!~DeepPartialTwoLevels:type" }, { "kind": "Content", - "text": "<{\n nodes: " + "text": "<" }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "OryFlowComponents", + "canonicalReference": "@ory/elements-react!OryFlowComponents:type" }, { "kind": "Content", - "text": "[];\n}>" + "text": ">" }, { "kind": "Content", @@ -1328,7 +1237,7 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "HeadlessSocialButtonContainerProps", + "name": "OryFlowComponentOverrides", "typeTokenRange": { "startIndex": 1, "endIndex": 5 @@ -1336,199 +1245,165 @@ }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessSocialButtonProps:type", - "docComment": "", + "canonicalReference": "@ory/elements-react!OryFlowComponents:type", + "docComment": "/**\n * A record of all the components that are used in the OryForm component.\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "type HeadlessSocialButtonProps = " + "text": "type OryFlowComponents = " + }, + { + "kind": "Content", + "text": "{\n Node: {\n Button: " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": "<{\n node: " + "text": "<" }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "OryNodeButtonProps", + "canonicalReference": "@ory/elements-react!OryNodeButtonProps:type" }, { "kind": "Content", - "text": ";\n attributes: " + "text": ">;\n OIDCButton: " }, { "kind": "Reference", - "text": "UiNodeInputAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": ";\n onClick?: () => void;\n}>" + "text": "<" }, { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "HeadlessSocialButtonProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessSocialButtonsProps:type", - "docComment": "", - "excerptTokens": [ + "kind": "Reference", + "text": "OryNodeOIDCButtonProps", + "canonicalReference": "@ory/elements-react!OryNodeOIDCButtonProps:type" + }, { "kind": "Content", - "text": "type HeadlessSocialButtonsProps = " + "text": ">;\n CurrentIdentifierButton: " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": "<{\n hideDivider?: boolean;\n}>" + "text": "<" }, { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "HeadlessSocialButtonsProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HeadlessTextProps:type", - "docComment": "", - "excerptTokens": [ + "kind": "Reference", + "text": "OryCurrentIdentifierProps", + "canonicalReference": "@ory/elements-react!OryCurrentIdentifierProps:type" + }, { "kind": "Content", - "text": "type HeadlessTextProps = " + "text": ">;\n Anchor: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": "{\n attributes: " + "text": "<" }, { "kind": "Reference", - "text": "UiNodeTextAttributes", - "canonicalReference": "@ory/client-fetch!UiNodeTextAttributes:interface" + "text": "OryNodeAnchorProps", + "canonicalReference": "@ory/elements-react!OryNodeAnchorProps:type" }, { "kind": "Content", - "text": ";\n node: " + "text": ">;\n Input: " }, { "kind": "Reference", - "text": "UiNode", - "canonicalReference": "@ory/client-fetch!UiNode:interface" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": ";\n}" + "text": "<" }, { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "HeadlessTextProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 6 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!HorizontalDividerProps:type", - "docComment": "", - "excerptTokens": [ + "kind": "Reference", + "text": "OryNodeInputProps", + "canonicalReference": "@ory/elements-react!OryNodeInputProps:type" + }, { "kind": "Content", - "text": "type HorizontalDividerProps = " + "text": ">;\n CodeInput: " }, { "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": "" + "text": "<" + }, + { + "kind": "Reference", + "text": "OryNodeInputProps", + "canonicalReference": "@ory/elements-react!OryNodeInputProps:type" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "HorizontalDividerProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!IntlProvider:function(1)", - "docComment": "", - "excerptTokens": [ + "text": ">;\n Image: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, { "kind": "Content", - "text": "IntlProvider: ;\n Label: " }, { "kind": "Reference", - "text": "SupportedTranslations", - "canonicalReference": "@ory/elements-react!SupportedTranslations:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": " = " + "text": "<" }, { "kind": "Reference", - "text": "SupportedTranslations", - "canonicalReference": "@ory/elements-react!SupportedTranslations:type" + "text": "OryNodeLabelProps", + "canonicalReference": "@ory/elements-react!OryNodeLabelProps:type" }, { "kind": "Content", - "text": ">({ children, ...props }: " + "text": ">;\n Checkbox: " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", @@ -1536,25 +1411,35 @@ }, { "kind": "Reference", - "text": "IntlProviderProps", - "canonicalReference": "@ory/elements-react!IntlProviderProps:type" + "text": "OryNodeInputProps", + "canonicalReference": "@ory/elements-react!OryNodeInputProps:type" }, { "kind": "Content", - "text": ">" + "text": ">;\n Text: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": ") => " + "text": "<" + }, + { + "kind": "Reference", + "text": "OryNodeTextProps", + "canonicalReference": "@ory/elements-react!OryNodeTextProps:type" }, { "kind": "Content", - "text": "string | number | boolean | " + "text": ">;\n };\n Card: {\n Root: " }, { "kind": "Reference", - "text": "Iterable", - "canonicalReference": "!Iterable:interface" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", @@ -1562,765 +1447,116 @@ }, { "kind": "Reference", - "text": "react.ReactNode", - "canonicalReference": "@types/react!React.ReactNode:type" + "text": "OryCardRootProps", + "canonicalReference": "@ory/elements-react!OryCardProps:type" }, { "kind": "Content", - "text": "> | " + "text": ">;\n Footer: " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": " | null | undefined" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 12, - "endIndex": 19 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ + "text": "<" + }, { - "parameterName": "{ children, ...props }", - "parameterTypeTokenRange": { - "startIndex": 7, - "endIndex": 11 - }, - "isOptional": false - } - ], - "typeParameters": [ + "kind": "Reference", + "text": "OryCardFooterProps", + "canonicalReference": "@ory/elements-react!OryCardFooterProps:type" + }, { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 4 - }, - "defaultTypeTokenRange": { - "startIndex": 5, - "endIndex": 6 - } - } - ], - "name": "IntlProvider" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!IntlProviderProps:type", - "docComment": "", - "excerptTokens": [ + "kind": "Content", + "text": ">;\n Header: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, { "kind": "Content", - "text": "type IntlProviderProps = " + "text": "<" + }, + { + "kind": "Reference", + "text": "OryCardRootProps", + "canonicalReference": "@ory/elements-react!OryCardProps:type" }, { "kind": "Content", - "text": "Type extends " + "text": ">;\n Content: " }, { "kind": "Reference", - "text": "CustomTranslations", - "canonicalReference": "@ory/elements-react!CustomTranslations:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": " ? " + "text": "<" }, { "kind": "Reference", - "text": "CustomTranslations", - "canonicalReference": "@ory/elements-react!CustomTranslations:type" + "text": "OryCardContentProps", + "canonicalReference": "@ory/elements-react!OryCardContentProps:type" }, { "kind": "Content", - "text": " : " + "text": ">;\n Logo: " }, { "kind": "Reference", - "text": "SupportedTranslations", - "canonicalReference": "@ory/elements-react!SupportedTranslations:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "IntlProviderProps", - "typeParameters": [ + "text": ";\n Divider: " + }, { - "typeParameterName": "Type", - "constraintTokenRange": { - "startIndex": 0, - "endIndex": 0 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!isCustomTranslations:function(1)", - "docComment": "", - "excerptTokens": [ + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" + }, { "kind": "Content", - "text": "isCustomTranslations: (o: " + "text": "<" + }, + { + "kind": "Reference", + "text": "OryCardDividerProps", + "canonicalReference": "@ory/elements-react!OryCardDividerProps:type" }, { "kind": "Content", - "text": "unknown" + "text": ">;\n AuthMethodListItem: " + }, + { + "kind": "Reference", + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", - "text": ") => " + "text": "<" }, { "kind": "Reference", - "text": "o", - "canonicalReference": "@ory/elements-react!~o" + "text": "OryCardAuthMethodListItemProps", + "canonicalReference": "@ory/elements-react!OryCardAuthMethodListItemProps:type" }, { "kind": "Content", - "text": " is " + "text": ">;\n };\n Form: {\n Root: " }, { "kind": "Reference", - "text": "CustomTranslations", - "canonicalReference": "@ory/elements-react!CustomTranslations:type" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 6 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "o", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "isCustomTranslations" - }, - { - "kind": "Variable", - "canonicalReference": "@ory/elements-react!LanguageCodes:var", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "LanguageCodes: " - }, - { - "kind": "Content", - "text": "readonly [\"ab\", \"aa\", \"af\", \"sq\", \"am\", \"ar\", \"hy\", \"as\", \"ay\", \"az\", \"ba\", \"eu\", \"bn\", \"dz\", \"bh\", \"bi\", \"br\", \"bg\", \"my\", \"be\", \"km\", \"ca\", \"zh\", \"co\", \"hr\", \"cs\", \"da\", \"nl\", \"en\", \"eo\", \"et\", \"fo\", \"fj\", \"fi\", \"fr\", \"fy\", \"gd\", \"gl\", \"ka\", \"de\", \"el\", \"kl\", \"gn\", \"gu\", \"ha\", \"iw\", \"hi\", \"hu\", \"is\", \"in\", \"ia\", \"ie\", \"ik\", \"ga\", \"it\", \"ja\", \"jw\", \"kn\", \"ks\", \"kk\", \"rw\", \"ky\", \"rn\", \"ko\", \"ku\", \"lo\", \"la\", \"lv\", \"ln\", \"lt\", \"mk\", \"mg\", \"ms\", \"ml\", \"mt\", \"mi\", \"mr\", \"mo\", \"mn\", \"na\", \"ne\", \"no\", \"oc\", \"or\", \"om\", \"ps\", \"fa\", \"pl\", \"pt\", \"pa\", \"qu\", \"rm\", \"ro\", \"ru\", \"sm\", \"sg\", \"sa\", \"sr\", \"sh\", \"st\", \"tn\", \"sn\", \"sd\", \"si\", \"ss\", \"sk\", \"sl\", \"so\", \"es\", \"su\", \"sw\", \"sv\", \"tl\", \"tg\", \"ta\", \"tt\", \"te\", \"th\", \"bo\", \"ti\", \"to\", \"ts\", \"tr\", \"tk\", \"tw\", \"uk\", \"ur\", \"uz\", \"vi\", \"vo\", \"cy\", \"wo\", \"xh\", \"ji\", \"yo\", \"zu\"]" - } - ], - "fileUrlPath": "dist/index.d.ts", - "isReadonly": true, - "releaseTag": "Public", - "name": "LanguageCodes", - "variableTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!Locale:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type Locale = " - }, - { - "kind": "Content", - "text": "keyof typeof " - }, - { - "kind": "Reference", - "text": "locales", - "canonicalReference": "@ory/elements-react!OryLocales:namespace" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "Locale", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 3 - } - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!LoginFlowContainer:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type LoginFlowContainer = " - }, - { - "kind": "Reference", - "text": "BaseFlow", - "canonicalReference": "@ory/elements-react!~BaseFlow:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "FlowType.Login", - "canonicalReference": "@ory/client-fetch!FlowType.Login:member" - }, - { - "kind": "Content", - "text": ", " - }, - { - "kind": "Reference", - "text": "LoginFlow", - "canonicalReference": "@ory/client-fetch!LoginFlow:interface" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "LoginFlowContainer", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 7 - } - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!messageTestId:function(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function messageTestId(message: " - }, - { - "kind": "Reference", - "text": "UiText", - "canonicalReference": "@ory/client-fetch!UiText:interface" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Content", - "text": "{\n \"data-testid\": string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "message", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "messageTestId" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type OnSubmitHandlerProps = " - }, - { - "kind": "Content", - "text": "{\n setFlowContainer: (flowContainer: " - }, - { - "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" - }, - { - "kind": "Content", - "text": ") => void;\n body: T;\n onRedirect: " - }, - { - "kind": "Reference", - "text": "OnRedirectHandler", - "canonicalReference": "@ory/client-fetch!OnRedirectHandler:type" - }, - { - "kind": "Content", - "text": ";\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "OnSubmitHandlerProps", - "typeParameters": [ - { - "typeParameterName": "T", - "constraintTokenRange": { - "startIndex": 1, - "endIndex": 10 - }, - "defaultTypeTokenRange": { - "startIndex": 0, - "endIndex": 0 - } - } - ], - "typeTokenRange": { - "startIndex": 11, - "endIndex": 16 - } - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!onSubmitLogin:function(1)", - "docComment": "/**\n * Use this method to submit a login flow. This method is used in the `onSubmit` handler of the login form.\n *\n * @param config - The configuration object.\n *\n * @param flow - The flow object.\n *\n * @param setFlowContainer - This method is used to update the flow container when a validation error occurs, for example.\n *\n * @param body - The form values to submit.\n *\n * @param onRedirect - This method is used to redirect the user to a different page.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function onSubmitLogin({ config, flow }: " - }, - { - "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" - }, - { - "kind": "Content", - "text": ", { setFlowContainer, body, onRedirect, }: " - }, - { - "kind": "Reference", - "text": "OnSubmitHandlerProps", - "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "UpdateLoginFlowBody", - "canonicalReference": "@ory/client-fetch!UpdateLoginFlowBody:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ config, flow }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "{ setFlowContainer, body, onRedirect, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "onSubmitLogin" - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!onSubmitRecovery:function(1)", - "docComment": "/**\n * Use this method to submit a recovery flow. This method is used in the `onSubmit` handler of the recovery form.\n *\n * @param config - The configuration object.\n *\n * @param flow - The flow object.\n *\n * @param setFlowContainer - This method is used to update the flow container when a validation error occurs, for example.\n *\n * @param body - The form values to submit.\n *\n * @param onRedirect - This method is used to redirect the user to a different page.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function onSubmitRecovery({ config, flow }: " - }, - { - "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" - }, - { - "kind": "Content", - "text": ", { setFlowContainer, body, onRedirect, }: " - }, - { - "kind": "Reference", - "text": "OnSubmitHandlerProps", - "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "UpdateRecoveryFlowBody", - "canonicalReference": "@ory/client-fetch!UpdateRecoveryFlowBody:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ config, flow }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "{ setFlowContainer, body, onRedirect, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "onSubmitRecovery" - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!onSubmitRegistration:function(1)", - "docComment": "/**\n * Use this method to submit a registration flow. This method is used in the `onSubmit` handler of the registration form.\n *\n * @param config - The configuration object.\n *\n * @param flow - The flow object.\n *\n * @param setFlowContainer - This method is used to update the flow container when a validation error occurs, for example.\n *\n * @param body - The form values to submit.\n *\n * @param onRedirect - This method is used to redirect the user to a different page.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function onSubmitRegistration({ config, flow }: " - }, - { - "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" - }, - { - "kind": "Content", - "text": ", { setFlowContainer, body, onRedirect, }: " - }, - { - "kind": "Reference", - "text": "OnSubmitHandlerProps", - "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "UpdateRegistrationFlowBody", - "canonicalReference": "@ory/client-fetch!UpdateRegistrationFlowBody:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ config, flow }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "{ setFlowContainer, body, onRedirect, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "onSubmitRegistration" - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!onSubmitSettings:function(1)", - "docComment": "/**\n * Use this method to submit a settings flow. This method is used in the `onSubmit` handler of the settings form.\n *\n * @param config - The configuration object.\n *\n * @param flow - The flow object.\n *\n * @param setFlowContainer - This method is used to update the flow container when a validation error occurs, for example.\n *\n * @param body - The form values to submit.\n *\n * @param onRedirect - This method is used to redirect the user to a different page.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function onSubmitSettings({ config, flow }: " - }, - { - "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" - }, - { - "kind": "Content", - "text": ", { setFlowContainer, body, onRedirect, }: " - }, - { - "kind": "Reference", - "text": "OnSubmitHandlerProps", - "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "UpdateSettingsFlowBody", - "canonicalReference": "@ory/client-fetch!UpdateSettingsFlowBody:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ config, flow }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "{ setFlowContainer, body, onRedirect, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "onSubmitSettings" - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!onSubmitVerification:function(1)", - "docComment": "/**\n * Use this method to submit a verification flow. This method is used in the `onSubmit` handler of the verification form.\n *\n * @param config - The configuration object.\n *\n * @param flow - The flow object.\n *\n * @param setFlowContainer - This method is used to update the flow container when a validation error occurs, for example.\n *\n * @param body - The form values to submit.\n *\n * @param onRedirect - This method is used to redirect the user to a different page.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function onSubmitVerification({ config, flow }: " - }, - { - "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" - }, - { - "kind": "Content", - "text": ", { setFlowContainer, body, onRedirect, }: " - }, - { - "kind": "Reference", - "text": "OnSubmitHandlerProps", - "canonicalReference": "@ory/elements-react!OnSubmitHandlerProps:type" + "text": "ComponentType", + "canonicalReference": "@types/react!React.ComponentType:type" }, { "kind": "Content", @@ -2328,117 +1564,12 @@ }, { "kind": "Reference", - "text": "UpdateVerificationFlowBody", - "canonicalReference": "@ory/client-fetch!UpdateVerificationFlowBody:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "Promise", - "canonicalReference": "!Promise:interface" - }, - { - "kind": "Content", - "text": "" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 8, - "endIndex": 10 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ config, flow }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - }, - { - "parameterName": "{ setFlowContainer, body, onRedirect, }", - "parameterTypeTokenRange": { - "startIndex": 3, - "endIndex": 7 - }, - "isOptional": false - } - ], - "name": "onSubmitVerification" - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryCard:function(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function OryCard({ children }: " - }, - { - "kind": "Reference", - "text": "OryCardProps", - "canonicalReference": "@ory/elements-react!OryCardProps:type" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "OryCard" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryCardComponents:type", - "docComment": "/**\n * Card components are used to show login, registration, recovery, and verification flows.\n */\n", - "excerptTokens": [ - { - "kind": "Content", - "text": "type OryCardComponents = " + "text": "OryFormRootProps", + "canonicalReference": "@ory/elements-react!OryFormRootProps:type" }, { "kind": "Content", - "text": "{\n Card: " + "text": ">;\n OIDCRoot: " }, { "kind": "Reference", @@ -2451,12 +1582,12 @@ }, { "kind": "Reference", - "text": "OryCardProps", - "canonicalReference": "@ory/elements-react!OryCardProps:type" + "text": "OryFormOIDCRootProps", + "canonicalReference": "@ory/elements-react!OryFormOIDCRootProps:type" }, { "kind": "Content", - "text": ">;\n CardFooter: " + "text": ">;\n Group: " }, { "kind": "Reference", @@ -2469,12 +1600,12 @@ }, { "kind": "Reference", - "text": "OryCardFooterProps", - "canonicalReference": "@ory/elements-react!OryCardFooterProps:type" + "text": "OryFormGroupProps", + "canonicalReference": "@ory/elements-react!OryFormGroupProps:type" }, { "kind": "Content", - "text": ">;\n CardHeader: " + "text": ">;\n };\n Message: {\n Root: " }, { "kind": "Reference", @@ -2487,12 +1618,12 @@ }, { "kind": "Reference", - "text": "OryCardProps", - "canonicalReference": "@ory/elements-react!OryCardProps:type" + "text": "OryMessageRootProps", + "canonicalReference": "@ory/elements-react!OryMessageRootProps:type" }, { "kind": "Content", - "text": ">;\n CardContent: " + "text": ">;\n Content: " }, { "kind": "Reference", @@ -2505,21 +1636,12 @@ }, { "kind": "Reference", - "text": "OryCardContentProps", - "canonicalReference": "@ory/elements-react!OryCardContentProps:type" - }, - { - "kind": "Content", - "text": ">;\n CardLogo: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "OryMessageContentProps", + "canonicalReference": "@ory/elements-react!OryMessageContentProps:type" }, { "kind": "Content", - "text": ";\n}" + "text": ">;\n };\n}" }, { "kind": "Content", @@ -2528,132 +1650,61 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryCardComponents", + "name": "OryFlowComponents", "typeTokenRange": { "startIndex": 1, - "endIndex": 20 + "endIndex": 88 } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryCardContent:function(1)", - "docComment": "", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryFlowContainer:type", + "docComment": "/**\n * A union type of all flow containers\n */\n", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryCardContent({ children }: " + "text": "type OryFlowContainer = " }, { "kind": "Reference", - "text": "OryCardContentProps", - "canonicalReference": "@ory/elements-react!OryCardContentProps:type" + "text": "LoginFlowContainer", + "canonicalReference": "@ory/elements-react!LoginFlowContainer:type" }, { "kind": "Content", - "text": "): " + "text": " | " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "RegistrationFlowContainer", + "canonicalReference": "@ory/elements-react!RegistrationFlowContainer:type" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "OryCardContent" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryCardContentProps:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type OryCardContentProps = " + "text": " | " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "RecoveryFlowContainer", + "canonicalReference": "@ory/elements-react!RecoveryFlowContainer:type" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "OryCardContentProps", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 2 - } - }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryCardFooter:function(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function OryCardFooter(): " + "text": " | " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "VerificationFlowContainer", + "canonicalReference": "@ory/elements-react!VerificationFlowContainer:type" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "OryCardFooter" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryCardFooterProps:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type OryCardFooterProps = " + "text": " | " }, { "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" - }, - { - "kind": "Content", - "text": "" + "text": "SettingsFlowContainer", + "canonicalReference": "@ory/elements-react!SettingsFlowContainer:type" }, { "kind": "Content", @@ -2662,20 +1713,33 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryCardFooterProps", + "name": "OryFlowContainer", "typeTokenRange": { "startIndex": 1, - "endIndex": 3 + "endIndex": 10 } }, { "kind": "Function", - "canonicalReference": "@ory/elements-react!OryCardHeader:function(1)", + "canonicalReference": "@ory/elements-react!OryForm:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryCardHeader(): " + "text": "declare function OryForm({ children }: " + }, + { + "kind": "Reference", + "text": "OryFormProps", + "canonicalReference": "@ory/elements-react!OryFormProps:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "string | " }, { "kind": "Reference", @@ -2689,31 +1753,40 @@ ], "fileUrlPath": "dist/index.d.ts", "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 + "startIndex": 3, + "endIndex": 5 }, "releaseTag": "Public", "overloadIndex": 1, - "parameters": [], - "name": "OryCardHeader" + "parameters": [ + { + "parameterName": "{ children }", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "OryForm" }, { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryCardHeaderProps:type", + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryFormGroupDivider:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type OryCardHeaderProps = " + "text": "declare function OryFormGroupDivider(): " }, { "kind": "Reference", - "text": "Record", - "canonicalReference": "!Record:type" + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" }, { "kind": "Content", - "text": "" + "text": " | null" }, { "kind": "Content", @@ -2721,21 +1794,23 @@ } ], "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "OryCardHeaderProps", - "typeTokenRange": { + "returnTypeTokenRange": { "startIndex": 1, "endIndex": 3 - } + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OryFormGroupDivider" }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryCardProps:type", + "canonicalReference": "@ory/elements-react!OryFormGroupProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type OryCardProps = " + "text": "type OryFormGroupProps = " }, { "kind": "Reference", @@ -2749,7 +1824,7 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryCardProps", + "name": "OryFormGroupProps", "typeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -2757,17 +1832,17 @@ }, { "kind": "Function", - "canonicalReference": "@ory/elements-react!OryCardValidationMessages:function(1)", + "canonicalReference": "@ory/elements-react!OryFormGroups:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryCardValidationMessages({ ...props }: " + "text": "declare function OryFormGroups({ children, groups }: " }, { "kind": "Reference", - "text": "HeadlessMessagesProps", - "canonicalReference": "@ory/elements-react!HeadlessMessagesProps:type" + "text": "OryFormGroupsProps", + "canonicalReference": "@ory/elements-react!OryFormGroupsProps:type" }, { "kind": "Content", @@ -2778,10 +1853,6 @@ "text": "react_jsx_runtime.JSX.Element", "canonicalReference": "@types/react!JSX.Element:interface" }, - { - "kind": "Content", - "text": " | null" - }, { "kind": "Content", "text": ";" @@ -2790,13 +1861,13 @@ "fileUrlPath": "dist/index.d.ts", "returnTypeTokenRange": { "startIndex": 3, - "endIndex": 5 + "endIndex": 4 }, "releaseTag": "Public", "overloadIndex": 1, "parameters": [ { - "parameterName": "{ ...props }", + "parameterName": "{ children, groups }", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -2804,38 +1875,34 @@ "isOptional": false } ], - "name": "OryCardValidationMessages" + "name": "OryFormGroups" }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryClientConfiguration:type", + "canonicalReference": "@ory/elements-react!OryFormGroupsProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type OryClientConfiguration = " - }, - { - "kind": "Content", - "text": "{\n name: string;\n logoUrl?: string;\n stylesheet?: string;\n favicon?: string;\n sdk: {\n url: string;\n options?: " + "text": "type OryFormGroupsProps = " }, { "kind": "Reference", - "text": "Partial", - "canonicalReference": "!Partial:type" + "text": "PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" }, { "kind": "Content", - "text": "<" + "text": "<{\n groups: " }, { "kind": "Reference", - "text": "ConfigurationParameters", - "canonicalReference": "@ory/client-fetch!ConfigurationParameters:interface" + "text": "UiNodeGroupEnum", + "canonicalReference": "@ory/client-fetch!UiNodeGroupEnum:type" }, { "kind": "Content", - "text": ">;\n };\n project: {\n registration_enabled: boolean;\n verification_enabled: boolean;\n recovery_enabled: boolean;\n recovery_ui_url: string;\n registration_ui_url: string;\n verification_ui_url: string;\n login_ui_url: string;\n };\n}" + "text": "[];\n}>" }, { "kind": "Content", @@ -2844,20 +1911,20 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryClientConfiguration", + "name": "OryFormGroupsProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 6 + "endIndex": 5 } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryComponentProvider:function(1)", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryFormOIDCButtonsProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryComponentProvider({ children, components, nodeSorter, }: " + "text": "type OryFormOIDCButtonsProps = " }, { "kind": "Reference", @@ -2866,25 +1933,7 @@ }, { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "ComponentProviderProps", - "canonicalReference": "@ory/elements-react!~ComponentProviderProps:type" - }, - { - "kind": "Content", - "text": ">" - }, - { - "kind": "Content", - "text": "): " - }, - { - "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "<{\n hideDivider?: boolean;\n}>" }, { "kind": "Content", @@ -2892,46 +1941,39 @@ } ], "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 6, - "endIndex": 7 - }, "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, components, nodeSorter, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 5 - }, - "isOptional": false - } - ], - "name": "OryComponentProvider" + "name": "OryFormOIDCButtonsProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryFlowComponents:type", + "canonicalReference": "@ory/elements-react!OryFormOIDCRootProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type OryFlowComponents = " + "text": "type OryFormOIDCRootProps = " }, { "kind": "Reference", - "text": "OryFormComponents", - "canonicalReference": "@ory/elements-react!OryFormComponents:type" + "text": "PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" }, { "kind": "Content", - "text": " & " + "text": "<{\n nodes: " }, { "kind": "Reference", - "text": "OryCardComponents", - "canonicalReference": "@ory/elements-react!OryCardComponents:type" + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" + }, + { + "kind": "Content", + "text": "[];\n}>" }, { "kind": "Content", @@ -2940,34 +1982,25 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryFlowComponents", + "name": "OryFormOIDCRootProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 4 + "endIndex": 5 } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryFlowProvider:function(1)", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryFormProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryFlowProvider({ children, ...container }: " - }, - { - "kind": "Reference", - "text": "OryFlowProviderProps", - "canonicalReference": "@ory/elements-react!OryFlowProviderProps:type" - }, - { - "kind": "Content", - "text": "): " + "text": "type OryFormProps = " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "PropsWithChildren", + "canonicalReference": "@types/react!React.PropsWithChildren:type" }, { "kind": "Content", @@ -2975,37 +2008,35 @@ } ], "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, ...container }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "OryFlowProvider" + "name": "OryFormProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryFlowProviderProps:type", + "canonicalReference": "@ory/elements-react!OryFormRootProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type OryFlowProviderProps = " + "text": "type OryFormRootProps = " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "ComponentPropsWithoutRef", + "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" + }, + { + "kind": "Content", + "text": "<\"form\"> & {\n onSubmit: " + }, + { + "kind": "Reference", + "text": "FormEventHandler", + "canonicalReference": "@types/react!React.FormEventHandler:type" }, { "kind": "Content", @@ -3013,12 +2044,12 @@ }, { "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" + "text": "HTMLFormElement", + "canonicalReference": "!HTMLFormElement:interface" }, { "kind": "Content", - "text": ">" + "text": ">;\n}" }, { "kind": "Content", @@ -3027,39 +2058,39 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryFlowProviderProps", + "name": "OryFormRootProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 5 + "endIndex": 7 } }, { "kind": "Function", - "canonicalReference": "@ory/elements-react!OryForm:function(1)", + "canonicalReference": "@ory/elements-react!OryFormSocialButtons:function(1)", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryForm({ children }: " + "text": "declare function OryFormSocialButtons({ children, hideDivider, }: " }, { "kind": "Reference", - "text": "OryFormProps", - "canonicalReference": "@ory/elements-react!OryFormProps:type" + "text": "OryFormOIDCButtonsProps", + "canonicalReference": "@ory/elements-react!OryFormOIDCButtonsProps:type" }, { "kind": "Content", "text": "): " }, - { - "kind": "Content", - "text": "string | " - }, { "kind": "Reference", "text": "react_jsx_runtime.JSX.Element", "canonicalReference": "@types/react!JSX.Element:interface" }, + { + "kind": "Content", + "text": " | null" + }, { "kind": "Content", "text": ";" @@ -3074,7 +2105,7 @@ "overloadIndex": 1, "parameters": [ { - "parameterName": "{ children }", + "parameterName": "{ children, hideDivider, }", "parameterTypeTokenRange": { "startIndex": 1, "endIndex": 2 @@ -3082,151 +2113,114 @@ "isOptional": false } ], - "name": "OryForm" + "name": "OryFormSocialButtons" }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryFormComponents:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type OryFormComponents = " - }, - { - "kind": "Content", - "text": "{\n Button: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessButtonProps", - "canonicalReference": "@ory/elements-react!HeadlessButtonProps:type" - }, - { - "kind": "Content", - "text": ">;\n LinkButton: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, - { - "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessLinkButtonProps", - "canonicalReference": "@ory/elements-react!HeadlessLinkButtonProps:type" - }, - { - "kind": "Content", - "text": ">;\n Input: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, + { + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryFormSocialButtonsForm:function(1)", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": "<" + "text": "declare function OryFormSocialButtonsForm(): " }, { "kind": "Reference", - "text": "HeadlessInputProps", - "canonicalReference": "@ory/elements-react!HeadlessInputProps:type" + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" }, { "kind": "Content", - "text": ">;\n PinCodeInput: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": " | null" }, { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessInputProps", - "canonicalReference": "@ory/elements-react!HeadlessInputProps:type" - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OryFormSocialButtonsForm" + }, + { + "kind": "Namespace", + "canonicalReference": "@ory/elements-react!OryLocales:namespace", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": ">;\n Image: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, + "text": "declare namespace locales " + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryLocales", + "preserveMemberOrder": false, + "members": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryMessageContentProps:type", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessImageProps", - "canonicalReference": "@ory/elements-react!HeadlessImageProps:type" + "text": "type OryMessageContentProps = " }, { "kind": "Content", - "text": ">;\n Label: " + "text": "{\n message: " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "UiText", + "canonicalReference": "@ory/client-fetch!UiText:interface" }, { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessLabelProps", - "canonicalReference": "@ory/elements-react!HeadlessLabelProps:type" + "text": ";\n}" }, { "kind": "Content", - "text": ">;\n Checkbox: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryMessageContentProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryMessageRootProps:type", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": "<" + "text": "type OryMessageRootProps = " }, { "kind": "Reference", - "text": "HeadlessInputProps", - "canonicalReference": "@ory/elements-react!HeadlessInputProps:type" + "text": "DetailedHTMLProps", + "canonicalReference": "@types/react!React.DetailedHTMLProps:type" }, { "kind": "Content", - "text": ">;\n Text: " + "text": "<" }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "HTMLAttributes", + "canonicalReference": "@types/react!React.HTMLAttributes:interface" }, { "kind": "Content", @@ -3234,71 +2228,70 @@ }, { "kind": "Reference", - "text": "HeadlessTextProps", - "canonicalReference": "@ory/elements-react!HeadlessTextProps:type" + "text": "HTMLDivElement", + "canonicalReference": "!HTMLDivElement:interface" }, { "kind": "Content", - "text": ">;\n FormContainer: " + "text": ">, " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "HTMLDivElement", + "canonicalReference": "!HTMLDivElement:interface" }, { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessFormProps", - "canonicalReference": "@ory/elements-react!HeadlessFormProps:type" + "text": ">" }, { "kind": "Content", - "text": ">;\n SocialButton: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryMessageRootProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 9 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeAnchorProps:type", + "docComment": "", + "excerptTokens": [ { "kind": "Content", - "text": "<" - }, - { - "kind": "Reference", - "text": "HeadlessSocialButtonProps", - "canonicalReference": "@ory/elements-react!HeadlessSocialButtonProps:type" + "text": "type OryNodeAnchorProps = " }, { "kind": "Content", - "text": ">;\n SocialButtonContainer: " + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "UiNodeAnchorAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeAnchorAttributes:interface" }, { "kind": "Content", - "text": "<" + "text": ";\n node: " }, { "kind": "Reference", - "text": "HeadlessSocialButtonContainerProps", - "canonicalReference": "@ory/elements-react!HeadlessSocialButtonContainerProps:type" + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" }, { "kind": "Content", - "text": ">;\n AuthMethodListItem: " + "text": ";\n} & " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "Omit", + "canonicalReference": "!Omit:type" }, { "kind": "Content", @@ -3306,53 +2299,61 @@ }, { "kind": "Reference", - "text": "HeadlessAuthMethodListItemProps", - "canonicalReference": "@ory/elements-react!HeadlessAuthMethodListItemProps:type" + "text": "ComponentPropsWithoutRef", + "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" }, { "kind": "Content", - "text": ">;\n HorizontalDivider: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "<\"a\">, \"children\">" }, { "kind": "Content", - "text": "<" - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryNodeAnchorProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeButtonProps:type", + "docComment": "", + "excerptTokens": [ { - "kind": "Reference", - "text": "HorizontalDividerProps", - "canonicalReference": "@ory/elements-react!HorizontalDividerProps:type" + "kind": "Content", + "text": "type OryNodeButtonProps = " }, { "kind": "Content", - "text": ">;\n FormGroup: " + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "UiNodeInputAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" }, { "kind": "Content", - "text": "<" + "text": ";\n node: " }, { "kind": "Reference", - "text": "HeadlessGroupContainerProps", - "canonicalReference": "@ory/elements-react!HeadlessGroupContainerProps:type" + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" }, { "kind": "Content", - "text": ">;\n MessageContainer: " + "text": ";\n} & " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "Omit", + "canonicalReference": "!Omit:type" }, { "kind": "Content", @@ -3360,48 +2361,56 @@ }, { "kind": "Reference", - "text": "HeadlessMessagesProps", - "canonicalReference": "@ory/elements-react!HeadlessMessagesProps:type" + "text": "ComponentPropsWithoutRef", + "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" }, { "kind": "Content", - "text": ">;\n Message: " - }, - { - "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "<\"button\">, \"children\">" }, { "kind": "Content", - "text": "<" - }, + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "releaseTag": "Public", + "name": "OryNodeButtonProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 10 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeImageProps:type", + "docComment": "", + "excerptTokens": [ { - "kind": "Reference", - "text": "HeadlessMessageProps", - "canonicalReference": "@ory/elements-react!HeadlessMessageProps:type" + "kind": "Content", + "text": "type OryNodeImageProps = " }, { "kind": "Content", - "text": ">;\n CurrentIdentifierButton: " + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "ComponentType", - "canonicalReference": "@types/react!React.ComponentType:type" + "text": "UiNodeImageAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeImageAttributes:interface" }, { "kind": "Content", - "text": "<" + "text": ";\n node: " }, { "kind": "Reference", - "text": "HeadlessCurrentIdentifierProps", - "canonicalReference": "@ory/elements-react!HeadlessCurrentIdentifierProps:type" + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" }, { "kind": "Content", - "text": ">;\n}" + "text": ";\n}" }, { "kind": "Content", @@ -3410,29 +2419,51 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryFormComponents", + "name": "OryNodeImageProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 70 + "endIndex": 6 } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryFormGroupDivider:function(1)", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeInputProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryFormGroupDivider(): " + "text": "type OryNodeInputProps = " + }, + { + "kind": "Content", + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "UiNodeInputAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" + }, + { + "kind": "Content", + "text": ";\n node: " + }, + { + "kind": "Reference", + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" + }, + { + "kind": "Content", + "text": ";\n onClick?: " + }, + { + "kind": "Reference", + "text": "MouseEventHandler", + "canonicalReference": "@types/react!React.MouseEventHandler:type" }, { "kind": "Content", - "text": " | null" + "text": ";\n}" }, { "kind": "Content", @@ -3440,75 +2471,52 @@ } ], "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "OryFormGroupDivider" + "name": "OryNodeInputProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryFormGroups:function(1)", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeLabelProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryFormGroups({ children, groups }: " - }, - { - "kind": "Reference", - "text": "HeadlessGroupProps", - "canonicalReference": "@ory/elements-react!HeadlessGroupProps:type" + "text": "type OryNodeLabelProps = " }, { "kind": "Content", - "text": "): " + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "UiNodeInputAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 4 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ + "text": ";\n node: " + }, { - "parameterName": "{ children, groups }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "OryFormGroups" - }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!OryFormProps:type", - "docComment": "", - "excerptTokens": [ + "kind": "Reference", + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" + }, { "kind": "Content", - "text": "type OryFormProps = " + "text": ";\n} & " }, { "kind": "Reference", - "text": "PropsWithChildren", - "canonicalReference": "@types/react!React.PropsWithChildren:type" + "text": "ComponentPropsWithoutRef", + "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" + }, + { + "kind": "Content", + "text": "<\"label\">" }, { "kind": "Content", @@ -3517,38 +2525,42 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryFormProps", + "name": "OryNodeLabelProps", "typeTokenRange": { "startIndex": 1, - "endIndex": 2 + "endIndex": 8 } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryFormSocialButtons:function(1)", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeOIDCButtonProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryFormSocialButtons({ children, hideDivider, }: " + "text": "type OryNodeOIDCButtonProps = " + }, + { + "kind": "Content", + "text": "{\n node: " }, { "kind": "Reference", - "text": "HeadlessSocialButtonsProps", - "canonicalReference": "@ory/elements-react!HeadlessSocialButtonsProps:type" + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" }, { "kind": "Content", - "text": "): " + "text": ";\n attributes: " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "UiNodeInputAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeInputAttributes:interface" }, { "kind": "Content", - "text": " | null" + "text": ";\n onClick?: () => void;\n}" }, { "kind": "Content", @@ -3556,72 +2568,56 @@ } ], "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 3, - "endIndex": 5 - }, "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [ - { - "parameterName": "{ children, hideDivider, }", - "parameterTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "isOptional": false - } - ], - "name": "OryFormSocialButtons" + "name": "OryNodeOIDCButtonProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } }, { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryFormSocialButtonsForm:function(1)", + "kind": "TypeAlias", + "canonicalReference": "@ory/elements-react!OryNodeTextProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "declare function OryFormSocialButtonsForm(): " + "text": "type OryNodeTextProps = " + }, + { + "kind": "Content", + "text": "{\n attributes: " }, { "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" + "text": "UiNodeTextAttributes", + "canonicalReference": "@ory/client-fetch!UiNodeTextAttributes:interface" }, { "kind": "Content", - "text": " | null" + "text": ";\n node: " + }, + { + "kind": "Reference", + "text": "UiNode", + "canonicalReference": "@ory/client-fetch!UiNode:interface" }, { "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 3 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "OryFormSocialButtonsForm" - }, - { - "kind": "Namespace", - "canonicalReference": "@ory/elements-react!OryLocales:namespace", - "docComment": "", - "excerptTokens": [ + "text": ";\n}" + }, { "kind": "Content", - "text": "declare namespace locales " + "text": ";" } ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "OryLocales", - "preserveMemberOrder": false, - "members": [] + "name": "OryNodeTextProps", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } }, { "kind": "Function", @@ -3630,7 +2626,7 @@ "excerptTokens": [ { "kind": "Content", - "text": "declare function OryProvider" + "text": "" }, { "kind": "Content", @@ -3692,7 +2688,7 @@ ], "typeParameters": [ { - "typeParameterName": "T", + "typeParameterName": "Translation", "constraintTokenRange": { "startIndex": 1, "endIndex": 2 @@ -3705,43 +2701,14 @@ ], "name": "OryProvider" }, - { - "kind": "Function", - "canonicalReference": "@ory/elements-react!OryTwoStepCard:function(1)", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "declare function OryTwoStepCard(): " - }, - { - "kind": "Reference", - "text": "react_jsx_runtime.JSX.Element", - "canonicalReference": "@types/react!JSX.Element:interface" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "returnTypeTokenRange": { - "startIndex": 1, - "endIndex": 2 - }, - "releaseTag": "Public", - "overloadIndex": 1, - "parameters": [], - "name": "OryTwoStepCard" - }, { "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!ProviderProps:type", + "canonicalReference": "@ory/elements-react!OryProviderProps:type", "docComment": "", "excerptTokens": [ { "kind": "Content", - "text": "type ProviderProps = " + "text": "type OryProviderProps = " }, { "kind": "Content", @@ -3758,7 +2725,7 @@ }, { "kind": "Reference", - "text": "IntlProviderProps", + "text": "OryIntlProviderProps", "canonicalReference": "@ory/elements-react!IntlProviderProps:type" }, { @@ -3767,22 +2734,13 @@ }, { "kind": "Reference", - "text": "FlowContainer", - "canonicalReference": "@ory/elements-react!FlowContainer:type" + "text": "OryFlowContainer", + "canonicalReference": "@ory/elements-react!OryFlowContainer:type" }, { "kind": "Content", "text": " & " }, - { - "kind": "Reference", - "text": "ComponentPropsWithoutRef", - "canonicalReference": "@types/react!React.ComponentPropsWithoutRef:type" - }, - { - "kind": "Content", - "text": "<\"div\"> & " - }, { "kind": "Reference", "text": "PropsWithChildren", @@ -3795,7 +2753,7 @@ ], "fileUrlPath": "dist/index.d.ts", "releaseTag": "Public", - "name": "ProviderProps", + "name": "OryProviderProps", "typeParameters": [ { "typeParameterName": "T", @@ -3811,13 +2769,42 @@ ], "typeTokenRange": { "startIndex": 1, - "endIndex": 11 + "endIndex": 9 } }, + { + "kind": "Function", + "canonicalReference": "@ory/elements-react!OryTwoStepCard:function(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "declare function OryTwoStepCard(): " + }, + { + "kind": "Reference", + "text": "react_jsx_runtime.JSX.Element", + "canonicalReference": "@types/react!JSX.Element:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "fileUrlPath": "dist/index.d.ts", + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "OryTwoStepCard" + }, { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!RecoveryFlowContainer:type", - "docComment": "", + "docComment": "/**\n * A flow container for the recovery flow\n *\n * @see\n *\n * OryFlow\n *\n * @see\n *\n * RecoveryFlow\n */\n", "excerptTokens": [ { "kind": "Content", @@ -3825,8 +2812,8 @@ }, { "kind": "Reference", - "text": "BaseFlow", - "canonicalReference": "@ory/elements-react!~BaseFlow:type" + "text": "OryFlow", + "canonicalReference": "@ory/elements-react!~OryFlow:type" }, { "kind": "Content", @@ -3866,7 +2853,7 @@ { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!RegistrationFlowContainer:type", - "docComment": "", + "docComment": "/**\n * A flow container for the registration flow\n *\n * @see\n *\n * OryFlow\n *\n * @see\n *\n * RegistrationFlow\n */\n", "excerptTokens": [ { "kind": "Content", @@ -3874,8 +2861,8 @@ }, { "kind": "Reference", - "text": "BaseFlow", - "canonicalReference": "@ory/elements-react!~BaseFlow:type" + "text": "OryFlow", + "canonicalReference": "@ory/elements-react!~OryFlow:type" }, { "kind": "Content", @@ -3915,7 +2902,7 @@ { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!SettingsFlowContainer:type", - "docComment": "", + "docComment": "/**\n * A flow container for the settings flow\n *\n * @see\n *\n * OryFlow\n *\n * @see\n *\n * SettingsFlow\n */\n", "excerptTokens": [ { "kind": "Content", @@ -3923,8 +2910,8 @@ }, { "kind": "Reference", - "text": "BaseFlow", - "canonicalReference": "@ory/elements-react!~BaseFlow:type" + "text": "OryFlow", + "canonicalReference": "@ory/elements-react!~OryFlow:type" }, { "kind": "Content", @@ -3996,41 +2983,6 @@ "endIndex": 4 } }, - { - "kind": "TypeAlias", - "canonicalReference": "@ory/elements-react!TranslationFile:type", - "docComment": "", - "excerptTokens": [ - { - "kind": "Content", - "text": "type TranslationFile = " - }, - { - "kind": "Content", - "text": "{\n [K in keyof typeof " - }, - { - "kind": "Reference", - "text": "en", - "canonicalReference": "@ory/elements-react!~en:var" - }, - { - "kind": "Content", - "text": "]: string;\n}" - }, - { - "kind": "Content", - "text": ";" - } - ], - "fileUrlPath": "dist/index.d.ts", - "releaseTag": "Public", - "name": "TranslationFile", - "typeTokenRange": { - "startIndex": 1, - "endIndex": 4 - } - }, { "kind": "Function", "canonicalReference": "@ory/elements-react!uiTextToFormattedMessage:function(1)", @@ -4210,7 +3162,7 @@ { "kind": "TypeAlias", "canonicalReference": "@ory/elements-react!VerificationFlowContainer:type", - "docComment": "", + "docComment": "/**\n * A flow container for the verification flow\n *\n * @see\n *\n * OryFlow\n *\n * @see\n *\n * VerificationFlow\n */\n", "excerptTokens": [ { "kind": "Content", @@ -4218,8 +3170,8 @@ }, { "kind": "Reference", - "text": "BaseFlow", - "canonicalReference": "@ory/elements-react!~BaseFlow:type" + "text": "OryFlow", + "canonicalReference": "@ory/elements-react!~OryFlow:type" }, { "kind": "Content", diff --git a/packages/elements-react/api-report/elements-react.api.md b/packages/elements-react/api-report/elements-react.api.md index 8723aa8b0..06816ad3e 100644 --- a/packages/elements-react/api-report/elements-react.api.md +++ b/packages/elements-react/api-report/elements-react.api.md @@ -18,7 +18,6 @@ import { LoginFlow } from '@ory/client-fetch'; import { MouseEventHandler } from 'react'; import { OnRedirectHandler } from '@ory/client-fetch'; import { PropsWithChildren } from 'react'; -import * as react from 'react'; import * as react_jsx_runtime from 'react/jsx-runtime'; import { RecoveryFlow } from '@ory/client-fetch'; import { RegistrationFlow } from '@ory/client-fetch'; @@ -37,37 +36,19 @@ import { UpdateSettingsFlowBody } from '@ory/client-fetch'; import { UpdateVerificationFlowBody } from '@ory/client-fetch'; import { VerificationFlow } from '@ory/client-fetch'; -// @public (undocumented) -export type CustomLanguageFormats = { - [k in (typeof LanguageCodes)[number]]?: Partial; -}; - -// @public (undocumented) -export type CustomTranslations = { - customTranslations: Partial; - locale: (typeof LanguageCodes)[number]; - defaultLocale: (typeof LanguageCodes)[number]; -}; - -// Warning: (ae-forgotten-export) The symbol "BaseFlow" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "OryFlow" needs to be exported by the entry point index.d.ts // -// @public (undocumented) -export type ErrorFlowContainer = BaseFlow; - -// @public (undocumented) -export type FlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer; +// @public +export type ErrorFlowContainer = OryFlow; -// @public (undocumented) -export type FlowContainerSetter = Dispatch>; +// @public +export type FlowContainerSetter = Dispatch>; -// @public (undocumented) -export type FlowContextValue = FlowContainer & { +// @public +export type FlowContextValue = OryFlowContainer & { setFlowContainer: FlowContainerSetter; }; -// @public (undocumented) -export function formatMessage(uiText: UiText | undefined, intl: IntlShape): string; - // @public (undocumented) export function formElementId(attributes: { name: string; @@ -85,118 +66,16 @@ export function formLabelId(attributes: { // @public (undocumented) export type FormValues = Record; +// Warning: (ae-forgotten-export) The symbol "CustomTranslations" needs to be exported by the entry point index.d.ts +// // @public (undocumented) -export type HeadlessAuthMethodListItemProps = { - onClick: () => void; - group: string; -}; - -// @public (undocumented) -export type HeadlessButtonProps = { - attributes: UiNodeInputAttributes; - node: UiNode; -} & Omit, "children">; - -// @public (undocumented) -export type HeadlessCurrentIdentifierProps = { - attributes: UiNodeInputAttributes; - node: UiNode; - onClick?: () => void; - href?: string; -} & Omit, "children" | "onClick">; - -// @public (undocumented) -export type HeadlessFormProps = ComponentPropsWithoutRef<"form"> & { - onSubmit: FormEventHandler; -}; - -// @public (undocumented) -export type HeadlessGroupContainerProps = PropsWithChildren; - -// @public (undocumented) -export type HeadlessGroupProps = PropsWithChildren<{ - groups: UiNodeGroupEnum[]; -}>; - -// @public (undocumented) -export type HeadlessImageProps = { - attributes: UiNodeImageAttributes; - node: UiNode; -}; - -// @public (undocumented) -export type HeadlessInputProps = { - attributes: UiNodeInputAttributes; - node: UiNode; - onClick?: MouseEventHandler; -}; - -// @public (undocumented) -export type HeadlessLabelProps = { - attributes: UiNodeInputAttributes; - node: UiNode; -} & ComponentPropsWithoutRef<"label">; - -// @public (undocumented) -export type HeadlessLinkButtonProps = { - attributes: UiNodeAnchorAttributes; - node: UiNode; -} & Omit, "children">; - -// @public (undocumented) -export function HeadlessMessage({ message }: HeadlessMessageProps): react_jsx_runtime.JSX.Element; - -// @public (undocumented) -export type HeadlessMessageProps = { - message: UiText; -}; - -// @public (undocumented) -export type HeadlessMessagesProps = DetailedHTMLProps, HTMLDivElement>; - -// @public (undocumented) -export type HeadlessSocialButtonContainerProps = PropsWithChildren<{ - nodes: UiNode[]; -}>; - -// @public (undocumented) -export type HeadlessSocialButtonProps = PropsWithChildren<{ - node: UiNode; - attributes: UiNodeInputAttributes; - onClick?: () => void; -}>; - -// @public (undocumented) -export type HeadlessSocialButtonsProps = PropsWithChildren<{ - hideDivider?: boolean; -}>; - -// @public (undocumented) -export type HeadlessTextProps = { - attributes: UiNodeTextAttributes; - node: UiNode; -}; - -// @public (undocumented) -export type HorizontalDividerProps = Record; - -// @public (undocumented) -export const IntlProvider: ({ children, ...props }: PropsWithChildren>) => string | number | boolean | Iterable | react_jsx_runtime.JSX.Element | null | undefined; - -// @public (undocumented) -export type IntlProviderProps = Type extends CustomTranslations ? CustomTranslations : SupportedTranslations; - -// @public (undocumented) -export const isCustomTranslations: (o: unknown) => o is CustomTranslations; - -// @public (undocumented) -export const LanguageCodes: readonly ["ab", "aa", "af", "sq", "am", "ar", "hy", "as", "ay", "az", "ba", "eu", "bn", "dz", "bh", "bi", "br", "bg", "my", "be", "km", "ca", "zh", "co", "hr", "cs", "da", "nl", "en", "eo", "et", "fo", "fj", "fi", "fr", "fy", "gd", "gl", "ka", "de", "el", "kl", "gn", "gu", "ha", "iw", "hi", "hu", "is", "in", "ia", "ie", "ik", "ga", "it", "ja", "jw", "kn", "ks", "kk", "rw", "ky", "rn", "ko", "ku", "lo", "la", "lv", "ln", "lt", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mo", "mn", "na", "ne", "no", "oc", "or", "om", "ps", "fa", "pl", "pt", "pa", "qu", "rm", "ro", "ru", "sm", "sg", "sa", "sr", "sh", "st", "tn", "sn", "sd", "si", "ss", "sk", "sl", "so", "es", "su", "sw", "sv", "tl", "tg", "ta", "tt", "te", "th", "bo", "ti", "to", "ts", "tr", "tk", "tw", "uk", "ur", "uz", "vi", "vo", "cy", "wo", "xh", "ji", "yo", "zu"]; +export type IntlProviderProps = Translation extends CustomTranslations ? CustomTranslations : SupportedTranslations; // @public (undocumented) export type Locale = keyof typeof OryLocales; -// @public (undocumented) -export type LoginFlowContainer = BaseFlow; +// @public +export type LoginFlowContainer = OryFlow; // @public (undocumented) export function messageTestId(message: UiText): { @@ -205,36 +84,18 @@ export function messageTestId(message: UiText): { // @public (undocumented) export type OnSubmitHandlerProps = { - setFlowContainer: (flowContainer: FlowContainer) => void; + setFlowContainer: (flowContainer: OryFlowContainer) => void; body: T; onRedirect: OnRedirectHandler; }; -// @public -export function onSubmitLogin({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps): Promise; - -// @public -export function onSubmitRecovery({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps): Promise; - -// @public -export function onSubmitRegistration({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps): Promise; - -// @public -export function onSubmitSettings({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps): Promise; - -// @public -export function onSubmitVerification({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps): Promise; - // @public (undocumented) -export function OryCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element; +export function OryCard({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element; // @public -export type OryCardComponents = { - Card: ComponentType; - CardFooter: ComponentType; - CardHeader: ComponentType; - CardContent: ComponentType; - CardLogo: ComponentType; +export type OryCardAuthMethodListItemProps = { + onClick: () => void; + group: string; }; // @public (undocumented) @@ -243,6 +104,9 @@ export function OryCardContent({ children }: OryCardContentProps): react_jsx_run // @public (undocumented) export type OryCardContentProps = PropsWithChildren; +// @public (undocumented) +export type OryCardDividerProps = Record; + // @public (undocumented) export function OryCardFooter(): react_jsx_runtime.JSX.Element; @@ -259,7 +123,7 @@ export type OryCardHeaderProps = Record; export type OryCardProps = PropsWithChildren; // @public (undocumented) -export function OryCardValidationMessages({ ...props }: HeadlessMessagesProps): react_jsx_runtime.JSX.Element | null; +export function OryCardValidationMessages({ ...props }: OryMessageRootProps): react_jsx_runtime.JSX.Element | null; // @public (undocumented) export type OryClientConfiguration = { @@ -282,55 +146,93 @@ export type OryClientConfiguration = { }; }; -// Warning: (ae-forgotten-export) The symbol "ComponentProviderProps" needs to be exported by the entry point index.d.ts +// @public (undocumented) +export type OryCurrentIdentifierProps = { + attributes: UiNodeInputAttributes; + node: UiNode; + onClick?: () => void; + href?: string; +} & Omit, "children" | "onClick">; + +// Warning: (ae-forgotten-export) The symbol "DeepPartialTwoLevels" needs to be exported by the entry point index.d.ts // // @public (undocumented) -export function OryComponentProvider({ children, components, nodeSorter, }: PropsWithChildren): react_jsx_runtime.JSX.Element; +export type OryFlowComponentOverrides = DeepPartialTwoLevels; + +// @public +export type OryFlowComponents = { + Node: { + Button: ComponentType; + OIDCButton: ComponentType; + CurrentIdentifierButton: ComponentType; + Anchor: ComponentType; + Input: ComponentType; + CodeInput: ComponentType; + Image: ComponentType; + Label: ComponentType; + Checkbox: ComponentType; + Text: ComponentType; + }; + Card: { + Root: ComponentType; + Footer: ComponentType; + Header: ComponentType; + Content: ComponentType; + Logo: ComponentType; + Divider: ComponentType; + AuthMethodListItem: ComponentType; + }; + Form: { + Root: ComponentType; + OIDCRoot: ComponentType; + Group: ComponentType; + }; + Message: { + Root: ComponentType; + Content: ComponentType; + }; +}; + +// @public +export type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer; // @public (undocumented) -export type OryFlowComponents = OryFormComponents & OryCardComponents; +export function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element; // @public (undocumented) -export function OryFlowProvider({ children, ...container }: OryFlowProviderProps): react_jsx_runtime.JSX.Element; +export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null; // @public (undocumented) -export type OryFlowProviderProps = PropsWithChildren; +export type OryFormGroupProps = PropsWithChildren; // @public (undocumented) -export function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element; +export function OryFormGroups({ children, groups }: OryFormGroupsProps): react_jsx_runtime.JSX.Element; // @public (undocumented) -export type OryFormComponents = { - Button: ComponentType; - LinkButton: ComponentType; - Input: ComponentType; - PinCodeInput: ComponentType; - Image: ComponentType; - Label: ComponentType; - Checkbox: ComponentType; - Text: ComponentType; - FormContainer: ComponentType; - SocialButton: ComponentType; - SocialButtonContainer: ComponentType; - AuthMethodListItem: ComponentType; - HorizontalDivider: ComponentType; - FormGroup: ComponentType; - MessageContainer: ComponentType; - Message: ComponentType; - CurrentIdentifierButton: ComponentType; -}; +export type OryFormGroupsProps = PropsWithChildren<{ + groups: UiNodeGroupEnum[]; +}>; // @public (undocumented) -export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null; +export type OryFormOIDCButtonsProps = PropsWithChildren<{ + hideDivider?: boolean; +}>; // @public (undocumented) -export function OryFormGroups({ children, groups }: HeadlessGroupProps): react_jsx_runtime.JSX.Element; +export type OryFormOIDCRootProps = PropsWithChildren<{ + nodes: UiNode[]; +}>; // @public (undocumented) export type OryFormProps = PropsWithChildren; // @public (undocumented) -export function OryFormSocialButtons({ children, hideDivider, }: HeadlessSocialButtonsProps): react_jsx_runtime.JSX.Element | null; +export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & { + onSubmit: FormEventHandler; +}; + +// @public (undocumented) +export function OryFormSocialButtons({ children, hideDivider, }: OryFormOIDCButtonsProps): react_jsx_runtime.JSX.Element | null; // @public (undocumented) export function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null; @@ -341,34 +243,81 @@ export namespace OryLocales { } // @public (undocumented) -export function OryProvider({ children, components: Components, ...props }: ProviderProps): react_jsx_runtime.JSX.Element; +export type OryMessageContentProps = { + message: UiText; +}; // @public (undocumented) -export function OryTwoStepCard(): react_jsx_runtime.JSX.Element; +export type OryMessageRootProps = DetailedHTMLProps, HTMLDivElement>; // @public (undocumented) -export type ProviderProps = { - components: OryFlowComponents; -} & IntlProviderProps & FlowContainer & ComponentPropsWithoutRef<"div"> & PropsWithChildren; +export type OryNodeAnchorProps = { + attributes: UiNodeAnchorAttributes; + node: UiNode; +} & Omit, "children">; // @public (undocumented) -export type RecoveryFlowContainer = BaseFlow; +export type OryNodeButtonProps = { + attributes: UiNodeInputAttributes; + node: UiNode; +} & Omit, "children">; // @public (undocumented) -export type RegistrationFlowContainer = BaseFlow; +export type OryNodeImageProps = { + attributes: UiNodeImageAttributes; + node: UiNode; +}; // @public (undocumented) -export type SettingsFlowContainer = BaseFlow; +export type OryNodeInputProps = { + attributes: UiNodeInputAttributes; + node: UiNode; + onClick?: MouseEventHandler; +}; // @public (undocumented) -export type SupportedTranslations = { - locale?: Locale; - defaultLocale?: string; +export type OryNodeLabelProps = { + attributes: UiNodeInputAttributes; + node: UiNode; +} & ComponentPropsWithoutRef<"label">; + +// @public (undocumented) +export type OryNodeOIDCButtonProps = { + node: UiNode; + attributes: UiNodeInputAttributes; + onClick?: () => void; }; // @public (undocumented) -export type TranslationFile = { - [K in keyof typeof en]: string; +export type OryNodeTextProps = { + attributes: UiNodeTextAttributes; + node: UiNode; +}; + +// @public (undocumented) +export function OryProvider({ children, components: Components, ...props }: OryProviderProps): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export type OryProviderProps = { + components: OryFlowComponents; +} & IntlProviderProps & OryFlowContainer & PropsWithChildren; + +// @public (undocumented) +export function OryTwoStepCard(): react_jsx_runtime.JSX.Element; + +// @public +export type RecoveryFlowContainer = OryFlow; + +// @public +export type RegistrationFlowContainer = OryFlow; + +// @public +export type SettingsFlowContainer = OryFlow; + +// @public (undocumented) +export type SupportedTranslations = { + locale?: Locale; + defaultLocale?: string; }; // @public @@ -385,8 +334,8 @@ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: { // @public export function useOryFlow(): FlowContextValue; -// @public (undocumented) -export type VerificationFlowContainer = BaseFlow; +// @public +export type VerificationFlowContainer = OryFlow; // (No @packageDocumentation comment for this package) diff --git a/packages/elements-react/package.json b/packages/elements-react/package.json index 1c33addd7..fc235cca7 100644 --- a/packages/elements-react/package.json +++ b/packages/elements-react/package.json @@ -25,12 +25,14 @@ } }, "main": "./dist/index.js", + "typings": "./distindex.d.ts", "module": "./dist/index.mjs", "types": "./dist/index.d.ts", "dependencies": { "@ory/client-fetch": "^1.15.4", "clsx": "2.1.1", "input-otp": "1.2.4", + "lodash.merge": "4.6.2", "react-hook-form": "7.53.0", "react-intl": "6.7.0", "tailwind-merge": "2.5.2" @@ -42,6 +44,7 @@ "devDependencies": { "@hookform/devtools": "^4.3.1", "@svgr/plugin-svgo": "^8.1.0", + "@types/lodash.merge": "4.6.9", "esbuild-plugin-svgr": "^2.1.0", "eslint-plugin-react": "7.37.0", "postcss": "8.4.47", diff --git a/packages/elements-react/src/components/card/card-two-step.tsx b/packages/elements-react/src/components/card/card-two-step.tsx index 396ce4e24..1cf82c977 100644 --- a/packages/elements-react/src/components/card/card-two-step.tsx +++ b/packages/elements-react/src/components/card/card-two-step.tsx @@ -36,8 +36,7 @@ export function OryTwoStepCard() { const [selectedGroup, setSelectedGroup] = useState< UiNodeGroupEnum | undefined >() - const Components = useComponents() - const { FormGroup } = useComponents() + const { Form, Card } = useComponents() const { flowType } = useOryFlow() const nodeSorter = useNodeSorter() @@ -79,7 +78,7 @@ export function OryTwoStepCard() { )} - + {step === ProcessStep.ProvideIdentifier && zeroStepGroups .sort(sortNodes) @@ -90,7 +89,7 @@ export function OryTwoStepCard() { )} {options.map((option) => ( - setSelectedGroup(option)} @@ -106,7 +105,7 @@ export function OryTwoStepCard() { ))} )} - + @@ -123,7 +122,7 @@ const BackButton = ({ onClick, href }: BackButtonProps) => { const { flow: { ui }, } = useOryFlow() - const Components = useComponents() + const { Node } = useComponents() const nodeBackButton = ui.nodes.find( (node) => @@ -139,7 +138,7 @@ const BackButton = ({ onClick, href }: BackButtonProps) => { } return ( - {children} + } + + return ( + + + + + + ) +} diff --git a/packages/elements-react/src/components/card/content.tsx b/packages/elements-react/src/components/card/content.tsx new file mode 100644 index 000000000..aeacb2900 --- /dev/null +++ b/packages/elements-react/src/components/card/content.tsx @@ -0,0 +1,39 @@ +import { PropsWithChildren } from "react" +import { useComponents } from "../../context" +import { + OryCardValidationMessages, + OryForm, + OryFormGroups, + OryFormSocialButtons, +} from "../form" + +export type OryCardContentProps = PropsWithChildren + +export function OryCardContent({ children }: OryCardContentProps) { + const { Card } = useComponents() + + if (children) { + return {children} + } + + return ( + + + + + + + + ) +} diff --git a/packages/elements-react/src/components/card/footer.tsx b/packages/elements-react/src/components/card/footer.tsx new file mode 100644 index 000000000..cf24efaf9 --- /dev/null +++ b/packages/elements-react/src/components/card/footer.tsx @@ -0,0 +1,8 @@ +import { useComponents } from "../../context" + +export type OryCardFooterProps = Record + +export function OryCardFooter() { + const { Card } = useComponents() + return +} diff --git a/packages/elements-react/src/components/card/header.tsx b/packages/elements-react/src/components/card/header.tsx index e63ff266e..27c1ae950 100644 --- a/packages/elements-react/src/components/card/header.tsx +++ b/packages/elements-react/src/components/card/header.tsx @@ -3,6 +3,6 @@ import { useComponents } from "../../context" export type OryCardHeaderProps = Record export function OryCardHeader() { - const { CardHeader } = useComponents() - return + const { Card } = useComponents() + return } diff --git a/packages/elements-react/src/components/card/index.tsx b/packages/elements-react/src/components/card/index.tsx index c49140c08..44e49fd32 100644 --- a/packages/elements-react/src/components/card/index.tsx +++ b/packages/elements-react/src/components/card/index.tsx @@ -1,96 +1,14 @@ -import { ComponentType, PropsWithChildren } from "react" -import { useComponents } from "../../context" -import { OryForm } from "../form/form" -import { OryFormGroups } from "../form/groups" -import { OryCardValidationMessages } from "../form/messages" -import { OryTwoStepCard } from "./card-two-step" import { OryCardHeader, OryCardHeaderProps } from "./header" +import { OryCard, OryCardRootProps } from "./card" +import { OryCardFooter, OryCardFooterProps } from "./footer" +import { OryCardContent, OryCardContentProps } from "./content" +import { OryTwoStepCard } from "./card-two-step" -export type OryCardContentProps = PropsWithChildren - -export function OryCardContent({ children }: OryCardContentProps) { - const { CardContent } = useComponents() - - if (children) { - return {children} - } - - return ( - - - - - - - ) -} - -export type OryCardFooterProps = Record - -export function OryCardFooter() { - const { CardFooter } = useComponents() - return -} - -export type OryCardProps = PropsWithChildren - -export function OryCard({ children }: OryCardProps) { - const { Card } = useComponents() - - if (children) { - return {children} - } - - return ( - - - - - - ) -} - -/** - * Card components are used to show login, registration, recovery, and verification flows. - */ -export type OryCardComponents = { - /** - * The card container is the main container of the card. - */ - Card: ComponentType - - /** - * The card footer is the footer of the card container. - */ - CardFooter: ComponentType - - /** - * The card header is the header of the card container. - */ - CardHeader: ComponentType - - /** - * The card content is the main content of the card container. - */ - CardContent: ComponentType +export { OryCardHeader, OryCard, OryCardFooter, OryCardContent, OryTwoStepCard } - /** - * The card logo is the logo of the card container. - */ - CardLogo: ComponentType +export type { + OryCardHeaderProps, + OryCardRootProps as OryCardProps, + OryCardFooterProps, + OryCardContentProps, } - -export { OryCardHeader, OryTwoStepCard } - -export type { OryCardHeaderProps } diff --git a/packages/elements-react/src/components/form/form-helpers.ts b/packages/elements-react/src/components/form/form-helpers.ts index 4f2ce0b53..388c0e960 100644 --- a/packages/elements-react/src/components/form/form-helpers.ts +++ b/packages/elements-react/src/components/form/form-helpers.ts @@ -3,9 +3,11 @@ import { isUiNodeInputAttributes } from "@ory/client-fetch" import { FormValues } from "../../types" -import { FlowContainer } from "../../util" +import { OryFlowContainer } from "../../util" -export function computeDefaultValues(flowContainer: FlowContainer): FormValues { +export function computeDefaultValues( + flowContainer: OryFlowContainer, +): FormValues { return flowContainer.flow.ui.nodes.reduce((acc, node) => { if (isUiNodeInputAttributes(node.attributes)) { if (node.attributes.name === "method") { diff --git a/packages/elements-react/src/components/form/form.tsx b/packages/elements-react/src/components/form/form.tsx index b5507d4a8..fb8e4eac9 100644 --- a/packages/elements-react/src/components/form/form.tsx +++ b/packages/elements-react/src/components/form/form.tsx @@ -11,22 +11,22 @@ import { useIntl } from "react-intl" import { useOryFlow, useComponents } from "../../context" import { FormValues, - HeadlessAuthMethodListItemProps, - HeadlessButtonProps, - HeadlessCurrentIdentifierProps, - HeadlessFormProps, - HeadlessImageProps, - HeadlessInputProps, - HeadlessLabelProps, - HeadlessLinkButtonProps, - HeadlessTextProps, + OryCardAuthMethodListItemProps, + OryNodeButtonProps, + OryFormRootProps, + OryNodeImageProps, + OryNodeInputProps, + OryNodeLabelProps, + OryNodeAnchorProps, + OryNodeTextProps, + OryCurrentIdentifierProps, } from "../../types" -import { HorizontalDividerProps } from "../generic/divider" -import { HeadlessGroupContainerProps, OryFormGroups } from "./groups" -import { HeadlessMessageProps, HeadlessMessagesProps } from "./messages" +import { OryCardDividerProps } from "../generic/divider" +import { OryFormGroupProps, OryFormGroups } from "./groups" +import { OryMessageContentProps, OryMessageRootProps } from "./messages" import { - HeadlessSocialButtonContainerProps, - HeadlessSocialButtonProps, + OryFormOIDCRootProps, + OryNodeOIDCButtonProps, OryFormSocialButtons, } from "./social" import { @@ -37,46 +37,147 @@ import { isUiNodeInputAttributes, isUiNodeScriptAttributes, } from "@ory/client-fetch" -import { - FlowContainer, - onSubmitLogin, - onSubmitRecovery, - onSubmitRegistration, - onSubmitSettings, - onSubmitVerification, -} from "../../util" +import { OryFlowContainer } from "../../util" import { computeDefaultValues } from "./form-helpers" +import { OryCardRootProps } from "../card/card" +import { OryCardFooterProps } from "../card" +import { OryCardContentProps } from "../card/content" +import { onSubmitLogin } from "../../util/onSubmitLogin" +import { onSubmitRegistration } from "../../util/onSubmitRegistration" +import { onSubmitVerification } from "../../util/onSubmitVerification" +import { onSubmitRecovery } from "../../util/onSubmitRecovery" +import { onSubmitSettings } from "../../util/onSubmitSettings" -export type OryFormComponents = { - Button: ComponentType - LinkButton: ComponentType - Input: ComponentType - PinCodeInput: ComponentType - Image: ComponentType - Label: ComponentType - Checkbox: ComponentType - Text: ComponentType - - FormContainer: ComponentType - - SocialButton: ComponentType - SocialButtonContainer: ComponentType - - AuthMethodListItem: ComponentType +/** + * A record of all the components that are used in the OryForm component. + */ +export type OryFlowComponents = { + Node: { + /** + * Button component, rendered whenever a button is encountered in the Ory UI Nodes. + */ + Button: ComponentType + /** + * The SocialButton component is rendered whenever a button of group "oidc" node is encountered. + * + * It renders the "Login with Google", "Login with Facebook" etc. buttons. + */ + OIDCButton: ComponentType + /** + * The CurrentIdentifierButton component is rendered whenever a button of group "identifier_first" node is encountered. + * + * It is used to show the current identifier and can allow the user to start a new flow, if they want to. + */ + CurrentIdentifierButton: ComponentType + /** + * Anchor component, rendered whenever an "anchor" node is encountered + */ + Anchor: ComponentType + /** + * The Input component is rendered whenever a "input" node is encountered. + */ + Input: ComponentType + /** + * Special version of the Input component for OTP codes. + */ + CodeInput: ComponentType + /** + * The Image component is rendered whenever an "image" node is encountered. + * + * For example used in the "Logo" node. + */ + Image: ComponentType + /** + * The Label component is rendered around Input components and is used to render form labels. + */ + Label: ComponentType + /** + * The Checkbox component is rendered whenever an input node with of boolean type is encountered. + */ + Checkbox: ComponentType + /** + * The Text component is rendered whenever a "text" node is encountered. + */ + Text: ComponentType + } + Card: { + /** + * The card container is the main container of the card. + */ + Root: ComponentType + /** + * The card footer is the footer of the card container. + */ + Footer: ComponentType + /** + * The card header is the header of the card container. + */ + Header: ComponentType + /** + * The card content is the main content of the card container. + */ + Content: ComponentType + /** + * The card logo is the logo of the card container. + */ + Logo: ComponentType + /** + * The HorizontalDivider component is rendered between groups. + */ + Divider: ComponentType + /** + * The AuthMethodListItem component is rendered on the "method" chooser step in the identifier_first login flow. + * + * This is only used, if login is configured to use identifier_first authentication. + */ + AuthMethodListItem: ComponentType + } + Form: { + /** + * The FormContainer component is the main container of the form. + * + * It should render its children. + * + * You most likely don't want to override this component directly. + */ + Root: ComponentType + /** + * A special form group container for the social buttons. + * + * This is required, because the social buttons need to be in it's form, to not influence the other form groups. + * + * You most likely don't want to override this component directly. + */ + OIDCRoot: ComponentType - HorizontalDivider: ComponentType + /** + * The FormGroup is rendered around each group of nodes in the UI nodes. + */ + Group: ComponentType + } + Message: { + /** + * The MessageContainer is rendered around the messages. + */ + Root: ComponentType - FormGroup: ComponentType + /** + * The Message component is rendered whenever a message is encountered. + */ + Content: ComponentType + } +} - MessageContainer: ComponentType - Message: ComponentType - CurrentIdentifierButton: ComponentType +type DeepPartialTwoLevels = { + [P in keyof T]?: T[P] extends object ? { [K in keyof T[P]]?: T[P][K] } : T[P] } +export type OryFlowComponentOverrides = DeepPartialTwoLevels + export type OryFormProps = PropsWithChildren export function OryForm({ children }: OryFormProps) { - const { FormContainer } = useComponents() + const { Form } = useComponents() const flowContainer = useOryFlow() const methods = useForm({ // TODO: Generify this, so we have typesafety in the submit handler. @@ -95,7 +196,7 @@ export function OryForm({ children }: OryFormProps) { window.location.href = url } - const handleSuccess = (flow: FlowContainer) => { + const handleSuccess = (flow: OryFlowContainer) => { flowContainer.setFlowContainer(flow) methods.reset(computeDefaultValues(flow)) } @@ -191,7 +292,7 @@ export function OryForm({ children }: OryFormProps) { return ( - void methods.handleSubmit(onSubmit)(e)} @@ -211,7 +312,7 @@ export function OryForm({ children }: OryFormProps) { /> )} - + ) } diff --git a/packages/elements-react/src/components/form/groups.tsx b/packages/elements-react/src/components/form/groups.tsx index 7183bd18e..bf967e910 100644 --- a/packages/elements-react/src/components/form/groups.tsx +++ b/packages/elements-react/src/components/form/groups.tsx @@ -4,29 +4,29 @@ import { UiNodeGroupEnum } from "@ory/client-fetch" import { PropsWithChildren } from "react" import { Node } from "./nodes/node" -export type HeadlessGroupProps = PropsWithChildren<{ +export type OryFormGroupsProps = PropsWithChildren<{ groups: UiNodeGroupEnum[] }> -export type HeadlessGroupContainerProps = PropsWithChildren +export type OryFormGroupProps = PropsWithChildren -export function OryFormGroups({ children, groups }: HeadlessGroupProps) { +export function OryFormGroups({ children, groups }: OryFormGroupsProps) { const { flow: { ui }, } = useOryFlow() const nodeSorter = useNodeSorter() const { flowType } = useOryFlow() - const { FormGroup } = useComponents() + const { Form } = useComponents() const nodes = ui.nodes .filter((node) => groups.indexOf(node.group) > -1) .sort((a, b) => nodeSorter(a, b, { flowType })) return ( - + {children ?? nodes.map((node, k) => { return })} - + ) } diff --git a/packages/elements-react/src/components/form/messages.tsx b/packages/elements-react/src/components/form/messages.tsx index 9b592ab07..6b977ca61 100644 --- a/packages/elements-react/src/components/form/messages.tsx +++ b/packages/elements-react/src/components/form/messages.tsx @@ -2,34 +2,29 @@ import { useOryFlow, useComponents } from "../../context" import { UiText } from "@ory/client-fetch" import { DetailedHTMLProps, HTMLAttributes } from "react" -export type HeadlessMessagesProps = DetailedHTMLProps< +export type OryMessageContentProps = { + message: UiText +} + +export type OryMessageRootProps = DetailedHTMLProps< HTMLAttributes, HTMLDivElement > -export function OryCardValidationMessages({ ...props }: HeadlessMessagesProps) { +export function OryCardValidationMessages({ ...props }: OryMessageRootProps) { const { flow } = useOryFlow() const messages = flow.ui.messages - const { MessageContainer } = useComponents() + const { Message } = useComponents() if (!messages) { return null } return ( - + {messages?.map((message) => ( - + ))} - + ) } - -export type HeadlessMessageProps = { - message: UiText -} - -export function HeadlessMessage({ message }: HeadlessMessageProps) { - const { Message } = useComponents() - return -} diff --git a/packages/elements-react/src/components/form/nodes/input.tsx b/packages/elements-react/src/components/form/nodes/input.tsx index b7c56df3e..33e0acb9d 100644 --- a/packages/elements-react/src/components/form/nodes/input.tsx +++ b/packages/elements-react/src/components/form/nodes/input.tsx @@ -14,7 +14,7 @@ export const NodeInput = ({ attributes: UiNodeInputAttributes onClick?: MouseEventHandler }): ReactNode => { - const Components = useComponents() + const { Node } = useComponents() const nodeType = attributes.type const { onloadTrigger: onloadTrigger, @@ -57,58 +57,40 @@ export const NodeInput = ({ case UiNodeInputAttributesTypeEnum.Submit: case UiNodeInputAttributesTypeEnum.Button: if (isSocial) { - return + return } if (isResend) { return null } return ( - + ) case UiNodeInputAttributesTypeEnum.DatetimeLocal: throw new Error("Not implemented") case UiNodeInputAttributesTypeEnum.Checkbox: return ( - + ) case UiNodeInputAttributesTypeEnum.Hidden: - return ( - - ) + return default: if (isPinCodeInput) { return ( - - + - + ) } return ( - - - + + + ) } } diff --git a/packages/elements-react/src/components/form/nodes/node.tsx b/packages/elements-react/src/components/form/nodes/node.tsx index cfb77de09..b8dbaebd1 100644 --- a/packages/elements-react/src/components/form/nodes/node.tsx +++ b/packages/elements-react/src/components/form/nodes/node.tsx @@ -17,19 +17,19 @@ export type NodeProps = { } export const Node = ({ node, onClick }: NodeProps): ReactNode => { - const Components = useComponents() + const { Node } = useComponents() if (isUiNodeImageAttributes(node.attributes)) { - return + return } else if (isUiNodeTextAttributes(node.attributes)) { const attrs = node.attributes - return + return } else if (isUiNodeInputAttributes(node.attributes)) { return ( ) } else if (isUiNodeAnchorAttributes(node.attributes)) { - return + return } else if (isUiNodeScriptAttributes(node.attributes)) { const { crossorigin, diff --git a/packages/elements-react/src/components/form/social.tsx b/packages/elements-react/src/components/form/social.tsx index 60e106e6a..979038a4c 100644 --- a/packages/elements-react/src/components/form/social.tsx +++ b/packages/elements-react/src/components/form/social.tsx @@ -5,24 +5,24 @@ import { PropsWithChildren } from "react" import { OryForm } from "./form" import { useFormContext } from "react-hook-form" -export type HeadlessSocialButtonsProps = PropsWithChildren<{ +export type OryFormOIDCButtonsProps = PropsWithChildren<{ hideDivider?: boolean }> -export type HeadlessSocialButtonContainerProps = PropsWithChildren<{ +export type OryFormOIDCRootProps = PropsWithChildren<{ nodes: UiNode[] }> -export type HeadlessSocialButtonProps = PropsWithChildren<{ +export type OryNodeOIDCButtonProps = { node: UiNode attributes: UiNodeInputAttributes onClick?: () => void -}> +} export function OryFormSocialButtons({ children, hideDivider, -}: HeadlessSocialButtonsProps) { +}: OryFormOIDCButtonsProps) { const { flow: { ui }, } = useOryFlow() @@ -31,8 +31,7 @@ export function OryFormSocialButtons({ // Only get the oidc nodes. const filteredNodes = ui.nodes.filter((node) => node.group === "oidc") - const { SocialButtonContainer, HorizontalDivider, SocialButton } = - useComponents() + const { Form, Card, Node } = useComponents() if (filteredNodes.length === 0) { return null @@ -45,11 +44,11 @@ export function OryFormSocialButtons({ return ( <> - + {children ?? filteredNodes.map((node, k) => { return ( - ) })} - + {!hideDivider && filteredNodes.length > 0 && otherNodes.length > 0 && ( - + )} ) diff --git a/packages/elements-react/src/components/generic/divider.tsx b/packages/elements-react/src/components/generic/divider.tsx index 4feae2729..66c17616b 100644 --- a/packages/elements-react/src/components/generic/divider.tsx +++ b/packages/elements-react/src/components/generic/divider.tsx @@ -1,10 +1,10 @@ import { useComponents } from "../../context" import { useOryFlow } from "../../context" -export type HorizontalDividerProps = Record +export type OryCardDividerProps = Record export function OryFormGroupDivider() { - const { HorizontalDivider } = useComponents() + const { Card } = useComponents() const { flow: { ui }, } = useOryFlow() @@ -18,7 +18,7 @@ export function OryFormGroupDivider() { ) if (filteredNodes.length > 0 && otherNodes.length > 0) { - return + return } return null } diff --git a/packages/elements-react/src/context/component.tsx b/packages/elements-react/src/context/component.tsx index 70b49167f..ac7895f44 100644 --- a/packages/elements-react/src/context/component.tsx +++ b/packages/elements-react/src/context/component.tsx @@ -1,6 +1,6 @@ import { UiNode } from "@ory/client-fetch" import { PropsWithChildren, createContext, useContext } from "react" -import { OryFlowComponents } from "../types" +import { OryFlowComponents } from "../components" type ComponentContextValue = { components: OryFlowComponents diff --git a/packages/elements-react/src/context/flow-context.tsx b/packages/elements-react/src/context/flow-context.tsx index fb0c2cc3a..233988f70 100644 --- a/packages/elements-react/src/context/flow-context.tsx +++ b/packages/elements-react/src/context/flow-context.tsx @@ -5,7 +5,7 @@ import { useContext, useState, } from "react" -import { FlowContainer } from "../util/flowContainer" +import { OryFlowContainer } from "../util/flowContainer" /** * Returns an object that contains the current flow and the flow type, as well as the configuration. @@ -21,16 +21,25 @@ export function useOryFlow() { return ctx } -export type FlowContainerSetter = Dispatch> +/** + * Function to set the flow container. + */ +export type FlowContainerSetter = Dispatch> -export type FlowContextValue = FlowContainer & { +/** + * The return value of the OryFlowContext. + */ +export type FlowContextValue = OryFlowContainer & { + /** + * Function to set the flow container. + */ setFlowContainer: FlowContainerSetter } // This is fine, because we don't export the context itself and guard from it being null in useOryFlow const OryFlowContext = createContext(null!) -export type OryFlowProviderProps = PropsWithChildren +export type OryFlowProviderProps = PropsWithChildren export function OryFlowProvider({ children, @@ -49,7 +58,7 @@ export function OryFlowProvider({ ({ ...container, ...updatedContainer, - }) as FlowContainer, + }) as OryFlowContainer, ) }, } as FlowContextValue diff --git a/packages/elements-react/src/context/index.tsx b/packages/elements-react/src/context/index.tsx index 14939b390..a73d99c89 100644 --- a/packages/elements-react/src/context/index.tsx +++ b/packages/elements-react/src/context/index.tsx @@ -1,4 +1,12 @@ -export * from "./component" -export * from "./flow-context" -export * from "./intl-context" +export { useComponents, useNodeSorter } from "./component" +export { + useOryFlow, + type FlowContextValue, + type FlowContainerSetter, +} from "./flow-context" +export type { + SupportedTranslations, + OryIntlProviderProps as IntlProviderProps, + Locale, +} from "./intl-context" export * from "./provider" diff --git a/packages/elements-react/src/context/intl-context.tsx b/packages/elements-react/src/context/intl-context.tsx index bb3278a0c..09bec9a06 100644 --- a/packages/elements-react/src/context/intl-context.tsx +++ b/packages/elements-react/src/context/intl-context.tsx @@ -147,6 +147,9 @@ export const LanguageCodes = [ "zu", ] as const +/** + * A record of custom translations for a specific locale. + */ export type CustomLanguageFormats = { [k in (typeof LanguageCodes)[number]]?: Partial } @@ -173,16 +176,19 @@ export type SupportedTranslations = { defaultLocale?: string } -export type IntlProviderProps = Type extends CustomTranslations - ? CustomTranslations - : SupportedTranslations +export type OryIntlProviderProps = + Translation extends CustomTranslations + ? CustomTranslations + : SupportedTranslations export const IntlProvider = < - T extends SupportedTranslations | CustomTranslations = SupportedTranslations, + Translation extends + | SupportedTranslations + | CustomTranslations = SupportedTranslations, >({ children, ...props -}: PropsWithChildren>) => { +}: PropsWithChildren>) => { const intlCtx = useContext(IntlContext) if (intlCtx) { diff --git a/packages/elements-react/src/context/provider.tsx b/packages/elements-react/src/context/provider.tsx index 9d65bea33..08f91fc31 100644 --- a/packages/elements-react/src/context/provider.tsx +++ b/packages/elements-react/src/context/provider.tsx @@ -1,27 +1,27 @@ "use client" -import { ComponentPropsWithoutRef, PropsWithChildren } from "react" -import { OryFlowComponents } from "../types" +import { PropsWithChildren } from "react" + +import { OryFlowComponents } from "../components" +import { OryFlowContainer } from "../util/flowContainer" import { OryComponentProvider } from "./component" import { OryFlowProvider } from "./flow-context" import { IntlProvider, - IntlProviderProps, + OryIntlProviderProps, SupportedTranslations, } from "./intl-context" -import { FlowContainer } from "../util/flowContainer" -export type ProviderProps = { +export type OryProviderProps = { components: OryFlowComponents -} & IntlProviderProps & - FlowContainer & - ComponentPropsWithoutRef<"div"> & +} & OryIntlProviderProps & + OryFlowContainer & PropsWithChildren -export function OryProvider({ +export function OryProvider({ children, components: Components, ...props -}: ProviderProps) { +}: OryProviderProps) { const { locale, defaultLocale, ...oryFlowProps } = props return ( diff --git a/packages/elements-react/src/tests/jest/test-utils.tsx b/packages/elements-react/src/tests/jest/test-utils.tsx index 0b8d1314e..c5e5ec31b 100644 --- a/packages/elements-react/src/tests/jest/test-utils.tsx +++ b/packages/elements-react/src/tests/jest/test-utils.tsx @@ -1,13 +1,13 @@ import { PropsWithChildren, ReactElement, ReactNode } from "react" +import { OryComponentProvider } from "../../context/component" +import { OryDefaultComponents } from "../../theme/default" +import { render, RenderOptions } from "@testing-library/react" +import { OryClientConfiguration } from "../../util" import { - OryComponentProvider, OryProvider, - ProviderProps, + OryProviderProps, SupportedTranslations, } from "../../context" -import { OryDefaultComponents } from "../../theme/default" -import { render, RenderOptions } from "@testing-library/react" -import { OryClientConfiguration } from "../../util" const AllProviders = ({ children }: PropsWithChildren) => ( @@ -41,7 +41,7 @@ export function renderWithOryProvider( { providerProps, ...renderOptions - }: RenderOptions & { providerProps: ProviderProps }, + }: RenderOptions & { providerProps: OryProviderProps }, ) { return render(ui, { wrapper: ({ children }) => ( diff --git a/packages/elements-react/src/theme/default/components/card/auth-methods.tsx b/packages/elements-react/src/theme/default/components/card/auth-methods.tsx index 7b6fd6219..ec99b5f83 100644 --- a/packages/elements-react/src/theme/default/components/card/auth-methods.tsx +++ b/packages/elements-react/src/theme/default/components/card/auth-methods.tsx @@ -1,10 +1,10 @@ -import { HeadlessAuthMethodListItemProps } from "@ory/elements-react" +import { useIntl } from "react-intl" +import { OryCardAuthMethodListItemProps } from "@ory/elements-react" import code from "../../assets/icons/code.svg" import passkey from "../../assets/icons/passkey.svg" import password from "../../assets/icons/password.svg" import webauthn from "../../assets/icons/webauthn.svg" -import { useIntl } from "react-intl" const iconsMap: Record = { code, @@ -17,7 +17,7 @@ const iconsMap: Record = { export function DefaultAuthMethodListItem({ onClick, group, -}: HeadlessAuthMethodListItemProps) { +}: OryCardAuthMethodListItemProps) { const intl = useIntl() const Icon = iconsMap[group] || null diff --git a/packages/elements-react/src/theme/default/components/card/current-identifier-button.tsx b/packages/elements-react/src/theme/default/components/card/current-identifier-button.tsx index bb360a08b..fd202306c 100644 --- a/packages/elements-react/src/theme/default/components/card/current-identifier-button.tsx +++ b/packages/elements-react/src/theme/default/components/card/current-identifier-button.tsx @@ -1,4 +1,4 @@ -import { HeadlessCurrentIdentifierProps } from "@ory/elements-react" +import { OryCurrentIdentifierProps } from "@ory/elements-react" import IconArrowLeft from "../../assets/icons/arrow-left.svg" export function DefaultCurrentIdentifierButton({ @@ -6,7 +6,7 @@ export function DefaultCurrentIdentifierButton({ onClick, type, href, -}: HeadlessCurrentIdentifierProps) { +}: OryCurrentIdentifierProps) { const Element = onClick ? "button" : "a" return ( diff --git a/packages/elements-react/src/theme/default/components/card/header.tsx b/packages/elements-react/src/theme/default/components/card/header.tsx index f360ea731..d72a0db49 100644 --- a/packages/elements-react/src/theme/default/components/card/header.tsx +++ b/packages/elements-react/src/theme/default/components/card/header.tsx @@ -2,10 +2,10 @@ import { useComponents, useOryFlow } from "@ory/elements-react" import { constructCardHeaderText } from "../../utils/constructCardHeader" function InnerCardHeader({ title, text }: { title: string; text?: string }) { - const { CardLogo } = useComponents() + const { Card } = useComponents() return (
- +

{title} diff --git a/packages/elements-react/src/theme/default/components/default-components.tsx b/packages/elements-react/src/theme/default/components/default-components.tsx index f791f16f0..2898b20c2 100644 --- a/packages/elements-react/src/theme/default/components/default-components.tsx +++ b/packages/elements-react/src/theme/default/components/default-components.tsx @@ -29,32 +29,34 @@ import { DefaultCurrentIdentifierButton } from "./card/current-identifier-button import { OryFlowComponents } from "@ory/elements-react" export const OryDefaultComponents: OryFlowComponents = { - Card: DefaultCard, - CardHeader: DefaultCardHeader, - CardContent: DefaultCardContent, - CardFooter: DefaultCardFooter, - CardLogo: DefaultCardLogo, - - // Generic - HorizontalDivider: DefaultHorizontalDivider, - - // Form - FormGroup: DefaultGroupContainer, - - SocialButtonContainer: DefaultSocialButtonContainer, - MessageContainer: DefaultMessageContainer, - Message: DefaultMessage, - Input: DefaultInput, - Image: DefaultImage, - Label: DefaultLabel, - Checkbox: DefaultCheckbox, - Text: DefaultText, - PinCodeInput: DefaultPinCodeInput, - Button: DefaultButton, - LinkButton: DefaultLinkButton, - SocialButton: DefaultButtonSocial, - FormContainer: DefaultFormContainer, - - AuthMethodListItem: DefaultAuthMethodListItem, - CurrentIdentifierButton: DefaultCurrentIdentifierButton, + Card: { + Root: DefaultCard, + Footer: DefaultCardFooter, + Header: DefaultCardHeader, + Content: DefaultCardContent, + Logo: DefaultCardLogo, + Divider: DefaultHorizontalDivider, + AuthMethodListItem: DefaultAuthMethodListItem, + }, + Node: { + Button: DefaultButton, + OIDCButton: DefaultButtonSocial, + CurrentIdentifierButton: DefaultCurrentIdentifierButton, + Input: DefaultInput, + CodeInput: DefaultPinCodeInput, + Image: DefaultImage, + Label: DefaultLabel, + Checkbox: DefaultCheckbox, + Text: DefaultText, + Anchor: DefaultLinkButton, + }, + Form: { + Root: DefaultFormContainer, + Group: DefaultGroupContainer, + OIDCRoot: DefaultSocialButtonContainer, + }, + Message: { + Root: DefaultMessageContainer, + Content: DefaultMessage, + }, } diff --git a/packages/elements-react/src/theme/default/components/form/button.tsx b/packages/elements-react/src/theme/default/components/form/button.tsx index c8af0e273..2241dc985 100644 --- a/packages/elements-react/src/theme/default/components/form/button.tsx +++ b/packages/elements-react/src/theme/default/components/form/button.tsx @@ -1,15 +1,18 @@ +import { getNodeLabel } from "@ory/client-fetch" +import { + OryNodeButtonProps, + uiTextToFormattedMessage, +} from "@ory/elements-react" import { useFormContext } from "react-hook-form" import { useIntl } from "react-intl" -import { Spinner } from "./spinner" import { cn } from "../../utils/cn" -import { formatMessage, HeadlessButtonProps } from "@ory/elements-react" -import { getNodeLabel } from "@ory/client-fetch" +import { Spinner } from "./spinner" export const DefaultButton = ({ attributes, node, onClick, -}: HeadlessButtonProps) => { +}: OryNodeButtonProps) => { const { type, name, @@ -75,7 +78,7 @@ export const DefaultButton = ({ }, )} > - {formatMessage(label, intl)} + {label ? uiTextToFormattedMessage(label, intl) : ""} ) diff --git a/packages/elements-react/src/theme/default/components/form/checkbox.tsx b/packages/elements-react/src/theme/default/components/form/checkbox.tsx index 653e2e4a9..db68cc052 100644 --- a/packages/elements-react/src/theme/default/components/form/checkbox.tsx +++ b/packages/elements-react/src/theme/default/components/form/checkbox.tsx @@ -1,11 +1,14 @@ "use client" +import { getNodeLabel } from "@ory/client-fetch" +import { + OryNodeInputProps, + messageTestId, + uiTextToFormattedMessage, +} from "@ory/elements-react" import { useState } from "react" import { useForm } from "react-hook-form" import { useIntl } from "react-intl" import { cn } from "../../utils/cn" -import { HeadlessInputProps } from "@ory/elements-react" -import { formatMessage, messageTestId } from "@ory/elements-react" -import { getNodeLabel } from "@ory/client-fetch" function CheckboxSVG() { return ( @@ -34,7 +37,7 @@ function CheckboxSVG() { export const DefaultCheckbox = ({ attributes: initialAttributes, node, -}: HeadlessInputProps) => { +}: OryNodeInputProps) => { const { value, name, @@ -76,7 +79,7 @@ export const DefaultCheckbox = ({

{node.messages.map((message) => ( - {formatMessage(message, intl)} + {uiTextToFormattedMessage(message, intl)} ))}
diff --git a/packages/elements-react/src/theme/default/components/form/group-container.tsx b/packages/elements-react/src/theme/default/components/form/group-container.tsx index cd80950a6..98aa3c565 100644 --- a/packages/elements-react/src/theme/default/components/form/group-container.tsx +++ b/packages/elements-react/src/theme/default/components/form/group-container.tsx @@ -1,7 +1,5 @@ -import { HeadlessGroupContainerProps } from "@ory/elements-react" +import { OryFormGroupProps } from "@ory/elements-react" -export function DefaultGroupContainer({ - children, -}: HeadlessGroupContainerProps) { +export function DefaultGroupContainer({ children }: OryFormGroupProps) { return
{children}
} diff --git a/packages/elements-react/src/theme/default/components/form/image.tsx b/packages/elements-react/src/theme/default/components/form/image.tsx index 2812217f9..3c7b79151 100644 --- a/packages/elements-react/src/theme/default/components/form/image.tsx +++ b/packages/elements-react/src/theme/default/components/form/image.tsx @@ -1,6 +1,6 @@ -import { HeadlessImageProps } from "@ory/elements-react" +import { OryNodeImageProps } from "@ory/elements-react" -export function DefaultImage({ attributes }: HeadlessImageProps) { +export function DefaultImage({ attributes }: OryNodeImageProps) { // const intl = useIntl() return (
diff --git a/packages/elements-react/src/theme/default/components/form/index.tsx b/packages/elements-react/src/theme/default/components/form/index.tsx index f2ec56377..34a5963d3 100644 --- a/packages/elements-react/src/theme/default/components/form/index.tsx +++ b/packages/elements-react/src/theme/default/components/form/index.tsx @@ -1,14 +1,14 @@ import { PropsWithChildren } from "react" import { cn } from "../../utils/cn" -import { HeadlessFormProps } from "@ory/elements-react" -import { HeadlessMessageProps } from "@ory/elements-react" +import { OryFormRootProps } from "@ory/elements-react" +import { OryMessageContentProps } from "@ory/elements-react" export function DefaultFormContainer({ children, onSubmit, action, method, -}: PropsWithChildren) { +}: PropsWithChildren) { return (
{children} } -export function DefaultMessage({ message }: HeadlessMessageProps) { +export function DefaultMessage({ message }: OryMessageContentProps) { return ( { +}: OryNodeInputProps) => { const label = getNodeLabel(node) const { register } = useFormContext() const { value, autocomplete, name, maxlength, ...rest } = attributes diff --git a/packages/elements-react/src/theme/default/components/form/label.tsx b/packages/elements-react/src/theme/default/components/form/label.tsx index f383cd1aa..8ef3f4b81 100644 --- a/packages/elements-react/src/theme/default/components/form/label.tsx +++ b/packages/elements-react/src/theme/default/components/form/label.tsx @@ -1,8 +1,11 @@ import { FlowType, getNodeLabel } from "@ory/client-fetch" +import { + OryNodeLabelProps, + messageTestId, + uiTextToFormattedMessage, + useOryFlow, +} from "@ory/elements-react" import { useIntl } from "react-intl" -import { useOryFlow } from "@ory/elements-react" -import { HeadlessLabelProps } from "@ory/elements-react" -import { formatMessage, messageTestId } from "@ory/elements-react" import { cn } from "../../utils/cn" export function DefaultLabel({ @@ -10,7 +13,7 @@ export function DefaultLabel({ children, attributes, ...rest -}: HeadlessLabelProps) { +}: OryNodeLabelProps) { const intl = useIntl() const label = getNodeLabel(node) const { config, flowType } = useOryFlow() @@ -29,7 +32,7 @@ export function DefaultLabel({ htmlFor={attributes.name} {...rest} > - {formatMessage(label, intl)} + {uiTextToFormattedMessage(label, intl)} {isPassword && config.project.recovery_enabled && @@ -65,7 +68,7 @@ export function DefaultLabel({ })} {...messageTestId(message)} > - {formatMessage(message, intl)} + {uiTextToFormattedMessage(message, intl)} ))} diff --git a/packages/elements-react/src/theme/default/components/form/link-button.tsx b/packages/elements-react/src/theme/default/components/form/link-button.tsx index 2a680ac33..b40af8796 100644 --- a/packages/elements-react/src/theme/default/components/form/link-button.tsx +++ b/packages/elements-react/src/theme/default/components/form/link-button.tsx @@ -1,13 +1,15 @@ +import { getNodeLabel } from "@ory/client-fetch" +import { + OryNodeAnchorProps, + uiTextToFormattedMessage, +} from "@ory/elements-react" import { forwardRef } from "react" import { useIntl } from "react-intl" import { cn } from "../../utils/cn" -import { HeadlessLinkButtonProps } from "@ory/elements-react" -import { formatMessage } from "@ory/elements-react" -import { getNodeLabel } from "@ory/client-fetch" export const DefaultLinkButton = forwardRef< HTMLAnchorElement, - HeadlessLinkButtonProps + OryNodeAnchorProps >(({ attributes, node }, ref) => { const intl = useIntl() const label = getNodeLabel(node) @@ -15,12 +17,12 @@ export const DefaultLinkButton = forwardRef< - {formatMessage(label, intl)} + {label ? uiTextToFormattedMessage(label, intl) : ""} ) }) diff --git a/packages/elements-react/src/theme/default/components/form/pin-code-input.tsx b/packages/elements-react/src/theme/default/components/form/pin-code-input.tsx index dfbcef108..027a6d833 100644 --- a/packages/elements-react/src/theme/default/components/form/pin-code-input.tsx +++ b/packages/elements-react/src/theme/default/components/form/pin-code-input.tsx @@ -1,9 +1,9 @@ "use client" import { useFormContext } from "react-hook-form" import { InputOTP, InputOTPGroup, InputOTPSlot } from "./shadcn/otp-input" -import { HeadlessInputProps } from "@ory/elements-react" +import { OryNodeInputProps } from "@ory/elements-react" -export const DefaultPinCodeInput = ({ attributes }: HeadlessInputProps) => { +export const DefaultPinCodeInput = ({ attributes }: OryNodeInputProps) => { const { setValue, watch } = useFormContext() const { maxlength, name } = attributes const elements = maxlength ?? 6 diff --git a/packages/elements-react/src/theme/default/components/form/social.tsx b/packages/elements-react/src/theme/default/components/form/social.tsx index 16e1a998e..83358d12d 100644 --- a/packages/elements-react/src/theme/default/components/form/social.tsx +++ b/packages/elements-react/src/theme/default/components/form/social.tsx @@ -1,6 +1,6 @@ import { - HeadlessSocialButtonContainerProps, - HeadlessSocialButtonProps, + OryFormOIDCRootProps, + OryNodeOIDCButtonProps, useOryFlow, } from "@ory/elements-react" import logos from "../../provider-logos" @@ -22,7 +22,7 @@ export function DefaultButtonSocial({ attributes, node, onClick, -}: HeadlessSocialButtonProps) { +}: OryNodeOIDCButtonProps) { const { node_type: _ignoredNodeType, type: _ignoredType, @@ -79,7 +79,7 @@ export function DefaultButtonSocial({ export function DefaultSocialButtonContainer({ children, nodes, -}: HeadlessSocialButtonContainerProps) { +}: OryFormOIDCRootProps) { return (

- {formatMessage(node.meta.label, intl)} + {node.meta.label ? uiTextToFormattedMessage(node.meta.label, intl) : ""}

{( attributes.text.context as { @@ -16,7 +15,7 @@ export function DefaultText({ node, attributes }: HeadlessTextProps) { } ).secrets?.map((text: UiText, index) => (
-          {formatMessage(text, intl)}
+          {text ? uiTextToFormattedMessage(text, intl) : ""}
         
))} diff --git a/packages/elements-react/src/theme/default/flows/login.tsx b/packages/elements-react/src/theme/default/flows/login.tsx index aea7b03f0..1cbf3b838 100644 --- a/packages/elements-react/src/theme/default/flows/login.tsx +++ b/packages/elements-react/src/theme/default/flows/login.tsx @@ -2,16 +2,17 @@ import { FlowType, LoginFlow } from "@ory/client-fetch" import { OryClientConfiguration, - OryFlowComponents, + OryFlowComponentOverrides, OryProvider, OryTwoStepCard, } from "@ory/elements-react" +import merge from "lodash.merge" import { PropsWithChildren } from "react" import { OryDefaultComponents } from "../components" export type LoginFlowContextProps = { flow: LoginFlow - components?: Partial + components?: OryFlowComponentOverrides config: OryClientConfiguration } @@ -21,10 +22,9 @@ export function Login({ children, components: flowOverrideComponents, }: PropsWithChildren) { - const components = { - ...OryDefaultComponents, - ...flowOverrideComponents, - } + const components = flowOverrideComponents + ? merge({}, OryDefaultComponents, flowOverrideComponents) + : OryDefaultComponents return ( ) { - const components = { - ...OryDefaultComponents, - ...flowOverrideComponents, - } + const components = flowOverrideComponents + ? merge({}, OryDefaultComponents, flowOverrideComponents) + : OryDefaultComponents return ( ) { - const components = { - ...OryDefaultComponents, - ...flowOverrideComponents, - } + const components = flowOverrideComponents + ? merge({}, OryDefaultComponents, flowOverrideComponents) + : OryDefaultComponents return ( ) { - const components = { - ...OryDefaultComponents, - ...flowOverrideComponents, - } + const components = flowOverrideComponents + ? merge({}, OryDefaultComponents, flowOverrideComponents) + : OryDefaultComponents return ( ) { - const components = { - ...OryDefaultComponents, - ...flowOverrideComponents, - } + const components = flowOverrideComponents + ? merge({}, OryDefaultComponents, flowOverrideComponents) + : OryDefaultComponents return ( , "children"> -export type HeadlessCurrentIdentifierProps = { +export type OryCurrentIdentifierProps = { attributes: UiNodeInputAttributes node: UiNode onClick?: () => void href?: string } & Omit, "children" | "onClick"> -export type HeadlessLinkButtonProps = { +export type OryNodeAnchorProps = { attributes: UiNodeAnchorAttributes node: UiNode } & Omit, "children"> -export type HeadlessLabelProps = { +export type OryNodeLabelProps = { attributes: UiNodeInputAttributes node: UiNode } & ComponentPropsWithoutRef<"label"> -export type HeadlessTextProps = { +export type OryNodeTextProps = { attributes: UiNodeTextAttributes node: UiNode } -export type HeadlessAuthMethodListItemProps = { +/** + * Props for the AuthMethodListItem component. This component is used + * to render a single auth method in the AuthMethodList component. + */ +export type OryCardAuthMethodListItemProps = { onClick: () => void group: string } -export type HeadlessImageProps = { +export type OryNodeImageProps = { attributes: UiNodeImageAttributes node: UiNode } export type FormValues = Record -export type HeadlessFormProps = ComponentPropsWithoutRef<"form"> & { +export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & { onSubmit: FormEventHandler } -export type HeadlessInputProps = { +export type OryNodeInputProps = { attributes: UiNodeInputAttributes node: UiNode onClick?: MouseEventHandler } - -export type OryFlowComponents = OryFormComponents & OryCardComponents diff --git a/packages/elements-react/src/util/flowContainer.ts b/packages/elements-react/src/util/flowContainer.ts index 228107a23..72a64de52 100644 --- a/packages/elements-react/src/util/flowContainer.ts +++ b/packages/elements-react/src/util/flowContainer.ts @@ -12,26 +12,76 @@ import { } from "@ory/client-fetch" import { OryClientConfiguration } from "./clientConfiguration" -type BaseFlow = { +/** + * A generic flow container, containing a flowType, the flow itself and the config object + * + * @see OryClientConfiguration + */ +type OryFlow = { flowType: TFlowType flow: TFlow config: OryClientConfiguration } -export type LoginFlowContainer = BaseFlow -export type RegistrationFlowContainer = BaseFlow< +/** + * A flow container for the login flow + * + * @see OryFlow + * @see LoginFlow + */ +export type LoginFlowContainer = OryFlow + +/** + * A flow container for the registration flow + * + * @see OryFlow + * @see RegistrationFlow + */ +export type RegistrationFlowContainer = OryFlow< FlowType.Registration, RegistrationFlow > -export type RecoveryFlowContainer = BaseFlow -export type VerificationFlowContainer = BaseFlow< + +/** + * A flow container for the recovery flow + * + * @see OryFlow + * @see RecoveryFlow + */ +export type RecoveryFlowContainer = OryFlow + +/** + * A flow container for the verification flow + * + * @see OryFlow + * @see VerificationFlow + * + */ +export type VerificationFlowContainer = OryFlow< FlowType.Verification, VerificationFlow > -export type SettingsFlowContainer = BaseFlow -export type ErrorFlowContainer = BaseFlow +/** + * A flow container for the settings flow + * + * @see OryFlow + * @see SettingsFlow + */ +export type SettingsFlowContainer = OryFlow + +/** + * A flow container for the error flow + * + * @see OryFlow + * @see FlowError (Error flow) + * + */ +export type ErrorFlowContainer = OryFlow -export type FlowContainer = +/** + * A union type of all flow containers + */ +export type OryFlowContainer = | LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer diff --git a/packages/elements-react/src/util/i18n/__tests__/test-components.tsx b/packages/elements-react/src/util/i18n/__tests__/test-components.tsx index 74f3828dd..88d91e042 100644 --- a/packages/elements-react/src/util/i18n/__tests__/test-components.tsx +++ b/packages/elements-react/src/util/i18n/__tests__/test-components.tsx @@ -1,9 +1,9 @@ -import { formatMessage } from "../index" import { UiText } from "@ory/client-fetch" import { useIntl } from "react-intl" +import { uiTextToFormattedMessage } from "../index" export const Inner = ({ uiText }: { uiText: UiText }) => { const intl = useIntl() - return
{formatMessage(uiText, intl)}
+ return
{uiTextToFormattedMessage(uiText, intl)}
} diff --git a/packages/elements-react/src/util/i18n/index.ts b/packages/elements-react/src/util/i18n/index.ts index 094697897..fa0da8877 100644 --- a/packages/elements-react/src/util/i18n/index.ts +++ b/packages/elements-react/src/util/i18n/index.ts @@ -4,13 +4,6 @@ import { UiText } from "@ory/client-fetch" import { IntlShape } from "react-intl" -export function formatMessage(uiText: UiText | undefined, intl: IntlShape) { - if (!uiText) { - return "" - } - return uiTextToFormattedMessage(uiText, intl) -} - /** * Converts a UiText to a FormattedMessage. * The UiText contains the id of the message and the context. diff --git a/packages/elements-react/src/util/index.ts b/packages/elements-react/src/util/index.ts index b9cb65cc8..d73561cb7 100644 --- a/packages/elements-react/src/util/index.ts +++ b/packages/elements-react/src/util/index.ts @@ -1,13 +1,8 @@ // Copyright © 2024 Ory Corp // SPDX-License-Identifier: Apache-2.0 -export * from "./test-id" -export * from "./i18n" -export * from "./onSubmitLogin" -export * from "./onSubmitSettings" -export * from "./onSubmitRecovery" -export * from "./onSubmitVerification" -export * from "./onSubmitRegistration" export * from "./clientConfiguration" export * from "./flowContainer" +export * from "./i18n" export * from "./submitHandler" +export * from "./test-id" diff --git a/packages/elements-react/src/util/onSubmitLogin.ts b/packages/elements-react/src/util/onSubmitLogin.ts index 46df83502..b1677ce78 100644 --- a/packages/elements-react/src/util/onSubmitLogin.ts +++ b/packages/elements-react/src/util/onSubmitLogin.ts @@ -9,7 +9,7 @@ import { UpdateLoginFlowBody, } from "@ory/client-fetch" import { OnSubmitHandlerProps } from "./submitHandler" -import { FlowContainer } from "./flowContainer" +import { OryFlowContainer } from "./flowContainer" import { frontendClient } from "./client" /** @@ -22,7 +22,7 @@ import { frontendClient } from "./client" * @param onRedirect - This method is used to redirect the user to a different page. */ export async function onSubmitLogin( - { config, flow }: FlowContainer, + { config, flow }: OryFlowContainer, { setFlowContainer, body, diff --git a/packages/elements-react/src/util/onSubmitRecovery.ts b/packages/elements-react/src/util/onSubmitRecovery.ts index 02a91dfa6..abbba7596 100644 --- a/packages/elements-react/src/util/onSubmitRecovery.ts +++ b/packages/elements-react/src/util/onSubmitRecovery.ts @@ -9,7 +9,7 @@ import { recoveryUrl, UpdateRecoveryFlowBody, } from "@ory/client-fetch" -import { FlowContainer } from "./flowContainer" +import { OryFlowContainer } from "./flowContainer" import { OnSubmitHandlerProps } from "./submitHandler" import { frontendClient } from "./client" @@ -23,7 +23,7 @@ import { frontendClient } from "./client" * @param onRedirect - This method is used to redirect the user to a different page. */ export async function onSubmitRecovery( - { config, flow }: FlowContainer, + { config, flow }: OryFlowContainer, { setFlowContainer, body, diff --git a/packages/elements-react/src/util/onSubmitRegistration.ts b/packages/elements-react/src/util/onSubmitRegistration.ts index 5788c9b88..dc858b0dd 100644 --- a/packages/elements-react/src/util/onSubmitRegistration.ts +++ b/packages/elements-react/src/util/onSubmitRegistration.ts @@ -9,7 +9,7 @@ import { registrationUrl, UpdateRegistrationFlowBody, } from "@ory/client-fetch" -import { FlowContainer } from "./flowContainer" +import { OryFlowContainer } from "./flowContainer" import { OnSubmitHandlerProps } from "./submitHandler" import { frontendClient } from "./client" @@ -23,7 +23,7 @@ import { frontendClient } from "./client" * @param onRedirect - This method is used to redirect the user to a different page. */ export async function onSubmitRegistration( - { config, flow }: FlowContainer, + { config, flow }: OryFlowContainer, { setFlowContainer, body, diff --git a/packages/elements-react/src/util/onSubmitSettings.ts b/packages/elements-react/src/util/onSubmitSettings.ts index 7ce49d1e7..36e4f8c7d 100644 --- a/packages/elements-react/src/util/onSubmitSettings.ts +++ b/packages/elements-react/src/util/onSubmitSettings.ts @@ -9,7 +9,7 @@ import { settingsUrl, UpdateSettingsFlowBody, } from "@ory/client-fetch" -import { FlowContainer } from "./flowContainer" +import { OryFlowContainer } from "./flowContainer" import { OnSubmitHandlerProps } from "./submitHandler" import { frontendClient } from "./client" @@ -23,7 +23,7 @@ import { frontendClient } from "./client" * @param onRedirect - This method is used to redirect the user to a different page. */ export async function onSubmitSettings( - { config, flow }: FlowContainer, + { config, flow }: OryFlowContainer, { setFlowContainer, body, diff --git a/packages/elements-react/src/util/onSubmitVerification.ts b/packages/elements-react/src/util/onSubmitVerification.ts index d05ece4a6..5ebee3013 100644 --- a/packages/elements-react/src/util/onSubmitVerification.ts +++ b/packages/elements-react/src/util/onSubmitVerification.ts @@ -8,7 +8,7 @@ import { VerificationFlow, verificationUrl, } from "@ory/client-fetch" -import { FlowContainer } from "./flowContainer" +import { OryFlowContainer } from "./flowContainer" import { OnSubmitHandlerProps } from "./submitHandler" import { frontendClient } from "./client" @@ -22,7 +22,7 @@ import { frontendClient } from "./client" * @param onRedirect - This method is used to redirect the user to a different page. */ export async function onSubmitVerification( - { config, flow }: FlowContainer, + { config, flow }: OryFlowContainer, { setFlowContainer, body, diff --git a/packages/elements-react/src/util/submitHandler.ts b/packages/elements-react/src/util/submitHandler.ts index d555f34ad..5472754c1 100644 --- a/packages/elements-react/src/util/submitHandler.ts +++ b/packages/elements-react/src/util/submitHandler.ts @@ -9,7 +9,7 @@ import { UpdateSettingsFlowBody, UpdateVerificationFlowBody, } from "@ory/client-fetch" -import { FlowContainer } from "./flowContainer" +import { OryFlowContainer } from "./flowContainer" export type OnSubmitHandlerProps< T extends @@ -22,7 +22,7 @@ export type OnSubmitHandlerProps< /** * This method is used to update the flow container when a validation error occurs, for example. */ - setFlowContainer: (flowContainer: FlowContainer) => void + setFlowContainer: (flowContainer: OryFlowContainer) => void /** * The form values to submit. diff --git a/packages/elements-react/temp/elements-react-theme.api.md b/packages/elements-react/temp/elements-react-theme.api.md new file mode 100644 index 000000000..5a3b9d45f --- /dev/null +++ b/packages/elements-react/temp/elements-react-theme.api.md @@ -0,0 +1,129 @@ +## API Report File for "@ory/elements-react" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +import { ComponentPropsWithoutRef } from 'react'; +import { ComponentType } from 'react'; +import { ConfigurationParameters } from '@ory/client-fetch'; +import { DetailedHTMLProps } from 'react'; +import { FlowError } from '@ory/client-fetch'; +import { FormEventHandler } from 'react'; +import { HTMLAttributes } from 'react'; +import { LoginFlow } from '@ory/client-fetch'; +import { MouseEventHandler } from 'react'; +import { PropsWithChildren } from 'react'; +import * as react from 'react'; +import * as react_jsx_runtime from 'react/jsx-runtime'; +import { RecoveryFlow } from '@ory/client-fetch'; +import { RegistrationFlow } from '@ory/client-fetch'; +import { SettingsFlow } from '@ory/client-fetch'; +import { UiNode } from '@ory/client-fetch'; +import { UiNodeAnchorAttributes } from '@ory/client-fetch'; +import { UiNodeImageAttributes } from '@ory/client-fetch'; +import { UiNodeInputAttributes } from '@ory/client-fetch'; +import { UiNodeTextAttributes } from '@ory/client-fetch'; +import { UiText } from '@ory/client-fetch'; +import { VerificationFlow } from '@ory/client-fetch'; + +// Warning: (ae-forgotten-export) The symbol "OryCardRootProps" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function DefaultCard({ children }: OryCardRootProps): react_jsx_runtime.JSX.Element; + +// Warning: (ae-forgotten-export) The symbol "OryCardContentProps" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function DefaultCardContent({ children }: OryCardContentProps): react.ReactNode; + +// @public (undocumented) +export function DefaultCardFooter(): react_jsx_runtime.JSX.Element | null; + +// @public (undocumented) +export function DefaultCardHeader(): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export function DefaultCardLogo(): react_jsx_runtime.JSX.Element; + +// Warning: (ae-forgotten-export) The symbol "OryFormRootProps" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren): react_jsx_runtime.JSX.Element; + +// Warning: (ae-forgotten-export) The symbol "OryMessageContentProps" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null; + +// @public (undocumented) +function Error_2({ error, children, }: PropsWithChildren): react_jsx_runtime.JSX.Element; +export { Error_2 as Error } + +// @public (undocumented) +export type ErrorFlowContextProps = { + error: FlowError; + components?: Partial; + config: OryClientConfiguration; +}; + +// @public (undocumented) +export function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export type LoginFlowContextProps = { + flow: LoginFlow; + components?: OryFlowComponentOverrides; + config: OryClientConfiguration; +}; + +// @public (undocumented) +export const OryDefaultComponents: OryFlowComponents; + +// @public (undocumented) +export function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export type RecoveryFlowContextProps = { + flow: RecoveryFlow; + components?: Partial; + config: OryClientConfiguration; +}; + +// Warning: (ae-forgotten-export) The symbol "RegistrationFlowContextProps" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export function Registration({ flow, children, components: flowOverrideComponents, config, }: PropsWithChildren): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export function Settings({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export type SettingsFlowContextProps = { + flow: SettingsFlow; + components?: Partial; + config: OryClientConfiguration; +}; + +// @public (undocumented) +export function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren): react_jsx_runtime.JSX.Element; + +// @public (undocumented) +export type VerificationFlowContextProps = { + flow: VerificationFlow; + components?: Partial; + config: OryClientConfiguration; +}; + +// Warnings were encountered during analysis: +// +// dist/theme/default/index.d.ts:25:5 - (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts +// dist/theme/default/index.d.ts:26:5 - (ae-forgotten-export) The symbol "OryClientConfiguration" needs to be exported by the entry point index.d.ts +// dist/theme/default/index.d.ts:32:5 - (ae-forgotten-export) The symbol "OryFlowComponentOverrides" needs to be exported by the entry point index.d.ts + +// (No @packageDocumentation comment for this package) + +```