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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/api-report/elements-react-client.api.json +228 -0
  3. package/api-report/elements-react-client.api.md +22 -0
  4. package/api-report/elements-react-theme.api.json +47 -24
  5. package/api-report/elements-react-theme.api.md +6 -5
  6. package/api-report/elements-react.api.json +710 -86
  7. package/api-report/elements-react.api.md +86 -11
  8. package/api-report/temp/elements-react-client.api.md +22 -0
  9. package/api-report/temp/elements-react-theme.api.md +6 -5
  10. package/api-report/temp/elements-react.api.md +86 -11
  11. package/config/api-extractor-client.json +463 -0
  12. package/dist/client/frontendClient.d.mts +5 -0
  13. package/dist/client/frontendClient.d.ts +5 -0
  14. package/dist/client/frontendClient.js +40 -0
  15. package/dist/client/frontendClient.js.map +1 -0
  16. package/dist/client/frontendClient.mjs +19 -0
  17. package/dist/client/frontendClient.mjs.map +1 -0
  18. package/dist/client/index.d.mts +3 -0
  19. package/dist/client/index.d.ts +3 -0
  20. package/dist/client/index.js +29 -0
  21. package/dist/client/index.js.map +1 -0
  22. package/dist/client/index.mjs +5 -0
  23. package/dist/client/index.mjs.map +1 -0
  24. package/dist/client/useSession.d.mts +41 -0
  25. package/dist/client/useSession.d.ts +41 -0
  26. package/dist/client/useSession.js +79 -0
  27. package/dist/client/useSession.js.map +1 -0
  28. package/dist/client/useSession.mjs +54 -0
  29. package/dist/client/useSession.mjs.map +1 -0
  30. package/dist/index.d.mts +97 -21
  31. package/dist/index.d.ts +97 -21
  32. package/dist/index.js +718 -5691
  33. package/dist/index.js.map +1 -1
  34. package/dist/index.mjs +712 -5687
  35. package/dist/index.mjs.map +1 -1
  36. package/dist/theme/default/index.css +295 -29
  37. package/dist/theme/default/index.css.map +1 -1
  38. package/dist/theme/default/index.d.mts +3 -3
  39. package/dist/theme/default/index.d.ts +3 -3
  40. package/dist/theme/default/index.js +1058 -292
  41. package/dist/theme/default/index.js.map +1 -1
  42. package/dist/theme/default/index.mjs +1030 -256
  43. package/dist/theme/default/index.mjs.map +1 -1
  44. package/jest.config.ts +4 -3
  45. package/package.json +17 -8
  46. package/tailwind.config.ts +6 -1
  47. package/tsconfig.json +5 -5
@@ -4,6 +4,7 @@
4
4
 
