@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,29 +23,29 @@ export interface InputLabelProps extends Omit<LabelHTMLAttributes<HTMLLabelEleme
23
23
  */
24
24
  children: ReactNode;
25
25
  /**
26
- * Whether the field is required
26
+ * Additional CSS class names
27
27
  */
28
- required?: boolean;
28
+ className?: string;
29
29
  /**
30
30
  * Whether there's an error state
31
31
  */
32
32
  error?: boolean;
33
33
  /**
34
- * Custom style overrides
34
+ * Custom margin bottom (useful for different form layouts)
35
35
  */
36
- style?: CSSProperties;
36
+ marginBottom?: string;
37
37
  /**
38
- * Display type for label positioning
38
+ * Whether the field is required
39
39
  */
40
- variant?: InputLabelVariant;
40
+ required?: boolean;
41
41
  /**
42
- * Custom margin bottom (useful for different form layouts)
42
+ * Custom style overrides
43
43
  */
44
- marginBottom?: string;
44
+ style?: CSSProperties;
45
45
  /**
46
- * Additional CSS class names
46
+ * Display type for label positioning
47
47
  */
48
- className?: string;
48
+ variant?: InputLabelVariant;
49
49
  }
50
50
  declare const InputLabel: FC<InputLabelProps>;
51
51
  export default InputLabel;
@@ -26,11 +26,5 @@ export type InputLabelVariant = 'block' | 'inline';
26
26
  * @param marginBottom - Custom margin bottom value
27
27
  * @returns Object containing CSS class names for component styling
28
28
  */
29
- declare const useStyles: (theme: Theme, colorScheme: string, variant: InputLabelVariant, error: boolean, marginBottom?: string) => {
30
- label: string;
31
- error: string;
32
- requiredIndicator: string;
33
- block: string;
34
- inline: string;
35
- };
29
+ declare const useStyles: (theme: Theme, colorScheme: string, variant: InputLabelVariant, error: boolean, marginBottom?: string) => Record<string, string>;
36
30
  export default useStyles;
@@ -53,14 +53,14 @@ export interface KeyValueInputProps {
53
53
  * Maximum number of key-value pairs allowed.
54
54
  */
55
55
  maxPairs?: number;
56
- /**
57
- * Callback fired when the key-value pairs change.
58
- */
59
- onChange?: (pairs: KeyValuePair[]) => void;
60
56
  /**
61
57
  * Callback fired when a pair is added.
62
58
  */
63
59
  onAdd?: (pair: KeyValuePair) => void;
60
+ /**
61
+ * Callback fired when the key-value pairs change.
62
+ */
63
+ onChange?: (pairs: KeyValuePair[]) => void;
64
64
  /**
65
65
  * Callback fired when a pair is removed.
66
66
  */
@@ -25,21 +25,5 @@ import { Theme } from '@asgardeo/browser';
25
25
  * @param hasError - Whether the component has an error
26
26
  * @returns Object containing CSS class names for component styling
27
27
  */
28
- declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, readOnly: boolean, hasError: boolean) => {
29
- container: string;
30
- label: string;
31
- requiredIndicator: string;
32
- pairsList: string;
33
- pairRow: string;
34
- pairInput: string;
35
- addRow: string;
36
- removeButton: string;
37
- addButton: string;
38
- helperText: string;
39
- emptyState: string;
40
- readOnlyPair: string;
41
- readOnlyKey: string;
42
- readOnlyValue: string;
43
- counterText: string;
44
- };
28
+ declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, readOnly: boolean, hasError: boolean) => Record<string, string>;
45
29
  export default useStyles;
@@ -21,26 +21,26 @@ export type LogoSize = 'small' | 'medium' | 'large';
21
21
  * Props for the Logo component.
22
22
  */
23
23
  export interface LogoProps {
24
+ /**
25
+ * Custom alt text for the logo.
26
+ */
27
+ alt?: string;
24
28
  /**
25
29
  * Custom CSS class name for the logo.
26
30
  */
27
31
  className?: string;
28
32
  /**
29
- * Custom logo URL to override theme logo.
33
+ * Size of the logo.
30
34
  */
31
- src?: string;
35
+ size?: LogoSize;
32
36
  /**
33
- * Custom alt text for the logo.
37
+ * Custom logo URL to override theme logo.
34
38
  */
35
- alt?: string;
39
+ src?: string;
36
40
  /**
37
41
  * Custom title for the logo.
38
42
  */
39
43
  title?: string;
40
- /**
41
- * Size of the logo.
42
- */
43
- size?: LogoSize;
44
44
  }
