x-ui-design 1.0.30 → 1.0.31-gamma.1
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 +1 -22
- package/dist/{esm/types/components → components}/DatePicker/DatePicker.d.ts +1 -2
- package/dist/{esm/types/components → components}/DatePicker/RangePicker/RangePicker.d.ts +1 -2
- package/dist/{esm/types/components → components}/Dropdown/Dropdown.d.ts +1 -2
- package/dist/{esm/types/components → components}/Empty/Empty.d.ts +1 -2
- package/dist/{esm/types/components → components}/Form/Item/Item.d.ts +1 -2
- package/dist/components/Icons/Icons.d.ts +18 -0
- package/dist/components/Input/Input.d.ts +11 -0
- package/dist/{esm/types/components → components}/Input/Textarea/Textarea.d.ts +1 -2
- package/dist/{esm/types/components → components}/Popover/Popover.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Button/Button.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Group/Group.d.ts +1 -2
- package/dist/{esm/types/components → components}/Radio/Radio.d.ts +1 -2
- package/dist/{esm/types/components → components}/Result/Result.d.ts +1 -2
- package/dist/{esm/types/components → components}/Switch/Switch.d.ts +1 -2
- package/dist/{esm/types/components → components}/Upload/Upload.d.ts +1 -2
- package/dist/esm/types/index.d.ts +0 -56
- package/dist/index.d.ts +1 -150
- package/dist/index.esm.js +3433 -3863
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +3395 -3825
- package/dist/index.js.map +1 -1
- package/package.json +22 -20
- package/.github/workflows/x-ui-design.yml +0 -14
- package/compile.sh +0 -15
- package/dist/esm/types/components/Icons/Icons.d.ts +0 -19
- package/dist/esm/types/components/Input/Input.d.ts +0 -16
- package/eslint.config.mjs +0 -16
- package/lib/components/Button/Button.tsx +0 -136
- package/lib/components/Button/index.ts +0 -1
- package/lib/components/Button/style.css +0 -197
- package/lib/components/Checkbox/Checkbox.tsx +0 -131
- package/lib/components/Checkbox/index.ts +0 -1
- package/lib/components/Checkbox/style.css +0 -95
- package/lib/components/ConditionalWrapper/index.tsx +0 -12
- package/lib/components/DatePicker/DatePicker.tsx +0 -526
- package/lib/components/DatePicker/RangePicker/RangePicker.tsx +0 -500
- package/lib/components/DatePicker/RangePicker/index.ts +0 -1
- package/lib/components/DatePicker/RangePicker/style.css +0 -434
- package/lib/components/DatePicker/TimePicker/TimePicker.tsx +0 -497
- package/lib/components/DatePicker/TimePicker/index.ts +0 -1
- package/lib/components/DatePicker/TimePicker/style.css +0 -197
- package/lib/components/DatePicker/index.ts +0 -1
- package/lib/components/DatePicker/style.css +0 -318
- package/lib/components/Dropdown/Dropdown.tsx +0 -234
- package/lib/components/Dropdown/index.ts +0 -1
- package/lib/components/Dropdown/style.css +0 -124
- package/lib/components/Empty/Empty.tsx +0 -45
- package/lib/components/Empty/index.ts +0 -1
- package/lib/components/Empty/style.css +0 -13
- package/lib/components/Form/Form.tsx +0 -130
- package/lib/components/Form/Item/Item.tsx +0 -294
- package/lib/components/Form/Item/index.ts +0 -1
- package/lib/components/Form/Item/style.css +0 -61
- package/lib/components/Form/index.ts +0 -1
- package/lib/components/Icons/Icons.tsx +0 -433
- package/lib/components/Icons/index.ts +0 -15
- package/lib/components/Input/Input.tsx +0 -228
- package/lib/components/Input/Textarea/Textarea.tsx +0 -110
- package/lib/components/Input/Textarea/index.ts +0 -1
- package/lib/components/Input/Textarea/style.css +0 -104
- package/lib/components/Input/index.ts +0 -1
- package/lib/components/Input/style.css +0 -137
- package/lib/components/Menu/Item/Item.tsx +0 -65
- package/lib/components/Menu/Menu.tsx +0 -261
- package/lib/components/Menu/SubMenu/SubMenu.tsx +0 -68
- package/lib/components/Menu/index.css +0 -145
- package/lib/components/Menu/index.ts +0 -1
- package/lib/components/Popover/Popover.tsx +0 -135
- package/lib/components/Popover/index.ts +0 -1
- package/lib/components/Popover/style.css +0 -82
- package/lib/components/Radio/Button/Button.tsx +0 -42
- package/lib/components/Radio/Button/index.ts +0 -1
- package/lib/components/Radio/Button/style.css +0 -43
- package/lib/components/Radio/Group/Group.tsx +0 -105
- package/lib/components/Radio/Group/index.ts +0 -1
- package/lib/components/Radio/Group/style.css +0 -53
- package/lib/components/Radio/Radio.tsx +0 -83
- package/lib/components/Radio/index.ts +0 -1
- package/lib/components/Radio/style.css +0 -73
- package/lib/components/Result/Result.tsx +0 -39
- package/lib/components/Result/index.ts +0 -1
- package/lib/components/Result/style.css +0 -173
- package/lib/components/Select/Option/Option.tsx +0 -49
- package/lib/components/Select/Option/index.ts +0 -1
- package/lib/components/Select/Option/style.css +0 -50
- package/lib/components/Select/Select.tsx +0 -935
- package/lib/components/Select/Tag/Tag.tsx +0 -43
- package/lib/components/Select/Tag/index.ts +0 -1
- package/lib/components/Select/Tag/style.css +0 -87
- package/lib/components/Select/index.ts +0 -1
- package/lib/components/Select/style.css +0 -186
- package/lib/components/Skeleton/Avatar/Avatar.tsx +0 -61
- package/lib/components/Skeleton/Avatar/index.ts +0 -1
- package/lib/components/Skeleton/Avatar/style.css +0 -27
- package/lib/components/Skeleton/Button/Button.tsx +0 -44
- package/lib/components/Skeleton/Button/index.ts +0 -1
- package/lib/components/Skeleton/Button/style.css +0 -50
- package/lib/components/Skeleton/Image/Image.tsx +0 -45
- package/lib/components/Skeleton/Image/index.ts +0 -1
- package/lib/components/Skeleton/Image/style.css +0 -23
- package/lib/components/Skeleton/Input/Input.tsx +0 -42
- package/lib/components/Skeleton/Input/index.ts +0 -1
- package/lib/components/Skeleton/Input/style.css +0 -56
- package/lib/components/Skeleton/Skeleton.tsx +0 -97
- package/lib/components/Skeleton/index.ts +0 -1
- package/lib/components/Skeleton/style.css +0 -84
- package/lib/components/Switch/Switch.tsx +0 -68
- package/lib/components/Switch/index.css +0 -50
- package/lib/components/Switch/index.ts +0 -1
- package/lib/components/Upload/Upload.tsx +0 -291
- package/lib/components/Upload/index.ts +0 -1
- package/lib/components/Upload/style.css +0 -151
- package/lib/global.d.ts +0 -1
- package/lib/helpers/flatten.ts +0 -26
- package/lib/helpers/index.ts +0 -52
- package/lib/helpers/mask.ts +0 -52
- package/lib/hooks/useForm.ts +0 -548
- package/lib/hooks/usePosition.ts +0 -206
- package/lib/hooks/useWatch.ts +0 -41
- package/lib/hooks/useWatchError.ts +0 -20
- package/lib/index.ts +0 -184
- package/lib/styles/global.css +0 -57
- package/lib/types/button.ts +0 -83
- package/lib/types/checkbox.ts +0 -32
- package/lib/types/datepicker.ts +0 -165
- package/lib/types/dropdown.ts +0 -41
- package/lib/types/empty.ts +0 -8
- package/lib/types/form.ts +0 -179
- package/lib/types/index.ts +0 -38
- package/lib/types/input.ts +0 -72
- package/lib/types/menu.ts +0 -55
- package/lib/types/popover.ts +0 -16
- package/lib/types/radio.ts +0 -69
- package/lib/types/result.ts +0 -22
- package/lib/types/select.ts +0 -126
- package/lib/types/skeleton.ts +0 -62
- package/lib/types/switch.ts +0 -22
- package/lib/types/upload.ts +0 -67
- package/lib/utils/index.ts +0 -37
- package/lib/utils/lazy.ts +0 -17
- package/next.config.ts +0 -7
- package/rollup.config.js +0 -71
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +0 -48
- package/src/app/layout.d.ts +0 -5
- package/src/app/layout.tsx +0 -16
- package/src/app/page.d.ts +0 -1
- package/src/app/page.tsx +0 -21
- package/tsconfig.json +0 -46
- /package/dist/{esm/types/components → components}/Button/Button.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Checkbox/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/ConditionalWrapper/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/RangePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/TimePicker/TimePicker.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/TimePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/DatePicker/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Dropdown/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Empty/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/Form.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/Item/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Form/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Icons/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Input/Textarea/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Input/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/Item/Item.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/Menu.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/SubMenu/SubMenu.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Menu/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Popover/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/Group/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Radio/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Result/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Option/Option.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Option/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Select.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Tag/Tag.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/Tag/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Select/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Avatar/Avatar.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Avatar/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Button/Button.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Button/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Image/Image.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Image/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Input/Input.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Input/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Skeleton/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Switch/index.d.ts +0 -0
- /package/dist/{esm/types/components → components}/Upload/index.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/flatten.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/index.d.ts +0 -0
- /package/dist/{esm/types/helpers → helpers}/mask.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useForm.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/usePosition.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useWatch.d.ts +0 -0
- /package/dist/{esm/types/hooks → hooks}/useWatchError.d.ts +0 -0
- /package/dist/{esm/types/types → types}/button.d.ts +0 -0
- /package/dist/{esm/types/types → types}/checkbox.d.ts +0 -0
- /package/dist/{esm/types/types → types}/datepicker.d.ts +0 -0
- /package/dist/{esm/types/types → types}/dropdown.d.ts +0 -0
- /package/dist/{esm/types/types → types}/empty.d.ts +0 -0
- /package/dist/{esm/types/types → types}/form.d.ts +0 -0
- /package/dist/{esm/types/types → types}/index.d.ts +0 -0
- /package/dist/{esm/types/types → types}/input.d.ts +0 -0
- /package/dist/{esm/types/types → types}/menu.d.ts +0 -0
- /package/dist/{esm/types/types → types}/popover.d.ts +0 -0
- /package/dist/{esm/types/types → types}/radio.d.ts +0 -0
- /package/dist/{esm/types/types → types}/result.d.ts +0 -0
- /package/dist/{esm/types/types → types}/select.d.ts +0 -0
- /package/dist/{esm/types/types → types}/skeleton.d.ts +0 -0
- /package/dist/{esm/types/types → types}/switch.d.ts +0 -0
- /package/dist/{esm/types/types → types}/upload.d.ts +0 -0
- /package/dist/{esm/types/utils → utils}/index.d.ts +0 -0
- /package/dist/{esm/types/utils → utils}/lazy.d.ts +0 -0
package/lib/types/select.ts
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeEventHandler,
|
|
3
|
-
CSSProperties,
|
|
4
|
-
FocusEventHandler,
|
|
5
|
-
ForwardedRef,
|
|
6
|
-
Key,
|
|
7
|
-
KeyboardEventHandler,
|
|
8
|
-
MouseEvent,
|
|
9
|
-
MouseEventHandler,
|
|
10
|
-
ReactElement,
|
|
11
|
-
ReactEventHandler,
|
|
12
|
-
ReactNode
|
|
13
|
-
} from 'react';
|
|
14
|
-
import { DefaultProps, Placement, RuleType, RuleTypes, TargetProps } from '.';
|
|
15
|
-
|
|
16
|
-
export type SelectProps = DefaultProps & {
|
|
17
|
-
id?: string;
|
|
18
|
-
searchValue?: string;
|
|
19
|
-
onSearch?: (value: string) => void;
|
|
20
|
-
autoClearSearchValue?: boolean;
|
|
21
|
-
onSelect?: (value: RuleTypes, option?: OptionType) => void;
|
|
22
|
-
onDeselect?: (value: string, option?: OptionType) => void;
|
|
23
|
-
filterOption?: boolean | ((input: string, option: OptionType) => boolean);
|
|
24
|
-
optionFilterProp?: string;
|
|
25
|
-
options?: OptionType[];
|
|
26
|
-
children?: ReactNode;
|
|
27
|
-
defaultActiveFirstOption?: boolean;
|
|
28
|
-
listHeight?: number;
|
|
29
|
-
menuItemSelectedIcon?: ReactNode;
|
|
30
|
-
mode?: 'default' | 'multiple' | 'tags';
|
|
31
|
-
value?: RuleTypes;
|
|
32
|
-
defaultValue?: RuleTypes;
|
|
33
|
-
maxCount?: number;
|
|
34
|
-
onChange?: (e: RuleTypes, option?: OptionType) => void;
|
|
35
|
-
iconClick?: () => void;
|
|
36
|
-
iconClickClear?: boolean;
|
|
37
|
-
onClose?: () => void;
|
|
38
|
-
disabled?: boolean;
|
|
39
|
-
loading?: boolean;
|
|
40
|
-
placeholder?: string;
|
|
41
|
-
allowClear?: boolean;
|
|
42
|
-
filterable?: boolean;
|
|
43
|
-
defaultOpen?: boolean;
|
|
44
|
-
size?: 'small' | 'middle' | 'large';
|
|
45
|
-
onClear?: () => void;
|
|
46
|
-
error?: boolean;
|
|
47
|
-
showSearch?: boolean;
|
|
48
|
-
tagRender?: ((props: CustomTagProps) => ReactElement) | undefined;
|
|
49
|
-
maxTagPlaceholder?:
|
|
50
|
-
| ReactNode
|
|
51
|
-
| ((omittedValues: DisplayValueType[]) => ReactNode);
|
|
52
|
-
dropdownClassName?: string;
|
|
53
|
-
showArrow?: boolean;
|
|
54
|
-
onBlur?: FocusEventHandler<HTMLElement> | undefined;
|
|
55
|
-
onDropdownVisibleChange?: ((open: boolean, selected: RuleType) => void) | undefined;
|
|
56
|
-
showAction?: ('click' | 'focus')[] | undefined;
|
|
57
|
-
suffixIcon?: ReactNode;
|
|
58
|
-
searchIcon?: ReactNode;
|
|
59
|
-
open?: boolean;
|
|
60
|
-
notFoundContent?: ReactNode;
|
|
61
|
-
getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement;
|
|
62
|
-
dropdownRender?: (menu: ReactNode) => ReactNode;
|
|
63
|
-
feedbackIcons?: boolean;
|
|
64
|
-
placement?: Placement;
|
|
65
|
-
removeIcon?: ReactNode;
|
|
66
|
-
maxTagCount?: number | 'responsive',
|
|
67
|
-
ref?: ForwardedRef<HTMLDivElement>,
|
|
68
|
-
closeFromParent?: boolean;
|
|
69
|
-
controlled?: boolean
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
export interface OptionType {
|
|
73
|
-
value: RuleType;
|
|
74
|
-
disabled?: boolean;
|
|
75
|
-
children?: ReactNode;
|
|
76
|
-
className?: string;
|
|
77
|
-
style?: CSSProperties;
|
|
78
|
-
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
79
|
-
render?: (label: string) => ReactNode;
|
|
80
|
-
prefixCls?: string;
|
|
81
|
-
label?: RuleType;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export type CustomTagProps = DefaultProps & {
|
|
85
|
-
label?: ReactNode;
|
|
86
|
-
value?: string;
|
|
87
|
-
onClose?: (e: MouseEvent<HTMLSpanElement> & TargetProps) => void;
|
|
88
|
-
onMouseDown?: MouseEventHandler | undefined;
|
|
89
|
-
onLoadCapture?: ReactEventHandler | undefined;
|
|
90
|
-
closable?: boolean;
|
|
91
|
-
isMaxTag?: boolean;
|
|
92
|
-
color?: string;
|
|
93
|
-
icon?: ReactNode;
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
export type TagProps = DefaultProps & {
|
|
97
|
-
values?: string[];
|
|
98
|
-
onClose: (e: MouseEvent<HTMLSpanElement> & TargetProps) => void;
|
|
99
|
-
icon?: ReactNode;
|
|
100
|
-
closable?: boolean;
|
|
101
|
-
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
102
|
-
onKeyDown?: KeyboardEventHandler<HTMLInputElement>;
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export interface DisplayValueType {
|
|
106
|
-
key?: Key;
|
|
107
|
-
value?: RuleType;
|
|
108
|
-
label?: ReactNode;
|
|
109
|
-
title?: string | number;
|
|
110
|
-
disabled?: boolean;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export interface OptionProps {
|
|
114
|
-
value: RuleType;
|
|
115
|
-
disabled?: boolean;
|
|
116
|
-
children?: ReactNode;
|
|
117
|
-
className?: string;
|
|
118
|
-
style?: CSSProperties;
|
|
119
|
-
onClick?: MouseEventHandler<HTMLDivElement>;
|
|
120
|
-
render?: (label: string) => ReactNode;
|
|
121
|
-
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
122
|
-
prefixCls?: string;
|
|
123
|
-
prefixClsV3?: string;
|
|
124
|
-
selected?: boolean;
|
|
125
|
-
title?: string;
|
|
126
|
-
}
|
package/lib/types/skeleton.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { DefaultProps } from '.';
|
|
3
|
-
|
|
4
|
-
declare type widthUnit = number | string;
|
|
5
|
-
|
|
6
|
-
export interface SkeletonElementProps {
|
|
7
|
-
className?: string;
|
|
8
|
-
style?: CSSProperties;
|
|
9
|
-
size?: 'large' | 'small' | 'default' | number;
|
|
10
|
-
shape?: 'circle' | 'square' | 'round';
|
|
11
|
-
active?: boolean;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export type SkeletonProps = DefaultProps & {
|
|
15
|
-
active?: boolean;
|
|
16
|
-
loading?: boolean;
|
|
17
|
-
className?: string;
|
|
18
|
-
style?: CSSProperties;
|
|
19
|
-
children?: ReactNode;
|
|
20
|
-
avatar?: SkeletonAvatarProps | boolean;
|
|
21
|
-
title?: SkeletonTitleProps | boolean;
|
|
22
|
-
paragraph?: SkeletonParagraphProps | boolean;
|
|
23
|
-
round?: boolean;
|
|
24
|
-
teamLogo?: boolean;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
interface SkeletonTitleProps {
|
|
28
|
-
className?: string;
|
|
29
|
-
style?: CSSProperties;
|
|
30
|
-
width?: number | string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
interface SkeletonParagraphProps {
|
|
34
|
-
className?: string;
|
|
35
|
-
style?: CSSProperties;
|
|
36
|
-
width?: widthUnit | Array<widthUnit>;
|
|
37
|
-
rows?: number;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export type SkeletonAvatarProps = Omit<SkeletonElementProps, 'shape'> &
|
|
41
|
-
DefaultProps & {
|
|
42
|
-
shape?: 'circle' | 'square';
|
|
43
|
-
active?: boolean;
|
|
44
|
-
applyElementStyle?: boolean;
|
|
45
|
-
wrapperStyle?: CSSProperties;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export type SkeletonImageProps = DefaultProps &
|
|
49
|
-
Omit<SkeletonElementProps, 'size' | 'shape' | 'active'>;
|
|
50
|
-
|
|
51
|
-
export type SkeletonInputProps = Omit<SkeletonElementProps, 'size' | 'shape'> &
|
|
52
|
-
DefaultProps & {
|
|
53
|
-
size?: 'large' | 'small' | 'default';
|
|
54
|
-
block?: boolean;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
export type SkeletonButtonProps = Omit<SkeletonElementProps, 'size'> &
|
|
58
|
-
DefaultProps & {
|
|
59
|
-
size?: 'large' | 'small' | 'default';
|
|
60
|
-
block?: boolean;
|
|
61
|
-
applyElementStyle?: boolean;
|
|
62
|
-
};
|
package/lib/types/switch.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ReactNode
|
|
3
|
-
} from 'react';
|
|
4
|
-
import { DefaultProps } from '.';
|
|
5
|
-
|
|
6
|
-
export type SwitchProps = DefaultProps & {
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onChange?: (value: boolean) => void;
|
|
9
|
-
onClick?: (value: boolean) => void;
|
|
10
|
-
value?: boolean;
|
|
11
|
-
tabIndex?: number;
|
|
12
|
-
name?: string;
|
|
13
|
-
children?: ReactNode;
|
|
14
|
-
id?: string;
|
|
15
|
-
autoFocus?: boolean;
|
|
16
|
-
type?: string;
|
|
17
|
-
skipGroup?: boolean;
|
|
18
|
-
required?: boolean;
|
|
19
|
-
defaultChecked?: boolean;
|
|
20
|
-
checked?: boolean;
|
|
21
|
-
controlled?: boolean;
|
|
22
|
-
};
|
package/lib/types/upload.ts
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { DefaultProps, RuleType } from '.';
|
|
2
|
-
|
|
3
|
-
export interface RcFile extends File {
|
|
4
|
-
uid: string;
|
|
5
|
-
lastModifiedDate: Date;
|
|
6
|
-
webkitRelativePath: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type UploadFile<RcFile> = {
|
|
10
|
-
originFileObj: RcFile;
|
|
11
|
-
uid: string;
|
|
12
|
-
name: string;
|
|
13
|
-
status?: 'uploading' | 'done' | 'error' | 'removed';
|
|
14
|
-
percent?: number;
|
|
15
|
-
url?: string;
|
|
16
|
-
file?: RcFile;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type UploadChangeParam = {
|
|
20
|
-
file: UploadFile<RuleType>;
|
|
21
|
-
fileList: UploadFile<RuleType>[];
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export type UploadProps = DefaultProps & {
|
|
25
|
-
type?: string;
|
|
26
|
-
name?: string;
|
|
27
|
-
defaultFileList?: UploadFile<RuleType>[];
|
|
28
|
-
fileList?: UploadFile<RuleType>[];
|
|
29
|
-
action?:
|
|
30
|
-
| string
|
|
31
|
-
| ((file: RcFile) => string)
|
|
32
|
-
| ((file: RcFile) => PromiseLike<string>);
|
|
33
|
-
directory?: boolean;
|
|
34
|
-
data?:
|
|
35
|
-
| Record<string, unknown>
|
|
36
|
-
| ((
|
|
37
|
-
file: UploadFile<RuleType>
|
|
38
|
-
) => Record<string, unknown> | Promise<Record<string, unknown>>);
|
|
39
|
-
method?: 'POST' | 'PUT' | 'PATCH';
|
|
40
|
-
headers?: Record<string, string>;
|
|
41
|
-
showUploadList?: boolean;
|
|
42
|
-
multiple?: boolean;
|
|
43
|
-
accept?: string;
|
|
44
|
-
beforeUpload?: (file: RcFile, fileList: File[]) => boolean | Promise<boolean>;
|
|
45
|
-
onChange?: (info: UploadChangeParam) => void;
|
|
46
|
-
onDrop?: (event: React.DragEvent<HTMLDivElement>) => void;
|
|
47
|
-
listType?: string;
|
|
48
|
-
className?: string;
|
|
49
|
-
rootClassName?: string;
|
|
50
|
-
onPreview?: (file: UploadFile<RuleType>) => void;
|
|
51
|
-
onDownload?: (file: UploadFile<RuleType>) => void;
|
|
52
|
-
onRemove?: (
|
|
53
|
-
file: UploadFile<RuleType>
|
|
54
|
-
) => void | boolean | Promise<void | boolean>;
|
|
55
|
-
disabled?: boolean;
|
|
56
|
-
style?: React.CSSProperties;
|
|
57
|
-
customRequest?: (options: {
|
|
58
|
-
file: RcFile;
|
|
59
|
-
onSuccess: (response: RuleType) => void;
|
|
60
|
-
onError: (error: RuleType) => void;
|
|
61
|
-
onProgress: (event: ProgressEvent) => void;
|
|
62
|
-
}) => void;
|
|
63
|
-
withCredentials?: boolean;
|
|
64
|
-
openFileDialogOnClick?: boolean;
|
|
65
|
-
maxCount?: number;
|
|
66
|
-
children?: React.ReactNode;
|
|
67
|
-
};
|
package/lib/utils/index.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export const prefixClsForm = 'xUi-form';
|
|
2
|
-
export const prefixClsFormItem = 'xUi-form-item';
|
|
3
|
-
export const prefixClsEmpty = 'xUi-empty';
|
|
4
|
-
export const prefixClsInput = 'xUi-input';
|
|
5
|
-
export const prefixClsSelect = 'xUi-select';
|
|
6
|
-
export const prefixClsCheckbox = 'xUi-checkbox';
|
|
7
|
-
export const prefixClsSwitch = 'xUi-switch';
|
|
8
|
-
export const prefixClsRadio = 'xUi-radio';
|
|
9
|
-
export const prefixClsTextArea = 'xUi-textarea';
|
|
10
|
-
export const prefixClsUpload = 'xUi-upload';
|
|
11
|
-
export const prefixClsDatePicker = 'xUi-datepicker';
|
|
12
|
-
export const prefixClsRangePicker = 'xUi-rangepicker';
|
|
13
|
-
export const prefixClsTimePicker = 'xUi-timepicker';
|
|
14
|
-
export const prefixClsButton = 'xUi-button';
|
|
15
|
-
export const prefixClsSkeleton = 'xUi-skeleton';
|
|
16
|
-
export const prefixClsMenu = 'xUi-menu';
|
|
17
|
-
export const prefixClsDropdown = 'xUi-dropdown';
|
|
18
|
-
export const prefixClsPopover = 'xUi-popover';
|
|
19
|
-
export const prefixClsResult = 'xUi-result';
|
|
20
|
-
|
|
21
|
-
export const prefixClsFormV3 = 'v3-form';
|
|
22
|
-
export const prefixClsFormItemV3 = 'v3-form-item';
|
|
23
|
-
export const prefixClsEmptyV3 = 'v3-empty';
|
|
24
|
-
export const prefixClsInputV3 = 'v3-input';
|
|
25
|
-
export const prefixClsSelectV3 = 'v3-select';
|
|
26
|
-
export const prefixClsCheckboxV3 = 'v3-checkbox-input';
|
|
27
|
-
export const prefixClsSwitchV3 = 'v3-switch';
|
|
28
|
-
export const prefixClsRadioV3 = 'v3-radio';
|
|
29
|
-
export const prefixClsTextAreaV3 = 'v3-textarea';
|
|
30
|
-
export const prefixClsButtonV3 = 'v3-btn';
|
|
31
|
-
export const prefixClsUploadV3 = 'v3-upload';
|
|
32
|
-
|
|
33
|
-
// non updates
|
|
34
|
-
export const prefixClsSkeletonV3 = 'v3-skeleton';
|
|
35
|
-
export const prefixClsDatePickerV3 = 'v3-datepicker';
|
|
36
|
-
export const prefixClsRangePickerV3 = 'v3-rangepicker';
|
|
37
|
-
export const prefixClsTimePickerV3 = 'v3-timepicker';
|
package/lib/utils/lazy.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RuleType } from '../types';
|
|
2
|
-
import { ComponentType, lazy as lazily } from 'react';
|
|
3
|
-
|
|
4
|
-
export const lazy = <T extends {}, U extends keyof T>(
|
|
5
|
-
loader: (x?: string) => Promise<T>
|
|
6
|
-
): T =>
|
|
7
|
-
new Proxy({} as unknown as T, {
|
|
8
|
-
get: (target, componentName: string | symbol) => {
|
|
9
|
-
if (typeof componentName === 'string') {
|
|
10
|
-
return lazily(() =>
|
|
11
|
-
loader(componentName).then(x => ({
|
|
12
|
-
default: x[componentName as U] as RuleType as ComponentType<RuleType>
|
|
13
|
-
}))
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
});
|
package/next.config.ts
DELETED
package/rollup.config.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
// rollup.config.js
|
|
2
|
-
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
|
|
3
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
4
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
5
|
-
import typescript from '@rollup/plugin-typescript';
|
|
6
|
-
import postcss from 'rollup-plugin-postcss';
|
|
7
|
-
import babel from '@rollup/plugin-babel';
|
|
8
|
-
|
|
9
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
10
|
-
const dts = require('rollup-plugin-dts').default;
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
12
|
-
const packageJson = require('./package.json');
|
|
13
|
-
|
|
14
|
-
// eslint-disable-next-line import/no-anonymous-default-export
|
|
15
|
-
export default [
|
|
16
|
-
{
|
|
17
|
-
input: 'lib/index.ts',
|
|
18
|
-
inlineDynamicImports: true,
|
|
19
|
-
external: ["react", /^react\/.*/, "react-dom", /react-dom\/.*/],
|
|
20
|
-
output: [
|
|
21
|
-
{
|
|
22
|
-
file: packageJson.main,
|
|
23
|
-
format: 'cjs',
|
|
24
|
-
sourcemap: true,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
file: packageJson.module,
|
|
28
|
-
format: 'esm',
|
|
29
|
-
sourcemap: true
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
plugins: [
|
|
33
|
-
peerDepsExternal(),
|
|
34
|
-
resolve({
|
|
35
|
-
extensions: ['.mjs', '.js', '.jsx', '.json', '.ts', '.tsx', '.css'],
|
|
36
|
-
}),
|
|
37
|
-
commonjs(),
|
|
38
|
-
typescript({
|
|
39
|
-
outputToFilesystem: false,
|
|
40
|
-
tsconfig: './tsconfig.json',
|
|
41
|
-
paths: {
|
|
42
|
-
"@/*": ["lib/*"]
|
|
43
|
-
}
|
|
44
|
-
}),
|
|
45
|
-
babel({
|
|
46
|
-
babelHelpers: 'bundled',
|
|
47
|
-
extensions: ['.js', '.jsx', '.ts', '.tsx'],
|
|
48
|
-
presets: ['@babel/preset-react', '@babel/preset-typescript']
|
|
49
|
-
}),
|
|
50
|
-
postcss({
|
|
51
|
-
inject: true,
|
|
52
|
-
minimize: true,
|
|
53
|
-
modules: false
|
|
54
|
-
})
|
|
55
|
-
]
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
// Generate .d.ts files
|
|
59
|
-
input: 'dist/esm/types/index.d.ts',
|
|
60
|
-
output: [
|
|
61
|
-
{
|
|
62
|
-
file: 'dist/index.d.ts',
|
|
63
|
-
format: 'es'
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
plugins: [
|
|
67
|
-
dts()
|
|
68
|
-
],
|
|
69
|
-
external: [/\.css/]
|
|
70
|
-
},
|
|
71
|
-
];
|
package/src/app/favicon.ico
DELETED
|
Binary file
|
package/src/app/globals.css
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
/* MAIN */
|
|
3
|
-
--xui-color-hover: #f5f5f5;
|
|
4
|
-
--xui-color-disabled: #e6e6e6;
|
|
5
|
-
|
|
6
|
-
--xui-primary-color: #1677ff;
|
|
7
|
-
--xui-primary-color-hover: #0267ff;
|
|
8
|
-
--xui-primary-color-light: #40a9ff;
|
|
9
|
-
|
|
10
|
-
--xui-text-color: rgba(0, 0, 0, 0.88);
|
|
11
|
-
--xui-text-color-light: rgba(0, 0, 0, 0.5);
|
|
12
|
-
|
|
13
|
-
--xui-error-color: #ff4d4f;
|
|
14
|
-
--xui-error-color-light: #ff6668;
|
|
15
|
-
--xui-success-color: #52c41a;
|
|
16
|
-
|
|
17
|
-
--xui-background-color: #ffffff;
|
|
18
|
-
|
|
19
|
-
/* FONTS */
|
|
20
|
-
--xui-font-size-xs: 12px;
|
|
21
|
-
--xui-font-size-sm: 14px;
|
|
22
|
-
--xui-font-size-md: 14px;
|
|
23
|
-
--xui-font-size-lg: 16px;
|
|
24
|
-
|
|
25
|
-
/* BORDERS */
|
|
26
|
-
--xui-border-radius-sm: 4px;
|
|
27
|
-
--xui-border-radius-md: 4px;
|
|
28
|
-
--xui-border-radius-lg: 6px;
|
|
29
|
-
|
|
30
|
-
--xui-border-color: #d9d9d9;
|
|
31
|
-
|
|
32
|
-
/* SELECT */
|
|
33
|
-
--xui-select-primary-color: var(--xui-primary-color);
|
|
34
|
-
--xui-select-background-color: var(--xui-background-color);
|
|
35
|
-
|
|
36
|
-
/* MENU */
|
|
37
|
-
--xui-menu-inline-bg: rgba(0, 0, 0, 0.02);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
html {
|
|
41
|
-
font-family: sans-serif;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.globalEllipsis {
|
|
45
|
-
text-overflow: ellipsis;
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
white-space: nowrap;
|
|
48
|
-
}
|
package/src/app/layout.d.ts
DELETED
package/src/app/layout.tsx
DELETED
package/src/app/page.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function Home(): import("react/jsx-runtime").JSX.Element;
|
package/src/app/page.tsx
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
|
|
3
|
-
import Input from "../../lib/components/Input/Input";
|
|
4
|
-
import { useEffect, useRef } from "react";
|
|
5
|
-
|
|
6
|
-
export default function Home() {
|
|
7
|
-
const ref = useRef<any>(null);
|
|
8
|
-
|
|
9
|
-
useEffect(() => {
|
|
10
|
-
if (ref.current) {
|
|
11
|
-
console.log(ref.current);
|
|
12
|
-
|
|
13
|
-
ref.current?.focus();
|
|
14
|
-
}
|
|
15
|
-
}, [])
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<Input ref={ref} />
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
package/tsconfig.json
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"declaration": true,
|
|
4
|
-
"declarationDir": "dist/esm/types",
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"target": "ESNext",
|
|
7
|
-
"emitDeclarationOnly": true,
|
|
8
|
-
"outDir": "./dist",
|
|
9
|
-
"moduleResolution": "node",
|
|
10
|
-
"jsx": "preserve",
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"strict": true,
|
|
15
|
-
"rootDir": "lib",
|
|
16
|
-
"baseUrl": "./",
|
|
17
|
-
"paths": {
|
|
18
|
-
"@/*": [
|
|
19
|
-
"./lib/*"
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
"allowJs": true,
|
|
23
|
-
"incremental": true,
|
|
24
|
-
"resolveJsonModule": true,
|
|
25
|
-
"isolatedModules": true,
|
|
26
|
-
"plugins": [
|
|
27
|
-
{
|
|
28
|
-
"name": "next"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"lib": [
|
|
32
|
-
"dom",
|
|
33
|
-
"dom.iterable",
|
|
34
|
-
"esnext"
|
|
35
|
-
],
|
|
36
|
-
"noEmit": true
|
|
37
|
-
},
|
|
38
|
-
"include": [
|
|
39
|
-
"lib",
|
|
40
|
-
"lib/global.d.ts",
|
|
41
|
-
".next/types/**/*.ts"
|
|
42
|
-
],
|
|
43
|
-
"exclude": [
|
|
44
|
-
"node_modules"
|
|
45
|
-
]
|
|
46
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|