@ory/elements-react 1.0.0-next.1 → 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/.vscode/i18n-ally-reviews.yml +3 -0
- package/.vscode/settings.json +4 -0
- package/CHANGELOG.md +115 -0
- package/README.md +160 -7
- package/api-report/elements-react-theme.api.json +1215 -0
- package/api-report/elements-react-theme.api.md +130 -0
- package/api-report/elements-react.api.json +3065 -0
- package/api-report/elements-react.api.md +331 -0
- package/api-report/temp/elements-react-theme.api.md +130 -0
- package/api-report/temp/elements-react.api.md +331 -0
- package/config/api-extractor-core.json +457 -0
- package/config/api-extractor-theme.json +463 -0
- package/dist/index.d.mts +328 -1630
- package/dist/index.d.ts +328 -1630
- package/dist/index.js +6945 -5673
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6942 -5641
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +51 -10
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +13 -139
- package/dist/theme/default/index.d.ts +13 -139
- package/dist/theme/default/index.js +645 -9884
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +649 -9929
- package/dist/theme/default/index.mjs.map +1 -1
- package/jest.config.ts +16 -0
- package/package.json +23 -8
- package/tailwind.config.ts +3 -0
- package/tsconfig.json +13 -2
- package/tsconfig.spec.json +20 -0
- package/test-results/.last-run.json +0 -4
|
@@ -1,110 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
2
|
+
import { OryCardContentProps, OryCardProps, OryFormRootProps, OryMessageContentProps, OryFlowComponents, OryFlowComponentOverrides, OryClientConfiguration } from '@ory/elements-react';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { PropsWithChildren } from 'react';
|
|
5
|
+
import { FlowError, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
type OryCardFooterProps = Record<string, never>;
|
|
8
|
-
type OryCardProps = PropsWithChildren;
|
|
9
|
-
/**
|
|
10
|
-
* Card components are used to show login, registration, recovery, and verification flows.
|
|
11
|
-
*/
|
|
12
|
-
type OryCardComponents = {
|
|
13
|
-
/**
|
|
14
|
-
* The card container is the main container of the card.
|
|
15
|
-
*/
|
|
16
|
-
Card: ComponentType<OryCardProps>;
|
|
17
|
-
/**
|
|
18
|
-
* The card footer is the footer of the card container.
|
|
19
|
-
*/
|
|
20
|
-
CardFooter: ComponentType<OryCardFooterProps>;
|
|
21
|
-
/**
|
|
22
|
-
* The card header is the header of the card container.
|
|
23
|
-
*/
|
|
24
|
-
CardHeader: ComponentType<OryCardProps>;
|
|
25
|
-
/**
|
|
26
|
-
* The card content is the main content of the card container.
|
|
27
|
-
*/
|
|
28
|
-
CardContent: ComponentType<OryCardContentProps>;
|
|
29
|
-
/**
|
|
30
|
-
* The card logo is the logo of the card container.
|
|
31
|
-
*/
|
|
32
|
-
CardLogo: ComponentType;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type HeadlessButtonProps = {
|
|
36
|
-
attributes: UiNodeInputAttributes;
|
|
37
|
-
node: UiNode;
|
|
38
|
-
} & Omit<ComponentPropsWithoutRef<"button">, "children">;
|
|
39
|
-
type HeadlessLinkButtonProps = {
|
|
40
|
-
attributes: UiNodeAnchorAttributes;
|
|
41
|
-
node: UiNode;
|
|
42
|
-
} & Omit<ComponentPropsWithoutRef<"a">, "children">;
|
|
43
|
-
type HeadlessLabelProps = {
|
|
44
|
-
attributes: UiNodeInputAttributes;
|
|
45
|
-
node: UiNode;
|
|
46
|
-
} & ComponentPropsWithoutRef<"label">;
|
|
47
|
-
type HeadlessTextProps = {
|
|
48
|
-
attributes: UiNodeTextAttributes;
|
|
49
|
-
node: UiNode;
|
|
50
|
-
};
|
|
51
|
-
type HeadlessAuthMethodListItemProps = {
|
|
52
|
-
setGroups: Dispatch<React__default.SetStateAction<string[]>>;
|
|
53
|
-
setStep: Dispatch<React__default.SetStateAction<number>>;
|
|
54
|
-
group: string;
|
|
55
|
-
};
|
|
56
|
-
type HeadlessImageProps = {
|
|
57
|
-
attributes: UiNodeImageAttributes;
|
|
58
|
-
node: UiNode;
|
|
59
|
-
};
|
|
60
|
-
type HeadlessFormProps = ComponentPropsWithoutRef<"form"> & {
|
|
61
|
-
onSubmit: FormEventHandler<HTMLFormElement>;
|
|
62
|
-
};
|
|
63
|
-
type HeadlessInputProps = {
|
|
64
|
-
attributes: UiNodeInputAttributes;
|
|
65
|
-
node: UiNode;
|
|
66
|
-
onClick: MouseEventHandler;
|
|
67
|
-
};
|
|
68
|
-
type OryFlowComponents = OryFormComponents & OryCardComponents;
|
|
69
|
-
|
|
70
|
-
type HorizontalDividerProps = Record<string, never>;
|
|
71
|
-
|
|
72
|
-
type HeadlessGroupContainerProps = PropsWithChildren;
|
|
73
|
-
|
|
74
|
-
type HeadlessMessagesProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
75
|
-
type HeadlessMessageProps = {
|
|
76
|
-
message: UiText;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
type HeadlessSocialButtonContainerProps = PropsWithChildren<{
|
|
80
|
-
nodes: UiNode[];
|
|
81
|
-
}>;
|
|
82
|
-
type HeadlessSocialButtonProps = PropsWithChildren<{
|
|
83
|
-
node: UiNode;
|
|
84
|
-
attributes: UiNodeInputAttributes;
|
|
85
|
-
}>;
|
|
86
|
-
|
|
87
|
-
type OryFormComponents = {
|
|
88
|
-
Button: ComponentType<HeadlessButtonProps>;
|
|
89
|
-
LinkButton: ComponentType<HeadlessLinkButtonProps>;
|
|
90
|
-
Input: ComponentType<HeadlessInputProps>;
|
|
91
|
-
PinCodeInput: ComponentType<HeadlessInputProps>;
|
|
92
|
-
Image: ComponentType<HeadlessImageProps>;
|
|
93
|
-
Label: ComponentType<HeadlessLabelProps>;
|
|
94
|
-
Checkbox: ComponentType<HeadlessInputProps>;
|
|
95
|
-
Text: ComponentType<HeadlessTextProps>;
|
|
96
|
-
FormContainer: ComponentType<HeadlessFormProps>;
|
|
97
|
-
SocialButton: ComponentType<HeadlessSocialButtonProps>;
|
|
98
|
-
SocialButtonContainer: ComponentType<HeadlessSocialButtonContainerProps>;
|
|
99
|
-
AuthMethodListItem: ComponentType<HeadlessAuthMethodListItemProps>;
|
|
100
|
-
HorizontalDivider: ComponentType<HorizontalDividerProps>;
|
|
101
|
-
FormGroup: ComponentType<HeadlessGroupContainerProps>;
|
|
102
|
-
MessageContainer: ComponentType<HeadlessMessagesProps>;
|
|
103
|
-
Message: ComponentType<HeadlessMessageProps>;
|
|
104
|
-
CurrentIdentifierButton: ComponentType<HeadlessButtonProps>;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
declare function DefaultCardContent({ children }: OryCardContentProps): React.ReactNode;
|
|
7
|
+
declare function DefaultCardContent({ children }: OryCardContentProps): react.ReactNode;
|
|
108
8
|
|
|
109
9
|
declare function DefaultCardFooter(): react_jsx_runtime.JSX.Element | null;
|
|
110
10
|
|
|
@@ -114,76 +14,50 @@ declare function DefaultCardLogo(): react_jsx_runtime.JSX.Element;
|
|
|
114
14
|
|
|
115
15
|
declare function DefaultCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element;
|
|
116
16
|
|
|
117
|
-
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<
|
|
17
|
+
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<OryFormRootProps>): react_jsx_runtime.JSX.Element;
|
|
118
18
|
declare function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null;
|
|
119
|
-
declare function DefaultMessage({ message }:
|
|
19
|
+
declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element;
|
|
120
20
|
|
|
121
21
|
declare const OryDefaultComponents: OryFlowComponents;
|
|
122
22
|
|
|
123
|
-
type OryClientConfiguration = {
|
|
124
|
-
/**
|
|
125
|
-
* The name of the application the user is logging in to.
|
|
126
|
-
*/
|
|
127
|
-
name: string;
|
|
128
|
-
/**
|
|
129
|
-
* An optional logo URL to display in the UI instead of the name.
|
|
130
|
-
*/
|
|
131
|
-
logoUrl?: string;
|
|
132
|
-
stylesheet?: string;
|
|
133
|
-
favicon?: string;
|
|
134
|
-
sdk: {
|
|
135
|
-
url: string;
|
|
136
|
-
options?: Partial<ConfigurationParameters>;
|
|
137
|
-
};
|
|
138
|
-
project: {
|
|
139
|
-
registration_enabled: boolean;
|
|
140
|
-
verification_enabled: boolean;
|
|
141
|
-
recovery_enabled: boolean;
|
|
142
|
-
recovery_ui_url: string;
|
|
143
|
-
registration_ui_url: string;
|
|
144
|
-
verification_ui_url: string;
|
|
145
|
-
login_ui_url: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
|
|
149
23
|
type ErrorFlowContextProps = {
|
|
150
24
|
error: FlowError;
|
|
151
|
-
components?:
|
|
25
|
+
components?: OryFlowComponentOverrides;
|
|
152
26
|
config: OryClientConfiguration;
|
|
153
27
|
};
|
|
154
28
|
declare function Error({ error, children, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
155
29
|
|
|
156
30
|
type LoginFlowContextProps = {
|
|
157
31
|
flow: LoginFlow;
|
|
158
|
-
components?:
|
|
32
|
+
components?: OryFlowComponentOverrides;
|
|
159
33
|
config: OryClientConfiguration;
|
|
160
34
|
};
|
|
161
35
|
declare function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
162
36
|
|
|
163
37
|
type RecoveryFlowContextProps = {
|
|
164
38
|
flow: RecoveryFlow;
|
|
165
|
-
components?:
|
|
39
|
+
components?: OryFlowComponentOverrides;
|
|
166
40
|
config: OryClientConfiguration;
|
|
167
41
|
};
|
|
168
42
|
declare function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
169
43
|
|
|
170
44
|
type RegistrationFlowContextProps = {
|
|
171
45
|
flow: RegistrationFlow;
|
|
172
|
-
components?:
|
|
46
|
+
components?: OryFlowComponentOverrides;
|
|
173
47
|
config: OryClientConfiguration;
|
|
174
48
|
};
|
|
175
49
|
declare function Registration({ flow, children, components: flowOverrideComponents, config, }: PropsWithChildren<RegistrationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
176
50
|
|
|
177
51
|
type SettingsFlowContextProps = {
|
|
178
52
|
flow: SettingsFlow;
|
|
179
|
-
components?:
|
|
53
|
+
components?: OryFlowComponentOverrides;
|
|
180
54
|
config: OryClientConfiguration;
|
|
181
55
|
};
|
|
182
56
|
declare function Settings({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<SettingsFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
183
57
|
|
|
184
58
|
type VerificationFlowContextProps = {
|
|
185
59
|
flow: VerificationFlow;
|
|
186
|
-
components?:
|
|
60
|
+
components?: OryFlowComponentOverrides;
|
|
187
61
|
config: OryClientConfiguration;
|
|
188
62
|
};
|
|
189
63
|
declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
|