45
45
  /**
46
46
  * Logo component that displays the brand logo from theme or custom source.
@@ -24,11 +24,5 @@ export type LogoSize = 'small' | 'medium' | 'large';
24
24
  * @param size - The size of the logo
25
25
  * @returns Object containing CSS class names for component styling
26
26
  */
27
- declare const useStyles: (theme: Theme, colorScheme: string, size: LogoSize) => {
28
- logo: string;
29
- size: string;
30
- small: string;
31
- medium: string;
32
- large: string;
33
- };
27
+ declare const useStyles: (theme: Theme, colorScheme: string, size: LogoSize) => Record<string, string>;
34
28
  export default useStyles;
@@ -20,69 +20,69 @@ export type MultiInputType = 'text' | 'email' | 'tel' | 'url' | 'password' | 'da
20
20
  export type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';
21
21
  export interface MultiInputProps {
22
22
  /**
23
- * Label text to display above the inputs
23
+ * Additional CSS class names
24
24
  */
25
- label?: string;
25
+ className?: string;
26
26
  /**
27
- * Error message to display below the inputs
27
+ * Whether the field is disabled
28
28
  */
29
- error?: string;
29
+ disabled?: boolean;
30
30
  /**
31
- * Additional CSS class names
31
+ * Icon to display at the end (right) of each input (in addition to add/remove buttons)
32
32
  */
33
- className?: string;
33
+ endIcon?: ReactNode;
34
34
  /**
35
- * Whether the field is required
35
+ * Error message to display below the inputs
36
36
  */
37
- required?: boolean;
37
+ error?: string;
38
38
  /**
39
- * Whether the field is disabled
39
+ * Field type for different input components
40
40
  */
41
- disabled?: boolean;
41
+ fieldType?: MultiInputFieldType;
42
42
  /**
43
43
  * Helper text to display below the inputs
44
44
  */
45
45
  helperText?: string;
46
46
  /**
47
- * Placeholder text for input fields
47
+ * Label text to display above the inputs
48
48
  */
49
- placeholder?: string;
49
+ label?: string;
50
50
  /**
51
- * Array of values
51
+ * Maximum number of fields to allow (default: unlimited)
52
52
  */
53
- values: string[];
53
+ maxFields?: number;
54
+ /**
55
+ * Minimum number of fields to show (default: 1)
56
+ */
57
+ minFields?: number;
54
58
  /**
55
59
  * Callback when values change
56
60
  */
57
61
  onChange: (values: string[]) => void;
58
62
  /**
59
- * Input type
63
+ * Placeholder text for input fields
60
64
  */
61
- type?: MultiInputType;
65
+ placeholder?: string;
62
66
  /**
63
- * Field type for different input components
67
+ * Whether the field is required
64
68
  */
65
- fieldType?: MultiInputFieldType;
69
+ required?: boolean;
66
70
  /**
67
71
  * Icon to display at the start (left) of each input
68
72
  */
69
73
  startIcon?: ReactNode;
70
74
  /**
71
- * Icon to display at the end (right) of each input (in addition to add/remove buttons)
72
- */
73
- endIcon?: ReactNode;
74
- /**
75
- * Minimum number of fields to show (default: 1)
75
+ * Custom style object
76
76
  */
77
- minFields?: number;
77
+ style?: CSSProperties;
78
78
  /**
79
- * Maximum number of fields to allow (default: unlimited)
79
+ * Input type
80
80
  */
81
- maxFields?: number;
81
+ type?: MultiInputType;
82
82
  /**
83
- * Custom style object
83
+ * Array of values
84
84
  */
85
- style?: CSSProperties;
85
+ values: string[];
86
86
  }
87
87
  declare const MultiInput: FC<MultiInputProps>;
88
88
  export default MultiInput;
@@ -28,15 +28,5 @@ export type MultiInputFieldType = 'STRING' | 'DATE_TIME' | 'BOOLEAN';
28
28
  * @param canRemove - Whether items can be removed
