@ory/elements-react
Version:
Ory Elements React - a collection of React components for authentication UIs.
105 lines (86 loc) • 5.23 kB
TypeScript
import * as react_jsx_runtime from 'react/jsx-runtime';
import { OryCardContentProps, OryCardProps, OryNodeOidcButtonProps, OryFormRootProps, OryMessageContentProps, OryFlowComponentOverrides, OryFlowComponents, OryClientConfiguration } from '@ory/elements-react';
import * as react from 'react';
import { PropsWithChildren, ElementType } from 'react';
import { FlowError, GenericError, Session, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow, OAuth2ConsentRequest } from '@ory/client-fetch';
declare function DefaultCardContent({ children }: OryCardContentProps): react.ReactNode;
declare function DefaultCardFooter(): react_jsx_runtime.JSX.Element | null;
declare function DefaultCardHeader(): react_jsx_runtime.JSX.Element;
declare function DefaultCardLogo(): react_jsx_runtime.JSX.Element;
declare function DefaultCurrentIdentifierButton(): react_jsx_runtime.JSX.Element | null;
declare function DefaultCardLayout({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
declare function DefaultCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element;
type DefaultSocialButtonProps = OryNodeOidcButtonProps & {
showLabel?: boolean;
logos?: Record<string, ElementType>;
};
declare function DefaultButtonSocial({ attributes, node, onClick, showLabel: _showLabel, logos: providedLogos, }: DefaultSocialButtonProps): react_jsx_runtime.JSX.Element;
declare namespace DefaultButtonSocial {
var WithLogos: (logos: Record<string, ElementType>) => (props: DefaultSocialButtonProps) => react_jsx_runtime.JSX.Element;
}
declare function DefaultFormContainer({ children, onSubmit, action, method, "data-testid": dataTestId, }: PropsWithChildren<OryFormRootProps>): react_jsx_runtime.JSX.Element;
declare function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null;
declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element;
declare function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
/**
* A union type of all possible errors that can be returned by the Ory SDK.
*/
type OryError = FlowError | OAuth2Error | {
error: GenericError;
};
/**
* An OAuth2 error response.
*/
type OAuth2Error = {
error: string;
error_description: string;
};
type ErrorFlowContextProps = {
error: OryError;
components?: OryFlowComponentOverrides;
config: OryClientConfiguration;
session?: Session;
};
declare function Error({ error, components: Components, config, session, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
type LoginFlowContextProps = {
flow: LoginFlow;
components?: OryFlowComponentOverrides;
config: OryClientConfiguration;
};
declare function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
type RecoveryFlowContextProps = {
flow: RecoveryFlow;
components?: OryFlowComponentOverrides;
config: OryClientConfiguration;
};
declare function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
type RegistrationFlowContextProps = {
flow: RegistrationFlow;
components?: OryFlowComponentOverrides;
config: OryClientConfiguration;
};
declare function Registration({ flow, children, components: flowOverrideComponents, config, }: PropsWithChildren<RegistrationFlowContextProps>): react_jsx_runtime.JSX.Element;
type SettingsFlowContextProps = {
flow: SettingsFlow;
components?: OryFlowComponentOverrides;
config: OryClientConfiguration;
};
declare function Settings({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<SettingsFlowContextProps>): react_jsx_runtime.JSX.Element;
type VerificationFlowContextProps = {
flow: VerificationFlow;
components?: OryFlowComponentOverrides;
config: OryClientConfiguration;
};
declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
type PropsWithComponents = {
components?: OryFlowComponentOverrides;
};
type ConsentFlowContextProps = {
consentChallenge: OAuth2ConsentRequest;
session: Session;
config: OryClientConfiguration;
csrfToken: string;
formActionUrl: string;
} & PropsWithComponents;
declare function Consent({ consentChallenge, session, config, components: Passed, children, csrfToken, formActionUrl, }: PropsWithChildren<ConsentFlowContextProps>): react_jsx_runtime.JSX.Element;
export { Consent, type ConsentFlowContextProps, DefaultButtonSocial, DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLayout, DefaultCardLogo, DefaultCurrentIdentifierButton, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps, type OAuth2Error, type OryError, Recovery, type RecoveryFlowContextProps, Registration, Settings, type SettingsFlowContextProps, Verification, type VerificationFlowContextProps, getOryComponents };