@ory/elements-react 1.0.0-rc.2 → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.d.mts +71 -69
- package/dist/index.d.ts +71 -69
- package/dist/index.js +134 -72
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +135 -75
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.js +735 -659
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +652 -567
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -40,48 +40,15 @@ function DefaultCardContent({ children }) {
|
|
|
40
40
|
|
|
41
41
|
// src/theme/default/components/card/footer.tsx
|
|
42
42
|
import { FlowType as FlowType10 } from "@ory/client-fetch";
|
|
43
|
-
import {
|
|
43
|
+
import {
|
|
44
|
+
useComponents as useComponents3,
|
|
45
|
+
useOryConfiguration as useOryConfiguration2,
|
|
46
|
+
useOryFlow as useOryFlow3
|
|
47
|
+
} from "@ory/elements-react";
|
|
44
48
|
import { useIntl as useIntl9 } from "react-intl";
|
|
45
49
|
|
|
46
|
-
// src/
|
|
47
|
-
|
|
48
|
-
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
49
|
-
}
|
|
50
|
-
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
51
|
-
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
52
|
-
const qs = new URLSearchParams();
|
|
53
|
-
if (flow.oauth2_login_challenge) {
|
|
54
|
-
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
55
|
-
}
|
|
56
|
-
if (flow.return_to) {
|
|
57
|
-
qs.set("return_to", flow.return_to);
|
|
58
|
-
} else if (typeof window !== "undefined") {
|
|
59
|
-
const searchParams = new URLSearchParams(window.location.search);
|
|
60
|
-
if (searchParams.has("return_to")) {
|
|
61
|
-
qs.set("return_to", searchParams.get("return_to") || "");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (qs.toString().length === 0) {
|
|
65
|
-
return result;
|
|
66
|
-
}
|
|
67
|
-
return result + "?" + qs.toString();
|
|
68
|
-
}
|
|
69
|
-
function appendReturnTo(url, returnTo) {
|
|
70
|
-
if (!returnTo) {
|
|
71
|
-
return url;
|
|
72
|
-
}
|
|
73
|
-
const urlObj = new URL(url);
|
|
74
|
-
urlObj.searchParams.set("return_to", returnTo);
|
|
75
|
-
return urlObj.toString();
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
// src/util/ui/index.ts
|
|
79
|
-
import {
|
|
80
|
-
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
81
|
-
isUiNodeScriptAttributes
|
|
82
|
-
} from "@ory/client-fetch";
|
|
83
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
84
|
-
import { useMemo } from "react";
|
|
50
|
+
// src/components/card/two-step/state-select-method.tsx
|
|
51
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
|
|
85
52
|
|
|
86
53
|
// src/context/component.tsx
|
|
87
54
|
import {
|
|
@@ -108,7 +75,32 @@ var defaultGroupOrder = [
|
|
|
108
75
|
UiNodeGroupEnum.Totp
|
|
109
76
|
];
|
|
110
77
|
|
|
78
|
+
// src/context/flow-context.tsx
|
|
79
|
+
import {
|
|
80
|
+
createContext as createContext2,
|
|
81
|
+
useContext as useContext2,
|
|
82
|
+
useState as useState2
|
|
83
|
+
} from "react";
|
|
84
|
+
|
|
85
|
+
// src/context/form-state.ts
|
|
86
|
+
import { FlowType as FlowType2 } from "@ory/client-fetch";
|
|
87
|
+
import { useReducer, useState } from "react";
|
|
88
|
+
|
|
89
|
+
// src/components/card/two-step/utils.ts
|
|
90
|
+
import { FlowType, UiNodeGroupEnum as UiNodeGroupEnum3 } from "@ory/client-fetch";
|
|
91
|
+
|
|
92
|
+
// src/theme/default/utils/form.ts
|
|
93
|
+
function isGroupImmediateSubmit(group) {
|
|
94
|
+
return group === "code";
|
|
95
|
+
}
|
|
96
|
+
|
|
111
97
|
// src/util/ui/index.ts
|
|
98
|
+
import {
|
|
99
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
100
|
+
isUiNodeScriptAttributes
|
|
101
|
+
} from "@ory/client-fetch";
|
|
102
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
103
|
+
import { useMemo } from "react";
|
|
112
104
|
function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
113
105
|
var _a;
|
|
114
106
|
const groups = {};
|
|
@@ -171,38 +163,99 @@ function useNodeGroupsWithVisibleNodes(nodes) {
|
|
|
171
163
|
}, [nodes]);
|
|
172
164
|
}
|
|
173
165
|
|
|
174
|
-
// src/util/nodes.ts
|
|
175
|
-
function findScreenSelectionButton(nodes) {
|
|
176
|
-
return nodes.find(
|
|
177
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
178
|
-
);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
// src/components/card/two-step/state-select-method.tsx
|
|
182
|
-
import { UiNodeGroupEnum as UiNodeGroupEnum15 } from "@ory/client-fetch";
|
|
183
|
-
|
|
184
166
|
// src/context/flow-context.tsx
|
|
185
|
-
import {
|
|
186
|
-
|
|
187
|
-
useContext as useContext2,
|
|
188
|
-
useState as useState2
|
|
189
|
-
} from "react";
|
|
167
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
168
|
+
var OryFlowContext = createContext2(null);
|
|
190
169
|
|
|
191
|
-
// src/context/
|
|
192
|
-
import {
|
|
193
|
-
import { useReducer, useState } from "react";
|
|
170
|
+
// src/context/config.tsx
|
|
171
|
+
import { createContext as createContext3, useContext as useContext3, useRef } from "react";
|
|
194
172
|
|
|
195
|
-
// src/
|
|
196
|
-
|
|
173
|
+
// src/client/config.ts
|
|
174
|
+
function isProduction() {
|
|
175
|
+
var _a, _b;
|
|
176
|
+
return ["production", "prod"].indexOf(
|
|
177
|
+
(_b = (_a = process.env.VERCEL_ENV) != null ? _a : process.env.NODE_ENV) != null ? _b : ""
|
|
178
|
+
) > -1;
|
|
179
|
+
}
|
|
197
180
|
|
|
198
|
-
// src/
|
|
199
|
-
|
|
200
|
-
|
|
181
|
+
// src/util/client.ts
|
|
182
|
+
import {
|
|
183
|
+
Configuration,
|
|
184
|
+
FrontendApi
|
|
185
|
+
} from "@ory/client-fetch";
|
|
186
|
+
function frontendClient(sdkUrl, opts = {}) {
|
|
187
|
+
const config = new Configuration({
|
|
188
|
+
...opts,
|
|
189
|
+
basePath: sdkUrl,
|
|
190
|
+
credentials: "include",
|
|
191
|
+
headers: {
|
|
192
|
+
Accept: "application/json",
|
|
193
|
+
...opts.headers
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
return new FrontendApi(config);
|
|
201
197
|
}
|
|
202
198
|
|
|
203
|
-
// src/context/
|
|
204
|
-
import { jsx as
|
|
205
|
-
var
|
|
199
|
+
// src/context/config.tsx
|
|
200
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
201
|
+
var defaultProject = {
|
|
202
|
+
name: "Ory",
|
|
203
|
+
registration_enabled: true,
|
|
204
|
+
verification_enabled: true,
|
|
205
|
+
recovery_enabled: true,
|
|
206
|
+
recovery_ui_url: "/ui/recovery",
|
|
207
|
+
registration_ui_url: "/ui/registration",
|
|
208
|
+
verification_ui_url: "/ui/verification",
|
|
209
|
+
login_ui_url: "/ui/login",
|
|
210
|
+
settings_ui_url: "/ui/settings",
|
|
211
|
+
default_redirect_url: "/ui/welcome",
|
|
212
|
+
error_ui_url: "/ui/error",
|
|
213
|
+
default_locale: "en",
|
|
214
|
+
locale_behavior: "force_default"
|
|
215
|
+
};
|
|
216
|
+
var OryConfigurationContext = createContext3({
|
|
217
|
+
sdk: computeSdkConfig({}),
|
|
218
|
+
project: defaultProject
|
|
219
|
+
});
|
|
220
|
+
function computeSdkConfig(config) {
|
|
221
|
+
if ((config == null ? void 0 : config.url) && typeof config.url === "string") {
|
|
222
|
+
console.debug("Using sdk url from config");
|
|
223
|
+
return {
|
|
224
|
+
url: config.url.replace(/\/$/, ""),
|
|
225
|
+
options: config.options || {}
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
return {
|
|
229
|
+
url: getSDKUrl(),
|
|
230
|
+
options: (config == null ? void 0 : config.options) || {}
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
function getSDKUrl() {
|
|
234
|
+
var _a;
|
|
235
|
+
if (typeof process !== "undefined" && process.versions && process.versions.node) {
|
|
236
|
+
if (isProduction()) {
|
|
237
|
+
const sdkUrl = (_a = process.env["NEXT_PUBLIC_ORY_SDK_URL"]) != null ? _a : process.env["ORY_SDK_URL"];
|
|
238
|
+
if (!sdkUrl) {
|
|
239
|
+
throw new Error(
|
|
240
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL in production environments."
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
return sdkUrl.replace(/\/$/, "");
|
|
244
|
+
} else {
|
|
245
|
+
if (process.env["__NEXT_PRIVATE_ORIGIN"]) {
|
|
246
|
+
return process.env["__NEXT_PRIVATE_ORIGIN"].replace(/\/$/, "");
|
|
247
|
+
} else if (process.env["VERCEL_URL"]) {
|
|
248
|
+
return `https://${process.env["VERCEL_URL"]}`.replace(/\/$/, "");
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
if (typeof window !== "undefined") {
|
|
253
|
+
return window.location.origin;
|
|
254
|
+
}
|
|
255
|
+
throw new Error(
|
|
256
|
+
"Unable to determine SDK URL. Please set NEXT_PUBLIC_ORY_SDK_URL and/or ORY_SDK_URL or supply the sdk.url parameter in the Ory configuration."
|
|
257
|
+
);
|
|
258
|
+
}
|
|
206
259
|
|
|
207
260
|
// src/context/intl-context.tsx
|
|
208
261
|
import { IntlProvider as OriginalIntlProvider } from "react-intl";
|
|
@@ -232,24 +285,6 @@ import {
|
|
|
232
285
|
loginUrl
|
|
233
286
|
} from "@ory/client-fetch";
|
|
234
287
|
|
|
235
|
-
// src/util/client.ts
|
|
236
|
-
import {
|
|
237
|
-
Configuration,
|
|
238
|
-
FrontendApi
|
|
239
|
-
} from "@ory/client-fetch";
|
|
240
|
-
function frontendClient(sdkUrl, opts = {}) {
|
|
241
|
-
const config = new Configuration({
|
|
242
|
-
...opts,
|
|
243
|
-
basePath: sdkUrl,
|
|
244
|
-
credentials: "include",
|
|
245
|
-
headers: {
|
|
246
|
-
Accept: "application/json",
|
|
247
|
-
...opts.headers
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
return new FrontendApi(config);
|
|
251
|
-
}
|
|
252
|
-
|
|
253
288
|
// src/util/onSubmitRecovery.ts
|
|
254
289
|
import {
|
|
255
290
|
FlowType as FlowType4,
|
|
@@ -288,7 +323,7 @@ import {
|
|
|
288
323
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
|
|
289
324
|
|
|
290
325
|
// src/components/form/form.tsx
|
|
291
|
-
import { jsx as
|
|
326
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
292
327
|
|
|
293
328
|
// src/components/form/groups.tsx
|
|
294
329
|
import { getNodeId } from "@ory/client-fetch";
|
|
@@ -298,9 +333,9 @@ import {
|
|
|
298
333
|
UiNodeGroupEnum as UiNodeGroupEnum6,
|
|
299
334
|
UiNodeInputAttributesTypeEnum
|
|
300
335
|
} from "@ory/client-fetch";
|
|
301
|
-
import { useEffect, useRef } from "react";
|
|
336
|
+
import { useEffect, useRef as useRef2 } from "react";
|
|
302
337
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
303
|
-
import { jsx as
|
|
338
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
304
339
|
|
|
305
340
|
// src/components/form/nodes/node.tsx
|
|
306
341
|
import {
|
|
@@ -311,13 +346,13 @@ import {
|
|
|
311
346
|
isUiNodeTextAttributes,
|
|
312
347
|
UiNodeGroupEnum as UiNodeGroupEnum7
|
|
313
348
|
} from "@ory/client-fetch";
|
|
314
|
-
import { jsx as
|
|
349
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
315
350
|
|
|
316
351
|
// src/components/form/groups.tsx
|
|
317
|
-
import { jsx as
|
|
352
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
318
353
|
|
|
319
354
|
// src/components/form/messages.tsx
|
|
320
|
-
import { jsx as
|
|
355
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
321
356
|
|
|
322
357
|
// src/components/form/social.tsx
|
|
323
358
|
import {
|
|
@@ -334,21 +369,21 @@ import { FormProvider, useForm } from "react-hook-form";
|
|
|
334
369
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
|
|
335
370
|
|
|
336
371
|
// src/components/form/form-provider.tsx
|
|
337
|
-
import { jsx as
|
|
372
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
338
373
|
|
|
339
374
|
// src/components/form/social.tsx
|
|
340
|
-
import { jsx as
|
|
375
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
341
376
|
|
|
342
377
|
// src/components/form/section.tsx
|
|
343
378
|
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
344
|
-
import { jsx as
|
|
379
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
345
380
|
|
|
346
381
|
// src/components/generic/divider.tsx
|
|
347
382
|
import { UiNodeGroupEnum as UiNodeGroupEnum11 } from "@ory/client-fetch";
|
|
348
|
-
import { jsx as
|
|
383
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
349
384
|
|
|
350
385
|
// src/components/generic/page-header.tsx
|
|
351
|
-
import { jsx as
|
|
386
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
352
387
|
|
|
353
388
|
// src/components/settings/settings-card.tsx
|
|
354
389
|
import {
|
|
@@ -361,30 +396,30 @@ import { useIntl as useIntl7 } from "react-intl";
|
|
|
361
396
|
// src/components/settings/oidc-settings.tsx
|
|
362
397
|
import { useIntl as useIntl2 } from "react-intl";
|
|
363
398
|
import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
364
|
-
import { Fragment, jsx as
|
|
399
|
+
import { Fragment, jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
365
400
|
|
|
366
401
|
// src/components/settings/passkey-settings.tsx
|
|
367
402
|
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
368
403
|
import { useIntl as useIntl3 } from "react-intl";
|
|
369
|
-
import { Fragment as Fragment2, jsx as
|
|
404
|
+
import { Fragment as Fragment2, jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
370
405
|
|
|
371
406
|
// src/components/settings/recovery-codes-settings.tsx
|
|
372
407
|
import { useIntl as useIntl4 } from "react-intl";
|
|
373
408
|
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
374
|
-
import { Fragment as Fragment3, jsx as
|
|
409
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
375
410
|
|
|
376
411
|
// src/components/settings/totp-settings.tsx
|
|
377
412
|
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
378
413
|
import { useIntl as useIntl5 } from "react-intl";
|
|
379
|
-
import { Fragment as Fragment4, jsx as
|
|
414
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
380
415
|
|
|
381
416
|
// src/components/settings/webauthn-settings.tsx
|
|
382
417
|
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
383
418
|
import { useIntl as useIntl6 } from "react-intl";
|
|
384
|
-
import { Fragment as Fragment5, jsx as
|
|
419
|
+
import { Fragment as Fragment5, jsx as jsx21, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
385
420
|
|
|
386
421
|
// src/components/settings/settings-card.tsx
|
|
387
|
-
import { Fragment as Fragment6, jsx as
|
|
422
|
+
import { Fragment as Fragment6, jsx as jsx22, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
388
423
|
|
|
389
424
|
// src/util/i18n/index.ts
|
|
390
425
|
var uiTextToFormattedMessage = ({ id, context = {}, text }, intl) => {
|
|
@@ -2751,7 +2786,7 @@ var OryLocales = {
|
|
|
2751
2786
|
};
|
|
2752
2787
|
|
|
2753
2788
|
// src/context/intl-context.tsx
|
|
2754
|
-
import { jsx as
|
|
2789
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2755
2790
|
function mergeTranslations(customTranslations) {
|
|
2756
2791
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
2757
2792
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -2764,12 +2799,12 @@ var IntlProvider = ({
|
|
|
2764
2799
|
customTranslations
|
|
2765
2800
|
}) => {
|
|
2766
2801
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
2767
|
-
return /* @__PURE__ */
|
|
2802
|
+
return /* @__PURE__ */ jsx23(
|
|
2768
2803
|
OriginalIntlProvider,
|
|
2769
2804
|
{
|
|
2770
2805
|
onWarn: () => ({}),
|
|
2771
2806
|
defaultRichTextElements: {
|
|
2772
|
-
del: (chunks) => /* @__PURE__ */
|
|
2807
|
+
del: (chunks) => /* @__PURE__ */ jsx23("del", { children: chunks })
|
|
2773
2808
|
},
|
|
2774
2809
|
locale,
|
|
2775
2810
|
messages: messages[locale],
|
|
@@ -2780,38 +2815,38 @@ var IntlProvider = ({
|
|
|
2780
2815
|
};
|
|
2781
2816
|
|
|
2782
2817
|
// src/context/provider.tsx
|
|
2783
|
-
import { jsx as
|
|
2818
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
2784
2819
|
|
|
2785
2820
|
// src/components/card/header.tsx
|
|
2786
|
-
import { jsx as
|
|
2821
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2787
2822
|
|
|
2788
2823
|
// src/components/card/card.tsx
|
|
2789
|
-
import { jsx as
|
|
2824
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
2790
2825
|
|
|
2791
2826
|
// src/components/card/footer.tsx
|
|
2792
|
-
import { jsx as
|
|
2827
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2793
2828
|
|
|
2794
2829
|
// src/components/card/content.tsx
|
|
2795
|
-
import { jsx as
|
|
2830
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
2796
2831
|
|
|
2797
2832
|
// src/components/card/two-step/state-method-active.tsx
|
|
2798
2833
|
import {
|
|
2799
2834
|
isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
|
|
2800
2835
|
UiNodeGroupEnum as UiNodeGroupEnum13
|
|
2801
2836
|
} from "@ory/client-fetch";
|
|
2802
|
-
import { jsx as
|
|
2837
|
+
import { jsx as jsx29, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
2803
2838
|
|
|
2804
2839
|
// src/components/card/two-step/state-provide-identifier.tsx
|
|
2805
2840
|
import { UiNodeGroupEnum as UiNodeGroupEnum14 } from "@ory/client-fetch";
|
|
2806
|
-
import { jsx as
|
|
2841
|
+
import { jsx as jsx30, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2807
2842
|
|
|
2808
2843
|
// src/components/card/card-two-step.tsx
|
|
2809
2844
|
import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
2810
|
-
import { Fragment as Fragment7, jsx as
|
|
2845
|
+
import { Fragment as Fragment7, jsx as jsx31, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2811
2846
|
|
|
2812
2847
|
// src/components/card/card-consent.tsx
|
|
2813
2848
|
import { getNodeId as getNodeId4 } from "@ory/client-fetch";
|
|
2814
|
-
import { jsx as
|
|
2849
|
+
import { jsx as jsx32, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
2815
2850
|
|
|
2816
2851
|
// src/components/card/two-step/state-select-method.tsx
|
|
2817
2852
|
import { useIntl as useIntl8 } from "react-intl";
|
|
@@ -2819,10 +2854,10 @@ import { useIntl as useIntl8 } from "react-intl";
|
|
|
2819
2854
|
// src/components/card/two-step/list-methods.tsx
|
|
2820
2855
|
import { useComponents as useComponents2 } from "@ory/elements-react";
|
|
2821
2856
|
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2822
|
-
import { jsx as
|
|
2857
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
2823
2858
|
|
|
2824
2859
|
// src/components/card/two-step/state-select-method.tsx
|
|
2825
|
-
import { jsx as
|
|
2860
|
+
import { jsx as jsx34, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2826
2861
|
function toAuthMethodPickerOptions(visibleGroups) {
|
|
2827
2862
|
return Object.fromEntries(
|
|
2828
2863
|
Object.values(UiNodeGroupEnum15).filter((group) => {
|
|
@@ -2841,6 +2876,13 @@ function toAuthMethodPickerOptions(visibleGroups) {
|
|
|
2841
2876
|
);
|
|
2842
2877
|
}
|
|
2843
2878
|
|
|
2879
|
+
// src/util/nodes.ts
|
|
2880
|
+
function findScreenSelectionButton(nodes) {
|
|
2881
|
+
return nodes.find(
|
|
2882
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
2883
|
+
);
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2844
2886
|
// src/theme/default/utils/logout.ts
|
|
2845
2887
|
import { useCallback, useEffect as useEffect2, useState as useState3 } from "react";
|
|
2846
2888
|
function useClientLogout(config) {
|
|
@@ -2866,27 +2908,60 @@ function useClientLogout(config) {
|
|
|
2866
2908
|
return { logoutFlow, didLoad: !isLoading };
|
|
2867
2909
|
}
|
|
2868
2910
|
|
|
2911
|
+
// src/theme/default/utils/url.ts
|
|
2912
|
+
function restartFlowUrl(flow, fallback) {
|
|
2913
|
+
return flow.request_url || appendReturnTo(fallback, flow.return_to);
|
|
2914
|
+
}
|
|
2915
|
+
function initFlowUrl(sdkUrl, flowType, flow) {
|
|
2916
|
+
const result = `${sdkUrl}/self-service/${flowType}/browser`;
|
|
2917
|
+
const qs = new URLSearchParams();
|
|
2918
|
+
if (flow.oauth2_login_challenge) {
|
|
2919
|
+
qs.set("login_challenge", flow.oauth2_login_challenge);
|
|
2920
|
+
}
|
|
2921
|
+
if (flow.return_to) {
|
|
2922
|
+
qs.set("return_to", flow.return_to);
|
|
2923
|
+
} else if (typeof window !== "undefined") {
|
|
2924
|
+
const searchParams = new URLSearchParams(window.location.search);
|
|
2925
|
+
if (searchParams.has("return_to")) {
|
|
2926
|
+
qs.set("return_to", searchParams.get("return_to") || "");
|
|
2927
|
+
}
|
|
2928
|
+
}
|
|
2929
|
+
if (qs.toString().length === 0) {
|
|
2930
|
+
return result;
|
|
2931
|
+
}
|
|
2932
|
+
return result + "?" + qs.toString();
|
|
2933
|
+
}
|
|
2934
|
+
function appendReturnTo(url, returnTo) {
|
|
2935
|
+
if (!returnTo) {
|
|
2936
|
+
return url;
|
|
2937
|
+
}
|
|
2938
|
+
const urlObj = new URL(url);
|
|
2939
|
+
urlObj.searchParams.set("return_to", returnTo);
|
|
2940
|
+
return urlObj.toString();
|
|
2941
|
+
}
|
|
2942
|
+
|
|
2869
2943
|
// src/theme/default/components/card/footer.tsx
|
|
2870
|
-
import { Fragment as Fragment8, jsx as
|
|
2944
|
+
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2871
2945
|
function DefaultCardFooter() {
|
|
2872
2946
|
const oryFlow = useOryFlow3();
|
|
2873
2947
|
switch (oryFlow.flowType) {
|
|
2874
2948
|
case FlowType10.Login:
|
|
2875
|
-
return /* @__PURE__ */
|
|
2949
|
+
return /* @__PURE__ */ jsx35(LoginCardFooter, {});
|
|
2876
2950
|
case FlowType10.Registration:
|
|
2877
|
-
return /* @__PURE__ */
|
|
2951
|
+
return /* @__PURE__ */ jsx35(RegistrationCardFooter, {});
|
|
2878
2952
|
case FlowType10.Recovery:
|
|
2879
|
-
return /* @__PURE__ */
|
|
2953
|
+
return /* @__PURE__ */ jsx35(RecoveryCardFooter, {});
|
|
2880
2954
|
case FlowType10.Verification:
|
|
2881
|
-
return /* @__PURE__ */
|
|
2955
|
+
return /* @__PURE__ */ jsx35(VerificationCardFooter, {});
|
|
2882
2956
|
case FlowType10.OAuth2Consent:
|
|
2883
|
-
return /* @__PURE__ */
|
|
2957
|
+
return /* @__PURE__ */ jsx35(ConsentCardFooter, { flow: oryFlow.flow });
|
|
2884
2958
|
default:
|
|
2885
2959
|
return null;
|
|
2886
2960
|
}
|
|
2887
2961
|
}
|
|
2888
2962
|
function LoginCardFooter() {
|
|
2889
|
-
const {
|
|
2963
|
+
const { formState, flow, flowType } = useOryFlow3();
|
|
2964
|
+
const config = useOryConfiguration2();
|
|
2890
2965
|
const { logoutFlow: logout, didLoad: didLoadLogout } = useClientLogout(config);
|
|
2891
2966
|
const intl = useIntl9();
|
|
2892
2967
|
if (flowType !== FlowType10.Login) {
|
|
@@ -2909,7 +2984,7 @@ function LoginCardFooter() {
|
|
|
2909
2984
|
id: "login.2fa.go-back"
|
|
2910
2985
|
}),
|
|
2911
2986
|
" ",
|
|
2912
|
-
/* @__PURE__ */
|
|
2987
|
+
/* @__PURE__ */ jsx35(
|
|
2913
2988
|
"a",
|
|
2914
2989
|
{
|
|
2915
2990
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2932,7 +3007,7 @@ function LoginCardFooter() {
|
|
|
2932
3007
|
defaultMessage: "No account?"
|
|
2933
3008
|
}),
|
|
2934
3009
|
" ",
|
|
2935
|
-
/* @__PURE__ */
|
|
3010
|
+
/* @__PURE__ */ jsx35(
|
|
2936
3011
|
"a",
|
|
2937
3012
|
{
|
|
2938
3013
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2945,7 +3020,7 @@ function LoginCardFooter() {
|
|
|
2945
3020
|
}
|
|
2946
3021
|
)
|
|
2947
3022
|
] }),
|
|
2948
|
-
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */
|
|
3023
|
+
authMethods.length > 1 && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
|
|
2949
3024
|
"a",
|
|
2950
3025
|
{
|
|
2951
3026
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2956,7 +3031,7 @@ function LoginCardFooter() {
|
|
|
2956
3031
|
})
|
|
2957
3032
|
}
|
|
2958
3033
|
) }),
|
|
2959
|
-
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */
|
|
3034
|
+
authMethods.length === 1 && authMethods[0] === "code" && formState.current === "method_active" && /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx35(
|
|
2960
3035
|
"a",
|
|
2961
3036
|
{
|
|
2962
3037
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -2971,7 +3046,8 @@ function LoginCardFooter() {
|
|
|
2971
3046
|
}
|
|
2972
3047
|
function RegistrationCardFooter() {
|
|
2973
3048
|
const intl = useIntl9();
|
|
2974
|
-
const {
|
|
3049
|
+
const { flow, formState } = useOryFlow3();
|
|
3050
|
+
const config = useOryConfiguration2();
|
|
2975
3051
|
const visibleGroups = useNodeGroupsWithVisibleNodes(flow.ui.nodes);
|
|
2976
3052
|
const authMethodBlocks = toAuthMethodPickerOptions(visibleGroups);
|
|
2977
3053
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
@@ -2980,11 +3056,12 @@ function RegistrationCardFooter() {
|
|
|
2980
3056
|
if (!screenSelectionNode || Object.entries(authMethodBlocks).length < 2) {
|
|
2981
3057
|
return null;
|
|
2982
3058
|
}
|
|
2983
|
-
return /* @__PURE__ */
|
|
3059
|
+
return /* @__PURE__ */ jsx35("span", { className: "font-normal leading-normal antialiased", children: /* @__PURE__ */ jsx35(
|
|
2984
3060
|
"a",
|
|
2985
3061
|
{
|
|
2986
3062
|
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
2987
3063
|
href: "",
|
|
3064
|
+
"data-testid": "ory/screen/registration/action/selectMethod",
|
|
2988
3065
|
children: intl.formatMessage({
|
|
2989
3066
|
id: "card.footer.select-another-method",
|
|
2990
3067
|
defaultMessage: "Select another method"
|
|
@@ -2999,7 +3076,7 @@ function RegistrationCardFooter() {
|
|
|
2999
3076
|
defaultMessage: "Already have an account?"
|
|
3000
3077
|
}),
|
|
3001
3078
|
" ",
|
|
3002
|
-
/* @__PURE__ */
|
|
3079
|
+
/* @__PURE__ */ jsx35(
|
|
3003
3080
|
"a",
|
|
3004
3081
|
{
|
|
3005
3082
|
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
@@ -3034,20 +3111,20 @@ function ConsentCardFooter({ flow }) {
|
|
|
3034
3111
|
"Make sure you trust ",
|
|
3035
3112
|
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
3036
3113
|
] }),
|
|
3037
|
-
/* @__PURE__ */
|
|
3114
|
+
/* @__PURE__ */ jsx35("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
|
|
3038
3115
|
] }),
|
|
3039
|
-
rememberNode && /* @__PURE__ */
|
|
3116
|
+
rememberNode && /* @__PURE__ */ jsx35(
|
|
3040
3117
|
Node2.Checkbox,
|
|
3041
3118
|
{
|
|
3042
3119
|
attributes: rememberNode.attributes,
|
|
3043
3120
|
node: rememberNode
|
|
3044
3121
|
}
|
|
3045
3122
|
),
|
|
3046
|
-
/* @__PURE__ */
|
|
3123
|
+
/* @__PURE__ */ jsx35("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
|
|
3047
3124
|
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
3048
3125
|
).map((n) => {
|
|
3049
3126
|
const attributes = n.attributes;
|
|
3050
|
-
return /* @__PURE__ */
|
|
3127
|
+
return /* @__PURE__ */ jsx35(
|
|
3051
3128
|
Node2.Button,
|
|
3052
3129
|
{
|
|
3053
3130
|
node: n,
|
|
@@ -3314,16 +3391,9 @@ import {
|
|
|
3314
3391
|
FlowType as FlowType12,
|
|
3315
3392
|
isUiNodeInputAttributes as isUiNodeInputAttributes8
|
|
3316
3393
|
} from "@ory/client-fetch";
|
|
3317
|
-
import { useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
import * as React3 from "react";
|
|
3321
|
-
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3322
|
-
var SvgArrowLeft = (props) => {
|
|
3323
|
-
var _a, _b;
|
|
3324
|
-
return /* @__PURE__ */ jsx35("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx35("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
3325
|
-
};
|
|
3326
|
-
var arrow_left_default = SvgArrowLeft;
|
|
3394
|
+
import { useOryConfiguration as useOryConfiguration3, useOryFlow as useOryFlow4 } from "@ory/elements-react";
|
|
3395
|
+
import { useEffect as useEffect3, useState as useState4 } from "react";
|
|
3396
|
+
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
3327
3397
|
|
|
3328
3398
|
// src/theme/default/utils/attributes.ts
|
|
3329
3399
|
function omit(obj, keys) {
|
|
@@ -3334,13 +3404,46 @@ function omit(obj, keys) {
|
|
|
3334
3404
|
return ret;
|
|
3335
3405
|
}
|
|
3336
3406
|
|
|
3407
|
+
// src/util/omitAttributes.ts
|
|
3408
|
+
function omitInputAttributes({
|
|
3409
|
+
...attrs
|
|
3410
|
+
}) {
|
|
3411
|
+
return omit(attrs, [
|
|
3412
|
+
"autocomplete",
|
|
3413
|
+
"label",
|
|
3414
|
+
"node_type",
|
|
3415
|
+
"maxlength",
|
|
3416
|
+
"onclick",
|
|
3417
|
+
"onclickTrigger",
|
|
3418
|
+
"onload",
|
|
3419
|
+
"onloadTrigger"
|
|
3420
|
+
]);
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3423
|
+
// src/theme/default/assets/icons/arrow-left.svg
|
|
3424
|
+
import * as React3 from "react";
|
|
3425
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
3426
|
+
var SvgArrowLeft = (props) => {
|
|
3427
|
+
var _a, _b;
|
|
3428
|
+
return /* @__PURE__ */ jsx36("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx36("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12.325h14m-14 0 6 6m-6-6 6-6" }) });
|
|
3429
|
+
};
|
|
3430
|
+
var arrow_left_default = SvgArrowLeft;
|
|
3431
|
+
|
|
3337
3432
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
3338
|
-
import {
|
|
3339
|
-
import { jsx as jsx36, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3433
|
+
import { jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3340
3434
|
function DefaultCurrentIdentifierButton() {
|
|
3341
|
-
|
|
3342
|
-
const {
|
|
3435
|
+
var _a;
|
|
3436
|
+
const { flow, flowType, formState } = useOryFlow4();
|
|
3437
|
+
const { setValue, getValues, watch } = useFormContext12();
|
|
3438
|
+
const [turnstileResponse, setTurnstileResponse] = useState4();
|
|
3439
|
+
const config = useOryConfiguration3();
|
|
3343
3440
|
const ui = flow.ui;
|
|
3441
|
+
const captchaVerificationValue = (_a = watch("transient_payload")) == null ? void 0 : _a.captcha_turnstile_response;
|
|
3442
|
+
useEffect3(() => {
|
|
3443
|
+
if (captchaVerificationValue) {
|
|
3444
|
+
setTurnstileResponse(captchaVerificationValue);
|
|
3445
|
+
}
|
|
3446
|
+
}, [captchaVerificationValue]);
|
|
3344
3447
|
if (formState.current === "provide_identifier") {
|
|
3345
3448
|
return null;
|
|
3346
3449
|
}
|
|
@@ -3355,11 +3458,6 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3355
3458
|
flow,
|
|
3356
3459
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
3357
3460
|
);
|
|
3358
|
-
const attributes = omit(nodeBackButton, [
|
|
3359
|
-
"autocomplete",
|
|
3360
|
-
"node_type",
|
|
3361
|
-
"maxlength"
|
|
3362
|
-
]);
|
|
3363
3461
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
3364
3462
|
if (screenSelectionNode) {
|
|
3365
3463
|
return /* @__PURE__ */ jsxs16("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
@@ -3370,21 +3468,25 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3370
3468
|
return false;
|
|
3371
3469
|
}).map((n) => {
|
|
3372
3470
|
const attrs = n.attributes;
|
|
3373
|
-
|
|
3471
|
+
let value = getValues(attrs.name) || attrs.value;
|
|
3472
|
+
if (attrs.name === "transient_payload.captcha_turnstile_response" && turnstileResponse) {
|
|
3473
|
+
value = turnstileResponse;
|
|
3474
|
+
}
|
|
3475
|
+
return /* @__PURE__ */ jsx37(
|
|
3374
3476
|
"input",
|
|
3375
3477
|
{
|
|
3376
3478
|
type: "hidden",
|
|
3377
3479
|
name: attrs.name,
|
|
3378
|
-
value
|
|
3480
|
+
value
|
|
3379
3481
|
},
|
|
3380
3482
|
attrs.name
|
|
3381
3483
|
);
|
|
3382
3484
|
}),
|
|
3383
|
-
/* @__PURE__ */
|
|
3485
|
+
/* @__PURE__ */ jsx37(
|
|
3384
3486
|
"button",
|
|
3385
3487
|
{
|
|
3386
3488
|
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",
|
|
3387
|
-
...
|
|
3489
|
+
...omitInputAttributes(nodeBackButton),
|
|
3388
3490
|
type: "submit",
|
|
3389
3491
|
onClick: () => {
|
|
3390
3492
|
setValue(
|
|
@@ -3398,7 +3500,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3398
3500
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3399
3501
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3400
3502
|
children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3401
|
-
/* @__PURE__ */
|
|
3503
|
+
/* @__PURE__ */ jsx37(
|
|
3402
3504
|
arrow_left_default,
|
|
3403
3505
|
{
|
|
3404
3506
|
size: 16,
|
|
@@ -3406,22 +3508,22 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3406
3508
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3407
3509
|
}
|
|
3408
3510
|
),
|
|
3409
|
-
/* @__PURE__ */
|
|
3511
|
+
/* @__PURE__ */ jsx37("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
3410
3512
|
] })
|
|
3411
3513
|
}
|
|
3412
3514
|
)
|
|
3413
3515
|
] });
|
|
3414
3516
|
}
|
|
3415
|
-
return /* @__PURE__ */
|
|
3517
|
+
return /* @__PURE__ */ jsx37(
|
|
3416
3518
|
"a",
|
|
3417
3519
|
{
|
|
3418
3520
|
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",
|
|
3419
|
-
...
|
|
3521
|
+
...omitInputAttributes(nodeBackButton),
|
|
3420
3522
|
href: initFlowUrl2,
|
|
3421
3523
|
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
3422
3524
|
"data-testid": `ory/screen/${flowType}/action/restart`,
|
|
3423
3525
|
children: /* @__PURE__ */ jsxs16("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
3424
|
-
/* @__PURE__ */
|
|
3526
|
+
/* @__PURE__ */ jsx37(
|
|
3425
3527
|
arrow_left_default,
|
|
3426
3528
|
{
|
|
3427
3529
|
size: 16,
|
|
@@ -3429,7 +3531,7 @@ function DefaultCurrentIdentifierButton() {
|
|
|
3429
3531
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
3430
3532
|
}
|
|
3431
3533
|
),
|
|
3432
|
-
/* @__PURE__ */
|
|
3534
|
+
/* @__PURE__ */ jsx37("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
3433
3535
|
] })
|
|
3434
3536
|
}
|
|
3435
3537
|
);
|
|
@@ -3471,7 +3573,7 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
3471
3573
|
}
|
|
3472
3574
|
|
|
3473
3575
|
// src/theme/default/components/card/header.tsx
|
|
3474
|
-
import { jsx as
|
|
3576
|
+
import { jsx as jsx38, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3475
3577
|
function InnerCardHeader({
|
|
3476
3578
|
title,
|
|
3477
3579
|
text,
|
|
@@ -3479,10 +3581,10 @@ function InnerCardHeader({
|
|
|
3479
3581
|
}) {
|
|
3480
3582
|
const { Card } = useComponents4();
|
|
3481
3583
|
return /* @__PURE__ */ jsxs17("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
3482
|
-
/* @__PURE__ */
|
|
3584
|
+
/* @__PURE__ */ jsx38(Card.Logo, {}),
|
|
3483
3585
|
/* @__PURE__ */ jsxs17("div", { className: "flex flex-col gap-2", children: [
|
|
3484
|
-
/* @__PURE__ */
|
|
3485
|
-
/* @__PURE__ */
|
|
3586
|
+
/* @__PURE__ */ jsx38("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: title }),
|
|
3587
|
+
/* @__PURE__ */ jsx38(
|
|
3486
3588
|
"p",
|
|
3487
3589
|
{
|
|
3488
3590
|
className: "leading-normal text-interface-foreground-default-secondary",
|
|
@@ -3490,7 +3592,7 @@ function InnerCardHeader({
|
|
|
3490
3592
|
children: text
|
|
3491
3593
|
}
|
|
3492
3594
|
),
|
|
3493
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsx38(DefaultCurrentIdentifierButton, {})
|
|
3494
3596
|
] })
|
|
3495
3597
|
] });
|
|
3496
3598
|
}
|
|
@@ -3500,44 +3602,40 @@ function DefaultCardHeader() {
|
|
|
3500
3602
|
context.flow.ui,
|
|
3501
3603
|
context
|
|
3502
3604
|
);
|
|
3503
|
-
return /* @__PURE__ */
|
|
3605
|
+
return /* @__PURE__ */ jsx38(InnerCardHeader, { title, text: description, messageId });
|
|
3504
3606
|
}
|
|
3505
3607
|
|
|
3506
3608
|
// src/theme/default/components/card/logo.tsx
|
|
3507
|
-
import {
|
|
3508
|
-
import { jsx as
|
|
3609
|
+
import { useOryConfiguration as useOryConfiguration4 } from "@ory/elements-react";
|
|
3610
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
3509
3611
|
function DefaultCardLogo() {
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
return /* @__PURE__ */ jsx38(
|
|
3612
|
+
const config = useOryConfiguration4();
|
|
3613
|
+
if (config.project.logo_light_url) {
|
|
3614
|
+
return /* @__PURE__ */ jsx39(
|
|
3514
3615
|
"img",
|
|
3515
3616
|
{
|
|
3516
|
-
src:
|
|
3617
|
+
src: config.project.logo_light_url,
|
|
3517
3618
|
width: 100,
|
|
3518
3619
|
height: 36,
|
|
3519
3620
|
alt: "Logo"
|
|
3520
3621
|
}
|
|
3521
3622
|
);
|
|
3522
3623
|
}
|
|
3523
|
-
|
|
3524
|
-
return /* @__PURE__ */ jsx38("img", { src: flow.config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
3525
|
-
}
|
|
3526
|
-
return /* @__PURE__ */ jsx38("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = flow.config.project.name) != null ? _a : flow.config.name });
|
|
3624
|
+
return /* @__PURE__ */ jsx39("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.project.name });
|
|
3527
3625
|
}
|
|
3528
3626
|
|
|
3529
3627
|
// src/theme/default/components/card/layout.tsx
|
|
3530
|
-
import { jsx as
|
|
3628
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3531
3629
|
function DefaultCardLayout({ children }) {
|
|
3532
|
-
return /* @__PURE__ */
|
|
3630
|
+
return /* @__PURE__ */ jsx40("main", { className: "p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen", children });
|
|
3533
3631
|
}
|
|
3534
3632
|
|
|
3535
3633
|
// src/theme/default/components/card/index.tsx
|
|
3536
|
-
import { jsx as
|
|
3634
|
+
import { jsx as jsx41, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3537
3635
|
function DefaultCard({ children }) {
|
|
3538
|
-
return /* @__PURE__ */
|
|
3636
|
+
return /* @__PURE__ */ jsx41("div", { className: "flex flex-1 sm:items-center justify-center font-sans items-start w-full sm:w-[480px] sm:max-w-[480px]", children: /* @__PURE__ */ jsxs18("div", { className: "relative grid grid-cols-1 gap-8 sm:rounded-cards sm:border border-form-border-default bg-form-background-default px-8 py-12 sm:px-12 sm:py-14 border-b w-full", children: [
|
|
3539
3637
|
children,
|
|
3540
|
-
/* @__PURE__ */
|
|
3638
|
+
/* @__PURE__ */ jsx41(Badge, {})
|
|
3541
3639
|
] }) });
|
|
3542
3640
|
}
|
|
3543
3641
|
|
|
@@ -3553,61 +3651,61 @@ import { useIntl as useIntl12 } from "react-intl";
|
|
|
3553
3651
|
import {
|
|
3554
3652
|
messageTestId as messageTestId2,
|
|
3555
3653
|
uiTextToFormattedMessage as uiTextToFormattedMessage3,
|
|
3556
|
-
useOryFlow as
|
|
3654
|
+
useOryFlow as useOryFlow7
|
|
3557
3655
|
} from "@ory/elements-react";
|
|
3558
3656
|
import { FlowType as FlowType13 } from "@ory/client-fetch";
|
|
3559
3657
|
|
|
3560
3658
|
// src/theme/default/components/form/social.tsx
|
|
3561
3659
|
import {
|
|
3562
3660
|
uiTextToFormattedMessage as uiTextToFormattedMessage2,
|
|
3563
|
-
useOryFlow as
|
|
3661
|
+
useOryFlow as useOryFlow6
|
|
3564
3662
|
} from "@ory/elements-react";
|
|
3565
|
-
import { useEffect as
|
|
3663
|
+
import { useEffect as useEffect4 } from "react";
|
|
3566
3664
|
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
3567
3665
|
import { useIntl as useIntl11 } from "react-intl";
|
|
3568
3666
|
import { useDebounceValue } from "usehooks-ts";
|
|
3569
3667
|
|
|
3570
3668
|
// src/theme/default/provider-logos/apple.svg
|
|
3571
3669
|
import * as React4 from "react";
|
|
3572
|
-
import { jsx as
|
|
3670
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3573
3671
|
var SvgApple = (props) => {
|
|
3574
3672
|
var _a, _b;
|
|
3575
|
-
return /* @__PURE__ */
|
|
3673
|
+
return /* @__PURE__ */ jsx42("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx42("path", { fill: "#283544", d: "M27.734 11.55c-.134.078-3.317 1.724-3.317 5.374.15 4.162 4.017 5.621 4.083 5.621-.066.078-.584 1.988-2.116 3.991C25.167 28.261 23.817 30 21.767 30c-1.95 0-2.65-1.15-4.9-1.15-2.416 0-3.1 1.15-4.95 1.15-2.05 0-3.5-1.832-4.782-3.541-1.667-2.236-3.083-5.746-3.133-9.116-.034-1.786.334-3.54 1.266-5.032 1.317-2.081 3.667-3.494 6.233-3.54 1.966-.063 3.716 1.257 4.916 1.257 1.15 0 3.3-1.258 5.733-1.258 1.05.001 3.85.296 5.584 2.78M16.25 8.414c-.35-1.631.616-3.262 1.516-4.302C18.917 2.854 20.734 2 22.3 2c.1 1.63-.534 3.23-1.666 4.395-1.017 1.258-2.767 2.205-4.383 2.019" }) });
|
|
3576
3674
|
};
|
|
3577
3675
|
var apple_default = SvgApple;
|
|
3578
3676
|
|
|
3579
3677
|
// src/theme/default/provider-logos/auth0.svg
|
|
3580
3678
|
import * as React5 from "react";
|
|
3581
|
-
import { jsx as
|
|
3679
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3582
3680
|
var SvgAuth0 = (props) => {
|
|
3583
3681
|
var _a, _b;
|
|
3584
|
-
return /* @__PURE__ */
|
|
3682
|
+
return /* @__PURE__ */ jsx43("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 64 64", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx43("path", { fill: "#eb5424", d: "M49.012 51.774 42.514 32l17.008-12.22h-21.02L32.005 0h21.032l6.506 19.78c3.767 11.468-.118 24.52-10.53 31.993zm-34.023 0L31.998 64l17.015-12.226-17.008-12.22zm-10.516-32c-3.976 12.1.64 24.917 10.5 32.007v-.007L21.482 32 4.474 19.774l21.025.007L31.998 0H10.972z" }) });
|
|
3585
3683
|
};
|
|
3586
3684
|
var auth0_default = SvgAuth0;
|
|
3587
3685
|
|
|
3588
3686
|
// src/theme/default/provider-logos/discord.svg
|
|
3589
3687
|
import * as React6 from "react";
|
|
3590
|
-
import { jsx as
|
|
3688
|
+
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3591
3689
|
var SvgDiscord = (props) => {
|
|
3592
3690
|
var _a, _b;
|
|
3593
3691
|
return /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
/* @__PURE__ */
|
|
3692
|
+
/* @__PURE__ */ jsx44("path", { d: "M2 11.6c0-3.36 0-5.04.654-6.324a6 6 0 0 1 2.622-2.622C6.56 2 8.24 2 11.6 2h8.8c3.36 0 5.04 0 6.324.654a6 6 0 0 1 2.622 2.622C30 6.56 30 8.24 30 11.6v8.8c0 3.36 0 5.04-.654 6.324a6 6 0 0 1-2.622 2.622C25.44 30 23.76 30 20.4 30h-8.8c-3.36 0-5.04 0-6.324-.654a6 6 0 0 1-2.622-2.622C2 25.44 2 23.76 2 20.4z" }),
|
|
3693
|
+
/* @__PURE__ */ jsx44("path", { fill: "#5865F2", d: "M23.636 9.34A18.8 18.8 0 0 0 19.097 8c-.195.332-.424.779-.581 1.134a17.7 17.7 0 0 0-5.03 0A12 12 0 0 0 12.897 8a18.7 18.7 0 0 0-4.542 1.343c-2.872 4.078-3.65 8.055-3.262 11.975a18.6 18.6 0 0 0 5.567 2.68c.448-.58.848-1.195 1.192-1.844a12 12 0 0 1-1.877-.859 9 9 0 0 0 .46-.342c3.62 1.59 7.553 1.59 11.13 0q.225.178.46.342c-.595.337-1.225.626-1.88.86q.516.974 1.191 1.845a18.6 18.6 0 0 0 5.57-2.682c.457-4.544-.78-8.484-3.27-11.978m-11.29 9.567c-1.087 0-1.978-.953-1.978-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116.002 1.16-.872 2.113-1.978 2.113m7.308 0c-1.086 0-1.977-.953-1.977-2.113s.872-2.116 1.977-2.116c1.106 0 1.997.953 1.978 2.116 0 1.16-.872 2.113-1.978 2.113" })
|
|
3596
3694
|
] });
|
|
3597
3695
|
};
|
|
3598
3696
|
var discord_default = SvgDiscord;
|
|
3599
3697
|
|
|
3600
3698
|
// src/theme/default/provider-logos/facebook.svg
|
|
3601
3699
|
import * as React7 from "react";
|
|
3602
|
-
import { jsx as
|
|
3700
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3603
3701
|
var SvgFacebook = (props) => {
|
|
3604
3702
|
var _a, _b;
|
|
3605
3703
|
return /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
/* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
/* @__PURE__ */
|
|
3704
|
+
/* @__PURE__ */ jsx45("circle", { cx: 16, cy: 16, r: 14, fill: "url(#facebook_svg__a)" }),
|
|
3705
|
+
/* @__PURE__ */ jsx45("path", { fill: "#fff", d: "m21.214 20.282.622-3.952h-3.89v-2.563c0-1.081.542-2.136 2.284-2.136H22V8.267S20.395 8 18.86 8c-3.205 0-5.298 1.893-5.298 5.318v3.012H10v3.952h3.562v9.552q1.073.165 2.191.166 1.12 0 2.192-.166v-9.552z" }),
|
|
3706
|
+
/* @__PURE__ */ jsx45("defs", { children: /* @__PURE__ */ jsxs20("linearGradient", { id: "facebook_svg__a", x1: 16, x2: 16, y1: 2, y2: 29.917, gradientUnits: "userSpaceOnUse", children: [
|
|
3707
|
+
/* @__PURE__ */ jsx45("stop", { stopColor: "#18ACFE" }),
|
|
3708
|
+
/* @__PURE__ */ jsx45("stop", { offset: 1, stopColor: "#0163E0" })
|
|
3611
3709
|
] }) })
|
|
3612
3710
|
] });
|
|
3613
3711
|
};
|
|
@@ -3615,111 +3713,111 @@ var facebook_default = SvgFacebook;
|
|
|
3615
3713
|
|
|
3616
3714
|
// src/theme/default/provider-logos/github.svg
|
|
3617
3715
|
import * as React8 from "react";
|
|
3618
|
-
import { jsx as
|
|
3716
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
3619
3717
|
var SvgGithub = (props) => {
|
|
3620
3718
|
var _a, _b;
|
|
3621
|
-
return /* @__PURE__ */
|
|
3719
|
+
return /* @__PURE__ */ jsx46("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx46("path", { d: "M12 0C5.374 0 0 5.373 0 12c0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23A11.5 11.5 0 0 1 12 5.803c1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576C20.566 21.797 24 17.3 24 12c0-6.627-5.373-12-12-12" }) });
|
|
3622
3720
|
};
|
|
3623
3721
|
var github_default = SvgGithub;
|
|
3624
3722
|
|
|
3625
3723
|
// src/theme/default/provider-logos/gitlab.svg
|
|
3626
3724
|
import * as React9 from "react";
|
|
3627
|
-
import { jsx as
|
|
3725
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3628
3726
|
var SvgGitlab = (props) => {
|
|
3629
3727
|
var _a, _b;
|
|
3630
3728
|
return /* @__PURE__ */ jsxs21("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3631
|
-
/* @__PURE__ */
|
|
3632
|
-
/* @__PURE__ */
|
|
3633
|
-
/* @__PURE__ */
|
|
3634
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ jsx47("path", { fill: "#E24329", d: "m22.708 10.691-.031-.072-3.015-7.167a.74.74 0 0 0-.31-.34.87.87 0 0 0-.923.045.73.73 0 0 0-.268.37L16.125 9.2H7.881L5.845 3.527a.72.72 0 0 0-.268-.371.87.87 0 0 0-.923-.045.74.74 0 0 0-.31.34l-3.021 7.164-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132 2.272 1.567 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.567 4.62-3.151.012-.009c.968-.666 1.671-1.6 2.006-2.661a4.67 4.67 0 0 0-.15-3.226" }),
|
|
3730
|
+
/* @__PURE__ */ jsx47("path", { fill: "#FC6D26", d: "m22.708 10.691-.031-.072a10.7 10.7 0 0 0-4.055 1.66L12 16.839l4.218 2.904 4.621-3.152.012-.008c.969-.666 1.674-1.601 2.008-2.664a4.67 4.67 0 0 0-.15-3.228" }),
|
|
3731
|
+
/* @__PURE__ */ jsx47("path", { fill: "#FCA326", d: "m7.781 19.743 2.273 1.566 1.384.952c.162.112.36.172.563.172s.401-.06.563-.172l1.384-.952 2.273-1.566S14.255 18.389 12 16.839c-2.255 1.55-4.219 2.904-4.219 2.904" }),
|
|
3732
|
+
/* @__PURE__ */ jsx47("path", { fill: "#FC6D26", d: "M5.376 12.279a10.7 10.7 0 0 0-4.053-1.664l-.03.072a4.67 4.67 0 0 0-.153 3.23c.335 1.063 1.04 1.998 2.01 2.664l.01.007.028.018 4.594 3.132L12 16.836z" })
|
|
3635
3733
|
] });
|
|
3636
3734
|
};
|
|
3637
3735
|
var gitlab_default = SvgGitlab;
|
|
3638
3736
|
|
|
3639
3737
|
// src/theme/default/provider-logos/google.svg
|
|
3640
3738
|
import * as React10 from "react";
|
|
3641
|
-
import { jsx as
|
|
3739
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3642
3740
|
var SvgGoogle = (props) => {
|
|
3643
3741
|
var _a, _b;
|
|
3644
3742
|
return /* @__PURE__ */ jsxs22("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3645
|
-
/* @__PURE__ */
|
|
3646
|
-
/* @__PURE__ */
|
|
3647
|
-
/* @__PURE__ */
|
|
3648
|
-
/* @__PURE__ */
|
|
3743
|
+
/* @__PURE__ */ jsx48("path", { fill: "#4285F4", d: "M30.001 16.31c0-1.15-.095-1.99-.301-2.861H16.287v5.195h7.873c-.159 1.291-1.016 3.236-2.92 4.542l-.027.174 4.24 3.22.294.029c2.699-2.443 4.254-6.036 4.254-10.298" }),
|
|
3744
|
+
/* @__PURE__ */ jsx48("path", { fill: "#34A853", d: "M16.286 30c3.857 0 7.095-1.244 9.46-3.391l-4.507-3.423c-1.207.825-2.826 1.4-4.953 1.4A8.58 8.58 0 0 1 8.16 18.77l-.167.014-4.41 3.344-.058.157C5.874 26.858 10.7 30 16.286 30" }),
|
|
3745
|
+
/* @__PURE__ */ jsx48("path", { fill: "#FBBC05", d: "M8.16 18.769a8.5 8.5 0 0 1-.476-2.77c0-.964.174-1.897.46-2.768l-.008-.185-4.465-3.399-.146.068A13.8 13.8 0 0 0 2.001 16c0 2.256.556 4.387 1.524 6.284z" }),
|
|
3746
|
+
/* @__PURE__ */ jsx48("path", { fill: "#EB4335", d: "M16.286 7.413c2.683 0 4.492 1.136 5.524 2.085l4.032-3.858C23.366 3.384 20.143 2 16.286 2 10.7 2 5.874 5.142 3.524 9.715l4.62 3.516c1.158-3.375 4.365-5.818 8.142-5.818" })
|
|
3649
3747
|
] });
|
|
3650
3748
|
};
|
|
3651
3749
|
var google_default = SvgGoogle;
|
|
3652
3750
|
|
|
3653
3751
|
// src/theme/default/provider-logos/linkedin.svg
|
|
3654
3752
|
import * as React11 from "react";
|
|
3655
|
-
import { jsx as
|
|
3753
|
+
import { jsx as jsx49, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3656
3754
|
var SvgLinkedin = (props) => {
|
|
3657
3755
|
var _a, _b;
|
|
3658
3756
|
return /* @__PURE__ */ jsxs23("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3659
|
-
/* @__PURE__ */
|
|
3660
|
-
/* @__PURE__ */
|
|
3757
|
+
/* @__PURE__ */ jsx49("rect", { width: 28, height: 28, x: 2, y: 2, fill: "#1275B1", rx: 14 }),
|
|
3758
|
+
/* @__PURE__ */ jsx49("path", { fill: "#fff", d: "M12.619 9.692c0 .935-.81 1.692-1.81 1.692C9.81 11.384 9 10.627 9 9.692S9.81 8 10.81 8c.999 0 1.809.758 1.809 1.692M9.247 12.628h3.093V22H9.247zM17.32 12.628h-3.093V22h3.093v-4.795c0-1.107.378-2.22 1.886-2.22 1.705 0 1.695 1.45 1.687 2.572-.01 1.467.014 2.965.014 4.443H24v-4.946c-.026-3.159-.85-4.614-3.557-4.614-1.608 0-2.604.73-3.123 1.39z" })
|
|
3661
3759
|
] });
|
|
3662
3760
|
};
|
|
3663
3761
|
var linkedin_default = SvgLinkedin;
|
|
3664
3762
|
|
|
3665
3763
|
// src/theme/default/provider-logos/microsoft.svg
|
|
3666
3764
|
import * as React12 from "react";
|
|
3667
|
-
import { jsx as
|
|
3765
|
+
import { jsx as jsx50, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3668
3766
|
var SvgMicrosoft = (props) => {
|
|
3669
3767
|
var _a, _b;
|
|
3670
3768
|
return /* @__PURE__ */ jsxs24("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 23 23", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3671
|
-
/* @__PURE__ */
|
|
3672
|
-
/* @__PURE__ */
|
|
3673
|
-
/* @__PURE__ */
|
|
3674
|
-
/* @__PURE__ */
|
|
3769
|
+
/* @__PURE__ */ jsx50("path", { fill: "#F35325", d: "M1 1h10v10H1z" }),
|
|
3770
|
+
/* @__PURE__ */ jsx50("path", { fill: "#81BC06", d: "M12 1h10v10H12z" }),
|
|
3771
|
+
/* @__PURE__ */ jsx50("path", { fill: "#05A6F0", d: "M1 12h10v10H1z" }),
|
|
3772
|
+
/* @__PURE__ */ jsx50("path", { fill: "#FFBA08", d: "M12 12h10v10H12z" })
|
|
3675
3773
|
] });
|
|
3676
3774
|
};
|
|
3677
3775
|
var microsoft_default = SvgMicrosoft;
|
|
3678
3776
|
|
|
3679
3777
|
// src/theme/default/provider-logos/slack.svg
|
|
3680
3778
|
import * as React13 from "react";
|
|
3681
|
-
import { jsx as
|
|
3779
|
+
import { jsx as jsx51, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3682
3780
|
var SvgSlack = (props) => {
|
|
3683
3781
|
var _a, _b;
|
|
3684
3782
|
return /* @__PURE__ */ jsxs25("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3685
|
-
/* @__PURE__ */
|
|
3686
|
-
/* @__PURE__ */
|
|
3687
|
-
/* @__PURE__ */
|
|
3688
|
-
/* @__PURE__ */
|
|
3783
|
+
/* @__PURE__ */ jsx51("path", { fill: "#2EB67D", d: "M26.5 15a2.5 2.5 0 1 0-2.5-2.5V15zm-7 0a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-5 0v7a2.5 2.5 0 0 0 2.5 2.5" }),
|
|
3784
|
+
/* @__PURE__ */ jsx51("path", { fill: "#E01E5A", d: "M5.5 17A2.5 2.5 0 1 0 8 19.5V17zm7 0a2.5 2.5 0 0 0-2.5 2.5v7a2.5 2.5 0 0 0 5 0v-7a2.5 2.5 0 0 0-2.5-2.5" }),
|
|
3785
|
+
/* @__PURE__ */ jsx51("path", { fill: "#ECB22E", d: "M17 26.5a2.5 2.5 0 1 0 2.5-2.5H17zm0-7a2.5 2.5 0 0 0 2.5 2.5h7a2.5 2.5 0 0 0 0-5h-7a2.5 2.5 0 0 0-2.5 2.5" }),
|
|
3786
|
+
/* @__PURE__ */ jsx51("path", { fill: "#36C5F0", d: "M15 5.5A2.5 2.5 0 1 0 12.5 8H15zm0 7a2.5 2.5 0 0 0-2.5-2.5h-7a2.5 2.5 0 0 0 0 5h7a2.5 2.5 0 0 0 2.5-2.5" })
|
|
3689
3787
|
] });
|
|
3690
3788
|
};
|
|
3691
3789
|
var slack_default = SvgSlack;
|
|
3692
3790
|
|
|
3693
3791
|
// src/theme/default/provider-logos/spotify.svg
|
|
3694
3792
|
import * as React14 from "react";
|
|
3695
|
-
import { jsx as
|
|
3793
|
+
import { jsx as jsx52, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3696
3794
|
var SvgSpotify = (props) => {
|
|
3697
3795
|
var _a, _b;
|
|
3698
3796
|
return /* @__PURE__ */ jsxs26("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3699
|
-
/* @__PURE__ */
|
|
3700
|
-
/* @__PURE__ */
|
|
3797
|
+
/* @__PURE__ */ jsx52("circle", { cx: 16, cy: 16, r: 14, fill: "#1ED760" }),
|
|
3798
|
+
/* @__PURE__ */ jsx52("path", { fill: "#fff", d: "M22.364 21.623c-.239.38-.75.486-1.148.258-3.141-1.822-7.08-2.232-11.736-1.23-.446.091-.893-.167-.988-.592a.786.786 0 0 1 .621-.94c5.087-1.11 9.456-.639 12.964 1.41a.77.77 0 0 1 .287 1.094m1.627-3.461c-.303.47-.941.607-1.435.334-3.588-2.11-9.058-2.718-13.299-1.488-.558.152-1.132-.137-1.292-.653-.16-.531.144-1.078.702-1.23 4.848-1.396 10.875-.728 15.005 1.686.462.273.622.88.319 1.35m.143-3.613c-4.305-2.43-11.4-2.657-15.515-1.473-.654.197-1.355-.152-1.563-.79-.207-.622.176-1.29.83-1.487 4.72-1.366 12.565-1.093 17.508 1.7.59.334.781 1.063.43 1.625-.334.576-1.1.774-1.69.425" })
|
|
3701
3799
|
] });
|
|
3702
3800
|
};
|
|
3703
3801
|
var spotify_default = SvgSpotify;
|
|
3704
3802
|
|
|
3705
3803
|
// src/theme/default/provider-logos/yandex.svg
|
|
3706
3804
|
import * as React15 from "react";
|
|
3707
|
-
import { jsx as
|
|
3805
|
+
import { jsx as jsx53, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
3708
3806
|
var SvgYandex = (props) => {
|
|
3709
3807
|
var _a, _b;
|
|
3710
3808
|
return /* @__PURE__ */ jsxs27("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: [
|
|
3711
|
-
/* @__PURE__ */
|
|
3712
|
-
/* @__PURE__ */
|
|
3809
|
+
/* @__PURE__ */ jsx53("circle", { cx: 16, cy: 16, r: 14, fill: "#fff" }),
|
|
3810
|
+
/* @__PURE__ */ jsx53("path", { fill: "#FC3F1D", d: "M21 25h-3.143V9.435h-1.402c-2.572 0-3.922 1.294-3.922 3.211 0 2.175.935 3.185 2.857 4.48l1.584 1.063L12.403 25H9l4.104-6.086c-2.363-1.684-3.688-3.316-3.688-6.087C9.416 9.357 11.83 7 16.429 7H21z" })
|
|
3713
3811
|
] });
|
|
3714
3812
|
};
|
|
3715
3813
|
var yandex_default = SvgYandex;
|
|
3716
3814
|
|
|
3717
3815
|
// src/theme/default/provider-logos/x.svg
|
|
3718
3816
|
import * as React16 from "react";
|
|
3719
|
-
import { jsx as
|
|
3817
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
3720
3818
|
var SvgX = (props) => {
|
|
3721
3819
|
var _a, _b;
|
|
3722
|
-
return /* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ jsx54("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx54("path", { fill: "#0F172A", d: "M24.122 3h4.292L18.99 13.73 30 28.285h-8.64l-6.764-8.845-7.744 8.845H2.56l9.983-11.476L2 3h8.854l6.112 8.08zM22.62 25.766h2.379L9.604 5.426H7.048z" }) });
|
|
3723
3821
|
};
|
|
3724
3822
|
var x_default = SvgX;
|
|
3725
3823
|
|
|
@@ -3742,7 +3840,7 @@ var logos = {
|
|
|
3742
3840
|
var provider_logos_default = logos;
|
|
3743
3841
|
|
|
3744
3842
|
// src/theme/default/components/form/spinner.tsx
|
|
3745
|
-
import { jsx as
|
|
3843
|
+
import { jsx as jsx55, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3746
3844
|
function Spinner({ className }) {
|
|
3747
3845
|
return /* @__PURE__ */ jsxs28(
|
|
3748
3846
|
"svg",
|
|
@@ -3757,7 +3855,7 @@ function Spinner({ className }) {
|
|
|
3757
3855
|
fill: "none",
|
|
3758
3856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3759
3857
|
children: [
|
|
3760
|
-
/* @__PURE__ */
|
|
3858
|
+
/* @__PURE__ */ jsx55("g", { clipPath: "url(#clip0_2572_1748)", children: /* @__PURE__ */ jsx55(
|
|
3761
3859
|
"path",
|
|
3762
3860
|
{
|
|
3763
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",
|
|
@@ -3766,7 +3864,7 @@ function Spinner({ className }) {
|
|
|
3766
3864
|
strokeLinejoin: "round"
|
|
3767
3865
|
}
|
|
3768
3866
|
) }),
|
|
3769
|
-
/* @__PURE__ */
|
|
3867
|
+
/* @__PURE__ */ jsx55("defs", { children: /* @__PURE__ */ jsx55("clipPath", { id: "clip0_2572_1748", children: /* @__PURE__ */ jsx55(
|
|
3770
3868
|
"rect",
|
|
3771
3869
|
{
|
|
3772
3870
|
width: "24",
|
|
@@ -3782,25 +3880,7 @@ function Spinner({ className }) {
|
|
|
3782
3880
|
|
|
3783
3881
|
// src/theme/default/components/form/social.tsx
|
|
3784
3882
|
import { UiNodeGroupEnum as UiNodeGroupEnum16 } from "@ory/client-fetch";
|
|
3785
|
-
|
|
3786
|
-
// src/util/omitAttributes.ts
|
|
3787
|
-
function omitInputAttributes({
|
|
3788
|
-
...attrs
|
|
3789
|
-
}) {
|
|
3790
|
-
return omit(attrs, [
|
|
3791
|
-
"autocomplete",
|
|
3792
|
-
"label",
|
|
3793
|
-
"node_type",
|
|
3794
|
-
"maxlength",
|
|
3795
|
-
"onclick",
|
|
3796
|
-
"onclickTrigger",
|
|
3797
|
-
"onload",
|
|
3798
|
-
"onloadTrigger"
|
|
3799
|
-
]);
|
|
3800
|
-
}
|
|
3801
|
-
|
|
3802
|
-
// src/theme/default/components/form/social.tsx
|
|
3803
|
-
import { Fragment as Fragment9, jsx as jsx55, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3883
|
+
import { Fragment as Fragment9, jsx as jsx56, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3804
3884
|
function extractProvider(context) {
|
|
3805
3885
|
if (context && typeof context === "object" && "provider" in context && typeof context.provider === "string") {
|
|
3806
3886
|
return context.provider;
|
|
@@ -3819,7 +3899,7 @@ function DefaultButtonSocial({
|
|
|
3819
3899
|
const { type: _ignoredType, name: _ignoredName, ...rest } = attributes;
|
|
3820
3900
|
const {
|
|
3821
3901
|
flow: { ui }
|
|
3822
|
-
} =
|
|
3902
|
+
} = useOryFlow6();
|
|
3823
3903
|
const [clicked, setClicked] = useDebounceValue(false, 100);
|
|
3824
3904
|
const intl = useIntl11();
|
|
3825
3905
|
const {
|
|
@@ -3835,7 +3915,7 @@ function DefaultButtonSocial({
|
|
|
3835
3915
|
onClick == null ? void 0 : onClick();
|
|
3836
3916
|
setClicked(true);
|
|
3837
3917
|
};
|
|
3838
|
-
|
|
3918
|
+
useEffect4(() => {
|
|
3839
3919
|
if (!isSubmitting) {
|
|
3840
3920
|
setClicked(false);
|
|
3841
3921
|
}
|
|
@@ -3855,21 +3935,21 @@ function DefaultButtonSocial({
|
|
|
3855
3935
|
"aria-label": label,
|
|
3856
3936
|
...omitInputAttributes(rest),
|
|
3857
3937
|
children: [
|
|
3858
|
-
/* @__PURE__ */
|
|
3938
|
+
/* @__PURE__ */ jsx56("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx56(Logo, { size: 20 }) : /* @__PURE__ */ jsx56(GenericLogo, { label: provider.slice(0, 1) }) : /* @__PURE__ */ jsx56(Spinner, { className: "size-5" }) }),
|
|
3859
3939
|
showLabel && node.meta.label ? /* @__PURE__ */ jsxs29(Fragment9, { children: [
|
|
3860
|
-
/* @__PURE__ */
|
|
3861
|
-
/* @__PURE__ */
|
|
3940
|
+
/* @__PURE__ */ jsx56("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
3941
|
+
/* @__PURE__ */ jsx56("span", { className: "size-5 block" })
|
|
3862
3942
|
] }) : null
|
|
3863
3943
|
]
|
|
3864
3944
|
}
|
|
3865
3945
|
);
|
|
3866
3946
|
}
|
|
3867
|
-
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */
|
|
3947
|
+
DefaultButtonSocial.WithLogos = (logos2) => (props) => /* @__PURE__ */ jsx56(DefaultButtonSocial, { ...props, logos: logos2 });
|
|
3868
3948
|
function DefaultSocialButtonContainer({
|
|
3869
3949
|
children,
|
|
3870
3950
|
nodes
|
|
3871
3951
|
}) {
|
|
3872
|
-
return /* @__PURE__ */
|
|
3952
|
+
return /* @__PURE__ */ jsx56(
|
|
3873
3953
|
"div",
|
|
3874
3954
|
{
|
|
3875
3955
|
className: cn("grid gap-3", {
|
|
@@ -3883,11 +3963,11 @@ function DefaultSocialButtonContainer({
|
|
|
3883
3963
|
);
|
|
3884
3964
|
}
|
|
3885
3965
|
function GenericLogo({ label }) {
|
|
3886
|
-
return /* @__PURE__ */
|
|
3966
|
+
return /* @__PURE__ */ jsx56("span", { className: "flex rounded-buttons bg-button-social-background-generic-provider text-button-social-foreground-generic-provider border-button-social-border-generic-provider text-xs size-full items-center justify-center", children: label });
|
|
3887
3967
|
}
|
|
3888
3968
|
|
|
3889
3969
|
// src/theme/default/components/form/index.tsx
|
|
3890
|
-
import { jsx as
|
|
3970
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
3891
3971
|
function DefaultFormContainer({
|
|
3892
3972
|
children,
|
|
3893
3973
|
onSubmit,
|
|
@@ -3895,7 +3975,7 @@ function DefaultFormContainer({
|
|
|
3895
3975
|
method,
|
|
3896
3976
|
"data-testid": dataTestId
|
|
3897
3977
|
}) {
|
|
3898
|
-
return /* @__PURE__ */
|
|
3978
|
+
return /* @__PURE__ */ jsx57(
|
|
3899
3979
|
"form",
|
|
3900
3980
|
{
|
|
3901
3981
|
"data-testid": dataTestId,
|
|
@@ -3909,11 +3989,11 @@ function DefaultFormContainer({
|
|
|
3909
3989
|
);
|
|
3910
3990
|
}
|
|
3911
3991
|
function DefaultMessageContainer({ children }) {
|
|
3912
|
-
const { flowType } =
|
|
3992
|
+
const { flowType } = useOryFlow7();
|
|
3913
3993
|
if (!children || Array.isArray(children) && children.length === 0) {
|
|
3914
3994
|
return null;
|
|
3915
3995
|
}
|
|
3916
|
-
return /* @__PURE__ */
|
|
3996
|
+
return /* @__PURE__ */ jsx57(
|
|
3917
3997
|
"section",
|
|
3918
3998
|
{
|
|
3919
3999
|
className: cn(
|
|
@@ -3925,7 +4005,7 @@ function DefaultMessageContainer({ children }) {
|
|
|
3925
4005
|
}
|
|
3926
4006
|
function DefaultMessage({ message }) {
|
|
3927
4007
|
const intl = useIntl12();
|
|
3928
|
-
return /* @__PURE__ */
|
|
4008
|
+
return /* @__PURE__ */ jsx57(
|
|
3929
4009
|
"span",
|
|
3930
4010
|
{
|
|
3931
4011
|
className: cn(
|
|
@@ -3945,60 +4025,60 @@ import { useIntl as useIntl13 } from "react-intl";
|
|
|
3945
4025
|
|
|
3946
4026
|
// src/theme/default/assets/icons/code.svg
|
|
3947
4027
|
import * as React17 from "react";
|
|
3948
|
-
import { jsx as
|
|
4028
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3949
4029
|
var SvgCode = (props) => {
|
|
3950
4030
|
var _a, _b;
|
|
3951
|
-
return /* @__PURE__ */
|
|
4031
|
+
return /* @__PURE__ */ jsx58("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 15 13", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx58("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6.333 10.666h-4A1.333 1.333 0 0 1 1 9.333V2.666m0 0a1.333 1.333 0 0 1 1.333-1.333h9.334A1.333 1.333 0 0 1 13 2.666m-12 0 6 4 6-4m0 0v4M12.333 12l1.334-1.334-1.334-1.333m-2 0L9 10.666 10.333 12" }) });
|
|
3952
4032
|
};
|
|
3953
4033
|
var code_default = SvgCode;
|
|
3954
4034
|
|
|
3955
4035
|
// src/theme/default/assets/icons/passkey.svg
|
|
3956
4036
|
import * as React18 from "react";
|
|
3957
|
-
import { jsx as
|
|
4037
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
3958
4038
|
var SvgPasskey = (props) => {
|
|
3959
4039
|
var _a, _b;
|
|
3960
|
-
return /* @__PURE__ */
|
|
4040
|
+
return /* @__PURE__ */ jsx59("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 13 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx59("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.602 3.667c.603 1 .86 2.171.733 3.333v.667a4 4 0 0 0 .533 2M3.335 6.333a2.667 2.667 0 0 1 5.333 0V7c0 1.442.468 2.846 1.334 4m-4-4.667v1.334A9.33 9.33 0 0 0 7.668 13M3.335 9a12 12 0 0 0 1.2 4m-3.267-1.333A14.7 14.7 0 0 1 .668 7v-.667a5.333 5.333 0 0 1 8-4.633" }) });
|
|
3961
4041
|
};
|
|
3962
4042
|
var passkey_default = SvgPasskey;
|
|
3963
4043
|
|
|
3964
4044
|
// src/theme/default/assets/icons/password.svg
|
|
3965
4045
|
import * as React19 from "react";
|
|
3966
|
-
import { jsx as
|
|
4046
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3967
4047
|
var SvgPassword = (props) => {
|
|
3968
4048
|
var _a, _b;
|
|
3969
|
-
return /* @__PURE__ */
|
|
4049
|
+
return /* @__PURE__ */ jsx60("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 4", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx60("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M7 .667v2.667m-1.333-.667 2.666-1.333m-2.666 0 2.666 1.333m-6-2v2.667M1 2.667l2.667-1.333M1 1.334l2.667 1.333m8-2v2.667m-1.334-.667L13 1.334m-2.667 0L13 2.667" }) });
|
|
3970
4050
|
};
|
|
3971
4051
|
var password_default = SvgPassword;
|
|
3972
4052
|
|
|
3973
4053
|
// src/theme/default/assets/icons/webauthn.svg
|
|
3974
4054
|
import * as React20 from "react";
|
|
3975
|
-
import { jsx as
|
|
4055
|
+
import { jsx as jsx61 } from "react/jsx-runtime";
|
|
3976
4056
|
var SvgWebauthn = (props) => {
|
|
3977
4057
|
var _a, _b;
|
|
3978
|
-
return /* @__PURE__ */
|
|
4058
|
+
return /* @__PURE__ */ jsx61("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 14 14", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx61("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5h.007m1.03-3.438 2.401 2.401a1.92 1.92 0 0 1 0 2.713l-1.762 1.762a1.92 1.92 0 0 1-2.713 0l-.2-.2-4.372 4.371a1.33 1.33 0 0 1-.826.386L2.448 13h-.781a.667.667 0 0 1-.662-.589L1 12.333v-.781c0-.313.11-.616.311-.856l.08-.087.276-.276H3V9h1.333V7.667l1.43-1.43-.201-.2a1.92 1.92 0 0 1 0-2.713l1.762-1.762a1.92 1.92 0 0 1 2.713 0" }) });
|
|
3979
4059
|
};
|
|
3980
4060
|
var webauthn_default = SvgWebauthn;
|
|
3981
4061
|
|
|
3982
4062
|
// src/theme/default/assets/icons/totp.svg
|
|
3983
4063
|
import * as React21 from "react";
|
|
3984
|
-
import { jsx as
|
|
4064
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
3985
4065
|
var SvgTotp = (props) => {
|
|
3986
4066
|
var _a, _b;
|
|
3987
|
-
return /* @__PURE__ */
|
|
4067
|
+
return /* @__PURE__ */ jsx62("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx62("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
3988
4068
|
};
|
|
3989
4069
|
var totp_default = SvgTotp;
|
|
3990
4070
|
|
|
3991
4071
|
// src/theme/default/assets/icons/code-asterix.svg
|
|
3992
4072
|
import * as React22 from "react";
|
|
3993
|
-
import { jsx as
|
|
4073
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3994
4074
|
var SvgCodeAsterix = (props) => {
|
|
3995
4075
|
var _a, _b;
|
|
3996
|
-
return /* @__PURE__ */
|
|
4076
|
+
return /* @__PURE__ */ jsx63("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx63("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 19.325a2 2 0 0 1-2-2v-4l-1-1 1-1v-4a2 2 0 0 1 2-2m6 6.875 3-1.687M12 12.2v3.375m0-3.375-3-1.687m3 1.687 3 1.688M12 12.2V8.825m0 3.375-3 1.688m9 5.437a2 2 0 0 0 2-2v-4l1-1-1-1v-4a2 2 0 0 0-2-2" }) });
|
|
3997
4077
|
};
|
|
3998
4078
|
var code_asterix_default = SvgCodeAsterix;
|
|
3999
4079
|
|
|
4000
4080
|
// src/theme/default/components/card/list-item.tsx
|
|
4001
|
-
import { jsx as
|
|
4081
|
+
import { jsx as jsx64, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4002
4082
|
function ListItem({
|
|
4003
4083
|
icon: Icon,
|
|
4004
4084
|
as,
|
|
@@ -4018,10 +4098,10 @@ function ListItem({
|
|
|
4018
4098
|
className
|
|
4019
4099
|
),
|
|
4020
4100
|
children: [
|
|
4021
|
-
/* @__PURE__ */
|
|
4101
|
+
/* @__PURE__ */ jsx64("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx64(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
4022
4102
|
/* @__PURE__ */ jsxs30("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
4023
|
-
/* @__PURE__ */
|
|
4024
|
-
/* @__PURE__ */
|
|
4103
|
+
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
4104
|
+
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
4025
4105
|
] }),
|
|
4026
4106
|
children
|
|
4027
4107
|
]
|
|
@@ -4030,7 +4110,7 @@ function ListItem({
|
|
|
4030
4110
|
}
|
|
4031
4111
|
|
|
4032
4112
|
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
4033
|
-
import { jsx as
|
|
4113
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
4034
4114
|
var iconsMap = {
|
|
4035
4115
|
code: code_default,
|
|
4036
4116
|
passkey: passkey_default,
|
|
@@ -4049,7 +4129,7 @@ function DefaultAuthMethodListItem({
|
|
|
4049
4129
|
var _a;
|
|
4050
4130
|
const intl = useIntl13();
|
|
4051
4131
|
const Icon = iconsMap[group] || null;
|
|
4052
|
-
return /* @__PURE__ */
|
|
4132
|
+
return /* @__PURE__ */ jsx65(
|
|
4053
4133
|
ListItem,
|
|
4054
4134
|
{
|
|
4055
4135
|
as: "button",
|
|
@@ -4076,8 +4156,8 @@ import {
|
|
|
4076
4156
|
import { cva } from "class-variance-authority";
|
|
4077
4157
|
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
4078
4158
|
import { useIntl as useIntl14 } from "react-intl";
|
|
4079
|
-
import { useEffect as
|
|
4080
|
-
import { jsx as
|
|
4159
|
+
import { useEffect as useEffect5, useState as useState5 } from "react";
|
|
4160
|
+
import { jsx as jsx66, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4081
4161
|
var buttonStyles = cva(
|
|
4082
4162
|
[
|
|
4083
4163
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -4117,14 +4197,14 @@ var DefaultButton = ({
|
|
|
4117
4197
|
}) => {
|
|
4118
4198
|
var _a;
|
|
4119
4199
|
const { type, name, value, ...rest } = attributes;
|
|
4120
|
-
const [clicked, setClicked] =
|
|
4200
|
+
const [clicked, setClicked] = useState5(false);
|
|
4121
4201
|
const intl = useIntl14();
|
|
4122
4202
|
const label = getNodeLabel(node);
|
|
4123
4203
|
const {
|
|
4124
4204
|
formState: { isSubmitting },
|
|
4125
4205
|
setValue
|
|
4126
4206
|
} = useFormContext14();
|
|
4127
|
-
|
|
4207
|
+
useEffect5(() => {
|
|
4128
4208
|
if (!isSubmitting) {
|
|
4129
4209
|
setClicked(false);
|
|
4130
4210
|
}
|
|
@@ -4150,8 +4230,8 @@ var DefaultButton = ({
|
|
|
4150
4230
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
4151
4231
|
"data-loading": clicked,
|
|
4152
4232
|
children: [
|
|
4153
|
-
clicked ? /* @__PURE__ */
|
|
4154
|
-
label ? /* @__PURE__ */
|
|
4233
|
+
clicked ? /* @__PURE__ */ jsx66(Spinner, {}) : null,
|
|
4234
|
+
label ? /* @__PURE__ */ jsx66("span", { children: uiTextToFormattedMessage4(label, intl) }) : ""
|
|
4155
4235
|
]
|
|
4156
4236
|
}
|
|
4157
4237
|
);
|
|
@@ -4169,7 +4249,7 @@ import { useIntl as useIntl16 } from "react-intl";
|
|
|
4169
4249
|
|
|
4170
4250
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
4171
4251
|
import { useIntl as useIntl15 } from "react-intl";
|
|
4172
|
-
import { Fragment as Fragment10, jsx as
|
|
4252
|
+
import { Fragment as Fragment10, jsx as jsx67 } from "react/jsx-runtime";
|
|
4173
4253
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
4174
4254
|
function computeLabelElements(labelText) {
|
|
4175
4255
|
const elements = [];
|
|
@@ -4185,7 +4265,7 @@ function computeLabelElements(labelText) {
|
|
|
4185
4265
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
4186
4266
|
}
|
|
4187
4267
|
elements.push(
|
|
4188
|
-
/* @__PURE__ */
|
|
4268
|
+
/* @__PURE__ */ jsx67(
|
|
4189
4269
|
"a",
|
|
4190
4270
|
{
|
|
4191
4271
|
href: url,
|
|
@@ -4210,13 +4290,13 @@ function CheckboxLabel({ label }) {
|
|
|
4210
4290
|
return null;
|
|
4211
4291
|
}
|
|
4212
4292
|
const labelText = uiTextToFormattedMessage(label, intl);
|
|
4213
|
-
return /* @__PURE__ */
|
|
4293
|
+
return /* @__PURE__ */ jsx67(Fragment10, { children: computeLabelElements(labelText) });
|
|
4214
4294
|
}
|
|
4215
4295
|
|
|
4216
4296
|
// src/theme/default/components/form/checkbox.tsx
|
|
4217
|
-
import { jsx as
|
|
4297
|
+
import { jsx as jsx68, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4218
4298
|
function CheckboxSVG() {
|
|
4219
|
-
return /* @__PURE__ */
|
|
4299
|
+
return /* @__PURE__ */ jsx68(
|
|
4220
4300
|
"svg",
|
|
4221
4301
|
{
|
|
4222
4302
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -4225,7 +4305,7 @@ function CheckboxSVG() {
|
|
|
4225
4305
|
height: "16",
|
|
4226
4306
|
viewBox: "0 0 16 16",
|
|
4227
4307
|
fill: "none",
|
|
4228
|
-
children: /* @__PURE__ */
|
|
4308
|
+
children: /* @__PURE__ */ jsx68(
|
|
4229
4309
|
"path",
|
|
4230
4310
|
{
|
|
4231
4311
|
fillRule: "evenodd",
|
|
@@ -4247,7 +4327,7 @@ var DefaultCheckbox = ({
|
|
|
4247
4327
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
4248
4328
|
return /* @__PURE__ */ jsxs32("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
4249
4329
|
/* @__PURE__ */ jsxs32("span", { className: "flex h-5 items-center", children: [
|
|
4250
|
-
/* @__PURE__ */
|
|
4330
|
+
/* @__PURE__ */ jsx68(
|
|
4251
4331
|
"input",
|
|
4252
4332
|
{
|
|
4253
4333
|
...omitInputAttributes(attributes),
|
|
@@ -4257,14 +4337,15 @@ var DefaultCheckbox = ({
|
|
|
4257
4337
|
"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",
|
|
4258
4338
|
hasError && "border-interface-border-validation-danger"
|
|
4259
4339
|
),
|
|
4340
|
+
"data-testid": `ory/form/node/input/${name}`,
|
|
4260
4341
|
...register(name)
|
|
4261
4342
|
}
|
|
4262
4343
|
),
|
|
4263
|
-
/* @__PURE__ */
|
|
4344
|
+
/* @__PURE__ */ jsx68(CheckboxSVG, {})
|
|
4264
4345
|
] }),
|
|
4265
4346
|
/* @__PURE__ */ jsxs32("span", { className: "flex flex-col", children: [
|
|
4266
|
-
/* @__PURE__ */
|
|
4267
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
4347
|
+
/* @__PURE__ */ jsx68("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx68(CheckboxLabel, { label }) }),
|
|
4348
|
+
node.messages.map((message) => /* @__PURE__ */ jsx68(
|
|
4268
4349
|
"span",
|
|
4269
4350
|
{
|
|
4270
4351
|
className: cn(
|
|
@@ -4281,7 +4362,7 @@ var DefaultCheckbox = ({
|
|
|
4281
4362
|
};
|
|
4282
4363
|
|
|
4283
4364
|
// src/theme/default/components/form/group-container.tsx
|
|
4284
|
-
import { useOryFlow as
|
|
4365
|
+
import { useOryFlow as useOryFlow8 } from "@ory/elements-react";
|
|
4285
4366
|
import { FlowType as FlowType14 } from "@ory/client-fetch";
|
|
4286
4367
|
|
|
4287
4368
|
// src/util/childCounter.ts
|
|
@@ -4296,14 +4377,14 @@ function countRenderableChildren(children) {
|
|
|
4296
4377
|
}
|
|
4297
4378
|
|
|
4298
4379
|
// src/theme/default/components/form/group-container.tsx
|
|
4299
|
-
import { jsx as
|
|
4380
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4300
4381
|
function DefaultGroupContainer({ children }) {
|
|
4301
|
-
const { flowType } =
|
|
4382
|
+
const { flowType } = useOryFlow8();
|
|
4302
4383
|
const count = countRenderableChildren(children);
|
|
4303
4384
|
if (count === 0) {
|
|
4304
4385
|
return null;
|
|
4305
4386
|
}
|
|
4306
|
-
return /* @__PURE__ */
|
|
4387
|
+
return /* @__PURE__ */ jsx69(
|
|
4307
4388
|
"div",
|
|
4308
4389
|
{
|
|
4309
4390
|
className: cn(
|
|
@@ -4316,16 +4397,16 @@ function DefaultGroupContainer({ children }) {
|
|
|
4316
4397
|
}
|
|
4317
4398
|
|
|
4318
4399
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
4319
|
-
import { jsx as
|
|
4400
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
4320
4401
|
function DefaultHorizontalDivider() {
|
|
4321
|
-
return /* @__PURE__ */
|
|
4402
|
+
return /* @__PURE__ */ jsx70("hr", { className: "border-interface-border-default-primary" });
|
|
4322
4403
|
}
|
|
4323
4404
|
|
|
4324
4405
|
// src/theme/default/components/form/image.tsx
|
|
4325
|
-
import { jsx as
|
|
4406
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
4326
4407
|
function DefaultImage({ attributes, node }) {
|
|
4327
4408
|
var _a;
|
|
4328
|
-
return /* @__PURE__ */
|
|
4409
|
+
return /* @__PURE__ */ jsx71("figure", { children: /* @__PURE__ */ jsx71(
|
|
4329
4410
|
"img",
|
|
4330
4411
|
{
|
|
4331
4412
|
...omitInputAttributes(attributes),
|
|
@@ -4338,35 +4419,35 @@ function DefaultImage({ attributes, node }) {
|
|
|
4338
4419
|
import { FlowType as FlowType15, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
|
|
4339
4420
|
import {
|
|
4340
4421
|
uiTextToFormattedMessage as uiTextToFormattedMessage6,
|
|
4341
|
-
useOryFlow as
|
|
4422
|
+
useOryFlow as useOryFlow9
|
|
4342
4423
|
} from "@ory/elements-react";
|
|
4343
|
-
import { useRef as
|
|
4424
|
+
import { useRef as useRef3, useState as useState6 } from "react";
|
|
4344
4425
|
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
4345
4426
|
import { useIntl as useIntl17 } from "react-intl";
|
|
4346
4427
|
|
|
4347
4428
|
// src/theme/default/assets/icons/eye-off.svg
|
|
4348
4429
|
import * as React23 from "react";
|
|
4349
|
-
import { jsx as
|
|
4430
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
4350
4431
|
var SvgEyeOff = (props) => {
|
|
4351
4432
|
var _a, _b;
|
|
4352
|
-
return /* @__PURE__ */
|
|
4433
|
+
return /* @__PURE__ */ jsx72("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx72("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
|
|
4353
4434
|
};
|
|
4354
4435
|
var eye_off_default = SvgEyeOff;
|
|
4355
4436
|
|
|
4356
4437
|
// src/theme/default/assets/icons/eye.svg
|
|
4357
4438
|
import * as React24 from "react";
|
|
4358
|
-
import { jsx as
|
|
4439
|
+
import { jsx as jsx73, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
4359
4440
|
var SvgEye = (props) => {
|
|
4360
4441
|
var _a, _b;
|
|
4361
|
-
return /* @__PURE__ */
|
|
4362
|
-
/* @__PURE__ */
|
|
4363
|
-
/* @__PURE__ */
|
|
4442
|
+
return /* @__PURE__ */ jsx73("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs33("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4443
|
+
/* @__PURE__ */ jsx73("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
4444
|
+
/* @__PURE__ */ jsx73("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
4364
4445
|
] }) });
|
|
4365
4446
|
};
|
|
4366
4447
|
var eye_default = SvgEye;
|
|
4367
4448
|
|
|
4368
4449
|
// src/theme/default/components/form/input.tsx
|
|
4369
|
-
import { jsx as
|
|
4450
|
+
import { jsx as jsx74, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
4370
4451
|
var defaultInputClassName = cn(
|
|
4371
4452
|
"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",
|
|
4372
4453
|
"bg-input-background-default border-input-border-default text-input-foreground-primary",
|
|
@@ -4384,8 +4465,8 @@ var DefaultInput = ({
|
|
|
4384
4465
|
const { register } = useFormContext16();
|
|
4385
4466
|
const { value, autocomplete, name, maxlength, ...rest } = attributes;
|
|
4386
4467
|
const intl = useIntl17();
|
|
4387
|
-
const { flowType } =
|
|
4388
|
-
const inputRef =
|
|
4468
|
+
const { flowType } = useOryFlow9();
|
|
4469
|
+
const inputRef = useRef3(null);
|
|
4389
4470
|
const formattedLabel = label ? intl.formatMessage(
|
|
4390
4471
|
{
|
|
4391
4472
|
id: "input.placeholder",
|
|
@@ -4396,10 +4477,10 @@ var DefaultInput = ({
|
|
|
4396
4477
|
}
|
|
4397
4478
|
) : "";
|
|
4398
4479
|
if (rest.type === "hidden") {
|
|
4399
|
-
return /* @__PURE__ */
|
|
4480
|
+
return /* @__PURE__ */ jsx74(
|
|
4400
4481
|
"input",
|
|
4401
4482
|
{
|
|
4402
|
-
...rest,
|
|
4483
|
+
...omitInputAttributes(rest),
|
|
4403
4484
|
onClick,
|
|
4404
4485
|
maxLength: maxlength,
|
|
4405
4486
|
autoComplete: autocomplete,
|
|
@@ -4419,7 +4500,7 @@ var DefaultInput = ({
|
|
|
4419
4500
|
flowType === FlowType15.Settings && "max-w-[488px]"
|
|
4420
4501
|
),
|
|
4421
4502
|
children: [
|
|
4422
|
-
/* @__PURE__ */
|
|
4503
|
+
/* @__PURE__ */ jsx74(
|
|
4423
4504
|
"input",
|
|
4424
4505
|
{
|
|
4425
4506
|
...omitInputAttributes(rest),
|
|
@@ -4436,7 +4517,7 @@ var DefaultInput = ({
|
|
|
4436
4517
|
...restRegister
|
|
4437
4518
|
}
|
|
4438
4519
|
),
|
|
4439
|
-
rest.type === "password" && /* @__PURE__ */
|
|
4520
|
+
rest.type === "password" && /* @__PURE__ */ jsx74(PasswordToggle, { inputRef })
|
|
4440
4521
|
]
|
|
4441
4522
|
}
|
|
4442
4523
|
);
|
|
@@ -4444,21 +4525,21 @@ var DefaultInput = ({
|
|
|
4444
4525
|
function PasswordToggle({
|
|
4445
4526
|
inputRef
|
|
4446
4527
|
}) {
|
|
4447
|
-
const [shown, setShown] =
|
|
4528
|
+
const [shown, setShown] = useState6(false);
|
|
4448
4529
|
const handleClick = () => {
|
|
4449
4530
|
setShown(!shown);
|
|
4450
4531
|
if (inputRef.current) {
|
|
4451
4532
|
inputRef.current.type = shown ? "password" : "text";
|
|
4452
4533
|
}
|
|
4453
4534
|
};
|
|
4454
|
-
return /* @__PURE__ */
|
|
4535
|
+
return /* @__PURE__ */ jsx74(
|
|
4455
4536
|
"button",
|
|
4456
4537
|
{
|
|
4457
4538
|
onClick: handleClick,
|
|
4458
4539
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
4459
4540
|
type: "button",
|
|
4460
4541
|
"aria-label": "Toggle password visibility",
|
|
4461
|
-
children: shown ? /* @__PURE__ */
|
|
4542
|
+
children: shown ? /* @__PURE__ */ jsx74(eye_off_default, {}) : /* @__PURE__ */ jsx74(eye_default, {})
|
|
4462
4543
|
}
|
|
4463
4544
|
);
|
|
4464
4545
|
}
|
|
@@ -4473,11 +4554,12 @@ import {
|
|
|
4473
4554
|
messageTestId as messageTestId4,
|
|
4474
4555
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
4475
4556
|
useComponents as useComponents5,
|
|
4476
|
-
|
|
4557
|
+
useOryConfiguration as useOryConfiguration5,
|
|
4558
|
+
useOryFlow as useOryFlow10
|
|
4477
4559
|
} from "@ory/elements-react";
|
|
4478
4560
|
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
4479
4561
|
import { useIntl as useIntl18 } from "react-intl";
|
|
4480
|
-
import { jsx as
|
|
4562
|
+
import { jsx as jsx75, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
4481
4563
|
function findResendNode(nodes) {
|
|
4482
4564
|
return nodes.find(
|
|
4483
4565
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -4492,7 +4574,8 @@ function DefaultLabel({
|
|
|
4492
4574
|
const intl = useIntl18();
|
|
4493
4575
|
const label = getNodeLabel4(node);
|
|
4494
4576
|
const { Message } = useComponents5();
|
|
4495
|
-
const {
|
|
4577
|
+
const { flowType, flow } = useOryFlow10();
|
|
4578
|
+
const config = useOryConfiguration5();
|
|
4496
4579
|
const { setValue, formState } = useFormContext17();
|
|
4497
4580
|
const isPassword = attributes.type === "password";
|
|
4498
4581
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
@@ -4504,7 +4587,7 @@ function DefaultLabel({
|
|
|
4504
4587
|
const fieldError = formState.errors[attributes.name];
|
|
4505
4588
|
return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
4506
4589
|
label && /* @__PURE__ */ jsxs35("span", { className: "inline-flex justify-between", children: [
|
|
4507
|
-
/* @__PURE__ */
|
|
4590
|
+
/* @__PURE__ */ jsx75(
|
|
4508
4591
|
"label",
|
|
4509
4592
|
{
|
|
4510
4593
|
...messageTestId4(label),
|
|
@@ -4516,7 +4599,7 @@ function DefaultLabel({
|
|
|
4516
4599
|
}
|
|
4517
4600
|
),
|
|
4518
4601
|
isPassword && config.project.recovery_enabled && flowType === FlowType16.Login && // TODO: make it possible to override with a custom component
|
|
4519
|
-
/* @__PURE__ */
|
|
4602
|
+
/* @__PURE__ */ jsx75(
|
|
4520
4603
|
"a",
|
|
4521
4604
|
{
|
|
4522
4605
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -4527,7 +4610,7 @@ function DefaultLabel({
|
|
|
4527
4610
|
})
|
|
4528
4611
|
}
|
|
4529
4612
|
),
|
|
4530
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */
|
|
4613
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx75(
|
|
4531
4614
|
"button",
|
|
4532
4615
|
{
|
|
4533
4616
|
type: "submit",
|
|
@@ -4540,8 +4623,8 @@ function DefaultLabel({
|
|
|
4540
4623
|
)
|
|
4541
4624
|
] }),
|
|
4542
4625
|
children,
|
|
4543
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
4544
|
-
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */
|
|
4626
|
+
node.messages.map((message) => /* @__PURE__ */ jsx75(Message.Content, { message }, message.id)),
|
|
4627
|
+
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx75(Message.Content, { message: fieldError })
|
|
4545
4628
|
] });
|
|
4546
4629
|
}
|
|
4547
4630
|
|
|
@@ -4552,11 +4635,11 @@ import {
|
|
|
4552
4635
|
} from "@ory/elements-react";
|
|
4553
4636
|
import { forwardRef } from "react";
|
|
4554
4637
|
import { useIntl as useIntl19 } from "react-intl";
|
|
4555
|
-
import { jsx as
|
|
4638
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
4556
4639
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
4557
4640
|
const intl = useIntl19();
|
|
4558
4641
|
const label = getNodeLabel5(node);
|
|
4559
|
-
return /* @__PURE__ */
|
|
4642
|
+
return /* @__PURE__ */ jsx76(
|
|
4560
4643
|
"a",
|
|
4561
4644
|
{
|
|
4562
4645
|
...omitInputAttributes(attributes),
|
|
@@ -4578,8 +4661,8 @@ import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
|
4578
4661
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
4579
4662
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
4580
4663
|
import * as React25 from "react";
|
|
4581
|
-
import { jsx as
|
|
4582
|
-
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
4664
|
+
import { jsx as jsx77, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
4665
|
+
var InputOTP = React25.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx77(
|
|
4583
4666
|
OTPInput,
|
|
4584
4667
|
{
|
|
4585
4668
|
ref,
|
|
@@ -4592,7 +4675,7 @@ var InputOTP = React25.forwardRef(({ className, containerClassName, ...props },
|
|
|
4592
4675
|
}
|
|
4593
4676
|
));
|
|
4594
4677
|
InputOTP.displayName = "InputOTP";
|
|
4595
|
-
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
4678
|
+
var InputOTPGroup = React25.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx77("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
4596
4679
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
4597
4680
|
var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
4598
4681
|
const inputOTPContext = React25.useContext(OTPInputContext);
|
|
@@ -4609,8 +4692,8 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4609
4692
|
),
|
|
4610
4693
|
...props,
|
|
4611
4694
|
children: [
|
|
4612
|
-
/* @__PURE__ */
|
|
4613
|
-
hasFakeCaret && /* @__PURE__ */
|
|
4695
|
+
/* @__PURE__ */ jsx77("span", { className: "inline-block size-4", children: char }),
|
|
4696
|
+
hasFakeCaret && /* @__PURE__ */ jsx77("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx77("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
4614
4697
|
]
|
|
4615
4698
|
}
|
|
4616
4699
|
);
|
|
@@ -4618,26 +4701,26 @@ var InputOTPSlot = React25.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
4618
4701
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
4619
4702
|
|
|
4620
4703
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
4621
|
-
import { useOryFlow as
|
|
4704
|
+
import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
|
|
4622
4705
|
import { FlowType as FlowType17 } from "@ory/client-fetch";
|
|
4623
|
-
import { jsx as
|
|
4706
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
4624
4707
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
4625
4708
|
const { setValue, watch } = useFormContext18();
|
|
4626
4709
|
const { maxlength, name } = attributes;
|
|
4627
4710
|
const elements = maxlength != null ? maxlength : 6;
|
|
4628
|
-
const { flowType } =
|
|
4711
|
+
const { flowType } = useOryFlow11();
|
|
4629
4712
|
const handleInputChange = (v) => {
|
|
4630
4713
|
setValue(name, v);
|
|
4631
4714
|
};
|
|
4632
4715
|
const value = watch(name);
|
|
4633
|
-
return /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ jsx78(
|
|
4634
4717
|
InputOTP,
|
|
4635
4718
|
{
|
|
4636
4719
|
maxLength: maxlength != null ? maxlength : 6,
|
|
4637
4720
|
onChange: handleInputChange,
|
|
4638
4721
|
name,
|
|
4639
4722
|
value,
|
|
4640
|
-
children: /* @__PURE__ */
|
|
4723
|
+
children: /* @__PURE__ */ jsx78(
|
|
4641
4724
|
InputOTPGroup,
|
|
4642
4725
|
{
|
|
4643
4726
|
className: cn(
|
|
@@ -4645,7 +4728,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4645
4728
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
4646
4729
|
flowType === FlowType17.Settings && "max-w-[488px]"
|
|
4647
4730
|
),
|
|
4648
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */
|
|
4731
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx78(InputOTPSlot, { index }, index))
|
|
4649
4732
|
}
|
|
4650
4733
|
)
|
|
4651
4734
|
}
|
|
@@ -4653,13 +4736,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
4653
4736
|
};
|
|
4654
4737
|
|
|
4655
4738
|
// src/theme/default/components/form/section.tsx
|
|
4656
|
-
import { jsx as
|
|
4739
|
+
import { jsx as jsx79, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4657
4740
|
var DefaultFormSection = ({
|
|
4658
4741
|
children,
|
|
4659
4742
|
nodes: _nodes,
|
|
4660
4743
|
...rest
|
|
4661
4744
|
}) => {
|
|
4662
|
-
return /* @__PURE__ */
|
|
4745
|
+
return /* @__PURE__ */ jsx79(
|
|
4663
4746
|
"form",
|
|
4664
4747
|
{
|
|
4665
4748
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -4675,8 +4758,8 @@ var DefaultFormSectionContent = ({
|
|
|
4675
4758
|
}) => {
|
|
4676
4759
|
return /* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-8 rounded-t-cards border border-b-0 border-interface-border-default-primary bg-interface-background-default-primary px-6 py-8", children: [
|
|
4677
4760
|
/* @__PURE__ */ jsxs37("div", { className: "flex flex-col gap-2", children: [
|
|
4678
|
-
/* @__PURE__ */
|
|
4679
|
-
/* @__PURE__ */
|
|
4761
|
+
/* @__PURE__ */ jsx79("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
4762
|
+
/* @__PURE__ */ jsx79("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
4680
4763
|
] }),
|
|
4681
4764
|
children
|
|
4682
4765
|
] });
|
|
@@ -4692,7 +4775,7 @@ var DefaultFormSectionFooter = ({
|
|
|
4692
4775
|
"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"
|
|
4693
4776
|
),
|
|
4694
4777
|
children: [
|
|
4695
|
-
/* @__PURE__ */
|
|
4778
|
+
/* @__PURE__ */ jsx79("span", { children: text }),
|
|
4696
4779
|
children
|
|
4697
4780
|
]
|
|
4698
4781
|
}
|
|
@@ -4702,31 +4785,31 @@ var DefaultFormSectionFooter = ({
|
|
|
4702
4785
|
// src/theme/default/components/form/text.tsx
|
|
4703
4786
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
4704
4787
|
import { useIntl as useIntl20 } from "react-intl";
|
|
4705
|
-
import { Fragment as Fragment11, jsx as
|
|
4788
|
+
import { Fragment as Fragment11, jsx as jsx80, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
4706
4789
|
function DefaultText({ node, attributes }) {
|
|
4707
4790
|
var _a;
|
|
4708
4791
|
const intl = useIntl20();
|
|
4709
4792
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
4710
4793
|
if (lookup) {
|
|
4711
4794
|
return /* @__PURE__ */ jsxs38(Fragment11, { children: [
|
|
4712
|
-
/* @__PURE__ */
|
|
4713
|
-
lookup.map((text, index) => /* @__PURE__ */
|
|
4795
|
+
/* @__PURE__ */ jsx80("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
4796
|
+
lookup.map((text, index) => /* @__PURE__ */ jsx80(
|
|
4714
4797
|
"pre",
|
|
4715
4798
|
{
|
|
4716
4799
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
4717
|
-
children: /* @__PURE__ */
|
|
4800
|
+
children: /* @__PURE__ */ jsx80("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
|
|
4718
4801
|
},
|
|
4719
4802
|
index
|
|
4720
4803
|
))
|
|
4721
4804
|
] });
|
|
4722
4805
|
}
|
|
4723
|
-
return /* @__PURE__ */
|
|
4806
|
+
return /* @__PURE__ */ jsx80(Fragment11, { children: /* @__PURE__ */ jsxs38(
|
|
4724
4807
|
"p",
|
|
4725
4808
|
{
|
|
4726
4809
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
4727
4810
|
id: attributes.id,
|
|
4728
4811
|
children: [
|
|
4729
|
-
node.meta.label ? /* @__PURE__ */
|
|
4812
|
+
node.meta.label ? /* @__PURE__ */ jsx80("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
|
|
4730
4813
|
attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
|
|
4731
4814
|
]
|
|
4732
4815
|
}
|
|
@@ -4736,30 +4819,31 @@ function DefaultText({ node, attributes }) {
|
|
|
4736
4819
|
// src/theme/default/components/generic/page-header.tsx
|
|
4737
4820
|
import {
|
|
4738
4821
|
useComponents as useComponents6,
|
|
4739
|
-
|
|
4822
|
+
useOryConfiguration as useOryConfiguration7,
|
|
4823
|
+
useOryFlow as useOryFlow12
|
|
4740
4824
|
} from "@ory/elements-react";
|
|
4741
4825
|
|
|
4742
4826
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4743
|
-
import {
|
|
4827
|
+
import { useOryConfiguration as useOryConfiguration6 } from "@ory/elements-react";
|
|
4744
4828
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
4745
4829
|
|
|
4746
4830
|
// src/theme/default/assets/icons/logout.svg
|
|
4747
4831
|
import * as React26 from "react";
|
|
4748
|
-
import { jsx as
|
|
4832
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
4749
4833
|
var SvgLogout = (props) => {
|
|
4750
4834
|
var _a, _b;
|
|
4751
|
-
return /* @__PURE__ */
|
|
4835
|
+
return /* @__PURE__ */ jsx81("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx81("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 5.334V4A1.333 1.333 0 0 0 8 2.667H3.333A1.333 1.333 0 0 0 2 4v8a1.333 1.333 0 0 0 1.333 1.334H8A1.333 1.333 0 0 0 9.333 12v-1.333M4.667 8H14m0 0-2-2m2 2-2 2" }) });
|
|
4752
4836
|
};
|
|
4753
4837
|
var logout_default = SvgLogout;
|
|
4754
4838
|
|
|
4755
4839
|
// src/theme/default/assets/icons/settings.svg
|
|
4756
4840
|
import * as React27 from "react";
|
|
4757
|
-
import { jsx as
|
|
4841
|
+
import { jsx as jsx82, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
4758
4842
|
var SvgSettings = (props) => {
|
|
4759
4843
|
var _a, _b;
|
|
4760
|
-
return /* @__PURE__ */
|
|
4761
|
-
/* @__PURE__ */
|
|
4762
|
-
/* @__PURE__ */
|
|
4844
|
+
return /* @__PURE__ */ jsx82("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsxs39("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
4845
|
+
/* @__PURE__ */ jsx82("path", { d: "M6.883 2.878c.284-1.17 1.95-1.17 2.234 0a1.15 1.15 0 0 0 1.715.71c1.029-.626 2.207.551 1.58 1.58a1.148 1.148 0 0 0 .71 1.715c1.17.284 1.17 1.95 0 2.234a1.15 1.15 0 0 0-.71 1.715c.626 1.029-.551 2.207-1.58 1.58a1.148 1.148 0 0 0-1.715.71c-.284 1.17-1.95 1.17-2.234 0a1.15 1.15 0 0 0-1.715-.71c-1.029.626-2.207-.551-1.58-1.58a1.15 1.15 0 0 0-.71-1.715c-1.17-.284-1.17-1.95 0-2.234a1.15 1.15 0 0 0 .71-1.715c-.626-1.029.551-2.207 1.58-1.58.667.405 1.531.047 1.715-.71" }),
|
|
4846
|
+
/* @__PURE__ */ jsx82("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
4763
4847
|
] }) });
|
|
4764
4848
|
};
|
|
4765
4849
|
var settings_default = SvgSettings;
|
|
@@ -4806,10 +4890,10 @@ var getUserInitials = (session) => {
|
|
|
4806
4890
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
4807
4891
|
import { forwardRef as forwardRef3 } from "react";
|
|
4808
4892
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4809
|
-
import { jsx as
|
|
4893
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4810
4894
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
4811
4895
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
4812
|
-
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */
|
|
4896
|
+
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx83(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx83(
|
|
4813
4897
|
DropdownMenuPrimitive.Content,
|
|
4814
4898
|
{
|
|
4815
4899
|
ref,
|
|
@@ -4824,7 +4908,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
|
|
|
4824
4908
|
}
|
|
4825
4909
|
) }));
|
|
4826
4910
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
4827
|
-
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
4911
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx83(
|
|
4828
4912
|
DropdownMenuPrimitive.Item,
|
|
4829
4913
|
{
|
|
4830
4914
|
ref,
|
|
@@ -4842,7 +4926,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
|
|
|
4842
4926
|
}
|
|
4843
4927
|
));
|
|
4844
4928
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
4845
|
-
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
4929
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx83(
|
|
4846
4930
|
DropdownMenuPrimitive.Label,
|
|
4847
4931
|
{
|
|
4848
4932
|
ref,
|
|
@@ -4861,31 +4945,31 @@ import { forwardRef as forwardRef4 } from "react";
|
|
|
4861
4945
|
|
|
4862
4946
|
// src/theme/default/assets/icons/user.svg
|
|
4863
4947
|
import * as React28 from "react";
|
|
4864
|
-
import { jsx as
|
|
4948
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
4865
4949
|
var SvgUser = (props) => {
|
|
4866
4950
|
var _a, _b;
|
|
4867
|
-
return /* @__PURE__ */
|
|
4951
|
+
return /* @__PURE__ */ jsx84("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx84("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M6 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2M8 7a4 4 0 1 0 8 0 4 4 0 0 0-8 0" }) });
|
|
4868
4952
|
};
|
|
4869
4953
|
var user_default = SvgUser;
|
|
4870
4954
|
|
|
4871
4955
|
// src/theme/default/components/ui/user-avater.tsx
|
|
4872
|
-
import { jsx as
|
|
4956
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
4873
4957
|
var UserAvatar = forwardRef4(
|
|
4874
4958
|
({ initials, ...rest }, ref) => {
|
|
4875
|
-
return /* @__PURE__ */
|
|
4959
|
+
return /* @__PURE__ */ jsx85(
|
|
4876
4960
|
"button",
|
|
4877
4961
|
{
|
|
4878
4962
|
ref,
|
|
4879
4963
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
4880
4964
|
...rest,
|
|
4881
|
-
children: /* @__PURE__ */
|
|
4965
|
+
children: /* @__PURE__ */ jsx85("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx85(
|
|
4882
4966
|
"img",
|
|
4883
4967
|
{
|
|
4884
4968
|
src: initials.avatar,
|
|
4885
4969
|
alt: initials.primary,
|
|
4886
4970
|
className: "w-full object-contain"
|
|
4887
4971
|
}
|
|
4888
|
-
) : /* @__PURE__ */
|
|
4972
|
+
) : /* @__PURE__ */ jsx85(
|
|
4889
4973
|
user_default,
|
|
4890
4974
|
{
|
|
4891
4975
|
size: 24,
|
|
@@ -4899,27 +4983,27 @@ var UserAvatar = forwardRef4(
|
|
|
4899
4983
|
UserAvatar.displayName = "UserAvatar";
|
|
4900
4984
|
|
|
4901
4985
|
// src/theme/default/components/ui/user-menu.tsx
|
|
4902
|
-
import { jsx as
|
|
4986
|
+
import { jsx as jsx86, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
4903
4987
|
var UserMenu = ({ session }) => {
|
|
4904
|
-
const
|
|
4988
|
+
const config = useOryConfiguration6();
|
|
4905
4989
|
const initials = getUserInitials(session);
|
|
4906
4990
|
const { logoutFlow } = useClientLogout(config);
|
|
4907
4991
|
return /* @__PURE__ */ jsxs40(DropdownMenu, { children: [
|
|
4908
|
-
/* @__PURE__ */
|
|
4992
|
+
/* @__PURE__ */ jsx86(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx86(UserAvatar, { initials, title: "User Menu" }) }),
|
|
4909
4993
|
/* @__PURE__ */ jsxs40(DropdownMenuContent, { children: [
|
|
4910
4994
|
/* @__PURE__ */ jsxs40(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
4911
|
-
/* @__PURE__ */
|
|
4995
|
+
/* @__PURE__ */ jsx86(UserAvatar, { disabled: true, initials }),
|
|
4912
4996
|
/* @__PURE__ */ jsxs40("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
4913
|
-
/* @__PURE__ */
|
|
4914
|
-
initials.secondary && /* @__PURE__ */
|
|
4997
|
+
/* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
4998
|
+
initials.secondary && /* @__PURE__ */ jsx86("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
4915
4999
|
] })
|
|
4916
5000
|
] }),
|
|
4917
|
-
/* @__PURE__ */
|
|
4918
|
-
/* @__PURE__ */
|
|
5001
|
+
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs40("a", { href: "/settings", children: [
|
|
5002
|
+
/* @__PURE__ */ jsx86(settings_default, { size: 16 }),
|
|
4919
5003
|
" User settings"
|
|
4920
5004
|
] }) }),
|
|
4921
|
-
/* @__PURE__ */
|
|
4922
|
-
/* @__PURE__ */
|
|
5005
|
+
/* @__PURE__ */ jsx86(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs40("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
5006
|
+
/* @__PURE__ */ jsx86(logout_default, { size: 16 }),
|
|
4923
5007
|
" Logout"
|
|
4924
5008
|
] }) })
|
|
4925
5009
|
] })
|
|
@@ -4929,27 +5013,28 @@ var UserMenu = ({ session }) => {
|
|
|
4929
5013
|
// src/theme/default/components/generic/page-header.tsx
|
|
4930
5014
|
import { useSession } from "@ory/elements-react/client";
|
|
4931
5015
|
import { useIntl as useIntl21 } from "react-intl";
|
|
4932
|
-
import { jsx as
|
|
5016
|
+
import { jsx as jsx87, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
4933
5017
|
var DefaultPageHeader = (_props) => {
|
|
4934
5018
|
var _a;
|
|
4935
5019
|
const { Card } = useComponents6();
|
|
4936
5020
|
const { session } = useSession();
|
|
4937
5021
|
const intl = useIntl21();
|
|
4938
|
-
const {
|
|
5022
|
+
const { flow } = useOryFlow12();
|
|
5023
|
+
const config = useOryConfiguration7();
|
|
4939
5024
|
const returnUrl = (_a = flow.return_to) != null ? _a : config.project.default_redirect_url;
|
|
4940
|
-
return /* @__PURE__ */
|
|
5025
|
+
return /* @__PURE__ */ jsx87("div", { className: "mt-16 flex max-w-screen-sm w-full md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] flex-col gap-3 px-4", children: /* @__PURE__ */ jsxs41("div", { className: "flex flex-col gap-12", children: [
|
|
4941
5026
|
/* @__PURE__ */ jsxs41("div", { className: "flex max-h-10 flex-1 justify-between gap-2 items-center", children: [
|
|
4942
|
-
/* @__PURE__ */
|
|
4943
|
-
/* @__PURE__ */
|
|
5027
|
+
/* @__PURE__ */ jsx87(Card.Logo, {}),
|
|
5028
|
+
/* @__PURE__ */ jsx87(UserMenu, { session })
|
|
4944
5029
|
] }),
|
|
4945
|
-
returnUrl && /* @__PURE__ */
|
|
5030
|
+
returnUrl && /* @__PURE__ */ jsx87("div", { children: /* @__PURE__ */ jsxs41(
|
|
4946
5031
|
"a",
|
|
4947
5032
|
{
|
|
4948
5033
|
"data-testid": "ory/screen/settings/back-button",
|
|
4949
5034
|
href: returnUrl,
|
|
4950
5035
|
className: "inline-flex gap-2 items-center",
|
|
4951
5036
|
children: [
|
|
4952
|
-
/* @__PURE__ */
|
|
5037
|
+
/* @__PURE__ */ jsx87(arrow_left_default, {}),
|
|
4953
5038
|
" ",
|
|
4954
5039
|
intl.formatMessage({
|
|
4955
5040
|
id: "settings.navigation-back-button",
|
|
@@ -4962,21 +5047,21 @@ var DefaultPageHeader = (_props) => {
|
|
|
4962
5047
|
};
|
|
4963
5048
|
|
|
4964
5049
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4965
|
-
import { useEffect as
|
|
5050
|
+
import { useEffect as useEffect6 } from "react";
|
|
4966
5051
|
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
4967
5052
|
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
4968
5053
|
|
|
4969
5054
|
// src/theme/default/assets/icons/trash.svg
|
|
4970
5055
|
import * as React29 from "react";
|
|
4971
|
-
import { jsx as
|
|
5056
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
4972
5057
|
var SvgTrash = (props) => {
|
|
4973
5058
|
var _a, _b;
|
|
4974
|
-
return /* @__PURE__ */
|
|
5059
|
+
return /* @__PURE__ */ jsx88("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx88("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 7h16m-10 4v6m4-6v6M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2l1-12M9 7V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v3" }) });
|
|
4975
5060
|
};
|
|
4976
5061
|
var trash_default = SvgTrash;
|
|
4977
5062
|
|
|
4978
5063
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
4979
|
-
import { jsx as
|
|
5064
|
+
import { jsx as jsx89, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
4980
5065
|
function DefaultSettingsOidc({
|
|
4981
5066
|
linkButtons,
|
|
4982
5067
|
unlinkButtons
|
|
@@ -4984,9 +5069,9 @@ function DefaultSettingsOidc({
|
|
|
4984
5069
|
const hasLinkButtons = linkButtons.length > 0;
|
|
4985
5070
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
4986
5071
|
return /* @__PURE__ */ jsxs42("div", { className: "flex flex-col gap-8", children: [
|
|
4987
|
-
hasLinkButtons && /* @__PURE__ */
|
|
5072
|
+
hasLinkButtons && /* @__PURE__ */ jsx89("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
4988
5073
|
const attrs = button.attributes;
|
|
4989
|
-
return /* @__PURE__ */
|
|
5074
|
+
return /* @__PURE__ */ jsx89(
|
|
4990
5075
|
DefaultButtonSocial,
|
|
4991
5076
|
{
|
|
4992
5077
|
showLabel: true,
|
|
@@ -4997,12 +5082,12 @@ function DefaultSettingsOidc({
|
|
|
4997
5082
|
attrs.value
|
|
4998
5083
|
);
|
|
4999
5084
|
}) }),
|
|
5000
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */
|
|
5085
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx89(DefaultHorizontalDivider, {}) : null,
|
|
5001
5086
|
unlinkButtons.map((button) => {
|
|
5002
5087
|
if (button.attributes.node_type !== "input") {
|
|
5003
5088
|
return null;
|
|
5004
5089
|
}
|
|
5005
|
-
return /* @__PURE__ */
|
|
5090
|
+
return /* @__PURE__ */ jsx89(UnlinkRow, { button }, button.attributes.value);
|
|
5006
5091
|
})
|
|
5007
5092
|
] });
|
|
5008
5093
|
}
|
|
@@ -5019,7 +5104,7 @@ function UnlinkRow({ button }) {
|
|
|
5019
5104
|
button.onClick();
|
|
5020
5105
|
setClicked(true);
|
|
5021
5106
|
};
|
|
5022
|
-
|
|
5107
|
+
useEffect6(() => {
|
|
5023
5108
|
if (!isSubmitting) {
|
|
5024
5109
|
setClicked(false);
|
|
5025
5110
|
}
|
|
@@ -5027,10 +5112,10 @@ function UnlinkRow({ button }) {
|
|
|
5027
5112
|
console.log((_c = button.meta.label) == null ? void 0 : _c.context);
|
|
5028
5113
|
return /* @__PURE__ */ jsxs42("div", { className: "flex justify-between", children: [
|
|
5029
5114
|
/* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-6", children: [
|
|
5030
|
-
Logo ? /* @__PURE__ */
|
|
5031
|
-
/* @__PURE__ */
|
|
5115
|
+
Logo ? /* @__PURE__ */ jsx89(Logo, { size: 32 }) : /* @__PURE__ */ jsx89(GenericLogo, { label: provider.slice(0, 1) }),
|
|
5116
|
+
/* @__PURE__ */ jsx89("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
5032
5117
|
] }),
|
|
5033
|
-
/* @__PURE__ */
|
|
5118
|
+
/* @__PURE__ */ jsx89(
|
|
5034
5119
|
"button",
|
|
5035
5120
|
{
|
|
5036
5121
|
...omitInputAttributes(attrs),
|
|
@@ -5039,7 +5124,7 @@ function UnlinkRow({ button }) {
|
|
|
5039
5124
|
disabled: isSubmitting,
|
|
5040
5125
|
className: "relative",
|
|
5041
5126
|
title: `Unlink ${provider}`,
|
|
5042
|
-
children: clicked ? /* @__PURE__ */
|
|
5127
|
+
children: clicked ? /* @__PURE__ */ jsx89(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx89(
|
|
5043
5128
|
trash_default,
|
|
5044
5129
|
{
|
|
5045
5130
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5054,7 +5139,7 @@ function UnlinkRow({ button }) {
|
|
|
5054
5139
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
5055
5140
|
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
5056
5141
|
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
5057
|
-
import { jsx as
|
|
5142
|
+
import { jsx as jsx90, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
5058
5143
|
function DefaultSettingsPasskey({
|
|
5059
5144
|
triggerButton,
|
|
5060
5145
|
removeButtons
|
|
@@ -5065,7 +5150,7 @@ function DefaultSettingsPasskey({
|
|
|
5065
5150
|
const { Node: Node2 } = useComponents7();
|
|
5066
5151
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5067
5152
|
return /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
|
|
5068
|
-
/* @__PURE__ */
|
|
5153
|
+
/* @__PURE__ */ jsx90("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx90(
|
|
5069
5154
|
Node2.Button,
|
|
5070
5155
|
{
|
|
5071
5156
|
node: triggerButton,
|
|
@@ -5074,8 +5159,8 @@ function DefaultSettingsPasskey({
|
|
|
5074
5159
|
}
|
|
5075
5160
|
) }),
|
|
5076
5161
|
hasRemoveButtons ? /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-8", children: [
|
|
5077
|
-
/* @__PURE__ */
|
|
5078
|
-
/* @__PURE__ */
|
|
5162
|
+
/* @__PURE__ */ jsx90(DefaultHorizontalDivider, {}),
|
|
5163
|
+
/* @__PURE__ */ jsx90("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
5079
5164
|
var _a, _b;
|
|
5080
5165
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5081
5166
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -5087,7 +5172,7 @@ function DefaultSettingsPasskey({
|
|
|
5087
5172
|
className: "flex justify-between gap-6 md:items-center",
|
|
5088
5173
|
children: [
|
|
5089
5174
|
/* @__PURE__ */ jsxs43("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5090
|
-
/* @__PURE__ */
|
|
5175
|
+
/* @__PURE__ */ jsx90(
|
|
5091
5176
|
passkey_default,
|
|
5092
5177
|
{
|
|
5093
5178
|
size: 32,
|
|
@@ -5096,15 +5181,15 @@ function DefaultSettingsPasskey({
|
|
|
5096
5181
|
),
|
|
5097
5182
|
/* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5098
5183
|
/* @__PURE__ */ jsxs43("div", { className: "flex-1 flex-col truncate", children: [
|
|
5099
|
-
/* @__PURE__ */
|
|
5100
|
-
/* @__PURE__ */
|
|
5184
|
+
/* @__PURE__ */ jsx90("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5185
|
+
/* @__PURE__ */ jsx90("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5101
5186
|
] }),
|
|
5102
|
-
addedAt && /* @__PURE__ */
|
|
5187
|
+
addedAt && /* @__PURE__ */ jsx90("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5103
5188
|
dateStyle: "long"
|
|
5104
5189
|
}).format(new Date(addedAt)) })
|
|
5105
5190
|
] })
|
|
5106
5191
|
] }),
|
|
5107
|
-
/* @__PURE__ */
|
|
5192
|
+
/* @__PURE__ */ jsx90(
|
|
5108
5193
|
"button",
|
|
5109
5194
|
{
|
|
5110
5195
|
...node.attributes,
|
|
@@ -5112,7 +5197,7 @@ function DefaultSettingsPasskey({
|
|
|
5112
5197
|
onClick: node.onClick,
|
|
5113
5198
|
disabled: isSubmitting,
|
|
5114
5199
|
className: "relative",
|
|
5115
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
5200
|
+
children: isSubmitting ? /* @__PURE__ */ jsx90(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx90(
|
|
5116
5201
|
trash_default,
|
|
5117
5202
|
{
|
|
5118
5203
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5132,25 +5217,25 @@ function DefaultSettingsPasskey({
|
|
|
5132
5217
|
|
|
5133
5218
|
// src/theme/default/assets/icons/download.svg
|
|
5134
5219
|
import * as React30 from "react";
|
|
5135
|
-
import { jsx as
|
|
5220
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
5136
5221
|
var SvgDownload = (props) => {
|
|
5137
5222
|
var _a, _b;
|
|
5138
|
-
return /* @__PURE__ */
|
|
5223
|
+
return /* @__PURE__ */ jsx91("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx91("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5m0 0 5-5m-5 5V4" }) });
|
|
5139
5224
|
};
|
|
5140
5225
|
var download_default = SvgDownload;
|
|
5141
5226
|
|
|
5142
5227
|
// src/theme/default/assets/icons/refresh.svg
|
|
5143
5228
|
import * as React31 from "react";
|
|
5144
|
-
import { jsx as
|
|
5229
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
5145
5230
|
var SvgRefresh = (props) => {
|
|
5146
5231
|
var _a, _b;
|
|
5147
|
-
return /* @__PURE__ */
|
|
5232
|
+
return /* @__PURE__ */ jsx92("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx92("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4m-4 4a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4" }) });
|
|
5148
5233
|
};
|
|
5149
5234
|
var refresh_default = SvgRefresh;
|
|
5150
5235
|
|
|
5151
5236
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
5152
5237
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
5153
|
-
import { Fragment as Fragment12, jsx as
|
|
5238
|
+
import { Fragment as Fragment12, jsx as jsx93, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
5154
5239
|
function DefaultSettingsRecoveryCodes({
|
|
5155
5240
|
codes,
|
|
5156
5241
|
regnerateButton,
|
|
@@ -5173,11 +5258,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5173
5258
|
};
|
|
5174
5259
|
const hasCodes = codes.length >= 1;
|
|
5175
5260
|
return /* @__PURE__ */ jsxs44("div", { className: "flex flex-col gap-8", children: [
|
|
5176
|
-
codes.length > 0 && /* @__PURE__ */
|
|
5261
|
+
codes.length > 0 && /* @__PURE__ */ jsx93(DefaultHorizontalDivider, {}),
|
|
5177
5262
|
/* @__PURE__ */ jsxs44("div", { className: "flex gap-4 justify-between", children: [
|
|
5178
|
-
/* @__PURE__ */
|
|
5263
|
+
/* @__PURE__ */ jsx93("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
5179
5264
|
/* @__PURE__ */ jsxs44("div", { className: "flex gap-2", children: [
|
|
5180
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */
|
|
5265
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx93(
|
|
5181
5266
|
"button",
|
|
5182
5267
|
{
|
|
5183
5268
|
...regnerateButton.attributes,
|
|
@@ -5186,7 +5271,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5186
5271
|
onClick: onRegenerate,
|
|
5187
5272
|
disabled: isSubmitting,
|
|
5188
5273
|
"data-loading": isSubmitting,
|
|
5189
|
-
children: /* @__PURE__ */
|
|
5274
|
+
children: /* @__PURE__ */ jsx93(
|
|
5190
5275
|
refresh_default,
|
|
5191
5276
|
{
|
|
5192
5277
|
size: 24,
|
|
@@ -5195,7 +5280,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5195
5280
|
)
|
|
5196
5281
|
}
|
|
5197
5282
|
),
|
|
5198
|
-
revealButton && /* @__PURE__ */
|
|
5283
|
+
revealButton && /* @__PURE__ */ jsx93(Fragment12, { children: /* @__PURE__ */ jsx93(
|
|
5199
5284
|
"button",
|
|
5200
5285
|
{
|
|
5201
5286
|
...revealButton.attributes,
|
|
@@ -5203,7 +5288,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5203
5288
|
className: "ml-auto",
|
|
5204
5289
|
onClick: onReveal,
|
|
5205
5290
|
title: "Reveal recovery codes",
|
|
5206
|
-
children: /* @__PURE__ */
|
|
5291
|
+
children: /* @__PURE__ */ jsx93(
|
|
5207
5292
|
eye_default,
|
|
5208
5293
|
{
|
|
5209
5294
|
size: 24,
|
|
@@ -5212,7 +5297,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5212
5297
|
)
|
|
5213
5298
|
}
|
|
5214
5299
|
) }),
|
|
5215
|
-
hasCodes && /* @__PURE__ */
|
|
5300
|
+
hasCodes && /* @__PURE__ */ jsx93(
|
|
5216
5301
|
"button",
|
|
5217
5302
|
{
|
|
5218
5303
|
onClick: onDownload,
|
|
@@ -5220,7 +5305,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5220
5305
|
className: "ml-auto",
|
|
5221
5306
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
5222
5307
|
title: "Download recovery codes",
|
|
5223
|
-
children: /* @__PURE__ */
|
|
5308
|
+
children: /* @__PURE__ */ jsx93(
|
|
5224
5309
|
download_default,
|
|
5225
5310
|
{
|
|
5226
5311
|
size: 24,
|
|
@@ -5231,12 +5316,12 @@ function DefaultSettingsRecoveryCodes({
|
|
|
5231
5316
|
)
|
|
5232
5317
|
] })
|
|
5233
5318
|
] }),
|
|
5234
|
-
hasCodes ? /* @__PURE__ */
|
|
5319
|
+
hasCodes ? /* @__PURE__ */ jsx93("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx93(
|
|
5235
5320
|
"div",
|
|
5236
5321
|
{
|
|
5237
5322
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
5238
5323
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
5239
|
-
children: codes.map((code) => /* @__PURE__ */
|
|
5324
|
+
children: codes.map((code) => /* @__PURE__ */ jsx93("p", { children: code }, code))
|
|
5240
5325
|
}
|
|
5241
5326
|
) }) : null
|
|
5242
5327
|
] });
|
|
@@ -5247,16 +5332,16 @@ import { useComponents as useComponents8 } from "@ory/elements-react";
|
|
|
5247
5332
|
|
|
5248
5333
|
// src/theme/default/assets/icons/qrcode.svg
|
|
5249
5334
|
import * as React32 from "react";
|
|
5250
|
-
import { jsx as
|
|
5335
|
+
import { jsx as jsx94 } from "react/jsx-runtime";
|
|
5251
5336
|
var SvgQrcode = (props) => {
|
|
5252
5337
|
var _a, _b;
|
|
5253
|
-
return /* @__PURE__ */
|
|
5338
|
+
return /* @__PURE__ */ jsx94("svg", { xmlns: "http://www.w3.org/2000/svg", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, fill: "none", ...props, children: /* @__PURE__ */ jsx94("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M9.333 22.667v.013m0-13.346v.013m13.333-.013v.013m0 9.32h-4v4m8-4v.013m-8 7.987h4m0-4h4v4m-21.333-20a1.333 1.333 0 0 1 1.333-1.333H12a1.333 1.333 0 0 1 1.333 1.333V12A1.334 1.334 0 0 1 12 13.334H6.666A1.334 1.334 0 0 1 5.333 12zm13.333 0A1.333 1.333 0 0 1 20 5.334h5.333a1.333 1.333 0 0 1 1.333 1.333V12a1.333 1.333 0 0 1-1.333 1.334H20A1.333 1.333 0 0 1 18.666 12zM5.333 20a1.333 1.333 0 0 1 1.333-1.333H12A1.333 1.333 0 0 1 13.333 20v5.334A1.333 1.333 0 0 1 12 26.667H6.666a1.333 1.333 0 0 1-1.333-1.334z" }) });
|
|
5254
5339
|
};
|
|
5255
5340
|
var qrcode_default = SvgQrcode;
|
|
5256
5341
|
|
|
5257
5342
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
5258
5343
|
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
5259
|
-
import { jsx as
|
|
5344
|
+
import { jsx as jsx95, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
5260
5345
|
function DefaultSettingsTotp({
|
|
5261
5346
|
totpImage,
|
|
5262
5347
|
totpInput,
|
|
@@ -5277,18 +5362,18 @@ function DefaultSettingsTotp({
|
|
|
5277
5362
|
...buttonAttrs
|
|
5278
5363
|
} = totpUnlink.attributes;
|
|
5279
5364
|
return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5280
|
-
/* @__PURE__ */
|
|
5365
|
+
/* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(Card.Divider, {}) }),
|
|
5281
5366
|
/* @__PURE__ */ jsxs45("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
5282
|
-
/* @__PURE__ */
|
|
5283
|
-
/* @__PURE__ */
|
|
5284
|
-
/* @__PURE__ */
|
|
5367
|
+
/* @__PURE__ */ jsx95("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx95(qrcode_default, { size: 32 }) }),
|
|
5368
|
+
/* @__PURE__ */ jsx95("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx95("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
5369
|
+
/* @__PURE__ */ jsx95(
|
|
5285
5370
|
"button",
|
|
5286
5371
|
{
|
|
5287
5372
|
type: type === "button" ? "button" : "submit",
|
|
5288
5373
|
...buttonAttrs,
|
|
5289
5374
|
onClick: onUnlink,
|
|
5290
5375
|
disabled: isSubmitting,
|
|
5291
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
5376
|
+
children: isSubmitting ? /* @__PURE__ */ jsx95(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx95(
|
|
5292
5377
|
trash_default,
|
|
5293
5378
|
{
|
|
5294
5379
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5302,8 +5387,8 @@ function DefaultSettingsTotp({
|
|
|
5302
5387
|
}
|
|
5303
5388
|
if (totpImage && totpSecret && totpInput) {
|
|
5304
5389
|
return /* @__PURE__ */ jsxs45("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
5305
|
-
/* @__PURE__ */
|
|
5306
|
-
/* @__PURE__ */
|
|
5390
|
+
/* @__PURE__ */ jsx95("div", { className: "col-span-full", children: /* @__PURE__ */ jsx95(DefaultHorizontalDivider, {}) }),
|
|
5391
|
+
/* @__PURE__ */ jsx95("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx95("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx95("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx95(
|
|
5307
5392
|
Node2.Image,
|
|
5308
5393
|
{
|
|
5309
5394
|
node: totpImage,
|
|
@@ -5313,12 +5398,12 @@ function DefaultSettingsTotp({
|
|
|
5313
5398
|
}
|
|
5314
5399
|
) }) }) }),
|
|
5315
5400
|
/* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-6", children: [
|
|
5316
|
-
/* @__PURE__ */
|
|
5401
|
+
/* @__PURE__ */ jsx95(
|
|
5317
5402
|
Node2.Label,
|
|
5318
5403
|
{
|
|
5319
5404
|
node: totpSecret,
|
|
5320
5405
|
attributes: totpSecret.attributes,
|
|
5321
|
-
children: /* @__PURE__ */
|
|
5406
|
+
children: /* @__PURE__ */ jsx95("div", { className: "relative flex justify-stretch max-w-[488px]", children: /* @__PURE__ */ jsx95(
|
|
5322
5407
|
"input",
|
|
5323
5408
|
{
|
|
5324
5409
|
disabled: true,
|
|
@@ -5331,12 +5416,12 @@ function DefaultSettingsTotp({
|
|
|
5331
5416
|
) })
|
|
5332
5417
|
}
|
|
5333
5418
|
),
|
|
5334
|
-
/* @__PURE__ */
|
|
5419
|
+
/* @__PURE__ */ jsx95(
|
|
5335
5420
|
Node2.Label,
|
|
5336
5421
|
{
|
|
5337
5422
|
attributes: totpInput.attributes,
|
|
5338
5423
|
node: totpInput,
|
|
5339
|
-
children: /* @__PURE__ */
|
|
5424
|
+
children: /* @__PURE__ */ jsx95(
|
|
5340
5425
|
Node2.CodeInput,
|
|
5341
5426
|
{
|
|
5342
5427
|
node: totpInput,
|
|
@@ -5355,16 +5440,16 @@ import { useComponents as useComponents9 } from "@ory/elements-react";
|
|
|
5355
5440
|
|
|
5356
5441
|
// src/theme/default/assets/icons/key.svg
|
|
5357
5442
|
import * as React33 from "react";
|
|
5358
|
-
import { jsx as
|
|
5443
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
5359
5444
|
var SvgKey = (props) => {
|
|
5360
5445
|
var _a, _b;
|
|
5361
|
-
return /* @__PURE__ */
|
|
5446
|
+
return /* @__PURE__ */ jsx96("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 32 32", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx96("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M20 12h.013m2.06-6.876 4.803 4.803a3.836 3.836 0 0 1 0 5.425l-3.524 3.524a3.835 3.835 0 0 1-5.425 0l-.402-.401-8.744 8.744a2.67 2.67 0 0 1-1.652.77L6.896 28H5.333a1.334 1.334 0 0 1-1.324-1.177L4 26.667v-1.563c0-.626.22-1.232.623-1.712l.158-.173.552-.552H8V20h2.667v-2.667l2.858-2.858-.401-.402a3.835 3.835 0 0 1 0-5.425l3.524-3.524a3.835 3.835 0 0 1 5.425 0" }) });
|
|
5362
5447
|
};
|
|
5363
5448
|
var key_default = SvgKey;
|
|
5364
5449
|
|
|
5365
5450
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
5366
5451
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
5367
|
-
import { jsx as
|
|
5452
|
+
import { jsx as jsx97, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5368
5453
|
function DefaultSettingsWebauthn({
|
|
5369
5454
|
nameInput,
|
|
5370
5455
|
triggerButton,
|
|
@@ -5377,12 +5462,12 @@ function DefaultSettingsWebauthn({
|
|
|
5377
5462
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
5378
5463
|
return /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
|
|
5379
5464
|
/* @__PURE__ */ jsxs46("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
5380
|
-
/* @__PURE__ */
|
|
5465
|
+
/* @__PURE__ */ jsx97("div", { className: "flex-1", children: /* @__PURE__ */ jsx97(
|
|
5381
5466
|
Node2.Label,
|
|
5382
5467
|
{
|
|
5383
5468
|
node: nameInput,
|
|
5384
5469
|
attributes: nameInput.attributes,
|
|
5385
|
-
children: /* @__PURE__ */
|
|
5470
|
+
children: /* @__PURE__ */ jsx97(
|
|
5386
5471
|
Node2.Input,
|
|
5387
5472
|
{
|
|
5388
5473
|
node: nameInput,
|
|
@@ -5391,7 +5476,7 @@ function DefaultSettingsWebauthn({
|
|
|
5391
5476
|
)
|
|
5392
5477
|
}
|
|
5393
5478
|
) }),
|
|
5394
|
-
triggerButton ? /* @__PURE__ */
|
|
5479
|
+
triggerButton ? /* @__PURE__ */ jsx97(
|
|
5395
5480
|
Node2.Button,
|
|
5396
5481
|
{
|
|
5397
5482
|
node: triggerButton,
|
|
@@ -5401,8 +5486,8 @@ function DefaultSettingsWebauthn({
|
|
|
5401
5486
|
) : null
|
|
5402
5487
|
] }),
|
|
5403
5488
|
hasRemoveButtons ? /* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-8", children: [
|
|
5404
|
-
/* @__PURE__ */
|
|
5405
|
-
/* @__PURE__ */
|
|
5489
|
+
/* @__PURE__ */ jsx97(Card.Divider, {}),
|
|
5490
|
+
/* @__PURE__ */ jsx97("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
5406
5491
|
var _a, _b;
|
|
5407
5492
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
5408
5493
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -5414,7 +5499,7 @@ function DefaultSettingsWebauthn({
|
|
|
5414
5499
|
className: "flex justify-between gap-6 md:items-center",
|
|
5415
5500
|
children: [
|
|
5416
5501
|
/* @__PURE__ */ jsxs46("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
5417
|
-
/* @__PURE__ */
|
|
5502
|
+
/* @__PURE__ */ jsx97(
|
|
5418
5503
|
key_default,
|
|
5419
5504
|
{
|
|
5420
5505
|
size: 32,
|
|
@@ -5423,15 +5508,15 @@ function DefaultSettingsWebauthn({
|
|
|
5423
5508
|
),
|
|
5424
5509
|
/* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
5425
5510
|
/* @__PURE__ */ jsxs46("div", { className: "flex-1 flex-col truncate", children: [
|
|
5426
|
-
/* @__PURE__ */
|
|
5427
|
-
/* @__PURE__ */
|
|
5511
|
+
/* @__PURE__ */ jsx97("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
5512
|
+
/* @__PURE__ */ jsx97("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
5428
5513
|
] }),
|
|
5429
|
-
addedAt && /* @__PURE__ */
|
|
5514
|
+
addedAt && /* @__PURE__ */ jsx97("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
5430
5515
|
dateStyle: "long"
|
|
5431
5516
|
}).format(new Date(addedAt)) })
|
|
5432
5517
|
] })
|
|
5433
5518
|
] }),
|
|
5434
|
-
/* @__PURE__ */
|
|
5519
|
+
/* @__PURE__ */ jsx97(
|
|
5435
5520
|
"button",
|
|
5436
5521
|
{
|
|
5437
5522
|
...node.attributes,
|
|
@@ -5439,7 +5524,7 @@ function DefaultSettingsWebauthn({
|
|
|
5439
5524
|
onClick: node.onClick,
|
|
5440
5525
|
disabled: isSubmitting,
|
|
5441
5526
|
className: "relative",
|
|
5442
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
5527
|
+
children: isSubmitting ? /* @__PURE__ */ jsx97(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx97(
|
|
5443
5528
|
trash_default,
|
|
5444
5529
|
{
|
|
5445
5530
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -5458,91 +5543,96 @@ function DefaultSettingsWebauthn({
|
|
|
5458
5543
|
}
|
|
5459
5544
|
|
|
5460
5545
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
5461
|
-
import { jsx as
|
|
5546
|
+
import { jsx as jsx98 } from "react/jsx-runtime";
|
|
5462
5547
|
function DefaultAuthMethodListContainer({
|
|
5463
5548
|
children
|
|
5464
5549
|
}) {
|
|
5465
|
-
return /* @__PURE__ */
|
|
5550
|
+
return /* @__PURE__ */ jsx98("div", { className: "grid grid-cols-1 gap-2", children });
|
|
5466
5551
|
}
|
|
5467
5552
|
|
|
5468
5553
|
// src/theme/default/components/form/captcha.tsx
|
|
5469
5554
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes9 } from "@ory/client-fetch";
|
|
5470
5555
|
import { Turnstile } from "@marsidev/react-turnstile";
|
|
5471
|
-
import { useRef as
|
|
5556
|
+
import { useEffect as useEffect7, useRef as useRef4 } from "react";
|
|
5472
5557
|
import { useFormContext as useFormContext24 } from "react-hook-form";
|
|
5473
|
-
import { jsx as
|
|
5558
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
5474
5559
|
var DefaultCaptcha = ({ node }) => {
|
|
5475
|
-
const { setValue } = useFormContext24();
|
|
5476
|
-
const ref =
|
|
5477
|
-
const
|
|
5478
|
-
|
|
5479
|
-
if (
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5560
|
+
const { setValue, formState } = useFormContext24();
|
|
5561
|
+
const ref = useRef4();
|
|
5562
|
+
const prevSubmitCount = useRef4(formState.submitCount);
|
|
5563
|
+
useEffect7(() => {
|
|
5564
|
+
if (formState.submitCount > prevSubmitCount.current && formState.isSubmitSuccessful) {
|
|
5565
|
+
prevSubmitCount.current = formState.submitCount;
|
|
5566
|
+
setTimeout(() => {
|
|
5567
|
+
if (ref.current) {
|
|
5568
|
+
ref.current.reset();
|
|
5569
|
+
}
|
|
5570
|
+
}, 100);
|
|
5483
5571
|
}
|
|
5572
|
+
}, [formState.submitCount, formState.isSubmitSuccessful]);
|
|
5573
|
+
if (!isUiNodeInputAttributes9(node.attributes)) {
|
|
5574
|
+
return null;
|
|
5484
5575
|
}
|
|
5485
|
-
if (
|
|
5576
|
+
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
5577
|
+
return /* @__PURE__ */ jsx99(DefaultInput, { node, attributes: node.attributes }, 1);
|
|
5578
|
+
} else if (node.attributes.name === "captcha_turnstile_options") {
|
|
5486
5579
|
const options = JSON.parse(node.attributes.value);
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5494
|
-
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
responseFieldName: options.response_field_name
|
|
5499
|
-
},
|
|
5500
|
-
onExpire: () => {
|
|
5501
|
-
var _a;
|
|
5502
|
-
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5503
|
-
},
|
|
5504
|
-
onSuccess: (token) => {
|
|
5505
|
-
setValue(options.response_field_name, token);
|
|
5506
|
-
}
|
|
5580
|
+
return /* @__PURE__ */ jsx99(
|
|
5581
|
+
Turnstile,
|
|
5582
|
+
{
|
|
5583
|
+
ref,
|
|
5584
|
+
siteKey: options.sitekey,
|
|
5585
|
+
options: {
|
|
5586
|
+
action: options.action,
|
|
5587
|
+
size: "flexible",
|
|
5588
|
+
theme: options.theme,
|
|
5589
|
+
responseField: false,
|
|
5590
|
+
responseFieldName: options.response_field_name
|
|
5507
5591
|
},
|
|
5508
|
-
|
|
5509
|
-
|
|
5592
|
+
onExpire: () => {
|
|
5593
|
+
var _a;
|
|
5594
|
+
return (_a = ref.current) == null ? void 0 : _a.reset();
|
|
5595
|
+
},
|
|
5596
|
+
onSuccess: (token) => {
|
|
5597
|
+
setValue(options.response_field_name, token);
|
|
5598
|
+
}
|
|
5599
|
+
}
|
|
5510
5600
|
);
|
|
5511
5601
|
}
|
|
5512
|
-
return
|
|
5602
|
+
return null;
|
|
5513
5603
|
};
|
|
5514
5604
|
|
|
5515
5605
|
// src/theme/default/assets/icons/personal.svg
|
|
5516
5606
|
import * as React34 from "react";
|
|
5517
|
-
import { jsx as
|
|
5607
|
+
import { jsx as jsx100 } from "react/jsx-runtime";
|
|
5518
5608
|
var SvgPersonal = (props) => {
|
|
5519
5609
|
var _a, _b;
|
|
5520
|
-
return /* @__PURE__ */
|
|
5610
|
+
return /* @__PURE__ */ jsx100("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx100("path", { stroke: "#0F172A", strokeLinecap: "round", strokeLinejoin: "round", d: "M4 14v-1.333A2.667 2.667 0 0 1 6.667 10h1m5.8 3.467 1.2 1.2m-9.334-10a2.667 2.667 0 1 0 5.334 0 2.667 2.667 0 0 0-5.334 0M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }) });
|
|
5521
5611
|
};
|
|
5522
5612
|
var personal_default = SvgPersonal;
|
|
5523
5613
|
|
|
5524
5614
|
// src/theme/default/assets/icons/message.svg
|
|
5525
5615
|
import * as React35 from "react";
|
|
5526
|
-
import { jsx as
|
|
5616
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
5527
5617
|
var SvgMessage = (props) => {
|
|
5528
5618
|
var _a, _b;
|
|
5529
|
-
return /* @__PURE__ */
|
|
5619
|
+
return /* @__PURE__ */ jsx101("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx101("path", { stroke: "#000", strokeLinecap: "round", strokeLinejoin: "round", d: "M3 7.325a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2m-18 0v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-10m-18 0 9 6 9-6" }) });
|
|
5530
5620
|
};
|
|
5531
5621
|
var message_default = SvgMessage;
|
|
5532
5622
|
|
|
5533
5623
|
// src/theme/default/assets/icons/phone.svg
|
|
5534
5624
|
import * as React36 from "react";
|
|
5535
|
-
import { jsx as
|
|
5625
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5536
5626
|
var SvgPhone = (props) => {
|
|
5537
5627
|
var _a, _b;
|
|
5538
|
-
return /* @__PURE__ */
|
|
5628
|
+
return /* @__PURE__ */ jsx102("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 25", width: (props == null ? void 0 : props.width) ? props.width : (_a = props == null ? void 0 : props.size) != null ? _a : 20, height: (props == null ? void 0 : props.height) ? props.height : (_b = props == null ? void 0 : props.size) != null ? _b : 20, ...props, children: /* @__PURE__ */ jsx102("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M5 4.325h4l2 5-2.5 1.5a11 11 0 0 0 5 5l1.5-2.5 5 2v4a2 2 0 0 1-2 2 16 16 0 0 1-15-15 2 2 0 0 1 2-2" }) });
|
|
5539
5629
|
};
|
|
5540
5630
|
var phone_default = SvgPhone;
|
|
5541
5631
|
|
|
5542
5632
|
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
5543
5633
|
import { useIntl as useIntl22 } from "react-intl";
|
|
5544
5634
|
import * as Switch from "@radix-ui/react-switch";
|
|
5545
|
-
import { jsx as
|
|
5635
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
5546
5636
|
var ScopeIcons = {
|
|
5547
5637
|
openid: personal_default,
|
|
5548
5638
|
offline_access: personal_default,
|
|
@@ -5557,7 +5647,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5557
5647
|
var _a;
|
|
5558
5648
|
const intl = useIntl22();
|
|
5559
5649
|
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
5560
|
-
return /* @__PURE__ */
|
|
5650
|
+
return /* @__PURE__ */ jsx103(
|
|
5561
5651
|
ListItem,
|
|
5562
5652
|
{
|
|
5563
5653
|
as: "label",
|
|
@@ -5572,7 +5662,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5572
5662
|
}),
|
|
5573
5663
|
className: "col-span-2",
|
|
5574
5664
|
"data-testid": "ory/screen/consent/scope-checkbox-label",
|
|
5575
|
-
children: /* @__PURE__ */
|
|
5665
|
+
children: /* @__PURE__ */ jsx103(
|
|
5576
5666
|
Switch.Root,
|
|
5577
5667
|
{
|
|
5578
5668
|
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",
|
|
@@ -5580,7 +5670,7 @@ function DefaultConsentScopeCheckbox({
|
|
|
5580
5670
|
value: attributes.value,
|
|
5581
5671
|
onCheckedChange,
|
|
5582
5672
|
defaultChecked: true,
|
|
5583
|
-
children: /* @__PURE__ */
|
|
5673
|
+
children: /* @__PURE__ */ jsx103(Switch.Thumb, { className: "size-2 block bg-toggle-foreground-default rounded-identifier data-[state=checked]:bg-toggle-foreground-checked transition-all data-[state=checked]:translate-x-3" })
|
|
5584
5674
|
}
|
|
5585
5675
|
)
|
|
5586
5676
|
}
|
|
@@ -5642,9 +5732,13 @@ import {
|
|
|
5642
5732
|
instanceOfFlowError,
|
|
5643
5733
|
instanceOfGenericError
|
|
5644
5734
|
} from "@ory/client-fetch";
|
|
5735
|
+
import {
|
|
5736
|
+
OryConfigurationProvider as OryConfigurationProvider2,
|
|
5737
|
+
useOryConfiguration as useOryConfiguration8
|
|
5738
|
+
} from "@ory/elements-react";
|
|
5645
5739
|
import { useMemo as useMemo2 } from "react";
|
|
5646
5740
|
import { FormattedMessage } from "react-intl";
|
|
5647
|
-
import { jsx as
|
|
5741
|
+
import { jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5648
5742
|
function isOAuth2Error(error) {
|
|
5649
5743
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5650
5744
|
}
|
|
@@ -5697,47 +5791,47 @@ function Error2({
|
|
|
5697
5791
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5698
5792
|
const parsed = useStandardize(error);
|
|
5699
5793
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5700
|
-
return /* @__PURE__ */
|
|
5794
|
+
return /* @__PURE__ */ jsx104(OryConfigurationProvider2, { sdk: config.sdk, project: config.project, children: /* @__PURE__ */ jsx104(
|
|
5701
5795
|
IntlProvider,
|
|
5702
5796
|
{
|
|
5703
5797
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5704
5798
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5705
|
-
children: /* @__PURE__ */
|
|
5799
|
+
children: /* @__PURE__ */ jsx104(Card, { children: /* @__PURE__ */ jsxs47(
|
|
5706
5800
|
"div",
|
|
5707
5801
|
{
|
|
5708
5802
|
className: "flex flex-col gap-6 antialiased",
|
|
5709
5803
|
"data-testid": "ory/screen/error",
|
|
5710
5804
|
children: [
|
|
5711
5805
|
/* @__PURE__ */ jsxs47("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5712
|
-
/* @__PURE__ */
|
|
5806
|
+
/* @__PURE__ */ jsx104(ErrorLogo, {}),
|
|
5713
5807
|
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
|
|
5714
|
-
/* @__PURE__ */
|
|
5715
|
-
/* @__PURE__ */
|
|
5716
|
-
parsed.reason && /* @__PURE__ */
|
|
5808
|
+
/* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5809
|
+
/* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5810
|
+
parsed.reason && /* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5717
5811
|
] })
|
|
5718
5812
|
] }),
|
|
5719
|
-
/* @__PURE__ */
|
|
5813
|
+
/* @__PURE__ */ jsx104(Divider, {}),
|
|
5720
5814
|
/* @__PURE__ */ jsxs47("div", { className: "flex flex-col gap-2", children: [
|
|
5721
|
-
/* @__PURE__ */
|
|
5722
|
-
/* @__PURE__ */
|
|
5723
|
-
/* @__PURE__ */
|
|
5815
|
+
/* @__PURE__ */ jsx104("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
|
|
5816
|
+
/* @__PURE__ */ jsx104("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.instructions" }) }),
|
|
5817
|
+
/* @__PURE__ */ jsx104("div", { children: session ? /* @__PURE__ */ jsx104(LoggedInActions, {}) : /* @__PURE__ */ jsx104(GoBackButton, {}) })
|
|
5724
5818
|
] }),
|
|
5725
|
-
/* @__PURE__ */
|
|
5819
|
+
/* @__PURE__ */ jsx104(Divider, {}),
|
|
5726
5820
|
/* @__PURE__ */ jsxs47("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5727
|
-
/* @__PURE__ */
|
|
5821
|
+
/* @__PURE__ */ jsx104("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.text" }) }),
|
|
5728
5822
|
parsed.id && /* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5729
5823
|
"ID: ",
|
|
5730
|
-
/* @__PURE__ */
|
|
5824
|
+
/* @__PURE__ */ jsx104("code", { children: parsed.id })
|
|
5731
5825
|
] }),
|
|
5732
5826
|
/* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5733
5827
|
"Time: ",
|
|
5734
|
-
/* @__PURE__ */
|
|
5828
|
+
/* @__PURE__ */ jsx104("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5735
5829
|
] }),
|
|
5736
5830
|
/* @__PURE__ */ jsxs47("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5737
5831
|
"Message: ",
|
|
5738
|
-
/* @__PURE__ */
|
|
5832
|
+
/* @__PURE__ */ jsx104("code", { children: parsed.reason })
|
|
5739
5833
|
] }),
|
|
5740
|
-
/* @__PURE__ */
|
|
5834
|
+
/* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */ jsx104(
|
|
5741
5835
|
"button",
|
|
5742
5836
|
{
|
|
5743
5837
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5749,7 +5843,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5749
5843
|
`;
|
|
5750
5844
|
void navigator.clipboard.writeText(text);
|
|
5751
5845
|
},
|
|
5752
|
-
children: /* @__PURE__ */
|
|
5846
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.footer.copy" })
|
|
5753
5847
|
}
|
|
5754
5848
|
) })
|
|
5755
5849
|
] })
|
|
@@ -5757,49 +5851,40 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5757
5851
|
}
|
|
5758
5852
|
) })
|
|
5759
5853
|
}
|
|
5760
|
-
);
|
|
5854
|
+
) });
|
|
5761
5855
|
}
|
|
5762
|
-
function LoggedInActions(
|
|
5856
|
+
function LoggedInActions() {
|
|
5857
|
+
const config = useOryConfiguration8();
|
|
5763
5858
|
const { logoutFlow } = useClientLogout(config);
|
|
5764
|
-
return /* @__PURE__ */
|
|
5859
|
+
return /* @__PURE__ */ jsx104(
|
|
5765
5860
|
"a",
|
|
5766
5861
|
{
|
|
5767
5862
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
5768
5863
|
className: "text-interface-foreground-default-primary underline",
|
|
5769
|
-
children: /* @__PURE__ */
|
|
5864
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "login.logout-button" })
|
|
5770
5865
|
}
|
|
5771
5866
|
);
|
|
5772
5867
|
}
|
|
5773
|
-
function GoBackButton(
|
|
5868
|
+
function GoBackButton() {
|
|
5869
|
+
const config = useOryConfiguration8();
|
|
5774
5870
|
if ("default_redirect_url" in config.project) {
|
|
5775
|
-
return /* @__PURE__ */
|
|
5871
|
+
return /* @__PURE__ */ jsx104(
|
|
5776
5872
|
"a",
|
|
5777
5873
|
{
|
|
5778
5874
|
className: "text-interface-foreground-default-primary underline",
|
|
5779
5875
|
href: config.project.default_redirect_url,
|
|
5780
|
-
children: /* @__PURE__ */
|
|
5876
|
+
children: /* @__PURE__ */ jsx104(FormattedMessage, { id: "error.action.go-back" })
|
|
5781
5877
|
}
|
|
5782
5878
|
);
|
|
5783
5879
|
}
|
|
5784
5880
|
return null;
|
|
5785
5881
|
}
|
|
5786
|
-
function ErrorLogo(
|
|
5787
|
-
|
|
5788
|
-
if (
|
|
5789
|
-
return /* @__PURE__ */
|
|
5790
|
-
"img",
|
|
5791
|
-
{
|
|
5792
|
-
src: config.project.logo_light_url,
|
|
5793
|
-
width: 100,
|
|
5794
|
-
height: 36,
|
|
5795
|
-
alt: "Logo"
|
|
5796
|
-
}
|
|
5797
|
-
);
|
|
5882
|
+
function ErrorLogo() {
|
|
5883
|
+
const { project } = useOryConfiguration8();
|
|
5884
|
+
if (project.logo_light_url) {
|
|
5885
|
+
return /* @__PURE__ */ jsx104("img", { src: project.logo_light_url, width: 100, height: 36, alt: "Logo" });
|
|
5798
5886
|
}
|
|
5799
|
-
|
|
5800
|
-
return /* @__PURE__ */ jsx103("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
5801
|
-
}
|
|
5802
|
-
return /* @__PURE__ */ jsx103("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: (_a = config.project.name) != null ? _a : config.name });
|
|
5887
|
+
return /* @__PURE__ */ jsx104("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: project.name });
|
|
5803
5888
|
}
|
|
5804
5889
|
|
|
5805
5890
|
// src/theme/default/flows/login.tsx
|
|
@@ -5808,7 +5893,7 @@ import {
|
|
|
5808
5893
|
OryProvider,
|
|
5809
5894
|
OryTwoStepCard as OryTwoStepCard2
|
|
5810
5895
|
} from "@ory/elements-react";
|
|
5811
|
-
import { jsx as
|
|
5896
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
5812
5897
|
function Login({
|
|
5813
5898
|
flow,
|
|
5814
5899
|
config,
|
|
@@ -5816,14 +5901,14 @@ function Login({
|
|
|
5816
5901
|
components: flowOverrideComponents
|
|
5817
5902
|
}) {
|
|
5818
5903
|
const components = getOryComponents(flowOverrideComponents);
|
|
5819
|
-
return /* @__PURE__ */
|
|
5904
|
+
return /* @__PURE__ */ jsx105(
|
|
5820
5905
|
OryProvider,
|
|
5821
5906
|
{
|
|
5822
5907
|
config,
|
|
5823
5908
|
flow,
|
|
5824
5909
|
flowType: FlowType18.Login,
|
|
5825
5910
|
components,
|
|
5826
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5911
|
+
children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard2, {})
|
|
5827
5912
|
}
|
|
5828
5913
|
);
|
|
5829
5914
|
}
|
|
@@ -5834,7 +5919,7 @@ import {
|
|
|
5834
5919
|
OryProvider as OryProvider2,
|
|
5835
5920
|
OryTwoStepCard as OryTwoStepCard3
|
|
5836
5921
|
} from "@ory/elements-react";
|
|
5837
|
-
import { jsx as
|
|
5922
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
5838
5923
|
function Recovery({
|
|
5839
5924
|
flow,
|
|
5840
5925
|
config,
|
|
@@ -5842,14 +5927,14 @@ function Recovery({
|
|
|
5842
5927
|
components: flowOverrideComponents
|
|
5843
5928
|
}) {
|
|
5844
5929
|
const components = getOryComponents(flowOverrideComponents);
|
|
5845
|
-
return /* @__PURE__ */
|
|
5930
|
+
return /* @__PURE__ */ jsx106(
|
|
5846
5931
|
OryProvider2,
|
|
5847
5932
|
{
|
|
5848
5933
|
config,
|
|
5849
5934
|
flow,
|
|
5850
5935
|
flowType: FlowType19.Recovery,
|
|
5851
5936
|
components,
|
|
5852
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5937
|
+
children: children != null ? children : /* @__PURE__ */ jsx106(OryTwoStepCard3, {})
|
|
5853
5938
|
}
|
|
5854
5939
|
);
|
|
5855
5940
|
}
|
|
@@ -5860,7 +5945,7 @@ import {
|
|
|
5860
5945
|
OryProvider as OryProvider3,
|
|
5861
5946
|
OryTwoStepCard as OryTwoStepCard4
|
|
5862
5947
|
} from "@ory/elements-react";
|
|
5863
|
-
import { jsx as
|
|
5948
|
+
import { jsx as jsx107 } from "react/jsx-runtime";
|
|
5864
5949
|
function Registration({
|
|
5865
5950
|
flow,
|
|
5866
5951
|
children,
|
|
@@ -5868,14 +5953,14 @@ function Registration({
|
|
|
5868
5953
|
config
|
|
5869
5954
|
}) {
|
|
5870
5955
|
const components = getOryComponents(flowOverrideComponents);
|
|
5871
|
-
return /* @__PURE__ */
|
|
5956
|
+
return /* @__PURE__ */ jsx107(
|
|
5872
5957
|
OryProvider3,
|
|
5873
5958
|
{
|
|
5874
5959
|
config,
|
|
5875
5960
|
flow,
|
|
5876
5961
|
flowType: FlowType20.Registration,
|
|
5877
5962
|
components,
|
|
5878
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5963
|
+
children: children != null ? children : /* @__PURE__ */ jsx107(OryTwoStepCard4, {})
|
|
5879
5964
|
}
|
|
5880
5965
|
);
|
|
5881
5966
|
}
|
|
@@ -5887,7 +5972,7 @@ import {
|
|
|
5887
5972
|
OryProvider as OryProvider4,
|
|
5888
5973
|
OrySettingsCard
|
|
5889
5974
|
} from "@ory/elements-react";
|
|
5890
|
-
import { Fragment as Fragment13, jsx as
|
|
5975
|
+
import { Fragment as Fragment13, jsx as jsx108, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
5891
5976
|
function Settings({
|
|
5892
5977
|
flow,
|
|
5893
5978
|
config,
|
|
@@ -5895,7 +5980,7 @@ function Settings({
|
|
|
5895
5980
|
components: flowOverrideComponents
|
|
5896
5981
|
}) {
|
|
5897
5982
|
const components = getOryComponents(flowOverrideComponents);
|
|
5898
|
-
return /* @__PURE__ */
|
|
5983
|
+
return /* @__PURE__ */ jsx108(
|
|
5899
5984
|
OryProvider4,
|
|
5900
5985
|
{
|
|
5901
5986
|
config,
|
|
@@ -5903,8 +5988,8 @@ function Settings({
|
|
|
5903
5988
|
flowType: FlowType21.Settings,
|
|
5904
5989
|
components,
|
|
5905
5990
|
children: children != null ? children : /* @__PURE__ */ jsxs48(Fragment13, { children: [
|
|
5906
|
-
/* @__PURE__ */
|
|
5907
|
-
/* @__PURE__ */
|
|
5991
|
+
/* @__PURE__ */ jsx108(HeadlessPageHeader, {}),
|
|
5992
|
+
/* @__PURE__ */ jsx108(OrySettingsCard, {})
|
|
5908
5993
|
] })
|
|
5909
5994
|
}
|
|
5910
5995
|
);
|
|
@@ -5916,7 +6001,7 @@ import {
|
|
|
5916
6001
|
OryProvider as OryProvider5,
|
|
5917
6002
|
OryTwoStepCard as OryTwoStepCard5
|
|
5918
6003
|
} from "@ory/elements-react";
|
|
5919
|
-
import { jsx as
|
|
6004
|
+
import { jsx as jsx109 } from "react/jsx-runtime";
|
|
5920
6005
|
function Verification({
|
|
5921
6006
|
flow,
|
|
5922
6007
|
config,
|
|
@@ -5924,14 +6009,14 @@ function Verification({
|
|
|
5924
6009
|
components: flowOverrideComponents
|
|
5925
6010
|
}) {
|
|
5926
6011
|
const components = getOryComponents(flowOverrideComponents);
|
|
5927
|
-
return /* @__PURE__ */
|
|
6012
|
+
return /* @__PURE__ */ jsx109(
|
|
5928
6013
|
OryProvider5,
|
|
5929
6014
|
{
|
|
5930
6015
|
config,
|
|
5931
6016
|
flow,
|
|
5932
6017
|
flowType: FlowType22.Verification,
|
|
5933
6018
|
components,
|
|
5934
|
-
children: children != null ? children : /* @__PURE__ */
|
|
6019
|
+
children: children != null ? children : /* @__PURE__ */ jsx109(OryTwoStepCard5, {})
|
|
5935
6020
|
}
|
|
5936
6021
|
);
|
|
5937
6022
|
}
|
|
@@ -6084,7 +6169,7 @@ function challengeNode(challenge) {
|
|
|
6084
6169
|
}
|
|
6085
6170
|
|
|
6086
6171
|
// src/theme/default/flows/consent.tsx
|
|
6087
|
-
import { jsx as
|
|
6172
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
6088
6173
|
function Consent({
|
|
6089
6174
|
consentChallenge,
|
|
6090
6175
|
session,
|
|
@@ -6101,14 +6186,14 @@ function Consent({
|
|
|
6101
6186
|
formActionUrl,
|
|
6102
6187
|
session
|
|
6103
6188
|
);
|
|
6104
|
-
return /* @__PURE__ */
|
|
6189
|
+
return /* @__PURE__ */ jsx110(
|
|
6105
6190
|
OryProvider6,
|
|
6106
6191
|
{
|
|
6107
6192
|
config,
|
|
6108
6193
|
flow,
|
|
6109
6194
|
flowType: FlowType23.OAuth2Consent,
|
|
6110
6195
|
components,
|
|
6111
|
-
children: children != null ? children : /* @__PURE__ */
|
|
6196
|
+
children: children != null ? children : /* @__PURE__ */ jsx110(OryConsentCard2, {})
|
|
6112
6197
|
}
|
|
6113
6198
|
);
|
|
6114
6199
|
}
|