@asgardeo/react 0.3.0 → 0.4.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.
- package/README.md +5 -1
- package/dist/AsgardeoReactClient.d.ts +3 -2
- package/dist/__temp__/api.d.ts +17 -18
- package/dist/__temp__/models.d.ts +13 -21
- package/dist/cjs/index.js +17252 -1209
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/actions/SignInButton/BaseSignInButton.d.ts +4 -3
- package/dist/components/actions/SignInButton/SignInButton.d.ts +21 -2
- package/dist/components/actions/SignOutButton/BaseSignOutButton.d.ts +4 -3
- package/dist/components/actions/SignOutButton/SignOutButton.d.ts +22 -1
- package/dist/components/actions/SignUpButton/BaseSignUpButton.d.ts +2 -1
- package/dist/components/actions/SignUpButton/SignUpButton.d.ts +21 -0
- package/dist/components/factories/FieldFactory.d.ts +107 -0
- package/dist/components/presentation/SignIn/BaseSignIn.d.ts +125 -0
- package/dist/components/presentation/SignIn/SignIn.d.ts +62 -0
- package/dist/components/presentation/SignIn/options/EmailOtp.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/FacebookButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/GitHubButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/GoogleButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/IdentifierFirst.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/LinkedInButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/MicrosoftButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/MultiOptionButton.d.ts +26 -0
- package/dist/components/presentation/SignIn/options/SignInOptionFactory.d.ts +76 -0
- package/dist/components/presentation/SignIn/options/SignInWithEthereumButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/SmsOtp.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/SocialButton.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/Totp.d.ts +25 -0
- package/dist/components/presentation/SignIn/options/UsernamePassword.d.ts +25 -0
- package/dist/components/presentation/SignIn/types.d.ts +124 -0
- package/dist/components/presentation/User/BaseUser.d.ts +66 -0
- package/dist/components/presentation/{User.d.ts → User/User.d.ts} +9 -4
- package/dist/components/presentation/UserDropdown/BaseUserDropdown.d.ts +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +23 -2
- package/dist/components/primitives/Alert/Alert.d.ts +74 -0
- package/dist/components/primitives/Button/Button.d.ts +83 -0
- package/dist/components/primitives/Card/Card.d.ts +133 -0
- package/dist/components/primitives/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/primitives/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/primitives/Divider/Divider.d.ts +58 -0
- package/dist/components/primitives/FormControl/FormControl.d.ts +50 -0
- package/dist/components/primitives/Icons/CircleAlert.d.ts +23 -0
- package/dist/components/primitives/Icons/CircleCheck.d.ts +23 -0
- package/dist/components/primitives/Icons/Eye.d.ts +23 -0
- package/dist/components/primitives/Icons/EyeOff.d.ts +23 -0
- package/dist/components/primitives/Icons/Info.d.ts +23 -0
- package/dist/components/primitives/Icons/TriangleAlert.d.ts +23 -0
- package/dist/components/primitives/InputLabel/InputLabel.d.ts +46 -0
- package/dist/components/primitives/OtpField/OtpField.d.ts +86 -0
- package/dist/components/primitives/PasswordField/PasswordField.d.ts +31 -0
- package/dist/components/primitives/Popover/Popover.d.ts +71 -34
- package/dist/components/primitives/Select/Select.d.ts +1 -1
- package/dist/components/primitives/Spinner/Spinner.d.ts +54 -0
- package/dist/components/primitives/TextField/TextField.d.ts +18 -2
- package/dist/components/primitives/Typography/Typography.d.ts +81 -0
- package/dist/contexts/{AsgardeoContext.d.ts → Asgardeo/AsgardeoContext.d.ts} +1 -0
- package/dist/{providers → contexts/Asgardeo}/AsgardeoProvider.d.ts +1 -1
- package/dist/{hooks → contexts/Asgardeo}/useAsgardeo.d.ts +1 -1
- package/dist/contexts/Flow/FlowContext.d.ts +73 -0
- package/dist/contexts/Flow/FlowProvider.d.ts +46 -0
- package/dist/contexts/Flow/useFlow.d.ts +48 -0
- package/dist/contexts/I18n/I18nContext.d.ts +42 -0
- package/dist/contexts/I18n/I18nProvider.d.ts +31 -0
- package/dist/contexts/I18n/useI18n.d.ts +27 -0
- package/dist/{theme → contexts/Theme}/ThemeProvider.d.ts +2 -1
- package/dist/{theme → contexts/Theme}/useTheme.d.ts +2 -1
- package/dist/contexts/User/UserContext.d.ts +32 -0
- package/dist/contexts/User/UserProvider.d.ts +55 -0
- package/dist/contexts/User/useUser.d.ts +94 -0
- package/dist/hooks/useForm.d.ts +192 -0
- package/dist/hooks/useTranslation.d.ts +52 -0
- package/dist/index.d.ts +94 -9
- package/dist/index.js +17242 -1113
- package/dist/index.js.map +4 -4
- package/dist/utils/getMappedUserProfileValue.d.ts +33 -1
- package/package.json +6 -5
- package/dist/utils/getUserProfile.d.ts +0 -59
- /package/dist/{theme → contexts/Theme}/ThemeContext.d.ts +0 -0
- /package/dist/{theme → contexts/Theme}/types.d.ts +0 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (import {CSSProperties, HTMLAttributes, forwardRef, useMemo, ReactNode, ForwardRefExoticComponent, Ref} from 'react';
|
|
3
|
+
import useTheme from '../../../theme/useTheme'; 2025, WSO2 LLC. (https://www.wso2.com).
|
|
4
|
+
*
|
|
5
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
6
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
7
|
+
* in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing,
|
|
13
|
+
* software distributed under the License is distributed on an
|
|
14
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
* KIND, either express or implied. See the License for the
|
|
16
|
+
* specific language governing permissions and limitations
|
|
17
|
+
* under the License.
|
|
18
|
+
*/
|
|
19
|
+
import { HTMLAttributes, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
20
|
+
export type CardVariant = 'default' | 'outlined' | 'elevated';
|
|
21
|
+
export interface CardProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
/**
|
|
23
|
+
* The visual variant of the card
|
|
24
|
+
*/
|
|
25
|
+
variant?: CardVariant;
|
|
26
|
+
/**
|
|
27
|
+
* Whether the card should be clickable (shows hover effects)
|
|
28
|
+
*/
|
|
29
|
+
clickable?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Card content
|
|
32
|
+
*/
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
export interface CardHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
36
|
+
/**
|
|
37
|
+
* Header content
|
|
38
|
+
*/
|
|
39
|
+
children?: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
export interface CardTitleProps extends HTMLAttributes<HTMLHeadingElement> {
|
|
42
|
+
/**
|
|
43
|
+
* Title content
|
|
44
|
+
*/
|
|
45
|
+
children?: ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* The heading level to use
|
|
48
|
+
*/
|
|
49
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
50
|
+
}
|
|
51
|
+
export interface CardDescriptionProps extends HTMLAttributes<HTMLParagraphElement> {
|
|
52
|
+
/**
|
|
53
|
+
* Description content
|
|
54
|
+
*/
|
|
55
|
+
children?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
export interface CardActionProps extends HTMLAttributes<HTMLDivElement> {
|
|
58
|
+
/**
|
|
59
|
+
* Action content
|
|
60
|
+
*/
|
|
61
|
+
children?: ReactNode;
|
|
62
|
+
}
|
|
63
|
+
export interface CardContentProps extends HTMLAttributes<HTMLDivElement> {
|
|
64
|
+
/**
|
|
65
|
+
* Content
|
|
66
|
+
*/
|
|
67
|
+
children?: ReactNode;
|
|
68
|
+
}
|
|
69
|
+
export interface CardFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
70
|
+
/**
|
|
71
|
+
* Footer content
|
|
72
|
+
*/
|
|
73
|
+
children?: ReactNode;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Card component that provides a flexible container for content.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```tsx
|
|
80
|
+
* <Card variant="elevated" clickable>
|
|
81
|
+
* <Card.Header>
|
|
82
|
+
* <Card.Title>Card Title</Card.Title>
|
|
83
|
+
* <Card.Description>Card Description</Card.Description>
|
|
84
|
+
* <Card.Action>
|
|
85
|
+
* <Button variant="link">Action</Button>
|
|
86
|
+
* </Card.Action>
|
|
87
|
+
* </Card.Header>
|
|
88
|
+
* <Card.Content>
|
|
89
|
+
* <p>Card content goes here</p>
|
|
90
|
+
* </Card.Content>
|
|
91
|
+
* <Card.Footer>
|
|
92
|
+
* <Button>Cancel</Button>
|
|
93
|
+
* <Button variant="outline">Submit</Button>
|
|
94
|
+
* </Card.Footer>
|
|
95
|
+
* </Card>
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
declare const Card: ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>>;
|
|
99
|
+
/**
|
|
100
|
+
* Card header component that contains the title, description, and optional actions.
|
|
101
|
+
*/
|
|
102
|
+
declare const CardHeader: ForwardRefExoticComponent<CardHeaderProps & RefAttributes<HTMLDivElement>>;
|
|
103
|
+
/**
|
|
104
|
+
* Card title component.
|
|
105
|
+
*/
|
|
106
|
+
declare const CardTitle: ForwardRefExoticComponent<CardTitleProps & RefAttributes<HTMLHeadingElement>>;
|
|
107
|
+
/**
|
|
108
|
+
* Card description component.
|
|
109
|
+
*/
|
|
110
|
+
declare const CardDescription: ForwardRefExoticComponent<CardDescriptionProps & RefAttributes<HTMLParagraphElement>>;
|
|
111
|
+
/**
|
|
112
|
+
* Card action component for action elements in the header.
|
|
113
|
+
*/
|
|
114
|
+
declare const CardAction: ForwardRefExoticComponent<CardActionProps & RefAttributes<HTMLDivElement>>;
|
|
115
|
+
/**
|
|
116
|
+
* Card content component that contains the main content of the card.
|
|
117
|
+
*/
|
|
118
|
+
declare const CardContent: ForwardRefExoticComponent<CardContentProps & RefAttributes<HTMLDivElement>>;
|
|
119
|
+
/**
|
|
120
|
+
* Card footer component that contains footer actions or additional information.
|
|
121
|
+
*/
|
|
122
|
+
declare const CardFooter: ForwardRefExoticComponent<CardFooterProps & RefAttributes<HTMLDivElement>>;
|
|
123
|
+
export interface CardComponent extends ForwardRefExoticComponent<CardProps & RefAttributes<HTMLDivElement>> {
|
|
124
|
+
Header: typeof CardHeader;
|
|
125
|
+
Title: typeof CardTitle;
|
|
126
|
+
Description: typeof CardDescription;
|
|
127
|
+
Action: typeof CardAction;
|
|
128
|
+
Content: typeof CardContent;
|
|
129
|
+
Footer: typeof CardFooter;
|
|
130
|
+
}
|
|
131
|
+
declare const _default: CardComponent;
|
|
132
|
+
export default _default;
|
|
133
|
+
export { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent, CardFooter };
|
|
@@ -0,0 +1,58 @@
|
|
|
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, HTMLAttributes } from 'react';
|
|
19
|
+
export type DividerOrientation = 'horizontal' | 'vertical';
|
|
20
|
+
export type DividerVariant = 'solid' | 'dashed' | 'dotted';
|
|
21
|
+
export interface DividerProps extends HTMLAttributes<HTMLDivElement> {
|
|
22
|
+
/**
|
|
23
|
+
* The orientation of the divider
|
|
24
|
+
*/
|
|
25
|
+
orientation?: DividerOrientation;
|
|
26
|
+
/**
|
|
27
|
+
* The variant style of the divider
|
|
28
|
+
*/
|
|
29
|
+
variant?: DividerVariant;
|
|
30
|
+
/**
|
|
31
|
+
* Text to display in the center of the divider
|
|
32
|
+
*/
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Custom color for the divider
|
|
36
|
+
*/
|
|
37
|
+
color?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Divider component for separating content sections.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* // Basic horizontal divider
|
|
45
|
+
* <Divider />
|
|
46
|
+
*
|
|
47
|
+
* // Divider with text
|
|
48
|
+
* <Divider>OR</Divider>
|
|
49
|
+
*
|
|
50
|
+
* // Vertical divider
|
|
51
|
+
* <Divider orientation="vertical" />
|
|
52
|
+
*
|
|
53
|
+
* // Custom styled divider
|
|
54
|
+
* <Divider variant="dashed" color="#ccc">Continue with</Divider>
|
|
55
|
+
* ```
|
|
56
|
+
*/
|
|
57
|
+
declare const Divider: FC<DividerProps>;
|
|
58
|
+
export default Divider;
|
|
@@ -0,0 +1,50 @@
|
|
|
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, ReactNode } from 'react';
|
|
19
|
+
export interface FormControlProps {
|
|
20
|
+
/**
|
|
21
|
+
* The content to be wrapped by the form control
|
|
22
|
+
*/
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Error message to display below the content
|
|
26
|
+
*/
|
|
27
|
+
error?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Helper text to display below the content
|
|
30
|
+
*/
|
|
31
|
+
helperText?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Additional CSS class names
|
|
34
|
+
*/
|
|
35
|
+
className?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Custom container style
|
|
38
|
+
*/
|
|
39
|
+
style?: CSSProperties;
|
|
40
|
+
/**
|
|
41
|
+
* Custom alignment for helper text (default: left, center for OTP)
|
|
42
|
+
*/
|
|
43
|
+
helperTextAlign?: 'left' | 'center';
|
|
44
|
+
/**
|
|
45
|
+
* Custom margin left for helper text (for components like Checkbox)
|
|
46
|
+
*/
|
|
47
|
+
helperTextMarginLeft?: string;
|
|
48
|
+
}
|
|
49
|
+
declare const FormControl: FC<FormControlProps>;
|
|
50
|
+
export default FormControl;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, SVGProps } from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* CircleAlert icon component.
|
|
21
|
+
*/
|
|
22
|
+
declare const CircleAlert: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
+
export default CircleAlert;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, SVGProps } from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* CircleCheck icon component.
|
|
21
|
+
*/
|
|
22
|
+
declare const CircleCheck: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
+
export default CircleCheck;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, SVGProps } from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* Eye icon component.
|
|
21
|
+
*/
|
|
22
|
+
declare const Eye: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
+
export default Eye;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, SVGProps } from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* EyeOff icon component.
|
|
21
|
+
*/
|
|
22
|
+
declare const EyeOff: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
+
export default EyeOff;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, SVGProps } from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* Info icon component.
|
|
21
|
+
*/
|
|
22
|
+
declare const Info: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
+
export default Info;
|
|
@@ -0,0 +1,23 @@
|
|
|
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, SVGProps } from 'react';
|
|
19
|
+
/**
|
|
20
|
+
* TriangleAlert icon component.
|
|
21
|
+
*/
|
|
22
|
+
declare const TriangleAlert: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
+
export default TriangleAlert;
|
|
@@ -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,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;
|