@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
|
@@ -92,46 +92,12 @@ function DefaultCardContent({ children }) {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
// src/theme/default/components/card/footer.tsx
|
|
95
|
-
var
|
|
95
|
+
var import_client_fetch29 = require("@ory/client-fetch");
|
|
96
96
|
var import_elements_react3 = require("@ory/elements-react");
|
|
97
97
|
var import_react_intl10 = require("react-intl");
|
|
98
98
|
|
|
99
|
-
// src/
|
|
100
|
-
|
|
101
|
-
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
102
|
-
}
|
|
103
|
-
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
104
|
-
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
105
|
-
const qs = new URLSearchParams();
|
|
106
|
-
if (flow.oauth2_login_challenge) {
|
|
107
|
-
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
108
|
-
}
|
|
109
|
-
if (flow.return_to) {
|
|
110
|
-
qs.set("return_to", flow.return_to);
|
|
111
|
-
} else if (typeof window !== "undefined") {
|
|
112
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
113
|
-
if (searchParams.has("return_to")) {
|
|
114
|
-
qs.set("return_to", searchParams.get("return_to") || "");
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
if (qs.toString().length === 0) {
|
|
118
|
-
return result;
|
|
119
|
-
}
|
|
120
|
-
return result + "?" + qs.toString();
|
|
121
|
-
}
|
|
122
|
-
function appendReturnTo(url, returnTo) {
|
|
123
|
-
if (!returnTo) {
|
|
124
|
-
return url;
|
|
125
|
-
}
|
|
126
|
-
const urlObj = new URL(url);
|
|
127
|
-
urlObj.searchParams.set("return_to", returnTo);
|
|
128
|
-
return urlObj.toString();
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/util/ui/index.ts
|
|
132
|
-
var import_client_fetch2 = require("@ory/client-fetch");
|
|
133
|
-
var import_client_fetch3 = require("@ory/client-fetch");
|
|
134
|
-
var import_react2 = require("react");
|
|
99
|
+
// src/components/card/two-step/state-select-method.tsx
|
|
100
|
+
var import_client_fetch28 = require("@ory/client-fetch");
|
|
135
101
|
|
|
136
102
|
// src/context/component.tsx
|
|
137
103
|
var import_client_fetch = require("@ory/client-fetch");
|
|
@@ -155,7 +121,25 @@ var defaultGroupOrder = [
|
|
|
155
121
|
import_client_fetch.UiNodeGroupEnum.Totp
|
|
156
122
|
];
|
|
157
123
|
|
|
124
|
+
// src/context/flow-context.tsx
|
|
125
|
+
var import_react4 = require("react");
|
|
126
|
+
|
|
127
|
+
// src/context/form-state.ts
|
|
128
|
+
var import_client_fetch5 = require("@ory/client-fetch");
|
|
129
|
+
var import_react3 = require("react");
|
|
130
|
+
|
|
131
|
+
// src/components/card/two-step/utils.ts
|
|
132
|
+
var import_client_fetch4 = require("@ory/client-fetch");
|
|
133
|
+
|
|
134
|
+
// src/theme/default/utils/form.ts
|
|
135
|
+
function isGroupImmediateSubmit(group) {
|
|
136
|
+
return group === "code";
|
|
137
|
+
}
|
|
138
|
+
|
|
158
139
|
// src/util/ui/index.ts
|
|
140
|
+
var import_client_fetch2 = require("@ory/client-fetch");
|
|
141
|
+
var import_client_fetch3 = require("@ory/client-fetch");
|
|
142
|
+
var import_react2 = require("react");
|
|
159
143
|
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
160
144
|
var _a;
|
|
161
145
|
const groups = {};
|
|
@@ -218,160 +202,214 @@ function useNodeGroupsWithVisibleNodes(nodes) {
|
|
|
218
202
|
}, [nodes]);
|
|
219
203
|
}
|
|
220
204
|
|
|
221
|
-
// src/util/nodes.ts
|
|
222
|
-
function findScreenSelectionButton(nodes) {
|
|
223
|
-
return nodes.find(
|
|
224
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
// src/components/card/two-step/state-select-method.tsx
|
|
229
|
-
var import_client_fetch26 = require("@ory/client-fetch");
|
|
230
|
-
|
|
231
205
|
// src/context/flow-context.tsx
|
|
232
|
-
var
|
|
206
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
207
|
+
var OryFlowContext = (0, import_react4.createContext)(null);
|
|
233
208
|
|
|
234
|
-
// src/context/
|
|
235
|
-
var
|
|
236
|
-
var import_react3 = require("react");
|
|
209
|
+
// src/context/config.tsx
|
|
210
|
+
var import_react5 = require("react");
|
|
237
211
|
|
|
238
|
-
// src/
|
|
239
|
-
|
|
212
|
+
// src/client/config.ts
|
|
213
|
+
function isProduction() {
|
|
214
|
+
var _a, _b;
|
|
215
|
+
return ["production", "prod"].indexOf(
|
|
216
|
+
(_b = (_a = process.env.VERCEL_ENV) != null ? _a : process.env.NODE_ENV) != null ? _b : ""
|
|
217
|
+
) > -1;
|
|
218
|
+
}
|
|
240
219
|
|
|
241
|
-
// src/
|
|
242
|
-
|
|
243
|
-
|
|
220
|
+
// src/util/client.ts
|
|
221
|
+
var import_client_fetch6 = require("@ory/client-fetch");
|
|
222
|
+
function frontendClient(sdkUrl, opts = {}) {
|
|
223
|
+
const config = new import_client_fetch6.Configuration({
|
|
224
|
+
...opts,
|
|
225
|
+
basePath: sdkUrl,
|
|
226
|
+
credentials: "include",
|
|
227
|
+
headers: {
|
|
228
|
+
Accept: "application/json",
|
|
229
|
+
...opts.headers
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
return new import_client_fetch6.FrontendApi(config);
|
|
244
233
|
}
|
|
245
234
|
|
|
246
|
-
// src/context/
|
|
247
|
-
var
|
|
248
|
-
var
|
|
235
|
+
// src/context/config.tsx
|
|
236
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
237
|
+
var defaultProject = {
|
|
238
|
+
name: "Ory",
|
|
239
|
+
registration_enabled: true,
|
|
240
|
+
verification_enabled: true,
|
|
241
|
+
recovery_enabled: true,
|
|
242
|
+
recovery_ui_url: "/ui/recovery",
|
|
243
|
+
registration_ui_url: "/ui/registration",
|
|
244
|
+
verification_ui_url: "/ui/verification",
|
|
245
|
+
login_ui_url: "/ui/login",
|
|
246
|
+
settings_ui_url: "/ui/settings",
|
|
247
|
+
default_redirect_url: "/ui/welcome",
|
|
248
|
+
error_ui_url: "/ui/error",
|
|
249
|
+
default_locale: "en",
|
|
250
|
+
locale_behavior: "force_default"
|
|
251
|
+
};
|
|
252
|
+
var OryConfigurationContext = (0, import_react5.createContext)({
|
|
253
|
+
sdk: computeSdkConfig({}),
|
|
254
|
+
project: defaultProject
|
|
255
|
+
});
|
|
256
|
+
function computeSdkConfig(config) {
|
|
257
|
+
if ((config == null ? void 0 : config.url) && typeof config.url === "string") {
|
|
258
|
+
console.debug("Using sdk url from config");
|
|
259
|
+
return {
|
|
260
|
+
url: config.url.replace(/\/$/, ""),
|
|
261
|
+
options: config.options || {}
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
return {
|
|
265
|
+
url: getSDKUrl(),
|
|
266
|
+
options: (config == null ? void 0 : config.options) || {}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
function getSDKUrl() {
|
|
270
|
+
var _a;
|
|
271
|
+
if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
272
|
+
if (isProduction()) {
|
|
273
|
+
const sdkUrl = (_a = process.env["NEXT_PUBLIC_ORY_SDK_URL"]) != null ? _a : process.env["ORY_SDK_URL"];
|
|
274
|
+
if (!sdkUrl) {
|
|
275
|
+
throw new Error(
|
|
276
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL in production environments."
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
return sdkUrl.replace(/\/$/, "");
|
|
280
|
+
} else {
|
|
281
|
+
if (process.env["__NEXT_PRIVATE_ORIGIN"]) {
|
|
282
|
+
return process.env["__NEXT_PRIVATE_ORIGIN"].replace(/\/$/, "");
|
|
283
|
+
} else if (process.env["VERCEL_URL"]) {
|
|
284
|
+
return `https://${process.env["VERCEL_URL"]}`.replace(/\/$/, "");
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
if (typeof window !== "undefined") {
|
|
289
|
+
return window.location.origin;
|
|
290
|
+
}
|
|
291
|
+
throw new Error(
|
|
292
|
+
"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."
|
|
293
|
+
);
|
|
294
|
+
}
|
|
249
295
|
|
|
250
296
|
// src/context/intl-context.tsx
|
|
251
297
|
var import_react_intl8 = require("react-intl");
|
|
252
298
|
|
|
253
299
|
// src/components/form/form.tsx
|
|
254
|
-
var
|
|
300
|
+
var import_client_fetch16 = require("@ory/client-fetch");
|
|
255
301
|
var import_react_hook_form2 = require("react-hook-form");
|
|
256
302
|
var import_react_intl = require("react-intl");
|
|
257
303
|
|
|
258
304
|
// src/components/form/useOryFormSubmit.ts
|
|
259
|
-
var
|
|
305
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
260
306
|
var import_react_hook_form = require("react-hook-form");
|
|
261
307
|
|
|
262
308
|
// src/util/onSubmitLogin.ts
|
|
309
|
+
var import_client_fetch9 = require("@ory/client-fetch");
|
|
310
|
+
|
|
311
|
+
// src/util/sdk-helpers/error.ts
|
|
263
312
|
var import_client_fetch7 = require("@ory/client-fetch");
|
|
264
313
|
|
|
265
|
-
// src/util/
|
|
266
|
-
var
|
|
267
|
-
function frontendClient(sdkUrl, opts = {}) {
|
|
268
|
-
const config = new import_client_fetch6.Configuration({
|
|
269
|
-
...opts,
|
|
270
|
-
basePath: sdkUrl,
|
|
271
|
-
headers: {
|
|
272
|
-
Accept: "application/json",
|
|
273
|
-
...opts.headers
|
|
274
|
-
}
|
|
275
|
-
});
|
|
276
|
-
return new import_client_fetch6.FrontendApi(config);
|
|
277
|
-
}
|
|
314
|
+
// src/util/sdk-helpers/utils.ts
|
|
315
|
+
var import_client_fetch8 = require("@ory/client-fetch");
|
|
278
316
|
|
|
279
317
|
// src/util/onSubmitRecovery.ts
|
|
280
|
-
var
|
|
318
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
281
319
|
|
|
282
320
|
// src/util/onSubmitRegistration.ts
|
|
283
|
-
var
|
|
321
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
284
322
|
|
|
285
323
|
// src/util/onSubmitSettings.ts
|
|
286
|
-
var
|
|
324
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
287
325
|
|
|
288
326
|
// src/util/onSubmitVerification.ts
|
|
289
|
-
var
|
|
327
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
290
328
|
|
|
291
329
|
// src/components/form/form-helpers.ts
|
|
292
|
-
var
|
|
330
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
293
331
|
|
|
294
332
|
// src/components/form/form.tsx
|
|
295
|
-
var
|
|
333
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
296
334
|
|
|
297
335
|
// src/components/form/groups.tsx
|
|
298
|
-
var
|
|
336
|
+
var import_client_fetch19 = require("@ory/client-fetch");
|
|
299
337
|
|
|
300
338
|
// src/components/form/nodes/input.tsx
|
|
301
|
-
var
|
|
302
|
-
var
|
|
339
|
+
var import_client_fetch17 = require("@ory/client-fetch");
|
|
340
|
+
var import_react6 = require("react");
|
|
303
341
|
var import_react_hook_form3 = require("react-hook-form");
|
|
304
|
-
var
|
|
342
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
305
343
|
|
|
306
344
|
// src/components/form/nodes/node.tsx
|
|
307
|
-
var
|
|
308
|
-
var
|
|
345
|
+
var import_client_fetch18 = require("@ory/client-fetch");
|
|
346
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
309
347
|
|
|
310
348
|
// src/components/form/groups.tsx
|
|
311
|
-
var
|
|
349
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
312
350
|
|
|
313
351
|
// src/components/form/messages.tsx
|
|
314
|
-
var
|
|
352
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
315
353
|
|
|
316
354
|
// src/components/form/social.tsx
|
|
317
|
-
var
|
|
355
|
+
var import_client_fetch22 = require("@ory/client-fetch");
|
|
318
356
|
var import_react_hook_form5 = require("react-hook-form");
|
|
319
357
|
|
|
320
358
|
// src/components/form/form-provider.tsx
|
|
321
|
-
var
|
|
359
|
+
var import_client_fetch21 = require("@ory/client-fetch");
|
|
322
360
|
var import_react_hook_form4 = require("react-hook-form");
|
|
323
361
|
|
|
324
362
|
// src/components/form/form-resolver.ts
|
|
325
|
-
var
|
|
363
|
+
var import_client_fetch20 = require("@ory/client-fetch");
|
|
326
364
|
|
|
327
365
|
// src/components/form/form-provider.tsx
|
|
328
|
-
var
|
|
366
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
329
367
|
|
|
330
368
|
// src/components/form/social.tsx
|
|
331
|
-
var
|
|
369
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
332
370
|
|
|
333
371
|
// src/components/form/section.tsx
|
|
334
372
|
var import_react_hook_form6 = require("react-hook-form");
|
|
335
|
-
var
|
|
373
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
336
374
|
|
|
337
375
|
// src/components/generic/divider.tsx
|
|
338
|
-
var
|
|
339
|
-
var
|
|
376
|
+
var import_client_fetch23 = require("@ory/client-fetch");
|
|
377
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
340
378
|
|
|
341
379
|
// src/components/generic/page-header.tsx
|
|
342
|
-
var
|
|
380
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
343
381
|
|
|
344
382
|
// src/components/settings/settings-card.tsx
|
|
345
|
-
var
|
|
383
|
+
var import_client_fetch24 = require("@ory/client-fetch");
|
|
346
384
|
var import_react_intl7 = require("react-intl");
|
|
347
385
|
|
|
348
386
|
// src/components/settings/oidc-settings.tsx
|
|
349
387
|
var import_react_intl2 = require("react-intl");
|
|
350
388
|
var import_react_hook_form7 = require("react-hook-form");
|
|
351
|
-
var
|
|
389
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
352
390
|
|
|
353
391
|
// src/components/settings/passkey-settings.tsx
|
|
354
392
|
var import_react_hook_form8 = require("react-hook-form");
|
|
355
393
|
var import_react_intl3 = require("react-intl");
|
|
356
|
-
var
|
|
394
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
357
395
|
|
|
358
396
|
// src/components/settings/recovery-codes-settings.tsx
|
|
359
397
|
var import_react_intl4 = require("react-intl");
|
|
360
398
|
var import_react_hook_form9 = require("react-hook-form");
|
|
361
|
-
var
|
|
399
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
362
400
|
|
|
363
401
|
// src/components/settings/totp-settings.tsx
|
|
364
402
|
var import_react_hook_form10 = require("react-hook-form");
|
|
365
403
|
var import_react_intl5 = require("react-intl");
|
|
366
|
-
var
|
|
404
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
367
405
|
|
|
368
406
|
// src/components/settings/webauthn-settings.tsx
|
|
369
407
|
var import_react_hook_form11 = require("react-hook-form");
|
|
370
408
|
var import_react_intl6 = require("react-intl");
|
|
371
|
-
var
|
|
409
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
372
410
|
|
|
373
411
|
// src/components/settings/settings-card.tsx
|
|
374
|
-
var
|
|
412
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
375
413
|
|
|
376
414
|
// src/util/i18n/index.ts
|
|
377
415
|
var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
|
|
@@ -663,9 +701,11 @@ var en_default = {
|
|
|
663
701
|
"card.header.parts.oidc": "a social provider",
|
|
664
702
|
"card.header.parts.password.registration": "your {identifierLabel} and a password",
|
|
665
703
|
"card.header.parts.password.login": "your {identifierLabel} and password",
|
|
666
|
-
"card.header.parts.code": "a code sent to
|
|
704
|
+
"card.header.parts.code": "a code sent to you",
|
|
667
705
|
"card.header.parts.passkey": "a Passkey",
|
|
668
706
|
"card.header.parts.webauthn": "a security key",
|
|
707
|
+
"card.header.parts.totp": "your authenticator app",
|
|
708
|
+
"card.header.parts.lookup_secret": "a backup recovery code",
|
|
669
709
|
"card.header.parts.identifier-first": "your {identifierLabel}",
|
|
670
710
|
"card.header.description.login": "Sign in with {identifierLabel}",
|
|
671
711
|
"card.header.description.registration": "Sign up with {identifierLabel}",
|
|
@@ -913,13 +953,15 @@ var de_default = {
|
|
|
913
953
|
"identities.messages.4010009": "Die Authentifizierungsmethode stimmt nicht mit der vorherigen Authentifizierungsmethode \xFCberein. Bitte versuchen Sie es erneut.",
|
|
914
954
|
"identities.messages.4010010": "Die eingegebene Adresse stimmt nicht mit der Adresse \xFCberein, die Sie bei der Registrierung angegeben haben. Bitte versuchen Sie es erneut.",
|
|
915
955
|
"input.placeholder": "{placeholder} eingeben",
|
|
916
|
-
"card.header.parts.code": "
|
|
956
|
+
"card.header.parts.code": "ein an Sie gesendeter Code",
|
|
917
957
|
"card.header.parts.identifier-first": "Ihr {identifierLabel}",
|
|
918
958
|
"card.header.parts.oidc": "ein sozialer Anbieter",
|
|
919
959
|
"card.header.parts.passkey": "ein Passkey",
|
|
920
960
|
"card.header.parts.password.login": "Ihrer {identifierLabel} und Ihrem Passwort",
|
|
921
961
|
"card.header.parts.password.registration": "Ihrer {identifierLabel} und einem Passwort",
|
|
922
962
|
"card.header.parts.webauthn": "ein Sicherheitsschl\xFCssel",
|
|
963
|
+
"card.header.parts.totp": "deine Authentifikator-App",
|
|
964
|
+
"card.header.parts.lookup_secret": "ein Backup-Wiederherstellungscode",
|
|
923
965
|
"recovery.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um einen einmaligen Zugangscode zu erhalten",
|
|
924
966
|
"verification.subtitle": "Geben Sie die mit Ihrem Konto verkn\xFCpfte E-Mail-Adresse ein, um es zu best\xE4tigen",
|
|
925
967
|
"card.header.description.login": "Melden Sie sich mit {identifierLabel} an",
|
|
@@ -1258,6 +1300,8 @@ var es_default = {
|
|
|
1258
1300
|
"card.header.parts.code": "un c\xF3digo enviado a tu correo electr\xF3nico",
|
|
1259
1301
|
"card.header.parts.passkey": "una clave de acceso",
|
|
1260
1302
|
"card.header.parts.webauthn": "una clave de seguridad",
|
|
1303
|
+
"card.header.parts.totp": "su aplicaci\xF3n de autenticaci\xF3n",
|
|
1304
|
+
"card.header.parts.lookup_secret": "un c\xF3digo de recuperaci\xF3n de copia de seguridad",
|
|
1261
1305
|
"card.header.parts.identifier-first": "tu {identifierLabel}",
|
|
1262
1306
|
"card.header.description.login": "Iniciar sesi\xF3n con {identifierLabel}",
|
|
1263
1307
|
"card.header.description.registration": "Registrarse con {identifierLabel}",
|
|
@@ -1535,10 +1579,12 @@ var fr_default = {
|
|
|
1535
1579
|
"card.header.parts.oidc": "un fournisseur de r\xE9seaux sociaux",
|
|
1536
1580
|
"card.header.parts.password.registration": "votre {identifierLabel} et un mot de passe",
|
|
1537
1581
|
"card.header.parts.password.login": "votre {identifierLabel} et votre mot de passe",
|
|
1538
|
-
"card.header.parts.code": "un code envoy\xE9 \xE0 votre adresse e-mail",
|
|
1539
1582
|
"card.header.parts.passkey": "une cl\xE9 d'acc\xE8s",
|
|
1540
1583
|
"card.header.parts.webauthn": "une cl\xE9 de s\xE9curit\xE9",
|
|
1541
1584
|
"card.header.parts.identifier-first": "votre {identifierLabel}",
|
|
1585
|
+
"card.header.parts.code": "un code qui vous a \xE9t\xE9 envoy\xE9",
|
|
1586
|
+
"card.header.parts.totp": "votre application d'authentification",
|
|
1587
|
+
"card.header.parts.lookup_secret": "un code de r\xE9cup\xE9ration de secours",
|
|
1542
1588
|
"card.header.description.login": "Se connecter avec {identifierLabel}",
|
|
1543
1589
|
"card.header.description.registration": "S'inscrire avec {identifierLabel}",
|
|
1544
1590
|
"misc.or": "ou",
|
|
@@ -1781,7 +1827,9 @@ var nl_default = {
|
|
|
1781
1827
|
"input.placeholder": "",
|
|
1782
1828
|
"card.header.description.login": "",
|
|
1783
1829
|
"card.header.description.registration": "",
|
|
1784
|
-
"card.header.parts.code": "",
|
|
1830
|
+
"card.header.parts.code": "een code die naar je is verzonden",
|
|
1831
|
+
"card.header.parts.totp": "je authenticator-app",
|
|
1832
|
+
"card.header.parts.lookup_secret": "een backup herstelcode",
|
|
1785
1833
|
"card.header.parts.identifier-first": "",
|
|
1786
1834
|
"card.header.parts.oidc": "",
|
|
1787
1835
|
"card.header.parts.passkey": "",
|
|
@@ -2066,13 +2114,15 @@ var pl_default = {
|
|
|
2066
2114
|
"input.placeholder": "",
|
|
2067
2115
|
"card.header.description.login": "",
|
|
2068
2116
|
"card.header.description.registration": "",
|
|
2069
|
-
"card.header.parts.code": "",
|
|
2070
2117
|
"card.header.parts.identifier-first": "",
|
|
2071
2118
|
"card.header.parts.oidc": "",
|
|
2072
2119
|
"card.header.parts.passkey": "",
|
|
2073
2120
|
"card.header.parts.password.login": "",
|
|
2074
2121
|
"card.header.parts.password.registration": "",
|
|
2075
2122
|
"card.header.parts.webauthn": "",
|
|
2123
|
+
"card.header.parts.code": "kod wys\u0142any do Ciebie",
|
|
2124
|
+
"card.header.parts.totp": "Twoja aplikacja uwierzytelniaj\u0105ca",
|
|
2125
|
+
"card.header.parts.lookup_secret": "kod odzyskiwania kopii zapasowej",
|
|
2076
2126
|
"forms.label.forgot-password": "",
|
|
2077
2127
|
"login.subtitle": "",
|
|
2078
2128
|
"login.subtitle-refresh": "",
|
|
@@ -2351,7 +2401,9 @@ var pt_default = {
|
|
|
2351
2401
|
"input.placeholder": "",
|
|
2352
2402
|
"card.header.description.login": "",
|
|
2353
2403
|
"card.header.description.registration": "",
|
|
2354
|
-
"card.header.parts.code": "",
|
|
2404
|
+
"card.header.parts.code": "um c\xF3digo enviado para voc\xEA",
|
|
2405
|
+
"card.header.parts.totp": "seu aplicativo autenticador",
|
|
2406
|
+
"card.header.parts.lookup_secret": "um c\xF3digo de recupera\xE7\xE3o de backup",
|
|
2355
2407
|
"card.header.parts.identifier-first": "",
|
|
2356
2408
|
"card.header.parts.oidc": "",
|
|
2357
2409
|
"card.header.parts.passkey": "",
|
|
@@ -2636,7 +2688,9 @@ var sv_default = {
|
|
|
2636
2688
|
"input.placeholder": "Ange din {placeholder}",
|
|
2637
2689
|
"card.header.description.login": "Logga in med {identifierLabel}",
|
|
2638
2690
|
"card.header.description.registration": "Registrera dig med {identifierLabel}",
|
|
2639
|
-
"card.header.parts.code": "en kod skickad till
|
|
2691
|
+
"card.header.parts.code": "en kod skickad till dig",
|
|
2692
|
+
"card.header.parts.totp": "din autentiseringsapp",
|
|
2693
|
+
"card.header.parts.lookup_secret": "en s\xE4kerhetskopieringskod",
|
|
2640
2694
|
"card.header.parts.identifier-first": "din {identifierLabel}",
|
|
2641
2695
|
"card.header.parts.oidc": "en social leverant\xF6r",
|
|
2642
2696
|
"card.header.parts.passkey": "en Passkey",
|
|
@@ -2722,7 +2776,7 @@ var OryLocales = {
|
|
|
2722
2776
|
};
|
|
2723
2777
|
|
|
2724
2778
|
// src/context/intl-context.tsx
|
|
2725
|
-
var
|
|
2779
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2726
2780
|
function mergeTranslations(customTranslations) {
|
|
2727
2781
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
2728
2782
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -2735,12 +2789,12 @@ var IntlProvider = ({
|
|
|
2735
2789
|
customTranslations
|
|
2736
2790
|
}) => {
|
|
2737
2791
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
2738
|
-
return /* @__PURE__ */ (0,
|
|
2792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2739
2793
|
import_react_intl8.IntlProvider,
|
|
2740
2794
|
{
|
|
2741
2795
|
onWarn: () => ({}),
|
|
2742
2796
|
defaultRichTextElements: {
|
|
2743
|
-
del: (chunks) => /* @__PURE__ */ (0,
|
|
2797
|
+
del: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("del", { children: chunks })
|
|
2744
2798
|
},
|
|
2745
2799
|
locale,
|
|
2746
2800
|
messages: messages[locale],
|
|
@@ -2751,35 +2805,35 @@ var IntlProvider = ({
|
|
|
2751
2805
|
};
|
|
2752
2806
|
|
|
2753
2807
|
// src/context/provider.tsx
|
|
2754
|
-
var
|
|
2808
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2755
2809
|
|
|
2756
2810
|
// src/components/card/header.tsx
|
|
2757
|
-
var
|
|
2811
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2758
2812
|
|
|
2759
2813
|
// src/components/card/card.tsx
|
|
2760
|
-
var
|
|
2814
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2761
2815
|
|
|
2762
2816
|
// src/components/card/footer.tsx
|
|
2763
|
-
var
|
|
2817
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2764
2818
|
|
|
2765
2819
|
// src/components/card/content.tsx
|
|
2766
|
-
var
|
|
2820
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2767
2821
|
|
|
2768
2822
|
// src/components/card/two-step/state-method-active.tsx
|
|
2769
|
-
var
|
|
2770
|
-
var
|
|
2823
|
+
var import_client_fetch25 = require("@ory/client-fetch");
|
|
2824
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2771
2825
|
|
|
2772
2826
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2773
|
-
var
|
|
2774
|
-
var
|
|
2827
|
+
var import_client_fetch26 = require("@ory/client-fetch");
|
|
2828
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2775
2829
|
|
|
2776
2830
|
// src/components/card/card-two-step.tsx
|
|
2777
2831
|
var import_elements_react = require("@ory/elements-react");
|
|
2778
|
-
var
|
|
2832
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2779
2833
|
|
|
2780
2834
|
// src/components/card/card-consent.tsx
|
|
2781
|
-
var
|
|
2782
|
-
var
|
|
2835
|
+
var import_client_fetch27 = require("@ory/client-fetch");
|
|
2836
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2783
2837
|
|
|
2784
2838
|
// src/components/card/two-step/state-select-method.tsx
|
|
2785
2839
|
var import_react_intl9 = require("react-intl");
|
|
@@ -2787,34 +2841,41 @@ var import_react_intl9 = require("react-intl");
|
|
|
2787
2841
|
// src/components/card/two-step/list-methods.tsx
|
|
2788
2842
|
var import_elements_react2 = require("@ory/elements-react");
|
|
2789
2843
|
var import_react_hook_form12 = require("react-hook-form");
|
|
2790
|
-
var
|
|
2844
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2791
2845
|
|
|
2792
2846
|
// src/components/card/two-step/state-select-method.tsx
|
|
2793
|
-
var
|
|
2847
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2794
2848
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2795
2849
|
return Object.fromEntries(
|
|
2796
|
-
Object.values(
|
|
2850
|
+
Object.values(import_client_fetch28.UiNodeGroupEnum).filter((group) => {
|
|
2797
2851
|
var _a;
|
|
2798
2852
|
return (_a = visibleGroups[group]) == null ? void 0 : _a.length;
|
|
2799
2853
|
}).filter(
|
|
2800
2854
|
(group) => ![
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2855
|
+
import_client_fetch28.UiNodeGroupEnum.Oidc,
|
|
2856
|
+
import_client_fetch28.UiNodeGroupEnum.Saml,
|
|
2857
|
+
import_client_fetch28.UiNodeGroupEnum.Default,
|
|
2858
|
+
import_client_fetch28.UiNodeGroupEnum.IdentifierFirst,
|
|
2859
|
+
import_client_fetch28.UiNodeGroupEnum.Profile,
|
|
2860
|
+
import_client_fetch28.UiNodeGroupEnum.Captcha
|
|
2807
2861
|
].includes(group)
|
|
2808
2862
|
).map((g) => [g, {}])
|
|
2809
2863
|
);
|
|
2810
2864
|
}
|
|
2811
2865
|
|
|
2866
|
+
// src/util/nodes.ts
|
|
2867
|
+
function findScreenSelectionButton(nodes) {
|
|
2868
|
+
return nodes.find(
|
|
2869
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
2870
|
+
);
|
|
2871
|
+
}
|
|
2872
|
+
|
|
2812
2873
|
// src/theme/default/utils/logout.ts
|
|
2813
|
-
var
|
|
2874
|
+
var import_react7 = require("react");
|
|
2814
2875
|
function useClientLogout(config) {
|
|
2815
|
-
const [logoutFlow, setLogoutFlow] = (0,
|
|
2816
|
-
const [isLoading, setIsLoading] = (0,
|
|
2817
|
-
const fetchLogoutFlow = (0,
|
|
2876
|
+
const [logoutFlow, setLogoutFlow] = (0, import_react7.useState)();
|
|
2877
|
+
const [isLoading, setIsLoading] = (0, import_react7.useState)(true);
|
|
2878
|
+
const fetchLogoutFlow = (0, import_react7.useCallback)(async () => {
|
|
2818
2879
|
try {
|
|
2819
2880
|
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow().catch((err) => {
|
|
2820
2881
|
var _a;
|
|
@@ -2828,39 +2889,88 @@ function useClientLogout(config) {
|
|
|
2828
2889
|
setIsLoading(false);
|
|
2829
2890
|
}
|
|
2830
2891
|
}, [config.sdk.url]);
|
|
2831
|
-
(0,
|
|
2892
|
+
(0, import_react7.useEffect)(() => {
|
|
2832
2893
|
void fetchLogoutFlow();
|
|
2833
2894
|
}, [fetchLogoutFlow]);
|
|
2834
2895
|
return { logoutFlow, didLoad: !isLoading };
|
|
2835
2896
|
}
|
|
2836
2897
|
|
|
2837
|
-
// src/theme/default/
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
const oryFlow = (0, import_elements_react3.useOryFlow)();
|
|
2841
|
-
switch (oryFlow.flowType) {
|
|
2842
|
-
case import_client_fetch27.FlowType.Login:
|
|
2843
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoginCardFooter, {});
|
|
2844
|
-
case import_client_fetch27.FlowType.Registration:
|
|
2845
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RegistrationCardFooter, {});
|
|
2846
|
-
case import_client_fetch27.FlowType.Recovery:
|
|
2847
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RecoveryCardFooter, {});
|
|
2848
|
-
case import_client_fetch27.FlowType.Verification:
|
|
2849
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerificationCardFooter, {});
|
|
2850
|
-
case import_client_fetch27.FlowType.OAuth2Consent:
|
|
2851
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2852
|
-
default:
|
|
2853
|
-
return null;
|
|
2854
|
-
}
|
|
2898
|
+
// src/theme/default/utils/url.ts
|
|
2899
|
+
function restartFlowUrl(flow, fallback) {
|
|
2900
|
+
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
2855
2901
|
}
|
|
2856
|
-
function
|
|
2857
|
-
const
|
|
2858
|
-
const
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
return null;
|
|
2902
|
+
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
2903
|
+
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
2904
|
+
const qs = new URLSearchParams();
|
|
2905
|
+
if (flow.oauth2_login_challenge) {
|
|
2906
|
+
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
2862
2907
|
}
|
|
2863
|
-
|
|
2908
|
+
if (flow.return_to) {
|
|
2909
|
+
qs.set("return_to", flow.return_to);
|
|
2910
|
+
} else if (typeof window !== "undefined") {
|
|
2911
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
2912
|
+
if (searchParams.has("return_to")) {
|
|
2913
|
+
qs.set("return_to", searchParams.get("return_to") || "");
|
|
2914
|
+
}
|
|
2915
|
+
}
|
|
2916
|
+
if (qs.toString().length === 0) {
|
|
2917
|
+
return result;
|
|
2918
|
+
}
|
|
2919
|
+
return result + "?" + qs.toString();
|
|
2920
|
+
}
|
|
2921
|
+
function appendReturnTo(url, returnTo) {
|
|
2922
|
+
if (!returnTo) {
|
|
2923
|
+
return url;
|
|
2924
|
+
}
|
|
2925
|
+
const urlObj = new URL(url);
|
|
2926
|
+
urlObj.searchParams.set("return_to", returnTo);
|
|
2927
|
+
return urlObj.toString();
|
|
2928
|
+
}
|
|
2929
|
+
|
|
2930
|
+
// src/theme/default/components/card/footer.tsx
|
|
2931
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2932
|
+
function DefaultCardFooter() {
|
|
2933
|
+
const oryFlow = (0, import_elements_react3.useOryFlow)();
|
|
2934
|
+
switch (oryFlow.flowType) {
|
|
2935
|
+
case import_client_fetch29.FlowType.Login:
|
|
2936
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LoginCardFooter, {});
|
|
2937
|
+
case import_client_fetch29.FlowType.Registration:
|
|
2938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RegistrationCardFooter, {});
|
|
2939
|
+
case import_client_fetch29.FlowType.Recovery:
|
|
2940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(RecoveryCardFooter, {});
|
|
2941
|
+
case import_client_fetch29.FlowType.Verification:
|
|
2942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(VerificationCardFooter, {});
|
|
2943
|
+
case import_client_fetch29.FlowType.OAuth2Consent:
|
|
2944
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2945
|
+
default:
|
|
2946
|
+
return null;
|
|
2947
|
+
}
|
|
2948
|
+
}
|
|
2949
|
+
function shouldShowLogoutButton(flow, formState, authMethods) {
|
|
2950
|
+
if (flow.refresh) {
|
|
2951
|
+
return true;
|
|
2952
|
+
}
|
|
2953
|
+
if (flow.requested_aal === "aal2") {
|
|
2954
|
+
if (formState.current === "select_method") {
|
|
2955
|
+
return true;
|
|
2956
|
+
}
|
|
2957
|
+
if (formState.current === "method_active" && flow.active === "code") {
|
|
2958
|
+
return true;
|
|
2959
|
+
}
|
|
2960
|
+
if (formState.current === "method_active" && authMethods.length === 1) {
|
|
2961
|
+
return true;
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
return false;
|
|
2965
|
+
}
|
|
2966
|
+
function LoginCardFooter() {
|
|
2967
|
+
const { formState, flow, flowType, dispatchFormState } = (0, import_elements_react3.useOryFlow)();
|
|
2968
|
+
const config = (0, import_elements_react3.useOryConfiguration)();
|
|
2969
|
+
const intl = (0, import_react_intl10.useIntl)();
|
|
2970
|
+
if (flowType !== import_client_fetch29.FlowType.Login) {
|
|
2971
|
+
return null;
|
|
2972
|
+
}
|
|
2973
|
+
const authMethods = nodesToAuthMethodGroups(flow.ui.nodes);
|
|
2864
2974
|
let returnTo = config.project.default_redirect_url;
|
|
2865
2975
|
if (flow.return_to) {
|
|
2866
2976
|
returnTo = flow.return_to;
|
|
@@ -2871,36 +2981,17 @@ function LoginCardFooter() {
|
|
|
2871
2981
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2872
2982
|
);
|
|
2873
2983
|
}
|
|
2874
|
-
if (flow
|
|
2875
|
-
return /* @__PURE__ */ (0,
|
|
2876
|
-
intl.formatMessage({
|
|
2877
|
-
id: "login.2fa.go-back"
|
|
2878
|
-
}),
|
|
2879
|
-
" ",
|
|
2880
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2881
|
-
"a",
|
|
2882
|
-
{
|
|
2883
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2884
|
-
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
2885
|
-
"data-testid": (
|
|
2886
|
-
// Only add the test-id when the logout link has loaded.
|
|
2887
|
-
didLoadLogout ? "ory/screen/login/mfa/action/cancel" : void 0
|
|
2888
|
-
),
|
|
2889
|
-
children: intl.formatMessage({
|
|
2890
|
-
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
2891
|
-
})
|
|
2892
|
-
}
|
|
2893
|
-
)
|
|
2894
|
-
] });
|
|
2984
|
+
if (shouldShowLogoutButton(flow, formState, authMethods)) {
|
|
2985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LogoutButton, { returnTo });
|
|
2895
2986
|
}
|
|
2896
|
-
return /* @__PURE__ */ (0,
|
|
2897
|
-
formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ (0,
|
|
2987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
2988
|
+
formState.current === "provide_identifier" && config.project.registration_enabled && /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2898
2989
|
intl.formatMessage({
|
|
2899
2990
|
id: "login.registration-label",
|
|
2900
2991
|
defaultMessage: "No account?"
|
|
2901
2992
|
}),
|
|
2902
2993
|
" ",
|
|
2903
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2904
2995
|
"a",
|
|
2905
2996
|
{
|
|
2906
2997
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2913,23 +3004,27 @@ function LoginCardFooter() {
|
|
|
2913
3004
|
}
|
|
2914
3005
|
)
|
|
2915
3006
|
] }),
|
|
2916
|
-
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ (0,
|
|
2917
|
-
"
|
|
3007
|
+
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3008
|
+
"button",
|
|
2918
3009
|
{
|
|
2919
3010
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2920
|
-
|
|
3011
|
+
onClick: () => {
|
|
3012
|
+
dispatchFormState({
|
|
3013
|
+
type: "action_clear_active_method"
|
|
3014
|
+
});
|
|
3015
|
+
},
|
|
2921
3016
|
"data-testid": "ory/screen/login/mfa/action/selectMethod",
|
|
2922
3017
|
children: intl.formatMessage({
|
|
2923
3018
|
id: "login.2fa.method.go-back"
|
|
2924
3019
|
})
|
|
2925
3020
|
}
|
|
2926
3021
|
) }),
|
|
2927
|
-
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ (0,
|
|
3022
|
+
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2928
3023
|
"a",
|
|
2929
3024
|
{
|
|
2930
3025
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2931
3026
|
href: returnTo,
|
|
2932
|
-
"data-testid": "ory/screen/login/
|
|
3027
|
+
"data-testid": "ory/screen/login/action/cancel",
|
|
2933
3028
|
children: intl.formatMessage({
|
|
2934
3029
|
id: "login.2fa.go-back.link"
|
|
2935
3030
|
})
|
|
@@ -2937,9 +3032,35 @@ function LoginCardFooter() {
|
|
|
2937
3032
|
) })
|
|
2938
3033
|
] });
|
|
2939
3034
|
}
|
|
3035
|
+
function LogoutButton({ returnTo }) {
|
|
3036
|
+
const config = (0, import_elements_react3.useOryConfiguration)();
|
|
3037
|
+
const intl = (0, import_react_intl10.useIntl)();
|
|
3038
|
+
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
3039
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
3040
|
+
intl.formatMessage({
|
|
3041
|
+
id: "login.2fa.go-back"
|
|
3042
|
+
}),
|
|
3043
|
+
" ",
|
|
3044
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3045
|
+
"a",
|
|
3046
|
+
{
|
|
3047
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
3048
|
+
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
3049
|
+
"data-testid": (
|
|
3050
|
+
// Only add the test-id when the logout link has loaded.
|
|
3051
|
+
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
3052
|
+
),
|
|
3053
|
+
children: intl.formatMessage({
|
|
3054
|
+
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
3055
|
+
})
|
|
3056
|
+
}
|
|
3057
|
+
)
|
|
3058
|
+
] });
|
|
3059
|
+
}
|
|
2940
3060
|
function RegistrationCardFooter() {
|
|
2941
3061
|
const intl = (0, import_react_intl10.useIntl)();
|
|
2942
|
-
const {
|
|
3062
|
+
const { flow, formState } = (0, import_elements_react3.useOryFlow)();
|
|
3063
|
+
const config = (0, import_elements_react3.useOryConfiguration)();
|
|
2943
3064
|
const visibleGroups = useNodeGroupsWithVisibleNodes(flow.ui.nodes);
|
|
2944
3065
|
const authMethodBlocks = toAuthMethodPickerOptions(visibleGroups);
|
|
2945
3066
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
@@ -2948,11 +3069,12 @@ function RegistrationCardFooter() {
|
|
|
2948
3069
|
if (!screenSelectionNode || Object.entries(authMethodBlocks).length < 2) {
|
|
2949
3070
|
return null;
|
|
2950
3071
|
}
|
|
2951
|
-
return /* @__PURE__ */ (0,
|
|
3072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "font-normal leading-normal antialiased", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2952
3073
|
"a",
|
|
2953
3074
|
{
|
|
2954
3075
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
2955
3076
|
href: "",
|
|
3077
|
+
"data-testid": "ory/screen/registration/action/selectMethod",
|
|
2956
3078
|
children: intl.formatMessage({
|
|
2957
3079
|
id: "card.footer.select-another-method",
|
|
2958
3080
|
defaultMessage: "Select another method"
|
|
@@ -2961,13 +3083,13 @@ function RegistrationCardFooter() {
|
|
|
2961
3083
|
) });
|
|
2962
3084
|
case "select_method":
|
|
2963
3085
|
default:
|
|
2964
|
-
return /* @__PURE__ */ (0,
|
|
3086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2965
3087
|
intl.formatMessage({
|
|
2966
3088
|
id: "registration.login-label",
|
|
2967
3089
|
defaultMessage: "Already have an account?"
|
|
2968
3090
|
}),
|
|
2969
3091
|
" ",
|
|
2970
|
-
/* @__PURE__ */ (0,
|
|
3092
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2971
3093
|
"a",
|
|
2972
3094
|
{
|
|
2973
3095
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2996,26 +3118,26 @@ function ConsentCardFooter({ flow }) {
|
|
|
2996
3118
|
node_type: "input",
|
|
2997
3119
|
name: "remember"
|
|
2998
3120
|
});
|
|
2999
|
-
return /* @__PURE__ */ (0,
|
|
3000
|
-
/* @__PURE__ */ (0,
|
|
3001
|
-
/* @__PURE__ */ (0,
|
|
3121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex gap-8 flex-col", children: [
|
|
3122
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { children: [
|
|
3123
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "text-interface-foreground-default-secondary leading-normal font-medium", children: [
|
|
3002
3124
|
"Make sure you trust ",
|
|
3003
3125
|
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
3004
3126
|
] }),
|
|
3005
|
-
/* @__PURE__ */ (0,
|
|
3127
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
|
|
3006
3128
|
] }),
|
|
3007
|
-
rememberNode && /* @__PURE__ */ (0,
|
|
3129
|
+
rememberNode && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3008
3130
|
Node2.Checkbox,
|
|
3009
3131
|
{
|
|
3010
3132
|
attributes: rememberNode.attributes,
|
|
3011
3133
|
node: rememberNode
|
|
3012
3134
|
}
|
|
3013
3135
|
),
|
|
3014
|
-
/* @__PURE__ */ (0,
|
|
3136
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
|
|
3015
3137
|
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
3016
3138
|
).map((n) => {
|
|
3017
3139
|
const attributes = n.attributes;
|
|
3018
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3019
3141
|
Node2.Button,
|
|
3020
3142
|
{
|
|
3021
3143
|
node: n,
|
|
@@ -3024,8 +3146,8 @@ function ConsentCardFooter({ flow }) {
|
|
|
3024
3146
|
attributes.value
|
|
3025
3147
|
);
|
|
3026
3148
|
}) }),
|
|
3027
|
-
/* @__PURE__ */ (0,
|
|
3028
|
-
/* @__PURE__ */ (0,
|
|
3149
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("p", { className: "text-sm", children: [
|
|
3150
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "text-interface-foreground-default-tertiary", children: [
|
|
3029
3151
|
"Authorizing will redirect to",
|
|
3030
3152
|
" "
|
|
3031
3153
|
] }),
|
|
@@ -3038,7 +3160,7 @@ function ConsentCardFooter({ flow }) {
|
|
|
3038
3160
|
var import_elements_react5 = require("@ory/elements-react");
|
|
3039
3161
|
|
|
3040
3162
|
// src/theme/default/utils/constructCardHeader.ts
|
|
3041
|
-
var
|
|
3163
|
+
var import_client_fetch30 = require("@ory/client-fetch");
|
|
3042
3164
|
var import_react_intl11 = require("react-intl");
|
|
3043
3165
|
function joinWithCommaOr(list, orText = "or") {
|
|
3044
3166
|
if (list.length === 0) {
|
|
@@ -3055,7 +3177,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3055
3177
|
const nodes = container.nodes;
|
|
3056
3178
|
const intl = (0, import_react_intl11.useIntl)();
|
|
3057
3179
|
switch (opts.flowType) {
|
|
3058
|
-
case
|
|
3180
|
+
case import_client_fetch30.FlowType.Recovery:
|
|
3059
3181
|
if (nodes.find(
|
|
3060
3182
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3061
3183
|
)) {
|
|
@@ -3077,7 +3199,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3077
3199
|
id: "recovery.subtitle"
|
|
3078
3200
|
})
|
|
3079
3201
|
};
|
|
3080
|
-
case
|
|
3202
|
+
case import_client_fetch30.FlowType.Settings:
|
|
3081
3203
|
return {
|
|
3082
3204
|
title: intl.formatMessage({
|
|
3083
3205
|
id: "settings.title"
|
|
@@ -3086,7 +3208,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3086
3208
|
id: "settings.subtitle"
|
|
3087
3209
|
})
|
|
3088
3210
|
};
|
|
3089
|
-
case
|
|
3211
|
+
case import_client_fetch30.FlowType.Verification:
|
|
3090
3212
|
if (nodes.find(
|
|
3091
3213
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3092
3214
|
)) {
|
|
@@ -3108,7 +3230,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3108
3230
|
id: "verification.subtitle"
|
|
3109
3231
|
})
|
|
3110
3232
|
};
|
|
3111
|
-
case
|
|
3233
|
+
case import_client_fetch30.FlowType.Login: {
|
|
3112
3234
|
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
3113
3235
|
(m) => m.id === 1010016
|
|
3114
3236
|
);
|
|
@@ -3131,7 +3253,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3131
3253
|
const parts = [];
|
|
3132
3254
|
if (nodes.find((node) => node.group === "password")) {
|
|
3133
3255
|
switch (opts.flowType) {
|
|
3134
|
-
case
|
|
3256
|
+
case import_client_fetch30.FlowType.Registration:
|
|
3135
3257
|
parts.push(
|
|
3136
3258
|
intl.formatMessage(
|
|
3137
3259
|
{ id: "card.header.parts.password.registration" },
|
|
@@ -3160,6 +3282,12 @@ function useCardHeaderText(container, opts) {
|
|
|
3160
3282
|
if (nodes.find((node) => node.group === "code")) {
|
|
3161
3283
|
parts.push(intl.formatMessage({ id: "card.header.parts.code" }));
|
|
3162
3284
|
}
|
|
3285
|
+
if (nodes.find((node) => node.group === "totp")) {
|
|
3286
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.totp" }));
|
|
3287
|
+
}
|
|
3288
|
+
if (nodes.find((node) => node.group === "lookup_secret")) {
|
|
3289
|
+
parts.push(intl.formatMessage({ id: "card.header.parts.lookup_secret" }));
|
|
3290
|
+
}
|
|
3163
3291
|
if (nodes.find((node) => node.group === "passkey")) {
|
|
3164
3292
|
parts.push(intl.formatMessage({ id: "card.header.parts.passkey" }));
|
|
3165
3293
|
}
|
|
@@ -3168,7 +3296,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3168
3296
|
}
|
|
3169
3297
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
3170
3298
|
const identifier = nodes.find(
|
|
3171
|
-
(node) => (0,
|
|
3299
|
+
(node) => (0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
3172
3300
|
);
|
|
3173
3301
|
if (identifier) {
|
|
3174
3302
|
parts.push(
|
|
@@ -3184,7 +3312,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3184
3312
|
}
|
|
3185
3313
|
}
|
|
3186
3314
|
switch (opts.flowType) {
|
|
3187
|
-
case
|
|
3315
|
+
case import_client_fetch30.FlowType.Login:
|
|
3188
3316
|
if (opts.flow.refresh) {
|
|
3189
3317
|
return {
|
|
3190
3318
|
title: intl.formatMessage({
|
|
@@ -3225,7 +3353,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3225
3353
|
}
|
|
3226
3354
|
) : ""
|
|
3227
3355
|
};
|
|
3228
|
-
case
|
|
3356
|
+
case import_client_fetch30.FlowType.Registration:
|
|
3229
3357
|
return {
|
|
3230
3358
|
title: intl.formatMessage({
|
|
3231
3359
|
id: "registration.title"
|
|
@@ -3242,7 +3370,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3242
3370
|
}
|
|
3243
3371
|
) : ""
|
|
3244
3372
|
};
|
|
3245
|
-
case
|
|
3373
|
+
case import_client_fetch30.FlowType.OAuth2Consent:
|
|
3246
3374
|
return {
|
|
3247
3375
|
title: intl.formatMessage(
|
|
3248
3376
|
{
|
|
@@ -3269,17 +3397,10 @@ function useCardHeaderText(container, opts) {
|
|
|
3269
3397
|
}
|
|
3270
3398
|
|
|
3271
3399
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3272
|
-
var
|
|
3400
|
+
var import_client_fetch31 = require("@ory/client-fetch");
|
|
3273
3401
|
var import_elements_react4 = require("@ory/elements-react");
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
var React3 = __toESM(require("react"));
|
|
3277
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3278
|
-
var SvgArrowLeft = (props) => {
|
|
3279
|
-
var _a, _b;
|
|
3280
|
-
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
3281
|
-
};
|
|
3282
|
-
var arrow_left_default = SvgArrowLeft;
|
|
3402
|
+
var import_react8 = require("react");
|
|
3403
|
+
var import_react_hook_form13 = require("react-hook-form");
|
|
3283
3404
|
|
|
3284
3405
|
// src/theme/default/utils/attributes.ts
|
|
3285
3406
|
function omit(obj, keys) {
|
|
@@ -3290,17 +3411,50 @@ function omit(obj, keys) {
|
|
|
3290
3411
|
return ret;
|
|
3291
3412
|
}
|
|
3292
3413
|
|
|
3293
|
-
// src/
|
|
3294
|
-
|
|
3414
|
+
// src/util/omitAttributes.ts
|
|
3415
|
+
function omitInputAttributes({
|
|
3416
|
+
...attrs
|
|
3417
|
+
}) {
|
|
3418
|
+
return omit(attrs, [
|
|
3419
|
+
"autocomplete",
|
|
3420
|
+
"label",
|
|
3421
|
+
"node_type",
|
|
3422
|
+
"maxlength",
|
|
3423
|
+
"onclick",
|
|
3424
|
+
"onclickTrigger",
|
|
3425
|
+
"onload",
|
|
3426
|
+
"onloadTrigger"
|
|
3427
|
+
]);
|
|
3428
|
+
}
|
|
3429
|
+
|
|
3430
|
+
// src/theme/default/assets/icons/arrow-left.svg
|
|
3431
|
+
var React3 = __toESM(require("react"));
|
|
3295
3432
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3433
|
+
var SvgArrowLeft = (props) => {
|
|
3434
|
+
var _a, _b;
|
|
3435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
3436
|
+
};
|
|
3437
|
+
var arrow_left_default = SvgArrowLeft;
|
|
3438
|
+
|
|
3439
|
+
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3440
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3296
3441
|
function DefaultCurrentIdentifierButton() {
|
|
3297
|
-
|
|
3298
|
-
const {
|
|
3442
|
+
var _a;
|
|
3443
|
+
const { flow, flowType, formState } = (0, import_elements_react4.useOryFlow)();
|
|
3444
|
+
const { setValue, getValues, watch } = (0, import_react_hook_form13.useFormContext)();
|
|
3445
|
+
const [turnstileResponse, setTurnstileResponse] = (0, import_react8.useState)();
|
|
3446
|
+
const config = (0, import_elements_react4.useOryConfiguration)();
|
|
3299
3447
|
const ui = flow.ui;
|
|
3448
|
+
const captchaVerificationValue = (_a = watch("transient_payload")) == null ? void 0 : _a.captcha_turnstile_response;
|
|
3449
|
+
(0, import_react8.useEffect)(() => {
|
|
3450
|
+
if (captchaVerificationValue) {
|
|
3451
|
+
setTurnstileResponse(captchaVerificationValue);
|
|
3452
|
+
}
|
|
3453
|
+
}, [captchaVerificationValue]);
|
|
3300
3454
|
if (formState.current === "provide_identifier") {
|
|
3301
3455
|
return null;
|
|
3302
3456
|
}
|
|
3303
|
-
if (flowType ===
|
|
3457
|
+
if (flowType === import_client_fetch31.FlowType.Login && flow.requested_aal === "aal2") {
|
|
3304
3458
|
return null;
|
|
3305
3459
|
}
|
|
3306
3460
|
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
@@ -3311,36 +3465,35 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3311
3465
|
flow,
|
|
3312
3466
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
3313
3467
|
);
|
|
3314
|
-
const attributes = omit(nodeBackButton, [
|
|
3315
|
-
"autocomplete",
|
|
3316
|
-
"node_type",
|
|
3317
|
-
"maxlength"
|
|
3318
|
-
]);
|
|
3319
3468
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
3320
3469
|
if (screenSelectionNode) {
|
|
3321
|
-
return /* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
3322
3471
|
flow.ui.nodes.filter((n) => {
|
|
3323
|
-
if ((0,
|
|
3472
|
+
if ((0, import_client_fetch31.isUiNodeInputAttributes)(n.attributes)) {
|
|
3324
3473
|
return n.attributes.type === "hidden";
|
|
3325
3474
|
}
|
|
3326
3475
|
return false;
|
|
3327
3476
|
}).map((n) => {
|
|
3328
3477
|
const attrs = n.attributes;
|
|
3329
|
-
|
|
3478
|
+
let value = getValues(attrs.name) || attrs.value;
|
|
3479
|
+
if (attrs.name === "transient_payload.captcha_turnstile_response" && turnstileResponse) {
|
|
3480
|
+
value = turnstileResponse;
|
|
3481
|
+
}
|
|
3482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3330
3483
|
"input",
|
|
3331
3484
|
{
|
|
3332
3485
|
type: "hidden",
|
|
3333
3486
|
name: attrs.name,
|
|
3334
|
-
value
|
|
3487
|
+
value
|
|
3335
3488
|
},
|
|
3336
3489
|
attrs.name
|
|
3337
3490
|
);
|
|
3338
3491
|
}),
|
|
3339
|
-
/* @__PURE__ */ (0,
|
|
3492
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3340
3493
|
"button",
|
|
3341
3494
|
{
|
|
3342
3495
|
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",
|
|
3343
|
-
...
|
|
3496
|
+
...omitInputAttributes(nodeBackButton),
|
|
3344
3497
|
type: "submit",
|
|
3345
3498
|
onClick: () => {
|
|
3346
3499
|
setValue(
|
|
@@ -3353,8 +3506,8 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3353
3506
|
value: screenSelectionNode.attributes.value,
|
|
3354
3507
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3355
3508
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3356
|
-
children: /* @__PURE__ */ (0,
|
|
3357
|
-
/* @__PURE__ */ (0,
|
|
3509
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3510
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3358
3511
|
arrow_left_default,
|
|
3359
3512
|
{
|
|
3360
3513
|
size: 16,
|
|
@@ -3362,22 +3515,22 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3362
3515
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3363
3516
|
}
|
|
3364
3517
|
),
|
|
3365
|
-
/* @__PURE__ */ (0,
|
|
3518
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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 })
|
|
3366
3519
|
] })
|
|
3367
3520
|
}
|
|
3368
3521
|
)
|
|
3369
3522
|
] });
|
|
3370
3523
|
}
|
|
3371
|
-
return /* @__PURE__ */ (0,
|
|
3524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3372
3525
|
"a",
|
|
3373
3526
|
{
|
|
3374
3527
|
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",
|
|
3375
|
-
...
|
|
3528
|
+
...omitInputAttributes(nodeBackButton),
|
|
3376
3529
|
href: initFlowUrl2,
|
|
3377
3530
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3378
3531
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3379
|
-
children: /* @__PURE__ */ (0,
|
|
3380
|
-
/* @__PURE__ */ (0,
|
|
3532
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3533
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3381
3534
|
arrow_left_default,
|
|
3382
3535
|
{
|
|
3383
3536
|
size: 16,
|
|
@@ -3385,7 +3538,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3385
3538
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3386
3539
|
}
|
|
3387
3540
|
),
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
3541
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("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 })
|
|
3389
3542
|
] })
|
|
3390
3543
|
}
|
|
3391
3544
|
);
|
|
@@ -3394,18 +3547,18 @@ function getBackButtonNodeAttributes(flowType, nodes) {
|
|
|
3394
3547
|
var _a, _b;
|
|
3395
3548
|
let nodeBackButtonAttributes;
|
|
3396
3549
|
switch (flowType) {
|
|
3397
|
-
case
|
|
3550
|
+
case import_client_fetch31.FlowType.Login:
|
|
3398
3551
|
nodeBackButtonAttributes = (_a = nodes.find(
|
|
3399
|
-
(node) => (0,
|
|
3552
|
+
(node) => (0, import_client_fetch31.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
3400
3553
|
)) == null ? void 0 : _a.attributes;
|
|
3401
3554
|
break;
|
|
3402
|
-
case
|
|
3555
|
+
case import_client_fetch31.FlowType.Registration:
|
|
3403
3556
|
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
3404
3557
|
break;
|
|
3405
|
-
case
|
|
3406
|
-
case
|
|
3558
|
+
case import_client_fetch31.FlowType.Recovery:
|
|
3559
|
+
case import_client_fetch31.FlowType.Verification:
|
|
3407
3560
|
nodeBackButtonAttributes = (_b = nodes.find(
|
|
3408
|
-
(n) => (0,
|
|
3561
|
+
(n) => (0, import_client_fetch31.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
|
|
3409
3562
|
)) == null ? void 0 : _b.attributes;
|
|
3410
3563
|
break;
|
|
3411
3564
|
}
|
|
@@ -3422,23 +3575,23 @@ var backButtonCandiates = [
|
|
|
3422
3575
|
function guessRegistrationBackButton(uiNodes) {
|
|
3423
3576
|
var _a;
|
|
3424
3577
|
return (_a = uiNodes.find(
|
|
3425
|
-
(node) => (0,
|
|
3578
|
+
(node) => (0, import_client_fetch31.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
3426
3579
|
)) == null ? void 0 : _a.attributes;
|
|
3427
3580
|
}
|
|
3428
3581
|
|
|
3429
3582
|
// src/theme/default/components/card/header.tsx
|
|
3430
|
-
var
|
|
3583
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3431
3584
|
function InnerCardHeader({
|
|
3432
3585
|
title,
|
|
3433
3586
|
text,
|
|
3434
3587
|
messageId
|
|
3435
3588
|
}) {
|
|
3436
3589
|
const { Card } = (0, import_elements_react5.useComponents)();
|
|
3437
|
-
return /* @__PURE__ */ (0,
|
|
3438
|
-
/* @__PURE__ */ (0,
|
|
3439
|
-
/* @__PURE__ */ (0,
|
|
3440
|
-
/* @__PURE__ */ (0,
|
|
3441
|
-
/* @__PURE__ */ (0,
|
|
3590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
3591
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Card.Logo, {}),
|
|
3592
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
3593
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
3594
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3442
3595
|
"p",
|
|
3443
3596
|
{
|
|
3444
3597
|
className: "leading-normal text-interface-foreground-default-secondary",
|
|
@@ -3446,7 +3599,7 @@ function InnerCardHeader({
|
|
|
3446
3599
|
children: text
|
|
3447
3600
|
}
|
|
3448
3601
|
),
|
|
3449
|
-
/* @__PURE__ */ (0,
|
|
3602
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DefaultCurrentIdentifierButton, {})
|
|
3450
3603
|
] })
|
|
3451
3604
|
] });
|
|
3452
3605
|
}
|
|
@@ -3456,32 +3609,40 @@ function DefaultCardHeader() {
|
|
|
3456
3609
|
context.flow.ui,
|
|
3457
3610
|
context
|
|
3458
3611
|
);
|
|
3459
|
-
return /* @__PURE__ */ (0,
|
|
3612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(InnerCardHeader, { title, text: description, messageId });
|
|
3460
3613
|
}
|
|
3461
3614
|
|
|
3462
3615
|
// src/theme/default/components/card/logo.tsx
|
|
3463
3616
|
var import_elements_react6 = require("@ory/elements-react");
|
|
3464
|
-
var
|
|
3617
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3465
3618
|
function DefaultCardLogo() {
|
|
3466
|
-
const
|
|
3467
|
-
if (
|
|
3468
|
-
return /* @__PURE__ */ (0,
|
|
3619
|
+
const config = (0, import_elements_react6.useOryConfiguration)();
|
|
3620
|
+
if (config.project.logo_light_url) {
|
|
3621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3622
|
+
"img",
|
|
3623
|
+
{
|
|
3624
|
+
src: config.project.logo_light_url,
|
|
3625
|
+
width: 100,
|
|
3626
|
+
height: 36,
|
|
3627
|
+
alt: "Logo"
|
|
3628
|
+
}
|
|
3629
|
+
);
|
|
3469
3630
|
}
|
|
3470
|
-
return /* @__PURE__ */ (0,
|
|
3631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.project.name });
|
|
3471
3632
|
}
|
|
3472
3633
|
|
|
3473
3634
|
// src/theme/default/components/card/layout.tsx
|
|
3474
|
-
var
|
|
3635
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3475
3636
|
function DefaultCardLayout({ children }) {
|
|
3476
|
-
return /* @__PURE__ */ (0,
|
|
3637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
3477
3638
|
}
|
|
3478
3639
|
|
|
3479
3640
|
// src/theme/default/components/card/index.tsx
|
|
3480
|
-
var
|
|
3641
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3481
3642
|
function DefaultCard({ children }) {
|
|
3482
|
-
return /* @__PURE__ */ (0,
|
|
3643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("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__ */ (0, import_jsx_runtime41.jsxs)("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: [
|
|
3483
3644
|
children,
|
|
3484
|
-
/* @__PURE__ */ (0,
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Badge, {})
|
|
3485
3646
|
] }) });
|
|
3486
3647
|
}
|
|
3487
3648
|
|
|
@@ -3495,56 +3656,56 @@ function cn(...inputs) {
|
|
|
3495
3656
|
// src/theme/default/components/form/index.tsx
|
|
3496
3657
|
var import_react_intl13 = require("react-intl");
|
|
3497
3658
|
var import_elements_react8 = require("@ory/elements-react");
|
|
3498
|
-
var
|
|
3659
|
+
var import_client_fetch33 = require("@ory/client-fetch");
|
|
3499
3660
|
|
|
3500
3661
|
// src/theme/default/components/form/social.tsx
|
|
3501
3662
|
var import_elements_react7 = require("@ory/elements-react");
|
|
3502
|
-
var
|
|
3663
|
+
var import_react9 = require("react");
|
|
3503
3664
|
var import_react_hook_form14 = require("react-hook-form");
|
|
3504
3665
|
var import_react_intl12 = require("react-intl");
|
|
3505
3666
|
var import_usehooks_ts = require("usehooks-ts");
|
|
3506
3667
|
|
|
3507
3668
|
// src/theme/default/provider-logos/apple.svg
|
|
3508
3669
|
var React4 = __toESM(require("react"));
|
|
3509
|
-
var
|
|
3670
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3510
3671
|
var SvgApple = (props) => {
|
|
3511
3672
|
var _a, _b;
|
|
3512
|
-
return /* @__PURE__ */ (0,
|
|
3673
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("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" }) });
|
|
3513
3674
|
};
|
|
3514
3675
|
var apple_default = SvgApple;
|
|
3515
3676
|
|
|
3516
3677
|
// src/theme/default/provider-logos/auth0.svg
|
|
3517
3678
|
var React5 = __toESM(require("react"));
|
|
3518
|
-
var
|
|
3679
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3519
3680
|
var SvgAuth0 = (props) => {
|
|
3520
3681
|
var _a, _b;
|
|
3521
|
-
return /* @__PURE__ */ (0,
|
|
3682
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("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__ */ (0, import_jsx_runtime43.jsx)("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" }) });
|
|
3522
3683
|
};
|
|
3523
3684
|
var auth0_default = SvgAuth0;
|
|
3524
3685
|
|
|
3525
3686
|
// src/theme/default/provider-logos/discord.svg
|
|
3526
3687
|
var React6 = __toESM(require("react"));
|
|
3527
|
-
var
|
|
3688
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3528
3689
|
var SvgDiscord = (props) => {
|
|
3529
3690
|
var _a, _b;
|
|
3530
|
-
return /* @__PURE__ */ (0,
|
|
3531
|
-
/* @__PURE__ */ (0,
|
|
3532
|
-
/* @__PURE__ */ (0,
|
|
3691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3692
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("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" })
|
|
3533
3694
|
] });
|
|
3534
3695
|
};
|
|
3535
3696
|
var discord_default = SvgDiscord;
|
|
3536
3697
|
|
|
3537
3698
|
// src/theme/default/provider-logos/facebook.svg
|
|
3538
3699
|
var React7 = __toESM(require("react"));
|
|
3539
|
-
var
|
|
3700
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3540
3701
|
var SvgFacebook = (props) => {
|
|
3541
3702
|
var _a, _b;
|
|
3542
|
-
return /* @__PURE__ */ (0,
|
|
3543
|
-
/* @__PURE__ */ (0,
|
|
3544
|
-
/* @__PURE__ */ (0,
|
|
3545
|
-
/* @__PURE__ */ (0,
|
|
3546
|
-
/* @__PURE__ */ (0,
|
|
3547
|
-
/* @__PURE__ */ (0,
|
|
3703
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3704
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
3705
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
|
|
3706
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
3707
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { stopColor: "#18ACFE" }),
|
|
3708
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)("stop", { offset: 1, stopColor: "#0163E0" })
|
|
3548
3709
|
] }) })
|
|
3549
3710
|
] });
|
|
3550
3711
|
};
|
|
@@ -3552,111 +3713,111 @@ var facebook_default = SvgFacebook;
|
|
|
3552
3713
|
|
|
3553
3714
|
// src/theme/default/provider-logos/github.svg
|
|
3554
3715
|
var React8 = __toESM(require("react"));
|
|
3555
|
-
var
|
|
3716
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3556
3717
|
var SvgGithub = (props) => {
|
|
3557
3718
|
var _a, _b;
|
|
3558
|
-
return /* @__PURE__ */ (0,
|
|
3719
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
3559
3720
|
};
|
|
3560
3721
|
var github_default = SvgGithub;
|
|
3561
3722
|
|
|
3562
3723
|
// src/theme/default/provider-logos/gitlab.svg
|
|
3563
3724
|
var React9 = __toESM(require("react"));
|
|
3564
|
-
var
|
|
3725
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3565
3726
|
var SvgGitlab = (props) => {
|
|
3566
3727
|
var _a, _b;
|
|
3567
|
-
return /* @__PURE__ */ (0,
|
|
3568
|
-
/* @__PURE__ */ (0,
|
|
3569
|
-
/* @__PURE__ */ (0,
|
|
3570
|
-
/* @__PURE__ */ (0,
|
|
3571
|
-
/* @__PURE__ */ (0,
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
3730
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
3731
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
3732
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
3572
3733
|
] });
|
|
3573
3734
|
};
|
|
3574
3735
|
var gitlab_default = SvgGitlab;
|
|
3575
3736
|
|
|
3576
3737
|
// src/theme/default/provider-logos/google.svg
|
|
3577
3738
|
var React10 = __toESM(require("react"));
|
|
3578
|
-
var
|
|
3739
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3579
3740
|
var SvgGoogle = (props) => {
|
|
3580
3741
|
var _a, _b;
|
|
3581
|
-
return /* @__PURE__ */ (0,
|
|
3582
|
-
/* @__PURE__ */ (0,
|
|
3583
|
-
/* @__PURE__ */ (0,
|
|
3584
|
-
/* @__PURE__ */ (0,
|
|
3585
|
-
/* @__PURE__ */ (0,
|
|
3742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3743
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
|
|
3744
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
|
|
3745
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
|
|
3746
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
|
|
3586
3747
|
] });
|
|
3587
3748
|
};
|
|
3588
3749
|
var google_default = SvgGoogle;
|
|
3589
3750
|
|
|
3590
3751
|
// src/theme/default/provider-logos/linkedin.svg
|
|
3591
3752
|
var React11 = __toESM(require("react"));
|
|
3592
|
-
var
|
|
3753
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3593
3754
|
var SvgLinkedin = (props) => {
|
|
3594
3755
|
var _a, _b;
|
|
3595
|
-
return /* @__PURE__ */ (0,
|
|
3596
|
-
/* @__PURE__ */ (0,
|
|
3597
|
-
/* @__PURE__ */ (0,
|
|
3756
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3757
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
3758
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
3598
3759
|
] });
|
|
3599
3760
|
};
|
|
3600
3761
|
var linkedin_default = SvgLinkedin;
|
|
3601
3762
|
|
|
3602
3763
|
// src/theme/default/provider-logos/microsoft.svg
|
|
3603
3764
|
var React12 = __toESM(require("react"));
|
|
3604
|
-
var
|
|
3765
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3605
3766
|
var SvgMicrosoft = (props) => {
|
|
3606
3767
|
var _a, _b;
|
|
3607
|
-
return /* @__PURE__ */ (0,
|
|
3608
|
-
/* @__PURE__ */ (0,
|
|
3609
|
-
/* @__PURE__ */ (0,
|
|
3610
|
-
/* @__PURE__ */ (0,
|
|
3611
|
-
/* @__PURE__ */ (0,
|
|
3768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
3771
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
3772
|
+
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
3612
3773
|
] });
|
|
3613
3774
|
};
|
|
3614
3775
|
var microsoft_default = SvgMicrosoft;
|
|
3615
3776
|
|
|
3616
3777
|
// src/theme/default/provider-logos/slack.svg
|
|
3617
3778
|
var React13 = __toESM(require("react"));
|
|
3618
|
-
var
|
|
3779
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3619
3780
|
var SvgSlack = (props) => {
|
|
3620
3781
|
var _a, _b;
|
|
3621
|
-
return /* @__PURE__ */ (0,
|
|
3622
|
-
/* @__PURE__ */ (0,
|
|
3623
|
-
/* @__PURE__ */ (0,
|
|
3624
|
-
/* @__PURE__ */ (0,
|
|
3625
|
-
/* @__PURE__ */ (0,
|
|
3782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
3786
|
+
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
3626
3787
|
] });
|
|
3627
3788
|
};
|
|
3628
3789
|
var slack_default = SvgSlack;
|
|
3629
3790
|
|
|
3630
3791
|
// src/theme/default/provider-logos/spotify.svg
|
|
3631
3792
|
var React14 = __toESM(require("react"));
|
|
3632
|
-
var
|
|
3793
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3633
3794
|
var SvgSpotify = (props) => {
|
|
3634
3795
|
var _a, _b;
|
|
3635
|
-
return /* @__PURE__ */ (0,
|
|
3636
|
-
/* @__PURE__ */ (0,
|
|
3637
|
-
/* @__PURE__ */ (0,
|
|
3796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3797
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
3798
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
3638
3799
|
] });
|
|
3639
3800
|
};
|
|
3640
3801
|
var spotify_default = SvgSpotify;
|
|
3641
3802
|
|
|
3642
3803
|
// src/theme/default/provider-logos/yandex.svg
|
|
3643
3804
|
var React15 = __toESM(require("react"));
|
|
3644
|
-
var
|
|
3805
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3645
3806
|
var SvgYandex = (props) => {
|
|
3646
3807
|
var _a, _b;
|
|
3647
|
-
return /* @__PURE__ */ (0,
|
|
3648
|
-
/* @__PURE__ */ (0,
|
|
3649
|
-
/* @__PURE__ */ (0,
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3809
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
3810
|
+
/* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
3650
3811
|
] });
|
|
3651
3812
|
};
|
|
3652
3813
|
var yandex_default = SvgYandex;
|
|
3653
3814
|
|
|
3654
3815
|
// src/theme/default/provider-logos/x.svg
|
|
3655
3816
|
var React16 = __toESM(require("react"));
|
|
3656
|
-
var
|
|
3817
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3657
3818
|
var SvgX = (props) => {
|
|
3658
3819
|
var _a, _b;
|
|
3659
|
-
return /* @__PURE__ */ (0,
|
|
3820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
|
|
3660
3821
|
};
|
|
3661
3822
|
var x_default = SvgX;
|
|
3662
3823
|
|
|
@@ -3679,9 +3840,9 @@ var logos = {
|
|
|
3679
3840
|
var provider_logos_default = logos;
|
|
3680
3841
|
|
|
3681
3842
|
// src/theme/default/components/form/spinner.tsx
|
|
3682
|
-
var
|
|
3843
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3683
3844
|
function Spinner({ className }) {
|
|
3684
|
-
return /* @__PURE__ */ (0,
|
|
3845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3685
3846
|
"svg",
|
|
3686
3847
|
{
|
|
3687
3848
|
"aria-hidden": "true",
|
|
@@ -3694,7 +3855,7 @@ function Spinner({ className }) {
|
|
|
3694
3855
|
fill: "none",
|
|
3695
3856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3696
3857
|
children: [
|
|
3697
|
-
/* @__PURE__ */ (0,
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3698
3859
|
"path",
|
|
3699
3860
|
{
|
|
3700
3861
|
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",
|
|
@@ -3703,7 +3864,7 @@ function Spinner({ className }) {
|
|
|
3703
3864
|
strokeLinejoin: "round"
|
|
3704
3865
|
}
|
|
3705
3866
|
) }),
|
|
3706
|
-
/* @__PURE__ */ (0,
|
|
3867
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3707
3868
|
"rect",
|
|
3708
3869
|
{
|
|
3709
3870
|
width: "24",
|
|
@@ -3718,26 +3879,8 @@ function Spinner({ className }) {
|
|
|
3718
3879
|
}
|
|
3719
3880
|
|
|
3720
3881
|
// src/theme/default/components/form/social.tsx
|
|
3721
|
-
var
|
|
3722
|
-
|
|
3723
|
-
// src/util/omitAttributes.ts
|
|
3724
|
-
function omitInputAttributes({
|
|
3725
|
-
...attrs
|
|
3726
|
-
}) {
|
|
3727
|
-
return omit(attrs, [
|
|
3728
|
-
"autocomplete",
|
|
3729
|
-
"label",
|
|
3730
|
-
"node_type",
|
|
3731
|
-
"maxlength",
|
|
3732
|
-
"onclick",
|
|
3733
|
-
"onclickTrigger",
|
|
3734
|
-
"onload",
|
|
3735
|
-
"onloadTrigger"
|
|
3736
|
-
]);
|
|
3737
|
-
}
|
|
3738
|
-
|
|
3739
|
-
// src/theme/default/components/form/social.tsx
|
|
3740
|
-
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3882
|
+
var import_client_fetch32 = require("@ory/client-fetch");
|
|
3883
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3741
3884
|
function extractProvider(context) {
|
|
3742
3885
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
3743
3886
|
return context.provider;
|
|
@@ -3763,7 +3906,7 @@ function DefaultButtonSocial({
|
|
|
3763
3906
|
formState: { isSubmitting }
|
|
3764
3907
|
} = (0, import_react_hook_form14.useFormContext)();
|
|
3765
3908
|
const oidcNodeCount = (_a = ui.nodes.filter(
|
|
3766
|
-
(node2) => node2.group ===
|
|
3909
|
+
(node2) => node2.group === import_client_fetch32.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch32.UiNodeGroupEnum.Saml
|
|
3767
3910
|
).length) != null ? _a : 0;
|
|
3768
3911
|
const Logo = logos2[attributes.value.split("-")[0]];
|
|
3769
3912
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
@@ -3772,13 +3915,13 @@ function DefaultButtonSocial({
|
|
|
3772
3915
|
onClick == null ? void 0 : onClick();
|
|
3773
3916
|
setClicked(true);
|
|
3774
3917
|
};
|
|
3775
|
-
(0,
|
|
3918
|
+
(0, import_react9.useEffect)(() => {
|
|
3776
3919
|
if (!isSubmitting) {
|
|
3777
3920
|
setClicked(false);
|
|
3778
3921
|
}
|
|
3779
3922
|
}, [isSubmitting, setClicked]);
|
|
3780
3923
|
const label = node.meta.label ? (0, import_elements_react7.uiTextToFormattedMessage)(node.meta.label, intl) : "";
|
|
3781
|
-
return /* @__PURE__ */ (0,
|
|
3924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
3782
3925
|
"button",
|
|
3783
3926
|
{
|
|
3784
3927
|
className: "gap-3 border border-button-social-border-default bg-button-social-background-default hover:bg-button-social-background-hover transition-colors rounded-buttons flex items-center justify-center px-4 py-[13px] loading:bg-button-social-background-disabled loading:border-button-social-border-disabled loading:text-button-social-foreground-disabled hover:text-button-social-foreground-hover",
|
|
@@ -3792,21 +3935,21 @@ function DefaultButtonSocial({
|
|
|
3792
3935
|
"aria-label": label,
|
|
3793
3936
|
...omitInputAttributes(rest),
|
|
3794
3937
|
children: [
|
|
3795
|
-
/* @__PURE__ */ (0,
|
|
3796
|
-
showLabel && node.meta.label ? /* @__PURE__ */ (0,
|
|
3797
|
-
/* @__PURE__ */ (0,
|
|
3798
|
-
/* @__PURE__ */ (0,
|
|
3938
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Logo, { size: 20 }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(GenericLogo, { label: provider.slice(0, 1) }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Spinner, { className: "size-5" }) }),
|
|
3939
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
3940
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
3941
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "size-5 block" })
|
|
3799
3942
|
] }) : null
|
|
3800
3943
|
]
|
|
3801
3944
|
}
|
|
3802
3945
|
);
|
|
3803
3946
|
}
|
|
3804
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0,
|
|
3947
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
3805
3948
|
function DefaultSocialButtonContainer({
|
|
3806
3949
|
children,
|
|
3807
3950
|
nodes
|
|
3808
3951
|
}) {
|
|
3809
|
-
return /* @__PURE__ */ (0,
|
|
3952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3810
3953
|
"div",
|
|
3811
3954
|
{
|
|
3812
3955
|
className: cn("grid gap-3", {
|
|
@@ -3819,9 +3962,12 @@ function DefaultSocialButtonContainer({
|
|
|
3819
3962
|
}
|
|
3820
3963
|
);
|
|
3821
3964
|
}
|
|
3965
|
+
function GenericLogo({ label }) {
|
|
3966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "flex rounded-buttons bg-button-social-background-generic-provider text-button-social-foreground-generic-provider border-button-social-border-generic-provider text-xs size-full items-center justify-center", children: label });
|
|
3967
|
+
}
|
|
3822
3968
|
|
|
3823
3969
|
// src/theme/default/components/form/index.tsx
|
|
3824
|
-
var
|
|
3970
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3825
3971
|
function DefaultFormContainer({
|
|
3826
3972
|
children,
|
|
3827
3973
|
onSubmit,
|
|
@@ -3829,7 +3975,7 @@ function DefaultFormContainer({
|
|
|
3829
3975
|
method,
|
|
3830
3976
|
"data-testid": dataTestId
|
|
3831
3977
|
}) {
|
|
3832
|
-
return /* @__PURE__ */ (0,
|
|
3978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3833
3979
|
"form",
|
|
3834
3980
|
{
|
|
3835
3981
|
"data-testid": dataTestId,
|
|
@@ -3847,11 +3993,11 @@ function DefaultMessageContainer({ children }) {
|
|
|
3847
3993
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
3848
3994
|
return null;
|
|
3849
3995
|
}
|
|
3850
|
-
return /* @__PURE__ */ (0,
|
|
3996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3851
3997
|
"section",
|
|
3852
3998
|
{
|
|
3853
3999
|
className: cn(
|
|
3854
|
-
flowType ===
|
|
4000
|
+
flowType === import_client_fetch33.FlowType.Settings ? "text-center" : "text-left"
|
|
3855
4001
|
),
|
|
3856
4002
|
children
|
|
3857
4003
|
}
|
|
@@ -3859,7 +4005,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
3859
4005
|
}
|
|
3860
4006
|
function DefaultMessage({ message }) {
|
|
3861
4007
|
const intl = (0, import_react_intl13.useIntl)();
|
|
3862
|
-
return /* @__PURE__ */ (0,
|
|
4008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3863
4009
|
"span",
|
|
3864
4010
|
{
|
|
3865
4011
|
className: cn(
|
|
@@ -3879,60 +4025,60 @@ var import_react_intl14 = require("react-intl");
|
|
|
3879
4025
|
|
|
3880
4026
|
// src/theme/default/assets/icons/code.svg
|
|
3881
4027
|
var React17 = __toESM(require("react"));
|
|
3882
|
-
var
|
|
4028
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3883
4029
|
var SvgCode = (props) => {
|
|
3884
4030
|
var _a, _b;
|
|
3885
|
-
return /* @__PURE__ */ (0,
|
|
4031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
|
|
3886
4032
|
};
|
|
3887
4033
|
var code_default = SvgCode;
|
|
3888
4034
|
|
|
3889
4035
|
// src/theme/default/assets/icons/passkey.svg
|
|
3890
4036
|
var React18 = __toESM(require("react"));
|
|
3891
|
-
var
|
|
4037
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3892
4038
|
var SvgPasskey = (props) => {
|
|
3893
4039
|
var _a, _b;
|
|
3894
|
-
return /* @__PURE__ */ (0,
|
|
4040
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
|
|
3895
4041
|
};
|
|
3896
4042
|
var passkey_default = SvgPasskey;
|
|
3897
4043
|
|
|
3898
4044
|
// src/theme/default/assets/icons/password.svg
|
|
3899
4045
|
var React19 = __toESM(require("react"));
|
|
3900
|
-
var
|
|
4046
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3901
4047
|
var SvgPassword = (props) => {
|
|
3902
4048
|
var _a, _b;
|
|
3903
|
-
return /* @__PURE__ */ (0,
|
|
4049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
|
|
3904
4050
|
};
|
|
3905
4051
|
var password_default = SvgPassword;
|
|
3906
4052
|
|
|
3907
4053
|
// src/theme/default/assets/icons/webauthn.svg
|
|
3908
4054
|
var React20 = __toESM(require("react"));
|
|
3909
|
-
var
|
|
4055
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3910
4056
|
var SvgWebauthn = (props) => {
|
|
3911
4057
|
var _a, _b;
|
|
3912
|
-
return /* @__PURE__ */ (0,
|
|
4058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
|
|
3913
4059
|
};
|
|
3914
4060
|
var webauthn_default = SvgWebauthn;
|
|
3915
4061
|
|
|
3916
4062
|
// src/theme/default/assets/icons/totp.svg
|
|
3917
4063
|
var React21 = __toESM(require("react"));
|
|
3918
|
-
var
|
|
4064
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3919
4065
|
var SvgTotp = (props) => {
|
|
3920
4066
|
var _a, _b;
|
|
3921
|
-
return /* @__PURE__ */ (0,
|
|
4067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
3922
4068
|
};
|
|
3923
4069
|
var totp_default = SvgTotp;
|
|
3924
4070
|
|
|
3925
4071
|
// src/theme/default/assets/icons/code-asterix.svg
|
|
3926
4072
|
var React22 = __toESM(require("react"));
|
|
3927
|
-
var
|
|
4073
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3928
4074
|
var SvgCodeAsterix = (props) => {
|
|
3929
4075
|
var _a, _b;
|
|
3930
|
-
return /* @__PURE__ */ (0,
|
|
4076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
|
|
3931
4077
|
};
|
|
3932
4078
|
var code_asterix_default = SvgCodeAsterix;
|
|
3933
4079
|
|
|
3934
4080
|
// src/theme/default/components/card/list-item.tsx
|
|
3935
|
-
var
|
|
4081
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3936
4082
|
function ListItem({
|
|
3937
4083
|
icon: Icon,
|
|
3938
4084
|
as,
|
|
@@ -3943,7 +4089,7 @@ function ListItem({
|
|
|
3943
4089
|
...props
|
|
3944
4090
|
}) {
|
|
3945
4091
|
const Comp = as || "div";
|
|
3946
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3947
4093
|
Comp,
|
|
3948
4094
|
{
|
|
3949
4095
|
...props,
|
|
@@ -3952,10 +4098,10 @@ function ListItem({
|
|
|
3952
4098
|
className
|
|
3953
4099
|
),
|
|
3954
4100
|
children: [
|
|
3955
|
-
/* @__PURE__ */ (0,
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
3958
|
-
/* @__PURE__ */ (0,
|
|
4101
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "mt-1", children: Icon && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
4102
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
4103
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
4104
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
3959
4105
|
] }),
|
|
3960
4106
|
children
|
|
3961
4107
|
]
|
|
@@ -3964,7 +4110,7 @@ function ListItem({
|
|
|
3964
4110
|
}
|
|
3965
4111
|
|
|
3966
4112
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
3967
|
-
var
|
|
4113
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
3968
4114
|
var iconsMap = {
|
|
3969
4115
|
code: code_default,
|
|
3970
4116
|
passkey: passkey_default,
|
|
@@ -3983,7 +4129,7 @@ function DefaultAuthMethodListItem({
|
|
|
3983
4129
|
var _a;
|
|
3984
4130
|
const intl = (0, import_react_intl14.useIntl)();
|
|
3985
4131
|
const Icon = iconsMap[group] || null;
|
|
3986
|
-
return /* @__PURE__ */ (0,
|
|
4132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
3987
4133
|
ListItem,
|
|
3988
4134
|
{
|
|
3989
4135
|
as: "button",
|
|
@@ -4003,13 +4149,13 @@ function DefaultAuthMethodListItem({
|
|
|
4003
4149
|
}
|
|
4004
4150
|
|
|
4005
4151
|
// src/theme/default/components/form/button.tsx
|
|
4006
|
-
var
|
|
4152
|
+
var import_client_fetch34 = require("@ory/client-fetch");
|
|
4007
4153
|
var import_elements_react9 = require("@ory/elements-react");
|
|
4008
4154
|
var import_class_variance_authority = require("class-variance-authority");
|
|
4009
4155
|
var import_react_hook_form15 = require("react-hook-form");
|
|
4010
4156
|
var import_react_intl15 = require("react-intl");
|
|
4011
|
-
var
|
|
4012
|
-
var
|
|
4157
|
+
var import_react10 = require("react");
|
|
4158
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4013
4159
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
4014
4160
|
[
|
|
4015
4161
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -4049,20 +4195,20 @@ var DefaultButton = ({
|
|
|
4049
4195
|
}) => {
|
|
4050
4196
|
var _a;
|
|
4051
4197
|
const { type, name, value, ...rest } = attributes;
|
|
4052
|
-
const [clicked, setClicked] = (0,
|
|
4198
|
+
const [clicked, setClicked] = (0, import_react10.useState)(false);
|
|
4053
4199
|
const intl = (0, import_react_intl15.useIntl)();
|
|
4054
|
-
const label = (0,
|
|
4200
|
+
const label = (0, import_client_fetch34.getNodeLabel)(node);
|
|
4055
4201
|
const {
|
|
4056
4202
|
formState: { isSubmitting },
|
|
4057
4203
|
setValue
|
|
4058
4204
|
} = (0, import_react_hook_form15.useFormContext)();
|
|
4059
|
-
(0,
|
|
4205
|
+
(0, import_react10.useEffect)(() => {
|
|
4060
4206
|
if (!isSubmitting) {
|
|
4061
4207
|
setClicked(false);
|
|
4062
4208
|
}
|
|
4063
4209
|
}, [isSubmitting]);
|
|
4064
4210
|
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret") || attributes.name.includes("action") && attributes.value === "accept";
|
|
4065
|
-
return /* @__PURE__ */ (0,
|
|
4211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
4066
4212
|
"button",
|
|
4067
4213
|
{
|
|
4068
4214
|
...omitInputAttributes(rest),
|
|
@@ -4082,8 +4228,8 @@ var DefaultButton = ({
|
|
|
4082
4228
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
4083
4229
|
"data-loading": clicked,
|
|
4084
4230
|
children: [
|
|
4085
|
-
clicked ? /* @__PURE__ */ (0,
|
|
4086
|
-
label ? /* @__PURE__ */ (0,
|
|
4231
|
+
clicked ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(Spinner, {}) : null,
|
|
4232
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: (0, import_elements_react9.uiTextToFormattedMessage)(label, intl) }) : ""
|
|
4087
4233
|
]
|
|
4088
4234
|
}
|
|
4089
4235
|
);
|
|
@@ -4091,14 +4237,14 @@ var DefaultButton = ({
|
|
|
4091
4237
|
DefaultButton.displayName = "DefaultButton";
|
|
4092
4238
|
|
|
4093
4239
|
// src/theme/default/components/form/checkbox.tsx
|
|
4094
|
-
var
|
|
4240
|
+
var import_client_fetch35 = require("@ory/client-fetch");
|
|
4095
4241
|
var import_elements_react10 = require("@ory/elements-react");
|
|
4096
4242
|
var import_react_hook_form16 = require("react-hook-form");
|
|
4097
4243
|
var import_react_intl17 = require("react-intl");
|
|
4098
4244
|
|
|
4099
4245
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
4100
4246
|
var import_react_intl16 = require("react-intl");
|
|
4101
|
-
var
|
|
4247
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4102
4248
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
4103
4249
|
function computeLabelElements(labelText) {
|
|
4104
4250
|
const elements = [];
|
|
@@ -4114,7 +4260,7 @@ function computeLabelElements(labelText) {
|
|
|
4114
4260
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
4115
4261
|
}
|
|
4116
4262
|
elements.push(
|
|
4117
|
-
/* @__PURE__ */ (0,
|
|
4263
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4118
4264
|
"a",
|
|
4119
4265
|
{
|
|
4120
4266
|
href: url,
|
|
@@ -4139,13 +4285,13 @@ function CheckboxLabel({ label }) {
|
|
|
4139
4285
|
return null;
|
|
4140
4286
|
}
|
|
4141
4287
|
const labelText = uiTextToFormattedMessage(label, intl);
|
|
4142
|
-
return /* @__PURE__ */ (0,
|
|
4288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: computeLabelElements(labelText) });
|
|
4143
4289
|
}
|
|
4144
4290
|
|
|
4145
4291
|
// src/theme/default/components/form/checkbox.tsx
|
|
4146
|
-
var
|
|
4292
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4147
4293
|
function CheckboxSVG() {
|
|
4148
|
-
return /* @__PURE__ */ (0,
|
|
4294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4149
4295
|
"svg",
|
|
4150
4296
|
{
|
|
4151
4297
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -4154,7 +4300,7 @@ function CheckboxSVG() {
|
|
|
4154
4300
|
height: "16",
|
|
4155
4301
|
viewBox: "0 0 16 16",
|
|
4156
4302
|
fill: "none",
|
|
4157
|
-
children: /* @__PURE__ */ (0,
|
|
4303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4158
4304
|
"path",
|
|
4159
4305
|
{
|
|
4160
4306
|
fillRule: "evenodd",
|
|
@@ -4171,12 +4317,12 @@ var DefaultCheckbox = ({
|
|
|
4171
4317
|
}) => {
|
|
4172
4318
|
const { value, name, ...attributes } = initialAttributes;
|
|
4173
4319
|
const intl = (0, import_react_intl17.useIntl)();
|
|
4174
|
-
const label = (0,
|
|
4320
|
+
const label = (0, import_client_fetch35.getNodeLabel)(node);
|
|
4175
4321
|
const { register } = (0, import_react_hook_form16.useFormContext)();
|
|
4176
4322
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4177
|
-
return /* @__PURE__ */ (0,
|
|
4178
|
-
/* @__PURE__ */ (0,
|
|
4179
|
-
/* @__PURE__ */ (0,
|
|
4323
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
4324
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "flex h-5 items-center", children: [
|
|
4325
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4180
4326
|
"input",
|
|
4181
4327
|
{
|
|
4182
4328
|
...omitInputAttributes(attributes),
|
|
@@ -4186,14 +4332,15 @@ var DefaultCheckbox = ({
|
|
|
4186
4332
|
"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",
|
|
4187
4333
|
hasError && "border-interface-border-validation-danger"
|
|
4188
4334
|
),
|
|
4335
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
4189
4336
|
...register(name)
|
|
4190
4337
|
}
|
|
4191
4338
|
),
|
|
4192
|
-
/* @__PURE__ */ (0,
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CheckboxSVG, {})
|
|
4193
4340
|
] }),
|
|
4194
|
-
/* @__PURE__ */ (0,
|
|
4195
|
-
/* @__PURE__ */ (0,
|
|
4196
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
4341
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("span", { className: "flex flex-col", children: [
|
|
4342
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CheckboxLabel, { label }) }),
|
|
4343
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4197
4344
|
"span",
|
|
4198
4345
|
{
|
|
4199
4346
|
className: cn(
|
|
@@ -4211,13 +4358,13 @@ var DefaultCheckbox = ({
|
|
|
4211
4358
|
|
|
4212
4359
|
// src/theme/default/components/form/group-container.tsx
|
|
4213
4360
|
var import_elements_react11 = require("@ory/elements-react");
|
|
4214
|
-
var
|
|
4361
|
+
var import_client_fetch36 = require("@ory/client-fetch");
|
|
4215
4362
|
|
|
4216
4363
|
// src/util/childCounter.ts
|
|
4217
|
-
var
|
|
4364
|
+
var import_react11 = require("react");
|
|
4218
4365
|
function countRenderableChildren(children) {
|
|
4219
|
-
return
|
|
4220
|
-
if ((0,
|
|
4366
|
+
return import_react11.Children.toArray(children).filter((c) => {
|
|
4367
|
+
if ((0, import_react11.isValidElement)(c)) {
|
|
4221
4368
|
return true;
|
|
4222
4369
|
}
|
|
4223
4370
|
return false;
|
|
@@ -4225,19 +4372,19 @@ function countRenderableChildren(children) {
|
|
|
4225
4372
|
}
|
|
4226
4373
|
|
|
4227
4374
|
// src/theme/default/components/form/group-container.tsx
|
|
4228
|
-
var
|
|
4375
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4229
4376
|
function DefaultGroupContainer({ children }) {
|
|
4230
4377
|
const { flowType } = (0, import_elements_react11.useOryFlow)();
|
|
4231
4378
|
const count = countRenderableChildren(children);
|
|
4232
4379
|
if (count === 0) {
|
|
4233
4380
|
return null;
|
|
4234
4381
|
}
|
|
4235
|
-
return /* @__PURE__ */ (0,
|
|
4382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4236
4383
|
"div",
|
|
4237
4384
|
{
|
|
4238
4385
|
className: cn(
|
|
4239
4386
|
"grid",
|
|
4240
|
-
flowType ===
|
|
4387
|
+
flowType === import_client_fetch36.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
4241
4388
|
),
|
|
4242
4389
|
children
|
|
4243
4390
|
}
|
|
@@ -4245,16 +4392,16 @@ function DefaultGroupContainer({ children }) {
|
|
|
4245
4392
|
}
|
|
4246
4393
|
|
|
4247
4394
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
4248
|
-
var
|
|
4395
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4249
4396
|
function DefaultHorizontalDivider() {
|
|
4250
|
-
return /* @__PURE__ */ (0,
|
|
4397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("hr", { className: "border-interface-border-default-primary" });
|
|
4251
4398
|
}
|
|
4252
4399
|
|
|
4253
4400
|
// src/theme/default/components/form/image.tsx
|
|
4254
|
-
var
|
|
4401
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4255
4402
|
function DefaultImage({ attributes, node }) {
|
|
4256
4403
|
var _a;
|
|
4257
|
-
return /* @__PURE__ */ (0,
|
|
4404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
4258
4405
|
"img",
|
|
4259
4406
|
{
|
|
4260
4407
|
...omitInputAttributes(attributes),
|
|
@@ -4264,35 +4411,35 @@ function DefaultImage({ attributes, node }) {
|
|
|
4264
4411
|
}
|
|
4265
4412
|
|
|
4266
4413
|
// src/theme/default/components/form/input.tsx
|
|
4267
|
-
var
|
|
4414
|
+
var import_client_fetch37 = require("@ory/client-fetch");
|
|
4268
4415
|
var import_elements_react12 = require("@ory/elements-react");
|
|
4269
|
-
var
|
|
4416
|
+
var import_react12 = require("react");
|
|
4270
4417
|
var import_react_hook_form17 = require("react-hook-form");
|
|
4271
4418
|
var import_react_intl18 = require("react-intl");
|
|
4272
4419
|
|
|
4273
4420
|
// src/theme/default/assets/icons/eye-off.svg
|
|
4274
4421
|
var React23 = __toESM(require("react"));
|
|
4275
|
-
var
|
|
4422
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4276
4423
|
var SvgEyeOff = (props) => {
|
|
4277
4424
|
var _a, _b;
|
|
4278
|
-
return /* @__PURE__ */ (0,
|
|
4425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
|
|
4279
4426
|
};
|
|
4280
4427
|
var eye_off_default = SvgEyeOff;
|
|
4281
4428
|
|
|
4282
4429
|
// src/theme/default/assets/icons/eye.svg
|
|
4283
4430
|
var React24 = __toESM(require("react"));
|
|
4284
|
-
var
|
|
4431
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4285
4432
|
var SvgEye = (props) => {
|
|
4286
4433
|
var _a, _b;
|
|
4287
|
-
return /* @__PURE__ */ (0,
|
|
4288
|
-
/* @__PURE__ */ (0,
|
|
4289
|
-
/* @__PURE__ */ (0,
|
|
4434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
4436
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
4290
4437
|
] }) });
|
|
4291
4438
|
};
|
|
4292
4439
|
var eye_default = SvgEye;
|
|
4293
4440
|
|
|
4294
4441
|
// src/theme/default/components/form/input.tsx
|
|
4295
|
-
var
|
|
4442
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4296
4443
|
var defaultInputClassName = cn(
|
|
4297
4444
|
"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",
|
|
4298
4445
|
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
@@ -4306,12 +4453,12 @@ var DefaultInput = ({
|
|
|
4306
4453
|
attributes,
|
|
4307
4454
|
onClick
|
|
4308
4455
|
}) => {
|
|
4309
|
-
const label = (0,
|
|
4456
|
+
const label = (0, import_client_fetch37.getNodeLabel)(node);
|
|
4310
4457
|
const { register } = (0, import_react_hook_form17.useFormContext)();
|
|
4311
4458
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4312
4459
|
const intl = (0, import_react_intl18.useIntl)();
|
|
4313
4460
|
const { flowType } = (0, import_elements_react12.useOryFlow)();
|
|
4314
|
-
const inputRef = (0,
|
|
4461
|
+
const inputRef = (0, import_react12.useRef)(null);
|
|
4315
4462
|
const formattedLabel = label ? intl.formatMessage(
|
|
4316
4463
|
{
|
|
4317
4464
|
id: "input.placeholder",
|
|
@@ -4322,10 +4469,10 @@ var DefaultInput = ({
|
|
|
4322
4469
|
}
|
|
4323
4470
|
) : "";
|
|
4324
4471
|
if (rest.type === "hidden") {
|
|
4325
|
-
return /* @__PURE__ */ (0,
|
|
4472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4326
4473
|
"input",
|
|
4327
4474
|
{
|
|
4328
|
-
...rest,
|
|
4475
|
+
...omitInputAttributes(rest),
|
|
4329
4476
|
onClick,
|
|
4330
4477
|
maxLength: maxlength,
|
|
4331
4478
|
autoComplete: autocomplete,
|
|
@@ -4336,16 +4483,16 @@ var DefaultInput = ({
|
|
|
4336
4483
|
);
|
|
4337
4484
|
}
|
|
4338
4485
|
const { ref, ...restRegister } = register(name, { value });
|
|
4339
|
-
return /* @__PURE__ */ (0,
|
|
4486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
4340
4487
|
"div",
|
|
4341
4488
|
{
|
|
4342
4489
|
className: cn(
|
|
4343
4490
|
"relative flex justify-stretch",
|
|
4344
4491
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4345
|
-
flowType ===
|
|
4492
|
+
flowType === import_client_fetch37.FlowType.Settings && "max-w-[488px]"
|
|
4346
4493
|
),
|
|
4347
4494
|
children: [
|
|
4348
|
-
/* @__PURE__ */ (0,
|
|
4495
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4349
4496
|
"input",
|
|
4350
4497
|
{
|
|
4351
4498
|
...omitInputAttributes(rest),
|
|
@@ -4362,7 +4509,7 @@ var DefaultInput = ({
|
|
|
4362
4509
|
...restRegister
|
|
4363
4510
|
}
|
|
4364
4511
|
),
|
|
4365
|
-
rest.type === "password" && /* @__PURE__ */ (0,
|
|
4512
|
+
rest.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PasswordToggle, { inputRef })
|
|
4366
4513
|
]
|
|
4367
4514
|
}
|
|
4368
4515
|
);
|
|
@@ -4370,31 +4517,31 @@ var DefaultInput = ({
|
|
|
4370
4517
|
function PasswordToggle({
|
|
4371
4518
|
inputRef
|
|
4372
4519
|
}) {
|
|
4373
|
-
const [shown, setShown] = (0,
|
|
4520
|
+
const [shown, setShown] = (0, import_react12.useState)(false);
|
|
4374
4521
|
const handleClick = () => {
|
|
4375
4522
|
setShown(!shown);
|
|
4376
4523
|
if (inputRef.current) {
|
|
4377
4524
|
inputRef.current.type = shown ? "password" : "text";
|
|
4378
4525
|
}
|
|
4379
4526
|
};
|
|
4380
|
-
return /* @__PURE__ */ (0,
|
|
4527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4381
4528
|
"button",
|
|
4382
4529
|
{
|
|
4383
4530
|
onClick: handleClick,
|
|
4384
4531
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
4385
4532
|
type: "button",
|
|
4386
4533
|
"aria-label": "Toggle password visibility",
|
|
4387
|
-
children: shown ? /* @__PURE__ */ (0,
|
|
4534
|
+
children: shown ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(eye_default, {})
|
|
4388
4535
|
}
|
|
4389
4536
|
);
|
|
4390
4537
|
}
|
|
4391
4538
|
|
|
4392
4539
|
// src/theme/default/components/form/label.tsx
|
|
4393
|
-
var
|
|
4540
|
+
var import_client_fetch38 = require("@ory/client-fetch");
|
|
4394
4541
|
var import_elements_react13 = require("@ory/elements-react");
|
|
4395
4542
|
var import_react_hook_form18 = require("react-hook-form");
|
|
4396
4543
|
var import_react_intl19 = require("react-intl");
|
|
4397
|
-
var
|
|
4544
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4398
4545
|
function findResendNode(nodes) {
|
|
4399
4546
|
return nodes.find(
|
|
4400
4547
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -4407,9 +4554,10 @@ function DefaultLabel({
|
|
|
4407
4554
|
...rest
|
|
4408
4555
|
}) {
|
|
4409
4556
|
const intl = (0, import_react_intl19.useIntl)();
|
|
4410
|
-
const label = (0,
|
|
4557
|
+
const label = (0, import_client_fetch38.getNodeLabel)(node);
|
|
4411
4558
|
const { Message } = (0, import_elements_react13.useComponents)();
|
|
4412
|
-
const {
|
|
4559
|
+
const { flowType, flow } = (0, import_elements_react13.useOryFlow)();
|
|
4560
|
+
const config = (0, import_elements_react13.useOryConfiguration)();
|
|
4413
4561
|
const { setValue, formState } = (0, import_react_hook_form18.useFormContext)();
|
|
4414
4562
|
const isPassword = attributes.type === "password";
|
|
4415
4563
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
@@ -4419,9 +4567,9 @@ function DefaultLabel({
|
|
|
4419
4567
|
}
|
|
4420
4568
|
};
|
|
4421
4569
|
const fieldError = formState.errors[attributes.name];
|
|
4422
|
-
return /* @__PURE__ */ (0,
|
|
4423
|
-
label && /* @__PURE__ */ (0,
|
|
4424
|
-
/* @__PURE__ */ (0,
|
|
4570
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
4571
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("span", { className: "inline-flex justify-between", children: [
|
|
4572
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4425
4573
|
"label",
|
|
4426
4574
|
{
|
|
4427
4575
|
...(0, import_elements_react13.messageTestId)(label),
|
|
@@ -4432,8 +4580,8 @@ function DefaultLabel({
|
|
|
4432
4580
|
children: (0, import_elements_react13.uiTextToFormattedMessage)(label, intl)
|
|
4433
4581
|
}
|
|
4434
4582
|
),
|
|
4435
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
4436
|
-
/* @__PURE__ */ (0,
|
|
4583
|
+
isPassword && config.project.recovery_enabled && flowType === import_client_fetch38.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
4584
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4437
4585
|
"a",
|
|
4438
4586
|
{
|
|
4439
4587
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -4444,7 +4592,7 @@ function DefaultLabel({
|
|
|
4444
4592
|
})
|
|
4445
4593
|
}
|
|
4446
4594
|
),
|
|
4447
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0,
|
|
4595
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
4448
4596
|
"button",
|
|
4449
4597
|
{
|
|
4450
4598
|
type: "submit",
|
|
@@ -4457,21 +4605,21 @@ function DefaultLabel({
|
|
|
4457
4605
|
)
|
|
4458
4606
|
] }),
|
|
4459
4607
|
children,
|
|
4460
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
4461
|
-
fieldError && (0,
|
|
4608
|
+
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Message.Content, { message }, message.id)),
|
|
4609
|
+
fieldError && (0, import_client_fetch38.instanceOfUiText)(fieldError) && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Message.Content, { message: fieldError })
|
|
4462
4610
|
] });
|
|
4463
4611
|
}
|
|
4464
4612
|
|
|
4465
4613
|
// src/theme/default/components/form/link-button.tsx
|
|
4466
|
-
var
|
|
4614
|
+
var import_client_fetch39 = require("@ory/client-fetch");
|
|
4467
4615
|
var import_elements_react14 = require("@ory/elements-react");
|
|
4468
|
-
var
|
|
4616
|
+
var import_react13 = require("react");
|
|
4469
4617
|
var import_react_intl20 = require("react-intl");
|
|
4470
|
-
var
|
|
4471
|
-
var DefaultLinkButton = (0,
|
|
4618
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4619
|
+
var DefaultLinkButton = (0, import_react13.forwardRef)(({ attributes, node }, ref) => {
|
|
4472
4620
|
const intl = (0, import_react_intl20.useIntl)();
|
|
4473
|
-
const label = (0,
|
|
4474
|
-
return /* @__PURE__ */ (0,
|
|
4621
|
+
const label = (0, import_client_fetch39.getNodeLabel)(node);
|
|
4622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4475
4623
|
"a",
|
|
4476
4624
|
{
|
|
4477
4625
|
...omitInputAttributes(attributes),
|
|
@@ -4493,8 +4641,8 @@ var import_react_hook_form19 = require("react-hook-form");
|
|
|
4493
4641
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
4494
4642
|
var import_input_otp = require("input-otp");
|
|
4495
4643
|
var React25 = __toESM(require("react"));
|
|
4496
|
-
var
|
|
4497
|
-
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4644
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
4645
|
+
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
4498
4646
|
import_input_otp.OTPInput,
|
|
4499
4647
|
{
|
|
4500
4648
|
ref,
|
|
@@ -4507,12 +4655,12 @@ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props },
|
|
|
4507
4655
|
}
|
|
4508
4656
|
));
|
|
4509
4657
|
InputOTP.displayName = "InputOTP";
|
|
4510
|
-
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
4658
|
+
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
4511
4659
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4512
4660
|
var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
4513
4661
|
const inputOTPContext = React25.useContext(import_input_otp.OTPInputContext);
|
|
4514
4662
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
4515
|
-
return /* @__PURE__ */ (0,
|
|
4663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4516
4664
|
"div",
|
|
4517
4665
|
{
|
|
4518
4666
|
ref,
|
|
@@ -4524,8 +4672,8 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4524
4672
|
),
|
|
4525
4673
|
...props,
|
|
4526
4674
|
children: [
|
|
4527
|
-
/* @__PURE__ */ (0,
|
|
4528
|
-
hasFakeCaret && /* @__PURE__ */ (0,
|
|
4675
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "inline-block size-4", children: char }),
|
|
4676
|
+
hasFakeCaret && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
4529
4677
|
]
|
|
4530
4678
|
}
|
|
4531
4679
|
);
|
|
@@ -4534,8 +4682,8 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
4534
4682
|
|
|
4535
4683
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4536
4684
|
var import_elements_react15 = require("@ory/elements-react");
|
|
4537
|
-
var
|
|
4538
|
-
var
|
|
4685
|
+
var import_client_fetch40 = require("@ory/client-fetch");
|
|
4686
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4539
4687
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4540
4688
|
const { setValue, watch } = (0, import_react_hook_form19.useFormContext)();
|
|
4541
4689
|
const { maxlength, name } = attributes;
|
|
@@ -4545,22 +4693,22 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4545
4693
|
setValue(name, v);
|
|
4546
4694
|
};
|
|
4547
4695
|
const value = watch(name);
|
|
4548
|
-
return /* @__PURE__ */ (0,
|
|
4696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4549
4697
|
InputOTP,
|
|
4550
4698
|
{
|
|
4551
4699
|
maxLength: maxlength != null ? maxlength : 6,
|
|
4552
4700
|
onChange: handleInputChange,
|
|
4553
4701
|
name,
|
|
4554
4702
|
value,
|
|
4555
|
-
children: /* @__PURE__ */ (0,
|
|
4703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4556
4704
|
InputOTPGroup,
|
|
4557
4705
|
{
|
|
4558
4706
|
className: cn(
|
|
4559
4707
|
"w-full flex gap-2 justify-stretch",
|
|
4560
4708
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4561
|
-
flowType ===
|
|
4709
|
+
flowType === import_client_fetch40.FlowType.Settings && "max-w-[488px]"
|
|
4562
4710
|
),
|
|
4563
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0,
|
|
4711
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(InputOTPSlot, { index }, index))
|
|
4564
4712
|
}
|
|
4565
4713
|
)
|
|
4566
4714
|
}
|
|
@@ -4568,13 +4716,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4568
4716
|
};
|
|
4569
4717
|
|
|
4570
4718
|
// src/theme/default/components/form/section.tsx
|
|
4571
|
-
var
|
|
4719
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4572
4720
|
var DefaultFormSection = ({
|
|
4573
4721
|
children,
|
|
4574
4722
|
nodes: _nodes,
|
|
4575
4723
|
...rest
|
|
4576
4724
|
}) => {
|
|
4577
|
-
return /* @__PURE__ */ (0,
|
|
4725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4578
4726
|
"form",
|
|
4579
4727
|
{
|
|
4580
4728
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -4588,10 +4736,10 @@ var DefaultFormSectionContent = ({
|
|
|
4588
4736
|
description,
|
|
4589
4737
|
children
|
|
4590
4738
|
}) => {
|
|
4591
|
-
return /* @__PURE__ */ (0,
|
|
4592
|
-
/* @__PURE__ */ (0,
|
|
4593
|
-
/* @__PURE__ */ (0,
|
|
4594
|
-
/* @__PURE__ */ (0,
|
|
4739
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
|
|
4740
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
4741
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
4742
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
4595
4743
|
] }),
|
|
4596
4744
|
children
|
|
4597
4745
|
] });
|
|
@@ -4600,14 +4748,14 @@ var DefaultFormSectionFooter = ({
|
|
|
4600
4748
|
children,
|
|
4601
4749
|
text
|
|
4602
4750
|
}) => {
|
|
4603
|
-
return /* @__PURE__ */ (0,
|
|
4751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
4604
4752
|
"div",
|
|
4605
4753
|
{
|
|
4606
4754
|
className: cn(
|
|
4607
4755
|
"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"
|
|
4608
4756
|
),
|
|
4609
4757
|
children: [
|
|
4610
|
-
/* @__PURE__ */ (0,
|
|
4758
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: text }),
|
|
4611
4759
|
children
|
|
4612
4760
|
]
|
|
4613
4761
|
}
|
|
@@ -4617,31 +4765,31 @@ var DefaultFormSectionFooter = ({
|
|
|
4617
4765
|
// src/theme/default/components/form/text.tsx
|
|
4618
4766
|
var import_elements_react16 = require("@ory/elements-react");
|
|
4619
4767
|
var import_react_intl21 = require("react-intl");
|
|
4620
|
-
var
|
|
4768
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4621
4769
|
function DefaultText({ node, attributes }) {
|
|
4622
4770
|
var _a;
|
|
4623
4771
|
const intl = (0, import_react_intl21.useIntl)();
|
|
4624
4772
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
4625
4773
|
if (lookup) {
|
|
4626
|
-
return /* @__PURE__ */ (0,
|
|
4627
|
-
/* @__PURE__ */ (0,
|
|
4628
|
-
lookup.map((text, index) => /* @__PURE__ */ (0,
|
|
4774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(import_jsx_runtime80.Fragment, { children: [
|
|
4775
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react16.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
|
|
4776
|
+
lookup.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
|
|
4629
4777
|
"pre",
|
|
4630
4778
|
{
|
|
4631
4779
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
4632
|
-
children: /* @__PURE__ */ (0,
|
|
4780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("code", { children: text ? (0, import_elements_react16.uiTextToFormattedMessage)(text, intl) : "" })
|
|
4633
4781
|
},
|
|
4634
4782
|
index
|
|
4635
4783
|
))
|
|
4636
4784
|
] });
|
|
4637
4785
|
}
|
|
4638
|
-
return /* @__PURE__ */ (0,
|
|
4786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
4639
4787
|
"p",
|
|
4640
4788
|
{
|
|
4641
4789
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
4642
4790
|
id: attributes.id,
|
|
4643
4791
|
children: [
|
|
4644
|
-
node.meta.label ? /* @__PURE__ */ (0,
|
|
4792
|
+
node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("label", { children: (0, import_elements_react16.uiTextToFormattedMessage)(node.meta.label, intl) }) : null,
|
|
4645
4793
|
attributes.text ? (0, import_elements_react16.uiTextToFormattedMessage)(attributes.text, intl) : ""
|
|
4646
4794
|
]
|
|
4647
4795
|
}
|
|
@@ -4657,21 +4805,21 @@ var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
|
4657
4805
|
|
|
4658
4806
|
// src/theme/default/assets/icons/logout.svg
|
|
4659
4807
|
var React26 = __toESM(require("react"));
|
|
4660
|
-
var
|
|
4808
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
4661
4809
|
var SvgLogout = (props) => {
|
|
4662
4810
|
var _a, _b;
|
|
4663
|
-
return /* @__PURE__ */ (0,
|
|
4811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
|
|
4664
4812
|
};
|
|
4665
4813
|
var logout_default = SvgLogout;
|
|
4666
4814
|
|
|
4667
4815
|
// src/theme/default/assets/icons/settings.svg
|
|
4668
4816
|
var React27 = __toESM(require("react"));
|
|
4669
|
-
var
|
|
4817
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4670
4818
|
var SvgSettings = (props) => {
|
|
4671
4819
|
var _a, _b;
|
|
4672
|
-
return /* @__PURE__ */ (0,
|
|
4673
|
-
/* @__PURE__ */ (0,
|
|
4674
|
-
/* @__PURE__ */ (0,
|
|
4820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4821
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
|
|
4822
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
4675
4823
|
] }) });
|
|
4676
4824
|
};
|
|
4677
4825
|
var settings_default = SvgSettings;
|
|
@@ -4716,12 +4864,12 @@ var getUserInitials = (session) => {
|
|
|
4716
4864
|
};
|
|
4717
4865
|
|
|
4718
4866
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
4719
|
-
var
|
|
4867
|
+
var import_react14 = require("react");
|
|
4720
4868
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
4721
|
-
var
|
|
4869
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4722
4870
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4723
4871
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4724
|
-
var DropdownMenuContent = (0,
|
|
4872
|
+
var DropdownMenuContent = (0, import_react14.forwardRef)(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4725
4873
|
DropdownMenuPrimitive.Content,
|
|
4726
4874
|
{
|
|
4727
4875
|
ref,
|
|
@@ -4736,7 +4884,7 @@ var DropdownMenuContent = (0, import_react12.forwardRef)(({ className, sideOffse
|
|
|
4736
4884
|
}
|
|
4737
4885
|
) }));
|
|
4738
4886
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4739
|
-
var DropdownMenuItem = (0,
|
|
4887
|
+
var DropdownMenuItem = (0, import_react14.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4740
4888
|
DropdownMenuPrimitive.Item,
|
|
4741
4889
|
{
|
|
4742
4890
|
ref,
|
|
@@ -4754,7 +4902,7 @@ var DropdownMenuItem = (0, import_react12.forwardRef)(({ className, inset, ...pr
|
|
|
4754
4902
|
}
|
|
4755
4903
|
));
|
|
4756
4904
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4757
|
-
var DropdownMenuLabel = (0,
|
|
4905
|
+
var DropdownMenuLabel = (0, import_react14.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4758
4906
|
DropdownMenuPrimitive.Label,
|
|
4759
4907
|
{
|
|
4760
4908
|
ref,
|
|
@@ -4769,35 +4917,35 @@ var DropdownMenuLabel = (0, import_react12.forwardRef)(({ className, inset, ...p
|
|
|
4769
4917
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
4770
4918
|
|
|
4771
4919
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4772
|
-
var
|
|
4920
|
+
var import_react15 = require("react");
|
|
4773
4921
|
|
|
4774
4922
|
// src/theme/default/assets/icons/user.svg
|
|
4775
4923
|
var React28 = __toESM(require("react"));
|
|
4776
|
-
var
|
|
4924
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4777
4925
|
var SvgUser = (props) => {
|
|
4778
4926
|
var _a, _b;
|
|
4779
|
-
return /* @__PURE__ */ (0,
|
|
4927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
|
|
4780
4928
|
};
|
|
4781
4929
|
var user_default = SvgUser;
|
|
4782
4930
|
|
|
4783
4931
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4784
|
-
var
|
|
4785
|
-
var UserAvatar = (0,
|
|
4932
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4933
|
+
var UserAvatar = (0, import_react15.forwardRef)(
|
|
4786
4934
|
({ initials, ...rest }, ref) => {
|
|
4787
|
-
return /* @__PURE__ */ (0,
|
|
4935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4788
4936
|
"button",
|
|
4789
4937
|
{
|
|
4790
4938
|
ref,
|
|
4791
4939
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
4792
4940
|
...rest,
|
|
4793
|
-
children: /* @__PURE__ */ (0,
|
|
4941
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4794
4942
|
"img",
|
|
4795
4943
|
{
|
|
4796
4944
|
src: initials.avatar,
|
|
4797
4945
|
alt: initials.primary,
|
|
4798
4946
|
className: "w-full object-contain"
|
|
4799
4947
|
}
|
|
4800
|
-
) : /* @__PURE__ */ (0,
|
|
4948
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4801
4949
|
user_default,
|
|
4802
4950
|
{
|
|
4803
4951
|
size: 24,
|
|
@@ -4811,27 +4959,27 @@ var UserAvatar = (0, import_react13.forwardRef)(
|
|
|
4811
4959
|
UserAvatar.displayName = "UserAvatar";
|
|
4812
4960
|
|
|
4813
4961
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4814
|
-
var
|
|
4962
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4815
4963
|
var UserMenu = ({ session }) => {
|
|
4816
|
-
const
|
|
4964
|
+
const config = (0, import_elements_react17.useOryConfiguration)();
|
|
4817
4965
|
const initials = getUserInitials(session);
|
|
4818
4966
|
const { logoutFlow } = useClientLogout(config);
|
|
4819
|
-
return /* @__PURE__ */ (0,
|
|
4820
|
-
/* @__PURE__ */ (0,
|
|
4821
|
-
/* @__PURE__ */ (0,
|
|
4822
|
-
/* @__PURE__ */ (0,
|
|
4823
|
-
/* @__PURE__ */ (0,
|
|
4824
|
-
/* @__PURE__ */ (0,
|
|
4825
|
-
/* @__PURE__ */ (0,
|
|
4826
|
-
initials.secondary && /* @__PURE__ */ (0,
|
|
4967
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(DropdownMenu, { children: [
|
|
4968
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(UserAvatar, { initials, title: "User Menu" }) }),
|
|
4969
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(DropdownMenuContent, { children: [
|
|
4970
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_react_dropdown_menu.DropdownMenuLabel, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
4971
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(UserAvatar, { disabled: true, initials }),
|
|
4972
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
4973
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
4974
|
+
initials.secondary && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
4827
4975
|
] })
|
|
4828
4976
|
] }),
|
|
4829
|
-
/* @__PURE__ */ (0,
|
|
4830
|
-
/* @__PURE__ */ (0,
|
|
4977
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("a", { href: "/settings", children: [
|
|
4978
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(settings_default, { size: 16 }),
|
|
4831
4979
|
" User settings"
|
|
4832
4980
|
] }) }),
|
|
4833
|
-
/* @__PURE__ */ (0,
|
|
4834
|
-
/* @__PURE__ */ (0,
|
|
4981
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
4982
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(logout_default, { size: 16 }),
|
|
4835
4983
|
" Logout"
|
|
4836
4984
|
] }) })
|
|
4837
4985
|
] })
|
|
@@ -4839,29 +4987,30 @@ var UserMenu = ({ session }) => {
|
|
|
4839
4987
|
};
|
|
4840
4988
|
|
|
4841
4989
|
// src/theme/default/components/generic/page-header.tsx
|
|
4842
|
-
var
|
|
4990
|
+
var import_client4 = require("@ory/elements-react/client");
|
|
4843
4991
|
var import_react_intl22 = require("react-intl");
|
|
4844
|
-
var
|
|
4992
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4845
4993
|
var DefaultPageHeader = (_props) => {
|
|
4846
4994
|
var _a;
|
|
4847
4995
|
const { Card } = (0, import_elements_react18.useComponents)();
|
|
4848
|
-
const { session } = (0,
|
|
4996
|
+
const { session } = (0, import_client4.useSession)();
|
|
4849
4997
|
const intl = (0, import_react_intl22.useIntl)();
|
|
4850
|
-
const {
|
|
4998
|
+
const { flow } = (0, import_elements_react18.useOryFlow)();
|
|
4999
|
+
const config = (0, import_elements_react18.useOryConfiguration)();
|
|
4851
5000
|
const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
|
|
4852
|
-
return /* @__PURE__ */ (0,
|
|
4853
|
-
/* @__PURE__ */ (0,
|
|
4854
|
-
/* @__PURE__ */ (0,
|
|
4855
|
-
/* @__PURE__ */ (0,
|
|
5001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex flex-col gap-12", children: [
|
|
5002
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: "flex max-h-10 flex-1 justify-between gap-2 items-center", children: [
|
|
5003
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Card.Logo, {}),
|
|
5004
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(UserMenu, { session })
|
|
4856
5005
|
] }),
|
|
4857
|
-
returnUrl && /* @__PURE__ */ (0,
|
|
5006
|
+
returnUrl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
4858
5007
|
"a",
|
|
4859
5008
|
{
|
|
4860
5009
|
"data-testid": "ory/screen/settings/back-button",
|
|
4861
5010
|
href: returnUrl,
|
|
4862
5011
|
className: "inline-flex gap-2 items-center",
|
|
4863
5012
|
children: [
|
|
4864
|
-
/* @__PURE__ */ (0,
|
|
5013
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(arrow_left_default, {}),
|
|
4865
5014
|
" ",
|
|
4866
5015
|
intl.formatMessage({
|
|
4867
5016
|
id: "settings.navigation-back-button",
|
|
@@ -4874,31 +5023,31 @@ var DefaultPageHeader = (_props) => {
|
|
|
4874
5023
|
};
|
|
4875
5024
|
|
|
4876
5025
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4877
|
-
var
|
|
5026
|
+
var import_react16 = require("react");
|
|
4878
5027
|
var import_react_hook_form20 = require("react-hook-form");
|
|
4879
5028
|
var import_usehooks_ts2 = require("usehooks-ts");
|
|
4880
5029
|
|
|
4881
5030
|
// src/theme/default/assets/icons/trash.svg
|
|
4882
5031
|
var React29 = __toESM(require("react"));
|
|
4883
|
-
var
|
|
5032
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4884
5033
|
var SvgTrash = (props) => {
|
|
4885
5034
|
var _a, _b;
|
|
4886
|
-
return /* @__PURE__ */ (0,
|
|
5035
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
|
|
4887
5036
|
};
|
|
4888
5037
|
var trash_default = SvgTrash;
|
|
4889
5038
|
|
|
4890
5039
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4891
|
-
var
|
|
5040
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4892
5041
|
function DefaultSettingsOidc({
|
|
4893
5042
|
linkButtons,
|
|
4894
5043
|
unlinkButtons
|
|
4895
5044
|
}) {
|
|
4896
5045
|
const hasLinkButtons = linkButtons.length > 0;
|
|
4897
5046
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
4898
|
-
return /* @__PURE__ */ (0,
|
|
4899
|
-
hasLinkButtons && /* @__PURE__ */ (0,
|
|
5047
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5048
|
+
hasLinkButtons && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
4900
5049
|
const attrs = button.attributes;
|
|
4901
|
-
return /* @__PURE__ */ (0,
|
|
5050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4902
5051
|
DefaultButtonSocial,
|
|
4903
5052
|
{
|
|
4904
5053
|
showLabel: true,
|
|
@@ -4909,17 +5058,17 @@ function DefaultSettingsOidc({
|
|
|
4909
5058
|
attrs.value
|
|
4910
5059
|
);
|
|
4911
5060
|
}) }),
|
|
4912
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0,
|
|
5061
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
4913
5062
|
unlinkButtons.map((button) => {
|
|
4914
5063
|
if (button.attributes.node_type !== "input") {
|
|
4915
5064
|
return null;
|
|
4916
5065
|
}
|
|
4917
|
-
return /* @__PURE__ */ (0,
|
|
5066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UnlinkRow, { button }, button.attributes.value);
|
|
4918
5067
|
})
|
|
4919
5068
|
] });
|
|
4920
5069
|
}
|
|
4921
5070
|
function UnlinkRow({ button }) {
|
|
4922
|
-
var _a, _b;
|
|
5071
|
+
var _a, _b, _c;
|
|
4923
5072
|
const [clicked, setClicked] = (0, import_usehooks_ts2.useDebounceValue)(false, 100);
|
|
4924
5073
|
const {
|
|
4925
5074
|
formState: { isSubmitting }
|
|
@@ -4931,26 +5080,27 @@ function UnlinkRow({ button }) {
|
|
|
4931
5080
|
button.onClick();
|
|
4932
5081
|
setClicked(true);
|
|
4933
5082
|
};
|
|
4934
|
-
(0,
|
|
5083
|
+
(0, import_react16.useEffect)(() => {
|
|
4935
5084
|
if (!isSubmitting) {
|
|
4936
5085
|
setClicked(false);
|
|
4937
5086
|
}
|
|
4938
5087
|
}, [isSubmitting, setClicked]);
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
/* @__PURE__ */ (0,
|
|
5088
|
+
console.log((_c = button.meta.label) == null ? void 0 : _c.context);
|
|
5089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex justify-between", children: [
|
|
5090
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-center gap-6", children: [
|
|
5091
|
+
Logo ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Logo, { size: 32 }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(GenericLogo, { label: provider.slice(0, 1) }),
|
|
5092
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
4943
5093
|
] }),
|
|
4944
|
-
/* @__PURE__ */ (0,
|
|
5094
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4945
5095
|
"button",
|
|
4946
5096
|
{
|
|
4947
|
-
...attrs,
|
|
5097
|
+
...omitInputAttributes(attrs),
|
|
4948
5098
|
type: "submit",
|
|
4949
5099
|
onClick: localOnClick,
|
|
4950
5100
|
disabled: isSubmitting,
|
|
4951
5101
|
className: "relative",
|
|
4952
5102
|
title: `Unlink ${provider}`,
|
|
4953
|
-
children: clicked ? /* @__PURE__ */ (0,
|
|
5103
|
+
children: clicked ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4954
5104
|
trash_default,
|
|
4955
5105
|
{
|
|
4956
5106
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -4965,7 +5115,7 @@ function UnlinkRow({ button }) {
|
|
|
4965
5115
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
4966
5116
|
var import_elements_react19 = require("@ory/elements-react");
|
|
4967
5117
|
var import_react_hook_form21 = require("react-hook-form");
|
|
4968
|
-
var
|
|
5118
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
4969
5119
|
function DefaultSettingsPasskey({
|
|
4970
5120
|
triggerButton,
|
|
4971
5121
|
removeButtons
|
|
@@ -4975,8 +5125,8 @@ function DefaultSettingsPasskey({
|
|
|
4975
5125
|
} = (0, import_react_hook_form21.useFormContext)();
|
|
4976
5126
|
const { Node: Node2 } = (0, import_elements_react19.useComponents)();
|
|
4977
5127
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
4978
|
-
return /* @__PURE__ */ (0,
|
|
4979
|
-
/* @__PURE__ */ (0,
|
|
5128
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5129
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
4980
5130
|
Node2.Button,
|
|
4981
5131
|
{
|
|
4982
5132
|
node: triggerButton,
|
|
@@ -4984,38 +5134,38 @@ function DefaultSettingsPasskey({
|
|
|
4984
5134
|
onClick: triggerButton.onClick
|
|
4985
5135
|
}
|
|
4986
5136
|
) }),
|
|
4987
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
4988
|
-
/* @__PURE__ */ (0,
|
|
4989
|
-
/* @__PURE__ */ (0,
|
|
5137
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5138
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(DefaultHorizontalDivider, {}),
|
|
5139
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
4990
5140
|
var _a, _b;
|
|
4991
5141
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
4992
5142
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
4993
5143
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
4994
5144
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
4995
|
-
return /* @__PURE__ */ (0,
|
|
5145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
4996
5146
|
"div",
|
|
4997
5147
|
{
|
|
4998
5148
|
className: "flex justify-between gap-6 md:items-center",
|
|
4999
5149
|
children: [
|
|
5000
|
-
/* @__PURE__ */ (0,
|
|
5001
|
-
/* @__PURE__ */ (0,
|
|
5150
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5151
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5002
5152
|
passkey_default,
|
|
5003
5153
|
{
|
|
5004
5154
|
size: 32,
|
|
5005
5155
|
className: "text-interface-foreground-default-primary"
|
|
5006
5156
|
}
|
|
5007
5157
|
),
|
|
5008
|
-
/* @__PURE__ */ (0,
|
|
5009
|
-
/* @__PURE__ */ (0,
|
|
5010
|
-
/* @__PURE__ */ (0,
|
|
5011
|
-
/* @__PURE__ */ (0,
|
|
5158
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5159
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
|
|
5160
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5161
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5012
5162
|
] }),
|
|
5013
|
-
addedAt && /* @__PURE__ */ (0,
|
|
5163
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5014
5164
|
dateStyle: "long"
|
|
5015
5165
|
}).format(new Date(addedAt)) })
|
|
5016
5166
|
] })
|
|
5017
5167
|
] }),
|
|
5018
|
-
/* @__PURE__ */ (0,
|
|
5168
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5019
5169
|
"button",
|
|
5020
5170
|
{
|
|
5021
5171
|
...node.attributes,
|
|
@@ -5023,7 +5173,7 @@ function DefaultSettingsPasskey({
|
|
|
5023
5173
|
onClick: node.onClick,
|
|
5024
5174
|
disabled: isSubmitting,
|
|
5025
5175
|
className: "relative",
|
|
5026
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5176
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5027
5177
|
trash_default,
|
|
5028
5178
|
{
|
|
5029
5179
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5043,25 +5193,25 @@ function DefaultSettingsPasskey({
|
|
|
5043
5193
|
|
|
5044
5194
|
// src/theme/default/assets/icons/download.svg
|
|
5045
5195
|
var React30 = __toESM(require("react"));
|
|
5046
|
-
var
|
|
5196
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5047
5197
|
var SvgDownload = (props) => {
|
|
5048
5198
|
var _a, _b;
|
|
5049
|
-
return /* @__PURE__ */ (0,
|
|
5199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
|
|
5050
5200
|
};
|
|
5051
5201
|
var download_default = SvgDownload;
|
|
5052
5202
|
|
|
5053
5203
|
// src/theme/default/assets/icons/refresh.svg
|
|
5054
5204
|
var React31 = __toESM(require("react"));
|
|
5055
|
-
var
|
|
5205
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5056
5206
|
var SvgRefresh = (props) => {
|
|
5057
5207
|
var _a, _b;
|
|
5058
|
-
return /* @__PURE__ */ (0,
|
|
5208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
|
|
5059
5209
|
};
|
|
5060
5210
|
var refresh_default = SvgRefresh;
|
|
5061
5211
|
|
|
5062
5212
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
5063
5213
|
var import_react_hook_form22 = require("react-hook-form");
|
|
5064
|
-
var
|
|
5214
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5065
5215
|
function DefaultSettingsRecoveryCodes({
|
|
5066
5216
|
codes,
|
|
5067
5217
|
regnerateButton,
|
|
@@ -5083,12 +5233,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5083
5233
|
element.click();
|
|
5084
5234
|
};
|
|
5085
5235
|
const hasCodes = codes.length >= 1;
|
|
5086
|
-
return /* @__PURE__ */ (0,
|
|
5087
|
-
codes.length > 0 && /* @__PURE__ */ (0,
|
|
5088
|
-
/* @__PURE__ */ (0,
|
|
5089
|
-
/* @__PURE__ */ (0,
|
|
5090
|
-
/* @__PURE__ */ (0,
|
|
5091
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0,
|
|
5236
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5237
|
+
codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(DefaultHorizontalDivider, {}),
|
|
5238
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex gap-4 justify-between", children: [
|
|
5239
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
5240
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex gap-2", children: [
|
|
5241
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5092
5242
|
"button",
|
|
5093
5243
|
{
|
|
5094
5244
|
...regnerateButton.attributes,
|
|
@@ -5097,7 +5247,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5097
5247
|
onClick: onRegenerate,
|
|
5098
5248
|
disabled: isSubmitting,
|
|
5099
5249
|
"data-loading": isSubmitting,
|
|
5100
|
-
children: /* @__PURE__ */ (0,
|
|
5250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5101
5251
|
refresh_default,
|
|
5102
5252
|
{
|
|
5103
5253
|
size: 24,
|
|
@@ -5106,7 +5256,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5106
5256
|
)
|
|
5107
5257
|
}
|
|
5108
5258
|
),
|
|
5109
|
-
revealButton && /* @__PURE__ */ (0,
|
|
5259
|
+
revealButton && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5110
5260
|
"button",
|
|
5111
5261
|
{
|
|
5112
5262
|
...revealButton.attributes,
|
|
@@ -5114,7 +5264,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5114
5264
|
className: "ml-auto",
|
|
5115
5265
|
onClick: onReveal,
|
|
5116
5266
|
title: "Reveal recovery codes",
|
|
5117
|
-
children: /* @__PURE__ */ (0,
|
|
5267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5118
5268
|
eye_default,
|
|
5119
5269
|
{
|
|
5120
5270
|
size: 24,
|
|
@@ -5123,7 +5273,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5123
5273
|
)
|
|
5124
5274
|
}
|
|
5125
5275
|
) }),
|
|
5126
|
-
hasCodes && /* @__PURE__ */ (0,
|
|
5276
|
+
hasCodes && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5127
5277
|
"button",
|
|
5128
5278
|
{
|
|
5129
5279
|
onClick: onDownload,
|
|
@@ -5131,7 +5281,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5131
5281
|
className: "ml-auto",
|
|
5132
5282
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
5133
5283
|
title: "Download recovery codes",
|
|
5134
|
-
children: /* @__PURE__ */ (0,
|
|
5284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5135
5285
|
download_default,
|
|
5136
5286
|
{
|
|
5137
5287
|
size: 24,
|
|
@@ -5142,12 +5292,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5142
5292
|
)
|
|
5143
5293
|
] })
|
|
5144
5294
|
] }),
|
|
5145
|
-
hasCodes ? /* @__PURE__ */ (0,
|
|
5295
|
+
hasCodes ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5146
5296
|
"div",
|
|
5147
5297
|
{
|
|
5148
5298
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
5149
5299
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
5150
|
-
children: codes.map((code) => /* @__PURE__ */ (0,
|
|
5300
|
+
children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { children: code }, code))
|
|
5151
5301
|
}
|
|
5152
5302
|
) }) : null
|
|
5153
5303
|
] });
|
|
@@ -5158,16 +5308,16 @@ var import_elements_react20 = require("@ory/elements-react");
|
|
|
5158
5308
|
|
|
5159
5309
|
// src/theme/default/assets/icons/qrcode.svg
|
|
5160
5310
|
var React32 = __toESM(require("react"));
|
|
5161
|
-
var
|
|
5311
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5162
5312
|
var SvgQrcode = (props) => {
|
|
5163
5313
|
var _a, _b;
|
|
5164
|
-
return /* @__PURE__ */ (0,
|
|
5314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
5165
5315
|
};
|
|
5166
5316
|
var qrcode_default = SvgQrcode;
|
|
5167
5317
|
|
|
5168
5318
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
5169
5319
|
var import_react_hook_form23 = require("react-hook-form");
|
|
5170
|
-
var
|
|
5320
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5171
5321
|
function DefaultSettingsTotp({
|
|
5172
5322
|
totpImage,
|
|
5173
5323
|
totpInput,
|
|
@@ -5187,19 +5337,19 @@ function DefaultSettingsTotp({
|
|
|
5187
5337
|
node_type: _ignoredNodeType,
|
|
5188
5338
|
...buttonAttrs
|
|
5189
5339
|
} = totpUnlink.attributes;
|
|
5190
|
-
return /* @__PURE__ */ (0,
|
|
5191
|
-
/* @__PURE__ */ (0,
|
|
5192
|
-
/* @__PURE__ */ (0,
|
|
5193
|
-
/* @__PURE__ */ (0,
|
|
5194
|
-
/* @__PURE__ */ (0,
|
|
5195
|
-
/* @__PURE__ */ (0,
|
|
5340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5341
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Card.Divider, {}) }),
|
|
5342
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
5343
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(qrcode_default, { size: 32 }) }),
|
|
5344
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
5345
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5196
5346
|
"button",
|
|
5197
5347
|
{
|
|
5198
5348
|
type: type === "button" ? "button" : "submit",
|
|
5199
5349
|
...buttonAttrs,
|
|
5200
5350
|
onClick: onUnlink,
|
|
5201
5351
|
disabled: isSubmitting,
|
|
5202
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5352
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5203
5353
|
trash_default,
|
|
5204
5354
|
{
|
|
5205
5355
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5212,9 +5362,9 @@ function DefaultSettingsTotp({
|
|
|
5212
5362
|
] });
|
|
5213
5363
|
}
|
|
5214
5364
|
if (totpImage && totpSecret && totpInput) {
|
|
5215
|
-
return /* @__PURE__ */ (0,
|
|
5216
|
-
/* @__PURE__ */ (0,
|
|
5217
|
-
/* @__PURE__ */ (0,
|
|
5365
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5366
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "col-span-full", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(DefaultHorizontalDivider, {}) }),
|
|
5367
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5218
5368
|
Node2.Image,
|
|
5219
5369
|
{
|
|
5220
5370
|
node: totpImage,
|
|
@@ -5223,13 +5373,13 @@ function DefaultSettingsTotp({
|
|
|
5223
5373
|
}
|
|
5224
5374
|
}
|
|
5225
5375
|
) }) }) }),
|
|
5226
|
-
/* @__PURE__ */ (0,
|
|
5227
|
-
/* @__PURE__ */ (0,
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
5377
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5228
5378
|
Node2.Label,
|
|
5229
5379
|
{
|
|
5230
5380
|
node: totpSecret,
|
|
5231
5381
|
attributes: totpSecret.attributes,
|
|
5232
|
-
children: /* @__PURE__ */ (0,
|
|
5382
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: "relative flex justify-stretch max-w-[488px]", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5233
5383
|
"input",
|
|
5234
5384
|
{
|
|
5235
5385
|
disabled: true,
|
|
@@ -5242,12 +5392,12 @@ function DefaultSettingsTotp({
|
|
|
5242
5392
|
) })
|
|
5243
5393
|
}
|
|
5244
5394
|
),
|
|
5245
|
-
/* @__PURE__ */ (0,
|
|
5395
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5246
5396
|
Node2.Label,
|
|
5247
5397
|
{
|
|
5248
5398
|
attributes: totpInput.attributes,
|
|
5249
5399
|
node: totpInput,
|
|
5250
|
-
children: /* @__PURE__ */ (0,
|
|
5400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5251
5401
|
Node2.CodeInput,
|
|
5252
5402
|
{
|
|
5253
5403
|
node: totpInput,
|
|
@@ -5266,16 +5416,16 @@ var import_elements_react21 = require("@ory/elements-react");
|
|
|
5266
5416
|
|
|
5267
5417
|
// src/theme/default/assets/icons/key.svg
|
|
5268
5418
|
var React33 = __toESM(require("react"));
|
|
5269
|
-
var
|
|
5419
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5270
5420
|
var SvgKey = (props) => {
|
|
5271
5421
|
var _a, _b;
|
|
5272
|
-
return /* @__PURE__ */ (0,
|
|
5422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
|
|
5273
5423
|
};
|
|
5274
5424
|
var key_default = SvgKey;
|
|
5275
5425
|
|
|
5276
5426
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
5277
5427
|
var import_react_hook_form24 = require("react-hook-form");
|
|
5278
|
-
var
|
|
5428
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5279
5429
|
function DefaultSettingsWebauthn({
|
|
5280
5430
|
nameInput,
|
|
5281
5431
|
triggerButton,
|
|
@@ -5286,14 +5436,14 @@ function DefaultSettingsWebauthn({
|
|
|
5286
5436
|
} = (0, import_react_hook_form24.useFormContext)();
|
|
5287
5437
|
const { Node: Node2, Card } = (0, import_elements_react21.useComponents)();
|
|
5288
5438
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5289
|
-
return /* @__PURE__ */ (0,
|
|
5290
|
-
/* @__PURE__ */ (0,
|
|
5291
|
-
/* @__PURE__ */ (0,
|
|
5439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5440
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
5441
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5292
5442
|
Node2.Label,
|
|
5293
5443
|
{
|
|
5294
5444
|
node: nameInput,
|
|
5295
5445
|
attributes: nameInput.attributes,
|
|
5296
|
-
children: /* @__PURE__ */ (0,
|
|
5446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5297
5447
|
Node2.Input,
|
|
5298
5448
|
{
|
|
5299
5449
|
node: nameInput,
|
|
@@ -5302,7 +5452,7 @@ function DefaultSettingsWebauthn({
|
|
|
5302
5452
|
)
|
|
5303
5453
|
}
|
|
5304
5454
|
) }),
|
|
5305
|
-
triggerButton ? /* @__PURE__ */ (0,
|
|
5455
|
+
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5306
5456
|
Node2.Button,
|
|
5307
5457
|
{
|
|
5308
5458
|
node: triggerButton,
|
|
@@ -5311,38 +5461,38 @@ function DefaultSettingsWebauthn({
|
|
|
5311
5461
|
}
|
|
5312
5462
|
) : null
|
|
5313
5463
|
] }),
|
|
5314
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
5315
|
-
/* @__PURE__ */ (0,
|
|
5316
|
-
/* @__PURE__ */ (0,
|
|
5464
|
+
hasRemoveButtons ? /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex flex-col gap-8", children: [
|
|
5465
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Card.Divider, {}),
|
|
5466
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
5317
5467
|
var _a, _b;
|
|
5318
5468
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5319
5469
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
5320
5470
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
5321
5471
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
5322
|
-
return /* @__PURE__ */ (0,
|
|
5472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
5323
5473
|
"div",
|
|
5324
5474
|
{
|
|
5325
5475
|
className: "flex justify-between gap-6 md:items-center",
|
|
5326
5476
|
children: [
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5477
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5478
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5329
5479
|
key_default,
|
|
5330
5480
|
{
|
|
5331
5481
|
size: 32,
|
|
5332
5482
|
className: "text-interface-foreground-default-primary"
|
|
5333
5483
|
}
|
|
5334
5484
|
),
|
|
5335
|
-
/* @__PURE__ */ (0,
|
|
5336
|
-
/* @__PURE__ */ (0,
|
|
5337
|
-
/* @__PURE__ */ (0,
|
|
5338
|
-
/* @__PURE__ */ (0,
|
|
5485
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5486
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsxs)("div", { className: "flex-1 flex-col truncate", children: [
|
|
5487
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5488
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5339
5489
|
] }),
|
|
5340
|
-
addedAt && /* @__PURE__ */ (0,
|
|
5490
|
+
addedAt && /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5341
5491
|
dateStyle: "long"
|
|
5342
5492
|
}).format(new Date(addedAt)) })
|
|
5343
5493
|
] })
|
|
5344
5494
|
] }),
|
|
5345
|
-
/* @__PURE__ */ (0,
|
|
5495
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5346
5496
|
"button",
|
|
5347
5497
|
{
|
|
5348
5498
|
...node.attributes,
|
|
@@ -5350,7 +5500,7 @@ function DefaultSettingsWebauthn({
|
|
|
5350
5500
|
onClick: node.onClick,
|
|
5351
5501
|
disabled: isSubmitting,
|
|
5352
5502
|
className: "relative",
|
|
5353
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5503
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5354
5504
|
trash_default,
|
|
5355
5505
|
{
|
|
5356
5506
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5369,91 +5519,96 @@ function DefaultSettingsWebauthn({
|
|
|
5369
5519
|
}
|
|
5370
5520
|
|
|
5371
5521
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
5372
|
-
var
|
|
5522
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5373
5523
|
function DefaultAuthMethodListContainer({
|
|
5374
5524
|
children
|
|
5375
5525
|
}) {
|
|
5376
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
|
|
5377
5527
|
}
|
|
5378
5528
|
|
|
5379
5529
|
// src/theme/default/components/form/captcha.tsx
|
|
5380
|
-
var
|
|
5530
|
+
var import_client_fetch41 = require("@ory/client-fetch");
|
|
5381
5531
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
5382
|
-
var
|
|
5532
|
+
var import_react17 = require("react");
|
|
5383
5533
|
var import_react_hook_form25 = require("react-hook-form");
|
|
5384
|
-
var
|
|
5534
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5385
5535
|
var DefaultCaptcha = ({ node }) => {
|
|
5386
|
-
const { setValue } = (0, import_react_hook_form25.useFormContext)();
|
|
5387
|
-
const ref = (0,
|
|
5388
|
-
const
|
|
5389
|
-
|
|
5390
|
-
if (
|
|
5391
|
-
|
|
5392
|
-
|
|
5393
|
-
|
|
5536
|
+
const { setValue, formState } = (0, import_react_hook_form25.useFormContext)();
|
|
5537
|
+
const ref = (0, import_react17.useRef)();
|
|
5538
|
+
const prevSubmitCount = (0, import_react17.useRef)(formState.submitCount);
|
|
5539
|
+
(0, import_react17.useEffect)(() => {
|
|
5540
|
+
if (formState.submitCount > prevSubmitCount.current && formState.isSubmitSuccessful) {
|
|
5541
|
+
prevSubmitCount.current = formState.submitCount;
|
|
5542
|
+
setTimeout(() => {
|
|
5543
|
+
if (ref.current) {
|
|
5544
|
+
ref.current.reset();
|
|
5545
|
+
}
|
|
5546
|
+
}, 100);
|
|
5394
5547
|
}
|
|
5548
|
+
}, [formState.submitCount, formState.isSubmitSuccessful]);
|
|
5549
|
+
if (!(0, import_client_fetch41.isUiNodeInputAttributes)(node.attributes)) {
|
|
5550
|
+
return null;
|
|
5395
5551
|
}
|
|
5396
|
-
if (
|
|
5552
|
+
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
5553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(DefaultInput, { node, attributes: node.attributes }, 1);
|
|
5554
|
+
} else if (node.attributes.name === "captcha_turnstile_options") {
|
|
5397
5555
|
const options = JSON.parse(node.attributes.value);
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5409
|
-
responseFieldName: options.response_field_name
|
|
5410
|
-
},
|
|
5411
|
-
onExpire: () => {
|
|
5412
|
-
var _a;
|
|
5413
|
-
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5414
|
-
},
|
|
5415
|
-
onSuccess: (token) => {
|
|
5416
|
-
setValue(options.response_field_name, token);
|
|
5417
|
-
}
|
|
5556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
5557
|
+
import_react_turnstile.Turnstile,
|
|
5558
|
+
{
|
|
5559
|
+
ref,
|
|
5560
|
+
siteKey: options.sitekey,
|
|
5561
|
+
options: {
|
|
5562
|
+
action: options.action,
|
|
5563
|
+
size: "flexible",
|
|
5564
|
+
theme: options.theme,
|
|
5565
|
+
responseField: false,
|
|
5566
|
+
responseFieldName: options.response_field_name
|
|
5418
5567
|
},
|
|
5419
|
-
|
|
5420
|
-
|
|
5568
|
+
onExpire: () => {
|
|
5569
|
+
var _a;
|
|
5570
|
+
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5571
|
+
},
|
|
5572
|
+
onSuccess: (token) => {
|
|
5573
|
+
setValue(options.response_field_name, token);
|
|
5574
|
+
}
|
|
5575
|
+
}
|
|
5421
5576
|
);
|
|
5422
5577
|
}
|
|
5423
|
-
return
|
|
5578
|
+
return null;
|
|
5424
5579
|
};
|
|
5425
5580
|
|
|
5426
5581
|
// src/theme/default/assets/icons/personal.svg
|
|
5427
5582
|
var React34 = __toESM(require("react"));
|
|
5428
|
-
var
|
|
5583
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
5429
5584
|
var SvgPersonal = (props) => {
|
|
5430
5585
|
var _a, _b;
|
|
5431
|
-
return /* @__PURE__ */ (0,
|
|
5586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
|
|
5432
5587
|
};
|
|
5433
5588
|
var personal_default = SvgPersonal;
|
|
5434
5589
|
|
|
5435
5590
|
// src/theme/default/assets/icons/message.svg
|
|
5436
5591
|
var React35 = __toESM(require("react"));
|
|
5437
|
-
var
|
|
5592
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5438
5593
|
var SvgMessage = (props) => {
|
|
5439
5594
|
var _a, _b;
|
|
5440
|
-
return /* @__PURE__ */ (0,
|
|
5595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)("path", { stroke: "#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" }) });
|
|
5441
5596
|
};
|
|
5442
5597
|
var message_default = SvgMessage;
|
|
5443
5598
|
|
|
5444
5599
|
// src/theme/default/assets/icons/phone.svg
|
|
5445
5600
|
var React36 = __toESM(require("react"));
|
|
5446
|
-
var
|
|
5601
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5447
5602
|
var SvgPhone = (props) => {
|
|
5448
5603
|
var _a, _b;
|
|
5449
|
-
return /* @__PURE__ */ (0,
|
|
5604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
|
|
5450
5605
|
};
|
|
5451
5606
|
var phone_default = SvgPhone;
|
|
5452
5607
|
|
|
5453
5608
|
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
5454
5609
|
var import_react_intl23 = require("react-intl");
|
|
5455
5610
|
var Switch = __toESM(require("@radix-ui/react-switch"));
|
|
5456
|
-
var
|
|
5611
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5457
5612
|
var ScopeIcons = {
|
|
5458
5613
|
openid: personal_default,
|
|
5459
5614
|
offline_access: personal_default,
|
|
@@ -5468,7 +5623,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5468
5623
|
var _a;
|
|
5469
5624
|
const intl = (0, import_react_intl23.useIntl)();
|
|
5470
5625
|
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
5471
|
-
return /* @__PURE__ */ (0,
|
|
5626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5472
5627
|
ListItem,
|
|
5473
5628
|
{
|
|
5474
5629
|
as: "label",
|
|
@@ -5483,7 +5638,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5483
5638
|
}),
|
|
5484
5639
|
className: "col-span-2",
|
|
5485
5640
|
"data-testid": "ory/screen/consent/scope-checkbox-label",
|
|
5486
|
-
children: /* @__PURE__ */ (0,
|
|
5641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5487
5642
|
Switch.Root,
|
|
5488
5643
|
{
|
|
5489
5644
|
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",
|
|
@@ -5491,7 +5646,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5491
5646
|
value: attributes.value,
|
|
5492
5647
|
onCheckedChange,
|
|
5493
5648
|
defaultChecked: true,
|
|
5494
|
-
children: /* @__PURE__ */ (0,
|
|
5649
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
|
|
5495
5650
|
}
|
|
5496
5651
|
)
|
|
5497
5652
|
}
|
|
@@ -5549,10 +5704,11 @@ function getOryComponents(overrides) {
|
|
|
5549
5704
|
}
|
|
5550
5705
|
|
|
5551
5706
|
// src/theme/default/flows/error.tsx
|
|
5552
|
-
var
|
|
5553
|
-
var
|
|
5707
|
+
var import_client_fetch42 = require("@ory/client-fetch");
|
|
5708
|
+
var import_elements_react22 = require("@ory/elements-react");
|
|
5709
|
+
var import_react18 = require("react");
|
|
5554
5710
|
var import_react_intl24 = require("react-intl");
|
|
5555
|
-
var
|
|
5711
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5556
5712
|
function isOAuth2Error(error) {
|
|
5557
5713
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5558
5714
|
}
|
|
@@ -5561,7 +5717,7 @@ var errorDescriptions = {
|
|
|
5561
5717
|
5: "The server encountered an error and could not complete your request"
|
|
5562
5718
|
};
|
|
5563
5719
|
function useStandardize(error) {
|
|
5564
|
-
return (0,
|
|
5720
|
+
return (0, import_react18.useMemo)(() => {
|
|
5565
5721
|
var _a;
|
|
5566
5722
|
if (isOAuth2Error(error)) {
|
|
5567
5723
|
return {
|
|
@@ -5571,14 +5727,14 @@ function useStandardize(error) {
|
|
|
5571
5727
|
timestamp: /* @__PURE__ */ new Date()
|
|
5572
5728
|
};
|
|
5573
5729
|
}
|
|
5574
|
-
if ((0,
|
|
5730
|
+
if ((0, import_client_fetch42.instanceOfFlowError)(error)) {
|
|
5575
5731
|
const parsed = error.error;
|
|
5576
5732
|
return {
|
|
5577
5733
|
...parsed,
|
|
5578
5734
|
id: error.id,
|
|
5579
5735
|
timestamp: error.created_at
|
|
5580
5736
|
};
|
|
5581
|
-
} else if (error.error && (0,
|
|
5737
|
+
} else if (error.error && (0, import_client_fetch42.instanceOfGenericError)(error.error)) {
|
|
5582
5738
|
return {
|
|
5583
5739
|
code: (_a = error.error.code) != null ? _a : 500,
|
|
5584
5740
|
message: error.error.message,
|
|
@@ -5605,47 +5761,47 @@ function Error2({
|
|
|
5605
5761
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5606
5762
|
const parsed = useStandardize(error);
|
|
5607
5763
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5608
|
-
return /* @__PURE__ */ (0,
|
|
5764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_elements_react22.OryConfigurationProvider, { sdk: config.sdk, project: config.project, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5609
5765
|
IntlProvider,
|
|
5610
5766
|
{
|
|
5611
5767
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5612
5768
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5613
|
-
children: /* @__PURE__ */ (0,
|
|
5769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
5614
5770
|
"div",
|
|
5615
5771
|
{
|
|
5616
5772
|
className: "flex flex-col gap-6 antialiased",
|
|
5617
5773
|
"data-testid": "ory/screen/error",
|
|
5618
5774
|
children: [
|
|
5619
|
-
/* @__PURE__ */ (0,
|
|
5620
|
-
/* @__PURE__ */ (0,
|
|
5621
|
-
/* @__PURE__ */ (0,
|
|
5622
|
-
/* @__PURE__ */ (0,
|
|
5623
|
-
/* @__PURE__ */ (0,
|
|
5624
|
-
parsed.reason && /* @__PURE__ */ (0,
|
|
5775
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5776
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(ErrorLogo, {}),
|
|
5777
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
5778
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5779
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5780
|
+
parsed.reason && /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5625
5781
|
] })
|
|
5626
5782
|
] }),
|
|
5627
|
-
/* @__PURE__ */ (0,
|
|
5628
|
-
/* @__PURE__ */ (0,
|
|
5629
|
-
/* @__PURE__ */ (0,
|
|
5630
|
-
/* @__PURE__ */ (0,
|
|
5631
|
-
/* @__PURE__ */ (0,
|
|
5783
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Divider, {}),
|
|
5784
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "flex flex-col gap-2", children: [
|
|
5785
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.title.what-can-i-do" }) }),
|
|
5786
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.instructions" }) }),
|
|
5787
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { children: session ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(LoggedInActions, {}) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(GoBackButton, {}) })
|
|
5632
5788
|
] }),
|
|
5633
|
-
/* @__PURE__ */ (0,
|
|
5634
|
-
/* @__PURE__ */ (0,
|
|
5635
|
-
/* @__PURE__ */ (0,
|
|
5636
|
-
parsed.id && /* @__PURE__ */ (0,
|
|
5789
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Divider, {}),
|
|
5790
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5791
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.footer.text" }) }),
|
|
5792
|
+
parsed.id && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5637
5793
|
"ID: ",
|
|
5638
|
-
/* @__PURE__ */ (0,
|
|
5794
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("code", { children: parsed.id })
|
|
5639
5795
|
] }),
|
|
5640
|
-
/* @__PURE__ */ (0,
|
|
5796
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5641
5797
|
"Time: ",
|
|
5642
|
-
/* @__PURE__ */ (0,
|
|
5798
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5643
5799
|
] }),
|
|
5644
|
-
/* @__PURE__ */ (0,
|
|
5800
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5645
5801
|
"Message: ",
|
|
5646
|
-
/* @__PURE__ */ (0,
|
|
5802
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("code", { children: parsed.reason })
|
|
5647
5803
|
] }),
|
|
5648
|
-
/* @__PURE__ */ (0,
|
|
5804
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5649
5805
|
"button",
|
|
5650
5806
|
{
|
|
5651
5807
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5657,7 +5813,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5657
5813
|
`;
|
|
5658
5814
|
void navigator.clipboard.writeText(text);
|
|
5659
5815
|
},
|
|
5660
|
-
children: /* @__PURE__ */ (0,
|
|
5816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.footer.copy" })
|
|
5661
5817
|
}
|
|
5662
5818
|
) })
|
|
5663
5819
|
] })
|
|
@@ -5665,43 +5821,46 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5665
5821
|
}
|
|
5666
5822
|
) })
|
|
5667
5823
|
}
|
|
5668
|
-
);
|
|
5824
|
+
) });
|
|
5669
5825
|
}
|
|
5670
|
-
function LoggedInActions(
|
|
5826
|
+
function LoggedInActions() {
|
|
5827
|
+
const config = (0, import_elements_react22.useOryConfiguration)();
|
|
5671
5828
|
const { logoutFlow } = useClientLogout(config);
|
|
5672
|
-
return /* @__PURE__ */ (0,
|
|
5829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5673
5830
|
"a",
|
|
5674
5831
|
{
|
|
5675
5832
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
5676
5833
|
className: "text-interface-foreground-default-primary underline",
|
|
5677
|
-
children: /* @__PURE__ */ (0,
|
|
5834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "login.logout-button" })
|
|
5678
5835
|
}
|
|
5679
5836
|
);
|
|
5680
5837
|
}
|
|
5681
|
-
function GoBackButton(
|
|
5838
|
+
function GoBackButton() {
|
|
5839
|
+
const config = (0, import_elements_react22.useOryConfiguration)();
|
|
5682
5840
|
if ("default_redirect_url" in config.project) {
|
|
5683
|
-
return /* @__PURE__ */ (0,
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5684
5842
|
"a",
|
|
5685
5843
|
{
|
|
5686
5844
|
className: "text-interface-foreground-default-primary underline",
|
|
5687
5845
|
href: config.project.default_redirect_url,
|
|
5688
|
-
children: /* @__PURE__ */ (0,
|
|
5846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.action.go-back" })
|
|
5689
5847
|
}
|
|
5690
5848
|
);
|
|
5691
5849
|
}
|
|
5692
5850
|
return null;
|
|
5693
5851
|
}
|
|
5694
|
-
function ErrorLogo(
|
|
5695
|
-
|
|
5696
|
-
|
|
5852
|
+
function ErrorLogo() {
|
|
5853
|
+
const { project } = (0, import_elements_react22.useOryConfiguration)();
|
|
5854
|
+
if (project.logo_light_url) {
|
|
5855
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("img", { src: project.logo_light_url, width: 100, height: 36, alt: "Logo" });
|
|
5697
5856
|
}
|
|
5698
|
-
return /* @__PURE__ */ (0,
|
|
5857
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: project.name });
|
|
5699
5858
|
}
|
|
5700
5859
|
|
|
5701
5860
|
// src/theme/default/flows/login.tsx
|
|
5702
|
-
var
|
|
5703
|
-
var
|
|
5704
|
-
var
|
|
5861
|
+
var import_client_fetch43 = require("@ory/client-fetch");
|
|
5862
|
+
var import_elements_react23 = require("@ory/elements-react");
|
|
5863
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
5705
5864
|
function Login({
|
|
5706
5865
|
flow,
|
|
5707
5866
|
config,
|
|
@@ -5709,22 +5868,22 @@ function Login({
|
|
|
5709
5868
|
components: flowOverrideComponents
|
|
5710
5869
|
}) {
|
|
5711
5870
|
const components = getOryComponents(flowOverrideComponents);
|
|
5712
|
-
return /* @__PURE__ */ (0,
|
|
5713
|
-
|
|
5871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
5872
|
+
import_elements_react23.OryProvider,
|
|
5714
5873
|
{
|
|
5715
5874
|
config,
|
|
5716
5875
|
flow,
|
|
5717
|
-
flowType:
|
|
5876
|
+
flowType: import_client_fetch43.FlowType.Login,
|
|
5718
5877
|
components,
|
|
5719
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5878
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
5720
5879
|
}
|
|
5721
5880
|
);
|
|
5722
5881
|
}
|
|
5723
5882
|
|
|
5724
5883
|
// src/theme/default/flows/recovery.tsx
|
|
5725
|
-
var
|
|
5726
|
-
var
|
|
5727
|
-
var
|
|
5884
|
+
var import_client_fetch44 = require("@ory/client-fetch");
|
|
5885
|
+
var import_elements_react24 = require("@ory/elements-react");
|
|
5886
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
5728
5887
|
function Recovery({
|
|
5729
5888
|
flow,
|
|
5730
5889
|
config,
|
|
@@ -5732,22 +5891,22 @@ function Recovery({
|
|
|
5732
5891
|
components: flowOverrideComponents
|
|
5733
5892
|
}) {
|
|
5734
5893
|
const components = getOryComponents(flowOverrideComponents);
|
|
5735
|
-
return /* @__PURE__ */ (0,
|
|
5736
|
-
|
|
5894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5895
|
+
import_elements_react24.OryProvider,
|
|
5737
5896
|
{
|
|
5738
5897
|
config,
|
|
5739
5898
|
flow,
|
|
5740
|
-
flowType:
|
|
5899
|
+
flowType: import_client_fetch44.FlowType.Recovery,
|
|
5741
5900
|
components,
|
|
5742
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5901
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react24.OryTwoStepCard, {})
|
|
5743
5902
|
}
|
|
5744
5903
|
);
|
|
5745
5904
|
}
|
|
5746
5905
|
|
|
5747
5906
|
// src/theme/default/flows/registration.tsx
|
|
5748
|
-
var
|
|
5749
|
-
var
|
|
5750
|
-
var
|
|
5907
|
+
var import_client_fetch45 = require("@ory/client-fetch");
|
|
5908
|
+
var import_elements_react25 = require("@ory/elements-react");
|
|
5909
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
5751
5910
|
function Registration({
|
|
5752
5911
|
flow,
|
|
5753
5912
|
children,
|
|
@@ -5755,22 +5914,22 @@ function Registration({
|
|
|
5755
5914
|
config
|
|
5756
5915
|
}) {
|
|
5757
5916
|
const components = getOryComponents(flowOverrideComponents);
|
|
5758
|
-
return /* @__PURE__ */ (0,
|
|
5759
|
-
|
|
5917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5918
|
+
import_elements_react25.OryProvider,
|
|
5760
5919
|
{
|
|
5761
5920
|
config,
|
|
5762
5921
|
flow,
|
|
5763
|
-
flowType:
|
|
5922
|
+
flowType: import_client_fetch45.FlowType.Registration,
|
|
5764
5923
|
components,
|
|
5765
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5924
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_elements_react25.OryTwoStepCard, {})
|
|
5766
5925
|
}
|
|
5767
5926
|
);
|
|
5768
5927
|
}
|
|
5769
5928
|
|
|
5770
5929
|
// src/theme/default/flows/settings.tsx
|
|
5771
|
-
var
|
|
5772
|
-
var
|
|
5773
|
-
var
|
|
5930
|
+
var import_client_fetch46 = require("@ory/client-fetch");
|
|
5931
|
+
var import_elements_react26 = require("@ory/elements-react");
|
|
5932
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
5774
5933
|
function Settings({
|
|
5775
5934
|
flow,
|
|
5776
5935
|
config,
|
|
@@ -5778,25 +5937,25 @@ function Settings({
|
|
|
5778
5937
|
components: flowOverrideComponents
|
|
5779
5938
|
}) {
|
|
5780
5939
|
const components = getOryComponents(flowOverrideComponents);
|
|
5781
|
-
return /* @__PURE__ */ (0,
|
|
5782
|
-
|
|
5940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5941
|
+
import_elements_react26.OryProvider,
|
|
5783
5942
|
{
|
|
5784
5943
|
config,
|
|
5785
5944
|
flow,
|
|
5786
|
-
flowType:
|
|
5945
|
+
flowType: import_client_fetch46.FlowType.Settings,
|
|
5787
5946
|
components,
|
|
5788
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5789
|
-
/* @__PURE__ */ (0,
|
|
5790
|
-
/* @__PURE__ */ (0,
|
|
5947
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(import_jsx_runtime108.Fragment, { children: [
|
|
5948
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_elements_react26.HeadlessPageHeader, {}),
|
|
5949
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_elements_react26.OrySettingsCard, {})
|
|
5791
5950
|
] })
|
|
5792
5951
|
}
|
|
5793
5952
|
);
|
|
5794
5953
|
}
|
|
5795
5954
|
|
|
5796
5955
|
// src/theme/default/flows/verification.tsx
|
|
5797
|
-
var
|
|
5798
|
-
var
|
|
5799
|
-
var
|
|
5956
|
+
var import_client_fetch47 = require("@ory/client-fetch");
|
|
5957
|
+
var import_elements_react27 = require("@ory/elements-react");
|
|
5958
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
5800
5959
|
function Verification({
|
|
5801
5960
|
flow,
|
|
5802
5961
|
config,
|
|
@@ -5804,24 +5963,24 @@ function Verification({
|
|
|
5804
5963
|
components: flowOverrideComponents
|
|
5805
5964
|
}) {
|
|
5806
5965
|
const components = getOryComponents(flowOverrideComponents);
|
|
5807
|
-
return /* @__PURE__ */ (0,
|
|
5808
|
-
|
|
5966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
5967
|
+
import_elements_react27.OryProvider,
|
|
5809
5968
|
{
|
|
5810
5969
|
config,
|
|
5811
5970
|
flow,
|
|
5812
|
-
flowType:
|
|
5971
|
+
flowType: import_client_fetch47.FlowType.Verification,
|
|
5813
5972
|
components,
|
|
5814
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5973
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_elements_react27.OryTwoStepCard, {})
|
|
5815
5974
|
}
|
|
5816
5975
|
);
|
|
5817
5976
|
}
|
|
5818
5977
|
|
|
5819
5978
|
// src/theme/default/flows/consent.tsx
|
|
5820
|
-
var
|
|
5821
|
-
var
|
|
5979
|
+
var import_client_fetch49 = require("@ory/client-fetch");
|
|
5980
|
+
var import_elements_react28 = require("@ory/elements-react");
|
|
5822
5981
|
|
|
5823
5982
|
// src/theme/default/utils/oauth2.ts
|
|
5824
|
-
var
|
|
5983
|
+
var import_client_fetch48 = require("@ory/client-fetch");
|
|
5825
5984
|
var rememberCheckbox = {
|
|
5826
5985
|
type: "input",
|
|
5827
5986
|
group: "oauth2_consent",
|
|
@@ -5829,7 +5988,7 @@ var rememberCheckbox = {
|
|
|
5829
5988
|
label: {
|
|
5830
5989
|
id: 9999111,
|
|
5831
5990
|
text: "Remember my decision",
|
|
5832
|
-
type:
|
|
5991
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5833
5992
|
}
|
|
5834
5993
|
},
|
|
5835
5994
|
attributes: {
|
|
@@ -5848,7 +6007,7 @@ var acceptButton = {
|
|
|
5848
6007
|
label: {
|
|
5849
6008
|
id: 9999111,
|
|
5850
6009
|
text: "Accept",
|
|
5851
|
-
type:
|
|
6010
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5852
6011
|
}
|
|
5853
6012
|
},
|
|
5854
6013
|
attributes: {
|
|
@@ -5867,7 +6026,7 @@ var rejectButton = {
|
|
|
5867
6026
|
label: {
|
|
5868
6027
|
id: 9999111,
|
|
5869
6028
|
text: "Reject",
|
|
5870
|
-
type:
|
|
6029
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5871
6030
|
}
|
|
5872
6031
|
},
|
|
5873
6032
|
attributes: {
|
|
@@ -5914,7 +6073,7 @@ function scopesToUiNodes(scopes) {
|
|
|
5914
6073
|
label: {
|
|
5915
6074
|
id: 9999111,
|
|
5916
6075
|
text: scope,
|
|
5917
|
-
type:
|
|
6076
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5918
6077
|
}
|
|
5919
6078
|
},
|
|
5920
6079
|
attributes: {
|
|
@@ -5959,7 +6118,7 @@ function challengeNode(challenge) {
|
|
|
5959
6118
|
}
|
|
5960
6119
|
|
|
5961
6120
|
// src/theme/default/flows/consent.tsx
|
|
5962
|
-
var
|
|
6121
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
5963
6122
|
function Consent({
|
|
5964
6123
|
consentChallenge,
|
|
5965
6124
|
session,
|
|
@@ -5976,14 +6135,14 @@ function Consent({
|
|
|
5976
6135
|
formActionUrl,
|
|
5977
6136
|
session
|
|
5978
6137
|
);
|
|
5979
|
-
return /* @__PURE__ */ (0,
|
|
5980
|
-
|
|
6138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
6139
|
+
import_elements_react28.OryProvider,
|
|
5981
6140
|
{
|
|
5982
6141
|
config,
|
|
5983
6142
|
flow,
|
|
5984
|
-
flowType:
|
|
6143
|
+
flowType: import_client_fetch49.FlowType.OAuth2Consent,
|
|
5985
6144
|
components,
|
|
5986
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
6145
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_elements_react28.OryConsentCard, {})
|
|
5987
6146
|
}
|
|
5988
6147
|
);
|
|
5989
6148
|
}
|