@asgardeo/react 0.11.2 → 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
@@ -23,63 +23,63 @@ 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
+ /**
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: any, 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: any[];
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: any, 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 BaseSignUp component.
@@ -94,17 +94,21 @@ export interface BaseSignUpProps {
94
94
  */
95
95
  buttonClassName?: string;
96
96
  /**
97
- * Custom CSS class name for the form container.
97
+ * Render props function for custom UI
98
98
  */
99
- className?: string;
99
+ children?: (props: BaseSignUpRenderProps) => ReactNode;
100
100
  /**
101
- * Custom CSS class name for error messages.
101
+ * Custom CSS class name for the form container.
102
102
  */
103
- errorClassName?: string;
103
+ className?: string;
104
104
  /**
105
105
  * Error object to display
106
106
  */
107
107
  error?: Error | null;
108
+ /**
109
+ * Custom CSS class name for error messages.
110
+ */
111
+ errorClassName?: string;
108
112
  /**
109
113
  * Custom CSS class name for form inputs.
110
114
  */
@@ -141,34 +145,30 @@ export interface BaseSignUpProps {
141
145
  * @returns Promise resolving to the sign-up response.
142
146
  */
143
147
  onSubmit?: (payload: EmbeddedFlowExecuteRequestPayload) => Promise<EmbeddedFlowExecuteResponse>;
144
- /**
145
- * Size variant for the component.
146
- */
147
- size?: 'small' | 'medium' | 'large';
148
- /**
149
- * Theme variant for the component.
150
- */
151
- variant?: CardProps['variant'];
152
148
  /**
153
149
  * Whether to redirect after sign-up.
154
150
  */
155
151
  shouldRedirectAfterSignUp?: boolean;
156
152
  /**
157
- * Render props function for custom UI
153
+ * Whether to show the logo.
158
154
  */
159
- children?: (props: BaseSignUpRenderProps) => ReactNode;
155
+ showLogo?: boolean;
156
+ /**
157
+ * Whether to show the subtitle.
158
+ */
159
+ showSubtitle?: boolean;
160
160
  /**
161
161
  * Whether to show the title.
162
162
  */
163
163
  showTitle?: boolean;
164
164
  /**
165
- * Whether to show the subtitle.
165
+ * Size variant for the component.
166
166
  */
167
- showSubtitle?: boolean;
167
+ size?: 'small' | 'medium' | 'large';
168
168
  /**
169
- * Whether to show the logo.
169
+ * Theme variant for the component.
170
170
  */
171
- showLogo?: boolean;
171
+ variant?: CardProps['variant'];
172
172
  }
173
173
  /**
174
174
  * BaseSignUp component that provides embedded sign-up flow for AsgardeoV2.
@@ -15,21 +15,21 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { HTMLAttributes, ReactNode, RefAttributes, ForwardRefExoticComponent } from 'react';
18
+ import { HTMLAttributes, ReactNode, RefAttributes, ForwardRefExoticComponent, FC } from 'react';
19
19
  export type AlertVariant = 'success' | 'error' | 'warning' | 'info';
20
20
  export interface AlertProps extends HTMLAttributes<HTMLDivElement> {
21
21
  /**
22
- * The visual variant of the alert that determines color scheme and icon
22
+ * Alert content
23
23
  */
24
- variant?: AlertVariant;
24
+ children?: ReactNode;
25
25
  /**
26
26
  * Whether to show the default icon for the variant
27
27
  */
28
28
  showIcon?: boolean;
29
29
  /**
30
- * Alert content
30
+ * The visual variant of the alert that determines color scheme and icon
31
31
  */
32
- children?: ReactNode;
32
+ variant?: AlertVariant;
33
33
  }
