@asgardeo/react 0.5.23 → 0.5.24

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.
@@ -24,7 +24,7 @@ export interface BaseSignInOptionProps extends WithPreferences {
24
24
  /**
25
25
  * The authenticator configuration.
26
26
  */
27
- authenticator: EmbeddedSignInFlowAuthenticator;
27
+ authenticator?: EmbeddedSignInFlowAuthenticator;
28
28
  /**
29
29
  * Current form values.
30
30
  */
@@ -48,7 +48,7 @@ export interface BaseSignInOptionProps extends WithPreferences {
48
48
  /**
49
49
  * Callback function called when the option is submitted.
50
50
  */
51
- onSubmit: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
51
+ onSubmit?: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
52
52
  /**
53
53
  * Custom CSS class name for form inputs.
54
54
  */
@@ -65,7 +65,7 @@ export interface BaseSignInOptionProps extends WithPreferences {
65
65
  /**
66
66
  * Creates the appropriate sign-in option component based on the authenticator's ID.
67
67
  */
68
- export declare const createSignInOption: (props: BaseSignInOptionProps) => ReactElement;
68
+ export declare const createSignInOption: ({ authenticator, onSubmit, buttonClassName, preferences, ...rest }: BaseSignInOptionProps) => ReactElement;
69
69
  /**
70
70
  * Convenience function that creates the appropriate sign-in option component from an authenticator.
71
71
  */
@@ -74,7 +74,7 @@ export interface BaseSignUpOptionProps extends WithPreferences {
74
74
  /**
75
75
  * Creates the appropriate sign-up component based on the component type.
76
76
  */
77
- export declare const createSignUpComponent: (props: BaseSignUpOptionProps) => ReactElement;
77
+ export declare const createSignUpComponent: ({ component, onSubmit, ...rest }: BaseSignUpOptionProps) => ReactElement;
78
78
  /**
79
79
  * Convenience function that creates the appropriate sign-up component from flow component data.
80
80
  */
@@ -49,14 +49,17 @@ export interface BaseUserProfileProps {
49
49
  editable?: boolean;
50
50
  fallback?: ReactElement;
51
51
  flattenedProfile?: User;
52
+ hideFields?: string[];
52
53
  mode?: 'inline' | 'popup';
53
54
  onOpenChange?: (open: boolean) => void;
54
55
  onUpdate?: (payload: any) => Promise<void>;
55
56
  open?: boolean;
56
57
  profile?: User;
57
58
  schemas?: Schema[];
59
+ showFields?: string[];
58
60
  title?: string;
59
61
  error?: string | null;
62
+ isLoading?: boolean;
60
63
  }
61
64
  declare const BaseUserProfile: FC<BaseUserProfileProps>;
62
65
  export default BaseUserProfile;
@@ -43,6 +43,16 @@ export type UserProfileProps = Omit<BaseUserProfileProps, 'user' | 'profile' | '
43
43
  * cardLayout={true}
44
44
  * fallback={<div>Please sign in to view your profile</div>}
45
45
  * />
46
+ *
47
+ * // With field filtering - only show specific fields
48
+ * <UserProfile
49
+ * showFields={['name.givenName', 'name.familyName', 'emails']}
50
+ * />
51
+ *
52
+ * // With field hiding - hide specific fields
53
+ * <UserProfile
54
+ * hideFields={['phoneNumbers', 'addresses']}
55
+ * />
46
56
  * ```
47
57
  */
48
58
  declare const UserProfile: FC<UserProfileProps>;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * Facebook Sign-In Button Component.
22
22
  * Handles authentication with Facebook identity provider.
23
23
  */
24
- declare const FacebookButton: FC<BaseSignInOptionProps>;
24
+ declare const FacebookButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default FacebookButton;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * GitHub Sign-In Button Component.
22
22
  * Handles authentication with GitHub identity provider.
23
23
  */
24
- declare const GitHubButton: FC<BaseSignInOptionProps>;
24
+ declare const GitHubButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default GitHubButton;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * Google Sign-In Button Component.
22
22
  * Handles authentication with Google identity provider.
23
23
  */
24
- declare const GoogleButton: FC<BaseSignInOptionProps>;
24
+ declare const GoogleButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default GoogleButton;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * LinkedIn Sign-In Button Component.
22
22
  * Handles authentication with LinkedIn identity provider.
23
23
  */
24
- declare const LinkedInButton: FC<BaseSignInOptionProps>;
24
+ declare const LinkedInButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default LinkedInButton;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * Microsoft Sign-In Button Component.
22
22
  * Handles authentication with Microsoft identity provider.
23
23
  */
24
- declare const MicrosoftButton: FC<BaseSignInOptionProps>;
24
+ declare const MicrosoftButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default MicrosoftButton;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * Sign In With Ethereum Button Component.
22
22
  * Handles authentication with Sign In With Ethereum identity provider.
23
23
  */
24
- declare const SignInWithEthereumButton: FC<BaseSignInOptionProps>;
24
+ declare const SignInWithEthereumButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default SignInWithEthereumButton;
@@ -15,11 +15,11 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC } from 'react';
19
- import { BaseSignInOptionProps } from './SignInOptionFactory';
18
+ import { FC, HTMLAttributes } from 'react';
19
+ import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
20
20
  /**
21
21
  * Social Login Sign-In Option Component.
22
22
  * Handles authentication with external identity providers (Google, GitHub, etc.).
23
23
  */
24
- declare const SocialLogin: FC<BaseSignInOptionProps>;
24
+ declare const SocialLogin: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
25
25
  export default SocialLogin;
@@ -50,6 +50,10 @@ export interface AvatarProps {
50
50
  * @default 'circular'
51
51
  */
52
52
  variant?: 'circular' | 'square';
53
+ /**
54
+ * Loading state of the avatar
55
+ */
56
+ isLoading?: boolean;
53
57
  }
54
58
  export declare const Avatar: FC<AvatarProps>;
55
59
  export default Avatar;
@@ -31,5 +31,6 @@ declare const useStyles: (theme: Theme, colorScheme: string, size: number, varia
31
31
  variant: string;
32
32
  image: string;
33
33
  skeleton: string;
34
+ icon: string;
34
35
  };
35
36
  export default useStyles;
package/dist/index.d.ts CHANGED
@@ -93,16 +93,16 @@ export { default as SignUp } from './components/presentation/SignUp/SignUp';
93
93
  export * from './components/presentation/SignUp/SignUp';
94
94
  export { default as IdentifierFirst } from './components/presentation/SignIn/options/IdentifierFirst';
95
95
  export { default as UsernamePassword } from './components/presentation/SignIn/options/UsernamePassword';
96
- export { default as GoogleButton } from './components/presentation/SignIn/options/GoogleButton';
97
- export { default as GitHubButton } from './components/presentation/SignIn/options/GitHubButton';
98
- export { default as MicrosoftButton } from './components/presentation/SignIn/options/MicrosoftButton';
99
- export { default as FacebookButton } from './components/presentation/SignIn/options/FacebookButton';
100
- export { default as LinkedInButton } from './components/presentation/SignIn/options/LinkedInButton';
101
- export { default as SignInWithEthereumButton } from './components/presentation/SignIn/options/SignInWithEthereumButton';
96
+ export { default as GoogleButton } from './components/presentation/options/GoogleButton';
97
+ export { default as GitHubButton } from './components/presentation/options/GitHubButton';
98
+ export { default as MicrosoftButton } from './components/presentation/options/MicrosoftButton';
99
+ export { default as FacebookButton } from './components/presentation/options/FacebookButton';
100
+ export { default as LinkedInButton } from './components/presentation/options/LinkedInButton';
101
+ export { default as SignInWithEthereumButton } from './components/presentation/options/SignInWithEthereumButton';
102
102
  export { default as EmailOtp } from './components/presentation/SignIn/options/EmailOtp';
103
103
  export { default as Totp } from './components/presentation/SignIn/options/Totp';
104
104
  export { default as SmsOtp } from './components/presentation/SignIn/options/SmsOtp';
105
- export { default as SocialButton } from './components/presentation/SignIn/options/SocialButton';
105
+ export { default as SocialButton } from './components/presentation/options/SocialButton';
106
106
  export { default as MultiOptionButton } from './components/presentation/SignIn/options/MultiOptionButton';
107
107
  export * from './components/presentation/SignIn/options/SignInOptionFactory';
108
108
  export { default as BaseUser } from './components/presentation/User/BaseUser';
@@ -193,4 +193,4 @@ export { default as getSchemas, GetSchemasConfig } from './api/getSchemas';
193
193
  export { default as updateMeProfile, UpdateMeProfileConfig } from './api/updateMeProfile';
194
194
  export { default as getMeProfile } from './api/getScim2Me';
195
195
  export * from './api/getScim2Me';
196
- export { AsgardeoRuntimeError, http } from '@asgardeo/browser';
196
+ export { AsgardeoRuntimeError, http, getActiveTheme } from '@asgardeo/browser';