@ory/elements-react 1.0.0-next.39 → 1.0.0-next.40
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 +10 -0
- package/dist/client/frontendClient.d.mts +5 -2
- package/dist/client/frontendClient.d.ts +5 -2
- package/dist/client/frontendClient.js +25 -2
- package/dist/client/frontendClient.js.map +1 -1
- package/dist/client/frontendClient.mjs +25 -2
- package/dist/client/frontendClient.mjs.map +1 -1
- package/dist/index.d.mts +27 -4
- package/dist/index.d.ts +27 -4
- package/dist/index.js +196 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +196 -4
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +44 -3
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +14 -2
- package/dist/theme/default/index.d.ts +14 -2
- package/dist/theme/default/index.js +870 -401
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +827 -354
- package/dist/theme/default/index.mjs.map +1 -1
- package/dist/theme/default/tailwind/defaults.d.mts +737 -0
- package/dist/theme/default/tailwind/defaults.d.ts +737 -0
- package/package.json +2 -1
- package/tsconfig.json +1 -1
|
@@ -40,7 +40,7 @@ function DefaultCardContent({ children }) {
|
|
|
40
40
|
|
|
41
41
|
// src/theme/default/components/card/footer.tsx
|
|
42
42
|
import { FlowType } from "@ory/client-fetch";
|
|
43
|
-
import { useOryFlow } from "@ory/elements-react";
|
|
43
|
+
import { useComponents, useOryFlow } from "@ory/elements-react";
|
|
44
44
|
import { useFormContext } from "react-hook-form";
|
|
45
45
|
import { useIntl } from "react-intl";
|
|
46
46
|
|
|
@@ -142,12 +142,15 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
|
142
142
|
].includes(group)
|
|
143
143
|
);
|
|
144
144
|
}
|
|
145
|
+
var findNode = (nodes, opt) => nodes.find((n) => {
|
|
146
|
+
return n.attributes.node_type === opt.node_type && (opt.group instanceof RegExp ? n.group.match(opt.group) : n.group === opt.group) && (opt.name && n.attributes.node_type === "input" ? opt.name instanceof RegExp ? n.attributes.name.match(opt.name) : n.attributes.name === opt.name : !opt.name);
|
|
147
|
+
});
|
|
145
148
|
|
|
146
149
|
// src/theme/default/components/card/footer.tsx
|
|
147
150
|
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
148
151
|
function DefaultCardFooter() {
|
|
149
|
-
const
|
|
150
|
-
switch (flowType) {
|
|
152
|
+
const oryFlow = useOryFlow();
|
|
153
|
+
switch (oryFlow.flowType) {
|
|
151
154
|
case FlowType.Login:
|
|
152
155
|
return /* @__PURE__ */ jsx5(LoginCardFooter, {});
|
|
153
156
|
case FlowType.Registration:
|
|
@@ -156,6 +159,8 @@ function DefaultCardFooter() {
|
|
|
156
159
|
return /* @__PURE__ */ jsx5(RecoveryCardFooter, {});
|
|
157
160
|
case FlowType.Verification:
|
|
158
161
|
return /* @__PURE__ */ jsx5(VerificationCardFooter, {});
|
|
162
|
+
case FlowType.OAuth2Consent:
|
|
163
|
+
return /* @__PURE__ */ jsx5(ConsentCardFooter, { flow: oryFlow.flow });
|
|
159
164
|
default:
|
|
160
165
|
return null;
|
|
161
166
|
}
|
|
@@ -295,9 +300,54 @@ function RecoveryCardFooter() {
|
|
|
295
300
|
function VerificationCardFooter() {
|
|
296
301
|
return null;
|
|
297
302
|
}
|
|
303
|
+
function ConsentCardFooter({ flow }) {
|
|
304
|
+
var _a, _b;
|
|
305
|
+
const { Node: Node2 } = useComponents();
|
|
306
|
+
const rememberNode = findNode(flow.ui.nodes, {
|
|
307
|
+
group: "oauth2_consent",
|
|
308
|
+
node_type: "input",
|
|
309
|
+
name: "remember"
|
|
310
|
+
});
|
|
311
|
+
return /* @__PURE__ */ jsxs4("div", { className: "flex gap-8 flex-col", children: [
|
|
312
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
313
|
+
/* @__PURE__ */ jsxs4("p", { className: "text-interface-foreground-default-secondary leading-normal font-medium", children: [
|
|
314
|
+
"Make sure you trust ",
|
|
315
|
+
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
316
|
+
] }),
|
|
317
|
+
/* @__PURE__ */ jsx5("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
|
|
318
|
+
] }),
|
|
319
|
+
rememberNode && /* @__PURE__ */ jsx5(
|
|
320
|
+
Node2.Checkbox,
|
|
321
|
+
{
|
|
322
|
+
attributes: rememberNode.attributes,
|
|
323
|
+
node: rememberNode
|
|
324
|
+
}
|
|
325
|
+
),
|
|
326
|
+
/* @__PURE__ */ jsx5("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
|
|
327
|
+
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
328
|
+
).map((n) => {
|
|
329
|
+
const attributes = n.attributes;
|
|
330
|
+
return /* @__PURE__ */ jsx5(
|
|
331
|
+
Node2.Button,
|
|
332
|
+
{
|
|
333
|
+
node: n,
|
|
334
|
+
attributes
|
|
335
|
+
},
|
|
336
|
+
attributes.value
|
|
337
|
+
);
|
|
338
|
+
}) }),
|
|
339
|
+
/* @__PURE__ */ jsxs4("p", { className: "text-sm", children: [
|
|
340
|
+
/* @__PURE__ */ jsxs4("span", { className: "text-interface-foreground-default-tertiary", children: [
|
|
341
|
+
"Authorizing will redirect to",
|
|
342
|
+
" "
|
|
343
|
+
] }),
|
|
344
|
+
(_b = flow.consent_request.client) == null ? void 0 : _b.client_name
|
|
345
|
+
] })
|
|
346
|
+
] });
|
|
347
|
+
}
|
|
298
348
|
|
|
299
349
|
// src/theme/default/components/card/header.tsx
|
|
300
|
-
import { useComponents, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
350
|
+
import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
301
351
|
|
|
302
352
|
// src/theme/default/utils/constructCardHeader.ts
|
|
303
353
|
import {
|
|
@@ -316,7 +366,7 @@ function joinWithCommaOr(list, orText = "or") {
|
|
|
316
366
|
}
|
|
317
367
|
}
|
|
318
368
|
function useCardHeaderText(container, opts) {
|
|
319
|
-
var _a, _b, _c;
|
|
369
|
+
var _a, _b, _c, _d, _e, _f;
|
|
320
370
|
const nodes = container.nodes;
|
|
321
371
|
const intl = useIntl2();
|
|
322
372
|
switch (opts.flowType) {
|
|
@@ -504,6 +554,25 @@ function useCardHeaderText(container, opts) {
|
|
|
504
554
|
}
|
|
505
555
|
) : ""
|
|
506
556
|
};
|
|
557
|
+
case FlowType2.OAuth2Consent:
|
|
558
|
+
return {
|
|
559
|
+
title: intl.formatMessage(
|
|
560
|
+
{
|
|
561
|
+
id: "consent.title"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
party: (_d = opts.flow.consent_request.client) == null ? void 0 : _d.client_name
|
|
565
|
+
}
|
|
566
|
+
),
|
|
567
|
+
description: intl.formatMessage(
|
|
568
|
+
{
|
|
569
|
+
id: "consent.subtitle"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
identifier: (_f = (_e = opts.flow.session.identity) == null ? void 0 : _e.traits.email) != null ? _f : ""
|
|
573
|
+
}
|
|
574
|
+
)
|
|
575
|
+
};
|
|
507
576
|
}
|
|
508
577
|
return {
|
|
509
578
|
title: "Error",
|
|
@@ -613,7 +682,7 @@ function guessRegistrationBackButton(uiNodes) {
|
|
|
613
682
|
// src/theme/default/components/card/header.tsx
|
|
614
683
|
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
615
684
|
function InnerCardHeader({ title, text }) {
|
|
616
|
-
const { Card } =
|
|
685
|
+
const { Card } = useComponents2();
|
|
617
686
|
return /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
618
687
|
/* @__PURE__ */ jsx8(Card.Logo, {}),
|
|
619
688
|
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
@@ -1110,8 +1179,40 @@ function isGroupImmediateSubmit(group) {
|
|
|
1110
1179
|
return group === "code";
|
|
1111
1180
|
}
|
|
1112
1181
|
|
|
1113
|
-
// src/theme/default/components/card/
|
|
1182
|
+
// src/theme/default/components/card/list-item.tsx
|
|
1114
1183
|
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1184
|
+
function ListItem({
|
|
1185
|
+
icon: Icon,
|
|
1186
|
+
as,
|
|
1187
|
+
title,
|
|
1188
|
+
description,
|
|
1189
|
+
children,
|
|
1190
|
+
className,
|
|
1191
|
+
...props
|
|
1192
|
+
}) {
|
|
1193
|
+
const Comp = as || "div";
|
|
1194
|
+
return /* @__PURE__ */ jsxs20(
|
|
1195
|
+
Comp,
|
|
1196
|
+
{
|
|
1197
|
+
...props,
|
|
1198
|
+
className: cn(
|
|
1199
|
+
"flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
|
|
1200
|
+
className
|
|
1201
|
+
),
|
|
1202
|
+
children: [
|
|
1203
|
+
/* @__PURE__ */ jsx35("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx35(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
1204
|
+
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
1205
|
+
/* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
1206
|
+
/* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1207
|
+
] }),
|
|
1208
|
+
children
|
|
1209
|
+
]
|
|
1210
|
+
}
|
|
1211
|
+
);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
1215
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1115
1216
|
var iconsMap = {
|
|
1116
1217
|
code: code_default,
|
|
1117
1218
|
passkey: passkey_default,
|
|
@@ -1130,28 +1231,21 @@ function DefaultAuthMethodListItem({
|
|
|
1130
1231
|
var _a;
|
|
1131
1232
|
const intl = useIntl5();
|
|
1132
1233
|
const Icon = iconsMap[group] || null;
|
|
1133
|
-
return /* @__PURE__ */
|
|
1134
|
-
|
|
1234
|
+
return /* @__PURE__ */ jsx36(
|
|
1235
|
+
ListItem,
|
|
1135
1236
|
{
|
|
1136
|
-
|
|
1237
|
+
as: "button",
|
|
1238
|
+
icon: Icon,
|
|
1239
|
+
title: intl.formatMessage(
|
|
1240
|
+
{ id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
|
|
1241
|
+
title == null ? void 0 : title.values
|
|
1242
|
+
),
|
|
1243
|
+
description: intl.formatMessage({
|
|
1244
|
+
id: `two-step.${group}.description`
|
|
1245
|
+
}),
|
|
1137
1246
|
onClick,
|
|
1138
1247
|
type: isGroupImmediateSubmit(group) ? "submit" : "button",
|
|
1139
|
-
"data-testid": `ory/form/auth-picker/${group}
|
|
1140
|
-
children: [
|
|
1141
|
-
/* @__PURE__ */ jsx35("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx35(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
1142
|
-
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col w-full", children: [
|
|
1143
|
-
/* @__PURE__ */ jsxs20("span", { className: "text-interface-foreground-default-primary truncate mr-6", children: [
|
|
1144
|
-
intl.formatMessage(
|
|
1145
|
-
{ id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
|
|
1146
|
-
title == null ? void 0 : title.values
|
|
1147
|
-
),
|
|
1148
|
-
" "
|
|
1149
|
-
] }),
|
|
1150
|
-
/* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-secondary", children: intl.formatMessage({
|
|
1151
|
-
id: `two-step.${group}.description`
|
|
1152
|
-
}) })
|
|
1153
|
-
] })
|
|
1154
|
-
]
|
|
1248
|
+
"data-testid": `ory/form/auth-picker/${group}`
|
|
1155
1249
|
}
|
|
1156
1250
|
);
|
|
1157
1251
|
}
|
|
@@ -1165,7 +1259,7 @@ import { cva } from "class-variance-authority";
|
|
|
1165
1259
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
1166
1260
|
import { useIntl as useIntl6 } from "react-intl";
|
|
1167
1261
|
import { useEffect as useEffect2, useState } from "react";
|
|
1168
|
-
import { jsx as
|
|
1262
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1169
1263
|
var buttonStyles = cva(
|
|
1170
1264
|
[
|
|
1171
1265
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -1228,7 +1322,7 @@ var DefaultButton = ({
|
|
|
1228
1322
|
setClicked(false);
|
|
1229
1323
|
}
|
|
1230
1324
|
}, [isSubmitting]);
|
|
1231
|
-
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
1325
|
+
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret") || attributes.name.includes("action") && attributes.value === "accept";
|
|
1232
1326
|
return /* @__PURE__ */ jsxs21(
|
|
1233
1327
|
"button",
|
|
1234
1328
|
{
|
|
@@ -1249,8 +1343,8 @@ var DefaultButton = ({
|
|
|
1249
1343
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
1250
1344
|
"data-loading": clicked,
|
|
1251
1345
|
children: [
|
|
1252
|
-
clicked ? /* @__PURE__ */
|
|
1253
|
-
label ? /* @__PURE__ */
|
|
1346
|
+
clicked ? /* @__PURE__ */ jsx37(Spinner, {}) : null,
|
|
1347
|
+
label ? /* @__PURE__ */ jsx37("span", { children: uiTextToFormattedMessage3(label, intl) }) : ""
|
|
1254
1348
|
]
|
|
1255
1349
|
}
|
|
1256
1350
|
);
|
|
@@ -1263,7 +1357,7 @@ import {
|
|
|
1263
1357
|
messageTestId as messageTestId2,
|
|
1264
1358
|
uiTextToFormattedMessage as uiTextToFormattedMessage5
|
|
1265
1359
|
} from "@ory/elements-react";
|
|
1266
|
-
import {
|
|
1360
|
+
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
1267
1361
|
import { useIntl as useIntl8 } from "react-intl";
|
|
1268
1362
|
|
|
1269
1363
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
@@ -1326,7 +1420,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
|
1326
1420
|
};
|
|
1327
1421
|
|
|
1328
1422
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
1329
|
-
import { Fragment as Fragment3, jsx as
|
|
1423
|
+
import { Fragment as Fragment3, jsx as jsx38 } from "react/jsx-runtime";
|
|
1330
1424
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
1331
1425
|
function computeLabelElements(labelText) {
|
|
1332
1426
|
const elements = [];
|
|
@@ -1342,7 +1436,7 @@ function computeLabelElements(labelText) {
|
|
|
1342
1436
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
1343
1437
|
}
|
|
1344
1438
|
elements.push(
|
|
1345
|
-
/* @__PURE__ */
|
|
1439
|
+
/* @__PURE__ */ jsx38(
|
|
1346
1440
|
"a",
|
|
1347
1441
|
{
|
|
1348
1442
|
href: url,
|
|
@@ -1367,13 +1461,13 @@ function CheckboxLabel({ label }) {
|
|
|
1367
1461
|
return null;
|
|
1368
1462
|
}
|
|
1369
1463
|
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1370
|
-
return /* @__PURE__ */
|
|
1464
|
+
return /* @__PURE__ */ jsx38(Fragment3, { children: computeLabelElements(labelText) });
|
|
1371
1465
|
}
|
|
1372
1466
|
|
|
1373
1467
|
// src/theme/default/components/form/checkbox.tsx
|
|
1374
|
-
import { jsx as
|
|
1468
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1375
1469
|
function CheckboxSVG() {
|
|
1376
|
-
return /* @__PURE__ */
|
|
1470
|
+
return /* @__PURE__ */ jsx39(
|
|
1377
1471
|
"svg",
|
|
1378
1472
|
{
|
|
1379
1473
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -1382,7 +1476,7 @@ function CheckboxSVG() {
|
|
|
1382
1476
|
height: "16",
|
|
1383
1477
|
viewBox: "0 0 16 16",
|
|
1384
1478
|
fill: "none",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1479
|
+
children: /* @__PURE__ */ jsx39(
|
|
1386
1480
|
"path",
|
|
1387
1481
|
{
|
|
1388
1482
|
fillRule: "evenodd",
|
|
@@ -1409,29 +1503,28 @@ var DefaultCheckbox = ({
|
|
|
1409
1503
|
} = initialAttributes;
|
|
1410
1504
|
const intl = useIntl8();
|
|
1411
1505
|
const label = getNodeLabel2(node);
|
|
1412
|
-
const { register } =
|
|
1506
|
+
const { register } = useFormContext4();
|
|
1413
1507
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
1414
1508
|
return /* @__PURE__ */ jsxs22("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
1415
1509
|
/* @__PURE__ */ jsxs22("span", { className: "flex h-5 items-center", children: [
|
|
1416
|
-
/* @__PURE__ */
|
|
1510
|
+
/* @__PURE__ */ jsx39(
|
|
1417
1511
|
"input",
|
|
1418
1512
|
{
|
|
1419
1513
|
...attributes,
|
|
1420
|
-
value: 1,
|
|
1421
1514
|
defaultChecked: Boolean(value),
|
|
1422
1515
|
type: "checkbox",
|
|
1423
1516
|
className: cn(
|
|
1424
1517
|
"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",
|
|
1425
1518
|
hasError && "border-interface-border-validation-danger"
|
|
1426
1519
|
),
|
|
1427
|
-
...register(name
|
|
1520
|
+
...register(name)
|
|
1428
1521
|
}
|
|
1429
1522
|
),
|
|
1430
|
-
/* @__PURE__ */
|
|
1523
|
+
/* @__PURE__ */ jsx39(CheckboxSVG, {})
|
|
1431
1524
|
] }),
|
|
1432
1525
|
/* @__PURE__ */ jsxs22("span", { className: "flex flex-col", children: [
|
|
1433
|
-
/* @__PURE__ */
|
|
1434
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1526
|
+
/* @__PURE__ */ jsx39("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx39(CheckboxLabel, { label }) }),
|
|
1527
|
+
node.messages.map((message) => /* @__PURE__ */ jsx39(
|
|
1435
1528
|
"span",
|
|
1436
1529
|
{
|
|
1437
1530
|
className: cn(
|
|
@@ -1448,63 +1541,75 @@ var DefaultCheckbox = ({
|
|
|
1448
1541
|
};
|
|
1449
1542
|
|
|
1450
1543
|
// src/theme/default/components/form/group-container.tsx
|
|
1451
|
-
import {
|
|
1544
|
+
import { useOryFlow as useOryFlow7 } from "@ory/elements-react";
|
|
1545
|
+
import { FlowType as FlowType5 } from "@ory/client-fetch";
|
|
1546
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1452
1547
|
function DefaultGroupContainer({ children }) {
|
|
1453
|
-
|
|
1548
|
+
const { flowType } = useOryFlow7();
|
|
1549
|
+
return /* @__PURE__ */ jsx40(
|
|
1550
|
+
"div",
|
|
1551
|
+
{
|
|
1552
|
+
className: cn(
|
|
1553
|
+
"grid",
|
|
1554
|
+
flowType === FlowType5.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
1555
|
+
),
|
|
1556
|
+
children
|
|
1557
|
+
}
|
|
1558
|
+
);
|
|
1454
1559
|
}
|
|
1455
1560
|
|
|
1456
1561
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1457
|
-
import { jsx as
|
|
1562
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1458
1563
|
function DefaultHorizontalDivider() {
|
|
1459
|
-
return /* @__PURE__ */
|
|
1564
|
+
return /* @__PURE__ */ jsx41("hr", { className: "border-interface-border-default-primary" });
|
|
1460
1565
|
}
|
|
1461
1566
|
|
|
1462
1567
|
// src/theme/default/components/form/image.tsx
|
|
1463
|
-
import { jsx as
|
|
1568
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1464
1569
|
function DefaultImage({ attributes }) {
|
|
1465
|
-
return /* @__PURE__ */
|
|
1570
|
+
return /* @__PURE__ */ jsx42("figure", { children: /* @__PURE__ */ jsx42("img", { ...attributes }) });
|
|
1466
1571
|
}
|
|
1467
1572
|
|
|
1468
1573
|
// src/theme/default/components/form/input.tsx
|
|
1469
|
-
import { FlowType as
|
|
1574
|
+
import { FlowType as FlowType6, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
|
|
1470
1575
|
import {
|
|
1471
1576
|
uiTextToFormattedMessage as uiTextToFormattedMessage6,
|
|
1472
|
-
useOryFlow as
|
|
1577
|
+
useOryFlow as useOryFlow8
|
|
1473
1578
|
} from "@ory/elements-react";
|
|
1474
1579
|
import { useRef, useState as useState2 } from "react";
|
|
1475
|
-
import { useFormContext as
|
|
1580
|
+
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
1476
1581
|
import { useIntl as useIntl9 } from "react-intl";
|
|
1477
1582
|
|
|
1478
1583
|
// src/theme/default/assets/icons/eye-off.svg
|
|
1479
1584
|
import * as React24 from "react";
|
|
1480
|
-
import { jsx as
|
|
1585
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1481
1586
|
var SvgEyeOff = (props) => {
|
|
1482
1587
|
var _a, _b;
|
|
1483
|
-
return /* @__PURE__ */
|
|
1588
|
+
return /* @__PURE__ */ jsx43("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__ */ jsx43("path", { stroke: "#000", 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" }) });
|
|
1484
1589
|
};
|
|
1485
1590
|
var eye_off_default = SvgEyeOff;
|
|
1486
1591
|
|
|
1487
1592
|
// src/theme/default/assets/icons/eye.svg
|
|
1488
1593
|
import * as React25 from "react";
|
|
1489
|
-
import { jsx as
|
|
1594
|
+
import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1490
1595
|
var SvgEye = (props) => {
|
|
1491
1596
|
var _a, _b;
|
|
1492
|
-
return /* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
/* @__PURE__ */
|
|
1597
|
+
return /* @__PURE__ */ jsx44("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__ */ jsxs23("g", { strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1598
|
+
/* @__PURE__ */ jsx44("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1599
|
+
/* @__PURE__ */ jsx44("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1495
1600
|
] }) });
|
|
1496
1601
|
};
|
|
1497
1602
|
var eye_default = SvgEye;
|
|
1498
1603
|
|
|
1499
1604
|
// src/theme/default/components/form/input.tsx
|
|
1500
|
-
import { jsx as
|
|
1605
|
+
import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1501
1606
|
var DefaultInput = ({
|
|
1502
1607
|
node,
|
|
1503
1608
|
attributes,
|
|
1504
1609
|
onClick
|
|
1505
1610
|
}) => {
|
|
1506
1611
|
const label = getNodeLabel3(node);
|
|
1507
|
-
const { register } =
|
|
1612
|
+
const { register } = useFormContext5();
|
|
1508
1613
|
const {
|
|
1509
1614
|
value,
|
|
1510
1615
|
autocomplete,
|
|
@@ -1514,7 +1619,7 @@ var DefaultInput = ({
|
|
|
1514
1619
|
...rest
|
|
1515
1620
|
} = attributes;
|
|
1516
1621
|
const intl = useIntl9();
|
|
1517
|
-
const { flowType } =
|
|
1622
|
+
const { flowType } = useOryFlow8();
|
|
1518
1623
|
const inputRef = useRef(null);
|
|
1519
1624
|
const formattedLabel = label ? intl.formatMessage(
|
|
1520
1625
|
{
|
|
@@ -1526,7 +1631,7 @@ var DefaultInput = ({
|
|
|
1526
1631
|
}
|
|
1527
1632
|
) : "";
|
|
1528
1633
|
if (rest.type === "hidden") {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1634
|
+
return /* @__PURE__ */ jsx45(
|
|
1530
1635
|
"input",
|
|
1531
1636
|
{
|
|
1532
1637
|
...rest,
|
|
@@ -1546,10 +1651,10 @@ var DefaultInput = ({
|
|
|
1546
1651
|
className: cn(
|
|
1547
1652
|
"relative flex justify-stretch",
|
|
1548
1653
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1549
|
-
flowType ===
|
|
1654
|
+
flowType === FlowType6.Settings && "max-w-[488px]"
|
|
1550
1655
|
),
|
|
1551
1656
|
children: [
|
|
1552
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ jsx45(
|
|
1553
1658
|
"input",
|
|
1554
1659
|
{
|
|
1555
1660
|
...rest,
|
|
@@ -1573,7 +1678,7 @@ var DefaultInput = ({
|
|
|
1573
1678
|
...restRegister
|
|
1574
1679
|
}
|
|
1575
1680
|
),
|
|
1576
|
-
rest.type === "password" && /* @__PURE__ */
|
|
1681
|
+
rest.type === "password" && /* @__PURE__ */ jsx45(PasswordToggle, { inputRef })
|
|
1577
1682
|
]
|
|
1578
1683
|
}
|
|
1579
1684
|
);
|
|
@@ -1588,32 +1693,32 @@ function PasswordToggle({
|
|
|
1588
1693
|
inputRef.current.type = shown ? "password" : "text";
|
|
1589
1694
|
}
|
|
1590
1695
|
};
|
|
1591
|
-
return /* @__PURE__ */
|
|
1696
|
+
return /* @__PURE__ */ jsx45(
|
|
1592
1697
|
"button",
|
|
1593
1698
|
{
|
|
1594
1699
|
onClick: handleClick,
|
|
1595
1700
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
1596
1701
|
type: "button",
|
|
1597
|
-
children: shown ? /* @__PURE__ */
|
|
1702
|
+
children: shown ? /* @__PURE__ */ jsx45(eye_off_default, {}) : /* @__PURE__ */ jsx45(eye_default, {})
|
|
1598
1703
|
}
|
|
1599
1704
|
);
|
|
1600
1705
|
}
|
|
1601
1706
|
|
|
1602
1707
|
// src/theme/default/components/form/label.tsx
|
|
1603
1708
|
import {
|
|
1604
|
-
FlowType as
|
|
1709
|
+
FlowType as FlowType7,
|
|
1605
1710
|
getNodeLabel as getNodeLabel4,
|
|
1606
1711
|
instanceOfUiText
|
|
1607
1712
|
} from "@ory/client-fetch";
|
|
1608
1713
|
import {
|
|
1609
1714
|
messageTestId as messageTestId3,
|
|
1610
1715
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
1611
|
-
useComponents as
|
|
1612
|
-
useOryFlow as
|
|
1716
|
+
useComponents as useComponents3,
|
|
1717
|
+
useOryFlow as useOryFlow9
|
|
1613
1718
|
} from "@ory/elements-react";
|
|
1614
|
-
import { useFormContext as
|
|
1719
|
+
import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
1615
1720
|
import { useIntl as useIntl10 } from "react-intl";
|
|
1616
|
-
import { jsx as
|
|
1721
|
+
import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1617
1722
|
function findResendNode(nodes) {
|
|
1618
1723
|
return nodes.find(
|
|
1619
1724
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -1627,9 +1732,9 @@ function DefaultLabel({
|
|
|
1627
1732
|
}) {
|
|
1628
1733
|
const intl = useIntl10();
|
|
1629
1734
|
const label = getNodeLabel4(node);
|
|
1630
|
-
const { Message } =
|
|
1631
|
-
const { config, flowType, flow } =
|
|
1632
|
-
const { setValue, formState } =
|
|
1735
|
+
const { Message } = useComponents3();
|
|
1736
|
+
const { config, flowType, flow } = useOryFlow9();
|
|
1737
|
+
const { setValue, formState } = useFormContext6();
|
|
1633
1738
|
const isPassword = attributes.type === "password";
|
|
1634
1739
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
1635
1740
|
const handleResend = () => {
|
|
@@ -1640,7 +1745,7 @@ function DefaultLabel({
|
|
|
1640
1745
|
const fieldError = formState.errors[attributes.name];
|
|
1641
1746
|
return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
1642
1747
|
label && /* @__PURE__ */ jsxs25("span", { className: "inline-flex justify-between", children: [
|
|
1643
|
-
/* @__PURE__ */
|
|
1748
|
+
/* @__PURE__ */ jsx46(
|
|
1644
1749
|
"label",
|
|
1645
1750
|
{
|
|
1646
1751
|
...messageTestId3(label),
|
|
@@ -1651,8 +1756,8 @@ function DefaultLabel({
|
|
|
1651
1756
|
children: uiTextToFormattedMessage7(label, intl)
|
|
1652
1757
|
}
|
|
1653
1758
|
),
|
|
1654
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
1655
|
-
/* @__PURE__ */
|
|
1759
|
+
isPassword && config.project.recovery_enabled && flowType === FlowType7.Login && // TODO: make it possible to override with a custom component
|
|
1760
|
+
/* @__PURE__ */ jsx46(
|
|
1656
1761
|
"a",
|
|
1657
1762
|
{
|
|
1658
1763
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -1663,7 +1768,7 @@ function DefaultLabel({
|
|
|
1663
1768
|
})
|
|
1664
1769
|
}
|
|
1665
1770
|
),
|
|
1666
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */
|
|
1771
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx46(
|
|
1667
1772
|
"button",
|
|
1668
1773
|
{
|
|
1669
1774
|
type: "submit",
|
|
@@ -1676,8 +1781,8 @@ function DefaultLabel({
|
|
|
1676
1781
|
)
|
|
1677
1782
|
] }),
|
|
1678
1783
|
children,
|
|
1679
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1680
|
-
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */
|
|
1784
|
+
node.messages.map((message) => /* @__PURE__ */ jsx46(Message.Content, { message }, message.id)),
|
|
1785
|
+
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx46(Message.Content, { message: fieldError })
|
|
1681
1786
|
] });
|
|
1682
1787
|
}
|
|
1683
1788
|
|
|
@@ -1688,11 +1793,11 @@ import {
|
|
|
1688
1793
|
} from "@ory/elements-react";
|
|
1689
1794
|
import { forwardRef } from "react";
|
|
1690
1795
|
import { useIntl as useIntl11 } from "react-intl";
|
|
1691
|
-
import { jsx as
|
|
1796
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1692
1797
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
1693
1798
|
const intl = useIntl11();
|
|
1694
1799
|
const label = getNodeLabel5(node);
|
|
1695
|
-
return /* @__PURE__ */
|
|
1800
|
+
return /* @__PURE__ */ jsx47(
|
|
1696
1801
|
"a",
|
|
1697
1802
|
{
|
|
1698
1803
|
...attributes,
|
|
@@ -1709,13 +1814,13 @@ var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
|
1709
1814
|
DefaultLinkButton.displayName = "DefaultLinkButton";
|
|
1710
1815
|
|
|
1711
1816
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1712
|
-
import { useFormContext as
|
|
1817
|
+
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
1713
1818
|
|
|
1714
1819
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1715
1820
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1716
1821
|
import * as React26 from "react";
|
|
1717
|
-
import { jsx as
|
|
1718
|
-
var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
1822
|
+
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1823
|
+
var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
1719
1824
|
OTPInput,
|
|
1720
1825
|
{
|
|
1721
1826
|
ref,
|
|
@@ -1728,7 +1833,7 @@ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props },
|
|
|
1728
1833
|
}
|
|
1729
1834
|
));
|
|
1730
1835
|
InputOTP.displayName = "InputOTP";
|
|
1731
|
-
var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1836
|
+
var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1732
1837
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1733
1838
|
var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
1734
1839
|
const inputOTPContext = React26.useContext(OTPInputContext);
|
|
@@ -1745,8 +1850,8 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1745
1850
|
),
|
|
1746
1851
|
...props,
|
|
1747
1852
|
children: [
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
hasFakeCaret && /* @__PURE__ */
|
|
1853
|
+
/* @__PURE__ */ jsx48("span", { className: "inline-block size-4", children: char }),
|
|
1854
|
+
hasFakeCaret && /* @__PURE__ */ jsx48("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ jsx48("div", { className: "h-4 w-px animate-caret-blink bg-interface-background-brand-primary duration-700" }) })
|
|
1750
1855
|
]
|
|
1751
1856
|
}
|
|
1752
1857
|
);
|
|
@@ -1754,34 +1859,34 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1754
1859
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1755
1860
|
|
|
1756
1861
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1757
|
-
import { useOryFlow as
|
|
1758
|
-
import { FlowType as
|
|
1759
|
-
import { jsx as
|
|
1862
|
+
import { useOryFlow as useOryFlow10 } from "@ory/elements-react";
|
|
1863
|
+
import { FlowType as FlowType8 } from "@ory/client-fetch";
|
|
1864
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1760
1865
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1761
|
-
const { setValue, watch } =
|
|
1866
|
+
const { setValue, watch } = useFormContext7();
|
|
1762
1867
|
const { maxlength, name } = attributes;
|
|
1763
1868
|
const elements = maxlength != null ? maxlength : 6;
|
|
1764
|
-
const { flowType } =
|
|
1869
|
+
const { flowType } = useOryFlow10();
|
|
1765
1870
|
const handleInputChange = (v) => {
|
|
1766
1871
|
setValue(name, v);
|
|
1767
1872
|
};
|
|
1768
1873
|
const value = watch(name);
|
|
1769
|
-
return /* @__PURE__ */
|
|
1874
|
+
return /* @__PURE__ */ jsx49(
|
|
1770
1875
|
InputOTP,
|
|
1771
1876
|
{
|
|
1772
1877
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1773
1878
|
onChange: handleInputChange,
|
|
1774
1879
|
name,
|
|
1775
1880
|
value,
|
|
1776
|
-
children: /* @__PURE__ */
|
|
1881
|
+
children: /* @__PURE__ */ jsx49(
|
|
1777
1882
|
InputOTPGroup,
|
|
1778
1883
|
{
|
|
1779
1884
|
className: cn(
|
|
1780
1885
|
"w-full flex gap-2 justify-stretch",
|
|
1781
1886
|
// The settings flow input fields are supposed to be dense, so we don't need the extra padding we want on the user flows.
|
|
1782
|
-
flowType ===
|
|
1887
|
+
flowType === FlowType8.Settings && "max-w-[488px]"
|
|
1783
1888
|
),
|
|
1784
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */
|
|
1889
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx49(InputOTPSlot, { index }, index))
|
|
1785
1890
|
}
|
|
1786
1891
|
)
|
|
1787
1892
|
}
|
|
@@ -1789,13 +1894,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1789
1894
|
};
|
|
1790
1895
|
|
|
1791
1896
|
// src/theme/default/components/form/section.tsx
|
|
1792
|
-
import { jsx as
|
|
1897
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1793
1898
|
var DefaultFormSection = ({
|
|
1794
1899
|
children,
|
|
1795
1900
|
nodes: _nodes,
|
|
1796
1901
|
...rest
|
|
1797
1902
|
}) => {
|
|
1798
|
-
return /* @__PURE__ */
|
|
1903
|
+
return /* @__PURE__ */ jsx50(
|
|
1799
1904
|
"form",
|
|
1800
1905
|
{
|
|
1801
1906
|
className: "flex w-full max-w-screen-sm flex-col md:max-w-[712px] lg:max-w-[802px] xl:max-w-[896px] px-4",
|
|
@@ -1811,8 +1916,8 @@ var DefaultFormSectionContent = ({
|
|
|
1811
1916
|
}) => {
|
|
1812
1917
|
return /* @__PURE__ */ jsxs27("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: [
|
|
1813
1918
|
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */
|
|
1919
|
+
/* @__PURE__ */ jsx50("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
1920
|
+
/* @__PURE__ */ jsx50("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1816
1921
|
] }),
|
|
1817
1922
|
children
|
|
1818
1923
|
] });
|
|
@@ -1828,7 +1933,7 @@ var DefaultFormSectionFooter = ({
|
|
|
1828
1933
|
"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"
|
|
1829
1934
|
),
|
|
1830
1935
|
children: [
|
|
1831
|
-
/* @__PURE__ */
|
|
1936
|
+
/* @__PURE__ */ jsx50("span", { children: text }),
|
|
1832
1937
|
children
|
|
1833
1938
|
]
|
|
1834
1939
|
}
|
|
@@ -1838,31 +1943,31 @@ var DefaultFormSectionFooter = ({
|
|
|
1838
1943
|
// src/theme/default/components/form/text.tsx
|
|
1839
1944
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
1840
1945
|
import { useIntl as useIntl12 } from "react-intl";
|
|
1841
|
-
import { Fragment as Fragment4, jsx as
|
|
1946
|
+
import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1842
1947
|
function DefaultText({ node, attributes }) {
|
|
1843
1948
|
var _a;
|
|
1844
1949
|
const intl = useIntl12();
|
|
1845
1950
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
1846
1951
|
if (lookup) {
|
|
1847
1952
|
return /* @__PURE__ */ jsxs28(Fragment4, { children: [
|
|
1848
|
-
/* @__PURE__ */
|
|
1849
|
-
lookup.map((text, index) => /* @__PURE__ */
|
|
1953
|
+
/* @__PURE__ */ jsx51("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
1954
|
+
lookup.map((text, index) => /* @__PURE__ */ jsx51(
|
|
1850
1955
|
"pre",
|
|
1851
1956
|
{
|
|
1852
1957
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
1853
|
-
children: /* @__PURE__ */
|
|
1958
|
+
children: /* @__PURE__ */ jsx51("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
|
|
1854
1959
|
},
|
|
1855
1960
|
index
|
|
1856
1961
|
))
|
|
1857
1962
|
] });
|
|
1858
1963
|
}
|
|
1859
|
-
return /* @__PURE__ */
|
|
1964
|
+
return /* @__PURE__ */ jsx51(Fragment4, { children: /* @__PURE__ */ jsxs28(
|
|
1860
1965
|
"p",
|
|
1861
1966
|
{
|
|
1862
1967
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
1863
1968
|
id: attributes.id,
|
|
1864
1969
|
children: [
|
|
1865
|
-
node.meta.label ? /* @__PURE__ */
|
|
1970
|
+
node.meta.label ? /* @__PURE__ */ jsx51("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
|
|
1866
1971
|
attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
|
|
1867
1972
|
]
|
|
1868
1973
|
}
|
|
@@ -1870,29 +1975,29 @@ function DefaultText({ node, attributes }) {
|
|
|
1870
1975
|
}
|
|
1871
1976
|
|
|
1872
1977
|
// src/theme/default/components/generic/page-header.tsx
|
|
1873
|
-
import { useComponents as
|
|
1978
|
+
import { useComponents as useComponents4 } from "@ory/elements-react";
|
|
1874
1979
|
|
|
1875
1980
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1876
|
-
import { useOryFlow as
|
|
1981
|
+
import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
|
|
1877
1982
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
1878
1983
|
|
|
1879
1984
|
// src/theme/default/assets/icons/logout.svg
|
|
1880
1985
|
import * as React27 from "react";
|
|
1881
|
-
import { jsx as
|
|
1986
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1882
1987
|
var SvgLogout = (props) => {
|
|
1883
1988
|
var _a, _b;
|
|
1884
|
-
return /* @__PURE__ */
|
|
1989
|
+
return /* @__PURE__ */ jsx52("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__ */ jsx52("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" }) });
|
|
1885
1990
|
};
|
|
1886
1991
|
var logout_default = SvgLogout;
|
|
1887
1992
|
|
|
1888
1993
|
// src/theme/default/assets/icons/settings.svg
|
|
1889
1994
|
import * as React28 from "react";
|
|
1890
|
-
import { jsx as
|
|
1995
|
+
import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1891
1996
|
var SvgSettings = (props) => {
|
|
1892
1997
|
var _a, _b;
|
|
1893
|
-
return /* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
1998
|
+
return /* @__PURE__ */ jsx53("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__ */ jsxs29("g", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1999
|
+
/* @__PURE__ */ jsx53("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" }),
|
|
2000
|
+
/* @__PURE__ */ jsx53("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1896
2001
|
] }) });
|
|
1897
2002
|
};
|
|
1898
2003
|
var settings_default = SvgSettings;
|
|
@@ -1972,10 +2077,10 @@ var getUserInitials = (session) => {
|
|
|
1972
2077
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1973
2078
|
import { forwardRef as forwardRef3 } from "react";
|
|
1974
2079
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1975
|
-
import { jsx as
|
|
2080
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
1976
2081
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1977
2082
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1978
|
-
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */
|
|
2083
|
+
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx54(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx54(
|
|
1979
2084
|
DropdownMenuPrimitive.Content,
|
|
1980
2085
|
{
|
|
1981
2086
|
ref,
|
|
@@ -1990,7 +2095,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
|
|
|
1990
2095
|
}
|
|
1991
2096
|
) }));
|
|
1992
2097
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1993
|
-
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
2098
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx54(
|
|
1994
2099
|
DropdownMenuPrimitive.Item,
|
|
1995
2100
|
{
|
|
1996
2101
|
ref,
|
|
@@ -2008,7 +2113,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
|
|
|
2008
2113
|
}
|
|
2009
2114
|
));
|
|
2010
2115
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2011
|
-
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
2116
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx54(
|
|
2012
2117
|
DropdownMenuPrimitive.Label,
|
|
2013
2118
|
{
|
|
2014
2119
|
ref,
|
|
@@ -2027,31 +2132,31 @@ import { forwardRef as forwardRef4 } from "react";
|
|
|
2027
2132
|
|
|
2028
2133
|
// src/theme/default/assets/icons/user.svg
|
|
2029
2134
|
import * as React29 from "react";
|
|
2030
|
-
import { jsx as
|
|
2135
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2031
2136
|
var SvgUser = (props) => {
|
|
2032
2137
|
var _a, _b;
|
|
2033
|
-
return /* @__PURE__ */
|
|
2138
|
+
return /* @__PURE__ */ jsx55("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__ */ jsx55("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" }) });
|
|
2034
2139
|
};
|
|
2035
2140
|
var user_default = SvgUser;
|
|
2036
2141
|
|
|
2037
2142
|
// src/theme/default/components/ui/user-avater.tsx
|
|
2038
|
-
import { jsx as
|
|
2143
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2039
2144
|
var UserAvatar = forwardRef4(
|
|
2040
2145
|
({ initials, ...rest }, ref) => {
|
|
2041
|
-
return /* @__PURE__ */
|
|
2146
|
+
return /* @__PURE__ */ jsx56(
|
|
2042
2147
|
"button",
|
|
2043
2148
|
{
|
|
2044
2149
|
ref,
|
|
2045
2150
|
className: "relative flex size-10 items-center justify-center overflow-hidden rounded-[999px] bg-button-primary-background-default hover:bg-button-primary-background-hover",
|
|
2046
2151
|
...rest,
|
|
2047
|
-
children: /* @__PURE__ */
|
|
2152
|
+
children: /* @__PURE__ */ jsx56("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx56(
|
|
2048
2153
|
"img",
|
|
2049
2154
|
{
|
|
2050
2155
|
src: initials.avatar,
|
|
2051
2156
|
alt: initials.primary,
|
|
2052
2157
|
className: "w-full object-contain"
|
|
2053
2158
|
}
|
|
2054
|
-
) : /* @__PURE__ */
|
|
2159
|
+
) : /* @__PURE__ */ jsx56(
|
|
2055
2160
|
user_default,
|
|
2056
2161
|
{
|
|
2057
2162
|
size: 24,
|
|
@@ -2065,27 +2170,27 @@ var UserAvatar = forwardRef4(
|
|
|
2065
2170
|
UserAvatar.displayName = "UserAvatar";
|
|
2066
2171
|
|
|
2067
2172
|
// src/theme/default/components/ui/user-menu.tsx
|
|
2068
|
-
import { jsx as
|
|
2173
|
+
import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2069
2174
|
var UserMenu = ({ session }) => {
|
|
2070
|
-
const { config } =
|
|
2175
|
+
const { config } = useOryFlow11();
|
|
2071
2176
|
const initials = getUserInitials(session);
|
|
2072
2177
|
const logoutFlow = useClientLogout(config);
|
|
2073
2178
|
return /* @__PURE__ */ jsxs30(DropdownMenu, { children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2179
|
+
/* @__PURE__ */ jsx57(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(UserAvatar, { initials }) }),
|
|
2075
2180
|
/* @__PURE__ */ jsxs30(DropdownMenuContent, { children: [
|
|
2076
2181
|
/* @__PURE__ */ jsxs30(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
2077
|
-
/* @__PURE__ */
|
|
2182
|
+
/* @__PURE__ */ jsx57(UserAvatar, { disabled: true, initials }),
|
|
2078
2183
|
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
initials.secondary && /* @__PURE__ */
|
|
2184
|
+
/* @__PURE__ */ jsx57("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
2185
|
+
initials.secondary && /* @__PURE__ */ jsx57("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
2081
2186
|
] })
|
|
2082
2187
|
] }),
|
|
2083
|
-
/* @__PURE__ */
|
|
2084
|
-
/* @__PURE__ */
|
|
2188
|
+
/* @__PURE__ */ jsx57(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs30("a", { href: "/settings", children: [
|
|
2189
|
+
/* @__PURE__ */ jsx57(settings_default, { size: 16 }),
|
|
2085
2190
|
" User settings"
|
|
2086
2191
|
] }) }),
|
|
2087
|
-
/* @__PURE__ */
|
|
2088
|
-
/* @__PURE__ */
|
|
2192
|
+
/* @__PURE__ */ jsx57(DropdownMenuItem, { asChild: true, disabled: !(logoutFlow == null ? void 0 : logoutFlow.logout_url), children: /* @__PURE__ */ jsxs30("a", { href: logoutFlow == null ? void 0 : logoutFlow.logout_url, children: [
|
|
2193
|
+
/* @__PURE__ */ jsx57(logout_default, { size: 16 }),
|
|
2089
2194
|
" Logout"
|
|
2090
2195
|
] }) })
|
|
2091
2196
|
] })
|
|
@@ -2094,32 +2199,32 @@ var UserMenu = ({ session }) => {
|
|
|
2094
2199
|
|
|
2095
2200
|
// src/theme/default/components/generic/page-header.tsx
|
|
2096
2201
|
import { useSession } from "@ory/elements-react/client";
|
|
2097
|
-
import { jsx as
|
|
2202
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2098
2203
|
var DefaultPageHeader = (_props) => {
|
|
2099
|
-
const { Card } =
|
|
2204
|
+
const { Card } = useComponents4();
|
|
2100
2205
|
const { session } = useSession();
|
|
2101
|
-
return /* @__PURE__ */
|
|
2102
|
-
/* @__PURE__ */
|
|
2103
|
-
/* @__PURE__ */
|
|
2206
|
+
return /* @__PURE__ */ jsx58("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__ */ jsx58("div", { className: "flex flex-col gap-12", children: /* @__PURE__ */ jsxs31("div", { className: "flex max-h-10 flex-1 justify-between gap-2", children: [
|
|
2207
|
+
/* @__PURE__ */ jsx58("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ jsx58(Card.Logo, {}) }),
|
|
2208
|
+
/* @__PURE__ */ jsx58(UserMenu, { session })
|
|
2104
2209
|
] }) }) });
|
|
2105
2210
|
};
|
|
2106
2211
|
|
|
2107
2212
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
2108
2213
|
import { useEffect as useEffect4 } from "react";
|
|
2109
|
-
import { useFormContext as
|
|
2214
|
+
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
2110
2215
|
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
2111
2216
|
|
|
2112
2217
|
// src/theme/default/assets/icons/trash.svg
|
|
2113
2218
|
import * as React30 from "react";
|
|
2114
|
-
import { jsx as
|
|
2219
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2115
2220
|
var SvgTrash = (props) => {
|
|
2116
2221
|
var _a, _b;
|
|
2117
|
-
return /* @__PURE__ */
|
|
2222
|
+
return /* @__PURE__ */ jsx59("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__ */ jsx59("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" }) });
|
|
2118
2223
|
};
|
|
2119
2224
|
var trash_default = SvgTrash;
|
|
2120
2225
|
|
|
2121
2226
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
2122
|
-
import { jsx as
|
|
2227
|
+
import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2123
2228
|
function DefaultSettingsOidc({
|
|
2124
2229
|
linkButtons,
|
|
2125
2230
|
unlinkButtons
|
|
@@ -2127,9 +2232,9 @@ function DefaultSettingsOidc({
|
|
|
2127
2232
|
const hasLinkButtons = linkButtons.length > 0;
|
|
2128
2233
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
2129
2234
|
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-8", children: [
|
|
2130
|
-
hasLinkButtons && /* @__PURE__ */
|
|
2235
|
+
hasLinkButtons && /* @__PURE__ */ jsx60("div", { className: "grid items-start gap-3 grid-cols-1 sm:grid-cols-2 md:grid-cols-3", children: linkButtons.map((button) => {
|
|
2131
2236
|
const attrs = button.attributes;
|
|
2132
|
-
return /* @__PURE__ */
|
|
2237
|
+
return /* @__PURE__ */ jsx60(
|
|
2133
2238
|
DefaultButtonSocial,
|
|
2134
2239
|
{
|
|
2135
2240
|
showLabel: true,
|
|
@@ -2140,12 +2245,12 @@ function DefaultSettingsOidc({
|
|
|
2140
2245
|
attrs.value
|
|
2141
2246
|
);
|
|
2142
2247
|
}) }),
|
|
2143
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */
|
|
2248
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx60(DefaultHorizontalDivider, {}) : null,
|
|
2144
2249
|
unlinkButtons.map((button) => {
|
|
2145
2250
|
if (button.attributes.node_type !== "input") {
|
|
2146
2251
|
return null;
|
|
2147
2252
|
}
|
|
2148
|
-
return /* @__PURE__ */
|
|
2253
|
+
return /* @__PURE__ */ jsx60(UnlinkRow, { button }, button.attributes.value);
|
|
2149
2254
|
})
|
|
2150
2255
|
] });
|
|
2151
2256
|
}
|
|
@@ -2154,7 +2259,7 @@ function UnlinkRow({ button }) {
|
|
|
2154
2259
|
const [clicked, setClicked] = useDebounceValue2(false, 100);
|
|
2155
2260
|
const {
|
|
2156
2261
|
formState: { isSubmitting }
|
|
2157
|
-
} =
|
|
2262
|
+
} = useFormContext8();
|
|
2158
2263
|
const attrs = button.attributes;
|
|
2159
2264
|
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
2160
2265
|
const Logo = provider_logos_default[attrs.value.split("-")[0]];
|
|
@@ -2169,10 +2274,10 @@ function UnlinkRow({ button }) {
|
|
|
2169
2274
|
}, [isSubmitting, setClicked]);
|
|
2170
2275
|
return /* @__PURE__ */ jsxs32("div", { className: "flex justify-between", children: [
|
|
2171
2276
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-6", children: [
|
|
2172
|
-
Logo ? /* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2277
|
+
Logo ? /* @__PURE__ */ jsx60(Logo, { size: 32 }) : /* @__PURE__ */ jsx60(provider_logos_default.generic, { size: 32 }),
|
|
2278
|
+
/* @__PURE__ */ jsx60("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
2174
2279
|
] }),
|
|
2175
|
-
/* @__PURE__ */
|
|
2280
|
+
/* @__PURE__ */ jsx60(
|
|
2176
2281
|
"button",
|
|
2177
2282
|
{
|
|
2178
2283
|
...attrs,
|
|
@@ -2181,7 +2286,7 @@ function UnlinkRow({ button }) {
|
|
|
2181
2286
|
disabled: isSubmitting,
|
|
2182
2287
|
className: "relative",
|
|
2183
2288
|
title: `Unlink ${provider}`,
|
|
2184
|
-
children: clicked ? /* @__PURE__ */
|
|
2289
|
+
children: clicked ? /* @__PURE__ */ jsx60(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx60(
|
|
2185
2290
|
trash_default,
|
|
2186
2291
|
{
|
|
2187
2292
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2194,20 +2299,20 @@ function UnlinkRow({ button }) {
|
|
|
2194
2299
|
}
|
|
2195
2300
|
|
|
2196
2301
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
2197
|
-
import { useComponents as
|
|
2198
|
-
import { useFormContext as
|
|
2199
|
-
import { jsx as
|
|
2302
|
+
import { useComponents as useComponents5 } from "@ory/elements-react";
|
|
2303
|
+
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
2304
|
+
import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2200
2305
|
function DefaultSettingsPasskey({
|
|
2201
2306
|
triggerButton,
|
|
2202
2307
|
removeButtons
|
|
2203
2308
|
}) {
|
|
2204
2309
|
const {
|
|
2205
2310
|
formState: { isSubmitting }
|
|
2206
|
-
} =
|
|
2207
|
-
const { Node: Node2 } =
|
|
2311
|
+
} = useFormContext9();
|
|
2312
|
+
const { Node: Node2 } = useComponents5();
|
|
2208
2313
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2209
2314
|
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
2210
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ jsx61("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx61(
|
|
2211
2316
|
Node2.Button,
|
|
2212
2317
|
{
|
|
2213
2318
|
node: triggerButton,
|
|
@@ -2216,8 +2321,8 @@ function DefaultSettingsPasskey({
|
|
|
2216
2321
|
}
|
|
2217
2322
|
) }),
|
|
2218
2323
|
hasRemoveButtons ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
2219
|
-
/* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2324
|
+
/* @__PURE__ */ jsx61(DefaultHorizontalDivider, {}),
|
|
2325
|
+
/* @__PURE__ */ jsx61("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
2221
2326
|
var _a, _b;
|
|
2222
2327
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2223
2328
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -2229,7 +2334,7 @@ function DefaultSettingsPasskey({
|
|
|
2229
2334
|
className: "flex justify-between gap-6 md:items-center",
|
|
2230
2335
|
children: [
|
|
2231
2336
|
/* @__PURE__ */ jsxs33("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2232
|
-
/* @__PURE__ */
|
|
2337
|
+
/* @__PURE__ */ jsx61(
|
|
2233
2338
|
passkey_default,
|
|
2234
2339
|
{
|
|
2235
2340
|
size: 32,
|
|
@@ -2238,15 +2343,15 @@ function DefaultSettingsPasskey({
|
|
|
2238
2343
|
),
|
|
2239
2344
|
/* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2240
2345
|
/* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col truncate", children: [
|
|
2241
|
-
/* @__PURE__ */
|
|
2242
|
-
/* @__PURE__ */
|
|
2346
|
+
/* @__PURE__ */ jsx61("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2347
|
+
/* @__PURE__ */ jsx61("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2243
2348
|
] }),
|
|
2244
|
-
addedAt && /* @__PURE__ */
|
|
2349
|
+
addedAt && /* @__PURE__ */ jsx61("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2245
2350
|
dateStyle: "long"
|
|
2246
2351
|
}).format(new Date(addedAt)) })
|
|
2247
2352
|
] })
|
|
2248
2353
|
] }),
|
|
2249
|
-
/* @__PURE__ */
|
|
2354
|
+
/* @__PURE__ */ jsx61(
|
|
2250
2355
|
"button",
|
|
2251
2356
|
{
|
|
2252
2357
|
...node.attributes,
|
|
@@ -2254,7 +2359,7 @@ function DefaultSettingsPasskey({
|
|
|
2254
2359
|
onClick: node.onClick,
|
|
2255
2360
|
disabled: isSubmitting,
|
|
2256
2361
|
className: "relative",
|
|
2257
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2362
|
+
children: isSubmitting ? /* @__PURE__ */ jsx61(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx61(
|
|
2258
2363
|
trash_default,
|
|
2259
2364
|
{
|
|
2260
2365
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2274,25 +2379,25 @@ function DefaultSettingsPasskey({
|
|
|
2274
2379
|
|
|
2275
2380
|
// src/theme/default/assets/icons/download.svg
|
|
2276
2381
|
import * as React31 from "react";
|
|
2277
|
-
import { jsx as
|
|
2382
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2278
2383
|
var SvgDownload = (props) => {
|
|
2279
2384
|
var _a, _b;
|
|
2280
|
-
return /* @__PURE__ */
|
|
2385
|
+
return /* @__PURE__ */ jsx62("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__ */ jsx62("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" }) });
|
|
2281
2386
|
};
|
|
2282
2387
|
var download_default = SvgDownload;
|
|
2283
2388
|
|
|
2284
2389
|
// src/theme/default/assets/icons/refresh.svg
|
|
2285
2390
|
import * as React32 from "react";
|
|
2286
|
-
import { jsx as
|
|
2391
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2287
2392
|
var SvgRefresh = (props) => {
|
|
2288
2393
|
var _a, _b;
|
|
2289
|
-
return /* @__PURE__ */
|
|
2394
|
+
return /* @__PURE__ */ jsx63("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__ */ jsx63("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" }) });
|
|
2290
2395
|
};
|
|
2291
2396
|
var refresh_default = SvgRefresh;
|
|
2292
2397
|
|
|
2293
2398
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
2294
|
-
import { useFormContext as
|
|
2295
|
-
import { Fragment as Fragment5, jsx as
|
|
2399
|
+
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
2400
|
+
import { Fragment as Fragment5, jsx as jsx64, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2296
2401
|
function DefaultSettingsRecoveryCodes({
|
|
2297
2402
|
codes,
|
|
2298
2403
|
regnerateButton,
|
|
@@ -2302,7 +2407,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2302
2407
|
}) {
|
|
2303
2408
|
const {
|
|
2304
2409
|
formState: { isSubmitting }
|
|
2305
|
-
} =
|
|
2410
|
+
} = useFormContext10();
|
|
2306
2411
|
const onDownload = () => {
|
|
2307
2412
|
const element = document.createElement("a");
|
|
2308
2413
|
const file = new Blob([codes.join("\n")], {
|
|
@@ -2315,11 +2420,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2315
2420
|
};
|
|
2316
2421
|
const hasCodes = codes.length >= 1;
|
|
2317
2422
|
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-8", children: [
|
|
2318
|
-
codes.length > 0 && /* @__PURE__ */
|
|
2423
|
+
codes.length > 0 && /* @__PURE__ */ jsx64(DefaultHorizontalDivider, {}),
|
|
2319
2424
|
/* @__PURE__ */ jsxs34("div", { className: "flex gap-4 justify-between", children: [
|
|
2320
|
-
/* @__PURE__ */
|
|
2425
|
+
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
2321
2426
|
/* @__PURE__ */ jsxs34("div", { className: "flex gap-2", children: [
|
|
2322
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */
|
|
2427
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx64(
|
|
2323
2428
|
"button",
|
|
2324
2429
|
{
|
|
2325
2430
|
...regnerateButton.attributes,
|
|
@@ -2328,7 +2433,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2328
2433
|
onClick: onRegenerate,
|
|
2329
2434
|
disabled: isSubmitting,
|
|
2330
2435
|
"data-loading": isSubmitting,
|
|
2331
|
-
children: /* @__PURE__ */
|
|
2436
|
+
children: /* @__PURE__ */ jsx64(
|
|
2332
2437
|
refresh_default,
|
|
2333
2438
|
{
|
|
2334
2439
|
size: 24,
|
|
@@ -2337,7 +2442,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2337
2442
|
)
|
|
2338
2443
|
}
|
|
2339
2444
|
),
|
|
2340
|
-
revealButton && /* @__PURE__ */
|
|
2445
|
+
revealButton && /* @__PURE__ */ jsx64(Fragment5, { children: /* @__PURE__ */ jsx64(
|
|
2341
2446
|
"button",
|
|
2342
2447
|
{
|
|
2343
2448
|
...revealButton.attributes,
|
|
@@ -2345,7 +2450,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2345
2450
|
className: "ml-auto",
|
|
2346
2451
|
onClick: onReveal,
|
|
2347
2452
|
title: "Reveal recovery codes",
|
|
2348
|
-
children: /* @__PURE__ */
|
|
2453
|
+
children: /* @__PURE__ */ jsx64(
|
|
2349
2454
|
eye_default,
|
|
2350
2455
|
{
|
|
2351
2456
|
size: 24,
|
|
@@ -2354,7 +2459,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2354
2459
|
)
|
|
2355
2460
|
}
|
|
2356
2461
|
) }),
|
|
2357
|
-
hasCodes && /* @__PURE__ */
|
|
2462
|
+
hasCodes && /* @__PURE__ */ jsx64(
|
|
2358
2463
|
"button",
|
|
2359
2464
|
{
|
|
2360
2465
|
onClick: onDownload,
|
|
@@ -2362,7 +2467,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2362
2467
|
className: "ml-auto",
|
|
2363
2468
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
2364
2469
|
title: "Download recovery codes",
|
|
2365
|
-
children: /* @__PURE__ */
|
|
2470
|
+
children: /* @__PURE__ */ jsx64(
|
|
2366
2471
|
download_default,
|
|
2367
2472
|
{
|
|
2368
2473
|
size: 24,
|
|
@@ -2373,32 +2478,32 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2373
2478
|
)
|
|
2374
2479
|
] })
|
|
2375
2480
|
] }),
|
|
2376
|
-
hasCodes ? /* @__PURE__ */
|
|
2481
|
+
hasCodes ? /* @__PURE__ */ jsx64("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx64(
|
|
2377
2482
|
"div",
|
|
2378
2483
|
{
|
|
2379
2484
|
className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-5 flex-wrap gap-4 text-sm text-interface-foreground-default-primary",
|
|
2380
2485
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
2381
|
-
children: codes.map((code) => /* @__PURE__ */
|
|
2486
|
+
children: codes.map((code) => /* @__PURE__ */ jsx64("p", { children: code }, code))
|
|
2382
2487
|
}
|
|
2383
2488
|
) }) : null
|
|
2384
2489
|
] });
|
|
2385
2490
|
}
|
|
2386
2491
|
|
|
2387
2492
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2388
|
-
import { useComponents as
|
|
2493
|
+
import { useComponents as useComponents6 } from "@ory/elements-react";
|
|
2389
2494
|
|
|
2390
2495
|
// src/theme/default/assets/icons/qrcode.svg
|
|
2391
2496
|
import * as React33 from "react";
|
|
2392
|
-
import { jsx as
|
|
2497
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2393
2498
|
var SvgQrcode = (props) => {
|
|
2394
2499
|
var _a, _b;
|
|
2395
|
-
return /* @__PURE__ */
|
|
2500
|
+
return /* @__PURE__ */ jsx65("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__ */ jsx65("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" }) });
|
|
2396
2501
|
};
|
|
2397
2502
|
var qrcode_default = SvgQrcode;
|
|
2398
2503
|
|
|
2399
2504
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2400
|
-
import { useFormContext as
|
|
2401
|
-
import { jsx as
|
|
2505
|
+
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2506
|
+
import { jsx as jsx66, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2402
2507
|
function DefaultSettingsTotp({
|
|
2403
2508
|
totpImage,
|
|
2404
2509
|
totpInput,
|
|
@@ -2406,10 +2511,10 @@ function DefaultSettingsTotp({
|
|
|
2406
2511
|
totpUnlink,
|
|
2407
2512
|
onUnlink
|
|
2408
2513
|
}) {
|
|
2409
|
-
const { Node: Node2, Card } =
|
|
2514
|
+
const { Node: Node2, Card } = useComponents6();
|
|
2410
2515
|
const {
|
|
2411
2516
|
formState: { isSubmitting }
|
|
2412
|
-
} =
|
|
2517
|
+
} = useFormContext11();
|
|
2413
2518
|
if (totpUnlink) {
|
|
2414
2519
|
const {
|
|
2415
2520
|
type,
|
|
@@ -2419,18 +2524,18 @@ function DefaultSettingsTotp({
|
|
|
2419
2524
|
...buttonAttrs
|
|
2420
2525
|
} = totpUnlink.attributes;
|
|
2421
2526
|
return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2422
|
-
/* @__PURE__ */
|
|
2527
|
+
/* @__PURE__ */ jsx66("div", { className: "col-span-full", children: /* @__PURE__ */ jsx66(Card.Divider, {}) }),
|
|
2423
2528
|
/* @__PURE__ */ jsxs35("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
/* @__PURE__ */
|
|
2426
|
-
/* @__PURE__ */
|
|
2529
|
+
/* @__PURE__ */ jsx66("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx66(qrcode_default, { size: 32 }) }),
|
|
2530
|
+
/* @__PURE__ */ jsx66("div", { className: "mr-auto flex flex-col", children: /* @__PURE__ */ jsx66("p", { className: "text-sm font-medium text-interface-foreground-default-primary", children: "Authenticator app" }) }),
|
|
2531
|
+
/* @__PURE__ */ jsx66(
|
|
2427
2532
|
"button",
|
|
2428
2533
|
{
|
|
2429
2534
|
type: type === "button" ? "button" : "submit",
|
|
2430
2535
|
...buttonAttrs,
|
|
2431
2536
|
onClick: onUnlink,
|
|
2432
2537
|
disabled: isSubmitting,
|
|
2433
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2538
|
+
children: isSubmitting ? /* @__PURE__ */ jsx66(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx66(
|
|
2434
2539
|
trash_default,
|
|
2435
2540
|
{
|
|
2436
2541
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2444,8 +2549,8 @@ function DefaultSettingsTotp({
|
|
|
2444
2549
|
}
|
|
2445
2550
|
if (totpImage && totpSecret && totpInput) {
|
|
2446
2551
|
return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2447
|
-
/* @__PURE__ */
|
|
2448
|
-
/* @__PURE__ */
|
|
2552
|
+
/* @__PURE__ */ jsx66("div", { className: "col-span-full", children: /* @__PURE__ */ jsx66(DefaultHorizontalDivider, {}) }),
|
|
2553
|
+
/* @__PURE__ */ jsx66("div", { className: "flex justify-center rounded-cards bg-interface-background-default-secondary p-8", children: /* @__PURE__ */ jsx66("div", { className: "aspect-square h-44 rounded bg-[white]", children: /* @__PURE__ */ jsx66("div", { className: "-m-3 antialiased mix-blend-multiply", children: /* @__PURE__ */ jsx66(
|
|
2449
2554
|
Node2.Image,
|
|
2450
2555
|
{
|
|
2451
2556
|
node: totpImage,
|
|
@@ -2455,12 +2560,12 @@ function DefaultSettingsTotp({
|
|
|
2455
2560
|
}
|
|
2456
2561
|
) }) }) }),
|
|
2457
2562
|
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-6", children: [
|
|
2458
|
-
/* @__PURE__ */
|
|
2563
|
+
/* @__PURE__ */ jsx66(
|
|
2459
2564
|
Node2.Label,
|
|
2460
2565
|
{
|
|
2461
2566
|
node: totpSecret,
|
|
2462
2567
|
attributes: totpSecret.attributes,
|
|
2463
|
-
children: /* @__PURE__ */
|
|
2568
|
+
children: /* @__PURE__ */ jsx66(
|
|
2464
2569
|
Node2.Input,
|
|
2465
2570
|
{
|
|
2466
2571
|
node: totpSecret,
|
|
@@ -2475,12 +2580,12 @@ function DefaultSettingsTotp({
|
|
|
2475
2580
|
)
|
|
2476
2581
|
}
|
|
2477
2582
|
),
|
|
2478
|
-
/* @__PURE__ */
|
|
2583
|
+
/* @__PURE__ */ jsx66(
|
|
2479
2584
|
Node2.Label,
|
|
2480
2585
|
{
|
|
2481
2586
|
attributes: totpInput.attributes,
|
|
2482
2587
|
node: totpInput,
|
|
2483
|
-
children: /* @__PURE__ */
|
|
2588
|
+
children: /* @__PURE__ */ jsx66(
|
|
2484
2589
|
Node2.CodeInput,
|
|
2485
2590
|
{
|
|
2486
2591
|
node: totpInput,
|
|
@@ -2495,20 +2600,20 @@ function DefaultSettingsTotp({
|
|
|
2495
2600
|
}
|
|
2496
2601
|
|
|
2497
2602
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2498
|
-
import { useComponents as
|
|
2603
|
+
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
2499
2604
|
|
|
2500
2605
|
// src/theme/default/assets/icons/key.svg
|
|
2501
2606
|
import * as React34 from "react";
|
|
2502
|
-
import { jsx as
|
|
2607
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2503
2608
|
var SvgKey = (props) => {
|
|
2504
2609
|
var _a, _b;
|
|
2505
|
-
return /* @__PURE__ */
|
|
2610
|
+
return /* @__PURE__ */ jsx67("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__ */ jsx67("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" }) });
|
|
2506
2611
|
};
|
|
2507
2612
|
var key_default = SvgKey;
|
|
2508
2613
|
|
|
2509
2614
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2510
|
-
import { useFormContext as
|
|
2511
|
-
import { jsx as
|
|
2615
|
+
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
2616
|
+
import { jsx as jsx68, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2512
2617
|
function DefaultSettingsWebauthn({
|
|
2513
2618
|
nameInput,
|
|
2514
2619
|
triggerButton,
|
|
@@ -2516,17 +2621,17 @@ function DefaultSettingsWebauthn({
|
|
|
2516
2621
|
}) {
|
|
2517
2622
|
const {
|
|
2518
2623
|
formState: { isSubmitting }
|
|
2519
|
-
} =
|
|
2520
|
-
const { Node: Node2, Card } =
|
|
2624
|
+
} = useFormContext12();
|
|
2625
|
+
const { Node: Node2, Card } = useComponents7();
|
|
2521
2626
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2522
2627
|
return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
|
|
2523
2628
|
/* @__PURE__ */ jsxs36("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2524
|
-
/* @__PURE__ */
|
|
2629
|
+
/* @__PURE__ */ jsx68("div", { className: "flex-1", children: /* @__PURE__ */ jsx68(
|
|
2525
2630
|
Node2.Label,
|
|
2526
2631
|
{
|
|
2527
2632
|
node: nameInput,
|
|
2528
2633
|
attributes: nameInput.attributes,
|
|
2529
|
-
children: /* @__PURE__ */
|
|
2634
|
+
children: /* @__PURE__ */ jsx68(
|
|
2530
2635
|
Node2.Input,
|
|
2531
2636
|
{
|
|
2532
2637
|
node: nameInput,
|
|
@@ -2535,7 +2640,7 @@ function DefaultSettingsWebauthn({
|
|
|
2535
2640
|
)
|
|
2536
2641
|
}
|
|
2537
2642
|
) }),
|
|
2538
|
-
triggerButton ? /* @__PURE__ */
|
|
2643
|
+
triggerButton ? /* @__PURE__ */ jsx68(
|
|
2539
2644
|
Node2.Button,
|
|
2540
2645
|
{
|
|
2541
2646
|
node: triggerButton,
|
|
@@ -2545,8 +2650,8 @@ function DefaultSettingsWebauthn({
|
|
|
2545
2650
|
) : null
|
|
2546
2651
|
] }),
|
|
2547
2652
|
hasRemoveButtons ? /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
|
|
2548
|
-
/* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2653
|
+
/* @__PURE__ */ jsx68(Card.Divider, {}),
|
|
2654
|
+
/* @__PURE__ */ jsx68("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
2550
2655
|
var _a, _b;
|
|
2551
2656
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2552
2657
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -2558,7 +2663,7 @@ function DefaultSettingsWebauthn({
|
|
|
2558
2663
|
className: "flex justify-between gap-6 md:items-center",
|
|
2559
2664
|
children: [
|
|
2560
2665
|
/* @__PURE__ */ jsxs36("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2561
|
-
/* @__PURE__ */
|
|
2666
|
+
/* @__PURE__ */ jsx68(
|
|
2562
2667
|
key_default,
|
|
2563
2668
|
{
|
|
2564
2669
|
size: 32,
|
|
@@ -2567,15 +2672,15 @@ function DefaultSettingsWebauthn({
|
|
|
2567
2672
|
),
|
|
2568
2673
|
/* @__PURE__ */ jsxs36("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2569
2674
|
/* @__PURE__ */ jsxs36("div", { className: "flex-1 flex-col truncate", children: [
|
|
2570
|
-
/* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ jsx68("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2676
|
+
/* @__PURE__ */ jsx68("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2572
2677
|
] }),
|
|
2573
|
-
addedAt && /* @__PURE__ */
|
|
2678
|
+
addedAt && /* @__PURE__ */ jsx68("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2574
2679
|
dateStyle: "long"
|
|
2575
2680
|
}).format(new Date(addedAt)) })
|
|
2576
2681
|
] })
|
|
2577
2682
|
] }),
|
|
2578
|
-
/* @__PURE__ */
|
|
2683
|
+
/* @__PURE__ */ jsx68(
|
|
2579
2684
|
"button",
|
|
2580
2685
|
{
|
|
2581
2686
|
...node.attributes,
|
|
@@ -2583,7 +2688,7 @@ function DefaultSettingsWebauthn({
|
|
|
2583
2688
|
onClick: node.onClick,
|
|
2584
2689
|
disabled: isSubmitting,
|
|
2585
2690
|
className: "relative",
|
|
2586
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2691
|
+
children: isSubmitting ? /* @__PURE__ */ jsx68(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx68(
|
|
2587
2692
|
trash_default,
|
|
2588
2693
|
{
|
|
2589
2694
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2602,34 +2707,34 @@ function DefaultSettingsWebauthn({
|
|
|
2602
2707
|
}
|
|
2603
2708
|
|
|
2604
2709
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
2605
|
-
import { jsx as
|
|
2710
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2606
2711
|
function DefaultAuthMethodListContainer({
|
|
2607
2712
|
children
|
|
2608
2713
|
}) {
|
|
2609
|
-
return /* @__PURE__ */
|
|
2714
|
+
return /* @__PURE__ */ jsx69("div", { className: "grid grid-cols-1 gap-2", children });
|
|
2610
2715
|
}
|
|
2611
2716
|
|
|
2612
2717
|
// src/theme/default/components/form/captcha.tsx
|
|
2613
2718
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes3 } from "@ory/client-fetch";
|
|
2614
2719
|
import { Turnstile } from "@marsidev/react-turnstile";
|
|
2615
2720
|
import { useRef as useRef2 } from "react";
|
|
2616
|
-
import { useFormContext as
|
|
2617
|
-
import { jsx as
|
|
2721
|
+
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
2722
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2618
2723
|
var DefaultCaptcha = ({ node }) => {
|
|
2619
|
-
const { setValue } =
|
|
2724
|
+
const { setValue } = useFormContext13();
|
|
2620
2725
|
const ref = useRef2();
|
|
2621
2726
|
const nodes = [];
|
|
2622
2727
|
if (isUiNodeInputAttributes3(node.attributes)) {
|
|
2623
2728
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2624
2729
|
nodes.push(
|
|
2625
|
-
/* @__PURE__ */
|
|
2730
|
+
/* @__PURE__ */ jsx70(DefaultInput, { node, attributes: node.attributes }, 1)
|
|
2626
2731
|
);
|
|
2627
2732
|
}
|
|
2628
2733
|
}
|
|
2629
2734
|
if (isUiNodeInputAttributes3(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2630
2735
|
const options = JSON.parse(node.attributes.value);
|
|
2631
2736
|
nodes.push(
|
|
2632
|
-
/* @__PURE__ */
|
|
2737
|
+
/* @__PURE__ */ jsx70(
|
|
2633
2738
|
Turnstile,
|
|
2634
2739
|
{
|
|
2635
2740
|
ref,
|
|
@@ -2656,9 +2761,83 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
2656
2761
|
return nodes;
|
|
2657
2762
|
};
|
|
2658
2763
|
|
|
2764
|
+
// src/theme/default/assets/icons/personal.svg
|
|
2765
|
+
import * as React35 from "react";
|
|
2766
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2767
|
+
var SvgPersonal = (props) => {
|
|
2768
|
+
var _a, _b;
|
|
2769
|
+
return /* @__PURE__ */ jsx71("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__ */ jsx71("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" }) });
|
|
2770
|
+
};
|
|
2771
|
+
var personal_default = SvgPersonal;
|
|
2772
|
+
|
|
2773
|
+
// src/theme/default/assets/icons/message.svg
|
|
2774
|
+
import * as React36 from "react";
|
|
2775
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2776
|
+
var SvgMessage = (props) => {
|
|
2777
|
+
var _a, _b;
|
|
2778
|
+
return /* @__PURE__ */ jsx72("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__ */ jsx72("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" }) });
|
|
2779
|
+
};
|
|
2780
|
+
var message_default = SvgMessage;
|
|
2781
|
+
|
|
2782
|
+
// src/theme/default/assets/icons/phone.svg
|
|
2783
|
+
import * as React37 from "react";
|
|
2784
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2785
|
+
var SvgPhone = (props) => {
|
|
2786
|
+
var _a, _b;
|
|
2787
|
+
return /* @__PURE__ */ jsx73("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__ */ jsx73("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" }) });
|
|
2788
|
+
};
|
|
2789
|
+
var phone_default = SvgPhone;
|
|
2790
|
+
|
|
2791
|
+
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
2792
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
2793
|
+
import * as Switch from "@radix-ui/react-switch";
|
|
2794
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
2795
|
+
var ScopeIcons = {
|
|
2796
|
+
openid: personal_default,
|
|
2797
|
+
offline_access: personal_default,
|
|
2798
|
+
profile: personal_default,
|
|
2799
|
+
email: message_default,
|
|
2800
|
+
phone: phone_default
|
|
2801
|
+
};
|
|
2802
|
+
function DefaultConsentScopeCheckbox({
|
|
2803
|
+
attributes,
|
|
2804
|
+
onCheckedChange
|
|
2805
|
+
}) {
|
|
2806
|
+
var _a;
|
|
2807
|
+
const intl = useIntl13();
|
|
2808
|
+
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
2809
|
+
return /* @__PURE__ */ jsx74(
|
|
2810
|
+
ListItem,
|
|
2811
|
+
{
|
|
2812
|
+
as: "label",
|
|
2813
|
+
icon: Icon,
|
|
2814
|
+
title: intl.formatMessage({
|
|
2815
|
+
id: `consent.scope.${attributes.value}.title`,
|
|
2816
|
+
defaultMessage: attributes.value
|
|
2817
|
+
}),
|
|
2818
|
+
description: intl.formatMessage({
|
|
2819
|
+
id: `consent.scope.${attributes.value}.description`,
|
|
2820
|
+
defaultMessage: []
|
|
2821
|
+
}),
|
|
2822
|
+
className: "col-span-2",
|
|
2823
|
+
children: /* @__PURE__ */ jsx74(
|
|
2824
|
+
Switch.Root,
|
|
2825
|
+
{
|
|
2826
|
+
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",
|
|
2827
|
+
"data-testid": `ory/screen/consent/scope-checkbox`,
|
|
2828
|
+
value: attributes.value,
|
|
2829
|
+
onCheckedChange,
|
|
2830
|
+
defaultChecked: true,
|
|
2831
|
+
children: /* @__PURE__ */ jsx74(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" })
|
|
2832
|
+
}
|
|
2833
|
+
)
|
|
2834
|
+
}
|
|
2835
|
+
);
|
|
2836
|
+
}
|
|
2837
|
+
|
|
2659
2838
|
// src/theme/default/components/default-components.tsx
|
|
2660
2839
|
function getOryComponents(overrides) {
|
|
2661
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja;
|
|
2840
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la;
|
|
2662
2841
|
return {
|
|
2663
2842
|
Card: {
|
|
2664
2843
|
Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
|
|
@@ -2683,24 +2862,25 @@ function getOryComponents(overrides) {
|
|
|
2683
2862
|
Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
|
|
2684
2863
|
Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
|
|
2685
2864
|
Anchor: (_N = (_M = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _M.Anchor) != null ? _N : DefaultLinkButton,
|
|
2686
|
-
Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha
|
|
2865
|
+
Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha,
|
|
2866
|
+
ConsentScopeCheckbox: (_R = (_Q = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _Q.ConsentScopeCheckbox) != null ? _R : DefaultConsentScopeCheckbox
|
|
2687
2867
|
},
|
|
2688
2868
|
Form: {
|
|
2689
|
-
Root: (
|
|
2690
|
-
Group: (
|
|
2691
|
-
OidcRoot: (
|
|
2692
|
-
RecoveryCodesSettings: (
|
|
2693
|
-
TotpSettings: (
|
|
2694
|
-
OidcSettings: (
|
|
2695
|
-
WebauthnSettings: (
|
|
2696
|
-
PasskeySettings: (
|
|
2869
|
+
Root: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Root) != null ? _T : DefaultFormContainer,
|
|
2870
|
+
Group: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.Group) != null ? _V : DefaultGroupContainer,
|
|
2871
|
+
OidcRoot: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcRoot) != null ? _X : DefaultSocialButtonContainer,
|
|
2872
|
+
RecoveryCodesSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.RecoveryCodesSettings) != null ? _Z : DefaultSettingsRecoveryCodes,
|
|
2873
|
+
TotpSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.TotpSettings) != null ? _$ : DefaultSettingsTotp,
|
|
2874
|
+
OidcSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.OidcSettings) != null ? _ba : DefaultSettingsOidc,
|
|
2875
|
+
WebauthnSettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.WebauthnSettings) != null ? _da : DefaultSettingsWebauthn,
|
|
2876
|
+
PasskeySettings: (_fa = (_ea = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ea.PasskeySettings) != null ? _fa : DefaultSettingsPasskey
|
|
2697
2877
|
},
|
|
2698
2878
|
Message: {
|
|
2699
|
-
Root: (
|
|
2700
|
-
Content: (
|
|
2879
|
+
Root: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Root) != null ? _ha : DefaultMessageContainer,
|
|
2880
|
+
Content: (_ja = (_ia = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ia.Content) != null ? _ja : DefaultMessage
|
|
2701
2881
|
},
|
|
2702
2882
|
Page: {
|
|
2703
|
-
Header: (
|
|
2883
|
+
Header: (_la = (_ka = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ka.Header) != null ? _la : DefaultPageHeader
|
|
2704
2884
|
}
|
|
2705
2885
|
};
|
|
2706
2886
|
}
|
|
@@ -2723,25 +2903,25 @@ import {
|
|
|
2723
2903
|
} from "react";
|
|
2724
2904
|
|
|
2725
2905
|
// src/context/form-state.ts
|
|
2726
|
-
import { FlowType as
|
|
2906
|
+
import { FlowType as FlowType10 } from "@ory/client-fetch";
|
|
2727
2907
|
import { useReducer, useState as useState4 } from "react";
|
|
2728
2908
|
|
|
2729
2909
|
// src/components/card/card-two-step.utils.ts
|
|
2730
|
-
import { FlowType as
|
|
2910
|
+
import { FlowType as FlowType9, UiNodeGroupEnum as UiNodeGroupEnum4 } from "@ory/client-fetch";
|
|
2731
2911
|
|
|
2732
2912
|
// src/context/flow-context.tsx
|
|
2733
|
-
import { jsx as
|
|
2913
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2734
2914
|
var OryFlowContext = createContext2(null);
|
|
2735
2915
|
|
|
2736
2916
|
// src/context/provider.tsx
|
|
2737
|
-
import { jsx as
|
|
2917
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2738
2918
|
|
|
2739
2919
|
// src/components/card/header.tsx
|
|
2740
|
-
import { jsx as
|
|
2920
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2741
2921
|
|
|
2742
2922
|
// src/components/form/form-provider.tsx
|
|
2743
2923
|
import { UiNodeGroupEnum as UiNodeGroupEnum6 } from "@ory/client-fetch";
|
|
2744
|
-
import { FormProvider, useForm
|
|
2924
|
+
import { FormProvider, useForm } from "react-hook-form";
|
|
2745
2925
|
|
|
2746
2926
|
// src/components/form/form-helpers.ts
|
|
2747
2927
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client-fetch";
|
|
@@ -2750,16 +2930,16 @@ import { isUiNodeInputAttributes as isUiNodeInputAttributes4 } from "@ory/client
|
|
|
2750
2930
|
import { isUiNodeInputAttributes as isUiNodeInputAttributes5 } from "@ory/client-fetch";
|
|
2751
2931
|
|
|
2752
2932
|
// src/components/form/form-provider.tsx
|
|
2753
|
-
import { jsx as
|
|
2933
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
2754
2934
|
|
|
2755
2935
|
// src/components/card/card.tsx
|
|
2756
|
-
import { jsx as
|
|
2936
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2757
2937
|
|
|
2758
2938
|
// src/components/card/footer.tsx
|
|
2759
|
-
import { jsx as
|
|
2939
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
2760
2940
|
|
|
2761
2941
|
// src/components/card/content.tsx
|
|
2762
|
-
import { jsx as
|
|
2942
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
2763
2943
|
|
|
2764
2944
|
// src/components/card/card-two-step.tsx
|
|
2765
2945
|
import {
|
|
@@ -2768,36 +2948,36 @@ import {
|
|
|
2768
2948
|
UiNodeGroupEnum as UiNodeGroupEnum11,
|
|
2769
2949
|
UiNodeInputAttributesTypeEnum as UiNodeInputAttributesTypeEnum2
|
|
2770
2950
|
} from "@ory/client-fetch";
|
|
2771
|
-
import { useFormContext as
|
|
2951
|
+
import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
2772
2952
|
|
|
2773
2953
|
// src/components/form/form.tsx
|
|
2774
2954
|
import {
|
|
2775
|
-
FlowType as
|
|
2955
|
+
FlowType as FlowType17,
|
|
2776
2956
|
isUiNodeAnchorAttributes,
|
|
2777
2957
|
isUiNodeImageAttributes,
|
|
2778
2958
|
isUiNodeInputAttributes as isUiNodeInputAttributes6,
|
|
2779
2959
|
isUiNodeScriptAttributes
|
|
2780
2960
|
} from "@ory/client-fetch";
|
|
2781
|
-
import { useFormContext as
|
|
2782
|
-
import { useIntl as
|
|
2961
|
+
import { useFormContext as useFormContext15 } from "react-hook-form";
|
|
2962
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
2783
2963
|
|
|
2784
2964
|
// src/components/form/useOryFormSubmit.ts
|
|
2785
2965
|
import {
|
|
2786
|
-
FlowType as
|
|
2966
|
+
FlowType as FlowType16,
|
|
2787
2967
|
UiNodeGroupEnum as UiNodeGroupEnum7
|
|
2788
2968
|
} from "@ory/client-fetch";
|
|
2789
|
-
import { useFormContext as
|
|
2969
|
+
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
2790
2970
|
|
|
2791
2971
|
// src/util/onSubmitLogin.ts
|
|
2792
2972
|
import {
|
|
2793
|
-
FlowType as
|
|
2973
|
+
FlowType as FlowType11,
|
|
2794
2974
|
handleFlowError,
|
|
2795
2975
|
loginUrl
|
|
2796
2976
|
} from "@ory/client-fetch";
|
|
2797
2977
|
|
|
2798
2978
|
// src/util/onSubmitRecovery.ts
|
|
2799
2979
|
import {
|
|
2800
|
-
FlowType as
|
|
2980
|
+
FlowType as FlowType12,
|
|
2801
2981
|
handleContinueWith,
|
|
2802
2982
|
handleFlowError as handleFlowError2,
|
|
2803
2983
|
instanceOfContinueWithRecoveryUi,
|
|
@@ -2806,7 +2986,7 @@ import {
|
|
|
2806
2986
|
|
|
2807
2987
|
// src/util/onSubmitRegistration.ts
|
|
2808
2988
|
import {
|
|
2809
|
-
FlowType as
|
|
2989
|
+
FlowType as FlowType13,
|
|
2810
2990
|
handleContinueWith as handleContinueWith2,
|
|
2811
2991
|
handleFlowError as handleFlowError3,
|
|
2812
2992
|
registrationUrl
|
|
@@ -2814,7 +2994,7 @@ import {
|
|
|
2814
2994
|
|
|
2815
2995
|
// src/util/onSubmitSettings.ts
|
|
2816
2996
|
import {
|
|
2817
|
-
FlowType as
|
|
2997
|
+
FlowType as FlowType14,
|
|
2818
2998
|
handleContinueWith as handleContinueWith3,
|
|
2819
2999
|
handleFlowError as handleFlowError4,
|
|
2820
3000
|
isResponseError,
|
|
@@ -2824,16 +3004,16 @@ import {
|
|
|
2824
3004
|
|
|
2825
3005
|
// src/util/onSubmitVerification.ts
|
|
2826
3006
|
import {
|
|
2827
|
-
FlowType as
|
|
3007
|
+
FlowType as FlowType15,
|
|
2828
3008
|
handleFlowError as handleFlowError5,
|
|
2829
3009
|
verificationUrl
|
|
2830
3010
|
} from "@ory/client-fetch";
|
|
2831
3011
|
|
|
2832
3012
|
// src/components/form/form.tsx
|
|
2833
|
-
import { Fragment as Fragment6, jsx as
|
|
3013
|
+
import { Fragment as Fragment6, jsx as jsx82, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2834
3014
|
|
|
2835
3015
|
// src/components/form/messages.tsx
|
|
2836
|
-
import { jsx as
|
|
3016
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
2837
3017
|
|
|
2838
3018
|
// src/components/form/nodes/input.tsx
|
|
2839
3019
|
import {
|
|
@@ -2841,8 +3021,8 @@ import {
|
|
|
2841
3021
|
UiNodeInputAttributesTypeEnum
|
|
2842
3022
|
} from "@ory/client-fetch";
|
|
2843
3023
|
import { useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
2844
|
-
import { useFormContext as
|
|
2845
|
-
import { jsx as
|
|
3024
|
+
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
3025
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
2846
3026
|
|
|
2847
3027
|
// src/components/form/nodes/node.tsx
|
|
2848
3028
|
import {
|
|
@@ -2853,63 +3033,66 @@ import {
|
|
|
2853
3033
|
isUiNodeTextAttributes,
|
|
2854
3034
|
UiNodeGroupEnum as UiNodeGroupEnum9
|
|
2855
3035
|
} from "@ory/client-fetch";
|
|
2856
|
-
import { jsx as
|
|
3036
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
2857
3037
|
|
|
2858
3038
|
// src/components/form/social.tsx
|
|
2859
3039
|
import {
|
|
2860
3040
|
UiNodeGroupEnum as UiNodeGroupEnum10
|
|
2861
3041
|
} from "@ory/client-fetch";
|
|
2862
|
-
import { useFormContext as
|
|
2863
|
-
import { jsx as
|
|
3042
|
+
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
3043
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
2864
3044
|
|
|
2865
3045
|
// src/components/card/card-two-step.tsx
|
|
2866
|
-
import { Fragment as Fragment7, jsx as
|
|
3046
|
+
import { Fragment as Fragment7, jsx as jsx87, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2867
3047
|
|
|
2868
3048
|
// src/components/form/groups.tsx
|
|
2869
|
-
import { jsx as
|
|
3049
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
2870
3050
|
|
|
2871
3051
|
// src/components/form/section.tsx
|
|
2872
|
-
import { useFormContext as
|
|
2873
|
-
import { jsx as
|
|
3052
|
+
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
3053
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
3054
|
+
|
|
3055
|
+
// src/components/card/card-consent.tsx
|
|
3056
|
+
import { jsx as jsx90, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2874
3057
|
|
|
2875
3058
|
// src/components/generic/divider.tsx
|
|
2876
3059
|
import { UiNodeGroupEnum as UiNodeGroupEnum12 } from "@ory/client-fetch";
|
|
2877
|
-
import { jsx as
|
|
3060
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
2878
3061
|
|
|
2879
3062
|
// src/components/generic/page-header.tsx
|
|
2880
|
-
import { jsx as
|
|
3063
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
2881
3064
|
|
|
2882
3065
|
// src/components/settings/settings-card.tsx
|
|
2883
3066
|
import { UiNodeGroupEnum as UiNodeGroupEnum13 } from "@ory/client-fetch";
|
|
2884
|
-
import { useIntl as
|
|
3067
|
+
import { useIntl as useIntl20 } from "react-intl";
|
|
2885
3068
|
|
|
2886
3069
|
// src/components/settings/oidc-settings.tsx
|
|
2887
|
-
import { useIntl as useIntl14 } from "react-intl";
|
|
2888
|
-
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
2889
|
-
import { Fragment as Fragment8, jsx as jsx87, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2890
|
-
|
|
2891
|
-
// src/components/settings/passkey-settings.tsx
|
|
2892
|
-
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
2893
3070
|
import { useIntl as useIntl15 } from "react-intl";
|
|
2894
|
-
import {
|
|
3071
|
+
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
3072
|
+
import { Fragment as Fragment8, jsx as jsx93, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2895
3073
|
|
|
2896
|
-
// src/components/settings/
|
|
2897
|
-
import { useIntl as useIntl16 } from "react-intl";
|
|
3074
|
+
// src/components/settings/passkey-settings.tsx
|
|
2898
3075
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
2899
|
-
import {
|
|
3076
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
3077
|
+
import { Fragment as Fragment9, jsx as jsx94, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
2900
3078
|
|
|
2901
|
-
// src/components/settings/
|
|
2902
|
-
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
3079
|
+
// src/components/settings/recovery-codes-settings.tsx
|
|
2903
3080
|
import { useIntl as useIntl17 } from "react-intl";
|
|
2904
|
-
import {
|
|
3081
|
+
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
3082
|
+
import { Fragment as Fragment10, jsx as jsx95, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
2905
3083
|
|
|
2906
|
-
// src/components/settings/
|
|
3084
|
+
// src/components/settings/totp-settings.tsx
|
|
2907
3085
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
2908
3086
|
import { useIntl as useIntl18 } from "react-intl";
|
|
2909
|
-
import { Fragment as
|
|
3087
|
+
import { Fragment as Fragment11, jsx as jsx96, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
3088
|
+
|
|
3089
|
+
// src/components/settings/webauthn-settings.tsx
|
|
3090
|
+
import { useFormContext as useFormContext24 } from "react-hook-form";
|
|
3091
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
3092
|
+
import { Fragment as Fragment12, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
2910
3093
|
|
|
2911
3094
|
// src/components/settings/settings-card.tsx
|
|
2912
|
-
import { Fragment as Fragment13, jsx as
|
|
3095
|
+
import { Fragment as Fragment13, jsx as jsx98, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
2913
3096
|
|
|
2914
3097
|
// src/locales/en.json
|
|
2915
3098
|
var en_default = {
|
|
@@ -3174,6 +3357,20 @@ var en_default = {
|
|
|
3174
3357
|
"property.username": "username",
|
|
3175
3358
|
"property.identifier": "identifier",
|
|
3176
3359
|
"property.code": "code",
|
|
3360
|
+
"consent.title": "Authorize {party}",
|
|
3361
|
+
"consent.subtitle": "A third party application wants to access information associated with your account {identifier}.",
|
|
3362
|
+
"consent.scope.openid.title": "Identity",
|
|
3363
|
+
"consent.scope.openid.description": "Allows the application to verify your identity. This is required for authentication and a trusted login experience.",
|
|
3364
|
+
"consent.scope.offline_access.title": "Offline Access",
|
|
3365
|
+
"consent.scope.offline_access.description": "Allows this application to keep you signed in even when you're not actively using it.",
|
|
3366
|
+
"consent.scope.profile.title": "Profile Information",
|
|
3367
|
+
"consent.scope.profile.description": "Allows access to your basic profile details, including your username, first name, and last name.",
|
|
3368
|
+
"consent.scope.email.title": "Email Address",
|
|
3369
|
+
"consent.scope.email.description": "Retrieve your email address and its verification status.",
|
|
3370
|
+
"consent.scope.address.title": "Physical Address",
|
|
3371
|
+
"consent.scope.address.description": "Access your postal address.",
|
|
3372
|
+
"consent.scope.phone.title": "Phone Number",
|
|
3373
|
+
"consent.scope.phone.description": "Retrieve your phone number and its verification status.",
|
|
3177
3374
|
"error.title.what-happened": "What happened?",
|
|
3178
3375
|
"error.title.what-can-i-do": "What can I do?",
|
|
3179
3376
|
"error.instructions": "Please try again in a few minutes or contact the website operator.",
|
|
@@ -3445,6 +3642,20 @@ var de_default = {
|
|
|
3445
3642
|
"property.phone": "Telefon",
|
|
3446
3643
|
"property.code": "Code",
|
|
3447
3644
|
"property.username": "Benutzername",
|
|
3645
|
+
"consent.title": "Autorisieren {party}",
|
|
3646
|
+
"consent.subtitle": "Eine Drittanbieteranwendung m\xF6chte auf Informationen zugreifen, die mit Ihrem Konto {identifier} verkn\xFCpft sind.",
|
|
3647
|
+
"consent.scope.openid.title": "Identit\xE4t",
|
|
3648
|
+
"consent.scope.openid.description": "Erm\xF6glicht der Anwendung, Ihre Identit\xE4t zu \xFCberpr\xFCfen. Dies ist f\xFCr die Authentifizierung und eine vertrauensw\xFCrdige Login-Erfahrung erforderlich.",
|
|
3649
|
+
"consent.scope.offline_access.title": "Offline-Zugriff",
|
|
3650
|
+
"consent.scope.offline_access.description": "Erm\xF6glicht dieser Anwendung, Sie angemeldet zu lassen, auch wenn Sie sie nicht aktiv nutzen.",
|
|
3651
|
+
"consent.scope.profile.title": "Profilinformationen",
|
|
3652
|
+
"consent.scope.profile.description": "Erm\xF6glicht den Zugriff auf Ihre grundlegenden Profildetails, einschlie\xDFlich Ihres Benutzernamens, Vornamens und Nachnamens.",
|
|
3653
|
+
"consent.scope.email.title": "E-Mail-Adresse",
|
|
3654
|
+
"consent.scope.email.description": "Erm\xF6glicht den Abruf Ihrer E-Mail-Adresse und deren \xDCberpr\xFCfungsstatus.",
|
|
3655
|
+
"consent.scope.address.title": "Physische Adresse",
|
|
3656
|
+
"consent.scope.address.description": "Erm\xF6glicht den Zugriff auf Ihre Postanschrift.",
|
|
3657
|
+
"consent.scope.phone.title": "Telefonnummer",
|
|
3658
|
+
"consent.scope.phone.description": "Erm\xF6glicht den Abruf Ihrer Telefonnummer und deren \xDCberpr\xFCfungsstatus.",
|
|
3448
3659
|
"error.title.what-happened": "Was ist passiert?",
|
|
3449
3660
|
"error.footer.copy": "Kopieren",
|
|
3450
3661
|
"error.footer.text": "Bitte f\xFCgen Sie bei der Meldung dieses Fehlers die folgenden Informationen hinzu:",
|
|
@@ -3716,6 +3927,20 @@ var es_default = {
|
|
|
3716
3927
|
"property.password": "",
|
|
3717
3928
|
"property.phone": "",
|
|
3718
3929
|
"property.username": "",
|
|
3930
|
+
"consent.title": "Autorizar {party}",
|
|
3931
|
+
"consent.subtitle": "Una aplicaci\xF3n de terceros quiere acceder a la informaci\xF3n asociada a su cuenta {identifier}.",
|
|
3932
|
+
"consent.scope.openid.title": "Identidad",
|
|
3933
|
+
"consent.scope.openid.description": "Permite que la aplicaci\xF3n verifique su identidad. Esto es necesario para la autenticaci\xF3n y una experiencia de inicio de sesi\xF3n confiable.",
|
|
3934
|
+
"consent.scope.offline_access.title": "Acceso sin conexi\xF3n",
|
|
3935
|
+
"consent.scope.offline_access.description": "Permite que esta aplicaci\xF3n le mantenga conectado incluso cuando no la est\xE9 utilizando activamente.",
|
|
3936
|
+
"consent.scope.profile.title": "Informaci\xF3n del perfil",
|
|
3937
|
+
"consent.scope.profile.description": "Permite el acceso a los detalles b\xE1sicos de su perfil, incluyendo su nombre de usuario, nombre y apellido.",
|
|
3938
|
+
"consent.scope.email.title": "Direcci\xF3n de correo electr\xF3nico",
|
|
3939
|
+
"consent.scope.email.description": "Recupere su direcci\xF3n de correo electr\xF3nico y su estado de verificaci\xF3n.",
|
|
3940
|
+
"consent.scope.address.title": "Direcci\xF3n f\xEDsica",
|
|
3941
|
+
"consent.scope.address.description": "Acceda a su direcci\xF3n postal.",
|
|
3942
|
+
"consent.scope.phone.title": "N\xFAmero de tel\xE9fono",
|
|
3943
|
+
"consent.scope.phone.description": "Recupere su n\xFAmero de tel\xE9fono y su estado de verificaci\xF3n.",
|
|
3719
3944
|
"error.action.go-back": "",
|
|
3720
3945
|
"error.footer.copy": "",
|
|
3721
3946
|
"error.footer.text": "",
|
|
@@ -3987,6 +4212,20 @@ var fr_default = {
|
|
|
3987
4212
|
"property.password": "",
|
|
3988
4213
|
"property.phone": "",
|
|
3989
4214
|
"property.username": "",
|
|
4215
|
+
"consent.title": "Autoriser {party}",
|
|
4216
|
+
"consent.subtitle": "Une application tierce souhaite acc\xE9der aux informations associ\xE9es \xE0 votre compte {identifier}.",
|
|
4217
|
+
"consent.scope.openid.title": "Identit\xE9",
|
|
4218
|
+
"consent.scope.openid.description": "Permet \xE0 l'application de v\xE9rifier votre identit\xE9. Cela est n\xE9cessaire pour l'authentification et une exp\xE9rience de connexion fiable.",
|
|
4219
|
+
"consent.scope.offline_access.title": "Acc\xE8s hors ligne",
|
|
4220
|
+
"consent.scope.offline_access.description": "Permet \xE0 cette application de vous maintenir connect\xE9 m\xEAme lorsque vous ne l'utilisez pas activement.",
|
|
4221
|
+
"consent.scope.profile.title": "Informations de profil",
|
|
4222
|
+
"consent.scope.profile.description": "Permet l'acc\xE8s aux d\xE9tails de base de votre profil, y compris votre nom d'utilisateur, pr\xE9nom et nom.",
|
|
4223
|
+
"consent.scope.email.title": "Adresse e-mail",
|
|
4224
|
+
"consent.scope.email.description": "R\xE9cup\xE8re votre adresse e-mail et son statut de v\xE9rification.",
|
|
4225
|
+
"consent.scope.address.title": "Adresse physique",
|
|
4226
|
+
"consent.scope.address.description": "Acc\xE8de \xE0 votre adresse postale.",
|
|
4227
|
+
"consent.scope.phone.title": "Num\xE9ro de t\xE9l\xE9phone",
|
|
4228
|
+
"consent.scope.phone.description": "R\xE9cup\xE8re votre num\xE9ro de t\xE9l\xE9phone et son statut de v\xE9rification.",
|
|
3990
4229
|
"error.action.go-back": "",
|
|
3991
4230
|
"error.footer.copy": "",
|
|
3992
4231
|
"error.footer.text": "",
|
|
@@ -4258,6 +4497,20 @@ var nl_default = {
|
|
|
4258
4497
|
"property.password": "",
|
|
4259
4498
|
"property.phone": "",
|
|
4260
4499
|
"property.username": "",
|
|
4500
|
+
"consent.title": "Autoriseren {party}",
|
|
4501
|
+
"consent.subtitle": "Een derde partij applicatie wil toegang tot informatie die aan uw account {identifier} is gekoppeld.",
|
|
4502
|
+
"consent.scope.openid.title": "Identiteit",
|
|
4503
|
+
"consent.scope.openid.description": "Stelt de applicatie in staat uw identiteit te verifi\xEBren. Dit is vereist voor authenticatie en een betrouwbare inlogervaring.",
|
|
4504
|
+
"consent.scope.offline_access.title": "Offline toegang",
|
|
4505
|
+
"consent.scope.offline_access.description": "Stelt deze applicatie in staat u ingelogd te houden, zelfs wanneer u deze niet actief gebruikt.",
|
|
4506
|
+
"consent.scope.profile.title": "Profielinformatie",
|
|
4507
|
+
"consent.scope.profile.description": "Geeft toegang tot uw basisprofielgegevens, inclusief uw gebruikersnaam, voornaam en achternaam.",
|
|
4508
|
+
"consent.scope.email.title": "E-mailadres",
|
|
4509
|
+
"consent.scope.email.description": "Haal uw e-mailadres en de verificatiestatus ervan op.",
|
|
4510
|
+
"consent.scope.address.title": "Fysiek adres",
|
|
4511
|
+
"consent.scope.address.description": "Toegang tot uw postadres.",
|
|
4512
|
+
"consent.scope.phone.title": "Telefoonnummer",
|
|
4513
|
+
"consent.scope.phone.description": "Haal uw telefoonnummer en de verificatiestatus ervan op.",
|
|
4261
4514
|
"error.action.go-back": "",
|
|
4262
4515
|
"error.footer.copy": "",
|
|
4263
4516
|
"error.footer.text": "",
|
|
@@ -4529,6 +4782,20 @@ var pl_default = {
|
|
|
4529
4782
|
"property.phone": "",
|
|
4530
4783
|
"property.username": "",
|
|
4531
4784
|
"property.identifier": "",
|
|
4785
|
+
"consent.title": "Autoryzuj {party}",
|
|
4786
|
+
"consent.subtitle": "Aplikacja trzeciej strony chce uzyska\u0107 dost\u0119p do informacji powi\u0105zanych z Twoim kontem {identifier}.",
|
|
4787
|
+
"consent.scope.openid.title": "To\u017Csamo\u015B\u0107",
|
|
4788
|
+
"consent.scope.openid.description": "Pozwala aplikacji zweryfikowa\u0107 Twoj\u0105 to\u017Csamo\u015B\u0107. Jest to wymagane do uwierzytelniania i zapewnienia zaufanej sesji logowania.",
|
|
4789
|
+
"consent.scope.offline_access.title": "Dost\u0119p offline",
|
|
4790
|
+
"consent.scope.offline_access.description": "Pozwala aplikacji utrzyma\u0107 Twoje logowanie, nawet gdy nie korzystasz z niej aktywnie.",
|
|
4791
|
+
"consent.scope.profile.title": "Informacje profilowe",
|
|
4792
|
+
"consent.scope.profile.description": "Pozwala na dost\u0119p do podstawowych danych profilowych, w tym nazwy u\u017Cytkownika, imienia i nazwiska.",
|
|
4793
|
+
"consent.scope.email.title": "Adres e-mail",
|
|
4794
|
+
"consent.scope.email.description": "Pobierz sw\xF3j adres e-mail oraz status jego weryfikacji.",
|
|
4795
|
+
"consent.scope.address.title": "Adres fizyczny",
|
|
4796
|
+
"consent.scope.address.description": "Dost\u0119p do Twojego adresu pocztowego.",
|
|
4797
|
+
"consent.scope.phone.title": "Numer telefonu",
|
|
4798
|
+
"consent.scope.phone.description": "Pobierz sw\xF3j numer telefonu oraz status jego weryfikacji.",
|
|
4532
4799
|
"error.action.go-back": "",
|
|
4533
4800
|
"error.footer.copy": "",
|
|
4534
4801
|
"error.footer.text": "",
|
|
@@ -4800,6 +5067,20 @@ var pt_default = {
|
|
|
4800
5067
|
"property.password": "",
|
|
4801
5068
|
"property.phone": "",
|
|
4802
5069
|
"property.username": "",
|
|
5070
|
+
"consent.title": "Autorizar {party}",
|
|
5071
|
+
"consent.subtitle": "Um aplicativo de terceiros deseja acessar as informa\xE7\xF5es associadas \xE0 sua conta {identifier}.",
|
|
5072
|
+
"consent.scope.openid.title": "Identidade",
|
|
5073
|
+
"consent.scope.openid.description": "Permite que a aplica\xE7\xE3o verifique sua identidade. Isso \xE9 necess\xE1rio para a autentica\xE7\xE3o e uma experi\xEAncia de login confi\xE1vel.",
|
|
5074
|
+
"consent.scope.offline_access.title": "Acesso Offline",
|
|
5075
|
+
"consent.scope.offline_access.description": "Permite que este aplicativo mantenha voc\xEA conectado mesmo quando n\xE3o estiver usando-o ativamente.",
|
|
5076
|
+
"consent.scope.profile.title": "Informa\xE7\xF5es do Perfil",
|
|
5077
|
+
"consent.scope.profile.description": "Permite o acesso aos detalhes b\xE1sicos do seu perfil, incluindo seu nome de usu\xE1rio, primeiro nome e sobrenome.",
|
|
5078
|
+
"consent.scope.email.title": "Endere\xE7o de E-mail",
|
|
5079
|
+
"consent.scope.email.description": "Recupere seu endere\xE7o de e-mail e seu status de verifica\xE7\xE3o.",
|
|
5080
|
+
"consent.scope.address.title": "Endere\xE7o F\xEDsico",
|
|
5081
|
+
"consent.scope.address.description": "Acesse seu endere\xE7o postal.",
|
|
5082
|
+
"consent.scope.phone.title": "N\xFAmero de Telefone",
|
|
5083
|
+
"consent.scope.phone.description": "Recupere seu n\xFAmero de telefone e seu status de verifica\xE7\xE3o.",
|
|
4803
5084
|
"error.action.go-back": "",
|
|
4804
5085
|
"error.footer.copy": "",
|
|
4805
5086
|
"error.footer.text": "",
|
|
@@ -5071,6 +5352,20 @@ var sv_default = {
|
|
|
5071
5352
|
"property.username": "anv\xE4ndarnamn",
|
|
5072
5353
|
"property.identifier": "identifier",
|
|
5073
5354
|
"property.code": "kod",
|
|
5355
|
+
"consent.title": "Auktorisera {party}",
|
|
5356
|
+
"consent.subtitle": "En tredjepartsapplikation vill f\xE5 tillg\xE5ng till information kopplad till ditt konto {identifier}.",
|
|
5357
|
+
"consent.scope.openid.title": "Identitet",
|
|
5358
|
+
"consent.scope.openid.description": "G\xF6r det m\xF6jligt f\xF6r applikationen att verifiera din identitet. Detta kr\xE4vs f\xF6r autentisering och en p\xE5litlig inloggningsupplevelse.",
|
|
5359
|
+
"consent.scope.offline_access.title": "Offline-\xE5tkomst",
|
|
5360
|
+
"consent.scope.offline_access.description": "G\xF6r det m\xF6jligt f\xF6r denna applikation att h\xE5lla dig inloggad \xE4ven n\xE4r du inte aktivt anv\xE4nder den.",
|
|
5361
|
+
"consent.scope.profile.title": "Profilinformation",
|
|
5362
|
+
"consent.scope.profile.description": "Ger tillg\xE5ng till dina grundl\xE4ggande profiluppgifter, inklusive ditt anv\xE4ndarnamn, f\xF6rnamn och efternamn.",
|
|
5363
|
+
"consent.scope.email.title": "E-postadress",
|
|
5364
|
+
"consent.scope.email.description": "H\xE4mta din e-postadress och dess verifieringsstatus.",
|
|
5365
|
+
"consent.scope.address.title": "Fysisk adress",
|
|
5366
|
+
"consent.scope.address.description": "F\xE5 \xE5tkomst till din postadress.",
|
|
5367
|
+
"consent.scope.phone.title": "Telefonnummer",
|
|
5368
|
+
"consent.scope.phone.description": "H\xE4mta ditt telefonnummer och dess verifieringsstatus.",
|
|
5074
5369
|
"error.action.go-back": "",
|
|
5075
5370
|
"error.footer.copy": "",
|
|
5076
5371
|
"error.footer.text": "",
|
|
@@ -5092,7 +5387,7 @@ var OryLocales = {
|
|
|
5092
5387
|
};
|
|
5093
5388
|
|
|
5094
5389
|
// src/context/intl-context.tsx
|
|
5095
|
-
import { jsx as
|
|
5390
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
5096
5391
|
function mergeTranslations(customTranslations) {
|
|
5097
5392
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
5098
5393
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -5105,12 +5400,12 @@ var IntlProvider = ({
|
|
|
5105
5400
|
customTranslations
|
|
5106
5401
|
}) => {
|
|
5107
5402
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
5108
|
-
return /* @__PURE__ */
|
|
5403
|
+
return /* @__PURE__ */ jsx99(
|
|
5109
5404
|
OriginalIntlProvider,
|
|
5110
5405
|
{
|
|
5111
5406
|
onWarn: () => ({}),
|
|
5112
5407
|
defaultRichTextElements: {
|
|
5113
|
-
del: (chunks) => /* @__PURE__ */
|
|
5408
|
+
del: (chunks) => /* @__PURE__ */ jsx99("del", { children: chunks })
|
|
5114
5409
|
},
|
|
5115
5410
|
locale,
|
|
5116
5411
|
messages: messages[locale],
|
|
@@ -5122,7 +5417,7 @@ var IntlProvider = ({
|
|
|
5122
5417
|
|
|
5123
5418
|
// src/theme/default/flows/error.tsx
|
|
5124
5419
|
import { FormattedMessage } from "react-intl";
|
|
5125
|
-
import { jsx as
|
|
5420
|
+
import { jsx as jsx100, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5126
5421
|
function isOAuth2Error(error) {
|
|
5127
5422
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5128
5423
|
}
|
|
@@ -5175,47 +5470,47 @@ function Error2({
|
|
|
5175
5470
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5176
5471
|
const parsed = useStandardize(error);
|
|
5177
5472
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5178
|
-
return /* @__PURE__ */
|
|
5473
|
+
return /* @__PURE__ */ jsx100(
|
|
5179
5474
|
IntlProvider,
|
|
5180
5475
|
{
|
|
5181
5476
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5182
5477
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5183
|
-
children: /* @__PURE__ */
|
|
5478
|
+
children: /* @__PURE__ */ jsx100(Card, { children: /* @__PURE__ */ jsxs46(
|
|
5184
5479
|
"div",
|
|
5185
5480
|
{
|
|
5186
5481
|
className: "flex flex-col gap-6 antialiased",
|
|
5187
5482
|
"data-testid": "ory/screen/error",
|
|
5188
5483
|
children: [
|
|
5189
|
-
/* @__PURE__ */
|
|
5190
|
-
/* @__PURE__ */
|
|
5191
|
-
/* @__PURE__ */
|
|
5192
|
-
/* @__PURE__ */
|
|
5193
|
-
/* @__PURE__ */
|
|
5194
|
-
parsed.reason && /* @__PURE__ */
|
|
5484
|
+
/* @__PURE__ */ jsxs46("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5485
|
+
/* @__PURE__ */ jsx100(ErrorLogo, { config }),
|
|
5486
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-2", children: [
|
|
5487
|
+
/* @__PURE__ */ jsx100("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5488
|
+
/* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5489
|
+
parsed.reason && /* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5195
5490
|
] })
|
|
5196
5491
|
] }),
|
|
5197
|
-
/* @__PURE__ */
|
|
5198
|
-
/* @__PURE__ */
|
|
5199
|
-
/* @__PURE__ */
|
|
5200
|
-
/* @__PURE__ */
|
|
5201
|
-
/* @__PURE__ */
|
|
5492
|
+
/* @__PURE__ */ jsx100(Divider, {}),
|
|
5493
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-2", children: [
|
|
5494
|
+
/* @__PURE__ */ jsx100("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.title.what-can-i-do" }) }),
|
|
5495
|
+
/* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.instructions" }) }),
|
|
5496
|
+
/* @__PURE__ */ jsx100("div", { children: session ? /* @__PURE__ */ jsx100(LoggedInActions, { config }) : /* @__PURE__ */ jsx100(GoBackButton, { config }) })
|
|
5202
5497
|
] }),
|
|
5203
|
-
/* @__PURE__ */
|
|
5204
|
-
/* @__PURE__ */
|
|
5205
|
-
/* @__PURE__ */
|
|
5206
|
-
parsed.id && /* @__PURE__ */
|
|
5498
|
+
/* @__PURE__ */ jsx100(Divider, {}),
|
|
5499
|
+
/* @__PURE__ */ jsxs46("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5500
|
+
/* @__PURE__ */ jsx100("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.footer.text" }) }),
|
|
5501
|
+
parsed.id && /* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5207
5502
|
"ID: ",
|
|
5208
|
-
/* @__PURE__ */
|
|
5503
|
+
/* @__PURE__ */ jsx100("code", { children: parsed.id })
|
|
5209
5504
|
] }),
|
|
5210
|
-
/* @__PURE__ */
|
|
5505
|
+
/* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5211
5506
|
"Time: ",
|
|
5212
|
-
/* @__PURE__ */
|
|
5507
|
+
/* @__PURE__ */ jsx100("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5213
5508
|
] }),
|
|
5214
|
-
/* @__PURE__ */
|
|
5509
|
+
/* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5215
5510
|
"Message: ",
|
|
5216
|
-
/* @__PURE__ */
|
|
5511
|
+
/* @__PURE__ */ jsx100("code", { children: parsed.reason })
|
|
5217
5512
|
] }),
|
|
5218
|
-
/* @__PURE__ */
|
|
5513
|
+
/* @__PURE__ */ jsx100("div", { children: /* @__PURE__ */ jsx100(
|
|
5219
5514
|
"button",
|
|
5220
5515
|
{
|
|
5221
5516
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5227,7 +5522,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5227
5522
|
`;
|
|
5228
5523
|
void navigator.clipboard.writeText(text);
|
|
5229
5524
|
},
|
|
5230
|
-
children: /* @__PURE__ */
|
|
5525
|
+
children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.footer.copy" })
|
|
5231
5526
|
}
|
|
5232
5527
|
) })
|
|
5233
5528
|
] })
|
|
@@ -5239,7 +5534,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5239
5534
|
}
|
|
5240
5535
|
function LoggedInActions({ config }) {
|
|
5241
5536
|
const logoutFlow = useClientLogout(config);
|
|
5242
|
-
return /* @__PURE__ */
|
|
5537
|
+
return /* @__PURE__ */ jsx100(
|
|
5243
5538
|
"a",
|
|
5244
5539
|
{
|
|
5245
5540
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
@@ -5250,12 +5545,12 @@ function LoggedInActions({ config }) {
|
|
|
5250
5545
|
}
|
|
5251
5546
|
function GoBackButton({ config }) {
|
|
5252
5547
|
if ("default_redirect_url" in config.project) {
|
|
5253
|
-
return /* @__PURE__ */
|
|
5548
|
+
return /* @__PURE__ */ jsx100(
|
|
5254
5549
|
"a",
|
|
5255
5550
|
{
|
|
5256
5551
|
className: "text-interface-foreground-default-primary underline",
|
|
5257
5552
|
href: config.project.default_redirect_url,
|
|
5258
|
-
children: /* @__PURE__ */
|
|
5553
|
+
children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.action.go-back" })
|
|
5259
5554
|
}
|
|
5260
5555
|
);
|
|
5261
5556
|
}
|
|
@@ -5263,18 +5558,18 @@ function GoBackButton({ config }) {
|
|
|
5263
5558
|
}
|
|
5264
5559
|
function ErrorLogo({ config }) {
|
|
5265
5560
|
if (config.logoUrl) {
|
|
5266
|
-
return /* @__PURE__ */
|
|
5561
|
+
return /* @__PURE__ */ jsx100("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
5267
5562
|
}
|
|
5268
|
-
return /* @__PURE__ */
|
|
5563
|
+
return /* @__PURE__ */ jsx100("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.name });
|
|
5269
5564
|
}
|
|
5270
5565
|
|
|
5271
5566
|
// src/theme/default/flows/login.tsx
|
|
5272
|
-
import { FlowType as
|
|
5567
|
+
import { FlowType as FlowType18 } from "@ory/client-fetch";
|
|
5273
5568
|
import {
|
|
5274
5569
|
OryProvider,
|
|
5275
5570
|
OryTwoStepCard as OryTwoStepCard2
|
|
5276
5571
|
} from "@ory/elements-react";
|
|
5277
|
-
import { jsx as
|
|
5572
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
5278
5573
|
function Login({
|
|
5279
5574
|
flow,
|
|
5280
5575
|
config,
|
|
@@ -5282,25 +5577,25 @@ function Login({
|
|
|
5282
5577
|
components: flowOverrideComponents
|
|
5283
5578
|
}) {
|
|
5284
5579
|
const components = getOryComponents(flowOverrideComponents);
|
|
5285
|
-
return /* @__PURE__ */
|
|
5580
|
+
return /* @__PURE__ */ jsx101(
|
|
5286
5581
|
OryProvider,
|
|
5287
5582
|
{
|
|
5288
5583
|
config,
|
|
5289
5584
|
flow,
|
|
5290
|
-
flowType:
|
|
5585
|
+
flowType: FlowType18.Login,
|
|
5291
5586
|
components,
|
|
5292
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5587
|
+
children: children != null ? children : /* @__PURE__ */ jsx101(OryTwoStepCard2, {})
|
|
5293
5588
|
}
|
|
5294
5589
|
);
|
|
5295
5590
|
}
|
|
5296
5591
|
|
|
5297
5592
|
// src/theme/default/flows/recovery.tsx
|
|
5298
|
-
import { FlowType as
|
|
5593
|
+
import { FlowType as FlowType19 } from "@ory/client-fetch";
|
|
5299
5594
|
import {
|
|
5300
5595
|
OryProvider as OryProvider2,
|
|
5301
5596
|
OryTwoStepCard as OryTwoStepCard3
|
|
5302
5597
|
} from "@ory/elements-react";
|
|
5303
|
-
import { jsx as
|
|
5598
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5304
5599
|
function Recovery({
|
|
5305
5600
|
flow,
|
|
5306
5601
|
config,
|
|
@@ -5308,25 +5603,25 @@ function Recovery({
|
|
|
5308
5603
|
components: flowOverrideComponents
|
|
5309
5604
|
}) {
|
|
5310
5605
|
const components = getOryComponents(flowOverrideComponents);
|
|
5311
|
-
return /* @__PURE__ */
|
|
5606
|
+
return /* @__PURE__ */ jsx102(
|
|
5312
5607
|
OryProvider2,
|
|
5313
5608
|
{
|
|
5314
5609
|
config,
|
|
5315
5610
|
flow,
|
|
5316
|
-
flowType:
|
|
5611
|
+
flowType: FlowType19.Recovery,
|
|
5317
5612
|
components,
|
|
5318
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5613
|
+
children: children != null ? children : /* @__PURE__ */ jsx102(OryTwoStepCard3, {})
|
|
5319
5614
|
}
|
|
5320
5615
|
);
|
|
5321
5616
|
}
|
|
5322
5617
|
|
|
5323
5618
|
// src/theme/default/flows/registration.tsx
|
|
5324
|
-
import { FlowType as
|
|
5619
|
+
import { FlowType as FlowType20 } from "@ory/client-fetch";
|
|
5325
5620
|
import {
|
|
5326
5621
|
OryProvider as OryProvider3,
|
|
5327
5622
|
OryTwoStepCard as OryTwoStepCard4
|
|
5328
5623
|
} from "@ory/elements-react";
|
|
5329
|
-
import { jsx as
|
|
5624
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
5330
5625
|
function Registration({
|
|
5331
5626
|
flow,
|
|
5332
5627
|
children,
|
|
@@ -5334,26 +5629,26 @@ function Registration({
|
|
|
5334
5629
|
config
|
|
5335
5630
|
}) {
|
|
5336
5631
|
const components = getOryComponents(flowOverrideComponents);
|
|
5337
|
-
return /* @__PURE__ */
|
|
5632
|
+
return /* @__PURE__ */ jsx103(
|
|
5338
5633
|
OryProvider3,
|
|
5339
5634
|
{
|
|
5340
5635
|
config,
|
|
5341
5636
|
flow,
|
|
5342
|
-
flowType:
|
|
5637
|
+
flowType: FlowType20.Registration,
|
|
5343
5638
|
components,
|
|
5344
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5639
|
+
children: children != null ? children : /* @__PURE__ */ jsx103(OryTwoStepCard4, {})
|
|
5345
5640
|
}
|
|
5346
5641
|
);
|
|
5347
5642
|
}
|
|
5348
5643
|
|
|
5349
5644
|
// src/theme/default/flows/settings.tsx
|
|
5350
|
-
import { FlowType as
|
|
5645
|
+
import { FlowType as FlowType21 } from "@ory/client-fetch";
|
|
5351
5646
|
import {
|
|
5352
5647
|
HeadlessPageHeader,
|
|
5353
5648
|
OryProvider as OryProvider4,
|
|
5354
5649
|
OrySettingsCard
|
|
5355
5650
|
} from "@ory/elements-react";
|
|
5356
|
-
import { Fragment as Fragment14, jsx as
|
|
5651
|
+
import { Fragment as Fragment14, jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5357
5652
|
function Settings({
|
|
5358
5653
|
flow,
|
|
5359
5654
|
config,
|
|
@@ -5361,28 +5656,28 @@ function Settings({
|
|
|
5361
5656
|
components: flowOverrideComponents
|
|
5362
5657
|
}) {
|
|
5363
5658
|
const components = getOryComponents(flowOverrideComponents);
|
|
5364
|
-
return /* @__PURE__ */
|
|
5659
|
+
return /* @__PURE__ */ jsx104(
|
|
5365
5660
|
OryProvider4,
|
|
5366
5661
|
{
|
|
5367
5662
|
config,
|
|
5368
5663
|
flow,
|
|
5369
|
-
flowType:
|
|
5664
|
+
flowType: FlowType21.Settings,
|
|
5370
5665
|
components,
|
|
5371
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5372
|
-
/* @__PURE__ */
|
|
5373
|
-
/* @__PURE__ */
|
|
5666
|
+
children: children != null ? children : /* @__PURE__ */ jsxs47(Fragment14, { children: [
|
|
5667
|
+
/* @__PURE__ */ jsx104(HeadlessPageHeader, {}),
|
|
5668
|
+
/* @__PURE__ */ jsx104(OrySettingsCard, {})
|
|
5374
5669
|
] })
|
|
5375
5670
|
}
|
|
5376
5671
|
);
|
|
5377
5672
|
}
|
|
5378
5673
|
|
|
5379
5674
|
// src/theme/default/flows/verification.tsx
|
|
5380
|
-
import { FlowType as
|
|
5675
|
+
import { FlowType as FlowType22 } from "@ory/client-fetch";
|
|
5381
5676
|
import {
|
|
5382
5677
|
OryProvider as OryProvider5,
|
|
5383
5678
|
OryTwoStepCard as OryTwoStepCard5
|
|
5384
5679
|
} from "@ory/elements-react";
|
|
5385
|
-
import { jsx as
|
|
5680
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
5386
5681
|
function Verification({
|
|
5387
5682
|
flow,
|
|
5388
5683
|
config,
|
|
@@ -5390,18 +5685,196 @@ function Verification({
|
|
|
5390
5685
|
components: flowOverrideComponents
|
|
5391
5686
|
}) {
|
|
5392
5687
|
const components = getOryComponents(flowOverrideComponents);
|
|
5393
|
-
return /* @__PURE__ */
|
|
5688
|
+
return /* @__PURE__ */ jsx105(
|
|
5394
5689
|
OryProvider5,
|
|
5395
5690
|
{
|
|
5396
5691
|
config,
|
|
5397
5692
|
flow,
|
|
5398
|
-
flowType:
|
|
5693
|
+
flowType: FlowType22.Verification,
|
|
5694
|
+
components,
|
|
5695
|
+
children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard5, {})
|
|
5696
|
+
}
|
|
5697
|
+
);
|
|
5698
|
+
}
|
|
5699
|
+
|
|
5700
|
+
// src/theme/default/flows/consent.tsx
|
|
5701
|
+
import { FlowType as FlowType23 } from "@ory/client-fetch";
|
|
5702
|
+
import {
|
|
5703
|
+
OryConsentCard as OryConsentCard2,
|
|
5704
|
+
OryProvider as OryProvider6
|
|
5705
|
+
} from "@ory/elements-react";
|
|
5706
|
+
|
|
5707
|
+
// src/theme/default/utils/oauth2.ts
|
|
5708
|
+
import {
|
|
5709
|
+
UiTextTypeEnum
|
|
5710
|
+
} from "@ory/client-fetch";
|
|
5711
|
+
var rememberCheckbox = {
|
|
5712
|
+
type: "input",
|
|
5713
|
+
group: "oauth2_consent",
|
|
5714
|
+
meta: {
|
|
5715
|
+
label: {
|
|
5716
|
+
id: 9999111,
|
|
5717
|
+
text: "Remember my decision",
|
|
5718
|
+
type: UiTextTypeEnum.Info
|
|
5719
|
+
}
|
|
5720
|
+
},
|
|
5721
|
+
attributes: {
|
|
5722
|
+
node_type: "input",
|
|
5723
|
+
name: "remember",
|
|
5724
|
+
value: false,
|
|
5725
|
+
type: "checkbox",
|
|
5726
|
+
disabled: false
|
|
5727
|
+
},
|
|
5728
|
+
messages: []
|
|
5729
|
+
};
|
|
5730
|
+
var acceptButton = {
|
|
5731
|
+
type: "input",
|
|
5732
|
+
group: "oauth2_consent",
|
|
5733
|
+
meta: {
|
|
5734
|
+
label: {
|
|
5735
|
+
id: 9999111,
|
|
5736
|
+
text: "Accept",
|
|
5737
|
+
type: UiTextTypeEnum.Info
|
|
5738
|
+
}
|
|
5739
|
+
},
|
|
5740
|
+
attributes: {
|
|
5741
|
+
node_type: "input",
|
|
5742
|
+
name: "action",
|
|
5743
|
+
value: "accept",
|
|
5744
|
+
type: "submit",
|
|
5745
|
+
disabled: false
|
|
5746
|
+
},
|
|
5747
|
+
messages: []
|
|
5748
|
+
};
|
|
5749
|
+
var rejectButton = {
|
|
5750
|
+
type: "input",
|
|
5751
|
+
group: "oauth2_consent",
|
|
5752
|
+
meta: {
|
|
5753
|
+
label: {
|
|
5754
|
+
id: 9999111,
|
|
5755
|
+
text: "Reject",
|
|
5756
|
+
type: UiTextTypeEnum.Info
|
|
5757
|
+
}
|
|
5758
|
+
},
|
|
5759
|
+
attributes: {
|
|
5760
|
+
node_type: "input",
|
|
5761
|
+
name: "action",
|
|
5762
|
+
value: "reject",
|
|
5763
|
+
type: "submit",
|
|
5764
|
+
disabled: false
|
|
5765
|
+
},
|
|
5766
|
+
messages: []
|
|
5767
|
+
};
|
|
5768
|
+
function translateConsentChallengeToUiNodes(consentChallenge, csrfToken, formAction, session) {
|
|
5769
|
+
var _a;
|
|
5770
|
+
const ui = {
|
|
5771
|
+
action: formAction,
|
|
5772
|
+
nodes: [
|
|
5773
|
+
...scopesToUiNodes((_a = consentChallenge.requested_scope) != null ? _a : []),
|
|
5774
|
+
rememberCheckbox,
|
|
5775
|
+
rejectButton,
|
|
5776
|
+
acceptButton,
|
|
5777
|
+
csrfTokenNode(csrfToken),
|
|
5778
|
+
challengeNode(consentChallenge.challenge)
|
|
5779
|
+
],
|
|
5780
|
+
method: "POST",
|
|
5781
|
+
messages: []
|
|
5782
|
+
};
|
|
5783
|
+
return {
|
|
5784
|
+
id: "UNSET",
|
|
5785
|
+
created_at: /* @__PURE__ */ new Date(),
|
|
5786
|
+
expires_at: /* @__PURE__ */ new Date(),
|
|
5787
|
+
issued_at: /* @__PURE__ */ new Date(),
|
|
5788
|
+
state: "show_form",
|
|
5789
|
+
active: "oauth2_consent",
|
|
5790
|
+
ui,
|
|
5791
|
+
consent_request: consentChallenge,
|
|
5792
|
+
session
|
|
5793
|
+
};
|
|
5794
|
+
}
|
|
5795
|
+
function scopesToUiNodes(scopes) {
|
|
5796
|
+
return scopes.map((scope) => ({
|
|
5797
|
+
type: "input",
|
|
5798
|
+
group: "oauth2_consent",
|
|
5799
|
+
meta: {
|
|
5800
|
+
label: {
|
|
5801
|
+
id: 9999111,
|
|
5802
|
+
text: scope,
|
|
5803
|
+
type: UiTextTypeEnum.Info
|
|
5804
|
+
}
|
|
5805
|
+
},
|
|
5806
|
+
attributes: {
|
|
5807
|
+
node_type: "input",
|
|
5808
|
+
name: `grant_scope`,
|
|
5809
|
+
value: scope,
|
|
5810
|
+
type: "checkbox",
|
|
5811
|
+
disabled: false
|
|
5812
|
+
},
|
|
5813
|
+
messages: []
|
|
5814
|
+
}));
|
|
5815
|
+
}
|
|
5816
|
+
function csrfTokenNode(csrfToken) {
|
|
5817
|
+
return {
|
|
5818
|
+
type: "input",
|
|
5819
|
+
group: "default",
|
|
5820
|
+
meta: {},
|
|
5821
|
+
attributes: {
|
|
5822
|
+
node_type: "input",
|
|
5823
|
+
name: "csrf_token",
|
|
5824
|
+
value: csrfToken,
|
|
5825
|
+
type: "hidden",
|
|
5826
|
+
disabled: false
|
|
5827
|
+
},
|
|
5828
|
+
messages: []
|
|
5829
|
+
};
|
|
5830
|
+
}
|
|
5831
|
+
function challengeNode(challenge) {
|
|
5832
|
+
return {
|
|
5833
|
+
type: "input",
|
|
5834
|
+
group: "oauth2_consent",
|
|
5835
|
+
meta: {},
|
|
5836
|
+
attributes: {
|
|
5837
|
+
node_type: "input",
|
|
5838
|
+
name: "consent_challenge",
|
|
5839
|
+
value: challenge,
|
|
5840
|
+
type: "hidden",
|
|
5841
|
+
disabled: false
|
|
5842
|
+
},
|
|
5843
|
+
messages: []
|
|
5844
|
+
};
|
|
5845
|
+
}
|
|
5846
|
+
|
|
5847
|
+
// src/theme/default/flows/consent.tsx
|
|
5848
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
5849
|
+
function Consent({
|
|
5850
|
+
consentChallenge,
|
|
5851
|
+
session,
|
|
5852
|
+
config,
|
|
5853
|
+
components: Passed,
|
|
5854
|
+
children,
|
|
5855
|
+
csrfToken,
|
|
5856
|
+
formActionUrl
|
|
5857
|
+
}) {
|
|
5858
|
+
const components = getOryComponents(Passed);
|
|
5859
|
+
const flow = translateConsentChallengeToUiNodes(
|
|
5860
|
+
consentChallenge,
|
|
5861
|
+
csrfToken,
|
|
5862
|
+
formActionUrl,
|
|
5863
|
+
session
|
|
5864
|
+
);
|
|
5865
|
+
return /* @__PURE__ */ jsx106(
|
|
5866
|
+
OryProvider6,
|
|
5867
|
+
{
|
|
5868
|
+
config,
|
|
5869
|
+
flow,
|
|
5870
|
+
flowType: FlowType23.OAuth2Consent,
|
|
5399
5871
|
components,
|
|
5400
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5872
|
+
children: children != null ? children : /* @__PURE__ */ jsx106(OryConsentCard2, {})
|
|
5401
5873
|
}
|
|
5402
5874
|
);
|
|
5403
5875
|
}
|
|
5404
5876
|
export {
|
|
5877
|
+
Consent,
|
|
5405
5878
|
DefaultButtonSocial,
|
|
5406
5879
|
DefaultCard,
|
|
5407
5880
|
DefaultCardContent,
|