@ory/elements-react 1.0.0-next.1 → 1.0.0-next.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,331 @@
1
+ ## API Report File for "@ory/elements-react"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { ComponentPropsWithoutRef } from 'react';
8
+ import { ComponentType } from 'react';
9
+ import { ConfigurationParameters } from '@ory/client-fetch';
10
+ import { DetailedHTMLProps } from 'react';
11
+ import { Dispatch } from 'react';
12
+ import { FlowError } from '@ory/client-fetch';
13
+ import { FlowType } from '@ory/client-fetch';
14
+ import { FormEventHandler } from 'react';
15
+ import { HTMLAttributes } from 'react';
16
+ import { IntlShape } from 'react-intl';
17
+ import { LoginFlow } from '@ory/client-fetch';
18
+ import { MouseEventHandler } from 'react';
19
+ import { OnRedirectHandler } from '@ory/client-fetch';
20
+ import { PropsWithChildren } from 'react';
21
+ import * as react_jsx_runtime from 'react/jsx-runtime';
22
+ import { RecoveryFlow } from '@ory/client-fetch';
23
+ import { RegistrationFlow } from '@ory/client-fetch';
24
+ import { Session } from '@ory/client-fetch';
25
+ import { SettingsFlow } from '@ory/client-fetch';
26
+ import { UiNode } from '@ory/client-fetch';
27
+ import { UiNodeAnchorAttributes } from '@ory/client-fetch';
28
+ import { UiNodeGroupEnum } from '@ory/client-fetch';
29
+ import { UiNodeImageAttributes } from '@ory/client-fetch';
30
+ import { UiNodeInputAttributes } from '@ory/client-fetch';
31
+ import { UiNodeTextAttributes } from '@ory/client-fetch';
32
+ import { UiText } from '@ory/client-fetch';
33
+ import { UpdateLoginFlowBody } from '@ory/client-fetch';
34
+ import { UpdateRecoveryFlowBody } from '@ory/client-fetch';
35
+ import { UpdateRegistrationFlowBody } from '@ory/client-fetch';
36
+ import { UpdateSettingsFlowBody } from '@ory/client-fetch';
37
+ import { UpdateVerificationFlowBody } from '@ory/client-fetch';
38
+ import { VerificationFlow } from '@ory/client-fetch';
39
+
40
+ // Warning: (ae-forgotten-export) The symbol "OryFlow" needs to be exported by the entry point index.d.ts
41
+ //
42
+ // @public
43
+ export type ErrorFlowContainer = OryFlow<FlowType.Error, FlowError>;
44
+
45
+ // @public
46
+ export type FlowContainerSetter = Dispatch<Partial<OryFlowContainer>>;
47
+
48
+ // @public
49
+ export type FlowContextValue = OryFlowContainer & {
50
+ setFlowContainer: FlowContainerSetter;
51
+ };
52
+
53
+ // @public
54
+ export type FormValues = Record<string, string | boolean | number | undefined>;
55
+
56
+ // Warning: (ae-forgotten-export) The symbol "IntlContextProps" needs to be exported by the entry point index.d.ts
57
+ //
58
+ // @public (undocumented)
59
+ export type IntlConfig = IntlContextProps;
60
+
61
+ // @public
62
+ export type LoginFlowContainer = OryFlow<FlowType.Login, LoginFlow>;
63
+
64
+ // @public
65
+ export function messageTestId(message: UiText): {
66
+ "data-testid": string;
67
+ };
68
+
69
+ // @public
70
+ export type OnSubmitHandlerProps<T extends UpdateLoginFlowBody | UpdateRegistrationFlowBody | UpdateVerificationFlowBody | UpdateRecoveryFlowBody | UpdateSettingsFlowBody> = {
71
+ setFlowContainer: (flowContainer: OryFlowContainer) => void;
72
+ body: T;
73
+ onRedirect: OnRedirectHandler;
74
+ };
75
+
76
+ // @public
77
+ export function OryCard({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
78
+
79
+ // @public
80
+ export type OryCardAuthMethodListItemProps = {
81
+ onClick: () => void;
82
+ group: string;
83
+ };
84
+
85
+ // @public
86
+ export function OryCardContent({ children }: OryCardContentProps): react_jsx_runtime.JSX.Element;
87
+
88
+ // @public
89
+ export type OryCardContentProps = PropsWithChildren;
90
+
91
+ // @public
92
+ export type OryCardDividerProps = Record<string, never>;
93
+
94
+ // @public (undocumented)
95
+ export function OryCardFooter(): react_jsx_runtime.JSX.Element;
96
+
97
+ // @public (undocumented)
98
+ export type OryCardFooterProps = Record<string, never>;
99
+
100
+ // @public (undocumented)
101
+ export function OryCardHeader(): react_jsx_runtime.JSX.Element;
102
+
103
+ // @public (undocumented)
104
+ export type OryCardHeaderProps = Record<string, never>;
105
+
106
+ // @public (undocumented)
107
+ export type OryCardLogoProps = Record<string, never>;
108
+
109
+ // @public (undocumented)
110
+ export type OryCardProps = PropsWithChildren;
111
+
112
+ // @public (undocumented)
113
+ export function OryCardValidationMessages({ ...props }: OryMessageRootProps): react_jsx_runtime.JSX.Element | null;
114
+
115
+ // @public (undocumented)
116
+ export type OryClientConfiguration = {
117
+ name: string;
118
+ logoUrl?: string;
119
+ stylesheet?: string;
120
+ favicon?: string;
121
+ sdk: {
122
+ url: string;
123
+ options?: Partial<ConfigurationParameters>;
124
+ };
125
+ project: {
126
+ registration_enabled: boolean;
127
+ verification_enabled: boolean;
128
+ recovery_enabled: boolean;
129
+ recovery_ui_url: string;
130
+ registration_ui_url: string;
131
+ verification_ui_url: string;
132
+ login_ui_url: string;
133
+ };
134
+ intl?: IntlConfig;
135
+ };
136
+
137
+ // @public (undocumented)
138
+ export type OryCurrentIdentifierProps = {
139
+ attributes: UiNodeInputAttributes;
140
+ node: UiNode;
141
+ onClick?: () => void;
142
+ href?: string;
143
+ } & Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick">;
144
+
145
+ // Warning: (ae-forgotten-export) The symbol "DeepPartialTwoLevels" needs to be exported by the entry point index.d.ts
146
+ //
147
+ // @public (undocumented)
148
+ export type OryFlowComponentOverrides = DeepPartialTwoLevels<OryFlowComponents>;
149
+
150
+ // @public
151
+ export type OryFlowComponents = {
152
+ Node: {
153
+ Button: ComponentType<OryNodeButtonProps>;
154
+ OidcButton: ComponentType<OryNodeOidcButtonProps>;
155
+ CurrentIdentifierButton: ComponentType<OryCurrentIdentifierProps>;
156
+ Anchor: ComponentType<OryNodeAnchorProps>;
157
+ Input: ComponentType<OryNodeInputProps>;
158
+ CodeInput: ComponentType<OryNodeInputProps>;
159
+ Image: ComponentType<OryNodeImageProps>;
160
+ Label: ComponentType<OryNodeLabelProps>;
161
+ Checkbox: ComponentType<OryNodeInputProps>;
162
+ Text: ComponentType<OryNodeTextProps>;
163
+ };
164
+ Card: {
165
+ Root: ComponentType<OryCardProps>;
166
+ Footer: ComponentType<OryCardFooterProps>;
167
+ Header: ComponentType<OryCardProps>;
168
+ Content: ComponentType<OryCardContentProps>;
169
+ Logo: ComponentType<OryCardLogoProps>;
170
+ Divider: ComponentType<OryCardDividerProps>;
171
+ AuthMethodListItem: ComponentType<OryCardAuthMethodListItemProps>;
172
+ };
173
+ Form: {
174
+ Root: ComponentType<OryFormRootProps>;
175
+ OidcRoot: ComponentType<OryFormOidcRootProps>;
176
+ Group: ComponentType<OryFormGroupProps>;
177
+ };
178
+ Message: {
179
+ Root: ComponentType<OryMessageRootProps>;
180
+ Content: ComponentType<OryMessageContentProps>;
181
+ };
182
+ };
183
+
184
+ // @public
185
+ export type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
186
+
187
+ // @public (undocumented)
188
+ export function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element;
189
+
190
+ // @public
191
+ export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
192
+
193
+ // @public (undocumented)
194
+ export type OryFormGroupProps = PropsWithChildren;
195
+
196
+ // @public (undocumented)
197
+ export function OryFormGroups({ children, groups }: OryFormGroupsProps): react_jsx_runtime.JSX.Element;
198
+
199
+ // @public (undocumented)
200
+ export type OryFormGroupsProps = PropsWithChildren<{
201
+ groups: UiNodeGroupEnum[];
202
+ }>;
203
+
204
+ // @public (undocumented)
205
+ export function OryFormOidcButtons({ children, hideDivider, }: OryFormOidcButtonsProps): react_jsx_runtime.JSX.Element | null;
206
+
207
+ // @public (undocumented)
208
+ export type OryFormOidcButtonsProps = PropsWithChildren<{
209
+ hideDivider?: boolean;
210
+ }>;
211
+
212
+ // @public (undocumented)
213
+ export type OryFormOidcRootProps = PropsWithChildren<{
214
+ nodes: UiNode[];
215
+ }>;
216
+
217
+ // @public (undocumented)
218
+ export type OryFormProps = PropsWithChildren;
219
+
220
+ // @public (undocumented)
221
+ export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
222
+ onSubmit: FormEventHandler<HTMLFormElement>;
223
+ };
224
+
225
+ // @public (undocumented)
226
+ export function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
227
+
228
+ // Warning: (ae-forgotten-export) The symbol "LocaleMap" needs to be exported by the entry point index.d.ts
229
+ //
230
+ // @public (undocumented)
231
+ export const OryLocales: LocaleMap;
232
+
233
+ // @public (undocumented)
234
+ export type OryMessageContentProps = {
235
+ message: UiText;
236
+ };
237
+
238
+ // @public (undocumented)
239
+ export type OryMessageRootProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
240
+
241
+ // @public (undocumented)
242
+ export type OryNodeAnchorProps = {
243
+ attributes: UiNodeAnchorAttributes;
244
+ node: UiNode;
245
+ } & Omit<ComponentPropsWithoutRef<"a">, "children">;
246
+
247
+ // @public (undocumented)
248
+ export type OryNodeButtonProps = {
249
+ attributes: UiNodeInputAttributes;
250
+ node: UiNode;
251
+ } & Omit<ComponentPropsWithoutRef<"button">, "children">;
252
+
253
+ // @public (undocumented)
254
+ export type OryNodeImageProps = {
255
+ attributes: UiNodeImageAttributes;
256
+ node: UiNode;
257
+ };
258
+
259
+ // @public (undocumented)
260
+ export type OryNodeInputProps = {
261
+ attributes: UiNodeInputAttributes;
262
+ node: UiNode;
263
+ onClick?: MouseEventHandler;
264
+ };
265
+
266
+ // @public (undocumented)
267
+ export type OryNodeLabelProps = {
268
+ attributes: UiNodeInputAttributes;
269
+ node: UiNode;
270
+ } & ComponentPropsWithoutRef<"label">;
271
+
272
+ // @public (undocumented)
273
+ export type OryNodeOidcButtonProps = {
274
+ node: UiNode;
275
+ attributes: UiNodeInputAttributes;
276
+ onClick?: () => void;
277
+ };
278
+
279
+ // @public (undocumented)
280
+ export type OryNodeTextProps = {
281
+ attributes: UiNodeTextAttributes;
282
+ node: UiNode;
283
+ };
284
+
285
+ // @public (undocumented)
286
+ export function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
287
+
288
+ // @public (undocumented)
289
+ export type OryProviderProps = {
290
+ components: OryFlowComponents;
291
+ } & OryFlowContainer & PropsWithChildren;
292
+
293
+ // @public (undocumented)
294
+ export function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
295
+
296
+ // @public
297
+ export type RecoveryFlowContainer = OryFlow<FlowType.Recovery, RecoveryFlow>;
298
+
299
+ // @public
300
+ export type RegistrationFlowContainer = OryFlow<FlowType.Registration, RegistrationFlow>;
301
+
302
+ // @public
303
+ export type SettingsFlowContainer = OryFlow<FlowType.Settings, SettingsFlow>;
304
+
305
+ // @public
306
+ export const uiTextToFormattedMessage: ({ id, context, text }: Omit<UiText, "type">, intl: IntlShape) => string;
307
+
308
+ // @public (undocumented)
309
+ export function useComponents(): OryFlowComponents;
310
+
311
+ // @public (undocumented)
312
+ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
313
+ flowType: string;
314
+ }) => number;
315
+
316
+ // @public
317
+ export function useOryFlow(): FlowContextValue;
318
+
319
+ // @public
320
+ export const useSession: () => {
321
+ session: Session | undefined;
322
+ error: string | undefined;
323
+ isLoading: boolean;
324
+ };
325
+
326
+ // @public
327
+ export type VerificationFlowContainer = OryFlow<FlowType.Verification, VerificationFlow>;
328
+
329
+ // (No @packageDocumentation comment for this package)
330
+
331
+ ```