sud-ui 1.5.2 → 1.5.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.
- package/dist/components/Div/Div.d.ts +35 -0
- package/dist/components/commonType.d.ts +74 -0
- package/dist/components/dataDisplay/Accordion.d.ts +43 -0
- package/dist/components/dataDisplay/Avatar.d.ts +58 -0
- package/dist/components/dataDisplay/Badge.d.ts +42 -0
- package/dist/components/dataDisplay/Calendar.d.ts +44 -0
- package/dist/components/dataDisplay/Card.d.ts +65 -0
- package/dist/components/dataDisplay/Carousel.d.ts +25 -0
- package/dist/components/dataDisplay/Collapse.d.ts +40 -0
- package/dist/components/dataDisplay/Drawer.d.ts +37 -0
- package/dist/components/dataDisplay/Image.d.ts +30 -0
- package/dist/components/dataDisplay/List.d.ts +20 -0
- package/dist/components/dataDisplay/Modal.d.ts +36 -0
- package/dist/components/dataDisplay/Popover.d.ts +8 -0
- package/dist/components/dataDisplay/Segmented.d.ts +38 -0
- package/dist/components/dataDisplay/Table.d.ts +56 -0
- package/dist/components/dataDisplay/Tabs.d.ts +60 -0
- package/dist/components/dataDisplay/Tag.d.ts +34 -0
- package/dist/components/dataDisplay/Timeline.d.ts +22 -0
- package/dist/components/dataDisplay/Tooltip.d.ts +11 -0
- package/dist/components/dataEntry/Checkbox.d.ts +56 -0
- package/dist/components/dataEntry/ColorPicker.d.ts +42 -0
- package/dist/components/dataEntry/DatePicker.d.ts +56 -0
- package/dist/components/dataEntry/Input.d.ts +128 -0
- package/dist/components/dataEntry/Radio.d.ts +54 -0
- package/dist/components/dataEntry/Rate.d.ts +25 -0
- package/dist/components/dataEntry/Select.d.ts +57 -0
- package/dist/components/dataEntry/Slider.d.ts +42 -0
- package/dist/components/dataEntry/Switch.d.ts +26 -0
- package/dist/components/dataEntry/TimePicker.d.ts +58 -0
- package/dist/components/dataEntry/TimeSelector.d.ts +28 -0
- package/dist/components/dataEntry/Upload.d.ts +34 -0
- package/dist/components/feedback/DotSpinner.d.ts +12 -0
- package/dist/components/feedback/Empty.d.ts +32 -0
- package/dist/components/feedback/NotificationRoot.d.ts +47 -0
- package/dist/components/feedback/PopConfirm.d.ts +15 -0
- package/dist/components/feedback/Progress.d.ts +33 -0
- package/dist/components/feedback/Spinner.d.ts +15 -0
- package/dist/components/feedback/ToastRoot.d.ts +28 -0
- package/dist/components/general/Button.d.ts +48 -0
- package/dist/components/general/FloatButton.d.ts +53 -0
- package/dist/components/general/Typography.d.ts +46 -0
- package/dist/components/layout/Content/index.d.ts +28 -0
- package/dist/components/layout/Footer/index.d.ts +39 -0
- package/dist/components/layout/Header/index.d.ts +37 -0
- package/dist/components/layout/Layout/index.d.ts +11 -0
- package/dist/components/layout/Sider/index.d.ts +40 -0
- package/dist/components/navigation/Breadcrumb.d.ts +22 -0
- package/dist/components/navigation/Divider.d.ts +23 -0
- package/dist/components/navigation/Dropdown.d.ts +40 -0
- package/dist/components/navigation/Menu.d.ts +58 -0
- package/dist/components/navigation/Pagination.d.ts +24 -0
- package/dist/components/navigation/base/PopupBase.d.ts +75 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +3121 -3110
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
defaultColorType,
|
|
4
|
+
defaultSizeType,
|
|
5
|
+
borderType
|
|
6
|
+
} from "../commonType";
|
|
7
|
+
|
|
8
|
+
export type TabsSize = defaultSizeType | "2xl";
|
|
9
|
+
|
|
10
|
+
export type TabsAlign = "left" | "center" | "right";
|
|
11
|
+
|
|
12
|
+
export interface TabsOption {
|
|
13
|
+
key: string;
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
children?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface TabPaneProps {
|
|
19
|
+
tabKey?: string;
|
|
20
|
+
label: ReactNode;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
|
|
25
|
+
value?: string;
|
|
26
|
+
defaultValue?: string;
|
|
27
|
+
onChange?: (key: string) => void;
|
|
28
|
+
options?: TabsOption[];
|
|
29
|
+
children?: ReactNode;
|
|
30
|
+
size?: TabsSize;
|
|
31
|
+
colorType?: {
|
|
32
|
+
active?: defaultColorType;
|
|
33
|
+
inactive?: defaultColorType;
|
|
34
|
+
};
|
|
35
|
+
background?: {
|
|
36
|
+
active?: string;
|
|
37
|
+
inactive?: string;
|
|
38
|
+
};
|
|
39
|
+
color?: {
|
|
40
|
+
active?: string;
|
|
41
|
+
inactive?: string;
|
|
42
|
+
};
|
|
43
|
+
border?: boolean;
|
|
44
|
+
borderColor?: {
|
|
45
|
+
active?: string;
|
|
46
|
+
inactive?: string;
|
|
47
|
+
};
|
|
48
|
+
borderType?: borderType;
|
|
49
|
+
borderWeight?: number;
|
|
50
|
+
className?: string;
|
|
51
|
+
style?: CSSProperties;
|
|
52
|
+
disabledKeys?: string[];
|
|
53
|
+
align?: TabsAlign;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare const Tabs: FC<TabsProps> & {
|
|
57
|
+
TabPane: FC<TabPaneProps>;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export default Tabs;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
tagColorType,
|
|
4
|
+
shapeType,
|
|
5
|
+
borderType,
|
|
6
|
+
shadowType
|
|
7
|
+
} from "../commonType";
|
|
8
|
+
|
|
9
|
+
export type TagSize = "sm" | "md" | "lg";
|
|
10
|
+
|
|
11
|
+
export type TagIconPosition = "left" | "right" | "";
|
|
12
|
+
|
|
13
|
+
export interface TagProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
colorType?: tagColorType;
|
|
16
|
+
background?: string;
|
|
17
|
+
color?: string;
|
|
18
|
+
borderColor?: string;
|
|
19
|
+
borderType?: borderType;
|
|
20
|
+
borderWeight?: string | number;
|
|
21
|
+
className?: string;
|
|
22
|
+
closeable?: boolean;
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
icon?: ReactNode;
|
|
25
|
+
iconPosition?: TagIconPosition;
|
|
26
|
+
shape?: shapeType;
|
|
27
|
+
shadow?: shadowType;
|
|
28
|
+
border?: boolean;
|
|
29
|
+
size?: TagSize;
|
|
30
|
+
style?: CSSProperties;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
declare const Tag: FC<TagProps>;
|
|
34
|
+
export default Tag;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type TimelineMode = "left" | "right" | "alternate";
|
|
4
|
+
|
|
5
|
+
export interface TimelineItem {
|
|
6
|
+
key?: string | number;
|
|
7
|
+
label?: ReactNode;
|
|
8
|
+
content?: ReactNode | ReactNode[];
|
|
9
|
+
dot?: ReactNode;
|
|
10
|
+
color?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
|
|
15
|
+
items?: TimelineItem[];
|
|
16
|
+
mode?: TimelineMode;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: CSSProperties;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare const Timeline: FC<TimelineProps>;
|
|
22
|
+
export default Timeline;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FC } from "react";
|
|
2
|
+
import type { PopupBaseProps } from "../navigation/base/PopupBase";
|
|
3
|
+
|
|
4
|
+
type TooltipBaseProps = Omit<
|
|
5
|
+
PopupBaseProps,
|
|
6
|
+
"variant" | "title" | "footer" | "onCancel" | "onConfirm" | "divider"
|
|
7
|
+
>;
|
|
8
|
+
|
|
9
|
+
export interface TooltipProps extends TooltipBaseProps {}
|
|
10
|
+
|
|
11
|
+
export declare const Tooltip: FC<TooltipProps>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type { defaultColorType } from "../commonType";
|
|
3
|
+
|
|
4
|
+
export type CheckboxLabelPosition = "left" | "right" | "top" | "bottom";
|
|
5
|
+
export type CheckboxDirection = "horizontal" | "vertical";
|
|
6
|
+
|
|
7
|
+
export interface CheckboxOption {
|
|
8
|
+
value: string | number;
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface CheckboxProps
|
|
14
|
+
extends Omit<HTMLAttributes<HTMLLabelElement>, "onChange"> {
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
defaultChecked?: boolean;
|
|
17
|
+
onChange?: (checked: boolean) => void;
|
|
18
|
+
labelPosition?: CheckboxLabelPosition;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
color?: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
colorType?: defaultColorType;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
className?: string;
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
ariaRequired?: boolean;
|
|
27
|
+
ariaInvalid?: boolean;
|
|
28
|
+
ariaDescribedby?: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface CheckboxGroupProps {
|
|
32
|
+
options?: CheckboxOption[];
|
|
33
|
+
value?: (string | number)[];
|
|
34
|
+
onChange?: (value: (string | number)[]) => void;
|
|
35
|
+
layout?: "flex" | "grid";
|
|
36
|
+
direction?: CheckboxDirection;
|
|
37
|
+
cols?: number;
|
|
38
|
+
gap?: number;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
itemDisabled?: (string | number)[];
|
|
41
|
+
color?: string;
|
|
42
|
+
colorType?: defaultColorType;
|
|
43
|
+
labelPosition?: CheckboxLabelPosition;
|
|
44
|
+
ariaLabel?: string;
|
|
45
|
+
ariaRequired?: boolean;
|
|
46
|
+
name?: string;
|
|
47
|
+
role?: string;
|
|
48
|
+
style?: CSSProperties;
|
|
49
|
+
className?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
declare const Checkbox: FC<CheckboxProps> & {
|
|
53
|
+
Group: FC<CheckboxGroupProps>;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default Checkbox;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type { InputProps } from "./Input";
|
|
3
|
+
import type { SliderProps } from "./Slider";
|
|
4
|
+
import type { CardProps } from "../dataDisplay/Card";
|
|
5
|
+
import type { ButtonProps } from "../general/Button";
|
|
6
|
+
import type { PopConfirmProps } from "../feedback/PopConfirm";
|
|
7
|
+
import type {
|
|
8
|
+
PopupPlacement,
|
|
9
|
+
PopupTrigger,
|
|
10
|
+
} from "../navigation/base/PopupBase";
|
|
11
|
+
|
|
12
|
+
export type ColorPickerSize = "sm" | "md" | "lg";
|
|
13
|
+
|
|
14
|
+
export interface ColorPickerColor {
|
|
15
|
+
hex: string;
|
|
16
|
+
rgb: { r: number; g: number; b: number };
|
|
17
|
+
hsb: { h: number; s: number; b: number };
|
|
18
|
+
alpha: number;
|
|
19
|
+
rgba: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ColorPickerProps extends HTMLAttributes<HTMLDivElement> {
|
|
23
|
+
color?: string;
|
|
24
|
+
onChange?: (color: ColorPickerColor) => void;
|
|
25
|
+
open?: boolean;
|
|
26
|
+
setOpen?: (open: boolean) => void;
|
|
27
|
+
children?: ReactNode;
|
|
28
|
+
trigger?: PopupTrigger;
|
|
29
|
+
placement?: PopupPlacement;
|
|
30
|
+
style?: CSSProperties;
|
|
31
|
+
className?: string;
|
|
32
|
+
size?: ColorPickerSize;
|
|
33
|
+
popConfirmProps?: Partial<PopConfirmProps>;
|
|
34
|
+
inputProps?: Partial<InputProps>;
|
|
35
|
+
sliderProps?: Partial<SliderProps>;
|
|
36
|
+
cardProps?: Partial<CardProps>;
|
|
37
|
+
buttonProps?: Partial<ButtonProps>;
|
|
38
|
+
mode?: "gradient" | "preset";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare const ColorPicker: FC<ColorPickerProps>;
|
|
42
|
+
export default ColorPicker;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { CSSProperties, FC } from "react";
|
|
2
|
+
import type { PopConfirmProps } from "../feedback/PopConfirm";
|
|
3
|
+
import type { PopupPlacement } from "../navigation/base/PopupBase";
|
|
4
|
+
import type { CalendarProps } from "../dataDisplay/Calendar";
|
|
5
|
+
import type { InputProps } from "./Input";
|
|
6
|
+
import type {
|
|
7
|
+
defaultColorType,
|
|
8
|
+
shapeType,
|
|
9
|
+
shadowType,
|
|
10
|
+
borderType
|
|
11
|
+
} from "../commonType";
|
|
12
|
+
|
|
13
|
+
export type DatePickerSize = "sm" | "md" | "lg";
|
|
14
|
+
|
|
15
|
+
export interface DatePickerValue {
|
|
16
|
+
startDate?: Date;
|
|
17
|
+
endDate?: Date;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface DatePickerProps {
|
|
21
|
+
colorType?: defaultColorType;
|
|
22
|
+
shape?: shapeType;
|
|
23
|
+
shadow?: shadowType;
|
|
24
|
+
size?: DatePickerSize;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
error?: boolean;
|
|
28
|
+
errorText?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
value?: Date | DatePickerValue;
|
|
31
|
+
onChange?: (value: Date | DatePickerValue, text: string) => void;
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
format?: string;
|
|
34
|
+
range?: boolean;
|
|
35
|
+
placement?: PopupPlacement;
|
|
36
|
+
locale?: "en" | "ko";
|
|
37
|
+
popConfirmProps?: Partial<PopConfirmProps>;
|
|
38
|
+
inputProps?: Partial<InputProps>;
|
|
39
|
+
calendarProps?: Partial<CalendarProps>;
|
|
40
|
+
id?: string;
|
|
41
|
+
ariaLabel?: string;
|
|
42
|
+
ariaRequired?: boolean;
|
|
43
|
+
ariaInvalid?: boolean;
|
|
44
|
+
ariaDescribedby?: string;
|
|
45
|
+
background?: string;
|
|
46
|
+
color?: string;
|
|
47
|
+
border?: boolean;
|
|
48
|
+
borderColor?: string;
|
|
49
|
+
borderType?: borderType;
|
|
50
|
+
borderWeight?: number;
|
|
51
|
+
underline?: boolean;
|
|
52
|
+
style?: CSSProperties;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
declare const DatePicker: FC<DatePickerProps>;
|
|
56
|
+
export default DatePicker;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ReactNode,
|
|
3
|
+
CSSProperties,
|
|
4
|
+
FC,
|
|
5
|
+
HTMLAttributes,
|
|
6
|
+
MouseEvent,
|
|
7
|
+
KeyboardEvent,
|
|
8
|
+
ChangeEvent
|
|
9
|
+
} from "react";
|
|
10
|
+
import type { shapeType, borderType, shadowType } from "../commonType";
|
|
11
|
+
|
|
12
|
+
export type InputSize = "sm" | "md" | "lg";
|
|
13
|
+
|
|
14
|
+
export type InputType =
|
|
15
|
+
| "text"
|
|
16
|
+
| "password"
|
|
17
|
+
| "number"
|
|
18
|
+
| "int"
|
|
19
|
+
| "email"
|
|
20
|
+
| "tel"
|
|
21
|
+
| "url"
|
|
22
|
+
| "search"
|
|
23
|
+
| "date"
|
|
24
|
+
| "datetime-local"
|
|
25
|
+
| "time"
|
|
26
|
+
| "week"
|
|
27
|
+
| "month"
|
|
28
|
+
| "color"
|
|
29
|
+
| "file"
|
|
30
|
+
| "range"
|
|
31
|
+
| "hidden"
|
|
32
|
+
| "image"
|
|
33
|
+
| "radio"
|
|
34
|
+
| "checkbox"
|
|
35
|
+
| "submit"
|
|
36
|
+
| "reset"
|
|
37
|
+
| "button";
|
|
38
|
+
|
|
39
|
+
export interface InputProps
|
|
40
|
+
extends Omit<
|
|
41
|
+
HTMLAttributes<HTMLInputElement>,
|
|
42
|
+
"onChange" | "onClick" | "onKeyDown"
|
|
43
|
+
> {
|
|
44
|
+
background?: string;
|
|
45
|
+
color?: string;
|
|
46
|
+
border?: boolean;
|
|
47
|
+
borderColor?: string;
|
|
48
|
+
borderType?: borderType;
|
|
49
|
+
borderWeight?: number;
|
|
50
|
+
underline?: boolean;
|
|
51
|
+
afterIcon?: ReactNode;
|
|
52
|
+
beforeIcon?: ReactNode;
|
|
53
|
+
prefix?: ReactNode;
|
|
54
|
+
suffix?: ReactNode;
|
|
55
|
+
className?: string;
|
|
56
|
+
style?: CSSProperties;
|
|
57
|
+
disabled?: boolean;
|
|
58
|
+
readOnly?: boolean;
|
|
59
|
+
autoFocus?: boolean;
|
|
60
|
+
maxLength?: number;
|
|
61
|
+
password?: boolean;
|
|
62
|
+
type?: InputType;
|
|
63
|
+
clearable?: boolean;
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
value?: string;
|
|
66
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
67
|
+
onEnter?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
68
|
+
onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
|
|
69
|
+
shape?: shapeType;
|
|
70
|
+
shadow?: shadowType;
|
|
71
|
+
size?: InputSize;
|
|
72
|
+
id?: string;
|
|
73
|
+
name?: string;
|
|
74
|
+
autoComplete?: string;
|
|
75
|
+
ariaLabel?: string;
|
|
76
|
+
label?: ReactNode;
|
|
77
|
+
errorText?: string;
|
|
78
|
+
error?: boolean;
|
|
79
|
+
required?: boolean;
|
|
80
|
+
ariaRequired?: boolean;
|
|
81
|
+
ariaInvalid?: boolean;
|
|
82
|
+
ariaDescribedby?: string;
|
|
83
|
+
onClick?: (e: MouseEvent<HTMLDivElement>) => void;
|
|
84
|
+
thousandSeparator?: boolean;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface TextareaProps
|
|
88
|
+
extends Omit<
|
|
89
|
+
InputProps,
|
|
90
|
+
| "type"
|
|
91
|
+
| "password"
|
|
92
|
+
| "clearable"
|
|
93
|
+
| "thousandSeparator"
|
|
94
|
+
| "prefix"
|
|
95
|
+
| "suffix"
|
|
96
|
+
| "afterIcon"
|
|
97
|
+
| "beforeIcon"
|
|
98
|
+
> {
|
|
99
|
+
rows?: number;
|
|
100
|
+
resizable?: boolean;
|
|
101
|
+
autoSize?: boolean;
|
|
102
|
+
bottomLeft?: ReactNode;
|
|
103
|
+
bottomRight?: ReactNode;
|
|
104
|
+
spellCheck?: boolean;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface OTPProps
|
|
108
|
+
extends Omit<
|
|
109
|
+
InputProps,
|
|
110
|
+
| "type"
|
|
111
|
+
| "password"
|
|
112
|
+
| "clearable"
|
|
113
|
+
| "prefix"
|
|
114
|
+
| "suffix"
|
|
115
|
+
| "afterIcon"
|
|
116
|
+
| "beforeIcon"
|
|
117
|
+
| "thousandSeparator"
|
|
118
|
+
> {
|
|
119
|
+
type?: "int" | "text";
|
|
120
|
+
length?: number;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
declare const Input: FC<InputProps> & {
|
|
124
|
+
Textarea: FC<TextareaProps>;
|
|
125
|
+
OTP: FC<OTPProps>;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export default Input;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type { defaultColorType } from "../commonType";
|
|
3
|
+
|
|
4
|
+
export type RadioLabelPosition = "left" | "right" | "top" | "bottom";
|
|
5
|
+
export type RadioDirection = "horizontal" | "vertical";
|
|
6
|
+
|
|
7
|
+
export interface RadioOption {
|
|
8
|
+
value: string | number;
|
|
9
|
+
label: ReactNode;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface RadioProps
|
|
14
|
+
extends Omit<HTMLAttributes<HTMLLabelElement>, "onChange"> {
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
defaultChecked?: boolean;
|
|
17
|
+
onChange?: (checked: boolean) => void;
|
|
18
|
+
labelPosition?: RadioLabelPosition;
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
color?: string;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
colorType?: defaultColorType;
|
|
23
|
+
style?: CSSProperties;
|
|
24
|
+
className?: string;
|
|
25
|
+
ariaLabel?: string;
|
|
26
|
+
ariaRequired?: boolean;
|
|
27
|
+
name?: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface RadioGroupProps {
|
|
31
|
+
options?: RadioOption[];
|
|
32
|
+
value?: string | number | null;
|
|
33
|
+
onChange?: (value: string | number) => void;
|
|
34
|
+
layout?: "flex" | "grid";
|
|
35
|
+
direction?: RadioDirection;
|
|
36
|
+
cols?: number;
|
|
37
|
+
gap?: number;
|
|
38
|
+
disabled?: boolean;
|
|
39
|
+
itemDisabled?: (string | number)[];
|
|
40
|
+
color?: string;
|
|
41
|
+
colorType?: defaultColorType;
|
|
42
|
+
labelPosition?: RadioLabelPosition;
|
|
43
|
+
ariaLabel?: string;
|
|
44
|
+
ariaRequired?: boolean;
|
|
45
|
+
name?: string;
|
|
46
|
+
style?: CSSProperties;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare const Radio: FC<RadioProps> & {
|
|
51
|
+
Group: FC<RadioGroupProps>;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export default Radio;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactElement, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
|
|
3
|
+
export type RateIcon = "star" | "heart" | ReactElement;
|
|
4
|
+
|
|
5
|
+
export interface RateProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
count?: number;
|
|
7
|
+
allowHalf?: boolean;
|
|
8
|
+
defaultValue?: number;
|
|
9
|
+
value?: number;
|
|
10
|
+
onChange?: (value: number) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
showValue?: boolean;
|
|
13
|
+
activeColor?: string;
|
|
14
|
+
inactiveColor?: string;
|
|
15
|
+
size?: number;
|
|
16
|
+
className?: string;
|
|
17
|
+
style?: CSSProperties;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
testId?: string;
|
|
20
|
+
icon?: RateIcon;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
declare const Rate: FC<RateProps>;
|
|
24
|
+
|
|
25
|
+
export default Rate;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type {
|
|
3
|
+
defaultColorType,
|
|
4
|
+
shapeType,
|
|
5
|
+
borderType,
|
|
6
|
+
shadowType,
|
|
7
|
+
tagColorType
|
|
8
|
+
} from "../commonType";
|
|
9
|
+
|
|
10
|
+
export type SelectSize = "sm" | "md" | "lg";
|
|
11
|
+
|
|
12
|
+
export interface SelectOption {
|
|
13
|
+
value: string | number;
|
|
14
|
+
label: ReactNode;
|
|
15
|
+
content?: ReactNode;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface SelectProps extends HTMLAttributes<HTMLDivElement> {
|
|
19
|
+
background?: string;
|
|
20
|
+
color?: string;
|
|
21
|
+
border?: boolean;
|
|
22
|
+
borderColor?: string;
|
|
23
|
+
borderType?: borderType;
|
|
24
|
+
borderWeight?: number;
|
|
25
|
+
underline?: boolean;
|
|
26
|
+
beforeIcon?: ReactNode;
|
|
27
|
+
afterIcon?: ReactNode;
|
|
28
|
+
className?: string;
|
|
29
|
+
style?: CSSProperties;
|
|
30
|
+
value?: string | number | (string | number)[];
|
|
31
|
+
onChange?: (value: string | number | (string | number)[]) => void;
|
|
32
|
+
shape?: shapeType;
|
|
33
|
+
shadow?: shadowType;
|
|
34
|
+
size?: SelectSize;
|
|
35
|
+
id?: string;
|
|
36
|
+
tagColorType?: tagColorType;
|
|
37
|
+
colorType?: defaultColorType;
|
|
38
|
+
label?: ReactNode;
|
|
39
|
+
errorText?: string;
|
|
40
|
+
error?: boolean;
|
|
41
|
+
clearable?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
readOnly?: boolean;
|
|
44
|
+
dropdownStyle?: CSSProperties;
|
|
45
|
+
searchable?: boolean;
|
|
46
|
+
multiMode?: boolean;
|
|
47
|
+
showSelectedCount?: boolean;
|
|
48
|
+
options?: SelectOption[];
|
|
49
|
+
placeholder?: string;
|
|
50
|
+
ariaLabel?: string;
|
|
51
|
+
ariaRequired?: boolean;
|
|
52
|
+
ariaInvalid?: boolean;
|
|
53
|
+
ariaDescribedby?: string;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
declare const Select: FC<SelectProps>;
|
|
57
|
+
export default Select;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type { PopupBaseProps } from "../navigation/base/PopupBase";
|
|
3
|
+
import type { defaultColorType, borderType, shadowType } from "../commonType";
|
|
4
|
+
|
|
5
|
+
export type SliderSize = "sm" | "md" | "lg";
|
|
6
|
+
|
|
7
|
+
export interface SliderProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
value?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
onChange?: (value: number) => void;
|
|
13
|
+
vertical?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
background?: string;
|
|
16
|
+
border?: boolean;
|
|
17
|
+
borderType?: borderType;
|
|
18
|
+
borderWeight?: number;
|
|
19
|
+
borderColor?: string;
|
|
20
|
+
trackColor?: string;
|
|
21
|
+
fill?: boolean;
|
|
22
|
+
width?: number | string;
|
|
23
|
+
height?: number | string;
|
|
24
|
+
minMaxVisible?: boolean;
|
|
25
|
+
colorType?: defaultColorType;
|
|
26
|
+
unit?: string;
|
|
27
|
+
style?: CSSProperties;
|
|
28
|
+
className?: string;
|
|
29
|
+
shadow?: shadowType;
|
|
30
|
+
size?: SliderSize;
|
|
31
|
+
thumbSize?: number;
|
|
32
|
+
thumbBorder?: boolean;
|
|
33
|
+
popupClassName?: string;
|
|
34
|
+
popupStyle?: CSSProperties;
|
|
35
|
+
popupProps?: Partial<PopupBaseProps>;
|
|
36
|
+
id?: string;
|
|
37
|
+
ariaLabel?: string;
|
|
38
|
+
ariaValueText?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare const Slider: FC<SliderProps>;
|
|
42
|
+
export default Slider;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ReactNode, CSSProperties, FC, HTMLAttributes } from "react";
|
|
2
|
+
import type { defaultColorType, shadowType } from "../commonType";
|
|
3
|
+
|
|
4
|
+
export interface SwitchProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
defaultChecked?: boolean;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onColor?: string;
|
|
10
|
+
offColor?: string;
|
|
11
|
+
onText?: ReactNode;
|
|
12
|
+
offText?: ReactNode;
|
|
13
|
+
onIcon?: ReactNode;
|
|
14
|
+
offIcon?: ReactNode;
|
|
15
|
+
thumbColor?: string;
|
|
16
|
+
shadow?: shadowType;
|
|
17
|
+
size?: "sm" | "md" | "lg";
|
|
18
|
+
colorType?: defaultColorType;
|
|
19
|
+
className?: string;
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
id?: string;
|
|
22
|
+
ariaLabel?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
declare const Switch: FC<SwitchProps>;
|
|
26
|
+
export default Switch;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { CSSProperties, FC } from "react";
|
|
2
|
+
import type { InputProps } from "./Input";
|
|
3
|
+
import type { PopConfirmProps } from "../feedback/PopConfirm";
|
|
4
|
+
import type { PopupPlacement } from "../navigation/base/PopupBase";
|
|
5
|
+
import type { TimeSelectorProps } from "./TimeSelector";
|
|
6
|
+
import type {
|
|
7
|
+
defaultColorType,
|
|
8
|
+
shapeType,
|
|
9
|
+
shadowType,
|
|
10
|
+
borderType
|
|
11
|
+
} from "../commonType";
|
|
12
|
+
|
|
13
|
+
export type TimePickerSize = "sm" | "md" | "lg";
|
|
14
|
+
|
|
15
|
+
export interface TimePickerValue {
|
|
16
|
+
startTime?: Date;
|
|
17
|
+
endTime?: Date;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface TimePickerProps {
|
|
21
|
+
colorType?: defaultColorType;
|
|
22
|
+
shape?: shapeType;
|
|
23
|
+
shadow?: shadowType;
|
|
24
|
+
size?: TimePickerSize;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
readOnly?: boolean;
|
|
27
|
+
error?: boolean;
|
|
28
|
+
errorText?: string;
|
|
29
|
+
className?: string;
|
|
30
|
+
value?: Date | TimePickerValue;
|
|
31
|
+
onChange?: (value: Date | TimePickerValue, text: string) => void;
|
|
32
|
+
placeholder?: string;
|
|
33
|
+
format?: string;
|
|
34
|
+
range?: boolean;
|
|
35
|
+
placement?: PopupPlacement;
|
|
36
|
+
showSecond?: boolean;
|
|
37
|
+
use12Hours?: boolean;
|
|
38
|
+
step?: number;
|
|
39
|
+
popConfirmProps?: Partial<PopConfirmProps>;
|
|
40
|
+
inputProps?: Partial<InputProps>;
|
|
41
|
+
timePickerProps?: Partial<TimeSelectorProps>;
|
|
42
|
+
id?: string;
|
|
43
|
+
ariaLabel?: string;
|
|
44
|
+
ariaRequired?: boolean;
|
|
45
|
+
ariaInvalid?: boolean;
|
|
46
|
+
ariaDescribedby?: string;
|
|
47
|
+
background?: string;
|
|
48
|
+
color?: string;
|
|
49
|
+
border?: boolean;
|
|
50
|
+
borderColor?: string;
|
|
51
|
+
borderType?: borderType;
|
|
52
|
+
borderWeight?: number;
|
|
53
|
+
underline?: boolean;
|
|
54
|
+
style?: CSSProperties;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const TimePicker: FC<TimePickerProps>;
|
|
58
|
+
export default TimePicker;
|