@qsxy/element-plus-react 1.0.0-next.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/dist/Badge/Badge.d.ts +4 -0
- package/dist/Badge/Badge.js +65 -0
- package/dist/Badge/index.d.ts +2 -0
- package/dist/Badge/index.js +39 -0
- package/dist/Badge/typings.d.ts +14 -0
- package/dist/Badge/typings.js +17 -0
- package/dist/Breadcrumb/Breadcrumb.d.ts +5 -0
- package/dist/Breadcrumb/Breadcrumb.js +54 -0
- package/dist/Breadcrumb/BreadcrumbItem.d.ts +4 -0
- package/dist/Breadcrumb/BreadcrumbItem.js +55 -0
- package/dist/Breadcrumb/index.d.ts +3 -0
- package/dist/Breadcrumb/index.js +42 -0
- package/dist/Breadcrumb/typings.d.ts +13 -0
- package/dist/Breadcrumb/typings.js +17 -0
- package/dist/Button/Button.d.ts +14 -0
- package/dist/Button/Button.js +99 -0
- package/dist/Button/ButtonGroup.d.ts +4 -0
- package/dist/Button/ButtonGroup.js +48 -0
- package/dist/Button/ButtonGroupContext.d.ts +5 -0
- package/dist/Button/ButtonGroupContext.js +30 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.js +42 -0
- package/dist/Button/typings.d.ts +37 -0
- package/dist/Button/typings.js +17 -0
- package/dist/Calendar/Calendar.d.ts +4 -0
- package/dist/Calendar/Calendar.js +278 -0
- package/dist/Calendar/CalendarContext.d.ts +27 -0
- package/dist/Calendar/CalendarContext.js +36 -0
- package/dist/Calendar/DatePanel.d.ts +4 -0
- package/dist/Calendar/DatePanel.js +210 -0
- package/dist/Calendar/DateRangePanel.d.ts +4 -0
- package/dist/Calendar/DateRangePanel.js +145 -0
- package/dist/Calendar/Footer.d.ts +3 -0
- package/dist/Calendar/Footer.js +57 -0
- package/dist/Calendar/Header.d.ts +4 -0
- package/dist/Calendar/Header.js +71 -0
- package/dist/Calendar/MonthPanel.d.ts +4 -0
- package/dist/Calendar/MonthPanel.js +156 -0
- package/dist/Calendar/MonthRangePanel.d.ts +4 -0
- package/dist/Calendar/MonthRangePanel.js +144 -0
- package/dist/Calendar/ShortCuts.d.ts +12 -0
- package/dist/Calendar/ShortCuts.js +41 -0
- package/dist/Calendar/WeekPanel.d.ts +4 -0
- package/dist/Calendar/WeekPanel.js +179 -0
- package/dist/Calendar/YearPanel.d.ts +4 -0
- package/dist/Calendar/YearPanel.js +158 -0
- package/dist/Calendar/YearRangePanel.d.ts +4 -0
- package/dist/Calendar/YearRangePanel.js +152 -0
- package/dist/Calendar/index.d.ts +5 -0
- package/dist/Calendar/index.js +47 -0
- package/dist/Calendar/typings.d.ts +92 -0
- package/dist/Calendar/typings.js +17 -0
- package/dist/Calendar/util.d.ts +9 -0
- package/dist/Calendar/util.js +81 -0
- package/dist/Card/Card.d.ts +4 -0
- package/dist/Card/Card.js +46 -0
- package/dist/Card/index.d.ts +2 -0
- package/dist/Card/index.js +39 -0
- package/dist/Card/typings.d.ts +8 -0
- package/dist/Card/typings.js +17 -0
- package/dist/Cascader/Cascader.d.ts +4 -0
- package/dist/Cascader/Cascader.js +630 -0
- package/dist/Cascader/CascaderContext.d.ts +18 -0
- package/dist/Cascader/CascaderContext.js +52 -0
- package/dist/Cascader/CascaderDropdown.d.ts +10 -0
- package/dist/Cascader/CascaderDropdown.js +81 -0
- package/dist/Cascader/CascaderMenu.d.ts +12 -0
- package/dist/Cascader/CascaderMenu.js +191 -0
- package/dist/Cascader/Utils.d.ts +3 -0
- package/dist/Cascader/Utils.js +83 -0
- package/dist/Cascader/index.d.ts +2 -0
- package/dist/Cascader/index.js +39 -0
- package/dist/Cascader/typings.d.ts +79 -0
- package/dist/Cascader/typings.js +17 -0
- package/dist/Cascader/useCascader.d.ts +30 -0
- package/dist/Cascader/useCascader.js +614 -0
- package/dist/Checkbox/Checkbox.d.ts +4 -0
- package/dist/Checkbox/Checkbox.js +168 -0
- package/dist/Checkbox/CheckboxButton.d.ts +4 -0
- package/dist/Checkbox/CheckboxButton.js +166 -0
- package/dist/Checkbox/index.d.ts +3 -0
- package/dist/Checkbox/index.js +42 -0
- package/dist/Checkbox/typings.d.ts +21 -0
- package/dist/Checkbox/typings.js +17 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +12 -0
- package/dist/CheckboxGroup/CheckboxGroup.js +117 -0
- package/dist/CheckboxGroup/CheckboxGroupContext.d.ts +15 -0
- package/dist/CheckboxGroup/CheckboxGroupContext.js +30 -0
- package/dist/CheckboxGroup/index.d.ts +4 -0
- package/dist/CheckboxGroup/index.js +42 -0
- package/dist/Col/Col.d.ts +4 -0
- package/dist/Col/Col.js +89 -0
- package/dist/Col/index.d.ts +2 -0
- package/dist/Col/index.js +39 -0
- package/dist/Col/typings.d.ts +16 -0
- package/dist/Col/typings.js +17 -0
- package/dist/Collapse/Collapse.d.ts +4 -0
- package/dist/Collapse/Collapse.js +46 -0
- package/dist/Collapse/CollapseContext.d.ts +10 -0
- package/dist/Collapse/CollapseContext.js +35 -0
- package/dist/Collapse/CollapseItem.d.ts +4 -0
- package/dist/Collapse/CollapseItem.js +94 -0
- package/dist/Collapse/CollapseTransition.d.ts +6 -0
- package/dist/Collapse/CollapseTransition.js +78 -0
- package/dist/Collapse/index.d.ts +3 -0
- package/dist/Collapse/index.js +42 -0
- package/dist/Collapse/typings.d.ts +13 -0
- package/dist/Collapse/typings.js +17 -0
- package/dist/ColorPicker/AlphaSlider.d.ts +12 -0
- package/dist/ColorPicker/AlphaSlider.js +133 -0
- package/dist/ColorPicker/ColorPicker.d.ts +4 -0
- package/dist/ColorPicker/ColorPicker.js +215 -0
- package/dist/ColorPicker/HueSlider.d.ts +12 -0
- package/dist/ColorPicker/HueSlider.js +125 -0
- package/dist/ColorPicker/Predefine.d.ts +12 -0
- package/dist/ColorPicker/Predefine.js +72 -0
- package/dist/ColorPicker/SvPanel.d.ts +11 -0
- package/dist/ColorPicker/SvPanel.js +95 -0
- package/dist/ColorPicker/color.d.ts +28 -0
- package/dist/ColorPicker/color.js +293 -0
- package/dist/ColorPicker/draggable.d.ts +6 -0
- package/dist/ColorPicker/draggable.js +60 -0
- package/dist/ColorPicker/index.d.ts +2 -0
- package/dist/ColorPicker/index.js +39 -0
- package/dist/ColorPicker/typings.d.ts +13 -0
- package/dist/ColorPicker/typings.js +17 -0
- package/dist/ColorPicker/util.d.ts +6 -0
- package/dist/ColorPicker/util.js +78 -0
- package/dist/ConfigProvider/ConfigProvider.d.ts +16 -0
- package/dist/ConfigProvider/ConfigProvider.js +34 -0
- package/dist/ConfigProvider/index.d.ts +2 -0
- package/dist/ConfigProvider/index.js +39 -0
- package/dist/DatePicker/DatePicker.d.ts +4 -0
- package/dist/DatePicker/DatePicker.js +224 -0
- package/dist/DatePicker/DateRangePicker.d.ts +4 -0
- package/dist/DatePicker/DateRangePicker.js +287 -0
- package/dist/DatePicker/index.d.ts +2 -0
- package/dist/DatePicker/index.js +39 -0
- package/dist/DatePicker/main.d.ts +4 -0
- package/dist/DatePicker/main.js +46 -0
- package/dist/DatePicker/typings.d.ts +95 -0
- package/dist/DatePicker/typings.js +17 -0
- package/dist/DateTimePicker/DateTimePicker.d.ts +10 -0
- package/dist/DateTimePicker/DateTimePicker.js +227 -0
- package/dist/DateTimePicker/index.d.ts +2 -0
- package/dist/DateTimePicker/index.js +39 -0
- package/dist/DateTimePicker/typings.d.ts +18 -0
- package/dist/DateTimePicker/typings.js +17 -0
- package/dist/DateTimePicker/util.d.ts +2 -0
- package/dist/DateTimePicker/util.js +36 -0
- package/dist/Descriptions/Descriptions.d.ts +4 -0
- package/dist/Descriptions/Descriptions.js +96 -0
- package/dist/Descriptions/DescriptionsCell.d.ts +19 -0
- package/dist/Descriptions/DescriptionsCell.js +84 -0
- package/dist/Descriptions/DescriptionsContext.d.ts +7 -0
- package/dist/Descriptions/DescriptionsContext.js +33 -0
- package/dist/Descriptions/DescriptionsItem.d.ts +6 -0
- package/dist/Descriptions/DescriptionsItem.js +29 -0
- package/dist/Descriptions/DescriptionsRow.d.ts +10 -0
- package/dist/Descriptions/DescriptionsRow.js +45 -0
- package/dist/Descriptions/index.d.ts +3 -0
- package/dist/Descriptions/index.js +42 -0
- package/dist/Descriptions/typings.d.ts +19 -0
- package/dist/Descriptions/typings.js +17 -0
- package/dist/Dialog/Dialog.d.ts +16 -0
- package/dist/Dialog/Dialog.js +212 -0
- package/dist/Dialog/DialogBody.d.ts +4 -0
- package/dist/Dialog/DialogBody.js +63 -0
- package/dist/Dialog/DialogContext.d.ts +14 -0
- package/dist/Dialog/DialogContext.js +51 -0
- package/dist/Dialog/DialogFooter.d.ts +4 -0
- package/dist/Dialog/DialogFooter.js +46 -0
- package/dist/Dialog/DialogHeader.d.ts +4 -0
- package/dist/Dialog/DialogHeader.js +53 -0
- package/dist/Dialog/index.d.ts +2 -0
- package/dist/Dialog/index.js +39 -0
- package/dist/Dialog/typings.d.ts +48 -0
- package/dist/Dialog/typings.js +17 -0
- package/dist/Dialog/useDraggable.d.ts +2 -0
- package/dist/Dialog/useDraggable.js +97 -0
- package/dist/Divider/Divider.d.ts +10 -0
- package/dist/Divider/Divider.js +52 -0
- package/dist/Divider/index.d.ts +2 -0
- package/dist/Divider/index.js +39 -0
- package/dist/Drawer/Drawer.d.ts +18 -0
- package/dist/Drawer/Drawer.js +136 -0
- package/dist/Drawer/DrawerBody.d.ts +4 -0
- package/dist/Drawer/DrawerBody.js +63 -0
- package/dist/Drawer/DrawerContext.d.ts +9 -0
- package/dist/Drawer/DrawerContext.js +46 -0
- package/dist/Drawer/DrawerFooter.d.ts +4 -0
- package/dist/Drawer/DrawerFooter.js +44 -0
- package/dist/Drawer/DrawerHeader.d.ts +4 -0
- package/dist/Drawer/DrawerHeader.js +58 -0
- package/dist/Drawer/index.d.ts +2 -0
- package/dist/Drawer/index.js +39 -0
- package/dist/Drawer/typings.d.ts +26 -0
- package/dist/Drawer/typings.js +17 -0
- package/dist/Dropdown/Dropdown.d.ts +4 -0
- package/dist/Dropdown/Dropdown.js +105 -0
- package/dist/Dropdown/DropdownContext.d.ts +7 -0
- package/dist/Dropdown/DropdownContext.js +46 -0
- package/dist/Dropdown/DropdownItem.d.ts +4 -0
- package/dist/Dropdown/DropdownItem.js +62 -0
- package/dist/Dropdown/DropdownMenu.d.ts +4 -0
- package/dist/Dropdown/DropdownMenu.js +57 -0
- package/dist/Dropdown/index.d.ts +4 -0
- package/dist/Dropdown/index.js +45 -0
- package/dist/Dropdown/typings.d.ts +27 -0
- package/dist/Dropdown/typings.js +17 -0
- package/dist/Empty/Empty.d.ts +9 -0
- package/dist/Empty/Empty.js +61 -0
- package/dist/Empty/ImgEmpty.d.ts +3 -0
- package/dist/Empty/ImgEmpty.js +118 -0
- package/dist/Empty/index.d.ts +2 -0
- package/dist/Empty/index.js +39 -0
- package/dist/Form/FieldContext.d.ts +5 -0
- package/dist/Form/FieldContext.js +75 -0
- package/dist/Form/Form.d.ts +16 -0
- package/dist/Form/Form.js +189 -0
- package/dist/Form/FormContext.d.ts +27 -0
- package/dist/Form/FormContext.js +101 -0
- package/dist/Form/FormItem.d.ts +47 -0
- package/dist/Form/FormItem.js +461 -0
- package/dist/Form/FormItemContext.d.ts +7 -0
- package/dist/Form/FormItemContext.js +32 -0
- package/dist/Form/List.d.ts +21 -0
- package/dist/Form/List.js +142 -0
- package/dist/Form/ListContext.d.ts +7 -0
- package/dist/Form/ListContext.js +27 -0
- package/dist/Form/index.d.ts +5 -0
- package/dist/Form/index.js +45 -0
- package/dist/Form/typings.d.ts +302 -0
- package/dist/Form/typings.js +17 -0
- package/dist/Form/useForm.d.ts +73 -0
- package/dist/Form/useForm.js +751 -0
- package/dist/Form/useWatch.d.ts +12 -0
- package/dist/Form/useWatch.js +91 -0
- package/dist/Form/utils/NameMap.d.ts +15 -0
- package/dist/Form/utils/NameMap.js +75 -0
- package/dist/Form/utils/asyncUtil.d.ts +2 -0
- package/dist/Form/utils/asyncUtil.js +54 -0
- package/dist/Form/utils/classUtil.d.ts +4 -0
- package/dist/Form/utils/classUtil.js +51 -0
- package/dist/Form/utils/cloneDeep.d.ts +2 -0
- package/dist/Form/utils/cloneDeep.js +46 -0
- package/dist/Form/utils/get.d.ts +1 -0
- package/dist/Form/utils/get.js +34 -0
- package/dist/Form/utils/messages.d.ts +51 -0
- package/dist/Form/utils/messages.js +80 -0
- package/dist/Form/utils/set.d.ts +1 -0
- package/dist/Form/utils/set.js +61 -0
- package/dist/Form/utils/typeUtil.d.ts +1 -0
- package/dist/Form/utils/typeUtil.js +34 -0
- package/dist/Form/utils/util.d.ts +3 -0
- package/dist/Form/utils/util.js +68 -0
- package/dist/Form/utils/validateUtil.d.ts +2 -0
- package/dist/Form/utils/validateUtil.js +195 -0
- package/dist/Form/utils/valueUtil.d.ts +14 -0
- package/dist/Form/utils/valueUtil.js +160 -0
- package/dist/Icon/Icon.d.ts +4 -0
- package/dist/Icon/Icon.js +66 -0
- package/dist/Icon/IconList/Check.d.ts +3 -0
- package/dist/Icon/IconList/Check.js +66 -0
- package/dist/Icon/IconList/Close.d.ts +3 -0
- package/dist/Icon/IconList/Close.js +53 -0
- package/dist/Icon/IconList/Delete.d.ts +3 -0
- package/dist/Icon/IconList/Delete.js +66 -0
- package/dist/Icon/IconList/Down.d.ts +3 -0
- package/dist/Icon/IconList/Down.js +66 -0
- package/dist/Icon/IconList/Eye.d.ts +3 -0
- package/dist/Icon/IconList/Eye.js +66 -0
- package/dist/Icon/IconList/EyeClose.d.ts +3 -0
- package/dist/Icon/IconList/EyeClose.js +66 -0
- package/dist/Icon/IconList/Left.d.ts +3 -0
- package/dist/Icon/IconList/Left.js +66 -0
- package/dist/Icon/IconList/Link.d.ts +3 -0
- package/dist/Icon/IconList/Link.js +56 -0
- package/dist/Icon/IconList/More.d.ts +3 -0
- package/dist/Icon/IconList/More.js +66 -0
- package/dist/Icon/IconList/Question.d.ts +3 -0
- package/dist/Icon/IconList/Question.js +66 -0
- package/dist/Icon/IconList/Right.d.ts +3 -0
- package/dist/Icon/IconList/Right.js +66 -0
- package/dist/Icon/IconList/Search.d.ts +3 -0
- package/dist/Icon/IconList/Search.js +66 -0
- package/dist/Icon/IconList/Up.d.ts +3 -0
- package/dist/Icon/IconList/Up.js +66 -0
- package/dist/Icon/IconList/Upload.d.ts +3 -0
- package/dist/Icon/IconList/Upload.js +66 -0
- package/dist/Icon/IconList/index.d.ts +14 -0
- package/dist/Icon/IconList/index.js +68 -0
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.js +42 -0
- package/dist/Icon/typings.d.ts +17 -0
- package/dist/Icon/typings.js +17 -0
- package/dist/Input/Input.d.ts +16 -0
- package/dist/Input/Input.js +391 -0
- package/dist/Input/InputGroup.d.ts +4 -0
- package/dist/Input/InputGroup.js +44 -0
- package/dist/Input/InputRange.d.ts +4 -0
- package/dist/Input/InputRange.js +353 -0
- package/dist/Input/TextArea.d.ts +4 -0
- package/dist/Input/TextArea.js +118 -0
- package/dist/Input/index.d.ts +4 -0
- package/dist/Input/index.js +45 -0
- package/dist/Input/typings.d.ts +87 -0
- package/dist/Input/typings.js +17 -0
- package/dist/InputNumber/InputNumber.d.ts +4 -0
- package/dist/InputNumber/InputNumber.js +231 -0
- package/dist/InputNumber/index.d.ts +2 -0
- package/dist/InputNumber/index.js +39 -0
- package/dist/InputNumber/typings.d.ts +31 -0
- package/dist/InputNumber/typings.js +17 -0
- package/dist/Link/Link.d.ts +4 -0
- package/dist/Link/Link.js +64 -0
- package/dist/Link/index.d.ts +2 -0
- package/dist/Link/index.js +39 -0
- package/dist/Link/typings.d.ts +11 -0
- package/dist/Link/typings.js +17 -0
- package/dist/Loading/Loading.d.ts +9 -0
- package/dist/Loading/Loading.js +70 -0
- package/dist/Loading/index.d.ts +2 -0
- package/dist/Loading/index.js +39 -0
- package/dist/Loading/typings.d.ts +15 -0
- package/dist/Loading/typings.js +17 -0
- package/dist/Message/Main.d.ts +8 -0
- package/dist/Message/Main.js +68 -0
- package/dist/Message/Message.d.ts +4 -0
- package/dist/Message/Message.js +155 -0
- package/dist/Message/index.d.ts +7 -0
- package/dist/Message/index.js +146 -0
- package/dist/Message/typings.d.ts +42 -0
- package/dist/Message/typings.js +17 -0
- package/dist/MessageBox/Main.d.ts +8 -0
- package/dist/MessageBox/Main.js +68 -0
- package/dist/MessageBox/MessageBox.d.ts +4 -0
- package/dist/MessageBox/MessageBox.js +217 -0
- package/dist/MessageBox/index.d.ts +9 -0
- package/dist/MessageBox/index.js +99 -0
- package/dist/MessageBox/typings.d.ts +63 -0
- package/dist/MessageBox/typings.js +17 -0
- package/dist/Notification/Main.d.ts +8 -0
- package/dist/Notification/Main.js +68 -0
- package/dist/Notification/Notification.d.ts +4 -0
- package/dist/Notification/Notification.js +150 -0
- package/dist/Notification/index.d.ts +5 -0
- package/dist/Notification/index.js +127 -0
- package/dist/Notification/typings.d.ts +42 -0
- package/dist/Notification/typings.js +17 -0
- package/dist/Pagination/Options.d.ts +16 -0
- package/dist/Pagination/Options.js +117 -0
- package/dist/Pagination/Pager.d.ts +4 -0
- package/dist/Pagination/Pager.js +63 -0
- package/dist/Pagination/Pagination.d.ts +4 -0
- package/dist/Pagination/Pagination.js +462 -0
- package/dist/Pagination/index.d.ts +2 -0
- package/dist/Pagination/index.js +39 -0
- package/dist/Pagination/typings.d.ts +41 -0
- package/dist/Pagination/typings.js +17 -0
- package/dist/Pagination/util.d.ts +6 -0
- package/dist/Pagination/util.js +50 -0
- package/dist/Popconfirm/Popconfirm.d.ts +4 -0
- package/dist/Popconfirm/Popconfirm.js +114 -0
- package/dist/Popconfirm/index.d.ts +2 -0
- package/dist/Popconfirm/index.js +39 -0
- package/dist/Popconfirm/typings.d.ts +16 -0
- package/dist/Popconfirm/typings.js +17 -0
- package/dist/Popover/Popover.d.ts +4 -0
- package/dist/Popover/Popover.js +88 -0
- package/dist/Popover/index.d.ts +2 -0
- package/dist/Popover/index.js +39 -0
- package/dist/Popover/typings.d.ts +19 -0
- package/dist/Popover/typings.js +17 -0
- package/dist/Popper/Popper.d.ts +4 -0
- package/dist/Popper/Popper.js +161 -0
- package/dist/Popper/index.d.ts +2 -0
- package/dist/Popper/index.js +39 -0
- package/dist/Popper/popperOptions.d.ts +23 -0
- package/dist/Popper/popperOptions.js +106 -0
- package/dist/Popper/typings.d.ts +47 -0
- package/dist/Popper/typings.js +17 -0
- package/dist/Progress/Progress.d.ts +4 -0
- package/dist/Progress/Progress.js +194 -0
- package/dist/Progress/index.d.ts +2 -0
- package/dist/Progress/index.js +39 -0
- package/dist/Progress/typings.d.ts +18 -0
- package/dist/Progress/typings.js +17 -0
- package/dist/Radio/Radio.d.ts +14 -0
- package/dist/Radio/Radio.js +122 -0
- package/dist/Radio/RadioButton.d.ts +4 -0
- package/dist/Radio/RadioButton.js +122 -0
- package/dist/Radio/index.d.ts +2 -0
- package/dist/Radio/index.js +39 -0
- package/dist/Radio/typings.d.ts +17 -0
- package/dist/Radio/typings.js +17 -0
- package/dist/RadioGroup/RadioGroup.d.ts +5 -0
- package/dist/RadioGroup/RadioGroup.js +81 -0
- package/dist/RadioGroup/index.d.ts +2 -0
- package/dist/RadioGroup/index.js +39 -0
- package/dist/RadioGroup/typings.d.ts +17 -0
- package/dist/RadioGroup/typings.js +17 -0
- package/dist/Row/Row.d.ts +4 -0
- package/dist/Row/Row.js +60 -0
- package/dist/Row/RowContext.d.ts +5 -0
- package/dist/Row/RowContext.js +32 -0
- package/dist/Row/index.d.ts +3 -0
- package/dist/Row/index.js +42 -0
- package/dist/Row/typings.d.ts +7 -0
- package/dist/Row/typings.js +17 -0
- package/dist/Scrollbar/Scrollbar.d.ts +4 -0
- package/dist/Scrollbar/Scrollbar.js +162 -0
- package/dist/Scrollbar/Thumb.d.ts +4 -0
- package/dist/Scrollbar/Thumb.js +155 -0
- package/dist/Scrollbar/index.d.ts +2 -0
- package/dist/Scrollbar/index.js +39 -0
- package/dist/Scrollbar/typings.d.ts +40 -0
- package/dist/Scrollbar/typings.js +17 -0
- package/dist/Scrollbar/util.d.ts +27 -0
- package/dist/Scrollbar/util.js +61 -0
- package/dist/Select/Option.d.ts +4 -0
- package/dist/Select/Option.js +83 -0
- package/dist/Select/OptionGroup.d.ts +4 -0
- package/dist/Select/OptionGroup.js +49 -0
- package/dist/Select/Select.d.ts +16 -0
- package/dist/Select/Select.js +54 -0
- package/dist/Select/SelectContext.d.ts +11 -0
- package/dist/Select/SelectContext.js +47 -0
- package/dist/Select/SelectCore.d.ts +4 -0
- package/dist/Select/SelectCore.js +430 -0
- package/dist/Select/SelectDropdown.d.ts +4 -0
- package/dist/Select/SelectDropdown.js +194 -0
- package/dist/Select/index.d.ts +3 -0
- package/dist/Select/index.js +42 -0
- package/dist/Select/typings.d.ts +73 -0
- package/dist/Select/typings.js +17 -0
- package/dist/Skeleton/PlaceholderGraph.d.ts +11 -0
- package/dist/Skeleton/PlaceholderGraph.js +46 -0
- package/dist/Skeleton/PlaceholderGrid.d.ts +13 -0
- package/dist/Skeleton/PlaceholderGrid.js +77 -0
- package/dist/Skeleton/PlaceholderParagraph.d.ts +13 -0
- package/dist/Skeleton/PlaceholderParagraph.js +63 -0
- package/dist/Skeleton/Skeleton.d.ts +11 -0
- package/dist/Skeleton/Skeleton.js +42 -0
- package/dist/Skeleton/index.d.ts +4 -0
- package/dist/Skeleton/index.js +39 -0
- package/dist/Switch/Switch.d.ts +4 -0
- package/dist/Switch/Switch.js +167 -0
- package/dist/Switch/index.d.ts +2 -0
- package/dist/Switch/index.js +39 -0
- package/dist/Switch/typings.d.ts +25 -0
- package/dist/Switch/typings.js +17 -0
- package/dist/Table/Colgroup.d.ts +8 -0
- package/dist/Table/Colgroup.js +56 -0
- package/dist/Table/Table.d.ts +12 -0
- package/dist/Table/Table.js +189 -0
- package/dist/Table/TableBody.d.ts +6 -0
- package/dist/Table/TableBody.js +241 -0
- package/dist/Table/TableCell.d.ts +18 -0
- package/dist/Table/TableCell.js +402 -0
- package/dist/Table/TableColumn.d.ts +7 -0
- package/dist/Table/TableColumn.js +51 -0
- package/dist/Table/TableContext.d.ts +37 -0
- package/dist/Table/TableContext.js +72 -0
- package/dist/Table/TableHeader.d.ts +6 -0
- package/dist/Table/TableHeader.js +107 -0
- package/dist/Table/TableHeaderCell.d.ts +12 -0
- package/dist/Table/TableHeaderCell.js +178 -0
- package/dist/Table/hooks/useResize.d.ts +7 -0
- package/dist/Table/hooks/useResize.js +131 -0
- package/dist/Table/hooks/useScroll.d.ts +7 -0
- package/dist/Table/hooks/useScroll.js +126 -0
- package/dist/Table/hooks/useSelection.d.ts +32 -0
- package/dist/Table/hooks/useSelection.js +132 -0
- package/dist/Table/hooks/useTable.d.ts +26 -0
- package/dist/Table/hooks/useTable.js +409 -0
- package/dist/Table/index.d.ts +3 -0
- package/dist/Table/index.js +42 -0
- package/dist/Table/treeUtil.d.ts +25 -0
- package/dist/Table/treeUtil.js +117 -0
- package/dist/Table/typings.d.ts +230 -0
- package/dist/Table/typings.js +17 -0
- package/dist/Table/util.d.ts +18 -0
- package/dist/Table/util.js +177 -0
- package/dist/Tabs/TabPane.d.ts +4 -0
- package/dist/Tabs/TabPane.js +72 -0
- package/dist/Tabs/Tabs.d.ts +4 -0
- package/dist/Tabs/Tabs.js +279 -0
- package/dist/Tabs/TabsContext.d.ts +5 -0
- package/dist/Tabs/TabsContext.js +32 -0
- package/dist/Tabs/index.d.ts +3 -0
- package/dist/Tabs/index.js +42 -0
- package/dist/Tabs/typings.d.ts +54 -0
- package/dist/Tabs/typings.js +17 -0
- package/dist/Tag/Tag.d.ts +4 -0
- package/dist/Tag/Tag.js +76 -0
- package/dist/Tag/index.d.ts +2 -0
- package/dist/Tag/index.js +39 -0
- package/dist/Tag/typings.d.ts +14 -0
- package/dist/Tag/typings.js +17 -0
- package/dist/TimeLine/TimeLine.d.ts +4 -0
- package/dist/TimeLine/TimeLine.js +43 -0
- package/dist/TimeLine/TimeLineItem.d.ts +4 -0
- package/dist/TimeLine/TimeLineItem.js +55 -0
- package/dist/TimeLine/index.d.ts +3 -0
- package/dist/TimeLine/index.js +42 -0
- package/dist/TimeLine/typings.d.ts +15 -0
- package/dist/TimeLine/typings.js +17 -0
- package/dist/TimePicker/TimePicker.d.ts +11 -0
- package/dist/TimePicker/TimePicker.js +227 -0
- package/dist/TimePicker/TimePickerPanel.d.ts +4 -0
- package/dist/TimePicker/TimePickerPanel.js +75 -0
- package/dist/TimePicker/TimePickerRange.d.ts +8 -0
- package/dist/TimePicker/TimePickerRange.js +362 -0
- package/dist/TimePicker/TimeRangePanel.d.ts +4 -0
- package/dist/TimePicker/TimeRangePanel.js +173 -0
- package/dist/TimePicker/TimeSpinnerPanel.d.ts +4 -0
- package/dist/TimePicker/TimeSpinnerPanel.js +277 -0
- package/dist/TimePicker/index.d.ts +3 -0
- package/dist/TimePicker/index.js +42 -0
- package/dist/TimePicker/typings.d.ts +81 -0
- package/dist/TimePicker/typings.js +17 -0
- package/dist/TimePicker/useTimePicker.d.ts +11 -0
- package/dist/TimePicker/useTimePicker.js +86 -0
- package/dist/TimePicker/util.d.ts +3 -0
- package/dist/TimePicker/util.js +45 -0
- package/dist/Tooltip/Tooltip.d.ts +4 -0
- package/dist/Tooltip/Tooltip.js +214 -0
- package/dist/Tooltip/TooltipContext.d.ts +8 -0
- package/dist/Tooltip/TooltipContext.js +46 -0
- package/dist/Tooltip/index.d.ts +4 -0
- package/dist/Tooltip/index.js +42 -0
- package/dist/Tooltip/typings.d.ts +31 -0
- package/dist/Tooltip/typings.js +17 -0
- package/dist/Transfer/List.d.ts +6 -0
- package/dist/Transfer/List.js +260 -0
- package/dist/Transfer/ListBody.d.ts +6 -0
- package/dist/Transfer/ListBody.js +130 -0
- package/dist/Transfer/ListItem.d.ts +15 -0
- package/dist/Transfer/ListItem.js +54 -0
- package/dist/Transfer/Transfer.d.ts +5 -0
- package/dist/Transfer/Transfer.js +303 -0
- package/dist/Transfer/index.d.ts +2 -0
- package/dist/Transfer/index.js +39 -0
- package/dist/Transfer/interface.d.ts +6 -0
- package/dist/Transfer/interface.js +17 -0
- package/dist/Transfer/operation.d.ts +15 -0
- package/dist/Transfer/operation.js +49 -0
- package/dist/Transfer/search.d.ts +10 -0
- package/dist/Transfer/search.js +63 -0
- package/dist/Transfer/typings/index.d.ts +70 -0
- package/dist/Transfer/typings/index.js +17 -0
- package/dist/Transfer/typings/list.d.ts +39 -0
- package/dist/Transfer/typings/list.js +17 -0
- package/dist/Transfer/typings/listBody.d.ts +17 -0
- package/dist/Transfer/typings/listBody.js +30 -0
- package/dist/Transition/Transition.d.ts +57 -0
- package/dist/Transition/Transition.js +266 -0
- package/dist/Transition/TransitionGroup.d.ts +38 -0
- package/dist/Transition/TransitionGroup.js +99 -0
- package/dist/Transition/TransitionGroupContext.d.ts +3 -0
- package/dist/Transition/TransitionGroupContext.js +26 -0
- package/dist/Transition/childMapping.d.ts +5 -0
- package/dist/Transition/childMapping.js +128 -0
- package/dist/Transition/index.d.ts +4 -0
- package/dist/Transition/index.js +42 -0
- package/dist/Transition/util.d.ts +2 -0
- package/dist/Transition/util.js +48 -0
- package/dist/Tree/DirectoryTree.d.ts +22 -0
- package/dist/Tree/DirectoryTree.js +204 -0
- package/dist/Tree/DropIndicator.d.ts +6 -0
- package/dist/Tree/DropIndicator.js +59 -0
- package/dist/Tree/Indent.d.ts +9 -0
- package/dist/Tree/Indent.js +56 -0
- package/dist/Tree/MotionTreeNode.d.ts +15 -0
- package/dist/Tree/MotionTreeNode.js +109 -0
- package/dist/Tree/NodeList.d.ts +43 -0
- package/dist/Tree/NodeList.js +285 -0
- package/dist/Tree/RCTree.d.ts +231 -0
- package/dist/Tree/RCTree.js +938 -0
- package/dist/Tree/Tree.d.ts +126 -0
- package/dist/Tree/Tree.js +105 -0
- package/dist/Tree/TreeNode.d.ts +83 -0
- package/dist/Tree/TreeNode.js +477 -0
- package/dist/Tree/contextTypes.d.ts +59 -0
- package/dist/Tree/contextTypes.js +30 -0
- package/dist/Tree/index.d.ts +9 -0
- package/dist/Tree/index.js +48 -0
- package/dist/Tree/typings.d.ts +78 -0
- package/dist/Tree/typings.js +29 -0
- package/dist/Tree/util.d.ts +38 -0
- package/dist/Tree/util.js +312 -0
- package/dist/Tree/utils/KeyCode.d.ts +110 -0
- package/dist/Tree/utils/KeyCode.js +550 -0
- package/dist/Tree/utils/conductUtil.d.ts +11 -0
- package/dist/Tree/utils/conductUtil.js +189 -0
- package/dist/Tree/utils/dictUtil.d.ts +8 -0
- package/dist/Tree/utils/dictUtil.js +86 -0
- package/dist/Tree/utils/diffUtil.d.ts +6 -0
- package/dist/Tree/utils/diffUtil.js +65 -0
- package/dist/Tree/utils/dropIndicator.d.ts +11 -0
- package/dist/Tree/utils/dropIndicator.js +64 -0
- package/dist/Tree/utils/iconUtil.d.ts +5 -0
- package/dist/Tree/utils/iconUtil.js +69 -0
- package/dist/Tree/utils/motion.d.ts +10 -0
- package/dist/Tree/utils/motion.js +91 -0
- package/dist/Tree/utils/pickAttrs.d.ts +6 -0
- package/dist/Tree/utils/pickAttrs.js +79 -0
- package/dist/Tree/utils/treeUtil.d.ts +64 -0
- package/dist/Tree/utils/treeUtil.js +283 -0
- package/dist/TreeSelect/TreeSelect.d.ts +12 -0
- package/dist/TreeSelect/TreeSelect.js +521 -0
- package/dist/TreeSelect/Utils.d.ts +2 -0
- package/dist/TreeSelect/Utils.js +41 -0
- package/dist/TreeSelect/index.d.ts +2 -0
- package/dist/TreeSelect/index.js +39 -0
- package/dist/TreeSelect/typings.d.ts +46 -0
- package/dist/TreeSelect/typings.js +17 -0
- package/dist/Upload/Upload.d.ts +4 -0
- package/dist/Upload/Upload.js +109 -0
- package/dist/Upload/UploadContent.d.ts +4 -0
- package/dist/Upload/UploadContent.js +211 -0
- package/dist/Upload/UploadContext.d.ts +6 -0
- package/dist/Upload/UploadContext.js +33 -0
- package/dist/Upload/UploadDrag.d.ts +8 -0
- package/dist/Upload/UploadDrag.js +100 -0
- package/dist/Upload/UploadList.d.ts +4 -0
- package/dist/Upload/UploadList.js +76 -0
- package/dist/Upload/ajax.d.ts +4 -0
- package/dist/Upload/ajax.js +115 -0
- package/dist/Upload/index.d.ts +2 -0
- package/dist/Upload/index.js +39 -0
- package/dist/Upload/typings.d.ts +110 -0
- package/dist/Upload/typings.js +37 -0
- package/dist/Upload/use-handlers.d.ts +16 -0
- package/dist/Upload/use-handlers.js +191 -0
- package/dist/Util/Math.d.ts +5 -0
- package/dist/Util/Math.js +155 -0
- package/dist/Util/PopupManager.d.ts +5 -0
- package/dist/Util/PopupManager.js +29 -0
- package/dist/Util/base.d.ts +19 -0
- package/dist/Util/base.js +221 -0
- package/dist/Util/genFileId.d.ts +1 -0
- package/dist/Util/genFileId.js +30 -0
- package/dist/Util/index.d.ts +6 -0
- package/dist/Util/index.js +51 -0
- package/dist/Util/resize-event.d.ts +9 -0
- package/dist/Util/resize-event.js +72 -0
- package/dist/Util/shallowEqual.d.ts +2 -0
- package/dist/Util/shallowEqual.js +51 -0
- package/dist/Util/treeUtils.d.ts +7 -0
- package/dist/Util/treeUtils.js +71 -0
- package/dist/VirtualList/Filler.d.ts +11 -0
- package/dist/VirtualList/Filler.js +78 -0
- package/dist/VirtualList/Item.d.ts +7 -0
- package/dist/VirtualList/Item.js +37 -0
- package/dist/VirtualList/ScrollBar.d.ts +43 -0
- package/dist/VirtualList/ScrollBar.js +216 -0
- package/dist/VirtualList/VirtualList.d.ts +33 -0
- package/dist/VirtualList/VirtualList.js +280 -0
- package/dist/VirtualList/hooks/useChildren.d.ts +3 -0
- package/dist/VirtualList/hooks/useChildren.js +46 -0
- package/dist/VirtualList/hooks/useDiffItem.d.ts +2 -0
- package/dist/VirtualList/hooks/useDiffItem.js +39 -0
- package/dist/VirtualList/hooks/useFrameWheel.d.ts +6 -0
- package/dist/VirtualList/hooks/useFrameWheel.js +72 -0
- package/dist/VirtualList/hooks/useHeights.d.ts +3 -0
- package/dist/VirtualList/hooks/useHeights.js +83 -0
- package/dist/VirtualList/hooks/useLayoutEffect.d.ts +3 -0
- package/dist/VirtualList/hooks/useLayoutEffect.js +30 -0
- package/dist/VirtualList/hooks/useMobileTouchMove.d.ts +2 -0
- package/dist/VirtualList/hooks/useMobileTouchMove.js +92 -0
- package/dist/VirtualList/hooks/useOriginScroll.d.ts +2 -0
- package/dist/VirtualList/hooks/useOriginScroll.js +56 -0
- package/dist/VirtualList/hooks/useScrollTo.d.ts +5 -0
- package/dist/VirtualList/hooks/useScrollTo.js +111 -0
- package/dist/VirtualList/index.d.ts +2 -0
- package/dist/VirtualList/index.js +39 -0
- package/dist/VirtualList/interface.d.ts +8 -0
- package/dist/VirtualList/interface.js +17 -0
- package/dist/VirtualList/mock.d.ts +6 -0
- package/dist/VirtualList/mock.js +29 -0
- package/dist/VirtualList/utils/CacheMap.d.ts +7 -0
- package/dist/VirtualList/utils/CacheMap.js +36 -0
- package/dist/VirtualList/utils/algorithmUtil.d.ts +6 -0
- package/dist/VirtualList/utils/algorithmUtil.js +81 -0
- package/dist/VirtualList/utils/findDOMNode.d.ts +2 -0
- package/dist/VirtualList/utils/findDOMNode.js +30 -0
- package/dist/VirtualList/utils/isFirefox.d.ts +2 -0
- package/dist/VirtualList/utils/isFirefox.js +26 -0
- package/dist/VirtualList/utils/raf.d.ts +5 -0
- package/dist/VirtualList/utils/raf.js +57 -0
- package/dist/config/Constants.d.ts +18 -0
- package/dist/config/Constants.js +52 -0
- package/dist/hooks/animationPropsUtils.d.ts +3 -0
- package/dist/hooks/animationPropsUtils.js +53 -0
- package/dist/hooks/htmlPropsUtils.d.ts +5 -0
- package/dist/hooks/htmlPropsUtils.js +125 -0
- package/dist/hooks/index.d.ts +13 -0
- package/dist/hooks/index.js +74 -0
- package/dist/hooks/popperPropsUtils.d.ts +3 -0
- package/dist/hooks/popperPropsUtils.js +71 -0
- package/dist/hooks/prefix.d.ts +8 -0
- package/dist/hooks/prefix.js +62 -0
- package/dist/hooks/treePropsUtils.d.ts +3 -0
- package/dist/hooks/treePropsUtils.js +107 -0
- package/dist/hooks/useChildrenInstance.d.ts +4 -0
- package/dist/hooks/useChildrenInstance.js +66 -0
- package/dist/hooks/useClassNames.d.ts +29 -0
- package/dist/hooks/useClassNames.js +210 -0
- package/dist/hooks/useClickOutside.d.ts +9 -0
- package/dist/hooks/useClickOutside.js +112 -0
- package/dist/hooks/useCommonProps.d.ts +3 -0
- package/dist/hooks/useCommonProps.js +54 -0
- package/dist/hooks/useComponentWillMount.d.ts +2 -0
- package/dist/hooks/useComponentWillMount.js +33 -0
- package/dist/hooks/useControlled.d.ts +2 -0
- package/dist/hooks/useControlled.js +41 -0
- package/dist/hooks/useForceUpdate.d.ts +3 -0
- package/dist/hooks/useForceUpdate.js +39 -0
- package/dist/hooks/useUpdateEffect.d.ts +3 -0
- package/dist/hooks/useUpdateEffect.js +36 -0
- package/dist/index.css +58071 -0
- package/dist/index.d.ts +110 -0
- package/dist/index.js +235 -0
- package/dist/theme-chalk/badge/index.scss +63 -0
- package/dist/theme-chalk/bak/common/popup.scss +47 -0
- package/dist/theme-chalk/bak/common/transition.scss +118 -0
- package/dist/theme-chalk/bak/common/var.scss +1476 -0
- package/dist/theme-chalk/bak/mixins/_button.scss +224 -0
- package/dist/theme-chalk/bak/mixins/_col.scss +38 -0
- package/dist/theme-chalk/bak/mixins/_var.scss +55 -0
- package/dist/theme-chalk/bak/mixins/config.scss +5 -0
- package/dist/theme-chalk/bak/mixins/function.scss +85 -0
- package/dist/theme-chalk/bak/mixins/mixins.scss +215 -0
- package/dist/theme-chalk/bak/mixins/utils.scss +39 -0
- package/dist/theme-chalk/breadcrumb/index.scss +65 -0
- package/dist/theme-chalk/button/_mixins.scss +317 -0
- package/dist/theme-chalk/button/button-group.scss +83 -0
- package/dist/theme-chalk/button/button.scss +382 -0
- package/dist/theme-chalk/button/index.scss +2 -0
- package/dist/theme-chalk/calendar/date-picker.scss +112 -0
- package/dist/theme-chalk/calendar/date-range-picker.scss +139 -0
- package/dist/theme-chalk/calendar/date-table.scss +156 -0
- package/dist/theme-chalk/calendar/index.scss +6 -0
- package/dist/theme-chalk/calendar/month-table.scss +92 -0
- package/dist/theme-chalk/calendar/picker-panel.scss +136 -0
- package/dist/theme-chalk/calendar/year-table.scss +107 -0
- package/dist/theme-chalk/card/index.scss +44 -0
- package/dist/theme-chalk/cascader/cascader-panel.scss +184 -0
- package/dist/theme-chalk/cascader/cascader.scss +239 -0
- package/dist/theme-chalk/cascader/index.scss +2 -0
- package/dist/theme-chalk/checkbox/index.scss +255 -0
- package/dist/theme-chalk/checkbox-button/index.scss +117 -0
- package/dist/theme-chalk/checkbox-group/index.scss +33 -0
- package/dist/theme-chalk/col/_mixins.scss +62 -0
- package/dist/theme-chalk/col/index.scss +50 -0
- package/dist/theme-chalk/collapse/index.scss +84 -0
- package/dist/theme-chalk/color-picker/index.scss +340 -0
- package/dist/theme-chalk/common/_var.scss +5 -0
- package/dist/theme-chalk/common/index.d.ts +1 -0
- package/dist/theme-chalk/common/index.js +2 -0
- package/dist/theme-chalk/common/index.scss +222 -0
- package/dist/theme-chalk/date-picker/index.scss +253 -0
- package/dist/theme-chalk/date-time-picker/index.scss +3 -0
- package/dist/theme-chalk/date-time-picker/time-picker.scss +83 -0
- package/dist/theme-chalk/date-time-picker/time-range-picker.scss +32 -0
- package/dist/theme-chalk/descriptions/descriptions-item.scss +66 -0
- package/dist/theme-chalk/descriptions/descriptions.scss +160 -0
- package/dist/theme-chalk/descriptions/index.scss +2 -0
- package/dist/theme-chalk/dialog/index.scss +190 -0
- package/dist/theme-chalk/divider/index.scss +51 -0
- package/dist/theme-chalk/drawer/index.scss +250 -0
- package/dist/theme-chalk/dropdown/index.scss +147 -0
- package/dist/theme-chalk/empty/index.scss +69 -0
- package/dist/theme-chalk/form/index.scss +359 -0
- package/dist/theme-chalk/icon/index.scss +53 -0
- package/dist/theme-chalk/icon/scss/_animated.scss +205 -0
- package/dist/theme-chalk/icon/scss/_bordered-pulled.scss +20 -0
- package/dist/theme-chalk/icon/scss/_core.scss +33 -0
- package/dist/theme-chalk/icon/scss/_duotone-icons.scss +12 -0
- package/dist/theme-chalk/icon/scss/_fixed-width.scss +7 -0
- package/dist/theme-chalk/icon/scss/_functions.scss +57 -0
- package/dist/theme-chalk/icon/scss/_icons.scss +11 -0
- package/dist/theme-chalk/icon/scss/_list.scss +20 -0
- package/dist/theme-chalk/icon/scss/_mixins.scss +102 -0
- package/dist/theme-chalk/icon/scss/_rotated-flipped.scss +31 -0
- package/dist/theme-chalk/icon/scss/_screen-reader.scss +14 -0
- package/dist/theme-chalk/icon/scss/_shims.scss +2606 -0
- package/dist/theme-chalk/icon/scss/_sizing.scss +16 -0
- package/dist/theme-chalk/icon/scss/_stacked.scss +32 -0
- package/dist/theme-chalk/icon/scss/_variables.scss +9191 -0
- package/dist/theme-chalk/icon/scss/brands.scss +32 -0
- package/dist/theme-chalk/icon/scss/duotone.scss +77 -0
- package/dist/theme-chalk/icon/scss/fontawesome.scss +21 -0
- package/dist/theme-chalk/icon/scss/index.scss +15 -0
- package/dist/theme-chalk/icon/scss/light.scss +26 -0
- package/dist/theme-chalk/icon/scss/regular.scss +26 -0
- package/dist/theme-chalk/icon/scss/solid.scss +26 -0
- package/dist/theme-chalk/icon/scss/thin.scss +26 -0
- package/dist/theme-chalk/icon/scss/v4-shims.scss +11 -0
- package/dist/theme-chalk/index.scss +64 -0
- package/dist/theme-chalk/input/_mixins.scss +16 -0
- package/dist/theme-chalk/input/index.scss +3 -0
- package/dist/theme-chalk/input/input-range.scss +208 -0
- package/dist/theme-chalk/input/input.scss +575 -0
- package/dist/theme-chalk/input-number/index.scss +172 -0
- package/dist/theme-chalk/link/index.scss +184 -0
- package/dist/theme-chalk/loading/index.scss +96 -0
- package/dist/theme-chalk/message/index.scss +169 -0
- package/dist/theme-chalk/message-box/index.scss +184 -0
- package/dist/theme-chalk/notification/index.scss +155 -0
- package/dist/theme-chalk/pagination/index.scss +515 -0
- package/dist/theme-chalk/placeholder/index.scss +135 -0
- package/dist/theme-chalk/popconfirm/index.scss +35 -0
- package/dist/theme-chalk/popover/index.scss +54 -0
- package/dist/theme-chalk/popper/index.scss +86 -0
- package/dist/theme-chalk/progress/index.scss +155 -0
- package/dist/theme-chalk/radio/index.scss +2 -0
- package/dist/theme-chalk/radio/radio-button.scss +128 -0
- package/dist/theme-chalk/radio/radio.scss +171 -0
- package/dist/theme-chalk/radio-group/index.scss +31 -0
- package/dist/theme-chalk/row/index.scss +30 -0
- package/dist/theme-chalk/scrollbar/index.scss +103 -0
- package/dist/theme-chalk/select/index.scss +244 -0
- package/dist/theme-chalk/select/option-group.scss +54 -0
- package/dist/theme-chalk/select/option.scss +63 -0
- package/dist/theme-chalk/select/select-dropdown.scss +57 -0
- package/dist/theme-chalk/switch/index.scss +273 -0
- package/dist/theme-chalk/table/index.scss +714 -0
- package/dist/theme-chalk/tabs/index.scss +620 -0
- package/dist/theme-chalk/tag/index.scss +360 -0
- package/dist/theme-chalk/time-line/_timeline-item.scss +90 -0
- package/dist/theme-chalk/time-line/_timeline.scss +50 -0
- package/dist/theme-chalk/time-line/index.scss +2 -0
- package/dist/theme-chalk/time-picker/index.scss +109 -0
- package/dist/theme-chalk/tooltip/index.scss +13 -0
- package/dist/theme-chalk/transfer/index.scss +247 -0
- package/dist/theme-chalk/transition/index.scss +756 -0
- package/dist/theme-chalk/tree/_directory.scss +73 -0
- package/dist/theme-chalk/tree/_tree.scss +401 -0
- package/dist/theme-chalk/tree/index.scss +2 -0
- package/dist/theme-chalk/tree-select/index.scss +25 -0
- package/dist/theme-chalk/upload/index.scss +631 -0
- package/dist/types/common.d.ts +51 -0
- package/dist/types/common.js +17 -0
- package/dist/types/type.d.ts +4 -0
- package/dist/types/type.js +32 -0
- package/package.json +58 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Form/List.tsx
|
|
30
|
+
var List_exports = {};
|
|
31
|
+
__export(List_exports, {
|
|
32
|
+
default: () => List_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(List_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_Util = require("../Util");
|
|
37
|
+
var import_FieldContext = __toESM(require("./FieldContext"));
|
|
38
|
+
var import_FormItem = __toESM(require("./FormItem"));
|
|
39
|
+
var import_ListContext = __toESM(require("./ListContext"));
|
|
40
|
+
var import_valueUtil = require("./utils/valueUtil");
|
|
41
|
+
var List = ({ name, initialValue, children, rules, validateTrigger }) => {
|
|
42
|
+
const context = (0, import_react.useContext)(import_FieldContext.default);
|
|
43
|
+
const keyRef = (0, import_react.useRef)({
|
|
44
|
+
keys: [],
|
|
45
|
+
id: 0
|
|
46
|
+
});
|
|
47
|
+
const keyManager = keyRef.current;
|
|
48
|
+
const prefixName = (0, import_react.useMemo)(() => {
|
|
49
|
+
const parentPrefixName = (0, import_valueUtil.getNamePath)(context.prefixName) || [];
|
|
50
|
+
return [...parentPrefixName, ...(0, import_valueUtil.getNamePath)(name)];
|
|
51
|
+
}, [context.prefixName, name]);
|
|
52
|
+
const fieldContext = (0, import_react.useMemo)(() => ({ ...context, prefixName }), [context, prefixName]);
|
|
53
|
+
const listContext = (0, import_react.useMemo)(
|
|
54
|
+
() => ({
|
|
55
|
+
getKey: (namePath) => {
|
|
56
|
+
const len = prefixName.length;
|
|
57
|
+
const pathName = namePath[len];
|
|
58
|
+
return [keyManager.keys[pathName], namePath.slice(len + 1)];
|
|
59
|
+
}
|
|
60
|
+
}),
|
|
61
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
62
|
+
[prefixName]
|
|
63
|
+
);
|
|
64
|
+
if (typeof children !== "function") {
|
|
65
|
+
(0, import_Util.warning)(false, "Form.List only accepts function as children.");
|
|
66
|
+
return null;
|
|
67
|
+
}
|
|
68
|
+
const shouldUpdate = (prevValue, nextValue, { source }) => {
|
|
69
|
+
if (source === "internal") {
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
return prevValue !== nextValue;
|
|
73
|
+
};
|
|
74
|
+
return /* @__PURE__ */ import_react.default.createElement(import_ListContext.default.Provider, { value: listContext }, /* @__PURE__ */ import_react.default.createElement(import_FieldContext.default.Provider, { value: fieldContext }, /* @__PURE__ */ import_react.default.createElement(import_FormItem.default, { name: [], shouldUpdate, rules, validateTrigger, initialValue, isList: true }, ({ value = [], onChange }, meta) => {
|
|
75
|
+
const { getFieldValue } = context;
|
|
76
|
+
const getNewValue = () => {
|
|
77
|
+
const values = getFieldValue(prefixName || []);
|
|
78
|
+
return values || [];
|
|
79
|
+
};
|
|
80
|
+
const operations = {
|
|
81
|
+
add: (defaultValue, index) => {
|
|
82
|
+
const newValue = getNewValue();
|
|
83
|
+
if (index >= 0 && index <= newValue.length) {
|
|
84
|
+
keyManager.keys = [...keyManager.keys.slice(0, index), keyManager.id, ...keyManager.keys.slice(index)];
|
|
85
|
+
onChange([...newValue.slice(0, index), defaultValue, ...newValue.slice(index)]);
|
|
86
|
+
} else {
|
|
87
|
+
if (process.env.NODE_ENV !== "production" && (index < 0 || index > newValue.length)) {
|
|
88
|
+
(0, import_Util.warning)(false, "The second parameter of the add function should be a valid positive number.");
|
|
89
|
+
}
|
|
90
|
+
keyManager.keys = [...keyManager.keys, keyManager.id];
|
|
91
|
+
onChange([...newValue, defaultValue]);
|
|
92
|
+
}
|
|
93
|
+
keyManager.id += 1;
|
|
94
|
+
},
|
|
95
|
+
remove: (index) => {
|
|
96
|
+
const newValue = getNewValue();
|
|
97
|
+
const indexSet = new Set(Array.isArray(index) ? index : [index]);
|
|
98
|
+
if (indexSet.size <= 0) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
keyManager.keys = keyManager.keys.filter((_, keysIndex) => !indexSet.has(keysIndex));
|
|
102
|
+
onChange(newValue.filter((_, valueIndex) => !indexSet.has(valueIndex)));
|
|
103
|
+
},
|
|
104
|
+
move(from, to) {
|
|
105
|
+
if (from === to) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const newValue = getNewValue();
|
|
109
|
+
if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
keyManager.keys = (0, import_valueUtil.move)(keyManager.keys, from, to);
|
|
113
|
+
onChange((0, import_valueUtil.move)(newValue, from, to));
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
let listValue = value || [];
|
|
117
|
+
if (!Array.isArray(listValue)) {
|
|
118
|
+
listValue = [];
|
|
119
|
+
if (process.env.NODE_ENV !== "production") {
|
|
120
|
+
(0, import_Util.warning)(false, `Current value of '${prefixName.join(" > ")}' is not an array type.`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return children(
|
|
124
|
+
listValue.map((__, index) => {
|
|
125
|
+
let key = keyManager.keys[index];
|
|
126
|
+
if (key === void 0) {
|
|
127
|
+
keyManager.keys[index] = keyManager.id;
|
|
128
|
+
key = keyManager.keys[index];
|
|
129
|
+
keyManager.id += 1;
|
|
130
|
+
}
|
|
131
|
+
return {
|
|
132
|
+
name: index,
|
|
133
|
+
key,
|
|
134
|
+
isListField: true
|
|
135
|
+
};
|
|
136
|
+
}),
|
|
137
|
+
operations,
|
|
138
|
+
meta
|
|
139
|
+
);
|
|
140
|
+
})));
|
|
141
|
+
};
|
|
142
|
+
var List_default = List;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Key } from 'react';
|
|
2
|
+
import type { InternalNamePath } from './typings';
|
|
3
|
+
export interface ListContextProps {
|
|
4
|
+
getKey: (namePath: InternalNamePath) => [Key, InternalNamePath];
|
|
5
|
+
}
|
|
6
|
+
declare const ListContext: import("react").Context<ListContextProps>;
|
|
7
|
+
export default ListContext;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/Form/ListContext.ts
|
|
20
|
+
var ListContext_exports = {};
|
|
21
|
+
__export(ListContext_exports, {
|
|
22
|
+
default: () => ListContext_default
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ListContext_exports);
|
|
25
|
+
var import_react = require("react");
|
|
26
|
+
var ListContext = (0, import_react.createContext)(null);
|
|
27
|
+
var ListContext_default = ListContext;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { default as Form } from './Form';
|
|
2
|
+
export { FormItemContext } from './FormItemContext';
|
|
3
|
+
export type { FormInstance, FormProps, FormRules, InternalFormInstance, InternalNamePath, NamePath, Rule, RuleType, ValidateErrorEntity, ValidateMessages, ValidateOptions, } from './typings';
|
|
4
|
+
export { default as useForm } from './useForm';
|
|
5
|
+
export type { InternalFieldProps as FormItemProps } from './FormItem';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/Form/index.ts
|
|
30
|
+
var Form_exports = {};
|
|
31
|
+
__export(Form_exports, {
|
|
32
|
+
Form: () => import_Form.default,
|
|
33
|
+
FormItemContext: () => import_FormItemContext.FormItemContext,
|
|
34
|
+
useForm: () => import_useForm.default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(Form_exports);
|
|
37
|
+
var import_Form = __toESM(require("./Form"));
|
|
38
|
+
var import_FormItemContext = require("./FormItemContext");
|
|
39
|
+
var import_useForm = __toESM(require("./useForm"));
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
Form,
|
|
43
|
+
FormItemContext,
|
|
44
|
+
useForm
|
|
45
|
+
});
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import React, { ComponentClass, FC } from 'react';
|
|
2
|
+
import type { Options as ScrollOptions } from 'scroll-into-view-if-needed';
|
|
3
|
+
import { BaseProps, ComponentChildren, NativeProps, TypeAttributes } from '../types/common';
|
|
4
|
+
type BaseFormProps = Omit<React.AllHTMLAttributes<HTMLFormElement>, 'onSubmit' | 'form' | 'size' | 'children'>;
|
|
5
|
+
type RenderProps = (values: Store, form: FormInstance) => React.ReactElement;
|
|
6
|
+
export type FormRules = Record<string, Rule[]>;
|
|
7
|
+
export interface FormProps<Values = any> extends BaseFormProps {
|
|
8
|
+
form?: FormInstance<Values>;
|
|
9
|
+
children?: RenderProps | ComponentChildren;
|
|
10
|
+
component?: false | string | FC<any> | ComponentClass<any, any>;
|
|
11
|
+
fields?: FieldData[];
|
|
12
|
+
rules?: FormRules;
|
|
13
|
+
name?: string;
|
|
14
|
+
validateMessages?: ValidateMessages;
|
|
15
|
+
onValuesChange?: Callbacks<Values>['onValuesChange'];
|
|
16
|
+
onFieldsChange?: Callbacks<Values>['onFieldsChange'];
|
|
17
|
+
onFinish?: Callbacks<Values>['onFinish'];
|
|
18
|
+
onFinishFailed?: Callbacks<Values>['onFinishFailed'];
|
|
19
|
+
validateTrigger?: string | string[] | false;
|
|
20
|
+
preserve?: boolean;
|
|
21
|
+
colon?: boolean;
|
|
22
|
+
initialValues?: Store;
|
|
23
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
24
|
+
labelWidth?: string | number;
|
|
25
|
+
inline?: boolean;
|
|
26
|
+
flat?: boolean;
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
size?: TypeAttributes.Size;
|
|
29
|
+
onChange?: (model: any) => void;
|
|
30
|
+
formStyle?: React.CSSProperties;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface FormItemProps<T> extends BaseProps, NativeProps {
|
|
34
|
+
colon?: boolean;
|
|
35
|
+
label?: boolean | string | React.ReactElement;
|
|
36
|
+
size?: TypeAttributes.Size;
|
|
37
|
+
labelWidth?: string | number;
|
|
38
|
+
required?: boolean;
|
|
39
|
+
noStyle?: boolean;
|
|
40
|
+
validateStatus?: 'success' | 'warning' | 'error' | 'validating';
|
|
41
|
+
help?: string | React.ReactElement;
|
|
42
|
+
pure?: boolean;
|
|
43
|
+
center?: boolean;
|
|
44
|
+
labelStyle?: React.CSSProperties;
|
|
45
|
+
errorStyle?: React.CSSProperties;
|
|
46
|
+
warningStyle?: React.CSSProperties;
|
|
47
|
+
}
|
|
48
|
+
export interface FieldEntity {
|
|
49
|
+
onStoreChange: (store: Store, namePathList: InternalNamePath[] | null, info: ValuedNotifyInfo) => void;
|
|
50
|
+
isFieldTouched: () => boolean;
|
|
51
|
+
isFieldDirty: () => boolean;
|
|
52
|
+
isFieldValidating: () => boolean;
|
|
53
|
+
isListField: () => boolean;
|
|
54
|
+
isList: () => boolean;
|
|
55
|
+
isPreserve: () => boolean;
|
|
56
|
+
validateRules: (options?: ValidateOptions) => Promise<RuleError[]>;
|
|
57
|
+
getMeta: () => Meta;
|
|
58
|
+
getNamePath: () => InternalNamePath;
|
|
59
|
+
getErrors: () => string[];
|
|
60
|
+
getWarnings: () => string[];
|
|
61
|
+
props: {
|
|
62
|
+
label?: string | boolean | React.ReactElement<any>;
|
|
63
|
+
name?: NamePath;
|
|
64
|
+
rules?: Rule[];
|
|
65
|
+
dependencies?: NamePath[];
|
|
66
|
+
initialValue?: any;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
interface UpdateAction {
|
|
70
|
+
type: 'updateValue';
|
|
71
|
+
namePath: InternalNamePath;
|
|
72
|
+
value: StoreValue;
|
|
73
|
+
}
|
|
74
|
+
interface ValidateAction {
|
|
75
|
+
type: 'validateField';
|
|
76
|
+
namePath: InternalNamePath;
|
|
77
|
+
triggerName: string;
|
|
78
|
+
}
|
|
79
|
+
export type ReducerAction = UpdateAction | ValidateAction;
|
|
80
|
+
export type InternalNamePath = (string | number)[];
|
|
81
|
+
export type NamePath = string | number | InternalNamePath;
|
|
82
|
+
export type StoreValue = any;
|
|
83
|
+
export type Store = Record<string, StoreValue>;
|
|
84
|
+
export interface Meta {
|
|
85
|
+
touched: boolean;
|
|
86
|
+
validating: boolean;
|
|
87
|
+
errors: string[];
|
|
88
|
+
warnings: string[];
|
|
89
|
+
name: InternalNamePath;
|
|
90
|
+
}
|
|
91
|
+
export interface InternalFieldData extends Meta {
|
|
92
|
+
value: StoreValue;
|
|
93
|
+
}
|
|
94
|
+
export interface FieldData extends Partial<Omit<InternalFieldData, 'name'>> {
|
|
95
|
+
name: NamePath;
|
|
96
|
+
}
|
|
97
|
+
export type RuleType = 'string' | 'number' | 'boolean' | 'method' | 'regexp' | 'integer' | 'float' | 'object' | 'enum' | 'date' | 'url' | 'hex' | 'email';
|
|
98
|
+
type Validator = (rule: RuleObject, value: StoreValue, callback: (error?: string) => void) => Promise<void | any> | void;
|
|
99
|
+
export type RuleRender = (form: FormInstance) => RuleObject;
|
|
100
|
+
export interface ValidatorRule {
|
|
101
|
+
warningOnly?: boolean;
|
|
102
|
+
message?: string | React.ReactElement;
|
|
103
|
+
validator: Validator;
|
|
104
|
+
}
|
|
105
|
+
interface BaseRule {
|
|
106
|
+
label?: boolean | string;
|
|
107
|
+
warningOnly?: boolean;
|
|
108
|
+
enum?: StoreValue[];
|
|
109
|
+
len?: number;
|
|
110
|
+
max?: number;
|
|
111
|
+
message?: string | React.ReactElement;
|
|
112
|
+
min?: number;
|
|
113
|
+
pattern?: RegExp;
|
|
114
|
+
required?: boolean;
|
|
115
|
+
transform?: (value: StoreValue) => StoreValue;
|
|
116
|
+
type?: RuleType;
|
|
117
|
+
whitespace?: boolean;
|
|
118
|
+
validateTrigger?: string | string[];
|
|
119
|
+
phone?: boolean;
|
|
120
|
+
}
|
|
121
|
+
type AggregationRule = BaseRule & Partial<ValidatorRule>;
|
|
122
|
+
interface ArrayRule extends Omit<AggregationRule, 'type'> {
|
|
123
|
+
type: 'array';
|
|
124
|
+
defaultField?: RuleObject;
|
|
125
|
+
}
|
|
126
|
+
export type RuleObject = AggregationRule | ArrayRule;
|
|
127
|
+
export type Rule = RuleObject | RuleRender;
|
|
128
|
+
export interface ValidateErrorEntity<Values = any> {
|
|
129
|
+
values: Values;
|
|
130
|
+
errorFields: {
|
|
131
|
+
name: InternalNamePath;
|
|
132
|
+
errors: string[];
|
|
133
|
+
}[];
|
|
134
|
+
outOfDate: boolean;
|
|
135
|
+
}
|
|
136
|
+
export interface FormItem {
|
|
137
|
+
onStoreChange: (store: Store, namePathList: InternalNamePath[] | null, info: ValuedNotifyInfo) => void;
|
|
138
|
+
isFieldTouched: () => boolean;
|
|
139
|
+
isFieldDirty: () => boolean;
|
|
140
|
+
isFieldValidating: () => boolean;
|
|
141
|
+
isListField: () => boolean;
|
|
142
|
+
isList: () => boolean;
|
|
143
|
+
isPreserve: () => boolean;
|
|
144
|
+
validateRules: (options?: ValidateOptions) => Promise<RuleError[]>;
|
|
145
|
+
getMeta: () => Meta;
|
|
146
|
+
getNamePath: () => InternalNamePath;
|
|
147
|
+
getErrors: () => string[];
|
|
148
|
+
getWarnings: () => string[];
|
|
149
|
+
props: {
|
|
150
|
+
name?: NamePath;
|
|
151
|
+
rules?: Rule[];
|
|
152
|
+
dependencies?: NamePath[];
|
|
153
|
+
initialValue?: any;
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
export interface FieldError {
|
|
157
|
+
name: InternalNamePath;
|
|
158
|
+
errors: string[];
|
|
159
|
+
warnings: string[];
|
|
160
|
+
}
|
|
161
|
+
export interface RuleError {
|
|
162
|
+
errors: string[];
|
|
163
|
+
rule: RuleObject;
|
|
164
|
+
}
|
|
165
|
+
export interface ValidateOptions {
|
|
166
|
+
label?: string | boolean | React.ReactElement<{}>;
|
|
167
|
+
triggerName?: string;
|
|
168
|
+
validateMessages?: ValidateMessages;
|
|
169
|
+
recursive?: boolean;
|
|
170
|
+
}
|
|
171
|
+
export type InternalValidateFields<Values = any> = (nameList?: NamePath[], options?: ValidateOptions) => Promise<Values>;
|
|
172
|
+
export type ValidateFields<Values = any> = (nameList?: NamePath[]) => Promise<Values>;
|
|
173
|
+
interface ValueUpdateInfo {
|
|
174
|
+
type: 'valueUpdate';
|
|
175
|
+
source: 'internal' | 'external';
|
|
176
|
+
}
|
|
177
|
+
interface ValidateFinishInfo {
|
|
178
|
+
type: 'validateFinish';
|
|
179
|
+
}
|
|
180
|
+
interface ResetInfo {
|
|
181
|
+
type: 'reset';
|
|
182
|
+
}
|
|
183
|
+
interface RemoveInfo {
|
|
184
|
+
type: 'remove';
|
|
185
|
+
}
|
|
186
|
+
interface SetFieldInfo {
|
|
187
|
+
type: 'setField';
|
|
188
|
+
data: FieldData;
|
|
189
|
+
}
|
|
190
|
+
interface DependenciesUpdateInfo {
|
|
191
|
+
type: 'dependenciesUpdate';
|
|
192
|
+
relatedFields: InternalNamePath[];
|
|
193
|
+
}
|
|
194
|
+
export type NotifyInfo = ValueUpdateInfo | ValidateFinishInfo | ResetInfo | RemoveInfo | SetFieldInfo | DependenciesUpdateInfo;
|
|
195
|
+
export type ValuedNotifyInfo = NotifyInfo & {
|
|
196
|
+
store: Store;
|
|
197
|
+
};
|
|
198
|
+
export interface Callbacks<Values = any> {
|
|
199
|
+
onValuesChange?: (changedValues: any, values: Values) => void;
|
|
200
|
+
onFieldsChange?: (changedFields: FieldData[], allFields: FieldData[]) => void;
|
|
201
|
+
onFinish?: (values: Values) => void;
|
|
202
|
+
onFinishFailed?: (errorInfo: ValidateErrorEntity<Values>) => void;
|
|
203
|
+
}
|
|
204
|
+
export type WatchCallBack = (values: Store, namePathList: InternalNamePath[]) => void;
|
|
205
|
+
export interface InternalHooks {
|
|
206
|
+
dispatch: (action: ReducerAction) => void;
|
|
207
|
+
initEntityValue: (entity: FormItem) => void;
|
|
208
|
+
registerField: (entity: FormItem) => () => void;
|
|
209
|
+
useSubscribe: (subscribable: boolean) => void;
|
|
210
|
+
setInitialValues: (values: Store, init: boolean) => void;
|
|
211
|
+
destroyForm: () => void;
|
|
212
|
+
setCallbacks: (callbacks: Callbacks) => void;
|
|
213
|
+
registerWatch: (callback: WatchCallBack) => () => void;
|
|
214
|
+
getFields: (namePathList?: InternalNamePath[]) => FieldData[];
|
|
215
|
+
setValidateMessages: (validateMessages: ValidateMessages) => void;
|
|
216
|
+
setPreserve: (preserve?: boolean) => void;
|
|
217
|
+
getInitialValue: (namePath: InternalNamePath) => StoreValue;
|
|
218
|
+
}
|
|
219
|
+
type RecursivePartial<T> = T extends object ? {
|
|
220
|
+
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
221
|
+
} : any;
|
|
222
|
+
export interface FormInstance<Values = any> {
|
|
223
|
+
getFieldValue: (name: NamePath) => StoreValue;
|
|
224
|
+
getFieldsValue: (() => Values) & ((nameList: NamePath[] | true, filterFunc?: (meta: Meta) => boolean) => any);
|
|
225
|
+
getFieldError: (name: NamePath) => string[];
|
|
226
|
+
getFieldsError: (nameList?: NamePath[]) => FieldError[];
|
|
227
|
+
getFieldWarning: (name: NamePath) => string[];
|
|
228
|
+
isFieldsTouched: ((nameList?: NamePath[], allFieldsTouched?: boolean) => boolean) & ((allFieldsTouched?: boolean) => boolean);
|
|
229
|
+
isFieldTouched: (name: NamePath) => boolean;
|
|
230
|
+
isFieldValidating: (name: NamePath) => boolean;
|
|
231
|
+
isFieldsValidating: (nameList: NamePath[]) => boolean;
|
|
232
|
+
resetFields: (fields?: NamePath[]) => void;
|
|
233
|
+
setFields: (fields: FieldData[]) => void;
|
|
234
|
+
setFieldValue: (name: NamePath, value: any) => void;
|
|
235
|
+
setFieldsValue: (values: RecursivePartial<Values>) => void;
|
|
236
|
+
validateFields: ValidateFields<Values>;
|
|
237
|
+
scrollToField: (name: NamePath, options?: ScrollOptions) => void;
|
|
238
|
+
submit: () => void;
|
|
239
|
+
}
|
|
240
|
+
export type InternalFormInstance = Omit<FormInstance, 'validateFields'> & {
|
|
241
|
+
validateFields: InternalValidateFields;
|
|
242
|
+
prefixName?: InternalNamePath;
|
|
243
|
+
validateTrigger?: string | string[] | false;
|
|
244
|
+
getInternalHooks: (secret: string) => InternalHooks | null;
|
|
245
|
+
_init?: boolean;
|
|
246
|
+
colon?: boolean;
|
|
247
|
+
disabled?: boolean;
|
|
248
|
+
labelPosition?: 'left' | 'right' | 'top';
|
|
249
|
+
labelWidth?: string | number;
|
|
250
|
+
size?: TypeAttributes.Size;
|
|
251
|
+
rules?: FormRules;
|
|
252
|
+
};
|
|
253
|
+
export type EventArgs = any[];
|
|
254
|
+
type ValidateMessage = string | (() => string);
|
|
255
|
+
export interface ValidateMessages {
|
|
256
|
+
default?: ValidateMessage;
|
|
257
|
+
required?: ValidateMessage;
|
|
258
|
+
enum?: ValidateMessage;
|
|
259
|
+
whitespace?: ValidateMessage;
|
|
260
|
+
date?: {
|
|
261
|
+
format?: ValidateMessage;
|
|
262
|
+
parse?: ValidateMessage;
|
|
263
|
+
invalid?: ValidateMessage;
|
|
264
|
+
};
|
|
265
|
+
types?: {
|
|
266
|
+
string?: ValidateMessage;
|
|
267
|
+
method?: ValidateMessage;
|
|
268
|
+
array?: ValidateMessage;
|
|
269
|
+
object?: ValidateMessage;
|
|
270
|
+
number?: ValidateMessage;
|
|
271
|
+
date?: ValidateMessage;
|
|
272
|
+
boolean?: ValidateMessage;
|
|
273
|
+
integer?: ValidateMessage;
|
|
274
|
+
float?: ValidateMessage;
|
|
275
|
+
regexp?: ValidateMessage;
|
|
276
|
+
email?: ValidateMessage;
|
|
277
|
+
url?: ValidateMessage;
|
|
278
|
+
hex?: ValidateMessage;
|
|
279
|
+
};
|
|
280
|
+
string?: {
|
|
281
|
+
len?: ValidateMessage;
|
|
282
|
+
min?: ValidateMessage;
|
|
283
|
+
max?: ValidateMessage;
|
|
284
|
+
range?: ValidateMessage;
|
|
285
|
+
};
|
|
286
|
+
number?: {
|
|
287
|
+
len?: ValidateMessage;
|
|
288
|
+
min?: ValidateMessage;
|
|
289
|
+
max?: ValidateMessage;
|
|
290
|
+
range?: ValidateMessage;
|
|
291
|
+
};
|
|
292
|
+
array?: {
|
|
293
|
+
len?: ValidateMessage;
|
|
294
|
+
min?: ValidateMessage;
|
|
295
|
+
max?: ValidateMessage;
|
|
296
|
+
range?: ValidateMessage;
|
|
297
|
+
};
|
|
298
|
+
pattern?: {
|
|
299
|
+
mismatch?: ValidateMessage;
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __copyProps = (to, from, except, desc) => {
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from))
|
|
8
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
+
}
|
|
11
|
+
return to;
|
|
12
|
+
};
|
|
13
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
|
|
15
|
+
// src/Form/typings.ts
|
|
16
|
+
var typings_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(typings_exports);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { FormInstance, InternalFormInstance, InternalNamePath, StoreValue } from './typings';
|
|
2
|
+
interface UpdateAction {
|
|
3
|
+
type: 'updateValue';
|
|
4
|
+
namePath: InternalNamePath;
|
|
5
|
+
value: StoreValue;
|
|
6
|
+
}
|
|
7
|
+
interface ValidateAction {
|
|
8
|
+
type: 'validateField';
|
|
9
|
+
namePath: InternalNamePath;
|
|
10
|
+
triggerName: string;
|
|
11
|
+
}
|
|
12
|
+
export type ReducerAction = UpdateAction | ValidateAction;
|
|
13
|
+
export declare class FormStore {
|
|
14
|
+
private formHooked;
|
|
15
|
+
private forceRootUpdate;
|
|
16
|
+
private subscribable;
|
|
17
|
+
private store;
|
|
18
|
+
private fieldEntities;
|
|
19
|
+
private initialValues;
|
|
20
|
+
private callbacks;
|
|
21
|
+
private validateMessages;
|
|
22
|
+
private preserve?;
|
|
23
|
+
private lastValidatePromise;
|
|
24
|
+
constructor(forceRootUpdate: () => void);
|
|
25
|
+
getForm: () => InternalFormInstance;
|
|
26
|
+
private scrollToField;
|
|
27
|
+
private getInternalHooks;
|
|
28
|
+
private useSubscribe;
|
|
29
|
+
private prevWithoutPreserves;
|
|
30
|
+
private setInitialValues;
|
|
31
|
+
private destroyForm;
|
|
32
|
+
private getInitialValue;
|
|
33
|
+
private setCallbacks;
|
|
34
|
+
private setValidateMessages;
|
|
35
|
+
private setPreserve;
|
|
36
|
+
private watchList;
|
|
37
|
+
private registerWatch;
|
|
38
|
+
private notifyWatch;
|
|
39
|
+
private timeoutId;
|
|
40
|
+
private warningUnhooked;
|
|
41
|
+
private updateStore;
|
|
42
|
+
private getFieldEntities;
|
|
43
|
+
private getFieldsMap;
|
|
44
|
+
private getFieldEntitiesForNamePathList;
|
|
45
|
+
private getFieldsValue;
|
|
46
|
+
private getFieldValue;
|
|
47
|
+
private getFieldsError;
|
|
48
|
+
private getFieldError;
|
|
49
|
+
private getFieldWarning;
|
|
50
|
+
private isFieldsTouched;
|
|
51
|
+
private isFieldTouched;
|
|
52
|
+
private isFieldsValidating;
|
|
53
|
+
private isFieldValidating;
|
|
54
|
+
private resetWithFieldInitialValue;
|
|
55
|
+
private resetFields;
|
|
56
|
+
private setFields;
|
|
57
|
+
private getFields;
|
|
58
|
+
private initEntityValue;
|
|
59
|
+
private isMergedPreserve;
|
|
60
|
+
private registerField;
|
|
61
|
+
private dispatch;
|
|
62
|
+
private notifyObservers;
|
|
63
|
+
private triggerDependenciesUpdate;
|
|
64
|
+
private updateValue;
|
|
65
|
+
private setFieldsValue;
|
|
66
|
+
private setFieldValue;
|
|
67
|
+
private getDependencyChildrenFields;
|
|
68
|
+
private triggerOnFieldsChange;
|
|
69
|
+
private validateFields;
|
|
70
|
+
private submit;
|
|
71
|
+
}
|
|
72
|
+
declare function useForm<Values = any>(form?: FormInstance<Values>): [FormInstance<Values>];
|
|
73
|
+
export default useForm;
|