@asgardeo/react 0.11.1 → 0.11.3

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.
Files changed (104) hide show
  1. package/dist/AsgardeoReactClient.d.ts +10 -10
  2. package/dist/__temp__/api.d.ts +6 -6
  3. package/dist/__temp__/models.d.ts +30 -30
  4. package/dist/cjs/index.js +5988 -5754
  5. package/dist/cjs/index.js.map +4 -4
  6. package/dist/components/adapters/FacebookButton.d.ts +1 -1
  7. package/dist/components/adapters/GitHubButton.d.ts +1 -1
  8. package/dist/components/adapters/GoogleButton.d.ts +1 -1
  9. package/dist/components/adapters/LinkedInButton.d.ts +1 -1
  10. package/dist/components/adapters/MicrosoftButton.d.ts +1 -1
  11. package/dist/components/adapters/SignInWithEthereumButton.d.ts +1 -1
  12. package/dist/components/adapters/SmsOtpButton.d.ts +1 -1
  13. package/dist/components/factories/FieldFactory.d.ts +25 -25
  14. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.styles.d.ts +1 -18
  15. package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +1 -1
  16. package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +26 -26
  17. package/dist/components/presentation/OrganizationList/BaseOrganizationList.styles.d.ts +1 -31
  18. package/dist/components/presentation/OrganizationList/OrganizationList.styles.d.ts +1 -6
  19. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +3 -3
  20. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.styles.d.ts +1 -27
  21. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +6 -6
  22. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.styles.d.ts +1 -25
  23. package/dist/components/presentation/User/BaseUser.d.ts +4 -4
  24. package/dist/components/presentation/UserDropdown/BaseUserDropdown.styles.d.ts +1 -15
  25. package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +3 -3
  26. package/dist/components/presentation/UserProfile/BaseUserProfile.styles.d.ts +1 -26
  27. package/dist/components/presentation/auth/AcceptInvite/index.d.ts +1 -1
  28. package/dist/components/presentation/auth/AcceptInvite/v2/AcceptInvite.d.ts +13 -13
  29. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.d.ts +51 -51
  30. package/dist/components/presentation/auth/AcceptInvite/v2/BaseAcceptInvite.styles.d.ts +6 -10
  31. package/dist/components/presentation/auth/AuthOptionFactory.d.ts +1 -1
  32. package/dist/components/presentation/auth/InviteUser/index.d.ts +1 -1
  33. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.d.ts +57 -57
  34. package/dist/components/presentation/auth/InviteUser/v2/BaseInviteUser.styles.d.ts +6 -10
  35. package/dist/components/presentation/auth/InviteUser/v2/InviteUser.d.ts +15 -15
  36. package/dist/components/presentation/auth/SignIn/BaseSignIn.styles.d.ts +1 -27
  37. package/dist/components/presentation/auth/SignIn/SignIn.d.ts +1 -1
  38. package/dist/components/presentation/auth/SignIn/v1/BaseSignIn.d.ts +12 -12
  39. package/dist/components/presentation/auth/SignIn/v1/options/SignInOptionFactory.d.ts +15 -15
  40. package/dist/components/presentation/auth/SignIn/v1/types.d.ts +30 -30
  41. package/dist/components/presentation/auth/SignIn/v2/BaseSignIn.d.ts +47 -47
  42. package/dist/components/presentation/auth/SignIn/v2/SignIn.d.ts +20 -20
  43. package/dist/components/presentation/auth/SignUp/BaseSignUp.styles.d.ts +1 -26
  44. package/dist/components/presentation/auth/SignUp/v1/BaseSignUp.d.ts +40 -40
  45. package/dist/components/presentation/auth/SignUp/v1/SignUpOptionFactory.d.ts +1 -1
  46. package/dist/components/presentation/auth/SignUp/v2/BaseSignUp.d.ts +46 -46
  47. package/dist/components/primitives/Alert/Alert.d.ts +8 -8
  48. package/dist/components/primitives/Alert/Alert.styles.d.ts +1 -8
  49. package/dist/components/primitives/Avatar/Avatar.d.ts +4 -4
  50. package/dist/components/primitives/Avatar/Avatar.styles.d.ts +1 -7
  51. package/dist/components/primitives/Button/Button.d.ts +14 -14
  52. package/dist/components/primitives/Button/Button.styles.d.ts +1 -13
  53. package/dist/components/primitives/Card/Card.d.ts +4 -4
  54. package/dist/components/primitives/Card/Card.styles.d.ts +1 -11
  55. package/dist/components/primitives/Checkbox/Checkbox.d.ts +8 -8
  56. package/dist/components/primitives/Checkbox/Checkbox.styles.d.ts +1 -8
  57. package/dist/components/primitives/DatePicker/DatePicker.d.ts +12 -12
  58. package/dist/components/primitives/DatePicker/DatePicker.styles.d.ts +1 -6
  59. package/dist/components/primitives/Dialog/Dialog.d.ts +17 -17
  60. package/dist/components/primitives/Dialog/Dialog.styles.d.ts +1 -9
  61. package/dist/components/primitives/Divider/Divider.d.ts +2 -2
  62. package/dist/components/primitives/Divider/Divider.styles.d.ts +1 -7
  63. package/dist/components/primitives/FormControl/FormControl.d.ts +4 -4
  64. package/dist/components/primitives/FormControl/FormControl.styles.d.ts +1 -5
  65. package/dist/components/primitives/InputLabel/InputLabel.d.ts +10 -10
  66. package/dist/components/primitives/InputLabel/InputLabel.styles.d.ts +1 -7
  67. package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +4 -4
  68. package/dist/components/primitives/KeyValueInput/KeyValueInput.styles.d.ts +1 -17
  69. package/dist/components/primitives/Logo/Logo.d.ts +8 -8
  70. package/dist/components/primitives/Logo/Logo.styles.d.ts +1 -7
  71. package/dist/components/primitives/MultiInput/MultiInput.d.ts +28 -28
  72. package/dist/components/primitives/MultiInput/MultiInput.styles.d.ts +1 -11
  73. package/dist/components/primitives/OtpField/OtpField.d.ts +20 -20
  74. package/dist/components/primitives/OtpField/OtpField.styles.d.ts +1 -6
  75. package/dist/components/primitives/PasswordField/PasswordField.styles.d.ts +1 -5
  76. package/dist/components/primitives/Select/Select.d.ts +18 -18
  77. package/dist/components/primitives/Select/Select.styles.d.ts +1 -6
  78. package/dist/components/primitives/Spinner/Spinner.d.ts +4 -4
  79. package/dist/components/primitives/Spinner/Spinner.styles.d.ts +1 -6
  80. package/dist/components/primitives/TextField/TextField.d.ts +18 -18
  81. package/dist/components/primitives/TextField/TextField.styles.d.ts +1 -9
  82. package/dist/components/primitives/Typography/Typography.d.ts +24 -24
  83. package/dist/components/primitives/Typography/Typography.styles.d.ts +1 -19
  84. package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +62 -62
  85. package/dist/contexts/Branding/BrandingContext.d.ts +12 -11
  86. package/dist/contexts/Branding/BrandingProvider.d.ts +10 -10
  87. package/dist/contexts/Flow/FlowContext.d.ts +25 -24
  88. package/dist/contexts/Flow/FlowProvider.d.ts +4 -4
  89. package/dist/contexts/I18n/I18nContext.d.ts +6 -5
  90. package/dist/contexts/I18n/I18nProvider.d.ts +1 -1
  91. package/dist/contexts/Theme/ThemeContext.d.ts +12 -11
  92. package/dist/contexts/Theme/ThemeProvider.d.ts +10 -10
  93. package/dist/contexts/Theme/types.d.ts +30 -30
  94. package/dist/contexts/User/UserContext.d.ts +2 -2
  95. package/dist/contexts/User/UserProvider.d.ts +2 -2
  96. package/dist/hooks/useBranding.d.ts +17 -17
  97. package/dist/hooks/useForm.d.ts +10 -9
  98. package/dist/hooks/useTranslation.d.ts +4 -4
  99. package/dist/index.d.ts +6 -26
  100. package/dist/index.js +5969 -5705
  101. package/dist/index.js.map +4 -4
  102. package/dist/utils/v2/flowTransformer.d.ts +7 -7
  103. package/dist/utils/v2/getAuthComponentHeadings.d.ts +2 -2
  104. package/package.json +2 -2
