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