@ory/elements-react 0.0.0-pr.f1d09ee2 → 0.0.0-pr.fd92d9ce
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +72 -0
- package/DEVELOPMENT.md +2 -1
- package/dist/index.d.mts +73 -42
- package/dist/index.d.ts +73 -42
- package/dist/index.js +367 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +365 -133
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +921 -762
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +751 -585
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +6 -6
- package/tsconfig.json +1 -1
|
@@ -40,48 +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
|
-
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
49
|
-
}
|
|
50
|
-
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
51
|
-
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
52
|
-
const qs = new URLSearchParams();
|
|
53
|
-
if (flow.oauth2_login_challenge) {
|
|
54
|
-
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
55
|
-
}
|
|
56
|
-
if (flow.return_to) {
|
|
57
|
-
qs.set("return_to", flow.return_to);
|
|
58
|
-
} else if (typeof window !== "undefined") {
|
|
59
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
60
|
-
if (searchParams.has("return_to")) {
|
|
61
|
-
qs.set("return_to", searchParams.get("return_to") || "");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (qs.toString().length === 0) {
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
return result + "?" + qs.toString();
|
|
68
|
-
}
|
|
69
|
-
function appendReturnTo(url, returnTo) {
|
|
70
|
-
if (!returnTo) {
|
|
71
|
-
return url;
|
|
72
|
-
}
|
|
73
|
-
const urlObj = new URL(url);
|
|
74
|
-
urlObj.searchParams.set("return_to", returnTo);
|
|
75
|
-
return urlObj.toString();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// src/util/ui/index.ts
|
|
79
|
-
import {
|
|
80
|
-
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
81
|
-
isUiNodeScriptAttributes
|
|
82
|
-
} from "@ory/client-fetch";
|
|
83
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
84
|
-
import { useMemo } from "react";
|
|
50
|
+
// src/components/card/two-step/state-select-method.tsx
|
|
51
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
|
|
85
52
|
|
|
86
53
|
// src/context/component.tsx
|
|
87
54
|
import {
|
|
@@ -108,7 +75,32 @@ var defaultGroupOrder = [
|
|
|
108
75
|
UiNodeGroupEnum.Totp
|
|
109
76
|
];
|
|
110
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
|
+
|
|
111
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";
|
|
112
104
|
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
113
105
|
var _a;
|
|
114
106
|
const groups = {};
|
|
@@ -171,38 +163,99 @@ function useNodeGroupsWithVisibleNodes(nodes) {
|
|
|
171
163
|
}, [nodes]);
|
|
172
164
|
}
|
|
173
165
|
|
|
174
|
-
// src/util/nodes.ts
|
|
175
|
-
function findScreenSelectionButton(nodes) {
|
|
176
|
-
return nodes.find(
|
|
177
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// src/components/card/two-step/state-select-method.tsx
|
|
182
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
|
|
183
|
-
|
|
184
166
|
// src/context/flow-context.tsx
|
|
185
|
-
import {
|
|
186
|
-
|
|
187
|
-
useContext as useContext2,
|
|
188
|
-
useState as useState2
|
|
189
|
-
} from "react";
|
|
167
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
168
|
+
var OryFlowContext = createContext2(null);
|
|
190
169
|
|
|
191
|
-
// src/context/
|
|
192
|
-
import {
|
|
193
|
-
import { useReducer, useState } from "react";
|
|
170
|
+
// src/context/config.tsx
|
|
171
|
+
import { createContext as createContext3, useContext as useContext3, useRef } from "react";
|
|
194
172
|
|
|
195
|
-
// src/
|
|
196
|
-
|
|
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
|
+
}
|
|
197
180
|
|
|
198
|
-
// src/
|
|
199
|
-
|
|
200
|
-
|
|
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);
|
|
201
197
|
}
|
|
202
198
|
|
|
203
|
-
// src/context/
|
|
204
|
-
import { jsx as
|
|
205
|
-
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
|
+
}
|
|
206
259
|
|
|
207
260
|
// src/context/intl-context.tsx
|
|
208
261
|
import { IntlProvider as OriginalIntlProvider } from "react-intl";
|
|
@@ -228,32 +281,22 @@ import { useFormContext } from "react-hook-form";
|
|
|
228
281
|
// src/util/onSubmitLogin.ts
|
|
229
282
|
import {
|
|
230
283
|
FlowType as FlowType3,
|
|
231
|
-
handleFlowError,
|
|
232
284
|
loginUrl
|
|
233
285
|
} from "@ory/client-fetch";
|
|
234
286
|
|
|
235
|
-
// src/util/
|
|
287
|
+
// src/util/sdk-helpers/error.ts
|
|
236
288
|
import {
|
|
237
|
-
|
|
238
|
-
|
|
289
|
+
ResponseError,
|
|
290
|
+
FetchError
|
|
239
291
|
} from "@ory/client-fetch";
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
basePath: sdkUrl,
|
|
244
|
-
headers: {
|
|
245
|
-
Accept: "application/json",
|
|
246
|
-
...opts.headers
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
return new FrontendApi(config);
|
|
250
|
-
}
|
|
292
|
+
|
|
293
|
+
// src/util/sdk-helpers/utils.ts
|
|
294
|
+
import { FetchError as FetchError2, ResponseError as ResponseError2 } from "@ory/client-fetch";
|
|
251
295
|
|
|
252
296
|
// src/util/onSubmitRecovery.ts
|
|
253
297
|
import {
|
|
254
298
|
FlowType as FlowType4,
|
|
255
299
|
handleContinueWith,
|
|
256
|
-
handleFlowError as handleFlowError2,
|
|
257
300
|
instanceOfContinueWithRecoveryUi,
|
|
258
301
|
recoveryUrl
|
|
259
302
|
} from "@ory/client-fetch";
|
|
@@ -262,7 +305,6 @@ import {
|
|
|
262
305
|
import {
|
|
263
306
|
FlowType as FlowType5,
|
|
264
307
|
handleContinueWith as handleContinueWith2,
|
|
265
|
-
handleFlowError as handleFlowError3,
|
|
266
308
|
registrationUrl
|
|
267
309
|
} from "@ory/client-fetch";
|
|
268
310
|
|
|
@@ -270,8 +312,7 @@ import {
|
|
|
270
312
|
import {
|
|
271
313
|
FlowType as FlowType6,
|
|
272
314
|
handleContinueWith as handleContinueWith3,
|
|
273
|
-
|
|
274
|
-
isResponseError,
|
|
315
|
+
isResponseError as isResponseError2,
|
|
275
316
|
loginUrl as loginUrl2,
|
|
276
317
|
settingsUrl
|
|
277
318
|
} from "@ory/client-fetch";
|
|
@@ -279,15 +320,14 @@ import {
|
|
|
279
320
|
// src/util/onSubmitVerification.ts
|
|
280
321
|
import {
|
|
281
322
|
FlowType as FlowType7,
|
|
282
|
-
|
|
283
|
-
verificationUrl
|
|
323
|
+
verificationUrl as verificationUrl2
|
|
284
324
|
} from "@ory/client-fetch";
|
|
285
325
|
|
|
286
326
|
// src/components/form/form-helpers.ts
|
|
287
327
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
|
|
288
328
|
|
|
289
329
|
// src/components/form/form.tsx
|
|
290
|
-
import { jsx as
|
|
330
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
291
331
|
|
|
292
332
|
// src/components/form/groups.tsx
|
|
293
333
|
import { getNodeId } from "@ory/client-fetch";
|
|
@@ -297,9 +337,9 @@ import {
|
|
|
297
337
|
UiNodeGroupEnum as UiNodeGroupEnum6,
|
|
298
338
|
UiNodeInputAttributesTypeEnum
|
|
299
339
|
} from "@ory/client-fetch";
|
|
300
|
-
import { useEffect, useRef } from "react";
|
|
340
|
+
import { useEffect, useRef as useRef2 } from "react";
|
|
301
341
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
302
|
-
import { jsx as
|
|
342
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
303
343
|
|
|
304
344
|
// src/components/form/nodes/node.tsx
|
|
305
345
|
import {
|
|
@@ -310,13 +350,13 @@ import {
|
|
|
310
350
|
isUiNodeTextAttributes,
|
|
311
351
|
UiNodeGroupEnum as UiNodeGroupEnum7
|
|
312
352
|
} from "@ory/client-fetch";
|
|
313
|
-
import { jsx as
|
|
353
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
314
354
|
|
|
315
355
|
// src/components/form/groups.tsx
|
|
316
|
-
import { jsx as
|
|
356
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
317
357
|
|
|
318
358
|
// src/components/form/messages.tsx
|
|
319
|
-
import { jsx as
|
|
359
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
320
360
|
|
|
321
361
|
// src/components/form/social.tsx
|
|
322
362
|
import {
|
|
@@ -333,21 +373,21 @@ import { FormProvider, useForm } from "react-hook-form";
|
|
|
333
373
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
|
|
334
374
|
|
|
335
375
|
// src/components/form/form-provider.tsx
|
|
336
|
-
import { jsx as
|
|
376
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
337
377
|
|
|
338
378
|
// src/components/form/social.tsx
|
|
339
|
-
import { jsx as
|
|
379
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
340
380
|
|
|
341
381
|
// src/components/form/section.tsx
|
|
342
382
|
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
343
|
-
import { jsx as
|
|
383
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
344
384
|
|
|
345
385
|
// src/components/generic/divider.tsx
|
|
346
386
|
import { UiNodeGroupEnum as UiNodeGroupEnum11 } from "@ory/client-fetch";
|
|
347
|
-
import { jsx as
|
|
387
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
348
388
|
|
|
349
389
|
// src/components/generic/page-header.tsx
|
|
350
|
-
import { jsx as
|
|
390
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
351
391
|
|
|
352
392
|
// src/components/settings/settings-card.tsx
|
|
353
393
|
import {
|
|
@@ -360,30 +400,30 @@ import { useIntl as useIntl7 } from "react-intl";
|
|
|
360
400
|
// src/components/settings/oidc-settings.tsx
|
|
361
401
|
import { useIntl as useIntl2 } from "react-intl";
|
|
362
402
|
import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
363
|
-
import { Fragment, jsx as
|
|
403
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
364
404
|
|
|
365
405
|
// src/components/settings/passkey-settings.tsx
|
|
366
406
|
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
367
407
|
import { useIntl as useIntl3 } from "react-intl";
|
|
368
|
-
import { Fragment as Fragment2, jsx as
|
|
408
|
+
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
369
409
|
|
|
370
410
|
// src/components/settings/recovery-codes-settings.tsx
|
|
371
411
|
import { useIntl as useIntl4 } from "react-intl";
|
|
372
412
|
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
373
|
-
import { Fragment as Fragment3, jsx as
|
|
413
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
374
414
|
|
|
375
415
|
// src/components/settings/totp-settings.tsx
|
|
376
416
|
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
377
417
|
import { useIntl as useIntl5 } from "react-intl";
|
|
378
|
-
import { Fragment as Fragment4, jsx as
|
|
418
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
379
419
|
|
|
380
420
|
// src/components/settings/webauthn-settings.tsx
|
|
381
421
|
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
382
422
|
import { useIntl as useIntl6 } from "react-intl";
|
|
383
|
-
import { Fragment as Fragment5, jsx as
|
|
423
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
384
424
|
|
|
385
425
|
// src/components/settings/settings-card.tsx
|
|
386
|
-
import { Fragment as Fragment6, jsx as
|
|
426
|
+
import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
387
427
|
|
|
388
428
|
// src/util/i18n/index.ts
|
|
389
429
|
var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
|
|
@@ -675,9 +715,11 @@ var en_default = {
|
|
|
675
715
|
"card.header.parts.oidc": "a social provider",
|
|
676
716
|
"card.header.parts.password.registration": "your {identifierLabel} and a password",
|
|
677
717
|
"card.header.parts.password.login": "your {identifierLabel} and password",
|
|
678
|
-
"card.header.parts.code": "a code sent to
|
|
718
|
+
"card.header.parts.code": "a code sent to you",
|
|
679
719
|
"card.header.parts.passkey": "a Passkey",
|
|
680
720
|
"card.header.parts.webauthn": "a security key",
|
|
721
|
+
"card.header.parts.totp": "your authenticator app",
|
|
722
|
+
"card.header.parts.lookup_secret": "a backup recovery code",
|
|
681
723
|
"card.header.parts.identifier-first": "your {identifierLabel}",
|
|
682
724
|
"card.header.description.login": "Sign in with {identifierLabel}",
|
|
683
725
|
"card.header.description.registration": "Sign up with {identifierLabel}",
|
|
@@ -925,13 +967,15 @@ var de_default = {
|
|
|
925
967
|
"identities.messages.4010009": "Die Authentifizierungsmethode stimmt nicht mit der vorherigen Authentifizierungsmethode \xFCberein. Bitte versuchen Sie es erneut.",
|
|
926
968
|
"identities.messages.4010010": "Die eingegebene Adresse stimmt nicht mit der Adresse \xFCberein, die Sie bei der Registrierung angegeben haben. Bitte versuchen Sie es erneut.",
|
|
927
969
|
"input.placeholder": "{placeholder} eingeben",
|
|
928
|
-
"card.header.parts.code": "
|
|
970
|
+
"card.header.parts.code": "ein an Sie gesendeter Code",
|
|
929
971
|
"card.header.parts.identifier-first": "Ihr {identifierLabel}",
|
|
930
972
|
"card.header.parts.oidc": "ein sozialer Anbieter",
|
|
931
973
|
"card.header.parts.passkey": "ein Passkey",
|
|
932
974
|
"card.header.parts.password.login": "Ihrer {identifierLabel} und Ihrem Passwort",
|
|
933
975
|
"card.header.parts.password.registration": "Ihrer {identifierLabel} und einem Passwort",
|
|
934
976
|
"card.header.parts.webauthn": "ein Sicherheitsschl\xFCssel",
|
|
977
|
+
"card.header.parts.totp": "deine Authentifikator-App",
|
|
978
|
+
"card.header.parts.lookup_secret": "ein Backup-Wiederherstellungscode",
|
|
935
979
|
"recovery.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um einen einmaligen Zugangscode zu erhalten",
|
|
936
980
|
"verification.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um es zu best\xE4tigen",
|
|
937
981
|
"card.header.description.login": "Melden Sie sich mit {identifierLabel} an",
|
|
@@ -1270,6 +1314,8 @@ var es_default = {
|
|
|
1270
1314
|
"card.header.parts.code": "un c\xF3digo enviado a tu correo electr\xF3nico",
|
|
1271
1315
|
"card.header.parts.passkey": "una clave de acceso",
|
|
1272
1316
|
"card.header.parts.webauthn": "una clave de seguridad",
|
|
1317
|
+
"card.header.parts.totp": "su aplicaci\xF3n de autenticaci\xF3n",
|
|
1318
|
+
"card.header.parts.lookup_secret": "un c\xF3digo de recuperaci\xF3n de copia de seguridad",
|
|
1273
1319
|
"card.header.parts.identifier-first": "tu {identifierLabel}",
|
|
1274
1320
|
"card.header.description.login": "Iniciar sesi\xF3n con {identifierLabel}",
|
|
1275
1321
|
"card.header.description.registration": "Registrarse con {identifierLabel}",
|
|
@@ -1547,10 +1593,12 @@ var fr_default = {
|
|
|
1547
1593
|
"card.header.parts.oidc": "un fournisseur de r\xE9seaux sociaux",
|
|
1548
1594
|
"card.header.parts.password.registration": "votre {identifierLabel} et un mot de passe",
|
|
1549
1595
|
"card.header.parts.password.login": "votre {identifierLabel} et votre mot de passe",
|
|
1550
|
-
"card.header.parts.code": "un code envoy\xE9 \xE0 votre adresse e-mail",
|
|
1551
1596
|
"card.header.parts.passkey": "une cl\xE9 d'acc\xE8s",
|
|
1552
1597
|
"card.header.parts.webauthn": "une cl\xE9 de s\xE9curit\xE9",
|
|
1553
1598
|
"card.header.parts.identifier-first": "votre {identifierLabel}",
|
|
1599
|
+
"card.header.parts.code": "un code qui vous a \xE9t\xE9 envoy\xE9",
|
|
1600
|
+
"card.header.parts.totp": "votre application d'authentification",
|
|
1601
|
+
"card.header.parts.lookup_secret": "un code de r\xE9cup\xE9ration de secours",
|
|
1554
1602
|
"card.header.description.login": "Se connecter avec {identifierLabel}",
|
|
1555
1603
|
"card.header.description.registration": "S'inscrire avec {identifierLabel}",
|
|
1556
1604
|
"misc.or": "ou",
|
|
@@ -1793,7 +1841,9 @@ var nl_default = {
|
|
|
1793
1841
|
"input.placeholder": "",
|
|
1794
1842
|
"card.header.description.login": "",
|
|
1795
1843
|
"card.header.description.registration": "",
|
|
1796
|
-
"card.header.parts.code": "",
|
|
1844
|
+
"card.header.parts.code": "een code die naar je is verzonden",
|
|
1845
|
+
"card.header.parts.totp": "je authenticator-app",
|
|
1846
|
+
"card.header.parts.lookup_secret": "een backup herstelcode",
|
|
1797
1847
|
"card.header.parts.identifier-first": "",
|
|
1798
1848
|
"card.header.parts.oidc": "",
|
|
1799
1849
|
"card.header.parts.passkey": "",
|
|
@@ -2078,13 +2128,15 @@ var pl_default = {
|
|
|
2078
2128
|
"input.placeholder": "",
|
|
2079
2129
|
"card.header.description.login": "",
|
|
2080
2130
|
"card.header.description.registration": "",
|
|
2081
|
-
"card.header.parts.code": "",
|
|
2082
2131
|
"card.header.parts.identifier-first": "",
|
|
2083
2132
|
"card.header.parts.oidc": "",
|
|
2084
2133
|
"card.header.parts.passkey": "",
|
|
2085
2134
|
"card.header.parts.password.login": "",
|
|
2086
2135
|
"card.header.parts.password.registration": "",
|
|
2087
2136
|
"card.header.parts.webauthn": "",
|
|
2137
|
+
"card.header.parts.code": "kod wys\u0142any do Ciebie",
|
|
2138
|
+
"card.header.parts.totp": "Twoja aplikacja uwierzytelniaj\u0105ca",
|
|
2139
|
+
"card.header.parts.lookup_secret": "kod odzyskiwania kopii zapasowej",
|
|
2088
2140
|
"forms.label.forgot-password": "",
|
|
2089
2141
|
"login.subtitle": "",
|
|
2090
2142
|
"login.subtitle-refresh": "",
|
|
@@ -2363,7 +2415,9 @@ var pt_default = {
|
|
|
2363
2415
|
"input.placeholder": "",
|
|
2364
2416
|
"card.header.description.login": "",
|
|
2365
2417
|
"card.header.description.registration": "",
|
|
2366
|
-
"card.header.parts.code": "",
|
|
2418
|
+
"card.header.parts.code": "um c\xF3digo enviado para voc\xEA",
|
|
2419
|
+
"card.header.parts.totp": "seu aplicativo autenticador",
|
|
2420
|
+
"card.header.parts.lookup_secret": "um c\xF3digo de recupera\xE7\xE3o de backup",
|
|
2367
2421
|
"card.header.parts.identifier-first": "",
|
|
2368
2422
|
"card.header.parts.oidc": "",
|
|
2369
2423
|
"card.header.parts.passkey": "",
|
|
@@ -2648,7 +2702,9 @@ var sv_default = {
|
|
|
2648
2702
|
"input.placeholder": "Ange din {placeholder}",
|
|
2649
2703
|
"card.header.description.login": "Logga in med {identifierLabel}",
|
|
2650
2704
|
"card.header.description.registration": "Registrera dig med {identifierLabel}",
|
|
2651
|
-
"card.header.parts.code": "en kod skickad till
|
|
2705
|
+
"card.header.parts.code": "en kod skickad till dig",
|
|
2706
|
+
"card.header.parts.totp": "din autentiseringsapp",
|
|
2707
|
+
"card.header.parts.lookup_secret": "en s\xE4kerhetskopieringskod",
|
|
2652
2708
|
"card.header.parts.identifier-first": "din {identifierLabel}",
|
|
2653
2709
|
"card.header.parts.oidc": "en social leverant\xF6r",
|
|
2654
2710
|
"card.header.parts.passkey": "en Passkey",
|
|
@@ -2734,7 +2790,7 @@ var OryLocales = {
|
|
|
2734
2790
|
};
|
|
2735
2791
|
|
|
2736
2792
|
// src/context/intl-context.tsx
|
|
2737
|
-
import { jsx as
|
|
2793
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2738
2794
|
function mergeTranslations(customTranslations) {
|
|
2739
2795
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
2740
2796
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -2747,12 +2803,12 @@ var IntlProvider = ({
|
|
|
2747
2803
|
customTranslations
|
|
2748
2804
|
}) => {
|
|
2749
2805
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
2750
|
-
return /* @__PURE__ */
|
|
2806
|
+
return /* @__PURE__ */ jsx23(
|
|
2751
2807
|
OriginalIntlProvider,
|
|
2752
2808
|
{
|
|
2753
2809
|
onWarn: () => ({}),
|
|
2754
2810
|
defaultRichTextElements: {
|
|
2755
|
-
del: (chunks) => /* @__PURE__ */
|
|
2811
|
+
del: (chunks) => /* @__PURE__ */ jsx23("del", { children: chunks })
|
|
2756
2812
|
},
|
|
2757
2813
|
locale,
|
|
2758
2814
|
messages: messages[locale],
|
|
@@ -2763,38 +2819,38 @@ var IntlProvider = ({
|
|
|
2763
2819
|
};
|
|
2764
2820
|
|
|
2765
2821
|
// src/context/provider.tsx
|
|
2766
|
-
import { jsx as
|
|
2822
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2767
2823
|
|
|
2768
2824
|
// src/components/card/header.tsx
|
|
2769
|
-
import { jsx as
|
|
2825
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2770
2826
|
|
|
2771
2827
|
// src/components/card/card.tsx
|
|
2772
|
-
import { jsx as
|
|
2828
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2773
2829
|
|
|
2774
2830
|
// src/components/card/footer.tsx
|
|
2775
|
-
import { jsx as
|
|
2831
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2776
2832
|
|
|
2777
2833
|
// src/components/card/content.tsx
|
|
2778
|
-
import { jsx as
|
|
2834
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2779
2835
|
|
|
2780
2836
|
// src/components/card/two-step/state-method-active.tsx
|
|
2781
2837
|
import {
|
|
2782
2838
|
isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
|
|
2783
2839
|
UiNodeGroupEnum as UiNodeGroupEnum13
|
|
2784
2840
|
} from "@ory/client-fetch";
|
|
2785
|
-
import { jsx as
|
|
2841
|
+
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2786
2842
|
|
|
2787
2843
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2788
2844
|
import { UiNodeGroupEnum as UiNodeGroupEnum14 } from "@ory/client-fetch";
|
|
2789
|
-
import { jsx as
|
|
2845
|
+
import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2790
2846
|
|
|
2791
2847
|
// src/components/card/card-two-step.tsx
|
|
2792
2848
|
import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
2793
|
-
import { Fragment as Fragment7, jsx as
|
|
2849
|
+
import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2794
2850
|
|
|
2795
2851
|
// src/components/card/card-consent.tsx
|
|
2796
2852
|
import { getNodeId as getNodeId4 } from "@ory/client-fetch";
|
|
2797
|
-
import { jsx as
|
|
2853
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2798
2854
|
|
|
2799
2855
|
// src/components/card/two-step/state-select-method.tsx
|
|
2800
2856
|
import { useIntl as useIntl8 } from "react-intl";
|
|
@@ -2802,10 +2858,10 @@ import { useIntl as useIntl8 } from "react-intl";
|
|
|
2802
2858
|
// src/components/card/two-step/list-methods.tsx
|
|
2803
2859
|
import { useComponents as useComponents2 } from "@ory/elements-react";
|
|
2804
2860
|
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2805
|
-
import { jsx as
|
|
2861
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2806
2862
|
|
|
2807
2863
|
// src/components/card/two-step/state-select-method.tsx
|
|
2808
|
-
import { jsx as
|
|
2864
|
+
import { jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2809
2865
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2810
2866
|
return Object.fromEntries(
|
|
2811
2867
|
Object.values(UiNodeGroupEnum15).filter((group) => {
|
|
@@ -2824,6 +2880,13 @@ function toAuthMethodPickerOptions(visibleGroups) {
|
|
|
2824
2880
|
);
|
|
2825
2881
|
}
|
|
2826
2882
|
|
|
2883
|
+
// src/util/nodes.ts
|
|
2884
|
+
function findScreenSelectionButton(nodes) {
|
|
2885
|
+
return nodes.find(
|
|
2886
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
2887
|
+
);
|
|
2888
|
+
}
|
|
2889
|
+
|
|
2827
2890
|
// src/theme/default/utils/logout.ts
|
|
2828
2891
|
import { useCallback, useEffect as useEffect2, useState as useState3 } from "react";
|
|
2829
2892
|
function useClientLogout(config) {
|
|
@@ -2849,28 +2912,77 @@ function useClientLogout(config) {
|
|
|
2849
2912
|
return { logoutFlow, didLoad: !isLoading };
|
|
2850
2913
|
}
|
|
2851
2914
|
|
|
2915
|
+
// src/theme/default/utils/url.ts
|
|
2916
|
+
function restartFlowUrl(flow, fallback) {
|
|
2917
|
+
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
2918
|
+
}
|
|
2919
|
+
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
2920
|
+
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
2921
|
+
const qs = new URLSearchParams();
|
|
2922
|
+
if (flow.oauth2_login_challenge) {
|
|
2923
|
+
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
2924
|
+
}
|
|
2925
|
+
if (flow.return_to) {
|
|
2926
|
+
qs.set("return_to", flow.return_to);
|
|
2927
|
+
} else if (typeof window !== "undefined") {
|
|
2928
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
2929
|
+
if (searchParams.has("return_to")) {
|
|
2930
|
+
qs.set("return_to", searchParams.get("return_to") || "");
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
if (qs.toString().length === 0) {
|
|
2934
|
+
return result;
|
|
2935
|
+
}
|
|
2936
|
+
return result + "?" + qs.toString();
|
|
2937
|
+
}
|
|
2938
|
+
function appendReturnTo(url, returnTo) {
|
|
2939
|
+
if (!returnTo) {
|
|
2940
|
+
return url;
|
|
2941
|
+
}
|
|
2942
|
+
const urlObj = new URL(url);
|
|
2943
|
+
urlObj.searchParams.set("return_to", returnTo);
|
|
2944
|
+
return urlObj.toString();
|
|
2945
|
+
}
|
|
2946
|
+
|
|
2852
2947
|
// src/theme/default/components/card/footer.tsx
|
|
2853
|
-
import { Fragment as Fragment8, jsx as
|
|
2948
|
+
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2854
2949
|
function DefaultCardFooter() {
|
|
2855
2950
|
const oryFlow = useOryFlow3();
|
|
2856
2951
|
switch (oryFlow.flowType) {
|
|
2857
2952
|
case FlowType10.Login:
|
|
2858
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ jsx35(LoginCardFooter, {});
|
|
2859
2954
|
case FlowType10.Registration:
|
|
2860
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ jsx35(RegistrationCardFooter, {});
|
|
2861
2956
|
case FlowType10.Recovery:
|
|
2862
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx35(RecoveryCardFooter, {});
|
|
2863
2958
|
case FlowType10.Verification:
|
|
2864
|
-
return /* @__PURE__ */
|
|
2959
|
+
return /* @__PURE__ */ jsx35(VerificationCardFooter, {});
|
|
2865
2960
|
case FlowType10.OAuth2Consent:
|
|
2866
|
-
return /* @__PURE__ */
|
|
2961
|
+
return /* @__PURE__ */ jsx35(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2867
2962
|
default:
|
|
2868
2963
|
return null;
|
|
2869
2964
|
}
|
|
2870
2965
|
}
|
|
2966
|
+
function shouldShowLogoutButton(flow, formState, authMethods) {
|
|
2967
|
+
if (flow.refresh) {
|
|
2968
|
+
return true;
|
|
2969
|
+
}
|
|
2970
|
+
if (flow.requested_aal === "aal2") {
|
|
2971
|
+
if (formState.current === "select_method") {
|
|
2972
|
+
return true;
|
|
2973
|
+
}
|
|
2974
|
+
if (formState.current === "method_active" && flow.active === "code") {
|
|
2975
|
+
return true;
|
|
2976
|
+
}
|
|
2977
|
+
if (formState.current === "method_active" && authMethods.length === 1) {
|
|
2978
|
+
return true;
|
|
2979
|
+
}
|
|
2980
|
+
}
|
|
2981
|
+
return false;
|
|
2982
|
+
}
|
|
2871
2983
|
function LoginCardFooter() {
|
|
2872
|
-
const {
|
|
2873
|
-
const
|
|
2984
|
+
const { formState, flow, flowType, dispatchFormState } = useOryFlow3();
|
|
2985
|
+
const config = useOryConfiguration2();
|
|
2874
2986
|
const intl = useIntl9();
|
|
2875
2987
|
if (flowType !== FlowType10.Login) {
|
|
2876
2988
|
return null;
|
|
@@ -2886,27 +2998,8 @@ function LoginCardFooter() {
|
|
|
2886
2998
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2887
2999
|
);
|
|
2888
3000
|
}
|
|
2889
|
-
if (flow
|
|
2890
|
-
return /* @__PURE__ */
|
|
2891
|
-
intl.formatMessage({
|
|
2892
|
-
id: "login.2fa.go-back"
|
|
2893
|
-
}),
|
|
2894
|
-
" ",
|
|
2895
|
-
/* @__PURE__ */ jsx34(
|
|
2896
|
-
"a",
|
|
2897
|
-
{
|
|
2898
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2899
|
-
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
2900
|
-
"data-testid": (
|
|
2901
|
-
// Only add the test-id when the logout link has loaded.
|
|
2902
|
-
didLoadLogout ? "ory/screen/login/mfa/action/cancel" : void 0
|
|
2903
|
-
),
|
|
2904
|
-
children: intl.formatMessage({
|
|
2905
|
-
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
2906
|
-
})
|
|
2907
|
-
}
|
|
2908
|
-
)
|
|
2909
|
-
] });
|
|
3001
|
+
if (shouldShowLogoutButton(flow, formState, authMethods)) {
|
|
3002
|
+
return /* @__PURE__ */ jsx35(LogoutButton, { returnTo });
|
|
2910
3003
|
}
|
|
2911
3004
|
return /* @__PURE__ */ jsxs15(Fragment8, { children: [
|
|
2912
3005
|
formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
@@ -2915,7 +3008,7 @@ function LoginCardFooter() {
|
|
|
2915
3008
|
defaultMessage: "No account?"
|
|
2916
3009
|
}),
|
|
2917
3010
|
" ",
|
|
2918
|
-
/* @__PURE__ */
|
|
3011
|
+
/* @__PURE__ */ jsx35(
|
|
2919
3012
|
"a",
|
|
2920
3013
|
{
|
|
2921
3014
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2928,23 +3021,27 @@ function LoginCardFooter() {
|
|
|
2928
3021
|
}
|
|
2929
3022
|
)
|
|
2930
3023
|
] }),
|
|
2931
|
-
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */
|
|
2932
|
-
"
|
|
3024
|
+
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
|
|
3025
|
+
"button",
|
|
2933
3026
|
{
|
|
2934
3027
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2935
|
-
|
|
3028
|
+
onClick: () => {
|
|
3029
|
+
dispatchFormState({
|
|
3030
|
+
type: "action_clear_active_method"
|
|
3031
|
+
});
|
|
3032
|
+
},
|
|
2936
3033
|
"data-testid": "ory/screen/login/mfa/action/selectMethod",
|
|
2937
3034
|
children: intl.formatMessage({
|
|
2938
3035
|
id: "login.2fa.method.go-back"
|
|
2939
3036
|
})
|
|
2940
3037
|
}
|
|
2941
3038
|
) }),
|
|
2942
|
-
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */
|
|
3039
|
+
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(
|
|
2943
3040
|
"a",
|
|
2944
3041
|
{
|
|
2945
3042
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2946
3043
|
href: returnTo,
|
|
2947
|
-
"data-testid": "ory/screen/login/
|
|
3044
|
+
"data-testid": "ory/screen/login/action/cancel",
|
|
2948
3045
|
children: intl.formatMessage({
|
|
2949
3046
|
id: "login.2fa.go-back.link"
|
|
2950
3047
|
})
|
|
@@ -2952,9 +3049,35 @@ function LoginCardFooter() {
|
|
|
2952
3049
|
) })
|
|
2953
3050
|
] });
|
|
2954
3051
|
}
|
|
3052
|
+
function LogoutButton({ returnTo }) {
|
|
3053
|
+
const config = useOryConfiguration2();
|
|
3054
|
+
const intl = useIntl9();
|
|
3055
|
+
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
3056
|
+
return /* @__PURE__ */ jsxs15("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
3057
|
+
intl.formatMessage({
|
|
3058
|
+
id: "login.2fa.go-back"
|
|
3059
|
+
}),
|
|
3060
|
+
" ",
|
|
3061
|
+
/* @__PURE__ */ jsx35(
|
|
3062
|
+
"a",
|
|
3063
|
+
{
|
|
3064
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
3065
|
+
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
3066
|
+
"data-testid": (
|
|
3067
|
+
// Only add the test-id when the logout link has loaded.
|
|
3068
|
+
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
3069
|
+
),
|
|
3070
|
+
children: intl.formatMessage({
|
|
3071
|
+
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
3072
|
+
})
|
|
3073
|
+
}
|
|
3074
|
+
)
|
|
3075
|
+
] });
|
|
3076
|
+
}
|
|
2955
3077
|
function RegistrationCardFooter() {
|
|
2956
3078
|
const intl = useIntl9();
|
|
2957
|
-
const {
|
|
3079
|
+
const { flow, formState } = useOryFlow3();
|
|
3080
|
+
const config = useOryConfiguration2();
|
|
2958
3081
|
const visibleGroups = useNodeGroupsWithVisibleNodes(flow.ui.nodes);
|
|
2959
3082
|
const authMethodBlocks = toAuthMethodPickerOptions(visibleGroups);
|
|
2960
3083
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
@@ -2963,11 +3086,12 @@ function RegistrationCardFooter() {
|
|
|
2963
3086
|
if (!screenSelectionNode || Object.entries(authMethodBlocks).length < 2) {
|
|
2964
3087
|
return null;
|
|
2965
3088
|
}
|
|
2966
|
-
return /* @__PURE__ */
|
|
3089
|
+
return /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased", children: /* @__PURE__ */ jsx35(
|
|
2967
3090
|
"a",
|
|
2968
3091
|
{
|
|
2969
3092
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
2970
3093
|
href: "",
|
|
3094
|
+
"data-testid": "ory/screen/registration/action/selectMethod",
|
|
2971
3095
|
children: intl.formatMessage({
|
|
2972
3096
|
id: "card.footer.select-another-method",
|
|
2973
3097
|
defaultMessage: "Select another method"
|
|
@@ -2982,7 +3106,7 @@ function RegistrationCardFooter() {
|
|
|
2982
3106
|
defaultMessage: "Already have an account?"
|
|
2983
3107
|
}),
|
|
2984
3108
|
" ",
|
|
2985
|
-
/* @__PURE__ */
|
|
3109
|
+
/* @__PURE__ */ jsx35(
|
|
2986
3110
|
"a",
|
|
2987
3111
|
{
|
|
2988
3112
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -3017,20 +3141,20 @@ function ConsentCardFooter({ flow }) {
|
|
|
3017
3141
|
"Make sure you trust ",
|
|
3018
3142
|
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
3019
3143
|
] }),
|
|
3020
|
-
/* @__PURE__ */
|
|
3144
|
+
/* @__PURE__ */ jsx35("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
|
|
3021
3145
|
] }),
|
|
3022
|
-
rememberNode && /* @__PURE__ */
|
|
3146
|
+
rememberNode && /* @__PURE__ */ jsx35(
|
|
3023
3147
|
Node2.Checkbox,
|
|
3024
3148
|
{
|
|
3025
3149
|
attributes: rememberNode.attributes,
|
|
3026
3150
|
node: rememberNode
|
|
3027
3151
|
}
|
|
3028
3152
|
),
|
|
3029
|
-
/* @__PURE__ */
|
|
3153
|
+
/* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
|
|
3030
3154
|
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
3031
3155
|
).map((n) => {
|
|
3032
3156
|
const attributes = n.attributes;
|
|
3033
|
-
return /* @__PURE__ */
|
|
3157
|
+
return /* @__PURE__ */ jsx35(
|
|
3034
3158
|
Node2.Button,
|
|
3035
3159
|
{
|
|
3036
3160
|
node: n,
|
|
@@ -3178,6 +3302,12 @@ function useCardHeaderText(container, opts) {
|
|
|
3178
3302
|
if (nodes.find((node) => node.group === "code")) {
|
|
3179
3303
|
parts.push(intl.formatMessage({ id: "card.header.parts.code" }));
|
|
3180
3304
|
}
|
|
3305
|
+
if (nodes.find((node) => node.group === "totp")) {
|
|
3306
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.totp" }));
|
|
3307
|
+
}
|
|
3308
|
+
if (nodes.find((node) => node.group === "lookup_secret")) {
|
|
3309
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.lookup_secret" }));
|
|
3310
|
+
}
|
|
3181
3311
|
if (nodes.find((node) => node.group === "passkey")) {
|
|
3182
3312
|
parts.push(intl.formatMessage({ id: "card.header.parts.passkey" }));
|
|
3183
3313
|
}
|
|
@@ -3291,16 +3421,9 @@ import {
|
|
|
3291
3421
|
FlowType as FlowType12,
|
|
3292
3422
|
isUiNodeInputAttributes as isUiNodeInputAttributes8
|
|
3293
3423
|
} from "@ory/client-fetch";
|
|
3294
|
-
import { useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
import * as React3 from "react";
|
|
3298
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3299
|
-
var SvgArrowLeft = (props) => {
|
|
3300
|
-
var _a, _b;
|
|
3301
|
-
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" }) });
|
|
3302
|
-
};
|
|
3303
|
-
var arrow_left_default = SvgArrowLeft;
|
|
3424
|
+
import { useOryConfiguration as useOryConfiguration3, useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
3425
|
+
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
3426
|
+
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
3304
3427
|
|
|
3305
3428
|
// src/theme/default/utils/attributes.ts
|
|
3306
3429
|
function omit(obj, keys) {
|
|
@@ -3311,13 +3434,46 @@ function omit(obj, keys) {
|
|
|
3311
3434
|
return ret;
|
|
3312
3435
|
}
|
|
3313
3436
|
|
|
3437
|
+
// src/util/omitAttributes.ts
|
|
3438
|
+
function omitInputAttributes({
|
|
3439
|
+
...attrs
|
|
3440
|
+
}) {
|
|
3441
|
+
return omit(attrs, [
|
|
3442
|
+
"autocomplete",
|
|
3443
|
+
"label",
|
|
3444
|
+
"node_type",
|
|
3445
|
+
"maxlength",
|
|
3446
|
+
"onclick",
|
|
3447
|
+
"onclickTrigger",
|
|
3448
|
+
"onload",
|
|
3449
|
+
"onloadTrigger"
|
|
3450
|
+
]);
|
|
3451
|
+
}
|
|
3452
|
+
|
|
3453
|
+
// src/theme/default/assets/icons/arrow-left.svg
|
|
3454
|
+
import * as React3 from "react";
|
|
3455
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3456
|
+
var SvgArrowLeft = (props) => {
|
|
3457
|
+
var _a, _b;
|
|
3458
|
+
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" }) });
|
|
3459
|
+
};
|
|
3460
|
+
var arrow_left_default = SvgArrowLeft;
|
|
3461
|
+
|
|
3314
3462
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3315
|
-
import {
|
|
3316
|
-
import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3463
|
+
import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3317
3464
|
function DefaultCurrentIdentifierButton() {
|
|
3318
|
-
|
|
3319
|
-
const {
|
|
3465
|
+
var _a;
|
|
3466
|
+
const { flow, flowType, formState } = useOryFlow4();
|
|
3467
|
+
const { setValue, getValues, watch } = useFormContext12();
|
|
3468
|
+
const [turnstileResponse, setTurnstileResponse] = useState4();
|
|
3469
|
+
const config = useOryConfiguration3();
|
|
3320
3470
|
const ui = flow.ui;
|
|
3471
|
+
const captchaVerificationValue = (_a = watch("transient_payload")) == null ? void 0 : _a.captcha_turnstile_response;
|
|
3472
|
+
useEffect3(() => {
|
|
3473
|
+
if (captchaVerificationValue) {
|
|
3474
|
+
setTurnstileResponse(captchaVerificationValue);
|
|
3475
|
+
}
|
|
3476
|
+
}, [captchaVerificationValue]);
|
|
3321
3477
|
if (formState.current === "provide_identifier") {
|
|
3322
3478
|
return null;
|
|
3323
3479
|
}
|
|
@@ -3332,11 +3488,6 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3332
3488
|
flow,
|
|
3333
3489
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
3334
3490
|
);
|
|
3335
|
-
const attributes = omit(nodeBackButton, [
|
|
3336
|
-
"autocomplete",
|
|
3337
|
-
"node_type",
|
|
3338
|
-
"maxlength"
|
|
3339
|
-
]);
|
|
3340
3491
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
3341
3492
|
if (screenSelectionNode) {
|
|
3342
3493
|
return /* @__PURE__ */ jsxs16("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
@@ -3347,21 +3498,25 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3347
3498
|
return false;
|
|
3348
3499
|
}).map((n) => {
|
|
3349
3500
|
const attrs = n.attributes;
|
|
3350
|
-
|
|
3501
|
+
let value = getValues(attrs.name) || attrs.value;
|
|
3502
|
+
if (attrs.name === "transient_payload.captcha_turnstile_response" && turnstileResponse) {
|
|
3503
|
+
value = turnstileResponse;
|
|
3504
|
+
}
|
|
3505
|
+
return /* @__PURE__ */ jsx37(
|
|
3351
3506
|
"input",
|
|
3352
3507
|
{
|
|
3353
3508
|
type: "hidden",
|
|
3354
3509
|
name: attrs.name,
|
|
3355
|
-
value
|
|
3510
|
+
value
|
|
3356
3511
|
},
|
|
3357
3512
|
attrs.name
|
|
3358
3513
|
);
|
|
3359
3514
|
}),
|
|
3360
|
-
/* @__PURE__ */
|
|
3515
|
+
/* @__PURE__ */ jsx37(
|
|
3361
3516
|
"button",
|
|
3362
3517
|
{
|
|
3363
3518
|
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
|
-
...
|
|
3519
|
+
...omitInputAttributes(nodeBackButton),
|
|
3365
3520
|
type: "submit",
|
|
3366
3521
|
onClick: () => {
|
|
3367
3522
|
setValue(
|
|
@@ -3375,7 +3530,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3375
3530
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3376
3531
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3377
3532
|
children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3378
|
-
/* @__PURE__ */
|
|
3533
|
+
/* @__PURE__ */ jsx37(
|
|
3379
3534
|
arrow_left_default,
|
|
3380
3535
|
{
|
|
3381
3536
|
size: 16,
|
|
@@ -3383,22 +3538,22 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3383
3538
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3384
3539
|
}
|
|
3385
3540
|
),
|
|
3386
|
-
/* @__PURE__ */
|
|
3541
|
+
/* @__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 })
|
|
3387
3542
|
] })
|
|
3388
3543
|
}
|
|
3389
3544
|
)
|
|
3390
3545
|
] });
|
|
3391
3546
|
}
|
|
3392
|
-
return /* @__PURE__ */
|
|
3547
|
+
return /* @__PURE__ */ jsx37(
|
|
3393
3548
|
"a",
|
|
3394
3549
|
{
|
|
3395
3550
|
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",
|
|
3396
|
-
...
|
|
3551
|
+
...omitInputAttributes(nodeBackButton),
|
|
3397
3552
|
href: initFlowUrl2,
|
|
3398
3553
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3399
3554
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3400
3555
|
children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3401
|
-
/* @__PURE__ */
|
|
3556
|
+
/* @__PURE__ */ jsx37(
|
|
3402
3557
|
arrow_left_default,
|
|
3403
3558
|
{
|
|
3404
3559
|
size: 16,
|
|
@@ -3406,7 +3561,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3406
3561
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3407
3562
|
}
|
|
3408
3563
|
),
|
|
3409
|
-
/* @__PURE__ */
|
|
3564
|
+
/* @__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 })
|
|
3410
3565
|
] })
|
|
3411
3566
|
}
|
|
3412
3567
|
);
|
|
@@ -3448,7 +3603,7 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
3448
3603
|
}
|
|
3449
3604
|
|
|
3450
3605
|
// src/theme/default/components/card/header.tsx
|
|
3451
|
-
import { jsx as
|
|
3606
|
+
import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3452
3607
|
function InnerCardHeader({
|
|
3453
3608
|
title,
|
|
3454
3609
|
text,
|
|
@@ -3456,10 +3611,10 @@ function InnerCardHeader({
|
|
|
3456
3611
|
}) {
|
|
3457
3612
|
const { Card } = useComponents4();
|
|
3458
3613
|
return /* @__PURE__ */ jsxs17("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
3459
|
-
/* @__PURE__ */
|
|
3614
|
+
/* @__PURE__ */ jsx38(Card.Logo, {}),
|
|
3460
3615
|
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
|
|
3461
|
-
/* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
3617
|
+
/* @__PURE__ */ jsx38(
|
|
3463
3618
|
"p",
|
|
3464
3619
|
{
|
|
3465
3620
|
className: "leading-normal text-interface-foreground-default-secondary",
|
|
@@ -3467,7 +3622,7 @@ function InnerCardHeader({
|
|
|
3467
3622
|
children: text
|
|
3468
3623
|
}
|
|
3469
3624
|
),
|
|
3470
|
-
/* @__PURE__ */
|
|
3625
|
+
/* @__PURE__ */ jsx38(DefaultCurrentIdentifierButton, {})
|
|
3471
3626
|
] })
|
|
3472
3627
|
] });
|
|
3473
3628
|
}
|
|
@@ -3477,32 +3632,40 @@ function DefaultCardHeader() {
|
|
|
3477
3632
|
context.flow.ui,
|
|
3478
3633
|
context
|
|
3479
3634
|
);
|
|
3480
|
-
return /* @__PURE__ */
|
|
3635
|
+
return /* @__PURE__ */ jsx38(InnerCardHeader, { title, text: description, messageId });
|
|
3481
3636
|
}
|
|
3482
3637
|
|
|
3483
3638
|
// src/theme/default/components/card/logo.tsx
|
|
3484
|
-
import {
|
|
3485
|
-
import { jsx as
|
|
3639
|
+
import { useOryConfiguration as useOryConfiguration4 } from "@ory/elements-react";
|
|
3640
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3486
3641
|
function DefaultCardLogo() {
|
|
3487
|
-
const
|
|
3488
|
-
if (
|
|
3489
|
-
return /* @__PURE__ */
|
|
3642
|
+
const config = useOryConfiguration4();
|
|
3643
|
+
if (config.project.logo_light_url) {
|
|
3644
|
+
return /* @__PURE__ */ jsx39(
|
|
3645
|
+
"img",
|
|
3646
|
+
{
|
|
3647
|
+
src: config.project.logo_light_url,
|
|
3648
|
+
width: 100,
|
|
3649
|
+
height: 36,
|
|
3650
|
+
alt: "Logo"
|
|
3651
|
+
}
|
|
3652
|
+
);
|
|
3490
3653
|
}
|
|
3491
|
-
return /* @__PURE__ */
|
|
3654
|
+
return /* @__PURE__ */ jsx39("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.project.name });
|
|
3492
3655
|
}
|
|
3493
3656
|
|
|
3494
3657
|
// src/theme/default/components/card/layout.tsx
|
|
3495
|
-
import { jsx as
|
|
3658
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3496
3659
|
function DefaultCardLayout({ children }) {
|
|
3497
|
-
return /* @__PURE__ */
|
|
3660
|
+
return /* @__PURE__ */ jsx40("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
3498
3661
|
}
|
|
3499
3662
|
|
|
3500
3663
|
// src/theme/default/components/card/index.tsx
|
|
3501
|
-
import { jsx as
|
|
3664
|
+
import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3502
3665
|
function DefaultCard({ children }) {
|
|
3503
|
-
return /* @__PURE__ */
|
|
3666
|
+
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: [
|
|
3504
3667
|
children,
|
|
3505
|
-
/* @__PURE__ */
|
|
3668
|
+
/* @__PURE__ */ jsx41(Badge, {})
|
|
3506
3669
|
] }) });
|
|
3507
3670
|
}
|
|
3508
3671
|
|
|
@@ -3518,61 +3681,61 @@ import { useIntl as useIntl12 } from "react-intl";
|
|
|
3518
3681
|
import {
|
|
3519
3682
|
messageTestId as messageTestId2,
|
|
3520
3683
|
uiTextToFormattedMessage as uiTextToFormattedMessage3,
|
|
3521
|
-
useOryFlow as
|
|
3684
|
+
useOryFlow as useOryFlow7
|
|
3522
3685
|
} from "@ory/elements-react";
|
|
3523
3686
|
import { FlowType as FlowType13 } from "@ory/client-fetch";
|
|
3524
3687
|
|
|
3525
3688
|
// src/theme/default/components/form/social.tsx
|
|
3526
3689
|
import {
|
|
3527
3690
|
uiTextToFormattedMessage as uiTextToFormattedMessage2,
|
|
3528
|
-
useOryFlow as
|
|
3691
|
+
useOryFlow as useOryFlow6
|
|
3529
3692
|
} from "@ory/elements-react";
|
|
3530
|
-
import { useEffect as
|
|
3693
|
+
import { useEffect as useEffect4 } from "react";
|
|
3531
3694
|
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
3532
3695
|
import { useIntl as useIntl11 } from "react-intl";
|
|
3533
3696
|
import { useDebounceValue } from "usehooks-ts";
|
|
3534
3697
|
|
|
3535
3698
|
// src/theme/default/provider-logos/apple.svg
|
|
3536
3699
|
import * as React4 from "react";
|
|
3537
|
-
import { jsx as
|
|
3700
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3538
3701
|
var SvgApple = (props) => {
|
|
3539
3702
|
var _a, _b;
|
|
3540
|
-
return /* @__PURE__ */
|
|
3703
|
+
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" }) });
|
|
3541
3704
|
};
|
|
3542
3705
|
var apple_default = SvgApple;
|
|
3543
3706
|
|
|
3544
3707
|
// src/theme/default/provider-logos/auth0.svg
|
|
3545
3708
|
import * as React5 from "react";
|
|
3546
|
-
import { jsx as
|
|
3709
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3547
3710
|
var SvgAuth0 = (props) => {
|
|
3548
3711
|
var _a, _b;
|
|
3549
|
-
return /* @__PURE__ */
|
|
3712
|
+
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" }) });
|
|
3550
3713
|
};
|
|
3551
3714
|
var auth0_default = SvgAuth0;
|
|
3552
3715
|
|
|
3553
3716
|
// src/theme/default/provider-logos/discord.svg
|
|
3554
3717
|
import * as React6 from "react";
|
|
3555
|
-
import { jsx as
|
|
3718
|
+
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3556
3719
|
var SvgDiscord = (props) => {
|
|
3557
3720
|
var _a, _b;
|
|
3558
3721
|
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: [
|
|
3559
|
-
/* @__PURE__ */
|
|
3560
|
-
/* @__PURE__ */
|
|
3722
|
+
/* @__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" }),
|
|
3723
|
+
/* @__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" })
|
|
3561
3724
|
] });
|
|
3562
3725
|
};
|
|
3563
3726
|
var discord_default = SvgDiscord;
|
|
3564
3727
|
|
|
3565
3728
|
// src/theme/default/provider-logos/facebook.svg
|
|
3566
3729
|
import * as React7 from "react";
|
|
3567
|
-
import { jsx as
|
|
3730
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3568
3731
|
var SvgFacebook = (props) => {
|
|
3569
3732
|
var _a, _b;
|
|
3570
3733
|
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: [
|
|
3571
|
-
/* @__PURE__ */
|
|
3572
|
-
/* @__PURE__ */
|
|
3573
|
-
/* @__PURE__ */
|
|
3574
|
-
/* @__PURE__ */
|
|
3575
|
-
/* @__PURE__ */
|
|
3734
|
+
/* @__PURE__ */ jsx45("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
3735
|
+
/* @__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" }),
|
|
3736
|
+
/* @__PURE__ */ jsx45("defs", { children: /* @__PURE__ */ jsxs20("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
3737
|
+
/* @__PURE__ */ jsx45("stop", { stopColor: "#18ACFE" }),
|
|
3738
|
+
/* @__PURE__ */ jsx45("stop", { offset: 1, stopColor: "#0163E0" })
|
|
3576
3739
|
] }) })
|
|
3577
3740
|
] });
|
|
3578
3741
|
};
|
|
@@ -3580,111 +3743,111 @@ var facebook_default = SvgFacebook;
|
|
|
3580
3743
|
|
|
3581
3744
|
// src/theme/default/provider-logos/github.svg
|
|
3582
3745
|
import * as React8 from "react";
|
|
3583
|
-
import { jsx as
|
|
3746
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3584
3747
|
var SvgGithub = (props) => {
|
|
3585
3748
|
var _a, _b;
|
|
3586
|
-
return /* @__PURE__ */
|
|
3749
|
+
return /* @__PURE__ */ jsx46("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx46("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
3587
3750
|
};
|
|
3588
3751
|
var github_default = SvgGithub;
|
|
3589
3752
|
|
|
3590
3753
|
// src/theme/default/provider-logos/gitlab.svg
|
|
3591
3754
|
import * as React9 from "react";
|
|
3592
|
-
import { jsx as
|
|
3755
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3593
3756
|
var SvgGitlab = (props) => {
|
|
3594
3757
|
var _a, _b;
|
|
3595
3758
|
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: [
|
|
3596
|
-
/* @__PURE__ */
|
|
3597
|
-
/* @__PURE__ */
|
|
3598
|
-
/* @__PURE__ */
|
|
3599
|
-
/* @__PURE__ */
|
|
3759
|
+
/* @__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" }),
|
|
3760
|
+
/* @__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" }),
|
|
3761
|
+
/* @__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" }),
|
|
3762
|
+
/* @__PURE__ */ jsx47("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
3600
3763
|
] });
|
|
3601
3764
|
};
|
|
3602
3765
|
var gitlab_default = SvgGitlab;
|
|
3603
3766
|
|
|
3604
3767
|
// src/theme/default/provider-logos/google.svg
|
|
3605
3768
|
import * as React10 from "react";
|
|
3606
|
-
import { jsx as
|
|
3769
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3607
3770
|
var SvgGoogle = (props) => {
|
|
3608
3771
|
var _a, _b;
|
|
3609
3772
|
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: [
|
|
3610
|
-
/* @__PURE__ */
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3613
|
-
/* @__PURE__ */
|
|
3773
|
+
/* @__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" }),
|
|
3774
|
+
/* @__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" }),
|
|
3775
|
+
/* @__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" }),
|
|
3776
|
+
/* @__PURE__ */ jsx48("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
|
|
3614
3777
|
] });
|
|
3615
3778
|
};
|
|
3616
3779
|
var google_default = SvgGoogle;
|
|
3617
3780
|
|
|
3618
3781
|
// src/theme/default/provider-logos/linkedin.svg
|
|
3619
3782
|
import * as React11 from "react";
|
|
3620
|
-
import { jsx as
|
|
3783
|
+
import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3621
3784
|
var SvgLinkedin = (props) => {
|
|
3622
3785
|
var _a, _b;
|
|
3623
3786
|
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: [
|
|
3624
|
-
/* @__PURE__ */
|
|
3625
|
-
/* @__PURE__ */
|
|
3787
|
+
/* @__PURE__ */ jsx49("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
3788
|
+
/* @__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" })
|
|
3626
3789
|
] });
|
|
3627
3790
|
};
|
|
3628
3791
|
var linkedin_default = SvgLinkedin;
|
|
3629
3792
|
|
|
3630
3793
|
// src/theme/default/provider-logos/microsoft.svg
|
|
3631
3794
|
import * as React12 from "react";
|
|
3632
|
-
import { jsx as
|
|
3795
|
+
import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3633
3796
|
var SvgMicrosoft = (props) => {
|
|
3634
3797
|
var _a, _b;
|
|
3635
3798
|
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: [
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3799
|
+
/* @__PURE__ */ jsx50("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
3800
|
+
/* @__PURE__ */ jsx50("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
3801
|
+
/* @__PURE__ */ jsx50("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
3802
|
+
/* @__PURE__ */ jsx50("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
3640
3803
|
] });
|
|
3641
3804
|
};
|
|
3642
3805
|
var microsoft_default = SvgMicrosoft;
|
|
3643
3806
|
|
|
3644
3807
|
// src/theme/default/provider-logos/slack.svg
|
|
3645
3808
|
import * as React13 from "react";
|
|
3646
|
-
import { jsx as
|
|
3809
|
+
import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3647
3810
|
var SvgSlack = (props) => {
|
|
3648
3811
|
var _a, _b;
|
|
3649
3812
|
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: [
|
|
3650
|
-
/* @__PURE__ */
|
|
3651
|
-
/* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3813
|
+
/* @__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" }),
|
|
3814
|
+
/* @__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" }),
|
|
3815
|
+
/* @__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" }),
|
|
3816
|
+
/* @__PURE__ */ jsx51("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
3654
3817
|
] });
|
|
3655
3818
|
};
|
|
3656
3819
|
var slack_default = SvgSlack;
|
|
3657
3820
|
|
|
3658
3821
|
// src/theme/default/provider-logos/spotify.svg
|
|
3659
3822
|
import * as React14 from "react";
|
|
3660
|
-
import { jsx as
|
|
3823
|
+
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3661
3824
|
var SvgSpotify = (props) => {
|
|
3662
3825
|
var _a, _b;
|
|
3663
3826
|
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: [
|
|
3664
|
-
/* @__PURE__ */
|
|
3665
|
-
/* @__PURE__ */
|
|
3827
|
+
/* @__PURE__ */ jsx52("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
3828
|
+
/* @__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" })
|
|
3666
3829
|
] });
|
|
3667
3830
|
};
|
|
3668
3831
|
var spotify_default = SvgSpotify;
|
|
3669
3832
|
|
|
3670
3833
|
// src/theme/default/provider-logos/yandex.svg
|
|
3671
3834
|
import * as React15 from "react";
|
|
3672
|
-
import { jsx as
|
|
3835
|
+
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3673
3836
|
var SvgYandex = (props) => {
|
|
3674
3837
|
var _a, _b;
|
|
3675
3838
|
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: [
|
|
3676
|
-
/* @__PURE__ */
|
|
3677
|
-
/* @__PURE__ */
|
|
3839
|
+
/* @__PURE__ */ jsx53("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
3840
|
+
/* @__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" })
|
|
3678
3841
|
] });
|
|
3679
3842
|
};
|
|
3680
3843
|
var yandex_default = SvgYandex;
|
|
3681
3844
|
|
|
3682
3845
|
// src/theme/default/provider-logos/x.svg
|
|
3683
3846
|
import * as React16 from "react";
|
|
3684
|
-
import { jsx as
|
|
3847
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3685
3848
|
var SvgX = (props) => {
|
|
3686
3849
|
var _a, _b;
|
|
3687
|
-
return /* @__PURE__ */
|
|
3850
|
+
return /* @__PURE__ */ jsx54("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx54("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
|
|
3688
3851
|
};
|
|
3689
3852
|
var x_default = SvgX;
|
|
3690
3853
|
|
|
@@ -3707,7 +3870,7 @@ var logos = {
|
|
|
3707
3870
|
var provider_logos_default = logos;
|
|
3708
3871
|
|
|
3709
3872
|
// src/theme/default/components/form/spinner.tsx
|
|
3710
|
-
import { jsx as
|
|
3873
|
+
import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3711
3874
|
function Spinner({ className }) {
|
|
3712
3875
|
return /* @__PURE__ */ jsxs28(
|
|
3713
3876
|
"svg",
|
|
@@ -3722,7 +3885,7 @@ function Spinner({ className }) {
|
|
|
3722
3885
|
fill: "none",
|
|
3723
3886
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3724
3887
|
children: [
|
|
3725
|
-
/* @__PURE__ */
|
|
3888
|
+
/* @__PURE__ */ jsx55("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ jsx55(
|
|
3726
3889
|
"path",
|
|
3727
3890
|
{
|
|
3728
3891
|
d: "M23.364 10.6362C22.1053 9.37751 20.5016 8.52034 18.7558 8.17307C17.01 7.82581 15.2004 8.00404 13.5559 8.68523C11.9113 9.36641 10.5057 10.52 9.51678 12C8.52784 13.4801 8 15.2201 8 17.0001C8 18.7802 8.52784 20.5202 9.51678 22.0003C10.5057 23.4803 11.9113 24.6339 13.5559 25.3151C15.2004 25.9962 17.01 26.1745 18.7558 25.8272C20.5016 25.4799 22.1053 24.6228 23.364 23.3641",
|
|
@@ -3731,7 +3894,7 @@ function Spinner({ className }) {
|
|
|
3731
3894
|
strokeLinejoin: "round"
|
|
3732
3895
|
}
|
|
3733
3896
|
) }),
|
|
3734
|
-
/* @__PURE__ */
|
|
3897
|
+
/* @__PURE__ */ jsx55("defs", { children: /* @__PURE__ */ jsx55("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ jsx55(
|
|
3735
3898
|
"rect",
|
|
3736
3899
|
{
|
|
3737
3900
|
width: "24",
|
|
@@ -3747,25 +3910,7 @@ function Spinner({ className }) {
|
|
|
3747
3910
|
|
|
3748
3911
|
// src/theme/default/components/form/social.tsx
|
|
3749
3912
|
import { UiNodeGroupEnum as UiNodeGroupEnum16 } from "@ory/client-fetch";
|
|
3750
|
-
|
|
3751
|
-
// src/util/omitAttributes.ts
|
|
3752
|
-
function omitInputAttributes({
|
|
3753
|
-
...attrs
|
|
3754
|
-
}) {
|
|
3755
|
-
return omit(attrs, [
|
|
3756
|
-
"autocomplete",
|
|
3757
|
-
"label",
|
|
3758
|
-
"node_type",
|
|
3759
|
-
"maxlength",
|
|
3760
|
-
"onclick",
|
|
3761
|
-
"onclickTrigger",
|
|
3762
|
-
"onload",
|
|
3763
|
-
"onloadTrigger"
|
|
3764
|
-
]);
|
|
3765
|
-
}
|
|
3766
|
-
|
|
3767
|
-
// src/theme/default/components/form/social.tsx
|
|
3768
|
-
import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3913
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3769
3914
|
function extractProvider(context) {
|
|
3770
3915
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
3771
3916
|
return context.provider;
|
|
@@ -3784,7 +3929,7 @@ function DefaultButtonSocial({
|
|
|
3784
3929
|
const { type: _ignoredType, name: _ignoredName, ...rest } = attributes;
|
|
3785
3930
|
const {
|
|
3786
3931
|
flow: { ui }
|
|
3787
|
-
} =
|
|
3932
|
+
} = useOryFlow6();
|
|
3788
3933
|
const [clicked, setClicked] = useDebounceValue(false, 100);
|
|
3789
3934
|
const intl = useIntl11();
|
|
3790
3935
|
const {
|
|
@@ -3800,7 +3945,7 @@ function DefaultButtonSocial({
|
|
|
3800
3945
|
onClick == null ? void 0 : onClick();
|
|
3801
3946
|
setClicked(true);
|
|
3802
3947
|
};
|
|
3803
|
-
|
|
3948
|
+
useEffect4(() => {
|
|
3804
3949
|
if (!isSubmitting) {
|
|
3805
3950
|
setClicked(false);
|
|
3806
3951
|
}
|
|
@@ -3820,21 +3965,21 @@ function DefaultButtonSocial({
|
|
|
3820
3965
|
"aria-label": label,
|
|
3821
3966
|
...omitInputAttributes(rest),
|
|
3822
3967
|
children: [
|
|
3823
|
-
/* @__PURE__ */
|
|
3968
|
+
/* @__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" }) }),
|
|
3824
3969
|
showLabel && node.meta.label ? /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
3825
|
-
/* @__PURE__ */
|
|
3826
|
-
/* @__PURE__ */
|
|
3970
|
+
/* @__PURE__ */ jsx56("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
3971
|
+
/* @__PURE__ */ jsx56("span", { className: "size-5 block" })
|
|
3827
3972
|
] }) : null
|
|
3828
3973
|
]
|
|
3829
3974
|
}
|
|
3830
3975
|
);
|
|
3831
3976
|
}
|
|
3832
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */
|
|
3977
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ jsx56(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
3833
3978
|
function DefaultSocialButtonContainer({
|
|
3834
3979
|
children,
|
|
3835
3980
|
nodes
|
|
3836
3981
|
}) {
|
|
3837
|
-
return /* @__PURE__ */
|
|
3982
|
+
return /* @__PURE__ */ jsx56(
|
|
3838
3983
|
"div",
|
|
3839
3984
|
{
|
|
3840
3985
|
className: cn("grid gap-3", {
|
|
@@ -3847,9 +3992,12 @@ function DefaultSocialButtonContainer({
|
|
|
3847
3992
|
}
|
|
3848
3993
|
);
|
|
3849
3994
|
}
|
|
3995
|
+
function GenericLogo({ label }) {
|
|
3996
|
+
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 });
|
|
3997
|
+
}
|
|
3850
3998
|
|
|
3851
3999
|
// src/theme/default/components/form/index.tsx
|
|
3852
|
-
import { jsx as
|
|
4000
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3853
4001
|
function DefaultFormContainer({
|
|
3854
4002
|
children,
|
|
3855
4003
|
onSubmit,
|
|
@@ -3857,7 +4005,7 @@ function DefaultFormContainer({
|
|
|
3857
4005
|
method,
|
|
3858
4006
|
"data-testid": dataTestId
|
|
3859
4007
|
}) {
|
|
3860
|
-
return /* @__PURE__ */
|
|
4008
|
+
return /* @__PURE__ */ jsx57(
|
|
3861
4009
|
"form",
|
|
3862
4010
|
{
|
|
3863
4011
|
"data-testid": dataTestId,
|
|
@@ -3871,11 +4019,11 @@ function DefaultFormContainer({
|
|
|
3871
4019
|
);
|
|
3872
4020
|
}
|
|
3873
4021
|
function DefaultMessageContainer({ children }) {
|
|
3874
|
-
const { flowType } =
|
|
4022
|
+
const { flowType } = useOryFlow7();
|
|
3875
4023
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
3876
4024
|
return null;
|
|
3877
4025
|
}
|
|
3878
|
-
return /* @__PURE__ */
|
|
4026
|
+
return /* @__PURE__ */ jsx57(
|
|
3879
4027
|
"section",
|
|
3880
4028
|
{
|
|
3881
4029
|
className: cn(
|
|
@@ -3887,7 +4035,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
3887
4035
|
}
|
|
3888
4036
|
function DefaultMessage({ message }) {
|
|
3889
4037
|
const intl = useIntl12();
|
|
3890
|
-
return /* @__PURE__ */
|
|
4038
|
+
return /* @__PURE__ */ jsx57(
|
|
3891
4039
|
"span",
|
|
3892
4040
|
{
|
|
3893
4041
|
className: cn(
|
|
@@ -3907,60 +4055,60 @@ import { useIntl as useIntl13 } from "react-intl";
|
|
|
3907
4055
|
|
|
3908
4056
|
// src/theme/default/assets/icons/code.svg
|
|
3909
4057
|
import * as React17 from "react";
|
|
3910
|
-
import { jsx as
|
|
4058
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3911
4059
|
var SvgCode = (props) => {
|
|
3912
4060
|
var _a, _b;
|
|
3913
|
-
return /* @__PURE__ */
|
|
4061
|
+
return /* @__PURE__ */ jsx58("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx58("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
|
|
3914
4062
|
};
|
|
3915
4063
|
var code_default = SvgCode;
|
|
3916
4064
|
|
|
3917
4065
|
// src/theme/default/assets/icons/passkey.svg
|
|
3918
4066
|
import * as React18 from "react";
|
|
3919
|
-
import { jsx as
|
|
4067
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3920
4068
|
var SvgPasskey = (props) => {
|
|
3921
4069
|
var _a, _b;
|
|
3922
|
-
return /* @__PURE__ */
|
|
4070
|
+
return /* @__PURE__ */ jsx59("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx59("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
|
|
3923
4071
|
};
|
|
3924
4072
|
var passkey_default = SvgPasskey;
|
|
3925
4073
|
|
|
3926
4074
|
// src/theme/default/assets/icons/password.svg
|
|
3927
4075
|
import * as React19 from "react";
|
|
3928
|
-
import { jsx as
|
|
4076
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3929
4077
|
var SvgPassword = (props) => {
|
|
3930
4078
|
var _a, _b;
|
|
3931
|
-
return /* @__PURE__ */
|
|
4079
|
+
return /* @__PURE__ */ jsx60("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx60("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
|
|
3932
4080
|
};
|
|
3933
4081
|
var password_default = SvgPassword;
|
|
3934
4082
|
|
|
3935
4083
|
// src/theme/default/assets/icons/webauthn.svg
|
|
3936
4084
|
import * as React20 from "react";
|
|
3937
|
-
import { jsx as
|
|
4085
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3938
4086
|
var SvgWebauthn = (props) => {
|
|
3939
4087
|
var _a, _b;
|
|
3940
|
-
return /* @__PURE__ */
|
|
4088
|
+
return /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx61("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
|
|
3941
4089
|
};
|
|
3942
4090
|
var webauthn_default = SvgWebauthn;
|
|
3943
4091
|
|
|
3944
4092
|
// src/theme/default/assets/icons/totp.svg
|
|
3945
4093
|
import * as React21 from "react";
|
|
3946
|
-
import { jsx as
|
|
4094
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3947
4095
|
var SvgTotp = (props) => {
|
|
3948
4096
|
var _a, _b;
|
|
3949
|
-
return /* @__PURE__ */
|
|
4097
|
+
return /* @__PURE__ */ jsx62("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__ */ jsx62("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
3950
4098
|
};
|
|
3951
4099
|
var totp_default = SvgTotp;
|
|
3952
4100
|
|
|
3953
4101
|
// src/theme/default/assets/icons/code-asterix.svg
|
|
3954
4102
|
import * as React22 from "react";
|
|
3955
|
-
import { jsx as
|
|
4103
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3956
4104
|
var SvgCodeAsterix = (props) => {
|
|
3957
4105
|
var _a, _b;
|
|
3958
|
-
return /* @__PURE__ */
|
|
4106
|
+
return /* @__PURE__ */ jsx63("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__ */ jsx63("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
|
|
3959
4107
|
};
|
|
3960
4108
|
var code_asterix_default = SvgCodeAsterix;
|
|
3961
4109
|
|
|
3962
4110
|
// src/theme/default/components/card/list-item.tsx
|
|
3963
|
-
import { jsx as
|
|
4111
|
+
import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3964
4112
|
function ListItem({
|
|
3965
4113
|
icon: Icon,
|
|
3966
4114
|
as,
|
|
@@ -3980,10 +4128,10 @@ function ListItem({
|
|
|
3980
4128
|
className
|
|
3981
4129
|
),
|
|
3982
4130
|
children: [
|
|
3983
|
-
/* @__PURE__ */
|
|
4131
|
+
/* @__PURE__ */ jsx64("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx64(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
3984
4132
|
/* @__PURE__ */ jsxs30("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
3985
|
-
/* @__PURE__ */
|
|
3986
|
-
/* @__PURE__ */
|
|
4133
|
+
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
4134
|
+
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
3987
4135
|
] }),
|
|
3988
4136
|
children
|
|
3989
4137
|
]
|
|
@@ -3992,7 +4140,7 @@ function ListItem({
|
|
|
3992
4140
|
}
|
|
3993
4141
|
|
|
3994
4142
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
3995
|
-
import { jsx as
|
|
4143
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
3996
4144
|
var iconsMap = {
|
|
3997
4145
|
code: code_default,
|
|
3998
4146
|
passkey: passkey_default,
|
|
@@ -4011,7 +4159,7 @@ function DefaultAuthMethodListItem({
|
|
|
4011
4159
|
var _a;
|
|
4012
4160
|
const intl = useIntl13();
|
|
4013
4161
|
const Icon = iconsMap[group] || null;
|
|
4014
|
-
return /* @__PURE__ */
|
|
4162
|
+
return /* @__PURE__ */ jsx65(
|
|
4015
4163
|
ListItem,
|
|
4016
4164
|
{
|
|
4017
4165
|
as: "button",
|
|
@@ -4038,8 +4186,8 @@ import {
|
|
|
4038
4186
|
import { cva } from "class-variance-authority";
|
|
4039
4187
|
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
4040
4188
|
import { useIntl as useIntl14 } from "react-intl";
|
|
4041
|
-
import { useEffect as
|
|
4042
|
-
import { jsx as
|
|
4189
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
4190
|
+
import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4043
4191
|
var buttonStyles = cva(
|
|
4044
4192
|
[
|
|
4045
4193
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -4079,14 +4227,14 @@ var DefaultButton = ({
|
|
|
4079
4227
|
}) => {
|
|
4080
4228
|
var _a;
|
|
4081
4229
|
const { type, name, value, ...rest } = attributes;
|
|
4082
|
-
const [clicked, setClicked] =
|
|
4230
|
+
const [clicked, setClicked] = useState5(false);
|
|
4083
4231
|
const intl = useIntl14();
|
|
4084
4232
|
const label = getNodeLabel(node);
|
|
4085
4233
|
const {
|
|
4086
4234
|
formState: { isSubmitting },
|
|
4087
4235
|
setValue
|
|
4088
4236
|
} = useFormContext14();
|
|
4089
|
-
|
|
4237
|
+
useEffect5(() => {
|
|
4090
4238
|
if (!isSubmitting) {
|
|
4091
4239
|
setClicked(false);
|
|
4092
4240
|
}
|
|
@@ -4112,8 +4260,8 @@ var DefaultButton = ({
|
|
|
4112
4260
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
4113
4261
|
"data-loading": clicked,
|
|
4114
4262
|
children: [
|
|
4115
|
-
clicked ? /* @__PURE__ */
|
|
4116
|
-
label ? /* @__PURE__ */
|
|
4263
|
+
clicked ? /* @__PURE__ */ jsx66(Spinner, {}) : null,
|
|
4264
|
+
label ? /* @__PURE__ */ jsx66("span", { children: uiTextToFormattedMessage4(label, intl) }) : ""
|
|
4117
4265
|
]
|
|
4118
4266
|
}
|
|
4119
4267
|
);
|
|
@@ -4131,7 +4279,7 @@ import { useIntl as useIntl16 } from "react-intl";
|
|
|
4131
4279
|
|
|
4132
4280
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
4133
4281
|
import { useIntl as useIntl15 } from "react-intl";
|
|
4134
|
-
import { Fragment as Fragment10, jsx as
|
|
4282
|
+
import { Fragment as Fragment10, jsx as jsx67 } from "react/jsx-runtime";
|
|
4135
4283
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
4136
4284
|
function computeLabelElements(labelText) {
|
|
4137
4285
|
const elements = [];
|
|
@@ -4147,7 +4295,7 @@ function computeLabelElements(labelText) {
|
|
|
4147
4295
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
4148
4296
|
}
|
|
4149
4297
|
elements.push(
|
|
4150
|
-
/* @__PURE__ */
|
|
4298
|
+
/* @__PURE__ */ jsx67(
|
|
4151
4299
|
"a",
|
|
4152
4300
|
{
|
|
4153
4301
|
href: url,
|
|
@@ -4172,13 +4320,13 @@ function CheckboxLabel({ label }) {
|
|
|
4172
4320
|
return null;
|
|
4173
4321
|
}
|
|
4174
4322
|
const labelText = uiTextToFormattedMessage(label, intl);
|
|
4175
|
-
return /* @__PURE__ */
|
|
4323
|
+
return /* @__PURE__ */ jsx67(Fragment10, { children: computeLabelElements(labelText) });
|
|
4176
4324
|
}
|
|
4177
4325
|
|
|
4178
4326
|
// src/theme/default/components/form/checkbox.tsx
|
|
4179
|
-
import { jsx as
|
|
4327
|
+
import { jsx as jsx68, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4180
4328
|
function CheckboxSVG() {
|
|
4181
|
-
return /* @__PURE__ */
|
|
4329
|
+
return /* @__PURE__ */ jsx68(
|
|
4182
4330
|
"svg",
|
|
4183
4331
|
{
|
|
4184
4332
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -4187,7 +4335,7 @@ function CheckboxSVG() {
|
|
|
4187
4335
|
height: "16",
|
|
4188
4336
|
viewBox: "0 0 16 16",
|
|
4189
4337
|
fill: "none",
|
|
4190
|
-
children: /* @__PURE__ */
|
|
4338
|
+
children: /* @__PURE__ */ jsx68(
|
|
4191
4339
|
"path",
|
|
4192
4340
|
{
|
|
4193
4341
|
fillRule: "evenodd",
|
|
@@ -4209,7 +4357,7 @@ var DefaultCheckbox = ({
|
|
|
4209
4357
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4210
4358
|
return /* @__PURE__ */ jsxs32("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
4211
4359
|
/* @__PURE__ */ jsxs32("span", { className: "flex h-5 items-center", children: [
|
|
4212
|
-
/* @__PURE__ */
|
|
4360
|
+
/* @__PURE__ */ jsx68(
|
|
4213
4361
|
"input",
|
|
4214
4362
|
{
|
|
4215
4363
|
...omitInputAttributes(attributes),
|
|
@@ -4219,14 +4367,15 @@ var DefaultCheckbox = ({
|
|
|
4219
4367
|
"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",
|
|
4220
4368
|
hasError && "border-interface-border-validation-danger"
|
|
4221
4369
|
),
|
|
4370
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
4222
4371
|
...register(name)
|
|
4223
4372
|
}
|
|
4224
4373
|
),
|
|
4225
|
-
/* @__PURE__ */
|
|
4374
|
+
/* @__PURE__ */ jsx68(CheckboxSVG, {})
|
|
4226
4375
|
] }),
|
|
4227
4376
|
/* @__PURE__ */ jsxs32("span", { className: "flex flex-col", children: [
|
|
4228
|
-
/* @__PURE__ */
|
|
4229
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
4377
|
+
/* @__PURE__ */ jsx68("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx68(CheckboxLabel, { label }) }),
|
|
4378
|
+
node.messages.map((message) => /* @__PURE__ */ jsx68(
|
|
4230
4379
|
"span",
|
|
4231
4380
|
{
|
|
4232
4381
|
className: cn(
|
|
@@ -4243,7 +4392,7 @@ var DefaultCheckbox = ({
|
|
|
4243
4392
|
};
|
|
4244
4393
|
|
|
4245
4394
|
// src/theme/default/components/form/group-container.tsx
|
|
4246
|
-
import { useOryFlow as
|
|
4395
|
+
import { useOryFlow as useOryFlow8 } from "@ory/elements-react";
|
|
4247
4396
|
import { FlowType as FlowType14 } from "@ory/client-fetch";
|
|
4248
4397
|
|
|
4249
4398
|
// src/util/childCounter.ts
|
|
@@ -4258,14 +4407,14 @@ function countRenderableChildren(children) {
|
|
|
4258
4407
|
}
|
|
4259
4408
|
|
|
4260
4409
|
// src/theme/default/components/form/group-container.tsx
|
|
4261
|
-
import { jsx as
|
|
4410
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4262
4411
|
function DefaultGroupContainer({ children }) {
|
|
4263
|
-
const { flowType } =
|
|
4412
|
+
const { flowType } = useOryFlow8();
|
|
4264
4413
|
const count = countRenderableChildren(children);
|
|
4265
4414
|
if (count === 0) {
|
|
4266
4415
|
return null;
|
|
4267
4416
|
}
|
|
4268
|
-
return /* @__PURE__ */
|
|
4417
|
+
return /* @__PURE__ */ jsx69(
|
|
4269
4418
|
"div",
|
|
4270
4419
|
{
|
|
4271
4420
|
className: cn(
|
|
@@ -4278,16 +4427,16 @@ function DefaultGroupContainer({ children }) {
|
|
|
4278
4427
|
}
|
|
4279
4428
|
|
|
4280
4429
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
4281
|
-
import { jsx as
|
|
4430
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
4282
4431
|
function DefaultHorizontalDivider() {
|
|
4283
|
-
return /* @__PURE__ */
|
|
4432
|
+
return /* @__PURE__ */ jsx70("hr", { className: "border-interface-border-default-primary" });
|
|
4284
4433
|
}
|
|
4285
4434
|
|
|
4286
4435
|
// src/theme/default/components/form/image.tsx
|
|
4287
|
-
import { jsx as
|
|
4436
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
4288
4437
|
function DefaultImage({ attributes, node }) {
|
|
4289
4438
|
var _a;
|
|
4290
|
-
return /* @__PURE__ */
|
|
4439
|
+
return /* @__PURE__ */ jsx71("figure", { children: /* @__PURE__ */ jsx71(
|
|
4291
4440
|
"img",
|
|
4292
4441
|
{
|
|
4293
4442
|
...omitInputAttributes(attributes),
|
|
@@ -4300,35 +4449,35 @@ function DefaultImage({ attributes, node }) {
|
|
|
4300
4449
|
import { FlowType as FlowType15, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
|
|
4301
4450
|
import {
|
|
4302
4451
|
uiTextToFormattedMessage as uiTextToFormattedMessage6,
|
|
4303
|
-
useOryFlow as
|
|
4452
|
+
useOryFlow as useOryFlow9
|
|
4304
4453
|
} from "@ory/elements-react";
|
|
4305
|
-
import { useRef as
|
|
4454
|
+
import { useRef as useRef3, useState as useState6 } from "react";
|
|
4306
4455
|
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
4307
4456
|
import { useIntl as useIntl17 } from "react-intl";
|
|
4308
4457
|
|
|
4309
4458
|
// src/theme/default/assets/icons/eye-off.svg
|
|
4310
4459
|
import * as React23 from "react";
|
|
4311
|
-
import { jsx as
|
|
4460
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
4312
4461
|
var SvgEyeOff = (props) => {
|
|
4313
4462
|
var _a, _b;
|
|
4314
|
-
return /* @__PURE__ */
|
|
4463
|
+
return /* @__PURE__ */ jsx72("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__ */ jsx72("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
|
|
4315
4464
|
};
|
|
4316
4465
|
var eye_off_default = SvgEyeOff;
|
|
4317
4466
|
|
|
4318
4467
|
// src/theme/default/assets/icons/eye.svg
|
|
4319
4468
|
import * as React24 from "react";
|
|
4320
|
-
import { jsx as
|
|
4469
|
+
import { jsx as jsx73, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4321
4470
|
var SvgEye = (props) => {
|
|
4322
4471
|
var _a, _b;
|
|
4323
|
-
return /* @__PURE__ */
|
|
4324
|
-
/* @__PURE__ */
|
|
4325
|
-
/* @__PURE__ */
|
|
4472
|
+
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: [
|
|
4473
|
+
/* @__PURE__ */ jsx73("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
4474
|
+
/* @__PURE__ */ jsx73("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
4326
4475
|
] }) });
|
|
4327
4476
|
};
|
|
4328
4477
|
var eye_default = SvgEye;
|
|
4329
4478
|
|
|
4330
4479
|
// src/theme/default/components/form/input.tsx
|
|
4331
|
-
import { jsx as
|
|
4480
|
+
import { jsx as jsx74, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4332
4481
|
var defaultInputClassName = cn(
|
|
4333
4482
|
"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",
|
|
4334
4483
|
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
@@ -4346,8 +4495,8 @@ var DefaultInput = ({
|
|
|
4346
4495
|
const { register } = useFormContext16();
|
|
4347
4496
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4348
4497
|
const intl = useIntl17();
|
|
4349
|
-
const { flowType } =
|
|
4350
|
-
const inputRef =
|
|
4498
|
+
const { flowType } = useOryFlow9();
|
|
4499
|
+
const inputRef = useRef3(null);
|
|
4351
4500
|
const formattedLabel = label ? intl.formatMessage(
|
|
4352
4501
|
{
|
|
4353
4502
|
id: "input.placeholder",
|
|
@@ -4358,10 +4507,10 @@ var DefaultInput = ({
|
|
|
4358
4507
|
}
|
|
4359
4508
|
) : "";
|
|
4360
4509
|
if (rest.type === "hidden") {
|
|
4361
|
-
return /* @__PURE__ */
|
|
4510
|
+
return /* @__PURE__ */ jsx74(
|
|
4362
4511
|
"input",
|
|
4363
4512
|
{
|
|
4364
|
-
...rest,
|
|
4513
|
+
...omitInputAttributes(rest),
|
|
4365
4514
|
onClick,
|
|
4366
4515
|
maxLength: maxlength,
|
|
4367
4516
|
autoComplete: autocomplete,
|
|
@@ -4381,7 +4530,7 @@ var DefaultInput = ({
|
|
|
4381
4530
|
flowType === FlowType15.Settings && "max-w-[488px]"
|
|
4382
4531
|
),
|
|
4383
4532
|
children: [
|
|
4384
|
-
/* @__PURE__ */
|
|
4533
|
+
/* @__PURE__ */ jsx74(
|
|
4385
4534
|
"input",
|
|
4386
4535
|
{
|
|
4387
4536
|
...omitInputAttributes(rest),
|
|
@@ -4398,7 +4547,7 @@ var DefaultInput = ({
|
|
|
4398
4547
|
...restRegister
|
|
4399
4548
|
}
|
|
4400
4549
|
),
|
|
4401
|
-
rest.type === "password" && /* @__PURE__ */
|
|
4550
|
+
rest.type === "password" && /* @__PURE__ */ jsx74(PasswordToggle, { inputRef })
|
|
4402
4551
|
]
|
|
4403
4552
|
}
|
|
4404
4553
|
);
|
|
@@ -4406,21 +4555,21 @@ var DefaultInput = ({
|
|
|
4406
4555
|
function PasswordToggle({
|
|
4407
4556
|
inputRef
|
|
4408
4557
|
}) {
|
|
4409
|
-
const [shown, setShown] =
|
|
4558
|
+
const [shown, setShown] = useState6(false);
|
|
4410
4559
|
const handleClick = () => {
|
|
4411
4560
|
setShown(!shown);
|
|
4412
4561
|
if (inputRef.current) {
|
|
4413
4562
|
inputRef.current.type = shown ? "password" : "text";
|
|
4414
4563
|
}
|
|
4415
4564
|
};
|
|
4416
|
-
return /* @__PURE__ */
|
|
4565
|
+
return /* @__PURE__ */ jsx74(
|
|
4417
4566
|
"button",
|
|
4418
4567
|
{
|
|
4419
4568
|
onClick: handleClick,
|
|
4420
4569
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
4421
4570
|
type: "button",
|
|
4422
4571
|
"aria-label": "Toggle password visibility",
|
|
4423
|
-
children: shown ? /* @__PURE__ */
|
|
4572
|
+
children: shown ? /* @__PURE__ */ jsx74(eye_off_default, {}) : /* @__PURE__ */ jsx74(eye_default, {})
|
|
4424
4573
|
}
|
|
4425
4574
|
);
|
|
4426
4575
|
}
|
|
@@ -4435,11 +4584,12 @@ import {
|
|
|
4435
4584
|
messageTestId as messageTestId4,
|
|
4436
4585
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
4437
4586
|
useComponents as useComponents5,
|
|
4438
|
-
|
|
4587
|
+
useOryConfiguration as useOryConfiguration5,
|
|
4588
|
+
useOryFlow as useOryFlow10
|
|
4439
4589
|
} from "@ory/elements-react";
|
|
4440
4590
|
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
4441
4591
|
import { useIntl as useIntl18 } from "react-intl";
|
|
4442
|
-
import { jsx as
|
|
4592
|
+
import { jsx as jsx75, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4443
4593
|
function findResendNode(nodes) {
|
|
4444
4594
|
return nodes.find(
|
|
4445
4595
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -4454,7 +4604,8 @@ function DefaultLabel({
|
|
|
4454
4604
|
const intl = useIntl18();
|
|
4455
4605
|
const label = getNodeLabel4(node);
|
|
4456
4606
|
const { Message } = useComponents5();
|
|
4457
|
-
const {
|
|
4607
|
+
const { flowType, flow } = useOryFlow10();
|
|
4608
|
+
const config = useOryConfiguration5();
|
|
4458
4609
|
const { setValue, formState } = useFormContext17();
|
|
4459
4610
|
const isPassword = attributes.type === "password";
|
|
4460
4611
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
@@ -4466,7 +4617,7 @@ function DefaultLabel({
|
|
|
4466
4617
|
const fieldError = formState.errors[attributes.name];
|
|
4467
4618
|
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
4468
4619
|
label && /* @__PURE__ */ jsxs35("span", { className: "inline-flex justify-between", children: [
|
|
4469
|
-
/* @__PURE__ */
|
|
4620
|
+
/* @__PURE__ */ jsx75(
|
|
4470
4621
|
"label",
|
|
4471
4622
|
{
|
|
4472
4623
|
...messageTestId4(label),
|
|
@@ -4478,7 +4629,7 @@ function DefaultLabel({
|
|
|
4478
4629
|
}
|
|
4479
4630
|
),
|
|
4480
4631
|
isPassword && config.project.recovery_enabled && flowType === FlowType16.Login && // TODO: make it possible to override with a custom component
|
|
4481
|
-
/* @__PURE__ */
|
|
4632
|
+
/* @__PURE__ */ jsx75(
|
|
4482
4633
|
"a",
|
|
4483
4634
|
{
|
|
4484
4635
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -4489,7 +4640,7 @@ function DefaultLabel({
|
|
|
4489
4640
|
})
|
|
4490
4641
|
}
|
|
4491
4642
|
),
|
|
4492
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */
|
|
4643
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx75(
|
|
4493
4644
|
"button",
|
|
4494
4645
|
{
|
|
4495
4646
|
type: "submit",
|
|
@@ -4502,8 +4653,8 @@ function DefaultLabel({
|
|
|
4502
4653
|
)
|
|
4503
4654
|
] }),
|
|
4504
4655
|
children,
|
|
4505
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
4506
|
-
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */
|
|
4656
|
+
node.messages.map((message) => /* @__PURE__ */ jsx75(Message.Content, { message }, message.id)),
|
|
4657
|
+
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx75(Message.Content, { message: fieldError })
|
|
4507
4658
|
] });
|
|
4508
4659
|
}
|
|
4509
4660
|
|
|
@@ -4514,11 +4665,11 @@ import {
|
|
|
4514
4665
|
} from "@ory/elements-react";
|
|
4515
4666
|
import { forwardRef } from "react";
|
|
4516
4667
|
import { useIntl as useIntl19 } from "react-intl";
|
|
4517
|
-
import { jsx as
|
|
4668
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
4518
4669
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
4519
4670
|
const intl = useIntl19();
|
|
4520
4671
|
const label = getNodeLabel5(node);
|
|
4521
|
-
return /* @__PURE__ */
|
|
4672
|
+
return /* @__PURE__ */ jsx76(
|
|
4522
4673
|
"a",
|
|
4523
4674
|
{
|
|
4524
4675
|
...omitInputAttributes(attributes),
|
|
@@ -4540,8 +4691,8 @@ import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
|
4540
4691
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
4541
4692
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4542
4693
|
import * as React25 from "react";
|
|
4543
|
-
import { jsx as
|
|
4544
|
-
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
4694
|
+
import { jsx as jsx77, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4695
|
+
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx77(
|
|
4545
4696
|
OTPInput,
|
|
4546
4697
|
{
|
|
4547
4698
|
ref,
|
|
@@ -4554,7 +4705,7 @@ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props },
|
|
|
4554
4705
|
}
|
|
4555
4706
|
));
|
|
4556
4707
|
InputOTP.displayName = "InputOTP";
|
|
4557
|
-
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4708
|
+
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
4558
4709
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4559
4710
|
var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
4560
4711
|
const inputOTPContext = React25.useContext(OTPInputContext);
|
|
@@ -4571,8 +4722,8 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4571
4722
|
),
|
|
4572
4723
|
...props,
|
|
4573
4724
|
children: [
|
|
4574
|
-
/* @__PURE__ */
|
|
4575
|
-
hasFakeCaret && /* @__PURE__ */
|
|
4725
|
+
/* @__PURE__ */ jsx77("span", { className: "inline-block size-4", children: char }),
|
|
4726
|
+
hasFakeCaret && /* @__PURE__ */ jsx77("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx77("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
4576
4727
|
]
|
|
4577
4728
|
}
|
|
4578
4729
|
);
|
|
@@ -4580,26 +4731,26 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4580
4731
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
4581
4732
|
|
|
4582
4733
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4583
|
-
import { useOryFlow as
|
|
4734
|
+
import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
|
|
4584
4735
|
import { FlowType as FlowType17 } from "@ory/client-fetch";
|
|
4585
|
-
import { jsx as
|
|
4736
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
4586
4737
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4587
4738
|
const { setValue, watch } = useFormContext18();
|
|
4588
4739
|
const { maxlength, name } = attributes;
|
|
4589
4740
|
const elements = maxlength != null ? maxlength : 6;
|
|
4590
|
-
const { flowType } =
|
|
4741
|
+
const { flowType } = useOryFlow11();
|
|
4591
4742
|
const handleInputChange = (v) => {
|
|
4592
4743
|
setValue(name, v);
|
|
4593
4744
|
};
|
|
4594
4745
|
const value = watch(name);
|
|
4595
|
-
return /* @__PURE__ */
|
|
4746
|
+
return /* @__PURE__ */ jsx78(
|
|
4596
4747
|
InputOTP,
|
|
4597
4748
|
{
|
|
4598
4749
|
maxLength: maxlength != null ? maxlength : 6,
|
|
4599
4750
|
onChange: handleInputChange,
|
|
4600
4751
|
name,
|
|
4601
4752
|
value,
|
|
4602
|
-
children: /* @__PURE__ */
|
|
4753
|
+
children: /* @__PURE__ */ jsx78(
|
|
4603
4754
|
InputOTPGroup,
|
|
4604
4755
|
{
|
|
4605
4756
|
className: cn(
|
|
@@ -4607,7 +4758,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4607
4758
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4608
4759
|
flowType === FlowType17.Settings && "max-w-[488px]"
|
|
4609
4760
|
),
|
|
4610
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */
|
|
4761
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx78(InputOTPSlot, { index }, index))
|
|
4611
4762
|
}
|
|
4612
4763
|
)
|
|
4613
4764
|
}
|
|
@@ -4615,13 +4766,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4615
4766
|
};
|
|
4616
4767
|
|
|
4617
4768
|
// src/theme/default/components/form/section.tsx
|
|
4618
|
-
import { jsx as
|
|
4769
|
+
import { jsx as jsx79, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4619
4770
|
var DefaultFormSection = ({
|
|
4620
4771
|
children,
|
|
4621
4772
|
nodes: _nodes,
|
|
4622
4773
|
...rest
|
|
4623
4774
|
}) => {
|
|
4624
|
-
return /* @__PURE__ */
|
|
4775
|
+
return /* @__PURE__ */ jsx79(
|
|
4625
4776
|
"form",
|
|
4626
4777
|
{
|
|
4627
4778
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -4637,8 +4788,8 @@ var DefaultFormSectionContent = ({
|
|
|
4637
4788
|
}) => {
|
|
4638
4789
|
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: [
|
|
4639
4790
|
/* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
|
|
4640
|
-
/* @__PURE__ */
|
|
4641
|
-
/* @__PURE__ */
|
|
4791
|
+
/* @__PURE__ */ jsx79("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
4792
|
+
/* @__PURE__ */ jsx79("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
4642
4793
|
] }),
|
|
4643
4794
|
children
|
|
4644
4795
|
] });
|
|
@@ -4654,7 +4805,7 @@ var DefaultFormSectionFooter = ({
|
|
|
4654
4805
|
"flex min-h-[72px] items-center justify-between gap-2 rounded-b-cards border border-interface-border-default-primary bg-interface-background-default-secondary px-6 py-4 text-interface-foreground-default-tertiary"
|
|
4655
4806
|
),
|
|
4656
4807
|
children: [
|
|
4657
|
-
/* @__PURE__ */
|
|
4808
|
+
/* @__PURE__ */ jsx79("span", { children: text }),
|
|
4658
4809
|
children
|
|
4659
4810
|
]
|
|
4660
4811
|
}
|
|
@@ -4664,31 +4815,31 @@ var DefaultFormSectionFooter = ({
|
|
|
4664
4815
|
// src/theme/default/components/form/text.tsx
|
|
4665
4816
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
4666
4817
|
import { useIntl as useIntl20 } from "react-intl";
|
|
4667
|
-
import { Fragment as Fragment11, jsx as
|
|
4818
|
+
import { Fragment as Fragment11, jsx as jsx80, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4668
4819
|
function DefaultText({ node, attributes }) {
|
|
4669
4820
|
var _a;
|
|
4670
4821
|
const intl = useIntl20();
|
|
4671
4822
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
4672
4823
|
if (lookup) {
|
|
4673
4824
|
return /* @__PURE__ */ jsxs38(Fragment11, { children: [
|
|
4674
|
-
/* @__PURE__ */
|
|
4675
|
-
lookup.map((text, index) => /* @__PURE__ */
|
|
4825
|
+
/* @__PURE__ */ jsx80("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
4826
|
+
lookup.map((text, index) => /* @__PURE__ */ jsx80(
|
|
4676
4827
|
"pre",
|
|
4677
4828
|
{
|
|
4678
4829
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
4679
|
-
children: /* @__PURE__ */
|
|
4830
|
+
children: /* @__PURE__ */ jsx80("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
|
|
4680
4831
|
},
|
|
4681
4832
|
index
|
|
4682
4833
|
))
|
|
4683
4834
|
] });
|
|
4684
4835
|
}
|
|
4685
|
-
return /* @__PURE__ */
|
|
4836
|
+
return /* @__PURE__ */ jsx80(Fragment11, { children: /* @__PURE__ */ jsxs38(
|
|
4686
4837
|
"p",
|
|
4687
4838
|
{
|
|
4688
4839
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
4689
4840
|
id: attributes.id,
|
|
4690
4841
|
children: [
|
|
4691
|
-
node.meta.label ? /* @__PURE__ */
|
|
4842
|
+
node.meta.label ? /* @__PURE__ */ jsx80("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
|
|
4692
4843
|
attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
|
|
4693
4844
|
]
|
|
4694
4845
|
}
|
|
@@ -4698,30 +4849,31 @@ function DefaultText({ node, attributes }) {
|
|
|
4698
4849
|
// src/theme/default/components/generic/page-header.tsx
|
|
4699
4850
|
import {
|
|
4700
4851
|
useComponents as useComponents6,
|
|
4701
|
-
|
|
4852
|
+
useOryConfiguration as useOryConfiguration7,
|
|
4853
|
+
useOryFlow as useOryFlow12
|
|
4702
4854
|
} from "@ory/elements-react";
|
|
4703
4855
|
|
|
4704
4856
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4705
|
-
import {
|
|
4857
|
+
import { useOryConfiguration as useOryConfiguration6 } from "@ory/elements-react";
|
|
4706
4858
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
4707
4859
|
|
|
4708
4860
|
// src/theme/default/assets/icons/logout.svg
|
|
4709
4861
|
import * as React26 from "react";
|
|
4710
|
-
import { jsx as
|
|
4862
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
4711
4863
|
var SvgLogout = (props) => {
|
|
4712
4864
|
var _a, _b;
|
|
4713
|
-
return /* @__PURE__ */
|
|
4865
|
+
return /* @__PURE__ */ jsx81("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__ */ jsx81("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
|
|
4714
4866
|
};
|
|
4715
4867
|
var logout_default = SvgLogout;
|
|
4716
4868
|
|
|
4717
4869
|
// src/theme/default/assets/icons/settings.svg
|
|
4718
4870
|
import * as React27 from "react";
|
|
4719
|
-
import { jsx as
|
|
4871
|
+
import { jsx as jsx82, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4720
4872
|
var SvgSettings = (props) => {
|
|
4721
4873
|
var _a, _b;
|
|
4722
|
-
return /* @__PURE__ */
|
|
4723
|
-
/* @__PURE__ */
|
|
4724
|
-
/* @__PURE__ */
|
|
4874
|
+
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: [
|
|
4875
|
+
/* @__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" }),
|
|
4876
|
+
/* @__PURE__ */ jsx82("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
4725
4877
|
] }) });
|
|
4726
4878
|
};
|
|
4727
4879
|
var settings_default = SvgSettings;
|
|
@@ -4768,10 +4920,10 @@ var getUserInitials = (session) => {
|
|
|
4768
4920
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
4769
4921
|
import { forwardRef as forwardRef3 } from "react";
|
|
4770
4922
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4771
|
-
import { jsx as
|
|
4923
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4772
4924
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4773
4925
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4774
|
-
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */
|
|
4926
|
+
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx83(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx83(
|
|
4775
4927
|
DropdownMenuPrimitive.Content,
|
|
4776
4928
|
{
|
|
4777
4929
|
ref,
|
|
@@ -4786,7 +4938,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
|
|
|
4786
4938
|
}
|
|
4787
4939
|
) }));
|
|
4788
4940
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4789
|
-
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
4941
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx83(
|
|
4790
4942
|
DropdownMenuPrimitive.Item,
|
|
4791
4943
|
{
|
|
4792
4944
|
ref,
|
|
@@ -4804,7 +4956,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
|
|
|
4804
4956
|
}
|
|
4805
4957
|
));
|
|
4806
4958
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4807
|
-
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
4959
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx83(
|
|
4808
4960
|
DropdownMenuPrimitive.Label,
|
|
4809
4961
|
{
|
|
4810
4962
|
ref,
|
|
@@ -4823,31 +4975,31 @@ import { forwardRef as forwardRef4 } from "react";
|
|
|
4823
4975
|
|
|
4824
4976
|
// src/theme/default/assets/icons/user.svg
|
|
4825
4977
|
import * as React28 from "react";
|
|
4826
|
-
import { jsx as
|
|
4978
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
4827
4979
|
var SvgUser = (props) => {
|
|
4828
4980
|
var _a, _b;
|
|
4829
|
-
return /* @__PURE__ */
|
|
4981
|
+
return /* @__PURE__ */ jsx84("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__ */ jsx84("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
|
|
4830
4982
|
};
|
|
4831
4983
|
var user_default = SvgUser;
|
|
4832
4984
|
|
|
4833
4985
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4834
|
-
import { jsx as
|
|
4986
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
4835
4987
|
var UserAvatar = forwardRef4(
|
|
4836
4988
|
({ initials, ...rest }, ref) => {
|
|
4837
|
-
return /* @__PURE__ */
|
|
4989
|
+
return /* @__PURE__ */ jsx85(
|
|
4838
4990
|
"button",
|
|
4839
4991
|
{
|
|
4840
4992
|
ref,
|
|
4841
4993
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
4842
4994
|
...rest,
|
|
4843
|
-
children: /* @__PURE__ */
|
|
4995
|
+
children: /* @__PURE__ */ jsx85("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx85(
|
|
4844
4996
|
"img",
|
|
4845
4997
|
{
|
|
4846
4998
|
src: initials.avatar,
|
|
4847
4999
|
alt: initials.primary,
|
|
4848
5000
|
className: "w-full object-contain"
|
|
4849
5001
|
}
|
|
4850
|
-
) : /* @__PURE__ */
|
|
5002
|
+
) : /* @__PURE__ */ jsx85(
|
|
4851
5003
|
user_default,
|
|
4852
5004
|
{
|
|
4853
5005
|
size: 24,
|
|
@@ -4861,27 +5013,27 @@ var UserAvatar = forwardRef4(
|
|
|
4861
5013
|
UserAvatar.displayName = "UserAvatar";
|
|
4862
5014
|
|
|
4863
5015
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4864
|
-
import { jsx as
|
|
5016
|
+
import { jsx as jsx86, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4865
5017
|
var UserMenu = ({ session }) => {
|
|
4866
|
-
const
|
|
5018
|
+
const config = useOryConfiguration6();
|
|
4867
5019
|
const initials = getUserInitials(session);
|
|
4868
5020
|
const { logoutFlow } = useClientLogout(config);
|
|
4869
5021
|
return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
4870
|
-
/* @__PURE__ */
|
|
5022
|
+
/* @__PURE__ */ jsx86(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx86(UserAvatar, { initials, title: "User Menu" }) }),
|
|
4871
5023
|
/* @__PURE__ */ jsxs40(DropdownMenuContent, { children: [
|
|
4872
5024
|
/* @__PURE__ */ jsxs40(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
4873
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ jsx86(UserAvatar, { disabled: true, initials }),
|
|
4874
5026
|
/* @__PURE__ */ jsxs40("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
4875
|
-
/* @__PURE__ */
|
|
4876
|
-
initials.secondary && /* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
5028
|
+
initials.secondary && /* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
4877
5029
|
] })
|
|
4878
5030
|
] }),
|
|
4879
|
-
/* @__PURE__ */
|
|
4880
|
-
/* @__PURE__ */
|
|
5031
|
+
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs40("a", { href: "/settings", children: [
|
|
5032
|
+
/* @__PURE__ */ jsx86(settings_default, { size: 16 }),
|
|
4881
5033
|
" User settings"
|
|
4882
5034
|
] }) }),
|
|
4883
|
-
/* @__PURE__ */
|
|
4884
|
-
/* @__PURE__ */
|
|
5035
|
+
/* @__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: [
|
|
5036
|
+
/* @__PURE__ */ jsx86(logout_default, { size: 16 }),
|
|
4885
5037
|
" Logout"
|
|
4886
5038
|
] }) })
|
|
4887
5039
|
] })
|
|
@@ -4891,27 +5043,28 @@ var UserMenu = ({ session }) => {
|
|
|
4891
5043
|
// src/theme/default/components/generic/page-header.tsx
|
|
4892
5044
|
import { useSession } from "@ory/elements-react/client";
|
|
4893
5045
|
import { useIntl as useIntl21 } from "react-intl";
|
|
4894
|
-
import { jsx as
|
|
5046
|
+
import { jsx as jsx87, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4895
5047
|
var DefaultPageHeader = (_props) => {
|
|
4896
5048
|
var _a;
|
|
4897
5049
|
const { Card } = useComponents6();
|
|
4898
5050
|
const { session } = useSession();
|
|
4899
5051
|
const intl = useIntl21();
|
|
4900
|
-
const {
|
|
5052
|
+
const { flow } = useOryFlow12();
|
|
5053
|
+
const config = useOryConfiguration7();
|
|
4901
5054
|
const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
|
|
4902
|
-
return /* @__PURE__ */
|
|
5055
|
+
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: [
|
|
4903
5056
|
/* @__PURE__ */ jsxs41("div", { className: "flex max-h-10 flex-1 justify-between gap-2 items-center", children: [
|
|
4904
|
-
/* @__PURE__ */
|
|
4905
|
-
/* @__PURE__ */
|
|
5057
|
+
/* @__PURE__ */ jsx87(Card.Logo, {}),
|
|
5058
|
+
/* @__PURE__ */ jsx87(UserMenu, { session })
|
|
4906
5059
|
] }),
|
|
4907
|
-
returnUrl && /* @__PURE__ */
|
|
5060
|
+
returnUrl && /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsxs41(
|
|
4908
5061
|
"a",
|
|
4909
5062
|
{
|
|
4910
5063
|
"data-testid": "ory/screen/settings/back-button",
|
|
4911
5064
|
href: returnUrl,
|
|
4912
5065
|
className: "inline-flex gap-2 items-center",
|
|
4913
5066
|
children: [
|
|
4914
|
-
/* @__PURE__ */
|
|
5067
|
+
/* @__PURE__ */ jsx87(arrow_left_default, {}),
|
|
4915
5068
|
" ",
|
|
4916
5069
|
intl.formatMessage({
|
|
4917
5070
|
id: "settings.navigation-back-button",
|
|
@@ -4924,21 +5077,21 @@ var DefaultPageHeader = (_props) => {
|
|
|
4924
5077
|
};
|
|
4925
5078
|
|
|
4926
5079
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4927
|
-
import { useEffect as
|
|
5080
|
+
import { useEffect as useEffect6 } from "react";
|
|
4928
5081
|
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
4929
5082
|
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
4930
5083
|
|
|
4931
5084
|
// src/theme/default/assets/icons/trash.svg
|
|
4932
5085
|
import * as React29 from "react";
|
|
4933
|
-
import { jsx as
|
|
5086
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
4934
5087
|
var SvgTrash = (props) => {
|
|
4935
5088
|
var _a, _b;
|
|
4936
|
-
return /* @__PURE__ */
|
|
5089
|
+
return /* @__PURE__ */ jsx88("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__ */ jsx88("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
|
|
4937
5090
|
};
|
|
4938
5091
|
var trash_default = SvgTrash;
|
|
4939
5092
|
|
|
4940
5093
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4941
|
-
import { jsx as
|
|
5094
|
+
import { jsx as jsx89, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4942
5095
|
function DefaultSettingsOidc({
|
|
4943
5096
|
linkButtons,
|
|
4944
5097
|
unlinkButtons
|
|
@@ -4946,9 +5099,9 @@ function DefaultSettingsOidc({
|
|
|
4946
5099
|
const hasLinkButtons = linkButtons.length > 0;
|
|
4947
5100
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
4948
5101
|
return /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-8", children: [
|
|
4949
|
-
hasLinkButtons && /* @__PURE__ */
|
|
5102
|
+
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) => {
|
|
4950
5103
|
const attrs = button.attributes;
|
|
4951
|
-
return /* @__PURE__ */
|
|
5104
|
+
return /* @__PURE__ */ jsx89(
|
|
4952
5105
|
DefaultButtonSocial,
|
|
4953
5106
|
{
|
|
4954
5107
|
showLabel: true,
|
|
@@ -4959,17 +5112,17 @@ function DefaultSettingsOidc({
|
|
|
4959
5112
|
attrs.value
|
|
4960
5113
|
);
|
|
4961
5114
|
}) }),
|
|
4962
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */
|
|
5115
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx89(DefaultHorizontalDivider, {}) : null,
|
|
4963
5116
|
unlinkButtons.map((button) => {
|
|
4964
5117
|
if (button.attributes.node_type !== "input") {
|
|
4965
5118
|
return null;
|
|
4966
5119
|
}
|
|
4967
|
-
return /* @__PURE__ */
|
|
5120
|
+
return /* @__PURE__ */ jsx89(UnlinkRow, { button }, button.attributes.value);
|
|
4968
5121
|
})
|
|
4969
5122
|
] });
|
|
4970
5123
|
}
|
|
4971
5124
|
function UnlinkRow({ button }) {
|
|
4972
|
-
var _a, _b;
|
|
5125
|
+
var _a, _b, _c;
|
|
4973
5126
|
const [clicked, setClicked] = useDebounceValue2(false, 100);
|
|
4974
5127
|
const {
|
|
4975
5128
|
formState: { isSubmitting }
|
|
@@ -4981,26 +5134,27 @@ function UnlinkRow({ button }) {
|
|
|
4981
5134
|
button.onClick();
|
|
4982
5135
|
setClicked(true);
|
|
4983
5136
|
};
|
|
4984
|
-
|
|
5137
|
+
useEffect6(() => {
|
|
4985
5138
|
if (!isSubmitting) {
|
|
4986
5139
|
setClicked(false);
|
|
4987
5140
|
}
|
|
4988
5141
|
}, [isSubmitting, setClicked]);
|
|
5142
|
+
console.log((_c = button.meta.label) == null ? void 0 : _c.context);
|
|
4989
5143
|
return /* @__PURE__ */ jsxs42("div", { className: "flex justify-between", children: [
|
|
4990
5144
|
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-6", children: [
|
|
4991
|
-
Logo ? /* @__PURE__ */
|
|
4992
|
-
/* @__PURE__ */
|
|
5145
|
+
Logo ? /* @__PURE__ */ jsx89(Logo, { size: 32 }) : /* @__PURE__ */ jsx89(GenericLogo, { label: provider.slice(0, 1) }),
|
|
5146
|
+
/* @__PURE__ */ jsx89("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
4993
5147
|
] }),
|
|
4994
|
-
/* @__PURE__ */
|
|
5148
|
+
/* @__PURE__ */ jsx89(
|
|
4995
5149
|
"button",
|
|
4996
5150
|
{
|
|
4997
|
-
...attrs,
|
|
5151
|
+
...omitInputAttributes(attrs),
|
|
4998
5152
|
type: "submit",
|
|
4999
5153
|
onClick: localOnClick,
|
|
5000
5154
|
disabled: isSubmitting,
|
|
5001
5155
|
className: "relative",
|
|
5002
5156
|
title: `Unlink ${provider}`,
|
|
5003
|
-
children: clicked ? /* @__PURE__ */
|
|
5157
|
+
children: clicked ? /* @__PURE__ */ jsx89(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx89(
|
|
5004
5158
|
trash_default,
|
|
5005
5159
|
{
|
|
5006
5160
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5015,7 +5169,7 @@ function UnlinkRow({ button }) {
|
|
|
5015
5169
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
5016
5170
|
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
5017
5171
|
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
5018
|
-
import { jsx as
|
|
5172
|
+
import { jsx as jsx90, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5019
5173
|
function DefaultSettingsPasskey({
|
|
5020
5174
|
triggerButton,
|
|
5021
5175
|
removeButtons
|
|
@@ -5026,7 +5180,7 @@ function DefaultSettingsPasskey({
|
|
|
5026
5180
|
const { Node: Node2 } = useComponents7();
|
|
5027
5181
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5028
5182
|
return /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
|
|
5029
|
-
/* @__PURE__ */
|
|
5183
|
+
/* @__PURE__ */ jsx90("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx90(
|
|
5030
5184
|
Node2.Button,
|
|
5031
5185
|
{
|
|
5032
5186
|
node: triggerButton,
|
|
@@ -5035,8 +5189,8 @@ function DefaultSettingsPasskey({
|
|
|
5035
5189
|
}
|
|
5036
5190
|
) }),
|
|
5037
5191
|
hasRemoveButtons ? /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
|
|
5038
|
-
/* @__PURE__ */
|
|
5039
|
-
/* @__PURE__ */
|
|
5192
|
+
/* @__PURE__ */ jsx90(DefaultHorizontalDivider, {}),
|
|
5193
|
+
/* @__PURE__ */ jsx90("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
5040
5194
|
var _a, _b;
|
|
5041
5195
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5042
5196
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -5048,7 +5202,7 @@ function DefaultSettingsPasskey({
|
|
|
5048
5202
|
className: "flex justify-between gap-6 md:items-center",
|
|
5049
5203
|
children: [
|
|
5050
5204
|
/* @__PURE__ */ jsxs43("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5051
|
-
/* @__PURE__ */
|
|
5205
|
+
/* @__PURE__ */ jsx90(
|
|
5052
5206
|
passkey_default,
|
|
5053
5207
|
{
|
|
5054
5208
|
size: 32,
|
|
@@ -5057,15 +5211,15 @@ function DefaultSettingsPasskey({
|
|
|
5057
5211
|
),
|
|
5058
5212
|
/* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5059
5213
|
/* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col truncate", children: [
|
|
5060
|
-
/* @__PURE__ */
|
|
5061
|
-
/* @__PURE__ */
|
|
5214
|
+
/* @__PURE__ */ jsx90("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5215
|
+
/* @__PURE__ */ jsx90("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5062
5216
|
] }),
|
|
5063
|
-
addedAt && /* @__PURE__ */
|
|
5217
|
+
addedAt && /* @__PURE__ */ jsx90("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5064
5218
|
dateStyle: "long"
|
|
5065
5219
|
}).format(new Date(addedAt)) })
|
|
5066
5220
|
] })
|
|
5067
5221
|
] }),
|
|
5068
|
-
/* @__PURE__ */
|
|
5222
|
+
/* @__PURE__ */ jsx90(
|
|
5069
5223
|
"button",
|
|
5070
5224
|
{
|
|
5071
5225
|
...node.attributes,
|
|
@@ -5073,7 +5227,7 @@ function DefaultSettingsPasskey({
|
|
|
5073
5227
|
onClick: node.onClick,
|
|
5074
5228
|
disabled: isSubmitting,
|
|
5075
5229
|
className: "relative",
|
|
5076
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
5230
|
+
children: isSubmitting ? /* @__PURE__ */ jsx90(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx90(
|
|
5077
5231
|
trash_default,
|
|
5078
5232
|
{
|
|
5079
5233
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5093,25 +5247,25 @@ function DefaultSettingsPasskey({
|
|
|
5093
5247
|
|
|
5094
5248
|
// src/theme/default/assets/icons/download.svg
|
|
5095
5249
|
import * as React30 from "react";
|
|
5096
|
-
import { jsx as
|
|
5250
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
5097
5251
|
var SvgDownload = (props) => {
|
|
5098
5252
|
var _a, _b;
|
|
5099
|
-
return /* @__PURE__ */
|
|
5253
|
+
return /* @__PURE__ */ jsx91("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx91("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
|
|
5100
5254
|
};
|
|
5101
5255
|
var download_default = SvgDownload;
|
|
5102
5256
|
|
|
5103
5257
|
// src/theme/default/assets/icons/refresh.svg
|
|
5104
5258
|
import * as React31 from "react";
|
|
5105
|
-
import { jsx as
|
|
5259
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5106
5260
|
var SvgRefresh = (props) => {
|
|
5107
5261
|
var _a, _b;
|
|
5108
|
-
return /* @__PURE__ */
|
|
5262
|
+
return /* @__PURE__ */ jsx92("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx92("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
|
|
5109
5263
|
};
|
|
5110
5264
|
var refresh_default = SvgRefresh;
|
|
5111
5265
|
|
|
5112
5266
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
5113
5267
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
5114
|
-
import { Fragment as Fragment12, jsx as
|
|
5268
|
+
import { Fragment as Fragment12, jsx as jsx93, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5115
5269
|
function DefaultSettingsRecoveryCodes({
|
|
5116
5270
|
codes,
|
|
5117
5271
|
regnerateButton,
|
|
@@ -5134,11 +5288,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5134
5288
|
};
|
|
5135
5289
|
const hasCodes = codes.length >= 1;
|
|
5136
5290
|
return /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-8", children: [
|
|
5137
|
-
codes.length > 0 && /* @__PURE__ */
|
|
5291
|
+
codes.length > 0 && /* @__PURE__ */ jsx93(DefaultHorizontalDivider, {}),
|
|
5138
5292
|
/* @__PURE__ */ jsxs44("div", { className: "flex gap-4 justify-between", children: [
|
|
5139
|
-
/* @__PURE__ */
|
|
5293
|
+
/* @__PURE__ */ jsx93("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
5140
5294
|
/* @__PURE__ */ jsxs44("div", { className: "flex gap-2", children: [
|
|
5141
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */
|
|
5295
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx93(
|
|
5142
5296
|
"button",
|
|
5143
5297
|
{
|
|
5144
5298
|
...regnerateButton.attributes,
|
|
@@ -5147,7 +5301,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5147
5301
|
onClick: onRegenerate,
|
|
5148
5302
|
disabled: isSubmitting,
|
|
5149
5303
|
"data-loading": isSubmitting,
|
|
5150
|
-
children: /* @__PURE__ */
|
|
5304
|
+
children: /* @__PURE__ */ jsx93(
|
|
5151
5305
|
refresh_default,
|
|
5152
5306
|
{
|
|
5153
5307
|
size: 24,
|
|
@@ -5156,7 +5310,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5156
5310
|
)
|
|
5157
5311
|
}
|
|
5158
5312
|
),
|
|
5159
|
-
revealButton && /* @__PURE__ */
|
|
5313
|
+
revealButton && /* @__PURE__ */ jsx93(Fragment12, { children: /* @__PURE__ */ jsx93(
|
|
5160
5314
|
"button",
|
|
5161
5315
|
{
|
|
5162
5316
|
...revealButton.attributes,
|
|
@@ -5164,7 +5318,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5164
5318
|
className: "ml-auto",
|
|
5165
5319
|
onClick: onReveal,
|
|
5166
5320
|
title: "Reveal recovery codes",
|
|
5167
|
-
children: /* @__PURE__ */
|
|
5321
|
+
children: /* @__PURE__ */ jsx93(
|
|
5168
5322
|
eye_default,
|
|
5169
5323
|
{
|
|
5170
5324
|
size: 24,
|
|
@@ -5173,7 +5327,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5173
5327
|
)
|
|
5174
5328
|
}
|
|
5175
5329
|
) }),
|
|
5176
|
-
hasCodes && /* @__PURE__ */
|
|
5330
|
+
hasCodes && /* @__PURE__ */ jsx93(
|
|
5177
5331
|
"button",
|
|
5178
5332
|
{
|
|
5179
5333
|
onClick: onDownload,
|
|
@@ -5181,7 +5335,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5181
5335
|
className: "ml-auto",
|
|
5182
5336
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
5183
5337
|
title: "Download recovery codes",
|
|
5184
|
-
children: /* @__PURE__ */
|
|
5338
|
+
children: /* @__PURE__ */ jsx93(
|
|
5185
5339
|
download_default,
|
|
5186
5340
|
{
|
|
5187
5341
|
size: 24,
|
|
@@ -5192,12 +5346,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5192
5346
|
)
|
|
5193
5347
|
] })
|
|
5194
5348
|
] }),
|
|
5195
|
-
hasCodes ? /* @__PURE__ */
|
|
5349
|
+
hasCodes ? /* @__PURE__ */ jsx93("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx93(
|
|
5196
5350
|
"div",
|
|
5197
5351
|
{
|
|
5198
5352
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
5199
5353
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
5200
|
-
children: codes.map((code) => /* @__PURE__ */
|
|
5354
|
+
children: codes.map((code) => /* @__PURE__ */ jsx93("p", { children: code }, code))
|
|
5201
5355
|
}
|
|
5202
5356
|
) }) : null
|
|
5203
5357
|
] });
|
|
@@ -5208,16 +5362,16 @@ import { useComponents as useComponents8 } from "@ory/elements-react";
|
|
|
5208
5362
|
|
|
5209
5363
|
// src/theme/default/assets/icons/qrcode.svg
|
|
5210
5364
|
import * as React32 from "react";
|
|
5211
|
-
import { jsx as
|
|
5365
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
5212
5366
|
var SvgQrcode = (props) => {
|
|
5213
5367
|
var _a, _b;
|
|
5214
|
-
return /* @__PURE__ */
|
|
5368
|
+
return /* @__PURE__ */ jsx94("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx94("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
5215
5369
|
};
|
|
5216
5370
|
var qrcode_default = SvgQrcode;
|
|
5217
5371
|
|
|
5218
5372
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
5219
5373
|
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
5220
|
-
import { jsx as
|
|
5374
|
+
import { jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5221
5375
|
function DefaultSettingsTotp({
|
|
5222
5376
|
totpImage,
|
|
5223
5377
|
totpInput,
|
|
@@ -5238,18 +5392,18 @@ function DefaultSettingsTotp({
|
|
|
5238
5392
|
...buttonAttrs
|
|
5239
5393
|
} = totpUnlink.attributes;
|
|
5240
5394
|
return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5241
|
-
/* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(Card.Divider, {}) }),
|
|
5242
5396
|
/* @__PURE__ */ jsxs45("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
5243
|
-
/* @__PURE__ */
|
|
5244
|
-
/* @__PURE__ */
|
|
5245
|
-
/* @__PURE__ */
|
|
5397
|
+
/* @__PURE__ */ jsx95("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx95(qrcode_default, { size: 32 }) }),
|
|
5398
|
+
/* @__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" }) }),
|
|
5399
|
+
/* @__PURE__ */ jsx95(
|
|
5246
5400
|
"button",
|
|
5247
5401
|
{
|
|
5248
5402
|
type: type === "button" ? "button" : "submit",
|
|
5249
5403
|
...buttonAttrs,
|
|
5250
5404
|
onClick: onUnlink,
|
|
5251
5405
|
disabled: isSubmitting,
|
|
5252
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
5406
|
+
children: isSubmitting ? /* @__PURE__ */ jsx95(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx95(
|
|
5253
5407
|
trash_default,
|
|
5254
5408
|
{
|
|
5255
5409
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5263,8 +5417,8 @@ function DefaultSettingsTotp({
|
|
|
5263
5417
|
}
|
|
5264
5418
|
if (totpImage && totpSecret && totpInput) {
|
|
5265
5419
|
return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5266
|
-
/* @__PURE__ */
|
|
5267
|
-
/* @__PURE__ */
|
|
5420
|
+
/* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(DefaultHorizontalDivider, {}) }),
|
|
5421
|
+
/* @__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(
|
|
5268
5422
|
Node2.Image,
|
|
5269
5423
|
{
|
|
5270
5424
|
node: totpImage,
|
|
@@ -5274,12 +5428,12 @@ function DefaultSettingsTotp({
|
|
|
5274
5428
|
}
|
|
5275
5429
|
) }) }) }),
|
|
5276
5430
|
/* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-6", children: [
|
|
5277
|
-
/* @__PURE__ */
|
|
5431
|
+
/* @__PURE__ */ jsx95(
|
|
5278
5432
|
Node2.Label,
|
|
5279
5433
|
{
|
|
5280
5434
|
node: totpSecret,
|
|
5281
5435
|
attributes: totpSecret.attributes,
|
|
5282
|
-
children: /* @__PURE__ */
|
|
5436
|
+
children: /* @__PURE__ */ jsx95("div", { className: "relative flex justify-stretch max-w-[488px]", children: /* @__PURE__ */ jsx95(
|
|
5283
5437
|
"input",
|
|
5284
5438
|
{
|
|
5285
5439
|
disabled: true,
|
|
@@ -5292,12 +5446,12 @@ function DefaultSettingsTotp({
|
|
|
5292
5446
|
) })
|
|
5293
5447
|
}
|
|
5294
5448
|
),
|
|
5295
|
-
/* @__PURE__ */
|
|
5449
|
+
/* @__PURE__ */ jsx95(
|
|
5296
5450
|
Node2.Label,
|
|
5297
5451
|
{
|
|
5298
5452
|
attributes: totpInput.attributes,
|
|
5299
5453
|
node: totpInput,
|
|
5300
|
-
children: /* @__PURE__ */
|
|
5454
|
+
children: /* @__PURE__ */ jsx95(
|
|
5301
5455
|
Node2.CodeInput,
|
|
5302
5456
|
{
|
|
5303
5457
|
node: totpInput,
|
|
@@ -5316,16 +5470,16 @@ import { useComponents as useComponents9 } from "@ory/elements-react";
|
|
|
5316
5470
|
|
|
5317
5471
|
// src/theme/default/assets/icons/key.svg
|
|
5318
5472
|
import * as React33 from "react";
|
|
5319
|
-
import { jsx as
|
|
5473
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
5320
5474
|
var SvgKey = (props) => {
|
|
5321
5475
|
var _a, _b;
|
|
5322
|
-
return /* @__PURE__ */
|
|
5476
|
+
return /* @__PURE__ */ jsx96("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__ */ jsx96("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
|
|
5323
5477
|
};
|
|
5324
5478
|
var key_default = SvgKey;
|
|
5325
5479
|
|
|
5326
5480
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
5327
5481
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
5328
|
-
import { jsx as
|
|
5482
|
+
import { jsx as jsx97, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5329
5483
|
function DefaultSettingsWebauthn({
|
|
5330
5484
|
nameInput,
|
|
5331
5485
|
triggerButton,
|
|
@@ -5338,12 +5492,12 @@ function DefaultSettingsWebauthn({
|
|
|
5338
5492
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5339
5493
|
return /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
|
|
5340
5494
|
/* @__PURE__ */ jsxs46("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
5341
|
-
/* @__PURE__ */
|
|
5495
|
+
/* @__PURE__ */ jsx97("div", { className: "flex-1", children: /* @__PURE__ */ jsx97(
|
|
5342
5496
|
Node2.Label,
|
|
5343
5497
|
{
|
|
5344
5498
|
node: nameInput,
|
|
5345
5499
|
attributes: nameInput.attributes,
|
|
5346
|
-
children: /* @__PURE__ */
|
|
5500
|
+
children: /* @__PURE__ */ jsx97(
|
|
5347
5501
|
Node2.Input,
|
|
5348
5502
|
{
|
|
5349
5503
|
node: nameInput,
|
|
@@ -5352,7 +5506,7 @@ function DefaultSettingsWebauthn({
|
|
|
5352
5506
|
)
|
|
5353
5507
|
}
|
|
5354
5508
|
) }),
|
|
5355
|
-
triggerButton ? /* @__PURE__ */
|
|
5509
|
+
triggerButton ? /* @__PURE__ */ jsx97(
|
|
5356
5510
|
Node2.Button,
|
|
5357
5511
|
{
|
|
5358
5512
|
node: triggerButton,
|
|
@@ -5362,8 +5516,8 @@ function DefaultSettingsWebauthn({
|
|
|
5362
5516
|
) : null
|
|
5363
5517
|
] }),
|
|
5364
5518
|
hasRemoveButtons ? /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
|
|
5365
|
-
/* @__PURE__ */
|
|
5366
|
-
/* @__PURE__ */
|
|
5519
|
+
/* @__PURE__ */ jsx97(Card.Divider, {}),
|
|
5520
|
+
/* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
5367
5521
|
var _a, _b;
|
|
5368
5522
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5369
5523
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -5375,7 +5529,7 @@ function DefaultSettingsWebauthn({
|
|
|
5375
5529
|
className: "flex justify-between gap-6 md:items-center",
|
|
5376
5530
|
children: [
|
|
5377
5531
|
/* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5378
|
-
/* @__PURE__ */
|
|
5532
|
+
/* @__PURE__ */ jsx97(
|
|
5379
5533
|
key_default,
|
|
5380
5534
|
{
|
|
5381
5535
|
size: 32,
|
|
@@ -5384,15 +5538,15 @@ function DefaultSettingsWebauthn({
|
|
|
5384
5538
|
),
|
|
5385
5539
|
/* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5386
5540
|
/* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col truncate", children: [
|
|
5387
|
-
/* @__PURE__ */
|
|
5388
|
-
/* @__PURE__ */
|
|
5541
|
+
/* @__PURE__ */ jsx97("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5542
|
+
/* @__PURE__ */ jsx97("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5389
5543
|
] }),
|
|
5390
|
-
addedAt && /* @__PURE__ */
|
|
5544
|
+
addedAt && /* @__PURE__ */ jsx97("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5391
5545
|
dateStyle: "long"
|
|
5392
5546
|
}).format(new Date(addedAt)) })
|
|
5393
5547
|
] })
|
|
5394
5548
|
] }),
|
|
5395
|
-
/* @__PURE__ */
|
|
5549
|
+
/* @__PURE__ */ jsx97(
|
|
5396
5550
|
"button",
|
|
5397
5551
|
{
|
|
5398
5552
|
...node.attributes,
|
|
@@ -5400,7 +5554,7 @@ function DefaultSettingsWebauthn({
|
|
|
5400
5554
|
onClick: node.onClick,
|
|
5401
5555
|
disabled: isSubmitting,
|
|
5402
5556
|
className: "relative",
|
|
5403
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
5557
|
+
children: isSubmitting ? /* @__PURE__ */ jsx97(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx97(
|
|
5404
5558
|
trash_default,
|
|
5405
5559
|
{
|
|
5406
5560
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5419,91 +5573,96 @@ function DefaultSettingsWebauthn({
|
|
|
5419
5573
|
}
|
|
5420
5574
|
|
|
5421
5575
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
5422
|
-
import { jsx as
|
|
5576
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
5423
5577
|
function DefaultAuthMethodListContainer({
|
|
5424
5578
|
children
|
|
5425
5579
|
}) {
|
|
5426
|
-
return /* @__PURE__ */
|
|
5580
|
+
return /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-1 gap-2", children });
|
|
5427
5581
|
}
|
|
5428
5582
|
|
|
5429
5583
|
// src/theme/default/components/form/captcha.tsx
|
|
5430
5584
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes9 } from "@ory/client-fetch";
|
|
5431
5585
|
import { Turnstile } from "@marsidev/react-turnstile";
|
|
5432
|
-
import { useRef as
|
|
5586
|
+
import { useEffect as useEffect7, useRef as useRef4 } from "react";
|
|
5433
5587
|
import { useFormContext as useFormContext24 } from "react-hook-form";
|
|
5434
|
-
import { jsx as
|
|
5588
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
5435
5589
|
var DefaultCaptcha = ({ node }) => {
|
|
5436
|
-
const { setValue } = useFormContext24();
|
|
5437
|
-
const ref =
|
|
5438
|
-
const
|
|
5439
|
-
|
|
5440
|
-
if (
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5590
|
+
const { setValue, formState } = useFormContext24();
|
|
5591
|
+
const ref = useRef4();
|
|
5592
|
+
const prevSubmitCount = useRef4(formState.submitCount);
|
|
5593
|
+
useEffect7(() => {
|
|
5594
|
+
if (formState.submitCount > prevSubmitCount.current && formState.isSubmitSuccessful) {
|
|
5595
|
+
prevSubmitCount.current = formState.submitCount;
|
|
5596
|
+
setTimeout(() => {
|
|
5597
|
+
if (ref.current) {
|
|
5598
|
+
ref.current.reset();
|
|
5599
|
+
}
|
|
5600
|
+
}, 100);
|
|
5444
5601
|
}
|
|
5602
|
+
}, [formState.submitCount, formState.isSubmitSuccessful]);
|
|
5603
|
+
if (!isUiNodeInputAttributes9(node.attributes)) {
|
|
5604
|
+
return null;
|
|
5445
5605
|
}
|
|
5446
|
-
if (
|
|
5606
|
+
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
5607
|
+
return /* @__PURE__ */ jsx99(DefaultInput, { node, attributes: node.attributes }, 1);
|
|
5608
|
+
} else if (node.attributes.name === "captcha_turnstile_options") {
|
|
5447
5609
|
const options = JSON.parse(node.attributes.value);
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
responseFieldName: options.response_field_name
|
|
5460
|
-
},
|
|
5461
|
-
onExpire: () => {
|
|
5462
|
-
var _a;
|
|
5463
|
-
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5464
|
-
},
|
|
5465
|
-
onSuccess: (token) => {
|
|
5466
|
-
setValue(options.response_field_name, token);
|
|
5467
|
-
}
|
|
5610
|
+
return /* @__PURE__ */ jsx99(
|
|
5611
|
+
Turnstile,
|
|
5612
|
+
{
|
|
5613
|
+
ref,
|
|
5614
|
+
siteKey: options.sitekey,
|
|
5615
|
+
options: {
|
|
5616
|
+
action: options.action,
|
|
5617
|
+
size: "flexible",
|
|
5618
|
+
theme: options.theme,
|
|
5619
|
+
responseField: false,
|
|
5620
|
+
responseFieldName: options.response_field_name
|
|
5468
5621
|
},
|
|
5469
|
-
|
|
5470
|
-
|
|
5622
|
+
onExpire: () => {
|
|
5623
|
+
var _a;
|
|
5624
|
+
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5625
|
+
},
|
|
5626
|
+
onSuccess: (token) => {
|
|
5627
|
+
setValue(options.response_field_name, token);
|
|
5628
|
+
}
|
|
5629
|
+
}
|
|
5471
5630
|
);
|
|
5472
5631
|
}
|
|
5473
|
-
return
|
|
5632
|
+
return null;
|
|
5474
5633
|
};
|
|
5475
5634
|
|
|
5476
5635
|
// src/theme/default/assets/icons/personal.svg
|
|
5477
5636
|
import * as React34 from "react";
|
|
5478
|
-
import { jsx as
|
|
5637
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
5479
5638
|
var SvgPersonal = (props) => {
|
|
5480
5639
|
var _a, _b;
|
|
5481
|
-
return /* @__PURE__ */
|
|
5640
|
+
return /* @__PURE__ */ jsx100("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__ */ jsx100("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
|
|
5482
5641
|
};
|
|
5483
5642
|
var personal_default = SvgPersonal;
|
|
5484
5643
|
|
|
5485
5644
|
// src/theme/default/assets/icons/message.svg
|
|
5486
5645
|
import * as React35 from "react";
|
|
5487
|
-
import { jsx as
|
|
5646
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
5488
5647
|
var SvgMessage = (props) => {
|
|
5489
5648
|
var _a, _b;
|
|
5490
|
-
return /* @__PURE__ */
|
|
5649
|
+
return /* @__PURE__ */ jsx101("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__ */ jsx101("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
|
|
5491
5650
|
};
|
|
5492
5651
|
var message_default = SvgMessage;
|
|
5493
5652
|
|
|
5494
5653
|
// src/theme/default/assets/icons/phone.svg
|
|
5495
5654
|
import * as React36 from "react";
|
|
5496
|
-
import { jsx as
|
|
5655
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5497
5656
|
var SvgPhone = (props) => {
|
|
5498
5657
|
var _a, _b;
|
|
5499
|
-
return /* @__PURE__ */
|
|
5658
|
+
return /* @__PURE__ */ jsx102("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__ */ jsx102("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
|
|
5500
5659
|
};
|
|
5501
5660
|
var phone_default = SvgPhone;
|
|
5502
5661
|
|
|
5503
5662
|
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
5504
5663
|
import { useIntl as useIntl22 } from "react-intl";
|
|
5505
5664
|
import * as Switch from "@radix-ui/react-switch";
|
|
5506
|
-
import { jsx as
|
|
5665
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
5507
5666
|
var ScopeIcons = {
|
|
5508
5667
|
openid: personal_default,
|
|
5509
5668
|
offline_access: personal_default,
|
|
@@ -5518,7 +5677,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5518
5677
|
var _a;
|
|
5519
5678
|
const intl = useIntl22();
|
|
5520
5679
|
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
5521
|
-
return /* @__PURE__ */
|
|
5680
|
+
return /* @__PURE__ */ jsx103(
|
|
5522
5681
|
ListItem,
|
|
5523
5682
|
{
|
|
5524
5683
|
as: "label",
|
|
@@ -5533,7 +5692,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5533
5692
|
}),
|
|
5534
5693
|
className: "col-span-2",
|
|
5535
5694
|
"data-testid": "ory/screen/consent/scope-checkbox-label",
|
|
5536
|
-
children: /* @__PURE__ */
|
|
5695
|
+
children: /* @__PURE__ */ jsx103(
|
|
5537
5696
|
Switch.Root,
|
|
5538
5697
|
{
|
|
5539
5698
|
className: "relative w-7 h-4 bg-toggle-background-default rounded-identifier border-toggle-border-default border p-[3px] data-[state=checked]:bg-toggle-background-checked transition-all data-[state=checked]:border-toggle-border-checked",
|
|
@@ -5541,7 +5700,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5541
5700
|
value: attributes.value,
|
|
5542
5701
|
onCheckedChange,
|
|
5543
5702
|
defaultChecked: true,
|
|
5544
|
-
children: /* @__PURE__ */
|
|
5703
|
+
children: /* @__PURE__ */ jsx103(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
|
|
5545
5704
|
}
|
|
5546
5705
|
)
|
|
5547
5706
|
}
|
|
@@ -5603,9 +5762,13 @@ import {
|
|
|
5603
5762
|
instanceOfFlowError,
|
|
5604
5763
|
instanceOfGenericError
|
|
5605
5764
|
} from "@ory/client-fetch";
|
|
5765
|
+
import {
|
|
5766
|
+
OryConfigurationProvider as OryConfigurationProvider2,
|
|
5767
|
+
useOryConfiguration as useOryConfiguration8
|
|
5768
|
+
} from "@ory/elements-react";
|
|
5606
5769
|
import { useMemo as useMemo2 } from "react";
|
|
5607
5770
|
import { FormattedMessage } from "react-intl";
|
|
5608
|
-
import { jsx as
|
|
5771
|
+
import { jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5609
5772
|
function isOAuth2Error(error) {
|
|
5610
5773
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5611
5774
|
}
|
|
@@ -5658,47 +5821,47 @@ function Error2({
|
|
|
5658
5821
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5659
5822
|
const parsed = useStandardize(error);
|
|
5660
5823
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5661
|
-
return /* @__PURE__ */
|
|
5824
|
+
return /* @__PURE__ */ jsx104(OryConfigurationProvider2, { sdk: config.sdk, project: config.project, children: /* @__PURE__ */ jsx104(
|
|
5662
5825
|
IntlProvider,
|
|
5663
5826
|
{
|
|
5664
5827
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5665
5828
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5666
|
-
children: /* @__PURE__ */
|
|
5829
|
+
children: /* @__PURE__ */ jsx104(Card, { children: /* @__PURE__ */ jsxs47(
|
|
5667
5830
|
"div",
|
|
5668
5831
|
{
|
|
5669
5832
|
className: "flex flex-col gap-6 antialiased",
|
|
5670
5833
|
"data-testid": "ory/screen/error",
|
|
5671
5834
|
children: [
|
|
5672
5835
|
/* @__PURE__ */ jsxs47("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5673
|
-
/* @__PURE__ */
|
|
5836
|
+
/* @__PURE__ */ jsx104(ErrorLogo, {}),
|
|
5674
5837
|
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
|
|
5675
|
-
/* @__PURE__ */
|
|
5676
|
-
/* @__PURE__ */
|
|
5677
|
-
parsed.reason && /* @__PURE__ */
|
|
5838
|
+
/* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5839
|
+
/* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5840
|
+
parsed.reason && /* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5678
5841
|
] })
|
|
5679
5842
|
] }),
|
|
5680
|
-
/* @__PURE__ */
|
|
5843
|
+
/* @__PURE__ */ jsx104(Divider, {}),
|
|
5681
5844
|
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
|
|
5682
|
-
/* @__PURE__ */
|
|
5683
|
-
/* @__PURE__ */
|
|
5684
|
-
/* @__PURE__ */
|
|
5845
|
+
/* @__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" }) }),
|
|
5846
|
+
/* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.instructions" }) }),
|
|
5847
|
+
/* @__PURE__ */ jsx104("div", { children: session ? /* @__PURE__ */ jsx104(LoggedInActions, {}) : /* @__PURE__ */ jsx104(GoBackButton, {}) })
|
|
5685
5848
|
] }),
|
|
5686
|
-
/* @__PURE__ */
|
|
5849
|
+
/* @__PURE__ */ jsx104(Divider, {}),
|
|
5687
5850
|
/* @__PURE__ */ jsxs47("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5688
|
-
/* @__PURE__ */
|
|
5851
|
+
/* @__PURE__ */ jsx104("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.text" }) }),
|
|
5689
5852
|
parsed.id && /* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5690
5853
|
"ID: ",
|
|
5691
|
-
/* @__PURE__ */
|
|
5854
|
+
/* @__PURE__ */ jsx104("code", { children: parsed.id })
|
|
5692
5855
|
] }),
|
|
5693
5856
|
/* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5694
5857
|
"Time: ",
|
|
5695
|
-
/* @__PURE__ */
|
|
5858
|
+
/* @__PURE__ */ jsx104("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5696
5859
|
] }),
|
|
5697
5860
|
/* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5698
5861
|
"Message: ",
|
|
5699
|
-
/* @__PURE__ */
|
|
5862
|
+
/* @__PURE__ */ jsx104("code", { children: parsed.reason })
|
|
5700
5863
|
] }),
|
|
5701
|
-
/* @__PURE__ */
|
|
5864
|
+
/* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */ jsx104(
|
|
5702
5865
|
"button",
|
|
5703
5866
|
{
|
|
5704
5867
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5710,7 +5873,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5710
5873
|
`;
|
|
5711
5874
|
void navigator.clipboard.writeText(text);
|
|
5712
5875
|
},
|
|
5713
|
-
children: /* @__PURE__ */
|
|
5876
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.copy" })
|
|
5714
5877
|
}
|
|
5715
5878
|
) })
|
|
5716
5879
|
] })
|
|
@@ -5718,37 +5881,40 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5718
5881
|
}
|
|
5719
5882
|
) })
|
|
5720
5883
|
}
|
|
5721
|
-
);
|
|
5884
|
+
) });
|
|
5722
5885
|
}
|
|
5723
|
-
function LoggedInActions(
|
|
5886
|
+
function LoggedInActions() {
|
|
5887
|
+
const config = useOryConfiguration8();
|
|
5724
5888
|
const { logoutFlow } = useClientLogout(config);
|
|
5725
|
-
return /* @__PURE__ */
|
|
5889
|
+
return /* @__PURE__ */ jsx104(
|
|
5726
5890
|
"a",
|
|
5727
5891
|
{
|
|
5728
5892
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
5729
5893
|
className: "text-interface-foreground-default-primary underline",
|
|
5730
|
-
children: /* @__PURE__ */
|
|
5894
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "login.logout-button" })
|
|
5731
5895
|
}
|
|
5732
5896
|
);
|
|
5733
5897
|
}
|
|
5734
|
-
function GoBackButton(
|
|
5898
|
+
function GoBackButton() {
|
|
5899
|
+
const config = useOryConfiguration8();
|
|
5735
5900
|
if ("default_redirect_url" in config.project) {
|
|
5736
|
-
return /* @__PURE__ */
|
|
5901
|
+
return /* @__PURE__ */ jsx104(
|
|
5737
5902
|
"a",
|
|
5738
5903
|
{
|
|
5739
5904
|
className: "text-interface-foreground-default-primary underline",
|
|
5740
5905
|
href: config.project.default_redirect_url,
|
|
5741
|
-
children: /* @__PURE__ */
|
|
5906
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.action.go-back" })
|
|
5742
5907
|
}
|
|
5743
5908
|
);
|
|
5744
5909
|
}
|
|
5745
5910
|
return null;
|
|
5746
5911
|
}
|
|
5747
|
-
function ErrorLogo(
|
|
5748
|
-
|
|
5749
|
-
|
|
5912
|
+
function ErrorLogo() {
|
|
5913
|
+
const { project } = useOryConfiguration8();
|
|
5914
|
+
if (project.logo_light_url) {
|
|
5915
|
+
return /* @__PURE__ */ jsx104("img", { src: project.logo_light_url, width: 100, height: 36, alt: "Logo" });
|
|
5750
5916
|
}
|
|
5751
|
-
return /* @__PURE__ */
|
|
5917
|
+
return /* @__PURE__ */ jsx104("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: project.name });
|
|
5752
5918
|
}
|
|
5753
5919
|
|
|
5754
5920
|
// src/theme/default/flows/login.tsx
|
|
@@ -5757,7 +5923,7 @@ import {
|
|
|
5757
5923
|
OryProvider,
|
|
5758
5924
|
OryTwoStepCard as OryTwoStepCard2
|
|
5759
5925
|
} from "@ory/elements-react";
|
|
5760
|
-
import { jsx as
|
|
5926
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
5761
5927
|
function Login({
|
|
5762
5928
|
flow,
|
|
5763
5929
|
config,
|
|
@@ -5765,14 +5931,14 @@ function Login({
|
|
|
5765
5931
|
components: flowOverrideComponents
|
|
5766
5932
|
}) {
|
|
5767
5933
|
const components = getOryComponents(flowOverrideComponents);
|
|
5768
|
-
return /* @__PURE__ */
|
|
5934
|
+
return /* @__PURE__ */ jsx105(
|
|
5769
5935
|
OryProvider,
|
|
5770
5936
|
{
|
|
5771
5937
|
config,
|
|
5772
5938
|
flow,
|
|
5773
5939
|
flowType: FlowType18.Login,
|
|
5774
5940
|
components,
|
|
5775
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5941
|
+
children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard2, {})
|
|
5776
5942
|
}
|
|
5777
5943
|
);
|
|
5778
5944
|
}
|
|
@@ -5783,7 +5949,7 @@ import {
|
|
|
5783
5949
|
OryProvider as OryProvider2,
|
|
5784
5950
|
OryTwoStepCard as OryTwoStepCard3
|
|
5785
5951
|
} from "@ory/elements-react";
|
|
5786
|
-
import { jsx as
|
|
5952
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
5787
5953
|
function Recovery({
|
|
5788
5954
|
flow,
|
|
5789
5955
|
config,
|
|
@@ -5791,14 +5957,14 @@ function Recovery({
|
|
|
5791
5957
|
components: flowOverrideComponents
|
|
5792
5958
|
}) {
|
|
5793
5959
|
const components = getOryComponents(flowOverrideComponents);
|
|
5794
|
-
return /* @__PURE__ */
|
|
5960
|
+
return /* @__PURE__ */ jsx106(
|
|
5795
5961
|
OryProvider2,
|
|
5796
5962
|
{
|
|
5797
5963
|
config,
|
|
5798
5964
|
flow,
|
|
5799
5965
|
flowType: FlowType19.Recovery,
|
|
5800
5966
|
components,
|
|
5801
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5967
|
+
children: children != null ? children : /* @__PURE__ */ jsx106(OryTwoStepCard3, {})
|
|
5802
5968
|
}
|
|
5803
5969
|
);
|
|
5804
5970
|
}
|
|
@@ -5809,7 +5975,7 @@ import {
|
|
|
5809
5975
|
OryProvider as OryProvider3,
|
|
5810
5976
|
OryTwoStepCard as OryTwoStepCard4
|
|
5811
5977
|
} from "@ory/elements-react";
|
|
5812
|
-
import { jsx as
|
|
5978
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
5813
5979
|
function Registration({
|
|
5814
5980
|
flow,
|
|
5815
5981
|
children,
|
|
@@ -5817,14 +5983,14 @@ function Registration({
|
|
|
5817
5983
|
config
|
|
5818
5984
|
}) {
|
|
5819
5985
|
const components = getOryComponents(flowOverrideComponents);
|
|
5820
|
-
return /* @__PURE__ */
|
|
5986
|
+
return /* @__PURE__ */ jsx107(
|
|
5821
5987
|
OryProvider3,
|
|
5822
5988
|
{
|
|
5823
5989
|
config,
|
|
5824
5990
|
flow,
|
|
5825
5991
|
flowType: FlowType20.Registration,
|
|
5826
5992
|
components,
|
|
5827
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5993
|
+
children: children != null ? children : /* @__PURE__ */ jsx107(OryTwoStepCard4, {})
|
|
5828
5994
|
}
|
|
5829
5995
|
);
|
|
5830
5996
|
}
|
|
@@ -5836,7 +6002,7 @@ import {
|
|
|
5836
6002
|
OryProvider as OryProvider4,
|
|
5837
6003
|
OrySettingsCard
|
|
5838
6004
|
} from "@ory/elements-react";
|
|
5839
|
-
import { Fragment as Fragment13, jsx as
|
|
6005
|
+
import { Fragment as Fragment13, jsx as jsx108, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5840
6006
|
function Settings({
|
|
5841
6007
|
flow,
|
|
5842
6008
|
config,
|
|
@@ -5844,7 +6010,7 @@ function Settings({
|
|
|
5844
6010
|
components: flowOverrideComponents
|
|
5845
6011
|
}) {
|
|
5846
6012
|
const components = getOryComponents(flowOverrideComponents);
|
|
5847
|
-
return /* @__PURE__ */
|
|
6013
|
+
return /* @__PURE__ */ jsx108(
|
|
5848
6014
|
OryProvider4,
|
|
5849
6015
|
{
|
|
5850
6016
|
config,
|
|
@@ -5852,8 +6018,8 @@ function Settings({
|
|
|
5852
6018
|
flowType: FlowType21.Settings,
|
|
5853
6019
|
components,
|
|
5854
6020
|
children: children != null ? children : /* @__PURE__ */ jsxs48(Fragment13, { children: [
|
|
5855
|
-
/* @__PURE__ */
|
|
5856
|
-
/* @__PURE__ */
|
|
6021
|
+
/* @__PURE__ */ jsx108(HeadlessPageHeader, {}),
|
|
6022
|
+
/* @__PURE__ */ jsx108(OrySettingsCard, {})
|
|
5857
6023
|
] })
|
|
5858
6024
|
}
|
|
5859
6025
|
);
|
|
@@ -5865,7 +6031,7 @@ import {
|
|
|
5865
6031
|
OryProvider as OryProvider5,
|
|
5866
6032
|
OryTwoStepCard as OryTwoStepCard5
|
|
5867
6033
|
} from "@ory/elements-react";
|
|
5868
|
-
import { jsx as
|
|
6034
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
5869
6035
|
function Verification({
|
|
5870
6036
|
flow,
|
|
5871
6037
|
config,
|
|
@@ -5873,14 +6039,14 @@ function Verification({
|
|
|
5873
6039
|
components: flowOverrideComponents
|
|
5874
6040
|
}) {
|
|
5875
6041
|
const components = getOryComponents(flowOverrideComponents);
|
|
5876
|
-
return /* @__PURE__ */
|
|
6042
|
+
return /* @__PURE__ */ jsx109(
|
|
5877
6043
|
OryProvider5,
|
|
5878
6044
|
{
|
|
5879
6045
|
config,
|
|
5880
6046
|
flow,
|
|
5881
6047
|
flowType: FlowType22.Verification,
|
|
5882
6048
|
components,
|
|
5883
|
-
children: children != null ? children : /* @__PURE__ */
|
|
6049
|
+
children: children != null ? children : /* @__PURE__ */ jsx109(OryTwoStepCard5, {})
|
|
5884
6050
|
}
|
|
5885
6051
|
);
|
|
5886
6052
|
}
|
|
@@ -6033,7 +6199,7 @@ function challengeNode(challenge) {
|
|
|
6033
6199
|
}
|
|
6034
6200
|
|
|
6035
6201
|
// src/theme/default/flows/consent.tsx
|
|
6036
|
-
import { jsx as
|
|
6202
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
6037
6203
|
function Consent({
|
|
6038
6204
|
consentChallenge,
|
|
6039
6205
|
session,
|
|
@@ -6050,14 +6216,14 @@ function Consent({
|
|
|
6050
6216
|
formActionUrl,
|
|
6051
6217
|
session
|
|
6052
6218
|
);
|
|
6053
|
-
return /* @__PURE__ */
|
|
6219
|
+
return /* @__PURE__ */ jsx110(
|
|
6054
6220
|
OryProvider6,
|
|
6055
6221
|
{
|
|
6056
6222
|
config,
|
|
6057
6223
|
flow,
|
|
6058
6224
|
flowType: FlowType23.OAuth2Consent,
|
|
6059
6225
|
components,
|
|
6060
|
-
children: children != null ? children : /* @__PURE__ */
|
|
6226
|
+
children: children != null ? children : /* @__PURE__ */ jsx110(OryConsentCard2, {})
|
|
6061
6227
|
}
|
|
6062
6228
|
);
|
|
6063
6229
|
}
|