@@ -25,22 +25,26 @@ export interface BaseSignInOptionProps extends WithPreferences {
25
25
  * The authenticator configuration.
26
26
  */
27
27
  authenticator?: EmbeddedSignInFlowAuthenticator;
28
+ /**
29
+ * Custom CSS class name for the submit button.
30
+ */
31
+ buttonClassName?: string;
32
+ /**
33
+ * Error message to display.
34
+ */
35
+ error?: string | null;
28
36
  /**
29
37
  * Current form values.
30
38
  */
31
39
  formValues: Record<string, string>;
32
40
  /**
33
- * Touched state for form fields.
41
+ * Custom CSS class name for form inputs.
34
42
  */
35
- touchedFields: Record<string, boolean>;
43
+ inputClassName?: string;
36
44
  /**
37
45
  * Whether the component is in loading state.
38
46
  */
39
47
  isLoading: boolean;
40
- /**
41
- * Error message to display.
42
- */
43
- error?: string | null;
44
48
  /**
45
49
  * Callback function called when input values change.
46
50
  */
@@ -49,18 +53,14 @@ export interface BaseSignInOptionProps extends WithPreferences {
49
53
  * Callback function called when the option is submitted.
50
54
  */
51
55
  onSubmit?: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
52
- /**
53
- * Custom CSS class name for form inputs.
54
- */
55
- inputClassName?: string;
56
- /**
57
- * Custom CSS class name for the submit button.
58
- */
59
- buttonClassName?: string;
60
56
  /**
61
57
  * Text for the submit button.
62
58
  */
63
59
  submitButtonText?: string;
60
+ /**
61
+ * Touched state for form fields.
62
+ */
63
+ touchedFields: Record<string, boolean>;
64
64
  }
65
65
  /**
66
66
  * Creates the appropriate sign-in option component based on the authenticator's ID.
@@ -70,7 +70,7 @@ export declare const createSignInOption: ({ authenticator, onSubmit, buttonClass
70
70
  * Convenience function that creates the appropriate sign-in option component from an authenticator.
71
71
  */
72
72
  export declare const createSignInOptionFromAuthenticator: (authenticator: EmbeddedSignInFlowAuthenticator, formValues: Record<string, string>, touchedFields: Record<string, boolean>, isLoading: boolean, onInputChange: (param: string, value: string) => void, onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void, options?: {
73
- inputClassName?: string;
74
73
  buttonClassName?: string;
75
74
  error?: string | null;
75
+ inputClassName?: string;
76
76
  }) => ReactElement;
@@ -20,11 +20,11 @@ import { EmbeddedSignInFlowAuthenticator, EmbeddedSignInFlowAuthenticatorParamTy
20
20
  * Interface for form field state.
21
21
  */
22
22
  export interface FormField {
23
- param: string;
24
- type: EmbeddedSignInFlowAuthenticatorParamType;
25
- displayName: string;
26
23
  confidential: boolean;
24
+ displayName: string;
25
+ param: string;
27
26
  required: boolean;
27
+ type: EmbeddedSignInFlowAuthenticatorParamType;
28
28
  value: string;
29
29
  }
30
30
  /**
@@ -35,18 +35,26 @@ export interface BaseAuthenticatorProps {
35
35
  * The authenticator configuration.
36
36
  */
37
37
  authenticator: EmbeddedSignInFlowAuthenticator;
38
+ /**
39
+ * Custom CSS class name for the submit button.
40
+ */
41
+ buttonClassName?: string;
42
+ /**
43
+ * Error message to display.
44
+ */
45
+ error?: string | null;
38
46
  /**
39
47
  * Current form values.
40
48
  */
41
49
  formValues: Record<string, string>;
42
50
  /**
43
- * Whether the component is in loading state.
51
+ * Custom CSS class name for form inputs.
44
52
  */
45
- isLoading: boolean;
53
+ inputClassName?: string;
46
54
  /**
47
- * Error message to display.
55
+ * Whether the component is in loading state.
48
56
  */
49
- error?: string | null;
57
+ isLoading: boolean;
50
58
  /**
51
59
  * Callback function called when input values change.
52
60
  */
@@ -55,14 +63,6 @@ export interface BaseAuthenticatorProps {
55
63
  * Callback function called when the authenticator is submitted.
56
64
  */
57
65
  onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
58
- /**
59
- * Custom CSS class name for form inputs.
60
- */
61
- inputClassName?: string;
62
- /**
63
- * Custom CSS class name for the submit button.
64
- */
65
- buttonClassName?: string;
66
66
  /**
67
67
  * Text for the submit button.
68
68
  */
@@ -76,40 +76,40 @@ export interface AuthenticatorSelectorProps {
76
76
  * Available authenticators for selection.
77
77
  */
78
78
  authenticators: EmbeddedSignInFlowAuthenticator[];
79
+ buttonClassName?: string;
80
+ /**
81
+ * Error message to display.
82
+ */
83
+ error?: string | null;
84
+ errorClassName?: string;
79
85
  /**
80
86
  * Current form values.
81
87
  */
82
88
  formValues: Record<string, string>;
83
89
  /**
84
- * Whether the component is in loading state.
90
+ * Custom CSS class names.
85
91
  */
86
- isLoading: boolean;
92
+ inputClassName?: string;
87
93
  /**
88
- * Error message to display.
94
+ * Whether the component is in loading state.
89
95
  */
90
- error?: string | null;
96
+ isLoading: boolean;
97
+ messageClassName?: string;
91
98
  /**
92
99
  * Messages to display to the user.
93
100
  */
94
101
  messages: Array<{
95
- type: string;
96
102
  message: string;
103
+ type: string;
97
104
  }>;
98
- /**
99
- * Callback function called when input values change.
100
- */
101
- onInputChange: (param: string, value: string) => void;
102
105
  /**
103
106
  * Callback function called when an authenticator is selected.
104
107
  */
105
108
  onAuthenticatorSelection: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
106
109
  /**
107
- * Custom CSS class names.
110
+ * Callback function called when input values change.
108
111
  */
109
- inputClassName?: string;
110
- buttonClassName?: string;
111
- errorClassName?: string;
112
- messageClassName?: string;
112
+ onInputChange: (param: string, value: string) => void;
113
113
  /**
114
114
  * Text for the submit button.
115
115
  */
@@ -119,6 +119,6 @@ export interface AuthenticatorSelectorProps {
119
119
  * Style configuration for authenticators.
120
120
  */
121
121
  export interface AuthenticatorStyle {
122
- variant: 'solid' | 'outline';
123
122
  color: string;
123
+ variant: 'solid' | 'outline';
124
124
  }
@@ -15,71 +15,71 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC, ReactNode } from 'react';
19
18
  import { EmbeddedSignInFlowRequestV2 as EmbeddedSignInFlowRequest, EmbeddedFlowComponentV2 as EmbeddedFlowComponent } from '@asgardeo/browser';
19
+ import { FC, ReactNode } from 'react';
20
20
  import { CardProps } from '../../../../primitives/Card/Card';
21
21
  /**
22
22
  * Render props for custom UI rendering
23
23
  */
24
24
  export interface BaseSignInRenderProps {
25
25
  /**
26
- * Form values
26
+ * Flow components
27
27
  */
28
- values: Record<string, string>;
28
+ components: EmbeddedFlowComponent[];
29
+ /**
30
+ * API error (if any)
31
+ */
32
+ error?: Error | null;
29
33
  /**
30
34
  * Field validation errors
31
35
  */
32
36
  fieldErrors: Record<string, string>;
33
37
  /**
34
- * API error (if any)
38
+ * Function to handle input changes
35
39
  */
36
- error?: Error | null;
40
+ handleInputChange: (name: string, value: string) => void;
37
41
  /**
38
- * Touched fields
42
+ * Function to handle form submission
39
43
  */
40
- touched: Record<string, boolean>;
44
+ handleSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => Promise<void>;
45
+ /**
46
+ * Loading state
47
+ */
48
+ isLoading: boolean;
41
49
  /**
42
50
  * Whether the form is valid
43
51
  */
44
52
  isValid: boolean;
45
53
  /**
46
- * Loading state
54
+ * Flow messages
47
55
  */
48
- isLoading: boolean;
56
+ messages: Array<{
57
+ message: string;
58
+ type: string;
59
+ }>;
49
60
  /**
50
- * Flow components
61
+ * Flow subtitle
51
62
  */
52
- components: EmbeddedFlowComponent[];
63
+ subtitle: string;
53
64
  /**
54
- * Function to handle input changes
65
+ * Flow title
55
66
  */
56
- handleInputChange: (name: string, value: string) => void;
67
+ title: string;
57
68
  /**
58
- * Function to handle form submission
69
+ * Touched fields
59
70
  */
60
- handleSubmit: (component: EmbeddedFlowComponent, data?: Record<string, any>) => Promise<void>;
71
+ touched: Record<string, boolean>;
61
72
  /**
62
73
  * Function to validate the form
63
74
  */
64
75
  validateForm: () => {
65
- isValid: boolean;
66
76
  fieldErrors: Record<string, string>;
77
+ isValid: boolean;
67
78
  };
68
79
  /**
69
- * Flow title
70
- */
71
- title: string;
72
- /**
73
- * Flow subtitle
74
- */
75
- subtitle: string;
76
- /**
77
- * Flow messages
80
+ * Form values
78
81
  */
79
- messages: Array<{
80
- message: string;
81
- type: string;
82
- }>;
82
+ values: Record<string, string>;
83
83
  }
84
84
  /**
85
85
  * Props for the BaseSignIn component.
@@ -89,6 +89,10 @@ export interface BaseSignInProps {
89
89
  * Custom CSS class name for the submit button.
90
90
  */
91
91
  buttonClassName?: string;
92
+ /**
93
+ * Render props function for custom UI
94
+ */
95
+ children?: (props: BaseSignInRenderProps) => ReactNode;
92
96
  /**
93
97
  * Custom CSS class name for the form container.
94
98
  */
@@ -97,22 +101,22 @@ export interface BaseSignInProps {
97
101
  * Array of flow components to render.
98
102
  */
99
103
  components?: EmbeddedFlowComponent[];
100
- /**
101
- * Custom CSS class name for error messages.
102
- */
103
- errorClassName?: string;
104
104
  /**
105
105
  * Error object to display
106
106
  */
107
107
  error?: Error | null;
108
108
  /**
109
- * Flag to determine if the component is ready to be rendered.
109
+ * Custom CSS class name for error messages.
110
110
  */
111
- isLoading?: boolean;
111
+ errorClassName?: string;
112
112
  /**
113
113
  * Custom CSS class name for form inputs.
114
114
  */
115
115
  inputClassName?: string;
116
+ /**
117
+ * Flag to determine if the component is ready to be rendered.
118
+ */
119
+ isLoading?: boolean;
116
120
  /**
117
121
  * Custom CSS class name for info messages.
118
122
  */
@@ -134,29 +138,25 @@ export interface BaseSignInProps {
134
138
  */
135
139
  onSuccess?: (authData: Record<string, any>) => void;
136
140
  /**
137
- * Size variant for the component.
138
- */
139
- size?: 'small' | 'medium' | 'large';
140
- /**
141
- * Theme variant for the component.
141
+ * Whether to show the logo.
142
142
  */
143
- variant?: CardProps['variant'];
143
+ showLogo?: boolean;
144
144
  /**
145
- * Render props function for custom UI
145
+ * Whether to show the subtitle.
146
146
  */
147
- children?: (props: BaseSignInRenderProps) => ReactNode;
147
+ showSubtitle?: boolean;
148
148
  /**
149
149
  * Whether to show the title.
150
150
  */
151
151
  showTitle?: boolean;
152
152
  /**
153
- * Whether to show the subtitle.
153
+ * Size variant for the component.
154
154
  */
155
- showSubtitle?: boolean;
155
+ size?: 'small' | 'medium' | 'large';
156
156
  /**
157
- * Whether to show the logo.
157
+ * Theme variant for the component.
158
158
  */
159
- showLogo?: boolean;
159
+ variant?: CardProps['variant'];
160
160
  }
161
161
  /**
162
162
  * Base SignIn component that provides generic authentication flow.
@@ -15,37 +15,37 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
+ import { EmbeddedFlowComponentV2 as EmbeddedFlowComponent, EmbeddedSignInFlowRequestV2 } from '@asgardeo/browser';
18
19
  import { FC, ReactNode } from 'react';
19
20
  import { BaseSignInProps } from './BaseSignIn';
20
- import { EmbeddedFlowComponentV2 as EmbeddedFlowComponent, EmbeddedSignInFlowRequestV2 } from '@asgardeo/browser';
21
21
  /**
22
22
  * Render props function parameters
23
23
  */
24
24
  export interface SignInRenderProps {
25
25
  /**
26
- * Function to manually initialize the flow
26
+ * Current flow components
27
27
  */
28
- initialize: () => Promise<void>;
28
+ components: EmbeddedFlowComponent[];
29
29
  /**
30
- * Function to submit authentication data (primary)
30
+ * Current error if any
31
31
  */
32
- onSubmit: (payload: EmbeddedSignInFlowRequestV2) => Promise<void>;
32
+ error: Error | null;
33
33
  /**
34
- * Loading state indicator
34
+ * Function to manually initialize the flow
35
35
  */
36
- isLoading: boolean;
36
+ initialize: () => Promise<void>;
37
37
  /**
38
38
  * Whether the flow has been initialized
39
39
  */
40
40
  isInitialized: boolean;
41
41
  /**
42
- * Current flow components
42
+ * Loading state indicator
43
43
  */
44
- components: EmbeddedFlowComponent[];
44
+ isLoading: boolean;
45
45
  /**
46
- * Current error if any
46
+ * Function to submit authentication data (primary)
47
47
  */
48
- error: Error | null;
48
+ onSubmit: (payload: EmbeddedSignInFlowRequestV2) => Promise<void>;
49
49
  }
50
50
  /**
51
51
  * Props for the SignIn component.
@@ -53,31 +53,31 @@ export interface SignInRenderProps {
53
53
  */
54
54
  export type SignInProps = {
55
55
  /**
56
- * Custom CSS class name for the form container.
56
+ * Render props function for custom UI
57
57
  */
58
- className?: string;
58
+ children?: (props: SignInRenderProps) => ReactNode;
59
59
  /**
60
- * Callback function called when authentication is successful.
61
- * @param authData - The authentication data returned upon successful completion.
60
+ * Custom CSS class name for the form container.
62
61
  */
63
- onSuccess?: (authData: Record<string, any>) => void;
62
+ className?: string;
64
63
  /**
65
64
  * Callback function called when authentication fails.
66
65
  * @param error - The error that occurred during authentication.
67
66
  */
68
67
  onError?: (error: Error) => void;
69
68
  /**
70
- * Theme variant for the component.
69
+ * Callback function called when authentication is successful.
70
+ * @param authData - The authentication data returned upon successful completion.
71
71
  */
72
- variant?: BaseSignInProps['variant'];
72
+ onSuccess?: (authData: Record<string, any>) => void;
73
73
  /**
74
74
  * Size variant for the component.
75
75
  */
76
76
  size?: 'small' | 'medium' | 'large';
77
77
  /**
78
- * Render props function for custom UI
78
+ * Theme variant for the component.
79
79
  */
80
- children?: (props: SignInRenderProps) => ReactNode;
80
+ variant?: BaseSignInProps['variant'];
81
81
  };
82
82
  /**
83
83
  * A component-driven SignIn component that provides authentication flow with pre-built styling.
@@ -22,30 +22,5 @@ import { Theme } from '@asgardeo/browser';
22
22
  * @param colorScheme - The current color scheme (used for memoization)
23
23
  * @returns Object containing CSS class names for component styling
24
24
  */
25
- declare const useStyles: (theme: Theme, colorScheme: string) => {
26
- signUp: string;
27
- card: string;
28
- logoContainer: string;
29
- header: string;
30
- title: string;
31
- subtitle: string;
32
- messageItem: string;
33
- errorContainer: string;
34
- contentContainer: string;
35
- loadingContainer: string;
36
- loadingText: string;
37
- divider: string;
38
- centeredContainer: string;
39
- passkeyContainer: string;
40
- passkeyText: string;
41
- form: string;
42
- formDivider: string;
43
- authenticatorSection: string;
44
- authenticatorItem: string;
45
- noAuthenticatorCard: string;
46
- errorAlert: string;
47
- messagesAlert: string;
48
- flowMessagesContainer: string;
49
- flowMessageItem: string;
50
- };
25
+ declare const useStyles: (theme: Theme, colorScheme: string) => Record<string, string>;
51
26
  export default useStyles;
@@ -23,59 +23,59 @@ import { CardProps } from '../../../../primitives/Card/Card';
23
23
  */
24
24
  export interface BaseSignUpRenderProps {
25
25
  /**
26
- * Form values
26
+ * Flow components
27
27
  */
28
- values: Record<string, string>;
28
+ components: any[];
29
29
  /**
30
30
  * Form errors
31
31
  */
32
32
  errors: Record<string, string>;
33
33
  /**
34
- * Touched fields
34
+ * Function to handle input changes
35
35
  */
36
- touched: Record<string, boolean>;
36
+ handleInputChange: (name: string, value: string) => void;
37
37
  /**
38
- * Whether the form is valid
38
+ * Function to handle form submission
39
39
  */
40
- isValid: boolean;
40
+ handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;
41
41
  /**
42
42
  * Loading state
43
43
  */
44
44
  isLoading: boolean;
45
45
  /**
46
- * Flow components
47
- */
48
- components: any[];
49
- /**
50
- * Function to handle input changes
46
+ * Whether the form is valid
51
47
  */
52
- handleInputChange: (name: string, value: string) => void;
48
+ isValid: boolean;
53
49
  /**
54
- * Function to handle form submission
50
+ * Flow messages
55
51
  */
56
- handleSubmit: (component: any, data?: Record<string, any>) => Promise<void>;
52
+ messages: Array<{
53
+ message: string;
54
+ type: string;
55
+ }>;
57
56
  /**
58
- * Function to validate the form
57
+ * Flow subtitle
59
58
  */
60
- validateForm: () => {
61
- isValid: boolean;
62
- errors: Record<string, string>;
63
- };
59
+ subtitle: string;
64
60
  /**
65
61
  * Flow title
66
62
  */
67
63
  title: string;
68
64
  /**
69
- * Flow subtitle
65
+ * Touched fields
70
66
  */
71
- subtitle: string;
67
+ touched: Record<string, boolean>;
72
68
  /**
73
- * Flow messages
69
+ * Function to validate the form
74
70
  */
75
- messages: Array<{
76
- message: string;
77
- type: string;
78
- }>;
71
+ validateForm: () => {
72
+ errors: Record<string, string>;
73
+ isValid: boolean;
74
+ };
75
+ /**
76
+ * Form values
77
+ */
78
+ values: Record<string, string>;
79
79
  }
80
80
  /**
81
81
  * Props for the BaseSignUp component.
@@ -89,6 +89,10 @@ export interface BaseSignUpProps {
89
89
  * Custom CSS class name for the submit button.
90
90
  */
91
91
  buttonClassName?: string;
92
+ /**
93
+ * Render props function for custom UI
94
+ */
95
+ children?: (props: BaseSignUpRenderProps) => ReactNode;
92
96
  /**
93
97
  * Custom CSS class name for the form container.
94
98
  */
@@ -133,34 +137,30 @@ export interface BaseSignUpProps {
133
137
  * @returns Promise resolving to the sign-up response.
134
138
  */
135
139
  onSubmit?: (payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>;
136
- /**
137
- * Size variant for the component.
138
- */
139
- size?: 'small' | 'medium' | 'large';
140
- /**
141
- * Theme variant for the component.
142
- */
143
- variant?: CardProps['variant'];
144
140
  /**
145
141
  * Whether to redirect after sign-up.
146
142
  */
147
143
  shouldRedirectAfterSignUp?: boolean;
148
144
  /**
149
- * Render props function for custom UI
145
+ * Whether to show the logo.
150
146
  */
151
- children?: (props: BaseSignUpRenderProps) => ReactNode;
147
+ showLogo?: boolean;
148
+ /**
149
+ * Whether to show the subtitle.
150
+ */
151
+ showSubtitle?: boolean;
152
152
  /**
153
153
  * Whether to show the title.
154
154
  */
155
155
  showTitle?: boolean;
156
156
  /**
157
- * Whether to show the subtitle.
157
+ * Size variant for the component.
158
158
  */
159
- showSubtitle?: boolean;
159
+ size?: 'small' | 'medium' | 'large';
160
160
  /**
161
- * Whether to show the logo.
161
+ * Theme variant for the component.
162
162
  */
163
- showLogo?: boolean;
163
+ variant?: CardProps['variant'];
164
164
  }
165
165
  /**
166
166
  * BaseSignUp component that provides embedded sign-up flow for Asgardeo.
@@ -16,8 +16,8 @@
16
16
  * under the License.
17
17
  */
18
18
  import { EmbeddedFlowComponent } from '@asgardeo/browser';
19
- import { ReactElement } from 'react';
20
19
  import { AdapterProps } from 'packages/react/src/models/adapters';
20
+ import { ReactElement } from 'react';
21
21
  /**
22
22
  * Creates the appropriate sign-up component based on the component type.
23
23
  */