@para-ui/core 2.2.4 → 2.2.5-beta
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/AutoBox/index.d.ts +12 -6
- package/AutoBox/index.js +203 -15
- package/AutoTips/index.d.ts +12 -6
- package/AutoTips/index.js +84 -15
- package/Breadcrumbs/index.d.ts +13 -7
- package/Breadcrumbs/index.js +227 -15
- package/Button/index.d.ts +92 -11
- package/Button/index.js +348 -14
- package/ButtonGroup/index.d.ts +21 -9
- package/ButtonGroup/index.js +128 -14
- package/Carousel/index.d.ts +17 -11
- package/Carousel/index.js +74 -15
- package/Cascader/index.d.ts +12 -7
- package/Cascader/index.js +166 -15
- package/Checkbox/index.d.ts +13 -7
- package/Checkbox/index.js +105 -14
- package/CheckboxGroup/index.d.ts +15 -9
- package/CheckboxGroup/index.js +138 -14
- package/Collapse/index.d.ts +49 -14
- package/Collapse/index.js +171 -15
- package/CollapseBox/index.d.ts +11 -5
- package/CollapseBox/index.js +164 -15
- package/ColorPicker/index.d.ts +4 -4
- package/ColorPicker/index.js +4 -1
- package/ComboSelect/index.d.ts +306 -6
- package/ComboSelect/index.js +1803 -14
- package/Container/index.d.ts +13 -8
- package/Container/index.js +239 -15
- package/DatePicker/index.d.ts +30 -17
- package/DatePicker/index.js +733 -14
- package/Desktop/index.d.ts +14 -6
- package/Desktop/index.js +853 -14
- package/Drawer/index.d.ts +92 -6
- package/Drawer/index.js +186 -14
- package/Dropdown/index.d.ts +29 -0
- package/Dropdown/index.js +67 -0
- package/Empty/index.d.ts +16 -10
- package/Empty/index.js +644 -14
- package/Form/index.d.ts +11 -9
- package/Form/index.js +384 -14
- package/FormItem/index.d.ts +5 -152
- package/FormItem/index.js +81 -14
- package/FunctionModal/index.d.ts +14 -3
- package/FunctionModal/index.js +39 -14
- package/GlobalContext/index.d.ts +38 -8
- package/GlobalContext/index.js +41 -16
- package/Help/index.d.ts +16 -10
- package/Help/index.js +39 -15
- package/HelperText/index.d.ts +11 -5
- package/HelperText/index.js +29 -15
- package/InputLang/index.d.ts +13 -7
- package/InputLang/index.js +270 -14
- package/InputNumber/index.d.ts +16 -10
- package/InputNumber/index.js +308 -14
- package/Label/index.d.ts +12 -6
- package/Label/index.js +81 -14
- package/Loading/index.d.ts +12 -6
- package/Loading/index.js +47 -15
- package/Menu/index.d.ts +123 -5
- package/Menu/index.js +1232 -14
- package/Message/index.d.ts +11 -5
- package/Message/index.js +222 -15
- package/Modal/index.d.ts +142 -40
- package/Modal/index.js +443 -14
- package/MultiBox/index.d.ts +13 -7
- package/MultiBox/index.js +231 -14
- package/Notification/index.d.ts +22 -16
- package/Notification/index.js +266 -15
- package/OperateBtn/index.d.ts +16 -10
- package/OperateBtn/index.js +260 -14
- package/PageHeader/index.d.ts +178 -5
- package/PageHeader/index.js +1171 -14
- package/Pagination/index.d.ts +12 -6
- package/Pagination/index.js +469 -14
- package/ParauiProvider/index.d.ts +9 -8
- package/ParauiProvider/index.js +53 -15
- package/PopConfirm/index.d.ts +23 -10
- package/PopConfirm/index.js +189 -14
- package/Popover/index.d.ts +18 -11
- package/Popover/index.js +66 -15
- package/Progress/index.d.ts +18 -12
- package/Progress/index.js +358 -20
- package/Querying/index.d.ts +15 -9
- package/Querying/index.js +762 -14
- package/Radio/index.d.ts +13 -7
- package/Radio/index.js +94 -14
- package/RadioGroup/index.d.ts +15 -9
- package/RadioGroup/index.js +128 -14
- package/Search/index.d.ts +18 -12
- package/Search/index.js +220 -14
- package/Select/index.d.ts +13 -7
- package/Select/index.js +1288 -14
- package/SelectInput/index.d.ts +11 -5
- package/SelectInput/index.js +51 -14
- package/SingleBox/index.d.ts +13 -7
- package/SingleBox/index.js +194 -14
- package/Slider/index.d.ts +104 -7
- package/Slider/index.js +125 -15
- package/Split/index.d.ts +8 -3
- package/Split/index.js +134 -15
- package/Stepper/index.d.ts +41 -25
- package/Stepper/index.js +99 -15
- package/Switch/index.d.ts +16 -10
- package/Switch/index.js +73 -14
- package/Table/index.d.ts +12 -4
- package/Table/index.js +2725 -14
- package/Tabs/index.d.ts +64 -29
- package/Tabs/index.js +218 -14
- package/Tag/index.d.ts +78 -12
- package/Tag/index.js +286 -14
- package/Test/index.d.ts +3 -2
- package/Test/index.js +9 -16
- package/TextField/index.d.ts +22 -16
- package/TextField/index.js +686 -14
- package/TimePicker/index.d.ts +20 -10
- package/TimePicker/index.js +77 -14
- package/Timeline/index.d.ts +49 -13
- package/Timeline/index.js +150 -15
- package/ToggleButton/index.d.ts +61 -10
- package/ToggleButton/index.js +200 -14
- package/Tooltip/index.d.ts +12 -10
- package/Tooltip/index.js +335 -15
- package/Transfer/index.d.ts +8 -3
- package/Transfer/index.js +343 -14
- package/Tree/index.d.ts +8 -5
- package/Tree/index.js +35 -14
- package/Upload/index.d.ts +179 -8
- package/Upload/index.js +1542 -14
- package/_verture/defineProperty-0590dc61.js +16 -0
- package/_verture/index-0d8e1d07.js +4 -0
- package/_verture/index-14a47097.js +4 -0
- package/_verture/index-342379c6.js +391 -0
- package/_verture/index-458032d7.js +10 -0
- package/_verture/index-46bfb2f0.js +778 -0
- package/_verture/index-50401de7.js +4 -0
- package/_verture/index-5b08df83.js +4 -0
- package/_verture/index-6190b129.js +4 -0
- package/_verture/index-7ef1e3b6.js +1553 -0
- package/_verture/index-a369ca3f.js +4 -0
- package/_verture/index-c60911dc.js +39 -0
- package/_verture/index-e2881a53.js +16 -0
- package/_verture/index-ff4c2a27.js +200 -0
- package/{Tree/interface.d.ts → _verture/interface-128abdd3.js} +15 -25
- package/_verture/interface-a77a851e.js +25 -0
- package/{Table/interface.d.ts → _verture/interface-a9b7c716.js} +20 -28
- package/_verture/intl-336570e4.js +65 -0
- package/_verture/modalContext-25890584.js +228 -0
- package/_verture/modalContext-639f2787.js +58 -0
- package/_verture/slicedToArray-d7722f4b.js +62 -0
- package/_verture/style-inject.es-300983ab.js +28 -0
- package/_verture/toConsumableArray-f8047a75.js +19 -0
- package/_verture/tslib.es6-55ed4bd2.js +38 -0
- package/_verture/typeof-498dd2b1.js +11 -0
- package/_verture/useFormatMessage-ac9d6acf.js +20 -0
- package/_verture/useGlobalProps-af9a2af6.js +12 -0
- package/index.d.ts +88 -128
- package/index.js +160 -19
- package/package.json +59 -22
- package/Button/SplitButton.d.ts +0 -61
- package/Button/lang/en_US.d.ts +0 -4
- package/Button/lang/index.d.ts +0 -9
- package/Button/lang/zh_CN.d.ts +0 -4
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Collapse/collapsePanel.d.ts +0 -30
- package/Collapse/motion.d.ts +0 -5
- package/Collapse/util.d.ts +0 -11
- package/CollapseBox/util.d.ts +0 -5
- package/ComboSelect/WithTabsCombo/index.d.ts +0 -11
- package/ComboSelect/WithTabsCombo/interface.d.ts +0 -141
- package/ComboSelect/interface.d.ts +0 -143
- package/ComboSelect/lang/en_US.d.ts +0 -8
- package/ComboSelect/lang/index.d.ts +0 -17
- package/ComboSelect/lang/zh_CN.d.ts +0 -8
- package/ComboSelect/utils.d.ts +0 -12
- package/DatePicker/PickerButton.d.ts +0 -3
- package/DatePicker/PickerTag.d.ts +0 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +0 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +0 -11
- package/DatePicker/generatePicker/index.d.ts +0 -77
- package/DatePicker/lang/en_US.d.ts +0 -3
- package/DatePicker/lang/index.d.ts +0 -7
- package/DatePicker/lang/zh_CN.d.ts +0 -3
- package/DatePicker/util.d.ts +0 -20
- package/Drawer/interface.d.ts +0 -83
- package/Drawer/lang/en_US.d.ts +0 -5
- package/Drawer/lang/index.d.ts +0 -11
- package/Drawer/lang/zh_CN.d.ts +0 -5
- package/Empty/images/index.d.ts +0 -2
- package/Empty/lang/en_US.d.ts +0 -6
- package/Empty/lang/index.d.ts +0 -13
- package/Empty/lang/zh_CN.d.ts +0 -6
- package/FormItem/compoments/defaultCompoments/index.d.ts +0 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +0 -8
- package/FormItem/compoments/formFile/index.d.ts +0 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +0 -8
- package/FormItem/compoments/formSelect/index.d.ts +0 -18
- package/FormItem/errorTips.d.ts +0 -12
- package/FormItem/itemType.d.ts +0 -42
- package/FormItem/validateFunction.d.ts +0 -15
- package/FunctionModal/dialog.d.ts +0 -58
- package/FunctionModal/modalContext.d.ts +0 -14
- package/GlobalContext/componentsProps.d.ts +0 -19
- package/GlobalContext/confirmLocale.d.ts +0 -7
- package/GlobalContext/intl.d.ts +0 -34
- package/GlobalContext/useFormatMessage.d.ts +0 -3
- package/Hooks/useGlobalProps.d.ts +0 -1
- package/Menu/footerExpansion.d.ts +0 -9
- package/Menu/interface.d.ts +0 -139
- package/Menu/logo.d.ts +0 -9
- package/Menu/verticalMenuList.d.ts +0 -14
- package/Modal/Confirm/index.d.ts +0 -66
- package/Modal/lang/en_US.d.ts +0 -5
- package/Modal/lang/index.d.ts +0 -11
- package/Modal/lang/zh_CN.d.ts +0 -5
- package/OperateBtn/lang/en_US.d.ts +0 -4
- package/OperateBtn/lang/index.d.ts +0 -9
- package/OperateBtn/lang/zh_CN.d.ts +0 -4
- package/PageHeader/horizontalMeun.d.ts +0 -9
- package/PageHeader/horizontalMeunRight.d.ts +0 -9
- package/PageHeader/interface.d.ts +0 -167
- package/Pagination/lang/en_US.d.ts +0 -8
- package/Pagination/lang/index.d.ts +0 -17
- package/Pagination/lang/zh_CN.d.ts +0 -8
- package/PopConfirm/lang/en_US.d.ts +0 -5
- package/PopConfirm/lang/index.d.ts +0 -11
- package/PopConfirm/lang/zh_CN.d.ts +0 -5
- package/Popper/index.d.ts +0 -13
- package/Popper/index.js +0 -16
- package/Progress/Line.d.ts +0 -47
- package/Progress/Steps.d.ts +0 -17
- package/Progress/utils.d.ts +0 -6
- package/Querying/images/index.d.ts +0 -2
- package/Querying/lang/en_US.d.ts +0 -4
- package/Querying/lang/index.d.ts +0 -9
- package/Querying/lang/zh_CN.d.ts +0 -4
- package/README.md +0 -489
- package/Select/lang/en_US.d.ts +0 -5
- package/Select/lang/index.d.ts +0 -11
- package/Select/lang/zh_CN.d.ts +0 -5
- package/Slider/interface.d.ts +0 -102
- package/Stepper/icons.d.ts +0 -5
- package/Table/lang/en_US.d.ts +0 -6
- package/Table/lang/index.d.ts +0 -13
- package/Table/lang/zh_CN.d.ts +0 -6
- package/Table/tableBody.d.ts +0 -9
- package/Table/tableBodyElement/index.d.ts +0 -15
- package/Table/tableBodyInterface.d.ts +0 -67
- package/Table/tableContainer/index.d.ts +0 -16
- package/Table/tableElement/index.d.ts +0 -17
- package/Table/tableHead.d.ts +0 -9
- package/Table/tableHeadElement/index.d.ts +0 -15
- package/Table/tableHeadInterface.d.ts +0 -30
- package/Table/tablePagination.d.ts +0 -9
- package/Table/tablePaginationInterFace.d.ts +0 -24
- package/Table/tdElement/index.d.ts +0 -15
- package/Table/thElement/index.d.ts +0 -15
- package/Table/trElement/index.d.ts +0 -15
- package/Table/util.d.ts +0 -16
- package/Tag/TagGroup.d.ts +0 -66
- package/TimePicker/locale/en_US.d.ts +0 -3
- package/TimePicker/locale/zh_CN.d.ts +0 -3
- package/TimePicker/style/index.d.ts +0 -1
- package/ToggleButton/ToggleButtonGroup.d.ts +0 -49
- package/Transfer/lang/en_US.d.ts +0 -6
- package/Transfer/lang/index.d.ts +0 -13
- package/Transfer/lang/zh_CN.d.ts +0 -6
- package/Tree/OperateBar/index.d.ts +0 -13
- package/Tree/Tree.d.ts +0 -4
- package/Tree/lang/en_US.d.ts +0 -8
- package/Tree/lang/index.d.ts +0 -17
- package/Tree/lang/zh_CN.d.ts +0 -8
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +0 -26
- package/Tree/utils/treeUtil.d.ts +0 -15
- package/Upload/Dragger/index.d.ts +0 -10
- package/Upload/ErroTip/index.d.ts +0 -13
- package/Upload/ImageUpload/index.d.ts +0 -14
- package/Upload/ImgCrop/EasyCrop.d.ts +0 -17
- package/Upload/ImgCrop/constants.d.ts +0 -7
- package/Upload/ImgCrop/index.d.ts +0 -6
- package/Upload/ImgCrop/interface.d.ts +0 -24
- package/Upload/UploadList/index.d.ts +0 -5
- package/Upload/interface.d.ts +0 -134
- package/Upload/lang/en_US.d.ts +0 -12
- package/Upload/lang/index.d.ts +0 -25
- package/Upload/lang/zh_CN.d.ts +0 -12
- package/cdn/AutoBox/index.js +0 -29
- package/cdn/AutoTips/index.js +0 -40
- package/cdn/Breadcrumbs/index.js +0 -53
- package/cdn/Button/index.js +0 -79
- package/cdn/ButtonGroup/index.js +0 -79
- package/cdn/Carousel/index.js +0 -6
- package/cdn/Cascader/index.js +0 -42
- package/cdn/Checkbox/index.js +0 -53
- package/cdn/CheckboxGroup/index.js +0 -53
- package/cdn/Collapse/index.js +0 -27
- package/cdn/CollapseBox/index.js +0 -1
- package/cdn/ColorPicker/index.js +0 -1
- package/cdn/ComboSelect/index.js +0 -438
- package/cdn/Container/index.js +0 -1
- package/cdn/DatePicker/index.js +0 -185
- package/cdn/Desktop/index.js +0 -24
- package/cdn/Drawer/index.js +0 -84
- package/cdn/Empty/index.js +0 -1
- package/cdn/Form/index.js +0 -477
- package/cdn/FormItem/index.js +0 -477
- package/cdn/FunctionModal/index.js +0 -144
- package/cdn/GlobalContext/index.js +0 -1
- package/cdn/Help/index.js +0 -53
- package/cdn/HelperText/index.js +0 -1
- package/cdn/InputLang/index.js +0 -144
- package/cdn/InputNumber/index.js +0 -118
- package/cdn/Label/index.js +0 -53
- package/cdn/Loading/index.js +0 -14
- package/cdn/Menu/index.js +0 -40
- package/cdn/Message/index.js +0 -53
- package/cdn/Modal/index.js +0 -144
- package/cdn/MultiBox/index.js +0 -131
- package/cdn/Notification/index.js +0 -66
- package/cdn/OperateBtn/index.js +0 -92
- package/cdn/PageHeader/index.js +0 -92
- package/cdn/Pagination/index.js +0 -214
- package/cdn/ParauiProvider/index.js +0 -9
- package/cdn/PopConfirm/index.js +0 -131
- package/cdn/Popover/index.js +0 -16
- package/cdn/Popper/index.js +0 -26
- package/cdn/Progress/index.js +0 -58
- package/cdn/Querying/index.js +0 -1
- package/cdn/Radio/index.js +0 -53
- package/cdn/RadioGroup/index.js +0 -53
- package/cdn/Search/index.js +0 -144
- package/cdn/Select/index.js +0 -131
- package/cdn/SelectInput/index.js +0 -131
- package/cdn/SingleBox/index.js +0 -131
- package/cdn/Slider/index.js +0 -16
- package/cdn/Split/index.js +0 -1
- package/cdn/Stepper/index.js +0 -154
- package/cdn/Switch/index.js +0 -71
- package/cdn/Table/index.js +0 -292
- package/cdn/Tabs/index.js +0 -165
- package/cdn/Tag/index.js +0 -27
- package/cdn/Test/index.js +0 -1
- package/cdn/TextField/index.js +0 -105
- package/cdn/TimePicker/index.js +0 -185
- package/cdn/Timeline/index.js +0 -16
- package/cdn/ToggleButton/index.js +0 -79
- package/cdn/Tooltip/index.js +0 -40
- package/cdn/Transfer/index.js +0 -170
- package/cdn/Tree/index.js +0 -170
- package/cdn/Upload/index.js +0 -252
- package/style.css +0 -72
package/Notification/index.js
CHANGED
|
@@ -1,15 +1,266 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import Notification from 'rc-notification';
|
|
5
|
+
import WarningCircleF from '@para-ui/icons/WarningCircleF';
|
|
6
|
+
import SuccessOutlined from '@para-ui/icons/CheckCircleF';
|
|
7
|
+
import CloseIcon from '@para-ui/icons/Close';
|
|
8
|
+
import ErrorOutlined from '@para-ui/icons/CloseCircleF';
|
|
9
|
+
import clsx from 'clsx';
|
|
10
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
11
|
+
|
|
12
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n * @author Hanz\n * @date 2022/1/13 上午10:30\n * @description 通知提醒框\n */\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-notification {\n position: fixed;\n margin: 0 24px 0 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n z-index: 9999;\n}\n.paraui-notification-topLeft, .paraui-notification-bottomLeft {\n margin-right: 0;\n margin-left: 24px;\n}\n.paraui-notification-topLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active, .paraui-notification-bottomLeft .paraui-notification-fade-enter.paraui-notification-fade-enter-active, .paraui-notification-topLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active, .paraui-notification-bottomLeft .paraui-notification-fade-appear.paraui-notification-fade-appear-active {\n animation-name: NotificationLeftFadeIn;\n}\n.paraui-notification-hook-holder, .paraui-notification-notice {\n position: relative;\n width: 430px;\n max-width: calc(100vw - 48px);\n margin-bottom: 16px;\n margin-left: auto;\n overflow: hidden;\n word-wrap: break-word;\n background: rgb(255, 255, 255);\n border-radius: 4px;\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n}\n.paraui-notification-topLeft .paraui-notification-hook-holder, .paraui-notification-topLeft .paraui-notification-notice, .paraui-notification-bottomLeft .paraui-notification-hook-holder, .paraui-notification-bottomLeft .paraui-notification-notice {\n margin-right: auto;\n margin-left: 0;\n}\n.paraui-notification-hook-holder > .paraui-notification-notice {\n margin-bottom: 0;\n box-shadow: none;\n}\n.paraui-notification-notice {\n padding: 20px;\n line-height: 1.5715;\n}\n.paraui-notification-notice-content {\n position: relative;\n}\n.paraui-notification-notice-message {\n margin-bottom: 8px;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-weight: 700;\n line-height: 24px;\n}\n.paraui-notification-notice-message-single-line-auto-margin {\n display: block;\n width: calc(264px - 100%);\n max-width: 4px;\n background-color: transparent;\n pointer-events: none;\n}\n.paraui-notification-notice-message-single-line-auto-margin::before {\n display: block;\n content: \"\";\n}\n.paraui-notification-notice-description {\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-notification-notice-closable .paraui-notification-notice-message {\n padding-right: 24px;\n}\n.paraui-notification-notice-with-icon .paraui-notification-notice-message {\n margin-bottom: 4px;\n margin-left: 24px;\n}\n.paraui-notification-notice-with-icon .paraui-notification-notice-description {\n margin-left: 24px;\n}\n.paraui-notification .paraui-notification-notice-icon {\n position: absolute;\n top: 4px;\n font-size: 16px;\n line-height: 24px;\n}\n.paraui-notification .paraui-notification-notice-icon-success {\n color: rgb(83, 195, 27);\n}\n.paraui-notification .paraui-notification-notice-icon-info {\n color: rgb(54, 102, 214);\n}\n.paraui-notification .paraui-notification-notice-icon-warning {\n color: rgb(255, 161, 80);\n}\n.paraui-notification .paraui-notification-notice-icon-error {\n color: rgb(235, 96, 84);\n}\n.paraui-notification-notice-close {\n position: absolute;\n top: 16px;\n right: 22px;\n color: rgba(46, 55, 67, 0.7);\n outline: none;\n}\n.paraui-notification-notice-close:hover {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-notification .paraui-notification-close-icon {\n font-size: 18px;\n cursor: pointer;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-notification-notice-btn {\n float: right;\n margin-top: 16px;\n}\n.paraui-notification .notification-fade-effect {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n}\n.paraui-notification-fade-enter, .paraui-notification-fade-appear {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n opacity: 0;\n animation-play-state: paused;\n}\n.paraui-notification-fade-leave {\n animation-duration: 0.24s;\n animation-timing-function: cubic-bezier(0.645, 0.045, 0.355, 1);\n animation-fill-mode: both;\n animation-play-state: paused;\n}\n.paraui-notification-fade-enter.paraui-notification-fade-enter-active, .paraui-notification-fade-appear.paraui-notification-fade-appear-active {\n animation-name: NotificationFadeIn;\n animation-play-state: running;\n}\n.paraui-notification-fade-leave.paraui-notification-fade-leave-active {\n animation-name: NotificationFadeOut;\n animation-play-state: running;\n}\n@keyframes NotificationFadeIn {\n 0% {\n left: 430px;\n opacity: 0;\n }\n 100% {\n left: 0;\n opacity: 1;\n }\n}\n@keyframes NotificationLeftFadeIn {\n 0% {\n right: 430px;\n opacity: 0;\n }\n 100% {\n right: 0;\n opacity: 1;\n }\n}\n@keyframes NotificationFadeOut {\n 0% {\n max-height: 150px;\n margin-bottom: 16px;\n opacity: 1;\n }\n 100% {\n max-height: 0;\n margin-bottom: 0;\n padding-top: 0;\n padding-bottom: 0;\n opacity: 0;\n }\n}";
|
|
13
|
+
styleInject(css_248z);
|
|
14
|
+
|
|
15
|
+
var notificationInstance = {}; // 默认值
|
|
16
|
+
|
|
17
|
+
var defaultDuration = 4.5; //默认 4.5 秒后自动关闭,配置为 null 则不自动关闭
|
|
18
|
+
|
|
19
|
+
var defaultTop = 24;
|
|
20
|
+
var defaultBottom = 24;
|
|
21
|
+
var defaultPlacement = 'topRight';
|
|
22
|
+
var defaultGetContainer;
|
|
23
|
+
var defaultCloseIcon;
|
|
24
|
+
var rtl = false;
|
|
25
|
+
var maxCount; //设置全局配置
|
|
26
|
+
|
|
27
|
+
function setNotificationConfig(options) {
|
|
28
|
+
var duration = options.duration,
|
|
29
|
+
placement = options.placement,
|
|
30
|
+
bottom = options.bottom,
|
|
31
|
+
top = options.top,
|
|
32
|
+
getContainer = options.getContainer,
|
|
33
|
+
closeIcon = options.closeIcon;
|
|
34
|
+
|
|
35
|
+
if (duration !== undefined) {
|
|
36
|
+
defaultDuration = duration;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (placement !== undefined) {
|
|
40
|
+
defaultPlacement = placement;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (bottom !== undefined) {
|
|
44
|
+
defaultBottom = bottom;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (top !== undefined) {
|
|
48
|
+
defaultTop = top;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (getContainer !== undefined) {
|
|
52
|
+
defaultGetContainer = getContainer;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (closeIcon !== undefined) {
|
|
56
|
+
defaultCloseIcon = closeIcon;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (options.maxCount !== undefined) {
|
|
60
|
+
maxCount = options.maxCount;
|
|
61
|
+
}
|
|
62
|
+
} //获得位置样式
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
function getPlacementStyle(placement) {
|
|
66
|
+
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
67
|
+
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
68
|
+
var style;
|
|
69
|
+
|
|
70
|
+
switch (placement) {
|
|
71
|
+
case 'topLeft':
|
|
72
|
+
style = {
|
|
73
|
+
left: 0,
|
|
74
|
+
top: top,
|
|
75
|
+
bottom: 'auto'
|
|
76
|
+
};
|
|
77
|
+
break;
|
|
78
|
+
|
|
79
|
+
case 'topRight':
|
|
80
|
+
style = {
|
|
81
|
+
right: 0,
|
|
82
|
+
top: top,
|
|
83
|
+
bottom: 'auto'
|
|
84
|
+
};
|
|
85
|
+
break;
|
|
86
|
+
|
|
87
|
+
case 'bottomLeft':
|
|
88
|
+
style = {
|
|
89
|
+
left: 0,
|
|
90
|
+
top: 'auto',
|
|
91
|
+
bottom: bottom
|
|
92
|
+
};
|
|
93
|
+
break;
|
|
94
|
+
|
|
95
|
+
default:
|
|
96
|
+
style = {
|
|
97
|
+
right: 0,
|
|
98
|
+
top: 'auto',
|
|
99
|
+
bottom: bottom
|
|
100
|
+
};
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return style;
|
|
105
|
+
} //创建通知框实例
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
function getNotificationInstance(args, callback) {
|
|
109
|
+
var _args$placement = args.placement,
|
|
110
|
+
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
|
|
111
|
+
top = args.top,
|
|
112
|
+
bottom = args.bottom,
|
|
113
|
+
_args$getContainer = args.getContainer,
|
|
114
|
+
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
|
|
115
|
+
_args$closeIcon = args.closeIcon,
|
|
116
|
+
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon;
|
|
117
|
+
var prefixCls = 'paraui-notification';
|
|
118
|
+
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
119
|
+
var cacheInstance = notificationInstance[cacheKey];
|
|
120
|
+
|
|
121
|
+
if (cacheInstance) {
|
|
122
|
+
Promise.resolve(cacheInstance).then(function (instance) {
|
|
123
|
+
callback({
|
|
124
|
+
prefixCls: "".concat(prefixCls, "-notice"),
|
|
125
|
+
instance: instance
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
return;
|
|
129
|
+
} //close icon
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
var closeIconToRender = jsx("span", Object.assign({
|
|
133
|
+
className: "".concat(prefixCls, "-close-x")
|
|
134
|
+
}, {
|
|
135
|
+
children: closeIcon || jsx(CloseIcon, {
|
|
136
|
+
className: "".concat(prefixCls, "-close-icon")
|
|
137
|
+
})
|
|
138
|
+
})); //通知框cls
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
var notificationCls = clsx("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
|
|
142
|
+
notificationInstance[cacheKey] = new Promise(function (resolve) {
|
|
143
|
+
Notification.newInstance({
|
|
144
|
+
prefixCls: prefixCls,
|
|
145
|
+
className: notificationCls,
|
|
146
|
+
style: getPlacementStyle(placement, top, bottom),
|
|
147
|
+
getContainer: getContainer,
|
|
148
|
+
closeIcon: closeIconToRender,
|
|
149
|
+
maxCount: maxCount
|
|
150
|
+
}, function (notification) {
|
|
151
|
+
resolve(notification);
|
|
152
|
+
callback({
|
|
153
|
+
prefixCls: "".concat(prefixCls, "-notice"),
|
|
154
|
+
instance: notification
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
} //通知框类型图标
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
var typeToIcon = {
|
|
162
|
+
success: SuccessOutlined,
|
|
163
|
+
info: WarningCircleF,
|
|
164
|
+
error: ErrorOutlined,
|
|
165
|
+
warning: WarningCircleF
|
|
166
|
+
}; //创建通知框内容配置
|
|
167
|
+
|
|
168
|
+
function getNoticeProps(args, prefixCls) {
|
|
169
|
+
var durationArg = args.duration,
|
|
170
|
+
icon = args.icon,
|
|
171
|
+
type = args.type,
|
|
172
|
+
description = args.description,
|
|
173
|
+
message = args.message,
|
|
174
|
+
btn = args.btn,
|
|
175
|
+
onClose = args.onClose,
|
|
176
|
+
onClick = args.onClick,
|
|
177
|
+
key = args.key,
|
|
178
|
+
style = args.style,
|
|
179
|
+
className = args.className;
|
|
180
|
+
var duration = durationArg === undefined ? defaultDuration : durationArg;
|
|
181
|
+
var iconNode = null;
|
|
182
|
+
|
|
183
|
+
if (icon) {
|
|
184
|
+
iconNode = jsx("span", Object.assign({
|
|
185
|
+
className: "".concat(prefixCls, "-icon")
|
|
186
|
+
}, {
|
|
187
|
+
children: icon
|
|
188
|
+
}));
|
|
189
|
+
} else if (type) {
|
|
190
|
+
iconNode = /*#__PURE__*/React__default.createElement(typeToIcon[type] || null, {
|
|
191
|
+
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
var autoMarginTag = !description && iconNode ? jsx("span", {
|
|
196
|
+
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
197
|
+
}) : null;
|
|
198
|
+
return {
|
|
199
|
+
content: jsxs("div", Object.assign({
|
|
200
|
+
className: iconNode ? "".concat(prefixCls, "-with-icon") : ''
|
|
201
|
+
}, {
|
|
202
|
+
children: [iconNode, jsxs("div", Object.assign({
|
|
203
|
+
className: "".concat(prefixCls, "-message")
|
|
204
|
+
}, {
|
|
205
|
+
children: [autoMarginTag, message]
|
|
206
|
+
})), jsx("div", Object.assign({
|
|
207
|
+
className: "".concat(prefixCls, "-description")
|
|
208
|
+
}, {
|
|
209
|
+
children: description
|
|
210
|
+
})), btn ? jsx("span", Object.assign({
|
|
211
|
+
className: "".concat(prefixCls, "-btn")
|
|
212
|
+
}, {
|
|
213
|
+
children: btn
|
|
214
|
+
})) : null]
|
|
215
|
+
})),
|
|
216
|
+
duration: duration,
|
|
217
|
+
closable: true,
|
|
218
|
+
onClose: onClose,
|
|
219
|
+
onClick: onClick,
|
|
220
|
+
key: key,
|
|
221
|
+
style: style || {},
|
|
222
|
+
className: clsx(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type))
|
|
223
|
+
};
|
|
224
|
+
} //通知框调用方法
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
function notice(args) {
|
|
228
|
+
getNotificationInstance(args, function (_ref) {
|
|
229
|
+
var prefixCls = _ref.prefixCls,
|
|
230
|
+
instance = _ref.instance;
|
|
231
|
+
instance.notice(getNoticeProps(args, prefixCls));
|
|
232
|
+
});
|
|
233
|
+
} //通知框api method
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
var api = {
|
|
237
|
+
open: notice,
|
|
238
|
+
close: function close(key) {
|
|
239
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
240
|
+
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
241
|
+
instance.removeNotice(key);
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
},
|
|
245
|
+
config: setNotificationConfig,
|
|
246
|
+
destroy: function destroy() {
|
|
247
|
+
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
248
|
+
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
249
|
+
instance.destroy();
|
|
250
|
+
});
|
|
251
|
+
delete notificationInstance[cacheKey];
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
}; //通知框预设类型 'success', 'info', 'warning', 'error'
|
|
255
|
+
|
|
256
|
+
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
257
|
+
api[type] = function (args) {
|
|
258
|
+
return api.open(Object.assign(Object.assign({}, args), {
|
|
259
|
+
type: type
|
|
260
|
+
}));
|
|
261
|
+
};
|
|
262
|
+
}); //兼容warn、warning
|
|
263
|
+
|
|
264
|
+
api.warn = api.warning;
|
|
265
|
+
|
|
266
|
+
export { api as default };
|
package/OperateBtn/index.d.ts
CHANGED
|
@@ -1,24 +1,29 @@
|
|
|
1
|
+
import React__default, { FunctionComponent } from 'react';
|
|
2
|
+
import styleInject from './node_modules/style-inject/dist/style-inject.es.js';
|
|
3
|
+
|
|
4
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/4/13 10:48 AM\n* @description 表格操作按钮\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-operate-btn {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n align-items: center;\n}\n.paraui-operate-btn > .paraui-operate-btn-line {\n display: inline-block;\n width: 1px;\n background-color: rgba(54, 102, 214, 0.2);\n margin: 0 12px;\n}\n.paraui-operate-btn.paraui-operate-btn-small > .paraui-operate-btn-line {\n height: 12px;\n}\n.paraui-operate-btn.paraui-operate-btn-small button svg {\n font-size: 18px;\n}\n.paraui-operate-btn.paraui-operate-btn-medium > .paraui-operate-btn-line {\n height: 14px;\n}\n.paraui-operate-btn.paraui-operate-btn-medium button svg {\n font-size: 24px;\n}\n.paraui-operate-btn.paraui-operate-btn-large > .paraui-operate-btn-line {\n height: 16px;\n}\n.paraui-operate-btn.paraui-operate-btn-large button > svg {\n font-size: 28px;\n}\n\n.paraui-operate-btn-popover .paraui-operate-btn-list {\n padding: 8px 0;\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item {\n padding: 0 12px;\n max-width: 120px;\n cursor: pointer;\n color: rgb(46, 55, 67);\n line-height: 36px;\n text-align: left;\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item-disabled {\n cursor: not-allowed;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-operate-btn-popover .paraui-operate-btn-list > .paraui-operate-btn-list-item-danger {\n color: rgb(235, 96, 84);\n}";
|
|
5
|
+
styleInject(css_248z);
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
8
|
* @author linhd
|
|
3
9
|
* @date 2022/4/13 10:49 AM
|
|
4
10
|
* @description 表格操作按钮
|
|
5
11
|
*/
|
|
6
|
-
|
|
7
|
-
import './index.scss';
|
|
12
|
+
|
|
8
13
|
/** 按钮配置 */
|
|
9
|
-
|
|
14
|
+
interface OperateBtnListProps {
|
|
10
15
|
/** 样式class */
|
|
11
16
|
className?: string;
|
|
12
17
|
/** style */
|
|
13
|
-
style?:
|
|
18
|
+
style?: React__default.CSSProperties;
|
|
14
19
|
/** key 表示唯一值 */
|
|
15
20
|
key?: string;
|
|
16
21
|
/** 显示名 */
|
|
17
|
-
label?:
|
|
22
|
+
label?: React__default.ReactNode;
|
|
18
23
|
/** 鼠标移上去显示的内容 */
|
|
19
|
-
toolTipTitle?:
|
|
24
|
+
toolTipTitle?: React__default.ReactNode;
|
|
20
25
|
/** 图标 */
|
|
21
|
-
icon?:
|
|
26
|
+
icon?: React__default.ReactNode;
|
|
22
27
|
/** 定位方向 */
|
|
23
28
|
placement?: "top-start" | "bottom-end" | "bottom-start" | "bottom" | "left-end" | "left-start" | "left" | "right-end" | "right-start" | "right" | "top-end" | "top";
|
|
24
29
|
/** 是否禁用 */
|
|
@@ -29,11 +34,11 @@ export interface OperateBtnListProps {
|
|
|
29
34
|
onClick?: (item: OperateBtnListProps, e: any) => void | Promise<boolean | any>;
|
|
30
35
|
[name: string]: any;
|
|
31
36
|
}
|
|
32
|
-
|
|
37
|
+
interface OperateBtnProps {
|
|
33
38
|
/** 样式class */
|
|
34
39
|
className?: string;
|
|
35
40
|
/** style */
|
|
36
|
-
style?:
|
|
41
|
+
style?: React__default.CSSProperties;
|
|
37
42
|
/** listItem索引下标 */
|
|
38
43
|
key?: string;
|
|
39
44
|
/** 大小 */
|
|
@@ -56,4 +61,5 @@ export interface OperateBtnProps {
|
|
|
56
61
|
onClick?: (item: OperateBtnListProps, e: any) => void | Promise<boolean | any>;
|
|
57
62
|
}
|
|
58
63
|
declare const OperateBtn: FunctionComponent<OperateBtnProps>;
|
|
59
|
-
|
|
64
|
+
|
|
65
|
+
export { OperateBtnListProps, OperateBtnProps, OperateBtn as default };
|