5
5
  ```ts
6
6
 
7
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
8
  import { ComponentPropsWithoutRef } from 'react';
8
9
  import { ComponentType } from 'react';
9
10
  import { ConfigurationParameters } from '@ory/client-fetch';
@@ -21,7 +22,6 @@ import { PropsWithChildren } from 'react';
21
22
  import * as react_jsx_runtime from 'react/jsx-runtime';
22
23
  import { RecoveryFlow } from '@ory/client-fetch';
23
24
  import { RegistrationFlow } from '@ory/client-fetch';
24
- import { Session } from '@ory/client-fetch';
25
25
  import { SettingsFlow } from '@ory/client-fetch';
26
26
  import { UiNode } from '@ory/client-fetch';
27
27
  import { UiNodeAnchorAttributes } from '@ory/client-fetch';
@@ -35,6 +35,7 @@ import { UpdateRecoveryFlowBody } from '@ory/client-fetch';
35
35
  import { UpdateRegistrationFlowBody } from '@ory/client-fetch';
36
36
  import { UpdateSettingsFlowBody } from '@ory/client-fetch';
37
37
  import { UpdateVerificationFlowBody } from '@ory/client-fetch';
38
+ import { VariantProps } from 'class-variance-authority';
38
39
  import { VerificationFlow } from '@ory/client-fetch';
39
40
 
40
41
  // Warning: (ae-forgotten-export) The symbol "OryFlow" needs to be exported by the entry point index.d.ts
@@ -53,6 +54,9 @@ export type FlowContextValue = OryFlowContainer & {
53
54
  // @public
54
55
  export type FormValues = Record<string, string | boolean | number | undefined>;
55
56
 
57
+ // @public (undocumented)
58
+ export const HeadlessPageHeader: () => react_jsx_runtime.JSX.Element;
59
+
56
60
  // Warning: (ae-forgotten-export) The symbol "IntlContextProps" needs to be exported by the entry point index.d.ts
57
61
  //
58
62
  // @public (undocumented)
@@ -169,23 +173,34 @@ export type OryFlowComponents = {
169
173
  Logo: ComponentType<OryCardLogoProps>;
170
174
  Divider: ComponentType<OryCardDividerProps>;
171
175
  AuthMethodListItem: ComponentType<OryCardAuthMethodListItemProps>;
176
+ SettingsSection: ComponentType<OryFormSectionProps>;
177
+ SettingsSectionContent: ComponentType<OryFormSectionContentProps>;
178
+ SettingsSectionFooter: ComponentType<OryFormSectionContentProps>;
172
179
  };
173
180
  Form: {
174
181
  Root: ComponentType<OryFormRootProps>;
175
182
  OidcRoot: ComponentType<OryFormOidcRootProps>;
176
183
  Group: ComponentType<OryFormGroupProps>;
184
+ OidcSettings: ComponentType<OrySettingsOidcProps>;
185
+ WebauthnSettings: ComponentType<OrySettingsWebauthnProps>;
186
+ PasskeySettings: ComponentType<OrySettingsPasskeyProps>;
187
+ TotpSettings: ComponentType<OrySettingsTotpProps>;
188
+ RecoveryCodesSettings: ComponentType<OrySettingsRecoveryCodesProps>;
177
189
  };
178
190
  Message: {
179
191
  Root: ComponentType<OryMessageRootProps>;
180
192
  Content: ComponentType<OryMessageContentProps>;
181
193
  };
194
+ Page: {
195
+ Header: ComponentType<OryPageHeaderProps>;
196
+ };
182
197
  };
183
198
 
184
199
  // @public
185
200
  export type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
186
201
 
187
202
  // @public (undocumented)
188
- export function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element;
203
+ export function OryForm({ children, onAfterSubmit, nodes }: OryFormProps): string | react_jsx_runtime.JSX.Element;
189
204
 
190
205
  // @public
191
206
  export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
@@ -215,13 +230,33 @@ export type OryFormOidcRootProps = PropsWithChildren<{
215
230
  }>;
216
231
 
217
232
  // @public (undocumented)
218
- export type OryFormProps = PropsWithChildren;
233
+ export type OryFormProps = PropsWithChildren<{
234
+ onAfterSubmit?: (method: string | number | boolean | undefined) => void;
235
+ nodes?: UiNode[];
236
+ }>;
219
237
 
220
238
  // @public (undocumented)
221
239
  export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
222
240
  onSubmit: FormEventHandler<HTMLFormElement>;
223
241
  };
224
242
 
243
+ // @public (undocumented)
244
+ export function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
245
+
246
+ // @public (undocumented)
247
+ export type OryFormSectionContentProps = PropsWithChildren<{
248
+ title?: string;
249
+ description?: string;
250
+ }>;
251
+
252
+ // @public (undocumented)
253
+ export type OryFormSectionFooterProps = PropsWithChildren;
254
+
255
+ // @public (undocumented)
256
+ export type OryFormSectionProps = PropsWithChildren<{
257
+ nodes?: UiNode[];
258
+ }>;
259
+
225
260
  // @public (undocumented)
226
261
  export function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
227
262
 
@@ -244,11 +279,13 @@ export type OryNodeAnchorProps = {
244
279
  node: UiNode;
245
280
  } & Omit<ComponentPropsWithoutRef<"a">, "children">;
246
281
 
282
+ // Warning: (ae-forgotten-export) The symbol "ButtonVariants" needs to be exported by the entry point index.d.ts
283
+ //
247
284
  // @public (undocumented)
248
285
  export type OryNodeButtonProps = {
249
286
  attributes: UiNodeInputAttributes;
250
287
  node: UiNode;
251
- } & Omit<ComponentPropsWithoutRef<"button">, "children">;
288
+ } & Omit<ComponentPropsWithoutRef<"button">, "children"> & ButtonVariants;
252
289
 
253
290
  // @public (undocumented)
254
291
  export type OryNodeImageProps = {
@@ -282,6 +319,9 @@ export type OryNodeTextProps = {
282
319
  node: UiNode;
283
320
  };
284
321
 
322
+ // @public (undocumented)
323
+ export type OryPageHeaderProps = Record<never, never>;
324
+
285
325
  // @public (undocumented)
286
326
  export function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
287
327
 
@@ -290,6 +330,48 @@ export type OryProviderProps = {
290
330
  components: OryFlowComponents;
291
331
  } & OryFlowContainer & PropsWithChildren;
292
332
 
333
+ // @public (undocumented)
334
+ export function OrySettingsCard(): react_jsx_runtime.JSX.Element;
335
+
336
+ // @public (undocumented)
337
+ export type OrySettingsOidcProps = {
338
+ linkButtons: UiNode[];
339
+ unlinkButtons: UiNode[];
340
+ };
341
+
342
+ // @public (undocumented)
343
+ export type OrySettingsPasskeyProps = {
344
+ triggerButton: UiNode & {
345
+ onClick: () => void;
346
+ };
347
+ removeButtons: UiNode[];
348
+ };
349
+
350
+ // @public (undocumented)
351
+ export type OrySettingsRecoveryCodesProps = {
352
+ codes: string[];
353
+ regnerateButton?: UiNode;
354
+ revealButton?: UiNode;
355
+ };
356
+
357
+ // @public (undocumented)
358
+ export type OrySettingsTotpProps = {
359
+ totpImage: UiNode;
360
+ totpSecret: UiNode;
361
+ totpInput: UiNode;
362
+ } | {
363
+ totpUnlink: UiNode;
364
+ };
365
+
366
+ // @public (undocumented)
367
+ export type OrySettingsWebauthnProps = {
368
+ nameInput: UiNode;
369
+ triggerButton: UiNode & {
370
+ onClick: () => void;
371
+ };
372
+ removeButtons: UiNode[];
373
+ };
374
+
293
375
  // @public (undocumented)
294
376
  export function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
295
377
 
@@ -316,13 +398,6 @@ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
316
398
  // @public
317
399
  export function useOryFlow(): FlowContextValue;
318
400
 
319
- // @public
320
- export const useSession: () => {
321
- session: Session | undefined;
322
- error: string | undefined;
323
- isLoading: boolean;
324
- };
325
-
326
401
  // @public
327
402
  export type VerificationFlowContainer = OryFlow<FlowType.Verification, VerificationFlow>;
328
403
 
@@ -0,0 +1,22 @@
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 { Session } from '@ory/client-fetch';
8
+
9
+ // @public
10
+ export const useSession: (config?: {
11
+ sdk: {
12
+ url: string;
13
+ };
14
+ }) => {
15
+ session: Session | undefined;
16
+ error: string | undefined;
17
+ isLoading: boolean;
18
+ };
19
+
20
+ // (No @packageDocumentation comment for this package)
21
+
22
+ ```
@@ -25,6 +25,7 @@ import { UiNodeImageAttributes } from '@ory/client-fetch';
25
25
  import { UiNodeInputAttributes } from '@ory/client-fetch';
