@ory/elements-react 1.0.0-next.5 → 1.0.0-next.7
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/.vscode/i18n-ally-reviews.yml +3 -0
- package/.vscode/settings.json +4 -0
- package/CHANGELOG.md +34 -8
- package/README.md +4 -3
- package/dist/index.d.mts +90 -17
- package/dist/index.d.ts +90 -17
- package/dist/index.js +265 -59
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +260 -57
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +36 -2
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +265 -193
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +274 -202
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +10 -9
- package/tsconfig.json +4 -2
- package/test-results/.last-run.json +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
|
-
## 1.0.0-next.
|
|
1
|
+
## 1.0.0-next.7 (2024-09-27)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### 🚀 Features
|
|
5
|
+
|
|
6
|
+
- add two-step login card
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### 🩹 Fixes
|
|
10
|
+
|
|
11
|
+
- registration text in swedish translation
|
|
12
|
+
|
|
13
|
+
- show identifier_first node in card header
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### ❤️ Thank You
|
|
2
17
|
|
|
18
|
+
- Jonas Hungershausen
|
|
19
|
+
|
|
20
|
+
## 1.0.0-next.6 (2024-09-18)
|
|
21
|
+
|
|
22
|
+
### 🩹 Fixes
|
|
23
|
+
|
|
24
|
+
- **intl:** export locales object from package root
|
|
25
|
+
|
|
26
|
+
### ❤️ Thank You
|
|
27
|
+
|
|
28
|
+
- Jonas Hungershausen
|
|
29
|
+
|
|
30
|
+
## 1.0.0-next.5 (2024-09-17)
|
|
3
31
|
|
|
4
32
|
### 🚀 Features
|
|
5
33
|
|
|
@@ -7,7 +35,6 @@
|
|
|
7
35
|
|
|
8
36
|
- **theme:** show resend code button on top of code input
|
|
9
37
|
|
|
10
|
-
|
|
11
38
|
### 🩹 Fixes
|
|
12
39
|
|
|
13
40
|
- **core:** use SDK instead of HTML form submissions
|
|
@@ -16,7 +43,7 @@
|
|
|
16
43
|
|
|
17
44
|
- **core:** code form submission precendence
|
|
18
45
|
|
|
19
|
-
- ⚠️
|
|
46
|
+
- ⚠️ **theme:** scope css classes with .ory-default-theme
|
|
20
47
|
|
|
21
48
|
- **theme:** social sign in button styling
|
|
22
49
|
|
|
@@ -24,12 +51,11 @@
|
|
|
24
51
|
|
|
25
52
|
- **core:** passkey script discovery
|
|
26
53
|
|
|
54
|
+
#### ⚠️ Breaking Changes
|
|
27
55
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- ⚠️ **theme:** scope css classes with .ory-default-theme
|
|
56
|
+
- ⚠️ **theme:** scope css classes with .ory-default-theme
|
|
31
57
|
|
|
32
|
-
### ❤️
|
|
58
|
+
### ❤️ Thank You
|
|
33
59
|
|
|
34
60
|
- Jonas Hungershausen
|
|
35
|
-
- Miłosz
|
|
61
|
+
- Miłosz
|
package/README.md
CHANGED
|
@@ -49,15 +49,16 @@ user authentication flows based on the data.
|
|
|
49
49
|
To feed Ory Elements with flow data you need to use Ory client.
|
|
50
50
|
|
|
51
51
|
```ts
|
|
52
|
-
import { frontendClient } from "@ory/client-fetch"
|
|
53
|
-
|
|
54
52
|
export function serverClientFrontend() {
|
|
55
53
|
// For testing purposes we're using Ory tunnel
|
|
56
|
-
|
|
54
|
+
|
|
55
|
+
const config = new Configuration({
|
|
57
56
|
headers: {
|
|
58
57
|
Accept: "application/json",
|
|
59
58
|
},
|
|
59
|
+
basePath: "http://localhost:4000",
|
|
60
60
|
})
|
|
61
|
+
return new FrontendApi(config)
|
|
61
62
|
}
|
|
62
63
|
```
|
|
63
64
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { UiNodeGroupEnum, UiText, UiNode, UiNodeInputAttributes, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { PropsWithChildren, ComponentType, DetailedHTMLProps, HTMLAttributes, ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, Dispatch } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { IntlShape } from 'react-intl';
|
|
6
6
|
|
|
7
|
+
declare function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
7
9
|
type OryCardHeaderProps = Record<string, never>;
|
|
8
10
|
declare function OryCardHeader(): react_jsx_runtime.JSX.Element;
|
|
9
11
|
|
|
@@ -64,8 +66,10 @@ type HeadlessSocialButtonContainerProps = PropsWithChildren<{
|
|
|
64
66
|
type HeadlessSocialButtonProps = PropsWithChildren<{
|
|
65
67
|
node: UiNode;
|
|
66
68
|
attributes: UiNodeInputAttributes;
|
|
69
|
+
onClick?: () => void;
|
|
67
70
|
}>;
|
|
68
71
|
declare function OryFormSocialButtons({ children, hideDivider, }: HeadlessSocialButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
72
|
+
declare function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
|
|
69
73
|
|
|
70
74
|
type OryFormComponents = {
|
|
71
75
|
Button: ComponentType<HeadlessButtonProps>;
|
|
@@ -84,7 +88,7 @@ type OryFormComponents = {
|
|
|
84
88
|
FormGroup: ComponentType<HeadlessGroupContainerProps>;
|
|
85
89
|
MessageContainer: ComponentType<HeadlessMessagesProps>;
|
|
86
90
|
Message: ComponentType<HeadlessMessageProps>;
|
|
87
|
-
CurrentIdentifierButton: ComponentType<
|
|
91
|
+
CurrentIdentifierButton: ComponentType<HeadlessCurrentIdentifierProps>;
|
|
88
92
|
};
|
|
89
93
|
type OryFormProps = PropsWithChildren;
|
|
90
94
|
declare function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element;
|
|
@@ -93,6 +97,12 @@ type HeadlessButtonProps = {
|
|
|
93
97
|
attributes: UiNodeInputAttributes;
|
|
94
98
|
node: UiNode;
|
|
95
99
|
} & Omit<ComponentPropsWithoutRef<"button">, "children">;
|
|
100
|
+
type HeadlessCurrentIdentifierProps = {
|
|
101
|
+
attributes: UiNodeInputAttributes;
|
|
102
|
+
node: UiNode;
|
|
103
|
+
onClick?: () => void;
|
|
104
|
+
href?: string;
|
|
105
|
+
} & Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick">;
|
|
96
106
|
type HeadlessLinkButtonProps = {
|
|
97
107
|
attributes: UiNodeAnchorAttributes;
|
|
98
108
|
node: UiNode;
|
|
@@ -106,8 +116,7 @@ type HeadlessTextProps = {
|
|
|
106
116
|
node: UiNode;
|
|
107
117
|
};
|
|
108
118
|
type HeadlessAuthMethodListItemProps = {
|
|
109
|
-
|
|
110
|
-
setStep: Dispatch<React__default.SetStateAction<number>>;
|
|
119
|
+
onClick: () => void;
|
|
111
120
|
group: string;
|
|
112
121
|
};
|
|
113
122
|
type HeadlessImageProps = {
|
|
@@ -363,7 +372,15 @@ var de = {
|
|
|
363
372
|
"verification.registration-button": "Registrieren",
|
|
364
373
|
"verification.registration-label": "Sie haben noch kein Konto?",
|
|
365
374
|
"verification.title": "Verifizieren Sie ihr Konto",
|
|
366
|
-
"verification.back-button": "Zurück"
|
|
375
|
+
"verification.back-button": "Zurück",
|
|
376
|
+
"two-step.code.description": "Ein Bestätigungscode wird an Ihre E-Mail gesendet.",
|
|
377
|
+
"two-step.code.title": "E-Mail-Code",
|
|
378
|
+
"two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Geräts",
|
|
379
|
+
"two-step.passkey.title": "Passwort (empfohlen)",
|
|
380
|
+
"two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verknüpft ist",
|
|
381
|
+
"two-step.password.title": "Passwort",
|
|
382
|
+
"two-step.webauthn.description": "Verwenden Sie Ihren Sicherheitsschlüssel zur Authentifizierung",
|
|
383
|
+
"two-step.webauthn.title": "Sicherheitsschlüssel"
|
|
367
384
|
};
|
|
368
385
|
|
|
369
386
|
var en = {
|
|
@@ -540,7 +557,15 @@ var en = {
|
|
|
540
557
|
"verification.registration-button": "Sign up",
|
|
541
558
|
"verification.registration-label": "Don't have an account?",
|
|
542
559
|
"verification.title": "Verify your account",
|
|
543
|
-
"verification.back-button": "Back"
|
|
560
|
+
"verification.back-button": "Back",
|
|
561
|
+
"two-step.password.title": "Password",
|
|
562
|
+
"two-step.password.description": "Enter your password associated with your account",
|
|
563
|
+
"two-step.code.title": "Email code",
|
|
564
|
+
"two-step.code.description": "A verification code will be sent to your email",
|
|
565
|
+
"two-step.webauthn.title": "Security Key",
|
|
566
|
+
"two-step.webauthn.description": "Use your security key to authenticate",
|
|
567
|
+
"two-step.passkey.title": "Passkey (recommended)",
|
|
568
|
+
"two-step.passkey.description": "Use your device's for fingerprint or face recognition"
|
|
544
569
|
};
|
|
545
570
|
|
|
546
571
|
var es = {
|
|
@@ -717,7 +742,15 @@ var es = {
|
|
|
717
742
|
"verification.registration-button": "Registrarse",
|
|
718
743
|
"verification.registration-label": "¿No tiene una cuenta?",
|
|
719
744
|
"verification.title": "Verificar su cuenta",
|
|
720
|
-
"verification.back-button": "Regresar"
|
|
745
|
+
"verification.back-button": "Regresar",
|
|
746
|
+
"two-step.code.description": "Se enviará un código de verificación a tu correo electrónico.",
|
|
747
|
+
"two-step.code.title": "Código de correo electrónico",
|
|
748
|
+
"two-step.passkey.description": "Utiliza el reconocimiento de huellas dactilares o facial de tu dispositivo.",
|
|
749
|
+
"two-step.passkey.title": "Clave de acceso (recomendada)",
|
|
750
|
+
"two-step.password.description": "Ingrese la contraseña asociada con su cuenta",
|
|
751
|
+
"two-step.password.title": "Contraseña",
|
|
752
|
+
"two-step.webauthn.description": "Utiliza tu llave de seguridad para autenticarte",
|
|
753
|
+
"two-step.webauthn.title": "Clave de Seguridad"
|
|
721
754
|
};
|
|
722
755
|
|
|
723
756
|
var fr = {
|
|
@@ -894,7 +927,15 @@ var fr = {
|
|
|
894
927
|
"verification.registration-button": "S'inscrire",
|
|
895
928
|
"verification.registration-label": "Vous n'avez pas de compte ?",
|
|
896
929
|
"verification.title": "Vérifiez votre compte",
|
|
897
|
-
"verification.back-button": "Revenir en arrière"
|
|
930
|
+
"verification.back-button": "Revenir en arrière",
|
|
931
|
+
"two-step.code.description": "Un code de vérification sera envoyé à votre email",
|
|
932
|
+
"two-step.code.title": "Code de courrier électronique",
|
|
933
|
+
"two-step.passkey.description": "Utilisez l'appareil pour la reconnaissance d'empreintes digitales ou de visage",
|
|
934
|
+
"two-step.passkey.title": "Clé de passe (recommandée)",
|
|
935
|
+
"two-step.password.description": "Entrez votre mot de passe associé à votre compte",
|
|
936
|
+
"two-step.password.title": "Mot de passe",
|
|
937
|
+
"two-step.webauthn.description": "Utilisez votre clé de sécurité pour vous authentifier",
|
|
938
|
+
"two-step.webauthn.title": "Clé de Sécurité"
|
|
898
939
|
};
|
|
899
940
|
|
|
900
941
|
var nl = {
|
|
@@ -1071,7 +1112,15 @@ var nl = {
|
|
|
1071
1112
|
"verification.registration-button": "Registreren",
|
|
1072
1113
|
"verification.registration-label": "Heb je nog geen account?",
|
|
1073
1114
|
"verification.title": "Verifieer je account",
|
|
1074
|
-
"verification.back-button": "Ga terug"
|
|
1115
|
+
"verification.back-button": "Ga terug",
|
|
1116
|
+
"two-step.code.description": "Een verificatiecode wordt naar uw e-mail gestuurd",
|
|
1117
|
+
"two-step.code.title": "E-mailcode",
|
|
1118
|
+
"two-step.passkey.description": "Gebruik de vingerafdruk- of gezichtsherkenning van uw apparaat",
|
|
1119
|
+
"two-step.passkey.title": "Toegangscode (aanbevolen)",
|
|
1120
|
+
"two-step.password.description": "Voer uw wachtwoord in dat is gekoppeld aan uw account",
|
|
1121
|
+
"two-step.password.title": "Wachtwoord",
|
|
1122
|
+
"two-step.webauthn.description": "Gebruik uw beveiligingssleutel om te verifiëren",
|
|
1123
|
+
"two-step.webauthn.title": "Beveiligingssleutel"
|
|
1075
1124
|
};
|
|
1076
1125
|
|
|
1077
1126
|
var pl = {
|
|
@@ -1248,7 +1297,15 @@ var pl = {
|
|
|
1248
1297
|
"verification.registration-button": "Zarejestruj się",
|
|
1249
1298
|
"verification.registration-label": "Nie posiadasz konta?",
|
|
1250
1299
|
"verification.title": "Zweryfikuj konto",
|
|
1251
|
-
"verification.back-button": "Cofnij"
|
|
1300
|
+
"verification.back-button": "Cofnij",
|
|
1301
|
+
"two-step.code.description": "Kod weryfikacyjny zostanie wysłany na Twój adres email.",
|
|
1302
|
+
"two-step.code.title": "Kod email",
|
|
1303
|
+
"two-step.passkey.description": "Użyj swojego urządzenia lub funkcji rozpoznawania twarzy na swoim urządzeniu.",
|
|
1304
|
+
"two-step.passkey.title": "Klucz dostępu (zalecany)",
|
|
1305
|
+
"two-step.password.description": "Wprowadź hasło powiązane z twoim kontem",
|
|
1306
|
+
"two-step.password.title": "Hasło",
|
|
1307
|
+
"two-step.webauthn.description": "Użyj swojego klucza bezpieczeństwa do uwierzytelnienia",
|
|
1308
|
+
"two-step.webauthn.title": "Klucz bezpieczeństwa"
|
|
1252
1309
|
};
|
|
1253
1310
|
|
|
1254
1311
|
var pt = {
|
|
@@ -1425,7 +1482,15 @@ var pt = {
|
|
|
1425
1482
|
"verification.registration-button": "Registar",
|
|
1426
1483
|
"verification.registration-label": "Não tem uma conta?",
|
|
1427
1484
|
"verification.title": "Verifique a sua conta",
|
|
1428
|
-
"verification.back-button": "Voltar"
|
|
1485
|
+
"verification.back-button": "Voltar",
|
|
1486
|
+
"two-step.code.description": "Um código de verificação será enviado para o seu email",
|
|
1487
|
+
"two-step.code.title": "Código de email",
|
|
1488
|
+
"two-step.passkey.description": "Use o seu dispositivo para reconhecimento de impressão digital ou facial.",
|
|
1489
|
+
"two-step.passkey.title": "Chave de acesso (recomendado)",
|
|
1490
|
+
"two-step.password.description": "Insira a sua senha associada à sua conta",
|
|
1491
|
+
"two-step.password.title": "Senha",
|
|
1492
|
+
"two-step.webauthn.description": "Use sua chave de segurança para autenticar",
|
|
1493
|
+
"two-step.webauthn.title": "Chave de Segurança"
|
|
1429
1494
|
};
|
|
1430
1495
|
|
|
1431
1496
|
var sv = {
|
|
@@ -1458,8 +1523,8 @@ var sv = {
|
|
|
1458
1523
|
"identities.messages.1010013": "Fortsätt",
|
|
1459
1524
|
"identities.messages.1010014": "Ett e-postmeddelande som innehåller en kod har skickats till den e-postadress du angett. Om du inte har fått ett mejl, kontrollera stavningen av adressen och försök logga in igen.",
|
|
1460
1525
|
"identities.messages.1010015": "Logga in med kod",
|
|
1461
|
-
"identities.messages.1040001": "
|
|
1462
|
-
"identities.messages.1040002": "
|
|
1526
|
+
"identities.messages.1040001": "Skapa konto",
|
|
1527
|
+
"identities.messages.1040002": "Registrera dig med {provider}",
|
|
1463
1528
|
"identities.messages.1040003": "Fortsätt",
|
|
1464
1529
|
"identities.messages.1040004": "Registrera med säkerhetsnyckel",
|
|
1465
1530
|
"identities.messages.1040005": "Ett e-postmeddelande som innehåller en kod har skickats till den e-postadress du angett. Om du inte har fått ett e-postmeddelande, kontrollera stavningen av adressen och försök igen med registreringen.",
|
|
@@ -1602,7 +1667,15 @@ var sv = {
|
|
|
1602
1667
|
"verification.registration-button": "Skapa konto",
|
|
1603
1668
|
"verification.registration-label": "Har du inget konto?",
|
|
1604
1669
|
"verification.title": "Verifiera ditt konto",
|
|
1605
|
-
"verification.back-button": "Tillbaka"
|
|
1670
|
+
"verification.back-button": "Tillbaka",
|
|
1671
|
+
"two-step.code.description": "En verifieringskod kommer att skickas till din e-post",
|
|
1672
|
+
"two-step.code.title": "E-postkod",
|
|
1673
|
+
"two-step.passkey.description": "Använd din enhets fingeravtryck eller ansiktsigenkänning",
|
|
1674
|
+
"two-step.passkey.title": "Passerkod (rekommenderad)",
|
|
1675
|
+
"two-step.password.description": "Ange ditt lösenord kopplat till ditt konto",
|
|
1676
|
+
"two-step.password.title": "Lösenord",
|
|
1677
|
+
"two-step.webauthn.description": "Använd din säkerhetsnyckel för att autentisera",
|
|
1678
|
+
"two-step.webauthn.title": "Säkerhetsnyckel"
|
|
1606
1679
|
};
|
|
1607
1680
|
|
|
1608
1681
|
declare const locales_de: typeof de;
|
|
@@ -1636,7 +1709,7 @@ type SupportedTranslations = {
|
|
|
1636
1709
|
defaultLocale?: string;
|
|
1637
1710
|
};
|
|
1638
1711
|
type IntlProviderProps<Type> = Type extends CustomTranslations ? CustomTranslations : SupportedTranslations;
|
|
1639
|
-
declare const IntlProvider: <T extends CustomTranslations | SupportedTranslations = SupportedTranslations>({ children, ...props }: PropsWithChildren<IntlProviderProps<T>>) => string | number | boolean | Iterable<
|
|
1712
|
+
declare const IntlProvider: <T extends CustomTranslations | SupportedTranslations = SupportedTranslations>({ children, ...props }: PropsWithChildren<IntlProviderProps<T>>) => string | number | boolean | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1640
1713
|
|
|
1641
1714
|
type ProviderProps<T> = {
|
|
1642
1715
|
components: OryFlowComponents;
|
|
@@ -1772,4 +1845,4 @@ declare function onSubmitVerification({ config, flow }: FlowContainer, { setFlow
|
|
|
1772
1845
|
*/
|
|
1773
1846
|
declare function onSubmitRegistration({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps<UpdateRegistrationFlowBody>): Promise<void>;
|
|
1774
1847
|
|
|
1775
|
-
export { type CustomLanguageFormats, type CustomTranslations, type ErrorFlowContainer, type FlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, type HeadlessAuthMethodListItemProps, type HeadlessButtonProps, type HeadlessFormProps, type HeadlessGroupContainerProps, type HeadlessGroupProps, type HeadlessImageProps, type HeadlessInputProps, type HeadlessLabelProps, type HeadlessLinkButtonProps, HeadlessMessage, type HeadlessMessageProps, type HeadlessMessagesProps, type HeadlessSocialButtonContainerProps, type HeadlessSocialButtonProps, type HeadlessSocialButtonsProps, type HeadlessTextProps, type HorizontalDividerProps, IntlProvider, type IntlProviderProps, LanguageCodes, type Locale, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardComponents, OryCardContent, type OryCardContentProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardProps, OryCardValidationMessages, type OryClientConfiguration, OryComponentProvider, type OryFlowComponents, OryFlowProvider, type OryFlowProviderProps, OryForm, type OryFormComponents, OryFormGroupDivider, OryFormGroups, type OryFormProps, OryFormSocialButtons, OryProvider, type ProviderProps, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type SupportedTranslations, type TranslationFile, type VerificationFlowContainer, formElementId, formLabelId, formatMessage, isCustomTranslations, messageTestId, onSubmitLogin, onSubmitRecovery, onSubmitRegistration, onSubmitSettings, onSubmitVerification, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
|
1848
|
+
export { type CustomLanguageFormats, type CustomTranslations, type ErrorFlowContainer, type FlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, type HeadlessAuthMethodListItemProps, type HeadlessButtonProps, type HeadlessCurrentIdentifierProps, type HeadlessFormProps, type HeadlessGroupContainerProps, type HeadlessGroupProps, type HeadlessImageProps, type HeadlessInputProps, type HeadlessLabelProps, type HeadlessLinkButtonProps, HeadlessMessage, type HeadlessMessageProps, type HeadlessMessagesProps, type HeadlessSocialButtonContainerProps, type HeadlessSocialButtonProps, type HeadlessSocialButtonsProps, type HeadlessTextProps, type HorizontalDividerProps, IntlProvider, type IntlProviderProps, LanguageCodes, type Locale, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardComponents, OryCardContent, type OryCardContentProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardProps, OryCardValidationMessages, type OryClientConfiguration, OryComponentProvider, type OryFlowComponents, OryFlowProvider, type OryFlowProviderProps, OryForm, type OryFormComponents, OryFormGroupDivider, OryFormGroups, type OryFormProps, OryFormSocialButtons, OryFormSocialButtonsForm, locales as OryLocales, OryProvider, OryTwoStepCard, type ProviderProps, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type SupportedTranslations, type TranslationFile, type VerificationFlowContainer, formElementId, formLabelId, formatMessage, isCustomTranslations, messageTestId, onSubmitLogin, onSubmitRecovery, onSubmitRegistration, onSubmitSettings, onSubmitVerification, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { UiNodeGroupEnum, UiText, UiNode, UiNodeInputAttributes, UiNodeAnchorAttributes, UiNodeTextAttributes, UiNodeImageAttributes, ConfigurationParameters, FlowType, LoginFlow, RegistrationFlow, RecoveryFlow, VerificationFlow, SettingsFlow, FlowError, UpdateLoginFlowBody, UpdateRegistrationFlowBody, UpdateVerificationFlowBody, UpdateRecoveryFlowBody, UpdateSettingsFlowBody, OnRedirectHandler } from '@ory/client-fetch';
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import { PropsWithChildren, ComponentType, DetailedHTMLProps, HTMLAttributes, ComponentPropsWithoutRef, FormEventHandler, MouseEventHandler, Dispatch } from 'react';
|
|
4
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
5
5
|
import { IntlShape } from 'react-intl';
|
|
6
6
|
|
|
7
|
+
declare function OryTwoStepCard(): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
7
9
|
type OryCardHeaderProps = Record<string, never>;
|
|
8
10
|
declare function OryCardHeader(): react_jsx_runtime.JSX.Element;
|
|
9
11
|
|
|
@@ -64,8 +66,10 @@ type HeadlessSocialButtonContainerProps = PropsWithChildren<{
|
|
|
64
66
|
type HeadlessSocialButtonProps = PropsWithChildren<{
|
|
65
67
|
node: UiNode;
|
|
66
68
|
attributes: UiNodeInputAttributes;
|
|
69
|
+
onClick?: () => void;
|
|
67
70
|
}>;
|
|
68
71
|
declare function OryFormSocialButtons({ children, hideDivider, }: HeadlessSocialButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
72
|
+
declare function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
|
|
69
73
|
|
|
70
74
|
type OryFormComponents = {
|
|
71
75
|
Button: ComponentType<HeadlessButtonProps>;
|
|
@@ -84,7 +88,7 @@ type OryFormComponents = {
|
|
|
84
88
|
FormGroup: ComponentType<HeadlessGroupContainerProps>;
|
|
85
89
|
MessageContainer: ComponentType<HeadlessMessagesProps>;
|
|
86
90
|
Message: ComponentType<HeadlessMessageProps>;
|
|
87
|
-
CurrentIdentifierButton: ComponentType<
|
|
91
|
+
CurrentIdentifierButton: ComponentType<HeadlessCurrentIdentifierProps>;
|
|
88
92
|
};
|
|
89
93
|
type OryFormProps = PropsWithChildren;
|
|
90
94
|
declare function OryForm({ children }: OryFormProps): string | react_jsx_runtime.JSX.Element;
|
|
@@ -93,6 +97,12 @@ type HeadlessButtonProps = {
|
|
|
93
97
|
attributes: UiNodeInputAttributes;
|
|
94
98
|
node: UiNode;
|
|
95
99
|
} & Omit<ComponentPropsWithoutRef<"button">, "children">;
|
|
100
|
+
type HeadlessCurrentIdentifierProps = {
|
|
101
|
+
attributes: UiNodeInputAttributes;
|
|
102
|
+
node: UiNode;
|
|
103
|
+
onClick?: () => void;
|
|
104
|
+
href?: string;
|
|
105
|
+
} & Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick">;
|
|
96
106
|
type HeadlessLinkButtonProps = {
|
|
97
107
|
attributes: UiNodeAnchorAttributes;
|
|
98
108
|
node: UiNode;
|
|
@@ -106,8 +116,7 @@ type HeadlessTextProps = {
|
|
|
106
116
|
node: UiNode;
|
|
107
117
|
};
|
|
108
118
|
type HeadlessAuthMethodListItemProps = {
|
|
109
|
-
|
|
110
|
-
setStep: Dispatch<React__default.SetStateAction<number>>;
|
|
119
|
+
onClick: () => void;
|
|
111
120
|
group: string;
|
|
112
121
|
};
|
|
113
122
|
type HeadlessImageProps = {
|
|
@@ -363,7 +372,15 @@ var de = {
|
|
|
363
372
|
"verification.registration-button": "Registrieren",
|
|
364
373
|
"verification.registration-label": "Sie haben noch kein Konto?",
|
|
365
374
|
"verification.title": "Verifizieren Sie ihr Konto",
|
|
366
|
-
"verification.back-button": "Zurück"
|
|
375
|
+
"verification.back-button": "Zurück",
|
|
376
|
+
"two-step.code.description": "Ein Bestätigungscode wird an Ihre E-Mail gesendet.",
|
|
377
|
+
"two-step.code.title": "E-Mail-Code",
|
|
378
|
+
"two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Geräts",
|
|
379
|
+
"two-step.passkey.title": "Passwort (empfohlen)",
|
|
380
|
+
"two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verknüpft ist",
|
|
381
|
+
"two-step.password.title": "Passwort",
|
|
382
|
+
"two-step.webauthn.description": "Verwenden Sie Ihren Sicherheitsschlüssel zur Authentifizierung",
|
|
383
|
+
"two-step.webauthn.title": "Sicherheitsschlüssel"
|
|
367
384
|
};
|
|
368
385
|
|
|
369
386
|
var en = {
|
|
@@ -540,7 +557,15 @@ var en = {
|
|
|
540
557
|
"verification.registration-button": "Sign up",
|
|
541
558
|
"verification.registration-label": "Don't have an account?",
|
|
542
559
|
"verification.title": "Verify your account",
|
|
543
|
-
"verification.back-button": "Back"
|
|
560
|
+
"verification.back-button": "Back",
|
|
561
|
+
"two-step.password.title": "Password",
|
|
562
|
+
"two-step.password.description": "Enter your password associated with your account",
|
|
563
|
+
"two-step.code.title": "Email code",
|
|
564
|
+
"two-step.code.description": "A verification code will be sent to your email",
|
|
565
|
+
"two-step.webauthn.title": "Security Key",
|
|
566
|
+
"two-step.webauthn.description": "Use your security key to authenticate",
|
|
567
|
+
"two-step.passkey.title": "Passkey (recommended)",
|
|
568
|
+
"two-step.passkey.description": "Use your device's for fingerprint or face recognition"
|
|
544
569
|
};
|
|
545
570
|
|
|
546
571
|
var es = {
|
|
@@ -717,7 +742,15 @@ var es = {
|
|
|
717
742
|
"verification.registration-button": "Registrarse",
|
|
718
743
|
"verification.registration-label": "¿No tiene una cuenta?",
|
|
719
744
|
"verification.title": "Verificar su cuenta",
|
|
720
|
-
"verification.back-button": "Regresar"
|
|
745
|
+
"verification.back-button": "Regresar",
|
|
746
|
+
"two-step.code.description": "Se enviará un código de verificación a tu correo electrónico.",
|
|
747
|
+
"two-step.code.title": "Código de correo electrónico",
|
|
748
|
+
"two-step.passkey.description": "Utiliza el reconocimiento de huellas dactilares o facial de tu dispositivo.",
|
|
749
|
+
"two-step.passkey.title": "Clave de acceso (recomendada)",
|
|
750
|
+
"two-step.password.description": "Ingrese la contraseña asociada con su cuenta",
|
|
751
|
+
"two-step.password.title": "Contraseña",
|
|
752
|
+
"two-step.webauthn.description": "Utiliza tu llave de seguridad para autenticarte",
|
|
753
|
+
"two-step.webauthn.title": "Clave de Seguridad"
|
|
721
754
|
};
|
|
722
755
|
|
|
723
756
|
var fr = {
|
|
@@ -894,7 +927,15 @@ var fr = {
|
|
|
894
927
|
"verification.registration-button": "S'inscrire",
|
|
895
928
|
"verification.registration-label": "Vous n'avez pas de compte ?",
|
|
896
929
|
"verification.title": "Vérifiez votre compte",
|
|
897
|
-
"verification.back-button": "Revenir en arrière"
|
|
930
|
+
"verification.back-button": "Revenir en arrière",
|
|
931
|
+
"two-step.code.description": "Un code de vérification sera envoyé à votre email",
|
|
932
|
+
"two-step.code.title": "Code de courrier électronique",
|
|
933
|
+
"two-step.passkey.description": "Utilisez l'appareil pour la reconnaissance d'empreintes digitales ou de visage",
|
|
934
|
+
"two-step.passkey.title": "Clé de passe (recommandée)",
|
|
935
|
+
"two-step.password.description": "Entrez votre mot de passe associé à votre compte",
|
|
936
|
+
"two-step.password.title": "Mot de passe",
|
|
937
|
+
"two-step.webauthn.description": "Utilisez votre clé de sécurité pour vous authentifier",
|
|
938
|
+
"two-step.webauthn.title": "Clé de Sécurité"
|
|
898
939
|
};
|
|
899
940
|
|
|
900
941
|
var nl = {
|
|
@@ -1071,7 +1112,15 @@ var nl = {
|
|
|
1071
1112
|
"verification.registration-button": "Registreren",
|
|
1072
1113
|
"verification.registration-label": "Heb je nog geen account?",
|
|
1073
1114
|
"verification.title": "Verifieer je account",
|
|
1074
|
-
"verification.back-button": "Ga terug"
|
|
1115
|
+
"verification.back-button": "Ga terug",
|
|
1116
|
+
"two-step.code.description": "Een verificatiecode wordt naar uw e-mail gestuurd",
|
|
1117
|
+
"two-step.code.title": "E-mailcode",
|
|
1118
|
+
"two-step.passkey.description": "Gebruik de vingerafdruk- of gezichtsherkenning van uw apparaat",
|
|
1119
|
+
"two-step.passkey.title": "Toegangscode (aanbevolen)",
|
|
1120
|
+
"two-step.password.description": "Voer uw wachtwoord in dat is gekoppeld aan uw account",
|
|
1121
|
+
"two-step.password.title": "Wachtwoord",
|
|
1122
|
+
"two-step.webauthn.description": "Gebruik uw beveiligingssleutel om te verifiëren",
|
|
1123
|
+
"two-step.webauthn.title": "Beveiligingssleutel"
|
|
1075
1124
|
};
|
|
1076
1125
|
|
|
1077
1126
|
var pl = {
|
|
@@ -1248,7 +1297,15 @@ var pl = {
|
|
|
1248
1297
|
"verification.registration-button": "Zarejestruj się",
|
|
1249
1298
|
"verification.registration-label": "Nie posiadasz konta?",
|
|
1250
1299
|
"verification.title": "Zweryfikuj konto",
|
|
1251
|
-
"verification.back-button": "Cofnij"
|
|
1300
|
+
"verification.back-button": "Cofnij",
|
|
1301
|
+
"two-step.code.description": "Kod weryfikacyjny zostanie wysłany na Twój adres email.",
|
|
1302
|
+
"two-step.code.title": "Kod email",
|
|
1303
|
+
"two-step.passkey.description": "Użyj swojego urządzenia lub funkcji rozpoznawania twarzy na swoim urządzeniu.",
|
|
1304
|
+
"two-step.passkey.title": "Klucz dostępu (zalecany)",
|
|
1305
|
+
"two-step.password.description": "Wprowadź hasło powiązane z twoim kontem",
|
|
1306
|
+
"two-step.password.title": "Hasło",
|
|
1307
|
+
"two-step.webauthn.description": "Użyj swojego klucza bezpieczeństwa do uwierzytelnienia",
|
|
1308
|
+
"two-step.webauthn.title": "Klucz bezpieczeństwa"
|
|
1252
1309
|
};
|
|
1253
1310
|
|
|
1254
1311
|
var pt = {
|
|
@@ -1425,7 +1482,15 @@ var pt = {
|
|
|
1425
1482
|
"verification.registration-button": "Registar",
|
|
1426
1483
|
"verification.registration-label": "Não tem uma conta?",
|
|
1427
1484
|
"verification.title": "Verifique a sua conta",
|
|
1428
|
-
"verification.back-button": "Voltar"
|
|
1485
|
+
"verification.back-button": "Voltar",
|
|
1486
|
+
"two-step.code.description": "Um código de verificação será enviado para o seu email",
|
|
1487
|
+
"two-step.code.title": "Código de email",
|
|
1488
|
+
"two-step.passkey.description": "Use o seu dispositivo para reconhecimento de impressão digital ou facial.",
|
|
1489
|
+
"two-step.passkey.title": "Chave de acesso (recomendado)",
|
|
1490
|
+
"two-step.password.description": "Insira a sua senha associada à sua conta",
|
|
1491
|
+
"two-step.password.title": "Senha",
|
|
1492
|
+
"two-step.webauthn.description": "Use sua chave de segurança para autenticar",
|
|
1493
|
+
"two-step.webauthn.title": "Chave de Segurança"
|
|
1429
1494
|
};
|
|
1430
1495
|
|
|
1431
1496
|
var sv = {
|
|
@@ -1458,8 +1523,8 @@ var sv = {
|
|
|
1458
1523
|
"identities.messages.1010013": "Fortsätt",
|
|
1459
1524
|
"identities.messages.1010014": "Ett e-postmeddelande som innehåller en kod har skickats till den e-postadress du angett. Om du inte har fått ett mejl, kontrollera stavningen av adressen och försök logga in igen.",
|
|
1460
1525
|
"identities.messages.1010015": "Logga in med kod",
|
|
1461
|
-
"identities.messages.1040001": "
|
|
1462
|
-
"identities.messages.1040002": "
|
|
1526
|
+
"identities.messages.1040001": "Skapa konto",
|
|
1527
|
+
"identities.messages.1040002": "Registrera dig med {provider}",
|
|
1463
1528
|
"identities.messages.1040003": "Fortsätt",
|
|
1464
1529
|
"identities.messages.1040004": "Registrera med säkerhetsnyckel",
|
|
1465
1530
|
"identities.messages.1040005": "Ett e-postmeddelande som innehåller en kod har skickats till den e-postadress du angett. Om du inte har fått ett e-postmeddelande, kontrollera stavningen av adressen och försök igen med registreringen.",
|
|
@@ -1602,7 +1667,15 @@ var sv = {
|
|
|
1602
1667
|
"verification.registration-button": "Skapa konto",
|
|
1603
1668
|
"verification.registration-label": "Har du inget konto?",
|
|
1604
1669
|
"verification.title": "Verifiera ditt konto",
|
|
1605
|
-
"verification.back-button": "Tillbaka"
|
|
1670
|
+
"verification.back-button": "Tillbaka",
|
|
1671
|
+
"two-step.code.description": "En verifieringskod kommer att skickas till din e-post",
|
|
1672
|
+
"two-step.code.title": "E-postkod",
|
|
1673
|
+
"two-step.passkey.description": "Använd din enhets fingeravtryck eller ansiktsigenkänning",
|
|
1674
|
+
"two-step.passkey.title": "Passerkod (rekommenderad)",
|
|
1675
|
+
"two-step.password.description": "Ange ditt lösenord kopplat till ditt konto",
|
|
1676
|
+
"two-step.password.title": "Lösenord",
|
|
1677
|
+
"two-step.webauthn.description": "Använd din säkerhetsnyckel för att autentisera",
|
|
1678
|
+
"two-step.webauthn.title": "Säkerhetsnyckel"
|
|
1606
1679
|
};
|
|
1607
1680
|
|
|
1608
1681
|
declare const locales_de: typeof de;
|
|
@@ -1636,7 +1709,7 @@ type SupportedTranslations = {
|
|
|
1636
1709
|
defaultLocale?: string;
|
|
1637
1710
|
};
|
|
1638
1711
|
type IntlProviderProps<Type> = Type extends CustomTranslations ? CustomTranslations : SupportedTranslations;
|
|
1639
|
-
declare const IntlProvider: <T extends CustomTranslations | SupportedTranslations = SupportedTranslations>({ children, ...props }: PropsWithChildren<IntlProviderProps<T>>) => string | number | boolean | Iterable<
|
|
1712
|
+
declare const IntlProvider: <T extends CustomTranslations | SupportedTranslations = SupportedTranslations>({ children, ...props }: PropsWithChildren<IntlProviderProps<T>>) => string | number | boolean | Iterable<react.ReactNode> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
1640
1713
|
|
|
1641
1714
|
type ProviderProps<T> = {
|
|
1642
1715
|
components: OryFlowComponents;
|
|
@@ -1772,4 +1845,4 @@ declare function onSubmitVerification({ config, flow }: FlowContainer, { setFlow
|
|
|
1772
1845
|
*/
|
|
1773
1846
|
declare function onSubmitRegistration({ config, flow }: FlowContainer, { setFlowContainer, body, onRedirect, }: OnSubmitHandlerProps<UpdateRegistrationFlowBody>): Promise<void>;
|
|
1774
1847
|
|
|
1775
|
-
export { type CustomLanguageFormats, type CustomTranslations, type ErrorFlowContainer, type FlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, type HeadlessAuthMethodListItemProps, type HeadlessButtonProps, type HeadlessFormProps, type HeadlessGroupContainerProps, type HeadlessGroupProps, type HeadlessImageProps, type HeadlessInputProps, type HeadlessLabelProps, type HeadlessLinkButtonProps, HeadlessMessage, type HeadlessMessageProps, type HeadlessMessagesProps, type HeadlessSocialButtonContainerProps, type HeadlessSocialButtonProps, type HeadlessSocialButtonsProps, type HeadlessTextProps, type HorizontalDividerProps, IntlProvider, type IntlProviderProps, LanguageCodes, type Locale, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardComponents, OryCardContent, type OryCardContentProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardProps, OryCardValidationMessages, type OryClientConfiguration, OryComponentProvider, type OryFlowComponents, OryFlowProvider, type OryFlowProviderProps, OryForm, type OryFormComponents, OryFormGroupDivider, OryFormGroups, type OryFormProps, OryFormSocialButtons, OryProvider, type ProviderProps, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type SupportedTranslations, type TranslationFile, type VerificationFlowContainer, formElementId, formLabelId, formatMessage, isCustomTranslations, messageTestId, onSubmitLogin, onSubmitRecovery, onSubmitRegistration, onSubmitSettings, onSubmitVerification, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
|
1848
|
+
export { type CustomLanguageFormats, type CustomTranslations, type ErrorFlowContainer, type FlowContainer, type FlowContainerSetter, type FlowContextValue, type FormValues, type HeadlessAuthMethodListItemProps, type HeadlessButtonProps, type HeadlessCurrentIdentifierProps, type HeadlessFormProps, type HeadlessGroupContainerProps, type HeadlessGroupProps, type HeadlessImageProps, type HeadlessInputProps, type HeadlessLabelProps, type HeadlessLinkButtonProps, HeadlessMessage, type HeadlessMessageProps, type HeadlessMessagesProps, type HeadlessSocialButtonContainerProps, type HeadlessSocialButtonProps, type HeadlessSocialButtonsProps, type HeadlessTextProps, type HorizontalDividerProps, IntlProvider, type IntlProviderProps, LanguageCodes, type Locale, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardComponents, OryCardContent, type OryCardContentProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardProps, OryCardValidationMessages, type OryClientConfiguration, OryComponentProvider, type OryFlowComponents, OryFlowProvider, type OryFlowProviderProps, OryForm, type OryFormComponents, OryFormGroupDivider, OryFormGroups, type OryFormProps, OryFormSocialButtons, OryFormSocialButtonsForm, locales as OryLocales, OryProvider, OryTwoStepCard, type ProviderProps, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type SupportedTranslations, type TranslationFile, type VerificationFlowContainer, formElementId, formLabelId, formatMessage, isCustomTranslations, messageTestId, onSubmitLogin, onSubmitRecovery, onSubmitRegistration, onSubmitSettings, onSubmitVerification, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|