@ory/elements-react 0.0.0-pr.f1d09ee2 → 0.0.0-pr.fd92d9ce
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.
- package/CHANGELOG.md +72 -0
- package/DEVELOPMENT.md +2 -1
- package/dist/index.d.mts +73 -42
- package/dist/index.d.ts +73 -42
- package/dist/index.js +367 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +365 -133
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +921 -762
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +751 -585
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +6 -6
- package/tsconfig.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,75 @@
|
|
|
1
|
+
## 1.0.0-rc.5 (2025-05-16)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- properly detect OIDC account linking ([#538](https://github.com/ory/elements/pull/538))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Jonas Hungershausen
|
|
10
|
+
|
|
11
|
+
## 1.0.0-rc.4 (2025-05-15)
|
|
12
|
+
|
|
13
|
+
### 🩹 Fixes
|
|
14
|
+
|
|
15
|
+
- properly handle missing fields in OIDC registration ([#534](https://github.com/ory/elements/pull/534))
|
|
16
|
+
- incorrect if branching in handle error ([#533](https://github.com/ory/elements/pull/533))
|
|
17
|
+
- re-enable method chooser on mfa method active screens ([#530](https://github.com/ory/elements/pull/530))
|
|
18
|
+
|
|
19
|
+
### ❤️ Thank You
|
|
20
|
+
|
|
21
|
+
- hackerman @aeneasr
|
|
22
|
+
- Jonas Hungershausen
|
|
23
|
+
|
|
24
|
+
## 1.0.0-rc.3 (2025-05-09)
|
|
25
|
+
|
|
26
|
+
### 🩹 Fixes
|
|
27
|
+
|
|
28
|
+
- captcha reloading and duplication ([#518](https://github.com/ory/elements/pull/518))
|
|
29
|
+
- ⚠️ rework configuration management ([#515](https://github.com/ory/elements/pull/515))
|
|
30
|
+
- add missing testids to method selector and checkbox ([#517](https://github.com/ory/elements/pull/517))
|
|
31
|
+
|
|
32
|
+
### ⚠️ Breaking Changes
|
|
33
|
+
|
|
34
|
+
- ⚠️ rework configuration management ([#515](https://github.com/ory/elements/pull/515))
|
|
35
|
+
|
|
36
|
+
### ❤️ Thank You
|
|
37
|
+
|
|
38
|
+
- hackerman @aeneasr
|
|
39
|
+
- Jonas Hungershausen
|
|
40
|
+
|
|
41
|
+
## 1.0.0-rc.2 (2025-04-30)
|
|
42
|
+
|
|
43
|
+
### 🚀 Features
|
|
44
|
+
|
|
45
|
+
- method translation for totp, code, webauthn ([#500](https://github.com/ory/elements/pull/500))
|
|
46
|
+
- add all missing stories ([#480](https://github.com/ory/elements/pull/480))
|
|
47
|
+
- preview deployments for example apps ([#488](https://github.com/ory/elements/pull/488))
|
|
48
|
+
- add back button to settings page ([#464](https://github.com/ory/elements/pull/464))
|
|
49
|
+
|
|
50
|
+
### 🩹 Fixes
|
|
51
|
+
|
|
52
|
+
- ⚠️ align configuration types to Ory Network APIs ([#423](https://github.com/ory/elements/pull/423))
|
|
53
|
+
- sort captcha before submit button ([#507](https://github.com/ory/elements/pull/507))
|
|
54
|
+
- cors credentials in default client ([#508](https://github.com/ory/elements/pull/508))
|
|
55
|
+
- back button should return to application ([#465](https://github.com/ory/elements/pull/465))
|
|
56
|
+
- adjust design of generic OIDC provider ([#492](https://github.com/ory/elements/pull/492))
|
|
57
|
+
- use proper id for react element arrays ([#495](https://github.com/ory/elements/pull/495))
|
|
58
|
+
- add test id to header messages ([#489](https://github.com/ory/elements/pull/489))
|
|
59
|
+
- re-add missing error message when no methods provided ([#460](https://github.com/ory/elements/pull/460))
|
|
60
|
+
- resend not working for registration ([#468](https://github.com/ory/elements/pull/468))
|
|
61
|
+
- add missing color class to registration footer ([#473](https://github.com/ory/elements/pull/473))
|
|
62
|
+
- resend not working for registration ([#467](https://github.com/ory/elements/pull/467))
|
|
63
|
+
|
|
64
|
+
### ⚠️ Breaking Changes
|
|
65
|
+
|
|
66
|
+
- ⚠️ align configuration types to Ory Network APIs ([#423](https://github.com/ory/elements/pull/423))
|
|
67
|
+
|
|
68
|
+
### ❤️ Thank You
|
|
69
|
+
|
|
70
|
+
- hackerman @aeneasr
|
|
71
|
+
- Jonas Hungershausen
|
|
72
|
+
|
|
1
73
|
## 1.0.0-rc.1 (2025-04-21)
|
|
2
74
|
|
|
3
75
|
### 🩹 Fixes
|
package/DEVELOPMENT.md
CHANGED
|
@@ -73,7 +73,8 @@ Usage:
|
|
|
73
73
|
```bash
|
|
74
74
|
./scripts/release.sh <project> <tag>
|
|
75
75
|
|
|
76
|
-
./scripts/release.sh @ory/elements-react next
|
|
76
|
+
./scripts/release.sh @ory/elements-react next # next release preview (-next.X)
|
|
77
|
+
./scripts/release.sh @ory/elements-react rc # release candidate (-rc.X)
|
|
77
78
|
```
|
|
78
79
|
|
|
79
80
|
The script asks the user before executing each steps. Please double check
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText,
|
|
1
|
+
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, UiContainer, OAuth2ConsentRequest, Session, FlowError, ConfigurationParameters, AccountExperienceConfiguration, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler, FrontendApi } from '@ory/client-fetch';
|
|
2
2
|
import { ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, PropsWithChildren, DetailedHTMLProps, HTMLAttributes, ComponentType, Dispatch } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -384,44 +384,6 @@ declare function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
|
|
|
384
384
|
flowType: string;
|
|
385
385
|
}) => number;
|
|
386
386
|
|
|
387
|
-
type LocaleMap = Record<string, Record<string, string>>;
|
|
388
|
-
declare const OryLocales: LocaleMap;
|
|
389
|
-
|
|
390
|
-
type Locale = keyof typeof OryLocales;
|
|
391
|
-
type IntlContextProps = {
|
|
392
|
-
locale: Locale;
|
|
393
|
-
customTranslations?: Partial<LocaleMap>;
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
type IntlConfig = IntlContextProps;
|
|
397
|
-
type OryClientConfiguration = {
|
|
398
|
-
/**
|
|
399
|
-
* The name of the application the user is logging in to.
|
|
400
|
-
*/
|
|
401
|
-
name: string;
|
|
402
|
-
/**
|
|
403
|
-
* An optional logo URL to display in the UI instead of the name.
|
|
404
|
-
*/
|
|
405
|
-
logoUrl?: string;
|
|
406
|
-
stylesheet?: string;
|
|
407
|
-
favicon?: string;
|
|
408
|
-
sdk: {
|
|
409
|
-
url: string;
|
|
410
|
-
options?: Partial<ConfigurationParameters>;
|
|
411
|
-
};
|
|
412
|
-
project: {
|
|
413
|
-
registration_enabled: boolean;
|
|
414
|
-
verification_enabled: boolean;
|
|
415
|
-
recovery_enabled: boolean;
|
|
416
|
-
recovery_ui_url: string;
|
|
417
|
-
registration_ui_url: string;
|
|
418
|
-
verification_ui_url: string;
|
|
419
|
-
login_ui_url: string;
|
|
420
|
-
default_redirect_url?: string;
|
|
421
|
-
};
|
|
422
|
-
intl?: IntlConfig;
|
|
423
|
-
};
|
|
424
|
-
|
|
425
387
|
/**
|
|
426
388
|
* A generic flow container, containing a flowType, the flow itself and the config object
|
|
427
389
|
*
|
|
@@ -430,7 +392,6 @@ type OryClientConfiguration = {
|
|
|
430
392
|
type OryFlow<TFlowType extends FlowType, TFlow> = {
|
|
431
393
|
flowType: TFlowType;
|
|
432
394
|
flow: TFlow;
|
|
433
|
-
config: OryClientConfiguration;
|
|
434
395
|
};
|
|
435
396
|
/**
|
|
436
397
|
* A flow container for the login flow
|
|
@@ -494,6 +455,48 @@ type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
|
494
455
|
*/
|
|
495
456
|
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer | ConsentFlowContainer;
|
|
496
457
|
|
|
458
|
+
type LocaleMap = Record<string, Record<string, string>>;
|
|
459
|
+
declare const OryLocales: LocaleMap;
|
|
460
|
+
|
|
461
|
+
type Locale = keyof typeof OryLocales;
|
|
462
|
+
type IntlContextProps = {
|
|
463
|
+
locale: Locale;
|
|
464
|
+
customTranslations?: Partial<LocaleMap>;
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
type IntlConfig = IntlContextProps;
|
|
468
|
+
/**
|
|
469
|
+
* The configuration for Ory Elements.
|
|
470
|
+
*
|
|
471
|
+
* This configuration is used to customize the behavior and appearance of Ory Elements.
|
|
472
|
+
*
|
|
473
|
+
* By setting UI urls, you can override the default URLs for the login, registration, recovery, and verification flows.
|
|
474
|
+
*
|
|
475
|
+
* You can also set the name of the application, the logo URL, and the SDK configuration.
|
|
476
|
+
* By default, the name and logo are displayed in the card's header.
|
|
477
|
+
*/
|
|
478
|
+
type OryClientConfiguration = {
|
|
479
|
+
/**
|
|
480
|
+
* The SDK configuration.
|
|
481
|
+
* This configuration is used to set the URL of the Ory SDK and any additional options used for the SDK client.
|
|
482
|
+
*/
|
|
483
|
+
sdk?: {
|
|
484
|
+
url?: string;
|
|
485
|
+
options?: Partial<ConfigurationParameters>;
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* The internationalization configuration.
|
|
489
|
+
* This configuration is used to set the locale and any additional options used for the i18n library.
|
|
490
|
+
* The locale is used to determine the language of the UI.
|
|
491
|
+
* The default locale is "en".
|
|
492
|
+
*/
|
|
493
|
+
intl?: IntlConfig;
|
|
494
|
+
/**
|
|
495
|
+
* The configuration for the project.
|
|
496
|
+
*/
|
|
497
|
+
project: AccountExperienceConfiguration;
|
|
498
|
+
};
|
|
499
|
+
|
|
497
500
|
/**
|
|
498
501
|
* Converts a UiText to a FormattedMessage.
|
|
499
502
|
* The UiText contains the id of the message and the context.
|
|
@@ -589,6 +592,8 @@ type FormStateAction = {
|
|
|
589
592
|
} | {
|
|
590
593
|
type: "action_select_method";
|
|
591
594
|
method: UiNodeGroupEnum;
|
|
595
|
+
} | {
|
|
596
|
+
type: "action_clear_active_method";
|
|
592
597
|
};
|
|
593
598
|
|
|
594
599
|
/**
|
|
@@ -622,7 +627,33 @@ type FlowContextValue = OryFlowContainer & {
|
|
|
622
627
|
|
|
623
628
|
type OryProviderProps = {
|
|
624
629
|
components: OryFlowComponents;
|
|
630
|
+
config: OryClientConfiguration;
|
|
625
631
|
} & OryFlowContainer & PropsWithChildren;
|
|
626
|
-
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
632
|
+
declare function OryProvider({ children, components: Components, config, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
633
|
+
|
|
634
|
+
type OryElementsConfiguration = {
|
|
635
|
+
sdk: OrySDK;
|
|
636
|
+
project: AccountExperienceConfiguration;
|
|
637
|
+
};
|
|
638
|
+
declare function useOryConfiguration(): OryElementsConfiguration;
|
|
639
|
+
type OrySDK = SDKConfig & {
|
|
640
|
+
/**
|
|
641
|
+
* The frontend client for the Ory SDK.
|
|
642
|
+
* This client is used to interact with the Ory SDK and should be used to make API calls.
|
|
643
|
+
*/
|
|
644
|
+
frontend: FrontendApi;
|
|
645
|
+
};
|
|
646
|
+
type SDKConfig = {
|
|
647
|
+
/**
|
|
648
|
+
* The URL of the Ory SDK.
|
|
649
|
+
* This URL is used to connect to the Ory SDK and should be set to the base URL of your Ory instance.
|
|
650
|
+
*/
|
|
651
|
+
url: string;
|
|
652
|
+
options?: Partial<ConfigurationParameters>;
|
|
653
|
+
};
|
|
654
|
+
declare function OryConfigurationProvider({ children, sdk: initialConfig, project, }: PropsWithChildren<{
|
|
655
|
+
sdk?: Partial<OryClientConfiguration["sdk"]>;
|
|
656
|
+
project?: Partial<AccountExperienceConfiguration>;
|
|
657
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
627
658
|
|
|
628
|
-
export { type ConsentFlow, type ConsentFlowContainer, type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormStateMethodActive, type FormStateProvideIdentifier, type FormStateSelectMethod, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, OryConsentCard, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeConsentScopeCheckboxProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
|
659
|
+
export { type ConsentFlow, type ConsentFlowContainer, type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormStateMethodActive, type FormStateProvideIdentifier, type FormStateSelectMethod, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, OryConfigurationProvider, OryConsentCard, type OryElementsConfiguration, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeConsentScopeCheckboxProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryConfiguration, useOryFlow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText,
|
|
1
|
+
import { UiNodeInputAttributes, UiNode, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, UiNodeGroupEnum, UiText, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, UiContainer, OAuth2ConsentRequest, Session, FlowError, ConfigurationParameters, AccountExperienceConfiguration, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler, FrontendApi } from '@ory/client-fetch';
|
|
2
2
|
import { ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, PropsWithChildren, DetailedHTMLProps, HTMLAttributes, ComponentType, Dispatch } from 'react';
|
|
3
3
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -384,44 +384,6 @@ declare function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
|
|
|
384
384
|
flowType: string;
|
|
385
385
|
}) => number;
|
|
386
386
|
|
|
387
|
-
type LocaleMap = Record<string, Record<string, string>>;
|
|
388
|
-
declare const OryLocales: LocaleMap;
|
|
389
|
-
|
|
390
|
-
type Locale = keyof typeof OryLocales;
|
|
391
|
-
type IntlContextProps = {
|
|
392
|
-
locale: Locale;
|
|
393
|
-
customTranslations?: Partial<LocaleMap>;
|
|
394
|
-
};
|
|
395
|
-
|
|
396
|
-
type IntlConfig = IntlContextProps;
|
|
397
|
-
type OryClientConfiguration = {
|
|
398
|
-
/**
|
|
399
|
-
* The name of the application the user is logging in to.
|
|
400
|
-
*/
|
|
401
|
-
name: string;
|
|
402
|
-
/**
|
|
403
|
-
* An optional logo URL to display in the UI instead of the name.
|
|
404
|
-
*/
|
|
405
|
-
logoUrl?: string;
|
|
406
|
-
stylesheet?: string;
|
|
407
|
-
favicon?: string;
|
|
408
|
-
sdk: {
|
|
409
|
-
url: string;
|
|
410
|
-
options?: Partial<ConfigurationParameters>;
|
|
411
|
-
};
|
|
412
|
-
project: {
|
|
413
|
-
registration_enabled: boolean;
|
|
414
|
-
verification_enabled: boolean;
|
|
415
|
-
recovery_enabled: boolean;
|
|
416
|
-
recovery_ui_url: string;
|
|
417
|
-
registration_ui_url: string;
|
|
418
|
-
verification_ui_url: string;
|
|
419
|
-
login_ui_url: string;
|
|
420
|
-
default_redirect_url?: string;
|
|
421
|
-
};
|
|
422
|
-
intl?: IntlConfig;
|
|
423
|
-
};
|
|
424
|
-
|
|
425
387
|
/**
|
|
426
388
|
* A generic flow container, containing a flowType, the flow itself and the config object
|
|
427
389
|
*
|
|
@@ -430,7 +392,6 @@ type OryClientConfiguration = {
|
|
|
430
392
|
type OryFlow<TFlowType extends FlowType, TFlow> = {
|
|
431
393
|
flowType: TFlowType;
|
|
432
394
|
flow: TFlow;
|
|
433
|
-
config: OryClientConfiguration;
|
|
434
395
|
};
|
|
435
396
|
/**
|
|
436
397
|
* A flow container for the login flow
|
|
@@ -494,6 +455,48 @@ type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
|
494
455
|
*/
|
|
495
456
|
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer | ConsentFlowContainer;
|
|
496
457
|
|
|
458
|
+
type LocaleMap = Record<string, Record<string, string>>;
|
|
459
|
+
declare const OryLocales: LocaleMap;
|
|
460
|
+
|
|
461
|
+
type Locale = keyof typeof OryLocales;
|
|
462
|
+
type IntlContextProps = {
|
|
463
|
+
locale: Locale;
|
|
464
|
+
customTranslations?: Partial<LocaleMap>;
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
type IntlConfig = IntlContextProps;
|
|
468
|
+
/**
|
|
469
|
+
* The configuration for Ory Elements.
|
|
470
|
+
*
|
|
471
|
+
* This configuration is used to customize the behavior and appearance of Ory Elements.
|
|
472
|
+
*
|
|
473
|
+
* By setting UI urls, you can override the default URLs for the login, registration, recovery, and verification flows.
|
|
474
|
+
*
|
|
475
|
+
* You can also set the name of the application, the logo URL, and the SDK configuration.
|
|
476
|
+
* By default, the name and logo are displayed in the card's header.
|
|
477
|
+
*/
|
|
478
|
+
type OryClientConfiguration = {
|
|
479
|
+
/**
|
|
480
|
+
* The SDK configuration.
|
|
481
|
+
* This configuration is used to set the URL of the Ory SDK and any additional options used for the SDK client.
|
|
482
|
+
*/
|
|
483
|
+
sdk?: {
|
|
484
|
+
url?: string;
|
|
485
|
+
options?: Partial<ConfigurationParameters>;
|
|
486
|
+
};
|
|
487
|
+
/**
|
|
488
|
+
* The internationalization configuration.
|
|
489
|
+
* This configuration is used to set the locale and any additional options used for the i18n library.
|
|
490
|
+
* The locale is used to determine the language of the UI.
|
|
491
|
+
* The default locale is "en".
|
|
492
|
+
*/
|
|
493
|
+
intl?: IntlConfig;
|
|
494
|
+
/**
|
|
495
|
+
* The configuration for the project.
|
|
496
|
+
*/
|
|
497
|
+
project: AccountExperienceConfiguration;
|
|
498
|
+
};
|
|
499
|
+
|
|
497
500
|
/**
|
|
498
501
|
* Converts a UiText to a FormattedMessage.
|
|
499
502
|
* The UiText contains the id of the message and the context.
|
|
@@ -589,6 +592,8 @@ type FormStateAction = {
|
|
|
589
592
|
} | {
|
|
590
593
|
type: "action_select_method";
|
|
591
594
|
method: UiNodeGroupEnum;
|
|
595
|
+
} | {
|
|
596
|
+
type: "action_clear_active_method";
|
|
592
597
|
};
|
|
593
598
|
|
|
594
599
|
/**
|
|
@@ -622,7 +627,33 @@ type FlowContextValue = OryFlowContainer & {
|
|
|
622
627
|
|
|
623
628
|
type OryProviderProps = {
|
|
624
629
|
components: OryFlowComponents;
|
|
630
|
+
config: OryClientConfiguration;
|
|
625
631
|
} & OryFlowContainer & PropsWithChildren;
|
|
626
|
-
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
632
|
+
declare function OryProvider({ children, components: Components, config, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
633
|
+
|
|
634
|
+
type OryElementsConfiguration = {
|
|
635
|
+
sdk: OrySDK;
|
|
636
|
+
project: AccountExperienceConfiguration;
|
|
637
|
+
};
|
|
638
|
+
declare function useOryConfiguration(): OryElementsConfiguration;
|
|
639
|
+
type OrySDK = SDKConfig & {
|
|
640
|
+
/**
|
|
641
|
+
* The frontend client for the Ory SDK.
|
|
642
|
+
* This client is used to interact with the Ory SDK and should be used to make API calls.
|
|
643
|
+
*/
|
|
644
|
+
frontend: FrontendApi;
|
|
645
|
+
};
|
|
646
|
+
type SDKConfig = {
|
|
647
|
+
/**
|
|
648
|
+
* The URL of the Ory SDK.
|
|
649
|
+
* This URL is used to connect to the Ory SDK and should be set to the base URL of your Ory instance.
|
|
650
|
+
*/
|
|
651
|
+
url: string;
|
|
652
|
+
options?: Partial<ConfigurationParameters>;
|
|
653
|
+
};
|
|
654
|
+
declare function OryConfigurationProvider({ children, sdk: initialConfig, project, }: PropsWithChildren<{
|
|
655
|
+
sdk?: Partial<OryClientConfiguration["sdk"]>;
|
|
656
|
+
project?: Partial<AccountExperienceConfiguration>;
|
|
657
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
627
658
|
|
|
628
|
-
export { type ConsentFlow, type ConsentFlowContainer, type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormStateMethodActive, type FormStateProvideIdentifier, type FormStateSelectMethod, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, OryConsentCard, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeConsentScopeCheckboxProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
|
659
|
+
export { type ConsentFlow, type ConsentFlowContainer, type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormStateMethodActive, type FormStateProvideIdentifier, type FormStateSelectMethod, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, type OryCardSettingsSectionProps, OryCardValidationMessages, type OryClientConfiguration, OryConfigurationProvider, OryConsentCard, type OryElementsConfiguration, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeCaptchaProps, type OryNodeConsentScopeCheckboxProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryConfiguration, useOryFlow };
|