@ory/elements-react 1.0.0-next.3 → 1.0.0-next.31
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 +430 -0
- package/DEVELOPMENT.md +96 -0
- package/LICENSE +201 -0
- package/README.md +112 -37
- package/babel.config.js +10 -0
- package/dist/client/config.d.mts +21 -0
- package/dist/client/config.d.ts +21 -0
- package/dist/client/config.js +77 -0
- package/dist/client/config.js.map +1 -0
- package/dist/client/config.mjs +51 -0
- package/dist/client/config.mjs.map +1 -0
- package/dist/client/frontendClient.d.mts +7 -0
- package/dist/client/frontendClient.d.ts +7 -0
- package/dist/client/frontendClient.js +52 -0
- package/dist/client/frontendClient.js.map +1 -0
- package/dist/client/frontendClient.mjs +31 -0
- package/dist/client/frontendClient.mjs.map +1 -0
- package/dist/client/index.d.mts +5 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +33 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/index.mjs +10 -0
- package/dist/client/index.mjs.map +1 -0
- package/dist/client/session-provider.d.mts +62 -0
- package/dist/client/session-provider.d.ts +62 -0
- package/dist/client/session-provider.js +96 -0
- package/dist/client/session-provider.js.map +1 -0
- package/dist/client/session-provider.mjs +71 -0
- package/dist/client/session-provider.mjs.map +1 -0
- package/dist/client/useSession.d.mts +32 -0
- package/dist/client/useSession.d.ts +32 -0
- package/dist/client/useSession.js +37 -0
- package/dist/client/useSession.js.map +1 -0
- package/dist/client/useSession.mjs +13 -0
- package/dist/client/useSession.mjs.map +1 -0
- package/dist/index.d.mts +452 -1635
- package/dist/index.d.ts +452 -1635
- package/dist/index.js +2424 -5700
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2421 -5670
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +943 -288
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +29 -142
- package/dist/theme/default/index.d.ts +29 -142
- package/dist/theme/default/index.js +2392 -10115
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +2410 -10111
- package/dist/theme/default/index.mjs.map +1 -1
- package/dist/theme/default/tailwind/defaults.d.mts +737 -0
- package/dist/theme/default/tailwind/defaults.d.ts +737 -0
- package/dist/theme/default/tailwind/defaults.js +219 -0
- package/dist/theme/default/tailwind/defaults.js.map +1 -0
- package/dist/theme/default/tailwind/defaults.mjs +196 -0
- package/dist/theme/default/tailwind/defaults.mjs.map +1 -0
- package/package.json +45 -10
- package/tailwind/defaults.ts +34 -0
- package/tailwind/generated/README.md +2 -0
- package/tailwind/generated/default-variables.css +216 -0
- package/tailwind/generated/variables-processed.json +161 -0
- package/tsconfig.json +14 -3
- package/tsconfig.runtime.json +4 -0
- package/.eslintrc.js +0 -61
- package/postcss.config.ts +0 -6
- package/tailwind.config.ts +0 -51
- package/variables-processed.json +0 -193
|
@@ -1,110 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
type OryCardContentProps = PropsWithChildren;
|
|
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>;
|
|
2
|
+
import { OryCardContentProps, OryCardProps, OryNodeOidcButtonProps, OryFormRootProps, OryMessageContentProps, OryFlowComponentOverrides, OryFlowComponents, OryClientConfiguration } from '@ory/elements-react';
|
|
3
|
+
import * as react from 'react';
|
|
4
|
+
import { PropsWithChildren, ElementType } from 'react';
|
|
5
|
+
import { FlowError, LoginFlow, RecoveryFlow, RegistrationFlow, SettingsFlow, VerificationFlow } from '@ory/client-fetch';
|
|
71
6
|
|
|
72
|
-
|
|
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
|
|
|
@@ -112,80 +12,67 @@ declare function DefaultCardHeader(): react_jsx_runtime.JSX.Element;
|
|
|
112
12
|
|
|
113
13
|
declare function DefaultCardLogo(): react_jsx_runtime.JSX.Element;
|
|
114
14
|
|
|
15
|
+
declare function DefaultCurrentIdentifierButton(): react_jsx_runtime.JSX.Element | null;
|
|
16
|
+
|
|
17
|
+
declare function DefaultCardLayout({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
115
19
|
declare function DefaultCard({ children }: OryCardProps): react_jsx_runtime.JSX.Element;
|
|
116
20
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
declare const OryDefaultComponents: OryFlowComponents;
|
|
122
|
-
|
|
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
|
-
};
|
|
21
|
+
type DefaultSocialButtonProps = OryNodeOidcButtonProps & {
|
|
22
|
+
showLabel?: boolean;
|
|
23
|
+
logos?: Record<string, ElementType>;
|
|
147
24
|
};
|
|
25
|
+
declare function DefaultButtonSocial({ attributes, node, onClick, showLabel: _showLabel, logos: providedLogos, }: DefaultSocialButtonProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare namespace DefaultButtonSocial {
|
|
27
|
+
var WithLogos: (logos: Record<string, ElementType>) => (props: DefaultSocialButtonProps) => react_jsx_runtime.JSX.Element;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
declare function DefaultFormContainer({ children, onSubmit, action, method, }: PropsWithChildren<OryFormRootProps>): react_jsx_runtime.JSX.Element;
|
|
31
|
+
declare function DefaultMessageContainer({ children }: PropsWithChildren): react_jsx_runtime.JSX.Element | null;
|
|
32
|
+
declare function DefaultMessage({ message }: OryMessageContentProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
declare function getOryComponents(overrides?: OryFlowComponentOverrides): OryFlowComponents;
|
|
148
35
|
|
|
149
36
|
type ErrorFlowContextProps = {
|
|
150
37
|
error: FlowError;
|
|
151
|
-
components?:
|
|
38
|
+
components?: OryFlowComponentOverrides;
|
|
152
39
|
config: OryClientConfiguration;
|
|
153
40
|
};
|
|
154
41
|
declare function Error({ error, children, }: PropsWithChildren<ErrorFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
155
42
|
|
|
156
43
|
type LoginFlowContextProps = {
|
|
157
44
|
flow: LoginFlow;
|
|
158
|
-
components?:
|
|
45
|
+
components?: OryFlowComponentOverrides;
|
|
159
46
|
config: OryClientConfiguration;
|
|
160
47
|
};
|
|
161
48
|
declare function Login({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<LoginFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
162
49
|
|
|
163
50
|
type RecoveryFlowContextProps = {
|
|
164
51
|
flow: RecoveryFlow;
|
|
165
|
-
components?:
|
|
52
|
+
components?: OryFlowComponentOverrides;
|
|
166
53
|
config: OryClientConfiguration;
|
|
167
54
|
};
|
|
168
55
|
declare function Recovery({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<RecoveryFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
169
56
|
|
|
170
57
|
type RegistrationFlowContextProps = {
|
|
171
58
|
flow: RegistrationFlow;
|
|
172
|
-
components?:
|
|
59
|
+
components?: OryFlowComponentOverrides;
|
|
173
60
|
config: OryClientConfiguration;
|
|
174
61
|
};
|
|
175
62
|
declare function Registration({ flow, children, components: flowOverrideComponents, config, }: PropsWithChildren<RegistrationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
176
63
|
|
|
177
64
|
type SettingsFlowContextProps = {
|
|
178
65
|
flow: SettingsFlow;
|
|
179
|
-
components?:
|
|
66
|
+
components?: OryFlowComponentOverrides;
|
|
180
67
|
config: OryClientConfiguration;
|
|
181
68
|
};
|
|
182
69
|
declare function Settings({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<SettingsFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
183
70
|
|
|
184
71
|
type VerificationFlowContextProps = {
|
|
185
72
|
flow: VerificationFlow;
|
|
186
|
-
components?:
|
|
73
|
+
components?: OryFlowComponentOverrides;
|
|
187
74
|
config: OryClientConfiguration;
|
|
188
75
|
};
|
|
189
76
|
declare function Verification({ flow, config, children, components: flowOverrideComponents, }: PropsWithChildren<VerificationFlowContextProps>): react_jsx_runtime.JSX.Element;
|
|
190
77
|
|
|
191
|
-
export { DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLogo, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps,
|
|
78
|
+
export { DefaultButtonSocial, DefaultCard, DefaultCardContent, DefaultCardFooter, DefaultCardHeader, DefaultCardLayout, DefaultCardLogo, DefaultCurrentIdentifierButton, DefaultFormContainer, DefaultMessage, DefaultMessageContainer, Error, type ErrorFlowContextProps, Login, type LoginFlowContextProps, Recovery, type RecoveryFlowContextProps, Registration, Settings, type SettingsFlowContextProps, Verification, type VerificationFlowContextProps, getOryComponents };
|