@ory/elements-react 1.0.0-next.10 → 1.0.0-next.11
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/.eslintrc.js +2 -0
- package/CHANGELOG.md +15 -0
- package/api-report/elements-react-theme.api.json +25 -70
- package/api-report/elements-react-theme.api.md +14 -12
- package/api-report/elements-react.api.json +1084 -2281
- package/api-report/elements-react.api.md +162 -224
- package/api-report/temp/elements-react.api.md +17 -17
- package/dist/index.d.mts +324 -2011
- package/dist/index.d.ts +324 -2011
- package/dist/index.js +6155 -809
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6156 -797
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.d.mts +9 -9
- package/dist/theme/default/index.d.ts +9 -9
- package/dist/theme/default/index.js +86 -91
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +82 -74
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +5 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { OryCardContentProps, OryCardProps,
|
|
2
|
+
import { OryCardContentProps, OryCardProps, OryFormRootProps, OryMessageContentProps, OryFlowComponents, OryFlowComponentOverrides, OryClientConfiguration } from '@ory/elements-react';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { PropsWithChildren } from 'react';
|
|
5
5
|
import { FlowError, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
|
|
@@ -14,50 +14,50 @@ declare function DefaultCardLogo(): react_jsx_runtime.JSX.Element;
|
|
|
14
14
|
|
|
15
15
|
declare function DefaultCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
|
-
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<
|
|
17
|
+
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<OryFormRootProps>): react_jsx_runtime.JSX.Element;
|
|
18
18
|
declare function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null;
|
|
19
|
-
declare function DefaultMessage({ message }:
|
|
19
|
+
declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
|
|
21
21
|
declare const OryDefaultComponents: OryFlowComponents;
|
|
22
22
|
|
|
23
23
|
type ErrorFlowContextProps = {
|
|
24
24
|
error: FlowError;
|
|
25
|
-
components?:
|
|
25
|
+
components?: OryFlowComponentOverrides;
|
|
26
26
|
config: OryClientConfiguration;
|
|
27
27
|
};
|
|
28
28
|
declare function Error({ error, children, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
29
29
|
|
|
30
30
|
type LoginFlowContextProps = {
|
|
31
31
|
flow: LoginFlow;
|
|
32
|
-
components?:
|
|
32
|
+
components?: OryFlowComponentOverrides;
|
|
33
33
|
config: OryClientConfiguration;
|
|
34
34
|
};
|
|
35
35
|
declare function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
36
36
|
|
|
37
37
|
type RecoveryFlowContextProps = {
|
|
38
38
|
flow: RecoveryFlow;
|
|
39
|
-
components?:
|
|
39
|
+
components?: OryFlowComponentOverrides;
|
|
40
40
|
config: OryClientConfiguration;
|
|
41
41
|
};
|
|
42
42
|
declare function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
43
43
|
|
|
44
44
|
type RegistrationFlowContextProps = {
|
|
45
45
|
flow: RegistrationFlow;
|
|
46
|
-
components?:
|
|
46
|
+
components?: OryFlowComponentOverrides;
|
|
47
47
|
config: OryClientConfiguration;
|
|
48
48
|
};
|
|
49
49
|
declare function Registration({ flow, children, components: flowOverrideComponents, config, }: PropsWithChildren<RegistrationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
50
50
|
|
|
51
51
|
type SettingsFlowContextProps = {
|
|
52
52
|
flow: SettingsFlow;
|
|
53
|
-
components?:
|
|
53
|
+
components?: OryFlowComponentOverrides;
|
|
54
54
|
config: OryClientConfiguration;
|
|
55
55
|
};
|
|
56
56
|
declare function Settings({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<SettingsFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
57
57
|
|
|
58
58
|
type VerificationFlowContextProps = {
|
|
59
59
|
flow: VerificationFlow;
|
|
60
|
-
components?:
|
|
60
|
+
components?: OryFlowComponentOverrides;
|
|
61
61
|
config: OryClientConfiguration;
|
|
62
62
|
};
|
|
63
63
|
declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { OryCardContentProps, OryCardProps,
|
|
2
|
+
import { OryCardContentProps, OryCardProps, OryFormRootProps, OryMessageContentProps, OryFlowComponents, OryFlowComponentOverrides, OryClientConfiguration } from '@ory/elements-react';
|
|
3
3
|
import * as react from 'react';
|
|
4
4
|
import { PropsWithChildren } from 'react';
|
|
5
5
|
import { FlowError, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
|
|
@@ -14,50 +14,50 @@ declare function DefaultCardLogo(): react_jsx_runtime.JSX.Element;
|
|
|
14
14
|
|
|
15
15
|
declare function DefaultCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element;
|
|
16
16
|
|
|
17
|
-
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<
|
|
17
|
+
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<OryFormRootProps>): react_jsx_runtime.JSX.Element;
|
|
18
18
|
declare function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null;
|
|
19
|
-
declare function DefaultMessage({ message }:
|
|
19
|
+
declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element;
|
|
20
20
|
|
|
21
21
|
declare const OryDefaultComponents: OryFlowComponents;
|
|
22
22
|
|
|
23
23
|
type ErrorFlowContextProps = {
|
|
24
24
|
error: FlowError;
|
|
25
|
-
components?:
|
|
25
|
+
components?: OryFlowComponentOverrides;
|
|
26
26
|
config: OryClientConfiguration;
|
|
27
27
|
};
|
|
28
28
|
declare function Error({ error, children, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
29
29
|
|
|
30
30
|
type LoginFlowContextProps = {
|
|
31
31
|
flow: LoginFlow;
|
|
32
|
-
components?:
|
|
32
|
+
components?: OryFlowComponentOverrides;
|
|
33
33
|
config: OryClientConfiguration;
|
|
34
34
|
};
|
|
35
35
|
declare function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
36
36
|
|
|
37
37
|
type RecoveryFlowContextProps = {
|
|
38
38
|
flow: RecoveryFlow;
|
|
39
|
-
components?:
|
|
39
|
+
components?: OryFlowComponentOverrides;
|
|
40
40
|
config: OryClientConfiguration;
|
|
41
41
|
};
|
|
42
42
|
declare function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
43
43
|
|
|
44
44
|
type RegistrationFlowContextProps = {
|
|
45
45
|
flow: RegistrationFlow;
|
|
46
|
-
components?:
|
|
46
|
+
components?: OryFlowComponentOverrides;
|
|
47
47
|
config: OryClientConfiguration;
|
|
48
48
|
};
|
|
49
49
|
declare function Registration({ flow, children, components: flowOverrideComponents, config, }: PropsWithChildren<RegistrationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
50
50
|
|
|
51
51
|
type SettingsFlowContextProps = {
|
|
52
52
|
flow: SettingsFlow;
|
|
53
|
-
components?:
|
|
53
|
+
components?: OryFlowComponentOverrides;
|
|
54
54
|
config: OryClientConfiguration;
|
|
55
55
|
};
|
|
56
56
|
declare function Settings({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<SettingsFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
57
57
|
|
|
58
58
|
type VerificationFlowContextProps = {
|
|
59
59
|
flow: VerificationFlow;
|
|
60
|
-
components?:
|
|
60
|
+
components?: OryFlowComponentOverrides;
|
|
61
61
|
config: OryClientConfiguration;
|
|
62
62
|
};
|
|
63
63
|
declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
@@ -340,9 +340,9 @@ function useCardHeaderText(nodes, opts) {
|
|
|
340
340
|
// src/theme/default/components/card/header.tsx
|
|
341
341
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
342
342
|
function InnerCardHeader({ title, text }) {
|
|
343
|
-
const {
|
|
343
|
+
const { Card } = (0, import_elements_react2.useComponents)();
|
|
344
344
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("header", { className: "flex flex-col gap-8 antialiased", children: [
|
|
345
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
345
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Card.Logo, {}),
|
|
346
346
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { children: [
|
|
347
347
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { className: "font-semibold text-lg text-dialog-fg-default leading-normal", children: title }),
|
|
348
348
|
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "text-sm leading-normal text-dialog-fg-subtle", children: text })
|
|
@@ -392,8 +392,8 @@ function cn(...inputs) {
|
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
// src/theme/default/components/form/index.tsx
|
|
395
|
-
var import_elements_react4 = require("@ory/elements-react");
|
|
396
395
|
var import_react_intl3 = require("react-intl");
|
|
396
|
+
var import_elements_react4 = require("@ory/elements-react");
|
|
397
397
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
398
398
|
function DefaultFormContainer({
|
|
399
399
|
children,
|
|
@@ -429,11 +429,14 @@ function DefaultMessage({ message }) {
|
|
|
429
429
|
"text-forms-fg-default": message.type === "info",
|
|
430
430
|
"text-forms-fg-success": message.type === "success"
|
|
431
431
|
}),
|
|
432
|
-
children: (0, import_elements_react4.
|
|
432
|
+
children: (0, import_elements_react4.uiTextToFormattedMessage)(message, intl)
|
|
433
433
|
}
|
|
434
434
|
);
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
+
// src/theme/default/components/card/auth-methods.tsx
|
|
438
|
+
var import_react_intl4 = require("react-intl");
|
|
439
|
+
|
|
437
440
|
// src/theme/default/assets/icons/code.svg
|
|
438
441
|
var React3 = __toESM(require("react"));
|
|
439
442
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
@@ -471,7 +474,6 @@ var SvgWebauthn = (props) => {
|
|
|
471
474
|
var webauthn_default = SvgWebauthn;
|
|
472
475
|
|
|
473
476
|
// src/theme/default/components/card/auth-methods.tsx
|
|
474
|
-
var import_react_intl4 = require("react-intl");
|
|
475
477
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
476
478
|
var iconsMap = {
|
|
477
479
|
code: code_default,
|
|
@@ -502,6 +504,8 @@ function DefaultAuthMethodListItem({
|
|
|
502
504
|
}
|
|
503
505
|
|
|
504
506
|
// src/theme/default/components/form/button.tsx
|
|
507
|
+
var import_client_fetch3 = require("@ory/client-fetch");
|
|
508
|
+
var import_elements_react5 = require("@ory/elements-react");
|
|
505
509
|
var import_react_hook_form = require("react-hook-form");
|
|
506
510
|
var import_react_intl5 = require("react-intl");
|
|
507
511
|
|
|
@@ -545,8 +549,6 @@ function Spinner({ className }) {
|
|
|
545
549
|
}
|
|
546
550
|
|
|
547
551
|
// src/theme/default/components/form/button.tsx
|
|
548
|
-
var import_elements_react5 = require("@ory/elements-react");
|
|
549
|
-
var import_client_fetch3 = require("@ory/client-fetch");
|
|
550
552
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
551
553
|
var DefaultButton = ({
|
|
552
554
|
attributes,
|
|
@@ -611,7 +613,7 @@ var DefaultButton = ({
|
|
|
611
613
|
"text-button-secondary-fg-default/20": isSubmitting && !isPrimary
|
|
612
614
|
}
|
|
613
615
|
),
|
|
614
|
-
children: (0, import_elements_react5.
|
|
616
|
+
children: label ? (0, import_elements_react5.uiTextToFormattedMessage)(label, intl) : ""
|
|
615
617
|
}
|
|
616
618
|
)
|
|
617
619
|
]
|
|
@@ -621,11 +623,11 @@ var DefaultButton = ({
|
|
|
621
623
|
DefaultButton.displayName = "DefaultButton";
|
|
622
624
|
|
|
623
625
|
// src/theme/default/components/form/checkbox.tsx
|
|
626
|
+
var import_client_fetch4 = require("@ory/client-fetch");
|
|
627
|
+
var import_elements_react6 = require("@ory/elements-react");
|
|
624
628
|
var import_react = require("react");
|
|
625
629
|
var import_react_hook_form2 = require("react-hook-form");
|
|
626
630
|
var import_react_intl6 = require("react-intl");
|
|
627
|
-
var import_elements_react6 = require("@ory/elements-react");
|
|
628
|
-
var import_client_fetch4 = require("@ory/client-fetch");
|
|
629
631
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
630
632
|
function CheckboxSVG() {
|
|
631
633
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
@@ -702,13 +704,13 @@ var DefaultCheckbox = ({
|
|
|
702
704
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(CheckboxSVG, {})
|
|
703
705
|
] }),
|
|
704
706
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "text-sm items-center", children: [
|
|
705
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { className: "text-sm font-normal leading-normal text-forms-fg-default", children: label && (0, import_elements_react6.
|
|
707
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { className: "text-sm font-normal leading-normal text-forms-fg-default", children: label && (0, import_elements_react6.uiTextToFormattedMessage)(label, intl) }),
|
|
706
708
|
node.messages.map((message) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
707
709
|
"span",
|
|
708
710
|
{
|
|
709
711
|
className: "text-sm text-red-900 mt-1",
|
|
710
712
|
...(0, import_elements_react6.messageTestId)(message),
|
|
711
|
-
children: (0, import_elements_react6.
|
|
713
|
+
children: (0, import_elements_react6.uiTextToFormattedMessage)(message, intl)
|
|
712
714
|
},
|
|
713
715
|
message.id
|
|
714
716
|
))
|
|
@@ -720,9 +722,7 @@ var DefaultCheckbox = ({
|
|
|
720
722
|
|
|
721
723
|
// src/theme/default/components/form/group-container.tsx
|
|
722
724
|
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
723
|
-
function DefaultGroupContainer({
|
|
724
|
-
children
|
|
725
|
-
}) {
|
|
725
|
+
function DefaultGroupContainer({ children }) {
|
|
726
726
|
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "grid grid-cols-1 gap-6", children });
|
|
727
727
|
}
|
|
728
728
|
|
|
@@ -759,7 +759,7 @@ var DefaultInput = ({
|
|
|
759
759
|
defaultMessage: "Enter your {placeholder}"
|
|
760
760
|
},
|
|
761
761
|
{
|
|
762
|
-
placeholder: (0, import_elements_react7.
|
|
762
|
+
placeholder: (0, import_elements_react7.uiTextToFormattedMessage)(label, intl)
|
|
763
763
|
}
|
|
764
764
|
) : "";
|
|
765
765
|
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
@@ -778,9 +778,8 @@ var DefaultInput = ({
|
|
|
778
778
|
|
|
779
779
|
// src/theme/default/components/form/label.tsx
|
|
780
780
|
var import_client_fetch6 = require("@ory/client-fetch");
|
|
781
|
-
var import_react_intl8 = require("react-intl");
|
|
782
781
|
var import_elements_react8 = require("@ory/elements-react");
|
|
783
|
-
var
|
|
782
|
+
var import_react_intl8 = require("react-intl");
|
|
784
783
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
785
784
|
function DefaultLabel({
|
|
786
785
|
node,
|
|
@@ -798,11 +797,11 @@ function DefaultLabel({
|
|
|
798
797
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
799
798
|
"label",
|
|
800
799
|
{
|
|
801
|
-
...(0,
|
|
800
|
+
...(0, import_elements_react8.messageTestId)(label),
|
|
802
801
|
className: "text-sm font-medium leading-normal",
|
|
803
802
|
htmlFor: attributes.name,
|
|
804
803
|
...rest,
|
|
805
|
-
children: (0,
|
|
804
|
+
children: (0, import_elements_react8.uiTextToFormattedMessage)(label, intl)
|
|
806
805
|
}
|
|
807
806
|
),
|
|
808
807
|
isPassword && config.project.recovery_enabled && flowType === import_client_fetch6.FlowType.Login && // TODO: make it possible to override with a custom component
|
|
@@ -835,8 +834,8 @@ function DefaultLabel({
|
|
|
835
834
|
"text-forms-fg-default": message.type === "info",
|
|
836
835
|
"text-forms-fg-success": message.type === "success"
|
|
837
836
|
}),
|
|
838
|
-
...(0,
|
|
839
|
-
children: (0,
|
|
837
|
+
...(0, import_elements_react8.messageTestId)(message),
|
|
838
|
+
children: (0, import_elements_react8.uiTextToFormattedMessage)(message, intl)
|
|
840
839
|
},
|
|
841
840
|
message.id
|
|
842
841
|
))
|
|
@@ -844,10 +843,10 @@ function DefaultLabel({
|
|
|
844
843
|
}
|
|
845
844
|
|
|
846
845
|
// src/theme/default/components/form/link-button.tsx
|
|
846
|
+
var import_client_fetch7 = require("@ory/client-fetch");
|
|
847
|
+
var import_elements_react9 = require("@ory/elements-react");
|
|
847
848
|
var import_react2 = require("react");
|
|
848
849
|
var import_react_intl9 = require("react-intl");
|
|
849
|
-
var import_elements_react10 = require("@ory/elements-react");
|
|
850
|
-
var import_client_fetch7 = require("@ory/client-fetch");
|
|
851
850
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
852
851
|
var DefaultLinkButton = (0, import_react2.forwardRef)(({ attributes, node }, ref) => {
|
|
853
852
|
const intl = (0, import_react_intl9.useIntl)();
|
|
@@ -857,11 +856,11 @@ var DefaultLinkButton = (0, import_react2.forwardRef)(({ attributes, node }, ref
|
|
|
857
856
|
{
|
|
858
857
|
...attributes,
|
|
859
858
|
ref,
|
|
860
|
-
title: (0,
|
|
859
|
+
title: label ? (0, import_elements_react9.uiTextToFormattedMessage)(label, intl) : "",
|
|
861
860
|
className: cn(
|
|
862
861
|
"antialiased rounded cursor-pointer text-center border border-transparent gap-3 leading-none bg-button-primary-bg-default hover:bg-button-primary-bg-hover transition-colors text-button-primary-fg-default hover:text-button-primary-fg-hover px-4 py-4.5 text-sm font-medium"
|
|
863
862
|
),
|
|
864
|
-
children: (0,
|
|
863
|
+
children: label ? (0, import_elements_react9.uiTextToFormattedMessage)(label, intl) : ""
|
|
865
864
|
}
|
|
866
865
|
);
|
|
867
866
|
});
|
|
@@ -947,7 +946,7 @@ var DefaultPinCodeInput = ({ attributes }) => {
|
|
|
947
946
|
};
|
|
948
947
|
|
|
949
948
|
// src/theme/default/components/form/social.tsx
|
|
950
|
-
var
|
|
949
|
+
var import_elements_react10 = require("@ory/elements-react");
|
|
951
950
|
|
|
952
951
|
// src/theme/default/provider-logos/apple.svg
|
|
953
952
|
var React8 = __toESM(require("react"));
|
|
@@ -1152,7 +1151,7 @@ function DefaultButtonSocial({
|
|
|
1152
1151
|
} = attributes;
|
|
1153
1152
|
const {
|
|
1154
1153
|
flow: { ui }
|
|
1155
|
-
} = (0,
|
|
1154
|
+
} = (0, import_elements_react10.useOryFlow)();
|
|
1156
1155
|
const intl = (0, import_react_intl10.useIntl)();
|
|
1157
1156
|
const oidcNodeCount = (_a = ui.nodes.filter((node2) => node2.group === "oidc").length) != null ? _a : 0;
|
|
1158
1157
|
const Logo = provider_logos_default[attributes.value];
|
|
@@ -1178,7 +1177,7 @@ function DefaultButtonSocial({
|
|
|
1178
1177
|
className: "object-fill w-full h-full"
|
|
1179
1178
|
}
|
|
1180
1179
|
) : /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "rounded-full aspect-square border flex items-center justify-center text-xs", children: provider.slice(0, 2) }) }),
|
|
1181
|
-
showLabel ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (0,
|
|
1180
|
+
showLabel && node.meta.label ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "text-sm text-left leading-none font-medium text-forms-fg-default flex-grow", children: (0, import_elements_react10.uiTextToFormattedMessage)(node.meta.label, intl) }) : null
|
|
1182
1181
|
]
|
|
1183
1182
|
}
|
|
1184
1183
|
);
|
|
@@ -1202,15 +1201,15 @@ function DefaultSocialButtonContainer({
|
|
|
1202
1201
|
}
|
|
1203
1202
|
|
|
1204
1203
|
// src/theme/default/components/form/text.tsx
|
|
1204
|
+
var import_elements_react11 = require("@ory/elements-react");
|
|
1205
1205
|
var import_react_intl11 = require("react-intl");
|
|
1206
|
-
var import_elements_react12 = require("@ory/elements-react");
|
|
1207
1206
|
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
1208
1207
|
function DefaultText({ node, attributes }) {
|
|
1209
1208
|
var _a;
|
|
1210
1209
|
const intl = (0, import_react_intl11.useIntl)();
|
|
1211
1210
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
1212
|
-
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { "data-testid": `node/text/${attributes.id}/label`, children: (0,
|
|
1213
|
-
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { "data-testid": `node/text/lookup_secret_codes/text`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("code", { children: (0,
|
|
1211
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("p", { "data-testid": `node/text/${attributes.id}/label`, children: node.meta.label ? (0, import_elements_react11.uiTextToFormattedMessage)(node.meta.label, intl) : "" }),
|
|
1212
|
+
(_a = attributes.text.context.secrets) == null ? void 0 : _a.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { "data-testid": `node/text/lookup_secret_codes/text`, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("code", { children: text ? (0, import_elements_react11.uiTextToFormattedMessage)(text, intl) : "" }) }, index))
|
|
1214
1213
|
] });
|
|
1215
1214
|
}
|
|
1216
1215
|
|
|
@@ -1250,30 +1249,36 @@ function DefaultCurrentIdentifierButton({
|
|
|
1250
1249
|
|
|
1251
1250
|
// src/theme/default/components/default-components.tsx
|
|
1252
1251
|
var OryDefaultComponents = {
|
|
1253
|
-
Card:
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1252
|
+
Card: {
|
|
1253
|
+
Root: DefaultCard,
|
|
1254
|
+
Footer: DefaultCardFooter,
|
|
1255
|
+
Header: DefaultCardHeader,
|
|
1256
|
+
Content: DefaultCardContent,
|
|
1257
|
+
Logo: DefaultCardLogo,
|
|
1258
|
+
Divider: DefaultHorizontalDivider,
|
|
1259
|
+
AuthMethodListItem: DefaultAuthMethodListItem
|
|
1260
|
+
},
|
|
1261
|
+
Node: {
|
|
1262
|
+
Button: DefaultButton,
|
|
1263
|
+
OidcButton: DefaultButtonSocial,
|
|
1264
|
+
CurrentIdentifierButton: DefaultCurrentIdentifierButton,
|
|
1265
|
+
Input: DefaultInput,
|
|
1266
|
+
CodeInput: DefaultPinCodeInput,
|
|
1267
|
+
Image: DefaultImage,
|
|
1268
|
+
Label: DefaultLabel,
|
|
1269
|
+
Checkbox: DefaultCheckbox,
|
|
1270
|
+
Text: DefaultText,
|
|
1271
|
+
Anchor: DefaultLinkButton
|
|
1272
|
+
},
|
|
1273
|
+
Form: {
|
|
1274
|
+
Root: DefaultFormContainer,
|
|
1275
|
+
Group: DefaultGroupContainer,
|
|
1276
|
+
OidcRoot: DefaultSocialButtonContainer
|
|
1277
|
+
},
|
|
1278
|
+
Message: {
|
|
1279
|
+
Root: DefaultMessageContainer,
|
|
1280
|
+
Content: DefaultMessage
|
|
1281
|
+
}
|
|
1277
1282
|
};
|
|
1278
1283
|
|
|
1279
1284
|
// src/theme/default/flows/error.tsx
|
|
@@ -1287,7 +1292,8 @@ function Error2({
|
|
|
1287
1292
|
|
|
1288
1293
|
// src/theme/default/flows/login.tsx
|
|
1289
1294
|
var import_client_fetch8 = require("@ory/client-fetch");
|
|
1290
|
-
var
|
|
1295
|
+
var import_elements_react12 = require("@ory/elements-react");
|
|
1296
|
+
var import_lodash = __toESM(require("lodash.merge"));
|
|
1291
1297
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
1292
1298
|
function Login({
|
|
1293
1299
|
flow,
|
|
@@ -1295,25 +1301,23 @@ function Login({
|
|
|
1295
1301
|
children,
|
|
1296
1302
|
components: flowOverrideComponents
|
|
1297
1303
|
}) {
|
|
1298
|
-
const components = {
|
|
1299
|
-
...OryDefaultComponents,
|
|
1300
|
-
...flowOverrideComponents
|
|
1301
|
-
};
|
|
1304
|
+
const components = flowOverrideComponents ? (0, import_lodash.default)({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
1302
1305
|
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1303
|
-
|
|
1306
|
+
import_elements_react12.OryProvider,
|
|
1304
1307
|
{
|
|
1305
1308
|
config,
|
|
1306
1309
|
flow,
|
|
1307
1310
|
flowType: import_client_fetch8.FlowType.Login,
|
|
1308
1311
|
components,
|
|
1309
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
1312
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_elements_react12.OryTwoStepCard, {})
|
|
1310
1313
|
}
|
|
1311
1314
|
);
|
|
1312
1315
|
}
|
|
1313
1316
|
|
|
1314
1317
|
// src/theme/default/flows/recovery.tsx
|
|
1315
1318
|
var import_client_fetch9 = require("@ory/client-fetch");
|
|
1316
|
-
var
|
|
1319
|
+
var import_elements_react13 = require("@ory/elements-react");
|
|
1320
|
+
var import_lodash2 = __toESM(require("lodash.merge"));
|
|
1317
1321
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
1318
1322
|
function Recovery({
|
|
1319
1323
|
flow,
|
|
@@ -1321,25 +1325,23 @@ function Recovery({
|
|
|
1321
1325
|
children,
|
|
1322
1326
|
components: flowOverrideComponents
|
|
1323
1327
|
}) {
|
|
1324
|
-
const components = {
|
|
1325
|
-
...OryDefaultComponents,
|
|
1326
|
-
...flowOverrideComponents
|
|
1327
|
-
};
|
|
1328
|
+
const components = flowOverrideComponents ? (0, import_lodash2.default)({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
1328
1329
|
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1329
|
-
|
|
1330
|
+
import_elements_react13.OryProvider,
|
|
1330
1331
|
{
|
|
1331
1332
|
config,
|
|
1332
1333
|
flow,
|
|
1333
1334
|
flowType: import_client_fetch9.FlowType.Recovery,
|
|
1334
1335
|
components,
|
|
1335
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
1336
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_elements_react13.OryTwoStepCard, {})
|
|
1336
1337
|
}
|
|
1337
1338
|
);
|
|
1338
1339
|
}
|
|
1339
1340
|
|
|
1340
1341
|
// src/theme/default/flows/registration.tsx
|
|
1341
1342
|
var import_client_fetch10 = require("@ory/client-fetch");
|
|
1342
|
-
var
|
|
1343
|
+
var import_elements_react14 = require("@ory/elements-react");
|
|
1344
|
+
var import_lodash3 = __toESM(require("lodash.merge"));
|
|
1343
1345
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
1344
1346
|
function Registration({
|
|
1345
1347
|
flow,
|
|
@@ -1347,25 +1349,23 @@ function Registration({
|
|
|
1347
1349
|
components: flowOverrideComponents,
|
|
1348
1350
|
config
|
|
1349
1351
|
}) {
|
|
1350
|
-
const components = {
|
|
1351
|
-
...OryDefaultComponents,
|
|
1352
|
-
...flowOverrideComponents
|
|
1353
|
-
};
|
|
1352
|
+
const components = flowOverrideComponents ? (0, import_lodash3.default)({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
1354
1353
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1355
|
-
|
|
1354
|
+
import_elements_react14.OryProvider,
|
|
1356
1355
|
{
|
|
1357
1356
|
config,
|
|
1358
1357
|
flow,
|
|
1359
1358
|
flowType: import_client_fetch10.FlowType.Registration,
|
|
1360
1359
|
components,
|
|
1361
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
1360
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_elements_react14.OryTwoStepCard, {})
|
|
1362
1361
|
}
|
|
1363
1362
|
);
|
|
1364
1363
|
}
|
|
1365
1364
|
|
|
1366
1365
|
// src/theme/default/flows/settings.tsx
|
|
1367
1366
|
var import_client_fetch11 = require("@ory/client-fetch");
|
|
1368
|
-
var
|
|
1367
|
+
var import_elements_react15 = require("@ory/elements-react");
|
|
1368
|
+
var import_lodash4 = __toESM(require("lodash.merge"));
|
|
1369
1369
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
1370
1370
|
function Settings({
|
|
1371
1371
|
flow,
|
|
@@ -1373,25 +1373,23 @@ function Settings({
|
|
|
1373
1373
|
children,
|
|
1374
1374
|
components: flowOverrideComponents
|
|
1375
1375
|
}) {
|
|
1376
|
-
const components = {
|
|
1377
|
-
...OryDefaultComponents,
|
|
1378
|
-
...flowOverrideComponents
|
|
1379
|
-
};
|
|
1376
|
+
const components = flowOverrideComponents ? (0, import_lodash4.default)({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
1380
1377
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1381
|
-
|
|
1378
|
+
import_elements_react15.OryProvider,
|
|
1382
1379
|
{
|
|
1383
1380
|
config,
|
|
1384
1381
|
flow,
|
|
1385
1382
|
flowType: import_client_fetch11.FlowType.Settings,
|
|
1386
1383
|
components,
|
|
1387
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
1384
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_elements_react15.OryTwoStepCard, {})
|
|
1388
1385
|
}
|
|
1389
1386
|
);
|
|
1390
1387
|
}
|
|
1391
1388
|
|
|
1392
1389
|
// src/theme/default/flows/verification.tsx
|
|
1393
1390
|
var import_client_fetch12 = require("@ory/client-fetch");
|
|
1394
|
-
var
|
|
1391
|
+
var import_elements_react16 = require("@ory/elements-react");
|
|
1392
|
+
var import_lodash5 = __toESM(require("lodash.merge"));
|
|
1395
1393
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
1396
1394
|
function Verification({
|
|
1397
1395
|
flow,
|
|
@@ -1399,18 +1397,15 @@ function Verification({
|
|
|
1399
1397
|
children,
|
|
1400
1398
|
components: flowOverrideComponents
|
|
1401
1399
|
}) {
|
|
1402
|
-
const components = {
|
|
1403
|
-
...OryDefaultComponents,
|
|
1404
|
-
...flowOverrideComponents
|
|
1405
|
-
};
|
|
1400
|
+
const components = flowOverrideComponents ? (0, import_lodash5.default)({}, OryDefaultComponents, flowOverrideComponents) : OryDefaultComponents;
|
|
1406
1401
|
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1407
|
-
|
|
1402
|
+
import_elements_react16.OryProvider,
|
|
1408
1403
|
{
|
|
1409
1404
|
config,
|
|
1410
1405
|
flow,
|
|
1411
1406
|
flowType: import_client_fetch12.FlowType.Verification,
|
|
1412
1407
|
components,
|
|
1413
|
-
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
1408
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_elements_react16.OryTwoStepCard, {})
|
|
1414
1409
|
}
|
|
1415
1410
|
);
|
|
1416
1411
|
}
|