29
29
  * @returns Object containing CSS class names for component styling
30
30
  */
31
- declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean, canAddMore: boolean, canRemove: boolean) => {
32
- container: string;
33
- inputRow: string;
34
- inputWrapper: string;
35
- plusIcon: string;
36
- listContainer: string;
37
- listItem: string;
38
- listItemText: string;
39
- removeButton: string;
40
- icon: string;
41
- };
31
+ declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean, canAddMore: boolean, canRemove: boolean) => Record<string, string>;
42
32
  export default useStyles;
@@ -19,37 +19,33 @@ import { FC, CSSProperties } from 'react';
19
19
  export type OtpFieldType = 'text' | 'number' | 'password';
20
20
  export interface OtpInputProps {
21
21
  /**
22
- * Label text to display above the OTP input
23
- */
24
- label?: string;
25
- /**
26
- * Error message to display below the OTP input
22
+ * Auto focus the first input on mount
27
23
  */
28
- error?: string;
24
+ autoFocus?: boolean;
29
25
  /**
30
26
  * Additional CSS class names
31
27
  */
32
28
  className?: string;
33
- /**
34
- * Whether the field is required
35
- */
36
- required?: boolean;
37
29
  /**
38
30
  * Whether the field is disabled
39
31
  */
40
32
  disabled?: boolean;
33
+ /**
34
+ * Error message to display below the OTP input
35
+ */
36
+ error?: string;
41
37
  /**
42
38
  * Helper text to display below the OTP input
43
39
  */
44
40
  helperText?: string;
45
41
  /**
46
- * Number of OTP input fields
42
+ * Label text to display above the OTP input
47
43
  */
48
- length?: number;
44
+ label?: string;
49
45
  /**
50
- * Current OTP value
46
+ * Number of OTP input fields
51
47
  */
52
- value?: string;
48
+ length?: number;
53
49
  /**
54
50
  * Callback function called when OTP value changes
55
51
  */
@@ -63,25 +59,29 @@ export interface OtpInputProps {
63
59
  */
64
60
  onComplete?: (value: string) => void;
65
61
  /**
66
- * Type of input (text, number, password)
62
+ * Pattern for numeric input validation
67
63
  */
68
- type?: OtpFieldType;
64
+ pattern?: string;
69
65
  /**
70
66
  * Placeholder character for each input field
71
67
  */
72
68
  placeholder?: string;
69
+ /**
70
+ * Whether the field is required
71
+ */
72
+ required?: boolean;
73
73
  /**
74
74
  * Custom container style
75
75
  */
76
76
  style?: CSSProperties;
77
77
  /**
78
- * Auto focus the first input on mount
78
+ * Type of input (text, number, password)
79
79
  */
80
- autoFocus?: boolean;
80
+ type?: OtpFieldType;
81
81
  /**
82
- * Pattern for numeric input validation
82
+ * Current OTP value
83
83
  */
84
- pattern?: string;
84
+ value?: string;
85
85
  }
86
86
  declare const OtpField: FC<OtpInputProps>;
87
87
  export default OtpField;
@@ -26,10 +26,5 @@ export type OtpFieldType = 'text' | 'number' | 'password';
26
26
  * @param length - Number of OTP input fields
27
27
  * @returns Object containing CSS class names for component styling
28
28
  */
29
- declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean, length: number) => {
30
- inputContainer: string;
31
- input: string;
32
- inputError: string;
33
- inputDisabled: string;
34
- };
29
+ declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean, length: number) => Record<string, string>;
35
30
  export default useStyles;
@@ -25,9 +25,5 @@ import { Theme } from '@asgardeo/browser';
25
25
  * @param hasError - Whether the component has an error
26
26
  * @returns Object containing CSS class names for component styling
27
27
  */
28
- declare const useStyles: (theme: Theme, colorScheme: string, showPassword: boolean, disabled: boolean, hasError: boolean) => {
29
- toggleIcon: string;
30
- visibleIcon: string;
31
- hiddenIcon: string;
32
- };
28
+ declare const useStyles: (theme: Theme, colorScheme: string, showPassword: boolean, disabled: boolean, hasError: boolean) => Record<string, string>;
33
29
  export default useStyles;
