@zango-core/components 0.0.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 +435 -0
- package/dist/components/Accordion/Accordion.d.ts +36 -0
- package/dist/components/Accordion/index.d.ts +2 -0
- package/dist/components/Alert/Alert.d.ts +15 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +14 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +9 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +15 -0
- package/dist/components/Card/index.d.ts +2 -0
- package/dist/components/Checkbox/Checkbox.d.ts +8 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +33 -0
- package/dist/components/ContextMenu/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +41 -0
- package/dist/components/Dialog/index.d.ts +2 -0
- package/dist/components/Divider/Divider.d.ts +13 -0
- package/dist/components/Divider/index.d.ts +2 -0
- package/dist/components/Drawer/Drawer.d.ts +29 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Empty/Empty.d.ts +10 -0
- package/dist/components/Empty/index.d.ts +2 -0
- package/dist/components/Form/Form.d.ts +48 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/FormWidgets/index.d.ts +6 -0
- package/dist/components/InfoSection/InfoSection.d.ts +38 -0
- package/dist/components/InfoSection/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +13 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/Layout/Layout.d.ts +35 -0
- package/dist/components/Layout/index.d.ts +2 -0
- package/dist/components/Loader/Loader.d.ts +24 -0
- package/dist/components/Message/Message.d.ts +35 -0
- package/dist/components/Message/index.d.ts +2 -0
- package/dist/components/MobileInput/MobileInput.d.ts +8 -0
- package/dist/components/MobileInput/index.d.ts +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +7 -0
- package/dist/components/PasswordInput/index.d.ts +1 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +44 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInput.example.d.ts +10 -0
- package/dist/components/PhoneNumberInput/index.d.ts +1 -0
- package/dist/components/Progress/Progress.d.ts +15 -0
- package/dist/components/Progress/index.d.ts +2 -0
- package/dist/components/Result/Result.d.ts +12 -0
- package/dist/components/Result/index.d.ts +2 -0
- package/dist/components/Segmented/Segmented.d.ts +19 -0
- package/dist/components/Segmented/index.d.ts +2 -0
- package/dist/components/Select/Select.d.ts +31 -0
- package/dist/components/Select/index.d.ts +2 -0
- package/dist/components/Space/Space.d.ts +12 -0
- package/dist/components/Space/index.d.ts +2 -0
- package/dist/components/Spin/Spin.d.ts +11 -0
- package/dist/components/Spin/index.d.ts +2 -0
- package/dist/components/Tabs/Tabs.d.ts +20 -0
- package/dist/components/Tabs/index.d.ts +2 -0
- package/dist/components/Tag/Tag.d.ts +12 -0
- package/dist/components/Tag/index.d.ts +2 -0
- package/dist/components/Textarea/Textarea.d.ts +7 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Timeline/Timeline.d.ts +30 -0
- package/dist/components/Timeline/index.d.ts +2 -0
- package/dist/components/Toast/Toast.d.ts +43 -0
- package/dist/components/Toast/index.d.ts +2 -0
- package/dist/components/Toast/useToast.d.ts +10 -0
- package/dist/components/Typography/Typography.d.ts +31 -0
- package/dist/components/Typography/index.d.ts +2 -0
- package/dist/demo/App.d.ts +2 -0
- package/dist/demo/main.d.ts +1 -0
- package/dist/index.d.ts +58 -0
- package/dist/utils/cn.d.ts +1 -0
- package/dist/utils/injectStyles.d.ts +1 -0
- package/dist/zango-components.js +4932 -0
- package/dist/zango-components.js.map +1 -0
- package/dist/zango-components.umd.cjs +101 -0
- package/dist/zango-components.umd.cjs.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface DrawerProps {
|
|
4
|
+
/** Whether the drawer is open */
|
|
5
|
+
open: boolean;
|
|
6
|
+
/** Callback when the drawer should close */
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
/** Content to display in the drawer */
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
/** Size of the drawer */
|
|
11
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
12
|
+
/** Title of the drawer */
|
|
13
|
+
title?: string;
|
|
14
|
+
/** Position of the drawer */
|
|
15
|
+
position?: 'left' | 'right';
|
|
16
|
+
/** Whether to show the back button */
|
|
17
|
+
showBackButton?: boolean;
|
|
18
|
+
/** Callback when back button is clicked */
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
/** Custom className for the drawer content */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Custom className for the overlay */
|
|
23
|
+
overlayClassName?: string;
|
|
24
|
+
/** Whether to show close button */
|
|
25
|
+
showCloseButton?: boolean;
|
|
26
|
+
/** Custom close button content */
|
|
27
|
+
closeButton?: React.ReactNode;
|
|
28
|
+
}
|
|
29
|
+
export declare const Drawer: React.FC<DrawerProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface EmptyProps {
|
|
4
|
+
description?: React.ReactNode;
|
|
5
|
+
image?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
export declare const Empty: React.FC<EmptyProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FormRule {
|
|
4
|
+
required?: boolean;
|
|
5
|
+
message?: string;
|
|
6
|
+
type?: 'email' | 'url' | 'number';
|
|
7
|
+
min?: number;
|
|
8
|
+
max?: number;
|
|
9
|
+
pattern?: RegExp;
|
|
10
|
+
validator?: (rule: any, value: any) => Promise<void> | void;
|
|
11
|
+
}
|
|
12
|
+
export interface FormProps {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
onFinish?: (values: Record<string, any>) => void;
|
|
15
|
+
onFinishFailed?: (errorInfo: {
|
|
16
|
+
values: Record<string, any>;
|
|
17
|
+
errorFields: Array<{
|
|
18
|
+
name: string;
|
|
19
|
+
errors: string[];
|
|
20
|
+
}>;
|
|
21
|
+
}) => void;
|
|
22
|
+
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
23
|
+
className?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
initialValues?: Record<string, any>;
|
|
26
|
+
form?: any;
|
|
27
|
+
}
|
|
28
|
+
export interface FormItemProps {
|
|
29
|
+
name?: string;
|
|
30
|
+
label?: string;
|
|
31
|
+
rules?: FormRule[];
|
|
32
|
+
children: React.ReactElement;
|
|
33
|
+
className?: string;
|
|
34
|
+
help?: string;
|
|
35
|
+
validateStatus?: 'success' | 'warning' | 'error' | 'validating';
|
|
36
|
+
required?: boolean;
|
|
37
|
+
noStyle?: boolean;
|
|
38
|
+
valuePropName?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare const Form: React.FC<FormProps> & {
|
|
41
|
+
Item: typeof FormItem;
|
|
42
|
+
};
|
|
43
|
+
export declare const FormItem: React.FC<FormItemProps>;
|
|
44
|
+
export declare const useForm: () => {
|
|
45
|
+
resetFields: () => void;
|
|
46
|
+
setFieldsValue: () => void;
|
|
47
|
+
getFieldsValue: () => {};
|
|
48
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Input, type InputProps } from '../Input';
|
|
2
|
+
export { default as Textarea } from '../Textarea';
|
|
3
|
+
export { default as Checkbox } from '../Checkbox';
|
|
4
|
+
export { default as PasswordInput } from '../PasswordInput';
|
|
5
|
+
export { default as MobileInput } from '../MobileInput';
|
|
6
|
+
export { default as PhoneNumberInput, type Country, type PhoneNumberInputProps } from '../PhoneNumberInput';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
type InfoSectionVariant = 'default' | 'card' | 'bordered';
|
|
4
|
+
type InfoSectionSize = 'small' | 'medium' | 'large';
|
|
5
|
+
interface InfoSectionProps {
|
|
6
|
+
title?: React.ReactNode;
|
|
7
|
+
subtitle?: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
headerClassName?: string;
|
|
12
|
+
contentClassName?: string;
|
|
13
|
+
icon?: React.ReactNode;
|
|
14
|
+
badge?: React.ReactNode;
|
|
15
|
+
actions?: React.ReactNode;
|
|
16
|
+
variant?: InfoSectionVariant;
|
|
17
|
+
size?: InfoSectionSize;
|
|
18
|
+
}
|
|
19
|
+
export declare const InfoSection: React.FC<InfoSectionProps>;
|
|
20
|
+
type InfoItemOrientation = 'vertical' | 'horizontal';
|
|
21
|
+
interface InfoItemProps {
|
|
22
|
+
label: React.ReactNode;
|
|
23
|
+
value: React.ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
labelClassName?: string;
|
|
26
|
+
valueClassName?: string;
|
|
27
|
+
orientation?: InfoItemOrientation;
|
|
28
|
+
}
|
|
29
|
+
export declare const InfoItem: React.FC<InfoItemProps>;
|
|
30
|
+
type InfoGridGap = 'small' | 'medium' | 'large';
|
|
31
|
+
interface InfoGridProps {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
columns?: 1 | 2 | 3 | 4;
|
|
34
|
+
className?: string;
|
|
35
|
+
gap?: InfoGridGap;
|
|
36
|
+
}
|
|
37
|
+
export declare const InfoGrid: React.FC<InfoGridProps>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InfoSection, InfoItem, InfoGrid } from './InfoSection';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode, InputHTMLAttributes } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
leftIcon?: ReactNode;
|
|
5
|
+
rightIcon?: ReactNode;
|
|
6
|
+
error?: boolean;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
inputSize?: 'sm' | 'md' | 'lg';
|
|
9
|
+
containerClassName?: string;
|
|
10
|
+
iconClassName?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
|
+
export default Input;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type InputProps } from './Input';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface LayoutProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
}
|
|
8
|
+
export interface HeaderProps {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
export interface ContentProps {
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
}
|
|
18
|
+
export interface FooterProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
}
|
|
23
|
+
export interface SiderProps {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
style?: React.CSSProperties;
|
|
27
|
+
width?: number | string;
|
|
28
|
+
collapsed?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const Layout: React.FC<LayoutProps> & {
|
|
31
|
+
Header: React.FC<HeaderProps>;
|
|
32
|
+
Content: React.FC<ContentProps>;
|
|
33
|
+
Footer: React.FC<FooterProps>;
|
|
34
|
+
Sider: React.FC<SiderProps>;
|
|
35
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface LoaderProps {
|
|
4
|
+
/** Whether the loader is visible */
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
/** Type of loader */
|
|
7
|
+
type?: 'page' | 'inline' | 'overlay';
|
|
8
|
+
/** Position for page loader */
|
|
9
|
+
position?: 'top' | 'bottom';
|
|
10
|
+
/** Size of the loader */
|
|
11
|
+
size?: 'small' | 'default' | 'large';
|
|
12
|
+
/** Loading text to display */
|
|
13
|
+
text?: string;
|
|
14
|
+
/** Children to wrap with loader overlay */
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/** Additional CSS classes */
|
|
17
|
+
className?: string;
|
|
18
|
+
/** Additional inline styles */
|
|
19
|
+
style?: React.CSSProperties;
|
|
20
|
+
/** Delay before showing loader (in ms) */
|
|
21
|
+
delay?: number;
|
|
22
|
+
}
|
|
23
|
+
export declare const Loader: React.FC<LoaderProps>;
|
|
24
|
+
export declare const loaderStyles = "\n @keyframes page-loader {\n 0% {\n transform: translateX(-150%);\n }\n 100% {\n transform: translateX(250%);\n }\n }\n\n @keyframes page-loader-secondary {\n 0% {\n transform: translateX(-150%);\n }\n 66% {\n transform: translateX(-150%);\n }\n 100% {\n transform: translateX(250%);\n }\n }\n\n @keyframes inline-loader {\n 0% {\n transform: translateX(-100%);\n }\n 100% {\n transform: translateX(200%);\n }\n }\n\n .animate-page-loader {\n animation: page-loader 2s linear infinite;\n }\n\n .animate-page-loader-secondary {\n animation: page-loader-secondary 2s linear infinite;\n }\n\n .animate-inline-loader {\n animation: inline-loader 1.5s ease-in-out infinite;\n }\n";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface MessageItem {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'success' | 'error' | 'warning' | 'info';
|
|
6
|
+
content: string;
|
|
7
|
+
duration?: number;
|
|
8
|
+
}
|
|
9
|
+
interface MessageContextType {
|
|
10
|
+
messages: MessageItem[];
|
|
11
|
+
addMessage: (message: Omit<MessageItem, 'id'>) => void;
|
|
12
|
+
removeMessage: (id: string) => void;
|
|
13
|
+
}
|
|
14
|
+
export interface MessageProviderProps {
|
|
15
|
+
children: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
export declare const MessageProvider: React.FC<MessageProviderProps>;
|
|
18
|
+
interface MessageItemProps {
|
|
19
|
+
message: MessageItem;
|
|
20
|
+
onClose: () => void;
|
|
21
|
+
}
|
|
22
|
+
declare const MessageItem: React.FC<MessageItemProps>;
|
|
23
|
+
export declare const message: {
|
|
24
|
+
success: (content: string, duration?: number) => void;
|
|
25
|
+
error: (content: string, duration?: number) => void;
|
|
26
|
+
warning: (content: string, duration?: number) => void;
|
|
27
|
+
info: (content: string, duration?: number) => void;
|
|
28
|
+
};
|
|
29
|
+
export declare const useMessage: () => MessageContextType;
|
|
30
|
+
declare global {
|
|
31
|
+
interface Window {
|
|
32
|
+
messageAPI?: MessageContextType;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface MobileInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
countryCode?: string;
|
|
5
|
+
error?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const MobileInput: React.ForwardRefExoticComponent<MobileInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
export default MobileInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './MobileInput';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface PasswordInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
+
export default PasswordInput;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PasswordInput';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface Country {
|
|
4
|
+
code: string;
|
|
5
|
+
name: string;
|
|
6
|
+
dialCode: string;
|
|
7
|
+
flag: string;
|
|
8
|
+
format?: string;
|
|
9
|
+
priority?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface PhoneNumberInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'size'> {
|
|
12
|
+
value?: string;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
onChange?: (value: string, country: Country) => void;
|
|
15
|
+
onCountryChange?: (country: Country) => void;
|
|
16
|
+
enableCountryDropdown?: boolean;
|
|
17
|
+
defaultCountry?: string;
|
|
18
|
+
preferredCountries?: string[];
|
|
19
|
+
excludeCountries?: string[];
|
|
20
|
+
onlyCountries?: string[];
|
|
21
|
+
showCountryFlags?: boolean;
|
|
22
|
+
autoFormat?: boolean;
|
|
23
|
+
validatePhoneNumber?: boolean;
|
|
24
|
+
onValidationChange?: (isValid: boolean) => void;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
autoPlaceholder?: boolean;
|
|
27
|
+
dropdownPosition?: 'auto' | 'top' | 'bottom';
|
|
28
|
+
searchable?: boolean;
|
|
29
|
+
size?: 'sm' | 'md' | 'lg';
|
|
30
|
+
error?: boolean;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
ariaLabel?: string;
|
|
34
|
+
ariaDescribedBy?: string;
|
|
35
|
+
className?: string;
|
|
36
|
+
containerClassName?: string;
|
|
37
|
+
dropdownClassName?: string;
|
|
38
|
+
inputClassName?: string;
|
|
39
|
+
name?: string;
|
|
40
|
+
id?: string;
|
|
41
|
+
required?: boolean;
|
|
42
|
+
}
|
|
43
|
+
export declare const PhoneNumberInput: React.ForwardRefExoticComponent<PhoneNumberInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
44
|
+
export default PhoneNumberInput;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Simple usage example for PhoneNumberInput
|
|
3
|
+
* This can be used as a reference for integrating into existing forms
|
|
4
|
+
*/
|
|
5
|
+
export declare const BasicPhoneNumberExample: () => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const FormIntegrationExample: () => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const FixedCountryExample: () => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const ValidationExample: () => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const PhoneNumberInputExamples: () => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export default PhoneNumberInputExamples;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default, type PhoneNumberInputProps, type Country } from './PhoneNumberInput';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ProgressProps {
|
|
4
|
+
percent?: number;
|
|
5
|
+
type?: 'line' | 'circle';
|
|
6
|
+
status?: 'normal' | 'exception' | 'active' | 'success';
|
|
7
|
+
showInfo?: boolean;
|
|
8
|
+
format?: (percent?: number) => React.ReactNode;
|
|
9
|
+
strokeColor?: string;
|
|
10
|
+
strokeWidth?: number;
|
|
11
|
+
size?: 'default' | 'small';
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
}
|
|
15
|
+
export declare const Progress: React.FC<ProgressProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ResultProps {
|
|
4
|
+
status?: 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
subTitle?: React.ReactNode;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
extra?: React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare const Result: React.FC<ResultProps>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SegmentedOption {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
value: string | number;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export interface SegmentedProps {
|
|
10
|
+
options: SegmentedOption[] | (string | number)[];
|
|
11
|
+
value?: string | number;
|
|
12
|
+
defaultValue?: string | number;
|
|
13
|
+
onChange?: (value: string | number) => void;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
size?: 'small' | 'middle' | 'large';
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
}
|
|
19
|
+
export declare const Segmented: React.FC<SegmentedProps>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string | number;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps {
|
|
9
|
+
value?: string | number;
|
|
10
|
+
defaultValue?: string | number;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
options?: SelectOption[];
|
|
13
|
+
onChange?: (value: string | number, option: SelectOption) => void;
|
|
14
|
+
onSelect?: (value: string | number, option: SelectOption) => void;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
allowClear?: boolean;
|
|
17
|
+
showSearch?: boolean;
|
|
18
|
+
filterOption?: (input: string, option?: SelectOption) => boolean;
|
|
19
|
+
size?: "small" | "medium" | "large";
|
|
20
|
+
className?: string;
|
|
21
|
+
style?: React.CSSProperties;
|
|
22
|
+
dropdownClassName?: string;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export declare const Select: React.FC<SelectProps> & {
|
|
26
|
+
Option: React.FC<{
|
|
27
|
+
value: string | number;
|
|
28
|
+
children: React.ReactNode;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}>;
|
|
31
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SpaceProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
direction?: 'horizontal' | 'vertical';
|
|
6
|
+
size?: 'small' | 'medium' | 'large' | number;
|
|
7
|
+
align?: 'start' | 'end' | 'center' | 'baseline';
|
|
8
|
+
wrap?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
}
|
|
12
|
+
export declare const Space: React.FC<SpaceProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SpinProps {
|
|
4
|
+
spinning?: boolean;
|
|
5
|
+
size?: 'small' | 'default' | 'large';
|
|
6
|
+
tip?: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare const Spin: React.FC<SpinProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TabItem {
|
|
4
|
+
key: string;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export interface TabsProps {
|
|
10
|
+
activeKey?: string;
|
|
11
|
+
defaultActiveKey?: string;
|
|
12
|
+
items: TabItem[];
|
|
13
|
+
onChange?: (activeKey: string) => void;
|
|
14
|
+
type?: 'line' | 'card';
|
|
15
|
+
size?: 'small' | 'default' | 'large';
|
|
16
|
+
tabPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
export declare const Tabs: React.FC<TabsProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface TagProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
color?: string | 'success' | 'processing' | 'error' | 'warning' | 'default';
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
onClose?: (e: React.MouseEvent) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
}
|
|
12
|
+
export declare const Tag: React.FC<TagProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
|
+
export default Textarea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Textarea';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface TimelineEvent {
|
|
2
|
+
id: string;
|
|
3
|
+
type: "status_change" | "consultation" | "prescription" | "vitals" | "custom";
|
|
4
|
+
title: string;
|
|
5
|
+
subtitle?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
timestamp: string;
|
|
8
|
+
date: string;
|
|
9
|
+
icon?: "user" | "activity" | "file" | "calendar" | "clock" | "custom";
|
|
10
|
+
iconUrl?: string;
|
|
11
|
+
metadata?: Record<string, any>;
|
|
12
|
+
}
|
|
13
|
+
export interface TimelineSection {
|
|
14
|
+
date: string;
|
|
15
|
+
events: TimelineEvent[];
|
|
16
|
+
}
|
|
17
|
+
interface TimelineProps {
|
|
18
|
+
sections: TimelineSection[];
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function TimelineEventItem({ event }: {
|
|
22
|
+
event: TimelineEvent;
|
|
23
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function TimelineSection({ section }: {
|
|
25
|
+
section: TimelineSection;
|
|
26
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function Timeline({ sections, className }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare function formatTimelineDate(date: Date | string): string;
|
|
29
|
+
export declare function formatTimelineTime(date: Date | string): string;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type ToastVariant = 'success' | 'error' | 'warning' | 'info' | 'default';
|
|
4
|
+
export type ToastPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
5
|
+
export interface ToastAction {
|
|
6
|
+
label: string;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}
|
|
9
|
+
export interface ToastOptions {
|
|
10
|
+
title: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
variant?: ToastVariant;
|
|
13
|
+
duration?: number;
|
|
14
|
+
icon?: React.ReactNode;
|
|
15
|
+
primaryAction?: ToastAction;
|
|
16
|
+
secondaryAction?: ToastAction;
|
|
17
|
+
closeButton?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export interface ToasterProps {
|
|
20
|
+
position?: ToastPosition;
|
|
21
|
+
duration?: number;
|
|
22
|
+
gap?: number;
|
|
23
|
+
visibleToasts?: number;
|
|
24
|
+
closeButton?: boolean;
|
|
25
|
+
richColors?: boolean;
|
|
26
|
+
expand?: boolean;
|
|
27
|
+
className?: string;
|
|
28
|
+
toastOptions?: {
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export declare const Toaster: React.FC<ToasterProps>;
|
|
34
|
+
export declare const toast: {
|
|
35
|
+
success: (options: ToastOptions | string) => string | number;
|
|
36
|
+
error: (options: ToastOptions | string) => string | number;
|
|
37
|
+
warning: (options: ToastOptions | string) => string | number;
|
|
38
|
+
info: (options: ToastOptions | string) => string | number;
|
|
39
|
+
custom: (options: ToastOptions) => string | number;
|
|
40
|
+
dismiss: (id?: number | string) => string | number;
|
|
41
|
+
loading: (message: (React.ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import('sonner').ExternalToast) => string | number;
|
|
42
|
+
promise: any;
|
|
43
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const useToast: () => {
|
|
2
|
+
toast: (options: import('./Toast').ToastOptions) => string | number;
|
|
3
|
+
success: (options: import('./Toast').ToastOptions | string) => string | number;
|
|
4
|
+
error: (options: import('./Toast').ToastOptions | string) => string | number;
|
|
5
|
+
warning: (options: import('./Toast').ToastOptions | string) => string | number;
|
|
6
|
+
info: (options: import('./Toast').ToastOptions | string) => string | number;
|
|
7
|
+
dismiss: (id?: number | string) => string | number;
|
|
8
|
+
loading: (message: (import('react').ReactNode | (() => React.ReactNode)) | React.ReactNode, data?: import('sonner').ExternalToast) => string | number;
|
|
9
|
+
promise: any;
|
|
10
|
+
};
|