@ory/elements-react 1.0.0-rc.1 → 1.0.0-rc.2
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 +32 -0
- package/dist/index.d.mts +49 -19
- package/dist/index.d.ts +49 -19
- package/dist/index.js +48 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -27
- 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 +641 -551
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +580 -485
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -92,14 +92,12 @@ function DefaultCardContent({ children }) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// src/theme/default/components/card/footer.tsx
|
|
95
|
-
var
|
|
95
|
+
var import_client_fetch27 = require("@ory/client-fetch");
|
|
96
96
|
var import_elements_react3 = require("@ory/elements-react");
|
|
97
97
|
var import_react_intl10 = require("react-intl");
|
|
98
98
|
|
|
99
99
|
// src/theme/default/utils/url.ts
|
|
100
100
|
function restartFlowUrl(flow, fallback) {
|
|
101
|
-
if (flow.requested_aal === "aal2")
|
|
102
|
-
return appendRefresh(appendAal(fallback, "aal1"), true);
|
|
103
101
|
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
104
102
|
}
|
|
105
103
|
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
@@ -129,16 +127,6 @@ function appendReturnTo(url, returnTo) {
|
|
|
129
127
|
urlObj.searchParams.set("return_to", returnTo);
|
|
130
128
|
return urlObj.toString();
|
|
131
129
|
}
|
|
132
|
-
function appendAal(url, aal) {
|
|
133
|
-
const urlObj = new URL(url);
|
|
134
|
-
urlObj.searchParams.set("aal", aal);
|
|
135
|
-
return urlObj.toString();
|
|
136
|
-
}
|
|
137
|
-
function appendRefresh(url, refresh) {
|
|
138
|
-
const urlObj = new URL(url);
|
|
139
|
-
urlObj.searchParams.set("refresh", refresh ? "true" : "false");
|
|
140
|
-
return urlObj.toString();
|
|
141
|
-
}
|
|
142
130
|
|
|
143
131
|
// src/util/ui/index.ts
|
|
144
132
|
var import_client_fetch2 = require("@ory/client-fetch");
|
|
@@ -238,7 +226,7 @@ function findScreenSelectionButton(nodes) {
|
|
|
238
226
|
}
|
|
239
227
|
|
|
240
228
|
// src/components/card/two-step/state-select-method.tsx
|
|
241
|
-
var
|
|
229
|
+
var import_client_fetch26 = require("@ory/client-fetch");
|
|
242
230
|
|
|
243
231
|
// src/context/flow-context.tsx
|
|
244
232
|
var import_react4 = require("react");
|
|
@@ -280,6 +268,7 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
280
268
|
const config = new import_client_fetch6.Configuration({
|
|
281
269
|
...opts,
|
|
282
270
|
basePath: sdkUrl,
|
|
271
|
+
credentials: "include",
|
|
283
272
|
headers: {
|
|
284
273
|
Accept: "application/json",
|
|
285
274
|
...opts.headers
|
|
@@ -306,6 +295,9 @@ var import_client_fetch12 = require("@ory/client-fetch");
|
|
|
306
295
|
// src/components/form/form.tsx
|
|
307
296
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
308
297
|
|
|
298
|
+
// src/components/form/groups.tsx
|
|
299
|
+
var import_client_fetch17 = require("@ory/client-fetch");
|
|
300
|
+
|
|
309
301
|
// src/components/form/nodes/input.tsx
|
|
310
302
|
var import_client_fetch15 = require("@ory/client-fetch");
|
|
311
303
|
var import_react5 = require("react");
|
|
@@ -323,15 +315,15 @@ var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
|
323
315
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
324
316
|
|
|
325
317
|
// src/components/form/social.tsx
|
|
326
|
-
var
|
|
318
|
+
var import_client_fetch20 = require("@ory/client-fetch");
|
|
327
319
|
var import_react_hook_form5 = require("react-hook-form");
|
|
328
320
|
|
|
329
321
|
// src/components/form/form-provider.tsx
|
|
330
|
-
var
|
|
322
|
+
var import_client_fetch19 = require("@ory/client-fetch");
|
|
331
323
|
var import_react_hook_form4 = require("react-hook-form");
|
|
332
324
|
|
|
333
325
|
// src/components/form/form-resolver.ts
|
|
334
|
-
var
|
|
326
|
+
var import_client_fetch18 = require("@ory/client-fetch");
|
|
335
327
|
|
|
336
328
|
// src/components/form/form-provider.tsx
|
|
337
329
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
@@ -344,14 +336,14 @@ var import_react_hook_form6 = require("react-hook-form");
|
|
|
344
336
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
345
337
|
|
|
346
338
|
// src/components/generic/divider.tsx
|
|
347
|
-
var
|
|
339
|
+
var import_client_fetch21 = require("@ory/client-fetch");
|
|
348
340
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
349
341
|
|
|
350
342
|
// src/components/generic/page-header.tsx
|
|
351
343
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
352
344
|
|
|
353
345
|
// src/components/settings/settings-card.tsx
|
|
354
|
-
var
|
|
346
|
+
var import_client_fetch22 = require("@ory/client-fetch");
|
|
355
347
|
var import_react_intl7 = require("react-intl");
|
|
356
348
|
|
|
357
349
|
// src/components/settings/oidc-settings.tsx
|
|
@@ -672,9 +664,11 @@ var en_default = {
|
|
|
672
664
|
"card.header.parts.oidc": "a social provider",
|
|
673
665
|
"card.header.parts.password.registration": "your {identifierLabel} and a password",
|
|
674
666
|
"card.header.parts.password.login": "your {identifierLabel} and password",
|
|
675
|
-
"card.header.parts.code": "a code sent to
|
|
667
|
+
"card.header.parts.code": "a code sent to you",
|
|
676
668
|
"card.header.parts.passkey": "a Passkey",
|
|
677
669
|
"card.header.parts.webauthn": "a security key",
|
|
670
|
+
"card.header.parts.totp": "your authenticator app",
|
|
671
|
+
"card.header.parts.lookup_secret": "a backup recovery code",
|
|
678
672
|
"card.header.parts.identifier-first": "your {identifierLabel}",
|
|
679
673
|
"card.header.description.login": "Sign in with {identifierLabel}",
|
|
680
674
|
"card.header.description.registration": "Sign up with {identifierLabel}",
|
|
@@ -922,13 +916,15 @@ var de_default = {
|
|
|
922
916
|
"identities.messages.4010009": "Die Authentifizierungsmethode stimmt nicht mit der vorherigen Authentifizierungsmethode \xFCberein. Bitte versuchen Sie es erneut.",
|
|
923
917
|
"identities.messages.4010010": "Die eingegebene Adresse stimmt nicht mit der Adresse \xFCberein, die Sie bei der Registrierung angegeben haben. Bitte versuchen Sie es erneut.",
|
|
924
918
|
"input.placeholder": "{placeholder} eingeben",
|
|
925
|
-
"card.header.parts.code": "
|
|
919
|
+
"card.header.parts.code": "ein an Sie gesendeter Code",
|
|
926
920
|
"card.header.parts.identifier-first": "Ihr {identifierLabel}",
|
|
927
921
|
"card.header.parts.oidc": "ein sozialer Anbieter",
|
|
928
922
|
"card.header.parts.passkey": "ein Passkey",
|
|
929
923
|
"card.header.parts.password.login": "Ihrer {identifierLabel} und Ihrem Passwort",
|
|
930
924
|
"card.header.parts.password.registration": "Ihrer {identifierLabel} und einem Passwort",
|
|
931
925
|
"card.header.parts.webauthn": "ein Sicherheitsschl\xFCssel",
|
|
926
|
+
"card.header.parts.totp": "deine Authentifikator-App",
|
|
927
|
+
"card.header.parts.lookup_secret": "ein Backup-Wiederherstellungscode",
|
|
932
928
|
"recovery.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um einen einmaligen Zugangscode zu erhalten",
|
|
933
929
|
"verification.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um es zu best\xE4tigen",
|
|
934
930
|
"card.header.description.login": "Melden Sie sich mit {identifierLabel} an",
|
|
@@ -1267,6 +1263,8 @@ var es_default = {
|
|
|
1267
1263
|
"card.header.parts.code": "un c\xF3digo enviado a tu correo electr\xF3nico",
|
|
1268
1264
|
"card.header.parts.passkey": "una clave de acceso",
|
|
1269
1265
|
"card.header.parts.webauthn": "una clave de seguridad",
|
|
1266
|
+
"card.header.parts.totp": "su aplicaci\xF3n de autenticaci\xF3n",
|
|
1267
|
+
"card.header.parts.lookup_secret": "un c\xF3digo de recuperaci\xF3n de copia de seguridad",
|
|
1270
1268
|
"card.header.parts.identifier-first": "tu {identifierLabel}",
|
|
1271
1269
|
"card.header.description.login": "Iniciar sesi\xF3n con {identifierLabel}",
|
|
1272
1270
|
"card.header.description.registration": "Registrarse con {identifierLabel}",
|
|
@@ -1544,10 +1542,12 @@ var fr_default = {
|
|
|
1544
1542
|
"card.header.parts.oidc": "un fournisseur de r\xE9seaux sociaux",
|
|
1545
1543
|
"card.header.parts.password.registration": "votre {identifierLabel} et un mot de passe",
|
|
1546
1544
|
"card.header.parts.password.login": "votre {identifierLabel} et votre mot de passe",
|
|
1547
|
-
"card.header.parts.code": "un code envoy\xE9 \xE0 votre adresse e-mail",
|
|
1548
1545
|
"card.header.parts.passkey": "une cl\xE9 d'acc\xE8s",
|
|
1549
1546
|
"card.header.parts.webauthn": "une cl\xE9 de s\xE9curit\xE9",
|
|
1550
1547
|
"card.header.parts.identifier-first": "votre {identifierLabel}",
|
|
1548
|
+
"card.header.parts.code": "un code qui vous a \xE9t\xE9 envoy\xE9",
|
|
1549
|
+
"card.header.parts.totp": "votre application d'authentification",
|
|
1550
|
+
"card.header.parts.lookup_secret": "un code de r\xE9cup\xE9ration de secours",
|
|
1551
1551
|
"card.header.description.login": "Se connecter avec {identifierLabel}",
|
|
1552
1552
|
"card.header.description.registration": "S'inscrire avec {identifierLabel}",
|
|
1553
1553
|
"misc.or": "ou",
|
|
@@ -1790,7 +1790,9 @@ var nl_default = {
|
|
|
1790
1790
|
"input.placeholder": "",
|
|
1791
1791
|
"card.header.description.login": "",
|
|
1792
1792
|
"card.header.description.registration": "",
|
|
1793
|
-
"card.header.parts.code": "",
|
|
1793
|
+
"card.header.parts.code": "een code die naar je is verzonden",
|
|
1794
|
+
"card.header.parts.totp": "je authenticator-app",
|
|
1795
|
+
"card.header.parts.lookup_secret": "een backup herstelcode",
|
|
1794
1796
|
"card.header.parts.identifier-first": "",
|
|
1795
1797
|
"card.header.parts.oidc": "",
|
|
1796
1798
|
"card.header.parts.passkey": "",
|
|
@@ -2075,13 +2077,15 @@ var pl_default = {
|
|
|
2075
2077
|
"input.placeholder": "",
|
|
2076
2078
|
"card.header.description.login": "",
|
|
2077
2079
|
"card.header.description.registration": "",
|
|
2078
|
-
"card.header.parts.code": "",
|
|
2079
2080
|
"card.header.parts.identifier-first": "",
|
|
2080
2081
|
"card.header.parts.oidc": "",
|
|
2081
2082
|
"card.header.parts.passkey": "",
|
|
2082
2083
|
"card.header.parts.password.login": "",
|
|
2083
2084
|
"card.header.parts.password.registration": "",
|
|
2084
2085
|
"card.header.parts.webauthn": "",
|
|
2086
|
+
"card.header.parts.code": "kod wys\u0142any do Ciebie",
|
|
2087
|
+
"card.header.parts.totp": "Twoja aplikacja uwierzytelniaj\u0105ca",
|
|
2088
|
+
"card.header.parts.lookup_secret": "kod odzyskiwania kopii zapasowej",
|
|
2085
2089
|
"forms.label.forgot-password": "",
|
|
2086
2090
|
"login.subtitle": "",
|
|
2087
2091
|
"login.subtitle-refresh": "",
|
|
@@ -2360,7 +2364,9 @@ var pt_default = {
|
|
|
2360
2364
|
"input.placeholder": "",
|
|
2361
2365
|
"card.header.description.login": "",
|
|
2362
2366
|
"card.header.description.registration": "",
|
|
2363
|
-
"card.header.parts.code": "",
|
|
2367
|
+
"card.header.parts.code": "um c\xF3digo enviado para voc\xEA",
|
|
2368
|
+
"card.header.parts.totp": "seu aplicativo autenticador",
|
|
2369
|
+
"card.header.parts.lookup_secret": "um c\xF3digo de recupera\xE7\xE3o de backup",
|
|
2364
2370
|
"card.header.parts.identifier-first": "",
|
|
2365
2371
|
"card.header.parts.oidc": "",
|
|
2366
2372
|
"card.header.parts.passkey": "",
|
|
@@ -2645,7 +2651,9 @@ var sv_default = {
|
|
|
2645
2651
|
"input.placeholder": "Ange din {placeholder}",
|
|
2646
2652
|
"card.header.description.login": "Logga in med {identifierLabel}",
|
|
2647
2653
|
"card.header.description.registration": "Registrera dig med {identifierLabel}",
|
|
2648
|
-
"card.header.parts.code": "en kod skickad till
|
|
2654
|
+
"card.header.parts.code": "en kod skickad till dig",
|
|
2655
|
+
"card.header.parts.totp": "din autentiseringsapp",
|
|
2656
|
+
"card.header.parts.lookup_secret": "en s\xE4kerhetskopieringskod",
|
|
2649
2657
|
"card.header.parts.identifier-first": "din {identifierLabel}",
|
|
2650
2658
|
"card.header.parts.oidc": "en social leverant\xF6r",
|
|
2651
2659
|
"card.header.parts.passkey": "en Passkey",
|
|
@@ -2775,11 +2783,11 @@ var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
|
2775
2783
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2776
2784
|
|
|
2777
2785
|
// src/components/card/two-step/state-method-active.tsx
|
|
2778
|
-
var
|
|
2786
|
+
var import_client_fetch23 = require("@ory/client-fetch");
|
|
2779
2787
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2780
2788
|
|
|
2781
2789
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2782
|
-
var
|
|
2790
|
+
var import_client_fetch24 = require("@ory/client-fetch");
|
|
2783
2791
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2784
2792
|
|
|
2785
2793
|
// src/components/card/card-two-step.tsx
|
|
@@ -2787,6 +2795,7 @@ var import_elements_react = require("@ory/elements-react");
|
|
|
2787
2795
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2788
2796
|
|
|
2789
2797
|
// src/components/card/card-consent.tsx
|
|
2798
|
+
var import_client_fetch25 = require("@ory/client-fetch");
|
|
2790
2799
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2791
2800
|
|
|
2792
2801
|
// src/components/card/two-step/state-select-method.tsx
|
|
@@ -2801,36 +2810,61 @@ var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
|
2801
2810
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2802
2811
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2803
2812
|
return Object.fromEntries(
|
|
2804
|
-
Object.values(
|
|
2813
|
+
Object.values(import_client_fetch26.UiNodeGroupEnum).filter((group) => {
|
|
2805
2814
|
var _a;
|
|
2806
2815
|
return (_a = visibleGroups[group]) == null ? void 0 : _a.length;
|
|
2807
2816
|
}).filter(
|
|
2808
2817
|
(group) => ![
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2818
|
+
import_client_fetch26.UiNodeGroupEnum.Oidc,
|
|
2819
|
+
import_client_fetch26.UiNodeGroupEnum.Saml,
|
|
2820
|
+
import_client_fetch26.UiNodeGroupEnum.Default,
|
|
2821
|
+
import_client_fetch26.UiNodeGroupEnum.IdentifierFirst,
|
|
2822
|
+
import_client_fetch26.UiNodeGroupEnum.Profile,
|
|
2823
|
+
import_client_fetch26.UiNodeGroupEnum.Captcha
|
|
2815
2824
|
].includes(group)
|
|
2816
2825
|
).map((g) => [g, {}])
|
|
2817
2826
|
);
|
|
2818
2827
|
}
|
|
2819
2828
|
|
|
2829
|
+
// src/theme/default/utils/logout.ts
|
|
2830
|
+
var import_react6 = require("react");
|
|
2831
|
+
function useClientLogout(config) {
|
|
2832
|
+
const [logoutFlow, setLogoutFlow] = (0, import_react6.useState)();
|
|
2833
|
+
const [isLoading, setIsLoading] = (0, import_react6.useState)(true);
|
|
2834
|
+
const fetchLogoutFlow = (0, import_react6.useCallback)(async () => {
|
|
2835
|
+
try {
|
|
2836
|
+
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow().catch((err) => {
|
|
2837
|
+
var _a;
|
|
2838
|
+
if (((_a = err.response) == null ? void 0 : _a.status) !== 401) {
|
|
2839
|
+
throw err;
|
|
2840
|
+
}
|
|
2841
|
+
return void 0;
|
|
2842
|
+
});
|
|
2843
|
+
setLogoutFlow(flow);
|
|
2844
|
+
} finally {
|
|
2845
|
+
setIsLoading(false);
|
|
2846
|
+
}
|
|
2847
|
+
}, [config.sdk.url]);
|
|
2848
|
+
(0, import_react6.useEffect)(() => {
|
|
2849
|
+
void fetchLogoutFlow();
|
|
2850
|
+
}, [fetchLogoutFlow]);
|
|
2851
|
+
return { logoutFlow, didLoad: !isLoading };
|
|
2852
|
+
}
|
|
2853
|
+
|
|
2820
2854
|
// src/theme/default/components/card/footer.tsx
|
|
2821
2855
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2822
2856
|
function DefaultCardFooter() {
|
|
2823
2857
|
const oryFlow = (0, import_elements_react3.useOryFlow)();
|
|
2824
2858
|
switch (oryFlow.flowType) {
|
|
2825
|
-
case
|
|
2859
|
+
case import_client_fetch27.FlowType.Login:
|
|
2826
2860
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoginCardFooter, {});
|
|
2827
|
-
case
|
|
2861
|
+
case import_client_fetch27.FlowType.Registration:
|
|
2828
2862
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RegistrationCardFooter, {});
|
|
2829
|
-
case
|
|
2863
|
+
case import_client_fetch27.FlowType.Recovery:
|
|
2830
2864
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RecoveryCardFooter, {});
|
|
2831
|
-
case
|
|
2865
|
+
case import_client_fetch27.FlowType.Verification:
|
|
2832
2866
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerificationCardFooter, {});
|
|
2833
|
-
case
|
|
2867
|
+
case import_client_fetch27.FlowType.OAuth2Consent:
|
|
2834
2868
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2835
2869
|
default:
|
|
2836
2870
|
return null;
|
|
@@ -2838,11 +2872,44 @@ function DefaultCardFooter() {
|
|
|
2838
2872
|
}
|
|
2839
2873
|
function LoginCardFooter() {
|
|
2840
2874
|
const { config, formState, flow, flowType } = (0, import_elements_react3.useOryFlow)();
|
|
2875
|
+
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
2841
2876
|
const intl = (0, import_react_intl10.useIntl)();
|
|
2842
|
-
|
|
2843
|
-
if (flowType === import_client_fetch25.FlowType.Login && flow.refresh) {
|
|
2877
|
+
if (flowType !== import_client_fetch27.FlowType.Login) {
|
|
2844
2878
|
return null;
|
|
2845
2879
|
}
|
|
2880
|
+
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
2881
|
+
let returnTo = config.project.default_redirect_url;
|
|
2882
|
+
if (flow.return_to) {
|
|
2883
|
+
returnTo = flow.return_to;
|
|
2884
|
+
}
|
|
2885
|
+
if (!returnTo) {
|
|
2886
|
+
returnTo = restartFlowUrl(
|
|
2887
|
+
flow,
|
|
2888
|
+
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2889
|
+
);
|
|
2890
|
+
}
|
|
2891
|
+
if (flow.refresh || flow.requested_aal === "aal2") {
|
|
2892
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2893
|
+
intl.formatMessage({
|
|
2894
|
+
id: "login.2fa.go-back"
|
|
2895
|
+
}),
|
|
2896
|
+
" ",
|
|
2897
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2898
|
+
"a",
|
|
2899
|
+
{
|
|
2900
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2901
|
+
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
2902
|
+
"data-testid": (
|
|
2903
|
+
// Only add the test-id when the logout link has loaded.
|
|
2904
|
+
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
2905
|
+
),
|
|
2906
|
+
children: intl.formatMessage({
|
|
2907
|
+
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
2908
|
+
})
|
|
2909
|
+
}
|
|
2910
|
+
)
|
|
2911
|
+
] });
|
|
2912
|
+
}
|
|
2846
2913
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
|
|
2847
2914
|
formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2848
2915
|
intl.formatMessage({
|
|
@@ -2878,36 +2945,13 @@ function LoginCardFooter() {
|
|
|
2878
2945
|
"a",
|
|
2879
2946
|
{
|
|
2880
2947
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2881
|
-
href:
|
|
2882
|
-
|
|
2883
|
-
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2884
|
-
),
|
|
2885
|
-
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
2948
|
+
href: returnTo,
|
|
2949
|
+
"data-testid": "ory/screen/login/action/cancel",
|
|
2886
2950
|
children: intl.formatMessage({
|
|
2887
2951
|
id: "login.2fa.go-back.link"
|
|
2888
2952
|
})
|
|
2889
2953
|
}
|
|
2890
|
-
) })
|
|
2891
|
-
flowType === import_client_fetch25.FlowType.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2892
|
-
intl.formatMessage({
|
|
2893
|
-
id: "login.2fa.go-back"
|
|
2894
|
-
}),
|
|
2895
|
-
" ",
|
|
2896
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2897
|
-
"a",
|
|
2898
|
-
{
|
|
2899
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2900
|
-
href: restartFlowUrl(
|
|
2901
|
-
flow,
|
|
2902
|
-
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2903
|
-
),
|
|
2904
|
-
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
2905
|
-
children: intl.formatMessage({
|
|
2906
|
-
id: "login.2fa.go-back.link"
|
|
2907
|
-
})
|
|
2908
|
-
}
|
|
2909
|
-
)
|
|
2910
|
-
] })
|
|
2954
|
+
) })
|
|
2911
2955
|
] });
|
|
2912
2956
|
}
|
|
2913
2957
|
function RegistrationCardFooter() {
|
|
@@ -3011,7 +3055,7 @@ function ConsentCardFooter({ flow }) {
|
|
|
3011
3055
|
var import_elements_react5 = require("@ory/elements-react");
|
|
3012
3056
|
|
|
3013
3057
|
// src/theme/default/utils/constructCardHeader.ts
|
|
3014
|
-
var
|
|
3058
|
+
var import_client_fetch28 = require("@ory/client-fetch");
|
|
3015
3059
|
var import_react_intl11 = require("react-intl");
|
|
3016
3060
|
function joinWithCommaOr(list, orText = "or") {
|
|
3017
3061
|
if (list.length === 0) {
|
|
@@ -3028,7 +3072,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3028
3072
|
const nodes = container.nodes;
|
|
3029
3073
|
const intl = (0, import_react_intl11.useIntl)();
|
|
3030
3074
|
switch (opts.flowType) {
|
|
3031
|
-
case
|
|
3075
|
+
case import_client_fetch28.FlowType.Recovery:
|
|
3032
3076
|
if (nodes.find(
|
|
3033
3077
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3034
3078
|
)) {
|
|
@@ -3038,7 +3082,8 @@ function useCardHeaderText(container, opts) {
|
|
|
3038
3082
|
}),
|
|
3039
3083
|
description: intl.formatMessage({
|
|
3040
3084
|
id: "identities.messages.1060003"
|
|
3041
|
-
})
|
|
3085
|
+
}),
|
|
3086
|
+
messageId: "1060003"
|
|
3042
3087
|
};
|
|
3043
3088
|
}
|
|
3044
3089
|
return {
|
|
@@ -3049,7 +3094,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3049
3094
|
id: "recovery.subtitle"
|
|
3050
3095
|
})
|
|
3051
3096
|
};
|
|
3052
|
-
case
|
|
3097
|
+
case import_client_fetch28.FlowType.Settings:
|
|
3053
3098
|
return {
|
|
3054
3099
|
title: intl.formatMessage({
|
|
3055
3100
|
id: "settings.title"
|
|
@@ -3058,7 +3103,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3058
3103
|
id: "settings.subtitle"
|
|
3059
3104
|
})
|
|
3060
3105
|
};
|
|
3061
|
-
case
|
|
3106
|
+
case import_client_fetch28.FlowType.Verification:
|
|
3062
3107
|
if (nodes.find(
|
|
3063
3108
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3064
3109
|
)) {
|
|
@@ -3068,7 +3113,8 @@ function useCardHeaderText(container, opts) {
|
|
|
3068
3113
|
}),
|
|
3069
3114
|
description: intl.formatMessage({
|
|
3070
3115
|
id: "identities.messages.1080003"
|
|
3071
|
-
})
|
|
3116
|
+
}),
|
|
3117
|
+
messageId: "1080003"
|
|
3072
3118
|
};
|
|
3073
3119
|
}
|
|
3074
3120
|
return {
|
|
@@ -3079,7 +3125,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3079
3125
|
id: "verification.subtitle"
|
|
3080
3126
|
})
|
|
3081
3127
|
};
|
|
3082
|
-
case
|
|
3128
|
+
case import_client_fetch28.FlowType.Login: {
|
|
3083
3129
|
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
3084
3130
|
(m) => m.id === 1010016
|
|
3085
3131
|
);
|
|
@@ -3093,7 +3139,8 @@ function useCardHeaderText(container, opts) {
|
|
|
3093
3139
|
id: "identities.messages.1010016"
|
|
3094
3140
|
},
|
|
3095
3141
|
accountLinkingMessage.context
|
|
3096
|
-
)
|
|
3142
|
+
),
|
|
3143
|
+
messageId: "1010016"
|
|
3097
3144
|
};
|
|
3098
3145
|
}
|
|
3099
3146
|
}
|
|
@@ -3101,7 +3148,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3101
3148
|
const parts = [];
|
|
3102
3149
|
if (nodes.find((node) => node.group === "password")) {
|
|
3103
3150
|
switch (opts.flowType) {
|
|
3104
|
-
case
|
|
3151
|
+
case import_client_fetch28.FlowType.Registration:
|
|
3105
3152
|
parts.push(
|
|
3106
3153
|
intl.formatMessage(
|
|
3107
3154
|
{ id: "card.header.parts.password.registration" },
|
|
@@ -3130,6 +3177,12 @@ function useCardHeaderText(container, opts) {
|
|
|
3130
3177
|
if (nodes.find((node) => node.group === "code")) {
|
|
3131
3178
|
parts.push(intl.formatMessage({ id: "card.header.parts.code" }));
|
|
3132
3179
|
}
|
|
3180
|
+
if (nodes.find((node) => node.group === "totp")) {
|
|
3181
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.totp" }));
|
|
3182
|
+
}
|
|
3183
|
+
if (nodes.find((node) => node.group === "lookup_secret")) {
|
|
3184
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.lookup_secret" }));
|
|
3185
|
+
}
|
|
3133
3186
|
if (nodes.find((node) => node.group === "passkey")) {
|
|
3134
3187
|
parts.push(intl.formatMessage({ id: "card.header.parts.passkey" }));
|
|
3135
3188
|
}
|
|
@@ -3138,7 +3191,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3138
3191
|
}
|
|
3139
3192
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
3140
3193
|
const identifier = nodes.find(
|
|
3141
|
-
(node) => (0,
|
|
3194
|
+
(node) => (0, import_client_fetch28.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
3142
3195
|
);
|
|
3143
3196
|
if (identifier) {
|
|
3144
3197
|
parts.push(
|
|
@@ -3154,7 +3207,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3154
3207
|
}
|
|
3155
3208
|
}
|
|
3156
3209
|
switch (opts.flowType) {
|
|
3157
|
-
case
|
|
3210
|
+
case import_client_fetch28.FlowType.Login:
|
|
3158
3211
|
if (opts.flow.refresh) {
|
|
3159
3212
|
return {
|
|
3160
3213
|
title: intl.formatMessage({
|
|
@@ -3195,7 +3248,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3195
3248
|
}
|
|
3196
3249
|
) : ""
|
|
3197
3250
|
};
|
|
3198
|
-
case
|
|
3251
|
+
case import_client_fetch28.FlowType.Registration:
|
|
3199
3252
|
return {
|
|
3200
3253
|
title: intl.formatMessage({
|
|
3201
3254
|
id: "registration.title"
|
|
@@ -3212,7 +3265,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3212
3265
|
}
|
|
3213
3266
|
) : ""
|
|
3214
3267
|
};
|
|
3215
|
-
case
|
|
3268
|
+
case import_client_fetch28.FlowType.OAuth2Consent:
|
|
3216
3269
|
return {
|
|
3217
3270
|
title: intl.formatMessage(
|
|
3218
3271
|
{
|
|
@@ -3239,7 +3292,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3239
3292
|
}
|
|
3240
3293
|
|
|
3241
3294
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3242
|
-
var
|
|
3295
|
+
var import_client_fetch29 = require("@ory/client-fetch");
|
|
3243
3296
|
var import_elements_react4 = require("@ory/elements-react");
|
|
3244
3297
|
|
|
3245
3298
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
@@ -3270,7 +3323,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3270
3323
|
if (formState.current === "provide_identifier") {
|
|
3271
3324
|
return null;
|
|
3272
3325
|
}
|
|
3273
|
-
if (flowType ===
|
|
3326
|
+
if (flowType === import_client_fetch29.FlowType.Login && flow.requested_aal === "aal2") {
|
|
3274
3327
|
return null;
|
|
3275
3328
|
}
|
|
3276
3329
|
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
@@ -3290,7 +3343,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3290
3343
|
if (screenSelectionNode) {
|
|
3291
3344
|
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
3292
3345
|
flow.ui.nodes.filter((n) => {
|
|
3293
|
-
if ((0,
|
|
3346
|
+
if ((0, import_client_fetch29.isUiNodeInputAttributes)(n.attributes)) {
|
|
3294
3347
|
return n.attributes.type === "hidden";
|
|
3295
3348
|
}
|
|
3296
3349
|
return false;
|
|
@@ -3364,18 +3417,18 @@ function getBackButtonNodeAttributes(flowType, nodes) {
|
|
|
3364
3417
|
var _a, _b;
|
|
3365
3418
|
let nodeBackButtonAttributes;
|
|
3366
3419
|
switch (flowType) {
|
|
3367
|
-
case
|
|
3420
|
+
case import_client_fetch29.FlowType.Login:
|
|
3368
3421
|
nodeBackButtonAttributes = (_a = nodes.find(
|
|
3369
|
-
(node) => (0,
|
|
3422
|
+
(node) => (0, import_client_fetch29.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
3370
3423
|
)) == null ? void 0 : _a.attributes;
|
|
3371
3424
|
break;
|
|
3372
|
-
case
|
|
3425
|
+
case import_client_fetch29.FlowType.Registration:
|
|
3373
3426
|
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
3374
3427
|
break;
|
|
3375
|
-
case
|
|
3376
|
-
case
|
|
3428
|
+
case import_client_fetch29.FlowType.Recovery:
|
|
3429
|
+
case import_client_fetch29.FlowType.Verification:
|
|
3377
3430
|
nodeBackButtonAttributes = (_b = nodes.find(
|
|
3378
|
-
(n) => (0,
|
|
3431
|
+
(n) => (0, import_client_fetch29.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
|
|
3379
3432
|
)) == null ? void 0 : _b.attributes;
|
|
3380
3433
|
break;
|
|
3381
3434
|
}
|
|
@@ -3392,38 +3445,64 @@ var backButtonCandiates = [
|
|
|
3392
3445
|
function guessRegistrationBackButton(uiNodes) {
|
|
3393
3446
|
var _a;
|
|
3394
3447
|
return (_a = uiNodes.find(
|
|
3395
|
-
(node) => (0,
|
|
3448
|
+
(node) => (0, import_client_fetch29.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
3396
3449
|
)) == null ? void 0 : _a.attributes;
|
|
3397
3450
|
}
|
|
3398
3451
|
|
|
3399
3452
|
// src/theme/default/components/card/header.tsx
|
|
3400
3453
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3401
|
-
function InnerCardHeader({
|
|
3454
|
+
function InnerCardHeader({
|
|
3455
|
+
title,
|
|
3456
|
+
text,
|
|
3457
|
+
messageId
|
|
3458
|
+
}) {
|
|
3402
3459
|
const { Card } = (0, import_elements_react5.useComponents)();
|
|
3403
3460
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
3404
3461
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Card.Logo, {}),
|
|
3405
3462
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
3406
3463
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
3407
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3464
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3465
|
+
"p",
|
|
3466
|
+
{
|
|
3467
|
+
className: "leading-normal text-interface-foreground-default-secondary",
|
|
3468
|
+
...messageId ? (0, import_elements_react5.messageTestId)({ id: messageId }) : {},
|
|
3469
|
+
children: text
|
|
3470
|
+
}
|
|
3471
|
+
),
|
|
3408
3472
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DefaultCurrentIdentifierButton, {})
|
|
3409
3473
|
] })
|
|
3410
3474
|
] });
|
|
3411
3475
|
}
|
|
3412
3476
|
function DefaultCardHeader() {
|
|
3413
3477
|
const context = (0, import_elements_react5.useOryFlow)();
|
|
3414
|
-
const { title, description } = useCardHeaderText(
|
|
3415
|
-
|
|
3478
|
+
const { title, description, messageId } = useCardHeaderText(
|
|
3479
|
+
context.flow.ui,
|
|
3480
|
+
context
|
|
3481
|
+
);
|
|
3482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(InnerCardHeader, { title, text: description, messageId });
|
|
3416
3483
|
}
|
|
3417
3484
|
|
|
3418
3485
|
// src/theme/default/components/card/logo.tsx
|
|
3419
3486
|
var import_elements_react6 = require("@ory/elements-react");
|
|
3420
3487
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3421
3488
|
function DefaultCardLogo() {
|
|
3489
|
+
var _a;
|
|
3422
3490
|
const flow = (0, import_elements_react6.useOryFlow)();
|
|
3491
|
+
if (flow.config.project.logo_light_url) {
|
|
3492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3493
|
+
"img",
|
|
3494
|
+
{
|
|
3495
|
+
src: flow.config.project.logo_light_url,
|
|
3496
|
+
width: 100,
|
|
3497
|
+
height: 36,
|
|
3498
|
+
alt: "Logo"
|
|
3499
|
+
}
|
|
3500
|
+
);
|
|
3501
|
+
}
|
|
3423
3502
|
if (flow.config.logoUrl) {
|
|
3424
3503
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
3425
3504
|
}
|
|
3426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: flow.config.name });
|
|
3505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = flow.config.project.name) != null ? _a : flow.config.name });
|
|
3427
3506
|
}
|
|
3428
3507
|
|
|
3429
3508
|
// src/theme/default/components/card/layout.tsx
|
|
@@ -3451,11 +3530,11 @@ function cn(...inputs) {
|
|
|
3451
3530
|
// src/theme/default/components/form/index.tsx
|
|
3452
3531
|
var import_react_intl13 = require("react-intl");
|
|
3453
3532
|
var import_elements_react8 = require("@ory/elements-react");
|
|
3454
|
-
var
|
|
3533
|
+
var import_client_fetch31 = require("@ory/client-fetch");
|
|
3455
3534
|
|
|
3456
3535
|
// src/theme/default/components/form/social.tsx
|
|
3457
3536
|
var import_elements_react7 = require("@ory/elements-react");
|
|
3458
|
-
var
|
|
3537
|
+
var import_react7 = require("react");
|
|
3459
3538
|
var import_react_hook_form14 = require("react-hook-form");
|
|
3460
3539
|
var import_react_intl12 = require("react-intl");
|
|
3461
3540
|
var import_usehooks_ts = require("usehooks-ts");
|
|
@@ -3506,126 +3585,113 @@ var SvgFacebook = (props) => {
|
|
|
3506
3585
|
};
|
|
3507
3586
|
var facebook_default = SvgFacebook;
|
|
3508
3587
|
|
|
3509
|
-
// src/theme/default/provider-logos/
|
|
3588
|
+
// src/theme/default/provider-logos/github.svg
|
|
3510
3589
|
var React8 = __toESM(require("react"));
|
|
3511
3590
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3512
|
-
var SvgGeneric = (props) => {
|
|
3513
|
-
var _a, _b;
|
|
3514
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, className: "generic_svg__icon generic_svg__icon-tabler generic_svg__icon-tabler-brand-oauth", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3515
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
3516
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
3517
|
-
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M12.556 6c.65 0 1.235.373 1.508.947l2.839 7.848a1.646 1.646 0 0 1-1.01 2.108 1.673 1.673 0 0 1-2.068-.851L13.365 15h-2.73l-.398.905A1.67 1.67 0 0 1 8.26 16.95l-.153-.047a1.647 1.647 0 0 1-1.056-1.956l2.824-7.852a1.66 1.66 0 0 1 1.409-1.087z" })
|
|
3518
|
-
] });
|
|
3519
|
-
};
|
|
3520
|
-
var generic_default = SvgGeneric;
|
|
3521
|
-
|
|
3522
|
-
// src/theme/default/provider-logos/github.svg
|
|
3523
|
-
var React9 = __toESM(require("react"));
|
|
3524
|
-
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3525
3591
|
var SvgGithub = (props) => {
|
|
3526
3592
|
var _a, _b;
|
|
3527
|
-
return /* @__PURE__ */ (0,
|
|
3593
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
3528
3594
|
};
|
|
3529
3595
|
var github_default = SvgGithub;
|
|
3530
3596
|
|
|
3531
3597
|
// src/theme/default/provider-logos/gitlab.svg
|
|
3532
|
-
var
|
|
3533
|
-
var
|
|
3598
|
+
var React9 = __toESM(require("react"));
|
|
3599
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3534
3600
|
var SvgGitlab = (props) => {
|
|
3535
3601
|
var _a, _b;
|
|
3536
|
-
return /* @__PURE__ */ (0,
|
|
3537
|
-
/* @__PURE__ */ (0,
|
|
3538
|
-
/* @__PURE__ */ (0,
|
|
3539
|
-
/* @__PURE__ */ (0,
|
|
3540
|
-
/* @__PURE__ */ (0,
|
|
3602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3603
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
3604
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
3605
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
3606
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
3541
3607
|
] });
|
|
3542
3608
|
};
|
|
3543
3609
|
var gitlab_default = SvgGitlab;
|
|
3544
3610
|
|
|
3545
3611
|
// src/theme/default/provider-logos/google.svg
|
|
3546
|
-
var
|
|
3547
|
-
var
|
|
3612
|
+
var React10 = __toESM(require("react"));
|
|
3613
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3548
3614
|
var SvgGoogle = (props) => {
|
|
3549
3615
|
var _a, _b;
|
|
3550
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
-
/* @__PURE__ */ (0,
|
|
3552
|
-
/* @__PURE__ */ (0,
|
|
3553
|
-
/* @__PURE__ */ (0,
|
|
3554
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3617
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
|
|
3619
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
|
|
3620
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
|
|
3555
3621
|
] });
|
|
3556
3622
|
};
|
|
3557
3623
|
var google_default = SvgGoogle;
|
|
3558
3624
|
|
|
3559
3625
|
// src/theme/default/provider-logos/linkedin.svg
|
|
3560
|
-
var
|
|
3561
|
-
var
|
|
3626
|
+
var React11 = __toESM(require("react"));
|
|
3627
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3562
3628
|
var SvgLinkedin = (props) => {
|
|
3563
3629
|
var _a, _b;
|
|
3564
|
-
return /* @__PURE__ */ (0,
|
|
3565
|
-
/* @__PURE__ */ (0,
|
|
3566
|
-
/* @__PURE__ */ (0,
|
|
3630
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3631
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
3632
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
3567
3633
|
] });
|
|
3568
3634
|
};
|
|
3569
3635
|
var linkedin_default = SvgLinkedin;
|
|
3570
3636
|
|
|
3571
3637
|
// src/theme/default/provider-logos/microsoft.svg
|
|
3572
|
-
var
|
|
3573
|
-
var
|
|
3638
|
+
var React12 = __toESM(require("react"));
|
|
3639
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3574
3640
|
var SvgMicrosoft = (props) => {
|
|
3575
3641
|
var _a, _b;
|
|
3576
|
-
return /* @__PURE__ */ (0,
|
|
3577
|
-
/* @__PURE__ */ (0,
|
|
3578
|
-
/* @__PURE__ */ (0,
|
|
3579
|
-
/* @__PURE__ */ (0,
|
|
3580
|
-
/* @__PURE__ */ (0,
|
|
3642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3643
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
3644
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
3646
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
3581
3647
|
] });
|
|
3582
3648
|
};
|
|
3583
3649
|
var microsoft_default = SvgMicrosoft;
|
|
3584
3650
|
|
|
3585
3651
|
// src/theme/default/provider-logos/slack.svg
|
|
3586
|
-
var
|
|
3587
|
-
var
|
|
3652
|
+
var React13 = __toESM(require("react"));
|
|
3653
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3588
3654
|
var SvgSlack = (props) => {
|
|
3589
3655
|
var _a, _b;
|
|
3590
|
-
return /* @__PURE__ */ (0,
|
|
3591
|
-
/* @__PURE__ */ (0,
|
|
3592
|
-
/* @__PURE__ */ (0,
|
|
3593
|
-
/* @__PURE__ */ (0,
|
|
3594
|
-
/* @__PURE__ */ (0,
|
|
3656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3657
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
3658
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
3659
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
3660
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
3595
3661
|
] });
|
|
3596
3662
|
};
|
|
3597
3663
|
var slack_default = SvgSlack;
|
|
3598
3664
|
|
|
3599
3665
|
// src/theme/default/provider-logos/spotify.svg
|
|
3600
|
-
var
|
|
3601
|
-
var
|
|
3666
|
+
var React14 = __toESM(require("react"));
|
|
3667
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3602
3668
|
var SvgSpotify = (props) => {
|
|
3603
3669
|
var _a, _b;
|
|
3604
|
-
return /* @__PURE__ */ (0,
|
|
3605
|
-
/* @__PURE__ */ (0,
|
|
3606
|
-
/* @__PURE__ */ (0,
|
|
3670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
3607
3673
|
] });
|
|
3608
3674
|
};
|
|
3609
3675
|
var spotify_default = SvgSpotify;
|
|
3610
3676
|
|
|
3611
3677
|
// src/theme/default/provider-logos/yandex.svg
|
|
3612
|
-
var
|
|
3613
|
-
var
|
|
3678
|
+
var React15 = __toESM(require("react"));
|
|
3679
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3614
3680
|
var SvgYandex = (props) => {
|
|
3615
3681
|
var _a, _b;
|
|
3616
|
-
return /* @__PURE__ */ (0,
|
|
3617
|
-
/* @__PURE__ */ (0,
|
|
3618
|
-
/* @__PURE__ */ (0,
|
|
3682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3683
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
3684
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
3619
3685
|
] });
|
|
3620
3686
|
};
|
|
3621
3687
|
var yandex_default = SvgYandex;
|
|
3622
3688
|
|
|
3623
3689
|
// src/theme/default/provider-logos/x.svg
|
|
3624
|
-
var
|
|
3625
|
-
var
|
|
3690
|
+
var React16 = __toESM(require("react"));
|
|
3691
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3626
3692
|
var SvgX = (props) => {
|
|
3627
3693
|
var _a, _b;
|
|
3628
|
-
return /* @__PURE__ */ (0,
|
|
3694
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
|
|
3629
3695
|
};
|
|
3630
3696
|
var x_default = SvgX;
|
|
3631
3697
|
|
|
@@ -3635,7 +3701,6 @@ var logos = {
|
|
|
3635
3701
|
auth0: auth0_default,
|
|
3636
3702
|
discord: discord_default,
|
|
3637
3703
|
facebook: facebook_default,
|
|
3638
|
-
generic: generic_default,
|
|
3639
3704
|
github: github_default,
|
|
3640
3705
|
gitlab: gitlab_default,
|
|
3641
3706
|
google: google_default,
|
|
@@ -3649,9 +3714,9 @@ var logos = {
|
|
|
3649
3714
|
var provider_logos_default = logos;
|
|
3650
3715
|
|
|
3651
3716
|
// src/theme/default/components/form/spinner.tsx
|
|
3652
|
-
var
|
|
3717
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3653
3718
|
function Spinner({ className }) {
|
|
3654
|
-
return /* @__PURE__ */ (0,
|
|
3719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
|
|
3655
3720
|
"svg",
|
|
3656
3721
|
{
|
|
3657
3722
|
"aria-hidden": "true",
|
|
@@ -3664,7 +3729,7 @@ function Spinner({ className }) {
|
|
|
3664
3729
|
fill: "none",
|
|
3665
3730
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3666
3731
|
children: [
|
|
3667
|
-
/* @__PURE__ */ (0,
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3668
3733
|
"path",
|
|
3669
3734
|
{
|
|
3670
3735
|
d: "M23.364 10.6362C22.1053 9.37751 20.5016 8.52034 18.7558 8.17307C17.01 7.82581 15.2004 8.00404 13.5559 8.68523C11.9113 9.36641 10.5057 10.52 9.51678 12C8.52784 13.4801 8 15.2201 8 17.0001C8 18.7802 8.52784 20.5202 9.51678 22.0003C10.5057 23.4803 11.9113 24.6339 13.5559 25.3151C15.2004 25.9962 17.01 26.1745 18.7558 25.8272C20.5016 25.4799 22.1053 24.6228 23.364 23.3641",
|
|
@@ -3673,7 +3738,7 @@ function Spinner({ className }) {
|
|
|
3673
3738
|
strokeLinejoin: "round"
|
|
3674
3739
|
}
|
|
3675
3740
|
) }),
|
|
3676
|
-
/* @__PURE__ */ (0,
|
|
3741
|
+
/* @__PURE__ */ (0, import_jsx_runtime54.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3677
3742
|
"rect",
|
|
3678
3743
|
{
|
|
3679
3744
|
width: "24",
|
|
@@ -3688,7 +3753,7 @@ function Spinner({ className }) {
|
|
|
3688
3753
|
}
|
|
3689
3754
|
|
|
3690
3755
|
// src/theme/default/components/form/social.tsx
|
|
3691
|
-
var
|
|
3756
|
+
var import_client_fetch30 = require("@ory/client-fetch");
|
|
3692
3757
|
|
|
3693
3758
|
// src/util/omitAttributes.ts
|
|
3694
3759
|
function omitInputAttributes({
|
|
@@ -3707,7 +3772,7 @@ function omitInputAttributes({
|
|
|
3707
3772
|
}
|
|
3708
3773
|
|
|
3709
3774
|
// src/theme/default/components/form/social.tsx
|
|
3710
|
-
var
|
|
3775
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3711
3776
|
function extractProvider(context) {
|
|
3712
3777
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
3713
3778
|
return context.provider;
|
|
@@ -3733,7 +3798,7 @@ function DefaultButtonSocial({
|
|
|
3733
3798
|
formState: { isSubmitting }
|
|
3734
3799
|
} = (0, import_react_hook_form14.useFormContext)();
|
|
3735
3800
|
const oidcNodeCount = (_a = ui.nodes.filter(
|
|
3736
|
-
(node2) => node2.group ===
|
|
3801
|
+
(node2) => node2.group === import_client_fetch30.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch30.UiNodeGroupEnum.Saml
|
|
3737
3802
|
).length) != null ? _a : 0;
|
|
3738
3803
|
const Logo = logos2[attributes.value.split("-")[0]];
|
|
3739
3804
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
@@ -3742,13 +3807,13 @@ function DefaultButtonSocial({
|
|
|
3742
3807
|
onClick == null ? void 0 : onClick();
|
|
3743
3808
|
setClicked(true);
|
|
3744
3809
|
};
|
|
3745
|
-
(0,
|
|
3810
|
+
(0, import_react7.useEffect)(() => {
|
|
3746
3811
|
if (!isSubmitting) {
|
|
3747
3812
|
setClicked(false);
|
|
3748
3813
|
}
|
|
3749
3814
|
}, [isSubmitting, setClicked]);
|
|
3750
3815
|
const label = node.meta.label ? (0, import_elements_react7.uiTextToFormattedMessage)(node.meta.label, intl) : "";
|
|
3751
|
-
return /* @__PURE__ */ (0,
|
|
3816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3752
3817
|
"button",
|
|
3753
3818
|
{
|
|
3754
3819
|
className: "gap-3 border border-button-social-border-default bg-button-social-background-default hover:bg-button-social-background-hover transition-colors rounded-buttons flex items-center justify-center px-4 py-[13px] loading:bg-button-social-background-disabled loading:border-button-social-border-disabled loading:text-button-social-foreground-disabled hover:text-button-social-foreground-hover",
|
|
@@ -3762,21 +3827,21 @@ function DefaultButtonSocial({
|
|
|
3762
3827
|
"aria-label": label,
|
|
3763
3828
|
...omitInputAttributes(rest),
|
|
3764
3829
|
children: [
|
|
3765
|
-
/* @__PURE__ */ (0,
|
|
3766
|
-
showLabel && node.meta.label ? /* @__PURE__ */ (0,
|
|
3767
|
-
/* @__PURE__ */ (0,
|
|
3768
|
-
/* @__PURE__ */ (0,
|
|
3830
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(GenericLogo, { label: provider.slice(0, 1) }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(Spinner, { className: "size-5" }) }),
|
|
3831
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_jsx_runtime55.Fragment, { children: [
|
|
3832
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
3833
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "size-5 block" })
|
|
3769
3834
|
] }) : null
|
|
3770
3835
|
]
|
|
3771
3836
|
}
|
|
3772
3837
|
);
|
|
3773
3838
|
}
|
|
3774
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0,
|
|
3839
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
3775
3840
|
function DefaultSocialButtonContainer({
|
|
3776
3841
|
children,
|
|
3777
3842
|
nodes
|
|
3778
3843
|
}) {
|
|
3779
|
-
return /* @__PURE__ */ (0,
|
|
3844
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3780
3845
|
"div",
|
|
3781
3846
|
{
|
|
3782
3847
|
className: cn("grid gap-3", {
|
|
@@ -3789,9 +3854,12 @@ function DefaultSocialButtonContainer({
|
|
|
3789
3854
|
}
|
|
3790
3855
|
);
|
|
3791
3856
|
}
|
|
3857
|
+
function GenericLogo({ label }) {
|
|
3858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "flex rounded-buttons bg-button-social-background-generic-provider text-button-social-foreground-generic-provider border-button-social-border-generic-provider text-xs size-full items-center justify-center", children: label });
|
|
3859
|
+
}
|
|
3792
3860
|
|
|
3793
3861
|
// src/theme/default/components/form/index.tsx
|
|
3794
|
-
var
|
|
3862
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3795
3863
|
function DefaultFormContainer({
|
|
3796
3864
|
children,
|
|
3797
3865
|
onSubmit,
|
|
@@ -3799,7 +3867,7 @@ function DefaultFormContainer({
|
|
|
3799
3867
|
method,
|
|
3800
3868
|
"data-testid": dataTestId
|
|
3801
3869
|
}) {
|
|
3802
|
-
return /* @__PURE__ */ (0,
|
|
3870
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3803
3871
|
"form",
|
|
3804
3872
|
{
|
|
3805
3873
|
"data-testid": dataTestId,
|
|
@@ -3817,11 +3885,11 @@ function DefaultMessageContainer({ children }) {
|
|
|
3817
3885
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
3818
3886
|
return null;
|
|
3819
3887
|
}
|
|
3820
|
-
return /* @__PURE__ */ (0,
|
|
3888
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3821
3889
|
"section",
|
|
3822
3890
|
{
|
|
3823
3891
|
className: cn(
|
|
3824
|
-
flowType ===
|
|
3892
|
+
flowType === import_client_fetch31.FlowType.Settings ? "text-center" : "text-left"
|
|
3825
3893
|
),
|
|
3826
3894
|
children
|
|
3827
3895
|
}
|
|
@@ -3829,7 +3897,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
3829
3897
|
}
|
|
3830
3898
|
function DefaultMessage({ message }) {
|
|
3831
3899
|
const intl = (0, import_react_intl13.useIntl)();
|
|
3832
|
-
return /* @__PURE__ */ (0,
|
|
3900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3833
3901
|
"span",
|
|
3834
3902
|
{
|
|
3835
3903
|
className: cn(
|
|
@@ -3848,61 +3916,61 @@ function DefaultMessage({ message }) {
|
|
|
3848
3916
|
var import_react_intl14 = require("react-intl");
|
|
3849
3917
|
|
|
3850
3918
|
// src/theme/default/assets/icons/code.svg
|
|
3851
|
-
var
|
|
3852
|
-
var
|
|
3919
|
+
var React17 = __toESM(require("react"));
|
|
3920
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3853
3921
|
var SvgCode = (props) => {
|
|
3854
3922
|
var _a, _b;
|
|
3855
|
-
return /* @__PURE__ */ (0,
|
|
3923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
|
|
3856
3924
|
};
|
|
3857
3925
|
var code_default = SvgCode;
|
|
3858
3926
|
|
|
3859
3927
|
// src/theme/default/assets/icons/passkey.svg
|
|
3860
|
-
var
|
|
3861
|
-
var
|
|
3928
|
+
var React18 = __toESM(require("react"));
|
|
3929
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3862
3930
|
var SvgPasskey = (props) => {
|
|
3863
3931
|
var _a, _b;
|
|
3864
|
-
return /* @__PURE__ */ (0,
|
|
3932
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
|
|
3865
3933
|
};
|
|
3866
3934
|
var passkey_default = SvgPasskey;
|
|
3867
3935
|
|
|
3868
3936
|
// src/theme/default/assets/icons/password.svg
|
|
3869
|
-
var
|
|
3870
|
-
var
|
|
3937
|
+
var React19 = __toESM(require("react"));
|
|
3938
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3871
3939
|
var SvgPassword = (props) => {
|
|
3872
3940
|
var _a, _b;
|
|
3873
|
-
return /* @__PURE__ */ (0,
|
|
3941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
|
|
3874
3942
|
};
|
|
3875
3943
|
var password_default = SvgPassword;
|
|
3876
3944
|
|
|
3877
3945
|
// src/theme/default/assets/icons/webauthn.svg
|
|
3878
|
-
var
|
|
3879
|
-
var
|
|
3946
|
+
var React20 = __toESM(require("react"));
|
|
3947
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3880
3948
|
var SvgWebauthn = (props) => {
|
|
3881
3949
|
var _a, _b;
|
|
3882
|
-
return /* @__PURE__ */ (0,
|
|
3950
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
|
|
3883
3951
|
};
|
|
3884
3952
|
var webauthn_default = SvgWebauthn;
|
|
3885
3953
|
|
|
3886
3954
|
// src/theme/default/assets/icons/totp.svg
|
|
3887
|
-
var
|
|
3888
|
-
var
|
|
3955
|
+
var React21 = __toESM(require("react"));
|
|
3956
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3889
3957
|
var SvgTotp = (props) => {
|
|
3890
3958
|
var _a, _b;
|
|
3891
|
-
return /* @__PURE__ */ (0,
|
|
3959
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
3892
3960
|
};
|
|
3893
3961
|
var totp_default = SvgTotp;
|
|
3894
3962
|
|
|
3895
3963
|
// src/theme/default/assets/icons/code-asterix.svg
|
|
3896
|
-
var
|
|
3897
|
-
var
|
|
3964
|
+
var React22 = __toESM(require("react"));
|
|
3965
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3898
3966
|
var SvgCodeAsterix = (props) => {
|
|
3899
3967
|
var _a, _b;
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
|
|
3901
3969
|
};
|
|
3902
3970
|
var code_asterix_default = SvgCodeAsterix;
|
|
3903
3971
|
|
|
3904
3972
|
// src/theme/default/components/card/list-item.tsx
|
|
3905
|
-
var
|
|
3973
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3906
3974
|
function ListItem({
|
|
3907
3975
|
icon: Icon,
|
|
3908
3976
|
as,
|
|
@@ -3913,7 +3981,7 @@ function ListItem({
|
|
|
3913
3981
|
...props
|
|
3914
3982
|
}) {
|
|
3915
3983
|
const Comp = as || "div";
|
|
3916
|
-
return /* @__PURE__ */ (0,
|
|
3984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
|
|
3917
3985
|
Comp,
|
|
3918
3986
|
{
|
|
3919
3987
|
...props,
|
|
@@ -3922,10 +3990,10 @@ function ListItem({
|
|
|
3922
3990
|
className
|
|
3923
3991
|
),
|
|
3924
3992
|
children: [
|
|
3925
|
-
/* @__PURE__ */ (0,
|
|
3926
|
-
/* @__PURE__ */ (0,
|
|
3927
|
-
/* @__PURE__ */ (0,
|
|
3928
|
-
/* @__PURE__ */ (0,
|
|
3993
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "mt-1", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
3994
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
3995
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
3996
|
+
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
3929
3997
|
] }),
|
|
3930
3998
|
children
|
|
3931
3999
|
]
|
|
@@ -3934,7 +4002,7 @@ function ListItem({
|
|
|
3934
4002
|
}
|
|
3935
4003
|
|
|
3936
4004
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
3937
|
-
var
|
|
4005
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3938
4006
|
var iconsMap = {
|
|
3939
4007
|
code: code_default,
|
|
3940
4008
|
passkey: passkey_default,
|
|
@@ -3953,7 +4021,7 @@ function DefaultAuthMethodListItem({
|
|
|
3953
4021
|
var _a;
|
|
3954
4022
|
const intl = (0, import_react_intl14.useIntl)();
|
|
3955
4023
|
const Icon = iconsMap[group] || null;
|
|
3956
|
-
return /* @__PURE__ */ (0,
|
|
4024
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
3957
4025
|
ListItem,
|
|
3958
4026
|
{
|
|
3959
4027
|
as: "button",
|
|
@@ -3973,13 +4041,13 @@ function DefaultAuthMethodListItem({
|
|
|
3973
4041
|
}
|
|
3974
4042
|
|
|
3975
4043
|
// src/theme/default/components/form/button.tsx
|
|
3976
|
-
var
|
|
4044
|
+
var import_client_fetch32 = require("@ory/client-fetch");
|
|
3977
4045
|
var import_elements_react9 = require("@ory/elements-react");
|
|
3978
4046
|
var import_class_variance_authority = require("class-variance-authority");
|
|
3979
4047
|
var import_react_hook_form15 = require("react-hook-form");
|
|
3980
4048
|
var import_react_intl15 = require("react-intl");
|
|
3981
|
-
var
|
|
3982
|
-
var
|
|
4049
|
+
var import_react8 = require("react");
|
|
4050
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3983
4051
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
3984
4052
|
[
|
|
3985
4053
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -4019,20 +4087,20 @@ var DefaultButton = ({
|
|
|
4019
4087
|
}) => {
|
|
4020
4088
|
var _a;
|
|
4021
4089
|
const { type, name, value, ...rest } = attributes;
|
|
4022
|
-
const [clicked, setClicked] = (0,
|
|
4090
|
+
const [clicked, setClicked] = (0, import_react8.useState)(false);
|
|
4023
4091
|
const intl = (0, import_react_intl15.useIntl)();
|
|
4024
|
-
const label = (0,
|
|
4092
|
+
const label = (0, import_client_fetch32.getNodeLabel)(node);
|
|
4025
4093
|
const {
|
|
4026
4094
|
formState: { isSubmitting },
|
|
4027
4095
|
setValue
|
|
4028
4096
|
} = (0, import_react_hook_form15.useFormContext)();
|
|
4029
|
-
(0,
|
|
4097
|
+
(0, import_react8.useEffect)(() => {
|
|
4030
4098
|
if (!isSubmitting) {
|
|
4031
4099
|
setClicked(false);
|
|
4032
4100
|
}
|
|
4033
4101
|
}, [isSubmitting]);
|
|
4034
4102
|
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret") || attributes.name.includes("action") && attributes.value === "accept";
|
|
4035
|
-
return /* @__PURE__ */ (0,
|
|
4103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
|
|
4036
4104
|
"button",
|
|
4037
4105
|
{
|
|
4038
4106
|
...omitInputAttributes(rest),
|
|
@@ -4052,8 +4120,8 @@ var DefaultButton = ({
|
|
|
4052
4120
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
4053
4121
|
"data-loading": clicked,
|
|
4054
4122
|
children: [
|
|
4055
|
-
clicked ? /* @__PURE__ */ (0,
|
|
4056
|
-
label ? /* @__PURE__ */ (0,
|
|
4123
|
+
clicked ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Spinner, {}) : null,
|
|
4124
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("span", { children: (0, import_elements_react9.uiTextToFormattedMessage)(label, intl) }) : ""
|
|
4057
4125
|
]
|
|
4058
4126
|
}
|
|
4059
4127
|
);
|
|
@@ -4061,14 +4129,14 @@ var DefaultButton = ({
|
|
|
4061
4129
|
DefaultButton.displayName = "DefaultButton";
|
|
4062
4130
|
|
|
4063
4131
|
// src/theme/default/components/form/checkbox.tsx
|
|
4064
|
-
var
|
|
4132
|
+
var import_client_fetch33 = require("@ory/client-fetch");
|
|
4065
4133
|
var import_elements_react10 = require("@ory/elements-react");
|
|
4066
4134
|
var import_react_hook_form16 = require("react-hook-form");
|
|
4067
4135
|
var import_react_intl17 = require("react-intl");
|
|
4068
4136
|
|
|
4069
4137
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
4070
4138
|
var import_react_intl16 = require("react-intl");
|
|
4071
|
-
var
|
|
4139
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4072
4140
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
4073
4141
|
function computeLabelElements(labelText) {
|
|
4074
4142
|
const elements = [];
|
|
@@ -4084,7 +4152,7 @@ function computeLabelElements(labelText) {
|
|
|
4084
4152
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
4085
4153
|
}
|
|
4086
4154
|
elements.push(
|
|
4087
|
-
/* @__PURE__ */ (0,
|
|
4155
|
+
/* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
4088
4156
|
"a",
|
|
4089
4157
|
{
|
|
4090
4158
|
href: url,
|
|
@@ -4109,13 +4177,13 @@ function CheckboxLabel({ label }) {
|
|
|
4109
4177
|
return null;
|
|
4110
4178
|
}
|
|
4111
4179
|
const labelText = uiTextToFormattedMessage(label, intl);
|
|
4112
|
-
return /* @__PURE__ */ (0,
|
|
4180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: computeLabelElements(labelText) });
|
|
4113
4181
|
}
|
|
4114
4182
|
|
|
4115
4183
|
// src/theme/default/components/form/checkbox.tsx
|
|
4116
|
-
var
|
|
4184
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4117
4185
|
function CheckboxSVG() {
|
|
4118
|
-
return /* @__PURE__ */ (0,
|
|
4186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4119
4187
|
"svg",
|
|
4120
4188
|
{
|
|
4121
4189
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -4124,7 +4192,7 @@ function CheckboxSVG() {
|
|
|
4124
4192
|
height: "16",
|
|
4125
4193
|
viewBox: "0 0 16 16",
|
|
4126
4194
|
fill: "none",
|
|
4127
|
-
children: /* @__PURE__ */ (0,
|
|
4195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4128
4196
|
"path",
|
|
4129
4197
|
{
|
|
4130
4198
|
fillRule: "evenodd",
|
|
@@ -4141,12 +4209,12 @@ var DefaultCheckbox = ({
|
|
|
4141
4209
|
}) => {
|
|
4142
4210
|
const { value, name, ...attributes } = initialAttributes;
|
|
4143
4211
|
const intl = (0, import_react_intl17.useIntl)();
|
|
4144
|
-
const label = (0,
|
|
4212
|
+
const label = (0, import_client_fetch33.getNodeLabel)(node);
|
|
4145
4213
|
const { register } = (0, import_react_hook_form16.useFormContext)();
|
|
4146
4214
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4147
|
-
return /* @__PURE__ */ (0,
|
|
4148
|
-
/* @__PURE__ */ (0,
|
|
4149
|
-
/* @__PURE__ */ (0,
|
|
4215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
4216
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "flex h-5 items-center", children: [
|
|
4217
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4150
4218
|
"input",
|
|
4151
4219
|
{
|
|
4152
4220
|
...omitInputAttributes(attributes),
|
|
@@ -4159,11 +4227,11 @@ var DefaultCheckbox = ({
|
|
|
4159
4227
|
...register(name)
|
|
4160
4228
|
}
|
|
4161
4229
|
),
|
|
4162
|
-
/* @__PURE__ */ (0,
|
|
4230
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CheckboxSVG, {})
|
|
4163
4231
|
] }),
|
|
4164
|
-
/* @__PURE__ */ (0,
|
|
4165
|
-
/* @__PURE__ */ (0,
|
|
4166
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
4232
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("span", { className: "flex flex-col", children: [
|
|
4233
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(CheckboxLabel, { label }) }),
|
|
4234
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4167
4235
|
"span",
|
|
4168
4236
|
{
|
|
4169
4237
|
className: cn(
|
|
@@ -4181,13 +4249,13 @@ var DefaultCheckbox = ({
|
|
|
4181
4249
|
|
|
4182
4250
|
// src/theme/default/components/form/group-container.tsx
|
|
4183
4251
|
var import_elements_react11 = require("@ory/elements-react");
|
|
4184
|
-
var
|
|
4252
|
+
var import_client_fetch34 = require("@ory/client-fetch");
|
|
4185
4253
|
|
|
4186
4254
|
// src/util/childCounter.ts
|
|
4187
|
-
var
|
|
4255
|
+
var import_react9 = require("react");
|
|
4188
4256
|
function countRenderableChildren(children) {
|
|
4189
|
-
return
|
|
4190
|
-
if ((0,
|
|
4257
|
+
return import_react9.Children.toArray(children).filter((c) => {
|
|
4258
|
+
if ((0, import_react9.isValidElement)(c)) {
|
|
4191
4259
|
return true;
|
|
4192
4260
|
}
|
|
4193
4261
|
return false;
|
|
@@ -4195,19 +4263,19 @@ function countRenderableChildren(children) {
|
|
|
4195
4263
|
}
|
|
4196
4264
|
|
|
4197
4265
|
// src/theme/default/components/form/group-container.tsx
|
|
4198
|
-
var
|
|
4266
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4199
4267
|
function DefaultGroupContainer({ children }) {
|
|
4200
4268
|
const { flowType } = (0, import_elements_react11.useOryFlow)();
|
|
4201
4269
|
const count = countRenderableChildren(children);
|
|
4202
4270
|
if (count === 0) {
|
|
4203
4271
|
return null;
|
|
4204
4272
|
}
|
|
4205
|
-
return /* @__PURE__ */ (0,
|
|
4273
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4206
4274
|
"div",
|
|
4207
4275
|
{
|
|
4208
4276
|
className: cn(
|
|
4209
4277
|
"grid",
|
|
4210
|
-
flowType ===
|
|
4278
|
+
flowType === import_client_fetch34.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
4211
4279
|
),
|
|
4212
4280
|
children
|
|
4213
4281
|
}
|
|
@@ -4215,16 +4283,16 @@ function DefaultGroupContainer({ children }) {
|
|
|
4215
4283
|
}
|
|
4216
4284
|
|
|
4217
4285
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
4218
|
-
var
|
|
4286
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4219
4287
|
function DefaultHorizontalDivider() {
|
|
4220
|
-
return /* @__PURE__ */ (0,
|
|
4288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("hr", { className: "border-interface-border-default-primary" });
|
|
4221
4289
|
}
|
|
4222
4290
|
|
|
4223
4291
|
// src/theme/default/components/form/image.tsx
|
|
4224
|
-
var
|
|
4292
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4225
4293
|
function DefaultImage({ attributes, node }) {
|
|
4226
4294
|
var _a;
|
|
4227
|
-
return /* @__PURE__ */ (0,
|
|
4295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
4228
4296
|
"img",
|
|
4229
4297
|
{
|
|
4230
4298
|
...omitInputAttributes(attributes),
|
|
@@ -4234,35 +4302,35 @@ function DefaultImage({ attributes, node }) {
|
|
|
4234
4302
|
}
|
|
4235
4303
|
|
|
4236
4304
|
// src/theme/default/components/form/input.tsx
|
|
4237
|
-
var
|
|
4305
|
+
var import_client_fetch35 = require("@ory/client-fetch");
|
|
4238
4306
|
var import_elements_react12 = require("@ory/elements-react");
|
|
4239
|
-
var
|
|
4307
|
+
var import_react10 = require("react");
|
|
4240
4308
|
var import_react_hook_form17 = require("react-hook-form");
|
|
4241
4309
|
var import_react_intl18 = require("react-intl");
|
|
4242
4310
|
|
|
4243
4311
|
// src/theme/default/assets/icons/eye-off.svg
|
|
4244
|
-
var
|
|
4245
|
-
var
|
|
4312
|
+
var React23 = __toESM(require("react"));
|
|
4313
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4246
4314
|
var SvgEyeOff = (props) => {
|
|
4247
4315
|
var _a, _b;
|
|
4248
|
-
return /* @__PURE__ */ (0,
|
|
4316
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
|
|
4249
4317
|
};
|
|
4250
4318
|
var eye_off_default = SvgEyeOff;
|
|
4251
4319
|
|
|
4252
4320
|
// src/theme/default/assets/icons/eye.svg
|
|
4253
|
-
var
|
|
4254
|
-
var
|
|
4321
|
+
var React24 = __toESM(require("react"));
|
|
4322
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4255
4323
|
var SvgEye = (props) => {
|
|
4256
4324
|
var _a, _b;
|
|
4257
|
-
return /* @__PURE__ */ (0,
|
|
4258
|
-
/* @__PURE__ */ (0,
|
|
4259
|
-
/* @__PURE__ */ (0,
|
|
4325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4326
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
4327
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
4260
4328
|
] }) });
|
|
4261
4329
|
};
|
|
4262
4330
|
var eye_default = SvgEye;
|
|
4263
4331
|
|
|
4264
4332
|
// src/theme/default/components/form/input.tsx
|
|
4265
|
-
var
|
|
4333
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4266
4334
|
var defaultInputClassName = cn(
|
|
4267
4335
|
"antialiased rounded-forms border leading-tight transition-colors placeholder:h-[20px] placeholder:text-input-foreground-tertiary focus-visible:outline-none focus:ring-0 w-full",
|
|
4268
4336
|
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
@@ -4276,12 +4344,12 @@ var DefaultInput = ({
|
|
|
4276
4344
|
attributes,
|
|
4277
4345
|
onClick
|
|
4278
4346
|
}) => {
|
|
4279
|
-
const label = (0,
|
|
4347
|
+
const label = (0, import_client_fetch35.getNodeLabel)(node);
|
|
4280
4348
|
const { register } = (0, import_react_hook_form17.useFormContext)();
|
|
4281
4349
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4282
4350
|
const intl = (0, import_react_intl18.useIntl)();
|
|
4283
4351
|
const { flowType } = (0, import_elements_react12.useOryFlow)();
|
|
4284
|
-
const inputRef = (0,
|
|
4352
|
+
const inputRef = (0, import_react10.useRef)(null);
|
|
4285
4353
|
const formattedLabel = label ? intl.formatMessage(
|
|
4286
4354
|
{
|
|
4287
4355
|
id: "input.placeholder",
|
|
@@ -4292,7 +4360,7 @@ var DefaultInput = ({
|
|
|
4292
4360
|
}
|
|
4293
4361
|
) : "";
|
|
4294
4362
|
if (rest.type === "hidden") {
|
|
4295
|
-
return /* @__PURE__ */ (0,
|
|
4363
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4296
4364
|
"input",
|
|
4297
4365
|
{
|
|
4298
4366
|
...rest,
|
|
@@ -4306,16 +4374,16 @@ var DefaultInput = ({
|
|
|
4306
4374
|
);
|
|
4307
4375
|
}
|
|
4308
4376
|
const { ref, ...restRegister } = register(name, { value });
|
|
4309
|
-
return /* @__PURE__ */ (0,
|
|
4377
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
4310
4378
|
"div",
|
|
4311
4379
|
{
|
|
4312
4380
|
className: cn(
|
|
4313
4381
|
"relative flex justify-stretch",
|
|
4314
4382
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4315
|
-
flowType ===
|
|
4383
|
+
flowType === import_client_fetch35.FlowType.Settings && "max-w-[488px]"
|
|
4316
4384
|
),
|
|
4317
4385
|
children: [
|
|
4318
|
-
/* @__PURE__ */ (0,
|
|
4386
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4319
4387
|
"input",
|
|
4320
4388
|
{
|
|
4321
4389
|
...omitInputAttributes(rest),
|
|
@@ -4332,7 +4400,7 @@ var DefaultInput = ({
|
|
|
4332
4400
|
...restRegister
|
|
4333
4401
|
}
|
|
4334
4402
|
),
|
|
4335
|
-
rest.type === "password" && /* @__PURE__ */ (0,
|
|
4403
|
+
rest.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(PasswordToggle, { inputRef })
|
|
4336
4404
|
]
|
|
4337
4405
|
}
|
|
4338
4406
|
);
|
|
@@ -4340,31 +4408,31 @@ var DefaultInput = ({
|
|
|
4340
4408
|
function PasswordToggle({
|
|
4341
4409
|
inputRef
|
|
4342
4410
|
}) {
|
|
4343
|
-
const [shown, setShown] = (0,
|
|
4411
|
+
const [shown, setShown] = (0, import_react10.useState)(false);
|
|
4344
4412
|
const handleClick = () => {
|
|
4345
4413
|
setShown(!shown);
|
|
4346
4414
|
if (inputRef.current) {
|
|
4347
4415
|
inputRef.current.type = shown ? "password" : "text";
|
|
4348
4416
|
}
|
|
4349
4417
|
};
|
|
4350
|
-
return /* @__PURE__ */ (0,
|
|
4418
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
4351
4419
|
"button",
|
|
4352
4420
|
{
|
|
4353
4421
|
onClick: handleClick,
|
|
4354
4422
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
4355
4423
|
type: "button",
|
|
4356
4424
|
"aria-label": "Toggle password visibility",
|
|
4357
|
-
children: shown ? /* @__PURE__ */ (0,
|
|
4425
|
+
children: shown ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(eye_default, {})
|
|
4358
4426
|
}
|
|
4359
4427
|
);
|
|
4360
4428
|
}
|
|
4361
4429
|
|
|
4362
4430
|
// src/theme/default/components/form/label.tsx
|
|
4363
|
-
var
|
|
4431
|
+
var import_client_fetch36 = require("@ory/client-fetch");
|
|
4364
4432
|
var import_elements_react13 = require("@ory/elements-react");
|
|
4365
4433
|
var import_react_hook_form18 = require("react-hook-form");
|
|
4366
4434
|
var import_react_intl19 = require("react-intl");
|
|
4367
|
-
var
|
|
4435
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4368
4436
|
function findResendNode(nodes) {
|
|
4369
4437
|
return nodes.find(
|
|
4370
4438
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -4377,7 +4445,7 @@ function DefaultLabel({
|
|
|
4377
4445
|
...rest
|
|
4378
4446
|
}) {
|
|
4379
4447
|
const intl = (0, import_react_intl19.useIntl)();
|
|
4380
|
-
const label = (0,
|
|
4448
|
+
const label = (0, import_client_fetch36.getNodeLabel)(node);
|
|
4381
4449
|
const { Message } = (0, import_elements_react13.useComponents)();
|
|
4382
4450
|
const { config, flowType, flow } = (0, import_elements_react13.useOryFlow)();
|
|
4383
4451
|
const { setValue, formState } = (0, import_react_hook_form18.useFormContext)();
|
|
@@ -4389,9 +4457,9 @@ function DefaultLabel({
|
|
|
4389
4457
|
}
|
|
4390
4458
|
};
|
|
4391
4459
|
const fieldError = formState.errors[attributes.name];
|
|
4392
|
-
return /* @__PURE__ */ (0,
|
|
4393
|
-
label && /* @__PURE__ */ (0,
|
|
4394
|
-
/* @__PURE__ */ (0,
|
|
4460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
4461
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { className: "inline-flex justify-between", children: [
|
|
4462
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4395
4463
|
"label",
|
|
4396
4464
|
{
|
|
4397
4465
|
...(0, import_elements_react13.messageTestId)(label),
|
|
@@ -4402,8 +4470,8 @@ function DefaultLabel({
|
|
|
4402
4470
|
children: (0, import_elements_react13.uiTextToFormattedMessage)(label, intl)
|
|
4403
4471
|
}
|
|
4404
4472
|
),
|
|
4405
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
4406
|
-
/* @__PURE__ */ (0,
|
|
4473
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch36.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
4474
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4407
4475
|
"a",
|
|
4408
4476
|
{
|
|
4409
4477
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -4414,7 +4482,7 @@ function DefaultLabel({
|
|
|
4414
4482
|
})
|
|
4415
4483
|
}
|
|
4416
4484
|
),
|
|
4417
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0,
|
|
4485
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4418
4486
|
"button",
|
|
4419
4487
|
{
|
|
4420
4488
|
type: "submit",
|
|
@@ -4427,21 +4495,21 @@ function DefaultLabel({
|
|
|
4427
4495
|
)
|
|
4428
4496
|
] }),
|
|
4429
4497
|
children,
|
|
4430
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
4431
|
-
fieldError && (0,
|
|
4498
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Message.Content, { message }, message.id)),
|
|
4499
|
+
fieldError && (0, import_client_fetch36.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Message.Content, { message: fieldError })
|
|
4432
4500
|
] });
|
|
4433
4501
|
}
|
|
4434
4502
|
|
|
4435
4503
|
// src/theme/default/components/form/link-button.tsx
|
|
4436
|
-
var
|
|
4504
|
+
var import_client_fetch37 = require("@ory/client-fetch");
|
|
4437
4505
|
var import_elements_react14 = require("@ory/elements-react");
|
|
4438
|
-
var
|
|
4506
|
+
var import_react11 = require("react");
|
|
4439
4507
|
var import_react_intl20 = require("react-intl");
|
|
4440
|
-
var
|
|
4441
|
-
var DefaultLinkButton = (0,
|
|
4508
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4509
|
+
var DefaultLinkButton = (0, import_react11.forwardRef)(({ attributes, node }, ref) => {
|
|
4442
4510
|
const intl = (0, import_react_intl20.useIntl)();
|
|
4443
|
-
const label = (0,
|
|
4444
|
-
return /* @__PURE__ */ (0,
|
|
4511
|
+
const label = (0, import_client_fetch37.getNodeLabel)(node);
|
|
4512
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4445
4513
|
"a",
|
|
4446
4514
|
{
|
|
4447
4515
|
...omitInputAttributes(attributes),
|
|
@@ -4462,9 +4530,9 @@ var import_react_hook_form19 = require("react-hook-form");
|
|
|
4462
4530
|
|
|
4463
4531
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
4464
4532
|
var import_input_otp = require("input-otp");
|
|
4465
|
-
var
|
|
4466
|
-
var
|
|
4467
|
-
var InputOTP =
|
|
4533
|
+
var React25 = __toESM(require("react"));
|
|
4534
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4535
|
+
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4468
4536
|
import_input_otp.OTPInput,
|
|
4469
4537
|
{
|
|
4470
4538
|
ref,
|
|
@@ -4477,12 +4545,12 @@ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props },
|
|
|
4477
4545
|
}
|
|
4478
4546
|
));
|
|
4479
4547
|
InputOTP.displayName = "InputOTP";
|
|
4480
|
-
var InputOTPGroup =
|
|
4548
|
+
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
4481
4549
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4482
|
-
var InputOTPSlot =
|
|
4483
|
-
const inputOTPContext =
|
|
4550
|
+
var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
4551
|
+
const inputOTPContext = React25.useContext(import_input_otp.OTPInputContext);
|
|
4484
4552
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
4485
|
-
return /* @__PURE__ */ (0,
|
|
4553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
4486
4554
|
"div",
|
|
4487
4555
|
{
|
|
4488
4556
|
ref,
|
|
@@ -4494,8 +4562,8 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4494
4562
|
),
|
|
4495
4563
|
...props,
|
|
4496
4564
|
children: [
|
|
4497
|
-
/* @__PURE__ */ (0,
|
|
4498
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
4565
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("span", { className: "inline-block size-4", children: char }),
|
|
4566
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
4499
4567
|
]
|
|
4500
4568
|
}
|
|
4501
4569
|
);
|
|
@@ -4504,8 +4572,8 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
4504
4572
|
|
|
4505
4573
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4506
4574
|
var import_elements_react15 = require("@ory/elements-react");
|
|
4507
|
-
var
|
|
4508
|
-
var
|
|
4575
|
+
var import_client_fetch38 = require("@ory/client-fetch");
|
|
4576
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4509
4577
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4510
4578
|
const { setValue, watch } = (0, import_react_hook_form19.useFormContext)();
|
|
4511
4579
|
const { maxlength, name } = attributes;
|
|
@@ -4515,22 +4583,22 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4515
4583
|
setValue(name, v);
|
|
4516
4584
|
};
|
|
4517
4585
|
const value = watch(name);
|
|
4518
|
-
return /* @__PURE__ */ (0,
|
|
4586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4519
4587
|
InputOTP,
|
|
4520
4588
|
{
|
|
4521
4589
|
maxLength: maxlength != null ? maxlength : 6,
|
|
4522
4590
|
onChange: handleInputChange,
|
|
4523
4591
|
name,
|
|
4524
4592
|
value,
|
|
4525
|
-
children: /* @__PURE__ */ (0,
|
|
4593
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4526
4594
|
InputOTPGroup,
|
|
4527
4595
|
{
|
|
4528
4596
|
className: cn(
|
|
4529
4597
|
"w-full flex gap-2 justify-stretch",
|
|
4530
4598
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4531
|
-
flowType ===
|
|
4599
|
+
flowType === import_client_fetch38.FlowType.Settings && "max-w-[488px]"
|
|
4532
4600
|
),
|
|
4533
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0,
|
|
4601
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(InputOTPSlot, { index }, index))
|
|
4534
4602
|
}
|
|
4535
4603
|
)
|
|
4536
4604
|
}
|
|
@@ -4538,13 +4606,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4538
4606
|
};
|
|
4539
4607
|
|
|
4540
4608
|
// src/theme/default/components/form/section.tsx
|
|
4541
|
-
var
|
|
4609
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4542
4610
|
var DefaultFormSection = ({
|
|
4543
4611
|
children,
|
|
4544
4612
|
nodes: _nodes,
|
|
4545
4613
|
...rest
|
|
4546
4614
|
}) => {
|
|
4547
|
-
return /* @__PURE__ */ (0,
|
|
4615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4548
4616
|
"form",
|
|
4549
4617
|
{
|
|
4550
4618
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -4558,10 +4626,10 @@ var DefaultFormSectionContent = ({
|
|
|
4558
4626
|
description,
|
|
4559
4627
|
children
|
|
4560
4628
|
}) => {
|
|
4561
|
-
return /* @__PURE__ */ (0,
|
|
4562
|
-
/* @__PURE__ */ (0,
|
|
4563
|
-
/* @__PURE__ */ (0,
|
|
4564
|
-
/* @__PURE__ */ (0,
|
|
4629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
|
|
4630
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
4631
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
4632
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
4565
4633
|
] }),
|
|
4566
4634
|
children
|
|
4567
4635
|
] });
|
|
@@ -4570,14 +4638,14 @@ var DefaultFormSectionFooter = ({
|
|
|
4570
4638
|
children,
|
|
4571
4639
|
text
|
|
4572
4640
|
}) => {
|
|
4573
|
-
return /* @__PURE__ */ (0,
|
|
4641
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
|
|
4574
4642
|
"div",
|
|
4575
4643
|
{
|
|
4576
4644
|
className: cn(
|
|
4577
4645
|
"flex min-h-[72px] items-center justify-between gap-2 rounded-b-cards border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
|
|
4578
4646
|
),
|
|
4579
4647
|
children: [
|
|
4580
|
-
/* @__PURE__ */ (0,
|
|
4648
|
+
/* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { children: text }),
|
|
4581
4649
|
children
|
|
4582
4650
|
]
|
|
4583
4651
|
}
|
|
@@ -4587,31 +4655,31 @@ var DefaultFormSectionFooter = ({
|
|
|
4587
4655
|
// src/theme/default/components/form/text.tsx
|
|
4588
4656
|
var import_elements_react16 = require("@ory/elements-react");
|
|
4589
4657
|
var import_react_intl21 = require("react-intl");
|
|
4590
|
-
var
|
|
4658
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4591
4659
|
function DefaultText({ node, attributes }) {
|
|
4592
4660
|
var _a;
|
|
4593
4661
|
const intl = (0, import_react_intl21.useIntl)();
|
|
4594
4662
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
4595
4663
|
if (lookup) {
|
|
4596
|
-
return /* @__PURE__ */ (0,
|
|
4597
|
-
/* @__PURE__ */ (0,
|
|
4598
|
-
lookup.map((text, index) => /* @__PURE__ */ (0,
|
|
4664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(import_jsx_runtime79.Fragment, { children: [
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react16.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
|
|
4666
|
+
lookup.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4599
4667
|
"pre",
|
|
4600
4668
|
{
|
|
4601
4669
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
4602
|
-
children: /* @__PURE__ */ (0,
|
|
4670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("code", { children: text ? (0, import_elements_react16.uiTextToFormattedMessage)(text, intl) : "" })
|
|
4603
4671
|
},
|
|
4604
4672
|
index
|
|
4605
4673
|
))
|
|
4606
4674
|
] });
|
|
4607
4675
|
}
|
|
4608
|
-
return /* @__PURE__ */ (0,
|
|
4676
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(import_jsx_runtime79.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
4609
4677
|
"p",
|
|
4610
4678
|
{
|
|
4611
4679
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
4612
4680
|
id: attributes.id,
|
|
4613
4681
|
children: [
|
|
4614
|
-
node.meta.label ? /* @__PURE__ */ (0,
|
|
4682
|
+
node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("label", { children: (0, import_elements_react16.uiTextToFormattedMessage)(node.meta.label, intl) }) : null,
|
|
4615
4683
|
attributes.text ? (0, import_elements_react16.uiTextToFormattedMessage)(attributes.text, intl) : ""
|
|
4616
4684
|
]
|
|
4617
4685
|
}
|
|
@@ -4626,40 +4694,26 @@ var import_elements_react17 = require("@ory/elements-react");
|
|
|
4626
4694
|
var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
4627
4695
|
|
|
4628
4696
|
// src/theme/default/assets/icons/logout.svg
|
|
4629
|
-
var
|
|
4630
|
-
var
|
|
4697
|
+
var React26 = __toESM(require("react"));
|
|
4698
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4631
4699
|
var SvgLogout = (props) => {
|
|
4632
4700
|
var _a, _b;
|
|
4633
|
-
return /* @__PURE__ */ (0,
|
|
4701
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
|
|
4634
4702
|
};
|
|
4635
4703
|
var logout_default = SvgLogout;
|
|
4636
4704
|
|
|
4637
4705
|
// src/theme/default/assets/icons/settings.svg
|
|
4638
|
-
var
|
|
4639
|
-
var
|
|
4706
|
+
var React27 = __toESM(require("react"));
|
|
4707
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
4640
4708
|
var SvgSettings = (props) => {
|
|
4641
4709
|
var _a, _b;
|
|
4642
|
-
return /* @__PURE__ */ (0,
|
|
4643
|
-
/* @__PURE__ */ (0,
|
|
4644
|
-
/* @__PURE__ */ (0,
|
|
4710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4711
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
|
|
4712
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
4645
4713
|
] }) });
|
|
4646
4714
|
};
|
|
4647
4715
|
var settings_default = SvgSettings;
|
|
4648
4716
|
|
|
4649
|
-
// src/theme/default/utils/logout.ts
|
|
4650
|
-
var import_react11 = require("react");
|
|
4651
|
-
function useClientLogout(config) {
|
|
4652
|
-
const [logoutFlow, setLogoutFlow] = (0, import_react11.useState)();
|
|
4653
|
-
const fetchLogoutFlow = (0, import_react11.useCallback)(async () => {
|
|
4654
|
-
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
4655
|
-
setLogoutFlow(flow);
|
|
4656
|
-
}, [config.sdk.url]);
|
|
4657
|
-
(0, import_react11.useEffect)(() => {
|
|
4658
|
-
void fetchLogoutFlow();
|
|
4659
|
-
}, [fetchLogoutFlow]);
|
|
4660
|
-
return logoutFlow;
|
|
4661
|
-
}
|
|
4662
|
-
|
|
4663
4717
|
// src/theme/default/utils/user.ts
|
|
4664
4718
|
function isTraitsIndexable(traits) {
|
|
4665
4719
|
return typeof traits === "object" && traits !== null;
|
|
@@ -4702,10 +4756,10 @@ var getUserInitials = (session) => {
|
|
|
4702
4756
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
4703
4757
|
var import_react12 = require("react");
|
|
4704
4758
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
4705
|
-
var
|
|
4759
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4706
4760
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4707
4761
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4708
|
-
var DropdownMenuContent = (0, import_react12.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4762
|
+
var DropdownMenuContent = (0, import_react12.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4709
4763
|
DropdownMenuPrimitive.Content,
|
|
4710
4764
|
{
|
|
4711
4765
|
ref,
|
|
@@ -4720,7 +4774,7 @@ var DropdownMenuContent = (0, import_react12.forwardRef)(({ className, sideOffse
|
|
|
4720
4774
|
}
|
|
4721
4775
|
) }));
|
|
4722
4776
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4723
|
-
var DropdownMenuItem = (0, import_react12.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4777
|
+
var DropdownMenuItem = (0, import_react12.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4724
4778
|
DropdownMenuPrimitive.Item,
|
|
4725
4779
|
{
|
|
4726
4780
|
ref,
|
|
@@ -4738,7 +4792,7 @@ var DropdownMenuItem = (0, import_react12.forwardRef)(({ className, inset, ...pr
|
|
|
4738
4792
|
}
|
|
4739
4793
|
));
|
|
4740
4794
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4741
|
-
var DropdownMenuLabel = (0, import_react12.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4795
|
+
var DropdownMenuLabel = (0, import_react12.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
4742
4796
|
DropdownMenuPrimitive.Label,
|
|
4743
4797
|
{
|
|
4744
4798
|
ref,
|
|
@@ -4756,32 +4810,32 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
|
4756
4810
|
var import_react13 = require("react");
|
|
4757
4811
|
|
|
4758
4812
|
// src/theme/default/assets/icons/user.svg
|
|
4759
|
-
var
|
|
4760
|
-
var
|
|
4813
|
+
var React28 = __toESM(require("react"));
|
|
4814
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4761
4815
|
var SvgUser = (props) => {
|
|
4762
4816
|
var _a, _b;
|
|
4763
|
-
return /* @__PURE__ */ (0,
|
|
4817
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
|
|
4764
4818
|
};
|
|
4765
4819
|
var user_default = SvgUser;
|
|
4766
4820
|
|
|
4767
4821
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4768
|
-
var
|
|
4822
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4769
4823
|
var UserAvatar = (0, import_react13.forwardRef)(
|
|
4770
4824
|
({ initials, ...rest }, ref) => {
|
|
4771
|
-
return /* @__PURE__ */ (0,
|
|
4825
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4772
4826
|
"button",
|
|
4773
4827
|
{
|
|
4774
4828
|
ref,
|
|
4775
4829
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
4776
4830
|
...rest,
|
|
4777
|
-
children: /* @__PURE__ */ (0,
|
|
4831
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4778
4832
|
"img",
|
|
4779
4833
|
{
|
|
4780
4834
|
src: initials.avatar,
|
|
4781
4835
|
alt: initials.primary,
|
|
4782
4836
|
className: "w-full object-contain"
|
|
4783
4837
|
}
|
|
4784
|
-
) : /* @__PURE__ */ (0,
|
|
4838
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
4785
4839
|
user_default,
|
|
4786
4840
|
{
|
|
4787
4841
|
size: 24,
|
|
@@ -4795,27 +4849,27 @@ var UserAvatar = (0, import_react13.forwardRef)(
|
|
|
4795
4849
|
UserAvatar.displayName = "UserAvatar";
|
|
4796
4850
|
|
|
4797
4851
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4798
|
-
var
|
|
4852
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4799
4853
|
var UserMenu = ({ session }) => {
|
|
4800
4854
|
const { config } = (0, import_elements_react17.useOryFlow)();
|
|
4801
4855
|
const initials = getUserInitials(session);
|
|
4802
|
-
const logoutFlow = useClientLogout(config);
|
|
4803
|
-
return /* @__PURE__ */ (0,
|
|
4804
|
-
/* @__PURE__ */ (0,
|
|
4805
|
-
/* @__PURE__ */ (0,
|
|
4806
|
-
/* @__PURE__ */ (0,
|
|
4807
|
-
/* @__PURE__ */ (0,
|
|
4808
|
-
/* @__PURE__ */ (0,
|
|
4809
|
-
/* @__PURE__ */ (0,
|
|
4810
|
-
initials.secondary && /* @__PURE__ */ (0,
|
|
4856
|
+
const { logoutFlow } = useClientLogout(config);
|
|
4857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(DropdownMenu, { children: [
|
|
4858
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UserAvatar, { initials, title: "User Menu" }) }),
|
|
4859
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(DropdownMenuContent, { children: [
|
|
4860
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
4861
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(UserAvatar, { disabled: true, initials }),
|
|
4862
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
4863
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
4864
|
+
initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
4811
4865
|
] })
|
|
4812
4866
|
] }),
|
|
4813
|
-
/* @__PURE__ */ (0,
|
|
4814
|
-
/* @__PURE__ */ (0,
|
|
4867
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("a", { href: "/settings", children: [
|
|
4868
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(settings_default, { size: 16 }),
|
|
4815
4869
|
" User settings"
|
|
4816
4870
|
] }) }),
|
|
4817
|
-
/* @__PURE__ */ (0,
|
|
4818
|
-
/* @__PURE__ */ (0,
|
|
4871
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
4872
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(logout_default, { size: 16 }),
|
|
4819
4873
|
" Logout"
|
|
4820
4874
|
] }) })
|
|
4821
4875
|
] })
|
|
@@ -4824,14 +4878,37 @@ var UserMenu = ({ session }) => {
|
|
|
4824
4878
|
|
|
4825
4879
|
// src/theme/default/components/generic/page-header.tsx
|
|
4826
4880
|
var import_client7 = require("@ory/elements-react/client");
|
|
4827
|
-
var
|
|
4881
|
+
var import_react_intl22 = require("react-intl");
|
|
4882
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4828
4883
|
var DefaultPageHeader = (_props) => {
|
|
4884
|
+
var _a;
|
|
4829
4885
|
const { Card } = (0, import_elements_react18.useComponents)();
|
|
4830
4886
|
const { session } = (0, import_client7.useSession)();
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4887
|
+
const intl = (0, import_react_intl22.useIntl)();
|
|
4888
|
+
const { config, flow } = (0, import_elements_react18.useOryFlow)();
|
|
4889
|
+
const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
|
|
4890
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col gap-12", children: [
|
|
4891
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex max-h-10 flex-1 justify-between gap-2 items-center", children: [
|
|
4892
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Card.Logo, {}),
|
|
4893
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(UserMenu, { session })
|
|
4894
|
+
] }),
|
|
4895
|
+
returnUrl && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(
|
|
4896
|
+
"a",
|
|
4897
|
+
{
|
|
4898
|
+
"data-testid": "ory/screen/settings/back-button",
|
|
4899
|
+
href: returnUrl,
|
|
4900
|
+
className: "inline-flex gap-2 items-center",
|
|
4901
|
+
children: [
|
|
4902
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(arrow_left_default, {}),
|
|
4903
|
+
" ",
|
|
4904
|
+
intl.formatMessage({
|
|
4905
|
+
id: "settings.navigation-back-button",
|
|
4906
|
+
defaultMessage: "Back"
|
|
4907
|
+
})
|
|
4908
|
+
]
|
|
4909
|
+
}
|
|
4910
|
+
) })
|
|
4911
|
+
] }) });
|
|
4835
4912
|
};
|
|
4836
4913
|
|
|
4837
4914
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
@@ -4840,26 +4917,26 @@ var import_react_hook_form20 = require("react-hook-form");
|
|
|
4840
4917
|
var import_usehooks_ts2 = require("usehooks-ts");
|
|
4841
4918
|
|
|
4842
4919
|
// src/theme/default/assets/icons/trash.svg
|
|
4843
|
-
var
|
|
4844
|
-
var
|
|
4920
|
+
var React29 = __toESM(require("react"));
|
|
4921
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4845
4922
|
var SvgTrash = (props) => {
|
|
4846
4923
|
var _a, _b;
|
|
4847
|
-
return /* @__PURE__ */ (0,
|
|
4924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
|
|
4848
4925
|
};
|
|
4849
4926
|
var trash_default = SvgTrash;
|
|
4850
4927
|
|
|
4851
4928
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4852
|
-
var
|
|
4929
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4853
4930
|
function DefaultSettingsOidc({
|
|
4854
4931
|
linkButtons,
|
|
4855
4932
|
unlinkButtons
|
|
4856
4933
|
}) {
|
|
4857
4934
|
const hasLinkButtons = linkButtons.length > 0;
|
|
4858
4935
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
4859
|
-
return /* @__PURE__ */ (0,
|
|
4860
|
-
hasLinkButtons && /* @__PURE__ */ (0,
|
|
4936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
4937
|
+
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
4861
4938
|
const attrs = button.attributes;
|
|
4862
|
-
return /* @__PURE__ */ (0,
|
|
4939
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4863
4940
|
DefaultButtonSocial,
|
|
4864
4941
|
{
|
|
4865
4942
|
showLabel: true,
|
|
@@ -4870,17 +4947,17 @@ function DefaultSettingsOidc({
|
|
|
4870
4947
|
attrs.value
|
|
4871
4948
|
);
|
|
4872
4949
|
}) }),
|
|
4873
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0,
|
|
4950
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
4874
4951
|
unlinkButtons.map((button) => {
|
|
4875
4952
|
if (button.attributes.node_type !== "input") {
|
|
4876
4953
|
return null;
|
|
4877
4954
|
}
|
|
4878
|
-
return /* @__PURE__ */ (0,
|
|
4955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(UnlinkRow, { button }, button.attributes.value);
|
|
4879
4956
|
})
|
|
4880
4957
|
] });
|
|
4881
4958
|
}
|
|
4882
4959
|
function UnlinkRow({ button }) {
|
|
4883
|
-
var _a, _b;
|
|
4960
|
+
var _a, _b, _c;
|
|
4884
4961
|
const [clicked, setClicked] = (0, import_usehooks_ts2.useDebounceValue)(false, 100);
|
|
4885
4962
|
const {
|
|
4886
4963
|
formState: { isSubmitting }
|
|
@@ -4897,21 +4974,22 @@ function UnlinkRow({ button }) {
|
|
|
4897
4974
|
setClicked(false);
|
|
4898
4975
|
}
|
|
4899
4976
|
}, [isSubmitting, setClicked]);
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
/* @__PURE__ */ (0,
|
|
4977
|
+
console.log((_c = button.meta.label) == null ? void 0 : _c.context);
|
|
4978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex justify-between", children: [
|
|
4979
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
4980
|
+
Logo ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Logo, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(GenericLogo, { label: provider.slice(0, 1) }),
|
|
4981
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
4904
4982
|
] }),
|
|
4905
|
-
/* @__PURE__ */ (0,
|
|
4983
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4906
4984
|
"button",
|
|
4907
4985
|
{
|
|
4908
|
-
...attrs,
|
|
4986
|
+
...omitInputAttributes(attrs),
|
|
4909
4987
|
type: "submit",
|
|
4910
4988
|
onClick: localOnClick,
|
|
4911
4989
|
disabled: isSubmitting,
|
|
4912
4990
|
className: "relative",
|
|
4913
4991
|
title: `Unlink ${provider}`,
|
|
4914
|
-
children: clicked ? /* @__PURE__ */ (0,
|
|
4992
|
+
children: clicked ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
4915
4993
|
trash_default,
|
|
4916
4994
|
{
|
|
4917
4995
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -4926,7 +5004,7 @@ function UnlinkRow({ button }) {
|
|
|
4926
5004
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
4927
5005
|
var import_elements_react19 = require("@ory/elements-react");
|
|
4928
5006
|
var import_react_hook_form21 = require("react-hook-form");
|
|
4929
|
-
var
|
|
5007
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4930
5008
|
function DefaultSettingsPasskey({
|
|
4931
5009
|
triggerButton,
|
|
4932
5010
|
removeButtons
|
|
@@ -4936,8 +5014,8 @@ function DefaultSettingsPasskey({
|
|
|
4936
5014
|
} = (0, import_react_hook_form21.useFormContext)();
|
|
4937
5015
|
const { Node: Node2 } = (0, import_elements_react19.useComponents)();
|
|
4938
5016
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
4939
|
-
return /* @__PURE__ */ (0,
|
|
4940
|
-
/* @__PURE__ */ (0,
|
|
5017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5018
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4941
5019
|
Node2.Button,
|
|
4942
5020
|
{
|
|
4943
5021
|
node: triggerButton,
|
|
@@ -4945,38 +5023,38 @@ function DefaultSettingsPasskey({
|
|
|
4945
5023
|
onClick: triggerButton.onClick
|
|
4946
5024
|
}
|
|
4947
5025
|
) }),
|
|
4948
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
4949
|
-
/* @__PURE__ */ (0,
|
|
4950
|
-
/* @__PURE__ */ (0,
|
|
5026
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5027
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DefaultHorizontalDivider, {}),
|
|
5028
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
4951
5029
|
var _a, _b;
|
|
4952
5030
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
4953
5031
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
4954
5032
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
4955
5033
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
4956
|
-
return /* @__PURE__ */ (0,
|
|
5034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
|
|
4957
5035
|
"div",
|
|
4958
5036
|
{
|
|
4959
5037
|
className: "flex justify-between gap-6 md:items-center",
|
|
4960
5038
|
children: [
|
|
4961
|
-
/* @__PURE__ */ (0,
|
|
4962
|
-
/* @__PURE__ */ (0,
|
|
5039
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5040
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4963
5041
|
passkey_default,
|
|
4964
5042
|
{
|
|
4965
5043
|
size: 32,
|
|
4966
5044
|
className: "text-interface-foreground-default-primary"
|
|
4967
5045
|
}
|
|
4968
5046
|
),
|
|
4969
|
-
/* @__PURE__ */ (0,
|
|
4970
|
-
/* @__PURE__ */ (0,
|
|
4971
|
-
/* @__PURE__ */ (0,
|
|
4972
|
-
/* @__PURE__ */ (0,
|
|
5047
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5048
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
|
|
5049
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5050
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
4973
5051
|
] }),
|
|
4974
|
-
addedAt && /* @__PURE__ */ (0,
|
|
5052
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
4975
5053
|
dateStyle: "long"
|
|
4976
5054
|
}).format(new Date(addedAt)) })
|
|
4977
5055
|
] })
|
|
4978
5056
|
] }),
|
|
4979
|
-
/* @__PURE__ */ (0,
|
|
5057
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4980
5058
|
"button",
|
|
4981
5059
|
{
|
|
4982
5060
|
...node.attributes,
|
|
@@ -4984,7 +5062,7 @@ function DefaultSettingsPasskey({
|
|
|
4984
5062
|
onClick: node.onClick,
|
|
4985
5063
|
disabled: isSubmitting,
|
|
4986
5064
|
className: "relative",
|
|
4987
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5065
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4988
5066
|
trash_default,
|
|
4989
5067
|
{
|
|
4990
5068
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5003,26 +5081,26 @@ function DefaultSettingsPasskey({
|
|
|
5003
5081
|
}
|
|
5004
5082
|
|
|
5005
5083
|
// src/theme/default/assets/icons/download.svg
|
|
5006
|
-
var
|
|
5007
|
-
var
|
|
5084
|
+
var React30 = __toESM(require("react"));
|
|
5085
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5008
5086
|
var SvgDownload = (props) => {
|
|
5009
5087
|
var _a, _b;
|
|
5010
|
-
return /* @__PURE__ */ (0,
|
|
5088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
|
|
5011
5089
|
};
|
|
5012
5090
|
var download_default = SvgDownload;
|
|
5013
5091
|
|
|
5014
5092
|
// src/theme/default/assets/icons/refresh.svg
|
|
5015
|
-
var
|
|
5016
|
-
var
|
|
5093
|
+
var React31 = __toESM(require("react"));
|
|
5094
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5017
5095
|
var SvgRefresh = (props) => {
|
|
5018
5096
|
var _a, _b;
|
|
5019
|
-
return /* @__PURE__ */ (0,
|
|
5097
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
|
|
5020
5098
|
};
|
|
5021
5099
|
var refresh_default = SvgRefresh;
|
|
5022
5100
|
|
|
5023
5101
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
5024
5102
|
var import_react_hook_form22 = require("react-hook-form");
|
|
5025
|
-
var
|
|
5103
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5026
5104
|
function DefaultSettingsRecoveryCodes({
|
|
5027
5105
|
codes,
|
|
5028
5106
|
regnerateButton,
|
|
@@ -5044,12 +5122,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5044
5122
|
element.click();
|
|
5045
5123
|
};
|
|
5046
5124
|
const hasCodes = codes.length >= 1;
|
|
5047
|
-
return /* @__PURE__ */ (0,
|
|
5048
|
-
codes.length > 0 && /* @__PURE__ */ (0,
|
|
5049
|
-
/* @__PURE__ */ (0,
|
|
5050
|
-
/* @__PURE__ */ (0,
|
|
5051
|
-
/* @__PURE__ */ (0,
|
|
5052
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0,
|
|
5125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5126
|
+
codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(DefaultHorizontalDivider, {}),
|
|
5127
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex gap-4 justify-between", children: [
|
|
5128
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: "flex gap-2", children: [
|
|
5130
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5053
5131
|
"button",
|
|
5054
5132
|
{
|
|
5055
5133
|
...regnerateButton.attributes,
|
|
@@ -5058,7 +5136,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5058
5136
|
onClick: onRegenerate,
|
|
5059
5137
|
disabled: isSubmitting,
|
|
5060
5138
|
"data-loading": isSubmitting,
|
|
5061
|
-
children: /* @__PURE__ */ (0,
|
|
5139
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5062
5140
|
refresh_default,
|
|
5063
5141
|
{
|
|
5064
5142
|
size: 24,
|
|
@@ -5067,7 +5145,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5067
5145
|
)
|
|
5068
5146
|
}
|
|
5069
5147
|
),
|
|
5070
|
-
revealButton && /* @__PURE__ */ (0,
|
|
5148
|
+
revealButton && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_jsx_runtime92.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5071
5149
|
"button",
|
|
5072
5150
|
{
|
|
5073
5151
|
...revealButton.attributes,
|
|
@@ -5075,7 +5153,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5075
5153
|
className: "ml-auto",
|
|
5076
5154
|
onClick: onReveal,
|
|
5077
5155
|
title: "Reveal recovery codes",
|
|
5078
|
-
children: /* @__PURE__ */ (0,
|
|
5156
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5079
5157
|
eye_default,
|
|
5080
5158
|
{
|
|
5081
5159
|
size: 24,
|
|
@@ -5084,7 +5162,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5084
5162
|
)
|
|
5085
5163
|
}
|
|
5086
5164
|
) }),
|
|
5087
|
-
hasCodes && /* @__PURE__ */ (0,
|
|
5165
|
+
hasCodes && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5088
5166
|
"button",
|
|
5089
5167
|
{
|
|
5090
5168
|
onClick: onDownload,
|
|
@@ -5092,7 +5170,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5092
5170
|
className: "ml-auto",
|
|
5093
5171
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
5094
5172
|
title: "Download recovery codes",
|
|
5095
|
-
children: /* @__PURE__ */ (0,
|
|
5173
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5096
5174
|
download_default,
|
|
5097
5175
|
{
|
|
5098
5176
|
size: 24,
|
|
@@ -5103,12 +5181,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5103
5181
|
)
|
|
5104
5182
|
] })
|
|
5105
5183
|
] }),
|
|
5106
|
-
hasCodes ? /* @__PURE__ */ (0,
|
|
5184
|
+
hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
|
|
5107
5185
|
"div",
|
|
5108
5186
|
{
|
|
5109
5187
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
5110
5188
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
5111
|
-
children: codes.map((code) => /* @__PURE__ */ (0,
|
|
5189
|
+
children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("p", { children: code }, code))
|
|
5112
5190
|
}
|
|
5113
5191
|
) }) : null
|
|
5114
5192
|
] });
|
|
@@ -5118,17 +5196,17 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5118
5196
|
var import_elements_react20 = require("@ory/elements-react");
|
|
5119
5197
|
|
|
5120
5198
|
// src/theme/default/assets/icons/qrcode.svg
|
|
5121
|
-
var
|
|
5122
|
-
var
|
|
5199
|
+
var React32 = __toESM(require("react"));
|
|
5200
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5123
5201
|
var SvgQrcode = (props) => {
|
|
5124
5202
|
var _a, _b;
|
|
5125
|
-
return /* @__PURE__ */ (0,
|
|
5203
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
5126
5204
|
};
|
|
5127
5205
|
var qrcode_default = SvgQrcode;
|
|
5128
5206
|
|
|
5129
5207
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
5130
5208
|
var import_react_hook_form23 = require("react-hook-form");
|
|
5131
|
-
var
|
|
5209
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5132
5210
|
function DefaultSettingsTotp({
|
|
5133
5211
|
totpImage,
|
|
5134
5212
|
totpInput,
|
|
@@ -5148,19 +5226,19 @@ function DefaultSettingsTotp({
|
|
|
5148
5226
|
node_type: _ignoredNodeType,
|
|
5149
5227
|
...buttonAttrs
|
|
5150
5228
|
} = totpUnlink.attributes;
|
|
5151
|
-
return /* @__PURE__ */ (0,
|
|
5152
|
-
/* @__PURE__ */ (0,
|
|
5153
|
-
/* @__PURE__ */ (0,
|
|
5154
|
-
/* @__PURE__ */ (0,
|
|
5155
|
-
/* @__PURE__ */ (0,
|
|
5156
|
-
/* @__PURE__ */ (0,
|
|
5229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5230
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Card.Divider, {}) }),
|
|
5231
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
5232
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(qrcode_default, { size: 32 }) }),
|
|
5233
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
5234
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5157
5235
|
"button",
|
|
5158
5236
|
{
|
|
5159
5237
|
type: type === "button" ? "button" : "submit",
|
|
5160
5238
|
...buttonAttrs,
|
|
5161
5239
|
onClick: onUnlink,
|
|
5162
5240
|
disabled: isSubmitting,
|
|
5163
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5241
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5164
5242
|
trash_default,
|
|
5165
5243
|
{
|
|
5166
5244
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5173,9 +5251,9 @@ function DefaultSettingsTotp({
|
|
|
5173
5251
|
] });
|
|
5174
5252
|
}
|
|
5175
5253
|
if (totpImage && totpSecret && totpInput) {
|
|
5176
|
-
return /* @__PURE__ */ (0,
|
|
5177
|
-
/* @__PURE__ */ (0,
|
|
5178
|
-
/* @__PURE__ */ (0,
|
|
5254
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5255
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(DefaultHorizontalDivider, {}) }),
|
|
5256
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5179
5257
|
Node2.Image,
|
|
5180
5258
|
{
|
|
5181
5259
|
node: totpImage,
|
|
@@ -5184,13 +5262,13 @@ function DefaultSettingsTotp({
|
|
|
5184
5262
|
}
|
|
5185
5263
|
}
|
|
5186
5264
|
) }) }) }),
|
|
5187
|
-
/* @__PURE__ */ (0,
|
|
5188
|
-
/* @__PURE__ */ (0,
|
|
5265
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
5266
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5189
5267
|
Node2.Label,
|
|
5190
5268
|
{
|
|
5191
5269
|
node: totpSecret,
|
|
5192
5270
|
attributes: totpSecret.attributes,
|
|
5193
|
-
children: /* @__PURE__ */ (0,
|
|
5271
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "relative flex justify-stretch max-w-[488px]", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5194
5272
|
"input",
|
|
5195
5273
|
{
|
|
5196
5274
|
disabled: true,
|
|
@@ -5203,12 +5281,12 @@ function DefaultSettingsTotp({
|
|
|
5203
5281
|
) })
|
|
5204
5282
|
}
|
|
5205
5283
|
),
|
|
5206
|
-
/* @__PURE__ */ (0,
|
|
5284
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5207
5285
|
Node2.Label,
|
|
5208
5286
|
{
|
|
5209
5287
|
attributes: totpInput.attributes,
|
|
5210
5288
|
node: totpInput,
|
|
5211
|
-
children: /* @__PURE__ */ (0,
|
|
5289
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
5212
5290
|
Node2.CodeInput,
|
|
5213
5291
|
{
|
|
5214
5292
|
node: totpInput,
|
|
@@ -5226,17 +5304,17 @@ function DefaultSettingsTotp({
|
|
|
5226
5304
|
var import_elements_react21 = require("@ory/elements-react");
|
|
5227
5305
|
|
|
5228
5306
|
// src/theme/default/assets/icons/key.svg
|
|
5229
|
-
var
|
|
5230
|
-
var
|
|
5307
|
+
var React33 = __toESM(require("react"));
|
|
5308
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5231
5309
|
var SvgKey = (props) => {
|
|
5232
5310
|
var _a, _b;
|
|
5233
|
-
return /* @__PURE__ */ (0,
|
|
5311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
|
|
5234
5312
|
};
|
|
5235
5313
|
var key_default = SvgKey;
|
|
5236
5314
|
|
|
5237
5315
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
5238
5316
|
var import_react_hook_form24 = require("react-hook-form");
|
|
5239
|
-
var
|
|
5317
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5240
5318
|
function DefaultSettingsWebauthn({
|
|
5241
5319
|
nameInput,
|
|
5242
5320
|
triggerButton,
|
|
@@ -5247,14 +5325,14 @@ function DefaultSettingsWebauthn({
|
|
|
5247
5325
|
} = (0, import_react_hook_form24.useFormContext)();
|
|
5248
5326
|
const { Node: Node2, Card } = (0, import_elements_react21.useComponents)();
|
|
5249
5327
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5250
|
-
return /* @__PURE__ */ (0,
|
|
5251
|
-
/* @__PURE__ */ (0,
|
|
5252
|
-
/* @__PURE__ */ (0,
|
|
5328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5329
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
5330
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5253
5331
|
Node2.Label,
|
|
5254
5332
|
{
|
|
5255
5333
|
node: nameInput,
|
|
5256
5334
|
attributes: nameInput.attributes,
|
|
5257
|
-
children: /* @__PURE__ */ (0,
|
|
5335
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5258
5336
|
Node2.Input,
|
|
5259
5337
|
{
|
|
5260
5338
|
node: nameInput,
|
|
@@ -5263,7 +5341,7 @@ function DefaultSettingsWebauthn({
|
|
|
5263
5341
|
)
|
|
5264
5342
|
}
|
|
5265
5343
|
) }),
|
|
5266
|
-
triggerButton ? /* @__PURE__ */ (0,
|
|
5344
|
+
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5267
5345
|
Node2.Button,
|
|
5268
5346
|
{
|
|
5269
5347
|
node: triggerButton,
|
|
@@ -5272,38 +5350,38 @@ function DefaultSettingsWebauthn({
|
|
|
5272
5350
|
}
|
|
5273
5351
|
) : null
|
|
5274
5352
|
] }),
|
|
5275
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
5276
|
-
/* @__PURE__ */ (0,
|
|
5277
|
-
/* @__PURE__ */ (0,
|
|
5353
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5354
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Card.Divider, {}),
|
|
5355
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
5278
5356
|
var _a, _b;
|
|
5279
5357
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5280
5358
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
5281
5359
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
5282
5360
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
5283
|
-
return /* @__PURE__ */ (0,
|
|
5361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
5284
5362
|
"div",
|
|
5285
5363
|
{
|
|
5286
5364
|
className: "flex justify-between gap-6 md:items-center",
|
|
5287
5365
|
children: [
|
|
5288
|
-
/* @__PURE__ */ (0,
|
|
5289
|
-
/* @__PURE__ */ (0,
|
|
5366
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5367
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5290
5368
|
key_default,
|
|
5291
5369
|
{
|
|
5292
5370
|
size: 32,
|
|
5293
5371
|
className: "text-interface-foreground-default-primary"
|
|
5294
5372
|
}
|
|
5295
5373
|
),
|
|
5296
|
-
/* @__PURE__ */ (0,
|
|
5297
|
-
/* @__PURE__ */ (0,
|
|
5298
|
-
/* @__PURE__ */ (0,
|
|
5299
|
-
/* @__PURE__ */ (0,
|
|
5374
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5375
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5377
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5300
5378
|
] }),
|
|
5301
|
-
addedAt && /* @__PURE__ */ (0,
|
|
5379
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5302
5380
|
dateStyle: "long"
|
|
5303
5381
|
}).format(new Date(addedAt)) })
|
|
5304
5382
|
] })
|
|
5305
5383
|
] }),
|
|
5306
|
-
/* @__PURE__ */ (0,
|
|
5384
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5307
5385
|
"button",
|
|
5308
5386
|
{
|
|
5309
5387
|
...node.attributes,
|
|
@@ -5311,7 +5389,7 @@ function DefaultSettingsWebauthn({
|
|
|
5311
5389
|
onClick: node.onClick,
|
|
5312
5390
|
disabled: isSubmitting,
|
|
5313
5391
|
className: "relative",
|
|
5314
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5392
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
5315
5393
|
trash_default,
|
|
5316
5394
|
{
|
|
5317
5395
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5330,34 +5408,34 @@ function DefaultSettingsWebauthn({
|
|
|
5330
5408
|
}
|
|
5331
5409
|
|
|
5332
5410
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
5333
|
-
var
|
|
5411
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5334
5412
|
function DefaultAuthMethodListContainer({
|
|
5335
5413
|
children
|
|
5336
5414
|
}) {
|
|
5337
|
-
return /* @__PURE__ */ (0,
|
|
5415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
|
|
5338
5416
|
}
|
|
5339
5417
|
|
|
5340
5418
|
// src/theme/default/components/form/captcha.tsx
|
|
5341
|
-
var
|
|
5419
|
+
var import_client_fetch39 = require("@ory/client-fetch");
|
|
5342
5420
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
5343
5421
|
var import_react15 = require("react");
|
|
5344
5422
|
var import_react_hook_form25 = require("react-hook-form");
|
|
5345
|
-
var
|
|
5423
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5346
5424
|
var DefaultCaptcha = ({ node }) => {
|
|
5347
5425
|
const { setValue } = (0, import_react_hook_form25.useFormContext)();
|
|
5348
5426
|
const ref = (0, import_react15.useRef)();
|
|
5349
5427
|
const nodes = [];
|
|
5350
|
-
if ((0,
|
|
5428
|
+
if ((0, import_client_fetch39.isUiNodeInputAttributes)(node.attributes)) {
|
|
5351
5429
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
5352
5430
|
nodes.push(
|
|
5353
|
-
/* @__PURE__ */ (0,
|
|
5431
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(DefaultInput, { node, attributes: node.attributes }, 1)
|
|
5354
5432
|
);
|
|
5355
5433
|
}
|
|
5356
5434
|
}
|
|
5357
|
-
if ((0,
|
|
5435
|
+
if ((0, import_client_fetch39.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
5358
5436
|
const options = JSON.parse(node.attributes.value);
|
|
5359
5437
|
nodes.push(
|
|
5360
|
-
/* @__PURE__ */ (0,
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
5361
5439
|
import_react_turnstile.Turnstile,
|
|
5362
5440
|
{
|
|
5363
5441
|
ref,
|
|
@@ -5385,36 +5463,36 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
5385
5463
|
};
|
|
5386
5464
|
|
|
5387
5465
|
// src/theme/default/assets/icons/personal.svg
|
|
5388
|
-
var
|
|
5389
|
-
var
|
|
5466
|
+
var React34 = __toESM(require("react"));
|
|
5467
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5390
5468
|
var SvgPersonal = (props) => {
|
|
5391
5469
|
var _a, _b;
|
|
5392
|
-
return /* @__PURE__ */ (0,
|
|
5470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
|
|
5393
5471
|
};
|
|
5394
5472
|
var personal_default = SvgPersonal;
|
|
5395
5473
|
|
|
5396
5474
|
// src/theme/default/assets/icons/message.svg
|
|
5397
|
-
var
|
|
5398
|
-
var
|
|
5475
|
+
var React35 = __toESM(require("react"));
|
|
5476
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
5399
5477
|
var SvgMessage = (props) => {
|
|
5400
5478
|
var _a, _b;
|
|
5401
|
-
return /* @__PURE__ */ (0,
|
|
5479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
|
|
5402
5480
|
};
|
|
5403
5481
|
var message_default = SvgMessage;
|
|
5404
5482
|
|
|
5405
5483
|
// src/theme/default/assets/icons/phone.svg
|
|
5406
|
-
var
|
|
5407
|
-
var
|
|
5484
|
+
var React36 = __toESM(require("react"));
|
|
5485
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5408
5486
|
var SvgPhone = (props) => {
|
|
5409
5487
|
var _a, _b;
|
|
5410
|
-
return /* @__PURE__ */ (0,
|
|
5488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
|
|
5411
5489
|
};
|
|
5412
5490
|
var phone_default = SvgPhone;
|
|
5413
5491
|
|
|
5414
5492
|
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
5415
|
-
var
|
|
5493
|
+
var import_react_intl23 = require("react-intl");
|
|
5416
5494
|
var Switch = __toESM(require("@radix-ui/react-switch"));
|
|
5417
|
-
var
|
|
5495
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5418
5496
|
var ScopeIcons = {
|
|
5419
5497
|
openid: personal_default,
|
|
5420
5498
|
offline_access: personal_default,
|
|
@@ -5427,9 +5505,9 @@ function DefaultConsentScopeCheckbox({
|
|
|
5427
5505
|
onCheckedChange
|
|
5428
5506
|
}) {
|
|
5429
5507
|
var _a;
|
|
5430
|
-
const intl = (0,
|
|
5508
|
+
const intl = (0, import_react_intl23.useIntl)();
|
|
5431
5509
|
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
5432
|
-
return /* @__PURE__ */ (0,
|
|
5510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
5433
5511
|
ListItem,
|
|
5434
5512
|
{
|
|
5435
5513
|
as: "label",
|
|
@@ -5444,7 +5522,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5444
5522
|
}),
|
|
5445
5523
|
className: "col-span-2",
|
|
5446
5524
|
"data-testid": "ory/screen/consent/scope-checkbox-label",
|
|
5447
|
-
children: /* @__PURE__ */ (0,
|
|
5525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
5448
5526
|
Switch.Root,
|
|
5449
5527
|
{
|
|
5450
5528
|
className: "relative w-7 h-4 bg-toggle-background-default rounded-identifier border-toggle-border-default border p-[3px] data-[state=checked]:bg-toggle-background-checked transition-all data-[state=checked]:border-toggle-border-checked",
|
|
@@ -5452,7 +5530,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5452
5530
|
value: attributes.value,
|
|
5453
5531
|
onCheckedChange,
|
|
5454
5532
|
defaultChecked: true,
|
|
5455
|
-
children: /* @__PURE__ */ (0,
|
|
5533
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
|
|
5456
5534
|
}
|
|
5457
5535
|
)
|
|
5458
5536
|
}
|
|
@@ -5510,10 +5588,10 @@ function getOryComponents(overrides) {
|
|
|
5510
5588
|
}
|
|
5511
5589
|
|
|
5512
5590
|
// src/theme/default/flows/error.tsx
|
|
5513
|
-
var
|
|
5591
|
+
var import_client_fetch40 = require("@ory/client-fetch");
|
|
5514
5592
|
var import_react16 = require("react");
|
|
5515
|
-
var
|
|
5516
|
-
var
|
|
5593
|
+
var import_react_intl24 = require("react-intl");
|
|
5594
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5517
5595
|
function isOAuth2Error(error) {
|
|
5518
5596
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5519
5597
|
}
|
|
@@ -5532,14 +5610,14 @@ function useStandardize(error) {
|
|
|
5532
5610
|
timestamp: /* @__PURE__ */ new Date()
|
|
5533
5611
|
};
|
|
5534
5612
|
}
|
|
5535
|
-
if ((0,
|
|
5613
|
+
if ((0, import_client_fetch40.instanceOfFlowError)(error)) {
|
|
5536
5614
|
const parsed = error.error;
|
|
5537
5615
|
return {
|
|
5538
5616
|
...parsed,
|
|
5539
5617
|
id: error.id,
|
|
5540
5618
|
timestamp: error.created_at
|
|
5541
5619
|
};
|
|
5542
|
-
} else if (error.error && (0,
|
|
5620
|
+
} else if (error.error && (0, import_client_fetch40.instanceOfGenericError)(error.error)) {
|
|
5543
5621
|
return {
|
|
5544
5622
|
code: (_a = error.error.code) != null ? _a : 500,
|
|
5545
5623
|
message: error.error.message,
|
|
@@ -5566,47 +5644,47 @@ function Error2({
|
|
|
5566
5644
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5567
5645
|
const parsed = useStandardize(error);
|
|
5568
5646
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5569
|
-
return /* @__PURE__ */ (0,
|
|
5647
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5570
5648
|
IntlProvider,
|
|
5571
5649
|
{
|
|
5572
5650
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5573
5651
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5574
|
-
children: /* @__PURE__ */ (0,
|
|
5652
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
5575
5653
|
"div",
|
|
5576
5654
|
{
|
|
5577
5655
|
className: "flex flex-col gap-6 antialiased",
|
|
5578
5656
|
"data-testid": "ory/screen/error",
|
|
5579
5657
|
children: [
|
|
5580
|
-
/* @__PURE__ */ (0,
|
|
5581
|
-
/* @__PURE__ */ (0,
|
|
5582
|
-
/* @__PURE__ */ (0,
|
|
5583
|
-
/* @__PURE__ */ (0,
|
|
5584
|
-
/* @__PURE__ */ (0,
|
|
5585
|
-
parsed.reason && /* @__PURE__ */ (0,
|
|
5658
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5659
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(ErrorLogo, { config }),
|
|
5660
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
5661
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5662
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5663
|
+
parsed.reason && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5586
5664
|
] })
|
|
5587
5665
|
] }),
|
|
5588
|
-
/* @__PURE__ */ (0,
|
|
5589
|
-
/* @__PURE__ */ (0,
|
|
5590
|
-
/* @__PURE__ */ (0,
|
|
5591
|
-
/* @__PURE__ */ (0,
|
|
5592
|
-
/* @__PURE__ */ (0,
|
|
5666
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Divider, {}),
|
|
5667
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
5668
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "error.title.what-can-i-do" }) }),
|
|
5669
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "error.instructions" }) }),
|
|
5670
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { children: session ? /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(LoggedInActions, { config }) : /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(GoBackButton, { config }) })
|
|
5593
5671
|
] }),
|
|
5594
|
-
/* @__PURE__ */ (0,
|
|
5595
|
-
/* @__PURE__ */ (0,
|
|
5596
|
-
/* @__PURE__ */ (0,
|
|
5597
|
-
parsed.id && /* @__PURE__ */ (0,
|
|
5672
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Divider, {}),
|
|
5673
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5674
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "error.footer.text" }) }),
|
|
5675
|
+
parsed.id && /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5598
5676
|
"ID: ",
|
|
5599
|
-
/* @__PURE__ */ (0,
|
|
5677
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("code", { children: parsed.id })
|
|
5600
5678
|
] }),
|
|
5601
|
-
/* @__PURE__ */ (0,
|
|
5679
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5602
5680
|
"Time: ",
|
|
5603
|
-
/* @__PURE__ */ (0,
|
|
5681
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5604
5682
|
] }),
|
|
5605
|
-
/* @__PURE__ */ (0,
|
|
5683
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5606
5684
|
"Message: ",
|
|
5607
|
-
/* @__PURE__ */ (0,
|
|
5685
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("code", { children: parsed.reason })
|
|
5608
5686
|
] }),
|
|
5609
|
-
/* @__PURE__ */ (0,
|
|
5687
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5610
5688
|
"button",
|
|
5611
5689
|
{
|
|
5612
5690
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5618,7 +5696,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5618
5696
|
`;
|
|
5619
5697
|
void navigator.clipboard.writeText(text);
|
|
5620
5698
|
},
|
|
5621
|
-
children: /* @__PURE__ */ (0,
|
|
5699
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "error.footer.copy" })
|
|
5622
5700
|
}
|
|
5623
5701
|
) })
|
|
5624
5702
|
] })
|
|
@@ -5629,40 +5707,52 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5629
5707
|
);
|
|
5630
5708
|
}
|
|
5631
5709
|
function LoggedInActions({ config }) {
|
|
5632
|
-
const logoutFlow = useClientLogout(config);
|
|
5633
|
-
return /* @__PURE__ */ (0,
|
|
5710
|
+
const { logoutFlow } = useClientLogout(config);
|
|
5711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5634
5712
|
"a",
|
|
5635
5713
|
{
|
|
5636
5714
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
5637
5715
|
className: "text-interface-foreground-default-primary underline",
|
|
5638
|
-
children: "
|
|
5716
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "login.logout-button" })
|
|
5639
5717
|
}
|
|
5640
5718
|
);
|
|
5641
5719
|
}
|
|
5642
5720
|
function GoBackButton({ config }) {
|
|
5643
5721
|
if ("default_redirect_url" in config.project) {
|
|
5644
|
-
return /* @__PURE__ */ (0,
|
|
5722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5645
5723
|
"a",
|
|
5646
5724
|
{
|
|
5647
5725
|
className: "text-interface-foreground-default-primary underline",
|
|
5648
5726
|
href: config.project.default_redirect_url,
|
|
5649
|
-
children: /* @__PURE__ */ (0,
|
|
5727
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl24.FormattedMessage, { id: "error.action.go-back" })
|
|
5650
5728
|
}
|
|
5651
5729
|
);
|
|
5652
5730
|
}
|
|
5653
5731
|
return null;
|
|
5654
5732
|
}
|
|
5655
5733
|
function ErrorLogo({ config }) {
|
|
5734
|
+
var _a;
|
|
5735
|
+
if (config.project.logo_light_url) {
|
|
5736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5737
|
+
"img",
|
|
5738
|
+
{
|
|
5739
|
+
src: config.project.logo_light_url,
|
|
5740
|
+
width: 100,
|
|
5741
|
+
height: 36,
|
|
5742
|
+
alt: "Logo"
|
|
5743
|
+
}
|
|
5744
|
+
);
|
|
5745
|
+
}
|
|
5656
5746
|
if (config.logoUrl) {
|
|
5657
|
-
return /* @__PURE__ */ (0,
|
|
5747
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
5658
5748
|
}
|
|
5659
|
-
return /* @__PURE__ */ (0,
|
|
5749
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = config.project.name) != null ? _a : config.name });
|
|
5660
5750
|
}
|
|
5661
5751
|
|
|
5662
5752
|
// src/theme/default/flows/login.tsx
|
|
5663
|
-
var
|
|
5753
|
+
var import_client_fetch41 = require("@ory/client-fetch");
|
|
5664
5754
|
var import_elements_react22 = require("@ory/elements-react");
|
|
5665
|
-
var
|
|
5755
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5666
5756
|
function Login({
|
|
5667
5757
|
flow,
|
|
5668
5758
|
config,
|
|
@@ -5670,22 +5760,22 @@ function Login({
|
|
|
5670
5760
|
components: flowOverrideComponents
|
|
5671
5761
|
}) {
|
|
5672
5762
|
const components = getOryComponents(flowOverrideComponents);
|
|
5673
|
-
return /* @__PURE__ */ (0,
|
|
5763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5674
5764
|
import_elements_react22.OryProvider,
|
|
5675
5765
|
{
|
|
5676
5766
|
config,
|
|
5677
5767
|
flow,
|
|
5678
|
-
flowType:
|
|
5768
|
+
flowType: import_client_fetch41.FlowType.Login,
|
|
5679
5769
|
components,
|
|
5680
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5770
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_elements_react22.OryTwoStepCard, {})
|
|
5681
5771
|
}
|
|
5682
5772
|
);
|
|
5683
5773
|
}
|
|
5684
5774
|
|
|
5685
5775
|
// src/theme/default/flows/recovery.tsx
|
|
5686
|
-
var
|
|
5776
|
+
var import_client_fetch42 = require("@ory/client-fetch");
|
|
5687
5777
|
var import_elements_react23 = require("@ory/elements-react");
|
|
5688
|
-
var
|
|
5778
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5689
5779
|
function Recovery({
|
|
5690
5780
|
flow,
|
|
5691
5781
|
config,
|
|
@@ -5693,22 +5783,22 @@ function Recovery({
|
|
|
5693
5783
|
components: flowOverrideComponents
|
|
5694
5784
|
}) {
|
|
5695
5785
|
const components = getOryComponents(flowOverrideComponents);
|
|
5696
|
-
return /* @__PURE__ */ (0,
|
|
5786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
5697
5787
|
import_elements_react23.OryProvider,
|
|
5698
5788
|
{
|
|
5699
5789
|
config,
|
|
5700
5790
|
flow,
|
|
5701
|
-
flowType:
|
|
5791
|
+
flowType: import_client_fetch42.FlowType.Recovery,
|
|
5702
5792
|
components,
|
|
5703
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5793
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
5704
5794
|
}
|
|
5705
5795
|
);
|
|
5706
5796
|
}
|
|
5707
5797
|
|
|
5708
5798
|
// src/theme/default/flows/registration.tsx
|
|
5709
|
-
var
|
|
5799
|
+
var import_client_fetch43 = require("@ory/client-fetch");
|
|
5710
5800
|
var import_elements_react24 = require("@ory/elements-react");
|
|
5711
|
-
var
|
|
5801
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
5712
5802
|
function Registration({
|
|
5713
5803
|
flow,
|
|
5714
5804
|
children,
|
|
@@ -5716,22 +5806,22 @@ function Registration({
|
|
|
5716
5806
|
config
|
|
5717
5807
|
}) {
|
|
5718
5808
|
const components = getOryComponents(flowOverrideComponents);
|
|
5719
|
-
return /* @__PURE__ */ (0,
|
|
5809
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5720
5810
|
import_elements_react24.OryProvider,
|
|
5721
5811
|
{
|
|
5722
5812
|
config,
|
|
5723
5813
|
flow,
|
|
5724
|
-
flowType:
|
|
5814
|
+
flowType: import_client_fetch43.FlowType.Registration,
|
|
5725
5815
|
components,
|
|
5726
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5816
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react24.OryTwoStepCard, {})
|
|
5727
5817
|
}
|
|
5728
5818
|
);
|
|
5729
5819
|
}
|
|
5730
5820
|
|
|
5731
5821
|
// src/theme/default/flows/settings.tsx
|
|
5732
|
-
var
|
|
5822
|
+
var import_client_fetch44 = require("@ory/client-fetch");
|
|
5733
5823
|
var import_elements_react25 = require("@ory/elements-react");
|
|
5734
|
-
var
|
|
5824
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
5735
5825
|
function Settings({
|
|
5736
5826
|
flow,
|
|
5737
5827
|
config,
|
|
@@ -5739,25 +5829,25 @@ function Settings({
|
|
|
5739
5829
|
components: flowOverrideComponents
|
|
5740
5830
|
}) {
|
|
5741
5831
|
const components = getOryComponents(flowOverrideComponents);
|
|
5742
|
-
return /* @__PURE__ */ (0,
|
|
5832
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5743
5833
|
import_elements_react25.OryProvider,
|
|
5744
5834
|
{
|
|
5745
5835
|
config,
|
|
5746
5836
|
flow,
|
|
5747
|
-
flowType:
|
|
5837
|
+
flowType: import_client_fetch44.FlowType.Settings,
|
|
5748
5838
|
components,
|
|
5749
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5750
|
-
/* @__PURE__ */ (0,
|
|
5751
|
-
/* @__PURE__ */ (0,
|
|
5839
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(import_jsx_runtime107.Fragment, { children: [
|
|
5840
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_elements_react25.HeadlessPageHeader, {}),
|
|
5841
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_elements_react25.OrySettingsCard, {})
|
|
5752
5842
|
] })
|
|
5753
5843
|
}
|
|
5754
5844
|
);
|
|
5755
5845
|
}
|
|
5756
5846
|
|
|
5757
5847
|
// src/theme/default/flows/verification.tsx
|
|
5758
|
-
var
|
|
5848
|
+
var import_client_fetch45 = require("@ory/client-fetch");
|
|
5759
5849
|
var import_elements_react26 = require("@ory/elements-react");
|
|
5760
|
-
var
|
|
5850
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
5761
5851
|
function Verification({
|
|
5762
5852
|
flow,
|
|
5763
5853
|
config,
|
|
@@ -5765,24 +5855,24 @@ function Verification({
|
|
|
5765
5855
|
components: flowOverrideComponents
|
|
5766
5856
|
}) {
|
|
5767
5857
|
const components = getOryComponents(flowOverrideComponents);
|
|
5768
|
-
return /* @__PURE__ */ (0,
|
|
5858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5769
5859
|
import_elements_react26.OryProvider,
|
|
5770
5860
|
{
|
|
5771
5861
|
config,
|
|
5772
5862
|
flow,
|
|
5773
|
-
flowType:
|
|
5863
|
+
flowType: import_client_fetch45.FlowType.Verification,
|
|
5774
5864
|
components,
|
|
5775
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5865
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_elements_react26.OryTwoStepCard, {})
|
|
5776
5866
|
}
|
|
5777
5867
|
);
|
|
5778
5868
|
}
|
|
5779
5869
|
|
|
5780
5870
|
// src/theme/default/flows/consent.tsx
|
|
5781
|
-
var
|
|
5871
|
+
var import_client_fetch47 = require("@ory/client-fetch");
|
|
5782
5872
|
var import_elements_react27 = require("@ory/elements-react");
|
|
5783
5873
|
|
|
5784
5874
|
// src/theme/default/utils/oauth2.ts
|
|
5785
|
-
var
|
|
5875
|
+
var import_client_fetch46 = require("@ory/client-fetch");
|
|
5786
5876
|
var rememberCheckbox = {
|
|
5787
5877
|
type: "input",
|
|
5788
5878
|
group: "oauth2_consent",
|
|
@@ -5790,7 +5880,7 @@ var rememberCheckbox = {
|
|
|
5790
5880
|
label: {
|
|
5791
5881
|
id: 9999111,
|
|
5792
5882
|
text: "Remember my decision",
|
|
5793
|
-
type:
|
|
5883
|
+
type: import_client_fetch46.UiTextTypeEnum.Info
|
|
5794
5884
|
}
|
|
5795
5885
|
},
|
|
5796
5886
|
attributes: {
|
|
@@ -5809,7 +5899,7 @@ var acceptButton = {
|
|
|
5809
5899
|
label: {
|
|
5810
5900
|
id: 9999111,
|
|
5811
5901
|
text: "Accept",
|
|
5812
|
-
type:
|
|
5902
|
+
type: import_client_fetch46.UiTextTypeEnum.Info
|
|
5813
5903
|
}
|
|
5814
5904
|
},
|
|
5815
5905
|
attributes: {
|
|
@@ -5828,7 +5918,7 @@ var rejectButton = {
|
|
|
5828
5918
|
label: {
|
|
5829
5919
|
id: 9999111,
|
|
5830
5920
|
text: "Reject",
|
|
5831
|
-
type:
|
|
5921
|
+
type: import_client_fetch46.UiTextTypeEnum.Info
|
|
5832
5922
|
}
|
|
5833
5923
|
},
|
|
5834
5924
|
attributes: {
|
|
@@ -5875,7 +5965,7 @@ function scopesToUiNodes(scopes) {
|
|
|
5875
5965
|
label: {
|
|
5876
5966
|
id: 9999111,
|
|
5877
5967
|
text: scope,
|
|
5878
|
-
type:
|
|
5968
|
+
type: import_client_fetch46.UiTextTypeEnum.Info
|
|
5879
5969
|
}
|
|
5880
5970
|
},
|
|
5881
5971
|
attributes: {
|
|
@@ -5920,7 +6010,7 @@ function challengeNode(challenge) {
|
|
|
5920
6010
|
}
|
|
5921
6011
|
|
|
5922
6012
|
// src/theme/default/flows/consent.tsx
|
|
5923
|
-
var
|
|
6013
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
5924
6014
|
function Consent({
|
|
5925
6015
|
consentChallenge,
|
|
5926
6016
|
session,
|
|
@@ -5937,14 +6027,14 @@ function Consent({
|
|
|
5937
6027
|
formActionUrl,
|
|
5938
6028
|
session
|
|
5939
6029
|
);
|
|
5940
|
-
return /* @__PURE__ */ (0,
|
|
6030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
5941
6031
|
import_elements_react27.OryProvider,
|
|
5942
6032
|
{
|
|
5943
6033
|
config,
|
|
5944
6034
|
flow,
|
|
5945
|
-
flowType:
|
|
6035
|
+
flowType: import_client_fetch47.FlowType.OAuth2Consent,
|
|
5946
6036
|
components,
|
|
5947
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
6037
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_elements_react27.OryConsentCard, {})
|
|
5948
6038
|
}
|
|
5949
6039
|
);
|
|
5950
6040
|
}
|