@@ -17,48 +17,48 @@
17
17
  */
18
18
  import { FC, SelectHTMLAttributes } from 'react';
19
19
  export interface SelectOption {
20
- /**
21
- * The value that will be submitted with the form
22
- */
23
- value: string;
24
20
  /**
25
21
  * The text that will be displayed in the select
26
22
  */
27
23
  label: string;
28
- }
29
- export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'className'> {
30
- /**
31
- * Label text to display above the select
32
- */
33
- label?: string;
34
24
  /**
35
- * Error message to display below the select
25
+ * The value that will be submitted with the form
36
26
  */
37
- error?: string;
27
+ value: string;
28
+ }
29
+ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement>, 'className'> {
38
30
  /**
39
31
  * Additional CSS class names
40
32
  */
41
33
  className?: string;
42
- /**
43
- * Whether the field is required
44
- */
45
- required?: boolean;
46
34
  /**
47
35
  * Whether the field is disabled
48
36
  */
49
37
  disabled?: boolean;
38
+ /**
39
+ * Error message to display below the select
40
+ */
41
+ error?: string;
50
42
  /**
51
43
  * Helper text to display below the select
52
44
  */
53
45
  helperText?: string;
54
46
  /**
55
- * Placeholder text for the default/empty option
47
+ * Label text to display above the select
56
48
  */
57
- placeholder?: string;
49
+ label?: string;
58
50
  /**
59
51
  * The options to display in the select
60
52
  */
61
53
  options: SelectOption[];
54
+ /**
55
+ * Placeholder text for the default/empty option
56
+ */
57
+ placeholder?: string;
58
+ /**
59
+ * Whether the field is required
60
+ */
61
+ required?: boolean;
62
62
  }
63
63
  declare const Select: FC<SelectProps>;
64
64
  export default Select;
@@ -24,10 +24,5 @@ import { Theme } from '@asgardeo/browser';
24
24
  * @param hasError - Whether the component has an error
25
25
  * @returns Object containing CSS class names for component styling
26
26
  */
27
- declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean) => {
28
- select: string;
29
- selectError: string;
30
- selectDisabled: string;
31
- option: string;
32
- };
27
+ declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean) => Record<string, string>;
33
28
  export default useStyles;
@@ -19,17 +19,17 @@ import { FC, CSSProperties } from 'react';
19
19
  export type SpinnerSize = 'small' | 'medium' | 'large';
20
20
  export interface SpinnerProps {
21
21
  /**
22
- * Size of the spinner
22
+ * Additional CSS class names
23
23
  */
24
- size?: SpinnerSize;
24
+ className?: string;
25
25
  /**
26
26
  * Custom color for the spinner
27
27
  */
28
28
  color?: string;
29
29
  /**
30
- * Additional CSS class names
30
+ * Size of the spinner
31
31
  */
32
- className?: string;
32
+ size?: SpinnerSize;
33
33
  /**
34
34
  * Custom styles
35
35
  */
@@ -25,10 +25,5 @@ export type SpinnerSize = 'small' | 'medium' | 'large';
25
25
  * @param color - The color of the spinner
26
26
  * @returns Object containing CSS class names for component styling
27
27
  */
28
- declare const useStyles: (theme: Theme, colorScheme: string, size: SpinnerSize, color?: string) => {
29
- spinner: string;
30
- spinnerSmall: string;
31
- spinnerMedium: string;
32
- spinnerLarge: string;
33
- };
28
+ declare const useStyles: (theme: Theme, colorScheme: string, size: SpinnerSize, color?: string) => Record<string, string>;
34
29
  export default useStyles;
@@ -17,46 +17,46 @@
17
17
  */
18
18
  import { FC, InputHTMLAttributes, ReactNode } from 'react';
19
19
  export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className'> {
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
- /**
33
- * Whether the field is required
34
- */
35
- required?: boolean;
36
24
  /**
37
25
  * Whether the field is disabled
38
26
  */
39
27
  disabled?: boolean;
28
+ /**
29
+ * Icon to display at the end (right) of the input
30
+ */
31
+ endIcon?: ReactNode;
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
- * Icon to display at the start (left) of the input
41
+ * Label text to display above the input
46
42
  */
47
- startIcon?: ReactNode;
43
+ label?: string;
48
44
  /**
49
- * Icon to display at the end (right) of the input
45
+ * Click handler for the end icon
50
46
  */
51
- endIcon?: ReactNode;
47
+ onEndIconClick?: () => void;
52
48
  /**
53
49
  * Click handler for the start icon
54
50
  */
55
51
  onStartIconClick?: () => void;
56
52
  /**
57
- * Click handler for the end icon
53
+ * Whether the field is required
58
54
  */
59
- onEndIconClick?: () => void;
55
+ required?: boolean;
56
+ /**
57
+ * Icon to display at the start (left) of the input
58
+ */
59
+ startIcon?: ReactNode;
60
60
  }
