@asgardeo/react 0.3.0 → 0.5.0

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 (131) hide show
  1. package/README.md +5 -1
  2. package/dist/AsgardeoReactClient.d.ts +12 -4
  3. package/dist/__temp__/api.d.ts +26 -21
  4. package/dist/__temp__/models.d.ts +14 -22
  5. package/dist/api/scim2/createOrganization.d.ts +74 -0
  6. package/dist/api/scim2/getAllOrganizations.d.ts +56 -0
  7. package/dist/api/scim2/getMeOrganizations.d.ts +52 -0
  8. package/dist/api/scim2/getOrganization.d.ts +61 -0
  9. package/dist/api/scim2/updateOrganization.d.ts +74 -0
  10. package/dist/cjs/index.js +9863 -1190
  11. package/dist/cjs/index.js.map +4 -4
  12. package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +7 -6
  13. package/dist/components/actions/SignInButton/SignInButton.d.ts +21 -2
  14. package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +7 -6
  15. package/dist/components/actions/SignOutButton/SignOutButton.d.ts +22 -1
  16. package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +6 -5
  17. package/dist/components/actions/SignUpButton/SignUpButton.d.ts +21 -0
  18. package/dist/components/control/AsgardeoLoading.d.ts +45 -0
  19. package/dist/components/factories/FieldFactory.d.ts +107 -0
  20. package/dist/components/presentation/CreateOrganization/BaseCreateOrganization.d.ts +53 -0
  21. package/dist/components/presentation/CreateOrganization/CreateOrganization.d.ts +67 -0
  22. package/dist/components/presentation/Organization/BaseOrganization.d.ts +66 -0
  23. package/dist/components/presentation/Organization/Organization.d.ts +66 -0
  24. package/dist/components/presentation/OrganizationList/BaseOrganizationList.d.ts +117 -0
  25. package/dist/components/presentation/OrganizationList/OrganizationList.d.ts +93 -0
  26. package/dist/components/presentation/OrganizationProfile/BaseOrganizationProfile.d.ts +153 -0
  27. package/dist/components/presentation/OrganizationProfile/OrganizationProfile.d.ts +119 -0
  28. package/dist/components/presentation/OrganizationSwitcher/BaseOrganizationSwitcher.d.ts +141 -0
  29. package/dist/components/presentation/OrganizationSwitcher/OrganizationSwitcher.d.ts +70 -0
  30. package/dist/components/presentation/SignIn/BaseSignIn.d.ts +114 -0
  31. package/dist/components/presentation/SignIn/SignIn.d.ts +63 -0
  32. package/dist/components/presentation/SignIn/options/EmailOtp.d.ts +25 -0
  33. package/dist/components/presentation/SignIn/options/FacebookButton.d.ts +25 -0
  34. package/dist/components/presentation/SignIn/options/GitHubButton.d.ts +25 -0
  35. package/dist/components/presentation/SignIn/options/GoogleButton.d.ts +25 -0
  36. package/dist/components/presentation/SignIn/options/IdentifierFirst.d.ts +25 -0
  37. package/dist/components/presentation/SignIn/options/LinkedInButton.d.ts +25 -0
  38. package/dist/components/presentation/SignIn/options/MicrosoftButton.d.ts +25 -0
  39. package/dist/components/presentation/SignIn/options/MultiOptionButton.d.ts +26 -0
  40. package/dist/components/presentation/SignIn/options/SignInOptionFactory.d.ts +76 -0
  41. package/dist/components/presentation/SignIn/options/SignInWithEthereumButton.d.ts +25 -0
  42. package/dist/components/presentation/SignIn/options/SmsOtp.d.ts +25 -0
  43. package/dist/components/presentation/SignIn/options/SocialButton.d.ts +25 -0
  44. package/dist/components/presentation/SignIn/options/Totp.d.ts +25 -0
  45. package/dist/components/presentation/SignIn/options/UsernamePassword.d.ts +25 -0
  46. package/dist/components/presentation/SignIn/types.d.ts +124 -0
  47. package/dist/components/presentation/SignUp/BaseSignUp.d.ts +126 -0
  48. package/dist/components/presentation/SignUp/SignUp.d.ts +55 -0
  49. package/dist/components/presentation/SignUp/options/CheckboxInput.d.ts +24 -0
  50. package/dist/components/presentation/SignUp/options/DateInput.d.ts +24 -0
  51. package/dist/components/presentation/SignUp/options/DividerComponent.d.ts +24 -0
  52. package/dist/components/presentation/SignUp/options/EmailInput.d.ts +24 -0
  53. package/dist/components/presentation/SignUp/options/FormContainer.d.ts +24 -0
  54. package/dist/components/presentation/SignUp/options/GoogleButton.d.ts +25 -0
  55. package/dist/components/presentation/SignUp/options/ImageComponent.d.ts +24 -0
  56. package/dist/components/presentation/SignUp/options/NumberInput.d.ts +24 -0
  57. package/dist/components/presentation/SignUp/options/PasswordInput.d.ts +24 -0
  58. package/dist/components/presentation/SignUp/options/SignUpOptionFactory.d.ts +100 -0
  59. package/dist/components/presentation/SignUp/options/SocialButton.d.ts +24 -0
  60. package/dist/components/presentation/SignUp/options/SubmitButton.d.ts +24 -0
  61. package/dist/components/presentation/SignUp/options/TelephoneInput.d.ts +24 -0
  62. package/dist/components/presentation/SignUp/options/TextInput.d.ts +24 -0
  63. package/dist/components/presentation/SignUp/options/Typography.d.ts +24 -0
  64. package/dist/components/presentation/SignUp/options/index.d.ts +26 -0
  65. package/dist/components/presentation/User/BaseUser.d.ts +66 -0
  66. package/dist/components/presentation/{User.d.ts → User/User.d.ts} +9 -4
  67. package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +34 -22
  68. package/dist/components/presentation/UserDropdown/UserDropdown.d.ts +60 -4
  69. package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +34 -11
  70. package/dist/components/presentation/UserProfile/UserProfile.d.ts +1 -1
  71. package/dist/components/primitives/Alert/Alert.d.ts +74 -0
  72. package/dist/components/primitives/Avatar/Avatar.d.ts +21 -8
  73. package/dist/components/primitives/Button/Button.d.ts +83 -0
  74. package/dist/components/primitives/Card/Card.d.ts +132 -0
  75. package/dist/components/primitives/Checkbox/Checkbox.d.ts +1 -1
  76. package/dist/components/primitives/DatePicker/DatePicker.d.ts +1 -1
  77. package/dist/components/primitives/Divider/Divider.d.ts +58 -0
  78. package/dist/components/primitives/FormControl/FormControl.d.ts +50 -0
  79. package/dist/components/primitives/Icons/Building.d.ts +40 -0
  80. package/dist/components/primitives/Icons/BuildingAlt.d.ts +40 -0
  81. package/dist/components/primitives/Icons/Check.d.ts +40 -0
  82. package/dist/components/primitives/Icons/ChevronDown.d.ts +40 -0
  83. package/dist/components/primitives/Icons/CircleAlert.d.ts +23 -0
  84. package/dist/components/primitives/Icons/CircleCheck.d.ts +23 -0
  85. package/dist/components/primitives/Icons/Eye.d.ts +23 -0
  86. package/dist/components/primitives/Icons/EyeOff.d.ts +23 -0
  87. package/dist/components/primitives/Icons/Info.d.ts +23 -0
  88. package/dist/components/primitives/Icons/LogOut.d.ts +23 -0
  89. package/dist/components/primitives/Icons/Plus.d.ts +23 -0
  90. package/dist/components/primitives/Icons/Settings.d.ts +0 -0
  91. package/dist/components/primitives/Icons/TriangleAlert.d.ts +23 -0
  92. package/dist/components/primitives/Icons/User.d.ts +23 -0
  93. package/dist/components/primitives/Icons/X.d.ts +23 -0
  94. package/dist/components/primitives/Icons/index.d.ts +27 -0
  95. package/dist/components/primitives/InputLabel/InputLabel.d.ts +46 -0
  96. package/dist/components/primitives/KeyValueInput/KeyValueInput.d.ts +123 -0
  97. package/dist/components/primitives/KeyValueInput/index.d.ts +0 -0
  98. package/dist/components/primitives/OtpField/OtpField.d.ts +86 -0
  99. package/dist/components/primitives/PasswordField/PasswordField.d.ts +31 -0
  100. package/dist/components/primitives/Popover/Popover.d.ts +73 -36
  101. package/dist/components/primitives/Select/Select.d.ts +1 -1
  102. package/dist/components/primitives/Spinner/Spinner.d.ts +54 -0
  103. package/dist/components/primitives/TextField/TextField.d.ts +18 -2
  104. package/dist/components/primitives/Typography/Typography.d.ts +81 -0
  105. package/dist/contexts/{AsgardeoContext.d.ts → Asgardeo/AsgardeoContext.d.ts} +3 -1
  106. package/dist/{providers → contexts/Asgardeo}/AsgardeoProvider.d.ts +1 -1
  107. package/dist/{hooks → contexts/Asgardeo}/useAsgardeo.d.ts +1 -1
  108. package/dist/contexts/Flow/FlowContext.d.ts +73 -0
  109. package/dist/contexts/Flow/FlowProvider.d.ts +46 -0
  110. package/dist/contexts/Flow/useFlow.d.ts +48 -0
  111. package/dist/contexts/I18n/I18nContext.d.ts +42 -0
  112. package/dist/contexts/I18n/I18nProvider.d.ts +31 -0
  113. package/dist/contexts/I18n/useI18n.d.ts +27 -0
  114. package/dist/contexts/Organization/OrganizationContext.d.ts +74 -0
  115. package/dist/contexts/Organization/OrganizationProvider.d.ts +90 -0
  116. package/dist/contexts/Organization/useOrganization.d.ts +104 -0
  117. package/dist/{theme → contexts/Theme}/ThemeProvider.d.ts +2 -1
  118. package/dist/{theme → contexts/Theme}/types.d.ts +38 -9
  119. package/dist/{theme → contexts/Theme}/useTheme.d.ts +2 -1
  120. package/dist/contexts/User/UserContext.d.ts +33 -0
  121. package/dist/contexts/User/UserProvider.d.ts +56 -0
  122. package/dist/contexts/User/useUser.d.ts +94 -0
  123. package/dist/hooks/useForm.d.ts +192 -0
  124. package/dist/hooks/useTranslation.d.ts +52 -0
  125. package/dist/index.d.ts +133 -9
  126. package/dist/index.js +9949 -1203
  127. package/dist/index.js.map +4 -4
  128. package/dist/utils/getMappedUserProfileValue.d.ts +33 -1
  129. package/package.json +6 -5
  130. package/dist/utils/getUserProfile.d.ts +0 -59
  131. /package/dist/{theme → contexts/Theme}/ThemeContext.d.ts +0 -0
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ export { default as CircleAlert } from './CircleAlert';
19
+ export { default as CircleCheck } from './CircleCheck';
20
+ export { default as Eye } from './Eye';
21
+ export { default as EyeOff } from './EyeOff';
22
+ export { default as Info } from './Info';
23
+ export { default as LogOut } from './LogOut';
24
+ export { default as Plus } from './Plus';
25
+ export { default as TriangleAlert } from './TriangleAlert';
26
+ export { default as User } from './User';
27
+ export { default as X } from './X';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { CSSProperties, FC, LabelHTMLAttributes, ReactNode } from 'react';
19
+ export interface InputLabelProps extends Omit<LabelHTMLAttributes<HTMLLabelElement>, 'style'> {
20
+ /**
21
+ * Label text or content
22
+ */
23
+ children: ReactNode;
24
+ /**
25
+ * Whether the field is required
26
+ */
27
+ required?: boolean;
28
+ /**
29
+ * Whether there's an error state
30
+ */
31
+ error?: boolean;
32
+ /**
33
+ * Custom style overrides
34
+ */
35
+ style?: CSSProperties;
36
+ /**
37
+ * Display type for label positioning
38
+ */
39
+ variant?: 'block' | 'inline';
40
+ /**
41
+ * Custom margin bottom (useful for different form layouts)
42
+ */
43
+ marginBottom?: string;
44
+ }
45
+ declare const InputLabel: FC<InputLabelProps>;
46
+ export default InputLabel;
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { FC } from 'react';
19
+ export interface KeyValuePair {
20
+ key: string;
21
+ value: string;
22
+ }
23
+ export interface KeyValueInputProps {
24
+ /**
25
+ * CSS class name for styling the component.
26
+ */
27
+ className?: string;
28
+ /**
29
+ * Whether the input is disabled.
30
+ */
31
+ disabled?: boolean;
32
+ /**
33
+ * Error message to display.
34
+ */
35
+ error?: string;
36
+ /**
37
+ * Help text to display below the input.
38
+ */
39
+ helperText?: string;
40
+ /**
41
+ * Label for the key input field.
42
+ */
43
+ keyLabel?: string;
44
+ /**
45
+ * Placeholder text for the key input field.
46
+ */
47
+ keyPlaceholder?: string;
48
+ /**
49
+ * Label for the component.
50
+ */
51
+ label?: string;
52
+ /**
53
+ * Maximum number of key-value pairs allowed.
54
+ */
55
+ maxPairs?: number;
56
+ /**
57
+ * Callback fired when the key-value pairs change.
58
+ */
59
+ onChange?: (pairs: KeyValuePair[]) => void;
60
+ /**
61
+ * Callback fired when a pair is added.
62
+ */
63
+ onAdd?: (pair: KeyValuePair) => void;
64
+ /**
65
+ * Callback fired when a pair is removed.
66
+ */
67
+ onRemove?: (pair: KeyValuePair, index: number) => void;
68
+ /**
69
+ * Whether the component is in read-only mode.
70
+ */
71
+ readOnly?: boolean;
72
+ /**
73
+ * Text for the remove button.
74
+ */
75
+ removeButtonText?: string;
76
+ /**
77
+ * Whether the component is required.
78
+ */
79
+ required?: boolean;
80
+ /**
81
+ * Current key-value pairs.
82
+ */
83
+ value?: Record<string, any> | KeyValuePair[];
84
+ /**
85
+ * Label for the value input field.
86
+ */
87
+ valueLabel?: string;
88
+ /**
89
+ * Placeholder text for the value input field.
90
+ */
91
+ valuePlaceholder?: string;
92
+ }
93
+ /**
94
+ * KeyValueInput component allows users to manage key-value pairs with add/remove functionality.
95
+ * It provides a user-friendly interface for editing organization attributes or similar data structures.
96
+ *
97
+ * @example
98
+ * ```tsx
99
+ * // Basic usage
100
+ * <KeyValueInput
101
+ * label="Organization Attributes"
102
+ * onChange={(pairs) => console.log(pairs)}
103
+ * />
104
+ *
105
+ * // With initial values
106
+ * <KeyValueInput
107
+ * label="Organization Attributes"
108
+ * value={{department: 'IT', location: 'New York'}}
109
+ * onChange={(pairs) => console.log(pairs)}
110
+ * />
111
+ *
112
+ * // With add/remove callbacks
113
+ * <KeyValueInput
114
+ * label="Custom Attributes"
115
+ * value={attributes}
116
+ * onChange={(pairs) => setAttributes(pairs)}
117
+ * onAdd={(pair) => console.log('Added:', pair)}
118
+ * onRemove={(pair, index) => console.log('Removed:', pair, 'at index:', index)}
119
+ * />
120
+ * ```
121
+ */
122
+ declare const KeyValueInput: FC<KeyValueInputProps>;
123
+ export default KeyValueInput;
@@ -0,0 +1,86 @@
1
+ /**
2
+ * Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { CSSProperties, FC } from 'react';
19
+ export interface OtpInputProps {
20
+ /**
21
+ * Label text to display above the OTP input
22
+ */
23
+ label?: string;
24
+ /**
25
+ * Error message to display below the OTP input
26
+ */
27
+ error?: string;
28
+ /**
29
+ * Additional CSS class names
30
+ */
31
+ className?: string;
32
+ /**
33
+ * Whether the field is required
34
+ */
35
+ required?: boolean;
36
+ /**
37
+ * Whether the field is disabled
38
+ */
39
+ disabled?: boolean;
40
+ /**
41
+ * Helper text to display below the OTP input
42
+ */
43
+ helperText?: string;
44
+ /**
45
+ * Number of OTP input fields
46
+ */
47
+ length?: number;
48
+ /**
49
+ * Current OTP value
50
+ */
51
+ value?: string;
52
+ /**
53
+ * Callback function called when OTP value changes
54
+ */
55
+ onChange?: (event: {
56
+ target: {
57
+ value: string;
58
+ };
59
+ }) => void;
60
+ /**
61
+ * Callback function called when OTP input is complete
62
+ */
63
+ onComplete?: (value: string) => void;
64
+ /**
65
+ * Type of input (text, number, password)
66
+ */
67
+ type?: 'text' | 'number' | 'password';
68
+ /**
69
+ * Placeholder character for each input field
70
+ */
71
+ placeholder?: string;
72
+ /**
73
+ * Custom container style
74
+ */
75
+ style?: CSSProperties;
76
+ /**
77
+ * Auto focus the first input on mount
78
+ */
79
+ autoFocus?: boolean;
80
+ /**
81
+ * Pattern for numeric input validation
82
+ */
83
+ pattern?: string;
84
+ }
85
+ declare const OtpField: FC<OtpInputProps>;
86
+ export default OtpField;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { FC } from 'react';
19
+ import { TextFieldProps } from '../TextField/TextField';
20
+ export interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'endIcon' | 'onEndIconClick' | 'onChange'> {
21
+ /**
22
+ * Callback function when the field value changes
23
+ */
24
+ onChange: (value: string) => void;
25
+ }
26
+ /**
27
+ * Password field component with show/hide toggle functionality.
28
+ * This component extends TextField and adds password visibility toggle functionality.
29
+ */
30
+ declare const PasswordField: FC<PasswordFieldProps>;
31
+ export default PasswordField;
@@ -15,45 +15,82 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC, ReactNode } from 'react';
19
- interface PopoverHeaderProps {
20
- children?: ReactNode;
18
+ import { UseFloatingReturn, UseInteractionsReturn } from '@floating-ui/react';
19
+ import React from 'react';
20
+ interface DialogOptions {
21
+ initialOpen?: boolean;
22
+ onOpenChange?: (open: boolean) => void;
23
+ open?: boolean;
21
24
  }
22
- declare const PopoverHeader: FC<PopoverHeaderProps>;
23
- interface PopoverContentProps {
24
- children: ReactNode;
25
+ interface DialogHookReturn extends UseFloatingReturn, UseInteractionsReturn {
26
+ descriptionId: string | undefined;
27
+ labelId: string | undefined;
28
+ open: boolean;
29
+ setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
30
+ setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
31
+ setOpen: (open: boolean) => void;
25
32
  }
26
- declare const PopoverContent: FC<PopoverContentProps>;
27
- export interface PopoverProps {
28
- /**
29
- * Whether the popover is open
30
- */
31
- isOpen: boolean;
32
- /**
33
- * The content to display inside the popover
34
- */
35
- children: ReactNode;
36
- /**
37
- * Callback when the popover should close
38
- */
39
- onClose: () => void;
40
- /**
41
- * Optional custom class name for the popover container
42
- */
33
+ export declare function useDialog({ initialOpen, open: controlledOpen, onOpenChange: setControlledOpen, }?: DialogOptions): DialogHookReturn;
34
+ interface PopoverOptions {
35
+ initialOpen?: boolean;
36
+ offset?: number;
37
+ onOpenChange?: (open: boolean) => void;
38
+ open?: boolean;
39
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
40
+ }
41
+ interface PopoverHookReturn extends UseFloatingReturn, UseInteractionsReturn {
42
+ descriptionId: string | undefined;
43
+ labelId: string | undefined;
44
+ open: boolean;
45
+ setDescriptionId: React.Dispatch<React.SetStateAction<string | undefined>>;
46
+ setLabelId: React.Dispatch<React.SetStateAction<string | undefined>>;
47
+ setOpen: (open: boolean) => void;
48
+ }
49
+ export declare function usePopover({ initialOpen, open: controlledOpen, onOpenChange: setControlledOpen, placement, offset: offsetValue, }?: PopoverOptions): PopoverHookReturn;
50
+ export declare const useDialogContext: () => DialogHookReturn;
51
+ export declare const usePopoverContext: () => PopoverHookReturn;
52
+ export declare function Dialog({ children, ...options }: {
53
+ children: React.ReactNode;
54
+ } & DialogOptions): import("react/jsx-runtime").JSX.Element;
55
+ interface DialogTriggerProps {
56
+ asChild?: boolean;
57
+ children: React.ReactNode;
58
+ }
59
+ export declare const DialogTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & DialogTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
60
+ export declare const DialogContent: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
61
+ export declare function Popover({ children, ...options }: {
62
+ children: React.ReactNode;
63
+ } & PopoverOptions): import("react/jsx-runtime").JSX.Element;
64
+ interface PopoverTriggerProps {
65
+ asChild?: boolean;
66
+ children: React.ReactNode;
67
+ }
68
+ export declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLElement> & PopoverTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
69
+ export declare const PopoverContent: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
70
+ export declare const PopoverHeading: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
71
+ export declare const DialogHeading: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
72
+ export declare const PopoverDescription: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
73
+ export declare const DialogDescription: React.ForwardRefExoticComponent<Omit<React.HTMLProps<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
74
+ export declare const PopoverClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
75
+ export declare const DialogClose: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & React.RefAttributes<HTMLButtonElement>>;
76
+ interface LegacyPopoverProps {
77
+ children: React.ReactNode;
43
78
  className?: string;
44
- /**
45
- * The HTML element ID where the portal should be mounted
46
- */
47
- portalId?: string;
48
- /**
49
- * The display mode of the popover
50
- * 'modal' - shows overlay and centers content
51
- * 'dropdown' - no overlay, content positioned relative to trigger
52
- */
79
+ isOpen: boolean;
53
80
  mode?: 'modal' | 'dropdown';
81
+ offset?: number;
82
+ onClose: () => void;
83
+ placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
84
+ trigger?: HTMLElement | null;
54
85
  }
55
- export declare const Popover: FC<PopoverProps> & {
56
- Header: typeof PopoverHeader;
57
- Content: typeof PopoverContent;
86
+ declare const LegacyPopoverHeader: React.FC<{
87
+ children?: React.ReactNode;
88
+ }>;
89
+ declare const LegacyPopoverContent: React.FC<{
90
+ children: React.ReactNode;
91
+ }>;
92
+ export declare const LegacyPopover: React.FC<LegacyPopoverProps> & {
93
+ Content: typeof LegacyPopoverContent;
94
+ Header: typeof LegacyPopoverHeader;
58
95
  };
59
- export default Popover;
96
+ export default LegacyPopover;
@@ -56,5 +56,5 @@ export interface SelectProps extends Omit<SelectHTMLAttributes<HTMLSelectElement
56
56
  */
57
57
  options: SelectOption[];
58
58
  }
59
- export declare const Select: FC<SelectProps>;
59
+ declare const Select: FC<SelectProps>;
60
60
  export default Select;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { FC, CSSProperties } from 'react';
19
+ export type SpinnerSize = 'small' | 'medium' | 'large';
20
+ export interface SpinnerProps {
21
+ /**
22
+ * Size of the spinner
23
+ */
24
+ size?: SpinnerSize;
25
+ /**
26
+ * Custom color for the spinner
27
+ */
28
+ color?: string;
29
+ /**
30
+ * Additional CSS class names
31
+ */
32
+ className?: string;
33
+ /**
34
+ * Custom styles
35
+ */
36
+ style?: CSSProperties;
37
+ }
38
+ /**
39
+ * Spinner component for loading states
40
+ *
41
+ * @example
42
+ * ```tsx
43
+ * // Basic spinner
44
+ * <Spinner />
45
+ *
46
+ * // Large spinner with custom color
47
+ * <Spinner size="large" color="#3b82f6" />
48
+ *
49
+ * // Small spinner
50
+ * <Spinner size="small" />
51
+ * ```
52
+ */
53
+ declare const Spinner: FC<SpinnerProps>;
54
+ export default Spinner;
@@ -15,7 +15,7 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { FC, InputHTMLAttributes } from 'react';
18
+ import { FC, InputHTMLAttributes, ReactNode } from 'react';
19
19
  export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'className'> {
20
20
  /**
21
21
  * Label text to display above the input
@@ -41,6 +41,22 @@ export interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElemen
41
41
  * Helper text to display below the input
42
42
  */
43
43
  helperText?: string;
44
+ /**
45
+ * Icon to display at the start (left) of the input
46
+ */
47
+ startIcon?: ReactNode;
48
+ /**
49
+ * Icon to display at the end (right) of the input
50
+ */
51
+ endIcon?: ReactNode;
52
+ /**
53
+ * Click handler for the start icon
54
+ */
55
+ onStartIconClick?: () => void;
56
+ /**
57
+ * Click handler for the end icon
58
+ */
59
+ onEndIconClick?: () => void;
44
60
  }
45
- export declare const TextField: FC<TextFieldProps>;
61
+ declare const TextField: FC<TextFieldProps>;
46
62
  export default TextField;
@@ -0,0 +1,81 @@
1
+ /**
2
+ * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
3
+ *
4
+ * WSO2 LLC. licenses this file to you under the Apache License,
5
+ * Version 2.0 (the "License"); you may not use this file except
6
+ * in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ import { CSSProperties, FC, ReactNode, ElementType } from 'react';
19
+ export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline' | 'button';
20
+ export type TypographyAlign = 'left' | 'center' | 'right' | 'justify';
21
+ export type TypographyColor = 'primary' | 'secondary' | 'error' | 'success' | 'warning' | 'info' | 'textPrimary' | 'textSecondary' | 'inherit';
22
+ export interface TypographyProps {
23
+ /**
24
+ * The content to be rendered
25
+ */
26
+ children: ReactNode;
27
+ /**
28
+ * The typography variant to apply
29
+ */
30
+ variant?: TypographyVariant;
31
+ /**
32
+ * The HTML element or React component to render
33
+ */
34
+ component?: ElementType;
35
+ /**
36
+ * Text alignment
37
+ */
38
+ align?: TypographyAlign;
39
+ /**
40
+ * Color variant
41
+ */
42
+ color?: TypographyColor;
43
+ /**
44
+ * Whether the text should be clipped with ellipsis when it overflows
45
+ */
46
+ noWrap?: boolean;
47
+ /**
48
+ * Additional CSS class names
49
+ */
50
+ className?: string;
51
+ /**
52
+ * Custom styles
53
+ */
54
+ style?: CSSProperties;
55
+ /**
56
+ * Whether the text should be displayed inline
57
+ */
58
+ inline?: boolean;
59
+ /**
60
+ * Custom font weight
61
+ */
62
+ fontWeight?: 'normal' | 'medium' | 'semibold' | 'bold' | number;
63
+ /**
64
+ * Custom font size (overrides variant sizing)
65
+ */
66
+ fontSize?: string | number;
67
+ /**
68
+ * Line height
69
+ */
70
+ lineHeight?: string | number;
71
+ /**
72
+ * Whether to disable gutters (margin bottom)
73
+ */
74
+ gutterBottom?: boolean;
75
+ }
76
+ /**
77
+ * Typography component for consistent text rendering throughout the application.
78
+ * Integrates with the theme system and provides semantic HTML elements.
79
+ */
80
+ declare const Typography: FC<TypographyProps>;
81
+ export default Typography;
@@ -20,6 +20,9 @@ import { Context } from 'react';
20
20
  * Props interface of {@link AsgardeoContext}
21
21
  */
22
22
  export type AsgardeoContextProps = {
23
+ afterSignInUrl: string;
24
+ baseUrl: string;
25
+ isInitialized: boolean;
23
26
  /**
24
27
  * Flag indicating whether the SDK is working in the background.
25
28
  */
@@ -47,7 +50,6 @@ export type AsgardeoContextProps = {
47
50
  */
48
51
  signUp: any;
49
52
  user: any;
50
- baseUrl: string;
51
53
  };
52
54
  /**
53
55
  * Context object for managing the Authentication flow builder core context.
@@ -16,7 +16,7 @@
16
16
  * under the License.
17
17
  */
18
18
  import { FC, PropsWithChildren } from 'react';
19
- import { AsgardeoReactConfig } from '../models/config';
19
+ import { AsgardeoReactConfig } from '../../models/config';
20
20
  /**
21
21
  * Props interface of {@link AsgardeoProvider}
22
22
  */
@@ -15,6 +15,6 @@
15
15
  * specific language governing permissions and limitations
16
16
  * under the License.
17
17
  */
18
- import { AsgardeoContextProps } from '../contexts/AsgardeoContext';
18
+ import { AsgardeoContextProps } from './AsgardeoContext';
19
19
  declare const useAsgardeo: () => AsgardeoContextProps;
20
20
  export default useAsgardeo;