@ory/elements-react 1.0.0-next.10 → 1.0.0-next.12

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.
@@ -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,6 +22,7 @@ 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';
25
+ import { Session } from '@ory/client-fetch';
24
26
  import { SettingsFlow } from '@ory/client-fetch';
25
27
  import { UiNode } from '@ory/client-fetch';
26
28
  import { UiNodeAnchorAttributes } from '@ory/client-fetch';
@@ -34,6 +36,7 @@ import { UpdateRecoveryFlowBody } from '@ory/client-fetch';
34
36
  import { UpdateRegistrationFlowBody } from '@ory/client-fetch';
35
37
  import { UpdateSettingsFlowBody } from '@ory/client-fetch';
36
38
  import { UpdateVerificationFlowBody } from '@ory/client-fetch';
39
+ import { VariantProps } from 'class-variance-authority';
37
40
  import { VerificationFlow } from '@ory/client-fetch';
38
41
 
39
42
  // Warning: (ae-forgotten-export) The symbol "OryFlow" needs to be exported by the entry point index.d.ts
@@ -53,7 +56,12 @@ export type FlowContextValue = OryFlowContainer & {
53
56
  export type FormValues = Record<string, string | boolean | number | undefined>;
54
57
 
55
58
  // @public (undocumented)
56
- export type Locale = keyof typeof OryLocales;
59
+ export const HeadlessPageHeader: () => react_jsx_runtime.JSX.Element;
60
+
61
+ // Warning: (ae-forgotten-export) The symbol "IntlContextProps" needs to be exported by the entry point index.d.ts
62
+ //
63
+ // @public (undocumented)
64
+ export type IntlConfig = IntlContextProps;
57
65
 
58
66
  // @public
59
67
  export type LoginFlowContainer = OryFlow<FlowType.Login, LoginFlow>;
@@ -128,6 +136,7 @@ export type OryClientConfiguration = {
128
136
  verification_ui_url: string;
129
137
  login_ui_url: string;
130
138
  };
139
+ intl?: IntlConfig;
131
140
  };
132
141
 
133
142
  // @public (undocumented)
@@ -165,23 +174,34 @@ export type OryFlowComponents = {
165
174
  Logo: ComponentType<OryCardLogoProps>;
166
175
  Divider: ComponentType<OryCardDividerProps>;
167
176
  AuthMethodListItem: ComponentType<OryCardAuthMethodListItemProps>;
177
+ SettingsSection: ComponentType<OryFormSectionProps>;
178
+ SettingsSectionContent: ComponentType<OryFormSectionContentProps>;
179
+ SettingsSectionFooter: ComponentType<OryFormSectionContentProps>;
168
180
  };
169
181
  Form: {
170
182
  Root: ComponentType<OryFormRootProps>;
171
183
  OidcRoot: ComponentType<OryFormOidcRootProps>;
172
184
  Group: ComponentType<OryFormGroupProps>;
185
+ OidcSettings: ComponentType<OrySettingsOidcProps>;
186
+ WebauthnSettings: ComponentType<OrySettingsWebauthnProps>;
187
+ PasskeySettings: ComponentType<OrySettingsPasskeyProps>;
188
+ TotpSettings: ComponentType<OrySettingsTotpProps>;
189
+ RecoveryCodesSettings: ComponentType<OrySettingsRecoveryCodesProps>;
173
190
  };
174
191
  Message: {
175
192
  Root: ComponentType<OryMessageRootProps>;
176
193
  Content: ComponentType<OryMessageContentProps>;
177
194
  };
195
+ Page: {
196
+ Header: ComponentType<OryPageHeaderProps>;
197
+ };
178
198
  };
179
199
 
180
200
  // @public
181
201
  export type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
182
202
 
183
203
  // @public (undocumented)
184
- export function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element;
204
+ export function OryForm({ children, onAfterSubmit, nodes }: OryFormProps): string | react_jsx_runtime.JSX.Element;
185
205
 
186
206
  // @public
187
207
  export function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
@@ -211,7 +231,10 @@ export type OryFormOidcRootProps = PropsWithChildren<{
211
231
  }>;
212
232
 
213
233
  // @public (undocumented)
214
- export type OryFormProps = PropsWithChildren;
234
+ export type OryFormProps = PropsWithChildren<{
235
+ onAfterSubmit?: (method: string | number | boolean | undefined) => void;
236
+ nodes?: UiNode[];
237
+ }>;
215
238
 
216
239
  // @public (undocumented)
217
240
  export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
@@ -219,17 +242,29 @@ export type OryFormRootProps = ComponentPropsWithoutRef<"form"> & {
219
242
  };
220
243
 
221
244
  // @public (undocumented)
222
- export function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
245
+ export function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
246
+
247
+ // @public (undocumented)
248
+ export type OryFormSectionContentProps = PropsWithChildren<{
249
+ title?: string;
250
+ description?: string;
251
+ }>;
223
252
 
224
- // Warning: (ae-forgotten-export) The symbol "CustomTranslations" needs to be exported by the entry point index.d.ts
225
- //
226
253
  // @public (undocumented)
