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