@ory/elements-react 1.0.0-rc.1 → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/dist/index.d.mts +75 -43
- package/dist/index.d.ts +75 -43
- package/dist/index.js +181 -97
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -100
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +9 -3
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +713 -547
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +698 -518
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +3 -3
|
@@ -40,60 +40,15 @@ function DefaultCardContent({ children }) {
|
|
|
40
40
|
|
|
41
41
|
// src/theme/default/components/card/footer.tsx
|
|
42
42
|
import { FlowType as FlowType10 } from "@ory/client-fetch";
|
|
43
|
-
import {
|
|
43
|
+
import {
|
|
44
|
+
useComponents as useComponents3,
|
|
45
|
+
useOryConfiguration as useOryConfiguration2,
|
|
46
|
+
useOryFlow as useOryFlow3
|
|
47
|
+
} from "@ory/elements-react";
|
|
44
48
|
import { useIntl as useIntl9 } from "react-intl";
|
|
45
49
|
|
|
46
|
-
// src/
|
|
47
|
-
|
|
48
|
-
if (flow.requested_aal === "aal2")
|
|
49
|
-
return appendRefresh(appendAal(fallback, "aal1"), true);
|
|
50
|
-
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
51
|
-
}
|
|
52
|
-
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
53
|
-
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
54
|
-
const qs = new URLSearchParams();
|
|
55
|
-
if (flow.oauth2_login_challenge) {
|
|
56
|
-
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
57
|
-
}
|
|
58
|
-
if (flow.return_to) {
|
|
59
|
-
qs.set("return_to", flow.return_to);
|
|
60
|
-
} else if (typeof window !== "undefined") {
|
|
61
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
62
|
-
if (searchParams.has("return_to")) {
|
|
63
|
-
qs.set("return_to", searchParams.get("return_to") || "");
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
if (qs.toString().length === 0) {
|
|
67
|
-
return result;
|
|
68
|
-
}
|
|
69
|
-
return result + "?" + qs.toString();
|
|
70
|
-
}
|
|
71
|
-
function appendReturnTo(url, returnTo) {
|
|
72
|
-
if (!returnTo) {
|
|
73
|
-
return url;
|
|
74
|
-
}
|
|
75
|
-
const urlObj = new URL(url);
|
|
76
|
-
urlObj.searchParams.set("return_to", returnTo);
|
|
77
|
-
return urlObj.toString();
|
|
78
|
-
}
|
|
79
|
-
function appendAal(url, aal) {
|
|
80
|
-
const urlObj = new URL(url);
|
|
81
|
-
urlObj.searchParams.set("aal", aal);
|
|
82
|
-
return urlObj.toString();
|
|
83
|
-
}
|
|
84
|
-
function appendRefresh(url, refresh) {
|
|
85
|
-
const urlObj = new URL(url);
|
|
86
|
-
urlObj.searchParams.set("refresh", refresh ? "true" : "false");
|
|
87
|
-
return urlObj.toString();
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// src/util/ui/index.ts
|
|
91
|
-
import {
|
|
92
|
-
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
93
|
-
isUiNodeScriptAttributes
|
|
94
|
-
} from "@ory/client-fetch";
|
|
95
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
96
|
-
import { useMemo } from "react";
|
|
50
|
+
// src/components/card/two-step/state-select-method.tsx
|
|
51
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
|
|
97
52
|
|
|
98
53
|
// src/context/component.tsx
|
|
99
54
|
import {
|
|
@@ -120,7 +75,32 @@ var defaultGroupOrder = [
|
|
|
120
75
|
UiNodeGroupEnum.Totp
|
|
121
76
|
];
|
|
122
77
|
|
|
78
|
+
// src/context/flow-context.tsx
|
|
79
|
+
import {
|
|
80
|
+
createContext as createContext2,
|
|
81
|
+
useContext as useContext2,
|
|
82
|
+
useState as useState2
|
|
83
|
+
} from "react";
|
|
84
|
+
|
|
85
|
+
// src/context/form-state.ts
|
|
86
|
+
import { FlowType as FlowType2 } from "@ory/client-fetch";
|
|
87
|
+
import { useReducer, useState } from "react";
|
|
88
|
+
|
|
89
|
+
// src/components/card/two-step/utils.ts
|
|
90
|
+
import { FlowType, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
|
|
91
|
+
|
|
92
|
+
// src/theme/default/utils/form.ts
|
|
93
|
+
function isGroupImmediateSubmit(group) {
|
|
94
|
+
return group === "code";
|
|
95
|
+
}
|
|
96
|
+
|
|
123
97
|
// src/util/ui/index.ts
|
|
98
|
+
import {
|
|
99
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
100
|
+
isUiNodeScriptAttributes
|
|
101
|
+
} from "@ory/client-fetch";
|
|
102
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
103
|
+
import { useMemo } from "react";
|
|
124
104
|
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
125
105
|
var _a;
|
|
126
106
|
const groups = {};
|
|
@@ -183,38 +163,99 @@ function useNodeGroupsWithVisibleNodes(nodes) {
|
|
|
183
163
|
}, [nodes]);
|
|
184
164
|
}
|
|
185
165
|
|
|
186
|
-
// src/util/nodes.ts
|
|
187
|
-
function findScreenSelectionButton(nodes) {
|
|
188
|
-
return nodes.find(
|
|
189
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// src/components/card/two-step/state-select-method.tsx
|
|
194
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum14 } from "@ory/client-fetch";
|
|
195
|
-
|
|
196
166
|
// src/context/flow-context.tsx
|
|
197
|
-
import {
|
|
198
|
-
|
|
199
|
-
useContext as useContext2,
|
|
200
|
-
useState as useState2
|
|
201
|
-
} from "react";
|
|
167
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
168
|
+
var OryFlowContext = createContext2(null);
|
|
202
169
|
|
|
203
|
-
// src/context/
|
|
204
|
-
import {
|
|
205
|
-
import { useReducer, useState } from "react";
|
|
170
|
+
// src/context/config.tsx
|
|
171
|
+
import { createContext as createContext3, useContext as useContext3, useRef } from "react";
|
|
206
172
|
|
|
207
|
-
// src/
|
|
208
|
-
|
|
173
|
+
// src/client/config.ts
|
|
174
|
+
function isProduction() {
|
|
175
|
+
var _a, _b;
|
|
176
|
+
return ["production", "prod"].indexOf(
|
|
177
|
+
(_b = (_a = process.env.VERCEL_ENV) != null ? _a : process.env.NODE_ENV) != null ? _b : ""
|
|
178
|
+
) > -1;
|
|
179
|
+
}
|
|
209
180
|
|
|
210
|
-
// src/
|
|
211
|
-
|
|
212
|
-
|
|
181
|
+
// src/util/client.ts
|
|
182
|
+
import {
|
|
183
|
+
Configuration,
|
|
184
|
+
FrontendApi
|
|
185
|
+
} from "@ory/client-fetch";
|
|
186
|
+
function frontendClient(sdkUrl, opts = {}) {
|
|
187
|
+
const config = new Configuration({
|
|
188
|
+
...opts,
|
|
189
|
+
basePath: sdkUrl,
|
|
190
|
+
credentials: "include",
|
|
191
|
+
headers: {
|
|
192
|
+
Accept: "application/json",
|
|
193
|
+
...opts.headers
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
return new FrontendApi(config);
|
|
213
197
|
}
|
|
214
198
|
|
|
215
|
-
// src/context/
|
|
216
|
-
import { jsx as
|
|
217
|
-
var
|
|
199
|
+
// src/context/config.tsx
|
|
200
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
201
|
+
var defaultProject = {
|
|
202
|
+
name: "Ory",
|
|
203
|
+
registration_enabled: true,
|
|
204
|
+
verification_enabled: true,
|
|
205
|
+
recovery_enabled: true,
|
|
206
|
+
recovery_ui_url: "/ui/recovery",
|
|
207
|
+
registration_ui_url: "/ui/registration",
|
|
208
|
+
verification_ui_url: "/ui/verification",
|
|
209
|
+
login_ui_url: "/ui/login",
|
|
210
|
+
settings_ui_url: "/ui/settings",
|
|
211
|
+
default_redirect_url: "/ui/welcome",
|
|
212
|
+
error_ui_url: "/ui/error",
|
|
213
|
+
default_locale: "en",
|
|
214
|
+
locale_behavior: "force_default"
|
|
215
|
+
};
|
|
216
|
+
var OryConfigurationContext = createContext3({
|
|
217
|
+
sdk: computeSdkConfig({}),
|
|
218
|
+
project: defaultProject
|
|
219
|
+
});
|
|
220
|
+
function computeSdkConfig(config) {
|
|
221
|
+
if ((config == null ? void 0 : config.url) && typeof config.url === "string") {
|
|
222
|
+
console.debug("Using sdk url from config");
|
|
223
|
+
return {
|
|
224
|
+
url: config.url.replace(/\/$/, ""),
|
|
225
|
+
options: config.options || {}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
url: getSDKUrl(),
|
|
230
|
+
options: (config == null ? void 0 : config.options) || {}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function getSDKUrl() {
|
|
234
|
+
var _a;
|
|
235
|
+
if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
236
|
+
if (isProduction()) {
|
|
237
|
+
const sdkUrl = (_a = process.env["NEXT_PUBLIC_ORY_SDK_URL"]) != null ? _a : process.env["ORY_SDK_URL"];
|
|
238
|
+
if (!sdkUrl) {
|
|
239
|
+
throw new Error(
|
|
240
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL in production environments."
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
return sdkUrl.replace(/\/$/, "");
|
|
244
|
+
} else {
|
|
245
|
+
if (process.env["__NEXT_PRIVATE_ORIGIN"]) {
|
|
246
|
+
return process.env["__NEXT_PRIVATE_ORIGIN"].replace(/\/$/, "");
|
|
247
|
+
} else if (process.env["VERCEL_URL"]) {
|
|
248
|
+
return `https://${process.env["VERCEL_URL"]}`.replace(/\/$/, "");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (typeof window !== "undefined") {
|
|
253
|
+
return window.location.origin;
|
|
254
|
+
}
|
|
255
|
+
throw new Error(
|
|
256
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL or supply the sdk.url parameter in the Ory configuration."
|
|
257
|
+
);
|
|
258
|
+
}
|
|
218
259
|
|
|
219
260
|
// src/context/intl-context.tsx
|
|
220
261
|
import { IntlProvider as OriginalIntlProvider } from "react-intl";
|
|
@@ -244,23 +285,6 @@ import {
|
|
|
244
285
|
loginUrl
|
|
245
286
|
} from "@ory/client-fetch";
|
|
246
287
|
|
|
247
|
-
// src/util/client.ts
|
|
248
|
-
import {
|
|
249
|
-
Configuration,
|
|
250
|
-
FrontendApi
|
|
251
|
-
} from "@ory/client-fetch";
|
|
252
|
-
function frontendClient(sdkUrl, opts = {}) {
|
|
253
|
-
const config = new Configuration({
|
|
254
|
-
...opts,
|
|
255
|
-
basePath: sdkUrl,
|
|
256
|
-
headers: {
|
|
257
|
-
Accept: "application/json",
|
|
258
|
-
...opts.headers
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
|
-
return new FrontendApi(config);
|
|
262
|
-
}
|
|
263
|
-
|
|
264
288
|
// src/util/onSubmitRecovery.ts
|
|
265
289
|
import {
|
|
266
290
|
FlowType as FlowType4,
|
|
@@ -299,16 +323,19 @@ import {
|
|
|
299
323
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
|
|
300
324
|
|
|
301
325
|
// src/components/form/form.tsx
|
|
302
|
-
import { jsx as
|
|
326
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
327
|
+
|
|
328
|
+
// src/components/form/groups.tsx
|
|
329
|
+
import { getNodeId } from "@ory/client-fetch";
|
|
303
330
|
|
|
304
331
|
// src/components/form/nodes/input.tsx
|
|
305
332
|
import {
|
|
306
333
|
UiNodeGroupEnum as UiNodeGroupEnum6,
|
|
307
334
|
UiNodeInputAttributesTypeEnum
|
|
308
335
|
} from "@ory/client-fetch";
|
|
309
|
-
import { useEffect, useRef } from "react";
|
|
336
|
+
import { useEffect, useRef as useRef2 } from "react";
|
|
310
337
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
311
|
-
import { jsx as
|
|
338
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
312
339
|
|
|
313
340
|
// src/components/form/nodes/node.tsx
|
|
314
341
|
import {
|
|
@@ -319,78 +346,80 @@ import {
|
|
|
319
346
|
isUiNodeTextAttributes,
|
|
320
347
|
UiNodeGroupEnum as UiNodeGroupEnum7
|
|
321
348
|
} from "@ory/client-fetch";
|
|
322
|
-
import { jsx as
|
|
349
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
323
350
|
|
|
324
351
|
// src/components/form/groups.tsx
|
|
325
|
-
import { jsx as
|
|
352
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
326
353
|
|
|
327
354
|
// src/components/form/messages.tsx
|
|
328
|
-
import { jsx as
|
|
355
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
329
356
|
|
|
330
357
|
// src/components/form/social.tsx
|
|
331
358
|
import {
|
|
332
|
-
|
|
359
|
+
getNodeId as getNodeId2,
|
|
360
|
+
UiNodeGroupEnum as UiNodeGroupEnum10
|
|
333
361
|
} from "@ory/client-fetch";
|
|
334
362
|
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
335
363
|
|
|
336
364
|
// src/components/form/form-provider.tsx
|
|
337
|
-
import { UiNodeGroupEnum as
|
|
365
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum9 } from "@ory/client-fetch";
|
|
338
366
|
import { FormProvider, useForm } from "react-hook-form";
|
|
339
367
|
|
|
340
368
|
// src/components/form/form-resolver.ts
|
|
341
369
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
|
|
342
370
|
|
|
343
371
|
// src/components/form/form-provider.tsx
|
|
344
|
-
import { jsx as
|
|
372
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
345
373
|
|
|
346
374
|
// src/components/form/social.tsx
|
|
347
|
-
import { jsx as
|
|
375
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
348
376
|
|
|
349
377
|
// src/components/form/section.tsx
|
|
350
378
|
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
351
|
-
import { jsx as
|
|
379
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
352
380
|
|
|
353
381
|
// src/components/generic/divider.tsx
|
|
354
|
-
import { UiNodeGroupEnum as
|
|
355
|
-
import { jsx as
|
|
382
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum11 } from "@ory/client-fetch";
|
|
383
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
356
384
|
|
|
357
385
|
// src/components/generic/page-header.tsx
|
|
358
|
-
import { jsx as
|
|
386
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
359
387
|
|
|
360
388
|
// src/components/settings/settings-card.tsx
|
|
361
389
|
import {
|
|
362
390
|
isUiNodeScriptAttributes as isUiNodeScriptAttributes4,
|
|
363
|
-
UiNodeGroupEnum as
|
|
391
|
+
UiNodeGroupEnum as UiNodeGroupEnum12,
|
|
392
|
+
getNodeId as getNodeId3
|
|
364
393
|
} from "@ory/client-fetch";
|
|
365
394
|
import { useIntl as useIntl7 } from "react-intl";
|
|
366
395
|
|
|
367
396
|
// src/components/settings/oidc-settings.tsx
|
|
368
397
|
import { useIntl as useIntl2 } from "react-intl";
|
|
369
398
|
import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
370
|
-
import { Fragment, jsx as
|
|
399
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
371
400
|
|
|
372
401
|
// src/components/settings/passkey-settings.tsx
|
|
373
402
|
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
374
403
|
import { useIntl as useIntl3 } from "react-intl";
|
|
375
|
-
import { Fragment as Fragment2, jsx as
|
|
404
|
+
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
376
405
|
|
|
377
406
|
// src/components/settings/recovery-codes-settings.tsx
|
|
378
407
|
import { useIntl as useIntl4 } from "react-intl";
|
|
379
408
|
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
380
|
-
import { Fragment as Fragment3, jsx as
|
|
409
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
381
410
|
|
|
382
411
|
// src/components/settings/totp-settings.tsx
|
|
383
412
|
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
384
413
|
import { useIntl as useIntl5 } from "react-intl";
|
|
385
|
-
import { Fragment as Fragment4, jsx as
|
|
414
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
386
415
|
|
|
387
416
|
// src/components/settings/webauthn-settings.tsx
|
|
388
417
|
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
389
418
|
import { useIntl as useIntl6 } from "react-intl";
|
|
390
|
-
import { Fragment as Fragment5, jsx as
|
|
419
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
391
420
|
|
|
392
421
|
// src/components/settings/settings-card.tsx
|
|
393
|
-
import { Fragment as Fragment6, jsx as
|
|
422
|
+
import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
394
423
|
|
|
395
424
|
// src/util/i18n/index.ts
|
|
396
425
|
var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
|
|
@@ -682,9 +711,11 @@ var en_default = {
|
|
|
682
711
|
"card.header.parts.oidc": "a social provider",
|
|
683
712
|
"card.header.parts.password.registration": "your {identifierLabel} and a password",
|
|
684
713
|
"card.header.parts.password.login": "your {identifierLabel} and password",
|
|
685
|
-
"card.header.parts.code": "a code sent to
|
|
714
|
+
"card.header.parts.code": "a code sent to you",
|
|
686
715
|
"card.header.parts.passkey": "a Passkey",
|
|
687
716
|
"card.header.parts.webauthn": "a security key",
|
|
717
|
+
"card.header.parts.totp": "your authenticator app",
|
|
718
|
+
"card.header.parts.lookup_secret": "a backup recovery code",
|
|
688
719
|
"card.header.parts.identifier-first": "your {identifierLabel}",
|
|
689
720
|
"card.header.description.login": "Sign in with {identifierLabel}",
|
|
690
721
|
"card.header.description.registration": "Sign up with {identifierLabel}",
|
|
@@ -932,13 +963,15 @@ var de_default = {
|
|
|
932
963
|
"identities.messages.4010009": "Die Authentifizierungsmethode stimmt nicht mit der vorherigen Authentifizierungsmethode \xFCberein. Bitte versuchen Sie es erneut.",
|
|
933
964
|
"identities.messages.4010010": "Die eingegebene Adresse stimmt nicht mit der Adresse \xFCberein, die Sie bei der Registrierung angegeben haben. Bitte versuchen Sie es erneut.",
|
|
934
965
|
"input.placeholder": "{placeholder} eingeben",
|
|
935
|
-
"card.header.parts.code": "
|
|
966
|
+
"card.header.parts.code": "ein an Sie gesendeter Code",
|
|
936
967
|
"card.header.parts.identifier-first": "Ihr {identifierLabel}",
|
|
937
968
|
"card.header.parts.oidc": "ein sozialer Anbieter",
|
|
938
969
|
"card.header.parts.passkey": "ein Passkey",
|
|
939
970
|
"card.header.parts.password.login": "Ihrer {identifierLabel} und Ihrem Passwort",
|
|
940
971
|
"card.header.parts.password.registration": "Ihrer {identifierLabel} und einem Passwort",
|
|
941
972
|
"card.header.parts.webauthn": "ein Sicherheitsschl\xFCssel",
|
|
973
|
+
"card.header.parts.totp": "deine Authentifikator-App",
|
|
974
|
+
"card.header.parts.lookup_secret": "ein Backup-Wiederherstellungscode",
|
|
942
975
|
"recovery.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um einen einmaligen Zugangscode zu erhalten",
|
|
943
976
|
"verification.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um es zu best\xE4tigen",
|
|
944
977
|
"card.header.description.login": "Melden Sie sich mit {identifierLabel} an",
|
|
@@ -1277,6 +1310,8 @@ var es_default = {
|
|
|
1277
1310
|
"card.header.parts.code": "un c\xF3digo enviado a tu correo electr\xF3nico",
|
|
1278
1311
|
"card.header.parts.passkey": "una clave de acceso",
|
|
1279
1312
|
"card.header.parts.webauthn": "una clave de seguridad",
|
|
1313
|
+
"card.header.parts.totp": "su aplicaci\xF3n de autenticaci\xF3n",
|
|
1314
|
+
"card.header.parts.lookup_secret": "un c\xF3digo de recuperaci\xF3n de copia de seguridad",
|
|
1280
1315
|
"card.header.parts.identifier-first": "tu {identifierLabel}",
|
|
1281
1316
|
"card.header.description.login": "Iniciar sesi\xF3n con {identifierLabel}",
|
|
1282
1317
|
"card.header.description.registration": "Registrarse con {identifierLabel}",
|
|
@@ -1554,10 +1589,12 @@ var fr_default = {
|
|
|
1554
1589
|
"card.header.parts.oidc": "un fournisseur de r\xE9seaux sociaux",
|
|
1555
1590
|
"card.header.parts.password.registration": "votre {identifierLabel} et un mot de passe",
|
|
1556
1591
|
"card.header.parts.password.login": "votre {identifierLabel} et votre mot de passe",
|
|
1557
|
-
"card.header.parts.code": "un code envoy\xE9 \xE0 votre adresse e-mail",
|
|
1558
1592
|
"card.header.parts.passkey": "une cl\xE9 d'acc\xE8s",
|
|
1559
1593
|
"card.header.parts.webauthn": "une cl\xE9 de s\xE9curit\xE9",
|
|
1560
1594
|
"card.header.parts.identifier-first": "votre {identifierLabel}",
|
|
1595
|
+
"card.header.parts.code": "un code qui vous a \xE9t\xE9 envoy\xE9",
|
|
1596
|
+
"card.header.parts.totp": "votre application d'authentification",
|
|
1597
|
+
"card.header.parts.lookup_secret": "un code de r\xE9cup\xE9ration de secours",
|
|
1561
1598
|
"card.header.description.login": "Se connecter avec {identifierLabel}",
|
|
1562
1599
|
"card.header.description.registration": "S'inscrire avec {identifierLabel}",
|
|
1563
1600
|
"misc.or": "ou",
|
|
@@ -1800,7 +1837,9 @@ var nl_default = {
|
|
|
1800
1837
|
"input.placeholder": "",
|
|
1801
1838
|
"card.header.description.login": "",
|
|
1802
1839
|
"card.header.description.registration": "",
|
|
1803
|
-
"card.header.parts.code": "",
|
|
1840
|
+
"card.header.parts.code": "een code die naar je is verzonden",
|
|
1841
|
+
"card.header.parts.totp": "je authenticator-app",
|
|
1842
|
+
"card.header.parts.lookup_secret": "een backup herstelcode",
|
|
1804
1843
|
"card.header.parts.identifier-first": "",
|
|
1805
1844
|
"card.header.parts.oidc": "",
|
|
1806
1845
|
"card.header.parts.passkey": "",
|
|
@@ -2085,13 +2124,15 @@ var pl_default = {
|
|
|
2085
2124
|
"input.placeholder": "",
|
|
2086
2125
|
"card.header.description.login": "",
|
|
2087
2126
|
"card.header.description.registration": "",
|
|
2088
|
-
"card.header.parts.code": "",
|
|
2089
2127
|
"card.header.parts.identifier-first": "",
|
|
2090
2128
|
"card.header.parts.oidc": "",
|
|
2091
2129
|
"card.header.parts.passkey": "",
|
|
2092
2130
|
"card.header.parts.password.login": "",
|
|
2093
2131
|
"card.header.parts.password.registration": "",
|
|
2094
2132
|
"card.header.parts.webauthn": "",
|
|
2133
|
+
"card.header.parts.code": "kod wys\u0142any do Ciebie",
|
|
2134
|
+
"card.header.parts.totp": "Twoja aplikacja uwierzytelniaj\u0105ca",
|
|
2135
|
+
"card.header.parts.lookup_secret": "kod odzyskiwania kopii zapasowej",
|
|
2095
2136
|
"forms.label.forgot-password": "",
|
|
2096
2137
|
"login.subtitle": "",
|
|
2097
2138
|
"login.subtitle-refresh": "",
|
|
@@ -2370,7 +2411,9 @@ var pt_default = {
|
|
|
2370
2411
|
"input.placeholder": "",
|
|
2371
2412
|
"card.header.description.login": "",
|
|
2372
2413
|
"card.header.description.registration": "",
|
|
2373
|
-
"card.header.parts.code": "",
|
|
2414
|
+
"card.header.parts.code": "um c\xF3digo enviado para voc\xEA",
|
|
2415
|
+
"card.header.parts.totp": "seu aplicativo autenticador",
|
|
2416
|
+
"card.header.parts.lookup_secret": "um c\xF3digo de recupera\xE7\xE3o de backup",
|
|
2374
2417
|
"card.header.parts.identifier-first": "",
|
|
2375
2418
|
"card.header.parts.oidc": "",
|
|
2376
2419
|
"card.header.parts.passkey": "",
|
|
@@ -2655,7 +2698,9 @@ var sv_default = {
|
|
|
2655
2698
|
"input.placeholder": "Ange din {placeholder}",
|
|
2656
2699
|
"card.header.description.login": "Logga in med {identifierLabel}",
|
|
2657
2700
|
"card.header.description.registration": "Registrera dig med {identifierLabel}",
|
|
2658
|
-
"card.header.parts.code": "en kod skickad till
|
|
2701
|
+
"card.header.parts.code": "en kod skickad till dig",
|
|
2702
|
+
"card.header.parts.totp": "din autentiseringsapp",
|
|
2703
|
+
"card.header.parts.lookup_secret": "en s\xE4kerhetskopieringskod",
|
|
2659
2704
|
"card.header.parts.identifier-first": "din {identifierLabel}",
|
|
2660
2705
|
"card.header.parts.oidc": "en social leverant\xF6r",
|
|
2661
2706
|
"card.header.parts.passkey": "en Passkey",
|
|
@@ -2741,7 +2786,7 @@ var OryLocales = {
|
|
|
2741
2786
|
};
|
|
2742
2787
|
|
|
2743
2788
|
// src/context/intl-context.tsx
|
|
2744
|
-
import { jsx as
|
|
2789
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2745
2790
|
function mergeTranslations(customTranslations) {
|
|
2746
2791
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
2747
2792
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -2754,12 +2799,12 @@ var IntlProvider = ({
|
|
|
2754
2799
|
customTranslations
|
|
2755
2800
|
}) => {
|
|
2756
2801
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
2757
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ jsx23(
|
|
2758
2803
|
OriginalIntlProvider,
|
|
2759
2804
|
{
|
|
2760
2805
|
onWarn: () => ({}),
|
|
2761
2806
|
defaultRichTextElements: {
|
|
2762
|
-
del: (chunks) => /* @__PURE__ */
|
|
2807
|
+
del: (chunks) => /* @__PURE__ */ jsx23("del", { children: chunks })
|
|
2763
2808
|
},
|
|
2764
2809
|
locale,
|
|
2765
2810
|
messages: messages[locale],
|
|
@@ -2770,37 +2815,38 @@ var IntlProvider = ({
|
|
|
2770
2815
|
};
|
|
2771
2816
|
|
|
2772
2817
|
// src/context/provider.tsx
|
|
2773
|
-
import { jsx as
|
|
2818
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2774
2819
|
|
|
2775
2820
|
// src/components/card/header.tsx
|
|
2776
|
-
import { jsx as
|
|
2821
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2777
2822
|
|
|
2778
2823
|
// src/components/card/card.tsx
|
|
2779
|
-
import { jsx as
|
|
2824
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2780
2825
|
|
|
2781
2826
|
// src/components/card/footer.tsx
|
|
2782
|
-
import { jsx as
|
|
2827
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2783
2828
|
|
|
2784
2829
|
// src/components/card/content.tsx
|
|
2785
|
-
import { jsx as
|
|
2830
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2786
2831
|
|
|
2787
2832
|
// src/components/card/two-step/state-method-active.tsx
|
|
2788
2833
|
import {
|
|
2789
2834
|
isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
|
|
2790
|
-
UiNodeGroupEnum as
|
|
2835
|
+
UiNodeGroupEnum as UiNodeGroupEnum13
|
|
2791
2836
|
} from "@ory/client-fetch";
|
|
2792
|
-
import { jsx as
|
|
2837
|
+
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2793
2838
|
|
|
2794
2839
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2795
|
-
import { UiNodeGroupEnum as
|
|
2796
|
-
import { jsx as
|
|
2840
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum14 } from "@ory/client-fetch";
|
|
2841
|
+
import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2797
2842
|
|
|
2798
2843
|
// src/components/card/card-two-step.tsx
|
|
2799
2844
|
import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
2800
|
-
import { Fragment as Fragment7, jsx as
|
|
2845
|
+
import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2801
2846
|
|
|
2802
2847
|
// src/components/card/card-consent.tsx
|
|
2803
|
-
import {
|
|
2848
|
+
import { getNodeId as getNodeId4 } from "@ory/client-fetch";
|
|
2849
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2804
2850
|
|
|
2805
2851
|
// src/components/card/two-step/state-select-method.tsx
|
|
2806
2852
|
import { useIntl as useIntl8 } from "react-intl";
|
|
@@ -2808,54 +2854,152 @@ import { useIntl as useIntl8 } from "react-intl";
|
|
|
2808
2854
|
// src/components/card/two-step/list-methods.tsx
|
|
2809
2855
|
import { useComponents as useComponents2 } from "@ory/elements-react";
|
|
2810
2856
|
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2811
|
-
import { jsx as
|
|
2857
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2812
2858
|
|
|
2813
2859
|
// src/components/card/two-step/state-select-method.tsx
|
|
2814
|
-
import { jsx as
|
|
2860
|
+
import { jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2815
2861
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2816
2862
|
return Object.fromEntries(
|
|
2817
|
-
Object.values(
|
|
2863
|
+
Object.values(UiNodeGroupEnum15).filter((group) => {
|
|
2818
2864
|
var _a;
|
|
2819
2865
|
return (_a = visibleGroups[group]) == null ? void 0 : _a.length;
|
|
2820
2866
|
}).filter(
|
|
2821
2867
|
(group) => ![
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2868
|
+
UiNodeGroupEnum15.Oidc,
|
|
2869
|
+
UiNodeGroupEnum15.Saml,
|
|
2870
|
+
UiNodeGroupEnum15.Default,
|
|
2871
|
+
UiNodeGroupEnum15.IdentifierFirst,
|
|
2872
|
+
UiNodeGroupEnum15.Profile,
|
|
2873
|
+
UiNodeGroupEnum15.Captcha
|
|
2828
2874
|
].includes(group)
|
|
2829
2875
|
).map((g) => [g, {}])
|
|
2830
2876
|
);
|
|
2831
2877
|
}
|
|
2832
2878
|
|
|
2879
|
+
// src/util/nodes.ts
|
|
2880
|
+
function findScreenSelectionButton(nodes) {
|
|
2881
|
+
return nodes.find(
|
|
2882
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
2883
|
+
);
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
// src/theme/default/utils/logout.ts
|
|
2887
|
+
import { useCallback, useEffect as useEffect2, useState as useState3 } from "react";
|
|
2888
|
+
function useClientLogout(config) {
|
|
2889
|
+
const [logoutFlow, setLogoutFlow] = useState3();
|
|
2890
|
+
const [isLoading, setIsLoading] = useState3(true);
|
|
2891
|
+
const fetchLogoutFlow = useCallback(async () => {
|
|
2892
|
+
try {
|
|
2893
|
+
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow().catch((err) => {
|
|
2894
|
+
var _a;
|
|
2895
|
+
if (((_a = err.response) == null ? void 0 : _a.status) !== 401) {
|
|
2896
|
+
throw err;
|
|
2897
|
+
}
|
|
2898
|
+
return void 0;
|
|
2899
|
+
});
|
|
2900
|
+
setLogoutFlow(flow);
|
|
2901
|
+
} finally {
|
|
2902
|
+
setIsLoading(false);
|
|
2903
|
+
}
|
|
2904
|
+
}, [config.sdk.url]);
|
|
2905
|
+
useEffect2(() => {
|
|
2906
|
+
void fetchLogoutFlow();
|
|
2907
|
+
}, [fetchLogoutFlow]);
|
|
2908
|
+
return { logoutFlow, didLoad: !isLoading };
|
|
2909
|
+
}
|
|
2910
|
+
|
|
2911
|
+
// src/theme/default/utils/url.ts
|
|
2912
|
+
function restartFlowUrl(flow, fallback) {
|
|
2913
|
+
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
2914
|
+
}
|
|
2915
|
+
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
2916
|
+
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
2917
|
+
const qs = new URLSearchParams();
|
|
2918
|
+
if (flow.oauth2_login_challenge) {
|
|
2919
|
+
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
2920
|
+
}
|
|
2921
|
+
if (flow.return_to) {
|
|
2922
|
+
qs.set("return_to", flow.return_to);
|
|
2923
|
+
} else if (typeof window !== "undefined") {
|
|
2924
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
2925
|
+
if (searchParams.has("return_to")) {
|
|
2926
|
+
qs.set("return_to", searchParams.get("return_to") || "");
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
if (qs.toString().length === 0) {
|
|
2930
|
+
return result;
|
|
2931
|
+
}
|
|
2932
|
+
return result + "?" + qs.toString();
|
|
2933
|
+
}
|
|
2934
|
+
function appendReturnTo(url, returnTo) {
|
|
2935
|
+
if (!returnTo) {
|
|
2936
|
+
return url;
|
|
2937
|
+
}
|
|
2938
|
+
const urlObj = new URL(url);
|
|
2939
|
+
urlObj.searchParams.set("return_to", returnTo);
|
|
2940
|
+
return urlObj.toString();
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2833
2943
|
// src/theme/default/components/card/footer.tsx
|
|
2834
|
-
import { Fragment as Fragment8, jsx as
|
|
2944
|
+
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2835
2945
|
function DefaultCardFooter() {
|
|
2836
2946
|
const oryFlow = useOryFlow3();
|
|
2837
2947
|
switch (oryFlow.flowType) {
|
|
2838
2948
|
case FlowType10.Login:
|
|
2839
|
-
return /* @__PURE__ */
|
|
2949
|
+
return /* @__PURE__ */ jsx35(LoginCardFooter, {});
|
|
2840
2950
|
case FlowType10.Registration:
|
|
2841
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsx35(RegistrationCardFooter, {});
|
|
2842
2952
|
case FlowType10.Recovery:
|
|
2843
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ jsx35(RecoveryCardFooter, {});
|
|
2844
2954
|
case FlowType10.Verification:
|
|
2845
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ jsx35(VerificationCardFooter, {});
|
|
2846
2956
|
case FlowType10.OAuth2Consent:
|
|
2847
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx35(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2848
2958
|
default:
|
|
2849
2959
|
return null;
|
|
2850
2960
|
}
|
|
2851
2961
|
}
|
|
2852
2962
|
function LoginCardFooter() {
|
|
2853
|
-
const {
|
|
2963
|
+
const { formState, flow, flowType } = useOryFlow3();
|
|
2964
|
+
const config = useOryConfiguration2();
|
|
2965
|
+
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
2854
2966
|
const intl = useIntl9();
|
|
2855
|
-
|
|
2856
|
-
if (flowType === FlowType10.Login && flow.refresh) {
|
|
2967
|
+
if (flowType !== FlowType10.Login) {
|
|
2857
2968
|
return null;
|
|
2858
2969
|
}
|
|
2970
|
+
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
2971
|
+
let returnTo = config.project.default_redirect_url;
|
|
2972
|
+
if (flow.return_to) {
|
|
2973
|
+
returnTo = flow.return_to;
|
|
2974
|
+
}
|
|
2975
|
+
if (!returnTo) {
|
|
2976
|
+
returnTo = restartFlowUrl(
|
|
2977
|
+
flow,
|
|
2978
|
+
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2979
|
+
);
|
|
2980
|
+
}
|
|
2981
|
+
if (flow.refresh || flow.requested_aal === "aal2") {
|
|
2982
|
+
return /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2983
|
+
intl.formatMessage({
|
|
2984
|
+
id: "login.2fa.go-back"
|
|
2985
|
+
}),
|
|
2986
|
+
" ",
|
|
2987
|
+
/* @__PURE__ */ jsx35(
|
|
2988
|
+
"a",
|
|
2989
|
+
{
|
|
2990
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2991
|
+
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
2992
|
+
"data-testid": (
|
|
2993
|
+
// Only add the test-id when the logout link has loaded.
|
|
2994
|
+
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
2995
|
+
),
|
|
2996
|
+
children: intl.formatMessage({
|
|
2997
|
+
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
2998
|
+
})
|
|
2999
|
+
}
|
|
3000
|
+
)
|
|
3001
|
+
] });
|
|
3002
|
+
}
|
|
2859
3003
|
return /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
2860
3004
|
formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2861
3005
|
intl.formatMessage({
|
|
@@ -2863,7 +3007,7 @@ function LoginCardFooter() {
|
|
|
2863
3007
|
defaultMessage: "No account?"
|
|
2864
3008
|
}),
|
|
2865
3009
|
" ",
|
|
2866
|
-
/* @__PURE__ */
|
|
3010
|
+
/* @__PURE__ */ jsx35(
|
|
2867
3011
|
"a",
|
|
2868
3012
|
{
|
|
2869
3013
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2876,7 +3020,7 @@ function LoginCardFooter() {
|
|
|
2876
3020
|
}
|
|
2877
3021
|
)
|
|
2878
3022
|
] }),
|
|
2879
|
-
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */
|
|
3023
|
+
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
|
|
2880
3024
|
"a",
|
|
2881
3025
|
{
|
|
2882
3026
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2887,45 +3031,23 @@ function LoginCardFooter() {
|
|
|
2887
3031
|
})
|
|
2888
3032
|
}
|
|
2889
3033
|
) }),
|
|
2890
|
-
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */
|
|
3034
|
+
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
|
|
2891
3035
|
"a",
|
|
2892
3036
|
{
|
|
2893
3037
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2894
|
-
href:
|
|
2895
|
-
|
|
2896
|
-
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2897
|
-
),
|
|
2898
|
-
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
3038
|
+
href: returnTo,
|
|
3039
|
+
"data-testid": "ory/screen/login/action/cancel",
|
|
2899
3040
|
children: intl.formatMessage({
|
|
2900
3041
|
id: "login.2fa.go-back.link"
|
|
2901
3042
|
})
|
|
2902
3043
|
}
|
|
2903
|
-
) })
|
|
2904
|
-
flowType === FlowType10.Login && flow.requested_aal === "aal2" && (formState.current === "select_method" || authMethods.length === 0) && /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2905
|
-
intl.formatMessage({
|
|
2906
|
-
id: "login.2fa.go-back"
|
|
2907
|
-
}),
|
|
2908
|
-
" ",
|
|
2909
|
-
/* @__PURE__ */ jsx34(
|
|
2910
|
-
"a",
|
|
2911
|
-
{
|
|
2912
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2913
|
-
href: restartFlowUrl(
|
|
2914
|
-
flow,
|
|
2915
|
-
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2916
|
-
),
|
|
2917
|
-
"data-testid": "ory/screen/login/mfa/action/reauthenticate",
|
|
2918
|
-
children: intl.formatMessage({
|
|
2919
|
-
id: "login.2fa.go-back.link"
|
|
2920
|
-
})
|
|
2921
|
-
}
|
|
2922
|
-
)
|
|
2923
|
-
] })
|
|
3044
|
+
) })
|
|
2924
3045
|
] });
|
|
2925
3046
|
}
|
|
2926
3047
|
function RegistrationCardFooter() {
|
|
2927
3048
|
const intl = useIntl9();
|
|
2928
|
-
const {
|
|
3049
|
+
const { flow, formState } = useOryFlow3();
|
|
3050
|
+
const config = useOryConfiguration2();
|
|
2929
3051
|
const visibleGroups = useNodeGroupsWithVisibleNodes(flow.ui.nodes);
|
|
2930
3052
|
const authMethodBlocks = toAuthMethodPickerOptions(visibleGroups);
|
|
2931
3053
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
@@ -2934,11 +3056,12 @@ function RegistrationCardFooter() {
|
|
|
2934
3056
|
if (!screenSelectionNode || Object.entries(authMethodBlocks).length < 2) {
|
|
2935
3057
|
return null;
|
|
2936
3058
|
}
|
|
2937
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased", children: /* @__PURE__ */ jsx35(
|
|
2938
3060
|
"a",
|
|
2939
3061
|
{
|
|
2940
3062
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
2941
3063
|
href: "",
|
|
3064
|
+
"data-testid": "ory/screen/registration/action/selectMethod",
|
|
2942
3065
|
children: intl.formatMessage({
|
|
2943
3066
|
id: "card.footer.select-another-method",
|
|
2944
3067
|
defaultMessage: "Select another method"
|
|
@@ -2953,7 +3076,7 @@ function RegistrationCardFooter() {
|
|
|
2953
3076
|
defaultMessage: "Already have an account?"
|
|
2954
3077
|
}),
|
|
2955
3078
|
" ",
|
|
2956
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ jsx35(
|
|
2957
3080
|
"a",
|
|
2958
3081
|
{
|
|
2959
3082
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2988,20 +3111,20 @@ function ConsentCardFooter({ flow }) {
|
|
|
2988
3111
|
"Make sure you trust ",
|
|
2989
3112
|
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
2990
3113
|
] }),
|
|
2991
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ jsx35("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
|
|
2992
3115
|
] }),
|
|
2993
|
-
rememberNode && /* @__PURE__ */
|
|
3116
|
+
rememberNode && /* @__PURE__ */ jsx35(
|
|
2994
3117
|
Node2.Checkbox,
|
|
2995
3118
|
{
|
|
2996
3119
|
attributes: rememberNode.attributes,
|
|
2997
3120
|
node: rememberNode
|
|
2998
3121
|
}
|
|
2999
3122
|
),
|
|
3000
|
-
/* @__PURE__ */
|
|
3123
|
+
/* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
|
|
3001
3124
|
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
3002
3125
|
).map((n) => {
|
|
3003
3126
|
const attributes = n.attributes;
|
|
3004
|
-
return /* @__PURE__ */
|
|
3127
|
+
return /* @__PURE__ */ jsx35(
|
|
3005
3128
|
Node2.Button,
|
|
3006
3129
|
{
|
|
3007
3130
|
node: n,
|
|
@@ -3021,7 +3144,7 @@ function ConsentCardFooter({ flow }) {
|
|
|
3021
3144
|
}
|
|
3022
3145
|
|
|
3023
3146
|
// src/theme/default/components/card/header.tsx
|
|
3024
|
-
import { useComponents as useComponents4, useOryFlow as useOryFlow5 } from "@ory/elements-react";
|
|
3147
|
+
import { messageTestId, useComponents as useComponents4, useOryFlow as useOryFlow5 } from "@ory/elements-react";
|
|
3025
3148
|
|
|
3026
3149
|
// src/theme/default/utils/constructCardHeader.ts
|
|
3027
3150
|
import {
|
|
@@ -3054,7 +3177,8 @@ function useCardHeaderText(container, opts) {
|
|
|
3054
3177
|
}),
|
|
3055
3178
|
description: intl.formatMessage({
|
|
3056
3179
|
id: "identities.messages.1060003"
|
|
3057
|
-
})
|
|
3180
|
+
}),
|
|
3181
|
+
messageId: "1060003"
|
|
3058
3182
|
};
|
|
3059
3183
|
}
|
|
3060
3184
|
return {
|
|
@@ -3084,7 +3208,8 @@ function useCardHeaderText(container, opts) {
|
|
|
3084
3208
|
}),
|
|
3085
3209
|
description: intl.formatMessage({
|
|
3086
3210
|
id: "identities.messages.1080003"
|
|
3087
|
-
})
|
|
3211
|
+
}),
|
|
3212
|
+
messageId: "1080003"
|
|
3088
3213
|
};
|
|
3089
3214
|
}
|
|
3090
3215
|
return {
|
|
@@ -3109,7 +3234,8 @@ function useCardHeaderText(container, opts) {
|
|
|
3109
3234
|
id: "identities.messages.1010016"
|
|
3110
3235
|
},
|
|
3111
3236
|
accountLinkingMessage.context
|
|
3112
|
-
)
|
|
3237
|
+
),
|
|
3238
|
+
messageId: "1010016"
|
|
3113
3239
|
};
|
|
3114
3240
|
}
|
|
3115
3241
|
}
|
|
@@ -3146,6 +3272,12 @@ function useCardHeaderText(container, opts) {
|
|
|
3146
3272
|
if (nodes.find((node) => node.group === "code")) {
|
|
3147
3273
|
parts.push(intl.formatMessage({ id: "card.header.parts.code" }));
|
|
3148
3274
|
}
|
|
3275
|
+
if (nodes.find((node) => node.group === "totp")) {
|
|
3276
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.totp" }));
|
|
3277
|
+
}
|
|
3278
|
+
if (nodes.find((node) => node.group === "lookup_secret")) {
|
|
3279
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.lookup_secret" }));
|
|
3280
|
+
}
|
|
3149
3281
|
if (nodes.find((node) => node.group === "passkey")) {
|
|
3150
3282
|
parts.push(intl.formatMessage({ id: "card.header.parts.passkey" }));
|
|
3151
3283
|
}
|
|
@@ -3259,16 +3391,9 @@ import {
|
|
|
3259
3391
|
FlowType as FlowType12,
|
|
3260
3392
|
isUiNodeInputAttributes as isUiNodeInputAttributes8
|
|
3261
3393
|
} from "@ory/client-fetch";
|
|
3262
|
-
import { useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
import * as React3 from "react";
|
|
3266
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3267
|
-
var SvgArrowLeft = (props) => {
|
|
3268
|
-
var _a, _b;
|
|
3269
|
-
return /* @__PURE__ */ jsx35("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__ */ jsx35("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
3270
|
-
};
|
|
3271
|
-
var arrow_left_default = SvgArrowLeft;
|
|
3394
|
+
import { useOryConfiguration as useOryConfiguration3, useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
3395
|
+
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
3396
|
+
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
3272
3397
|
|
|
3273
3398
|
// src/theme/default/utils/attributes.ts
|
|
3274
3399
|
function omit(obj, keys) {
|
|
@@ -3279,13 +3404,46 @@ function omit(obj, keys) {
|
|
|
3279
3404
|
return ret;
|
|
3280
3405
|
}
|
|
3281
3406
|
|
|
3407
|
+
// src/util/omitAttributes.ts
|
|
3408
|
+
function omitInputAttributes({
|
|
3409
|
+
...attrs
|
|
3410
|
+
}) {
|
|
3411
|
+
return omit(attrs, [
|
|
3412
|
+
"autocomplete",
|
|
3413
|
+
"label",
|
|
3414
|
+
"node_type",
|
|
3415
|
+
"maxlength",
|
|
3416
|
+
"onclick",
|
|
3417
|
+
"onclickTrigger",
|
|
3418
|
+
"onload",
|
|
3419
|
+
"onloadTrigger"
|
|
3420
|
+
]);
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
// src/theme/default/assets/icons/arrow-left.svg
|
|
3424
|
+
import * as React3 from "react";
|
|
3425
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3426
|
+
var SvgArrowLeft = (props) => {
|
|
3427
|
+
var _a, _b;
|
|
3428
|
+
return /* @__PURE__ */ jsx36("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__ */ jsx36("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
3429
|
+
};
|
|
3430
|
+
var arrow_left_default = SvgArrowLeft;
|
|
3431
|
+
|
|
3282
3432
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3283
|
-
import {
|
|
3284
|
-
import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3433
|
+
import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3285
3434
|
function DefaultCurrentIdentifierButton() {
|
|
3286
|
-
|
|
3287
|
-
const {
|
|
3435
|
+
var _a;
|
|
3436
|
+
const { flow, flowType, formState } = useOryFlow4();
|
|
3437
|
+
const { setValue, getValues, watch } = useFormContext12();
|
|
3438
|
+
const [turnstileResponse, setTurnstileResponse] = useState4();
|
|
3439
|
+
const config = useOryConfiguration3();
|
|
3288
3440
|
const ui = flow.ui;
|
|
3441
|
+
const captchaVerificationValue = (_a = watch("transient_payload")) == null ? void 0 : _a.captcha_turnstile_response;
|
|
3442
|
+
useEffect3(() => {
|
|
3443
|
+
if (captchaVerificationValue) {
|
|
3444
|
+
setTurnstileResponse(captchaVerificationValue);
|
|
3445
|
+
}
|
|
3446
|
+
}, [captchaVerificationValue]);
|
|
3289
3447
|
if (formState.current === "provide_identifier") {
|
|
3290
3448
|
return null;
|
|
3291
3449
|
}
|
|
@@ -3300,11 +3458,6 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3300
3458
|
flow,
|
|
3301
3459
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
3302
3460
|
);
|
|
3303
|
-
const attributes = omit(nodeBackButton, [
|
|
3304
|
-
"autocomplete",
|
|
3305
|
-
"node_type",
|
|
3306
|
-
"maxlength"
|
|
3307
|
-
]);
|
|
3308
3461
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
3309
3462
|
if (screenSelectionNode) {
|
|
3310
3463
|
return /* @__PURE__ */ jsxs16("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
@@ -3315,21 +3468,25 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3315
3468
|
return false;
|
|
3316
3469
|
}).map((n) => {
|
|
3317
3470
|
const attrs = n.attributes;
|
|
3318
|
-
|
|
3471
|
+
let value = getValues(attrs.name) || attrs.value;
|
|
3472
|
+
if (attrs.name === "transient_payload.captcha_turnstile_response" && turnstileResponse) {
|
|
3473
|
+
value = turnstileResponse;
|
|
3474
|
+
}
|
|
3475
|
+
return /* @__PURE__ */ jsx37(
|
|
3319
3476
|
"input",
|
|
3320
3477
|
{
|
|
3321
3478
|
type: "hidden",
|
|
3322
3479
|
name: attrs.name,
|
|
3323
|
-
value
|
|
3480
|
+
value
|
|
3324
3481
|
},
|
|
3325
3482
|
attrs.name
|
|
3326
3483
|
);
|
|
3327
3484
|
}),
|
|
3328
|
-
/* @__PURE__ */
|
|
3485
|
+
/* @__PURE__ */ jsx37(
|
|
3329
3486
|
"button",
|
|
3330
3487
|
{
|
|
3331
3488
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
3332
|
-
...
|
|
3489
|
+
...omitInputAttributes(nodeBackButton),
|
|
3333
3490
|
type: "submit",
|
|
3334
3491
|
onClick: () => {
|
|
3335
3492
|
setValue(
|
|
@@ -3343,7 +3500,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3343
3500
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3344
3501
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3345
3502
|
children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3346
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ jsx37(
|
|
3347
3504
|
arrow_left_default,
|
|
3348
3505
|
{
|
|
3349
3506
|
size: 16,
|
|
@@ -3351,22 +3508,22 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3351
3508
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3352
3509
|
}
|
|
3353
3510
|
),
|
|
3354
|
-
/* @__PURE__ */
|
|
3511
|
+
/* @__PURE__ */ jsx37("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
3355
3512
|
] })
|
|
3356
3513
|
}
|
|
3357
3514
|
)
|
|
3358
3515
|
] });
|
|
3359
3516
|
}
|
|
3360
|
-
return /* @__PURE__ */
|
|
3517
|
+
return /* @__PURE__ */ jsx37(
|
|
3361
3518
|
"a",
|
|
3362
3519
|
{
|
|
3363
3520
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
3364
|
-
...
|
|
3521
|
+
...omitInputAttributes(nodeBackButton),
|
|
3365
3522
|
href: initFlowUrl2,
|
|
3366
3523
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3367
3524
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3368
3525
|
children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3369
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ jsx37(
|
|
3370
3527
|
arrow_left_default,
|
|
3371
3528
|
{
|
|
3372
3529
|
size: 16,
|
|
@@ -3374,7 +3531,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3374
3531
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3375
3532
|
}
|
|
3376
3533
|
),
|
|
3377
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ jsx37("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
3378
3535
|
] })
|
|
3379
3536
|
}
|
|
3380
3537
|
);
|
|
@@ -3416,47 +3573,69 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
3416
3573
|
}
|
|
3417
3574
|
|
|
3418
3575
|
// src/theme/default/components/card/header.tsx
|
|
3419
|
-
import { jsx as
|
|
3420
|
-
function InnerCardHeader({
|
|
3576
|
+
import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3577
|
+
function InnerCardHeader({
|
|
3578
|
+
title,
|
|
3579
|
+
text,
|
|
3580
|
+
messageId
|
|
3581
|
+
}) {
|
|
3421
3582
|
const { Card } = useComponents4();
|
|
3422
3583
|
return /* @__PURE__ */ jsxs17("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
3423
|
-
/* @__PURE__ */
|
|
3584
|
+
/* @__PURE__ */ jsx38(Card.Logo, {}),
|
|
3424
3585
|
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
|
|
3425
|
-
/* @__PURE__ */
|
|
3426
|
-
/* @__PURE__ */
|
|
3427
|
-
|
|
3586
|
+
/* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
3587
|
+
/* @__PURE__ */ jsx38(
|
|
3588
|
+
"p",
|
|
3589
|
+
{
|
|
3590
|
+
className: "leading-normal text-interface-foreground-default-secondary",
|
|
3591
|
+
...messageId ? messageTestId({ id: messageId }) : {},
|
|
3592
|
+
children: text
|
|
3593
|
+
}
|
|
3594
|
+
),
|
|
3595
|
+
/* @__PURE__ */ jsx38(DefaultCurrentIdentifierButton, {})
|
|
3428
3596
|
] })
|
|
3429
3597
|
] });
|
|
3430
3598
|
}
|
|
3431
3599
|
function DefaultCardHeader() {
|
|
3432
3600
|
const context = useOryFlow5();
|
|
3433
|
-
const { title, description } = useCardHeaderText(
|
|
3434
|
-
|
|
3601
|
+
const { title, description, messageId } = useCardHeaderText(
|
|
3602
|
+
context.flow.ui,
|
|
3603
|
+
context
|
|
3604
|
+
);
|
|
3605
|
+
return /* @__PURE__ */ jsx38(InnerCardHeader, { title, text: description, messageId });
|
|
3435
3606
|
}
|
|
3436
3607
|
|
|
3437
3608
|
// src/theme/default/components/card/logo.tsx
|
|
3438
|
-
import {
|
|
3439
|
-
import { jsx as
|
|
3609
|
+
import { useOryConfiguration as useOryConfiguration4 } from "@ory/elements-react";
|
|
3610
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3440
3611
|
function DefaultCardLogo() {
|
|
3441
|
-
const
|
|
3442
|
-
if (
|
|
3443
|
-
return /* @__PURE__ */
|
|
3612
|
+
const config = useOryConfiguration4();
|
|
3613
|
+
if (config.project.logo_light_url) {
|
|
3614
|
+
return /* @__PURE__ */ jsx39(
|
|
3615
|
+
"img",
|
|
3616
|
+
{
|
|
3617
|
+
src: config.project.logo_light_url,
|
|
3618
|
+
width: 100,
|
|
3619
|
+
height: 36,
|
|
3620
|
+
alt: "Logo"
|
|
3621
|
+
}
|
|
3622
|
+
);
|
|
3444
3623
|
}
|
|
3445
|
-
return /* @__PURE__ */
|
|
3624
|
+
return /* @__PURE__ */ jsx39("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.project.name });
|
|
3446
3625
|
}
|
|
3447
3626
|
|
|
3448
3627
|
// src/theme/default/components/card/layout.tsx
|
|
3449
|
-
import { jsx as
|
|
3628
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3450
3629
|
function DefaultCardLayout({ children }) {
|
|
3451
|
-
return /* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ jsx40("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
3452
3631
|
}
|
|
3453
3632
|
|
|
3454
3633
|
// src/theme/default/components/card/index.tsx
|
|
3455
|
-
import { jsx as
|
|
3634
|
+
import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3456
3635
|
function DefaultCard({ children }) {
|
|
3457
|
-
return /* @__PURE__ */
|
|
3636
|
+
return /* @__PURE__ */ jsx41("div", { className: "flex flex-1 sm:items-center justify-center font-sans items-start w-full sm:w-[480px] sm:max-w-[480px]", children: /* @__PURE__ */ jsxs18("div", { className: "relative grid grid-cols-1 gap-8 sm:rounded-cards sm:border border-form-border-default bg-form-background-default px-8 py-12 sm:px-12 sm:py-14 border-b w-full", children: [
|
|
3458
3637
|
children,
|
|
3459
|
-
/* @__PURE__ */
|
|
3638
|
+
/* @__PURE__ */ jsx41(Badge, {})
|
|
3460
3639
|
] }) });
|
|
3461
3640
|
}
|
|
3462
3641
|
|
|
@@ -3470,83 +3649,70 @@ function cn(...inputs) {
|
|
|
3470
3649
|
// src/theme/default/components/form/index.tsx
|
|
3471
3650
|
import { useIntl as useIntl12 } from "react-intl";
|
|
3472
3651
|
import {
|
|
3473
|
-
messageTestId,
|
|
3652
|
+
messageTestId as messageTestId2,
|
|
3474
3653
|
uiTextToFormattedMessage as uiTextToFormattedMessage3,
|
|
3475
|
-
useOryFlow as
|
|
3654
|
+
useOryFlow as useOryFlow7
|
|
3476
3655
|
} from "@ory/elements-react";
|
|
3477
3656
|
import { FlowType as FlowType13 } from "@ory/client-fetch";
|
|
3478
3657
|
|
|
3479
3658
|
// src/theme/default/components/form/social.tsx
|
|
3480
3659
|
import {
|
|
3481
3660
|
uiTextToFormattedMessage as uiTextToFormattedMessage2,
|
|
3482
|
-
useOryFlow as
|
|
3661
|
+
useOryFlow as useOryFlow6
|
|
3483
3662
|
} from "@ory/elements-react";
|
|
3484
|
-
import { useEffect as
|
|
3663
|
+
import { useEffect as useEffect4 } from "react";
|
|
3485
3664
|
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
3486
3665
|
import { useIntl as useIntl11 } from "react-intl";
|
|
3487
3666
|
import { useDebounceValue } from "usehooks-ts";
|
|
3488
3667
|
|
|
3489
3668
|
// src/theme/default/provider-logos/apple.svg
|
|
3490
3669
|
import * as React4 from "react";
|
|
3491
|
-
import { jsx as
|
|
3670
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3492
3671
|
var SvgApple = (props) => {
|
|
3493
3672
|
var _a, _b;
|
|
3494
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ jsx42("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__ */ jsx42("path", { fill: "#283544", d: "M27.734 11.55c-.134.078-3.317 1.724-3.317 5.374.15 4.162 4.017 5.621 4.083 5.621-.066.078-.584 1.988-2.116 3.991C25.167 28.261 23.817 30 21.767 30c-1.95 0-2.65-1.15-4.9-1.15-2.416 0-3.1 1.15-4.95 1.15-2.05 0-3.5-1.832-4.782-3.541-1.667-2.236-3.083-5.746-3.133-9.116-.034-1.786.334-3.54 1.266-5.032 1.317-2.081 3.667-3.494 6.233-3.54 1.966-.063 3.716 1.257 4.916 1.257 1.15 0 3.3-1.258 5.733-1.258 1.05.001 3.85.296 5.584 2.78M16.25 8.414c-.35-1.631.616-3.262 1.516-4.302C18.917 2.854 20.734 2 22.3 2c.1 1.63-.534 3.23-1.666 4.395-1.017 1.258-2.767 2.205-4.383 2.019" }) });
|
|
3495
3674
|
};
|
|
3496
3675
|
var apple_default = SvgApple;
|
|
3497
3676
|
|
|
3498
3677
|
// src/theme/default/provider-logos/auth0.svg
|
|
3499
3678
|
import * as React5 from "react";
|
|
3500
|
-
import { jsx as
|
|
3679
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3501
3680
|
var SvgAuth0 = (props) => {
|
|
3502
3681
|
var _a, _b;
|
|
3503
|
-
return /* @__PURE__ */
|
|
3682
|
+
return /* @__PURE__ */ jsx43("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", 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__ */ jsx43("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
|
|
3504
3683
|
};
|
|
3505
3684
|
var auth0_default = SvgAuth0;
|
|
3506
3685
|
|
|
3507
3686
|
// src/theme/default/provider-logos/discord.svg
|
|
3508
3687
|
import * as React6 from "react";
|
|
3509
|
-
import { jsx as
|
|
3688
|
+
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3510
3689
|
var SvgDiscord = (props) => {
|
|
3511
3690
|
var _a, _b;
|
|
3512
3691
|
return /* @__PURE__ */ jsxs19("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: [
|
|
3513
|
-
/* @__PURE__ */
|
|
3514
|
-
/* @__PURE__ */
|
|
3692
|
+
/* @__PURE__ */ jsx44("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
3693
|
+
/* @__PURE__ */ jsx44("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
|
|
3515
3694
|
] });
|
|
3516
3695
|
};
|
|
3517
3696
|
var discord_default = SvgDiscord;
|
|
3518
3697
|
|
|
3519
3698
|
// src/theme/default/provider-logos/facebook.svg
|
|
3520
3699
|
import * as React7 from "react";
|
|
3521
|
-
import { jsx as
|
|
3700
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3522
3701
|
var SvgFacebook = (props) => {
|
|
3523
3702
|
var _a, _b;
|
|
3524
3703
|
return /* @__PURE__ */ jsxs20("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: [
|
|
3525
|
-
/* @__PURE__ */
|
|
3526
|
-
/* @__PURE__ */
|
|
3527
|
-
/* @__PURE__ */
|
|
3528
|
-
/* @__PURE__ */
|
|
3529
|
-
/* @__PURE__ */
|
|
3704
|
+
/* @__PURE__ */ jsx45("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
3705
|
+
/* @__PURE__ */ jsx45("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
|
|
3706
|
+
/* @__PURE__ */ jsx45("defs", { children: /* @__PURE__ */ jsxs20("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
3707
|
+
/* @__PURE__ */ jsx45("stop", { stopColor: "#18ACFE" }),
|
|
3708
|
+
/* @__PURE__ */ jsx45("stop", { offset: 1, stopColor: "#0163E0" })
|
|
3530
3709
|
] }) })
|
|
3531
3710
|
] });
|
|
3532
3711
|
};
|
|
3533
3712
|
var facebook_default = SvgFacebook;
|
|
3534
3713
|
|
|
3535
|
-
// src/theme/default/provider-logos/generic.svg
|
|
3536
|
-
import * as React8 from "react";
|
|
3537
|
-
import { jsx as jsx45, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3538
|
-
var SvgGeneric = (props) => {
|
|
3539
|
-
var _a, _b;
|
|
3540
|
-
return /* @__PURE__ */ jsxs21("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: [
|
|
3541
|
-
/* @__PURE__ */ jsx45("path", { stroke: "none", d: "M0 0h24v24H0z" }),
|
|
3542
|
-
/* @__PURE__ */ jsx45("path", { d: "M2 12a10 10 0 1 0 20 0 10 10 0 1 0-20 0" }),
|
|
3543
|
-
/* @__PURE__ */ jsx45("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" })
|
|
3544
|
-
] });
|
|
3545
|
-
};
|
|
3546
|
-
var generic_default = SvgGeneric;
|
|
3547
|
-
|
|
3548
3714
|
// src/theme/default/provider-logos/github.svg
|
|
3549
|
-
import * as
|
|
3715
|
+
import * as React8 from "react";
|
|
3550
3716
|
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3551
3717
|
var SvgGithub = (props) => {
|
|
3552
3718
|
var _a, _b;
|
|
@@ -3555,11 +3721,11 @@ var SvgGithub = (props) => {
|
|
|
3555
3721
|
var github_default = SvgGithub;
|
|
3556
3722
|
|
|
3557
3723
|
// src/theme/default/provider-logos/gitlab.svg
|
|
3558
|
-
import * as
|
|
3559
|
-
import { jsx as jsx47, jsxs as
|
|
3724
|
+
import * as React9 from "react";
|
|
3725
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3560
3726
|
var SvgGitlab = (props) => {
|
|
3561
3727
|
var _a, _b;
|
|
3562
|
-
return /* @__PURE__ */
|
|
3728
|
+
return /* @__PURE__ */ jsxs21("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: [
|
|
3563
3729
|
/* @__PURE__ */ jsx47("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" }),
|
|
3564
3730
|
/* @__PURE__ */ jsx47("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" }),
|
|
3565
3731
|
/* @__PURE__ */ jsx47("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" }),
|
|
@@ -3569,11 +3735,11 @@ var SvgGitlab = (props) => {
|
|
|
3569
3735
|
var gitlab_default = SvgGitlab;
|
|
3570
3736
|
|
|
3571
3737
|
// src/theme/default/provider-logos/google.svg
|
|
3572
|
-
import * as
|
|
3573
|
-
import { jsx as jsx48, jsxs as
|
|
3738
|
+
import * as React10 from "react";
|
|
3739
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3574
3740
|
var SvgGoogle = (props) => {
|
|
3575
3741
|
var _a, _b;
|
|
3576
|
-
return /* @__PURE__ */
|
|
3742
|
+
return /* @__PURE__ */ jsxs22("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: [
|
|
3577
3743
|
/* @__PURE__ */ jsx48("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" }),
|
|
3578
3744
|
/* @__PURE__ */ jsx48("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" }),
|
|
3579
3745
|
/* @__PURE__ */ jsx48("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" }),
|
|
@@ -3583,11 +3749,11 @@ var SvgGoogle = (props) => {
|
|
|
3583
3749
|
var google_default = SvgGoogle;
|
|
3584
3750
|
|
|
3585
3751
|
// src/theme/default/provider-logos/linkedin.svg
|
|
3586
|
-
import * as
|
|
3587
|
-
import { jsx as jsx49, jsxs as
|
|
3752
|
+
import * as React11 from "react";
|
|
3753
|
+
import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3588
3754
|
var SvgLinkedin = (props) => {
|
|
3589
3755
|
var _a, _b;
|
|
3590
|
-
return /* @__PURE__ */
|
|
3756
|
+
return /* @__PURE__ */ jsxs23("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: [
|
|
3591
3757
|
/* @__PURE__ */ jsx49("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
3592
3758
|
/* @__PURE__ */ jsx49("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" })
|
|
3593
3759
|
] });
|
|
@@ -3595,11 +3761,11 @@ var SvgLinkedin = (props) => {
|
|
|
3595
3761
|
var linkedin_default = SvgLinkedin;
|
|
3596
3762
|
|
|
3597
3763
|
// src/theme/default/provider-logos/microsoft.svg
|
|
3598
|
-
import * as
|
|
3599
|
-
import { jsx as jsx50, jsxs as
|
|
3764
|
+
import * as React12 from "react";
|
|
3765
|
+
import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3600
3766
|
var SvgMicrosoft = (props) => {
|
|
3601
3767
|
var _a, _b;
|
|
3602
|
-
return /* @__PURE__ */
|
|
3768
|
+
return /* @__PURE__ */ jsxs24("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: [
|
|
3603
3769
|
/* @__PURE__ */ jsx50("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
3604
3770
|
/* @__PURE__ */ jsx50("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
3605
3771
|
/* @__PURE__ */ jsx50("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
@@ -3609,11 +3775,11 @@ var SvgMicrosoft = (props) => {
|
|
|
3609
3775
|
var microsoft_default = SvgMicrosoft;
|
|
3610
3776
|
|
|
3611
3777
|
// src/theme/default/provider-logos/slack.svg
|
|
3612
|
-
import * as
|
|
3613
|
-
import { jsx as jsx51, jsxs as
|
|
3778
|
+
import * as React13 from "react";
|
|
3779
|
+
import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3614
3780
|
var SvgSlack = (props) => {
|
|
3615
3781
|
var _a, _b;
|
|
3616
|
-
return /* @__PURE__ */
|
|
3782
|
+
return /* @__PURE__ */ jsxs25("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
3783
|
/* @__PURE__ */ jsx51("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" }),
|
|
3618
3784
|
/* @__PURE__ */ jsx51("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" }),
|
|
3619
3785
|
/* @__PURE__ */ jsx51("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" }),
|
|
@@ -3623,11 +3789,11 @@ var SvgSlack = (props) => {
|
|
|
3623
3789
|
var slack_default = SvgSlack;
|
|
3624
3790
|
|
|
3625
3791
|
// src/theme/default/provider-logos/spotify.svg
|
|
3626
|
-
import * as
|
|
3627
|
-
import { jsx as jsx52, jsxs as
|
|
3792
|
+
import * as React14 from "react";
|
|
3793
|
+
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3628
3794
|
var SvgSpotify = (props) => {
|
|
3629
3795
|
var _a, _b;
|
|
3630
|
-
return /* @__PURE__ */
|
|
3796
|
+
return /* @__PURE__ */ jsxs26("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
3797
|
/* @__PURE__ */ jsx52("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
3632
3798
|
/* @__PURE__ */ jsx52("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" })
|
|
3633
3799
|
] });
|
|
@@ -3635,11 +3801,11 @@ var SvgSpotify = (props) => {
|
|
|
3635
3801
|
var spotify_default = SvgSpotify;
|
|
3636
3802
|
|
|
3637
3803
|
// src/theme/default/provider-logos/yandex.svg
|
|
3638
|
-
import * as
|
|
3639
|
-
import { jsx as jsx53, jsxs as
|
|
3804
|
+
import * as React15 from "react";
|
|
3805
|
+
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3640
3806
|
var SvgYandex = (props) => {
|
|
3641
3807
|
var _a, _b;
|
|
3642
|
-
return /* @__PURE__ */
|
|
3808
|
+
return /* @__PURE__ */ jsxs27("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: [
|
|
3643
3809
|
/* @__PURE__ */ jsx53("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
3644
3810
|
/* @__PURE__ */ jsx53("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" })
|
|
3645
3811
|
] });
|
|
@@ -3647,7 +3813,7 @@ var SvgYandex = (props) => {
|
|
|
3647
3813
|
var yandex_default = SvgYandex;
|
|
3648
3814
|
|
|
3649
3815
|
// src/theme/default/provider-logos/x.svg
|
|
3650
|
-
import * as
|
|
3816
|
+
import * as React16 from "react";
|
|
3651
3817
|
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3652
3818
|
var SvgX = (props) => {
|
|
3653
3819
|
var _a, _b;
|
|
@@ -3661,7 +3827,6 @@ var logos = {
|
|
|
3661
3827
|
auth0: auth0_default,
|
|
3662
3828
|
discord: discord_default,
|
|
3663
3829
|
facebook: facebook_default,
|
|
3664
|
-
generic: generic_default,
|
|
3665
3830
|
github: github_default,
|
|
3666
3831
|
gitlab: gitlab_default,
|
|
3667
3832
|
google: google_default,
|
|
@@ -3675,9 +3840,9 @@ var logos = {
|
|
|
3675
3840
|
var provider_logos_default = logos;
|
|
3676
3841
|
|
|
3677
3842
|
// src/theme/default/components/form/spinner.tsx
|
|
3678
|
-
import { jsx as jsx55, jsxs as
|
|
3843
|
+
import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3679
3844
|
function Spinner({ className }) {
|
|
3680
|
-
return /* @__PURE__ */
|
|
3845
|
+
return /* @__PURE__ */ jsxs28(
|
|
3681
3846
|
"svg",
|
|
3682
3847
|
{
|
|
3683
3848
|
"aria-hidden": "true",
|
|
@@ -3714,26 +3879,8 @@ function Spinner({ className }) {
|
|
|
3714
3879
|
}
|
|
3715
3880
|
|
|
3716
3881
|
// src/theme/default/components/form/social.tsx
|
|
3717
|
-
import { UiNodeGroupEnum as
|
|
3718
|
-
|
|
3719
|
-
// src/util/omitAttributes.ts
|
|
3720
|
-
function omitInputAttributes({
|
|
3721
|
-
...attrs
|
|
3722
|
-
}) {
|
|
3723
|
-
return omit(attrs, [
|
|
3724
|
-
"autocomplete",
|
|
3725
|
-
"label",
|
|
3726
|
-
"node_type",
|
|
3727
|
-
"maxlength",
|
|
3728
|
-
"onclick",
|
|
3729
|
-
"onclickTrigger",
|
|
3730
|
-
"onload",
|
|
3731
|
-
"onloadTrigger"
|
|
3732
|
-
]);
|
|
3733
|
-
}
|
|
3734
|
-
|
|
3735
|
-
// src/theme/default/components/form/social.tsx
|
|
3736
|
-
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3882
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum16 } from "@ory/client-fetch";
|
|
3883
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3737
3884
|
function extractProvider(context) {
|
|
3738
3885
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
3739
3886
|
return context.provider;
|
|
@@ -3752,14 +3899,14 @@ function DefaultButtonSocial({
|
|
|
3752
3899
|
const { type: _ignoredType, name: _ignoredName, ...rest } = attributes;
|
|
3753
3900
|
const {
|
|
3754
3901
|
flow: { ui }
|
|
3755
|
-
} =
|
|
3902
|
+
} = useOryFlow6();
|
|
3756
3903
|
const [clicked, setClicked] = useDebounceValue(false, 100);
|
|
3757
3904
|
const intl = useIntl11();
|
|
3758
3905
|
const {
|
|
3759
3906
|
formState: { isSubmitting }
|
|
3760
3907
|
} = useFormContext13();
|
|
3761
3908
|
const oidcNodeCount = (_a = ui.nodes.filter(
|
|
3762
|
-
(node2) => node2.group ===
|
|
3909
|
+
(node2) => node2.group === UiNodeGroupEnum16.Oidc || node2.group === UiNodeGroupEnum16.Saml
|
|
3763
3910
|
).length) != null ? _a : 0;
|
|
3764
3911
|
const Logo = logos2[attributes.value.split("-")[0]];
|
|
3765
3912
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
@@ -3768,13 +3915,13 @@ function DefaultButtonSocial({
|
|
|
3768
3915
|
onClick == null ? void 0 : onClick();
|
|
3769
3916
|
setClicked(true);
|
|
3770
3917
|
};
|
|
3771
|
-
|
|
3918
|
+
useEffect4(() => {
|
|
3772
3919
|
if (!isSubmitting) {
|
|
3773
3920
|
setClicked(false);
|
|
3774
3921
|
}
|
|
3775
3922
|
}, [isSubmitting, setClicked]);
|
|
3776
3923
|
const label = node.meta.label ? uiTextToFormattedMessage2(node.meta.label, intl) : "";
|
|
3777
|
-
return /* @__PURE__ */
|
|
3924
|
+
return /* @__PURE__ */ jsxs29(
|
|
3778
3925
|
"button",
|
|
3779
3926
|
{
|
|
3780
3927
|
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",
|
|
@@ -3788,8 +3935,8 @@ function DefaultButtonSocial({
|
|
|
3788
3935
|
"aria-label": label,
|
|
3789
3936
|
...omitInputAttributes(rest),
|
|
3790
3937
|
children: [
|
|
3791
|
-
/* @__PURE__ */ jsx56("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx56(Logo, { size: 20 }) : /* @__PURE__ */ jsx56(
|
|
3792
|
-
showLabel && node.meta.label ? /* @__PURE__ */
|
|
3938
|
+
/* @__PURE__ */ jsx56("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx56(Logo, { size: 20 }) : /* @__PURE__ */ jsx56(GenericLogo, { label: provider.slice(0, 1) }) : /* @__PURE__ */ jsx56(Spinner, { className: "size-5" }) }),
|
|
3939
|
+
showLabel && node.meta.label ? /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
3793
3940
|
/* @__PURE__ */ jsx56("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
3794
3941
|
/* @__PURE__ */ jsx56("span", { className: "size-5 block" })
|
|
3795
3942
|
] }) : null
|
|
@@ -3815,6 +3962,9 @@ function DefaultSocialButtonContainer({
|
|
|
3815
3962
|
}
|
|
3816
3963
|
);
|
|
3817
3964
|
}
|
|
3965
|
+
function GenericLogo({ label }) {
|
|
3966
|
+
return /* @__PURE__ */ jsx56("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 });
|
|
3967
|
+
}
|
|
3818
3968
|
|
|
3819
3969
|
// src/theme/default/components/form/index.tsx
|
|
3820
3970
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
@@ -3839,7 +3989,7 @@ function DefaultFormContainer({
|
|
|
3839
3989
|
);
|
|
3840
3990
|
}
|
|
3841
3991
|
function DefaultMessageContainer({ children }) {
|
|
3842
|
-
const { flowType } =
|
|
3992
|
+
const { flowType } = useOryFlow7();
|
|
3843
3993
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
3844
3994
|
return null;
|
|
3845
3995
|
}
|
|
@@ -3864,7 +4014,7 @@ function DefaultMessage({ message }) {
|
|
|
3864
4014
|
message.type === "info" && "text-interface-foreground-default-secondary",
|
|
3865
4015
|
message.type === "success" && "text-interface-foreground-validation-success"
|
|
3866
4016
|
),
|
|
3867
|
-
...
|
|
4017
|
+
...messageTestId2(message),
|
|
3868
4018
|
children: uiTextToFormattedMessage3(message, intl)
|
|
3869
4019
|
}
|
|
3870
4020
|
);
|
|
@@ -3874,7 +4024,7 @@ function DefaultMessage({ message }) {
|
|
|
3874
4024
|
import { useIntl as useIntl13 } from "react-intl";
|
|
3875
4025
|
|
|
3876
4026
|
// src/theme/default/assets/icons/code.svg
|
|
3877
|
-
import * as
|
|
4027
|
+
import * as React17 from "react";
|
|
3878
4028
|
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3879
4029
|
var SvgCode = (props) => {
|
|
3880
4030
|
var _a, _b;
|
|
@@ -3883,7 +4033,7 @@ var SvgCode = (props) => {
|
|
|
3883
4033
|
var code_default = SvgCode;
|
|
3884
4034
|
|
|
3885
4035
|
// src/theme/default/assets/icons/passkey.svg
|
|
3886
|
-
import * as
|
|
4036
|
+
import * as React18 from "react";
|
|
3887
4037
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3888
4038
|
var SvgPasskey = (props) => {
|
|
3889
4039
|
var _a, _b;
|
|
@@ -3892,7 +4042,7 @@ var SvgPasskey = (props) => {
|
|
|
3892
4042
|
var passkey_default = SvgPasskey;
|
|
3893
4043
|
|
|
3894
4044
|
// src/theme/default/assets/icons/password.svg
|
|
3895
|
-
import * as
|
|
4045
|
+
import * as React19 from "react";
|
|
3896
4046
|
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3897
4047
|
var SvgPassword = (props) => {
|
|
3898
4048
|
var _a, _b;
|
|
@@ -3901,7 +4051,7 @@ var SvgPassword = (props) => {
|
|
|
3901
4051
|
var password_default = SvgPassword;
|
|
3902
4052
|
|
|
3903
4053
|
// src/theme/default/assets/icons/webauthn.svg
|
|
3904
|
-
import * as
|
|
4054
|
+
import * as React20 from "react";
|
|
3905
4055
|
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3906
4056
|
var SvgWebauthn = (props) => {
|
|
3907
4057
|
var _a, _b;
|
|
@@ -3910,7 +4060,7 @@ var SvgWebauthn = (props) => {
|
|
|
3910
4060
|
var webauthn_default = SvgWebauthn;
|
|
3911
4061
|
|
|
3912
4062
|
// src/theme/default/assets/icons/totp.svg
|
|
3913
|
-
import * as
|
|
4063
|
+
import * as React21 from "react";
|
|
3914
4064
|
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3915
4065
|
var SvgTotp = (props) => {
|
|
3916
4066
|
var _a, _b;
|
|
@@ -3919,7 +4069,7 @@ var SvgTotp = (props) => {
|
|
|
3919
4069
|
var totp_default = SvgTotp;
|
|
3920
4070
|
|
|
3921
4071
|
// src/theme/default/assets/icons/code-asterix.svg
|
|
3922
|
-
import * as
|
|
4072
|
+
import * as React22 from "react";
|
|
3923
4073
|
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3924
4074
|
var SvgCodeAsterix = (props) => {
|
|
3925
4075
|
var _a, _b;
|
|
@@ -3928,7 +4078,7 @@ var SvgCodeAsterix = (props) => {
|
|
|
3928
4078
|
var code_asterix_default = SvgCodeAsterix;
|
|
3929
4079
|
|
|
3930
4080
|
// src/theme/default/components/card/list-item.tsx
|
|
3931
|
-
import { jsx as jsx64, jsxs as
|
|
4081
|
+
import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3932
4082
|
function ListItem({
|
|
3933
4083
|
icon: Icon,
|
|
3934
4084
|
as,
|
|
@@ -3939,7 +4089,7 @@ function ListItem({
|
|
|
3939
4089
|
...props
|
|
3940
4090
|
}) {
|
|
3941
4091
|
const Comp = as || "div";
|
|
3942
|
-
return /* @__PURE__ */
|
|
4092
|
+
return /* @__PURE__ */ jsxs30(
|
|
3943
4093
|
Comp,
|
|
3944
4094
|
{
|
|
3945
4095
|
...props,
|
|
@@ -3949,7 +4099,7 @@ function ListItem({
|
|
|
3949
4099
|
),
|
|
3950
4100
|
children: [
|
|
3951
4101
|
/* @__PURE__ */ jsx64("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx64(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
3952
|
-
/* @__PURE__ */
|
|
4102
|
+
/* @__PURE__ */ jsxs30("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
3953
4103
|
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
3954
4104
|
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
3955
4105
|
] }),
|
|
@@ -4006,8 +4156,8 @@ import {
|
|
|
4006
4156
|
import { cva } from "class-variance-authority";
|
|
4007
4157
|
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
4008
4158
|
import { useIntl as useIntl14 } from "react-intl";
|
|
4009
|
-
import { useEffect as
|
|
4010
|
-
import { jsx as jsx66, jsxs as
|
|
4159
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
4160
|
+
import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4011
4161
|
var buttonStyles = cva(
|
|
4012
4162
|
[
|
|
4013
4163
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -4047,20 +4197,20 @@ var DefaultButton = ({
|
|
|
4047
4197
|
}) => {
|
|
4048
4198
|
var _a;
|
|
4049
4199
|
const { type, name, value, ...rest } = attributes;
|
|
4050
|
-
const [clicked, setClicked] =
|
|
4200
|
+
const [clicked, setClicked] = useState5(false);
|
|
4051
4201
|
const intl = useIntl14();
|
|
4052
4202
|
const label = getNodeLabel(node);
|
|
4053
4203
|
const {
|
|
4054
4204
|
formState: { isSubmitting },
|
|
4055
4205
|
setValue
|
|
4056
4206
|
} = useFormContext14();
|
|
4057
|
-
|
|
4207
|
+
useEffect5(() => {
|
|
4058
4208
|
if (!isSubmitting) {
|
|
4059
4209
|
setClicked(false);
|
|
4060
4210
|
}
|
|
4061
4211
|
}, [isSubmitting]);
|
|
4062
4212
|
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";
|
|
4063
|
-
return /* @__PURE__ */
|
|
4213
|
+
return /* @__PURE__ */ jsxs31(
|
|
4064
4214
|
"button",
|
|
4065
4215
|
{
|
|
4066
4216
|
...omitInputAttributes(rest),
|
|
@@ -4091,7 +4241,7 @@ DefaultButton.displayName = "DefaultButton";
|
|
|
4091
4241
|
// src/theme/default/components/form/checkbox.tsx
|
|
4092
4242
|
import { getNodeLabel as getNodeLabel2 } from "@ory/client-fetch";
|
|
4093
4243
|
import {
|
|
4094
|
-
messageTestId as
|
|
4244
|
+
messageTestId as messageTestId3,
|
|
4095
4245
|
uiTextToFormattedMessage as uiTextToFormattedMessage5
|
|
4096
4246
|
} from "@ory/elements-react";
|
|
4097
4247
|
import { useFormContext as useFormContext15 } from "react-hook-form";
|
|
@@ -4144,7 +4294,7 @@ function CheckboxLabel({ label }) {
|
|
|
4144
4294
|
}
|
|
4145
4295
|
|
|
4146
4296
|
// src/theme/default/components/form/checkbox.tsx
|
|
4147
|
-
import { jsx as jsx68, jsxs as
|
|
4297
|
+
import { jsx as jsx68, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4148
4298
|
function CheckboxSVG() {
|
|
4149
4299
|
return /* @__PURE__ */ jsx68(
|
|
4150
4300
|
"svg",
|
|
@@ -4175,8 +4325,8 @@ var DefaultCheckbox = ({
|
|
|
4175
4325
|
const label = getNodeLabel2(node);
|
|
4176
4326
|
const { register } = useFormContext15();
|
|
4177
4327
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4178
|
-
return /* @__PURE__ */
|
|
4179
|
-
/* @__PURE__ */
|
|
4328
|
+
return /* @__PURE__ */ jsxs32("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
4329
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex h-5 items-center", children: [
|
|
4180
4330
|
/* @__PURE__ */ jsx68(
|
|
4181
4331
|
"input",
|
|
4182
4332
|
{
|
|
@@ -4187,12 +4337,13 @@ var DefaultCheckbox = ({
|
|
|
4187
4337
|
"peer size-4 border appearance-none rounded-forms bg-checkbox-background-default border-checkbox-border-checkbox-border-default checked:bg-checkbox-background-checked checked:border-checkbox-border-checkbox-border-checked",
|
|
4188
4338
|
hasError && "border-interface-border-validation-danger"
|
|
4189
4339
|
),
|
|
4340
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
4190
4341
|
...register(name)
|
|
4191
4342
|
}
|
|
4192
4343
|
),
|
|
4193
4344
|
/* @__PURE__ */ jsx68(CheckboxSVG, {})
|
|
4194
4345
|
] }),
|
|
4195
|
-
/* @__PURE__ */
|
|
4346
|
+
/* @__PURE__ */ jsxs32("span", { className: "flex flex-col", children: [
|
|
4196
4347
|
/* @__PURE__ */ jsx68("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx68(CheckboxLabel, { label }) }),
|
|
4197
4348
|
node.messages.map((message) => /* @__PURE__ */ jsx68(
|
|
4198
4349
|
"span",
|
|
@@ -4201,7 +4352,7 @@ var DefaultCheckbox = ({
|
|
|
4201
4352
|
"mt-1",
|
|
4202
4353
|
message.type === "error" ? "text-interface-foreground-validation-danger" : "text-interface-foreground-default-secondary"
|
|
4203
4354
|
),
|
|
4204
|
-
...
|
|
4355
|
+
...messageTestId3(message),
|
|
4205
4356
|
children: uiTextToFormattedMessage5(message, intl)
|
|
4206
4357
|
},
|
|
4207
4358
|
message.id
|
|
@@ -4211,7 +4362,7 @@ var DefaultCheckbox = ({
|
|
|
4211
4362
|
};
|
|
4212
4363
|
|
|
4213
4364
|
// src/theme/default/components/form/group-container.tsx
|
|
4214
|
-
import { useOryFlow as
|
|
4365
|
+
import { useOryFlow as useOryFlow8 } from "@ory/elements-react";
|
|
4215
4366
|
import { FlowType as FlowType14 } from "@ory/client-fetch";
|
|
4216
4367
|
|
|
4217
4368
|
// src/util/childCounter.ts
|
|
@@ -4228,7 +4379,7 @@ function countRenderableChildren(children) {
|
|
|
4228
4379
|
// src/theme/default/components/form/group-container.tsx
|
|
4229
4380
|
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4230
4381
|
function DefaultGroupContainer({ children }) {
|
|
4231
|
-
const { flowType } =
|
|
4382
|
+
const { flowType } = useOryFlow8();
|
|
4232
4383
|
const count = countRenderableChildren(children);
|
|
4233
4384
|
if (count === 0) {
|
|
4234
4385
|
return null;
|
|
@@ -4268,14 +4419,14 @@ function DefaultImage({ attributes, node }) {
|
|
|
4268
4419
|
import { FlowType as FlowType15, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
|
|
4269
4420
|
import {
|
|
4270
4421
|
uiTextToFormattedMessage as uiTextToFormattedMessage6,
|
|
4271
|
-
useOryFlow as
|
|
4422
|
+
useOryFlow as useOryFlow9
|
|
4272
4423
|
} from "@ory/elements-react";
|
|
4273
|
-
import { useRef as
|
|
4424
|
+
import { useRef as useRef3, useState as useState6 } from "react";
|
|
4274
4425
|
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
4275
4426
|
import { useIntl as useIntl17 } from "react-intl";
|
|
4276
4427
|
|
|
4277
4428
|
// src/theme/default/assets/icons/eye-off.svg
|
|
4278
|
-
import * as
|
|
4429
|
+
import * as React23 from "react";
|
|
4279
4430
|
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
4280
4431
|
var SvgEyeOff = (props) => {
|
|
4281
4432
|
var _a, _b;
|
|
@@ -4284,11 +4435,11 @@ var SvgEyeOff = (props) => {
|
|
|
4284
4435
|
var eye_off_default = SvgEyeOff;
|
|
4285
4436
|
|
|
4286
4437
|
// src/theme/default/assets/icons/eye.svg
|
|
4287
|
-
import * as
|
|
4288
|
-
import { jsx as jsx73, jsxs as
|
|
4438
|
+
import * as React24 from "react";
|
|
4439
|
+
import { jsx as jsx73, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4289
4440
|
var SvgEye = (props) => {
|
|
4290
4441
|
var _a, _b;
|
|
4291
|
-
return /* @__PURE__ */ jsx73("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__ */
|
|
4442
|
+
return /* @__PURE__ */ jsx73("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__ */ jsxs33("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4292
4443
|
/* @__PURE__ */ jsx73("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
4293
4444
|
/* @__PURE__ */ jsx73("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
4294
4445
|
] }) });
|
|
@@ -4296,7 +4447,7 @@ var SvgEye = (props) => {
|
|
|
4296
4447
|
var eye_default = SvgEye;
|
|
4297
4448
|
|
|
4298
4449
|
// src/theme/default/components/form/input.tsx
|
|
4299
|
-
import { jsx as jsx74, jsxs as
|
|
4450
|
+
import { jsx as jsx74, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4300
4451
|
var defaultInputClassName = cn(
|
|
4301
4452
|
"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",
|
|
4302
4453
|
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
@@ -4314,8 +4465,8 @@ var DefaultInput = ({
|
|
|
4314
4465
|
const { register } = useFormContext16();
|
|
4315
4466
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4316
4467
|
const intl = useIntl17();
|
|
4317
|
-
const { flowType } =
|
|
4318
|
-
const inputRef =
|
|
4468
|
+
const { flowType } = useOryFlow9();
|
|
4469
|
+
const inputRef = useRef3(null);
|
|
4319
4470
|
const formattedLabel = label ? intl.formatMessage(
|
|
4320
4471
|
{
|
|
4321
4472
|
id: "input.placeholder",
|
|
@@ -4329,7 +4480,7 @@ var DefaultInput = ({
|
|
|
4329
4480
|
return /* @__PURE__ */ jsx74(
|
|
4330
4481
|
"input",
|
|
4331
4482
|
{
|
|
4332
|
-
...rest,
|
|
4483
|
+
...omitInputAttributes(rest),
|
|
4333
4484
|
onClick,
|
|
4334
4485
|
maxLength: maxlength,
|
|
4335
4486
|
autoComplete: autocomplete,
|
|
@@ -4340,7 +4491,7 @@ var DefaultInput = ({
|
|
|
4340
4491
|
);
|
|
4341
4492
|
}
|
|
4342
4493
|
const { ref, ...restRegister } = register(name, { value });
|
|
4343
|
-
return /* @__PURE__ */
|
|
4494
|
+
return /* @__PURE__ */ jsxs34(
|
|
4344
4495
|
"div",
|
|
4345
4496
|
{
|
|
4346
4497
|
className: cn(
|
|
@@ -4374,7 +4525,7 @@ var DefaultInput = ({
|
|
|
4374
4525
|
function PasswordToggle({
|
|
4375
4526
|
inputRef
|
|
4376
4527
|
}) {
|
|
4377
|
-
const [shown, setShown] =
|
|
4528
|
+
const [shown, setShown] = useState6(false);
|
|
4378
4529
|
const handleClick = () => {
|
|
4379
4530
|
setShown(!shown);
|
|
4380
4531
|
if (inputRef.current) {
|
|
@@ -4400,14 +4551,15 @@ import {
|
|
|
4400
4551
|
instanceOfUiText
|
|
4401
4552
|
} from "@ory/client-fetch";
|
|
4402
4553
|
import {
|
|
4403
|
-
messageTestId as
|
|
4554
|
+
messageTestId as messageTestId4,
|
|
4404
4555
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
4405
4556
|
useComponents as useComponents5,
|
|
4406
|
-
|
|
4557
|
+
useOryConfiguration as useOryConfiguration5,
|
|
4558
|
+
useOryFlow as useOryFlow10
|
|
4407
4559
|
} from "@ory/elements-react";
|
|
4408
4560
|
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
4409
4561
|
import { useIntl as useIntl18 } from "react-intl";
|
|
4410
|
-
import { jsx as jsx75, jsxs as
|
|
4562
|
+
import { jsx as jsx75, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4411
4563
|
function findResendNode(nodes) {
|
|
4412
4564
|
return nodes.find(
|
|
4413
4565
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -4422,7 +4574,8 @@ function DefaultLabel({
|
|
|
4422
4574
|
const intl = useIntl18();
|
|
4423
4575
|
const label = getNodeLabel4(node);
|
|
4424
4576
|
const { Message } = useComponents5();
|
|
4425
|
-
const {
|
|
4577
|
+
const { flowType, flow } = useOryFlow10();
|
|
4578
|
+
const config = useOryConfiguration5();
|
|
4426
4579
|
const { setValue, formState } = useFormContext17();
|
|
4427
4580
|
const isPassword = attributes.type === "password";
|
|
4428
4581
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
@@ -4432,12 +4585,12 @@ function DefaultLabel({
|
|
|
4432
4585
|
}
|
|
4433
4586
|
};
|
|
4434
4587
|
const fieldError = formState.errors[attributes.name];
|
|
4435
|
-
return /* @__PURE__ */
|
|
4436
|
-
label && /* @__PURE__ */
|
|
4588
|
+
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
4589
|
+
label && /* @__PURE__ */ jsxs35("span", { className: "inline-flex justify-between", children: [
|
|
4437
4590
|
/* @__PURE__ */ jsx75(
|
|
4438
4591
|
"label",
|
|
4439
4592
|
{
|
|
4440
|
-
...
|
|
4593
|
+
...messageTestId4(label),
|
|
4441
4594
|
className: "leading-normal text-input-foreground-primary",
|
|
4442
4595
|
htmlFor: attributes.name,
|
|
4443
4596
|
"data-testid": `ory/form/node/input/label/${attributes.name}`,
|
|
@@ -4507,9 +4660,9 @@ import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
|
4507
4660
|
|
|
4508
4661
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
4509
4662
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4510
|
-
import * as
|
|
4511
|
-
import { jsx as jsx77, jsxs as
|
|
4512
|
-
var InputOTP =
|
|
4663
|
+
import * as React25 from "react";
|
|
4664
|
+
import { jsx as jsx77, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4665
|
+
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx77(
|
|
4513
4666
|
OTPInput,
|
|
4514
4667
|
{
|
|
4515
4668
|
ref,
|
|
@@ -4522,12 +4675,12 @@ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props },
|
|
|
4522
4675
|
}
|
|
4523
4676
|
));
|
|
4524
4677
|
InputOTP.displayName = "InputOTP";
|
|
4525
|
-
var InputOTPGroup =
|
|
4678
|
+
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
4526
4679
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4527
|
-
var InputOTPSlot =
|
|
4528
|
-
const inputOTPContext =
|
|
4680
|
+
var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
4681
|
+
const inputOTPContext = React25.useContext(OTPInputContext);
|
|
4529
4682
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
4530
|
-
return /* @__PURE__ */
|
|
4683
|
+
return /* @__PURE__ */ jsxs36(
|
|
4531
4684
|
"div",
|
|
4532
4685
|
{
|
|
4533
4686
|
ref,
|
|
@@ -4548,14 +4701,14 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4548
4701
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
4549
4702
|
|
|
4550
4703
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4551
|
-
import { useOryFlow as
|
|
4704
|
+
import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
|
|
4552
4705
|
import { FlowType as FlowType17 } from "@ory/client-fetch";
|
|
4553
4706
|
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
4554
4707
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4555
4708
|
const { setValue, watch } = useFormContext18();
|
|
4556
4709
|
const { maxlength, name } = attributes;
|
|
4557
4710
|
const elements = maxlength != null ? maxlength : 6;
|
|
4558
|
-
const { flowType } =
|
|
4711
|
+
const { flowType } = useOryFlow11();
|
|
4559
4712
|
const handleInputChange = (v) => {
|
|
4560
4713
|
setValue(name, v);
|
|
4561
4714
|
};
|
|
@@ -4583,7 +4736,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4583
4736
|
};
|
|
4584
4737
|
|
|
4585
4738
|
// src/theme/default/components/form/section.tsx
|
|
4586
|
-
import { jsx as jsx79, jsxs as
|
|
4739
|
+
import { jsx as jsx79, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4587
4740
|
var DefaultFormSection = ({
|
|
4588
4741
|
children,
|
|
4589
4742
|
nodes: _nodes,
|
|
@@ -4603,8 +4756,8 @@ var DefaultFormSectionContent = ({
|
|
|
4603
4756
|
description,
|
|
4604
4757
|
children
|
|
4605
4758
|
}) => {
|
|
4606
|
-
return /* @__PURE__ */
|
|
4607
|
-
/* @__PURE__ */
|
|
4759
|
+
return /* @__PURE__ */ jsxs37("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: [
|
|
4760
|
+
/* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
|
|
4608
4761
|
/* @__PURE__ */ jsx79("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
4609
4762
|
/* @__PURE__ */ jsx79("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
4610
4763
|
] }),
|
|
@@ -4615,7 +4768,7 @@ var DefaultFormSectionFooter = ({
|
|
|
4615
4768
|
children,
|
|
4616
4769
|
text
|
|
4617
4770
|
}) => {
|
|
4618
|
-
return /* @__PURE__ */
|
|
4771
|
+
return /* @__PURE__ */ jsxs37(
|
|
4619
4772
|
"div",
|
|
4620
4773
|
{
|
|
4621
4774
|
className: cn(
|
|
@@ -4632,13 +4785,13 @@ var DefaultFormSectionFooter = ({
|
|
|
4632
4785
|
// src/theme/default/components/form/text.tsx
|
|
4633
4786
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
4634
4787
|
import { useIntl as useIntl20 } from "react-intl";
|
|
4635
|
-
import { Fragment as Fragment11, jsx as jsx80, jsxs as
|
|
4788
|
+
import { Fragment as Fragment11, jsx as jsx80, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4636
4789
|
function DefaultText({ node, attributes }) {
|
|
4637
4790
|
var _a;
|
|
4638
4791
|
const intl = useIntl20();
|
|
4639
4792
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
4640
4793
|
if (lookup) {
|
|
4641
|
-
return /* @__PURE__ */
|
|
4794
|
+
return /* @__PURE__ */ jsxs38(Fragment11, { children: [
|
|
4642
4795
|
/* @__PURE__ */ jsx80("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
4643
4796
|
lookup.map((text, index) => /* @__PURE__ */ jsx80(
|
|
4644
4797
|
"pre",
|
|
@@ -4650,7 +4803,7 @@ function DefaultText({ node, attributes }) {
|
|
|
4650
4803
|
))
|
|
4651
4804
|
] });
|
|
4652
4805
|
}
|
|
4653
|
-
return /* @__PURE__ */ jsx80(Fragment11, { children: /* @__PURE__ */
|
|
4806
|
+
return /* @__PURE__ */ jsx80(Fragment11, { children: /* @__PURE__ */ jsxs38(
|
|
4654
4807
|
"p",
|
|
4655
4808
|
{
|
|
4656
4809
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
@@ -4664,14 +4817,18 @@ function DefaultText({ node, attributes }) {
|
|
|
4664
4817
|
}
|
|
4665
4818
|
|
|
4666
4819
|
// src/theme/default/components/generic/page-header.tsx
|
|
4667
|
-
import {
|
|
4820
|
+
import {
|
|
4821
|
+
useComponents as useComponents6,
|
|
4822
|
+
useOryConfiguration as useOryConfiguration7,
|
|
4823
|
+
useOryFlow as useOryFlow12
|
|
4824
|
+
} from "@ory/elements-react";
|
|
4668
4825
|
|
|
4669
4826
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4670
|
-
import {
|
|
4827
|
+
import { useOryConfiguration as useOryConfiguration6 } from "@ory/elements-react";
|
|
4671
4828
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
4672
4829
|
|
|
4673
4830
|
// src/theme/default/assets/icons/logout.svg
|
|
4674
|
-
import * as
|
|
4831
|
+
import * as React26 from "react";
|
|
4675
4832
|
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
4676
4833
|
var SvgLogout = (props) => {
|
|
4677
4834
|
var _a, _b;
|
|
@@ -4680,31 +4837,17 @@ var SvgLogout = (props) => {
|
|
|
4680
4837
|
var logout_default = SvgLogout;
|
|
4681
4838
|
|
|
4682
4839
|
// src/theme/default/assets/icons/settings.svg
|
|
4683
|
-
import * as
|
|
4684
|
-
import { jsx as jsx82, jsxs as
|
|
4840
|
+
import * as React27 from "react";
|
|
4841
|
+
import { jsx as jsx82, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4685
4842
|
var SvgSettings = (props) => {
|
|
4686
4843
|
var _a, _b;
|
|
4687
|
-
return /* @__PURE__ */ jsx82("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__ */
|
|
4844
|
+
return /* @__PURE__ */ jsx82("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__ */ jsxs39("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4688
4845
|
/* @__PURE__ */ jsx82("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" }),
|
|
4689
4846
|
/* @__PURE__ */ jsx82("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
4690
4847
|
] }) });
|
|
4691
4848
|
};
|
|
4692
4849
|
var settings_default = SvgSettings;
|
|
4693
4850
|
|
|
4694
|
-
// src/theme/default/utils/logout.ts
|
|
4695
|
-
import { useCallback, useEffect as useEffect4, useState as useState5 } from "react";
|
|
4696
|
-
function useClientLogout(config) {
|
|
4697
|
-
const [logoutFlow, setLogoutFlow] = useState5();
|
|
4698
|
-
const fetchLogoutFlow = useCallback(async () => {
|
|
4699
|
-
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow();
|
|
4700
|
-
setLogoutFlow(flow);
|
|
4701
|
-
}, [config.sdk.url]);
|
|
4702
|
-
useEffect4(() => {
|
|
4703
|
-
void fetchLogoutFlow();
|
|
4704
|
-
}, [fetchLogoutFlow]);
|
|
4705
|
-
return logoutFlow;
|
|
4706
|
-
}
|
|
4707
|
-
|
|
4708
4851
|
// src/theme/default/utils/user.ts
|
|
4709
4852
|
function isTraitsIndexable(traits) {
|
|
4710
4853
|
return typeof traits === "object" && traits !== null;
|
|
@@ -4801,7 +4944,7 @@ DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
|
4801
4944
|
import { forwardRef as forwardRef4 } from "react";
|
|
4802
4945
|
|
|
4803
4946
|
// src/theme/default/assets/icons/user.svg
|
|
4804
|
-
import * as
|
|
4947
|
+
import * as React28 from "react";
|
|
4805
4948
|
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
4806
4949
|
var SvgUser = (props) => {
|
|
4807
4950
|
var _a, _b;
|
|
@@ -4840,26 +4983,26 @@ var UserAvatar = forwardRef4(
|
|
|
4840
4983
|
UserAvatar.displayName = "UserAvatar";
|
|
4841
4984
|
|
|
4842
4985
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4843
|
-
import { jsx as jsx86, jsxs as
|
|
4986
|
+
import { jsx as jsx86, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4844
4987
|
var UserMenu = ({ session }) => {
|
|
4845
|
-
const
|
|
4988
|
+
const config = useOryConfiguration6();
|
|
4846
4989
|
const initials = getUserInitials(session);
|
|
4847
|
-
const logoutFlow = useClientLogout(config);
|
|
4848
|
-
return /* @__PURE__ */
|
|
4990
|
+
const { logoutFlow } = useClientLogout(config);
|
|
4991
|
+
return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
4849
4992
|
/* @__PURE__ */ jsx86(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx86(UserAvatar, { initials, title: "User Menu" }) }),
|
|
4850
|
-
/* @__PURE__ */
|
|
4851
|
-
/* @__PURE__ */
|
|
4993
|
+
/* @__PURE__ */ jsxs40(DropdownMenuContent, { children: [
|
|
4994
|
+
/* @__PURE__ */ jsxs40(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
4852
4995
|
/* @__PURE__ */ jsx86(UserAvatar, { disabled: true, initials }),
|
|
4853
|
-
/* @__PURE__ */
|
|
4996
|
+
/* @__PURE__ */ jsxs40("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
4854
4997
|
/* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
4855
4998
|
initials.secondary && /* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
4856
4999
|
] })
|
|
4857
5000
|
] }),
|
|
4858
|
-
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */
|
|
5001
|
+
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs40("a", { href: "/settings", children: [
|
|
4859
5002
|
/* @__PURE__ */ jsx86(settings_default, { size: 16 }),
|
|
4860
5003
|
" User settings"
|
|
4861
5004
|
] }) }),
|
|
4862
|
-
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */
|
|
5005
|
+
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs40("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
4863
5006
|
/* @__PURE__ */ jsx86(logout_default, { size: 16 }),
|
|
4864
5007
|
" Logout"
|
|
4865
5008
|
] }) })
|
|
@@ -4869,23 +5012,47 @@ var UserMenu = ({ session }) => {
|
|
|
4869
5012
|
|
|
4870
5013
|
// src/theme/default/components/generic/page-header.tsx
|
|
4871
5014
|
import { useSession } from "@ory/elements-react/client";
|
|
4872
|
-
import {
|
|
5015
|
+
import { useIntl as useIntl21 } from "react-intl";
|
|
5016
|
+
import { jsx as jsx87, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4873
5017
|
var DefaultPageHeader = (_props) => {
|
|
5018
|
+
var _a;
|
|
4874
5019
|
const { Card } = useComponents6();
|
|
4875
5020
|
const { session } = useSession();
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
5021
|
+
const intl = useIntl21();
|
|
5022
|
+
const { flow } = useOryFlow12();
|
|
5023
|
+
const config = useOryConfiguration7();
|
|
5024
|
+
const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
|
|
5025
|
+
return /* @__PURE__ */ jsx87("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__ */ jsxs41("div", { className: "flex flex-col gap-12", children: [
|
|
5026
|
+
/* @__PURE__ */ jsxs41("div", { className: "flex max-h-10 flex-1 justify-between gap-2 items-center", children: [
|
|
5027
|
+
/* @__PURE__ */ jsx87(Card.Logo, {}),
|
|
5028
|
+
/* @__PURE__ */ jsx87(UserMenu, { session })
|
|
5029
|
+
] }),
|
|
5030
|
+
returnUrl && /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsxs41(
|
|
5031
|
+
"a",
|
|
5032
|
+
{
|
|
5033
|
+
"data-testid": "ory/screen/settings/back-button",
|
|
5034
|
+
href: returnUrl,
|
|
5035
|
+
className: "inline-flex gap-2 items-center",
|
|
5036
|
+
children: [
|
|
5037
|
+
/* @__PURE__ */ jsx87(arrow_left_default, {}),
|
|
5038
|
+
" ",
|
|
5039
|
+
intl.formatMessage({
|
|
5040
|
+
id: "settings.navigation-back-button",
|
|
5041
|
+
defaultMessage: "Back"
|
|
5042
|
+
})
|
|
5043
|
+
]
|
|
5044
|
+
}
|
|
5045
|
+
) })
|
|
5046
|
+
] }) });
|
|
4880
5047
|
};
|
|
4881
5048
|
|
|
4882
5049
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4883
|
-
import { useEffect as
|
|
5050
|
+
import { useEffect as useEffect6 } from "react";
|
|
4884
5051
|
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
4885
5052
|
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
4886
5053
|
|
|
4887
5054
|
// src/theme/default/assets/icons/trash.svg
|
|
4888
|
-
import * as
|
|
5055
|
+
import * as React29 from "react";
|
|
4889
5056
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
4890
5057
|
var SvgTrash = (props) => {
|
|
4891
5058
|
var _a, _b;
|
|
@@ -4894,14 +5061,14 @@ var SvgTrash = (props) => {
|
|
|
4894
5061
|
var trash_default = SvgTrash;
|
|
4895
5062
|
|
|
4896
5063
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4897
|
-
import { jsx as jsx89, jsxs as
|
|
5064
|
+
import { jsx as jsx89, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4898
5065
|
function DefaultSettingsOidc({
|
|
4899
5066
|
linkButtons,
|
|
4900
5067
|
unlinkButtons
|
|
4901
5068
|
}) {
|
|
4902
5069
|
const hasLinkButtons = linkButtons.length > 0;
|
|
4903
5070
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
4904
|
-
return /* @__PURE__ */
|
|
5071
|
+
return /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-8", children: [
|
|
4905
5072
|
hasLinkButtons && /* @__PURE__ */ jsx89("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
4906
5073
|
const attrs = button.attributes;
|
|
4907
5074
|
return /* @__PURE__ */ jsx89(
|
|
@@ -4925,7 +5092,7 @@ function DefaultSettingsOidc({
|
|
|
4925
5092
|
] });
|
|
4926
5093
|
}
|
|
4927
5094
|
function UnlinkRow({ button }) {
|
|
4928
|
-
var _a, _b;
|
|
5095
|
+
var _a, _b, _c;
|
|
4929
5096
|
const [clicked, setClicked] = useDebounceValue2(false, 100);
|
|
4930
5097
|
const {
|
|
4931
5098
|
formState: { isSubmitting }
|
|
@@ -4937,20 +5104,21 @@ function UnlinkRow({ button }) {
|
|
|
4937
5104
|
button.onClick();
|
|
4938
5105
|
setClicked(true);
|
|
4939
5106
|
};
|
|
4940
|
-
|
|
5107
|
+
useEffect6(() => {
|
|
4941
5108
|
if (!isSubmitting) {
|
|
4942
5109
|
setClicked(false);
|
|
4943
5110
|
}
|
|
4944
5111
|
}, [isSubmitting, setClicked]);
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
5112
|
+
console.log((_c = button.meta.label) == null ? void 0 : _c.context);
|
|
5113
|
+
return /* @__PURE__ */ jsxs42("div", { className: "flex justify-between", children: [
|
|
5114
|
+
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-6", children: [
|
|
5115
|
+
Logo ? /* @__PURE__ */ jsx89(Logo, { size: 32 }) : /* @__PURE__ */ jsx89(GenericLogo, { label: provider.slice(0, 1) }),
|
|
4948
5116
|
/* @__PURE__ */ jsx89("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
4949
5117
|
] }),
|
|
4950
5118
|
/* @__PURE__ */ jsx89(
|
|
4951
5119
|
"button",
|
|
4952
5120
|
{
|
|
4953
|
-
...attrs,
|
|
5121
|
+
...omitInputAttributes(attrs),
|
|
4954
5122
|
type: "submit",
|
|
4955
5123
|
onClick: localOnClick,
|
|
4956
5124
|
disabled: isSubmitting,
|
|
@@ -4971,7 +5139,7 @@ function UnlinkRow({ button }) {
|
|
|
4971
5139
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
4972
5140
|
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
4973
5141
|
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
4974
|
-
import { jsx as jsx90, jsxs as
|
|
5142
|
+
import { jsx as jsx90, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
4975
5143
|
function DefaultSettingsPasskey({
|
|
4976
5144
|
triggerButton,
|
|
4977
5145
|
removeButtons
|
|
@@ -4981,7 +5149,7 @@ function DefaultSettingsPasskey({
|
|
|
4981
5149
|
} = useFormContext20();
|
|
4982
5150
|
const { Node: Node2 } = useComponents7();
|
|
4983
5151
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
4984
|
-
return /* @__PURE__ */
|
|
5152
|
+
return /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
|
|
4985
5153
|
/* @__PURE__ */ jsx90("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx90(
|
|
4986
5154
|
Node2.Button,
|
|
4987
5155
|
{
|
|
@@ -4990,7 +5158,7 @@ function DefaultSettingsPasskey({
|
|
|
4990
5158
|
onClick: triggerButton.onClick
|
|
4991
5159
|
}
|
|
4992
5160
|
) }),
|
|
4993
|
-
hasRemoveButtons ? /* @__PURE__ */
|
|
5161
|
+
hasRemoveButtons ? /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
|
|
4994
5162
|
/* @__PURE__ */ jsx90(DefaultHorizontalDivider, {}),
|
|
4995
5163
|
/* @__PURE__ */ jsx90("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
4996
5164
|
var _a, _b;
|
|
@@ -4998,12 +5166,12 @@ function DefaultSettingsPasskey({
|
|
|
4998
5166
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
4999
5167
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
5000
5168
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
5001
|
-
return /* @__PURE__ */
|
|
5169
|
+
return /* @__PURE__ */ jsxs43(
|
|
5002
5170
|
"div",
|
|
5003
5171
|
{
|
|
5004
5172
|
className: "flex justify-between gap-6 md:items-center",
|
|
5005
5173
|
children: [
|
|
5006
|
-
/* @__PURE__ */
|
|
5174
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5007
5175
|
/* @__PURE__ */ jsx90(
|
|
5008
5176
|
passkey_default,
|
|
5009
5177
|
{
|
|
@@ -5011,8 +5179,8 @@ function DefaultSettingsPasskey({
|
|
|
5011
5179
|
className: "text-interface-foreground-default-primary"
|
|
5012
5180
|
}
|
|
5013
5181
|
),
|
|
5014
|
-
/* @__PURE__ */
|
|
5015
|
-
/* @__PURE__ */
|
|
5182
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5183
|
+
/* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col truncate", children: [
|
|
5016
5184
|
/* @__PURE__ */ jsx90("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5017
5185
|
/* @__PURE__ */ jsx90("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5018
5186
|
] }),
|
|
@@ -5048,7 +5216,7 @@ function DefaultSettingsPasskey({
|
|
|
5048
5216
|
}
|
|
5049
5217
|
|
|
5050
5218
|
// src/theme/default/assets/icons/download.svg
|
|
5051
|
-
import * as
|
|
5219
|
+
import * as React30 from "react";
|
|
5052
5220
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
5053
5221
|
var SvgDownload = (props) => {
|
|
5054
5222
|
var _a, _b;
|
|
@@ -5057,7 +5225,7 @@ var SvgDownload = (props) => {
|
|
|
5057
5225
|
var download_default = SvgDownload;
|
|
5058
5226
|
|
|
5059
5227
|
// src/theme/default/assets/icons/refresh.svg
|
|
5060
|
-
import * as
|
|
5228
|
+
import * as React31 from "react";
|
|
5061
5229
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5062
5230
|
var SvgRefresh = (props) => {
|
|
5063
5231
|
var _a, _b;
|
|
@@ -5067,7 +5235,7 @@ var refresh_default = SvgRefresh;
|
|
|
5067
5235
|
|
|
5068
5236
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
5069
5237
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
5070
|
-
import { Fragment as Fragment12, jsx as jsx93, jsxs as
|
|
5238
|
+
import { Fragment as Fragment12, jsx as jsx93, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5071
5239
|
function DefaultSettingsRecoveryCodes({
|
|
5072
5240
|
codes,
|
|
5073
5241
|
regnerateButton,
|
|
@@ -5089,11 +5257,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5089
5257
|
element.click();
|
|
5090
5258
|
};
|
|
5091
5259
|
const hasCodes = codes.length >= 1;
|
|
5092
|
-
return /* @__PURE__ */
|
|
5260
|
+
return /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-8", children: [
|
|
5093
5261
|
codes.length > 0 && /* @__PURE__ */ jsx93(DefaultHorizontalDivider, {}),
|
|
5094
|
-
/* @__PURE__ */
|
|
5262
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex gap-4 justify-between", children: [
|
|
5095
5263
|
/* @__PURE__ */ jsx93("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
5096
|
-
/* @__PURE__ */
|
|
5264
|
+
/* @__PURE__ */ jsxs44("div", { className: "flex gap-2", children: [
|
|
5097
5265
|
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx93(
|
|
5098
5266
|
"button",
|
|
5099
5267
|
{
|
|
@@ -5163,7 +5331,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5163
5331
|
import { useComponents as useComponents8 } from "@ory/elements-react";
|
|
5164
5332
|
|
|
5165
5333
|
// src/theme/default/assets/icons/qrcode.svg
|
|
5166
|
-
import * as
|
|
5334
|
+
import * as React32 from "react";
|
|
5167
5335
|
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
5168
5336
|
var SvgQrcode = (props) => {
|
|
5169
5337
|
var _a, _b;
|
|
@@ -5173,7 +5341,7 @@ var qrcode_default = SvgQrcode;
|
|
|
5173
5341
|
|
|
5174
5342
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
5175
5343
|
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
5176
|
-
import { jsx as jsx95, jsxs as
|
|
5344
|
+
import { jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5177
5345
|
function DefaultSettingsTotp({
|
|
5178
5346
|
totpImage,
|
|
5179
5347
|
totpInput,
|
|
@@ -5193,9 +5361,9 @@ function DefaultSettingsTotp({
|
|
|
5193
5361
|
node_type: _ignoredNodeType,
|
|
5194
5362
|
...buttonAttrs
|
|
5195
5363
|
} = totpUnlink.attributes;
|
|
5196
|
-
return /* @__PURE__ */
|
|
5364
|
+
return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5197
5365
|
/* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(Card.Divider, {}) }),
|
|
5198
|
-
/* @__PURE__ */
|
|
5366
|
+
/* @__PURE__ */ jsxs45("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
5199
5367
|
/* @__PURE__ */ jsx95("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx95(qrcode_default, { size: 32 }) }),
|
|
5200
5368
|
/* @__PURE__ */ jsx95("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx95("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
5201
5369
|
/* @__PURE__ */ jsx95(
|
|
@@ -5218,7 +5386,7 @@ function DefaultSettingsTotp({
|
|
|
5218
5386
|
] });
|
|
5219
5387
|
}
|
|
5220
5388
|
if (totpImage && totpSecret && totpInput) {
|
|
5221
|
-
return /* @__PURE__ */
|
|
5389
|
+
return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5222
5390
|
/* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(DefaultHorizontalDivider, {}) }),
|
|
5223
5391
|
/* @__PURE__ */ jsx95("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx95("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx95("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx95(
|
|
5224
5392
|
Node2.Image,
|
|
@@ -5229,7 +5397,7 @@ function DefaultSettingsTotp({
|
|
|
5229
5397
|
}
|
|
5230
5398
|
}
|
|
5231
5399
|
) }) }) }),
|
|
5232
|
-
/* @__PURE__ */
|
|
5400
|
+
/* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-6", children: [
|
|
5233
5401
|
/* @__PURE__ */ jsx95(
|
|
5234
5402
|
Node2.Label,
|
|
5235
5403
|
{
|
|
@@ -5271,7 +5439,7 @@ function DefaultSettingsTotp({
|
|
|
5271
5439
|
import { useComponents as useComponents9 } from "@ory/elements-react";
|
|
5272
5440
|
|
|
5273
5441
|
// src/theme/default/assets/icons/key.svg
|
|
5274
|
-
import * as
|
|
5442
|
+
import * as React33 from "react";
|
|
5275
5443
|
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
5276
5444
|
var SvgKey = (props) => {
|
|
5277
5445
|
var _a, _b;
|
|
@@ -5281,7 +5449,7 @@ var key_default = SvgKey;
|
|
|
5281
5449
|
|
|
5282
5450
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
5283
5451
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
5284
|
-
import { jsx as jsx97, jsxs as
|
|
5452
|
+
import { jsx as jsx97, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5285
5453
|
function DefaultSettingsWebauthn({
|
|
5286
5454
|
nameInput,
|
|
5287
5455
|
triggerButton,
|
|
@@ -5292,8 +5460,8 @@ function DefaultSettingsWebauthn({
|
|
|
5292
5460
|
} = useFormContext23();
|
|
5293
5461
|
const { Node: Node2, Card } = useComponents9();
|
|
5294
5462
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5295
|
-
return /* @__PURE__ */
|
|
5296
|
-
/* @__PURE__ */
|
|
5463
|
+
return /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
|
|
5464
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
5297
5465
|
/* @__PURE__ */ jsx97("div", { className: "flex-1", children: /* @__PURE__ */ jsx97(
|
|
5298
5466
|
Node2.Label,
|
|
5299
5467
|
{
|
|
@@ -5317,7 +5485,7 @@ function DefaultSettingsWebauthn({
|
|
|
5317
5485
|
}
|
|
5318
5486
|
) : null
|
|
5319
5487
|
] }),
|
|
5320
|
-
hasRemoveButtons ? /* @__PURE__ */
|
|
5488
|
+
hasRemoveButtons ? /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
|
|
5321
5489
|
/* @__PURE__ */ jsx97(Card.Divider, {}),
|
|
5322
5490
|
/* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
5323
5491
|
var _a, _b;
|
|
@@ -5325,12 +5493,12 @@ function DefaultSettingsWebauthn({
|
|
|
5325
5493
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
5326
5494
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
5327
5495
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
5328
|
-
return /* @__PURE__ */
|
|
5496
|
+
return /* @__PURE__ */ jsxs46(
|
|
5329
5497
|
"div",
|
|
5330
5498
|
{
|
|
5331
5499
|
className: "flex justify-between gap-6 md:items-center",
|
|
5332
5500
|
children: [
|
|
5333
|
-
/* @__PURE__ */
|
|
5501
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5334
5502
|
/* @__PURE__ */ jsx97(
|
|
5335
5503
|
key_default,
|
|
5336
5504
|
{
|
|
@@ -5338,8 +5506,8 @@ function DefaultSettingsWebauthn({
|
|
|
5338
5506
|
className: "text-interface-foreground-default-primary"
|
|
5339
5507
|
}
|
|
5340
5508
|
),
|
|
5341
|
-
/* @__PURE__ */
|
|
5342
|
-
/* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5510
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col truncate", children: [
|
|
5343
5511
|
/* @__PURE__ */ jsx97("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5344
5512
|
/* @__PURE__ */ jsx97("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5345
5513
|
] }),
|
|
@@ -5385,52 +5553,57 @@ function DefaultAuthMethodListContainer({
|
|
|
5385
5553
|
// src/theme/default/components/form/captcha.tsx
|
|
5386
5554
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes9 } from "@ory/client-fetch";
|
|
5387
5555
|
import { Turnstile } from "@marsidev/react-turnstile";
|
|
5388
|
-
import { useRef as
|
|
5556
|
+
import { useEffect as useEffect7, useRef as useRef4 } from "react";
|
|
5389
5557
|
import { useFormContext as useFormContext24 } from "react-hook-form";
|
|
5390
5558
|
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
5391
5559
|
var DefaultCaptcha = ({ node }) => {
|
|
5392
|
-
const { setValue } = useFormContext24();
|
|
5393
|
-
const ref =
|
|
5394
|
-
const
|
|
5395
|
-
|
|
5396
|
-
if (
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5560
|
+
const { setValue, formState } = useFormContext24();
|
|
5561
|
+
const ref = useRef4();
|
|
5562
|
+
const prevSubmitCount = useRef4(formState.submitCount);
|
|
5563
|
+
useEffect7(() => {
|
|
5564
|
+
if (formState.submitCount > prevSubmitCount.current && formState.isSubmitSuccessful) {
|
|
5565
|
+
prevSubmitCount.current = formState.submitCount;
|
|
5566
|
+
setTimeout(() => {
|
|
5567
|
+
if (ref.current) {
|
|
5568
|
+
ref.current.reset();
|
|
5569
|
+
}
|
|
5570
|
+
}, 100);
|
|
5400
5571
|
}
|
|
5572
|
+
}, [formState.submitCount, formState.isSubmitSuccessful]);
|
|
5573
|
+
if (!isUiNodeInputAttributes9(node.attributes)) {
|
|
5574
|
+
return null;
|
|
5401
5575
|
}
|
|
5402
|
-
if (
|
|
5576
|
+
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
5577
|
+
return /* @__PURE__ */ jsx99(DefaultInput, { node, attributes: node.attributes }, 1);
|
|
5578
|
+
} else if (node.attributes.name === "captcha_turnstile_options") {
|
|
5403
5579
|
const options = JSON.parse(node.attributes.value);
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
responseFieldName: options.response_field_name
|
|
5416
|
-
},
|
|
5417
|
-
onExpire: () => {
|
|
5418
|
-
var _a;
|
|
5419
|
-
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5420
|
-
},
|
|
5421
|
-
onSuccess: (token) => {
|
|
5422
|
-
setValue(options.response_field_name, token);
|
|
5423
|
-
}
|
|
5580
|
+
return /* @__PURE__ */ jsx99(
|
|
5581
|
+
Turnstile,
|
|
5582
|
+
{
|
|
5583
|
+
ref,
|
|
5584
|
+
siteKey: options.sitekey,
|
|
5585
|
+
options: {
|
|
5586
|
+
action: options.action,
|
|
5587
|
+
size: "flexible",
|
|
5588
|
+
theme: options.theme,
|
|
5589
|
+
responseField: false,
|
|
5590
|
+
responseFieldName: options.response_field_name
|
|
5424
5591
|
},
|
|
5425
|
-
|
|
5426
|
-
|
|
5592
|
+
onExpire: () => {
|
|
5593
|
+
var _a;
|
|
5594
|
+
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5595
|
+
},
|
|
5596
|
+
onSuccess: (token) => {
|
|
5597
|
+
setValue(options.response_field_name, token);
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5427
5600
|
);
|
|
5428
5601
|
}
|
|
5429
|
-
return
|
|
5602
|
+
return null;
|
|
5430
5603
|
};
|
|
5431
5604
|
|
|
5432
5605
|
// src/theme/default/assets/icons/personal.svg
|
|
5433
|
-
import * as
|
|
5606
|
+
import * as React34 from "react";
|
|
5434
5607
|
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
5435
5608
|
var SvgPersonal = (props) => {
|
|
5436
5609
|
var _a, _b;
|
|
@@ -5439,7 +5612,7 @@ var SvgPersonal = (props) => {
|
|
|
5439
5612
|
var personal_default = SvgPersonal;
|
|
5440
5613
|
|
|
5441
5614
|
// src/theme/default/assets/icons/message.svg
|
|
5442
|
-
import * as
|
|
5615
|
+
import * as React35 from "react";
|
|
5443
5616
|
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
5444
5617
|
var SvgMessage = (props) => {
|
|
5445
5618
|
var _a, _b;
|
|
@@ -5448,7 +5621,7 @@ var SvgMessage = (props) => {
|
|
|
5448
5621
|
var message_default = SvgMessage;
|
|
5449
5622
|
|
|
5450
5623
|
// src/theme/default/assets/icons/phone.svg
|
|
5451
|
-
import * as
|
|
5624
|
+
import * as React36 from "react";
|
|
5452
5625
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5453
5626
|
var SvgPhone = (props) => {
|
|
5454
5627
|
var _a, _b;
|
|
@@ -5457,7 +5630,7 @@ var SvgPhone = (props) => {
|
|
|
5457
5630
|
var phone_default = SvgPhone;
|
|
5458
5631
|
|
|
5459
5632
|
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
5460
|
-
import { useIntl as
|
|
5633
|
+
import { useIntl as useIntl22 } from "react-intl";
|
|
5461
5634
|
import * as Switch from "@radix-ui/react-switch";
|
|
5462
5635
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
5463
5636
|
var ScopeIcons = {
|
|
@@ -5472,7 +5645,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5472
5645
|
onCheckedChange
|
|
5473
5646
|
}) {
|
|
5474
5647
|
var _a;
|
|
5475
|
-
const intl =
|
|
5648
|
+
const intl = useIntl22();
|
|
5476
5649
|
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
5477
5650
|
return /* @__PURE__ */ jsx103(
|
|
5478
5651
|
ListItem,
|
|
@@ -5559,9 +5732,13 @@ import {
|
|
|
5559
5732
|
instanceOfFlowError,
|
|
5560
5733
|
instanceOfGenericError
|
|
5561
5734
|
} from "@ory/client-fetch";
|
|
5735
|
+
import {
|
|
5736
|
+
OryConfigurationProvider as OryConfigurationProvider2,
|
|
5737
|
+
useOryConfiguration as useOryConfiguration8
|
|
5738
|
+
} from "@ory/elements-react";
|
|
5562
5739
|
import { useMemo as useMemo2 } from "react";
|
|
5563
5740
|
import { FormattedMessage } from "react-intl";
|
|
5564
|
-
import { jsx as jsx104, jsxs as
|
|
5741
|
+
import { jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5565
5742
|
function isOAuth2Error(error) {
|
|
5566
5743
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5567
5744
|
}
|
|
@@ -5614,43 +5791,43 @@ function Error2({
|
|
|
5614
5791
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5615
5792
|
const parsed = useStandardize(error);
|
|
5616
5793
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5617
|
-
return /* @__PURE__ */ jsx104(
|
|
5794
|
+
return /* @__PURE__ */ jsx104(OryConfigurationProvider2, { sdk: config.sdk, project: config.project, children: /* @__PURE__ */ jsx104(
|
|
5618
5795
|
IntlProvider,
|
|
5619
5796
|
{
|
|
5620
5797
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5621
5798
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5622
|
-
children: /* @__PURE__ */ jsx104(Card, { children: /* @__PURE__ */
|
|
5799
|
+
children: /* @__PURE__ */ jsx104(Card, { children: /* @__PURE__ */ jsxs47(
|
|
5623
5800
|
"div",
|
|
5624
5801
|
{
|
|
5625
5802
|
className: "flex flex-col gap-6 antialiased",
|
|
5626
5803
|
"data-testid": "ory/screen/error",
|
|
5627
5804
|
children: [
|
|
5628
|
-
/* @__PURE__ */
|
|
5629
|
-
/* @__PURE__ */ jsx104(ErrorLogo, {
|
|
5630
|
-
/* @__PURE__ */
|
|
5805
|
+
/* @__PURE__ */ jsxs47("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5806
|
+
/* @__PURE__ */ jsx104(ErrorLogo, {}),
|
|
5807
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
|
|
5631
5808
|
/* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5632
5809
|
/* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5633
5810
|
parsed.reason && /* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5634
5811
|
] })
|
|
5635
5812
|
] }),
|
|
5636
5813
|
/* @__PURE__ */ jsx104(Divider, {}),
|
|
5637
|
-
/* @__PURE__ */
|
|
5814
|
+
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
|
|
5638
5815
|
/* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
|
|
5639
5816
|
/* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.instructions" }) }),
|
|
5640
|
-
/* @__PURE__ */ jsx104("div", { children: session ? /* @__PURE__ */ jsx104(LoggedInActions, {
|
|
5817
|
+
/* @__PURE__ */ jsx104("div", { children: session ? /* @__PURE__ */ jsx104(LoggedInActions, {}) : /* @__PURE__ */ jsx104(GoBackButton, {}) })
|
|
5641
5818
|
] }),
|
|
5642
5819
|
/* @__PURE__ */ jsx104(Divider, {}),
|
|
5643
|
-
/* @__PURE__ */
|
|
5820
|
+
/* @__PURE__ */ jsxs47("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5644
5821
|
/* @__PURE__ */ jsx104("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.text" }) }),
|
|
5645
|
-
parsed.id && /* @__PURE__ */
|
|
5822
|
+
parsed.id && /* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5646
5823
|
"ID: ",
|
|
5647
5824
|
/* @__PURE__ */ jsx104("code", { children: parsed.id })
|
|
5648
5825
|
] }),
|
|
5649
|
-
/* @__PURE__ */
|
|
5826
|
+
/* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5650
5827
|
"Time: ",
|
|
5651
5828
|
/* @__PURE__ */ jsx104("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5652
5829
|
] }),
|
|
5653
|
-
/* @__PURE__ */
|
|
5830
|
+
/* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5654
5831
|
"Message: ",
|
|
5655
5832
|
/* @__PURE__ */ jsx104("code", { children: parsed.reason })
|
|
5656
5833
|
] }),
|
|
@@ -5674,20 +5851,22 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5674
5851
|
}
|
|
5675
5852
|
) })
|
|
5676
5853
|
}
|
|
5677
|
-
);
|
|
5854
|
+
) });
|
|
5678
5855
|
}
|
|
5679
|
-
function LoggedInActions(
|
|
5680
|
-
const
|
|
5856
|
+
function LoggedInActions() {
|
|
5857
|
+
const config = useOryConfiguration8();
|
|
5858
|
+
const { logoutFlow } = useClientLogout(config);
|
|
5681
5859
|
return /* @__PURE__ */ jsx104(
|
|
5682
5860
|
"a",
|
|
5683
5861
|
{
|
|
5684
5862
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
5685
5863
|
className: "text-interface-foreground-default-primary underline",
|
|
5686
|
-
children: "
|
|
5864
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "login.logout-button" })
|
|
5687
5865
|
}
|
|
5688
5866
|
);
|
|
5689
5867
|
}
|
|
5690
|
-
function GoBackButton(
|
|
5868
|
+
function GoBackButton() {
|
|
5869
|
+
const config = useOryConfiguration8();
|
|
5691
5870
|
if ("default_redirect_url" in config.project) {
|
|
5692
5871
|
return /* @__PURE__ */ jsx104(
|
|
5693
5872
|
"a",
|
|
@@ -5700,11 +5879,12 @@ function GoBackButton({ config }) {
|
|
|
5700
5879
|
}
|
|
5701
5880
|
return null;
|
|
5702
5881
|
}
|
|
5703
|
-
function ErrorLogo(
|
|
5704
|
-
|
|
5705
|
-
|
|
5882
|
+
function ErrorLogo() {
|
|
5883
|
+
const { project } = useOryConfiguration8();
|
|
5884
|
+
if (project.logo_light_url) {
|
|
5885
|
+
return /* @__PURE__ */ jsx104("img", { src: project.logo_light_url, width: 100, height: 36, alt: "Logo" });
|
|
5706
5886
|
}
|
|
5707
|
-
return /* @__PURE__ */ jsx104("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children:
|
|
5887
|
+
return /* @__PURE__ */ jsx104("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: project.name });
|
|
5708
5888
|
}
|
|
5709
5889
|
|
|
5710
5890
|
// src/theme/default/flows/login.tsx
|
|
@@ -5792,7 +5972,7 @@ import {
|
|
|
5792
5972
|
OryProvider as OryProvider4,
|
|
5793
5973
|
OrySettingsCard
|
|
5794
5974
|
} from "@ory/elements-react";
|
|
5795
|
-
import { Fragment as Fragment13, jsx as jsx108, jsxs as
|
|
5975
|
+
import { Fragment as Fragment13, jsx as jsx108, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5796
5976
|
function Settings({
|
|
5797
5977
|
flow,
|
|
5798
5978
|
config,
|
|
@@ -5807,7 +5987,7 @@ function Settings({
|
|
|
5807
5987
|
flow,
|
|
5808
5988
|
flowType: FlowType21.Settings,
|
|
5809
5989
|
components,
|
|
5810
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5990
|
+
children: children != null ? children : /* @__PURE__ */ jsxs48(Fragment13, { children: [
|
|
5811
5991
|
/* @__PURE__ */ jsx108(HeadlessPageHeader, {}),
|
|
5812
5992
|
/* @__PURE__ */ jsx108(OrySettingsCard, {})
|
|
5813
5993
|
] })
|