@ory/elements-react 1.0.0-rc.1 → 1.0.0-rc.3
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 +49 -0
- package/dist/index.d.mts +75 -43
- package/dist/index.d.ts +75 -43
- package/dist/index.js +181 -97
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -100
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +9 -3
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +713 -547
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +698 -518
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
+
## 1.0.0-rc.3 (2025-05-09)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- captcha reloading and duplication ([#518](https://github.com/ory/elements/pull/518))
|
|
6
|
+
- ⚠️ rework configuration management ([#515](https://github.com/ory/elements/pull/515))
|
|
7
|
+
- add missing testids to method selector and checkbox ([#517](https://github.com/ory/elements/pull/517))
|
|
8
|
+
|
|
9
|
+
### ⚠️ Breaking Changes
|
|
10
|
+
|
|
11
|
+
- ⚠️ rework configuration management ([#515](https://github.com/ory/elements/pull/515))
|
|
12
|
+
|
|
13
|
+
### ❤️ Thank You
|
|
14
|
+
|
|
15
|
+
- hackerman @aeneasr
|
|
16
|
+
- Jonas Hungershausen
|
|
17
|
+
|
|
18
|
+
## 1.0.0-rc.2 (2025-04-30)
|
|
19
|
+
|
|
20
|
+
### 🚀 Features
|
|
21
|
+
|
|
22
|
+
- method translation for totp, code, webauthn ([#500](https://github.com/ory/elements/pull/500))
|
|
23
|
+
- add all missing stories ([#480](https://github.com/ory/elements/pull/480))
|
|
24
|
+
- preview deployments for example apps ([#488](https://github.com/ory/elements/pull/488))
|
|
25
|
+
- add back button to settings page ([#464](https://github.com/ory/elements/pull/464))
|
|
26
|
+
|
|
27
|
+
### 🩹 Fixes
|
|
28
|
+
|
|
29
|
+
- ⚠️ align configuration types to Ory Network APIs ([#423](https://github.com/ory/elements/pull/423))
|
|
30
|
+
- sort captcha before submit button ([#507](https://github.com/ory/elements/pull/507))
|
|
31
|
+
- cors credentials in default client ([#508](https://github.com/ory/elements/pull/508))
|
|
32
|
+
- back button should return to application ([#465](https://github.com/ory/elements/pull/465))
|
|
33
|
+
- adjust design of generic OIDC provider ([#492](https://github.com/ory/elements/pull/492))
|
|
34
|
+
- use proper id for react element arrays ([#495](https://github.com/ory/elements/pull/495))
|
|
35
|
+
- add test id to header messages ([#489](https://github.com/ory/elements/pull/489))
|
|
36
|
+
- re-add missing error message when no methods provided ([#460](https://github.com/ory/elements/pull/460))
|
|
37
|
+
- resend not working for registration ([#468](https://github.com/ory/elements/pull/468))
|
|
38
|
+
- add missing color class to registration footer ([#473](https://github.com/ory/elements/pull/473))
|
|
39
|
+
- resend not working for registration ([#467](https://github.com/ory/elements/pull/467))
|
|
40
|
+
|
|
41
|
+
### ⚠️ Breaking Changes
|
|
42
|
+
|
|
43
|
+
- ⚠️ align configuration types to Ory Network APIs ([#423](https://github.com/ory/elements/pull/423))
|
|
44
|
+
|
|
45
|
+
### ❤️ Thank You
|
|
46
|
+
|
|
47
|
+
- hackerman @aeneasr
|
|
48
|
+
- Jonas Hungershausen
|
|
49
|
+
|
|
1
50
|
## 1.0.0-rc.1 (2025-04-21)
|
|
2
51
|
|
|
3
52
|
### 🩹 Fixes
|
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
|
|
@@ -486,6 +447,7 @@ type ConsentFlow = {
|
|
|
486
447
|
ui: UiContainer;
|
|
487
448
|
consent_request: OAuth2ConsentRequest;
|
|
488
449
|
session: Session;
|
|
450
|
+
return_to?: string;
|
|
489
451
|
};
|
|
490
452
|
type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
491
453
|
/**
|
|
@@ -493,6 +455,48 @@ type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
|
493
455
|
*/
|
|
494
456
|
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer | ConsentFlowContainer;
|
|
495
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
|
+
|
|
496
500
|
/**
|
|
497
501
|
* Converts a UiText to a FormattedMessage.
|
|
498
502
|
* The UiText contains the id of the message and the context.
|
|
@@ -561,7 +565,9 @@ type OnSubmitHandlerProps<T extends UpdateLoginFlowBody | UpdateRegistrationFlow
|
|
|
561
565
|
* @param message - the UiText message to generate a test id for
|
|
562
566
|
* @returns a unique, stable test id for the message
|
|
563
567
|
*/
|
|
564
|
-
declare function messageTestId(message:
|
|
568
|
+
declare function messageTestId(message: {
|
|
569
|
+
id: number | string;
|
|
570
|
+
}): {
|
|
565
571
|
"data-testid": string;
|
|
566
572
|
};
|
|
567
573
|
|
|
@@ -619,7 +625,33 @@ type FlowContextValue = OryFlowContainer & {
|
|
|
619
625
|
|
|
620
626
|
type OryProviderProps = {
|
|
621
627
|
components: OryFlowComponents;
|
|
628
|
+
config: OryClientConfiguration;
|
|
622
629
|
} & OryFlowContainer & PropsWithChildren;
|
|
623
|
-
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
630
|
+
declare function OryProvider({ children, components: Components, config, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
631
|
+
|
|
632
|
+
type OryElementsConfiguration = {
|
|
633
|
+
sdk: OrySDK;
|
|
634
|
+
project: AccountExperienceConfiguration;
|
|
635
|
+
};
|
|
636
|
+
declare function useOryConfiguration(): OryElementsConfiguration;
|
|
637
|
+
type OrySDK = SDKConfig & {
|
|
638
|
+
/**
|
|
639
|
+
* The frontend client for the Ory SDK.
|
|
640
|
+
* This client is used to interact with the Ory SDK and should be used to make API calls.
|
|
641
|
+
*/
|
|
642
|
+
frontend: FrontendApi;
|
|
643
|
+
};
|
|
644
|
+
type SDKConfig = {
|
|
645
|
+
/**
|
|
646
|
+
* The URL of the Ory SDK.
|
|
647
|
+
* This URL is used to connect to the Ory SDK and should be set to the base URL of your Ory instance.
|
|
648
|
+
*/
|
|
649
|
+
url: string;
|
|
650
|
+
options?: Partial<ConfigurationParameters>;
|
|
651
|
+
};
|
|
652
|
+
declare function OryConfigurationProvider({ children, sdk: initialConfig, project, }: PropsWithChildren<{
|
|
653
|
+
sdk?: Partial<OryClientConfiguration["sdk"]>;
|
|
654
|
+
project?: Partial<AccountExperienceConfiguration>;
|
|
655
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
624
656
|
|
|
625
|
-
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 };
|
|
657
|
+
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
|
|
@@ -486,6 +447,7 @@ type ConsentFlow = {
|
|
|
486
447
|
ui: UiContainer;
|
|
487
448
|
consent_request: OAuth2ConsentRequest;
|
|
488
449
|
session: Session;
|
|
450
|
+
return_to?: string;
|
|
489
451
|
};
|
|
490
452
|
type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
491
453
|
/**
|
|
@@ -493,6 +455,48 @@ type ConsentFlowContainer = OryFlow<FlowType.OAuth2Consent, ConsentFlow>;
|
|
|
493
455
|
*/
|
|
494
456
|
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer | ConsentFlowContainer;
|
|
495
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
|
+
|
|
496
500
|
/**
|
|
497
501
|
* Converts a UiText to a FormattedMessage.
|
|
498
502
|
* The UiText contains the id of the message and the context.
|
|
@@ -561,7 +565,9 @@ type OnSubmitHandlerProps<T extends UpdateLoginFlowBody | UpdateRegistrationFlow
|
|
|
561
565
|
* @param message - the UiText message to generate a test id for
|
|
562
566
|
* @returns a unique, stable test id for the message
|
|
563
567
|
*/
|
|
564
|
-
declare function messageTestId(message:
|
|
568
|
+
declare function messageTestId(message: {
|
|
569
|
+
id: number | string;
|
|
570
|
+
}): {
|
|
565
571
|
"data-testid": string;
|
|
566
572
|
};
|
|
567
573
|
|
|
@@ -619,7 +625,33 @@ type FlowContextValue = OryFlowContainer & {
|
|
|
619
625
|
|
|
620
626
|
type OryProviderProps = {
|
|
621
627
|
components: OryFlowComponents;
|
|
628
|
+
config: OryClientConfiguration;
|
|
622
629
|
} & OryFlowContainer & PropsWithChildren;
|
|
623
|
-
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
630
|
+
declare function OryProvider({ children, components: Components, config, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
631
|
+
|
|
632
|
+
type OryElementsConfiguration = {
|
|
633
|
+
sdk: OrySDK;
|
|
634
|
+
project: AccountExperienceConfiguration;
|
|
635
|
+
};
|
|
636
|
+
declare function useOryConfiguration(): OryElementsConfiguration;
|
|
637
|
+
type OrySDK = SDKConfig & {
|
|
638
|
+
/**
|
|
639
|
+
* The frontend client for the Ory SDK.
|
|
640
|
+
* This client is used to interact with the Ory SDK and should be used to make API calls.
|
|
641
|
+
*/
|
|
642
|
+
frontend: FrontendApi;
|
|
643
|
+
};
|
|
644
|
+
type SDKConfig = {
|
|
645
|
+
/**
|
|
646
|
+
* The URL of the Ory SDK.
|
|
647
|
+
* This URL is used to connect to the Ory SDK and should be set to the base URL of your Ory instance.
|
|
648
|
+
*/
|
|
649
|
+
url: string;
|
|
650
|
+
options?: Partial<ConfigurationParameters>;
|
|
651
|
+
};
|
|
652
|
+
declare function OryConfigurationProvider({ children, sdk: initialConfig, project, }: PropsWithChildren<{
|
|
653
|
+
sdk?: Partial<OryClientConfiguration["sdk"]>;
|
|
654
|
+
project?: Partial<AccountExperienceConfiguration>;
|
|
655
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
624
656
|
|
|
625
|
-
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 };
|
|
657
|
+
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 };
|