@ory/elements-react 0.0.0-pr.7dfcd715 → 0.0.0-pr.827df319
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 +30 -0
- package/dist/index.d.mts +73 -69
- package/dist/index.d.ts +73 -69
- package/dist/index.js +334 -122
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +332 -122
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +819 -724
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +634 -532
- 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,49 +202,20 @@ 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
|
-
// src/context/flow-context.tsx
|
|
232
|
-
var import_react4 = require("react");
|
|
233
|
-
|
|
234
|
-
// src/context/form-state.ts
|
|
235
|
-
var import_client_fetch5 = require("@ory/client-fetch");
|
|
236
|
-
var import_react3 = require("react");
|
|
237
|
-
|
|
238
|
-
// src/components/card/two-step/utils.ts
|
|
239
|
-
var import_client_fetch4 = require("@ory/client-fetch");
|
|
240
|
-
|
|
241
|
-
// src/theme/default/utils/form.ts
|
|
242
|
-
function isGroupImmediateSubmit(group) {
|
|
243
|
-
return group === "code";
|
|
244
|
-
}
|
|
245
|
-
|
|
246
205
|
// src/context/flow-context.tsx
|
|
247
206
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
248
207
|
var OryFlowContext = (0, import_react4.createContext)(null);
|
|
249
208
|
|
|
250
|
-
// src/context/
|
|
251
|
-
var
|
|
252
|
-
|
|
253
|
-
// src/components/form/form.tsx
|
|
254
|
-
var import_client_fetch14 = require("@ory/client-fetch");
|
|
255
|
-
var import_react_hook_form2 = require("react-hook-form");
|
|
256
|
-
var import_react_intl = require("react-intl");
|
|
257
|
-
|
|
258
|
-
// src/components/form/useOryFormSubmit.ts
|
|
259
|
-
var import_client_fetch13 = require("@ory/client-fetch");
|
|
260
|
-
var import_react_hook_form = require("react-hook-form");
|
|
209
|
+
// src/context/config.tsx
|
|
210
|
+
var import_react5 = require("react");
|
|
261
211
|
|
|
262
|
-
// src/
|
|
263
|
-
|
|
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
|
+
}
|
|
264
219
|
|
|
265
220
|
// src/util/client.ts
|
|
266
221
|
var import_client_fetch6 = require("@ory/client-fetch");
|
|
@@ -277,102 +232,184 @@ function frontendClient(sdkUrl, opts = {}) {
|
|
|
277
232
|
return new import_client_fetch6.FrontendApi(config);
|
|
278
233
|
}
|
|
279
234
|
|
|
280
|
-
// src/
|
|
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
|
+
}
|
|
295
|
+
|
|
296
|
+
// src/context/intl-context.tsx
|
|
297
|
+
var import_react_intl8 = require("react-intl");
|
|
298
|
+
|
|
299
|
+
// src/components/form/form.tsx
|
|
300
|
+
var import_client_fetch16 = require("@ory/client-fetch");
|
|
301
|
+
var import_react_hook_form2 = require("react-hook-form");
|
|
302
|
+
var import_react_intl = require("react-intl");
|
|
303
|
+
|
|
304
|
+
// src/components/form/useOryFormSubmit.ts
|
|
305
|
+
var import_client_fetch15 = require("@ory/client-fetch");
|
|
306
|
+
var import_react_hook_form = require("react-hook-form");
|
|
307
|
+
|
|
308
|
+
// src/util/onSubmitLogin.ts
|
|
309
|
+
var import_client_fetch9 = require("@ory/client-fetch");
|
|
310
|
+
|
|
311
|
+
// src/util/sdk-helpers/error.ts
|
|
312
|
+
var import_client_fetch7 = require("@ory/client-fetch");
|
|
313
|
+
|
|
314
|
+
// src/util/sdk-helpers/utils.ts
|
|
281
315
|
var import_client_fetch8 = require("@ory/client-fetch");
|
|
282
316
|
|
|
317
|
+
// src/util/onSubmitRecovery.ts
|
|
318
|
+
var import_client_fetch10 = require("@ory/client-fetch");
|
|
319
|
+
|
|
283
320
|
// src/util/onSubmitRegistration.ts
|
|
284
|
-
var
|
|
321
|
+
var import_client_fetch11 = require("@ory/client-fetch");
|
|
285
322
|
|
|
286
323
|
// src/util/onSubmitSettings.ts
|
|
287
|
-
var
|
|
324
|
+
var import_client_fetch12 = require("@ory/client-fetch");
|
|
288
325
|
|
|
289
326
|
// src/util/onSubmitVerification.ts
|
|
290
|
-
var
|
|
327
|
+
var import_client_fetch13 = require("@ory/client-fetch");
|
|
291
328
|
|
|
292
329
|
// src/components/form/form-helpers.ts
|
|
293
|
-
var
|
|
330
|
+
var import_client_fetch14 = require("@ory/client-fetch");
|
|
294
331
|
|
|
295
332
|
// src/components/form/form.tsx
|
|
296
|
-
var
|
|
333
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
297
334
|
|
|
298
335
|
// src/components/form/groups.tsx
|
|
299
|
-
var
|
|
336
|
+
var import_client_fetch19 = require("@ory/client-fetch");
|
|
300
337
|
|
|
301
338
|
// src/components/form/nodes/input.tsx
|
|
302
|
-
var
|
|
303
|
-
var
|
|
339
|
+
var import_client_fetch17 = require("@ory/client-fetch");
|
|
340
|
+
var import_react6 = require("react");
|
|
304
341
|
var import_react_hook_form3 = require("react-hook-form");
|
|
305
|
-
var
|
|
342
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
306
343
|
|
|
307
344
|
// src/components/form/nodes/node.tsx
|
|
308
|
-
var
|
|
309
|
-
var
|
|
345
|
+
var import_client_fetch18 = require("@ory/client-fetch");
|
|
346
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
310
347
|
|
|
311
348
|
// src/components/form/groups.tsx
|
|
312
|
-
var
|
|
349
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
313
350
|
|
|
314
351
|
// src/components/form/messages.tsx
|
|
315
|
-
var
|
|
352
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
316
353
|
|
|
317
354
|
// src/components/form/social.tsx
|
|
318
|
-
var
|
|
355
|
+
var import_client_fetch22 = require("@ory/client-fetch");
|
|
319
356
|
var import_react_hook_form5 = require("react-hook-form");
|
|
320
357
|
|
|
321
358
|
// src/components/form/form-provider.tsx
|
|
322
|
-
var
|
|
359
|
+
var import_client_fetch21 = require("@ory/client-fetch");
|
|
323
360
|
var import_react_hook_form4 = require("react-hook-form");
|
|
324
361
|
|
|
325
362
|
// src/components/form/form-resolver.ts
|
|
326
|
-
var
|
|
363
|
+
var import_client_fetch20 = require("@ory/client-fetch");
|
|
327
364
|
|
|
328
365
|
// src/components/form/form-provider.tsx
|
|
329
|
-
var
|
|
366
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
330
367
|
|
|
331
368
|
// src/components/form/social.tsx
|
|
332
|
-
var
|
|
369
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
333
370
|
|
|
334
371
|
// src/components/form/section.tsx
|
|
335
372
|
var import_react_hook_form6 = require("react-hook-form");
|
|
336
|
-
var
|
|
373
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
337
374
|
|
|
338
375
|
// src/components/generic/divider.tsx
|
|
339
|
-
var
|
|
340
|
-
var
|
|
376
|
+
var import_client_fetch23 = require("@ory/client-fetch");
|
|
377
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
341
378
|
|
|
342
379
|
// src/components/generic/page-header.tsx
|
|
343
|
-
var
|
|
380
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
344
381
|
|
|
345
382
|
// src/components/settings/settings-card.tsx
|
|
346
|
-
var
|
|
383
|
+
var import_client_fetch24 = require("@ory/client-fetch");
|
|
347
384
|
var import_react_intl7 = require("react-intl");
|
|
348
385
|
|
|
349
386
|
// src/components/settings/oidc-settings.tsx
|
|
350
387
|
var import_react_intl2 = require("react-intl");
|
|
351
388
|
var import_react_hook_form7 = require("react-hook-form");
|
|
352
|
-
var
|
|
389
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
353
390
|
|
|
354
391
|
// src/components/settings/passkey-settings.tsx
|
|
355
392
|
var import_react_hook_form8 = require("react-hook-form");
|
|
356
393
|
var import_react_intl3 = require("react-intl");
|
|
357
|
-
var
|
|
394
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
358
395
|
|
|
359
396
|
// src/components/settings/recovery-codes-settings.tsx
|
|
360
397
|
var import_react_intl4 = require("react-intl");
|
|
361
398
|
var import_react_hook_form9 = require("react-hook-form");
|
|
362
|
-
var
|
|
399
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
363
400
|
|
|
364
401
|
// src/components/settings/totp-settings.tsx
|
|
365
402
|
var import_react_hook_form10 = require("react-hook-form");
|
|
366
403
|
var import_react_intl5 = require("react-intl");
|
|
367
|
-
var
|
|
404
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
368
405
|
|
|
369
406
|
// src/components/settings/webauthn-settings.tsx
|
|
370
407
|
var import_react_hook_form11 = require("react-hook-form");
|
|
371
408
|
var import_react_intl6 = require("react-intl");
|
|
372
|
-
var
|
|
409
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
373
410
|
|
|
374
411
|
// src/components/settings/settings-card.tsx
|
|
375
|
-
var
|
|
412
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
376
413
|
|
|
377
414
|
// src/util/i18n/index.ts
|
|
378
415
|
var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
|
|
@@ -2739,7 +2776,7 @@ var OryLocales = {
|
|
|
2739
2776
|
};
|
|
2740
2777
|
|
|
2741
2778
|
// src/context/intl-context.tsx
|
|
2742
|
-
var
|
|
2779
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2743
2780
|
function mergeTranslations(customTranslations) {
|
|
2744
2781
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
2745
2782
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -2752,12 +2789,12 @@ var IntlProvider = ({
|
|
|
2752
2789
|
customTranslations
|
|
2753
2790
|
}) => {
|
|
2754
2791
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
2755
|
-
return /* @__PURE__ */ (0,
|
|
2792
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2756
2793
|
import_react_intl8.IntlProvider,
|
|
2757
2794
|
{
|
|
2758
2795
|
onWarn: () => ({}),
|
|
2759
2796
|
defaultRichTextElements: {
|
|
2760
|
-
del: (chunks) => /* @__PURE__ */ (0,
|
|
2797
|
+
del: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("del", { children: chunks })
|
|
2761
2798
|
},
|
|
2762
2799
|
locale,
|
|
2763
2800
|
messages: messages[locale],
|
|
@@ -2768,35 +2805,35 @@ var IntlProvider = ({
|
|
|
2768
2805
|
};
|
|
2769
2806
|
|
|
2770
2807
|
// src/context/provider.tsx
|
|
2771
|
-
var
|
|
2808
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2772
2809
|
|
|
2773
2810
|
// src/components/card/header.tsx
|
|
2774
|
-
var
|
|
2811
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2775
2812
|
|
|
2776
2813
|
// src/components/card/card.tsx
|
|
2777
|
-
var
|
|
2814
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2778
2815
|
|
|
2779
2816
|
// src/components/card/footer.tsx
|
|
2780
|
-
var
|
|
2817
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2781
2818
|
|
|
2782
2819
|
// src/components/card/content.tsx
|
|
2783
|
-
var
|
|
2820
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2784
2821
|
|
|
2785
2822
|
// src/components/card/two-step/state-method-active.tsx
|
|
2786
|
-
var
|
|
2787
|
-
var
|
|
2823
|
+
var import_client_fetch25 = require("@ory/client-fetch");
|
|
2824
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2788
2825
|
|
|
2789
2826
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2790
|
-
var
|
|
2791
|
-
var
|
|
2827
|
+
var import_client_fetch26 = require("@ory/client-fetch");
|
|
2828
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2792
2829
|
|
|
2793
2830
|
// src/components/card/card-two-step.tsx
|
|
2794
2831
|
var import_elements_react = require("@ory/elements-react");
|
|
2795
|
-
var
|
|
2832
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2796
2833
|
|
|
2797
2834
|
// src/components/card/card-consent.tsx
|
|
2798
|
-
var
|
|
2799
|
-
var
|
|
2835
|
+
var import_client_fetch27 = require("@ory/client-fetch");
|
|
2836
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2800
2837
|
|
|
2801
2838
|
// src/components/card/two-step/state-select-method.tsx
|
|
2802
2839
|
var import_react_intl9 = require("react-intl");
|
|
@@ -2804,34 +2841,41 @@ var import_react_intl9 = require("react-intl");
|
|
|
2804
2841
|
// src/components/card/two-step/list-methods.tsx
|
|
2805
2842
|
var import_elements_react2 = require("@ory/elements-react");
|
|
2806
2843
|
var import_react_hook_form12 = require("react-hook-form");
|
|
2807
|
-
var
|
|
2844
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2808
2845
|
|
|
2809
2846
|
// src/components/card/two-step/state-select-method.tsx
|
|
2810
|
-
var
|
|
2847
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2811
2848
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2812
2849
|
return Object.fromEntries(
|
|
2813
|
-
Object.values(
|
|
2850
|
+
Object.values(import_client_fetch28.UiNodeGroupEnum).filter((group) => {
|
|
2814
2851
|
var _a;
|
|
2815
2852
|
return (_a = visibleGroups[group]) == null ? void 0 : _a.length;
|
|
2816
2853
|
}).filter(
|
|
2817
2854
|
(group) => ![
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
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
|
|
2824
2861
|
].includes(group)
|
|
2825
2862
|
).map((g) => [g, {}])
|
|
2826
2863
|
);
|
|
2827
2864
|
}
|
|
2828
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
|
+
|
|
2829
2873
|
// src/theme/default/utils/logout.ts
|
|
2830
|
-
var
|
|
2874
|
+
var import_react7 = require("react");
|
|
2831
2875
|
function useClientLogout(config) {
|
|
2832
|
-
const [logoutFlow, setLogoutFlow] = (0,
|
|
2833
|
-
const [isLoading, setIsLoading] = (0,
|
|
2834
|
-
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 () => {
|
|
2835
2879
|
try {
|
|
2836
2880
|
const flow = await frontendClient(config.sdk.url).createBrowserLogoutFlow().catch((err) => {
|
|
2837
2881
|
var _a;
|
|
@@ -2845,41 +2889,90 @@ function useClientLogout(config) {
|
|
|
2845
2889
|
setIsLoading(false);
|
|
2846
2890
|
}
|
|
2847
2891
|
}, [config.sdk.url]);
|
|
2848
|
-
(0,
|
|
2892
|
+
(0, import_react7.useEffect)(() => {
|
|
2849
2893
|
void fetchLogoutFlow();
|
|
2850
2894
|
}, [fetchLogoutFlow]);
|
|
2851
2895
|
return { logoutFlow, didLoad: !isLoading };
|
|
2852
2896
|
}
|
|
2853
2897
|
|
|
2854
|
-
// src/theme/default/
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
const oryFlow = (0, import_elements_react3.useOryFlow)();
|
|
2858
|
-
switch (oryFlow.flowType) {
|
|
2859
|
-
case import_client_fetch27.FlowType.Login:
|
|
2860
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(LoginCardFooter, {});
|
|
2861
|
-
case import_client_fetch27.FlowType.Registration:
|
|
2862
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RegistrationCardFooter, {});
|
|
2863
|
-
case import_client_fetch27.FlowType.Recovery:
|
|
2864
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(RecoveryCardFooter, {});
|
|
2865
|
-
case import_client_fetch27.FlowType.Verification:
|
|
2866
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(VerificationCardFooter, {});
|
|
2867
|
-
case import_client_fetch27.FlowType.OAuth2Consent:
|
|
2868
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2869
|
-
default:
|
|
2870
|
-
return null;
|
|
2871
|
-
}
|
|
2898
|
+
// src/theme/default/utils/url.ts
|
|
2899
|
+
function restartFlowUrl(flow, fallback) {
|
|
2900
|
+
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
2872
2901
|
}
|
|
2873
|
-
function
|
|
2874
|
-
const
|
|
2875
|
-
const
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
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);
|
|
2907
|
+
}
|
|
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);
|
|
2974
|
+
let returnTo = config.project.default_redirect_url;
|
|
2975
|
+
if (flow.return_to) {
|
|
2883
2976
|
returnTo = flow.return_to;
|
|
2884
2977
|
}
|
|
2885
2978
|
if (!returnTo) {
|
|
@@ -2888,36 +2981,17 @@ function LoginCardFooter() {
|
|
|
2888
2981
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
2889
2982
|
);
|
|
2890
2983
|
}
|
|
2891
|
-
if (flow
|
|
2892
|
-
return /* @__PURE__ */ (0,
|
|
2893
|
-
intl.formatMessage({
|
|
2894
|
-
id: "login.2fa.go-back"
|
|
2895
|
-
}),
|
|
2896
|
-
" ",
|
|
2897
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
2898
|
-
"a",
|
|
2899
|
-
{
|
|
2900
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2901
|
-
href: logout ? logout == null ? void 0 : logout.logout_url : returnTo,
|
|
2902
|
-
"data-testid": (
|
|
2903
|
-
// Only add the test-id when the logout link has loaded.
|
|
2904
|
-
didLoadLogout ? "ory/screen/login/action/logout" : void 0
|
|
2905
|
-
),
|
|
2906
|
-
children: intl.formatMessage({
|
|
2907
|
-
id: !didLoadLogout || logout ? "login.logout-button" : "login.2fa.go-back.link"
|
|
2908
|
-
})
|
|
2909
|
-
}
|
|
2910
|
-
)
|
|
2911
|
-
] });
|
|
2984
|
+
if (shouldShowLogoutButton(flow, formState, authMethods)) {
|
|
2985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(LogoutButton, { returnTo });
|
|
2912
2986
|
}
|
|
2913
|
-
return /* @__PURE__ */ (0,
|
|
2914
|
-
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: [
|
|
2915
2989
|
intl.formatMessage({
|
|
2916
2990
|
id: "login.registration-label",
|
|
2917
2991
|
defaultMessage: "No account?"
|
|
2918
2992
|
}),
|
|
2919
2993
|
" ",
|
|
2920
|
-
/* @__PURE__ */ (0,
|
|
2994
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2921
2995
|
"a",
|
|
2922
2996
|
{
|
|
2923
2997
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2930,18 +3004,22 @@ function LoginCardFooter() {
|
|
|
2930
3004
|
}
|
|
2931
3005
|
)
|
|
2932
3006
|
] }),
|
|
2933
|
-
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ (0,
|
|
2934
|
-
"
|
|
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",
|
|
2935
3009
|
{
|
|
2936
3010
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
2937
|
-
|
|
3011
|
+
onClick: () => {
|
|
3012
|
+
dispatchFormState({
|
|
3013
|
+
type: "action_clear_active_method"
|
|
3014
|
+
});
|
|
3015
|
+
},
|
|
2938
3016
|
"data-testid": "ory/screen/login/mfa/action/selectMethod",
|
|
2939
3017
|
children: intl.formatMessage({
|
|
2940
3018
|
id: "login.2fa.method.go-back"
|
|
2941
3019
|
})
|
|
2942
3020
|
}
|
|
2943
3021
|
) }),
|
|
2944
|
-
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)(
|
|
2945
3023
|
"a",
|
|
2946
3024
|
{
|
|
2947
3025
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2954,9 +3032,35 @@ function LoginCardFooter() {
|
|
|
2954
3032
|
) })
|
|
2955
3033
|
] });
|
|
2956
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
|
+
}
|
|
2957
3060
|
function RegistrationCardFooter() {
|
|
2958
3061
|
const intl = (0, import_react_intl10.useIntl)();
|
|
2959
|
-
const {
|
|
3062
|
+
const { flow, formState } = (0, import_elements_react3.useOryFlow)();
|
|
3063
|
+
const config = (0, import_elements_react3.useOryConfiguration)();
|
|
2960
3064
|
const visibleGroups = useNodeGroupsWithVisibleNodes(flow.ui.nodes);
|
|
2961
3065
|
const authMethodBlocks = toAuthMethodPickerOptions(visibleGroups);
|
|
2962
3066
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
@@ -2965,11 +3069,12 @@ function RegistrationCardFooter() {
|
|
|
2965
3069
|
if (!screenSelectionNode || Object.entries(authMethodBlocks).length < 2) {
|
|
2966
3070
|
return null;
|
|
2967
3071
|
}
|
|
2968
|
-
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)(
|
|
2969
3073
|
"a",
|
|
2970
3074
|
{
|
|
2971
3075
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
2972
3076
|
href: "",
|
|
3077
|
+
"data-testid": "ory/screen/registration/action/selectMethod",
|
|
2973
3078
|
children: intl.formatMessage({
|
|
2974
3079
|
id: "card.footer.select-another-method",
|
|
2975
3080
|
defaultMessage: "Select another method"
|
|
@@ -2978,13 +3083,13 @@ function RegistrationCardFooter() {
|
|
|
2978
3083
|
) });
|
|
2979
3084
|
case "select_method":
|
|
2980
3085
|
default:
|
|
2981
|
-
return /* @__PURE__ */ (0,
|
|
3086
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: [
|
|
2982
3087
|
intl.formatMessage({
|
|
2983
3088
|
id: "registration.login-label",
|
|
2984
3089
|
defaultMessage: "Already have an account?"
|
|
2985
3090
|
}),
|
|
2986
3091
|
" ",
|
|
2987
|
-
/* @__PURE__ */ (0,
|
|
3092
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
2988
3093
|
"a",
|
|
2989
3094
|
{
|
|
2990
3095
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -3013,26 +3118,26 @@ function ConsentCardFooter({ flow }) {
|
|
|
3013
3118
|
node_type: "input",
|
|
3014
3119
|
name: "remember"
|
|
3015
3120
|
});
|
|
3016
|
-
return /* @__PURE__ */ (0,
|
|
3017
|
-
/* @__PURE__ */ (0,
|
|
3018
|
-
/* @__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: [
|
|
3019
3124
|
"Make sure you trust ",
|
|
3020
3125
|
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
3021
3126
|
] }),
|
|
3022
|
-
/* @__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." })
|
|
3023
3128
|
] }),
|
|
3024
|
-
rememberNode && /* @__PURE__ */ (0,
|
|
3129
|
+
rememberNode && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3025
3130
|
Node2.Checkbox,
|
|
3026
3131
|
{
|
|
3027
3132
|
attributes: rememberNode.attributes,
|
|
3028
3133
|
node: rememberNode
|
|
3029
3134
|
}
|
|
3030
3135
|
),
|
|
3031
|
-
/* @__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(
|
|
3032
3137
|
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
3033
3138
|
).map((n) => {
|
|
3034
3139
|
const attributes = n.attributes;
|
|
3035
|
-
return /* @__PURE__ */ (0,
|
|
3140
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3036
3141
|
Node2.Button,
|
|
3037
3142
|
{
|
|
3038
3143
|
node: n,
|
|
@@ -3041,8 +3146,8 @@ function ConsentCardFooter({ flow }) {
|
|
|
3041
3146
|
attributes.value
|
|
3042
3147
|
);
|
|
3043
3148
|
}) }),
|
|
3044
|
-
/* @__PURE__ */ (0,
|
|
3045
|
-
/* @__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: [
|
|
3046
3151
|
"Authorizing will redirect to",
|
|
3047
3152
|
" "
|
|
3048
3153
|
] }),
|
|
@@ -3055,7 +3160,7 @@ function ConsentCardFooter({ flow }) {
|
|
|
3055
3160
|
var import_elements_react5 = require("@ory/elements-react");
|
|
3056
3161
|
|
|
3057
3162
|
// src/theme/default/utils/constructCardHeader.ts
|
|
3058
|
-
var
|
|
3163
|
+
var import_client_fetch30 = require("@ory/client-fetch");
|
|
3059
3164
|
var import_react_intl11 = require("react-intl");
|
|
3060
3165
|
function joinWithCommaOr(list, orText = "or") {
|
|
3061
3166
|
if (list.length === 0) {
|
|
@@ -3072,7 +3177,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3072
3177
|
const nodes = container.nodes;
|
|
3073
3178
|
const intl = (0, import_react_intl11.useIntl)();
|
|
3074
3179
|
switch (opts.flowType) {
|
|
3075
|
-
case
|
|
3180
|
+
case import_client_fetch30.FlowType.Recovery:
|
|
3076
3181
|
if (nodes.find(
|
|
3077
3182
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3078
3183
|
)) {
|
|
@@ -3094,7 +3199,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3094
3199
|
id: "recovery.subtitle"
|
|
3095
3200
|
})
|
|
3096
3201
|
};
|
|
3097
|
-
case
|
|
3202
|
+
case import_client_fetch30.FlowType.Settings:
|
|
3098
3203
|
return {
|
|
3099
3204
|
title: intl.formatMessage({
|
|
3100
3205
|
id: "settings.title"
|
|
@@ -3103,7 +3208,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3103
3208
|
id: "settings.subtitle"
|
|
3104
3209
|
})
|
|
3105
3210
|
};
|
|
3106
|
-
case
|
|
3211
|
+
case import_client_fetch30.FlowType.Verification:
|
|
3107
3212
|
if (nodes.find(
|
|
3108
3213
|
(node) => "name" in node.attributes && node.attributes.name === "code"
|
|
3109
3214
|
)) {
|
|
@@ -3125,7 +3230,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3125
3230
|
id: "verification.subtitle"
|
|
3126
3231
|
})
|
|
3127
3232
|
};
|
|
3128
|
-
case
|
|
3233
|
+
case import_client_fetch30.FlowType.Login: {
|
|
3129
3234
|
const accountLinkingMessage = (_a = container.messages) == null ? void 0 : _a.find(
|
|
3130
3235
|
(m) => m.id === 1010016
|
|
3131
3236
|
);
|
|
@@ -3148,7 +3253,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3148
3253
|
const parts = [];
|
|
3149
3254
|
if (nodes.find((node) => node.group === "password")) {
|
|
3150
3255
|
switch (opts.flowType) {
|
|
3151
|
-
case
|
|
3256
|
+
case import_client_fetch30.FlowType.Registration:
|
|
3152
3257
|
parts.push(
|
|
3153
3258
|
intl.formatMessage(
|
|
3154
3259
|
{ id: "card.header.parts.password.registration" },
|
|
@@ -3191,7 +3296,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3191
3296
|
}
|
|
3192
3297
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
3193
3298
|
const identifier = nodes.find(
|
|
3194
|
-
(node) => (0,
|
|
3299
|
+
(node) => (0, import_client_fetch30.isUiNodeInputAttributes)(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
3195
3300
|
);
|
|
3196
3301
|
if (identifier) {
|
|
3197
3302
|
parts.push(
|
|
@@ -3207,7 +3312,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3207
3312
|
}
|
|
3208
3313
|
}
|
|
3209
3314
|
switch (opts.flowType) {
|
|
3210
|
-
case
|
|
3315
|
+
case import_client_fetch30.FlowType.Login:
|
|
3211
3316
|
if (opts.flow.refresh) {
|
|
3212
3317
|
return {
|
|
3213
3318
|
title: intl.formatMessage({
|
|
@@ -3248,7 +3353,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3248
3353
|
}
|
|
3249
3354
|
) : ""
|
|
3250
3355
|
};
|
|
3251
|
-
case
|
|
3356
|
+
case import_client_fetch30.FlowType.Registration:
|
|
3252
3357
|
return {
|
|
3253
3358
|
title: intl.formatMessage({
|
|
3254
3359
|
id: "registration.title"
|
|
@@ -3265,7 +3370,7 @@ function useCardHeaderText(container, opts) {
|
|
|
3265
3370
|
}
|
|
3266
3371
|
) : ""
|
|
3267
3372
|
};
|
|
3268
|
-
case
|
|
3373
|
+
case import_client_fetch30.FlowType.OAuth2Consent:
|
|
3269
3374
|
return {
|
|
3270
3375
|
title: intl.formatMessage(
|
|
3271
3376
|
{
|
|
@@ -3292,19 +3397,9 @@ function useCardHeaderText(container, opts) {
|
|
|
3292
3397
|
}
|
|
3293
3398
|
|
|
3294
3399
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3295
|
-
var
|
|
3400
|
+
var import_client_fetch31 = require("@ory/client-fetch");
|
|
3296
3401
|
var import_elements_react4 = require("@ory/elements-react");
|
|
3297
|
-
|
|
3298
|
-
// src/theme/default/assets/icons/arrow-left.svg
|
|
3299
|
-
var React3 = __toESM(require("react"));
|
|
3300
|
-
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3301
|
-
var SvgArrowLeft = (props) => {
|
|
3302
|
-
var _a, _b;
|
|
3303
|
-
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" }) });
|
|
3304
|
-
};
|
|
3305
|
-
var arrow_left_default = SvgArrowLeft;
|
|
3306
|
-
|
|
3307
|
-
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3402
|
+
var import_react8 = require("react");
|
|
3308
3403
|
var import_react_hook_form13 = require("react-hook-form");
|
|
3309
3404
|
|
|
3310
3405
|
// src/theme/default/utils/attributes.ts
|
|
@@ -3332,17 +3427,26 @@ function omitInputAttributes({
|
|
|
3332
3427
|
]);
|
|
3333
3428
|
}
|
|
3334
3429
|
|
|
3335
|
-
// src/theme/default/
|
|
3336
|
-
var
|
|
3430
|
+
// src/theme/default/assets/icons/arrow-left.svg
|
|
3431
|
+
var React3 = __toESM(require("react"));
|
|
3337
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");
|
|
3338
3441
|
function DefaultCurrentIdentifierButton() {
|
|
3339
3442
|
var _a;
|
|
3340
|
-
const { flow, flowType,
|
|
3443
|
+
const { flow, flowType, formState } = (0, import_elements_react4.useOryFlow)();
|
|
3341
3444
|
const { setValue, getValues, watch } = (0, import_react_hook_form13.useFormContext)();
|
|
3342
|
-
const [turnstileResponse, setTurnstileResponse] = (0,
|
|
3445
|
+
const [turnstileResponse, setTurnstileResponse] = (0, import_react8.useState)();
|
|
3446
|
+
const config = (0, import_elements_react4.useOryConfiguration)();
|
|
3343
3447
|
const ui = flow.ui;
|
|
3344
3448
|
const captchaVerificationValue = (_a = watch("transient_payload")) == null ? void 0 : _a.captcha_turnstile_response;
|
|
3345
|
-
(0,
|
|
3449
|
+
(0, import_react8.useEffect)(() => {
|
|
3346
3450
|
if (captchaVerificationValue) {
|
|
3347
3451
|
setTurnstileResponse(captchaVerificationValue);
|
|
3348
3452
|
}
|
|
@@ -3350,7 +3454,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3350
3454
|
if (formState.current === "provide_identifier") {
|
|
3351
3455
|
return null;
|
|
3352
3456
|
}
|
|
3353
|
-
if (flowType ===
|
|
3457
|
+
if (flowType === import_client_fetch31.FlowType.Login && flow.requested_aal === "aal2") {
|
|
3354
3458
|
return null;
|
|
3355
3459
|
}
|
|
3356
3460
|
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
@@ -3363,9 +3467,9 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3363
3467
|
);
|
|
3364
3468
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
3365
3469
|
if (screenSelectionNode) {
|
|
3366
|
-
return /* @__PURE__ */ (0,
|
|
3470
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
3367
3471
|
flow.ui.nodes.filter((n) => {
|
|
3368
|
-
if ((0,
|
|
3472
|
+
if ((0, import_client_fetch31.isUiNodeInputAttributes)(n.attributes)) {
|
|
3369
3473
|
return n.attributes.type === "hidden";
|
|
3370
3474
|
}
|
|
3371
3475
|
return false;
|
|
@@ -3375,7 +3479,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3375
3479
|
if (attrs.name === "transient_payload.captcha_turnstile_response" && turnstileResponse) {
|
|
3376
3480
|
value = turnstileResponse;
|
|
3377
3481
|
}
|
|
3378
|
-
return /* @__PURE__ */ (0,
|
|
3482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3379
3483
|
"input",
|
|
3380
3484
|
{
|
|
3381
3485
|
type: "hidden",
|
|
@@ -3385,7 +3489,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3385
3489
|
attrs.name
|
|
3386
3490
|
);
|
|
3387
3491
|
}),
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
3492
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3389
3493
|
"button",
|
|
3390
3494
|
{
|
|
3391
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",
|
|
@@ -3402,8 +3506,8 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3402
3506
|
value: screenSelectionNode.attributes.value,
|
|
3403
3507
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3404
3508
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3405
|
-
children: /* @__PURE__ */ (0,
|
|
3406
|
-
/* @__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)(
|
|
3407
3511
|
arrow_left_default,
|
|
3408
3512
|
{
|
|
3409
3513
|
size: 16,
|
|
@@ -3411,13 +3515,13 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3411
3515
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3412
3516
|
}
|
|
3413
3517
|
),
|
|
3414
|
-
/* @__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 })
|
|
3415
3519
|
] })
|
|
3416
3520
|
}
|
|
3417
3521
|
)
|
|
3418
3522
|
] });
|
|
3419
3523
|
}
|
|
3420
|
-
return /* @__PURE__ */ (0,
|
|
3524
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3421
3525
|
"a",
|
|
3422
3526
|
{
|
|
3423
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",
|
|
@@ -3425,8 +3529,8 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3425
3529
|
href: initFlowUrl2,
|
|
3426
3530
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3427
3531
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3428
|
-
children: /* @__PURE__ */ (0,
|
|
3429
|
-
/* @__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)(
|
|
3430
3534
|
arrow_left_default,
|
|
3431
3535
|
{
|
|
3432
3536
|
size: 16,
|
|
@@ -3434,7 +3538,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3434
3538
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3435
3539
|
}
|
|
3436
3540
|
),
|
|
3437
|
-
/* @__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 })
|
|
3438
3542
|
] })
|
|
3439
3543
|
}
|
|
3440
3544
|
);
|
|
@@ -3443,18 +3547,18 @@ function getBackButtonNodeAttributes(flowType, nodes) {
|
|
|
3443
3547
|
var _a, _b;
|
|
3444
3548
|
let nodeBackButtonAttributes;
|
|
3445
3549
|
switch (flowType) {
|
|
3446
|
-
case
|
|
3550
|
+
case import_client_fetch31.FlowType.Login:
|
|
3447
3551
|
nodeBackButtonAttributes = (_a = nodes.find(
|
|
3448
|
-
(node) => (0,
|
|
3552
|
+
(node) => (0, import_client_fetch31.isUiNodeInputAttributes)(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
3449
3553
|
)) == null ? void 0 : _a.attributes;
|
|
3450
3554
|
break;
|
|
3451
|
-
case
|
|
3555
|
+
case import_client_fetch31.FlowType.Registration:
|
|
3452
3556
|
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
3453
3557
|
break;
|
|
3454
|
-
case
|
|
3455
|
-
case
|
|
3558
|
+
case import_client_fetch31.FlowType.Recovery:
|
|
3559
|
+
case import_client_fetch31.FlowType.Verification:
|
|
3456
3560
|
nodeBackButtonAttributes = (_b = nodes.find(
|
|
3457
|
-
(n) => (0,
|
|
3561
|
+
(n) => (0, import_client_fetch31.isUiNodeInputAttributes)(n.attributes) && n.attributes.name === "email"
|
|
3458
3562
|
)) == null ? void 0 : _b.attributes;
|
|
3459
3563
|
break;
|
|
3460
3564
|
}
|
|
@@ -3471,23 +3575,23 @@ var backButtonCandiates = [
|
|
|
3471
3575
|
function guessRegistrationBackButton(uiNodes) {
|
|
3472
3576
|
var _a;
|
|
3473
3577
|
return (_a = uiNodes.find(
|
|
3474
|
-
(node) => (0,
|
|
3578
|
+
(node) => (0, import_client_fetch31.isUiNodeInputAttributes)(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
3475
3579
|
)) == null ? void 0 : _a.attributes;
|
|
3476
3580
|
}
|
|
3477
3581
|
|
|
3478
3582
|
// src/theme/default/components/card/header.tsx
|
|
3479
|
-
var
|
|
3583
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3480
3584
|
function InnerCardHeader({
|
|
3481
3585
|
title,
|
|
3482
3586
|
text,
|
|
3483
3587
|
messageId
|
|
3484
3588
|
}) {
|
|
3485
3589
|
const { Card } = (0, import_elements_react5.useComponents)();
|
|
3486
|
-
return /* @__PURE__ */ (0,
|
|
3487
|
-
/* @__PURE__ */ (0,
|
|
3488
|
-
/* @__PURE__ */ (0,
|
|
3489
|
-
/* @__PURE__ */ (0,
|
|
3490
|
-
/* @__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)(
|
|
3491
3595
|
"p",
|
|
3492
3596
|
{
|
|
3493
3597
|
className: "leading-normal text-interface-foreground-default-secondary",
|
|
@@ -3495,7 +3599,7 @@ function InnerCardHeader({
|
|
|
3495
3599
|
children: text
|
|
3496
3600
|
}
|
|
3497
3601
|
),
|
|
3498
|
-
/* @__PURE__ */ (0,
|
|
3602
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(DefaultCurrentIdentifierButton, {})
|
|
3499
3603
|
] })
|
|
3500
3604
|
] });
|
|
3501
3605
|
}
|
|
@@ -3505,44 +3609,40 @@ function DefaultCardHeader() {
|
|
|
3505
3609
|
context.flow.ui,
|
|
3506
3610
|
context
|
|
3507
3611
|
);
|
|
3508
|
-
return /* @__PURE__ */ (0,
|
|
3612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(InnerCardHeader, { title, text: description, messageId });
|
|
3509
3613
|
}
|
|
3510
3614
|
|
|
3511
3615
|
// src/theme/default/components/card/logo.tsx
|
|
3512
3616
|
var import_elements_react6 = require("@ory/elements-react");
|
|
3513
|
-
var
|
|
3617
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3514
3618
|
function DefaultCardLogo() {
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3619
|
+
const config = (0, import_elements_react6.useOryConfiguration)();
|
|
3620
|
+
if (config.project.logo_light_url) {
|
|
3621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3519
3622
|
"img",
|
|
3520
3623
|
{
|
|
3521
|
-
src:
|
|
3624
|
+
src: config.project.logo_light_url,
|
|
3522
3625
|
width: 100,
|
|
3523
3626
|
height: 36,
|
|
3524
3627
|
alt: "Logo"
|
|
3525
3628
|
}
|
|
3526
3629
|
);
|
|
3527
3630
|
}
|
|
3528
|
-
|
|
3529
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
3530
|
-
}
|
|
3531
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = flow.config.project.name) != null ? _a : flow.config.name });
|
|
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 });
|
|
3532
3632
|
}
|
|
3533
3633
|
|
|
3534
3634
|
// src/theme/default/components/card/layout.tsx
|
|
3535
|
-
var
|
|
3635
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3536
3636
|
function DefaultCardLayout({ children }) {
|
|
3537
|
-
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 });
|
|
3538
3638
|
}
|
|
3539
3639
|
|
|
3540
3640
|
// src/theme/default/components/card/index.tsx
|
|
3541
|
-
var
|
|
3641
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3542
3642
|
function DefaultCard({ children }) {
|
|
3543
|
-
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: [
|
|
3544
3644
|
children,
|
|
3545
|
-
/* @__PURE__ */ (0,
|
|
3645
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Badge, {})
|
|
3546
3646
|
] }) });
|
|
3547
3647
|
}
|
|
3548
3648
|
|
|
@@ -3556,56 +3656,56 @@ function cn(...inputs) {
|
|
|
3556
3656
|
// src/theme/default/components/form/index.tsx
|
|
3557
3657
|
var import_react_intl13 = require("react-intl");
|
|
3558
3658
|
var import_elements_react8 = require("@ory/elements-react");
|
|
3559
|
-
var
|
|
3659
|
+
var import_client_fetch33 = require("@ory/client-fetch");
|
|
3560
3660
|
|
|
3561
3661
|
// src/theme/default/components/form/social.tsx
|
|
3562
3662
|
var import_elements_react7 = require("@ory/elements-react");
|
|
3563
|
-
var
|
|
3663
|
+
var import_react9 = require("react");
|
|
3564
3664
|
var import_react_hook_form14 = require("react-hook-form");
|
|
3565
3665
|
var import_react_intl12 = require("react-intl");
|
|
3566
3666
|
var import_usehooks_ts = require("usehooks-ts");
|
|
3567
3667
|
|
|
3568
3668
|
// src/theme/default/provider-logos/apple.svg
|
|
3569
3669
|
var React4 = __toESM(require("react"));
|
|
3570
|
-
var
|
|
3670
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3571
3671
|
var SvgApple = (props) => {
|
|
3572
3672
|
var _a, _b;
|
|
3573
|
-
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" }) });
|
|
3574
3674
|
};
|
|
3575
3675
|
var apple_default = SvgApple;
|
|
3576
3676
|
|
|
3577
3677
|
// src/theme/default/provider-logos/auth0.svg
|
|
3578
3678
|
var React5 = __toESM(require("react"));
|
|
3579
|
-
var
|
|
3679
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3580
3680
|
var SvgAuth0 = (props) => {
|
|
3581
3681
|
var _a, _b;
|
|
3582
|
-
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" }) });
|
|
3583
3683
|
};
|
|
3584
3684
|
var auth0_default = SvgAuth0;
|
|
3585
3685
|
|
|
3586
3686
|
// src/theme/default/provider-logos/discord.svg
|
|
3587
3687
|
var React6 = __toESM(require("react"));
|
|
3588
|
-
var
|
|
3688
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3589
3689
|
var SvgDiscord = (props) => {
|
|
3590
3690
|
var _a, _b;
|
|
3591
|
-
return /* @__PURE__ */ (0,
|
|
3592
|
-
/* @__PURE__ */ (0,
|
|
3593
|
-
/* @__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" })
|
|
3594
3694
|
] });
|
|
3595
3695
|
};
|
|
3596
3696
|
var discord_default = SvgDiscord;
|
|
3597
3697
|
|
|
3598
3698
|
// src/theme/default/provider-logos/facebook.svg
|
|
3599
3699
|
var React7 = __toESM(require("react"));
|
|
3600
|
-
var
|
|
3700
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3601
3701
|
var SvgFacebook = (props) => {
|
|
3602
3702
|
var _a, _b;
|
|
3603
|
-
return /* @__PURE__ */ (0,
|
|
3604
|
-
/* @__PURE__ */ (0,
|
|
3605
|
-
/* @__PURE__ */ (0,
|
|
3606
|
-
/* @__PURE__ */ (0,
|
|
3607
|
-
/* @__PURE__ */ (0,
|
|
3608
|
-
/* @__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" })
|
|
3609
3709
|
] }) })
|
|
3610
3710
|
] });
|
|
3611
3711
|
};
|
|
@@ -3613,111 +3713,111 @@ var facebook_default = SvgFacebook;
|
|
|
3613
3713
|
|
|
3614
3714
|
// src/theme/default/provider-logos/github.svg
|
|
3615
3715
|
var React8 = __toESM(require("react"));
|
|
3616
|
-
var
|
|
3716
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3617
3717
|
var SvgGithub = (props) => {
|
|
3618
3718
|
var _a, _b;
|
|
3619
|
-
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" }) });
|
|
3620
3720
|
};
|
|
3621
3721
|
var github_default = SvgGithub;
|
|
3622
3722
|
|
|
3623
3723
|
// src/theme/default/provider-logos/gitlab.svg
|
|
3624
3724
|
var React9 = __toESM(require("react"));
|
|
3625
|
-
var
|
|
3725
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3626
3726
|
var SvgGitlab = (props) => {
|
|
3627
3727
|
var _a, _b;
|
|
3628
|
-
return /* @__PURE__ */ (0,
|
|
3629
|
-
/* @__PURE__ */ (0,
|
|
3630
|
-
/* @__PURE__ */ (0,
|
|
3631
|
-
/* @__PURE__ */ (0,
|
|
3632
|
-
/* @__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" })
|
|
3633
3733
|
] });
|
|
3634
3734
|
};
|
|
3635
3735
|
var gitlab_default = SvgGitlab;
|
|
3636
3736
|
|
|
3637
3737
|
// src/theme/default/provider-logos/google.svg
|
|
3638
3738
|
var React10 = __toESM(require("react"));
|
|
3639
|
-
var
|
|
3739
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3640
3740
|
var SvgGoogle = (props) => {
|
|
3641
3741
|
var _a, _b;
|
|
3642
|
-
return /* @__PURE__ */ (0,
|
|
3643
|
-
/* @__PURE__ */ (0,
|
|
3644
|
-
/* @__PURE__ */ (0,
|
|
3645
|
-
/* @__PURE__ */ (0,
|
|
3646
|
-
/* @__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" })
|
|
3647
3747
|
] });
|
|
3648
3748
|
};
|
|
3649
3749
|
var google_default = SvgGoogle;
|
|
3650
3750
|
|
|
3651
3751
|
// src/theme/default/provider-logos/linkedin.svg
|
|
3652
3752
|
var React11 = __toESM(require("react"));
|
|
3653
|
-
var
|
|
3753
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3654
3754
|
var SvgLinkedin = (props) => {
|
|
3655
3755
|
var _a, _b;
|
|
3656
|
-
return /* @__PURE__ */ (0,
|
|
3657
|
-
/* @__PURE__ */ (0,
|
|
3658
|
-
/* @__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" })
|
|
3659
3759
|
] });
|
|
3660
3760
|
};
|
|
3661
3761
|
var linkedin_default = SvgLinkedin;
|
|
3662
3762
|
|
|
3663
3763
|
// src/theme/default/provider-logos/microsoft.svg
|
|
3664
3764
|
var React12 = __toESM(require("react"));
|
|
3665
|
-
var
|
|
3765
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3666
3766
|
var SvgMicrosoft = (props) => {
|
|
3667
3767
|
var _a, _b;
|
|
3668
|
-
return /* @__PURE__ */ (0,
|
|
3669
|
-
/* @__PURE__ */ (0,
|
|
3670
|
-
/* @__PURE__ */ (0,
|
|
3671
|
-
/* @__PURE__ */ (0,
|
|
3672
|
-
/* @__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" })
|
|
3673
3773
|
] });
|
|
3674
3774
|
};
|
|
3675
3775
|
var microsoft_default = SvgMicrosoft;
|
|
3676
3776
|
|
|
3677
3777
|
// src/theme/default/provider-logos/slack.svg
|
|
3678
3778
|
var React13 = __toESM(require("react"));
|
|
3679
|
-
var
|
|
3779
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3680
3780
|
var SvgSlack = (props) => {
|
|
3681
3781
|
var _a, _b;
|
|
3682
|
-
return /* @__PURE__ */ (0,
|
|
3683
|
-
/* @__PURE__ */ (0,
|
|
3684
|
-
/* @__PURE__ */ (0,
|
|
3685
|
-
/* @__PURE__ */ (0,
|
|
3686
|
-
/* @__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" })
|
|
3687
3787
|
] });
|
|
3688
3788
|
};
|
|
3689
3789
|
var slack_default = SvgSlack;
|
|
3690
3790
|
|
|
3691
3791
|
// src/theme/default/provider-logos/spotify.svg
|
|
3692
3792
|
var React14 = __toESM(require("react"));
|
|
3693
|
-
var
|
|
3793
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3694
3794
|
var SvgSpotify = (props) => {
|
|
3695
3795
|
var _a, _b;
|
|
3696
|
-
return /* @__PURE__ */ (0,
|
|
3697
|
-
/* @__PURE__ */ (0,
|
|
3698
|
-
/* @__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" })
|
|
3699
3799
|
] });
|
|
3700
3800
|
};
|
|
3701
3801
|
var spotify_default = SvgSpotify;
|
|
3702
3802
|
|
|
3703
3803
|
// src/theme/default/provider-logos/yandex.svg
|
|
3704
3804
|
var React15 = __toESM(require("react"));
|
|
3705
|
-
var
|
|
3805
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3706
3806
|
var SvgYandex = (props) => {
|
|
3707
3807
|
var _a, _b;
|
|
3708
|
-
return /* @__PURE__ */ (0,
|
|
3709
|
-
/* @__PURE__ */ (0,
|
|
3710
|
-
/* @__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" })
|
|
3711
3811
|
] });
|
|
3712
3812
|
};
|
|
3713
3813
|
var yandex_default = SvgYandex;
|
|
3714
3814
|
|
|
3715
3815
|
// src/theme/default/provider-logos/x.svg
|
|
3716
3816
|
var React16 = __toESM(require("react"));
|
|
3717
|
-
var
|
|
3817
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3718
3818
|
var SvgX = (props) => {
|
|
3719
3819
|
var _a, _b;
|
|
3720
|
-
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" }) });
|
|
3721
3821
|
};
|
|
3722
3822
|
var x_default = SvgX;
|
|
3723
3823
|
|
|
@@ -3740,9 +3840,9 @@ var logos = {
|
|
|
3740
3840
|
var provider_logos_default = logos;
|
|
3741
3841
|
|
|
3742
3842
|
// src/theme/default/components/form/spinner.tsx
|
|
3743
|
-
var
|
|
3843
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3744
3844
|
function Spinner({ className }) {
|
|
3745
|
-
return /* @__PURE__ */ (0,
|
|
3845
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
|
|
3746
3846
|
"svg",
|
|
3747
3847
|
{
|
|
3748
3848
|
"aria-hidden": "true",
|
|
@@ -3755,7 +3855,7 @@ function Spinner({ className }) {
|
|
|
3755
3855
|
fill: "none",
|
|
3756
3856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3757
3857
|
children: [
|
|
3758
|
-
/* @__PURE__ */ (0,
|
|
3858
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
3759
3859
|
"path",
|
|
3760
3860
|
{
|
|
3761
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",
|
|
@@ -3764,7 +3864,7 @@ function Spinner({ className }) {
|
|
|
3764
3864
|
strokeLinejoin: "round"
|
|
3765
3865
|
}
|
|
3766
3866
|
) }),
|
|
3767
|
-
/* @__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)(
|
|
3768
3868
|
"rect",
|
|
3769
3869
|
{
|
|
3770
3870
|
width: "24",
|
|
@@ -3779,8 +3879,8 @@ function Spinner({ className }) {
|
|
|
3779
3879
|
}
|
|
3780
3880
|
|
|
3781
3881
|
// src/theme/default/components/form/social.tsx
|
|
3782
|
-
var
|
|
3783
|
-
var
|
|
3882
|
+
var import_client_fetch32 = require("@ory/client-fetch");
|
|
3883
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3784
3884
|
function extractProvider(context) {
|
|
3785
3885
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
3786
3886
|
return context.provider;
|
|
@@ -3806,7 +3906,7 @@ function DefaultButtonSocial({
|
|
|
3806
3906
|
formState: { isSubmitting }
|
|
3807
3907
|
} = (0, import_react_hook_form14.useFormContext)();
|
|
3808
3908
|
const oidcNodeCount = (_a = ui.nodes.filter(
|
|
3809
|
-
(node2) => node2.group ===
|
|
3909
|
+
(node2) => node2.group === import_client_fetch32.UiNodeGroupEnum.Oidc || node2.group === import_client_fetch32.UiNodeGroupEnum.Saml
|
|
3810
3910
|
).length) != null ? _a : 0;
|
|
3811
3911
|
const Logo = logos2[attributes.value.split("-")[0]];
|
|
3812
3912
|
const showLabel = _showLabel != null ? _showLabel : oidcNodeCount % 3 !== 0 && oidcNodeCount % 4 !== 0;
|
|
@@ -3815,13 +3915,13 @@ function DefaultButtonSocial({
|
|
|
3815
3915
|
onClick == null ? void 0 : onClick();
|
|
3816
3916
|
setClicked(true);
|
|
3817
3917
|
};
|
|
3818
|
-
(0,
|
|
3918
|
+
(0, import_react9.useEffect)(() => {
|
|
3819
3919
|
if (!isSubmitting) {
|
|
3820
3920
|
setClicked(false);
|
|
3821
3921
|
}
|
|
3822
3922
|
}, [isSubmitting, setClicked]);
|
|
3823
3923
|
const label = node.meta.label ? (0, import_elements_react7.uiTextToFormattedMessage)(node.meta.label, intl) : "";
|
|
3824
|
-
return /* @__PURE__ */ (0,
|
|
3924
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
3825
3925
|
"button",
|
|
3826
3926
|
{
|
|
3827
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",
|
|
@@ -3835,21 +3935,21 @@ function DefaultButtonSocial({
|
|
|
3835
3935
|
"aria-label": label,
|
|
3836
3936
|
...omitInputAttributes(rest),
|
|
3837
3937
|
children: [
|
|
3838
|
-
/* @__PURE__ */ (0,
|
|
3839
|
-
showLabel && node.meta.label ? /* @__PURE__ */ (0,
|
|
3840
|
-
/* @__PURE__ */ (0,
|
|
3841
|
-
/* @__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" })
|
|
3842
3942
|
] }) : null
|
|
3843
3943
|
]
|
|
3844
3944
|
}
|
|
3845
3945
|
);
|
|
3846
3946
|
}
|
|
3847
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0,
|
|
3947
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
3848
3948
|
function DefaultSocialButtonContainer({
|
|
3849
3949
|
children,
|
|
3850
3950
|
nodes
|
|
3851
3951
|
}) {
|
|
3852
|
-
return /* @__PURE__ */ (0,
|
|
3952
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3853
3953
|
"div",
|
|
3854
3954
|
{
|
|
3855
3955
|
className: cn("grid gap-3", {
|
|
@@ -3863,11 +3963,11 @@ function DefaultSocialButtonContainer({
|
|
|
3863
3963
|
);
|
|
3864
3964
|
}
|
|
3865
3965
|
function GenericLogo({ label }) {
|
|
3866
|
-
return /* @__PURE__ */ (0,
|
|
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 });
|
|
3867
3967
|
}
|
|
3868
3968
|
|
|
3869
3969
|
// src/theme/default/components/form/index.tsx
|
|
3870
|
-
var
|
|
3970
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3871
3971
|
function DefaultFormContainer({
|
|
3872
3972
|
children,
|
|
3873
3973
|
onSubmit,
|
|
@@ -3875,7 +3975,7 @@ function DefaultFormContainer({
|
|
|
3875
3975
|
method,
|
|
3876
3976
|
"data-testid": dataTestId
|
|
3877
3977
|
}) {
|
|
3878
|
-
return /* @__PURE__ */ (0,
|
|
3978
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3879
3979
|
"form",
|
|
3880
3980
|
{
|
|
3881
3981
|
"data-testid": dataTestId,
|
|
@@ -3893,11 +3993,11 @@ function DefaultMessageContainer({ children }) {
|
|
|
3893
3993
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
3894
3994
|
return null;
|
|
3895
3995
|
}
|
|
3896
|
-
return /* @__PURE__ */ (0,
|
|
3996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3897
3997
|
"section",
|
|
3898
3998
|
{
|
|
3899
3999
|
className: cn(
|
|
3900
|
-
flowType ===
|
|
4000
|
+
flowType === import_client_fetch33.FlowType.Settings ? "text-center" : "text-left"
|
|
3901
4001
|
),
|
|
3902
4002
|
children
|
|
3903
4003
|
}
|
|
@@ -3905,7 +4005,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
3905
4005
|
}
|
|
3906
4006
|
function DefaultMessage({ message }) {
|
|
3907
4007
|
const intl = (0, import_react_intl13.useIntl)();
|
|
3908
|
-
return /* @__PURE__ */ (0,
|
|
4008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3909
4009
|
"span",
|
|
3910
4010
|
{
|
|
3911
4011
|
className: cn(
|
|
@@ -3925,60 +4025,60 @@ var import_react_intl14 = require("react-intl");
|
|
|
3925
4025
|
|
|
3926
4026
|
// src/theme/default/assets/icons/code.svg
|
|
3927
4027
|
var React17 = __toESM(require("react"));
|
|
3928
|
-
var
|
|
4028
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3929
4029
|
var SvgCode = (props) => {
|
|
3930
4030
|
var _a, _b;
|
|
3931
|
-
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" }) });
|
|
3932
4032
|
};
|
|
3933
4033
|
var code_default = SvgCode;
|
|
3934
4034
|
|
|
3935
4035
|
// src/theme/default/assets/icons/passkey.svg
|
|
3936
4036
|
var React18 = __toESM(require("react"));
|
|
3937
|
-
var
|
|
4037
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3938
4038
|
var SvgPasskey = (props) => {
|
|
3939
4039
|
var _a, _b;
|
|
3940
|
-
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" }) });
|
|
3941
4041
|
};
|
|
3942
4042
|
var passkey_default = SvgPasskey;
|
|
3943
4043
|
|
|
3944
4044
|
// src/theme/default/assets/icons/password.svg
|
|
3945
4045
|
var React19 = __toESM(require("react"));
|
|
3946
|
-
var
|
|
4046
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
3947
4047
|
var SvgPassword = (props) => {
|
|
3948
4048
|
var _a, _b;
|
|
3949
|
-
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" }) });
|
|
3950
4050
|
};
|
|
3951
4051
|
var password_default = SvgPassword;
|
|
3952
4052
|
|
|
3953
4053
|
// src/theme/default/assets/icons/webauthn.svg
|
|
3954
4054
|
var React20 = __toESM(require("react"));
|
|
3955
|
-
var
|
|
4055
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
3956
4056
|
var SvgWebauthn = (props) => {
|
|
3957
4057
|
var _a, _b;
|
|
3958
|
-
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" }) });
|
|
3959
4059
|
};
|
|
3960
4060
|
var webauthn_default = SvgWebauthn;
|
|
3961
4061
|
|
|
3962
4062
|
// src/theme/default/assets/icons/totp.svg
|
|
3963
4063
|
var React21 = __toESM(require("react"));
|
|
3964
|
-
var
|
|
4064
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
3965
4065
|
var SvgTotp = (props) => {
|
|
3966
4066
|
var _a, _b;
|
|
3967
|
-
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" }) });
|
|
3968
4068
|
};
|
|
3969
4069
|
var totp_default = SvgTotp;
|
|
3970
4070
|
|
|
3971
4071
|
// src/theme/default/assets/icons/code-asterix.svg
|
|
3972
4072
|
var React22 = __toESM(require("react"));
|
|
3973
|
-
var
|
|
4073
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
3974
4074
|
var SvgCodeAsterix = (props) => {
|
|
3975
4075
|
var _a, _b;
|
|
3976
|
-
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" }) });
|
|
3977
4077
|
};
|
|
3978
4078
|
var code_asterix_default = SvgCodeAsterix;
|
|
3979
4079
|
|
|
3980
4080
|
// src/theme/default/components/card/list-item.tsx
|
|
3981
|
-
var
|
|
4081
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
3982
4082
|
function ListItem({
|
|
3983
4083
|
icon: Icon,
|
|
3984
4084
|
as,
|
|
@@ -3989,7 +4089,7 @@ function ListItem({
|
|
|
3989
4089
|
...props
|
|
3990
4090
|
}) {
|
|
3991
4091
|
const Comp = as || "div";
|
|
3992
|
-
return /* @__PURE__ */ (0,
|
|
4092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
3993
4093
|
Comp,
|
|
3994
4094
|
{
|
|
3995
4095
|
...props,
|
|
@@ -3998,10 +4098,10 @@ function ListItem({
|
|
|
3998
4098
|
className
|
|
3999
4099
|
),
|
|
4000
4100
|
children: [
|
|
4001
|
-
/* @__PURE__ */ (0,
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4003
|
-
/* @__PURE__ */ (0,
|
|
4004
|
-
/* @__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 })
|
|
4005
4105
|
] }),
|
|
4006
4106
|
children
|
|
4007
4107
|
]
|
|
@@ -4010,7 +4110,7 @@ function ListItem({
|
|
|
4010
4110
|
}
|
|
4011
4111
|
|
|
4012
4112
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
4013
|
-
var
|
|
4113
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
4014
4114
|
var iconsMap = {
|
|
4015
4115
|
code: code_default,
|
|
4016
4116
|
passkey: passkey_default,
|
|
@@ -4029,7 +4129,7 @@ function DefaultAuthMethodListItem({
|
|
|
4029
4129
|
var _a;
|
|
4030
4130
|
const intl = (0, import_react_intl14.useIntl)();
|
|
4031
4131
|
const Icon = iconsMap[group] || null;
|
|
4032
|
-
return /* @__PURE__ */ (0,
|
|
4132
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
4033
4133
|
ListItem,
|
|
4034
4134
|
{
|
|
4035
4135
|
as: "button",
|
|
@@ -4049,13 +4149,13 @@ function DefaultAuthMethodListItem({
|
|
|
4049
4149
|
}
|
|
4050
4150
|
|
|
4051
4151
|
// src/theme/default/components/form/button.tsx
|
|
4052
|
-
var
|
|
4152
|
+
var import_client_fetch34 = require("@ory/client-fetch");
|
|
4053
4153
|
var import_elements_react9 = require("@ory/elements-react");
|
|
4054
4154
|
var import_class_variance_authority = require("class-variance-authority");
|
|
4055
4155
|
var import_react_hook_form15 = require("react-hook-form");
|
|
4056
4156
|
var import_react_intl15 = require("react-intl");
|
|
4057
|
-
var
|
|
4058
|
-
var
|
|
4157
|
+
var import_react10 = require("react");
|
|
4158
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
4059
4159
|
var buttonStyles = (0, import_class_variance_authority.cva)(
|
|
4060
4160
|
[
|
|
4061
4161
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -4095,20 +4195,20 @@ var DefaultButton = ({
|
|
|
4095
4195
|
}) => {
|
|
4096
4196
|
var _a;
|
|
4097
4197
|
const { type, name, value, ...rest } = attributes;
|
|
4098
|
-
const [clicked, setClicked] = (0,
|
|
4198
|
+
const [clicked, setClicked] = (0, import_react10.useState)(false);
|
|
4099
4199
|
const intl = (0, import_react_intl15.useIntl)();
|
|
4100
|
-
const label = (0,
|
|
4200
|
+
const label = (0, import_client_fetch34.getNodeLabel)(node);
|
|
4101
4201
|
const {
|
|
4102
4202
|
formState: { isSubmitting },
|
|
4103
4203
|
setValue
|
|
4104
4204
|
} = (0, import_react_hook_form15.useFormContext)();
|
|
4105
|
-
(0,
|
|
4205
|
+
(0, import_react10.useEffect)(() => {
|
|
4106
4206
|
if (!isSubmitting) {
|
|
4107
4207
|
setClicked(false);
|
|
4108
4208
|
}
|
|
4109
4209
|
}, [isSubmitting]);
|
|
4110
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";
|
|
4111
|
-
return /* @__PURE__ */ (0,
|
|
4211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
|
|
4112
4212
|
"button",
|
|
4113
4213
|
{
|
|
4114
4214
|
...omitInputAttributes(rest),
|
|
@@ -4128,8 +4228,8 @@ var DefaultButton = ({
|
|
|
4128
4228
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
4129
4229
|
"data-loading": clicked,
|
|
4130
4230
|
children: [
|
|
4131
|
-
clicked ? /* @__PURE__ */ (0,
|
|
4132
|
-
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) }) : ""
|
|
4133
4233
|
]
|
|
4134
4234
|
}
|
|
4135
4235
|
);
|
|
@@ -4137,14 +4237,14 @@ var DefaultButton = ({
|
|
|
4137
4237
|
DefaultButton.displayName = "DefaultButton";
|
|
4138
4238
|
|
|
4139
4239
|
// src/theme/default/components/form/checkbox.tsx
|
|
4140
|
-
var
|
|
4240
|
+
var import_client_fetch35 = require("@ory/client-fetch");
|
|
4141
4241
|
var import_elements_react10 = require("@ory/elements-react");
|
|
4142
4242
|
var import_react_hook_form16 = require("react-hook-form");
|
|
4143
4243
|
var import_react_intl17 = require("react-intl");
|
|
4144
4244
|
|
|
4145
4245
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
4146
4246
|
var import_react_intl16 = require("react-intl");
|
|
4147
|
-
var
|
|
4247
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
4148
4248
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
4149
4249
|
function computeLabelElements(labelText) {
|
|
4150
4250
|
const elements = [];
|
|
@@ -4160,7 +4260,7 @@ function computeLabelElements(labelText) {
|
|
|
4160
4260
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
4161
4261
|
}
|
|
4162
4262
|
elements.push(
|
|
4163
|
-
/* @__PURE__ */ (0,
|
|
4263
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
4164
4264
|
"a",
|
|
4165
4265
|
{
|
|
4166
4266
|
href: url,
|
|
@@ -4185,13 +4285,13 @@ function CheckboxLabel({ label }) {
|
|
|
4185
4285
|
return null;
|
|
4186
4286
|
}
|
|
4187
4287
|
const labelText = uiTextToFormattedMessage(label, intl);
|
|
4188
|
-
return /* @__PURE__ */ (0,
|
|
4288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: computeLabelElements(labelText) });
|
|
4189
4289
|
}
|
|
4190
4290
|
|
|
4191
4291
|
// src/theme/default/components/form/checkbox.tsx
|
|
4192
|
-
var
|
|
4292
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
4193
4293
|
function CheckboxSVG() {
|
|
4194
|
-
return /* @__PURE__ */ (0,
|
|
4294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4195
4295
|
"svg",
|
|
4196
4296
|
{
|
|
4197
4297
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -4200,7 +4300,7 @@ function CheckboxSVG() {
|
|
|
4200
4300
|
height: "16",
|
|
4201
4301
|
viewBox: "0 0 16 16",
|
|
4202
4302
|
fill: "none",
|
|
4203
|
-
children: /* @__PURE__ */ (0,
|
|
4303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
4204
4304
|
"path",
|
|
4205
4305
|
{
|
|
4206
4306
|
fillRule: "evenodd",
|
|
@@ -4217,12 +4317,12 @@ var DefaultCheckbox = ({
|
|
|
4217
4317
|
}) => {
|
|
4218
4318
|
const { value, name, ...attributes } = initialAttributes;
|
|
4219
4319
|
const intl = (0, import_react_intl17.useIntl)();
|
|
4220
|
-
const label = (0,
|
|
4320
|
+
const label = (0, import_client_fetch35.getNodeLabel)(node);
|
|
4221
4321
|
const { register } = (0, import_react_hook_form16.useFormContext)();
|
|
4222
4322
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4223
|
-
return /* @__PURE__ */ (0,
|
|
4224
|
-
/* @__PURE__ */ (0,
|
|
4225
|
-
/* @__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)(
|
|
4226
4326
|
"input",
|
|
4227
4327
|
{
|
|
4228
4328
|
...omitInputAttributes(attributes),
|
|
@@ -4232,14 +4332,15 @@ var DefaultCheckbox = ({
|
|
|
4232
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",
|
|
4233
4333
|
hasError && "border-interface-border-validation-danger"
|
|
4234
4334
|
),
|
|
4335
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
4235
4336
|
...register(name)
|
|
4236
4337
|
}
|
|
4237
4338
|
),
|
|
4238
|
-
/* @__PURE__ */ (0,
|
|
4339
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(CheckboxSVG, {})
|
|
4239
4340
|
] }),
|
|
4240
|
-
/* @__PURE__ */ (0,
|
|
4241
|
-
/* @__PURE__ */ (0,
|
|
4242
|
-
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)(
|
|
4243
4344
|
"span",
|
|
4244
4345
|
{
|
|
4245
4346
|
className: cn(
|
|
@@ -4257,13 +4358,13 @@ var DefaultCheckbox = ({
|
|
|
4257
4358
|
|
|
4258
4359
|
// src/theme/default/components/form/group-container.tsx
|
|
4259
4360
|
var import_elements_react11 = require("@ory/elements-react");
|
|
4260
|
-
var
|
|
4361
|
+
var import_client_fetch36 = require("@ory/client-fetch");
|
|
4261
4362
|
|
|
4262
4363
|
// src/util/childCounter.ts
|
|
4263
|
-
var
|
|
4364
|
+
var import_react11 = require("react");
|
|
4264
4365
|
function countRenderableChildren(children) {
|
|
4265
|
-
return
|
|
4266
|
-
if ((0,
|
|
4366
|
+
return import_react11.Children.toArray(children).filter((c) => {
|
|
4367
|
+
if ((0, import_react11.isValidElement)(c)) {
|
|
4267
4368
|
return true;
|
|
4268
4369
|
}
|
|
4269
4370
|
return false;
|
|
@@ -4271,19 +4372,19 @@ function countRenderableChildren(children) {
|
|
|
4271
4372
|
}
|
|
4272
4373
|
|
|
4273
4374
|
// src/theme/default/components/form/group-container.tsx
|
|
4274
|
-
var
|
|
4375
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
4275
4376
|
function DefaultGroupContainer({ children }) {
|
|
4276
4377
|
const { flowType } = (0, import_elements_react11.useOryFlow)();
|
|
4277
4378
|
const count = countRenderableChildren(children);
|
|
4278
4379
|
if (count === 0) {
|
|
4279
4380
|
return null;
|
|
4280
4381
|
}
|
|
4281
|
-
return /* @__PURE__ */ (0,
|
|
4382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
4282
4383
|
"div",
|
|
4283
4384
|
{
|
|
4284
4385
|
className: cn(
|
|
4285
4386
|
"grid",
|
|
4286
|
-
flowType ===
|
|
4387
|
+
flowType === import_client_fetch36.FlowType.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
4287
4388
|
),
|
|
4288
4389
|
children
|
|
4289
4390
|
}
|
|
@@ -4291,16 +4392,16 @@ function DefaultGroupContainer({ children }) {
|
|
|
4291
4392
|
}
|
|
4292
4393
|
|
|
4293
4394
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
4294
|
-
var
|
|
4395
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
4295
4396
|
function DefaultHorizontalDivider() {
|
|
4296
|
-
return /* @__PURE__ */ (0,
|
|
4397
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("hr", { className: "border-interface-border-default-primary" });
|
|
4297
4398
|
}
|
|
4298
4399
|
|
|
4299
4400
|
// src/theme/default/components/form/image.tsx
|
|
4300
|
-
var
|
|
4401
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
4301
4402
|
function DefaultImage({ attributes, node }) {
|
|
4302
4403
|
var _a;
|
|
4303
|
-
return /* @__PURE__ */ (0,
|
|
4404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("figure", { children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
4304
4405
|
"img",
|
|
4305
4406
|
{
|
|
4306
4407
|
...omitInputAttributes(attributes),
|
|
@@ -4310,35 +4411,35 @@ function DefaultImage({ attributes, node }) {
|
|
|
4310
4411
|
}
|
|
4311
4412
|
|
|
4312
4413
|
// src/theme/default/components/form/input.tsx
|
|
4313
|
-
var
|
|
4414
|
+
var import_client_fetch37 = require("@ory/client-fetch");
|
|
4314
4415
|
var import_elements_react12 = require("@ory/elements-react");
|
|
4315
|
-
var
|
|
4416
|
+
var import_react12 = require("react");
|
|
4316
4417
|
var import_react_hook_form17 = require("react-hook-form");
|
|
4317
4418
|
var import_react_intl18 = require("react-intl");
|
|
4318
4419
|
|
|
4319
4420
|
// src/theme/default/assets/icons/eye-off.svg
|
|
4320
4421
|
var React23 = __toESM(require("react"));
|
|
4321
|
-
var
|
|
4422
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
4322
4423
|
var SvgEyeOff = (props) => {
|
|
4323
4424
|
var _a, _b;
|
|
4324
|
-
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" }) });
|
|
4325
4426
|
};
|
|
4326
4427
|
var eye_off_default = SvgEyeOff;
|
|
4327
4428
|
|
|
4328
4429
|
// src/theme/default/assets/icons/eye.svg
|
|
4329
4430
|
var React24 = __toESM(require("react"));
|
|
4330
|
-
var
|
|
4431
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
4331
4432
|
var SvgEye = (props) => {
|
|
4332
4433
|
var _a, _b;
|
|
4333
|
-
return /* @__PURE__ */ (0,
|
|
4334
|
-
/* @__PURE__ */ (0,
|
|
4335
|
-
/* @__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" })
|
|
4336
4437
|
] }) });
|
|
4337
4438
|
};
|
|
4338
4439
|
var eye_default = SvgEye;
|
|
4339
4440
|
|
|
4340
4441
|
// src/theme/default/components/form/input.tsx
|
|
4341
|
-
var
|
|
4442
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
4342
4443
|
var defaultInputClassName = cn(
|
|
4343
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",
|
|
4344
4445
|
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
@@ -4352,12 +4453,12 @@ var DefaultInput = ({
|
|
|
4352
4453
|
attributes,
|
|
4353
4454
|
onClick
|
|
4354
4455
|
}) => {
|
|
4355
|
-
const label = (0,
|
|
4456
|
+
const label = (0, import_client_fetch37.getNodeLabel)(node);
|
|
4356
4457
|
const { register } = (0, import_react_hook_form17.useFormContext)();
|
|
4357
4458
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4358
4459
|
const intl = (0, import_react_intl18.useIntl)();
|
|
4359
4460
|
const { flowType } = (0, import_elements_react12.useOryFlow)();
|
|
4360
|
-
const inputRef = (0,
|
|
4461
|
+
const inputRef = (0, import_react12.useRef)(null);
|
|
4361
4462
|
const formattedLabel = label ? intl.formatMessage(
|
|
4362
4463
|
{
|
|
4363
4464
|
id: "input.placeholder",
|
|
@@ -4368,7 +4469,7 @@ var DefaultInput = ({
|
|
|
4368
4469
|
}
|
|
4369
4470
|
) : "";
|
|
4370
4471
|
if (rest.type === "hidden") {
|
|
4371
|
-
return /* @__PURE__ */ (0,
|
|
4472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4372
4473
|
"input",
|
|
4373
4474
|
{
|
|
4374
4475
|
...omitInputAttributes(rest),
|
|
@@ -4382,16 +4483,16 @@ var DefaultInput = ({
|
|
|
4382
4483
|
);
|
|
4383
4484
|
}
|
|
4384
4485
|
const { ref, ...restRegister } = register(name, { value });
|
|
4385
|
-
return /* @__PURE__ */ (0,
|
|
4486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
4386
4487
|
"div",
|
|
4387
4488
|
{
|
|
4388
4489
|
className: cn(
|
|
4389
4490
|
"relative flex justify-stretch",
|
|
4390
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.
|
|
4391
|
-
flowType ===
|
|
4492
|
+
flowType === import_client_fetch37.FlowType.Settings && "max-w-[488px]"
|
|
4392
4493
|
),
|
|
4393
4494
|
children: [
|
|
4394
|
-
/* @__PURE__ */ (0,
|
|
4495
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4395
4496
|
"input",
|
|
4396
4497
|
{
|
|
4397
4498
|
...omitInputAttributes(rest),
|
|
@@ -4408,7 +4509,7 @@ var DefaultInput = ({
|
|
|
4408
4509
|
...restRegister
|
|
4409
4510
|
}
|
|
4410
4511
|
),
|
|
4411
|
-
rest.type === "password" && /* @__PURE__ */ (0,
|
|
4512
|
+
rest.type === "password" && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PasswordToggle, { inputRef })
|
|
4412
4513
|
]
|
|
4413
4514
|
}
|
|
4414
4515
|
);
|
|
@@ -4416,31 +4517,31 @@ var DefaultInput = ({
|
|
|
4416
4517
|
function PasswordToggle({
|
|
4417
4518
|
inputRef
|
|
4418
4519
|
}) {
|
|
4419
|
-
const [shown, setShown] = (0,
|
|
4520
|
+
const [shown, setShown] = (0, import_react12.useState)(false);
|
|
4420
4521
|
const handleClick = () => {
|
|
4421
4522
|
setShown(!shown);
|
|
4422
4523
|
if (inputRef.current) {
|
|
4423
4524
|
inputRef.current.type = shown ? "password" : "text";
|
|
4424
4525
|
}
|
|
4425
4526
|
};
|
|
4426
|
-
return /* @__PURE__ */ (0,
|
|
4527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
|
|
4427
4528
|
"button",
|
|
4428
4529
|
{
|
|
4429
4530
|
onClick: handleClick,
|
|
4430
4531
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
4431
4532
|
type: "button",
|
|
4432
4533
|
"aria-label": "Toggle password visibility",
|
|
4433
|
-
children: shown ? /* @__PURE__ */ (0,
|
|
4534
|
+
children: shown ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(eye_off_default, {}) : /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(eye_default, {})
|
|
4434
4535
|
}
|
|
4435
4536
|
);
|
|
4436
4537
|
}
|
|
4437
4538
|
|
|
4438
4539
|
// src/theme/default/components/form/label.tsx
|
|
4439
|
-
var
|
|
4540
|
+
var import_client_fetch38 = require("@ory/client-fetch");
|
|
4440
4541
|
var import_elements_react13 = require("@ory/elements-react");
|
|
4441
4542
|
var import_react_hook_form18 = require("react-hook-form");
|
|
4442
4543
|
var import_react_intl19 = require("react-intl");
|
|
4443
|
-
var
|
|
4544
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
4444
4545
|
function findResendNode(nodes) {
|
|
4445
4546
|
return nodes.find(
|
|
4446
4547
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -4453,9 +4554,10 @@ function DefaultLabel({
|
|
|
4453
4554
|
...rest
|
|
4454
4555
|
}) {
|
|
4455
4556
|
const intl = (0, import_react_intl19.useIntl)();
|
|
4456
|
-
const label = (0,
|
|
4557
|
+
const label = (0, import_client_fetch38.getNodeLabel)(node);
|
|
4457
4558
|
const { Message } = (0, import_elements_react13.useComponents)();
|
|
4458
|
-
const {
|
|
4559
|
+
const { flowType, flow } = (0, import_elements_react13.useOryFlow)();
|
|
4560
|
+
const config = (0, import_elements_react13.useOryConfiguration)();
|
|
4459
4561
|
const { setValue, formState } = (0, import_react_hook_form18.useFormContext)();
|
|
4460
4562
|
const isPassword = attributes.type === "password";
|
|
4461
4563
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
@@ -4465,9 +4567,9 @@ function DefaultLabel({
|
|
|
4465
4567
|
}
|
|
4466
4568
|
};
|
|
4467
4569
|
const fieldError = formState.errors[attributes.name];
|
|
4468
|
-
return /* @__PURE__ */ (0,
|
|
4469
|
-
label && /* @__PURE__ */ (0,
|
|
4470
|
-
/* @__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)(
|
|
4471
4573
|
"label",
|
|
4472
4574
|
{
|
|
4473
4575
|
...(0, import_elements_react13.messageTestId)(label),
|
|
@@ -4478,8 +4580,8 @@ function DefaultLabel({
|
|
|
4478
4580
|
children: (0, import_elements_react13.uiTextToFormattedMessage)(label, intl)
|
|
4479
4581
|
}
|
|
4480
4582
|
),
|
|
4481
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
4482
|
-
/* @__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)(
|
|
4483
4585
|
"a",
|
|
4484
4586
|
{
|
|
4485
4587
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -4490,7 +4592,7 @@ function DefaultLabel({
|
|
|
4490
4592
|
})
|
|
4491
4593
|
}
|
|
4492
4594
|
),
|
|
4493
|
-
(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)(
|
|
4494
4596
|
"button",
|
|
4495
4597
|
{
|
|
4496
4598
|
type: "submit",
|
|
@@ -4503,21 +4605,21 @@ function DefaultLabel({
|
|
|
4503
4605
|
)
|
|
4504
4606
|
] }),
|
|
4505
4607
|
children,
|
|
4506
|
-
node.messages.map((message) => /* @__PURE__ */ (0,
|
|
4507
|
-
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 })
|
|
4508
4610
|
] });
|
|
4509
4611
|
}
|
|
4510
4612
|
|
|
4511
4613
|
// src/theme/default/components/form/link-button.tsx
|
|
4512
|
-
var
|
|
4614
|
+
var import_client_fetch39 = require("@ory/client-fetch");
|
|
4513
4615
|
var import_elements_react14 = require("@ory/elements-react");
|
|
4514
|
-
var
|
|
4616
|
+
var import_react13 = require("react");
|
|
4515
4617
|
var import_react_intl20 = require("react-intl");
|
|
4516
|
-
var
|
|
4517
|
-
var DefaultLinkButton = (0,
|
|
4618
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
4619
|
+
var DefaultLinkButton = (0, import_react13.forwardRef)(({ attributes, node }, ref) => {
|
|
4518
4620
|
const intl = (0, import_react_intl20.useIntl)();
|
|
4519
|
-
const label = (0,
|
|
4520
|
-
return /* @__PURE__ */ (0,
|
|
4621
|
+
const label = (0, import_client_fetch39.getNodeLabel)(node);
|
|
4622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
4521
4623
|
"a",
|
|
4522
4624
|
{
|
|
4523
4625
|
...omitInputAttributes(attributes),
|
|
@@ -4539,8 +4641,8 @@ var import_react_hook_form19 = require("react-hook-form");
|
|
|
4539
4641
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
4540
4642
|
var import_input_otp = require("input-otp");
|
|
4541
4643
|
var React25 = __toESM(require("react"));
|
|
4542
|
-
var
|
|
4543
|
-
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)(
|
|
4544
4646
|
import_input_otp.OTPInput,
|
|
4545
4647
|
{
|
|
4546
4648
|
ref,
|
|
@@ -4553,12 +4655,12 @@ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props },
|
|
|
4553
4655
|
}
|
|
4554
4656
|
));
|
|
4555
4657
|
InputOTP.displayName = "InputOTP";
|
|
4556
|
-
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 }));
|
|
4557
4659
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4558
4660
|
var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
4559
4661
|
const inputOTPContext = React25.useContext(import_input_otp.OTPInputContext);
|
|
4560
4662
|
const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index];
|
|
4561
|
-
return /* @__PURE__ */ (0,
|
|
4663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(
|
|
4562
4664
|
"div",
|
|
4563
4665
|
{
|
|
4564
4666
|
ref,
|
|
@@ -4570,8 +4672,8 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4570
4672
|
),
|
|
4571
4673
|
...props,
|
|
4572
4674
|
children: [
|
|
4573
|
-
/* @__PURE__ */ (0,
|
|
4574
|
-
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" }) })
|
|
4575
4677
|
]
|
|
4576
4678
|
}
|
|
4577
4679
|
);
|
|
@@ -4580,8 +4682,8 @@ InputOTPSlot.displayName = "InputOTPSlot";
|
|
|
4580
4682
|
|
|
4581
4683
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4582
4684
|
var import_elements_react15 = require("@ory/elements-react");
|
|
4583
|
-
var
|
|
4584
|
-
var
|
|
4685
|
+
var import_client_fetch40 = require("@ory/client-fetch");
|
|
4686
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4585
4687
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4586
4688
|
const { setValue, watch } = (0, import_react_hook_form19.useFormContext)();
|
|
4587
4689
|
const { maxlength, name } = attributes;
|
|
@@ -4591,22 +4693,22 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4591
4693
|
setValue(name, v);
|
|
4592
4694
|
};
|
|
4593
4695
|
const value = watch(name);
|
|
4594
|
-
return /* @__PURE__ */ (0,
|
|
4696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4595
4697
|
InputOTP,
|
|
4596
4698
|
{
|
|
4597
4699
|
maxLength: maxlength != null ? maxlength : 6,
|
|
4598
4700
|
onChange: handleInputChange,
|
|
4599
4701
|
name,
|
|
4600
4702
|
value,
|
|
4601
|
-
children: /* @__PURE__ */ (0,
|
|
4703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
4602
4704
|
InputOTPGroup,
|
|
4603
4705
|
{
|
|
4604
4706
|
className: cn(
|
|
4605
4707
|
"w-full flex gap-2 justify-stretch",
|
|
4606
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.
|
|
4607
|
-
flowType ===
|
|
4709
|
+
flowType === import_client_fetch40.FlowType.Settings && "max-w-[488px]"
|
|
4608
4710
|
),
|
|
4609
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0,
|
|
4711
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(InputOTPSlot, { index }, index))
|
|
4610
4712
|
}
|
|
4611
4713
|
)
|
|
4612
4714
|
}
|
|
@@ -4614,13 +4716,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4614
4716
|
};
|
|
4615
4717
|
|
|
4616
4718
|
// src/theme/default/components/form/section.tsx
|
|
4617
|
-
var
|
|
4719
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
4618
4720
|
var DefaultFormSection = ({
|
|
4619
4721
|
children,
|
|
4620
4722
|
nodes: _nodes,
|
|
4621
4723
|
...rest
|
|
4622
4724
|
}) => {
|
|
4623
|
-
return /* @__PURE__ */ (0,
|
|
4725
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
4624
4726
|
"form",
|
|
4625
4727
|
{
|
|
4626
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",
|
|
@@ -4634,10 +4736,10 @@ var DefaultFormSectionContent = ({
|
|
|
4634
4736
|
description,
|
|
4635
4737
|
children
|
|
4636
4738
|
}) => {
|
|
4637
|
-
return /* @__PURE__ */ (0,
|
|
4638
|
-
/* @__PURE__ */ (0,
|
|
4639
|
-
/* @__PURE__ */ (0,
|
|
4640
|
-
/* @__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 })
|
|
4641
4743
|
] }),
|
|
4642
4744
|
children
|
|
4643
4745
|
] });
|
|
@@ -4646,14 +4748,14 @@ var DefaultFormSectionFooter = ({
|
|
|
4646
4748
|
children,
|
|
4647
4749
|
text
|
|
4648
4750
|
}) => {
|
|
4649
|
-
return /* @__PURE__ */ (0,
|
|
4751
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
4650
4752
|
"div",
|
|
4651
4753
|
{
|
|
4652
4754
|
className: cn(
|
|
4653
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"
|
|
4654
4756
|
),
|
|
4655
4757
|
children: [
|
|
4656
|
-
/* @__PURE__ */ (0,
|
|
4758
|
+
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { children: text }),
|
|
4657
4759
|
children
|
|
4658
4760
|
]
|
|
4659
4761
|
}
|
|
@@ -4663,31 +4765,31 @@ var DefaultFormSectionFooter = ({
|
|
|
4663
4765
|
// src/theme/default/components/form/text.tsx
|
|
4664
4766
|
var import_elements_react16 = require("@ory/elements-react");
|
|
4665
4767
|
var import_react_intl21 = require("react-intl");
|
|
4666
|
-
var
|
|
4768
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
4667
4769
|
function DefaultText({ node, attributes }) {
|
|
4668
4770
|
var _a;
|
|
4669
4771
|
const intl = (0, import_react_intl21.useIntl)();
|
|
4670
4772
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
4671
4773
|
if (lookup) {
|
|
4672
|
-
return /* @__PURE__ */ (0,
|
|
4673
|
-
/* @__PURE__ */ (0,
|
|
4674
|
-
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)(
|
|
4675
4777
|
"pre",
|
|
4676
4778
|
{
|
|
4677
4779
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
4678
|
-
children: /* @__PURE__ */ (0,
|
|
4780
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("code", { children: text ? (0, import_elements_react16.uiTextToFormattedMessage)(text, intl) : "" })
|
|
4679
4781
|
},
|
|
4680
4782
|
index
|
|
4681
4783
|
))
|
|
4682
4784
|
] });
|
|
4683
4785
|
}
|
|
4684
|
-
return /* @__PURE__ */ (0,
|
|
4786
|
+
return /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_jsx_runtime80.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)(
|
|
4685
4787
|
"p",
|
|
4686
4788
|
{
|
|
4687
4789
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
4688
4790
|
id: attributes.id,
|
|
4689
4791
|
children: [
|
|
4690
|
-
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,
|
|
4691
4793
|
attributes.text ? (0, import_elements_react16.uiTextToFormattedMessage)(attributes.text, intl) : ""
|
|
4692
4794
|
]
|
|
4693
4795
|
}
|
|
@@ -4703,21 +4805,21 @@ var import_react_dropdown_menu = require("@radix-ui/react-dropdown-menu");
|
|
|
4703
4805
|
|
|
4704
4806
|
// src/theme/default/assets/icons/logout.svg
|
|
4705
4807
|
var React26 = __toESM(require("react"));
|
|
4706
|
-
var
|
|
4808
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
4707
4809
|
var SvgLogout = (props) => {
|
|
4708
4810
|
var _a, _b;
|
|
4709
|
-
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" }) });
|
|
4710
4812
|
};
|
|
4711
4813
|
var logout_default = SvgLogout;
|
|
4712
4814
|
|
|
4713
4815
|
// src/theme/default/assets/icons/settings.svg
|
|
4714
4816
|
var React27 = __toESM(require("react"));
|
|
4715
|
-
var
|
|
4817
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
4716
4818
|
var SvgSettings = (props) => {
|
|
4717
4819
|
var _a, _b;
|
|
4718
|
-
return /* @__PURE__ */ (0,
|
|
4719
|
-
/* @__PURE__ */ (0,
|
|
4720
|
-
/* @__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" })
|
|
4721
4823
|
] }) });
|
|
4722
4824
|
};
|
|
4723
4825
|
var settings_default = SvgSettings;
|
|
@@ -4762,12 +4864,12 @@ var getUserInitials = (session) => {
|
|
|
4762
4864
|
};
|
|
4763
4865
|
|
|
4764
4866
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
4765
|
-
var
|
|
4867
|
+
var import_react14 = require("react");
|
|
4766
4868
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
4767
|
-
var
|
|
4869
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
4768
4870
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4769
4871
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4770
|
-
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)(
|
|
4771
4873
|
DropdownMenuPrimitive.Content,
|
|
4772
4874
|
{
|
|
4773
4875
|
ref,
|
|
@@ -4782,7 +4884,7 @@ var DropdownMenuContent = (0, import_react13.forwardRef)(({ className, sideOffse
|
|
|
4782
4884
|
}
|
|
4783
4885
|
) }));
|
|
4784
4886
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4785
|
-
var DropdownMenuItem = (0,
|
|
4887
|
+
var DropdownMenuItem = (0, import_react14.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4786
4888
|
DropdownMenuPrimitive.Item,
|
|
4787
4889
|
{
|
|
4788
4890
|
ref,
|
|
@@ -4800,7 +4902,7 @@ var DropdownMenuItem = (0, import_react13.forwardRef)(({ className, inset, ...pr
|
|
|
4800
4902
|
}
|
|
4801
4903
|
));
|
|
4802
4904
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4803
|
-
var DropdownMenuLabel = (0,
|
|
4905
|
+
var DropdownMenuLabel = (0, import_react14.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
4804
4906
|
DropdownMenuPrimitive.Label,
|
|
4805
4907
|
{
|
|
4806
4908
|
ref,
|
|
@@ -4815,35 +4917,35 @@ var DropdownMenuLabel = (0, import_react13.forwardRef)(({ className, inset, ...p
|
|
|
4815
4917
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
4816
4918
|
|
|
4817
4919
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4818
|
-
var
|
|
4920
|
+
var import_react15 = require("react");
|
|
4819
4921
|
|
|
4820
4922
|
// src/theme/default/assets/icons/user.svg
|
|
4821
4923
|
var React28 = __toESM(require("react"));
|
|
4822
|
-
var
|
|
4924
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
4823
4925
|
var SvgUser = (props) => {
|
|
4824
4926
|
var _a, _b;
|
|
4825
|
-
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" }) });
|
|
4826
4928
|
};
|
|
4827
4929
|
var user_default = SvgUser;
|
|
4828
4930
|
|
|
4829
4931
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4830
|
-
var
|
|
4831
|
-
var UserAvatar = (0,
|
|
4932
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
4933
|
+
var UserAvatar = (0, import_react15.forwardRef)(
|
|
4832
4934
|
({ initials, ...rest }, ref) => {
|
|
4833
|
-
return /* @__PURE__ */ (0,
|
|
4935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4834
4936
|
"button",
|
|
4835
4937
|
{
|
|
4836
4938
|
ref,
|
|
4837
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",
|
|
4838
4940
|
...rest,
|
|
4839
|
-
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)(
|
|
4840
4942
|
"img",
|
|
4841
4943
|
{
|
|
4842
4944
|
src: initials.avatar,
|
|
4843
4945
|
alt: initials.primary,
|
|
4844
4946
|
className: "w-full object-contain"
|
|
4845
4947
|
}
|
|
4846
|
-
) : /* @__PURE__ */ (0,
|
|
4948
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
4847
4949
|
user_default,
|
|
4848
4950
|
{
|
|
4849
4951
|
size: 24,
|
|
@@ -4857,27 +4959,27 @@ var UserAvatar = (0, import_react14.forwardRef)(
|
|
|
4857
4959
|
UserAvatar.displayName = "UserAvatar";
|
|
4858
4960
|
|
|
4859
4961
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4860
|
-
var
|
|
4962
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
4861
4963
|
var UserMenu = ({ session }) => {
|
|
4862
|
-
const
|
|
4964
|
+
const config = (0, import_elements_react17.useOryConfiguration)();
|
|
4863
4965
|
const initials = getUserInitials(session);
|
|
4864
4966
|
const { logoutFlow } = useClientLogout(config);
|
|
4865
|
-
return /* @__PURE__ */ (0,
|
|
4866
|
-
/* @__PURE__ */ (0,
|
|
4867
|
-
/* @__PURE__ */ (0,
|
|
4868
|
-
/* @__PURE__ */ (0,
|
|
4869
|
-
/* @__PURE__ */ (0,
|
|
4870
|
-
/* @__PURE__ */ (0,
|
|
4871
|
-
/* @__PURE__ */ (0,
|
|
4872
|
-
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 })
|
|
4873
4975
|
] })
|
|
4874
4976
|
] }),
|
|
4875
|
-
/* @__PURE__ */ (0,
|
|
4876
|
-
/* @__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 }),
|
|
4877
4979
|
" User settings"
|
|
4878
4980
|
] }) }),
|
|
4879
|
-
/* @__PURE__ */ (0,
|
|
4880
|
-
/* @__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 }),
|
|
4881
4983
|
" Logout"
|
|
4882
4984
|
] }) })
|
|
4883
4985
|
] })
|
|
@@ -4885,29 +4987,30 @@ var UserMenu = ({ session }) => {
|
|
|
4885
4987
|
};
|
|
4886
4988
|
|
|
4887
4989
|
// src/theme/default/components/generic/page-header.tsx
|
|
4888
|
-
var
|
|
4990
|
+
var import_client4 = require("@ory/elements-react/client");
|
|
4889
4991
|
var import_react_intl22 = require("react-intl");
|
|
4890
|
-
var
|
|
4992
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
4891
4993
|
var DefaultPageHeader = (_props) => {
|
|
4892
4994
|
var _a;
|
|
4893
4995
|
const { Card } = (0, import_elements_react18.useComponents)();
|
|
4894
|
-
const { session } = (0,
|
|
4996
|
+
const { session } = (0, import_client4.useSession)();
|
|
4895
4997
|
const intl = (0, import_react_intl22.useIntl)();
|
|
4896
|
-
const {
|
|
4998
|
+
const { flow } = (0, import_elements_react18.useOryFlow)();
|
|
4999
|
+
const config = (0, import_elements_react18.useOryConfiguration)();
|
|
4897
5000
|
const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
|
|
4898
|
-
return /* @__PURE__ */ (0,
|
|
4899
|
-
/* @__PURE__ */ (0,
|
|
4900
|
-
/* @__PURE__ */ (0,
|
|
4901
|
-
/* @__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 })
|
|
4902
5005
|
] }),
|
|
4903
|
-
returnUrl && /* @__PURE__ */ (0,
|
|
5006
|
+
returnUrl && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
4904
5007
|
"a",
|
|
4905
5008
|
{
|
|
4906
5009
|
"data-testid": "ory/screen/settings/back-button",
|
|
4907
5010
|
href: returnUrl,
|
|
4908
5011
|
className: "inline-flex gap-2 items-center",
|
|
4909
5012
|
children: [
|
|
4910
|
-
/* @__PURE__ */ (0,
|
|
5013
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(arrow_left_default, {}),
|
|
4911
5014
|
" ",
|
|
4912
5015
|
intl.formatMessage({
|
|
4913
5016
|
id: "settings.navigation-back-button",
|
|
@@ -4920,31 +5023,31 @@ var DefaultPageHeader = (_props) => {
|
|
|
4920
5023
|
};
|
|
4921
5024
|
|
|
4922
5025
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4923
|
-
var
|
|
5026
|
+
var import_react16 = require("react");
|
|
4924
5027
|
var import_react_hook_form20 = require("react-hook-form");
|
|
4925
5028
|
var import_usehooks_ts2 = require("usehooks-ts");
|
|
4926
5029
|
|
|
4927
5030
|
// src/theme/default/assets/icons/trash.svg
|
|
4928
5031
|
var React29 = __toESM(require("react"));
|
|
4929
|
-
var
|
|
5032
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
4930
5033
|
var SvgTrash = (props) => {
|
|
4931
5034
|
var _a, _b;
|
|
4932
|
-
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" }) });
|
|
4933
5036
|
};
|
|
4934
5037
|
var trash_default = SvgTrash;
|
|
4935
5038
|
|
|
4936
5039
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4937
|
-
var
|
|
5040
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
4938
5041
|
function DefaultSettingsOidc({
|
|
4939
5042
|
linkButtons,
|
|
4940
5043
|
unlinkButtons
|
|
4941
5044
|
}) {
|
|
4942
5045
|
const hasLinkButtons = linkButtons.length > 0;
|
|
4943
5046
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
4944
|
-
return /* @__PURE__ */ (0,
|
|
4945
|
-
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) => {
|
|
4946
5049
|
const attrs = button.attributes;
|
|
4947
|
-
return /* @__PURE__ */ (0,
|
|
5050
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4948
5051
|
DefaultButtonSocial,
|
|
4949
5052
|
{
|
|
4950
5053
|
showLabel: true,
|
|
@@ -4955,12 +5058,12 @@ function DefaultSettingsOidc({
|
|
|
4955
5058
|
attrs.value
|
|
4956
5059
|
);
|
|
4957
5060
|
}) }),
|
|
4958
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0,
|
|
5061
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DefaultHorizontalDivider, {}) : null,
|
|
4959
5062
|
unlinkButtons.map((button) => {
|
|
4960
5063
|
if (button.attributes.node_type !== "input") {
|
|
4961
5064
|
return null;
|
|
4962
5065
|
}
|
|
4963
|
-
return /* @__PURE__ */ (0,
|
|
5066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(UnlinkRow, { button }, button.attributes.value);
|
|
4964
5067
|
})
|
|
4965
5068
|
] });
|
|
4966
5069
|
}
|
|
@@ -4977,18 +5080,18 @@ function UnlinkRow({ button }) {
|
|
|
4977
5080
|
button.onClick();
|
|
4978
5081
|
setClicked(true);
|
|
4979
5082
|
};
|
|
4980
|
-
(0,
|
|
5083
|
+
(0, import_react16.useEffect)(() => {
|
|
4981
5084
|
if (!isSubmitting) {
|
|
4982
5085
|
setClicked(false);
|
|
4983
5086
|
}
|
|
4984
5087
|
}, [isSubmitting, setClicked]);
|
|
4985
5088
|
console.log((_c = button.meta.label) == null ? void 0 : _c.context);
|
|
4986
|
-
return /* @__PURE__ */ (0,
|
|
4987
|
-
/* @__PURE__ */ (0,
|
|
4988
|
-
Logo ? /* @__PURE__ */ (0,
|
|
4989
|
-
/* @__PURE__ */ (0,
|
|
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 })
|
|
4990
5093
|
] }),
|
|
4991
|
-
/* @__PURE__ */ (0,
|
|
5094
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
4992
5095
|
"button",
|
|
4993
5096
|
{
|
|
4994
5097
|
...omitInputAttributes(attrs),
|
|
@@ -4997,7 +5100,7 @@ function UnlinkRow({ button }) {
|
|
|
4997
5100
|
disabled: isSubmitting,
|
|
4998
5101
|
className: "relative",
|
|
4999
5102
|
title: `Unlink ${provider}`,
|
|
5000
|
-
children: clicked ? /* @__PURE__ */ (0,
|
|
5103
|
+
children: clicked ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
5001
5104
|
trash_default,
|
|
5002
5105
|
{
|
|
5003
5106
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5012,7 +5115,7 @@ function UnlinkRow({ button }) {
|
|
|
5012
5115
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
5013
5116
|
var import_elements_react19 = require("@ory/elements-react");
|
|
5014
5117
|
var import_react_hook_form21 = require("react-hook-form");
|
|
5015
|
-
var
|
|
5118
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
5016
5119
|
function DefaultSettingsPasskey({
|
|
5017
5120
|
triggerButton,
|
|
5018
5121
|
removeButtons
|
|
@@ -5022,8 +5125,8 @@ function DefaultSettingsPasskey({
|
|
|
5022
5125
|
} = (0, import_react_hook_form21.useFormContext)();
|
|
5023
5126
|
const { Node: Node2 } = (0, import_elements_react19.useComponents)();
|
|
5024
5127
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5025
|
-
return /* @__PURE__ */ (0,
|
|
5026
|
-
/* @__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)(
|
|
5027
5130
|
Node2.Button,
|
|
5028
5131
|
{
|
|
5029
5132
|
node: triggerButton,
|
|
@@ -5031,38 +5134,38 @@ function DefaultSettingsPasskey({
|
|
|
5031
5134
|
onClick: triggerButton.onClick
|
|
5032
5135
|
}
|
|
5033
5136
|
) }),
|
|
5034
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
5035
|
-
/* @__PURE__ */ (0,
|
|
5036
|
-
/* @__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) => {
|
|
5037
5140
|
var _a, _b;
|
|
5038
5141
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5039
5142
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
5040
5143
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
5041
5144
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
5042
|
-
return /* @__PURE__ */ (0,
|
|
5145
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
|
|
5043
5146
|
"div",
|
|
5044
5147
|
{
|
|
5045
5148
|
className: "flex justify-between gap-6 md:items-center",
|
|
5046
5149
|
children: [
|
|
5047
|
-
/* @__PURE__ */ (0,
|
|
5048
|
-
/* @__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)(
|
|
5049
5152
|
passkey_default,
|
|
5050
5153
|
{
|
|
5051
5154
|
size: 32,
|
|
5052
5155
|
className: "text-interface-foreground-default-primary"
|
|
5053
5156
|
}
|
|
5054
5157
|
),
|
|
5055
|
-
/* @__PURE__ */ (0,
|
|
5056
|
-
/* @__PURE__ */ (0,
|
|
5057
|
-
/* @__PURE__ */ (0,
|
|
5058
|
-
/* @__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 })
|
|
5059
5162
|
] }),
|
|
5060
|
-
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, {
|
|
5061
5164
|
dateStyle: "long"
|
|
5062
5165
|
}).format(new Date(addedAt)) })
|
|
5063
5166
|
] })
|
|
5064
5167
|
] }),
|
|
5065
|
-
/* @__PURE__ */ (0,
|
|
5168
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5066
5169
|
"button",
|
|
5067
5170
|
{
|
|
5068
5171
|
...node.attributes,
|
|
@@ -5070,7 +5173,7 @@ function DefaultSettingsPasskey({
|
|
|
5070
5173
|
onClick: node.onClick,
|
|
5071
5174
|
disabled: isSubmitting,
|
|
5072
5175
|
className: "relative",
|
|
5073
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5176
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
5074
5177
|
trash_default,
|
|
5075
5178
|
{
|
|
5076
5179
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5090,25 +5193,25 @@ function DefaultSettingsPasskey({
|
|
|
5090
5193
|
|
|
5091
5194
|
// src/theme/default/assets/icons/download.svg
|
|
5092
5195
|
var React30 = __toESM(require("react"));
|
|
5093
|
-
var
|
|
5196
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
5094
5197
|
var SvgDownload = (props) => {
|
|
5095
5198
|
var _a, _b;
|
|
5096
|
-
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" }) });
|
|
5097
5200
|
};
|
|
5098
5201
|
var download_default = SvgDownload;
|
|
5099
5202
|
|
|
5100
5203
|
// src/theme/default/assets/icons/refresh.svg
|
|
5101
5204
|
var React31 = __toESM(require("react"));
|
|
5102
|
-
var
|
|
5205
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
5103
5206
|
var SvgRefresh = (props) => {
|
|
5104
5207
|
var _a, _b;
|
|
5105
|
-
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" }) });
|
|
5106
5209
|
};
|
|
5107
5210
|
var refresh_default = SvgRefresh;
|
|
5108
5211
|
|
|
5109
5212
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
5110
5213
|
var import_react_hook_form22 = require("react-hook-form");
|
|
5111
|
-
var
|
|
5214
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
5112
5215
|
function DefaultSettingsRecoveryCodes({
|
|
5113
5216
|
codes,
|
|
5114
5217
|
regnerateButton,
|
|
@@ -5130,12 +5233,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5130
5233
|
element.click();
|
|
5131
5234
|
};
|
|
5132
5235
|
const hasCodes = codes.length >= 1;
|
|
5133
|
-
return /* @__PURE__ */ (0,
|
|
5134
|
-
codes.length > 0 && /* @__PURE__ */ (0,
|
|
5135
|
-
/* @__PURE__ */ (0,
|
|
5136
|
-
/* @__PURE__ */ (0,
|
|
5137
|
-
/* @__PURE__ */ (0,
|
|
5138
|
-
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)(
|
|
5139
5242
|
"button",
|
|
5140
5243
|
{
|
|
5141
5244
|
...regnerateButton.attributes,
|
|
@@ -5144,7 +5247,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5144
5247
|
onClick: onRegenerate,
|
|
5145
5248
|
disabled: isSubmitting,
|
|
5146
5249
|
"data-loading": isSubmitting,
|
|
5147
|
-
children: /* @__PURE__ */ (0,
|
|
5250
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5148
5251
|
refresh_default,
|
|
5149
5252
|
{
|
|
5150
5253
|
size: 24,
|
|
@@ -5153,7 +5256,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5153
5256
|
)
|
|
5154
5257
|
}
|
|
5155
5258
|
),
|
|
5156
|
-
revealButton && /* @__PURE__ */ (0,
|
|
5259
|
+
revealButton && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_jsx_runtime93.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5157
5260
|
"button",
|
|
5158
5261
|
{
|
|
5159
5262
|
...revealButton.attributes,
|
|
@@ -5161,7 +5264,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5161
5264
|
className: "ml-auto",
|
|
5162
5265
|
onClick: onReveal,
|
|
5163
5266
|
title: "Reveal recovery codes",
|
|
5164
|
-
children: /* @__PURE__ */ (0,
|
|
5267
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5165
5268
|
eye_default,
|
|
5166
5269
|
{
|
|
5167
5270
|
size: 24,
|
|
@@ -5170,7 +5273,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5170
5273
|
)
|
|
5171
5274
|
}
|
|
5172
5275
|
) }),
|
|
5173
|
-
hasCodes && /* @__PURE__ */ (0,
|
|
5276
|
+
hasCodes && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5174
5277
|
"button",
|
|
5175
5278
|
{
|
|
5176
5279
|
onClick: onDownload,
|
|
@@ -5178,7 +5281,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5178
5281
|
className: "ml-auto",
|
|
5179
5282
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
5180
5283
|
title: "Download recovery codes",
|
|
5181
|
-
children: /* @__PURE__ */ (0,
|
|
5284
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
5182
5285
|
download_default,
|
|
5183
5286
|
{
|
|
5184
5287
|
size: 24,
|
|
@@ -5189,12 +5292,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5189
5292
|
)
|
|
5190
5293
|
] })
|
|
5191
5294
|
] }),
|
|
5192
|
-
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)(
|
|
5193
5296
|
"div",
|
|
5194
5297
|
{
|
|
5195
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",
|
|
5196
5299
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
5197
|
-
children: codes.map((code) => /* @__PURE__ */ (0,
|
|
5300
|
+
children: codes.map((code) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("p", { children: code }, code))
|
|
5198
5301
|
}
|
|
5199
5302
|
) }) : null
|
|
5200
5303
|
] });
|
|
@@ -5205,16 +5308,16 @@ var import_elements_react20 = require("@ory/elements-react");
|
|
|
5205
5308
|
|
|
5206
5309
|
// src/theme/default/assets/icons/qrcode.svg
|
|
5207
5310
|
var React32 = __toESM(require("react"));
|
|
5208
|
-
var
|
|
5311
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
5209
5312
|
var SvgQrcode = (props) => {
|
|
5210
5313
|
var _a, _b;
|
|
5211
|
-
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" }) });
|
|
5212
5315
|
};
|
|
5213
5316
|
var qrcode_default = SvgQrcode;
|
|
5214
5317
|
|
|
5215
5318
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
5216
5319
|
var import_react_hook_form23 = require("react-hook-form");
|
|
5217
|
-
var
|
|
5320
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
5218
5321
|
function DefaultSettingsTotp({
|
|
5219
5322
|
totpImage,
|
|
5220
5323
|
totpInput,
|
|
@@ -5234,19 +5337,19 @@ function DefaultSettingsTotp({
|
|
|
5234
5337
|
node_type: _ignoredNodeType,
|
|
5235
5338
|
...buttonAttrs
|
|
5236
5339
|
} = totpUnlink.attributes;
|
|
5237
|
-
return /* @__PURE__ */ (0,
|
|
5238
|
-
/* @__PURE__ */ (0,
|
|
5239
|
-
/* @__PURE__ */ (0,
|
|
5240
|
-
/* @__PURE__ */ (0,
|
|
5241
|
-
/* @__PURE__ */ (0,
|
|
5242
|
-
/* @__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)(
|
|
5243
5346
|
"button",
|
|
5244
5347
|
{
|
|
5245
5348
|
type: type === "button" ? "button" : "submit",
|
|
5246
5349
|
...buttonAttrs,
|
|
5247
5350
|
onClick: onUnlink,
|
|
5248
5351
|
disabled: isSubmitting,
|
|
5249
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5352
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5250
5353
|
trash_default,
|
|
5251
5354
|
{
|
|
5252
5355
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5259,9 +5362,9 @@ function DefaultSettingsTotp({
|
|
|
5259
5362
|
] });
|
|
5260
5363
|
}
|
|
5261
5364
|
if (totpImage && totpSecret && totpInput) {
|
|
5262
|
-
return /* @__PURE__ */ (0,
|
|
5263
|
-
/* @__PURE__ */ (0,
|
|
5264
|
-
/* @__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)(
|
|
5265
5368
|
Node2.Image,
|
|
5266
5369
|
{
|
|
5267
5370
|
node: totpImage,
|
|
@@ -5270,13 +5373,13 @@ function DefaultSettingsTotp({
|
|
|
5270
5373
|
}
|
|
5271
5374
|
}
|
|
5272
5375
|
) }) }) }),
|
|
5273
|
-
/* @__PURE__ */ (0,
|
|
5274
|
-
/* @__PURE__ */ (0,
|
|
5376
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
5377
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5275
5378
|
Node2.Label,
|
|
5276
5379
|
{
|
|
5277
5380
|
node: totpSecret,
|
|
5278
5381
|
attributes: totpSecret.attributes,
|
|
5279
|
-
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)(
|
|
5280
5383
|
"input",
|
|
5281
5384
|
{
|
|
5282
5385
|
disabled: true,
|
|
@@ -5289,12 +5392,12 @@ function DefaultSettingsTotp({
|
|
|
5289
5392
|
) })
|
|
5290
5393
|
}
|
|
5291
5394
|
),
|
|
5292
|
-
/* @__PURE__ */ (0,
|
|
5395
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5293
5396
|
Node2.Label,
|
|
5294
5397
|
{
|
|
5295
5398
|
attributes: totpInput.attributes,
|
|
5296
5399
|
node: totpInput,
|
|
5297
|
-
children: /* @__PURE__ */ (0,
|
|
5400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
|
|
5298
5401
|
Node2.CodeInput,
|
|
5299
5402
|
{
|
|
5300
5403
|
node: totpInput,
|
|
@@ -5313,16 +5416,16 @@ var import_elements_react21 = require("@ory/elements-react");
|
|
|
5313
5416
|
|
|
5314
5417
|
// src/theme/default/assets/icons/key.svg
|
|
5315
5418
|
var React33 = __toESM(require("react"));
|
|
5316
|
-
var
|
|
5419
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
5317
5420
|
var SvgKey = (props) => {
|
|
5318
5421
|
var _a, _b;
|
|
5319
|
-
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" }) });
|
|
5320
5423
|
};
|
|
5321
5424
|
var key_default = SvgKey;
|
|
5322
5425
|
|
|
5323
5426
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
5324
5427
|
var import_react_hook_form24 = require("react-hook-form");
|
|
5325
|
-
var
|
|
5428
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
5326
5429
|
function DefaultSettingsWebauthn({
|
|
5327
5430
|
nameInput,
|
|
5328
5431
|
triggerButton,
|
|
@@ -5333,14 +5436,14 @@ function DefaultSettingsWebauthn({
|
|
|
5333
5436
|
} = (0, import_react_hook_form24.useFormContext)();
|
|
5334
5437
|
const { Node: Node2, Card } = (0, import_elements_react21.useComponents)();
|
|
5335
5438
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5336
|
-
return /* @__PURE__ */ (0,
|
|
5337
|
-
/* @__PURE__ */ (0,
|
|
5338
|
-
/* @__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)(
|
|
5339
5442
|
Node2.Label,
|
|
5340
5443
|
{
|
|
5341
5444
|
node: nameInput,
|
|
5342
5445
|
attributes: nameInput.attributes,
|
|
5343
|
-
children: /* @__PURE__ */ (0,
|
|
5446
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5344
5447
|
Node2.Input,
|
|
5345
5448
|
{
|
|
5346
5449
|
node: nameInput,
|
|
@@ -5349,7 +5452,7 @@ function DefaultSettingsWebauthn({
|
|
|
5349
5452
|
)
|
|
5350
5453
|
}
|
|
5351
5454
|
) }),
|
|
5352
|
-
triggerButton ? /* @__PURE__ */ (0,
|
|
5455
|
+
triggerButton ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5353
5456
|
Node2.Button,
|
|
5354
5457
|
{
|
|
5355
5458
|
node: triggerButton,
|
|
@@ -5358,38 +5461,38 @@ function DefaultSettingsWebauthn({
|
|
|
5358
5461
|
}
|
|
5359
5462
|
) : null
|
|
5360
5463
|
] }),
|
|
5361
|
-
hasRemoveButtons ? /* @__PURE__ */ (0,
|
|
5362
|
-
/* @__PURE__ */ (0,
|
|
5363
|
-
/* @__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) => {
|
|
5364
5467
|
var _a, _b;
|
|
5365
5468
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5366
5469
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
5367
5470
|
const displayName = "display_name" in context ? context.display_name : null;
|
|
5368
5471
|
const keyId = "value" in node.attributes ? node.attributes.value : null;
|
|
5369
|
-
return /* @__PURE__ */ (0,
|
|
5472
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
5370
5473
|
"div",
|
|
5371
5474
|
{
|
|
5372
5475
|
className: "flex justify-between gap-6 md:items-center",
|
|
5373
5476
|
children: [
|
|
5374
|
-
/* @__PURE__ */ (0,
|
|
5375
|
-
/* @__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)(
|
|
5376
5479
|
key_default,
|
|
5377
5480
|
{
|
|
5378
5481
|
size: 32,
|
|
5379
5482
|
className: "text-interface-foreground-default-primary"
|
|
5380
5483
|
}
|
|
5381
5484
|
),
|
|
5382
|
-
/* @__PURE__ */ (0,
|
|
5383
|
-
/* @__PURE__ */ (0,
|
|
5384
|
-
/* @__PURE__ */ (0,
|
|
5385
|
-
/* @__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 })
|
|
5386
5489
|
] }),
|
|
5387
|
-
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, {
|
|
5388
5491
|
dateStyle: "long"
|
|
5389
5492
|
}).format(new Date(addedAt)) })
|
|
5390
5493
|
] })
|
|
5391
5494
|
] }),
|
|
5392
|
-
/* @__PURE__ */ (0,
|
|
5495
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5393
5496
|
"button",
|
|
5394
5497
|
{
|
|
5395
5498
|
...node.attributes,
|
|
@@ -5397,7 +5500,7 @@ function DefaultSettingsWebauthn({
|
|
|
5397
5500
|
onClick: node.onClick,
|
|
5398
5501
|
disabled: isSubmitting,
|
|
5399
5502
|
className: "relative",
|
|
5400
|
-
children: isSubmitting ? /* @__PURE__ */ (0,
|
|
5503
|
+
children: isSubmitting ? /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(Spinner, { className: "relative" }) : /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
|
|
5401
5504
|
trash_default,
|
|
5402
5505
|
{
|
|
5403
5506
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5416,24 +5519,24 @@ function DefaultSettingsWebauthn({
|
|
|
5416
5519
|
}
|
|
5417
5520
|
|
|
5418
5521
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
5419
|
-
var
|
|
5522
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
5420
5523
|
function DefaultAuthMethodListContainer({
|
|
5421
5524
|
children
|
|
5422
5525
|
}) {
|
|
5423
|
-
return /* @__PURE__ */ (0,
|
|
5526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { className: "grid grid-cols-1 gap-2", children });
|
|
5424
5527
|
}
|
|
5425
5528
|
|
|
5426
5529
|
// src/theme/default/components/form/captcha.tsx
|
|
5427
|
-
var
|
|
5530
|
+
var import_client_fetch41 = require("@ory/client-fetch");
|
|
5428
5531
|
var import_react_turnstile = require("@marsidev/react-turnstile");
|
|
5429
|
-
var
|
|
5532
|
+
var import_react17 = require("react");
|
|
5430
5533
|
var import_react_hook_form25 = require("react-hook-form");
|
|
5431
|
-
var
|
|
5534
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
5432
5535
|
var DefaultCaptcha = ({ node }) => {
|
|
5433
5536
|
const { setValue, formState } = (0, import_react_hook_form25.useFormContext)();
|
|
5434
|
-
const ref = (0,
|
|
5435
|
-
const prevSubmitCount = (0,
|
|
5436
|
-
(0,
|
|
5537
|
+
const ref = (0, import_react17.useRef)();
|
|
5538
|
+
const prevSubmitCount = (0, import_react17.useRef)(formState.submitCount);
|
|
5539
|
+
(0, import_react17.useEffect)(() => {
|
|
5437
5540
|
if (formState.submitCount > prevSubmitCount.current && formState.isSubmitSuccessful) {
|
|
5438
5541
|
prevSubmitCount.current = formState.submitCount;
|
|
5439
5542
|
setTimeout(() => {
|
|
@@ -5443,14 +5546,14 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
5443
5546
|
}, 100);
|
|
5444
5547
|
}
|
|
5445
5548
|
}, [formState.submitCount, formState.isSubmitSuccessful]);
|
|
5446
|
-
if (!(0,
|
|
5549
|
+
if (!(0, import_client_fetch41.isUiNodeInputAttributes)(node.attributes)) {
|
|
5447
5550
|
return null;
|
|
5448
5551
|
}
|
|
5449
5552
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
5450
|
-
return /* @__PURE__ */ (0,
|
|
5553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(DefaultInput, { node, attributes: node.attributes }, 1);
|
|
5451
5554
|
} else if (node.attributes.name === "captcha_turnstile_options") {
|
|
5452
5555
|
const options = JSON.parse(node.attributes.value);
|
|
5453
|
-
return /* @__PURE__ */ (0,
|
|
5556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
5454
5557
|
import_react_turnstile.Turnstile,
|
|
5455
5558
|
{
|
|
5456
5559
|
ref,
|
|
@@ -5477,35 +5580,35 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
5477
5580
|
|
|
5478
5581
|
// src/theme/default/assets/icons/personal.svg
|
|
5479
5582
|
var React34 = __toESM(require("react"));
|
|
5480
|
-
var
|
|
5583
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
5481
5584
|
var SvgPersonal = (props) => {
|
|
5482
5585
|
var _a, _b;
|
|
5483
|
-
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" }) });
|
|
5484
5587
|
};
|
|
5485
5588
|
var personal_default = SvgPersonal;
|
|
5486
5589
|
|
|
5487
5590
|
// src/theme/default/assets/icons/message.svg
|
|
5488
5591
|
var React35 = __toESM(require("react"));
|
|
5489
|
-
var
|
|
5592
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
5490
5593
|
var SvgMessage = (props) => {
|
|
5491
5594
|
var _a, _b;
|
|
5492
|
-
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" }) });
|
|
5493
5596
|
};
|
|
5494
5597
|
var message_default = SvgMessage;
|
|
5495
5598
|
|
|
5496
5599
|
// src/theme/default/assets/icons/phone.svg
|
|
5497
5600
|
var React36 = __toESM(require("react"));
|
|
5498
|
-
var
|
|
5601
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
5499
5602
|
var SvgPhone = (props) => {
|
|
5500
5603
|
var _a, _b;
|
|
5501
|
-
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" }) });
|
|
5502
5605
|
};
|
|
5503
5606
|
var phone_default = SvgPhone;
|
|
5504
5607
|
|
|
5505
5608
|
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
5506
5609
|
var import_react_intl23 = require("react-intl");
|
|
5507
5610
|
var Switch = __toESM(require("@radix-ui/react-switch"));
|
|
5508
|
-
var
|
|
5611
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
5509
5612
|
var ScopeIcons = {
|
|
5510
5613
|
openid: personal_default,
|
|
5511
5614
|
offline_access: personal_default,
|
|
@@ -5520,7 +5623,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5520
5623
|
var _a;
|
|
5521
5624
|
const intl = (0, import_react_intl23.useIntl)();
|
|
5522
5625
|
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
5523
|
-
return /* @__PURE__ */ (0,
|
|
5626
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5524
5627
|
ListItem,
|
|
5525
5628
|
{
|
|
5526
5629
|
as: "label",
|
|
@@ -5535,7 +5638,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5535
5638
|
}),
|
|
5536
5639
|
className: "col-span-2",
|
|
5537
5640
|
"data-testid": "ory/screen/consent/scope-checkbox-label",
|
|
5538
|
-
children: /* @__PURE__ */ (0,
|
|
5641
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
5539
5642
|
Switch.Root,
|
|
5540
5643
|
{
|
|
5541
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",
|
|
@@ -5543,7 +5646,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5543
5646
|
value: attributes.value,
|
|
5544
5647
|
onCheckedChange,
|
|
5545
5648
|
defaultChecked: true,
|
|
5546
|
-
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" })
|
|
5547
5650
|
}
|
|
5548
5651
|
)
|
|
5549
5652
|
}
|
|
@@ -5601,10 +5704,11 @@ function getOryComponents(overrides) {
|
|
|
5601
5704
|
}
|
|
5602
5705
|
|
|
5603
5706
|
// src/theme/default/flows/error.tsx
|
|
5604
|
-
var
|
|
5605
|
-
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");
|
|
5606
5710
|
var import_react_intl24 = require("react-intl");
|
|
5607
|
-
var
|
|
5711
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
5608
5712
|
function isOAuth2Error(error) {
|
|
5609
5713
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5610
5714
|
}
|
|
@@ -5613,7 +5717,7 @@ var errorDescriptions = {
|
|
|
5613
5717
|
5: "The server encountered an error and could not complete your request"
|
|
5614
5718
|
};
|
|
5615
5719
|
function useStandardize(error) {
|
|
5616
|
-
return (0,
|
|
5720
|
+
return (0, import_react18.useMemo)(() => {
|
|
5617
5721
|
var _a;
|
|
5618
5722
|
if (isOAuth2Error(error)) {
|
|
5619
5723
|
return {
|
|
@@ -5623,14 +5727,14 @@ function useStandardize(error) {
|
|
|
5623
5727
|
timestamp: /* @__PURE__ */ new Date()
|
|
5624
5728
|
};
|
|
5625
5729
|
}
|
|
5626
|
-
if ((0,
|
|
5730
|
+
if ((0, import_client_fetch42.instanceOfFlowError)(error)) {
|
|
5627
5731
|
const parsed = error.error;
|
|
5628
5732
|
return {
|
|
5629
5733
|
...parsed,
|
|
5630
5734
|
id: error.id,
|
|
5631
5735
|
timestamp: error.created_at
|
|
5632
5736
|
};
|
|
5633
|
-
} else if (error.error && (0,
|
|
5737
|
+
} else if (error.error && (0, import_client_fetch42.instanceOfGenericError)(error.error)) {
|
|
5634
5738
|
return {
|
|
5635
5739
|
code: (_a = error.error.code) != null ? _a : 500,
|
|
5636
5740
|
message: error.error.message,
|
|
@@ -5657,47 +5761,47 @@ function Error2({
|
|
|
5657
5761
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5658
5762
|
const parsed = useStandardize(error);
|
|
5659
5763
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5660
|
-
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)(
|
|
5661
5765
|
IntlProvider,
|
|
5662
5766
|
{
|
|
5663
5767
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5664
5768
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5665
|
-
children: /* @__PURE__ */ (0,
|
|
5769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)(
|
|
5666
5770
|
"div",
|
|
5667
5771
|
{
|
|
5668
5772
|
className: "flex flex-col gap-6 antialiased",
|
|
5669
5773
|
"data-testid": "ory/screen/error",
|
|
5670
5774
|
children: [
|
|
5671
|
-
/* @__PURE__ */ (0,
|
|
5672
|
-
/* @__PURE__ */ (0,
|
|
5673
|
-
/* @__PURE__ */ (0,
|
|
5674
|
-
/* @__PURE__ */ (0,
|
|
5675
|
-
/* @__PURE__ */ (0,
|
|
5676
|
-
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 })
|
|
5677
5781
|
] })
|
|
5678
5782
|
] }),
|
|
5679
|
-
/* @__PURE__ */ (0,
|
|
5680
|
-
/* @__PURE__ */ (0,
|
|
5681
|
-
/* @__PURE__ */ (0,
|
|
5682
|
-
/* @__PURE__ */ (0,
|
|
5683
|
-
/* @__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, {}) })
|
|
5684
5788
|
] }),
|
|
5685
|
-
/* @__PURE__ */ (0,
|
|
5686
|
-
/* @__PURE__ */ (0,
|
|
5687
|
-
/* @__PURE__ */ (0,
|
|
5688
|
-
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: [
|
|
5689
5793
|
"ID: ",
|
|
5690
|
-
/* @__PURE__ */ (0,
|
|
5794
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("code", { children: parsed.id })
|
|
5691
5795
|
] }),
|
|
5692
|
-
/* @__PURE__ */ (0,
|
|
5796
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5693
5797
|
"Time: ",
|
|
5694
|
-
/* @__PURE__ */ (0,
|
|
5798
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5695
5799
|
] }),
|
|
5696
|
-
/* @__PURE__ */ (0,
|
|
5800
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5697
5801
|
"Message: ",
|
|
5698
|
-
/* @__PURE__ */ (0,
|
|
5802
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("code", { children: parsed.reason })
|
|
5699
5803
|
] }),
|
|
5700
|
-
/* @__PURE__ */ (0,
|
|
5804
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5701
5805
|
"button",
|
|
5702
5806
|
{
|
|
5703
5807
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5709,7 +5813,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5709
5813
|
`;
|
|
5710
5814
|
void navigator.clipboard.writeText(text);
|
|
5711
5815
|
},
|
|
5712
|
-
children: /* @__PURE__ */ (0,
|
|
5816
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.footer.copy" })
|
|
5713
5817
|
}
|
|
5714
5818
|
) })
|
|
5715
5819
|
] })
|
|
@@ -5717,55 +5821,46 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5717
5821
|
}
|
|
5718
5822
|
) })
|
|
5719
5823
|
}
|
|
5720
|
-
);
|
|
5824
|
+
) });
|
|
5721
5825
|
}
|
|
5722
|
-
function LoggedInActions(
|
|
5826
|
+
function LoggedInActions() {
|
|
5827
|
+
const config = (0, import_elements_react22.useOryConfiguration)();
|
|
5723
5828
|
const { logoutFlow } = useClientLogout(config);
|
|
5724
|
-
return /* @__PURE__ */ (0,
|
|
5829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5725
5830
|
"a",
|
|
5726
5831
|
{
|
|
5727
5832
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
5728
5833
|
className: "text-interface-foreground-default-primary underline",
|
|
5729
|
-
children: /* @__PURE__ */ (0,
|
|
5834
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "login.logout-button" })
|
|
5730
5835
|
}
|
|
5731
5836
|
);
|
|
5732
5837
|
}
|
|
5733
|
-
function GoBackButton(
|
|
5838
|
+
function GoBackButton() {
|
|
5839
|
+
const config = (0, import_elements_react22.useOryConfiguration)();
|
|
5734
5840
|
if ("default_redirect_url" in config.project) {
|
|
5735
|
-
return /* @__PURE__ */ (0,
|
|
5841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
5736
5842
|
"a",
|
|
5737
5843
|
{
|
|
5738
5844
|
className: "text-interface-foreground-default-primary underline",
|
|
5739
5845
|
href: config.project.default_redirect_url,
|
|
5740
|
-
children: /* @__PURE__ */ (0,
|
|
5846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl24.FormattedMessage, { id: "error.action.go-back" })
|
|
5741
5847
|
}
|
|
5742
5848
|
);
|
|
5743
5849
|
}
|
|
5744
5850
|
return null;
|
|
5745
5851
|
}
|
|
5746
|
-
function ErrorLogo(
|
|
5747
|
-
|
|
5748
|
-
if (
|
|
5749
|
-
return /* @__PURE__ */ (0,
|
|
5750
|
-
"img",
|
|
5751
|
-
{
|
|
5752
|
-
src: config.project.logo_light_url,
|
|
5753
|
-
width: 100,
|
|
5754
|
-
height: 36,
|
|
5755
|
-
alt: "Logo"
|
|
5756
|
-
}
|
|
5757
|
-
);
|
|
5758
|
-
}
|
|
5759
|
-
if (config.logoUrl) {
|
|
5760
|
-
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
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" });
|
|
5761
5856
|
}
|
|
5762
|
-
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 });
|
|
5763
5858
|
}
|
|
5764
5859
|
|
|
5765
5860
|
// src/theme/default/flows/login.tsx
|
|
5766
|
-
var
|
|
5767
|
-
var
|
|
5768
|
-
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");
|
|
5769
5864
|
function Login({
|
|
5770
5865
|
flow,
|
|
5771
5866
|
config,
|
|
@@ -5773,22 +5868,22 @@ function Login({
|
|
|
5773
5868
|
components: flowOverrideComponents
|
|
5774
5869
|
}) {
|
|
5775
5870
|
const components = getOryComponents(flowOverrideComponents);
|
|
5776
|
-
return /* @__PURE__ */ (0,
|
|
5777
|
-
|
|
5871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
5872
|
+
import_elements_react23.OryProvider,
|
|
5778
5873
|
{
|
|
5779
5874
|
config,
|
|
5780
5875
|
flow,
|
|
5781
|
-
flowType:
|
|
5876
|
+
flowType: import_client_fetch43.FlowType.Login,
|
|
5782
5877
|
components,
|
|
5783
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5878
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_elements_react23.OryTwoStepCard, {})
|
|
5784
5879
|
}
|
|
5785
5880
|
);
|
|
5786
5881
|
}
|
|
5787
5882
|
|
|
5788
5883
|
// src/theme/default/flows/recovery.tsx
|
|
5789
|
-
var
|
|
5790
|
-
var
|
|
5791
|
-
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");
|
|
5792
5887
|
function Recovery({
|
|
5793
5888
|
flow,
|
|
5794
5889
|
config,
|
|
@@ -5796,22 +5891,22 @@ function Recovery({
|
|
|
5796
5891
|
components: flowOverrideComponents
|
|
5797
5892
|
}) {
|
|
5798
5893
|
const components = getOryComponents(flowOverrideComponents);
|
|
5799
|
-
return /* @__PURE__ */ (0,
|
|
5800
|
-
|
|
5894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
5895
|
+
import_elements_react24.OryProvider,
|
|
5801
5896
|
{
|
|
5802
5897
|
config,
|
|
5803
5898
|
flow,
|
|
5804
|
-
flowType:
|
|
5899
|
+
flowType: import_client_fetch44.FlowType.Recovery,
|
|
5805
5900
|
components,
|
|
5806
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5901
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_elements_react24.OryTwoStepCard, {})
|
|
5807
5902
|
}
|
|
5808
5903
|
);
|
|
5809
5904
|
}
|
|
5810
5905
|
|
|
5811
5906
|
// src/theme/default/flows/registration.tsx
|
|
5812
|
-
var
|
|
5813
|
-
var
|
|
5814
|
-
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");
|
|
5815
5910
|
function Registration({
|
|
5816
5911
|
flow,
|
|
5817
5912
|
children,
|
|
@@ -5819,22 +5914,22 @@ function Registration({
|
|
|
5819
5914
|
config
|
|
5820
5915
|
}) {
|
|
5821
5916
|
const components = getOryComponents(flowOverrideComponents);
|
|
5822
|
-
return /* @__PURE__ */ (0,
|
|
5823
|
-
|
|
5917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
5918
|
+
import_elements_react25.OryProvider,
|
|
5824
5919
|
{
|
|
5825
5920
|
config,
|
|
5826
5921
|
flow,
|
|
5827
|
-
flowType:
|
|
5922
|
+
flowType: import_client_fetch45.FlowType.Registration,
|
|
5828
5923
|
components,
|
|
5829
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5924
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_elements_react25.OryTwoStepCard, {})
|
|
5830
5925
|
}
|
|
5831
5926
|
);
|
|
5832
5927
|
}
|
|
5833
5928
|
|
|
5834
5929
|
// src/theme/default/flows/settings.tsx
|
|
5835
|
-
var
|
|
5836
|
-
var
|
|
5837
|
-
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");
|
|
5838
5933
|
function Settings({
|
|
5839
5934
|
flow,
|
|
5840
5935
|
config,
|
|
@@ -5842,25 +5937,25 @@ function Settings({
|
|
|
5842
5937
|
components: flowOverrideComponents
|
|
5843
5938
|
}) {
|
|
5844
5939
|
const components = getOryComponents(flowOverrideComponents);
|
|
5845
|
-
return /* @__PURE__ */ (0,
|
|
5846
|
-
|
|
5940
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
5941
|
+
import_elements_react26.OryProvider,
|
|
5847
5942
|
{
|
|
5848
5943
|
config,
|
|
5849
5944
|
flow,
|
|
5850
|
-
flowType:
|
|
5945
|
+
flowType: import_client_fetch46.FlowType.Settings,
|
|
5851
5946
|
components,
|
|
5852
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5853
|
-
/* @__PURE__ */ (0,
|
|
5854
|
-
/* @__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, {})
|
|
5855
5950
|
] })
|
|
5856
5951
|
}
|
|
5857
5952
|
);
|
|
5858
5953
|
}
|
|
5859
5954
|
|
|
5860
5955
|
// src/theme/default/flows/verification.tsx
|
|
5861
|
-
var
|
|
5862
|
-
var
|
|
5863
|
-
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");
|
|
5864
5959
|
function Verification({
|
|
5865
5960
|
flow,
|
|
5866
5961
|
config,
|
|
@@ -5868,24 +5963,24 @@ function Verification({
|
|
|
5868
5963
|
components: flowOverrideComponents
|
|
5869
5964
|
}) {
|
|
5870
5965
|
const components = getOryComponents(flowOverrideComponents);
|
|
5871
|
-
return /* @__PURE__ */ (0,
|
|
5872
|
-
|
|
5966
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
5967
|
+
import_elements_react27.OryProvider,
|
|
5873
5968
|
{
|
|
5874
5969
|
config,
|
|
5875
5970
|
flow,
|
|
5876
|
-
flowType:
|
|
5971
|
+
flowType: import_client_fetch47.FlowType.Verification,
|
|
5877
5972
|
components,
|
|
5878
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
5973
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_elements_react27.OryTwoStepCard, {})
|
|
5879
5974
|
}
|
|
5880
5975
|
);
|
|
5881
5976
|
}
|
|
5882
5977
|
|
|
5883
5978
|
// src/theme/default/flows/consent.tsx
|
|
5884
|
-
var
|
|
5885
|
-
var
|
|
5979
|
+
var import_client_fetch49 = require("@ory/client-fetch");
|
|
5980
|
+
var import_elements_react28 = require("@ory/elements-react");
|
|
5886
5981
|
|
|
5887
5982
|
// src/theme/default/utils/oauth2.ts
|
|
5888
|
-
var
|
|
5983
|
+
var import_client_fetch48 = require("@ory/client-fetch");
|
|
5889
5984
|
var rememberCheckbox = {
|
|
5890
5985
|
type: "input",
|
|
5891
5986
|
group: "oauth2_consent",
|
|
@@ -5893,7 +5988,7 @@ var rememberCheckbox = {
|
|
|
5893
5988
|
label: {
|
|
5894
5989
|
id: 9999111,
|
|
5895
5990
|
text: "Remember my decision",
|
|
5896
|
-
type:
|
|
5991
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5897
5992
|
}
|
|
5898
5993
|
},
|
|
5899
5994
|
attributes: {
|
|
@@ -5912,7 +6007,7 @@ var acceptButton = {
|
|
|
5912
6007
|
label: {
|
|
5913
6008
|
id: 9999111,
|
|
5914
6009
|
text: "Accept",
|
|
5915
|
-
type:
|
|
6010
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5916
6011
|
}
|
|
5917
6012
|
},
|
|
5918
6013
|
attributes: {
|
|
@@ -5931,7 +6026,7 @@ var rejectButton = {
|
|
|
5931
6026
|
label: {
|
|
5932
6027
|
id: 9999111,
|
|
5933
6028
|
text: "Reject",
|
|
5934
|
-
type:
|
|
6029
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5935
6030
|
}
|
|
5936
6031
|
},
|
|
5937
6032
|
attributes: {
|
|
@@ -5978,7 +6073,7 @@ function scopesToUiNodes(scopes) {
|
|
|
5978
6073
|
label: {
|
|
5979
6074
|
id: 9999111,
|
|
5980
6075
|
text: scope,
|
|
5981
|
-
type:
|
|
6076
|
+
type: import_client_fetch48.UiTextTypeEnum.Info
|
|
5982
6077
|
}
|
|
5983
6078
|
},
|
|
5984
6079
|
attributes: {
|
|
@@ -6023,7 +6118,7 @@ function challengeNode(challenge) {
|
|
|
6023
6118
|
}
|
|
6024
6119
|
|
|
6025
6120
|
// src/theme/default/flows/consent.tsx
|
|
6026
|
-
var
|
|
6121
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
6027
6122
|
function Consent({
|
|
6028
6123
|
consentChallenge,
|
|
6029
6124
|
session,
|
|
@@ -6040,14 +6135,14 @@ function Consent({
|
|
|
6040
6135
|
formActionUrl,
|
|
6041
6136
|
session
|
|
6042
6137
|
);
|
|
6043
|
-
return /* @__PURE__ */ (0,
|
|
6044
|
-
|
|
6138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
6139
|
+
import_elements_react28.OryProvider,
|
|
6045
6140
|
{
|
|
6046
6141
|
config,
|
|
6047
6142
|
flow,
|
|
6048
|
-
flowType:
|
|
6143
|
+
flowType: import_client_fetch49.FlowType.OAuth2Consent,
|
|
6049
6144
|
components,
|
|
6050
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
6145
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_elements_react28.OryConsentCard, {})
|
|
6051
6146
|
}
|
|
6052
6147
|
);
|
|
6053
6148
|
}
|