@ory/elements-react 1.0.0-next.14 → 1.0.0-next.15
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 +14 -0
- package/api-report/elements-react-theme.api.json +33 -0
- package/api-report/elements-react-theme.api.md +5 -2
- package/api-report/elements-react.api.json +115 -107
- package/api-report/elements-react.api.md +27 -12
- package/api-report/temp/elements-react-theme.api.md +5 -2
- package/api-report/temp/elements-react.api.md +27 -12
- package/dist/index.d.mts +87 -71
- package/dist/index.d.ts +87 -71
- package/dist/index.js +493 -442
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +496 -445
- package/dist/index.mjs.map +1 -1
- package/dist/theme/default/index.css +53 -2
- package/dist/theme/default/index.css.map +1 -1
- package/dist/theme/default/index.d.mts +3 -1
- package/dist/theme/default/index.d.ts +3 -1
- package/dist/theme/default/index.js +860 -743
- package/dist/theme/default/index.js.map +1 -1
- package/dist/theme/default/index.mjs +809 -693
- package/dist/theme/default/index.mjs.map +1 -1
- package/package.json +1 -1
- package/tailwind.config.ts +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -16,12 +16,6 @@ type OryNodeButtonProps = {
|
|
|
16
16
|
attributes: UiNodeInputAttributes;
|
|
17
17
|
node: UiNode;
|
|
18
18
|
} & Omit<ComponentPropsWithoutRef<"button">, "children"> & ButtonVariants;
|
|
19
|
-
type OryCurrentIdentifierProps = {
|
|
20
|
-
attributes: UiNodeInputAttributes;
|
|
21
|
-
node: UiNode;
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
href?: string;
|
|
24
|
-
} & Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick">;
|
|
25
19
|
type OryNodeAnchorProps = {
|
|
26
20
|
attributes: UiNodeAnchorAttributes;
|
|
27
21
|
node: UiNode;
|
|
@@ -118,40 +112,9 @@ type OryCardDividerProps = Record<string, never>;
|
|
|
118
112
|
*/
|
|
119
113
|
declare function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
|
|
120
114
|
|
|
121
|
-
type OryFormGroupsProps = PropsWithChildren<{
|
|
122
|
-
groups: UiNodeGroupEnum[];
|
|
123
|
-
}>;
|
|
124
|
-
type OryFormGroupProps = PropsWithChildren;
|
|
125
|
-
declare function OryFormGroups({ children, groups }: OryFormGroupsProps): react_jsx_runtime.JSX.Element;
|
|
126
|
-
|
|
127
|
-
type OryMessageContentProps = {
|
|
128
|
-
message: UiText;
|
|
129
|
-
};
|
|
130
|
-
type OryMessageRootProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
131
|
-
declare function OryCardValidationMessages({ ...props }: OryMessageRootProps): react_jsx_runtime.JSX.Element | null;
|
|
132
|
-
|
|
133
|
-
type OryFormOidcButtonsProps = PropsWithChildren<{
|
|
134
|
-
hideDivider?: boolean;
|
|
135
|
-
}>;
|
|
136
|
-
type OryFormOidcRootProps = PropsWithChildren<{
|
|
137
|
-
nodes: UiNode[];
|
|
138
|
-
}>;
|
|
139
|
-
type OryNodeOidcButtonProps = {
|
|
140
|
-
node: UiNode;
|
|
141
|
-
attributes: UiNodeInputAttributes;
|
|
142
|
-
onClick?: () => void;
|
|
143
|
-
};
|
|
144
|
-
declare function OryFormOidcButtons({ children, hideDivider, }: OryFormOidcButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
145
|
-
declare function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
|
|
146
|
-
|
|
147
115
|
type OryPageHeaderProps = Record<never, never>;
|
|
148
116
|
declare const HeadlessPageHeader: () => react_jsx_runtime.JSX.Element;
|
|
149
117
|
|
|
150
|
-
type OryFormSectionProps = PropsWithChildren<{
|
|
151
|
-
nodes?: UiNode[];
|
|
152
|
-
}>;
|
|
153
|
-
declare function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
|
|
154
|
-
|
|
155
118
|
declare function OrySettingsCard(): react_jsx_runtime.JSX.Element;
|
|
156
119
|
|
|
157
120
|
type OrySettingsRecoveryCodesProps = {
|
|
@@ -184,6 +147,37 @@ type OrySettingsPasskeyProps = {
|
|
|
184
147
|
removeButtons: UiNode[];
|
|
185
148
|
};
|
|
186
149
|
|
|
150
|
+
type OryFormGroupsProps = PropsWithChildren<{
|
|
151
|
+
groups: UiNodeGroupEnum[];
|
|
152
|
+
}>;
|
|
153
|
+
type OryFormGroupProps = PropsWithChildren;
|
|
154
|
+
declare function OryFormGroups({ children, groups }: OryFormGroupsProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
156
|
+
type OryMessageContentProps = {
|
|
157
|
+
message: UiText;
|
|
158
|
+
};
|
|
159
|
+
type OryMessageRootProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
160
|
+
declare function OryCardValidationMessages({ ...props }: OryMessageRootProps): react_jsx_runtime.JSX.Element | null;
|
|
161
|
+
|
|
162
|
+
type OryFormSectionProps = PropsWithChildren<{
|
|
163
|
+
nodes?: UiNode[];
|
|
164
|
+
}>;
|
|
165
|
+
declare function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
|
|
166
|
+
|
|
167
|
+
type OryFormOidcButtonsProps = PropsWithChildren<{
|
|
168
|
+
hideDivider?: boolean;
|
|
169
|
+
}>;
|
|
170
|
+
type OryFormOidcRootProps = PropsWithChildren<{
|
|
171
|
+
nodes: UiNode[];
|
|
172
|
+
}>;
|
|
173
|
+
type OryNodeOidcButtonProps = {
|
|
174
|
+
node: UiNode;
|
|
175
|
+
attributes: UiNodeInputAttributes;
|
|
176
|
+
onClick?: () => void;
|
|
177
|
+
};
|
|
178
|
+
declare function OryFormOidcButtons({ children, hideDivider, }: OryFormOidcButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
179
|
+
declare function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
|
|
180
|
+
|
|
187
181
|
/**
|
|
188
182
|
* A record of all the components that are used in the OryForm component.
|
|
189
183
|
*/
|
|
@@ -199,12 +193,6 @@ type OryFlowComponents = {
|
|
|
199
193
|
* It renders the "Login with Google", "Login with Facebook" etc. buttons.
|
|
200
194
|
*/
|
|
201
195
|
OidcButton: ComponentType<OryNodeOidcButtonProps>;
|
|
202
|
-
/**
|
|
203
|
-
* The CurrentIdentifierButton component is rendered whenever a button of group "identifier_first" node is encountered.
|
|
204
|
-
*
|
|
205
|
-
* It is used to show the current identifier and can allow the user to start a new flow, if they want to.
|
|
206
|
-
*/
|
|
207
|
-
CurrentIdentifierButton: ComponentType<OryCurrentIdentifierProps>;
|
|
208
196
|
/**
|
|
209
197
|
* Anchor component, rendered whenever an "anchor" node is encountered
|
|
210
198
|
*/
|
|
@@ -344,9 +332,8 @@ type DeepPartialTwoLevels<T> = {
|
|
|
344
332
|
type OryFlowComponentOverrides = DeepPartialTwoLevels<OryFlowComponents>;
|
|
345
333
|
type OryFormProps = PropsWithChildren<{
|
|
346
334
|
onAfterSubmit?: (method: string | number | boolean | undefined) => void;
|
|
347
|
-
nodes?: UiNode[];
|
|
348
335
|
}>;
|
|
349
|
-
declare function OryForm({ children, onAfterSubmit
|
|
336
|
+
declare function OryForm({ children, onAfterSubmit }: OryFormProps): string | react_jsx_runtime.JSX.Element;
|
|
350
337
|
|
|
351
338
|
declare function useComponents(): OryFlowComponents;
|
|
352
339
|
declare function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
|
|
@@ -449,31 +436,6 @@ type ErrorFlowContainer = OryFlow<FlowType.Error, FlowError>;
|
|
|
449
436
|
*/
|
|
450
437
|
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
|
|
451
438
|
|
|
452
|
-
/**
|
|
453
|
-
* Returns an object that contains the current flow and the flow type, as well as the configuration.
|
|
454
|
-
*
|
|
455
|
-
* @returns The current flow container
|
|
456
|
-
*/
|
|
457
|
-
declare function useOryFlow(): FlowContextValue;
|
|
458
|
-
/**
|
|
459
|
-
* Function to set the flow container.
|
|
460
|
-
*/
|
|
461
|
-
type FlowContainerSetter = Dispatch<Partial<OryFlowContainer>>;
|
|
462
|
-
/**
|
|
463
|
-
* The return value of the OryFlowContext.
|
|
464
|
-
*/
|
|
465
|
-
type FlowContextValue = OryFlowContainer & {
|
|
466
|
-
/**
|
|
467
|
-
* Function to set the flow container.
|
|
468
|
-
*/
|
|
469
|
-
setFlowContainer: FlowContainerSetter;
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
type OryProviderProps = {
|
|
473
|
-
components: OryFlowComponents;
|
|
474
|
-
} & OryFlowContainer & PropsWithChildren;
|
|
475
|
-
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
476
|
-
|
|
477
439
|
/**
|
|
478
440
|
* Converts a UiText to a FormattedMessage.
|
|
479
441
|
* The UiText contains the id of the message and the context.
|
|
@@ -546,4 +508,58 @@ declare function messageTestId(message: UiText): {
|
|
|
546
508
|
"data-testid": string;
|
|
547
509
|
};
|
|
548
510
|
|
|
549
|
-
|
|
511
|
+
type FormState = {
|
|
512
|
+
current: "provide_identifier";
|
|
513
|
+
} | {
|
|
514
|
+
current: "select_method";
|
|
515
|
+
} | {
|
|
516
|
+
current: "method_active";
|
|
517
|
+
method: UiNodeGroupEnum;
|
|
518
|
+
} | {
|
|
519
|
+
current: "success_screen";
|
|
520
|
+
} | {
|
|
521
|
+
current: "settings";
|
|
522
|
+
};
|
|
523
|
+
type FormStateAction = {
|
|
524
|
+
type: "action_flow_update";
|
|
525
|
+
flow: OryFlowContainer;
|
|
526
|
+
} | {
|
|
527
|
+
type: "action_select_method";
|
|
528
|
+
method: UiNodeGroupEnum;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Returns an object that contains the current flow and the flow type, as well as the configuration.
|
|
533
|
+
*
|
|
534
|
+
* @returns The current flow container
|
|
535
|
+
*/
|
|
536
|
+
declare function useOryFlow(): FlowContextValue;
|
|
537
|
+
/**
|
|
538
|
+
* Function to set the flow container.
|
|
539
|
+
*/
|
|
540
|
+
type FlowContainerSetter = Dispatch<OryFlowContainer>;
|
|
541
|
+
/**
|
|
542
|
+
* The return value of the OryFlowContext.
|
|
543
|
+
*/
|
|
544
|
+
type FlowContextValue = OryFlowContainer & {
|
|
545
|
+
/**
|
|
546
|
+
* Function to set the flow container.
|
|
547
|
+
*/
|
|
548
|
+
setFlowContainer: FlowContainerSetter;
|
|
549
|
+
/**
|
|
550
|
+
* The current form state.
|
|
551
|
+
* @see FormState
|
|
552
|
+
*/
|
|
553
|
+
formState: FormState;
|
|
554
|
+
/**
|
|
555
|
+
* Dispatch function to update the form state.
|
|
556
|
+
*/
|
|
557
|
+
dispatchFormState: Dispatch<FormStateAction>;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
type OryProviderProps = {
|
|
561
|
+
components: OryFlowComponents;
|
|
562
|
+
} & OryFlowContainer & PropsWithChildren;
|
|
563
|
+
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
564
|
+
|
|
565
|
+
export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, OryCardValidationMessages, type OryClientConfiguration, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcButtonsProps, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, locales as OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|
package/dist/index.d.ts
CHANGED
|
@@ -16,12 +16,6 @@ type OryNodeButtonProps = {
|
|
|
16
16
|
attributes: UiNodeInputAttributes;
|
|
17
17
|
node: UiNode;
|
|
18
18
|
} & Omit<ComponentPropsWithoutRef<"button">, "children"> & ButtonVariants;
|
|
19
|
-
type OryCurrentIdentifierProps = {
|
|
20
|
-
attributes: UiNodeInputAttributes;
|
|
21
|
-
node: UiNode;
|
|
22
|
-
onClick?: () => void;
|
|
23
|
-
href?: string;
|
|
24
|
-
} & Omit<ComponentPropsWithoutRef<"button">, "children" | "onClick">;
|
|
25
19
|
type OryNodeAnchorProps = {
|
|
26
20
|
attributes: UiNodeAnchorAttributes;
|
|
27
21
|
node: UiNode;
|
|
@@ -118,40 +112,9 @@ type OryCardDividerProps = Record<string, never>;
|
|
|
118
112
|
*/
|
|
119
113
|
declare function OryFormGroupDivider(): react_jsx_runtime.JSX.Element | null;
|
|
120
114
|
|
|
121
|
-
type OryFormGroupsProps = PropsWithChildren<{
|
|
122
|
-
groups: UiNodeGroupEnum[];
|
|
123
|
-
}>;
|
|
124
|
-
type OryFormGroupProps = PropsWithChildren;
|
|
125
|
-
declare function OryFormGroups({ children, groups }: OryFormGroupsProps): react_jsx_runtime.JSX.Element;
|
|
126
|
-
|
|
127
|
-
type OryMessageContentProps = {
|
|
128
|
-
message: UiText;
|
|
129
|
-
};
|
|
130
|
-
type OryMessageRootProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
131
|
-
declare function OryCardValidationMessages({ ...props }: OryMessageRootProps): react_jsx_runtime.JSX.Element | null;
|
|
132
|
-
|
|
133
|
-
type OryFormOidcButtonsProps = PropsWithChildren<{
|
|
134
|
-
hideDivider?: boolean;
|
|
135
|
-
}>;
|
|
136
|
-
type OryFormOidcRootProps = PropsWithChildren<{
|
|
137
|
-
nodes: UiNode[];
|
|
138
|
-
}>;
|
|
139
|
-
type OryNodeOidcButtonProps = {
|
|
140
|
-
node: UiNode;
|
|
141
|
-
attributes: UiNodeInputAttributes;
|
|
142
|
-
onClick?: () => void;
|
|
143
|
-
};
|
|
144
|
-
declare function OryFormOidcButtons({ children, hideDivider, }: OryFormOidcButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
145
|
-
declare function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
|
|
146
|
-
|
|
147
115
|
type OryPageHeaderProps = Record<never, never>;
|
|
148
116
|
declare const HeadlessPageHeader: () => react_jsx_runtime.JSX.Element;
|
|
149
117
|
|
|
150
|
-
type OryFormSectionProps = PropsWithChildren<{
|
|
151
|
-
nodes?: UiNode[];
|
|
152
|
-
}>;
|
|
153
|
-
declare function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
|
|
154
|
-
|
|
155
118
|
declare function OrySettingsCard(): react_jsx_runtime.JSX.Element;
|
|
156
119
|
|
|
157
120
|
type OrySettingsRecoveryCodesProps = {
|
|
@@ -184,6 +147,37 @@ type OrySettingsPasskeyProps = {
|
|
|
184
147
|
removeButtons: UiNode[];
|
|
185
148
|
};
|
|
186
149
|
|
|
150
|
+
type OryFormGroupsProps = PropsWithChildren<{
|
|
151
|
+
groups: UiNodeGroupEnum[];
|
|
152
|
+
}>;
|
|
153
|
+
type OryFormGroupProps = PropsWithChildren;
|
|
154
|
+
declare function OryFormGroups({ children, groups }: OryFormGroupsProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
156
|
+
type OryMessageContentProps = {
|
|
157
|
+
message: UiText;
|
|
158
|
+
};
|
|
159
|
+
type OryMessageRootProps = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
|
|
160
|
+
declare function OryCardValidationMessages({ ...props }: OryMessageRootProps): react_jsx_runtime.JSX.Element | null;
|
|
161
|
+
|
|
162
|
+
type OryFormSectionProps = PropsWithChildren<{
|
|
163
|
+
nodes?: UiNode[];
|
|
164
|
+
}>;
|
|
165
|
+
declare function OryFormSection({ children, nodes }: OryFormSectionProps): react_jsx_runtime.JSX.Element;
|
|
166
|
+
|
|
167
|
+
type OryFormOidcButtonsProps = PropsWithChildren<{
|
|
168
|
+
hideDivider?: boolean;
|
|
169
|
+
}>;
|
|
170
|
+
type OryFormOidcRootProps = PropsWithChildren<{
|
|
171
|
+
nodes: UiNode[];
|
|
172
|
+
}>;
|
|
173
|
+
type OryNodeOidcButtonProps = {
|
|
174
|
+
node: UiNode;
|
|
175
|
+
attributes: UiNodeInputAttributes;
|
|
176
|
+
onClick?: () => void;
|
|
177
|
+
};
|
|
178
|
+
declare function OryFormOidcButtons({ children, hideDivider, }: OryFormOidcButtonsProps): react_jsx_runtime.JSX.Element | null;
|
|
179
|
+
declare function OryFormSocialButtonsForm(): react_jsx_runtime.JSX.Element | null;
|
|
180
|
+
|
|
187
181
|
/**
|
|
188
182
|
* A record of all the components that are used in the OryForm component.
|
|
189
183
|
*/
|
|
@@ -199,12 +193,6 @@ type OryFlowComponents = {
|
|
|
199
193
|
* It renders the "Login with Google", "Login with Facebook" etc. buttons.
|
|
200
194
|
*/
|
|
201
195
|
OidcButton: ComponentType<OryNodeOidcButtonProps>;
|
|
202
|
-
/**
|
|
203
|
-
* The CurrentIdentifierButton component is rendered whenever a button of group "identifier_first" node is encountered.
|
|
204
|
-
*
|
|
205
|
-
* It is used to show the current identifier and can allow the user to start a new flow, if they want to.
|
|
206
|
-
*/
|
|
207
|
-
CurrentIdentifierButton: ComponentType<OryCurrentIdentifierProps>;
|
|
208
196
|
/**
|
|
209
197
|
* Anchor component, rendered whenever an "anchor" node is encountered
|
|
210
198
|
*/
|
|
@@ -344,9 +332,8 @@ type DeepPartialTwoLevels<T> = {
|
|
|
344
332
|
type OryFlowComponentOverrides = DeepPartialTwoLevels<OryFlowComponents>;
|
|
345
333
|
type OryFormProps = PropsWithChildren<{
|
|
346
334
|
onAfterSubmit?: (method: string | number | boolean | undefined) => void;
|
|
347
|
-
nodes?: UiNode[];
|
|
348
335
|
}>;
|
|
349
|
-
declare function OryForm({ children, onAfterSubmit
|
|
336
|
+
declare function OryForm({ children, onAfterSubmit }: OryFormProps): string | react_jsx_runtime.JSX.Element;
|
|
350
337
|
|
|
351
338
|
declare function useComponents(): OryFlowComponents;
|
|
352
339
|
declare function useNodeSorter(): (a: UiNode, b: UiNode, ctx: {
|
|
@@ -449,31 +436,6 @@ type ErrorFlowContainer = OryFlow<FlowType.Error, FlowError>;
|
|
|
449
436
|
*/
|
|
450
437
|
type OryFlowContainer = LoginFlowContainer | RegistrationFlowContainer | RecoveryFlowContainer | VerificationFlowContainer | SettingsFlowContainer;
|
|
451
438
|
|
|
452
|
-
/**
|
|
453
|
-
* Returns an object that contains the current flow and the flow type, as well as the configuration.
|
|
454
|
-
*
|
|
455
|
-
* @returns The current flow container
|
|
456
|
-
*/
|
|
457
|
-
declare function useOryFlow(): FlowContextValue;
|
|
458
|
-
/**
|
|
459
|
-
* Function to set the flow container.
|
|
460
|
-
*/
|
|
461
|
-
type FlowContainerSetter = Dispatch<Partial<OryFlowContainer>>;
|
|
462
|
-
/**
|
|
463
|
-
* The return value of the OryFlowContext.
|
|
464
|
-
*/
|
|
465
|
-
type FlowContextValue = OryFlowContainer & {
|
|
466
|
-
/**
|
|
467
|
-
* Function to set the flow container.
|
|
468
|
-
*/
|
|
469
|
-
setFlowContainer: FlowContainerSetter;
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
type OryProviderProps = {
|
|
473
|
-
components: OryFlowComponents;
|
|
474
|
-
} & OryFlowContainer & PropsWithChildren;
|
|
475
|
-
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
476
|
-
|
|
477
439
|
/**
|
|
478
440
|
* Converts a UiText to a FormattedMessage.
|
|
479
441
|
* The UiText contains the id of the message and the context.
|
|
@@ -546,4 +508,58 @@ declare function messageTestId(message: UiText): {
|
|
|
546
508
|
"data-testid": string;
|
|
547
509
|
};
|
|
548
510
|
|
|
549
|
-
|
|
511
|
+
type FormState = {
|
|
512
|
+
current: "provide_identifier";
|
|
513
|
+
} | {
|
|
514
|
+
current: "select_method";
|
|
515
|
+
} | {
|
|
516
|
+
current: "method_active";
|
|
517
|
+
method: UiNodeGroupEnum;
|
|
518
|
+
} | {
|
|
519
|
+
current: "success_screen";
|
|
520
|
+
} | {
|
|
521
|
+
current: "settings";
|
|
522
|
+
};
|
|
523
|
+
type FormStateAction = {
|
|
524
|
+
type: "action_flow_update";
|
|
525
|
+
flow: OryFlowContainer;
|
|
526
|
+
} | {
|
|
527
|
+
type: "action_select_method";
|
|
528
|
+
method: UiNodeGroupEnum;
|
|
529
|
+
};
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Returns an object that contains the current flow and the flow type, as well as the configuration.
|
|
533
|
+
*
|
|
534
|
+
* @returns The current flow container
|
|
535
|
+
*/
|
|
536
|
+
declare function useOryFlow(): FlowContextValue;
|
|
537
|
+
/**
|
|
538
|
+
* Function to set the flow container.
|
|
539
|
+
*/
|
|
540
|
+
type FlowContainerSetter = Dispatch<OryFlowContainer>;
|
|
541
|
+
/**
|
|
542
|
+
* The return value of the OryFlowContext.
|
|
543
|
+
*/
|
|
544
|
+
type FlowContextValue = OryFlowContainer & {
|
|
545
|
+
/**
|
|
546
|
+
* Function to set the flow container.
|
|
547
|
+
*/
|
|
548
|
+
setFlowContainer: FlowContainerSetter;
|
|
549
|
+
/**
|
|
550
|
+
* The current form state.
|
|
551
|
+
* @see FormState
|
|
552
|
+
*/
|
|
553
|
+
formState: FormState;
|
|
554
|
+
/**
|
|
555
|
+
* Dispatch function to update the form state.
|
|
556
|
+
*/
|
|
557
|
+
dispatchFormState: Dispatch<FormStateAction>;
|
|
558
|
+
};
|
|
559
|
+
|
|
560
|
+
type OryProviderProps = {
|
|
561
|
+
components: OryFlowComponents;
|
|
562
|
+
} & OryFlowContainer & PropsWithChildren;
|
|
563
|
+
declare function OryProvider({ children, components: Components, ...oryFlowProps }: OryProviderProps): react_jsx_runtime.JSX.Element;
|
|
564
|
+
|
|
565
|
+
export { type ErrorFlowContainer, type FlowContainerSetter, type FlowContextValue, type FormState, type FormStateAction, type FormValues, HeadlessPageHeader, type IntlConfig, type LoginFlowContainer, type OnSubmitHandlerProps, OryCard, type OryCardAuthMethodListItemProps, OryCardContent, type OryCardContentProps, type OryCardDividerProps, OryCardFooter, type OryCardFooterProps, OryCardHeader, type OryCardHeaderProps, type OryCardLogoProps, type OryCardRootProps as OryCardProps, OryCardValidationMessages, type OryClientConfiguration, type OryFlowComponentOverrides, type OryFlowComponents, type OryFlowContainer, OryForm, OryFormGroupDivider, type OryFormGroupProps, OryFormGroups, type OryFormGroupsProps, OryFormOidcButtons, type OryFormOidcButtonsProps, type OryFormOidcRootProps, type OryFormProps, type OryFormRootProps, OryFormSection, type OryFormSectionContentProps, type OryFormSectionFooterProps, type OryFormSectionProps, OryFormSocialButtonsForm, locales as OryLocales, type OryMessageContentProps, type OryMessageRootProps, type OryNodeAnchorProps, type OryNodeButtonProps, type OryNodeImageProps, type OryNodeInputProps, type OryNodeLabelProps, type OryNodeOidcButtonProps, type OryNodeTextProps, type OryPageHeaderProps, OryProvider, type OryProviderProps, OrySettingsCard, type OrySettingsOidcProps, type OrySettingsPasskeyProps, type OrySettingsRecoveryCodesProps, type OrySettingsTotpProps, type OrySettingsWebauthnProps, OryTwoStepCard, type RecoveryFlowContainer, type RegistrationFlowContainer, type SettingsFlowContainer, type VerificationFlowContainer, messageTestId, uiTextToFormattedMessage, useComponents, useNodeSorter, useOryFlow };
|