@ory/elements-react 0.0.0-pr.4a28a8f → 0.0.0-pr.6b3fe62
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 +38 -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/client/index.js +3 -3
- package/dist/index.d.mts +30 -5
- package/dist/index.d.ts +30 -5
- package/dist/index.js +291 -64
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +291 -65
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +48 -4
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +15 -3
- package/dist/theme/default/index.d.ts +15 -3
- package/dist/theme/default/index.js +1077 -534
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +1004 -448
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +16 -15
- package/tailwind/generated/default-variables.css +1 -1
- package/tsconfig.json +1 -1
|
@@ -40,8 +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";
|
|
44
|
-
import { useFormContext } from "react-hook-form";
|
|
43
|
+
import { useComponents, useOryFlow } from "@ory/elements-react";
|
|
45
44
|
import { useIntl } from "react-intl";
|
|
46
45
|
|
|
47
46
|
// src/theme/default/utils/url.ts
|
|
@@ -89,6 +88,10 @@ function appendRefresh(url, refresh) {
|
|
|
89
88
|
}
|
|
90
89
|
|
|
91
90
|
// src/util/ui/index.ts
|
|
91
|
+
import {
|
|
92
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes2,
|
|
93
|
+
isUiNodeScriptAttributes
|
|
94
|
+
} from "@ory/client-fetch";
|
|
92
95
|
import { UiNodeGroupEnum as UiNodeGroupEnum2 } from "@ory/client-fetch";
|
|
93
96
|
import { useMemo } from "react";
|
|
94
97
|
|
|
@@ -142,12 +145,22 @@ function nodesToAuthMethodGroups(nodes, excludeAuthMethods = []) {
|
|
|
142
145
|
].includes(group)
|
|
143
146
|
);
|
|
144
147
|
}
|
|
148
|
+
var findNode = (nodes, opt) => nodes.find((n) => {
|
|
149
|
+
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);
|
|
150
|
+
});
|
|
151
|
+
|
|
152
|
+
// src/util/nodes.ts
|
|
153
|
+
function findScreenSelectionButton(nodes) {
|
|
154
|
+
return nodes.find(
|
|
155
|
+
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
156
|
+
);
|
|
157
|
+
}
|
|
145
158
|
|
|
146
159
|
// src/theme/default/components/card/footer.tsx
|
|
147
160
|
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
148
161
|
function DefaultCardFooter() {
|
|
149
|
-
const
|
|
150
|
-
switch (flowType) {
|
|
162
|
+
const oryFlow = useOryFlow();
|
|
163
|
+
switch (oryFlow.flowType) {
|
|
151
164
|
case FlowType.Login:
|
|
152
165
|
return /* @__PURE__ */ jsx5(LoginCardFooter, {});
|
|
153
166
|
case FlowType.Registration:
|
|
@@ -156,6 +169,8 @@ function DefaultCardFooter() {
|
|
|
156
169
|
return /* @__PURE__ */ jsx5(RecoveryCardFooter, {});
|
|
157
170
|
case FlowType.Verification:
|
|
158
171
|
return /* @__PURE__ */ jsx5(VerificationCardFooter, {});
|
|
172
|
+
case FlowType.OAuth2Consent:
|
|
173
|
+
return /* @__PURE__ */ jsx5(ConsentCardFooter, { flow: oryFlow.flow });
|
|
159
174
|
default:
|
|
160
175
|
return null;
|
|
161
176
|
}
|
|
@@ -234,60 +249,45 @@ function LoginCardFooter() {
|
|
|
234
249
|
] })
|
|
235
250
|
] });
|
|
236
251
|
}
|
|
237
|
-
function findScreenSelectionButton(nodes) {
|
|
238
|
-
return nodes.find(
|
|
239
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
240
|
-
);
|
|
241
|
-
}
|
|
242
252
|
function RegistrationCardFooter() {
|
|
243
253
|
const intl = useIntl();
|
|
244
254
|
const { config, flow, formState } = useOryFlow();
|
|
245
|
-
const { setValue } = useFormContext();
|
|
246
|
-
if (formState.current === "select_method") {
|
|
247
|
-
return null;
|
|
248
|
-
}
|
|
249
255
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
256
|
+
switch (formState.current) {
|
|
257
|
+
case "method_active":
|
|
258
|
+
return /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased", children: screenSelectionNode && /* @__PURE__ */ jsx5(
|
|
259
|
+
"a",
|
|
260
|
+
{
|
|
261
|
+
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
262
|
+
href: "",
|
|
263
|
+
children: intl.formatMessage({
|
|
264
|
+
id: "card.footer.select-another-method",
|
|
265
|
+
defaultMessage: "Select another method"
|
|
266
|
+
})
|
|
267
|
+
}
|
|
268
|
+
) });
|
|
269
|
+
case "select_method":
|
|
270
|
+
default:
|
|
271
|
+
return /* @__PURE__ */ jsxs4("span", { className: "font-normal leading-normal antialiased", children: [
|
|
272
|
+
intl.formatMessage({
|
|
273
|
+
id: "registration.login-label",
|
|
274
|
+
defaultMessage: "Already have an account?"
|
|
275
|
+
}),
|
|
276
|
+
" ",
|
|
277
|
+
/* @__PURE__ */ jsx5(
|
|
278
|
+
"a",
|
|
279
|
+
{
|
|
280
|
+
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
281
|
+
href: initFlowUrl(config.sdk.url, "login", flow),
|
|
282
|
+
"data-testid": "ory/screen/registration/action/login",
|
|
283
|
+
children: intl.formatMessage({
|
|
284
|
+
id: "registration.login-button",
|
|
285
|
+
defaultMessage: "Sign in"
|
|
286
|
+
})
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] });
|
|
258
290
|
}
|
|
259
|
-
return /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ jsx5(Fragment, { children: screenSelectionNode && /* @__PURE__ */ jsx5(
|
|
260
|
-
"button",
|
|
261
|
-
{
|
|
262
|
-
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
263
|
-
type: "submit",
|
|
264
|
-
name: screenSelectionNode.attributes.name,
|
|
265
|
-
value: screenSelectionNode.attributes.value,
|
|
266
|
-
onClick: handleScreenSelection,
|
|
267
|
-
children: intl.formatMessage({
|
|
268
|
-
id: "card.footer.select-another-method",
|
|
269
|
-
defaultMessage: "Select another method"
|
|
270
|
-
})
|
|
271
|
-
}
|
|
272
|
-
) }) : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
273
|
-
intl.formatMessage({
|
|
274
|
-
id: "registration.login-label",
|
|
275
|
-
defaultMessage: "Already have an account?"
|
|
276
|
-
}),
|
|
277
|
-
" ",
|
|
278
|
-
/* @__PURE__ */ jsx5(
|
|
279
|
-
"a",
|
|
280
|
-
{
|
|
281
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
282
|
-
href: initFlowUrl(config.sdk.url, "login", flow),
|
|
283
|
-
"data-testid": "ory/screen/registration/action/login",
|
|
284
|
-
children: intl.formatMessage({
|
|
285
|
-
id: "registration.login-button",
|
|
286
|
-
defaultMessage: "Sign in"
|
|
287
|
-
})
|
|
288
|
-
}
|
|
289
|
-
)
|
|
290
|
-
] }) });
|
|
291
291
|
}
|
|
292
292
|
function RecoveryCardFooter() {
|
|
293
293
|
return null;
|
|
@@ -295,14 +295,59 @@ function RecoveryCardFooter() {
|
|
|
295
295
|
function VerificationCardFooter() {
|
|
296
296
|
return null;
|
|
297
297
|
}
|
|
298
|
+
function ConsentCardFooter({ flow }) {
|
|
299
|
+
var _a, _b;
|
|
300
|
+
const { Node: Node2 } = useComponents();
|
|
301
|
+
const rememberNode = findNode(flow.ui.nodes, {
|
|
302
|
+
group: "oauth2_consent",
|
|
303
|
+
node_type: "input",
|
|
304
|
+
name: "remember"
|
|
305
|
+
});
|
|
306
|
+
return /* @__PURE__ */ jsxs4("div", { className: "flex gap-8 flex-col", children: [
|
|
307
|
+
/* @__PURE__ */ jsxs4("div", { children: [
|
|
308
|
+
/* @__PURE__ */ jsxs4("p", { className: "text-interface-foreground-default-secondary leading-normal font-medium", children: [
|
|
309
|
+
"Make sure you trust ",
|
|
310
|
+
(_a = flow.consent_request.client) == null ? void 0 : _a.client_name
|
|
311
|
+
] }),
|
|
312
|
+
/* @__PURE__ */ jsx5("p", { className: "text-interface-foreground-default-secondary leading-normal", children: "You may be sharing sensitive information with this site or application." })
|
|
313
|
+
] }),
|
|
314
|
+
rememberNode && /* @__PURE__ */ jsx5(
|
|
315
|
+
Node2.Checkbox,
|
|
316
|
+
{
|
|
317
|
+
attributes: rememberNode.attributes,
|
|
318
|
+
node: rememberNode
|
|
319
|
+
}
|
|
320
|
+
),
|
|
321
|
+
/* @__PURE__ */ jsx5("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-2", children: flow.ui.nodes.filter(
|
|
322
|
+
(n) => n.attributes.node_type === "input" && n.attributes.type === "submit"
|
|
323
|
+
).map((n) => {
|
|
324
|
+
const attributes = n.attributes;
|
|
325
|
+
return /* @__PURE__ */ jsx5(
|
|
326
|
+
Node2.Button,
|
|
327
|
+
{
|
|
328
|
+
node: n,
|
|
329
|
+
attributes
|
|
330
|
+
},
|
|
331
|
+
attributes.value
|
|
332
|
+
);
|
|
333
|
+
}) }),
|
|
334
|
+
/* @__PURE__ */ jsxs4("p", { className: "text-sm", children: [
|
|
335
|
+
/* @__PURE__ */ jsxs4("span", { className: "text-interface-foreground-default-tertiary", children: [
|
|
336
|
+
"Authorizing will redirect to",
|
|
337
|
+
" "
|
|
338
|
+
] }),
|
|
339
|
+
(_b = flow.consent_request.client) == null ? void 0 : _b.client_name
|
|
340
|
+
] })
|
|
341
|
+
] });
|
|
342
|
+
}
|
|
298
343
|
|
|
299
344
|
// src/theme/default/components/card/header.tsx
|
|
300
|
-
import { useComponents, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
345
|
+
import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory/elements-react";
|
|
301
346
|
|
|
302
347
|
// src/theme/default/utils/constructCardHeader.ts
|
|
303
348
|
import {
|
|
304
349
|
FlowType as FlowType2,
|
|
305
|
-
isUiNodeInputAttributes as
|
|
350
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes3
|
|
306
351
|
} from "@ory/client-fetch";
|
|
307
352
|
import { useIntl as useIntl2 } from "react-intl";
|
|
308
353
|
function joinWithCommaOr(list, orText = "or") {
|
|
@@ -316,7 +361,7 @@ function joinWithCommaOr(list, orText = "or") {
|
|
|
316
361
|
}
|
|
317
362
|
}
|
|
318
363
|
function useCardHeaderText(container, opts) {
|
|
319
|
-
var _a, _b, _c;
|
|
364
|
+
var _a, _b, _c, _d, _e, _f;
|
|
320
365
|
const nodes = container.nodes;
|
|
321
366
|
const intl = useIntl2();
|
|
322
367
|
switch (opts.flowType) {
|
|
@@ -430,7 +475,7 @@ function useCardHeaderText(container, opts) {
|
|
|
430
475
|
}
|
|
431
476
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
432
477
|
const identifier = nodes.find(
|
|
433
|
-
(node) =>
|
|
478
|
+
(node) => isUiNodeInputAttributes3(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
434
479
|
);
|
|
435
480
|
if (identifier) {
|
|
436
481
|
parts.push(
|
|
@@ -504,6 +549,25 @@ function useCardHeaderText(container, opts) {
|
|
|
504
549
|
}
|
|
505
550
|
) : ""
|
|
506
551
|
};
|
|
552
|
+
case FlowType2.OAuth2Consent:
|
|
553
|
+
return {
|
|
554
|
+
title: intl.formatMessage(
|
|
555
|
+
{
|
|
556
|
+
id: "consent.title"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
party: (_d = opts.flow.consent_request.client) == null ? void 0 : _d.client_name
|
|
560
|
+
}
|
|
561
|
+
),
|
|
562
|
+
description: intl.formatMessage(
|
|
563
|
+
{
|
|
564
|
+
id: "consent.subtitle"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
identifier: (_f = (_e = opts.flow.session.identity) == null ? void 0 : _e.traits.email) != null ? _f : ""
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
};
|
|
507
571
|
}
|
|
508
572
|
return {
|
|
509
573
|
title: "Error",
|
|
@@ -512,7 +576,10 @@ function useCardHeaderText(container, opts) {
|
|
|
512
576
|
}
|
|
513
577
|
|
|
514
578
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
515
|
-
import {
|
|
579
|
+
import {
|
|
580
|
+
FlowType as FlowType3,
|
|
581
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes4
|
|
582
|
+
} from "@ory/client-fetch";
|
|
516
583
|
import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
517
584
|
|
|
518
585
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
@@ -534,9 +601,11 @@ function omit(obj, keys) {
|
|
|
534
601
|
}
|
|
535
602
|
|
|
536
603
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
604
|
+
import { useFormContext } from "react-hook-form";
|
|
537
605
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
538
606
|
function DefaultCurrentIdentifierButton() {
|
|
539
607
|
const { flow, flowType, config, formState } = useOryFlow2();
|
|
608
|
+
const { setValue } = useFormContext();
|
|
540
609
|
const ui = flow.ui;
|
|
541
610
|
if (formState.current === "provide_identifier") {
|
|
542
611
|
return null;
|
|
@@ -544,26 +613,78 @@ function DefaultCurrentIdentifierButton() {
|
|
|
544
613
|
if (flowType === FlowType3.Login && flow.requested_aal === "aal2") {
|
|
545
614
|
return null;
|
|
546
615
|
}
|
|
547
|
-
const nodeBackButton =
|
|
548
|
-
if (
|
|
616
|
+
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
617
|
+
if (!nodeBackButton) {
|
|
549
618
|
return null;
|
|
550
619
|
}
|
|
551
620
|
const initFlowUrl2 = restartFlowUrl(
|
|
552
621
|
flow,
|
|
553
622
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
554
623
|
);
|
|
555
|
-
const attributes = omit(nodeBackButton
|
|
624
|
+
const attributes = omit(nodeBackButton, [
|
|
556
625
|
"autocomplete",
|
|
557
626
|
"node_type",
|
|
558
627
|
"maxlength"
|
|
559
628
|
]);
|
|
629
|
+
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
630
|
+
if (screenSelectionNode) {
|
|
631
|
+
return /* @__PURE__ */ jsxs5("form", { action: flow.ui.action, method: flow.ui.method, children: [
|
|
632
|
+
flow.ui.nodes.filter((n) => {
|
|
633
|
+
if (isUiNodeInputAttributes4(n.attributes)) {
|
|
634
|
+
return n.attributes.type === "hidden";
|
|
635
|
+
}
|
|
636
|
+
return false;
|
|
637
|
+
}).map((n) => {
|
|
638
|
+
const attrs = n.attributes;
|
|
639
|
+
return /* @__PURE__ */ jsx7(
|
|
640
|
+
"input",
|
|
641
|
+
{
|
|
642
|
+
type: "hidden",
|
|
643
|
+
name: attrs.name,
|
|
644
|
+
value: attrs.value
|
|
645
|
+
},
|
|
646
|
+
attrs.name
|
|
647
|
+
);
|
|
648
|
+
}),
|
|
649
|
+
/* @__PURE__ */ jsx7(
|
|
650
|
+
"button",
|
|
651
|
+
{
|
|
652
|
+
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
653
|
+
...attributes,
|
|
654
|
+
type: "submit",
|
|
655
|
+
onClick: () => {
|
|
656
|
+
setValue(
|
|
657
|
+
screenSelectionNode.attributes.name,
|
|
658
|
+
screenSelectionNode.attributes.value
|
|
659
|
+
);
|
|
660
|
+
setValue("method", "profile");
|
|
661
|
+
},
|
|
662
|
+
name: screenSelectionNode.attributes.name,
|
|
663
|
+
value: screenSelectionNode.attributes.value,
|
|
664
|
+
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
665
|
+
"data-testid": "ory/screen/login/action/restart",
|
|
666
|
+
children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
667
|
+
/* @__PURE__ */ jsx7(
|
|
668
|
+
arrow_left_default,
|
|
669
|
+
{
|
|
670
|
+
size: 16,
|
|
671
|
+
stroke: "1",
|
|
672
|
+
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
673
|
+
}
|
|
674
|
+
),
|
|
675
|
+
/* @__PURE__ */ jsx7("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
676
|
+
] })
|
|
677
|
+
}
|
|
678
|
+
)
|
|
679
|
+
] });
|
|
680
|
+
}
|
|
560
681
|
return /* @__PURE__ */ jsx7(
|
|
561
682
|
"a",
|
|
562
683
|
{
|
|
563
684
|
className: "group inline-flex max-w-full cursor-pointer items-center gap-1 self-start rounded-identifier border px-[11px] py-[5px] transition-colors border-button-identifier-border-border-default bg-button-identifier-background-default hover:border-button-identifier-border-border-hover hover:bg-button-identifier-background-hover",
|
|
564
685
|
...attributes,
|
|
565
686
|
href: initFlowUrl2,
|
|
566
|
-
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.
|
|
687
|
+
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
567
688
|
"data-testid": "ory/screen/login/action/restart",
|
|
568
689
|
children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
569
690
|
/* @__PURE__ */ jsx7(
|
|
@@ -574,30 +695,34 @@ function DefaultCurrentIdentifierButton() {
|
|
|
574
695
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
575
696
|
}
|
|
576
697
|
),
|
|
577
|
-
/* @__PURE__ */ jsx7("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.
|
|
698
|
+
/* @__PURE__ */ jsx7("span", { className: "overflow-hidden text-ellipsis text-nowrap text-sm font-medium text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover", children: nodeBackButton == null ? void 0 : nodeBackButton.value })
|
|
578
699
|
] })
|
|
579
700
|
}
|
|
580
701
|
);
|
|
581
702
|
}
|
|
582
|
-
function
|
|
583
|
-
|
|
703
|
+
function getBackButtonNodeAttributes(flowType, nodes) {
|
|
704
|
+
var _a, _b;
|
|
705
|
+
let nodeBackButtonAttributes;
|
|
584
706
|
switch (flowType) {
|
|
585
707
|
case FlowType3.Login:
|
|
586
|
-
|
|
587
|
-
(node) =>
|
|
588
|
-
);
|
|
708
|
+
nodeBackButtonAttributes = (_a = nodes.find(
|
|
709
|
+
(node) => isUiNodeInputAttributes4(node.attributes) && node.attributes.name === "identifier" && ["default", "identifier_first"].includes(node.group)
|
|
710
|
+
)) == null ? void 0 : _a.attributes;
|
|
589
711
|
break;
|
|
590
712
|
case FlowType3.Registration:
|
|
591
|
-
|
|
713
|
+
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
592
714
|
break;
|
|
593
715
|
case FlowType3.Recovery:
|
|
594
716
|
case FlowType3.Verification:
|
|
595
|
-
|
|
596
|
-
(n) =>
|
|
597
|
-
);
|
|
717
|
+
nodeBackButtonAttributes = (_b = nodes.find(
|
|
718
|
+
(n) => isUiNodeInputAttributes4(n.attributes) && n.attributes.name === "email"
|
|
719
|
+
)) == null ? void 0 : _b.attributes;
|
|
598
720
|
break;
|
|
599
721
|
}
|
|
600
|
-
|
|
722
|
+
if ((nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.node_type) !== "input" || !(nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.value)) {
|
|
723
|
+
return void 0;
|
|
724
|
+
}
|
|
725
|
+
return nodeBackButtonAttributes;
|
|
601
726
|
}
|
|
602
727
|
var backButtonCandiates = [
|
|
603
728
|
"traits.email",
|
|
@@ -605,15 +730,16 @@ var backButtonCandiates = [
|
|
|
605
730
|
"traits.phone_number"
|
|
606
731
|
];
|
|
607
732
|
function guessRegistrationBackButton(uiNodes) {
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
733
|
+
var _a;
|
|
734
|
+
return (_a = uiNodes.find(
|
|
735
|
+
(node) => isUiNodeInputAttributes4(node.attributes) && backButtonCandiates.includes(node.attributes.name) && node.group === "default"
|
|
736
|
+
)) == null ? void 0 : _a.attributes;
|
|
611
737
|
}
|
|
612
738
|
|
|
613
739
|
// src/theme/default/components/card/header.tsx
|
|
614
740
|
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
615
741
|
function InnerCardHeader({ title, text }) {
|
|
616
|
-
const { Card } =
|
|
742
|
+
const { Card } = useComponents2();
|
|
617
743
|
return /* @__PURE__ */ jsxs6("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
618
744
|
/* @__PURE__ */ jsx8(Card.Logo, {}),
|
|
619
745
|
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2", children: [
|
|
@@ -955,6 +1081,7 @@ function DefaultButtonSocial({
|
|
|
955
1081
|
setClicked(false);
|
|
956
1082
|
}
|
|
957
1083
|
}, [isSubmitting, setClicked]);
|
|
1084
|
+
const label = node.meta.label ? uiTextToFormattedMessage(node.meta.label, intl) : "";
|
|
958
1085
|
return /* @__PURE__ */ jsxs19(
|
|
959
1086
|
"button",
|
|
960
1087
|
{
|
|
@@ -967,10 +1094,11 @@ function DefaultButtonSocial({
|
|
|
967
1094
|
onClick: localOnClick,
|
|
968
1095
|
"data-loading": clicked,
|
|
969
1096
|
disabled: isSubmitting,
|
|
1097
|
+
"aria-label": label,
|
|
970
1098
|
children: [
|
|
971
1099
|
/* @__PURE__ */ jsx27("span", { className: "size-5 relative", children: !clicked ? Logo ? /* @__PURE__ */ jsx27(Logo, { size: 20 }) : /* @__PURE__ */ jsx27("span", { className: "flex aspect-square items-center justify-center rounded-[999px] border text-xs", children: provider.slice(0, 2) }) : /* @__PURE__ */ jsx27(Spinner, { className: "size-5" }) }),
|
|
972
1100
|
showLabel && node.meta.label ? /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
973
|
-
/* @__PURE__ */ jsx27("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children:
|
|
1101
|
+
/* @__PURE__ */ jsx27("span", { className: "grow text-center font-medium leading-none text-button-social-foreground-default", children: label }),
|
|
974
1102
|
/* @__PURE__ */ jsx27("span", { className: "size-5 block" })
|
|
975
1103
|
] }) : null
|
|
976
1104
|
]
|
|
@@ -1002,11 +1130,13 @@ function DefaultFormContainer({
|
|
|
1002
1130
|
children,
|
|
1003
1131
|
onSubmit,
|
|
1004
1132
|
action,
|
|
1005
|
-
method
|
|
1133
|
+
method,
|
|
1134
|
+
"data-testid": dataTestId
|
|
1006
1135
|
}) {
|
|
1007
1136
|
return /* @__PURE__ */ jsx28(
|
|
1008
1137
|
"form",
|
|
1009
1138
|
{
|
|
1139
|
+
"data-testid": dataTestId,
|
|
1010
1140
|
onSubmit,
|
|
1011
1141
|
noValidate: true,
|
|
1012
1142
|
action,
|
|
@@ -1110,8 +1240,40 @@ function isGroupImmediateSubmit(group) {
|
|
|
1110
1240
|
return group === "code";
|
|
1111
1241
|
}
|
|
1112
1242
|
|
|
1113
|
-
// src/theme/default/components/card/
|
|
1243
|
+
// src/theme/default/components/card/list-item.tsx
|
|
1114
1244
|
import { jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
1245
|
+
function ListItem({
|
|
1246
|
+
icon: Icon,
|
|
1247
|
+
as,
|
|
1248
|
+
title,
|
|
1249
|
+
description,
|
|
1250
|
+
children,
|
|
1251
|
+
className,
|
|
1252
|
+
...props
|
|
1253
|
+
}) {
|
|
1254
|
+
const Comp = as || "div";
|
|
1255
|
+
return /* @__PURE__ */ jsxs20(
|
|
1256
|
+
Comp,
|
|
1257
|
+
{
|
|
1258
|
+
...props,
|
|
1259
|
+
className: cn(
|
|
1260
|
+
"flex cursor-pointer gap-3 text-left items-start w-full rounded-buttons p-2 hover:bg-interface-background-default-primary-hover",
|
|
1261
|
+
className
|
|
1262
|
+
),
|
|
1263
|
+
children: [
|
|
1264
|
+
/* @__PURE__ */ jsx35("span", { className: "mt-1", children: Icon && /* @__PURE__ */ jsx35(Icon, { size: 16, className: "text-interface-foreground-brand-primary" }) }),
|
|
1265
|
+
/* @__PURE__ */ jsxs20("span", { className: "flex-1 leading-normal inline-flex flex-col max-w-full min-w-1", children: [
|
|
1266
|
+
/* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-primary break-words", children: title }),
|
|
1267
|
+
/* @__PURE__ */ jsx35("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1268
|
+
] }),
|
|
1269
|
+
children
|
|
1270
|
+
]
|
|
1271
|
+
}
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
// src/theme/default/components/card/auth-method-list-item.tsx
|
|
1276
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1115
1277
|
var iconsMap = {
|
|
1116
1278
|
code: code_default,
|
|
1117
1279
|
passkey: passkey_default,
|
|
@@ -1130,28 +1292,21 @@ function DefaultAuthMethodListItem({
|
|
|
1130
1292
|
var _a;
|
|
1131
1293
|
const intl = useIntl5();
|
|
1132
1294
|
const Icon = iconsMap[group] || null;
|
|
1133
|
-
return /* @__PURE__ */
|
|
1134
|
-
|
|
1295
|
+
return /* @__PURE__ */ jsx36(
|
|
1296
|
+
ListItem,
|
|
1135
1297
|
{
|
|
1136
|
-
|
|
1298
|
+
as: "button",
|
|
1299
|
+
icon: Icon,
|
|
1300
|
+
title: intl.formatMessage(
|
|
1301
|
+
{ id: (_a = title == null ? void 0 : title.id) != null ? _a : `two-step.${group}.title` },
|
|
1302
|
+
title == null ? void 0 : title.values
|
|
1303
|
+
),
|
|
1304
|
+
description: intl.formatMessage({
|
|
1305
|
+
id: `two-step.${group}.description`
|
|
1306
|
+
}),
|
|
1137
1307
|
onClick,
|
|
1138
1308
|
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
|
-
]
|
|
1309
|
+
"data-testid": `ory/form/auth-picker/${group}`
|
|
1155
1310
|
}
|
|
1156
1311
|
);
|
|
1157
1312
|
}
|
|
@@ -1165,7 +1320,7 @@ import { cva } from "class-variance-authority";
|
|
|
1165
1320
|
import { useFormContext as useFormContext3 } from "react-hook-form";
|
|
1166
1321
|
import { useIntl as useIntl6 } from "react-intl";
|
|
1167
1322
|
import { useEffect as useEffect2, useState } from "react";
|
|
1168
|
-
import { jsx as
|
|
1323
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1169
1324
|
var buttonStyles = cva(
|
|
1170
1325
|
[
|
|
1171
1326
|
"relative flex justify-center gap-3 overflow-hidden rounded-buttons leading-none ring-1 ring-inset font-medium",
|
|
@@ -1228,7 +1383,7 @@ var DefaultButton = ({
|
|
|
1228
1383
|
setClicked(false);
|
|
1229
1384
|
}
|
|
1230
1385
|
}, [isSubmitting]);
|
|
1231
|
-
const isPrimary = attributes.name === "method" || attributes.name.includes("passkey") || attributes.name.includes("webauthn") || attributes.name.includes("lookup_secret");
|
|
1386
|
+
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
1387
|
return /* @__PURE__ */ jsxs21(
|
|
1233
1388
|
"button",
|
|
1234
1389
|
{
|
|
@@ -1249,8 +1404,8 @@ var DefaultButton = ({
|
|
|
1249
1404
|
disabled: (_a = rest.disabled) != null ? _a : isSubmitting,
|
|
1250
1405
|
"data-loading": clicked,
|
|
1251
1406
|
children: [
|
|
1252
|
-
clicked ? /* @__PURE__ */
|
|
1253
|
-
label ? /* @__PURE__ */
|
|
1407
|
+
clicked ? /* @__PURE__ */ jsx37(Spinner, {}) : null,
|
|
1408
|
+
label ? /* @__PURE__ */ jsx37("span", { children: uiTextToFormattedMessage3(label, intl) }) : ""
|
|
1254
1409
|
]
|
|
1255
1410
|
}
|
|
1256
1411
|
);
|
|
@@ -1263,7 +1418,7 @@ import {
|
|
|
1263
1418
|
messageTestId as messageTestId2,
|
|
1264
1419
|
uiTextToFormattedMessage as uiTextToFormattedMessage5
|
|
1265
1420
|
} from "@ory/elements-react";
|
|
1266
|
-
import {
|
|
1421
|
+
import { useFormContext as useFormContext4 } from "react-hook-form";
|
|
1267
1422
|
import { useIntl as useIntl8 } from "react-intl";
|
|
1268
1423
|
|
|
1269
1424
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
@@ -1326,7 +1481,7 @@ var uiTextToFormattedMessage4 = ({ id, context = {}, text }, intl) => {
|
|
|
1326
1481
|
};
|
|
1327
1482
|
|
|
1328
1483
|
// src/theme/default/components/ui/checkbox-label.tsx
|
|
1329
|
-
import { Fragment as Fragment3, jsx as
|
|
1484
|
+
import { Fragment as Fragment3, jsx as jsx38 } from "react/jsx-runtime";
|
|
1330
1485
|
var linkRegex = /\[([^\]]+)\]\(([^)]+)\)/g;
|
|
1331
1486
|
function computeLabelElements(labelText) {
|
|
1332
1487
|
const elements = [];
|
|
@@ -1342,7 +1497,7 @@ function computeLabelElements(labelText) {
|
|
|
1342
1497
|
elements.push(labelText.slice(lastIndex, matchStart));
|
|
1343
1498
|
}
|
|
1344
1499
|
elements.push(
|
|
1345
|
-
/* @__PURE__ */
|
|
1500
|
+
/* @__PURE__ */ jsx38(
|
|
1346
1501
|
"a",
|
|
1347
1502
|
{
|
|
1348
1503
|
href: url,
|
|
@@ -1367,13 +1522,13 @@ function CheckboxLabel({ label }) {
|
|
|
1367
1522
|
return null;
|
|
1368
1523
|
}
|
|
1369
1524
|
const labelText = uiTextToFormattedMessage4(label, intl);
|
|
1370
|
-
return /* @__PURE__ */
|
|
1525
|
+
return /* @__PURE__ */ jsx38(Fragment3, { children: computeLabelElements(labelText) });
|
|
1371
1526
|
}
|
|
1372
1527
|
|
|
1373
1528
|
// src/theme/default/components/form/checkbox.tsx
|
|
1374
|
-
import { jsx as
|
|
1529
|
+
import { jsx as jsx39, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1375
1530
|
function CheckboxSVG() {
|
|
1376
|
-
return /* @__PURE__ */
|
|
1531
|
+
return /* @__PURE__ */ jsx39(
|
|
1377
1532
|
"svg",
|
|
1378
1533
|
{
|
|
1379
1534
|
className: "absolute hidden size-4 peer-checked:block fill-checkbox-foreground-checked",
|
|
@@ -1382,7 +1537,7 @@ function CheckboxSVG() {
|
|
|
1382
1537
|
height: "16",
|
|
1383
1538
|
viewBox: "0 0 16 16",
|
|
1384
1539
|
fill: "none",
|
|
1385
|
-
children: /* @__PURE__ */
|
|
1540
|
+
children: /* @__PURE__ */ jsx39(
|
|
1386
1541
|
"path",
|
|
1387
1542
|
{
|
|
1388
1543
|
fillRule: "evenodd",
|
|
@@ -1409,29 +1564,28 @@ var DefaultCheckbox = ({
|
|
|
1409
1564
|
} = initialAttributes;
|
|
1410
1565
|
const intl = useIntl8();
|
|
1411
1566
|
const label = getNodeLabel2(node);
|
|
1412
|
-
const { register } =
|
|
1567
|
+
const { register } = useFormContext4();
|
|
1413
1568
|
const hasError = node.messages.some((m) => m.type === "error");
|
|
1414
1569
|
return /* @__PURE__ */ jsxs22("label", { className: "flex items-start gap-3 self-stretch antialiased", children: [
|
|
1415
1570
|
/* @__PURE__ */ jsxs22("span", { className: "flex h-5 items-center", children: [
|
|
1416
|
-
/* @__PURE__ */
|
|
1571
|
+
/* @__PURE__ */ jsx39(
|
|
1417
1572
|
"input",
|
|
1418
1573
|
{
|
|
1419
1574
|
...attributes,
|
|
1420
|
-
value: 1,
|
|
1421
1575
|
defaultChecked: Boolean(value),
|
|
1422
1576
|
type: "checkbox",
|
|
1423
1577
|
className: cn(
|
|
1424
1578
|
"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
1579
|
hasError && "border-interface-border-validation-danger"
|
|
1426
1580
|
),
|
|
1427
|
-
...register(name
|
|
1581
|
+
...register(name)
|
|
1428
1582
|
}
|
|
1429
1583
|
),
|
|
1430
|
-
/* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ jsx39(CheckboxSVG, {})
|
|
1431
1585
|
] }),
|
|
1432
1586
|
/* @__PURE__ */ jsxs22("span", { className: "flex flex-col", children: [
|
|
1433
|
-
/* @__PURE__ */
|
|
1434
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ jsx39("span", { className: "font-normal leading-tight text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx39(CheckboxLabel, { label }) }),
|
|
1588
|
+
node.messages.map((message) => /* @__PURE__ */ jsx39(
|
|
1435
1589
|
"span",
|
|
1436
1590
|
{
|
|
1437
1591
|
className: cn(
|
|
@@ -1448,63 +1602,93 @@ var DefaultCheckbox = ({
|
|
|
1448
1602
|
};
|
|
1449
1603
|
|
|
1450
1604
|
// src/theme/default/components/form/group-container.tsx
|
|
1451
|
-
import {
|
|
1605
|
+
import { useOryFlow as useOryFlow7 } from "@ory/elements-react";
|
|
1606
|
+
import { FlowType as FlowType5 } from "@ory/client-fetch";
|
|
1607
|
+
|
|
1608
|
+
// src/util/childCounter.ts
|
|
1609
|
+
import { Children, isValidElement } from "react";
|
|
1610
|
+
function countRenderableChildren(children) {
|
|
1611
|
+
return Children.toArray(children).filter((c) => {
|
|
1612
|
+
if (isValidElement(c)) {
|
|
1613
|
+
return true;
|
|
1614
|
+
}
|
|
1615
|
+
return false;
|
|
1616
|
+
}).length;
|
|
1617
|
+
}
|
|
1618
|
+
|
|
1619
|
+
// src/theme/default/components/form/group-container.tsx
|
|
1620
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1452
1621
|
function DefaultGroupContainer({ children }) {
|
|
1453
|
-
|
|
1622
|
+
const { flowType } = useOryFlow7();
|
|
1623
|
+
const count = countRenderableChildren(children);
|
|
1624
|
+
if (count === 0) {
|
|
1625
|
+
return null;
|
|
1626
|
+
}
|
|
1627
|
+
return /* @__PURE__ */ jsx40(
|
|
1628
|
+
"div",
|
|
1629
|
+
{
|
|
1630
|
+
className: cn(
|
|
1631
|
+
"grid",
|
|
1632
|
+
flowType === FlowType5.OAuth2Consent ? "grid-cols-2 gap-2" : "grid-cols-1 gap-8"
|
|
1633
|
+
),
|
|
1634
|
+
children
|
|
1635
|
+
}
|
|
1636
|
+
);
|
|
1454
1637
|
}
|
|
1455
1638
|
|
|
1456
1639
|
// src/theme/default/components/form/horizontal-divider.tsx
|
|
1457
|
-
import { jsx as
|
|
1640
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
1458
1641
|
function DefaultHorizontalDivider() {
|
|
1459
|
-
return /* @__PURE__ */
|
|
1642
|
+
return /* @__PURE__ */ jsx41("hr", { className: "border-interface-border-default-primary" });
|
|
1460
1643
|
}
|
|
1461
1644
|
|
|
1462
1645
|
// src/theme/default/components/form/image.tsx
|
|
1463
|
-
import { jsx as
|
|
1464
|
-
function DefaultImage({ attributes }) {
|
|
1465
|
-
|
|
1646
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1647
|
+
function DefaultImage({ attributes, node }) {
|
|
1648
|
+
var _a;
|
|
1649
|
+
return /* @__PURE__ */ jsx42("figure", { children: /* @__PURE__ */ jsx42("img", { ...attributes, alt: ((_a = node.meta.label) == null ? void 0 : _a.text) || "" }) });
|
|
1466
1650
|
}
|
|
1467
1651
|
|
|
1468
1652
|
// src/theme/default/components/form/input.tsx
|
|
1469
|
-
import { FlowType as
|
|
1653
|
+
import { FlowType as FlowType6, getNodeLabel as getNodeLabel3 } from "@ory/client-fetch";
|
|
1470
1654
|
import {
|
|
1471
1655
|
uiTextToFormattedMessage as uiTextToFormattedMessage6,
|
|
1472
|
-
useOryFlow as
|
|
1656
|
+
useOryFlow as useOryFlow8
|
|
1473
1657
|
} from "@ory/elements-react";
|
|
1474
1658
|
import { useRef, useState as useState2 } from "react";
|
|
1475
|
-
import { useFormContext as
|
|
1659
|
+
import { useFormContext as useFormContext5 } from "react-hook-form";
|
|
1476
1660
|
import { useIntl as useIntl9 } from "react-intl";
|
|
1477
1661
|
|
|
1478
1662
|
// src/theme/default/assets/icons/eye-off.svg
|
|
1479
1663
|
import * as React24 from "react";
|
|
1480
|
-
import { jsx as
|
|
1664
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1481
1665
|
var SvgEyeOff = (props) => {
|
|
1482
1666
|
var _a, _b;
|
|
1483
|
-
return /* @__PURE__ */
|
|
1667
|
+
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
1668
|
};
|
|
1485
1669
|
var eye_off_default = SvgEyeOff;
|
|
1486
1670
|
|
|
1487
1671
|
// src/theme/default/assets/icons/eye.svg
|
|
1488
1672
|
import * as React25 from "react";
|
|
1489
|
-
import { jsx as
|
|
1673
|
+
import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1490
1674
|
var SvgEye = (props) => {
|
|
1491
1675
|
var _a, _b;
|
|
1492
|
-
return /* @__PURE__ */
|
|
1493
|
-
/* @__PURE__ */
|
|
1494
|
-
/* @__PURE__ */
|
|
1676
|
+
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: [
|
|
1677
|
+
/* @__PURE__ */ jsx44("path", { stroke: "currentColor", d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1678
|
+
/* @__PURE__ */ jsx44("path", { stroke: "#64748B", d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1495
1679
|
] }) });
|
|
1496
1680
|
};
|
|
1497
1681
|
var eye_default = SvgEye;
|
|
1498
1682
|
|
|
1499
1683
|
// src/theme/default/components/form/input.tsx
|
|
1500
|
-
import { jsx as
|
|
1684
|
+
import { jsx as jsx45, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1501
1685
|
var DefaultInput = ({
|
|
1502
1686
|
node,
|
|
1503
1687
|
attributes,
|
|
1504
1688
|
onClick
|
|
1505
1689
|
}) => {
|
|
1506
1690
|
const label = getNodeLabel3(node);
|
|
1507
|
-
const { register } =
|
|
1691
|
+
const { register, watch } = useFormContext5();
|
|
1508
1692
|
const {
|
|
1509
1693
|
value,
|
|
1510
1694
|
autocomplete,
|
|
@@ -1514,7 +1698,7 @@ var DefaultInput = ({
|
|
|
1514
1698
|
...rest
|
|
1515
1699
|
} = attributes;
|
|
1516
1700
|
const intl = useIntl9();
|
|
1517
|
-
const { flowType } =
|
|
1701
|
+
const { flowType } = useOryFlow8();
|
|
1518
1702
|
const inputRef = useRef(null);
|
|
1519
1703
|
const formattedLabel = label ? intl.formatMessage(
|
|
1520
1704
|
{
|
|
@@ -1526,7 +1710,7 @@ var DefaultInput = ({
|
|
|
1526
1710
|
}
|
|
1527
1711
|
) : "";
|
|
1528
1712
|
if (rest.type === "hidden") {
|
|
1529
|
-
return /* @__PURE__ */
|
|
1713
|
+
return /* @__PURE__ */ jsx45(
|
|
1530
1714
|
"input",
|
|
1531
1715
|
{
|
|
1532
1716
|
...rest,
|
|
@@ -1546,10 +1730,10 @@ var DefaultInput = ({
|
|
|
1546
1730
|
className: cn(
|
|
1547
1731
|
"relative flex justify-stretch",
|
|
1548
1732
|
// 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 ===
|
|
1733
|
+
flowType === FlowType6.Settings && "max-w-[488px]"
|
|
1550
1734
|
),
|
|
1551
1735
|
children: [
|
|
1552
|
-
/* @__PURE__ */
|
|
1736
|
+
/* @__PURE__ */ jsx45(
|
|
1553
1737
|
"input",
|
|
1554
1738
|
{
|
|
1555
1739
|
...rest,
|
|
@@ -1573,7 +1757,7 @@ var DefaultInput = ({
|
|
|
1573
1757
|
...restRegister
|
|
1574
1758
|
}
|
|
1575
1759
|
),
|
|
1576
|
-
rest.type === "password" && /* @__PURE__ */
|
|
1760
|
+
rest.type === "password" && /* @__PURE__ */ jsx45(PasswordToggle, { inputRef })
|
|
1577
1761
|
]
|
|
1578
1762
|
}
|
|
1579
1763
|
);
|
|
@@ -1588,32 +1772,33 @@ function PasswordToggle({
|
|
|
1588
1772
|
inputRef.current.type = shown ? "password" : "text";
|
|
1589
1773
|
}
|
|
1590
1774
|
};
|
|
1591
|
-
return /* @__PURE__ */
|
|
1775
|
+
return /* @__PURE__ */ jsx45(
|
|
1592
1776
|
"button",
|
|
1593
1777
|
{
|
|
1594
1778
|
onClick: handleClick,
|
|
1595
1779
|
className: "absolute right-0 h-full w-12 flex items-center justify-center",
|
|
1596
1780
|
type: "button",
|
|
1597
|
-
|
|
1781
|
+
"aria-label": "Toggle password visibility",
|
|
1782
|
+
children: shown ? /* @__PURE__ */ jsx45(eye_off_default, {}) : /* @__PURE__ */ jsx45(eye_default, {})
|
|
1598
1783
|
}
|
|
1599
1784
|
);
|
|
1600
1785
|
}
|
|
1601
1786
|
|
|
1602
1787
|
// src/theme/default/components/form/label.tsx
|
|
1603
1788
|
import {
|
|
1604
|
-
FlowType as
|
|
1789
|
+
FlowType as FlowType7,
|
|
1605
1790
|
getNodeLabel as getNodeLabel4,
|
|
1606
1791
|
instanceOfUiText
|
|
1607
1792
|
} from "@ory/client-fetch";
|
|
1608
1793
|
import {
|
|
1609
1794
|
messageTestId as messageTestId3,
|
|
1610
1795
|
uiTextToFormattedMessage as uiTextToFormattedMessage7,
|
|
1611
|
-
useComponents as
|
|
1612
|
-
useOryFlow as
|
|
1796
|
+
useComponents as useComponents3,
|
|
1797
|
+
useOryFlow as useOryFlow9
|
|
1613
1798
|
} from "@ory/elements-react";
|
|
1614
|
-
import { useFormContext as
|
|
1799
|
+
import { useFormContext as useFormContext6 } from "react-hook-form";
|
|
1615
1800
|
import { useIntl as useIntl10 } from "react-intl";
|
|
1616
|
-
import { jsx as
|
|
1801
|
+
import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1617
1802
|
function findResendNode(nodes) {
|
|
1618
1803
|
return nodes.find(
|
|
1619
1804
|
(n) => "name" in n.attributes && (n.attributes.name === "email" && n.attributes.type === "submit" || n.attributes.name === "resend")
|
|
@@ -1627,9 +1812,9 @@ function DefaultLabel({
|
|
|
1627
1812
|
}) {
|
|
1628
1813
|
const intl = useIntl10();
|
|
1629
1814
|
const label = getNodeLabel4(node);
|
|
1630
|
-
const { Message } =
|
|
1631
|
-
const { config, flowType, flow } =
|
|
1632
|
-
const { setValue, formState } =
|
|
1815
|
+
const { Message } = useComponents3();
|
|
1816
|
+
const { config, flowType, flow } = useOryFlow9();
|
|
1817
|
+
const { setValue, formState } = useFormContext6();
|
|
1633
1818
|
const isPassword = attributes.type === "password";
|
|
1634
1819
|
const resendNode = findResendNode(flow.ui.nodes);
|
|
1635
1820
|
const handleResend = () => {
|
|
@@ -1640,7 +1825,7 @@ function DefaultLabel({
|
|
|
1640
1825
|
const fieldError = formState.errors[attributes.name];
|
|
1641
1826
|
return /* @__PURE__ */ jsxs25("div", { className: "flex flex-col gap-1 antialiased", children: [
|
|
1642
1827
|
label && /* @__PURE__ */ jsxs25("span", { className: "inline-flex justify-between", children: [
|
|
1643
|
-
/* @__PURE__ */
|
|
1828
|
+
/* @__PURE__ */ jsx46(
|
|
1644
1829
|
"label",
|
|
1645
1830
|
{
|
|
1646
1831
|
...messageTestId3(label),
|
|
@@ -1651,8 +1836,8 @@ function DefaultLabel({
|
|
|
1651
1836
|
children: uiTextToFormattedMessage7(label, intl)
|
|
1652
1837
|
}
|
|
1653
1838
|
),
|
|
1654
|
-
isPassword && config.project.recovery_enabled && flowType ===
|
|
1655
|
-
/* @__PURE__ */
|
|
1839
|
+
isPassword && config.project.recovery_enabled && flowType === FlowType7.Login && // TODO: make it possible to override with a custom component
|
|
1840
|
+
/* @__PURE__ */ jsx46(
|
|
1656
1841
|
"a",
|
|
1657
1842
|
{
|
|
1658
1843
|
href: initFlowUrl(config.sdk.url, "recovery", flow),
|
|
@@ -1663,7 +1848,7 @@ function DefaultLabel({
|
|
|
1663
1848
|
})
|
|
1664
1849
|
}
|
|
1665
1850
|
),
|
|
1666
|
-
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */
|
|
1851
|
+
(resendNode == null ? void 0 : resendNode.attributes.node_type) === "input" && /* @__PURE__ */ jsx46(
|
|
1667
1852
|
"button",
|
|
1668
1853
|
{
|
|
1669
1854
|
type: "submit",
|
|
@@ -1676,8 +1861,8 @@ function DefaultLabel({
|
|
|
1676
1861
|
)
|
|
1677
1862
|
] }),
|
|
1678
1863
|
children,
|
|
1679
|
-
node.messages.map((message) => /* @__PURE__ */
|
|
1680
|
-
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */
|
|
1864
|
+
node.messages.map((message) => /* @__PURE__ */ jsx46(Message.Content, { message }, message.id)),
|
|
1865
|
+
fieldError && instanceOfUiText(fieldError) && /* @__PURE__ */ jsx46(Message.Content, { message: fieldError })
|
|
1681
1866
|
] });
|
|
1682
1867
|
}
|
|
1683
1868
|
|
|
@@ -1688,11 +1873,11 @@ import {
|
|
|
1688
1873
|
} from "@ory/elements-react";
|
|
1689
1874
|
import { forwardRef } from "react";
|
|
1690
1875
|
import { useIntl as useIntl11 } from "react-intl";
|
|
1691
|
-
import { jsx as
|
|
1876
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
1692
1877
|
var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
1693
1878
|
const intl = useIntl11();
|
|
1694
1879
|
const label = getNodeLabel5(node);
|
|
1695
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsx47(
|
|
1696
1881
|
"a",
|
|
1697
1882
|
{
|
|
1698
1883
|
...attributes,
|
|
@@ -1709,13 +1894,13 @@ var DefaultLinkButton = forwardRef(({ attributes, node }, ref) => {
|
|
|
1709
1894
|
DefaultLinkButton.displayName = "DefaultLinkButton";
|
|
1710
1895
|
|
|
1711
1896
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1712
|
-
import { useFormContext as
|
|
1897
|
+
import { useFormContext as useFormContext7 } from "react-hook-form";
|
|
1713
1898
|
|
|
1714
1899
|
// src/theme/default/components/form/shadcn/otp-input.tsx
|
|
1715
1900
|
import { OTPInput, OTPInputContext } from "input-otp";
|
|
1716
1901
|
import * as React26 from "react";
|
|
1717
|
-
import { jsx as
|
|
1718
|
-
var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */
|
|
1902
|
+
import { jsx as jsx48, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1903
|
+
var InputOTP = React26.forwardRef(({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx48(
|
|
1719
1904
|
OTPInput,
|
|
1720
1905
|
{
|
|
1721
1906
|
ref,
|
|
@@ -1728,7 +1913,7 @@ var InputOTP = React26.forwardRef(({ className, containerClassName, ...props },
|
|
|
1728
1913
|
}
|
|
1729
1914
|
));
|
|
1730
1915
|
InputOTP.displayName = "InputOTP";
|
|
1731
|
-
var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1916
|
+
var InputOTPGroup = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx48("div", { ref, className: cn("flex items-center", className), ...props }));
|
|
1732
1917
|
InputOTPGroup.displayName = "InputOTPGroup";
|
|
1733
1918
|
var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
1734
1919
|
const inputOTPContext = React26.useContext(OTPInputContext);
|
|
@@ -1745,8 +1930,8 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1745
1930
|
),
|
|
1746
1931
|
...props,
|
|
1747
1932
|
children: [
|
|
1748
|
-
/* @__PURE__ */
|
|
1749
|
-
hasFakeCaret && /* @__PURE__ */
|
|
1933
|
+
/* @__PURE__ */ jsx48("span", { className: "inline-block size-4", children: char }),
|
|
1934
|
+
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
1935
|
]
|
|
1751
1936
|
}
|
|
1752
1937
|
);
|
|
@@ -1754,34 +1939,34 @@ var InputOTPSlot = React26.forwardRef(({ index, className, ...props }, ref) => {
|
|
|
1754
1939
|
InputOTPSlot.displayName = "InputOTPSlot";
|
|
1755
1940
|
|
|
1756
1941
|
// src/theme/default/components/form/pin-code-input.tsx
|
|
1757
|
-
import { useOryFlow as
|
|
1758
|
-
import { FlowType as
|
|
1759
|
-
import { jsx as
|
|
1942
|
+
import { useOryFlow as useOryFlow10 } from "@ory/elements-react";
|
|
1943
|
+
import { FlowType as FlowType8 } from "@ory/client-fetch";
|
|
1944
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
1760
1945
|
var DefaultPinCodeInput = ({ attributes }) => {
|
|
1761
|
-
const { setValue, watch } =
|
|
1946
|
+
const { setValue, watch } = useFormContext7();
|
|
1762
1947
|
const { maxlength, name } = attributes;
|
|
1763
1948
|
const elements = maxlength != null ? maxlength : 6;
|
|
1764
|
-
const { flowType } =
|
|
1949
|
+
const { flowType } = useOryFlow10();
|
|
1765
1950
|
const handleInputChange = (v) => {
|
|
1766
1951
|
setValue(name, v);
|
|
1767
1952
|
};
|
|
1768
1953
|
const value = watch(name);
|
|
1769
|
-
return /* @__PURE__ */
|
|
1954
|
+
return /* @__PURE__ */ jsx49(
|
|
1770
1955
|
InputOTP,
|
|
1771
1956
|
{
|
|
1772
1957
|
maxLength: maxlength != null ? maxlength : 6,
|
|
1773
1958
|
onChange: handleInputChange,
|
|
1774
1959
|
name,
|
|
1775
1960
|
value,
|
|
1776
|
-
children: /* @__PURE__ */
|
|
1961
|
+
children: /* @__PURE__ */ jsx49(
|
|
1777
1962
|
InputOTPGroup,
|
|
1778
1963
|
{
|
|
1779
1964
|
className: cn(
|
|
1780
1965
|
"w-full flex gap-2 justify-stretch",
|
|
1781
1966
|
// 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 ===
|
|
1967
|
+
flowType === FlowType8.Settings && "max-w-[488px]"
|
|
1783
1968
|
),
|
|
1784
|
-
children: [...Array(elements)].map((_, index) => /* @__PURE__ */
|
|
1969
|
+
children: [...Array(elements)].map((_, index) => /* @__PURE__ */ jsx49(InputOTPSlot, { index }, index))
|
|
1785
1970
|
}
|
|
1786
1971
|
)
|
|
1787
1972
|
}
|
|
@@ -1789,13 +1974,13 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
1789
1974
|
};
|
|
1790
1975
|
|
|
1791
1976
|
// src/theme/default/components/form/section.tsx
|
|
1792
|
-
import { jsx as
|
|
1977
|
+
import { jsx as jsx50, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1793
1978
|
var DefaultFormSection = ({
|
|
1794
1979
|
children,
|
|
1795
1980
|
nodes: _nodes,
|
|
1796
1981
|
...rest
|
|
1797
1982
|
}) => {
|
|
1798
|
-
return /* @__PURE__ */
|
|
1983
|
+
return /* @__PURE__ */ jsx50(
|
|
1799
1984
|
"form",
|
|
1800
1985
|
{
|
|
1801
1986
|
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 +1996,8 @@ var DefaultFormSectionContent = ({
|
|
|
1811
1996
|
}) => {
|
|
1812
1997
|
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
1998
|
/* @__PURE__ */ jsxs27("div", { className: "flex flex-col gap-2", children: [
|
|
1814
|
-
/* @__PURE__ */
|
|
1815
|
-
/* @__PURE__ */
|
|
1999
|
+
/* @__PURE__ */ jsx50("h3", { className: "font-medium text-interface-foreground-default-primary", children: title }),
|
|
2000
|
+
/* @__PURE__ */ jsx50("span", { className: "text-interface-foreground-default-secondary", children: description })
|
|
1816
2001
|
] }),
|
|
1817
2002
|
children
|
|
1818
2003
|
] });
|
|
@@ -1828,7 +2013,7 @@ var DefaultFormSectionFooter = ({
|
|
|
1828
2013
|
"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
2014
|
),
|
|
1830
2015
|
children: [
|
|
1831
|
-
/* @__PURE__ */
|
|
2016
|
+
/* @__PURE__ */ jsx50("span", { children: text }),
|
|
1832
2017
|
children
|
|
1833
2018
|
]
|
|
1834
2019
|
}
|
|
@@ -1838,31 +2023,31 @@ var DefaultFormSectionFooter = ({
|
|
|
1838
2023
|
// src/theme/default/components/form/text.tsx
|
|
1839
2024
|
import { uiTextToFormattedMessage as uiTextToFormattedMessage9 } from "@ory/elements-react";
|
|
1840
2025
|
import { useIntl as useIntl12 } from "react-intl";
|
|
1841
|
-
import { Fragment as Fragment4, jsx as
|
|
2026
|
+
import { Fragment as Fragment4, jsx as jsx51, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1842
2027
|
function DefaultText({ node, attributes }) {
|
|
1843
2028
|
var _a;
|
|
1844
2029
|
const intl = useIntl12();
|
|
1845
2030
|
const lookup = (_a = attributes.text.context) == null ? void 0 : _a.secrets;
|
|
1846
2031
|
if (lookup) {
|
|
1847
2032
|
return /* @__PURE__ */ jsxs28(Fragment4, { children: [
|
|
1848
|
-
/* @__PURE__ */
|
|
1849
|
-
lookup.map((text, index) => /* @__PURE__ */
|
|
2033
|
+
/* @__PURE__ */ jsx51("p", { "data-testid": `ory/form/node/text/${attributes.id}/label`, children: node.meta.label ? uiTextToFormattedMessage9(node.meta.label, intl) : "" }),
|
|
2034
|
+
lookup.map((text, index) => /* @__PURE__ */ jsx51(
|
|
1850
2035
|
"pre",
|
|
1851
2036
|
{
|
|
1852
2037
|
"data-testid": `ory/form/node/text/lookup_secret_codes/text`,
|
|
1853
|
-
children: /* @__PURE__ */
|
|
2038
|
+
children: /* @__PURE__ */ jsx51("code", { children: text ? uiTextToFormattedMessage9(text, intl) : "" })
|
|
1854
2039
|
},
|
|
1855
2040
|
index
|
|
1856
2041
|
))
|
|
1857
2042
|
] });
|
|
1858
2043
|
}
|
|
1859
|
-
return /* @__PURE__ */
|
|
2044
|
+
return /* @__PURE__ */ jsx51(Fragment4, { children: /* @__PURE__ */ jsxs28(
|
|
1860
2045
|
"p",
|
|
1861
2046
|
{
|
|
1862
2047
|
"data-testid": `ory/form/node/text/${attributes.id}/label`,
|
|
1863
2048
|
id: attributes.id,
|
|
1864
2049
|
children: [
|
|
1865
|
-
node.meta.label ? /* @__PURE__ */
|
|
2050
|
+
node.meta.label ? /* @__PURE__ */ jsx51("label", { children: uiTextToFormattedMessage9(node.meta.label, intl) }) : null,
|
|
1866
2051
|
attributes.text ? uiTextToFormattedMessage9(attributes.text, intl) : ""
|
|
1867
2052
|
]
|
|
1868
2053
|
}
|
|
@@ -1870,29 +2055,29 @@ function DefaultText({ node, attributes }) {
|
|
|
1870
2055
|
}
|
|
1871
2056
|
|
|
1872
2057
|
// src/theme/default/components/generic/page-header.tsx
|
|
1873
|
-
import { useComponents as
|
|
2058
|
+
import { useComponents as useComponents4 } from "@ory/elements-react";
|
|
1874
2059
|
|
|
1875
2060
|
// src/theme/default/components/ui/user-menu.tsx
|
|
1876
|
-
import { useOryFlow as
|
|
2061
|
+
import { useOryFlow as useOryFlow11 } from "@ory/elements-react";
|
|
1877
2062
|
import { DropdownMenuLabel as DropdownMenuLabel2 } from "@radix-ui/react-dropdown-menu";
|
|
1878
2063
|
|
|
1879
2064
|
// src/theme/default/assets/icons/logout.svg
|
|
1880
2065
|
import * as React27 from "react";
|
|
1881
|
-
import { jsx as
|
|
2066
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
1882
2067
|
var SvgLogout = (props) => {
|
|
1883
2068
|
var _a, _b;
|
|
1884
|
-
return /* @__PURE__ */
|
|
2069
|
+
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
2070
|
};
|
|
1886
2071
|
var logout_default = SvgLogout;
|
|
1887
2072
|
|
|
1888
2073
|
// src/theme/default/assets/icons/settings.svg
|
|
1889
2074
|
import * as React28 from "react";
|
|
1890
|
-
import { jsx as
|
|
2075
|
+
import { jsx as jsx53, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1891
2076
|
var SvgSettings = (props) => {
|
|
1892
2077
|
var _a, _b;
|
|
1893
|
-
return /* @__PURE__ */
|
|
1894
|
-
/* @__PURE__ */
|
|
1895
|
-
/* @__PURE__ */
|
|
2078
|
+
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: [
|
|
2079
|
+
/* @__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" }),
|
|
2080
|
+
/* @__PURE__ */ jsx53("path", { d: "M6 8a2 2 0 1 0 4 0 2 2 0 0 0-4 0" })
|
|
1896
2081
|
] }) });
|
|
1897
2082
|
};
|
|
1898
2083
|
var settings_default = SvgSettings;
|
|
@@ -1972,10 +2157,10 @@ var getUserInitials = (session) => {
|
|
|
1972
2157
|
// src/theme/default/components/ui/dropdown-menu.tsx
|
|
1973
2158
|
import { forwardRef as forwardRef3 } from "react";
|
|
1974
2159
|
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1975
|
-
import { jsx as
|
|
2160
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
1976
2161
|
var DropdownMenu = DropdownMenuPrimitive.Root;
|
|
1977
2162
|
var DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
1978
|
-
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */
|
|
2163
|
+
var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props }, ref) => /* @__PURE__ */ jsx54(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx54(
|
|
1979
2164
|
DropdownMenuPrimitive.Content,
|
|
1980
2165
|
{
|
|
1981
2166
|
ref,
|
|
@@ -1990,7 +2175,7 @@ var DropdownMenuContent = forwardRef3(({ className, sideOffset = 16, ...props },
|
|
|
1990
2175
|
}
|
|
1991
2176
|
) }));
|
|
1992
2177
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
1993
|
-
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
2178
|
+
var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx54(
|
|
1994
2179
|
DropdownMenuPrimitive.Item,
|
|
1995
2180
|
{
|
|
1996
2181
|
ref,
|
|
@@ -2008,7 +2193,7 @@ var DropdownMenuItem = forwardRef3(({ className, inset, ...props }, ref) => /* @
|
|
|
2008
2193
|
}
|
|
2009
2194
|
));
|
|
2010
2195
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
2011
|
-
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */
|
|
2196
|
+
var DropdownMenuLabel = forwardRef3(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx54(
|
|
2012
2197
|
DropdownMenuPrimitive.Label,
|
|
2013
2198
|
{
|
|
2014
2199
|
ref,
|
|
@@ -2027,31 +2212,31 @@ import { forwardRef as forwardRef4 } from "react";
|
|
|
2027
2212
|
|
|
2028
2213
|
// src/theme/default/assets/icons/user.svg
|
|
2029
2214
|
import * as React29 from "react";
|
|
2030
|
-
import { jsx as
|
|
2215
|
+
import { jsx as jsx55 } from "react/jsx-runtime";
|
|
2031
2216
|
var SvgUser = (props) => {
|
|
2032
2217
|
var _a, _b;
|
|
2033
|
-
return /* @__PURE__ */
|
|
2218
|
+
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
2219
|
};
|
|
2035
2220
|
var user_default = SvgUser;
|
|
2036
2221
|
|
|
2037
2222
|
// src/theme/default/components/ui/user-avater.tsx
|
|
2038
|
-
import { jsx as
|
|
2223
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
2039
2224
|
var UserAvatar = forwardRef4(
|
|
2040
2225
|
({ initials, ...rest }, ref) => {
|
|
2041
|
-
return /* @__PURE__ */
|
|
2226
|
+
return /* @__PURE__ */ jsx56(
|
|
2042
2227
|
"button",
|
|
2043
2228
|
{
|
|
2044
2229
|
ref,
|
|
2045
2230
|
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
2231
|
...rest,
|
|
2047
|
-
children: /* @__PURE__ */
|
|
2232
|
+
children: /* @__PURE__ */ jsx56("div", { className: "relative flex size-full items-center justify-center", children: initials.avatar ? /* @__PURE__ */ jsx56(
|
|
2048
2233
|
"img",
|
|
2049
2234
|
{
|
|
2050
2235
|
src: initials.avatar,
|
|
2051
2236
|
alt: initials.primary,
|
|
2052
2237
|
className: "w-full object-contain"
|
|
2053
2238
|
}
|
|
2054
|
-
) : /* @__PURE__ */
|
|
2239
|
+
) : /* @__PURE__ */ jsx56(
|
|
2055
2240
|
user_default,
|
|
2056
2241
|
{
|
|
2057
2242
|
size: 24,
|
|
@@ -2065,27 +2250,27 @@ var UserAvatar = forwardRef4(
|
|
|
2065
2250
|
UserAvatar.displayName = "UserAvatar";
|
|
2066
2251
|
|
|
2067
2252
|
// src/theme/default/components/ui/user-menu.tsx
|
|
2068
|
-
import { jsx as
|
|
2253
|
+
import { jsx as jsx57, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
2069
2254
|
var UserMenu = ({ session }) => {
|
|
2070
|
-
const { config } =
|
|
2255
|
+
const { config } = useOryFlow11();
|
|
2071
2256
|
const initials = getUserInitials(session);
|
|
2072
2257
|
const logoutFlow = useClientLogout(config);
|
|
2073
2258
|
return /* @__PURE__ */ jsxs30(DropdownMenu, { children: [
|
|
2074
|
-
/* @__PURE__ */
|
|
2259
|
+
/* @__PURE__ */ jsx57(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx57(UserAvatar, { initials, title: "User Menu" }) }),
|
|
2075
2260
|
/* @__PURE__ */ jsxs30(DropdownMenuContent, { children: [
|
|
2076
2261
|
/* @__PURE__ */ jsxs30(DropdownMenuLabel2, { className: "flex gap-3 px-5 py-4.5", children: [
|
|
2077
|
-
/* @__PURE__ */
|
|
2262
|
+
/* @__PURE__ */ jsx57(UserAvatar, { disabled: true, initials }),
|
|
2078
2263
|
/* @__PURE__ */ jsxs30("div", { className: "flex flex-col justify-center text-sm leading-tight", children: [
|
|
2079
|
-
/* @__PURE__ */
|
|
2080
|
-
initials.secondary && /* @__PURE__ */
|
|
2264
|
+
/* @__PURE__ */ jsx57("div", { className: "text-interface-foreground-default-primary leading-tight font-medium", children: initials.primary }),
|
|
2265
|
+
initials.secondary && /* @__PURE__ */ jsx57("div", { className: "text-interface-foreground-default-tertiary leading-tight", children: initials.secondary })
|
|
2081
2266
|
] })
|
|
2082
2267
|
] }),
|
|
2083
|
-
/* @__PURE__ */
|
|
2084
|
-
/* @__PURE__ */
|
|
2268
|
+
/* @__PURE__ */ jsx57(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs30("a", { href: "/settings", children: [
|
|
2269
|
+
/* @__PURE__ */ jsx57(settings_default, { size: 16 }),
|
|
2085
2270
|
" User settings"
|
|
2086
2271
|
] }) }),
|
|
2087
|
-
/* @__PURE__ */
|
|
2088
|
-
/* @__PURE__ */
|
|
2272
|
+
/* @__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: [
|
|
2273
|
+
/* @__PURE__ */ jsx57(logout_default, { size: 16 }),
|
|
2089
2274
|
" Logout"
|
|
2090
2275
|
] }) })
|
|
2091
2276
|
] })
|
|
@@ -2094,32 +2279,32 @@ var UserMenu = ({ session }) => {
|
|
|
2094
2279
|
|
|
2095
2280
|
// src/theme/default/components/generic/page-header.tsx
|
|
2096
2281
|
import { useSession } from "@ory/elements-react/client";
|
|
2097
|
-
import { jsx as
|
|
2282
|
+
import { jsx as jsx58, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
2098
2283
|
var DefaultPageHeader = (_props) => {
|
|
2099
|
-
const { Card } =
|
|
2284
|
+
const { Card } = useComponents4();
|
|
2100
2285
|
const { session } = useSession();
|
|
2101
|
-
return /* @__PURE__ */
|
|
2102
|
-
/* @__PURE__ */
|
|
2103
|
-
/* @__PURE__ */
|
|
2286
|
+
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: [
|
|
2287
|
+
/* @__PURE__ */ jsx58("div", { className: "relative h-10 flex-1", children: /* @__PURE__ */ jsx58(Card.Logo, {}) }),
|
|
2288
|
+
/* @__PURE__ */ jsx58(UserMenu, { session })
|
|
2104
2289
|
] }) }) });
|
|
2105
2290
|
};
|
|
2106
2291
|
|
|
2107
2292
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
2108
2293
|
import { useEffect as useEffect4 } from "react";
|
|
2109
|
-
import { useFormContext as
|
|
2294
|
+
import { useFormContext as useFormContext8 } from "react-hook-form";
|
|
2110
2295
|
import { useDebounceValue as useDebounceValue2 } from "usehooks-ts";
|
|
2111
2296
|
|
|
2112
2297
|
// src/theme/default/assets/icons/trash.svg
|
|
2113
2298
|
import * as React30 from "react";
|
|
2114
|
-
import { jsx as
|
|
2299
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
2115
2300
|
var SvgTrash = (props) => {
|
|
2116
2301
|
var _a, _b;
|
|
2117
|
-
return /* @__PURE__ */
|
|
2302
|
+
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
2303
|
};
|
|
2119
2304
|
var trash_default = SvgTrash;
|
|
2120
2305
|
|
|
2121
2306
|
// src/theme/default/components/settings/settings-oidc.tsx
|
|
2122
|
-
import { jsx as
|
|
2307
|
+
import { jsx as jsx60, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
2123
2308
|
function DefaultSettingsOidc({
|
|
2124
2309
|
linkButtons,
|
|
2125
2310
|
unlinkButtons
|
|
@@ -2127,9 +2312,9 @@ function DefaultSettingsOidc({
|
|
|
2127
2312
|
const hasLinkButtons = linkButtons.length > 0;
|
|
2128
2313
|
const hasUnlinkButtons = unlinkButtons.length > 0;
|
|
2129
2314
|
return /* @__PURE__ */ jsxs32("div", { className: "flex flex-col gap-8", children: [
|
|
2130
|
-
hasLinkButtons && /* @__PURE__ */
|
|
2315
|
+
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
2316
|
const attrs = button.attributes;
|
|
2132
|
-
return /* @__PURE__ */
|
|
2317
|
+
return /* @__PURE__ */ jsx60(
|
|
2133
2318
|
DefaultButtonSocial,
|
|
2134
2319
|
{
|
|
2135
2320
|
showLabel: true,
|
|
@@ -2140,12 +2325,12 @@ function DefaultSettingsOidc({
|
|
|
2140
2325
|
attrs.value
|
|
2141
2326
|
);
|
|
2142
2327
|
}) }),
|
|
2143
|
-
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */
|
|
2328
|
+
hasUnlinkButtons && hasLinkButtons ? /* @__PURE__ */ jsx60(DefaultHorizontalDivider, {}) : null,
|
|
2144
2329
|
unlinkButtons.map((button) => {
|
|
2145
2330
|
if (button.attributes.node_type !== "input") {
|
|
2146
2331
|
return null;
|
|
2147
2332
|
}
|
|
2148
|
-
return /* @__PURE__ */
|
|
2333
|
+
return /* @__PURE__ */ jsx60(UnlinkRow, { button }, button.attributes.value);
|
|
2149
2334
|
})
|
|
2150
2335
|
] });
|
|
2151
2336
|
}
|
|
@@ -2154,7 +2339,7 @@ function UnlinkRow({ button }) {
|
|
|
2154
2339
|
const [clicked, setClicked] = useDebounceValue2(false, 100);
|
|
2155
2340
|
const {
|
|
2156
2341
|
formState: { isSubmitting }
|
|
2157
|
-
} =
|
|
2342
|
+
} = useFormContext8();
|
|
2158
2343
|
const attrs = button.attributes;
|
|
2159
2344
|
const provider = (_b = extractProvider((_a = button.meta.label) == null ? void 0 : _a.context)) != null ? _b : "";
|
|
2160
2345
|
const Logo = provider_logos_default[attrs.value.split("-")[0]];
|
|
@@ -2169,10 +2354,10 @@ function UnlinkRow({ button }) {
|
|
|
2169
2354
|
}, [isSubmitting, setClicked]);
|
|
2170
2355
|
return /* @__PURE__ */ jsxs32("div", { className: "flex justify-between", children: [
|
|
2171
2356
|
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-6", children: [
|
|
2172
|
-
Logo ? /* @__PURE__ */
|
|
2173
|
-
/* @__PURE__ */
|
|
2357
|
+
Logo ? /* @__PURE__ */ jsx60(Logo, { size: 32 }) : /* @__PURE__ */ jsx60(provider_logos_default.generic, { size: 32 }),
|
|
2358
|
+
/* @__PURE__ */ jsx60("p", { className: "text-sm font-medium text-interface-foreground-default-secondary", children: provider })
|
|
2174
2359
|
] }),
|
|
2175
|
-
/* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ jsx60(
|
|
2176
2361
|
"button",
|
|
2177
2362
|
{
|
|
2178
2363
|
...attrs,
|
|
@@ -2181,7 +2366,7 @@ function UnlinkRow({ button }) {
|
|
|
2181
2366
|
disabled: isSubmitting,
|
|
2182
2367
|
className: "relative",
|
|
2183
2368
|
title: `Unlink ${provider}`,
|
|
2184
|
-
children: clicked ? /* @__PURE__ */
|
|
2369
|
+
children: clicked ? /* @__PURE__ */ jsx60(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx60(
|
|
2185
2370
|
trash_default,
|
|
2186
2371
|
{
|
|
2187
2372
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2194,20 +2379,20 @@ function UnlinkRow({ button }) {
|
|
|
2194
2379
|
}
|
|
2195
2380
|
|
|
2196
2381
|
// src/theme/default/components/settings/settings-passkey.tsx
|
|
2197
|
-
import { useComponents as
|
|
2198
|
-
import { useFormContext as
|
|
2199
|
-
import { jsx as
|
|
2382
|
+
import { useComponents as useComponents5 } from "@ory/elements-react";
|
|
2383
|
+
import { useFormContext as useFormContext9 } from "react-hook-form";
|
|
2384
|
+
import { jsx as jsx61, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
2200
2385
|
function DefaultSettingsPasskey({
|
|
2201
2386
|
triggerButton,
|
|
2202
2387
|
removeButtons
|
|
2203
2388
|
}) {
|
|
2204
2389
|
const {
|
|
2205
2390
|
formState: { isSubmitting }
|
|
2206
|
-
} =
|
|
2207
|
-
const { Node: Node2 } =
|
|
2391
|
+
} = useFormContext9();
|
|
2392
|
+
const { Node: Node2 } = useComponents5();
|
|
2208
2393
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2209
2394
|
return /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
2210
|
-
/* @__PURE__ */
|
|
2395
|
+
/* @__PURE__ */ jsx61("div", { className: "flex max-w-[60%] items-end gap-3", children: triggerButton && /* @__PURE__ */ jsx61(
|
|
2211
2396
|
Node2.Button,
|
|
2212
2397
|
{
|
|
2213
2398
|
node: triggerButton,
|
|
@@ -2216,8 +2401,8 @@ function DefaultSettingsPasskey({
|
|
|
2216
2401
|
}
|
|
2217
2402
|
) }),
|
|
2218
2403
|
hasRemoveButtons ? /* @__PURE__ */ jsxs33("div", { className: "flex flex-col gap-8", children: [
|
|
2219
|
-
/* @__PURE__ */
|
|
2220
|
-
/* @__PURE__ */
|
|
2404
|
+
/* @__PURE__ */ jsx61(DefaultHorizontalDivider, {}),
|
|
2405
|
+
/* @__PURE__ */ jsx61("div", { className: "flex flex-col gap-2", children: removeButtons.map((node, i) => {
|
|
2221
2406
|
var _a, _b;
|
|
2222
2407
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2223
2408
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -2229,7 +2414,7 @@ function DefaultSettingsPasskey({
|
|
|
2229
2414
|
className: "flex justify-between gap-6 md:items-center",
|
|
2230
2415
|
children: [
|
|
2231
2416
|
/* @__PURE__ */ jsxs33("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2232
|
-
/* @__PURE__ */
|
|
2417
|
+
/* @__PURE__ */ jsx61(
|
|
2233
2418
|
passkey_default,
|
|
2234
2419
|
{
|
|
2235
2420
|
size: 32,
|
|
@@ -2238,15 +2423,15 @@ function DefaultSettingsPasskey({
|
|
|
2238
2423
|
),
|
|
2239
2424
|
/* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2240
2425
|
/* @__PURE__ */ jsxs33("div", { className: "flex-1 flex-col truncate", children: [
|
|
2241
|
-
/* @__PURE__ */
|
|
2242
|
-
/* @__PURE__ */
|
|
2426
|
+
/* @__PURE__ */ jsx61("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2427
|
+
/* @__PURE__ */ jsx61("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2243
2428
|
] }),
|
|
2244
|
-
addedAt && /* @__PURE__ */
|
|
2429
|
+
addedAt && /* @__PURE__ */ jsx61("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2245
2430
|
dateStyle: "long"
|
|
2246
2431
|
}).format(new Date(addedAt)) })
|
|
2247
2432
|
] })
|
|
2248
2433
|
] }),
|
|
2249
|
-
/* @__PURE__ */
|
|
2434
|
+
/* @__PURE__ */ jsx61(
|
|
2250
2435
|
"button",
|
|
2251
2436
|
{
|
|
2252
2437
|
...node.attributes,
|
|
@@ -2254,7 +2439,7 @@ function DefaultSettingsPasskey({
|
|
|
2254
2439
|
onClick: node.onClick,
|
|
2255
2440
|
disabled: isSubmitting,
|
|
2256
2441
|
className: "relative",
|
|
2257
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2442
|
+
children: isSubmitting ? /* @__PURE__ */ jsx61(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx61(
|
|
2258
2443
|
trash_default,
|
|
2259
2444
|
{
|
|
2260
2445
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2274,25 +2459,25 @@ function DefaultSettingsPasskey({
|
|
|
2274
2459
|
|
|
2275
2460
|
// src/theme/default/assets/icons/download.svg
|
|
2276
2461
|
import * as React31 from "react";
|
|
2277
|
-
import { jsx as
|
|
2462
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
2278
2463
|
var SvgDownload = (props) => {
|
|
2279
2464
|
var _a, _b;
|
|
2280
|
-
return /* @__PURE__ */
|
|
2465
|
+
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
2466
|
};
|
|
2282
2467
|
var download_default = SvgDownload;
|
|
2283
2468
|
|
|
2284
2469
|
// src/theme/default/assets/icons/refresh.svg
|
|
2285
2470
|
import * as React32 from "react";
|
|
2286
|
-
import { jsx as
|
|
2471
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
2287
2472
|
var SvgRefresh = (props) => {
|
|
2288
2473
|
var _a, _b;
|
|
2289
|
-
return /* @__PURE__ */
|
|
2474
|
+
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
2475
|
};
|
|
2291
2476
|
var refresh_default = SvgRefresh;
|
|
2292
2477
|
|
|
2293
2478
|
// src/theme/default/components/settings/settings-recovery-codes.tsx
|
|
2294
|
-
import { useFormContext as
|
|
2295
|
-
import { Fragment as Fragment5, jsx as
|
|
2479
|
+
import { useFormContext as useFormContext10 } from "react-hook-form";
|
|
2480
|
+
import { Fragment as Fragment5, jsx as jsx64, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
2296
2481
|
function DefaultSettingsRecoveryCodes({
|
|
2297
2482
|
codes,
|
|
2298
2483
|
regnerateButton,
|
|
@@ -2302,7 +2487,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2302
2487
|
}) {
|
|
2303
2488
|
const {
|
|
2304
2489
|
formState: { isSubmitting }
|
|
2305
|
-
} =
|
|
2490
|
+
} = useFormContext10();
|
|
2306
2491
|
const onDownload = () => {
|
|
2307
2492
|
const element = document.createElement("a");
|
|
2308
2493
|
const file = new Blob([codes.join("\n")], {
|
|
@@ -2315,11 +2500,11 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2315
2500
|
};
|
|
2316
2501
|
const hasCodes = codes.length >= 1;
|
|
2317
2502
|
return /* @__PURE__ */ jsxs34("div", { className: "flex flex-col gap-8", children: [
|
|
2318
|
-
codes.length > 0 && /* @__PURE__ */
|
|
2503
|
+
codes.length > 0 && /* @__PURE__ */ jsx64(DefaultHorizontalDivider, {}),
|
|
2319
2504
|
/* @__PURE__ */ jsxs34("div", { className: "flex gap-4 justify-between", children: [
|
|
2320
|
-
/* @__PURE__ */
|
|
2505
|
+
/* @__PURE__ */ jsx64("span", { className: "text-interface-foreground-default-tertiary", children: revealButton && "Reveal recovery codes" }),
|
|
2321
2506
|
/* @__PURE__ */ jsxs34("div", { className: "flex gap-2", children: [
|
|
2322
|
-
regnerateButton && codes.length > 0 && /* @__PURE__ */
|
|
2507
|
+
regnerateButton && codes.length > 0 && /* @__PURE__ */ jsx64(
|
|
2323
2508
|
"button",
|
|
2324
2509
|
{
|
|
2325
2510
|
...regnerateButton.attributes,
|
|
@@ -2328,7 +2513,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2328
2513
|
onClick: onRegenerate,
|
|
2329
2514
|
disabled: isSubmitting,
|
|
2330
2515
|
"data-loading": isSubmitting,
|
|
2331
|
-
children: /* @__PURE__ */
|
|
2516
|
+
children: /* @__PURE__ */ jsx64(
|
|
2332
2517
|
refresh_default,
|
|
2333
2518
|
{
|
|
2334
2519
|
size: 24,
|
|
@@ -2337,7 +2522,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2337
2522
|
)
|
|
2338
2523
|
}
|
|
2339
2524
|
),
|
|
2340
|
-
revealButton && /* @__PURE__ */
|
|
2525
|
+
revealButton && /* @__PURE__ */ jsx64(Fragment5, { children: /* @__PURE__ */ jsx64(
|
|
2341
2526
|
"button",
|
|
2342
2527
|
{
|
|
2343
2528
|
...revealButton.attributes,
|
|
@@ -2345,7 +2530,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2345
2530
|
className: "ml-auto",
|
|
2346
2531
|
onClick: onReveal,
|
|
2347
2532
|
title: "Reveal recovery codes",
|
|
2348
|
-
children: /* @__PURE__ */
|
|
2533
|
+
children: /* @__PURE__ */ jsx64(
|
|
2349
2534
|
eye_default,
|
|
2350
2535
|
{
|
|
2351
2536
|
size: 24,
|
|
@@ -2354,7 +2539,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2354
2539
|
)
|
|
2355
2540
|
}
|
|
2356
2541
|
) }),
|
|
2357
|
-
hasCodes && /* @__PURE__ */
|
|
2542
|
+
hasCodes && /* @__PURE__ */ jsx64(
|
|
2358
2543
|
"button",
|
|
2359
2544
|
{
|
|
2360
2545
|
onClick: onDownload,
|
|
@@ -2362,7 +2547,7 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2362
2547
|
className: "ml-auto",
|
|
2363
2548
|
"data-testid": "ory/screen/settings/group/recovery_code/download",
|
|
2364
2549
|
title: "Download recovery codes",
|
|
2365
|
-
children: /* @__PURE__ */
|
|
2550
|
+
children: /* @__PURE__ */ jsx64(
|
|
2366
2551
|
download_default,
|
|
2367
2552
|
{
|
|
2368
2553
|
size: 24,
|
|
@@ -2373,32 +2558,32 @@ function DefaultSettingsRecoveryCodes({
|
|
|
2373
2558
|
)
|
|
2374
2559
|
] })
|
|
2375
2560
|
] }),
|
|
2376
|
-
hasCodes ? /* @__PURE__ */
|
|
2561
|
+
hasCodes ? /* @__PURE__ */ jsx64("div", { className: "rounded-general p-6 bg-interface-background-default-secondary border-interface-border-default-primary", children: /* @__PURE__ */ jsx64(
|
|
2377
2562
|
"div",
|
|
2378
2563
|
{
|
|
2379
2564
|
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
2565
|
"data-testid": "ory/screen/settings/group/recovery_code/codes",
|
|
2381
|
-
children: codes.map((code) => /* @__PURE__ */
|
|
2566
|
+
children: codes.map((code) => /* @__PURE__ */ jsx64("p", { children: code }, code))
|
|
2382
2567
|
}
|
|
2383
2568
|
) }) : null
|
|
2384
2569
|
] });
|
|
2385
2570
|
}
|
|
2386
2571
|
|
|
2387
2572
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2388
|
-
import { useComponents as
|
|
2573
|
+
import { useComponents as useComponents6 } from "@ory/elements-react";
|
|
2389
2574
|
|
|
2390
2575
|
// src/theme/default/assets/icons/qrcode.svg
|
|
2391
2576
|
import * as React33 from "react";
|
|
2392
|
-
import { jsx as
|
|
2577
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
2393
2578
|
var SvgQrcode = (props) => {
|
|
2394
2579
|
var _a, _b;
|
|
2395
|
-
return /* @__PURE__ */
|
|
2580
|
+
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
2581
|
};
|
|
2397
2582
|
var qrcode_default = SvgQrcode;
|
|
2398
2583
|
|
|
2399
2584
|
// src/theme/default/components/settings/settings-totp.tsx
|
|
2400
|
-
import { useFormContext as
|
|
2401
|
-
import { jsx as
|
|
2585
|
+
import { useFormContext as useFormContext11 } from "react-hook-form";
|
|
2586
|
+
import { jsx as jsx66, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
2402
2587
|
function DefaultSettingsTotp({
|
|
2403
2588
|
totpImage,
|
|
2404
2589
|
totpInput,
|
|
@@ -2406,10 +2591,10 @@ function DefaultSettingsTotp({
|
|
|
2406
2591
|
totpUnlink,
|
|
2407
2592
|
onUnlink
|
|
2408
2593
|
}) {
|
|
2409
|
-
const { Node: Node2, Card } =
|
|
2594
|
+
const { Node: Node2, Card } = useComponents6();
|
|
2410
2595
|
const {
|
|
2411
2596
|
formState: { isSubmitting }
|
|
2412
|
-
} =
|
|
2597
|
+
} = useFormContext11();
|
|
2413
2598
|
if (totpUnlink) {
|
|
2414
2599
|
const {
|
|
2415
2600
|
type,
|
|
@@ -2419,18 +2604,18 @@ function DefaultSettingsTotp({
|
|
|
2419
2604
|
...buttonAttrs
|
|
2420
2605
|
} = totpUnlink.attributes;
|
|
2421
2606
|
return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2422
|
-
/* @__PURE__ */
|
|
2607
|
+
/* @__PURE__ */ jsx66("div", { className: "col-span-full", children: /* @__PURE__ */ jsx66(Card.Divider, {}) }),
|
|
2423
2608
|
/* @__PURE__ */ jsxs35("div", { className: "col-span-full flex items-center gap-6", children: [
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
/* @__PURE__ */
|
|
2426
|
-
/* @__PURE__ */
|
|
2609
|
+
/* @__PURE__ */ jsx66("div", { className: "aspect-square size-8 ", children: /* @__PURE__ */ jsx66(qrcode_default, { size: 32 }) }),
|
|
2610
|
+
/* @__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" }) }),
|
|
2611
|
+
/* @__PURE__ */ jsx66(
|
|
2427
2612
|
"button",
|
|
2428
2613
|
{
|
|
2429
2614
|
type: type === "button" ? "button" : "submit",
|
|
2430
2615
|
...buttonAttrs,
|
|
2431
2616
|
onClick: onUnlink,
|
|
2432
2617
|
disabled: isSubmitting,
|
|
2433
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2618
|
+
children: isSubmitting ? /* @__PURE__ */ jsx66(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx66(
|
|
2434
2619
|
trash_default,
|
|
2435
2620
|
{
|
|
2436
2621
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2444,8 +2629,8 @@ function DefaultSettingsTotp({
|
|
|
2444
2629
|
}
|
|
2445
2630
|
if (totpImage && totpSecret && totpInput) {
|
|
2446
2631
|
return /* @__PURE__ */ jsxs35("div", { className: "grid grid-cols-1 gap-8 md:grid-cols-2", children: [
|
|
2447
|
-
/* @__PURE__ */
|
|
2448
|
-
/* @__PURE__ */
|
|
2632
|
+
/* @__PURE__ */ jsx66("div", { className: "col-span-full", children: /* @__PURE__ */ jsx66(DefaultHorizontalDivider, {}) }),
|
|
2633
|
+
/* @__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
2634
|
Node2.Image,
|
|
2450
2635
|
{
|
|
2451
2636
|
node: totpImage,
|
|
@@ -2455,12 +2640,12 @@ function DefaultSettingsTotp({
|
|
|
2455
2640
|
}
|
|
2456
2641
|
) }) }) }),
|
|
2457
2642
|
/* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-6", children: [
|
|
2458
|
-
/* @__PURE__ */
|
|
2643
|
+
/* @__PURE__ */ jsx66(
|
|
2459
2644
|
Node2.Label,
|
|
2460
2645
|
{
|
|
2461
2646
|
node: totpSecret,
|
|
2462
2647
|
attributes: totpSecret.attributes,
|
|
2463
|
-
children: /* @__PURE__ */
|
|
2648
|
+
children: /* @__PURE__ */ jsx66(
|
|
2464
2649
|
Node2.Input,
|
|
2465
2650
|
{
|
|
2466
2651
|
node: totpSecret,
|
|
@@ -2475,12 +2660,12 @@ function DefaultSettingsTotp({
|
|
|
2475
2660
|
)
|
|
2476
2661
|
}
|
|
2477
2662
|
),
|
|
2478
|
-
/* @__PURE__ */
|
|
2663
|
+
/* @__PURE__ */ jsx66(
|
|
2479
2664
|
Node2.Label,
|
|
2480
2665
|
{
|
|
2481
2666
|
attributes: totpInput.attributes,
|
|
2482
2667
|
node: totpInput,
|
|
2483
|
-
children: /* @__PURE__ */
|
|
2668
|
+
children: /* @__PURE__ */ jsx66(
|
|
2484
2669
|
Node2.CodeInput,
|
|
2485
2670
|
{
|
|
2486
2671
|
node: totpInput,
|
|
@@ -2495,20 +2680,20 @@ function DefaultSettingsTotp({
|
|
|
2495
2680
|
}
|
|
2496
2681
|
|
|
2497
2682
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2498
|
-
import { useComponents as
|
|
2683
|
+
import { useComponents as useComponents7 } from "@ory/elements-react";
|
|
2499
2684
|
|
|
2500
2685
|
// src/theme/default/assets/icons/key.svg
|
|
2501
2686
|
import * as React34 from "react";
|
|
2502
|
-
import { jsx as
|
|
2687
|
+
import { jsx as jsx67 } from "react/jsx-runtime";
|
|
2503
2688
|
var SvgKey = (props) => {
|
|
2504
2689
|
var _a, _b;
|
|
2505
|
-
return /* @__PURE__ */
|
|
2690
|
+
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
2691
|
};
|
|
2507
2692
|
var key_default = SvgKey;
|
|
2508
2693
|
|
|
2509
2694
|
// src/theme/default/components/settings/settings-webauthn.tsx
|
|
2510
|
-
import { useFormContext as
|
|
2511
|
-
import { jsx as
|
|
2695
|
+
import { useFormContext as useFormContext12 } from "react-hook-form";
|
|
2696
|
+
import { jsx as jsx68, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
2512
2697
|
function DefaultSettingsWebauthn({
|
|
2513
2698
|
nameInput,
|
|
2514
2699
|
triggerButton,
|
|
@@ -2516,17 +2701,17 @@ function DefaultSettingsWebauthn({
|
|
|
2516
2701
|
}) {
|
|
2517
2702
|
const {
|
|
2518
2703
|
formState: { isSubmitting }
|
|
2519
|
-
} =
|
|
2520
|
-
const { Node: Node2, Card } =
|
|
2704
|
+
} = useFormContext12();
|
|
2705
|
+
const { Node: Node2, Card } = useComponents7();
|
|
2521
2706
|
const hasRemoveButtons = removeButtons.length > 0;
|
|
2522
2707
|
return /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
|
|
2523
2708
|
/* @__PURE__ */ jsxs36("div", { className: "flex md:max-w-96 sm:items-end gap-3 flex-col sm:flex-row", children: [
|
|
2524
|
-
/* @__PURE__ */
|
|
2709
|
+
/* @__PURE__ */ jsx68("div", { className: "flex-1", children: /* @__PURE__ */ jsx68(
|
|
2525
2710
|
Node2.Label,
|
|
2526
2711
|
{
|
|
2527
2712
|
node: nameInput,
|
|
2528
2713
|
attributes: nameInput.attributes,
|
|
2529
|
-
children: /* @__PURE__ */
|
|
2714
|
+
children: /* @__PURE__ */ jsx68(
|
|
2530
2715
|
Node2.Input,
|
|
2531
2716
|
{
|
|
2532
2717
|
node: nameInput,
|
|
@@ -2535,7 +2720,7 @@ function DefaultSettingsWebauthn({
|
|
|
2535
2720
|
)
|
|
2536
2721
|
}
|
|
2537
2722
|
) }),
|
|
2538
|
-
triggerButton ? /* @__PURE__ */
|
|
2723
|
+
triggerButton ? /* @__PURE__ */ jsx68(
|
|
2539
2724
|
Node2.Button,
|
|
2540
2725
|
{
|
|
2541
2726
|
node: triggerButton,
|
|
@@ -2545,8 +2730,8 @@ function DefaultSettingsWebauthn({
|
|
|
2545
2730
|
) : null
|
|
2546
2731
|
] }),
|
|
2547
2732
|
hasRemoveButtons ? /* @__PURE__ */ jsxs36("div", { className: "flex flex-col gap-8", children: [
|
|
2548
|
-
/* @__PURE__ */
|
|
2549
|
-
/* @__PURE__ */
|
|
2733
|
+
/* @__PURE__ */ jsx68(Card.Divider, {}),
|
|
2734
|
+
/* @__PURE__ */ jsx68("div", { className: "flex flex-col gap-4", children: removeButtons.map((node, i) => {
|
|
2550
2735
|
var _a, _b;
|
|
2551
2736
|
const context = (_b = (_a = node.meta.label) == null ? void 0 : _a.context) != null ? _b : {};
|
|
2552
2737
|
const addedAt = "added_at" in context ? context.added_at : null;
|
|
@@ -2558,7 +2743,7 @@ function DefaultSettingsWebauthn({
|
|
|
2558
2743
|
className: "flex justify-between gap-6 md:items-center",
|
|
2559
2744
|
children: [
|
|
2560
2745
|
/* @__PURE__ */ jsxs36("div", { className: "flex gap-2 items-center flex-1 truncate", children: [
|
|
2561
|
-
/* @__PURE__ */
|
|
2746
|
+
/* @__PURE__ */ jsx68(
|
|
2562
2747
|
key_default,
|
|
2563
2748
|
{
|
|
2564
2749
|
size: 32,
|
|
@@ -2567,15 +2752,15 @@ function DefaultSettingsWebauthn({
|
|
|
2567
2752
|
),
|
|
2568
2753
|
/* @__PURE__ */ jsxs36("div", { className: "flex-1 flex-col md:flex-row md:items-center flex md:justify-between gap-4 truncate", children: [
|
|
2569
2754
|
/* @__PURE__ */ jsxs36("div", { className: "flex-1 flex-col truncate", children: [
|
|
2570
|
-
/* @__PURE__ */
|
|
2571
|
-
/* @__PURE__ */
|
|
2755
|
+
/* @__PURE__ */ jsx68("p", { className: "text-sm font-medium text-interface-foreground-default-secondary truncate", children: displayName }),
|
|
2756
|
+
/* @__PURE__ */ jsx68("span", { className: "text-sm text-interface-foreground-default-tertiary hidden sm:block truncate", children: keyId })
|
|
2572
2757
|
] }),
|
|
2573
|
-
addedAt && /* @__PURE__ */
|
|
2758
|
+
addedAt && /* @__PURE__ */ jsx68("p", { className: "text-sm text-interface-foreground-default-tertiary", children: new Intl.DateTimeFormat(void 0, {
|
|
2574
2759
|
dateStyle: "long"
|
|
2575
2760
|
}).format(new Date(addedAt)) })
|
|
2576
2761
|
] })
|
|
2577
2762
|
] }),
|
|
2578
|
-
/* @__PURE__ */
|
|
2763
|
+
/* @__PURE__ */ jsx68(
|
|
2579
2764
|
"button",
|
|
2580
2765
|
{
|
|
2581
2766
|
...node.attributes,
|
|
@@ -2583,7 +2768,7 @@ function DefaultSettingsWebauthn({
|
|
|
2583
2768
|
onClick: node.onClick,
|
|
2584
2769
|
disabled: isSubmitting,
|
|
2585
2770
|
className: "relative",
|
|
2586
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
2771
|
+
children: isSubmitting ? /* @__PURE__ */ jsx68(Spinner, { className: "relative" }) : /* @__PURE__ */ jsx68(
|
|
2587
2772
|
trash_default,
|
|
2588
2773
|
{
|
|
2589
2774
|
className: "text-button-link-default-secondary hover:text-button-link-default-secondary-hover",
|
|
@@ -2602,34 +2787,34 @@ function DefaultSettingsWebauthn({
|
|
|
2602
2787
|
}
|
|
2603
2788
|
|
|
2604
2789
|
// src/theme/default/components/card/auth-method-list-container.tsx
|
|
2605
|
-
import { jsx as
|
|
2790
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
2606
2791
|
function DefaultAuthMethodListContainer({
|
|
2607
2792
|
children
|
|
2608
2793
|
}) {
|
|
2609
|
-
return /* @__PURE__ */
|
|
2794
|
+
return /* @__PURE__ */ jsx69("div", { className: "grid grid-cols-1 gap-2", children });
|
|
2610
2795
|
}
|
|
2611
2796
|
|
|
2612
2797
|
// src/theme/default/components/form/captcha.tsx
|
|
2613
|
-
import { isUiNodeInputAttributes as
|
|
2798
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes5 } from "@ory/client-fetch";
|
|
2614
2799
|
import { Turnstile } from "@marsidev/react-turnstile";
|
|
2615
2800
|
import { useRef as useRef2 } from "react";
|
|
2616
|
-
import { useFormContext as
|
|
2617
|
-
import { jsx as
|
|
2801
|
+
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
2802
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
2618
2803
|
var DefaultCaptcha = ({ node }) => {
|
|
2619
|
-
const { setValue } =
|
|
2804
|
+
const { setValue } = useFormContext13();
|
|
2620
2805
|
const ref = useRef2();
|
|
2621
2806
|
const nodes = [];
|
|
2622
|
-
if (
|
|
2807
|
+
if (isUiNodeInputAttributes5(node.attributes)) {
|
|
2623
2808
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2624
2809
|
nodes.push(
|
|
2625
|
-
/* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsx70(DefaultInput, { node, attributes: node.attributes }, 1)
|
|
2626
2811
|
);
|
|
2627
2812
|
}
|
|
2628
2813
|
}
|
|
2629
|
-
if (
|
|
2814
|
+
if (isUiNodeInputAttributes5(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2630
2815
|
const options = JSON.parse(node.attributes.value);
|
|
2631
2816
|
nodes.push(
|
|
2632
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx70(
|
|
2633
2818
|
Turnstile,
|
|
2634
2819
|
{
|
|
2635
2820
|
ref,
|
|
@@ -2656,9 +2841,83 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
2656
2841
|
return nodes;
|
|
2657
2842
|
};
|
|
2658
2843
|
|
|
2844
|
+
// src/theme/default/assets/icons/personal.svg
|
|
2845
|
+
import * as React35 from "react";
|
|
2846
|
+
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
2847
|
+
var SvgPersonal = (props) => {
|
|
2848
|
+
var _a, _b;
|
|
2849
|
+
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" }) });
|
|
2850
|
+
};
|
|
2851
|
+
var personal_default = SvgPersonal;
|
|
2852
|
+
|
|
2853
|
+
// src/theme/default/assets/icons/message.svg
|
|
2854
|
+
import * as React36 from "react";
|
|
2855
|
+
import { jsx as jsx72 } from "react/jsx-runtime";
|
|
2856
|
+
var SvgMessage = (props) => {
|
|
2857
|
+
var _a, _b;
|
|
2858
|
+
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" }) });
|
|
2859
|
+
};
|
|
2860
|
+
var message_default = SvgMessage;
|
|
2861
|
+
|
|
2862
|
+
// src/theme/default/assets/icons/phone.svg
|
|
2863
|
+
import * as React37 from "react";
|
|
2864
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
2865
|
+
var SvgPhone = (props) => {
|
|
2866
|
+
var _a, _b;
|
|
2867
|
+
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" }) });
|
|
2868
|
+
};
|
|
2869
|
+
var phone_default = SvgPhone;
|
|
2870
|
+
|
|
2871
|
+
// src/theme/default/components/form/consent-scope-checkbox.tsx
|
|
2872
|
+
import { useIntl as useIntl13 } from "react-intl";
|
|
2873
|
+
import * as Switch from "@radix-ui/react-switch";
|
|
2874
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
2875
|
+
var ScopeIcons = {
|
|
2876
|
+
openid: personal_default,
|
|
2877
|
+
offline_access: personal_default,
|
|
2878
|
+
profile: personal_default,
|
|
2879
|
+
email: message_default,
|
|
2880
|
+
phone: phone_default
|
|
2881
|
+
};
|
|
2882
|
+
function DefaultConsentScopeCheckbox({
|
|
2883
|
+
attributes,
|
|
2884
|
+
onCheckedChange
|
|
2885
|
+
}) {
|
|
2886
|
+
var _a;
|
|
2887
|
+
const intl = useIntl13();
|
|
2888
|
+
const Icon = (_a = ScopeIcons[attributes.value]) != null ? _a : personal_default;
|
|
2889
|
+
return /* @__PURE__ */ jsx74(
|
|
2890
|
+
ListItem,
|
|
2891
|
+
{
|
|
2892
|
+
as: "label",
|
|
2893
|
+
icon: Icon,
|
|
2894
|
+
title: intl.formatMessage({
|
|
2895
|
+
id: `consent.scope.${attributes.value}.title`,
|
|
2896
|
+
defaultMessage: attributes.value
|
|
2897
|
+
}),
|
|
2898
|
+
description: intl.formatMessage({
|
|
2899
|
+
id: `consent.scope.${attributes.value}.description`,
|
|
2900
|
+
defaultMessage: []
|
|
2901
|
+
}),
|
|
2902
|
+
className: "col-span-2",
|
|
2903
|
+
children: /* @__PURE__ */ jsx74(
|
|
2904
|
+
Switch.Root,
|
|
2905
|
+
{
|
|
2906
|
+
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",
|
|
2907
|
+
"data-testid": `ory/screen/consent/scope-checkbox`,
|
|
2908
|
+
value: attributes.value,
|
|
2909
|
+
onCheckedChange,
|
|
2910
|
+
defaultChecked: true,
|
|
2911
|
+
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" })
|
|
2912
|
+
}
|
|
2913
|
+
)
|
|
2914
|
+
}
|
|
2915
|
+
);
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2659
2918
|
// src/theme/default/components/default-components.tsx
|
|
2660
2919
|
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;
|
|
2920
|
+
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
2921
|
return {
|
|
2663
2922
|
Card: {
|
|
2664
2923
|
Root: (_b = (_a = overrides == null ? void 0 : overrides.Card) == null ? void 0 : _a.Root) != null ? _b : DefaultCard,
|
|
@@ -2683,24 +2942,25 @@ function getOryComponents(overrides) {
|
|
|
2683
2942
|
Checkbox: (_J = (_I = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _I.Checkbox) != null ? _J : DefaultCheckbox,
|
|
2684
2943
|
Text: (_L = (_K = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _K.Text) != null ? _L : DefaultText,
|
|
2685
2944
|
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
|
|
2945
|
+
Captcha: (_P = (_O = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _O.Captcha) != null ? _P : DefaultCaptcha,
|
|
2946
|
+
ConsentScopeCheckbox: (_R = (_Q = overrides == null ? void 0 : overrides.Node) == null ? void 0 : _Q.ConsentScopeCheckbox) != null ? _R : DefaultConsentScopeCheckbox
|
|
2687
2947
|
},
|
|
2688
2948
|
Form: {
|
|
2689
|
-
Root: (
|
|
2690
|
-
Group: (
|
|
2691
|
-
OidcRoot: (
|
|
2692
|
-
RecoveryCodesSettings: (
|
|
2693
|
-
TotpSettings: (
|
|
2694
|
-
OidcSettings: (
|
|
2695
|
-
WebauthnSettings: (
|
|
2696
|
-
PasskeySettings: (
|
|
2949
|
+
Root: (_T = (_S = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _S.Root) != null ? _T : DefaultFormContainer,
|
|
2950
|
+
Group: (_V = (_U = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _U.Group) != null ? _V : DefaultGroupContainer,
|
|
2951
|
+
OidcRoot: (_X = (_W = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _W.OidcRoot) != null ? _X : DefaultSocialButtonContainer,
|
|
2952
|
+
RecoveryCodesSettings: (_Z = (_Y = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _Y.RecoveryCodesSettings) != null ? _Z : DefaultSettingsRecoveryCodes,
|
|
2953
|
+
TotpSettings: (_$ = (__ = overrides == null ? void 0 : overrides.Form) == null ? void 0 : __.TotpSettings) != null ? _$ : DefaultSettingsTotp,
|
|
2954
|
+
OidcSettings: (_ba = (_aa = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _aa.OidcSettings) != null ? _ba : DefaultSettingsOidc,
|
|
2955
|
+
WebauthnSettings: (_da = (_ca = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ca.WebauthnSettings) != null ? _da : DefaultSettingsWebauthn,
|
|
2956
|
+
PasskeySettings: (_fa = (_ea = overrides == null ? void 0 : overrides.Form) == null ? void 0 : _ea.PasskeySettings) != null ? _fa : DefaultSettingsPasskey
|
|
2697
2957
|
},
|
|
2698
2958
|
Message: {
|
|
2699
|
-
Root: (
|
|
2700
|
-
Content: (
|
|
2959
|
+
Root: (_ha = (_ga = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ga.Root) != null ? _ha : DefaultMessageContainer,
|
|
2960
|
+
Content: (_ja = (_ia = overrides == null ? void 0 : overrides.Message) == null ? void 0 : _ia.Content) != null ? _ja : DefaultMessage
|
|
2701
2961
|
},
|
|
2702
2962
|
Page: {
|
|
2703
|
-
Header: (
|
|
2963
|
+
Header: (_la = (_ka = overrides == null ? void 0 : overrides.Page) == null ? void 0 : _ka.Header) != null ? _la : DefaultPageHeader
|
|
2704
2964
|
}
|
|
2705
2965
|
};
|
|
2706
2966
|
}
|
|
@@ -2723,81 +2983,81 @@ import {
|
|
|
2723
2983
|
} from "react";
|
|
2724
2984
|
|
|
2725
2985
|
// src/context/form-state.ts
|
|
2726
|
-
import { FlowType as
|
|
2986
|
+
import { FlowType as FlowType10 } from "@ory/client-fetch";
|
|
2727
2987
|
import { useReducer, useState as useState4 } from "react";
|
|
2728
2988
|
|
|
2729
2989
|
// src/components/card/card-two-step.utils.ts
|
|
2730
|
-
import { FlowType as
|
|
2990
|
+
import { FlowType as FlowType9, UiNodeGroupEnum as UiNodeGroupEnum4 } from "@ory/client-fetch";
|
|
2731
2991
|
|
|
2732
2992
|
// src/context/flow-context.tsx
|
|
2733
|
-
import { jsx as
|
|
2993
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
2734
2994
|
var OryFlowContext = createContext2(null);
|
|
2735
2995
|
|
|
2736
2996
|
// src/context/provider.tsx
|
|
2737
|
-
import { jsx as
|
|
2997
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
2738
2998
|
|
|
2739
2999
|
// src/components/card/header.tsx
|
|
2740
|
-
import { jsx as
|
|
3000
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
2741
3001
|
|
|
2742
3002
|
// src/components/form/form-provider.tsx
|
|
2743
3003
|
import { UiNodeGroupEnum as UiNodeGroupEnum6 } from "@ory/client-fetch";
|
|
2744
|
-
import { FormProvider, useForm
|
|
3004
|
+
import { FormProvider, useForm } from "react-hook-form";
|
|
2745
3005
|
|
|
2746
3006
|
// src/components/form/form-helpers.ts
|
|
2747
|
-
import { isUiNodeInputAttributes as
|
|
3007
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
|
|
2748
3008
|
|
|
2749
3009
|
// src/components/form/form-resolver.ts
|
|
2750
|
-
import { isUiNodeInputAttributes as
|
|
3010
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes7 } from "@ory/client-fetch";
|
|
2751
3011
|
|
|
2752
3012
|
// src/components/form/form-provider.tsx
|
|
2753
|
-
import { jsx as
|
|
3013
|
+
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
2754
3014
|
|
|
2755
3015
|
// src/components/card/card.tsx
|
|
2756
|
-
import { jsx as
|
|
3016
|
+
import { jsx as jsx79 } from "react/jsx-runtime";
|
|
2757
3017
|
|
|
2758
3018
|
// src/components/card/footer.tsx
|
|
2759
|
-
import { jsx as
|
|
3019
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
2760
3020
|
|
|
2761
3021
|
// src/components/card/content.tsx
|
|
2762
|
-
import { jsx as
|
|
3022
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
2763
3023
|
|
|
2764
3024
|
// src/components/card/card-two-step.tsx
|
|
2765
3025
|
import {
|
|
2766
|
-
isUiNodeInputAttributes as
|
|
2767
|
-
isUiNodeScriptAttributes as
|
|
2768
|
-
UiNodeGroupEnum as
|
|
2769
|
-
UiNodeInputAttributesTypeEnum as
|
|
3026
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes11,
|
|
3027
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes4,
|
|
3028
|
+
UiNodeGroupEnum as UiNodeGroupEnum12,
|
|
3029
|
+
UiNodeInputAttributesTypeEnum as UiNodeInputAttributesTypeEnum4
|
|
2770
3030
|
} from "@ory/client-fetch";
|
|
2771
|
-
import { useFormContext as
|
|
3031
|
+
import { useFormContext as useFormContext18 } from "react-hook-form";
|
|
2772
3032
|
|
|
2773
3033
|
// src/components/form/form.tsx
|
|
2774
3034
|
import {
|
|
2775
|
-
FlowType as
|
|
3035
|
+
FlowType as FlowType17,
|
|
2776
3036
|
isUiNodeAnchorAttributes,
|
|
2777
3037
|
isUiNodeImageAttributes,
|
|
2778
|
-
isUiNodeInputAttributes as
|
|
2779
|
-
isUiNodeScriptAttributes
|
|
3038
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes8,
|
|
3039
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes2
|
|
2780
3040
|
} from "@ory/client-fetch";
|
|
2781
|
-
import { useFormContext as
|
|
2782
|
-
import { useIntl as
|
|
3041
|
+
import { useFormContext as useFormContext15 } from "react-hook-form";
|
|
3042
|
+
import { useIntl as useIntl14 } from "react-intl";
|
|
2783
3043
|
|
|
2784
3044
|
// src/components/form/useOryFormSubmit.ts
|
|
2785
3045
|
import {
|
|
2786
|
-
FlowType as
|
|
3046
|
+
FlowType as FlowType16,
|
|
2787
3047
|
UiNodeGroupEnum as UiNodeGroupEnum7
|
|
2788
3048
|
} from "@ory/client-fetch";
|
|
2789
|
-
import { useFormContext as
|
|
3049
|
+
import { useFormContext as useFormContext14 } from "react-hook-form";
|
|
2790
3050
|
|
|
2791
3051
|
// src/util/onSubmitLogin.ts
|
|
2792
3052
|
import {
|
|
2793
|
-
FlowType as
|
|
3053
|
+
FlowType as FlowType11,
|
|
2794
3054
|
handleFlowError,
|
|
2795
3055
|
loginUrl
|
|
2796
3056
|
} from "@ory/client-fetch";
|
|
2797
3057
|
|
|
2798
3058
|
// src/util/onSubmitRecovery.ts
|
|
2799
3059
|
import {
|
|
2800
|
-
FlowType as
|
|
3060
|
+
FlowType as FlowType12,
|
|
2801
3061
|
handleContinueWith,
|
|
2802
3062
|
handleFlowError as handleFlowError2,
|
|
2803
3063
|
instanceOfContinueWithRecoveryUi,
|
|
@@ -2806,7 +3066,7 @@ import {
|
|
|
2806
3066
|
|
|
2807
3067
|
// src/util/onSubmitRegistration.ts
|
|
2808
3068
|
import {
|
|
2809
|
-
FlowType as
|
|
3069
|
+
FlowType as FlowType13,
|
|
2810
3070
|
handleContinueWith as handleContinueWith2,
|
|
2811
3071
|
handleFlowError as handleFlowError3,
|
|
2812
3072
|
registrationUrl
|
|
@@ -2814,7 +3074,7 @@ import {
|
|
|
2814
3074
|
|
|
2815
3075
|
// src/util/onSubmitSettings.ts
|
|
2816
3076
|
import {
|
|
2817
|
-
FlowType as
|
|
3077
|
+
FlowType as FlowType14,
|
|
2818
3078
|
handleContinueWith as handleContinueWith3,
|
|
2819
3079
|
handleFlowError as handleFlowError4,
|
|
2820
3080
|
isResponseError,
|
|
@@ -2824,92 +3084,98 @@ import {
|
|
|
2824
3084
|
|
|
2825
3085
|
// src/util/onSubmitVerification.ts
|
|
2826
3086
|
import {
|
|
2827
|
-
FlowType as
|
|
3087
|
+
FlowType as FlowType15,
|
|
2828
3088
|
handleFlowError as handleFlowError5,
|
|
2829
3089
|
verificationUrl
|
|
2830
3090
|
} from "@ory/client-fetch";
|
|
2831
3091
|
|
|
2832
3092
|
// src/components/form/form.tsx
|
|
2833
|
-
import {
|
|
3093
|
+
import { jsx as jsx82, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
2834
3094
|
|
|
2835
3095
|
// src/components/form/messages.tsx
|
|
2836
|
-
import { jsx as
|
|
3096
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
2837
3097
|
|
|
2838
3098
|
// src/components/form/nodes/input.tsx
|
|
2839
3099
|
import {
|
|
2840
|
-
UiNodeGroupEnum as
|
|
2841
|
-
UiNodeInputAttributesTypeEnum
|
|
3100
|
+
UiNodeGroupEnum as UiNodeGroupEnum9,
|
|
3101
|
+
UiNodeInputAttributesTypeEnum as UiNodeInputAttributesTypeEnum2
|
|
2842
3102
|
} from "@ory/client-fetch";
|
|
2843
3103
|
import { useEffect as useEffect5, useRef as useRef3 } from "react";
|
|
2844
|
-
import { useFormContext as
|
|
2845
|
-
import { jsx as
|
|
3104
|
+
import { useFormContext as useFormContext16 } from "react-hook-form";
|
|
3105
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
2846
3106
|
|
|
2847
3107
|
// src/components/form/nodes/node.tsx
|
|
2848
3108
|
import {
|
|
2849
3109
|
isUiNodeAnchorAttributes as isUiNodeAnchorAttributes2,
|
|
2850
3110
|
isUiNodeImageAttributes as isUiNodeImageAttributes2,
|
|
2851
|
-
isUiNodeInputAttributes as
|
|
2852
|
-
isUiNodeScriptAttributes as
|
|
3111
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes9,
|
|
3112
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes3,
|
|
2853
3113
|
isUiNodeTextAttributes,
|
|
2854
|
-
UiNodeGroupEnum as
|
|
3114
|
+
UiNodeGroupEnum as UiNodeGroupEnum10
|
|
2855
3115
|
} from "@ory/client-fetch";
|
|
2856
|
-
import { jsx as
|
|
3116
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
2857
3117
|
|
|
2858
3118
|
// src/components/form/social.tsx
|
|
2859
3119
|
import {
|
|
2860
|
-
UiNodeGroupEnum as
|
|
3120
|
+
UiNodeGroupEnum as UiNodeGroupEnum11
|
|
2861
3121
|
} from "@ory/client-fetch";
|
|
2862
|
-
import { useFormContext as
|
|
2863
|
-
import { jsx as
|
|
3122
|
+
import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
3123
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
2864
3124
|
|
|
2865
3125
|
// src/components/card/card-two-step.tsx
|
|
2866
|
-
import {
|
|
3126
|
+
import { jsx as jsx87, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2867
3127
|
|
|
2868
3128
|
// src/components/form/groups.tsx
|
|
2869
|
-
import { jsx as
|
|
3129
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
2870
3130
|
|
|
2871
3131
|
// src/components/form/section.tsx
|
|
2872
|
-
import { useFormContext as
|
|
2873
|
-
import { jsx as
|
|
3132
|
+
import { useFormContext as useFormContext19 } from "react-hook-form";
|
|
3133
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
3134
|
+
|
|
3135
|
+
// src/components/card/card-consent.tsx
|
|
3136
|
+
import { jsx as jsx90, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2874
3137
|
|
|
2875
3138
|
// src/components/generic/divider.tsx
|
|
2876
|
-
import { UiNodeGroupEnum as
|
|
2877
|
-
import { jsx as
|
|
3139
|
+
import { UiNodeGroupEnum as UiNodeGroupEnum13 } from "@ory/client-fetch";
|
|
3140
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
2878
3141
|
|
|
2879
3142
|
// src/components/generic/page-header.tsx
|
|
2880
|
-
import { jsx as
|
|
3143
|
+
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
2881
3144
|
|
|
2882
3145
|
// src/components/settings/settings-card.tsx
|
|
2883
|
-
import {
|
|
2884
|
-
|
|
3146
|
+
import {
|
|
3147
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
|
|
3148
|
+
UiNodeGroupEnum as UiNodeGroupEnum14
|
|
3149
|
+
} from "@ory/client-fetch";
|
|
3150
|
+
import { useIntl as useIntl20 } from "react-intl";
|
|
2885
3151
|
|
|
2886
3152
|
// 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
3153
|
import { useIntl as useIntl15 } from "react-intl";
|
|
2894
|
-
import {
|
|
3154
|
+
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
3155
|
+
import { Fragment as Fragment6, jsx as jsx93, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
2895
3156
|
|
|
2896
|
-
// src/components/settings/
|
|
2897
|
-
import { useIntl as useIntl16 } from "react-intl";
|
|
3157
|
+
// src/components/settings/passkey-settings.tsx
|
|
2898
3158
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
2899
|
-
import {
|
|
3159
|
+
import { useIntl as useIntl16 } from "react-intl";
|
|
3160
|
+
import { Fragment as Fragment7, jsx as jsx94, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
2900
3161
|
|
|
2901
|
-
// src/components/settings/
|
|
2902
|
-
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
3162
|
+
// src/components/settings/recovery-codes-settings.tsx
|
|
2903
3163
|
import { useIntl as useIntl17 } from "react-intl";
|
|
2904
|
-
import {
|
|
3164
|
+
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
3165
|
+
import { Fragment as Fragment8, jsx as jsx95, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
2905
3166
|
|
|
2906
|
-
// src/components/settings/
|
|
3167
|
+
// src/components/settings/totp-settings.tsx
|
|
2907
3168
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
2908
3169
|
import { useIntl as useIntl18 } from "react-intl";
|
|
2909
|
-
import { Fragment as
|
|
3170
|
+
import { Fragment as Fragment9, jsx as jsx96, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
3171
|
+
|
|
3172
|
+
// src/components/settings/webauthn-settings.tsx
|
|
3173
|
+
import { useFormContext as useFormContext24 } from "react-hook-form";
|
|
3174
|
+
import { useIntl as useIntl19 } from "react-intl";
|
|
3175
|
+
import { Fragment as Fragment10, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
2910
3176
|
|
|
2911
3177
|
// src/components/settings/settings-card.tsx
|
|
2912
|
-
import { Fragment as
|
|
3178
|
+
import { Fragment as Fragment11, jsx as jsx98, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
2913
3179
|
|
|
2914
3180
|
// src/locales/en.json
|
|
2915
3181
|
var en_default = {
|
|
@@ -3174,6 +3440,20 @@ var en_default = {
|
|
|
3174
3440
|
"property.username": "username",
|
|
3175
3441
|
"property.identifier": "identifier",
|
|
3176
3442
|
"property.code": "code",
|
|
3443
|
+
"consent.title": "Authorize {party}",
|
|
3444
|
+
"consent.subtitle": "A third party application wants to access information associated with your account {identifier}.",
|
|
3445
|
+
"consent.scope.openid.title": "Identity",
|
|
3446
|
+
"consent.scope.openid.description": "Allows the application to verify your identity. This is required for authentication and a trusted login experience.",
|
|
3447
|
+
"consent.scope.offline_access.title": "Offline Access",
|
|
3448
|
+
"consent.scope.offline_access.description": "Allows this application to keep you signed in even when you're not actively using it.",
|
|
3449
|
+
"consent.scope.profile.title": "Profile Information",
|
|
3450
|
+
"consent.scope.profile.description": "Allows access to your basic profile details, including your username, first name, and last name.",
|
|
3451
|
+
"consent.scope.email.title": "Email Address",
|
|
3452
|
+
"consent.scope.email.description": "Retrieve your email address and its verification status.",
|
|
3453
|
+
"consent.scope.address.title": "Physical Address",
|
|
3454
|
+
"consent.scope.address.description": "Access your postal address.",
|
|
3455
|
+
"consent.scope.phone.title": "Phone Number",
|
|
3456
|
+
"consent.scope.phone.description": "Retrieve your phone number and its verification status.",
|
|
3177
3457
|
"error.title.what-happened": "What happened?",
|
|
3178
3458
|
"error.title.what-can-i-do": "What can I do?",
|
|
3179
3459
|
"error.instructions": "Please try again in a few minutes or contact the website operator.",
|
|
@@ -3350,7 +3630,7 @@ var de_default = {
|
|
|
3350
3630
|
"two-step.code.description": "Ein Best\xE4tigungscode wird an Ihre E-Mail gesendet.",
|
|
3351
3631
|
"two-step.code.title": "E-Mail-Code",
|
|
3352
3632
|
"two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Ger\xE4ts",
|
|
3353
|
-
"two-step.passkey.title": "
|
|
3633
|
+
"two-step.passkey.title": "Passkey (empfohlen)",
|
|
3354
3634
|
"two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verkn\xFCpft ist",
|
|
3355
3635
|
"two-step.password.title": "Passwort",
|
|
3356
3636
|
"two-step.webauthn.title": "Sicherheitsschl\xFCssel",
|
|
@@ -3445,6 +3725,20 @@ var de_default = {
|
|
|
3445
3725
|
"property.phone": "Telefon",
|
|
3446
3726
|
"property.code": "Code",
|
|
3447
3727
|
"property.username": "Benutzername",
|
|
3728
|
+
"consent.title": "Autorisieren {party}",
|
|
3729
|
+
"consent.subtitle": "Eine Drittanbieteranwendung m\xF6chte auf Informationen zugreifen, die mit Ihrem Konto {identifier} verkn\xFCpft sind.",
|
|
3730
|
+
"consent.scope.openid.title": "Identit\xE4t",
|
|
3731
|
+
"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.",
|
|
3732
|
+
"consent.scope.offline_access.title": "Offline-Zugriff",
|
|
3733
|
+
"consent.scope.offline_access.description": "Erm\xF6glicht dieser Anwendung, Sie angemeldet zu lassen, auch wenn Sie sie nicht aktiv nutzen.",
|
|
3734
|
+
"consent.scope.profile.title": "Profilinformationen",
|
|
3735
|
+
"consent.scope.profile.description": "Erm\xF6glicht den Zugriff auf Ihre grundlegenden Profildetails, einschlie\xDFlich Ihres Benutzernamens, Vornamens und Nachnamens.",
|
|
3736
|
+
"consent.scope.email.title": "E-Mail-Adresse",
|
|
3737
|
+
"consent.scope.email.description": "Erm\xF6glicht den Abruf Ihrer E-Mail-Adresse und deren \xDCberpr\xFCfungsstatus.",
|
|
3738
|
+
"consent.scope.address.title": "Physische Adresse",
|
|
3739
|
+
"consent.scope.address.description": "Erm\xF6glicht den Zugriff auf Ihre Postanschrift.",
|
|
3740
|
+
"consent.scope.phone.title": "Telefonnummer",
|
|
3741
|
+
"consent.scope.phone.description": "Erm\xF6glicht den Abruf Ihrer Telefonnummer und deren \xDCberpr\xFCfungsstatus.",
|
|
3448
3742
|
"error.title.what-happened": "Was ist passiert?",
|
|
3449
3743
|
"error.footer.copy": "Kopieren",
|
|
3450
3744
|
"error.footer.text": "Bitte f\xFCgen Sie bei der Meldung dieses Fehlers die folgenden Informationen hinzu:",
|
|
@@ -3716,6 +4010,20 @@ var es_default = {
|
|
|
3716
4010
|
"property.password": "",
|
|
3717
4011
|
"property.phone": "",
|
|
3718
4012
|
"property.username": "",
|
|
4013
|
+
"consent.title": "Autorizar {party}",
|
|
4014
|
+
"consent.subtitle": "Una aplicaci\xF3n de terceros quiere acceder a la informaci\xF3n asociada a su cuenta {identifier}.",
|
|
4015
|
+
"consent.scope.openid.title": "Identidad",
|
|
4016
|
+
"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.",
|
|
4017
|
+
"consent.scope.offline_access.title": "Acceso sin conexi\xF3n",
|
|
4018
|
+
"consent.scope.offline_access.description": "Permite que esta aplicaci\xF3n le mantenga conectado incluso cuando no la est\xE9 utilizando activamente.",
|
|
4019
|
+
"consent.scope.profile.title": "Informaci\xF3n del perfil",
|
|
4020
|
+
"consent.scope.profile.description": "Permite el acceso a los detalles b\xE1sicos de su perfil, incluyendo su nombre de usuario, nombre y apellido.",
|
|
4021
|
+
"consent.scope.email.title": "Direcci\xF3n de correo electr\xF3nico",
|
|
4022
|
+
"consent.scope.email.description": "Recupere su direcci\xF3n de correo electr\xF3nico y su estado de verificaci\xF3n.",
|
|
4023
|
+
"consent.scope.address.title": "Direcci\xF3n f\xEDsica",
|
|
4024
|
+
"consent.scope.address.description": "Acceda a su direcci\xF3n postal.",
|
|
4025
|
+
"consent.scope.phone.title": "N\xFAmero de tel\xE9fono",
|
|
4026
|
+
"consent.scope.phone.description": "Recupere su n\xFAmero de tel\xE9fono y su estado de verificaci\xF3n.",
|
|
3719
4027
|
"error.action.go-back": "",
|
|
3720
4028
|
"error.footer.copy": "",
|
|
3721
4029
|
"error.footer.text": "",
|
|
@@ -3987,6 +4295,20 @@ var fr_default = {
|
|
|
3987
4295
|
"property.password": "",
|
|
3988
4296
|
"property.phone": "",
|
|
3989
4297
|
"property.username": "",
|
|
4298
|
+
"consent.title": "Autoriser {party}",
|
|
4299
|
+
"consent.subtitle": "Une application tierce souhaite acc\xE9der aux informations associ\xE9es \xE0 votre compte {identifier}.",
|
|
4300
|
+
"consent.scope.openid.title": "Identit\xE9",
|
|
4301
|
+
"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.",
|
|
4302
|
+
"consent.scope.offline_access.title": "Acc\xE8s hors ligne",
|
|
4303
|
+
"consent.scope.offline_access.description": "Permet \xE0 cette application de vous maintenir connect\xE9 m\xEAme lorsque vous ne l'utilisez pas activement.",
|
|
4304
|
+
"consent.scope.profile.title": "Informations de profil",
|
|
4305
|
+
"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.",
|
|
4306
|
+
"consent.scope.email.title": "Adresse e-mail",
|
|
4307
|
+
"consent.scope.email.description": "R\xE9cup\xE8re votre adresse e-mail et son statut de v\xE9rification.",
|
|
4308
|
+
"consent.scope.address.title": "Adresse physique",
|
|
4309
|
+
"consent.scope.address.description": "Acc\xE8de \xE0 votre adresse postale.",
|
|
4310
|
+
"consent.scope.phone.title": "Num\xE9ro de t\xE9l\xE9phone",
|
|
4311
|
+
"consent.scope.phone.description": "R\xE9cup\xE8re votre num\xE9ro de t\xE9l\xE9phone et son statut de v\xE9rification.",
|
|
3990
4312
|
"error.action.go-back": "",
|
|
3991
4313
|
"error.footer.copy": "",
|
|
3992
4314
|
"error.footer.text": "",
|
|
@@ -4258,6 +4580,20 @@ var nl_default = {
|
|
|
4258
4580
|
"property.password": "",
|
|
4259
4581
|
"property.phone": "",
|
|
4260
4582
|
"property.username": "",
|
|
4583
|
+
"consent.title": "Autoriseren {party}",
|
|
4584
|
+
"consent.subtitle": "Een derde partij applicatie wil toegang tot informatie die aan uw account {identifier} is gekoppeld.",
|
|
4585
|
+
"consent.scope.openid.title": "Identiteit",
|
|
4586
|
+
"consent.scope.openid.description": "Stelt de applicatie in staat uw identiteit te verifi\xEBren. Dit is vereist voor authenticatie en een betrouwbare inlogervaring.",
|
|
4587
|
+
"consent.scope.offline_access.title": "Offline toegang",
|
|
4588
|
+
"consent.scope.offline_access.description": "Stelt deze applicatie in staat u ingelogd te houden, zelfs wanneer u deze niet actief gebruikt.",
|
|
4589
|
+
"consent.scope.profile.title": "Profielinformatie",
|
|
4590
|
+
"consent.scope.profile.description": "Geeft toegang tot uw basisprofielgegevens, inclusief uw gebruikersnaam, voornaam en achternaam.",
|
|
4591
|
+
"consent.scope.email.title": "E-mailadres",
|
|
4592
|
+
"consent.scope.email.description": "Haal uw e-mailadres en de verificatiestatus ervan op.",
|
|
4593
|
+
"consent.scope.address.title": "Fysiek adres",
|
|
4594
|
+
"consent.scope.address.description": "Toegang tot uw postadres.",
|
|
4595
|
+
"consent.scope.phone.title": "Telefoonnummer",
|
|
4596
|
+
"consent.scope.phone.description": "Haal uw telefoonnummer en de verificatiestatus ervan op.",
|
|
4261
4597
|
"error.action.go-back": "",
|
|
4262
4598
|
"error.footer.copy": "",
|
|
4263
4599
|
"error.footer.text": "",
|
|
@@ -4529,6 +4865,20 @@ var pl_default = {
|
|
|
4529
4865
|
"property.phone": "",
|
|
4530
4866
|
"property.username": "",
|
|
4531
4867
|
"property.identifier": "",
|
|
4868
|
+
"consent.title": "Autoryzuj {party}",
|
|
4869
|
+
"consent.subtitle": "Aplikacja trzeciej strony chce uzyska\u0107 dost\u0119p do informacji powi\u0105zanych z Twoim kontem {identifier}.",
|
|
4870
|
+
"consent.scope.openid.title": "To\u017Csamo\u015B\u0107",
|
|
4871
|
+
"consent.scope.openid.description": "Pozwala aplikacji zweryfikowa\u0107 Twoj\u0105 to\u017Csamo\u015B\u0107. Jest to wymagane do uwierzytelniania i zapewnienia zaufanej sesji logowania.",
|
|
4872
|
+
"consent.scope.offline_access.title": "Dost\u0119p offline",
|
|
4873
|
+
"consent.scope.offline_access.description": "Pozwala aplikacji utrzyma\u0107 Twoje logowanie, nawet gdy nie korzystasz z niej aktywnie.",
|
|
4874
|
+
"consent.scope.profile.title": "Informacje profilowe",
|
|
4875
|
+
"consent.scope.profile.description": "Pozwala na dost\u0119p do podstawowych danych profilowych, w tym nazwy u\u017Cytkownika, imienia i nazwiska.",
|
|
4876
|
+
"consent.scope.email.title": "Adres e-mail",
|
|
4877
|
+
"consent.scope.email.description": "Pobierz sw\xF3j adres e-mail oraz status jego weryfikacji.",
|
|
4878
|
+
"consent.scope.address.title": "Adres fizyczny",
|
|
4879
|
+
"consent.scope.address.description": "Dost\u0119p do Twojego adresu pocztowego.",
|
|
4880
|
+
"consent.scope.phone.title": "Numer telefonu",
|
|
4881
|
+
"consent.scope.phone.description": "Pobierz sw\xF3j numer telefonu oraz status jego weryfikacji.",
|
|
4532
4882
|
"error.action.go-back": "",
|
|
4533
4883
|
"error.footer.copy": "",
|
|
4534
4884
|
"error.footer.text": "",
|
|
@@ -4800,6 +5150,20 @@ var pt_default = {
|
|
|
4800
5150
|
"property.password": "",
|
|
4801
5151
|
"property.phone": "",
|
|
4802
5152
|
"property.username": "",
|
|
5153
|
+
"consent.title": "Autorizar {party}",
|
|
5154
|
+
"consent.subtitle": "Um aplicativo de terceiros deseja acessar as informa\xE7\xF5es associadas \xE0 sua conta {identifier}.",
|
|
5155
|
+
"consent.scope.openid.title": "Identidade",
|
|
5156
|
+
"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.",
|
|
5157
|
+
"consent.scope.offline_access.title": "Acesso Offline",
|
|
5158
|
+
"consent.scope.offline_access.description": "Permite que este aplicativo mantenha voc\xEA conectado mesmo quando n\xE3o estiver usando-o ativamente.",
|
|
5159
|
+
"consent.scope.profile.title": "Informa\xE7\xF5es do Perfil",
|
|
5160
|
+
"consent.scope.profile.description": "Permite o acesso aos detalhes b\xE1sicos do seu perfil, incluindo seu nome de usu\xE1rio, primeiro nome e sobrenome.",
|
|
5161
|
+
"consent.scope.email.title": "Endere\xE7o de E-mail",
|
|
5162
|
+
"consent.scope.email.description": "Recupere seu endere\xE7o de e-mail e seu status de verifica\xE7\xE3o.",
|
|
5163
|
+
"consent.scope.address.title": "Endere\xE7o F\xEDsico",
|
|
5164
|
+
"consent.scope.address.description": "Acesse seu endere\xE7o postal.",
|
|
5165
|
+
"consent.scope.phone.title": "N\xFAmero de Telefone",
|
|
5166
|
+
"consent.scope.phone.description": "Recupere seu n\xFAmero de telefone e seu status de verifica\xE7\xE3o.",
|
|
4803
5167
|
"error.action.go-back": "",
|
|
4804
5168
|
"error.footer.copy": "",
|
|
4805
5169
|
"error.footer.text": "",
|
|
@@ -5071,6 +5435,20 @@ var sv_default = {
|
|
|
5071
5435
|
"property.username": "anv\xE4ndarnamn",
|
|
5072
5436
|
"property.identifier": "identifier",
|
|
5073
5437
|
"property.code": "kod",
|
|
5438
|
+
"consent.title": "Auktorisera {party}",
|
|
5439
|
+
"consent.subtitle": "En tredjepartsapplikation vill f\xE5 tillg\xE5ng till information kopplad till ditt konto {identifier}.",
|
|
5440
|
+
"consent.scope.openid.title": "Identitet",
|
|
5441
|
+
"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.",
|
|
5442
|
+
"consent.scope.offline_access.title": "Offline-\xE5tkomst",
|
|
5443
|
+
"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.",
|
|
5444
|
+
"consent.scope.profile.title": "Profilinformation",
|
|
5445
|
+
"consent.scope.profile.description": "Ger tillg\xE5ng till dina grundl\xE4ggande profiluppgifter, inklusive ditt anv\xE4ndarnamn, f\xF6rnamn och efternamn.",
|
|
5446
|
+
"consent.scope.email.title": "E-postadress",
|
|
5447
|
+
"consent.scope.email.description": "H\xE4mta din e-postadress och dess verifieringsstatus.",
|
|
5448
|
+
"consent.scope.address.title": "Fysisk adress",
|
|
5449
|
+
"consent.scope.address.description": "F\xE5 \xE5tkomst till din postadress.",
|
|
5450
|
+
"consent.scope.phone.title": "Telefonnummer",
|
|
5451
|
+
"consent.scope.phone.description": "H\xE4mta ditt telefonnummer och dess verifieringsstatus.",
|
|
5074
5452
|
"error.action.go-back": "",
|
|
5075
5453
|
"error.footer.copy": "",
|
|
5076
5454
|
"error.footer.text": "",
|
|
@@ -5092,7 +5470,7 @@ var OryLocales = {
|
|
|
5092
5470
|
};
|
|
5093
5471
|
|
|
5094
5472
|
// src/context/intl-context.tsx
|
|
5095
|
-
import { jsx as
|
|
5473
|
+
import { jsx as jsx99 } from "react/jsx-runtime";
|
|
5096
5474
|
function mergeTranslations(customTranslations) {
|
|
5097
5475
|
return Object.keys(customTranslations).reduce((acc, key) => {
|
|
5098
5476
|
acc[key] = { ...OryLocales[key], ...customTranslations[key] };
|
|
@@ -5105,12 +5483,12 @@ var IntlProvider = ({
|
|
|
5105
5483
|
customTranslations
|
|
5106
5484
|
}) => {
|
|
5107
5485
|
const messages = mergeTranslations(customTranslations != null ? customTranslations : {});
|
|
5108
|
-
return /* @__PURE__ */
|
|
5486
|
+
return /* @__PURE__ */ jsx99(
|
|
5109
5487
|
OriginalIntlProvider,
|
|
5110
5488
|
{
|
|
5111
5489
|
onWarn: () => ({}),
|
|
5112
5490
|
defaultRichTextElements: {
|
|
5113
|
-
del: (chunks) => /* @__PURE__ */
|
|
5491
|
+
del: (chunks) => /* @__PURE__ */ jsx99("del", { children: chunks })
|
|
5114
5492
|
},
|
|
5115
5493
|
locale,
|
|
5116
5494
|
messages: messages[locale],
|
|
@@ -5122,7 +5500,7 @@ var IntlProvider = ({
|
|
|
5122
5500
|
|
|
5123
5501
|
// src/theme/default/flows/error.tsx
|
|
5124
5502
|
import { FormattedMessage } from "react-intl";
|
|
5125
|
-
import { jsx as
|
|
5503
|
+
import { jsx as jsx100, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
5126
5504
|
function isOAuth2Error(error) {
|
|
5127
5505
|
return !!error && typeof error === "object" && "error" in error && "error_description" in error;
|
|
5128
5506
|
}
|
|
@@ -5175,47 +5553,47 @@ function Error2({
|
|
|
5175
5553
|
const Divider = (_d = (_c = Components == null ? void 0 : Components.Card) == null ? void 0 : _c.Divider) != null ? _d : DefaultHorizontalDivider;
|
|
5176
5554
|
const parsed = useStandardize(error);
|
|
5177
5555
|
const description = errorDescriptions[Math.floor(parsed.code / 100)];
|
|
5178
|
-
return /* @__PURE__ */
|
|
5556
|
+
return /* @__PURE__ */ jsx100(
|
|
5179
5557
|
IntlProvider,
|
|
5180
5558
|
{
|
|
5181
5559
|
locale: (_f = (_e = config.intl) == null ? void 0 : _e.locale) != null ? _f : "en",
|
|
5182
5560
|
customTranslations: (_g = config.intl) == null ? void 0 : _g.customTranslations,
|
|
5183
|
-
children: /* @__PURE__ */
|
|
5561
|
+
children: /* @__PURE__ */ jsx100(Card, { children: /* @__PURE__ */ jsxs46(
|
|
5184
5562
|
"div",
|
|
5185
5563
|
{
|
|
5186
5564
|
className: "flex flex-col gap-6 antialiased",
|
|
5187
5565
|
"data-testid": "ory/screen/error",
|
|
5188
5566
|
children: [
|
|
5189
|
-
/* @__PURE__ */
|
|
5190
|
-
/* @__PURE__ */
|
|
5191
|
-
/* @__PURE__ */
|
|
5192
|
-
/* @__PURE__ */
|
|
5193
|
-
/* @__PURE__ */
|
|
5194
|
-
parsed.reason && /* @__PURE__ */
|
|
5567
|
+
/* @__PURE__ */ jsxs46("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
5568
|
+
/* @__PURE__ */ jsx100(ErrorLogo, { config }),
|
|
5569
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-2", children: [
|
|
5570
|
+
/* @__PURE__ */ jsx100("h2", { className: "text-lg font-semibold leading-normal text-interface-foreground-default-primary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.title.what-happened" }) }),
|
|
5571
|
+
/* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: (_h = parsed.message) != null ? _h : description }),
|
|
5572
|
+
parsed.reason && /* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: parsed.reason })
|
|
5195
5573
|
] })
|
|
5196
5574
|
] }),
|
|
5197
|
-
/* @__PURE__ */
|
|
5198
|
-
/* @__PURE__ */
|
|
5199
|
-
/* @__PURE__ */
|
|
5200
|
-
/* @__PURE__ */
|
|
5201
|
-
/* @__PURE__ */
|
|
5575
|
+
/* @__PURE__ */ jsx100(Divider, {}),
|
|
5576
|
+
/* @__PURE__ */ jsxs46("div", { className: "flex flex-col gap-2", children: [
|
|
5577
|
+
/* @__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" }) }),
|
|
5578
|
+
/* @__PURE__ */ jsx100("p", { className: "leading-normal text-interface-foreground-default-secondary", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.instructions" }) }),
|
|
5579
|
+
/* @__PURE__ */ jsx100("div", { children: session ? /* @__PURE__ */ jsx100(LoggedInActions, { config }) : /* @__PURE__ */ jsx100(GoBackButton, { config }) })
|
|
5202
5580
|
] }),
|
|
5203
|
-
/* @__PURE__ */
|
|
5204
|
-
/* @__PURE__ */
|
|
5205
|
-
/* @__PURE__ */
|
|
5206
|
-
parsed.id && /* @__PURE__ */
|
|
5581
|
+
/* @__PURE__ */ jsx100(Divider, {}),
|
|
5582
|
+
/* @__PURE__ */ jsxs46("div", { className: "font-normal leading-normal antialiased gap-2 flex flex-col", children: [
|
|
5583
|
+
/* @__PURE__ */ jsx100("span", { className: "text-interface-foreground-default-primary text-sm", children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.footer.text" }) }),
|
|
5584
|
+
parsed.id && /* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5207
5585
|
"ID: ",
|
|
5208
|
-
/* @__PURE__ */
|
|
5586
|
+
/* @__PURE__ */ jsx100("code", { children: parsed.id })
|
|
5209
5587
|
] }),
|
|
5210
|
-
/* @__PURE__ */
|
|
5588
|
+
/* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5211
5589
|
"Time: ",
|
|
5212
|
-
/* @__PURE__ */
|
|
5590
|
+
/* @__PURE__ */ jsx100("code", { children: (_i = parsed.timestamp) == null ? void 0 : _i.toUTCString() })
|
|
5213
5591
|
] }),
|
|
5214
|
-
/* @__PURE__ */
|
|
5592
|
+
/* @__PURE__ */ jsxs46("p", { className: "text-interface-foreground-default-secondary text-sm", children: [
|
|
5215
5593
|
"Message: ",
|
|
5216
|
-
/* @__PURE__ */
|
|
5594
|
+
/* @__PURE__ */ jsx100("code", { children: parsed.reason })
|
|
5217
5595
|
] }),
|
|
5218
|
-
/* @__PURE__ */
|
|
5596
|
+
/* @__PURE__ */ jsx100("div", { children: /* @__PURE__ */ jsx100(
|
|
5219
5597
|
"button",
|
|
5220
5598
|
{
|
|
5221
5599
|
className: "text-interface-foreground-default-primary underline",
|
|
@@ -5227,7 +5605,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5227
5605
|
`;
|
|
5228
5606
|
void navigator.clipboard.writeText(text);
|
|
5229
5607
|
},
|
|
5230
|
-
children: /* @__PURE__ */
|
|
5608
|
+
children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.footer.copy" })
|
|
5231
5609
|
}
|
|
5232
5610
|
) })
|
|
5233
5611
|
] })
|
|
@@ -5239,7 +5617,7 @@ ${parsed.reason ? `Message: ${parsed.reason}` : ""}
|
|
|
5239
5617
|
}
|
|
5240
5618
|
function LoggedInActions({ config }) {
|
|
5241
5619
|
const logoutFlow = useClientLogout(config);
|
|
5242
|
-
return /* @__PURE__ */
|
|
5620
|
+
return /* @__PURE__ */ jsx100(
|
|
5243
5621
|
"a",
|
|
5244
5622
|
{
|
|
5245
5623
|
href: logoutFlow == null ? void 0 : logoutFlow.logout_url,
|
|
@@ -5250,12 +5628,12 @@ function LoggedInActions({ config }) {
|
|
|
5250
5628
|
}
|
|
5251
5629
|
function GoBackButton({ config }) {
|
|
5252
5630
|
if ("default_redirect_url" in config.project) {
|
|
5253
|
-
return /* @__PURE__ */
|
|
5631
|
+
return /* @__PURE__ */ jsx100(
|
|
5254
5632
|
"a",
|
|
5255
5633
|
{
|
|
5256
5634
|
className: "text-interface-foreground-default-primary underline",
|
|
5257
5635
|
href: config.project.default_redirect_url,
|
|
5258
|
-
children: /* @__PURE__ */
|
|
5636
|
+
children: /* @__PURE__ */ jsx100(FormattedMessage, { id: "error.action.go-back" })
|
|
5259
5637
|
}
|
|
5260
5638
|
);
|
|
5261
5639
|
}
|
|
@@ -5263,18 +5641,18 @@ function GoBackButton({ config }) {
|
|
|
5263
5641
|
}
|
|
5264
5642
|
function ErrorLogo({ config }) {
|
|
5265
5643
|
if (config.logoUrl) {
|
|
5266
|
-
return /* @__PURE__ */
|
|
5644
|
+
return /* @__PURE__ */ jsx100("img", { src: config.logoUrl, width: 100, height: 36, alt: "Logo" });
|
|
5267
5645
|
}
|
|
5268
|
-
return /* @__PURE__ */
|
|
5646
|
+
return /* @__PURE__ */ jsx100("h1", { className: "text-xl font-semibold leading-normal text-interface-foreground-default-primary", children: config.name });
|
|
5269
5647
|
}
|
|
5270
5648
|
|
|
5271
5649
|
// src/theme/default/flows/login.tsx
|
|
5272
|
-
import { FlowType as
|
|
5650
|
+
import { FlowType as FlowType18 } from "@ory/client-fetch";
|
|
5273
5651
|
import {
|
|
5274
5652
|
OryProvider,
|
|
5275
5653
|
OryTwoStepCard as OryTwoStepCard2
|
|
5276
5654
|
} from "@ory/elements-react";
|
|
5277
|
-
import { jsx as
|
|
5655
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
5278
5656
|
function Login({
|
|
5279
5657
|
flow,
|
|
5280
5658
|
config,
|
|
@@ -5282,25 +5660,25 @@ function Login({
|
|
|
5282
5660
|
components: flowOverrideComponents
|
|
5283
5661
|
}) {
|
|
5284
5662
|
const components = getOryComponents(flowOverrideComponents);
|
|
5285
|
-
return /* @__PURE__ */
|
|
5663
|
+
return /* @__PURE__ */ jsx101(
|
|
5286
5664
|
OryProvider,
|
|
5287
5665
|
{
|
|
5288
5666
|
config,
|
|
5289
5667
|
flow,
|
|
5290
|
-
flowType:
|
|
5668
|
+
flowType: FlowType18.Login,
|
|
5291
5669
|
components,
|
|
5292
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5670
|
+
children: children != null ? children : /* @__PURE__ */ jsx101(OryTwoStepCard2, {})
|
|
5293
5671
|
}
|
|
5294
5672
|
);
|
|
5295
5673
|
}
|
|
5296
5674
|
|
|
5297
5675
|
// src/theme/default/flows/recovery.tsx
|
|
5298
|
-
import { FlowType as
|
|
5676
|
+
import { FlowType as FlowType19 } from "@ory/client-fetch";
|
|
5299
5677
|
import {
|
|
5300
5678
|
OryProvider as OryProvider2,
|
|
5301
5679
|
OryTwoStepCard as OryTwoStepCard3
|
|
5302
5680
|
} from "@ory/elements-react";
|
|
5303
|
-
import { jsx as
|
|
5681
|
+
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
5304
5682
|
function Recovery({
|
|
5305
5683
|
flow,
|
|
5306
5684
|
config,
|
|
@@ -5308,25 +5686,25 @@ function Recovery({
|
|
|
5308
5686
|
components: flowOverrideComponents
|
|
5309
5687
|
}) {
|
|
5310
5688
|
const components = getOryComponents(flowOverrideComponents);
|
|
5311
|
-
return /* @__PURE__ */
|
|
5689
|
+
return /* @__PURE__ */ jsx102(
|
|
5312
5690
|
OryProvider2,
|
|
5313
5691
|
{
|
|
5314
5692
|
config,
|
|
5315
5693
|
flow,
|
|
5316
|
-
flowType:
|
|
5694
|
+
flowType: FlowType19.Recovery,
|
|
5317
5695
|
components,
|
|
5318
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5696
|
+
children: children != null ? children : /* @__PURE__ */ jsx102(OryTwoStepCard3, {})
|
|
5319
5697
|
}
|
|
5320
5698
|
);
|
|
5321
5699
|
}
|
|
5322
5700
|
|
|
5323
5701
|
// src/theme/default/flows/registration.tsx
|
|
5324
|
-
import { FlowType as
|
|
5702
|
+
import { FlowType as FlowType20 } from "@ory/client-fetch";
|
|
5325
5703
|
import {
|
|
5326
5704
|
OryProvider as OryProvider3,
|
|
5327
5705
|
OryTwoStepCard as OryTwoStepCard4
|
|
5328
5706
|
} from "@ory/elements-react";
|
|
5329
|
-
import { jsx as
|
|
5707
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
5330
5708
|
function Registration({
|
|
5331
5709
|
flow,
|
|
5332
5710
|
children,
|
|
@@ -5334,26 +5712,26 @@ function Registration({
|
|
|
5334
5712
|
config
|
|
5335
5713
|
}) {
|
|
5336
5714
|
const components = getOryComponents(flowOverrideComponents);
|
|
5337
|
-
return /* @__PURE__ */
|
|
5715
|
+
return /* @__PURE__ */ jsx103(
|
|
5338
5716
|
OryProvider3,
|
|
5339
5717
|
{
|
|
5340
5718
|
config,
|
|
5341
5719
|
flow,
|
|
5342
|
-
flowType:
|
|
5720
|
+
flowType: FlowType20.Registration,
|
|
5343
5721
|
components,
|
|
5344
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5722
|
+
children: children != null ? children : /* @__PURE__ */ jsx103(OryTwoStepCard4, {})
|
|
5345
5723
|
}
|
|
5346
5724
|
);
|
|
5347
5725
|
}
|
|
5348
5726
|
|
|
5349
5727
|
// src/theme/default/flows/settings.tsx
|
|
5350
|
-
import { FlowType as
|
|
5728
|
+
import { FlowType as FlowType21 } from "@ory/client-fetch";
|
|
5351
5729
|
import {
|
|
5352
5730
|
HeadlessPageHeader,
|
|
5353
5731
|
OryProvider as OryProvider4,
|
|
5354
5732
|
OrySettingsCard
|
|
5355
5733
|
} from "@ory/elements-react";
|
|
5356
|
-
import { Fragment as
|
|
5734
|
+
import { Fragment as Fragment12, jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5357
5735
|
function Settings({
|
|
5358
5736
|
flow,
|
|
5359
5737
|
config,
|
|
@@ -5361,28 +5739,28 @@ function Settings({
|
|
|
5361
5739
|
components: flowOverrideComponents
|
|
5362
5740
|
}) {
|
|
5363
5741
|
const components = getOryComponents(flowOverrideComponents);
|
|
5364
|
-
return /* @__PURE__ */
|
|
5742
|
+
return /* @__PURE__ */ jsx104(
|
|
5365
5743
|
OryProvider4,
|
|
5366
5744
|
{
|
|
5367
5745
|
config,
|
|
5368
5746
|
flow,
|
|
5369
|
-
flowType:
|
|
5747
|
+
flowType: FlowType21.Settings,
|
|
5370
5748
|
components,
|
|
5371
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5372
|
-
/* @__PURE__ */
|
|
5373
|
-
/* @__PURE__ */
|
|
5749
|
+
children: children != null ? children : /* @__PURE__ */ jsxs47(Fragment12, { children: [
|
|
5750
|
+
/* @__PURE__ */ jsx104(HeadlessPageHeader, {}),
|
|
5751
|
+
/* @__PURE__ */ jsx104(OrySettingsCard, {})
|
|
5374
5752
|
] })
|
|
5375
5753
|
}
|
|
5376
5754
|
);
|
|
5377
5755
|
}
|
|
5378
5756
|
|
|
5379
5757
|
// src/theme/default/flows/verification.tsx
|
|
5380
|
-
import { FlowType as
|
|
5758
|
+
import { FlowType as FlowType22 } from "@ory/client-fetch";
|
|
5381
5759
|
import {
|
|
5382
5760
|
OryProvider as OryProvider5,
|
|
5383
5761
|
OryTwoStepCard as OryTwoStepCard5
|
|
5384
5762
|
} from "@ory/elements-react";
|
|
5385
|
-
import { jsx as
|
|
5763
|
+
import { jsx as jsx105 } from "react/jsx-runtime";
|
|
5386
5764
|
function Verification({
|
|
5387
5765
|
flow,
|
|
5388
5766
|
config,
|
|
@@ -5390,18 +5768,196 @@ function Verification({
|
|
|
5390
5768
|
components: flowOverrideComponents
|
|
5391
5769
|
}) {
|
|
5392
5770
|
const components = getOryComponents(flowOverrideComponents);
|
|
5393
|
-
return /* @__PURE__ */
|
|
5771
|
+
return /* @__PURE__ */ jsx105(
|
|
5394
5772
|
OryProvider5,
|
|
5395
5773
|
{
|
|
5396
5774
|
config,
|
|
5397
5775
|
flow,
|
|
5398
|
-
flowType:
|
|
5776
|
+
flowType: FlowType22.Verification,
|
|
5777
|
+
components,
|
|
5778
|
+
children: children != null ? children : /* @__PURE__ */ jsx105(OryTwoStepCard5, {})
|
|
5779
|
+
}
|
|
5780
|
+
);
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5783
|
+
// src/theme/default/flows/consent.tsx
|
|
5784
|
+
import { FlowType as FlowType23 } from "@ory/client-fetch";
|
|
5785
|
+
import {
|
|
5786
|
+
OryConsentCard as OryConsentCard2,
|
|
5787
|
+
OryProvider as OryProvider6
|
|
5788
|
+
} from "@ory/elements-react";
|
|
5789
|
+
|
|
5790
|
+
// src/theme/default/utils/oauth2.ts
|
|
5791
|
+
import {
|
|
5792
|
+
UiTextTypeEnum
|
|
5793
|
+
} from "@ory/client-fetch";
|
|
5794
|
+
var rememberCheckbox = {
|
|
5795
|
+
type: "input",
|
|
5796
|
+
group: "oauth2_consent",
|
|
5797
|
+
meta: {
|
|
5798
|
+
label: {
|
|
5799
|
+
id: 9999111,
|
|
5800
|
+
text: "Remember my decision",
|
|
5801
|
+
type: UiTextTypeEnum.Info
|
|
5802
|
+
}
|
|
5803
|
+
},
|
|
5804
|
+
attributes: {
|
|
5805
|
+
node_type: "input",
|
|
5806
|
+
name: "remember",
|
|
5807
|
+
value: false,
|
|
5808
|
+
type: "checkbox",
|
|
5809
|
+
disabled: false
|
|
5810
|
+
},
|
|
5811
|
+
messages: []
|
|
5812
|
+
};
|
|
5813
|
+
var acceptButton = {
|
|
5814
|
+
type: "input",
|
|
5815
|
+
group: "oauth2_consent",
|
|
5816
|
+
meta: {
|
|
5817
|
+
label: {
|
|
5818
|
+
id: 9999111,
|
|
5819
|
+
text: "Accept",
|
|
5820
|
+
type: UiTextTypeEnum.Info
|
|
5821
|
+
}
|
|
5822
|
+
},
|
|
5823
|
+
attributes: {
|
|
5824
|
+
node_type: "input",
|
|
5825
|
+
name: "action",
|
|
5826
|
+
value: "accept",
|
|
5827
|
+
type: "submit",
|
|
5828
|
+
disabled: false
|
|
5829
|
+
},
|
|
5830
|
+
messages: []
|
|
5831
|
+
};
|
|
5832
|
+
var rejectButton = {
|
|
5833
|
+
type: "input",
|
|
5834
|
+
group: "oauth2_consent",
|
|
5835
|
+
meta: {
|
|
5836
|
+
label: {
|
|
5837
|
+
id: 9999111,
|
|
5838
|
+
text: "Reject",
|
|
5839
|
+
type: UiTextTypeEnum.Info
|
|
5840
|
+
}
|
|
5841
|
+
},
|
|
5842
|
+
attributes: {
|
|
5843
|
+
node_type: "input",
|
|
5844
|
+
name: "action",
|
|
5845
|
+
value: "reject",
|
|
5846
|
+
type: "submit",
|
|
5847
|
+
disabled: false
|
|
5848
|
+
},
|
|
5849
|
+
messages: []
|
|
5850
|
+
};
|
|
5851
|
+
function translateConsentChallengeToUiNodes(consentChallenge, csrfToken, formAction, session) {
|
|
5852
|
+
var _a;
|
|
5853
|
+
const ui = {
|
|
5854
|
+
action: formAction,
|
|
5855
|
+
nodes: [
|
|
5856
|
+
...scopesToUiNodes((_a = consentChallenge.requested_scope) != null ? _a : []),
|
|
5857
|
+
rememberCheckbox,
|
|
5858
|
+
rejectButton,
|
|
5859
|
+
acceptButton,
|
|
5860
|
+
csrfTokenNode(csrfToken),
|
|
5861
|
+
challengeNode(consentChallenge.challenge)
|
|
5862
|
+
],
|
|
5863
|
+
method: "POST",
|
|
5864
|
+
messages: []
|
|
5865
|
+
};
|
|
5866
|
+
return {
|
|
5867
|
+
id: "UNSET",
|
|
5868
|
+
created_at: /* @__PURE__ */ new Date(),
|
|
5869
|
+
expires_at: /* @__PURE__ */ new Date(),
|
|
5870
|
+
issued_at: /* @__PURE__ */ new Date(),
|
|
5871
|
+
state: "show_form",
|
|
5872
|
+
active: "oauth2_consent",
|
|
5873
|
+
ui,
|
|
5874
|
+
consent_request: consentChallenge,
|
|
5875
|
+
session
|
|
5876
|
+
};
|
|
5877
|
+
}
|
|
5878
|
+
function scopesToUiNodes(scopes) {
|
|
5879
|
+
return scopes.map((scope) => ({
|
|
5880
|
+
type: "input",
|
|
5881
|
+
group: "oauth2_consent",
|
|
5882
|
+
meta: {
|
|
5883
|
+
label: {
|
|
5884
|
+
id: 9999111,
|
|
5885
|
+
text: scope,
|
|
5886
|
+
type: UiTextTypeEnum.Info
|
|
5887
|
+
}
|
|
5888
|
+
},
|
|
5889
|
+
attributes: {
|
|
5890
|
+
node_type: "input",
|
|
5891
|
+
name: `grant_scope`,
|
|
5892
|
+
value: scope,
|
|
5893
|
+
type: "checkbox",
|
|
5894
|
+
disabled: false
|
|
5895
|
+
},
|
|
5896
|
+
messages: []
|
|
5897
|
+
}));
|
|
5898
|
+
}
|
|
5899
|
+
function csrfTokenNode(csrfToken) {
|
|
5900
|
+
return {
|
|
5901
|
+
type: "input",
|
|
5902
|
+
group: "default",
|
|
5903
|
+
meta: {},
|
|
5904
|
+
attributes: {
|
|
5905
|
+
node_type: "input",
|
|
5906
|
+
name: "csrf_token",
|
|
5907
|
+
value: csrfToken,
|
|
5908
|
+
type: "hidden",
|
|
5909
|
+
disabled: false
|
|
5910
|
+
},
|
|
5911
|
+
messages: []
|
|
5912
|
+
};
|
|
5913
|
+
}
|
|
5914
|
+
function challengeNode(challenge) {
|
|
5915
|
+
return {
|
|
5916
|
+
type: "input",
|
|
5917
|
+
group: "oauth2_consent",
|
|
5918
|
+
meta: {},
|
|
5919
|
+
attributes: {
|
|
5920
|
+
node_type: "input",
|
|
5921
|
+
name: "consent_challenge",
|
|
5922
|
+
value: challenge,
|
|
5923
|
+
type: "hidden",
|
|
5924
|
+
disabled: false
|
|
5925
|
+
},
|
|
5926
|
+
messages: []
|
|
5927
|
+
};
|
|
5928
|
+
}
|
|
5929
|
+
|
|
5930
|
+
// src/theme/default/flows/consent.tsx
|
|
5931
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
5932
|
+
function Consent({
|
|
5933
|
+
consentChallenge,
|
|
5934
|
+
session,
|
|
5935
|
+
config,
|
|
5936
|
+
components: Passed,
|
|
5937
|
+
children,
|
|
5938
|
+
csrfToken,
|
|
5939
|
+
formActionUrl
|
|
5940
|
+
}) {
|
|
5941
|
+
const components = getOryComponents(Passed);
|
|
5942
|
+
const flow = translateConsentChallengeToUiNodes(
|
|
5943
|
+
consentChallenge,
|
|
5944
|
+
csrfToken,
|
|
5945
|
+
formActionUrl,
|
|
5946
|
+
session
|
|
5947
|
+
);
|
|
5948
|
+
return /* @__PURE__ */ jsx106(
|
|
5949
|
+
OryProvider6,
|
|
5950
|
+
{
|
|
5951
|
+
config,
|
|
5952
|
+
flow,
|
|
5953
|
+
flowType: FlowType23.OAuth2Consent,
|
|
5399
5954
|
components,
|
|
5400
|
-
children: children != null ? children : /* @__PURE__ */
|
|
5955
|
+
children: children != null ? children : /* @__PURE__ */ jsx106(OryConsentCard2, {})
|
|
5401
5956
|
}
|
|
5402
5957
|
);
|
|
5403
5958
|
}
|
|
5404
5959
|
export {
|
|
5960
|
+
Consent,
|
|
5405
5961
|
DefaultButtonSocial,
|
|
5406
5962
|
DefaultCard,
|
|
5407
5963
|
DefaultCardContent,
|