227
- export type OryIntlProviderProps<Translation> = Translation extends CustomTranslations ? CustomTranslations : SupportedTranslations;
254
+ export type OryFormSectionFooterProps = PropsWithChildren;
228
255
 
229
256
  // @public (undocumented)
230
- export namespace OryLocales {
231
- { locales_de as de, locales_en as en, locales_es as es, locales_fr as fr, locales_nl as nl, locales_pl as pl, locales_pt as pt, locales_sv as sv };
232
- }
257
+ export type OryFormSectionProps = PropsWithChildren<{
258
+ nodes?: UiNode[];
259
+ }>;
260
+
261
+ // @public (undocumented)
262
+ export function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
263
+
264
+ // Warning: (ae-forgotten-export) The symbol "LocaleMap" needs to be exported by the entry point index.d.ts
265
+ //
266
+ // @public (undocumented)
267
+ export const OryLocales: LocaleMap;
233
268
 
234
269
  // @public (undocumented)
235
270
  export type OryMessageContentProps = {
@@ -245,11 +280,13 @@ export type OryNodeAnchorProps = {
245
280
  node: UiNode;
246
281
  } & Omit<ComponentPropsWithoutRef<"a">, "children">;
247
282
 
283
+ // Warning: (ae-forgotten-export) The symbol "ButtonVariants" needs to be exported by the entry point index.d.ts
284
+ //
248
285
  // @public (undocumented)
249
286
  export type OryNodeButtonProps = {
250
287
  attributes: UiNodeInputAttributes;
251
288
  node: UiNode;
252
- } & Omit<ComponentPropsWithoutRef<"button">, "children">;
289
+ } & Omit<ComponentPropsWithoutRef<"button">, "children"> & ButtonVariants;
253
290
 
254
291
  // @public (undocumented)
255
292
  export type OryNodeImageProps = {
@@ -284,12 +321,57 @@ export type OryNodeTextProps = {
284
321
  };
285
322
 
286
323
  // @public (undocumented)
287
- export function OryProvider<Translation extends SupportedTranslations>({ children, components: Components, ...props }: OryProviderProps<Translation>): react_jsx_runtime.JSX.Element;
324
+ export type OryPageHeaderProps = Record<never, never>;
288
325
 
289
326
  // @public (undocumented)
290
- export type OryProviderProps<T> = {
327
+ export function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
328
+
329
+ // @public (undocumented)
330
+ export type OryProviderProps = {
291
331
  components: OryFlowComponents;
292
- } & OryIntlProviderProps<T> & OryFlowContainer & PropsWithChildren;
332
+ } & OryFlowContainer & PropsWithChildren;
333
+
334
+ // @public (undocumented)
335
+ export function OrySettingsCard(): react_jsx_runtime.JSX.Element;
336
+
337
+ // @public (undocumented)
338
+ export type OrySettingsOidcProps = {
339
+ linkButtons: UiNode[];
340
+ unlinkButtons: UiNode[];
341
+ };
342
+
343
+ // @public (undocumented)
344
+ export type OrySettingsPasskeyProps = {
345
+ triggerButton: UiNode & {
346
+ onClick: () => void;
347
+ };
348
+ removeButtons: UiNode[];
349
+ };
350
+
351
+ // @public (undocumented)
352
+ export type OrySettingsRecoveryCodesProps = {
353
+ codes: string[];
354
+ regnerateButton?: UiNode;
355
+ revealButton?: UiNode;
356
+ };
357
+
358
+ // @public (undocumented)
359
+ export type OrySettingsTotpProps = {
360
+ totpImage: UiNode;
361
+ totpSecret: UiNode;
362
+ totpInput: UiNode;
363
+ } | {
364
+ totpUnlink: UiNode;
365
+ };
366
+
367
+ // @public (undocumented)
368
+ export type OrySettingsWebauthnProps = {
369
+ nameInput: UiNode;
370
+ triggerButton: UiNode & {
371
+ onClick: () => void;
372
+ };
373
+ removeButtons: UiNode[];
374
+ };
293
375
 
294
376
  // @public (undocumented)
295
377
  export function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
@@ -303,12 +385,6 @@ export type RegistrationFlowContainer = OryFlow<FlowType.Registration, Registrat
303
385
  // @public
304
386
  export type SettingsFlowContainer = OryFlow<FlowType.Settings, SettingsFlow>;
305
387
 
306
- // @public (undocumented)
307
- export type SupportedTranslations = {
308
- locale?: Locale;
309
- defaultLocale?: string;
310
- };
311
-
312
388
  // @public
313
389
  export const uiTextToFormattedMessage: ({ id, context, text }: Omit<UiText, "type">, intl: IntlShape) => string;
314
390
 
@@ -323,6 +399,13 @@ export function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
323
399
  // @public
324
400
  export function useOryFlow(): FlowContextValue;
325
401
 
402
+ // @public
403
+ export const useSession: () => {
404
+ session: Session | undefined;
405
+ error: string | undefined;
406
+ isLoading: boolean;
407
+ };
408
+
326
409
  // @public
327
410
  export type VerificationFlowContainer = OryFlow<FlowType.Verification, VerificationFlow>;
328
411