x-ui-design 1.0.31-gamma.1 → 1.0.31
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/.github/workflows/x-ui-design.yml +14 -0
- package/README.md +22 -1
- package/compile.sh +15 -0
- package/dist/{components → esm/types/components}/DatePicker/DatePicker.d.ts +2 -1
- package/dist/{components → esm/types/components}/DatePicker/RangePicker/RangePicker.d.ts +2 -1
- package/dist/{components → esm/types/components}/Dropdown/Dropdown.d.ts +2 -1
- package/dist/{components → esm/types/components}/Empty/Empty.d.ts +2 -1
- package/dist/{components → esm/types/components}/Form/Item/Item.d.ts +2 -1
- package/dist/esm/types/components/Icons/Icons.d.ts +19 -0
- package/dist/esm/types/components/Input/Input.d.ts +16 -0
- package/dist/{components → esm/types/components}/Input/Textarea/Textarea.d.ts +2 -1
- package/dist/{components → esm/types/components}/Popover/Popover.d.ts +2 -1
- package/dist/{components → esm/types/components}/Radio/Button/Button.d.ts +2 -1
- package/dist/{components → esm/types/components}/Radio/Group/Group.d.ts +2 -1
- package/dist/{components → esm/types/components}/Radio/Radio.d.ts +2 -1
- package/dist/{components → esm/types/components}/Result/Result.d.ts +2 -1
- package/dist/{components → esm/types/components}/Switch/Switch.d.ts +2 -1
- package/dist/{components → esm/types/components}/Upload/Upload.d.ts +2 -1
- package/dist/esm/types/index.d.ts +56 -0
- package/dist/index.d.ts +150 -1
- package/dist/index.esm.js +4209 -3779
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +4325 -3895
- package/dist/index.js.map +1 -1
- package/eslint.config.mjs +16 -0
- package/lib/components/Button/Button.tsx +136 -0
- package/lib/components/Button/index.ts +1 -0
- package/lib/components/Button/style.css +197 -0
- package/lib/components/Checkbox/Checkbox.tsx +131 -0
- package/lib/components/Checkbox/index.ts +1 -0
- package/lib/components/Checkbox/style.css +95 -0
- package/lib/components/ConditionalWrapper/index.tsx +12 -0
- package/lib/components/DatePicker/DatePicker.tsx +526 -0
- package/lib/components/DatePicker/RangePicker/RangePicker.tsx +500 -0
- package/lib/components/DatePicker/RangePicker/index.ts +1 -0
- package/lib/components/DatePicker/RangePicker/style.css +434 -0
- package/lib/components/DatePicker/TimePicker/TimePicker.tsx +497 -0
- package/lib/components/DatePicker/TimePicker/index.ts +1 -0
- package/lib/components/DatePicker/TimePicker/style.css +197 -0
- package/lib/components/DatePicker/index.ts +1 -0
- package/lib/components/DatePicker/style.css +318 -0
- package/lib/components/Dropdown/Dropdown.tsx +234 -0
- package/lib/components/Dropdown/index.ts +1 -0
- package/lib/components/Dropdown/style.css +124 -0
- package/lib/components/Empty/Empty.tsx +45 -0
- package/lib/components/Empty/index.ts +1 -0
- package/lib/components/Empty/style.css +13 -0
- package/lib/components/Form/Form.tsx +130 -0
- package/lib/components/Form/Item/Item.tsx +294 -0
- package/lib/components/Form/Item/index.ts +1 -0
- package/lib/components/Form/Item/style.css +61 -0
- package/lib/components/Form/index.ts +1 -0
- package/lib/components/Icons/Icons.tsx +433 -0
- package/lib/components/Icons/index.ts +15 -0
- package/lib/components/Input/Input.tsx +228 -0
- package/lib/components/Input/Textarea/Textarea.tsx +110 -0
- package/lib/components/Input/Textarea/index.ts +1 -0
- package/lib/components/Input/Textarea/style.css +104 -0
- package/lib/components/Input/index.ts +1 -0
- package/lib/components/Input/style.css +137 -0
- package/lib/components/Menu/Item/Item.tsx +65 -0
- package/lib/components/Menu/Menu.tsx +261 -0
- package/lib/components/Menu/SubMenu/SubMenu.tsx +68 -0
- package/lib/components/Menu/index.css +145 -0
- package/lib/components/Menu/index.ts +1 -0
- package/lib/components/Popover/Popover.tsx +135 -0
- package/lib/components/Popover/index.ts +1 -0
- package/lib/components/Popover/style.css +82 -0
- package/lib/components/Radio/Button/Button.tsx +42 -0
- package/lib/components/Radio/Button/index.ts +1 -0
- package/lib/components/Radio/Button/style.css +43 -0
- package/lib/components/Radio/Group/Group.tsx +105 -0
- package/lib/components/Radio/Group/index.ts +1 -0
- package/lib/components/Radio/Group/style.css +53 -0
- package/lib/components/Radio/Radio.tsx +83 -0
- package/lib/components/Radio/index.ts +1 -0
- package/lib/components/Radio/style.css +73 -0
- package/lib/components/Result/Result.tsx +39 -0
- package/lib/components/Result/index.ts +1 -0
- package/lib/components/Result/style.css +173 -0
- package/lib/components/Select/Option/Option.tsx +49 -0
- package/lib/components/Select/Option/index.ts +1 -0
- package/lib/components/Select/Option/style.css +50 -0
- package/lib/components/Select/Select.tsx +935 -0
- package/lib/components/Select/Tag/Tag.tsx +43 -0
- package/lib/components/Select/Tag/index.ts +1 -0
- package/lib/components/Select/Tag/style.css +87 -0
- package/lib/components/Select/index.ts +1 -0
- package/lib/components/Select/style.css +186 -0
- package/lib/components/Skeleton/Avatar/Avatar.tsx +61 -0
- package/lib/components/Skeleton/Avatar/index.ts +1 -0
- package/lib/components/Skeleton/Avatar/style.css +27 -0
- package/lib/components/Skeleton/Button/Button.tsx +44 -0
- package/lib/components/Skeleton/Button/index.ts +1 -0
- package/lib/components/Skeleton/Button/style.css +50 -0
- package/lib/components/Skeleton/Image/Image.tsx +45 -0
- package/lib/components/Skeleton/Image/index.ts +1 -0
- package/lib/components/Skeleton/Image/style.css +23 -0
- package/lib/components/Skeleton/Input/Input.tsx +42 -0
- package/lib/components/Skeleton/Input/index.ts +1 -0
- package/lib/components/Skeleton/Input/style.css +56 -0
- package/lib/components/Skeleton/Skeleton.tsx +97 -0
- package/lib/components/Skeleton/index.ts +1 -0
- package/lib/components/Skeleton/style.css +84 -0
- package/lib/components/Switch/Switch.tsx +68 -0
- package/lib/components/Switch/index.css +50 -0
- package/lib/components/Switch/index.ts +1 -0
- package/lib/components/Upload/Upload.tsx +291 -0
- package/lib/components/Upload/index.ts +1 -0
- package/lib/components/Upload/style.css +151 -0
- package/lib/global.d.ts +1 -0
- package/lib/helpers/flatten.ts +26 -0
- package/lib/helpers/index.ts +52 -0
- package/lib/helpers/mask.ts +52 -0
- package/lib/hooks/useForm.ts +548 -0
- package/lib/hooks/usePosition.ts +206 -0
- package/lib/hooks/useWatch.ts +41 -0
- package/lib/hooks/useWatchError.ts +20 -0
- package/lib/index.ts +184 -0
- package/lib/styles/global.css +57 -0
- package/lib/types/button.ts +83 -0
- package/lib/types/checkbox.ts +32 -0
- package/lib/types/datepicker.ts +165 -0
- package/lib/types/dropdown.ts +41 -0
- package/lib/types/empty.ts +8 -0
- package/lib/types/form.ts +179 -0
- package/lib/types/index.ts +38 -0
- package/lib/types/input.ts +72 -0
- package/lib/types/menu.ts +55 -0
- package/lib/types/popover.ts +16 -0
- package/lib/types/radio.ts +69 -0
- package/lib/types/result.ts +22 -0
- package/lib/types/select.ts +126 -0
- package/lib/types/skeleton.ts +62 -0
- package/lib/types/switch.ts +22 -0
- package/lib/types/upload.ts +67 -0
- package/lib/utils/index.ts +37 -0
- package/lib/utils/lazy.ts +17 -0
- package/next.config.ts +7 -0
- package/package.json +20 -22
- package/rollup.config.js +71 -0
- package/src/app/favicon.ico +0 -0
- package/src/app/globals.css +48 -0
- package/src/app/layout.d.ts +5 -0
- package/src/app/layout.tsx +16 -0
- package/src/app/page.d.ts +1 -0
- package/src/app/page.tsx +21 -0
- package/tsconfig.json +46 -0
- package/dist/components/Icons/Icons.d.ts +0 -18
- package/dist/components/Input/Input.d.ts +0 -11
- /package/dist/{components → esm/types/components}/Button/Button.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Button/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Checkbox/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/ConditionalWrapper/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/RangePicker/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/TimePicker/TimePicker.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/TimePicker/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/DatePicker/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Dropdown/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Empty/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Form/Form.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Form/Item/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Form/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Icons/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Input/Textarea/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Input/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/Item/Item.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/Menu.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/SubMenu/SubMenu.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Menu/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Popover/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Radio/Button/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Radio/Group/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Radio/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Result/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Option/Option.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Option/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Select.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Tag/Tag.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/Tag/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Select/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Avatar/Avatar.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Avatar/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Button/Button.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Button/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Image/Image.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Image/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Input/Input.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Input/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/Skeleton.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Skeleton/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Switch/index.d.ts +0 -0
- /package/dist/{components → esm/types/components}/Upload/index.d.ts +0 -0
- /package/dist/{helpers → esm/types/helpers}/flatten.d.ts +0 -0
- /package/dist/{helpers → esm/types/helpers}/index.d.ts +0 -0
- /package/dist/{helpers → esm/types/helpers}/mask.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/useForm.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/usePosition.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/useWatch.d.ts +0 -0
- /package/dist/{hooks → esm/types/hooks}/useWatchError.d.ts +0 -0
- /package/dist/{types → esm/types/types}/button.d.ts +0 -0
- /package/dist/{types → esm/types/types}/checkbox.d.ts +0 -0
- /package/dist/{types → esm/types/types}/datepicker.d.ts +0 -0
- /package/dist/{types → esm/types/types}/dropdown.d.ts +0 -0
- /package/dist/{types → esm/types/types}/empty.d.ts +0 -0
- /package/dist/{types → esm/types/types}/form.d.ts +0 -0
- /package/dist/{types → esm/types/types}/index.d.ts +0 -0
- /package/dist/{types → esm/types/types}/input.d.ts +0 -0
- /package/dist/{types → esm/types/types}/menu.d.ts +0 -0
- /package/dist/{types → esm/types/types}/popover.d.ts +0 -0
- /package/dist/{types → esm/types/types}/radio.d.ts +0 -0
- /package/dist/{types → esm/types/types}/result.d.ts +0 -0
- /package/dist/{types → esm/types/types}/select.d.ts +0 -0
- /package/dist/{types → esm/types/types}/skeleton.d.ts +0 -0
- /package/dist/{types → esm/types/types}/switch.d.ts +0 -0
- /package/dist/{types → esm/types/types}/upload.d.ts +0 -0
- /package/dist/{utils → esm/types/utils}/index.d.ts +0 -0
- /package/dist/{utils → esm/types/utils}/lazy.d.ts +0 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
This is a [
|
|
1
|
+
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app).
|
|
2
2
|
|
|
3
3
|
## Getting Started
|
|
4
4
|
|
|
@@ -13,3 +13,24 @@ pnpm dev
|
|
|
13
13
|
# or
|
|
14
14
|
bun dev
|
|
15
15
|
```
|
|
16
|
+
|
|
17
|
+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
|
|
18
|
+
|
|
19
|
+
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file.
|
|
20
|
+
|
|
21
|
+
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel.
|
|
22
|
+
|
|
23
|
+
## Learn More
|
|
24
|
+
|
|
25
|
+
To learn more about Next.js, take a look at the following resources:
|
|
26
|
+
|
|
27
|
+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
|
|
28
|
+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
|
|
29
|
+
|
|
30
|
+
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome!
|
|
31
|
+
|
|
32
|
+
## Deploy on Vercel
|
|
33
|
+
|
|
34
|
+
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
|
|
35
|
+
|
|
36
|
+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details.
|
package/compile.sh
ADDED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TDatePickerProps } from '../../types/datepicker';
|
|
2
3
|
import './style.css';
|
|
3
4
|
export declare const NUMBER_SIX = 6;
|
|
4
5
|
export declare const MONTH_LENGTH = 11;
|
|
5
6
|
export declare const NEXT_DAYS_COUNT_AS_CURRENT_MUNTH = 35;
|
|
6
|
-
declare const DatePicker: ({ value, onChange, onCalendarChange, disabled, error, placeholder, prefixCls, noStyle, feedbackIcons, locale, className, placement, defaultValue, size, format, getPopupContainer, showToday, allowClear, disabledDate, suffixIcon, picker, prefix, defaultOpen, inputReadOnly, bordered, defaultPickerValue }: TDatePickerProps) =>
|
|
7
|
+
declare const DatePicker: ({ value, onChange, onCalendarChange, disabled, error, placeholder, prefixCls, noStyle, feedbackIcons, locale, className, placement, defaultValue, size, format, getPopupContainer, showToday, allowClear, disabledDate, suffixIcon, picker, prefix, defaultOpen, inputReadOnly, bordered, defaultPickerValue }: TDatePickerProps) => React.JSX.Element;
|
|
7
8
|
export default DatePicker;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TRangePickerProps } from '../../../types/datepicker';
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, onVisibleChange, onCalendarChange, style, className, separator, defaultValue, bordered, getPopupContainer, placement }: TRangePickerProps) =>
|
|
4
|
+
declare const RangePicker: ({ prefixCls, value, onChange, placeholder, disabled, error, format, prefix, allowClear, inputReadOnly, size, picker, locale, disabledDate, onVisibleChange, onCalendarChange, style, className, separator, defaultValue, bordered, getPopupContainer, placement }: TRangePickerProps) => React.JSX.Element;
|
|
4
5
|
export default RangePicker;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { DropdownProps } from '../../types/dropdown';
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const Dropdown: ({ children, menu, open: controlledOpen, defaultOpen, onVisibleChange, trigger, placement, overlayClassName, overlayStyle, getPopupContainer, destroyOnHidden, disabled, arrow, autoFocus, popupRender, className, overlay, prefixCls, }: DropdownProps) =>
|
|
4
|
+
declare const Dropdown: ({ children, menu, open: controlledOpen, defaultOpen, onVisibleChange, trigger, placement, overlayClassName, overlayStyle, getPopupContainer, destroyOnHidden, disabled, arrow, autoFocus, popupRender, className, overlay, prefixCls, }: DropdownProps) => React.JSX.Element;
|
|
4
5
|
export default Dropdown;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { EmptyContentProps } from '../../types/empty';
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const EmptyContent: ({ icon, style, className, title, description, prefixCls, prefixClsV3 }: EmptyContentProps) =>
|
|
4
|
+
declare const EmptyContent: ({ icon, style, className, title, description, prefixCls, prefixClsV3 }: EmptyContentProps) => React.JSX.Element;
|
|
4
5
|
export default EmptyContent;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { FormItemProps } from '../../../types/form';
|
|
2
3
|
import './style.css';
|
|
3
4
|
declare const FormItem: {
|
|
4
|
-
({ prefixCls, prefixClsV3, name, label, rules, children, className, layout, style, dependencies, initialValue, feedbackIcons, extra, hideLabel, removeErrorMessageHeight, ...props }: FormItemProps):
|
|
5
|
+
({ prefixCls, prefixClsV3, name, label, rules, children, className, layout, style, dependencies, initialValue, feedbackIcons, extra, hideLabel, removeErrorMessageHeight, ...props }: FormItemProps): React.JSX.Element;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
7
8
|
export default FormItem;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResultStatusType } from '../../types/result';
|
|
3
|
+
declare const ClearIcon: () => React.JSX.Element;
|
|
4
|
+
declare const ArrowIcon: ({ isOpen }: {
|
|
5
|
+
isOpen: boolean;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
declare const LoadingIcon: () => React.JSX.Element;
|
|
8
|
+
declare const CheckIcon: () => React.JSX.Element;
|
|
9
|
+
declare const SearchIcon: () => React.JSX.Element;
|
|
10
|
+
declare const CalendarIcon: () => React.JSX.Element;
|
|
11
|
+
declare const SuccessIcon: () => React.JSX.Element;
|
|
12
|
+
declare const ErrorIcon: () => React.JSX.Element;
|
|
13
|
+
declare const DateDistanceIcon: () => React.JSX.Element;
|
|
14
|
+
declare const TimeIcon: () => React.JSX.Element;
|
|
15
|
+
declare const StampleIcon: () => React.JSX.Element;
|
|
16
|
+
declare const TrashIcon: () => React.JSX.Element;
|
|
17
|
+
declare const SpinerIcon: () => React.JSX.Element;
|
|
18
|
+
declare const renderDefaultIcon: (status: ResultStatusType) => React.JSX.Element | null;
|
|
19
|
+
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, renderDefaultIcon };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputProps } from '../../types/input';
|
|
3
|
+
import Textarea from './Textarea/Textarea';
|
|
4
|
+
import './style.css';
|
|
5
|
+
type InputHandle = {
|
|
6
|
+
focus: () => void;
|
|
7
|
+
input: HTMLInputElement | null;
|
|
8
|
+
blur: () => void;
|
|
9
|
+
nativeElement: HTMLInputElement | null;
|
|
10
|
+
setSelectionRange: (start: number, end: number) => void;
|
|
11
|
+
};
|
|
12
|
+
declare const InputComponent: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<InputHandle>>;
|
|
13
|
+
declare const Input: typeof InputComponent & {
|
|
14
|
+
TextArea: typeof Textarea;
|
|
15
|
+
};
|
|
16
|
+
export default Input;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { TextareaProps } from '../../../types/input';
|
|
2
3
|
import './style.css';
|
|
3
4
|
declare const Textarea: {
|
|
4
|
-
({ prefixCls, prefixClsV3, value, className, style, autoSize, onPressEnter, onResize, styles, bordered, size, status, rootClassName, variant, error, allowClear, ref, ...props }: TextareaProps):
|
|
5
|
+
({ prefixCls, prefixClsV3, value, className, style, autoSize, onPressEnter, onResize, styles, bordered, size, status, rootClassName, variant, error, allowClear, ref, ...props }: TextareaProps): React.JSX.Element;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
7
8
|
export default Textarea;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { PopoverProps } from "../../types/popover";
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const Popover: ({ prefixCls, content, children, trigger, placement, open, visible, title, style, overlayClassName, overlayStyle, onVisibleChange, getPopupContainer }: PopoverProps) =>
|
|
4
|
+
declare const Popover: ({ prefixCls, content, children, trigger, placement, open, visible, title, style, overlayClassName, overlayStyle, onVisibleChange, getPopupContainer }: PopoverProps) => React.JSX.Element;
|
|
4
5
|
export default Popover;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { RadioButtonProps } from '../../../types/radio';
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const RadioButton: ({ prefixCls, prefixClsV3, className, checked, disabled, children, size, ...props }: RadioButtonProps) =>
|
|
4
|
+
declare const RadioButton: ({ prefixCls, prefixClsV3, className, checked, disabled, children, size, ...props }: RadioButtonProps) => React.JSX.Element;
|
|
4
5
|
export default RadioButton;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { RadioGroupProps } from '../../../types/radio';
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const RadioGroup: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, prefixClsV3, className, options, children, ...props }: RadioGroupProps) =>
|
|
4
|
+
declare const RadioGroup: ({ defaultValue, value, size, disabled, name, id, style, buttonStyle, block, prefixCls, prefixClsV3, className, options, children, ...props }: RadioGroupProps) => React.JSX.Element;
|
|
4
5
|
export default RadioGroup;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { RadioProps } from '../../types/radio';
|
|
2
3
|
import './style.css';
|
|
3
4
|
declare const Radio: {
|
|
4
|
-
({ prefixCls, className, value, onChange, onClick, disabled, children, name, title, defaultChecked, checked, onBlur, onFocus, onMouseEnter, onMouseLeave, noStyle, ref }: RadioProps):
|
|
5
|
+
({ prefixCls, className, value, onChange, onClick, disabled, children, name, title, defaultChecked, checked, onBlur, onFocus, onMouseEnter, onMouseLeave, noStyle, ref }: RadioProps): React.JSX.Element;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
7
8
|
export default Radio;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ResultProps } from "../../types/result";
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const Result: ({ icon, status, title, subTitle, extra, prefixCls, className, style, children, }: ResultProps) =>
|
|
4
|
+
declare const Result: ({ icon, status, title, subTitle, extra, prefixCls, className, style, children, }: ResultProps) => React.JSX.Element;
|
|
4
5
|
export default Result;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { SwitchProps } from '../../types/switch';
|
|
2
3
|
import './index.css';
|
|
3
4
|
declare const Switch: {
|
|
4
|
-
({ prefixCls, prefixClsV3, checked, onChange, onClick, disabled, className, style, defaultChecked, value, controlled }: SwitchProps):
|
|
5
|
+
({ prefixCls, prefixClsV3, checked, onChange, onClick, disabled, className, style, defaultChecked, value, controlled }: SwitchProps): React.JSX.Element;
|
|
5
6
|
displayName: string;
|
|
6
7
|
};
|
|
7
8
|
export default Switch;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { UploadProps } from '../../types/upload';
|
|
2
3
|
import './style.css';
|
|
3
|
-
declare const Upload: ({ prefixCls, prefixClsV3, multiple, style, className, onChange, action, name, method, headers, directory, beforeUpload, rootClassName, onRemove, disabled, withCredentials, openFileDialogOnClick, maxCount, fileList: controlledFileList, customRequest, accept, listType, showUploadList, children, noStyle, defaultFileList }: UploadProps) =>
|
|
4
|
+
declare const Upload: ({ prefixCls, prefixClsV3, multiple, style, className, onChange, action, name, method, headers, directory, beforeUpload, rootClassName, onRemove, disabled, withCredentials, openFileDialogOnClick, maxCount, fileList: controlledFileList, customRequest, accept, listType, showUploadList, children, noStyle, defaultFileList }: UploadProps) => React.JSX.Element;
|
|
4
5
|
export default Upload;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import './styles/global.css';
|
|
2
|
+
declare const Button: import("react").ComponentType<import("@/types/button").ButtonProps>;
|
|
3
|
+
declare const Checkbox: import("react").ComponentType<import("@/types/checkbox").CheckboxProps>;
|
|
4
|
+
declare const Switch: import("react").ComponentType<import("./types/switch").SwitchProps>;
|
|
5
|
+
declare const Empty: import("react").ComponentType<import("./types/empty").EmptyContentProps>;
|
|
6
|
+
declare const Upload: import("react").ComponentType<import("@/types/upload").UploadProps>;
|
|
7
|
+
declare const DatePicker: import("react").ComponentType<import("@/types/datepicker").TDatePickerProps>;
|
|
8
|
+
declare const RangePicker: import("react").ComponentType<import("@/types/datepicker").TRangePickerProps>;
|
|
9
|
+
declare const TimePicker: import("react").ComponentType<import("@/types/datepicker").TimePickerProps>;
|
|
10
|
+
declare const Form: import("react").ComponentType<import("@/types/form").FormProps>;
|
|
11
|
+
declare const FormItem: import("react").ComponentType<import("@/types/form").FormItemProps>;
|
|
12
|
+
declare const Input: import("react").ComponentType<Omit<import("@/types/input").InputProps, "ref"> & import("react").RefAttributes<{
|
|
13
|
+
focus: () => void;
|
|
14
|
+
input: HTMLInputElement | null;
|
|
15
|
+
blur: () => void;
|
|
16
|
+
nativeElement: HTMLInputElement | null;
|
|
17
|
+
setSelectionRange: (start: number, end: number) => void;
|
|
18
|
+
}>>;
|
|
19
|
+
declare const Textarea: import("react").ComponentType<import("@/types/input").TextareaProps>;
|
|
20
|
+
declare const Radio: import("react").ComponentType<import("@/types/radio").RadioProps>;
|
|
21
|
+
declare const RadioButton: import("react").ComponentType<import("@/types/radio").RadioButtonProps>;
|
|
22
|
+
declare const RadioGroup: import("react").ComponentType<import("@/types/radio").RadioGroupProps>;
|
|
23
|
+
declare const Select: import("react").ComponentType<import("@/types/select").SelectProps>;
|
|
24
|
+
declare const Option: import("react").ComponentType<import("@/types/select").OptionProps>;
|
|
25
|
+
declare const Tag: import("react").ComponentType<import("@/types/select").CustomTagProps>;
|
|
26
|
+
declare const Skeleton: import("react").ComponentType<import("./types/skeleton").SkeletonProps>;
|
|
27
|
+
declare const SkeletonAvatar: import("react").ComponentType<import("./types/skeleton").SkeletonAvatarProps>;
|
|
28
|
+
declare const SkeletonButton: import("react").ComponentType<import("./types/skeleton").SkeletonButtonProps>;
|
|
29
|
+
declare const SkeletonImage: import("react").ComponentType<import("./types/skeleton").SkeletonImageProps>;
|
|
30
|
+
declare const SkeletonInput: import("react").ComponentType<import("./types/skeleton").SkeletonInputProps>;
|
|
31
|
+
declare const Menu: import("react").ComponentType<import("@/types/menu").MenuProps>;
|
|
32
|
+
declare const MenuItem: import("react").ComponentType<import("@/types/menu").ItemType>;
|
|
33
|
+
declare const MenuSubMenu: import("react").ComponentType<import("@/types/menu").SubMenuItem>;
|
|
34
|
+
declare const Dropdown: import("react").ComponentType<import("@/types/dropdown").DropdownProps>;
|
|
35
|
+
declare const Popover: import("react").ComponentType<import("@/types/popover").PopoverProps>;
|
|
36
|
+
declare const Result: import("react").ComponentType<import("@/types/result").ResultProps>;
|
|
37
|
+
export { Button, Checkbox, Empty, DatePicker, RangePicker, TimePicker, Form, FormItem, Input, Textarea, Radio, RadioButton, RadioGroup, Select, Option, Tag, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, Upload, Switch, Menu, MenuItem, MenuSubMenu, Dropdown, Popover, Result };
|
|
38
|
+
export { ClearIcon, ArrowIcon, LoadingIcon, CheckIcon, SearchIcon, CalendarIcon, SuccessIcon, ErrorIcon, DateDistanceIcon, TimeIcon, StampleIcon, TrashIcon, SpinerIcon, } from '@/components/Icons';
|
|
39
|
+
export { useForm } from '@/hooks/useForm';
|
|
40
|
+
export { useWatch } from '@/hooks/useWatch';
|
|
41
|
+
export type { FormInstance, RuleObject, RuleRender, FieldData, FieldInstancesInputRef, FieldError, FormProps, FormItemChildComponentProps } from '@/types/form';
|
|
42
|
+
export type { DefaultProps, TargetProps, RuleTypes, RuleType, MouseEventHandlerSelect, SyntheticBaseEvent, Placement } from '@/types';
|
|
43
|
+
export type { CheckboxProps } from '@/types/checkbox';
|
|
44
|
+
export type { InputProps, TextareaProps } from '@/types/input';
|
|
45
|
+
export type { PopoverProps } from '@/types/popover';
|
|
46
|
+
export type { ButtonType, ButtonProps, BaseButtonProps } from '@/types/button';
|
|
47
|
+
export type { ItemType, MenuProps, SubMenuItem } from '@/types/menu';
|
|
48
|
+
export type { DropdownProps, DropdownItemType, } from '@/types/dropdown';
|
|
49
|
+
export type { ResultProps, ResultStatusType } from '@/types/result';
|
|
50
|
+
export type { RadioProps, RadioGroupProps, RadioButtonProps } from '@/types/radio';
|
|
51
|
+
export type { TDatePickerProps, TRangePickerProps, TimePickerProps } from '@/types/datepicker';
|
|
52
|
+
export type { SelectProps, OptionType, OptionProps, CustomTagProps, TagProps, DisplayValueType } from '@/types/select';
|
|
53
|
+
export type { RcFile, UploadFile, UploadProps, UploadChangeParam } from '@/types/upload';
|
|
54
|
+
export { FormContext } from '@/components/Form/Form';
|
|
55
|
+
export { clsx, createArray, parseValue } from '@/helpers';
|
|
56
|
+
export { flattenChildren } from '@/helpers/flatten';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,151 @@
|
|
|
1
|
+
import * as __types_result from '@/types/result';
|
|
2
|
+
export { ResultProps, ResultStatusType } from '@/types/result';
|
|
3
|
+
import * as __types_popover from '@/types/popover';
|
|
4
|
+
export { PopoverProps } from '@/types/popover';
|
|
5
|
+
import * as __types_dropdown from '@/types/dropdown';
|
|
6
|
+
export { DropdownItemType, DropdownProps } from '@/types/dropdown';
|
|
7
|
+
import * as __types_menu from '@/types/menu';
|
|
8
|
+
export { ItemType, MenuProps, SubMenuItem } from '@/types/menu';
|
|
9
|
+
import * as react from 'react';
|
|
10
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
11
|
+
import * as __types_select from '@/types/select';
|
|
12
|
+
export { CustomTagProps, DisplayValueType, OptionProps, OptionType, SelectProps, TagProps } from '@/types/select';
|
|
13
|
+
import * as __types_radio from '@/types/radio';
|
|
14
|
+
export { RadioButtonProps, RadioGroupProps, RadioProps } from '@/types/radio';
|
|
15
|
+
import * as __types_input from '@/types/input';
|
|
16
|
+
export { InputProps, TextareaProps } from '@/types/input';
|
|
17
|
+
import * as __types_form from '@/types/form';
|
|
18
|
+
export { FieldData, FieldError, FieldInstancesInputRef, FormInstance, FormItemChildComponentProps, FormProps, RuleObject, RuleRender } from '@/types/form';
|
|
19
|
+
import * as __types_datepicker from '@/types/datepicker';
|
|
20
|
+
export { TDatePickerProps, TRangePickerProps, TimePickerProps } from '@/types/datepicker';
|
|
21
|
+
import * as __types_upload from '@/types/upload';
|
|
22
|
+
export { RcFile, UploadChangeParam, UploadFile, UploadProps } from '@/types/upload';
|
|
23
|
+
import * as __types_checkbox from '@/types/checkbox';
|
|
24
|
+
export { CheckboxProps } from '@/types/checkbox';
|
|
25
|
+
import * as __types_button from '@/types/button';
|
|
26
|
+
export { BaseButtonProps, ButtonProps, ButtonType } from '@/types/button';
|
|
27
|
+
export { ArrowIcon, CalendarIcon, CheckIcon, ClearIcon, DateDistanceIcon, ErrorIcon, LoadingIcon, SearchIcon, SpinerIcon, StampleIcon, SuccessIcon, TimeIcon, TrashIcon } from '@/components/Icons';
|
|
28
|
+
export { useForm } from '@/hooks/useForm';
|
|
29
|
+
export { useWatch } from '@/hooks/useWatch';
|
|
30
|
+
export { DefaultProps, MouseEventHandlerSelect, Placement, RuleType, RuleTypes, SyntheticBaseEvent, TargetProps } from '@/types';
|
|
31
|
+
export { FormContext } from '@/components/Form/Form';
|
|
32
|
+
export { clsx, createArray, parseValue } from '@/helpers';
|
|
33
|
+
export { flattenChildren } from '@/helpers/flatten';
|
|
1
34
|
|
|
2
|
-
|
|
35
|
+
interface DefaultProps {
|
|
36
|
+
prefixCls?: string;
|
|
37
|
+
prefixClsV3?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
style?: CSSProperties;
|
|
40
|
+
noStyle?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare type widthUnit = number | string;
|
|
44
|
+
interface SkeletonElementProps {
|
|
45
|
+
className?: string;
|
|
46
|
+
style?: CSSProperties;
|
|
47
|
+
size?: 'large' | 'small' | 'default' | number;
|
|
48
|
+
shape?: 'circle' | 'square' | 'round';
|
|
49
|
+
active?: boolean;
|
|
50
|
+
}
|
|
51
|
+
type SkeletonProps = DefaultProps & {
|
|
52
|
+
active?: boolean;
|
|
53
|
+
loading?: boolean;
|
|
54
|
+
className?: string;
|
|
55
|
+
style?: CSSProperties;
|
|
56
|
+
children?: ReactNode;
|
|
57
|
+
avatar?: SkeletonAvatarProps | boolean;
|
|
58
|
+
title?: SkeletonTitleProps | boolean;
|
|
59
|
+
paragraph?: SkeletonParagraphProps | boolean;
|
|
60
|
+
round?: boolean;
|
|
61
|
+
teamLogo?: boolean;
|
|
62
|
+
};
|
|
63
|
+
interface SkeletonTitleProps {
|
|
64
|
+
className?: string;
|
|
65
|
+
style?: CSSProperties;
|
|
66
|
+
width?: number | string;
|
|
67
|
+
}
|
|
68
|
+
interface SkeletonParagraphProps {
|
|
69
|
+
className?: string;
|
|
70
|
+
style?: CSSProperties;
|
|
71
|
+
width?: widthUnit | Array<widthUnit>;
|
|
72
|
+
rows?: number;
|
|
73
|
+
}
|
|
74
|
+
type SkeletonAvatarProps = Omit<SkeletonElementProps, 'shape'> & DefaultProps & {
|
|
75
|
+
shape?: 'circle' | 'square';
|
|
76
|
+
active?: boolean;
|
|
77
|
+
applyElementStyle?: boolean;
|
|
78
|
+
wrapperStyle?: CSSProperties;
|
|
79
|
+
};
|
|
80
|
+
type SkeletonImageProps = DefaultProps & Omit<SkeletonElementProps, 'size' | 'shape' | 'active'>;
|
|
81
|
+
type SkeletonInputProps = Omit<SkeletonElementProps, 'size' | 'shape'> & DefaultProps & {
|
|
82
|
+
size?: 'large' | 'small' | 'default';
|
|
83
|
+
block?: boolean;
|
|
84
|
+
};
|
|
85
|
+
type SkeletonButtonProps = Omit<SkeletonElementProps, 'size'> & DefaultProps & {
|
|
86
|
+
size?: 'large' | 'small' | 'default';
|
|
87
|
+
block?: boolean;
|
|
88
|
+
applyElementStyle?: boolean;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
type EmptyContentProps = DefaultProps & {
|
|
92
|
+
title?: string;
|
|
93
|
+
description?: string;
|
|
94
|
+
icon?: ReactNode;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
type SwitchProps = DefaultProps & {
|
|
98
|
+
disabled?: boolean;
|
|
99
|
+
onChange?: (value: boolean) => void;
|
|
100
|
+
onClick?: (value: boolean) => void;
|
|
101
|
+
value?: boolean;
|
|
102
|
+
tabIndex?: number;
|
|
103
|
+
name?: string;
|
|
104
|
+
children?: ReactNode;
|
|
105
|
+
id?: string;
|
|
106
|
+
autoFocus?: boolean;
|
|
107
|
+
type?: string;
|
|
108
|
+
skipGroup?: boolean;
|
|
109
|
+
required?: boolean;
|
|
110
|
+
defaultChecked?: boolean;
|
|
111
|
+
checked?: boolean;
|
|
112
|
+
controlled?: boolean;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
declare const Button: react.ComponentType<__types_button.ButtonProps>;
|
|
116
|
+
declare const Checkbox: react.ComponentType<__types_checkbox.CheckboxProps>;
|
|
117
|
+
declare const Switch: react.ComponentType<SwitchProps>;
|
|
118
|
+
declare const Empty: react.ComponentType<EmptyContentProps>;
|
|
119
|
+
declare const Upload: react.ComponentType<__types_upload.UploadProps>;
|
|
120
|
+
declare const DatePicker: react.ComponentType<__types_datepicker.TDatePickerProps>;
|
|
121
|
+
declare const RangePicker: react.ComponentType<__types_datepicker.TRangePickerProps>;
|
|
122
|
+
declare const TimePicker: react.ComponentType<__types_datepicker.TimePickerProps>;
|
|
123
|
+
declare const Form: react.ComponentType<__types_form.FormProps>;
|
|
124
|
+
declare const FormItem: react.ComponentType<__types_form.FormItemProps>;
|
|
125
|
+
declare const Input: react.ComponentType<Omit<__types_input.InputProps, "ref"> & react.RefAttributes<{
|
|
126
|
+
focus: () => void;
|
|
127
|
+
input: HTMLInputElement | null;
|
|
128
|
+
blur: () => void;
|
|
129
|
+
nativeElement: HTMLInputElement | null;
|
|
130
|
+
setSelectionRange: (start: number, end: number) => void;
|
|
131
|
+
}>>;
|
|
132
|
+
declare const Textarea: react.ComponentType<__types_input.TextareaProps>;
|
|
133
|
+
declare const Radio: react.ComponentType<__types_radio.RadioProps>;
|
|
134
|
+
declare const RadioButton: react.ComponentType<__types_radio.RadioButtonProps>;
|
|
135
|
+
declare const RadioGroup: react.ComponentType<__types_radio.RadioGroupProps>;
|
|
136
|
+
declare const Select: react.ComponentType<__types_select.SelectProps>;
|
|
137
|
+
declare const Option: react.ComponentType<__types_select.OptionProps>;
|
|
138
|
+
declare const Tag: react.ComponentType<__types_select.CustomTagProps>;
|
|
139
|
+
declare const Skeleton: react.ComponentType<SkeletonProps>;
|
|
140
|
+
declare const SkeletonAvatar: react.ComponentType<SkeletonAvatarProps>;
|
|
141
|
+
declare const SkeletonButton: react.ComponentType<SkeletonButtonProps>;
|
|
142
|
+
declare const SkeletonImage: react.ComponentType<SkeletonImageProps>;
|
|
143
|
+
declare const SkeletonInput: react.ComponentType<SkeletonInputProps>;
|
|
144
|
+
declare const Menu: react.ComponentType<__types_menu.MenuProps>;
|
|
145
|
+
declare const MenuItem: react.ComponentType<__types_menu.ItemType>;
|
|
146
|
+
declare const MenuSubMenu: react.ComponentType<__types_menu.SubMenuItem>;
|
|
147
|
+
declare const Dropdown: react.ComponentType<__types_dropdown.DropdownProps>;
|
|
148
|
+
declare const Popover: react.ComponentType<__types_popover.PopoverProps>;
|
|
149
|
+
declare const Result: react.ComponentType<__types_result.ResultProps>;
|
|
150
|
+
|
|
151
|
+
export { Button, Checkbox, DatePicker, Dropdown, Empty, Form, FormItem, Input, Menu, MenuItem, MenuSubMenu, Option, Popover, Radio, RadioButton, RadioGroup, RangePicker, Result, Select, Skeleton, SkeletonAvatar, SkeletonButton, SkeletonImage, SkeletonInput, Switch, Tag, Textarea, TimePicker, Upload };
|