34
34
  export interface AlertTitleProps extends HTMLAttributes<HTMLHeadingElement> {
35
35
  /**
@@ -61,14 +61,14 @@ declare const Alert: ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDi
61
61
  /**
62
62
  * Alert title component.
63
63
  */
64
- declare const AlertTitle: ForwardRefExoticComponent<AlertTitleProps & RefAttributes<HTMLHeadingElement>>;
64
+ declare const AlertTitle: FC<AlertTitleProps>;
65
65
  /**
66
66
  * Alert description component.
67
67
  */
68
- declare const AlertDescription: ForwardRefExoticComponent<AlertDescriptionProps & RefAttributes<HTMLParagraphElement>>;
68
+ declare const AlertDescription: FC<AlertDescriptionProps>;
69
69
  export interface AlertComponent extends ForwardRefExoticComponent<AlertProps & RefAttributes<HTMLDivElement>> {
70
- Title: typeof AlertTitle;
71
70
  Description: typeof AlertDescription;
71
+ Title: typeof AlertTitle;
72
72
  }
73
73
  declare const _default: AlertComponent;
74
74
  export default _default;
@@ -24,12 +24,5 @@ export type AlertVariant = 'success' | 'error' | 'warning' | 'info';
24
24
  * @param variant - The alert variant
25
25
  * @returns Object containing CSS class names for component styling
26
26
  */
27
- declare const useStyles: (theme: Theme, colorScheme: string, variant: AlertVariant) => {
28
- alert: string;
29
- variant: string;
30
- icon: string;
31
- content: string;
32
- title: string;
33
- description: string;
34
- };
27
+ declare const useStyles: (theme: Theme, colorScheme: string, variant: AlertVariant) => Record<string, string>;
35
28
  export default useStyles;
@@ -37,6 +37,10 @@ export interface AvatarProps {
37
37
  * The URL of the avatar image
38
38
  */
39
39
  imageUrl?: string;
40
+ /**
41
+ * Loading state of the avatar
42
+ */
43
+ isLoading?: boolean;
40
44
  /**
41
45
  * The name to use for generating initials when no image is provided
42
46
  */
@@ -50,10 +54,6 @@ export interface AvatarProps {
50
54
  * @default 'circular'
51
55
  */
52
56
  variant?: 'circular' | 'square';
53
- /**
54
- * Loading state of the avatar
55
- */
56
- isLoading?: boolean;
57
57
  }
58
58
  export declare const Avatar: FC<AvatarProps>;
59
59
  export default Avatar;
@@ -26,11 +26,5 @@ export type AvatarVariant = 'circular' | 'square';
26
26
  * @param backgroundColor - The background color for the avatar
27
27
  * @returns Object containing CSS class names for component styling
28
28
  */
29
- declare const useStyles: (theme: Theme, colorScheme: string, size: number, variant: AvatarVariant, backgroundColor?: string) => {
30
- avatar: string;
31
- variant: string;
32
- image: string;
33
- skeleton: string;
34
- icon: string;
35
- };
29
+ declare const useStyles: (theme: Theme, colorScheme: string, size: number, variant: AvatarVariant, backgroundColor?: string) => Record<string, string>;
36
30
  export default useStyles;
@@ -15,7 +15,7 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { ButtonHTMLAttributes } from 'react';
18
+ import { ButtonHTMLAttributes, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
19
19
  export type ButtonColor = 'primary' | 'secondary' | 'tertiary' | string;
20
20
  export type ButtonVariant = 'solid' | 'outline' | 'text' | 'icon';
21
21
  export type ButtonSize = 'small' | 'medium' | 'large';
@@ -25,13 +25,9 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
25
25
  */
26
26
  color?: ButtonColor;
27
27
  /**
28
- * The button variant that determines the visual style
29
- */
30
- variant?: ButtonVariant;
31
- /**
32
- * The size of the button
28
+ * Icon to display after the button text
33
29
  */
34
- size?: ButtonSize;
30
+ endIcon?: ReactNode;
35
31
  /**
36
32
  * Whether the button should take the full width of its container
37
33
  */
@@ -41,17 +37,21 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
41
37
  */
42
38
  loading?: boolean;
43
39
  /**
44
- * Icon to display before the button text
40
+ * The shape of the button: square or round
41
+ */
42
+ shape?: 'square' | 'round';
43
+ /**
44
+ * The size of the button
45
45
  */
46
- startIcon?: React.ReactNode;
46
+ size?: ButtonSize;
47
47
  /**
48
- * Icon to display after the button text
48
+ * Icon to display before the button text
49
49
  */
50
- endIcon?: React.ReactNode;
50
+ startIcon?: ReactNode;
51
51
  /**
52
- * The shape of the button: square or round
52
+ * The button variant that determines the visual style
53
53
  */
54
- shape?: 'square' | 'round';
54
+ variant?: ButtonVariant;
55
55
  }
56
56
  /**
57
57
  * Button component with multiple variants and types.
@@ -83,5 +83,5 @@ export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement
83
83
  * </Button>
84
84
  * ```
85
85
  */
86
- declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
86
+ declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
87
87
  export default Button;
@@ -31,17 +31,5 @@ export type ButtonSize = 'small' | 'medium' | 'large';
31
31
  * @param loading - Whether the button is in loading state
32
32
  * @returns Object containing CSS class names for component styling
33
33
  */
34
- declare const useStyles: (theme: Theme, colorScheme: string, color: ButtonColor, variant: ButtonVariant, size: ButtonSize, fullWidth: boolean, disabled: boolean, loading: boolean, shape?: "square" | "round") => {
35
- button: string;
36
- size: string;
37
- variant: string;
38
- fullWidth: string;
39
- loading: string;
40
- shape: string;
41
- spinner: string;
42
- icon: string;
43
- startIcon: string;
44
- endIcon: string;
45
- content: string;
46
- };
34
+ declare const useStyles: (theme: Theme, colorScheme: string, color: ButtonColor, variant: ButtonVariant, size: ButtonSize, fullWidth: boolean, disabled: boolean, loading: boolean, shape?: "square" | "round") => Record<string, string | null>;
47
35
  export default useStyles;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright (c) {{year}}, WSO2 LLC. (https://www.wso2.com).
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
3
  *
4
4
  * WSO2 LLC. licenses this file to you under the Apache License,
5
5
  * Version 2.0 (the "License"); you may not use this file except
@@ -15,7 +15,7 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { HTMLAttributes, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
18
+ import { HTMLAttributes, ReactNode, ForwardRefExoticComponent, RefAttributes, FC } from 'react';
19
19
  export type CardVariant = 'default' | 'outlined' | 'elevated';
20
20
  export interface CardProps extends HTMLAttributes<HTMLDivElement> {
21
21
  /**
@@ -102,11 +102,11 @@ declare const CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttribu
102
102
  /**
103
103
  * Card title component.
104
104
  */
105
- declare const CardTitle: ForwardRefExoticComponent<CardTitleProps & RefAttributes<HTMLHeadingElement>>;
105
+ declare const CardTitle: FC<CardTitleProps>;
106
106
  /**
107
107
  * Card description component.
108
108
  */
109
- declare const CardDescription: ForwardRefExoticComponent<CardDescriptionProps & RefAttributes<HTMLParagraphElement>>;
109
+ declare const CardDescription: FC<CardDescriptionProps>;
110
110
  /**
111
111
  * Card action component for action elements in the header.
112
112
  */
@@ -25,15 +25,5 @@ export type CardVariant = 'default' | 'outlined' | 'elevated';
25
25
  * @param clickable - Whether the card is clickable
26
26
  * @returns Object containing CSS class names for component styling
27
27
  */
28
- declare const useStyles: (theme: Theme, colorScheme: string, variant: CardVariant, clickable: boolean) => {
29
- card: string;
30
- variant: string;
31
- clickable: string;
32
- header: string;
33
- title: string;
34
- description: string;
35
- action: string;
36
- content: string;
37
- footer: string;
38
- };
28
+ declare const useStyles: (theme: Theme, colorScheme: string, variant: CardVariant, clickable: boolean) => Record<string, string>;
39
29
  export default useStyles;
@@ -18,25 +18,25 @@
18
18
  import { FC, InputHTMLAttributes } from 'react';
19
19
  export interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'type'> {
20
20
  /**
21
- * Label text to display next to the checkbox
21
+ * Additional CSS class names
22
22
  */
23
- label?: string;
23
+ className?: string;
24
24
  /**
25
25
  * Error message to display below the checkbox
26
26
  */
27
27
  error?: string;
28
28
  /**
29
- * Additional CSS class names
29
+ * Helper text to display below the checkbox
30
30
  */
31
- className?: string;
31
+ helperText?: string;
32
32
  /**
33
- * Whether the field is required
33
+ * Label text to display next to the checkbox
34
34
  */
35
- required?: boolean;
35
+ label?: string;
36
36
  /**
37
- * Helper text to display below the checkbox
37
+ * Whether the field is required
38
38
  */
39
- helperText?: string;
39
+ required?: boolean;
40
40
  }
41
41
  declare const Checkbox: FC<CheckboxProps>;
42
42
  export default Checkbox;
@@ -24,12 +24,5 @@ import { Theme } from '@asgardeo/browser';
24
24
  * @param required - Whether the checkbox is required
25
25
  * @returns Object containing CSS class names for component styling
26
26
  */
27
- declare const useStyles: (theme: Theme, colorScheme: string, hasError: boolean, required: boolean) => {
28
- container: string;
29
- input: string;
30
- errorInput: string;
31
- label: string;
32
- errorLabel: string;
33
- required: string;
34
- };
27
+ declare const useStyles: (theme: Theme, colorScheme: string, hasError: boolean, required: boolean) => Record<string, string>;
35
28
  export default useStyles;
@@ -17,34 +17,34 @@
17
17
  */
18
18
  import { FC, InputHTMLAttributes } from 'react';
19
19
  export interface DatePickerProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'type'> {
20
- /**
21
- * Label text to display above the input
22
- */
23
- label?: string;
24
- /**
25
- * Error message to display below the input
26
- */
27
- error?: string;
28
20
  /**
29
21
  * Additional CSS class names
30
22
  */
31
23
  className?: string;
32
24
  /**
33
- * Whether the field is required
25
+ * Custom date format for the regex pattern
34
26
  */
35
- required?: boolean;
27
+ dateFormat?: string;
36
28
  /**
37
29
  * Whether the field is disabled
38
30
  */
39
31
  disabled?: boolean;
32
+ /**
33
+ * Error message to display below the input
34
+ */
35
+ error?: string;
40
36
  /**
41
37
  * Helper text to display below the input
42
38
  */
43
39
  helperText?: string;
44
40
  /**
45
- * Custom date format for the regex pattern
41
+ * Label text to display above the input
46
42
  */
47
- dateFormat?: string;
43
+ label?: string;
44
+ /**
45
+ * Whether the field is required
46
+ */
47
+ required?: boolean;
48
48
  }
49
49
  declare const DatePicker: FC<DatePickerProps>;
50
50
  export default DatePicker;
@@ -24,10 +24,5 @@ import { Theme } from '@asgardeo/browser';
24
24
  * @param disabled - Whether the date picker is disabled
25
25
  * @returns Object containing CSS class names for component styling
26
26
  */
27
- declare const useStyles: (theme: Theme, colorScheme: string, hasError: boolean, disabled: boolean) => {
28
- input: string;
29
- errorInput: string;
30
- disabledInput: string;
31
- label: string;
32
- };
27
+ declare const useStyles: (theme: Theme, colorScheme: string, hasError: boolean, disabled: boolean) => Record<string, string>;
33
28
  export default useStyles;
@@ -16,7 +16,7 @@
16
16
  * under the License.
17
17
  */
18
18
  import { UseFloatingReturn, UseInteractionsReturn } from '@floating-ui/react';
19
- import React from 'react';
19
+ import { type ButtonHTMLAttributes, type Dispatch, type FC, type ForwardRefExoticComponent, type HTMLProps, type JSX, type ReactNode, type RefAttributes, type SetStateAction } from 'react';
20
20
  interface DialogOptions {
21
21
  initialOpen?: boolean;
22
22
  onOpenChange?: (open: boolean) => void;
@@ -26,36 +26,36 @@ interface DialogHookReturn extends UseFloatingReturn, UseInteractionsReturn {
26
26
  descriptionId: string | undefined;
27
27
  labelId: string | undefined;
28
28
  open: boolean;
29
- setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
30
- setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
29
+ setDescriptionId: Dispatch<SetStateAction<string | undefined>>;
30
+ setLabelId: Dispatch<SetStateAction<string | undefined>>;
31
31
  setOpen: (open: boolean) => void;
32
32
  }
33
33
  export declare function useDialog({ initialOpen, open: controlledOpen, onOpenChange: setControlledOpen, }?: DialogOptions): DialogHookReturn;
34
34
  export declare const useDialogContext: () => DialogHookReturn;
35
35
  export declare function Dialog({ children, ...options }: {
36
- children: React.ReactNode;
37
- } & DialogOptions): import("react/jsx-runtime").JSX.Element;
36
+ children: ReactNode;
37
+ } & DialogOptions): JSX.Element;
38
38
  interface DialogTriggerProps {
39
39
  asChild?: boolean;
40
- children: React.ReactNode;
40
+ children: ReactNode;
41
41
  }
42
- export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & DialogTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
43
- export declare const DialogContent: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
44
- export declare const DialogHeading: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
45
- export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
42
+ export declare const DialogTrigger: ForwardRefExoticComponent<HTMLProps<HTMLElement> & DialogTriggerProps & RefAttributes<HTMLElement>>;
43
+ export declare const DialogContent: ForwardRefExoticComponent<HTMLProps<HTMLDivElement> & RefAttributes<HTMLDivElement>>;
44
+ export declare const DialogHeading: ForwardRefExoticComponent<HTMLProps<HTMLHeadingElement> & RefAttributes<HTMLHeadingElement>>;
45
+ export declare const DialogDescription: ForwardRefExoticComponent<HTMLProps<HTMLParagraphElement> & RefAttributes<HTMLParagraphElement>>;
46
46
  interface DialogCloseProps {
47
47
  asChild?: boolean;
48
- children?: React.ReactNode;
48
+ children?: ReactNode;
49
49
  }
50
- export declare const DialogClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
51
- export interface DialogComponent extends React.FC<{
52
- children: React.ReactNode;
50
+ export declare const DialogClose: ForwardRefExoticComponent<ButtonHTMLAttributes<HTMLButtonElement> & DialogCloseProps & RefAttributes<HTMLButtonElement>>;
51
+ export interface DialogComponent extends FC<{
52
+ children: ReactNode;
53
53
  } & DialogOptions> {
54
- Trigger: typeof DialogTrigger;
54
+ Close: typeof DialogClose;
55
55
  Content: typeof DialogContent;
56
- Heading: typeof DialogHeading;
57
56
  Description: typeof DialogDescription;
58
- Close: typeof DialogClose;
57
+ Heading: typeof DialogHeading;
58
+ Trigger: typeof DialogTrigger;
59
59
  }
60
60
  declare const _default: DialogComponent;
61
61
  export default _default;
@@ -22,13 +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
- overlay: string;
27
- content: string;
28
- dropdownContent: string;
29
- header: string;
30
- headerTitle: string;
31
- contentBody: string;
32
- description: string;
33
- };
25
+ declare const useStyles: (theme: Theme, colorScheme: string) => Record<string, string>;
34
26
  export default useStyles;
@@ -15,14 +15,14 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC, HTMLAttributes } from 'react';
18
+ import { FC, HTMLAttributes, ReactNode } from 'react';
19
19
  export type DividerOrientation = 'horizontal' | 'vertical';
20
20
  export type DividerVariant = 'solid' | 'dashed' | 'dotted';
21
21
  export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
22
22
  /**
23
23
  * Text to display in the center of the divider
24
24
  */
25
- children?: React.ReactNode;
25
+ children?: ReactNode;
26
26
  /**
27
27
  * Custom color for the divider
28
28
  */
@@ -28,11 +28,5 @@ export type DividerVariant = 'solid' | 'dashed' | 'dotted';
28
28
  * @param hasChildren - Whether the divider has children (text)
29
29
  * @returns Object containing CSS class names for component styling
30
30
  */
31
- declare const useStyles: (theme: Theme, colorScheme: string, orientation: DividerOrientation, variant: DividerVariant, color?: string, hasChildren?: boolean) => {
32
- divider: string;
33
- vertical: string;
34
- horizontal: string;
35
- line: string;
36
- text: string;
37
- };
31
+ declare const useStyles: (theme: Theme, colorScheme: string, orientation: DividerOrientation, variant: DividerVariant, color?: string, hasChildren?: boolean) => Record<string, string>;
38
32
  export default useStyles;
@@ -22,6 +22,10 @@ export interface FormControlProps {
22
22
  * The content to be wrapped by the form control
23
23
  */
24
24
  children: ReactNode;
25
+ /**
26
+ * Additional CSS class names
27
+ */
28
+ className?: string;
25
29
  /**
26
30
  * Error message to display below the content
27
31
  */
@@ -30,10 +34,6 @@ export interface FormControlProps {
30
34
  * Helper text to display below the content
31
35
  */
32
36
  helperText?: string;
33
- /**
34
- * Additional CSS class names
35
- */
36
- className?: string;
37
37
  /**
38
38
  * Custom alignment for helper text (default: left, center for OTP)
39
39
  */
@@ -26,9 +26,5 @@ export type FormControlHelperTextAlign = 'left' | 'center';
26
26
  * @param hasError - Whether the form control has an error
27
27
  * @returns Object containing CSS class names for component styling
28
28
  */
29
- declare const useStyles: (theme: Theme, colorScheme: string, helperTextAlign: FormControlHelperTextAlign, helperTextMarginLeft?: string, hasError?: boolean) => {
30
- formControl: string;
31
- helperText: string;
32
- helperTextError: string;
33
- };
29
+ declare const useStyles: (theme: Theme, colorScheme: string, helperTextAlign: FormControlHelperTextAlign, helperTextMarginLeft?: string, hasError?: boolean) => Record<string, string>;
34
30
  export default useStyles;