@ory/elements-react 1.0.0-next.41 → 1.0.0-next.44
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 +27 -0
- package/dist/index.js +64 -51
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +64 -51
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +3 -0
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.js +260 -192
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +174 -97
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +4 -4
|
@@ -41,7 +41,6 @@ function DefaultCardContent({ children }) {
|
|
|
41
41
|
// src/theme/default/components/card/footer.tsx
|
|
42
42
|
import { FlowType } from "@ory/client-fetch";
|
|
43
43
|
import { useComponents, useOryFlow } from "@ory/elements-react";
|
|
44
|
-
import { useFormContext } from "react-hook-form";
|
|
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
|
|
|
@@ -146,6 +149,13 @@ var findNode = (nodes, opt) => nodes.find((n) => {
|
|
|
146
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);
|
|
147
150
|
});
|
|
148
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
|
+
}
|
|
158
|
+
|
|
149
159
|
// src/theme/default/components/card/footer.tsx
|
|
150
160
|
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
151
161
|
function DefaultCardFooter() {
|
|
@@ -239,60 +249,45 @@ function LoginCardFooter() {
|
|
|
239
249
|
] })
|
|
240
250
|
] });
|
|
241
251
|
}
|
|
242
|
-
function findScreenSelectionButton(nodes) {
|
|
243
|
-
return nodes.find(
|
|
244
|
-
(node) => node.attributes.node_type === "input" && node.attributes.type === "submit" && node.attributes.name === "screen"
|
|
245
|
-
);
|
|
246
|
-
}
|
|
247
252
|
function RegistrationCardFooter() {
|
|
248
253
|
const intl = useIntl();
|
|
249
254
|
const { config, flow, formState } = useOryFlow();
|
|
250
|
-
const { setValue } = useFormContext();
|
|
251
|
-
if (formState.current === "select_method") {
|
|
252
|
-
return null;
|
|
253
|
-
}
|
|
254
255
|
const screenSelectionNode = findScreenSelectionButton(flow.ui.nodes);
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
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
|
+
] });
|
|
263
290
|
}
|
|
264
|
-
return /* @__PURE__ */ jsx5("span", { className: "font-normal leading-normal antialiased", children: formState.current === "method_active" ? /* @__PURE__ */ jsx5(Fragment, { children: screenSelectionNode && /* @__PURE__ */ jsx5(
|
|
265
|
-
"button",
|
|
266
|
-
{
|
|
267
|
-
className: "font-medium text-button-link-brand-brand hover:text-button-link-brand-brand-hover",
|
|
268
|
-
type: "submit",
|
|
269
|
-
name: screenSelectionNode.attributes.name,
|
|
270
|
-
value: screenSelectionNode.attributes.value,
|
|
271
|
-
onClick: handleScreenSelection,
|
|
272
|
-
children: intl.formatMessage({
|
|
273
|
-
id: "card.footer.select-another-method",
|
|
274
|
-
defaultMessage: "Select another method"
|
|
275
|
-
})
|
|
276
|
-
}
|
|
277
|
-
) }) : /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
278
|
-
intl.formatMessage({
|
|
279
|
-
id: "registration.login-label",
|
|
280
|
-
defaultMessage: "Already have an account?"
|
|
281
|
-
}),
|
|
282
|
-
" ",
|
|
283
|
-
/* @__PURE__ */ jsx5(
|
|
284
|
-
"a",
|
|
285
|
-
{
|
|
286
|
-
className: "text-button-link-brand-brand transition-colors hover:text-button-link-brand-brand-hover underline",
|
|
287
|
-
href: initFlowUrl(config.sdk.url, "login", flow),
|
|
288
|
-
"data-testid": "ory/screen/registration/action/login",
|
|
289
|
-
children: intl.formatMessage({
|
|
290
|
-
id: "registration.login-button",
|
|
291
|
-
defaultMessage: "Sign in"
|
|
292
|
-
})
|
|
293
|
-
}
|
|
294
|
-
)
|
|
295
|
-
] }) });
|
|
296
291
|
}
|
|
297
292
|
function RecoveryCardFooter() {
|
|
298
293
|
return null;
|
|
@@ -352,7 +347,7 @@ import { useComponents as useComponents2, useOryFlow as useOryFlow3 } from "@ory
|
|
|
352
347
|
// src/theme/default/utils/constructCardHeader.ts
|
|
353
348
|
import {
|
|
354
349
|
FlowType as FlowType2,
|
|
355
|
-
isUiNodeInputAttributes as
|
|
350
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes3
|
|
356
351
|
} from "@ory/client-fetch";
|
|
357
352
|
import { useIntl as useIntl2 } from "react-intl";
|
|
358
353
|
function joinWithCommaOr(list, orText = "or") {
|
|
@@ -480,7 +475,7 @@ function useCardHeaderText(container, opts) {
|
|
|
480
475
|
}
|
|
481
476
|
if (nodes.find((node) => node.group === "identifier_first")) {
|
|
482
477
|
const identifier = nodes.find(
|
|
483
|
-
(node) =>
|
|
478
|
+
(node) => isUiNodeInputAttributes3(node.attributes) && node.attributes.name.startsWith("identifier") && node.attributes.type !== "hidden"
|
|
484
479
|
);
|
|
485
480
|
if (identifier) {
|
|
486
481
|
parts.push(
|
|
@@ -581,7 +576,10 @@ function useCardHeaderText(container, opts) {
|
|
|
581
576
|
}
|
|
582
577
|
|
|
583
578
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
584
|
-
import {
|
|
579
|
+
import {
|
|
580
|
+
FlowType as FlowType3,
|
|
581
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes4
|
|
582
|
+
} from "@ory/client-fetch";
|
|
585
583
|
import { useOryFlow as useOryFlow2 } from "@ory/elements-react";
|
|
586
584
|
|
|
587
585
|
// src/theme/default/assets/icons/arrow-left.svg
|
|
@@ -603,9 +601,11 @@ function omit(obj, keys) {
|
|
|
603
601
|
}
|
|
604
602
|
|
|
605
603
|
// src/theme/default/components/card/current-identifier-button.tsx
|
|
604
|
+
import { useFormContext } from "react-hook-form";
|
|
606
605
|
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
607
606
|
function DefaultCurrentIdentifierButton() {
|
|
608
607
|
const { flow, flowType, config, formState } = useOryFlow2();
|
|
608
|
+
const { setValue } = useFormContext();
|
|
609
609
|
const ui = flow.ui;
|
|
610
610
|
if (formState.current === "provide_identifier") {
|
|
611
611
|
return null;
|
|
@@ -613,26 +613,78 @@ function DefaultCurrentIdentifierButton() {
|
|
|
613
613
|
if (flowType === FlowType3.Login && flow.requested_aal === "aal2") {
|
|
614
614
|
return null;
|
|
615
615
|
}
|
|
616
|
-
const nodeBackButton =
|
|
617
|
-
if (
|
|
616
|
+
const nodeBackButton = getBackButtonNodeAttributes(flowType, ui.nodes);
|
|
617
|
+
if (!nodeBackButton) {
|
|
618
618
|
return null;
|
|
619
619
|
}
|
|
620
620
|
const initFlowUrl2 = restartFlowUrl(
|
|
621
621
|
flow,
|
|
622
622
|
`${config.sdk.url}/self-service/${flowType}/browser`
|
|
623
623
|
);
|
|
624
|
-
const attributes = omit(nodeBackButton
|
|
624
|
+
const attributes = omit(nodeBackButton, [
|
|
625
625
|
"autocomplete",
|
|
626
626
|
"node_type",
|
|
627
627
|
"maxlength"
|
|
628
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
|
+
}
|
|
629
681
|
return /* @__PURE__ */ jsx7(
|
|
630
682
|
"a",
|
|
631
683
|
{
|
|
632
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",
|
|
633
685
|
...attributes,
|
|
634
686
|
href: initFlowUrl2,
|
|
635
|
-
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.
|
|
687
|
+
title: `Adjust ${nodeBackButton == null ? void 0 : nodeBackButton.value}`,
|
|
636
688
|
"data-testid": "ory/screen/login/action/restart",
|
|
637
689
|
children: /* @__PURE__ */ jsxs5("span", { className: "inline-flex min-h-5 items-center gap-2 overflow-hidden text-ellipsis", children: [
|
|
638
690
|
/* @__PURE__ */ jsx7(
|
|
@@ -643,30 +695,34 @@ function DefaultCurrentIdentifierButton() {
|
|
|
643
695
|
className: "shrink-0 text-button-identifier-foreground-default group-hover:text-button-identifier-foreground-hover"
|
|
644
696
|
}
|
|
645
697
|
),
|
|
646
|
-
/* @__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 })
|
|
647
699
|
] })
|
|
648
700
|
}
|
|
649
701
|
);
|
|
650
702
|
}
|
|
651
|
-
function
|
|
652
|
-
|
|
703
|
+
function getBackButtonNodeAttributes(flowType, nodes) {
|
|
704
|
+
var _a, _b;
|
|
705
|
+
let nodeBackButtonAttributes;
|
|
653
706
|
switch (flowType) {
|
|
654
707
|
case FlowType3.Login:
|
|
655
|
-
|
|
656
|
-
(node) =>
|
|
657
|
-
);
|
|
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;
|
|
658
711
|
break;
|
|
659
712
|
case FlowType3.Registration:
|
|
660
|
-
|
|
713
|
+
nodeBackButtonAttributes = guessRegistrationBackButton(nodes);
|
|
661
714
|
break;
|
|
662
715
|
case FlowType3.Recovery:
|
|
663
716
|
case FlowType3.Verification:
|
|
664
|
-
|
|
665
|
-
(n) =>
|
|
666
|
-
);
|
|
717
|
+
nodeBackButtonAttributes = (_b = nodes.find(
|
|
718
|
+
(n) => isUiNodeInputAttributes4(n.attributes) && n.attributes.name === "email"
|
|
719
|
+
)) == null ? void 0 : _b.attributes;
|
|
667
720
|
break;
|
|
668
721
|
}
|
|
669
|
-
|
|
722
|
+
if ((nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.node_type) !== "input" || !(nodeBackButtonAttributes == null ? void 0 : nodeBackButtonAttributes.value)) {
|
|
723
|
+
return void 0;
|
|
724
|
+
}
|
|
725
|
+
return nodeBackButtonAttributes;
|
|
670
726
|
}
|
|
671
727
|
var backButtonCandiates = [
|
|
672
728
|
"traits.email",
|
|
@@ -674,9 +730,10 @@ var backButtonCandiates = [
|
|
|
674
730
|
"traits.phone_number"
|
|
675
731
|
];
|
|
676
732
|
function guessRegistrationBackButton(uiNodes) {
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
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;
|
|
680
737
|
}
|
|
681
738
|
|
|
682
739
|
// src/theme/default/components/card/header.tsx
|
|
@@ -1545,9 +1602,26 @@ var DefaultCheckbox = ({
|
|
|
1545
1602
|
// src/theme/default/components/form/group-container.tsx
|
|
1546
1603
|
import { useOryFlow as useOryFlow7 } from "@ory/elements-react";
|
|
1547
1604
|
import { FlowType as FlowType5 } from "@ory/client-fetch";
|
|
1605
|
+
|
|
1606
|
+
// src/util/childCounter.ts
|
|
1607
|
+
import { Children, isValidElement } from "react";
|
|
1608
|
+
function countRenderableChildren(children) {
|
|
1609
|
+
return Children.toArray(children).filter((c) => {
|
|
1610
|
+
if (isValidElement(c)) {
|
|
1611
|
+
return true;
|
|
1612
|
+
}
|
|
1613
|
+
return false;
|
|
1614
|
+
}).length;
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
// src/theme/default/components/form/group-container.tsx
|
|
1548
1618
|
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
1549
1619
|
function DefaultGroupContainer({ children }) {
|
|
1550
1620
|
const { flowType } = useOryFlow7();
|
|
1621
|
+
const count = countRenderableChildren(children);
|
|
1622
|
+
if (count === 0) {
|
|
1623
|
+
return null;
|
|
1624
|
+
}
|
|
1551
1625
|
return /* @__PURE__ */ jsx40(
|
|
1552
1626
|
"div",
|
|
1553
1627
|
{
|
|
@@ -1588,7 +1662,7 @@ import * as React24 from "react";
|
|
|
1588
1662
|
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
1589
1663
|
var SvgEyeOff = (props) => {
|
|
1590
1664
|
var _a, _b;
|
|
1591
|
-
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: "
|
|
1665
|
+
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: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", d: "M10.585 10.587a2 2 0 0 0 2.829 2.828m3.267 3.258A8.7 8.7 0 0 1 12 18q-5.4 0-9-6 1.908-3.18 4.32-4.674m2.86-1.146A9 9 0 0 1 12 6q5.4 0 9 6-1 1.665-2.138 2.87M3 3l18 18" }) });
|
|
1592
1666
|
};
|
|
1593
1667
|
var eye_off_default = SvgEyeOff;
|
|
1594
1668
|
|
|
@@ -1597,9 +1671,9 @@ import * as React25 from "react";
|
|
|
1597
1671
|
import { jsx as jsx44, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1598
1672
|
var SvgEye = (props) => {
|
|
1599
1673
|
var _a, _b;
|
|
1600
|
-
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: [
|
|
1601
|
-
/* @__PURE__ */ jsx44("path", {
|
|
1602
|
-
/* @__PURE__ */ jsx44("path", {
|
|
1674
|
+
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", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
1675
|
+
/* @__PURE__ */ jsx44("path", { d: "M10 12a2 2 0 1 0 4 0 2 2 0 0 0-4 0" }),
|
|
1676
|
+
/* @__PURE__ */ jsx44("path", { d: "M21 12q-3.6 6-9 6t-9-6q3.6-6 9-6t9 6" })
|
|
1603
1677
|
] }) });
|
|
1604
1678
|
};
|
|
1605
1679
|
var eye_default = SvgEye;
|
|
@@ -2719,7 +2793,7 @@ function DefaultAuthMethodListContainer({
|
|
|
2719
2793
|
}
|
|
2720
2794
|
|
|
2721
2795
|
// src/theme/default/components/form/captcha.tsx
|
|
2722
|
-
import { isUiNodeInputAttributes as
|
|
2796
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes5 } from "@ory/client-fetch";
|
|
2723
2797
|
import { Turnstile } from "@marsidev/react-turnstile";
|
|
2724
2798
|
import { useRef as useRef2 } from "react";
|
|
2725
2799
|
import { useFormContext as useFormContext13 } from "react-hook-form";
|
|
@@ -2728,14 +2802,14 @@ var DefaultCaptcha = ({ node }) => {
|
|
|
2728
2802
|
const { setValue } = useFormContext13();
|
|
2729
2803
|
const ref = useRef2();
|
|
2730
2804
|
const nodes = [];
|
|
2731
|
-
if (
|
|
2805
|
+
if (isUiNodeInputAttributes5(node.attributes)) {
|
|
2732
2806
|
if (node.attributes.name === "transient_payload.captcha_turnstile_response") {
|
|
2733
2807
|
nodes.push(
|
|
2734
2808
|
/* @__PURE__ */ jsx70(DefaultInput, { node, attributes: node.attributes }, 1)
|
|
2735
2809
|
);
|
|
2736
2810
|
}
|
|
2737
2811
|
}
|
|
2738
|
-
if (
|
|
2812
|
+
if (isUiNodeInputAttributes5(node.attributes) && node.attributes.name === "captcha_turnstile_options") {
|
|
2739
2813
|
const options = JSON.parse(node.attributes.value);
|
|
2740
2814
|
nodes.push(
|
|
2741
2815
|
/* @__PURE__ */ jsx70(
|
|
@@ -2928,10 +3002,10 @@ import { UiNodeGroupEnum as UiNodeGroupEnum6 } from "@ory/client-fetch";
|
|
|
2928
3002
|
import { FormProvider, useForm } from "react-hook-form";
|
|
2929
3003
|
|
|
2930
3004
|
// src/components/form/form-helpers.ts
|
|
2931
|
-
import { isUiNodeInputAttributes as
|
|
3005
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes6 } from "@ory/client-fetch";
|
|
2932
3006
|
|
|
2933
3007
|
// src/components/form/form-resolver.ts
|
|
2934
|
-
import { isUiNodeInputAttributes as
|
|
3008
|
+
import { isUiNodeInputAttributes as isUiNodeInputAttributes7 } from "@ory/client-fetch";
|
|
2935
3009
|
|
|
2936
3010
|
// src/components/form/form-provider.tsx
|
|
2937
3011
|
import { jsx as jsx78 } from "react/jsx-runtime";
|
|
@@ -2947,8 +3021,8 @@ import { jsx as jsx81 } from "react/jsx-runtime";
|
|
|
2947
3021
|
|
|
2948
3022
|
// src/components/card/card-two-step.tsx
|
|
2949
3023
|
import {
|
|
2950
|
-
isUiNodeInputAttributes as
|
|
2951
|
-
isUiNodeScriptAttributes as
|
|
3024
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes10,
|
|
3025
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes4,
|
|
2952
3026
|
UiNodeGroupEnum as UiNodeGroupEnum11,
|
|
2953
3027
|
UiNodeInputAttributesTypeEnum as UiNodeInputAttributesTypeEnum2
|
|
2954
3028
|
} from "@ory/client-fetch";
|
|
@@ -2959,8 +3033,8 @@ import {
|
|
|
2959
3033
|
FlowType as FlowType17,
|
|
2960
3034
|
isUiNodeAnchorAttributes,
|
|
2961
3035
|
isUiNodeImageAttributes,
|
|
2962
|
-
isUiNodeInputAttributes as
|
|
2963
|
-
isUiNodeScriptAttributes
|
|
3036
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes8,
|
|
3037
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes2
|
|
2964
3038
|
} from "@ory/client-fetch";
|
|
2965
3039
|
import { useFormContext as useFormContext15 } from "react-hook-form";
|
|
2966
3040
|
import { useIntl as useIntl14 } from "react-intl";
|
|
@@ -3032,8 +3106,8 @@ import { jsx as jsx84 } from "react/jsx-runtime";
|
|
|
3032
3106
|
import {
|
|
3033
3107
|
isUiNodeAnchorAttributes as isUiNodeAnchorAttributes2,
|
|
3034
3108
|
isUiNodeImageAttributes as isUiNodeImageAttributes2,
|
|
3035
|
-
isUiNodeInputAttributes as
|
|
3036
|
-
isUiNodeScriptAttributes as
|
|
3109
|
+
isUiNodeInputAttributes as isUiNodeInputAttributes9,
|
|
3110
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes3,
|
|
3037
3111
|
isUiNodeTextAttributes,
|
|
3038
3112
|
UiNodeGroupEnum as UiNodeGroupEnum9
|
|
3039
3113
|
} from "@ory/client-fetch";
|
|
@@ -3047,7 +3121,7 @@ import { useFormContext as useFormContext17 } from "react-hook-form";
|
|
|
3047
3121
|
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
3048
3122
|
|
|
3049
3123
|
// src/components/card/card-two-step.tsx
|
|
3050
|
-
import {
|
|
3124
|
+
import { jsx as jsx87, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3051
3125
|
|
|
3052
3126
|
// src/components/form/groups.tsx
|
|
3053
3127
|
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
@@ -3067,36 +3141,39 @@ import { jsx as jsx91 } from "react/jsx-runtime";
|
|
|
3067
3141
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
3068
3142
|
|
|
3069
3143
|
// src/components/settings/settings-card.tsx
|
|
3070
|
-
import {
|
|
3144
|
+
import {
|
|
3145
|
+
isUiNodeScriptAttributes as isUiNodeScriptAttributes5,
|
|
3146
|
+
UiNodeGroupEnum as UiNodeGroupEnum13
|
|
3147
|
+
} from "@ory/client-fetch";
|
|
3071
3148
|
import { useIntl as useIntl20 } from "react-intl";
|
|
3072
3149
|
|
|
3073
3150
|
// src/components/settings/oidc-settings.tsx
|
|
3074
3151
|
import { useIntl as useIntl15 } from "react-intl";
|
|
3075
3152
|
import { useFormContext as useFormContext20 } from "react-hook-form";
|
|
3076
|
-
import { Fragment as
|
|
3153
|
+
import { Fragment as Fragment7, jsx as jsx93, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
3077
3154
|
|
|
3078
3155
|
// src/components/settings/passkey-settings.tsx
|
|
3079
3156
|
import { useFormContext as useFormContext21 } from "react-hook-form";
|
|
3080
3157
|
import { useIntl as useIntl16 } from "react-intl";
|
|
3081
|
-
import { Fragment as
|
|
3158
|
+
import { Fragment as Fragment8, jsx as jsx94, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
3082
3159
|
|
|
3083
3160
|
// src/components/settings/recovery-codes-settings.tsx
|
|
3084
3161
|
import { useIntl as useIntl17 } from "react-intl";
|
|
3085
3162
|
import { useFormContext as useFormContext22 } from "react-hook-form";
|
|
3086
|
-
import { Fragment as
|
|
3163
|
+
import { Fragment as Fragment9, jsx as jsx95, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
3087
3164
|
|
|
3088
3165
|
// src/components/settings/totp-settings.tsx
|
|
3089
3166
|
import { useFormContext as useFormContext23 } from "react-hook-form";
|
|
3090
3167
|
import { useIntl as useIntl18 } from "react-intl";
|
|
3091
|
-
import { Fragment as
|
|
3168
|
+
import { Fragment as Fragment10, jsx as jsx96, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
3092
3169
|
|
|
3093
3170
|
// src/components/settings/webauthn-settings.tsx
|
|
3094
3171
|
import { useFormContext as useFormContext24 } from "react-hook-form";
|
|
3095
3172
|
import { useIntl as useIntl19 } from "react-intl";
|
|
3096
|
-
import { Fragment as
|
|
3173
|
+
import { Fragment as Fragment11, jsx as jsx97, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
3097
3174
|
|
|
3098
3175
|
// src/components/settings/settings-card.tsx
|
|
3099
|
-
import { Fragment as
|
|
3176
|
+
import { Fragment as Fragment12, jsx as jsx98, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
3100
3177
|
|
|
3101
3178
|
// src/locales/en.json
|
|
3102
3179
|
var en_default = {
|
|
@@ -3551,7 +3628,7 @@ var de_default = {
|
|
|
3551
3628
|
"two-step.code.description": "Ein Best\xE4tigungscode wird an Ihre E-Mail gesendet.",
|
|
3552
3629
|
"two-step.code.title": "E-Mail-Code",
|
|
3553
3630
|
"two-step.passkey.description": "Verwenden Sie die Fingerabdruck- oder Gesichtserkennung Ihres Ger\xE4ts",
|
|
3554
|
-
"two-step.passkey.title": "
|
|
3631
|
+
"two-step.passkey.title": "Passkey (empfohlen)",
|
|
3555
3632
|
"two-step.password.description": "Geben Sie Ihr Passwort ein, das mit Ihrem Konto verkn\xFCpft ist",
|
|
3556
3633
|
"two-step.password.title": "Passwort",
|
|
3557
3634
|
"two-step.webauthn.title": "Sicherheitsschl\xFCssel",
|
|
@@ -5652,7 +5729,7 @@ import {
|
|
|
5652
5729
|
OryProvider as OryProvider4,
|
|
5653
5730
|
OrySettingsCard
|
|
5654
5731
|
} from "@ory/elements-react";
|
|
5655
|
-
import { Fragment as
|
|
5732
|
+
import { Fragment as Fragment13, jsx as jsx104, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
5656
5733
|
function Settings({
|
|
5657
5734
|
flow,
|
|
5658
5735
|
config,
|
|
@@ -5667,7 +5744,7 @@ function Settings({
|
|
|
5667
5744
|
flow,
|
|
5668
5745
|
flowType: FlowType21.Settings,
|
|
5669
5746
|
components,
|
|
5670
|
-
children: children != null ? children : /* @__PURE__ */ jsxs47(
|
|
5747
|
+
children: children != null ? children : /* @__PURE__ */ jsxs47(Fragment13, { children: [
|
|
5671
5748
|
/* @__PURE__ */ jsx104(HeadlessPageHeader, {}),
|
|
5672
5749
|
/* @__PURE__ */ jsx104(OrySettingsCard, {})
|
|
5673
5750
|
] })
|