@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,217 @@
|
|
|
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/MessageBox/MessageBox.tsx
|
|
30
|
+
var MessageBox_exports = {};
|
|
31
|
+
__export(MessageBox_exports, {
|
|
32
|
+
default: () => MessageBox_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(MessageBox_exports);
|
|
35
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_isString = __toESM(require("lodash/isString"));
|
|
37
|
+
var import_react = __toESM(require("react"));
|
|
38
|
+
var import_Button = require("../Button");
|
|
39
|
+
var import_Dialog = require("../Dialog");
|
|
40
|
+
var import_hooks = require("../hooks");
|
|
41
|
+
var import_prefix = require("../hooks/prefix");
|
|
42
|
+
var import_Icon = require("../Icon");
|
|
43
|
+
var import_Input = require("../Input");
|
|
44
|
+
var import_Util = require("../Util");
|
|
45
|
+
var MessageBox = (0, import_react.memo)(
|
|
46
|
+
(0, import_react.forwardRef)((props, ref) => {
|
|
47
|
+
const { boxType, onAction, options } = props;
|
|
48
|
+
const {
|
|
49
|
+
title,
|
|
50
|
+
message,
|
|
51
|
+
type,
|
|
52
|
+
icon,
|
|
53
|
+
width = 420,
|
|
54
|
+
callback,
|
|
55
|
+
showClose = true,
|
|
56
|
+
beforeClose,
|
|
57
|
+
showCancelButton = true,
|
|
58
|
+
showConfirmButton = true,
|
|
59
|
+
cancelButtonText = "取消",
|
|
60
|
+
cancelButtonClass,
|
|
61
|
+
confirmButtonClass,
|
|
62
|
+
buttonSize,
|
|
63
|
+
buttonPosition = "right",
|
|
64
|
+
overflow,
|
|
65
|
+
showInput,
|
|
66
|
+
inputType,
|
|
67
|
+
inputPlaceholder,
|
|
68
|
+
inputPattern,
|
|
69
|
+
inputErrorMessage,
|
|
70
|
+
inputValidator,
|
|
71
|
+
distinguishCancelAndClose,
|
|
72
|
+
classPrefix = "message-box",
|
|
73
|
+
className,
|
|
74
|
+
style,
|
|
75
|
+
padding,
|
|
76
|
+
...rest
|
|
77
|
+
} = options;
|
|
78
|
+
const { e, bm } = (0, import_hooks.useClassNames)(classPrefix);
|
|
79
|
+
const [visible, setVisible] = (0, import_react.useState)(true);
|
|
80
|
+
const [confirmButtonLoading, setConfirmButtonLoading] = (0, import_react.useState)(false);
|
|
81
|
+
const [confirmButtonText, setConfirmButtonText] = (0, import_react.useState)(options.confirmButtonText || "确定");
|
|
82
|
+
const [inputValue, setInputValue] = (0, import_hooks.useControlled)(options.inputValue);
|
|
83
|
+
const [editorErrorMessage, setEditorErrorMessage] = (0, import_react.useState)(inputErrorMessage);
|
|
84
|
+
const [validateError, setValidateError] = (0, import_react.useState)(false);
|
|
85
|
+
const [transitionProps] = (0, import_hooks.partitionAnimationProps)(rest);
|
|
86
|
+
const containerRef = (0, import_react.useRef)();
|
|
87
|
+
const iconContent = (0, import_react.useMemo)(() => {
|
|
88
|
+
var _a;
|
|
89
|
+
if ((0, import_Util.isNotEmpty)(icon)) {
|
|
90
|
+
if ((0, import_isString.default)(icon)) {
|
|
91
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { className: e`status`, name: icon });
|
|
92
|
+
} else {
|
|
93
|
+
return (0, import_react.cloneElement)(icon, {
|
|
94
|
+
...(icon == null ? void 0 : icon.props) ?? {},
|
|
95
|
+
className: (0, import_classnames.default)((_a = icon == null ? void 0 : icon.props) == null ? void 0 : _a.className, e`status`)
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
} else {
|
|
99
|
+
switch (type) {
|
|
100
|
+
case "success":
|
|
101
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { className: (0, import_classnames.default)(e`status`, bm("icon", type)), name: "check" });
|
|
102
|
+
case "info":
|
|
103
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { className: (0, import_classnames.default)(e`status`, bm("icon", type)), name: "circle-info" });
|
|
104
|
+
case "warning":
|
|
105
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { className: (0, import_classnames.default)(e`status`, bm("icon", type)), name: "circle-exclamation", prefix: "fas" });
|
|
106
|
+
case "error":
|
|
107
|
+
return /* @__PURE__ */ import_react.default.createElement(import_Icon.Icon, { className: (0, import_classnames.default)(e`status`, bm("icon", type)), name: "circle-xmark", prefix: "fas" });
|
|
108
|
+
default:
|
|
109
|
+
return null;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}, [bm, e, icon, type]);
|
|
113
|
+
const done = (0, import_react.useCallback)(() => {
|
|
114
|
+
setVisible(false);
|
|
115
|
+
}, []);
|
|
116
|
+
const validate = (value) => {
|
|
117
|
+
if (boxType === "prompt") {
|
|
118
|
+
if (inputPattern && !inputPattern.test(value || "")) {
|
|
119
|
+
setEditorErrorMessage(inputErrorMessage);
|
|
120
|
+
setValidateError(true);
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
if (typeof inputValidator === "function") {
|
|
124
|
+
const validateResult = inputValidator(value);
|
|
125
|
+
if (validateResult === false) {
|
|
126
|
+
setEditorErrorMessage(inputErrorMessage);
|
|
127
|
+
setValidateError(true);
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
if (typeof validateResult === "string") {
|
|
131
|
+
setEditorErrorMessage(validateResult);
|
|
132
|
+
setValidateError(true);
|
|
133
|
+
return false;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
setEditorErrorMessage("");
|
|
138
|
+
setValidateError(false);
|
|
139
|
+
return true;
|
|
140
|
+
};
|
|
141
|
+
const handleAction = (action) => {
|
|
142
|
+
if (boxType === "prompt" && action === "confirm" && !validate(inputValue)) {
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
if (action === "close") {
|
|
146
|
+
action = distinguishCancelAndClose ? action : "cancel";
|
|
147
|
+
}
|
|
148
|
+
if (beforeClose) {
|
|
149
|
+
beforeClose(
|
|
150
|
+
action,
|
|
151
|
+
() => {
|
|
152
|
+
done();
|
|
153
|
+
onAction == null ? void 0 : onAction(action, inputValue);
|
|
154
|
+
},
|
|
155
|
+
ref
|
|
156
|
+
);
|
|
157
|
+
} else {
|
|
158
|
+
if (props.boxType === "prompt") {
|
|
159
|
+
callback == null ? void 0 : callback(inputValue, action);
|
|
160
|
+
} else {
|
|
161
|
+
callback == null ? void 0 : callback(action);
|
|
162
|
+
}
|
|
163
|
+
done();
|
|
164
|
+
onAction == null ? void 0 : onAction(action, inputValue);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
const messageContainer = (0, import_react.useMemo)(() => {
|
|
168
|
+
if (typeof message === "string") {
|
|
169
|
+
if (boxType === "prompt") {
|
|
170
|
+
return /* @__PURE__ */ import_react.default.createElement("label", { htmlFor: "input" }, message);
|
|
171
|
+
} else {
|
|
172
|
+
return /* @__PURE__ */ import_react.default.createElement("p", null, message);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
return message;
|
|
176
|
+
}, [boxType, message]);
|
|
177
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
178
|
+
get ref() {
|
|
179
|
+
return containerRef;
|
|
180
|
+
},
|
|
181
|
+
close: done,
|
|
182
|
+
setConfirmButtonLoading,
|
|
183
|
+
setConfirmButtonText
|
|
184
|
+
}));
|
|
185
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
186
|
+
import_Dialog.Dialog,
|
|
187
|
+
{
|
|
188
|
+
ref: containerRef,
|
|
189
|
+
classPrefix,
|
|
190
|
+
visible,
|
|
191
|
+
className: (0, import_classnames.default)("is-message-box", className),
|
|
192
|
+
style: { ...style, [`--${import_prefix.globalKey}-messagebox-width`]: (0, import_Util.addUnit)(width) },
|
|
193
|
+
modal: true,
|
|
194
|
+
overflow,
|
|
195
|
+
showClose,
|
|
196
|
+
title,
|
|
197
|
+
beforeClose: () => handleAction("close"),
|
|
198
|
+
...transitionProps
|
|
199
|
+
},
|
|
200
|
+
/* @__PURE__ */ import_react.default.createElement(import_Dialog.Dialog.body, { classPrefix, padding }, /* @__PURE__ */ import_react.default.createElement("div", { className: e`container` }, iconContent, /* @__PURE__ */ import_react.default.createElement("div", { className: e`message` }, messageContainer)), boxType === "prompt" && showInput && /* @__PURE__ */ import_react.default.createElement("div", { className: e`input` }, /* @__PURE__ */ import_react.default.createElement(
|
|
201
|
+
import_Input.Input,
|
|
202
|
+
{
|
|
203
|
+
type: inputType,
|
|
204
|
+
error: validateError,
|
|
205
|
+
placeholder: inputPlaceholder,
|
|
206
|
+
onChange: (value) => {
|
|
207
|
+
setInputValue(value);
|
|
208
|
+
validate(value);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
), validateError && /* @__PURE__ */ import_react.default.createElement("div", { className: e`errormsg` }, editorErrorMessage))),
|
|
212
|
+
(showCancelButton || showConfirmButton) && /* @__PURE__ */ import_react.default.createElement(import_Dialog.Dialog.footer, { classPrefix, position: buttonPosition }, showCancelButton && /* @__PURE__ */ import_react.default.createElement(import_Button.Button, { className: cancelButtonClass, size: buttonSize, onClick: () => handleAction("cancel") }, cancelButtonText), showConfirmButton && /* @__PURE__ */ import_react.default.createElement(import_Button.Button, { className: confirmButtonClass, type: "primary", size: buttonSize, loading: confirmButtonLoading, onClick: () => handleAction("confirm") }, confirmButtonText))
|
|
213
|
+
);
|
|
214
|
+
})
|
|
215
|
+
);
|
|
216
|
+
MessageBox.displayName = "ElMessageBox";
|
|
217
|
+
var MessageBox_default = MessageBox;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MessageBoxData, MessageBoxProps } from './typings';
|
|
3
|
+
export declare const MessageBox: {
|
|
4
|
+
(options?: MessageBoxProps): Promise<unknown>;
|
|
5
|
+
alert: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options: MessageBoxProps) => Promise<MessageBoxData>;
|
|
6
|
+
confirm: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options: MessageBoxProps) => Promise<MessageBoxData>;
|
|
7
|
+
prompt: (message: string | React.ReactElement, title: string | React.ReactElement | MessageBoxProps, options: MessageBoxProps) => Promise<MessageBoxData>;
|
|
8
|
+
};
|
|
9
|
+
export type { Action as MessageBoxAction, MessageBoxMethod, MessageBoxProps, MessageBoxRef } from './typings';
|
|
@@ -0,0 +1,99 @@
|
|
|
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/MessageBox/index.ts
|
|
30
|
+
var MessageBox_exports = {};
|
|
31
|
+
__export(MessageBox_exports, {
|
|
32
|
+
MessageBox: () => MessageBox
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(MessageBox_exports);
|
|
35
|
+
var import_Util = require("../Util");
|
|
36
|
+
var import_Main = __toESM(require("./Main"));
|
|
37
|
+
var MESSAGE_BOX_DEFAULT_OPTS = {
|
|
38
|
+
alert: { closeOnClickModal: false },
|
|
39
|
+
confirm: { showCancelButton: true },
|
|
40
|
+
prompt: { showCancelButton: true, showInput: true }
|
|
41
|
+
};
|
|
42
|
+
var instanceFactory = (boxType) => {
|
|
43
|
+
return (message, title, options) => {
|
|
44
|
+
const { distinguishCancelAndClose } = options;
|
|
45
|
+
let titleOrOpts = "";
|
|
46
|
+
if ((0, import_Util.isObject)(title)) {
|
|
47
|
+
options = title;
|
|
48
|
+
titleOrOpts = "";
|
|
49
|
+
} else if ((0, import_Util.isUndefined)(title)) {
|
|
50
|
+
titleOrOpts = "";
|
|
51
|
+
} else {
|
|
52
|
+
titleOrOpts = title;
|
|
53
|
+
}
|
|
54
|
+
return new Promise((resolve, reject) => {
|
|
55
|
+
new import_Main.default({
|
|
56
|
+
boxType,
|
|
57
|
+
options: {
|
|
58
|
+
message,
|
|
59
|
+
title: titleOrOpts,
|
|
60
|
+
...MESSAGE_BOX_DEFAULT_OPTS[boxType],
|
|
61
|
+
...options
|
|
62
|
+
},
|
|
63
|
+
onAction: (action, value) => {
|
|
64
|
+
if (action === "confirm") {
|
|
65
|
+
resolve(boxType === "prompt" ? { value, action } : action);
|
|
66
|
+
} else if (action === "cancel") {
|
|
67
|
+
reject(action);
|
|
68
|
+
} else if (action === "close") {
|
|
69
|
+
reject(distinguishCancelAndClose ? action : "cancel");
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
var MessageBox = (options = {}) => {
|
|
77
|
+
return new Promise((resolve, reject) => {
|
|
78
|
+
new import_Main.default({
|
|
79
|
+
options,
|
|
80
|
+
boxType: "",
|
|
81
|
+
onAction: (action) => {
|
|
82
|
+
if (action === "confirm") {
|
|
83
|
+
resolve(action);
|
|
84
|
+
} else if (action === "cancel") {
|
|
85
|
+
reject(action);
|
|
86
|
+
} else if (action === "close") {
|
|
87
|
+
reject((options == null ? void 0 : options.distinguishCancelAndClose) ? action : "cancel");
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
MessageBox.alert = instanceFactory("alert");
|
|
94
|
+
MessageBox.confirm = instanceFactory("confirm");
|
|
95
|
+
MessageBox.prompt = instanceFactory("prompt");
|
|
96
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
97
|
+
0 && (module.exports = {
|
|
98
|
+
MessageBox
|
|
99
|
+
});
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { RefObject } from 'react';
|
|
2
|
+
import { DialogFooterProps, DialogProps } from '../Dialog/typings';
|
|
3
|
+
import { IconName, IconProps } from '../Icon';
|
|
4
|
+
import { AnimationEventProps, BaseProps, NativeProps, TypeAttributes } from '../types/common';
|
|
5
|
+
export interface MessageBoxProps extends BaseProps, NativeProps, AnimationEventProps {
|
|
6
|
+
title?: string | React.ReactElement;
|
|
7
|
+
message?: string | React.ReactElement;
|
|
8
|
+
type?: 'success' | 'info' | 'warning' | 'error';
|
|
9
|
+
icon?: IconName | React.ReactElement<IconProps>;
|
|
10
|
+
modalClass?: string;
|
|
11
|
+
width?: DialogProps['width'];
|
|
12
|
+
callback?: (value: string, action: Action) => any | ((action: Action) => any);
|
|
13
|
+
showClose?: boolean;
|
|
14
|
+
closeOnClickModal?: boolean;
|
|
15
|
+
beforeClose?: (action?: Action, done?: () => void, ref?: RefObject<MessageBoxRef>) => void;
|
|
16
|
+
showCancelButton?: boolean;
|
|
17
|
+
showConfirmButton?: boolean;
|
|
18
|
+
cancelButtonText?: string;
|
|
19
|
+
confirmButtonText?: string;
|
|
20
|
+
cancelButtonClass?: string;
|
|
21
|
+
confirmButtonClass?: string;
|
|
22
|
+
buttonSize?: TypeAttributes.Size;
|
|
23
|
+
buttonPosition?: DialogFooterProps['position'];
|
|
24
|
+
distinguishCancelAndClose?: boolean;
|
|
25
|
+
padding?: string | number;
|
|
26
|
+
lockScroll?: boolean;
|
|
27
|
+
showInput?: boolean;
|
|
28
|
+
inputPlaceholder?: string;
|
|
29
|
+
inputType?: string;
|
|
30
|
+
inputValue?: string;
|
|
31
|
+
inputPattern?: RegExp;
|
|
32
|
+
inputValidator?: (value: string) => boolean | string;
|
|
33
|
+
inputErrorMessage?: string;
|
|
34
|
+
center?: boolean;
|
|
35
|
+
draggable?: boolean;
|
|
36
|
+
overflow?: boolean;
|
|
37
|
+
roundButton?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export type MessageState = {
|
|
40
|
+
boxType: '' | 'prompt' | 'alert' | 'confirm';
|
|
41
|
+
onAction: (action: Action, value?: string) => any;
|
|
42
|
+
options: MessageBoxProps;
|
|
43
|
+
};
|
|
44
|
+
export type Action = 'confirm' | 'cancel' | 'close';
|
|
45
|
+
export type MessageBoxType = '' | 'prompt' | 'alert' | 'confirm';
|
|
46
|
+
export type MessageBoxData = MessageBoxInputData | Action;
|
|
47
|
+
export interface MessageBoxInputData {
|
|
48
|
+
value: string;
|
|
49
|
+
action: Action;
|
|
50
|
+
}
|
|
51
|
+
export type ElMessageBoxShortcutMethod = (((message: MessageBoxProps['message'], title: MessageBoxProps['title'], options?: Omit<MessageBoxProps, 'message' | 'title'>) => Promise<MessageBoxData>) & ((message: MessageBoxProps['message'], options?: Omit<MessageBoxProps, 'message' | 'title'>) => Promise<MessageBoxData>));
|
|
52
|
+
export interface MessageBoxMethod {
|
|
53
|
+
(options?: MessageBoxProps): Promise<MessageBoxData>;
|
|
54
|
+
alert: ElMessageBoxShortcutMethod;
|
|
55
|
+
confirm: ElMessageBoxShortcutMethod;
|
|
56
|
+
prompt: ElMessageBoxShortcutMethod;
|
|
57
|
+
}
|
|
58
|
+
export interface MessageBoxRef {
|
|
59
|
+
ref: RefObject<HTMLDivElement>;
|
|
60
|
+
close: () => void;
|
|
61
|
+
setConfirmButtonLoading: (value: boolean) => void;
|
|
62
|
+
setConfirmButtonText: (value: string) => void;
|
|
63
|
+
}
|
|
@@ -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/MessageBox/typings.ts
|
|
16
|
+
var typings_exports = {};
|
|
17
|
+
module.exports = __toCommonJS(typings_exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
import { NotificationProps, NotificationRef } from './typings';
|
|
3
|
+
export declare class Main {
|
|
4
|
+
ref: RefObject<NotificationRef>;
|
|
5
|
+
constructor(props: NotificationProps);
|
|
6
|
+
render(props: NotificationProps): void;
|
|
7
|
+
}
|
|
8
|
+
export default Main;
|
|
@@ -0,0 +1,68 @@
|
|
|
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/Notification/Main.tsx
|
|
30
|
+
var Main_exports = {};
|
|
31
|
+
__export(Main_exports, {
|
|
32
|
+
Main: () => Main,
|
|
33
|
+
default: () => Main_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(Main_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_client = require("react-dom/client");
|
|
38
|
+
var import_Notification = __toESM(require("./Notification"));
|
|
39
|
+
var Main = class {
|
|
40
|
+
constructor(props) {
|
|
41
|
+
this.ref = (0, import_react.createRef)();
|
|
42
|
+
this.render(props);
|
|
43
|
+
}
|
|
44
|
+
render(props) {
|
|
45
|
+
const renderDom = document.createDocumentFragment();
|
|
46
|
+
const root = (0, import_client.createRoot)(renderDom);
|
|
47
|
+
root.render(
|
|
48
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
49
|
+
import_Notification.default,
|
|
50
|
+
{
|
|
51
|
+
...props,
|
|
52
|
+
afterLeave: () => {
|
|
53
|
+
setTimeout(() => {
|
|
54
|
+
root.unmount();
|
|
55
|
+
}, 200);
|
|
56
|
+
},
|
|
57
|
+
key: props.id,
|
|
58
|
+
ref: this.ref
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
var Main_default = Main;
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
Main
|
|
68
|
+
});
|
|
@@ -0,0 +1,150 @@
|
|
|
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/Notification/Notification.tsx
|
|
30
|
+
var Notification_exports = {};
|
|
31
|
+
__export(Notification_exports, {
|
|
32
|
+
default: () => Notification_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(Notification_exports);
|
|
35
|
+
var import_classnames = __toESM(require("classnames"));
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_react_dom = require("react-dom");
|
|
38
|
+
var import_Transition = require("../Transition");
|
|
39
|
+
var import_Util = require("../Util");
|
|
40
|
+
var import_Constants = require("../config/Constants");
|
|
41
|
+
var import_hooks = require("../hooks");
|
|
42
|
+
var Notification = (0, import_react.forwardRef)((props, ref) => {
|
|
43
|
+
const { iconClass, message, position, showClose, type, title, classPrefix = "notification", onClose, duration, onSuccess, afterLeave } = props;
|
|
44
|
+
const { b, e } = (0, import_hooks.useClassNames)(classPrefix);
|
|
45
|
+
const [visible, setVisible] = (0, import_react.useState)(false);
|
|
46
|
+
const [offset, setOffset] = (0, import_react.useState)(props.offset);
|
|
47
|
+
const offsetRef = (0, import_react.useRef)(props.offset);
|
|
48
|
+
const timer = (0, import_react.useRef)(null);
|
|
49
|
+
const notificationRef = (0, import_react.useRef)(null);
|
|
50
|
+
const contentRef = (0, import_react.useRef)(null);
|
|
51
|
+
const verticalProperty = position.startsWith("top") ? "top" : "bottom";
|
|
52
|
+
const handleClose = (0, import_react.useCallback)(() => {
|
|
53
|
+
setVisible(false);
|
|
54
|
+
onClose == null ? void 0 : onClose();
|
|
55
|
+
}, [onClose]);
|
|
56
|
+
(0, import_react.useImperativeHandle)(ref, () => ({
|
|
57
|
+
get el() {
|
|
58
|
+
return notificationRef;
|
|
59
|
+
},
|
|
60
|
+
get id() {
|
|
61
|
+
return props.id;
|
|
62
|
+
},
|
|
63
|
+
get top() {
|
|
64
|
+
return offsetRef.current;
|
|
65
|
+
},
|
|
66
|
+
close: handleClose,
|
|
67
|
+
setOffset: (val) => {
|
|
68
|
+
offsetRef.current = val;
|
|
69
|
+
setOffset(val);
|
|
70
|
+
}
|
|
71
|
+
}));
|
|
72
|
+
const startTimer = (0, import_react.useCallback)(() => {
|
|
73
|
+
if (duration > 0) {
|
|
74
|
+
timer.current = setTimeout(() => {
|
|
75
|
+
if (visible) {
|
|
76
|
+
handleClose();
|
|
77
|
+
}
|
|
78
|
+
}, duration);
|
|
79
|
+
}
|
|
80
|
+
}, [duration, visible, handleClose]);
|
|
81
|
+
const clearTimer = (0, import_react.useCallback)(() => {
|
|
82
|
+
clearTimeout(timer.current);
|
|
83
|
+
timer.current = null;
|
|
84
|
+
}, []);
|
|
85
|
+
const keydown = (0, import_react.useCallback)(
|
|
86
|
+
({ code }) => {
|
|
87
|
+
if (code === import_Constants.EVENT_CODE.delete || code === import_Constants.EVENT_CODE.backspace) {
|
|
88
|
+
clearTimer();
|
|
89
|
+
} else if (code === import_Constants.EVENT_CODE.esc) {
|
|
90
|
+
if (visible) {
|
|
91
|
+
handleClose();
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
startTimer();
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
[clearTimer, handleClose, startTimer, visible]
|
|
98
|
+
);
|
|
99
|
+
(0, import_react.useLayoutEffect)(() => {
|
|
100
|
+
setVisible(true);
|
|
101
|
+
}, []);
|
|
102
|
+
(0, import_react.useEffect)(() => {
|
|
103
|
+
if (visible) {
|
|
104
|
+
startTimer();
|
|
105
|
+
onSuccess == null ? void 0 : onSuccess(contentRef.current);
|
|
106
|
+
document.addEventListener("keydown", keydown, false);
|
|
107
|
+
return () => {
|
|
108
|
+
document.removeEventListener("keydown", keydown, false);
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
}, [visible]);
|
|
112
|
+
const typeClass = (0, import_react.useMemo)(() => {
|
|
113
|
+
const _type = !iconClass && type;
|
|
114
|
+
return _type && import_Constants.TypeMap[_type] ? b(`icon-${import_Constants.TypeMap[_type]}`, false) : "";
|
|
115
|
+
}, [b, iconClass, type]);
|
|
116
|
+
const closeIcon = (0, import_react.useMemo)(() => showClose && /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(e`closeBtn`, b("icon-close", false)), onClick: handleClose }), [showClose, e, b, handleClose]);
|
|
117
|
+
return (0, import_react_dom.createPortal)(
|
|
118
|
+
/* @__PURE__ */ import_react.default.createElement(import_Transition.Transition, { name: b("notification-fade", false), visible, display: "flex", afterLeave }, /* @__PURE__ */ import_react.default.createElement(
|
|
119
|
+
"div",
|
|
120
|
+
{
|
|
121
|
+
ref: notificationRef,
|
|
122
|
+
className: (0, import_classnames.default)(b(), position.indexOf("right") > 1 ? "right" : "left"),
|
|
123
|
+
style: {
|
|
124
|
+
[verticalProperty]: offset,
|
|
125
|
+
zIndex: import_Util.PopupManager.nextZIndex()
|
|
126
|
+
},
|
|
127
|
+
onMouseEnter: clearTimer,
|
|
128
|
+
onMouseLeave: startTimer
|
|
129
|
+
},
|
|
130
|
+
(type || iconClass) && /* @__PURE__ */ import_react.default.createElement("i", { className: (0, import_classnames.default)(e`icon`, typeClass, iconClass) }),
|
|
131
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(e`group`, { "is-with-icon": typeClass || iconClass }) }, /* @__PURE__ */ import_react.default.createElement("h2", { className: e`title` }, title), /* @__PURE__ */ import_react.default.createElement("div", { className: e`content`, style: title ? null : { margin: 0 }, ref: contentRef }, /* @__PURE__ */ import_react.default.createElement("p", null, message)), closeIcon)
|
|
132
|
+
)),
|
|
133
|
+
document.body
|
|
134
|
+
);
|
|
135
|
+
});
|
|
136
|
+
Notification.defaultProps = {
|
|
137
|
+
duration: 4500,
|
|
138
|
+
// default 4500
|
|
139
|
+
message: "",
|
|
140
|
+
onClose: null,
|
|
141
|
+
onClick: null,
|
|
142
|
+
afterLeave: null,
|
|
143
|
+
offset: 0,
|
|
144
|
+
// defaults 0
|
|
145
|
+
position: "top-right",
|
|
146
|
+
// default top-right
|
|
147
|
+
showClose: true
|
|
148
|
+
};
|
|
149
|
+
Notification.displayName = "ElNotification";
|
|
150
|
+
var Notification_default = Notification;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { INotification, NotificationRef, Position } from './typings';
|
|
2
|
+
export declare const Notification: INotification;
|
|
3
|
+
export declare function close(id: string, position: Position, userOnClose?: (vm: NotificationRef) => void): void;
|
|
4
|
+
export declare function closeAll(): void;
|
|
5
|
+
export type { INotification, INotificationHandle, NotificationProps as INotificationOptions } from './typings';
|