61
61
  declare const TextField: FC<TextFieldProps>;
62
62
  export default TextField;
@@ -26,13 +26,5 @@ import { Theme } from '@asgardeo/browser';
26
26
  * @param hasEndIcon - Whether the component has an end icon
27
27
  * @returns Object containing CSS class names for component styling
28
28
  */
29
- declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean, hasStartIcon: boolean, hasEndIcon: boolean) => {
30
- inputContainer: string;
31
- input: string;
32
- inputError: string;
33
- inputDisabled: string;
34
- icon: string;
35
- startIcon: string;
36
- endIcon: string;
37
- };
29
+ declare const useStyles: (theme: Theme, colorScheme: string, disabled: boolean, hasError: boolean, hasStartIcon: boolean, hasEndIcon: boolean) => Record<string, string>;
38
30
  export default useStyles;
@@ -19,57 +19,57 @@ import { CSSProperties, FC, ReactNode, ElementType } from 'react';
19
19
  import { TypographyVariant, TypographyAlign, TypographyColor } from './Typography.styles';
20
20
  export interface TypographyProps {
21
21
  /**
22
- * The content to be rendered
23
- */
24
- children: ReactNode;
25
- /**
26
- * The typography variant to apply
22
+ * Text alignment
27
23
  */
28
- variant?: TypographyVariant;
24
+ align?: TypographyAlign;
29
25
  /**
30
- * The HTML element or React component to render
26
+ * The content to be rendered
31
27
  */
32
- component?: ElementType;
28
+ children: ReactNode;
33
29
  /**
34
- * Text alignment
30
+ * Additional CSS class names
35
31
  */
36
- align?: TypographyAlign;
32
+ className?: string;
37
33
  /**
38
34
  * Color variant
39
35
  */
40
36
  color?: TypographyColor;
41
37
  /**
42
- * Whether the text should be clipped with ellipsis when it overflows
38
+ * The HTML element or React component to render
43
39
  */
44
- noWrap?: boolean;
40
+ component?: ElementType;
45
41
  /**
46
- * Additional CSS class names
42
+ * Custom font size (overrides variant sizing)
47
43
  */
48
- className?: string;
44
+ fontSize?: string | number;
49
45
  /**
50
- * Custom styles
46
+ * Custom font weight
51
47
  */
52
- style?: CSSProperties;
48
+ fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold' | number;
49
+ /**
50
+ * Whether to disable gutters (margin bottom)
51
+ */
52
+ gutterBottom?: boolean;
53
53
  /**
54
54
  * Whether the text should be displayed inline
55
55
  */
56
56
  inline?: boolean;
57
57
  /**
58
- * Custom font weight
58
+ * Line height
59
59
  */
60
- fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold' | number;
60
+ lineHeight?: string | number;
61
61
  /**
62
- * Custom font size (overrides variant sizing)
62
+ * Whether the text should be clipped with ellipsis when it overflows
63
63
  */
64
- fontSize?: string | number;
64
+ noWrap?: boolean;
65
65
  /**
66
- * Line height
66
+ * Custom styles
67
67
  */
68
- lineHeight?: string | number;
68
+ style?: CSSProperties;
69
69
  /**
70
- * Whether to disable gutters (margin bottom)
70
+ * The typography variant to apply
71
71
  */
72
- gutterBottom?: boolean;
72
+ variant?: TypographyVariant;
73
73
  }
74
74
  /**
75
75
  * Typography component for consistent text rendering throughout the application.