26
26
  import { UiNodeTextAttributes } from '@ory/client-fetch';
27
27
  import { UiText } from '@ory/client-fetch';
28
+ import { VariantProps } from 'class-variance-authority';
28
29
  import { VerificationFlow } from '@ory/client-fetch';
29
30
 
30
31
  // Warning: (ae-forgotten-export) The symbol "OryCardRootProps" needs to be exported by the entry point index.d.ts
@@ -70,6 +71,11 @@ export type ErrorFlowContextProps = {
70
71
  config: OryClientConfiguration;
71
72
  };
72
73
 
74
+ // Warning: (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts
75
+ //
76
+ // @public (undocumented)
77
+ export function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
78
+
73
79
  // @public (undocumented)
74
80
  export function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
75
81
 
@@ -80,11 +86,6 @@ export type LoginFlowContextProps = {
80
86
  config: OryClientConfiguration;
81
87
  };
82
88
 
83
- // Warning: (ae-forgotten-export) The symbol "OryFlowComponents" needs to be exported by the entry point index.d.ts
84
- //
85
- // @public (undocumented)
86
- export const OryDefaultComponents: OryFlowComponents;
87
-
88
89
  // @public (undocumented)
89
90
  export function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
90
91
 
@@ -4,6 +4,7 @@
4
4
 
5
5
  ```ts
6
6
 
7
+ import * as class_variance_authority_types from 'class-variance-authority/types';
7
8
  import { ComponentPropsWithoutRef } from 'react';
8
9
  import { ComponentType } from 'react';
9
10
  import { ConfigurationParameters } from '@ory/client-fetch';
@@ -21,7 +22,6 @@ import { PropsWithChildren } from 'react';
21
22
  import * as react_jsx_runtime from 'react/jsx-runtime';
22
23
  import { RecoveryFlow } from '@ory/client-fetch';
23
24
  import { RegistrationFlow } from '@ory/client-fetch';
24
- import { Session } from '@ory/client-fetch';
25
25
  import { SettingsFlow } from '@ory/client-fetch';
26
26
  import { UiNode } from '@ory/client-fetch';
27
27
  import { UiNodeAnchorAttributes } from '@ory/client-fetch';
@@ -35,6 +35,7 @@ import { UpdateRecoveryFlowBody } from '@ory/client-fetch';
35
35
  import { UpdateRegistrationFlowBody } from '@ory/client-fetch';
36
36
  import { UpdateSettingsFlowBody } from '@ory/client-fetch';
37
37
  import { UpdateVerificationFlowBody } from '@ory/client-fetch';
38
+ import { VariantProps } from 'class-variance-authority';
38
39
  import { VerificationFlow } from '@ory/client-fetch';
39
40
 
40
41
  // Warning: (ae-forgotten-export) The symbol "OryFlow" needs to be exported by the entry point index.d.ts
@@ -53,6 +54,9 @@ export type FlowContextValue = OryFlowContainer & {
53
54
  // @public
54
55
  export type FormValues = Record<string, string | boolean | number | undefined>;
55
56
 
57
+ // @public (undocumented)
58
+ export const HeadlessPageHeader: () => react_jsx_runtime.JSX.Element;
59
+
56
60
  // Warning: (ae-forgotten-export) The symbol "IntlContextProps" needs to be exported by the entry point index.d.ts
57
61
  //
58
62
  // @public (undocumented)
@@ -169,23 +173,34 @@ export type OryFlowComponents = {
169
173
  Logo: ComponentType<OryCardLogoProps>;
170
174
  Divider: ComponentType<OryCardDividerProps>;
171
175
  AuthMethodListItem: ComponentType<OryCardAuthMethodListItemProps>;
176
+ SettingsSection: ComponentType<OryFormSectionProps>;
177
+ SettingsSectionContent: ComponentType<OryFormSectionContentProps>;
178
+ SettingsSectionFooter: ComponentType<OryFormSectionContentProps>;
172
179
  };
173
180
  Form: {
174
181
  Root: ComponentType<OryFormRootProps>;
175
182
  OidcRoot: ComponentType<OryFormOidcRootProps>;
176
183
  Group: ComponentType<OryFormGroupProps>;
184
+ OidcSettings: ComponentType<OrySettingsOidcProps>;
185
+ WebauthnSettings: ComponentType<OrySettingsWebauthnProps>;
186
+ PasskeySettings: ComponentType<OrySettingsPasskeyProps>;
187
+ TotpSettings: ComponentType<OrySettingsTotpProps>;
188
+ RecoveryCodesSettings: ComponentType<OrySettingsRecoveryCodesProps>;
177
189
  };
178
190
  Message: {
179
191
  Root: ComponentType<OryMessageRootProps>;
180
192
  Content: ComponentType<OryMessageContentProps>;
181
193
  };
194
+ Page: {
195
+ Header: ComponentType<OryPageHeaderProps>;
196
+ };
182
197
  };
183
198
 
184
199
  // @public
185
200
  export type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
186
201
 
187
202
  // @public (undocumented)
188
- export function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element;
203
+ export function OryForm({ children, onAfterSubmit, nodes }: OryFormProps): string | react_jsx_runtime.JSX.Element;
189
204
 
190
205
  // @public
191
206
  export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
@@ -215,13 +230,33 @@ export type OryFormOidcRootProps = PropsWithChildren<{
215
230
  }>;
216
231
 
217
232
  // @public (undocumented)
218
- export type OryFormProps = PropsWithChildren;
233
+ export type OryFormProps = PropsWithChildren<{
234
+ onAfterSubmit?: (method: string | number | boolean | undefined) => void;
235
+ nodes?: UiNode[];
236
+ }>;
219
237
 
220
238
  // @public (undocumented)
221
239
  export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
222
240
  onSubmit: FormEventHandler<HTMLFormElement>;
223
241
  };
224
242
 
243
+ // @public (undocumented)
244
+ export function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
245
+
246
+ // @public (undocumented)
247
+ export type OryFormSectionContentProps = PropsWithChildren<{
248
+ title?: string;
249
+ description?: string;
250
+ }>;
251
+
252
+ // @public (undocumented)
253
+ export type OryFormSectionFooterProps = PropsWithChildren;
254
+
255
+ // @public (undocumented)
256
+ export type OryFormSectionProps = PropsWithChildren<{
257
+ nodes?: UiNode[];
258
+ }>;
259
+
225
260
  // @public (undocumented)
226
261
  export function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
227
262
 
@@ -244,11 +279,13 @@ export type OryNodeAnchorProps = {
244
279
  node: UiNode;
245
280
  } & Omit<ComponentPropsWithoutRef<"a">, "children">;
246
281
 
282
+ // Warning: (ae-forgotten-export) The symbol "ButtonVariants" needs to be exported by the entry point index.d.ts
283
+ //
247
284
  // @public (undocumented)
248
285
  export type OryNodeButtonProps = {
249
286
  attributes: UiNodeInputAttributes;
250
287
  node: UiNode;
251
- } & Omit<ComponentPropsWithoutRef<"button">, "children">;
288
+ } & Omit<ComponentPropsWithoutRef<"button">, "children"> & ButtonVariants;
252
289
 
253
290
  // @public (undocumented)
254
291
  export type OryNodeImageProps = {
@@ -282,6 +319,9 @@ export type OryNodeTextProps = {
282
319
  node: UiNode;
283
320
  };
284
321
 
322
+ // @public (undocumented)
323
+ export type OryPageHeaderProps = Record<never, never>;
324
+
285
325
  // @public (undocumented)
286
326
  export function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
287
327
 
@@ -290,6 +330,48 @@ export type OryProviderProps = {
290
330
  components: OryFlowComponents;
291
331
  } & OryFlowContainer & PropsWithChildren;
292
332
 
333
+ // @public (undocumented)
334
+ export function OrySettingsCard(): react_jsx_runtime.JSX.Element;
335
+
336
+ // @public (undocumented)
337
+ export type OrySettingsOidcProps = {
338
+ linkButtons: UiNode[];
339
+ unlinkButtons: UiNode[];
340
+ };
341
+
342
+ // @public (undocumented)
343
+ export type OrySettingsPasskeyProps = {
344
+ triggerButton: UiNode & {
345
+ onClick: () => void;
346
+ };
347
+ removeButtons: UiNode[];
348
+ };
349
+
350
+ // @public (undocumented)
351
+ export type OrySettingsRecoveryCodesProps = {
352
+ codes: string[];
353
+ regnerateButton?: UiNode;
354
+ revealButton?: UiNode;
355
+ };
356
+
357
+ // @public (undocumented)
358
+ export type OrySettingsTotpProps = {
359
+ totpImage: UiNode;
360
+ totpSecret: UiNode;
361
+ totpInput: UiNode;
362
+ } | {
363
+ totpUnlink: UiNode;
364
+ };
365
+
366
+ // @public (undocumented)
367
+ export type OrySettingsWebauthnProps = {
368
+ nameInput: UiNode;
369
+ triggerButton: UiNode & {
370
+ onClick: () => void;
371
+ };
372
+ removeButtons: UiNode[];
373
+ };
374
+
293
375
  // @public (undocumented)
294
376
  export function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
295
377
 
@@ -316,13 +398,6 @@ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
316
398
  // @public
317
399
  export function useOryFlow(): FlowContextValue;
318
400
 
319
- // @public
320
- export const useSession: () => {
321
- session: Session | undefined;
322
- error: string | undefined;
323
- isLoading: boolean;
324
- };
325
-
326
401
  // @public
327
402
  export type VerificationFlowContainer = OryFlow<FlowType.Verification, VerificationFlow>;
328
403