@para-ui/core 2.2.6 → 2.2.7-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 +34 -34
- package/AutoBox/index.js +203 -15
- package/AutoTips/index.d.ts +27 -27
- package/AutoTips/index.js +84 -15
- package/Breadcrumbs/index.d.ts +39 -39
- package/Breadcrumbs/index.js +227 -15
- package/Button/SplitButton.d.ts +62 -61
- package/Button/index.d.ts +71 -56
- package/Button/index.js +348 -14
- package/Button/lang/en_US.d.ts +4 -4
- package/Button/lang/index.d.ts +9 -9
- package/Button/lang/zh_CN.d.ts +4 -4
- package/ButtonGroup/index.d.ts +33 -33
- package/ButtonGroup/index.js +128 -14
- package/Carousel/index.d.ts +30 -30
- package/Carousel/index.js +74 -15
- package/Cascader/index.d.ts +52 -52
- package/Cascader/index.js +166 -15
- package/Cascader/lang/en_US.d.ts +4 -4
- package/Cascader/lang/index.d.ts +9 -9
- package/Cascader/lang/zh_CN.d.ts +4 -4
- package/Checkbox/index.d.ts +40 -40
- package/Checkbox/index.js +105 -14
- package/CheckboxGroup/index.d.ts +46 -46
- package/CheckboxGroup/index.js +138 -14
- package/Collapse/collapsePanel.d.ts +30 -30
- package/Collapse/index.d.ts +57 -57
- package/Collapse/index.js +171 -15
- package/Collapse/motion.d.ts +5 -5
- package/Collapse/util.d.ts +11 -11
- package/CollapseBox/index.d.ts +27 -27
- package/CollapseBox/index.js +164 -15
- package/CollapseBox/util.d.ts +5 -5
- package/ColorPicker/index.d.ts +4 -4
- package/ColorPicker/index.js +4 -1
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -11
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -141
- package/ComboSelect/index.d.ts +11 -11
- package/ComboSelect/index.js +1803 -14
- package/ComboSelect/interface.d.ts +140 -143
- package/ComboSelect/lang/en_US.d.ts +8 -8
- package/ComboSelect/lang/index.d.ts +17 -17
- package/ComboSelect/lang/zh_CN.d.ts +8 -8
- package/ComboSelect/utils.d.ts +12 -12
- package/Container/index.d.ts +77 -77
- package/Container/index.js +239 -15
- package/DatePicker/PickerButton.d.ts +3 -3
- package/DatePicker/PickerTag.d.ts +3 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -11
- package/DatePicker/generatePicker/index.d.ts +77 -77
- package/DatePicker/index.d.ts +18 -18
- package/DatePicker/index.js +733 -14
- package/DatePicker/lang/en_US.d.ts +3 -3
- package/DatePicker/lang/index.d.ts +7 -7
- package/DatePicker/lang/zh_CN.d.ts +3 -3
- package/DatePicker/util.d.ts +20 -20
- package/Desktop/index.d.ts +57 -55
- package/Desktop/index.js +853 -14
- package/Drawer/index.d.ts +11 -11
- package/Drawer/index.js +186 -14
- package/Drawer/interface.d.ts +83 -83
- package/Drawer/lang/en_US.d.ts +5 -5
- package/Drawer/lang/index.d.ts +11 -11
- package/Drawer/lang/zh_CN.d.ts +5 -5
- package/Dropdown/index.d.ts +25 -0
- package/Dropdown/index.js +67 -0
- package/Empty/images/index.d.ts +3 -2
- package/Empty/index.d.ts +30 -30
- package/Empty/index.js +644 -14
- package/Empty/lang/en_US.d.ts +6 -6
- package/Empty/lang/index.d.ts +13 -13
- package/Empty/lang/zh_CN.d.ts +6 -6
- package/Form/index.d.ts +181 -181
- package/Form/index.js +384 -14
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -8
- package/FormItem/compoments/formFile/index.d.ts +38 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -8
- package/FormItem/compoments/formSelect/index.d.ts +18 -18
- package/FormItem/errorTips.d.ts +12 -12
- package/FormItem/index.d.ts +152 -152
- package/FormItem/index.js +81 -14
- package/FormItem/itemType.d.ts +42 -42
- package/FormItem/validateFunction.d.ts +15 -15
- package/FunctionModal/dialog.d.ts +58 -58
- package/FunctionModal/index.d.ts +8 -8
- package/FunctionModal/index.js +39 -14
- package/FunctionModal/modalContext.d.ts +15 -14
- package/GlobalContext/componentsProps.d.ts +19 -19
- package/GlobalContext/confirmLocale.d.ts +7 -7
- package/GlobalContext/index.d.ts +28 -28
- package/GlobalContext/index.js +41 -16
- package/GlobalContext/intl.d.ts +34 -34
- package/GlobalContext/useFormatMessage.d.ts +3 -3
- package/Help/index.d.ts +18 -20
- package/Help/index.js +39 -15
- package/HelperText/index.d.ts +19 -19
- package/HelperText/index.js +29 -15
- package/Hooks/useGlobalProps.d.ts +1 -1
- package/InputLang/index.d.ts +49 -49
- package/InputLang/index.js +270 -14
- package/InputNumber/index.d.ts +74 -74
- package/InputNumber/index.js +308 -14
- package/Label/index.d.ts +35 -35
- package/Label/index.js +81 -14
- package/Loading/index.d.ts +17 -17
- package/Loading/index.js +47 -15
- package/Menu/footerExpansion.d.ts +9 -9
- package/Menu/index.d.ts +10 -10
- package/Menu/index.js +1232 -14
- package/Menu/interface.d.ts +139 -139
- package/Menu/logo.d.ts +9 -9
- package/Menu/verticalMenuList.d.ts +14 -14
- package/Message/index.d.ts +73 -73
- package/Message/index.js +222 -15
- package/Modal/Confirm/index.d.ts +65 -66
- package/Modal/index.d.ts +90 -61
- package/Modal/index.js +443 -14
- package/Modal/lang/en_US.d.ts +5 -5
- package/Modal/lang/index.d.ts +11 -11
- package/Modal/lang/zh_CN.d.ts +5 -5
- package/MultiBox/index.d.ts +54 -54
- package/MultiBox/index.js +231 -14
- package/Notification/index.d.ts +52 -52
- package/Notification/index.js +266 -15
- package/OperateBtn/index.d.ts +59 -59
- package/OperateBtn/index.js +260 -14
- package/OperateBtn/lang/en_US.d.ts +4 -4
- package/OperateBtn/lang/index.d.ts +9 -9
- package/OperateBtn/lang/zh_CN.d.ts +4 -4
- package/PageHeader/horizontalMeun.d.ts +9 -9
- package/PageHeader/horizontalMeunRight.d.ts +9 -9
- package/PageHeader/index.d.ts +10 -10
- package/PageHeader/index.js +1171 -14
- package/PageHeader/interface.d.ts +167 -167
- package/Pagination/index.d.ts +33 -33
- package/Pagination/index.js +469 -14
- package/Pagination/lang/en_US.d.ts +8 -8
- package/Pagination/lang/index.d.ts +17 -17
- package/Pagination/lang/zh_CN.d.ts +8 -8
- package/ParauiProvider/index.d.ts +8 -12
- package/ParauiProvider/index.js +53 -15
- package/PopConfirm/index.d.ts +58 -56
- package/PopConfirm/index.js +189 -14
- package/PopConfirm/lang/en_US.d.ts +5 -5
- package/PopConfirm/lang/index.d.ts +11 -11
- package/PopConfirm/lang/zh_CN.d.ts +5 -5
- package/Popover/index.d.ts +14 -14
- package/Popover/index.js +66 -15
- package/Progress/Line.d.ts +47 -47
- package/Progress/Steps.d.ts +17 -17
- package/Progress/index.d.ts +81 -81
- package/Progress/index.js +358 -20
- package/Progress/utils.d.ts +6 -6
- package/Querying/images/index.d.ts +3 -2
- package/Querying/index.d.ts +26 -26
- package/Querying/index.js +762 -14
- package/Querying/lang/en_US.d.ts +4 -4
- package/Querying/lang/index.d.ts +9 -9
- package/Querying/lang/zh_CN.d.ts +4 -4
- package/Radio/index.d.ts +38 -38
- package/Radio/index.js +94 -14
- package/RadioGroup/index.d.ts +47 -47
- package/RadioGroup/index.js +128 -14
- package/Search/index.d.ts +56 -56
- package/Search/index.js +220 -14
- package/Select/index.d.ts +86 -86
- package/Select/index.js +1288 -14
- package/Select/lang/en_US.d.ts +5 -5
- package/Select/lang/index.d.ts +11 -11
- package/Select/lang/zh_CN.d.ts +5 -5
- package/SelectInput/index.d.ts +11 -11
- package/SelectInput/index.js +51 -14
- package/SingleBox/index.d.ts +42 -42
- package/SingleBox/index.js +194 -14
- package/Slider/index.d.ts +14 -14
- package/Slider/index.js +125 -15
- package/Slider/interface.d.ts +102 -102
- package/Split/index.d.ts +7 -7
- package/Split/index.js +134 -15
- package/Stepper/icons.d.ts +5 -5
- package/Stepper/index.d.ts +49 -39
- package/Stepper/index.js +99 -15
- package/Switch/index.d.ts +78 -78
- package/Switch/index.js +73 -14
- package/Table/index.d.ts +10 -10
- package/Table/index.js +2725 -14
- package/Table/interface.d.ts +202 -202
- package/Table/lang/en_US.d.ts +6 -6
- package/Table/lang/index.d.ts +13 -13
- package/Table/lang/zh_CN.d.ts +6 -6
- package/Table/tableBody.d.ts +9 -9
- package/Table/tableBodyElement/index.d.ts +15 -15
- package/Table/tableBodyInterface.d.ts +67 -67
- package/Table/tableContainer/index.d.ts +16 -16
- package/Table/tableElement/index.d.ts +17 -17
- package/Table/tableHead.d.ts +9 -9
- package/Table/tableHeadElement/index.d.ts +15 -15
- package/Table/tableHeadInterface.d.ts +26 -30
- package/Table/tablePagination.d.ts +9 -9
- package/Table/tablePaginationInterFace.d.ts +24 -24
- package/Table/tdElement/index.d.ts +15 -15
- package/Table/thElement/index.d.ts +15 -15
- package/Table/trElement/index.d.ts +15 -15
- package/Table/util.d.ts +16 -16
- package/Tabs/index.d.ts +69 -48
- package/Tabs/index.js +218 -14
- package/Tabs/lang/en_US.d.ts +4 -0
- package/Tabs/lang/index.d.ts +9 -0
- package/Tabs/lang/zh_CN.d.ts +4 -0
- package/Tag/TagGroup.d.ts +66 -66
- package/Tag/index.d.ts +34 -34
- package/Tag/index.js +286 -14
- package/Test/index.d.ts +3 -2
- package/Test/index.js +9 -16
- package/TextField/index.d.ts +93 -93
- package/TextField/index.js +686 -14
- package/TimePicker/index.d.ts +22 -22
- package/TimePicker/index.js +77 -14
- package/TimePicker/locale/en_US.d.ts +3 -3
- package/TimePicker/locale/zh_CN.d.ts +3 -3
- package/TimePicker/style/index.d.ts +1 -1
- package/Timeline/TimelineItem.d.ts +23 -0
- package/Timeline/index.d.ts +31 -22
- package/Timeline/index.js +150 -15
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
- package/ToggleButton/index.d.ts +49 -49
- package/ToggleButton/index.js +200 -14
- package/Tooltip/index.d.ts +11 -14
- package/Tooltip/index.js +335 -15
- package/Tooltip/interface.d.ts +21 -0
- package/Tooltip/utils.d.ts +22 -0
- package/Transfer/index.d.ts +18 -17
- package/Transfer/index.js +343 -14
- package/Transfer/lang/en_US.d.ts +6 -6
- package/Transfer/lang/index.d.ts +13 -13
- package/Transfer/lang/zh_CN.d.ts +6 -6
- package/Tree/OperateBar/index.d.ts +13 -13
- package/Tree/Tree.d.ts +4 -4
- package/Tree/index.d.ts +5 -5
- package/Tree/index.js +35 -14
- package/Tree/interface.d.ts +209 -207
- package/Tree/lang/en_US.d.ts +8 -8
- package/Tree/lang/index.d.ts +17 -17
- package/Tree/lang/zh_CN.d.ts +8 -8
- package/Tree/utils/tools.d.ts +26 -26
- package/Tree/utils/treeUtil.d.ts +15 -15
- package/Upload/Dragger/index.d.ts +10 -10
- package/Upload/ErroTip/index.d.ts +13 -13
- package/Upload/ImageUpload/index.d.ts +14 -14
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -17
- package/Upload/ImgCrop/constants.d.ts +7 -7
- package/Upload/ImgCrop/index.d.ts +6 -6
- package/Upload/ImgCrop/interface.d.ts +24 -24
- package/Upload/UploadList/index.d.ts +5 -5
- package/Upload/index.d.ts +15 -15
- package/Upload/index.js +1542 -14
- package/Upload/interface.d.ts +134 -134
- package/Upload/lang/en_US.d.ts +12 -12
- package/Upload/lang/index.d.ts +25 -25
- package/Upload/lang/zh_CN.d.ts +12 -12
- package/_verture/defineProperty-0590dc61.js +16 -0
- package/_verture/index-2c0ecd8d.js +778 -0
- package/_verture/index-342379c6.js +391 -0
- package/_verture/index-a369ca3f.js +4 -0
- package/_verture/index-e2881a53.js +16 -0
- package/_verture/index-ee85b1cd.js +1555 -0
- package/_verture/intl-336570e4.js +65 -0
- package/_verture/modalContext-e7cc8067.js +228 -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 +128 -128
- package/index.js +160 -19
- package/package.json +54 -21
- package/Popper/index.d.ts +0 -13
- package/Popper/index.js +0 -16
- package/README.md +0 -501
- 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/Stepper/index.js
CHANGED
|
@@ -1,15 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { _ as _typeof } from '../_verture/typeof-498dd2b1.js';
|
|
2
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import React__default from 'react';
|
|
5
|
+
import RcSteps from 'rc-steps';
|
|
6
|
+
import One from '@para-ui/icons/One';
|
|
7
|
+
import Two from '@para-ui/icons/Two';
|
|
8
|
+
import Three from '@para-ui/icons/Three';
|
|
9
|
+
import Four from '@para-ui/icons/Four';
|
|
10
|
+
import Five from '@para-ui/icons/Five';
|
|
11
|
+
import Six from '@para-ui/icons/Six';
|
|
12
|
+
import Seven from '@para-ui/icons/Seven';
|
|
13
|
+
import Eight from '@para-ui/icons/Eight';
|
|
14
|
+
import Nine from '@para-ui/icons/Nine';
|
|
15
|
+
import Check from '@para-ui/icons/Check';
|
|
16
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
17
|
+
|
|
18
|
+
var Icons = {
|
|
19
|
+
1: jsx(One, {}),
|
|
20
|
+
2: jsx(Two, {}),
|
|
21
|
+
3: jsx(Three, {}),
|
|
22
|
+
4: jsx(Four, {}),
|
|
23
|
+
5: jsx(Five, {}),
|
|
24
|
+
6: jsx(Six, {}),
|
|
25
|
+
7: jsx(Seven, {}),
|
|
26
|
+
8: jsx(Eight, {}),
|
|
27
|
+
9: jsx(Nine, {}),
|
|
28
|
+
'done': jsx(Check, {})
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/26 下午2:57\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-stepper {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: rgb(46, 55, 67);\n font-size: 14px;\n font-variant: tabular-nums;\n line-height: 1.5715;\n list-style: none;\n font-feature-settings: \"tnum\";\n display: flex;\n width: 100%;\n text-align: initial;\n}\n\n.paraui-stepper-item {\n position: relative;\n display: inline-block;\n flex: 1;\n vertical-align: top;\n}\n\n.paraui-stepper-item-container {\n display: flex;\n flex-direction: column;\n align-items: center;\n outline: none;\n}\n\n.paraui-stepper-item:last-child > .paraui-stepper-item-container > .paraui-stepper-item-tail,\n.paraui-stepper-item:last-child > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title::after {\n display: none;\n}\n\n.paraui-stepper-item-icon,\n.paraui-stepper-item-content {\n display: block;\n vertical-align: top;\n}\n\n.paraui-stepper-item-icon {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n width: 30px;\n height: 30px;\n font-size: 16px;\n line-height: 30px;\n text-align: center;\n border-radius: 50%;\n background-color: rgba(171, 176, 185, 0.12);\n transition: background-color 0.3s, border-color 0.3s;\n}\n\n.paraui-stepper-item-icon .paraui-stepper-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: rgba(46, 55, 67, 0.7);\n vertical-align: middle;\n}\n.paraui-stepper-item-icon .paraui-stepper-icon svg {\n color: inherit;\n}\n\n.paraui-stepper-item-tail {\n position: absolute;\n top: 12px;\n left: 0;\n width: 100%;\n padding: 0 10px;\n}\n\n.paraui-stepper-item-tail::after {\n display: inline-block;\n width: 100%;\n height: 1px;\n border-radius: 1px;\n transition: background 0.3s;\n content: \"\";\n}\n\n.paraui-stepper-item-title {\n display: inline-block;\n color: rgba(46, 55, 67, 0.7);\n font-size: 14px;\n font-weight: 400;\n line-height: 30px;\n}\n\n.paraui-stepper-item-title::after {\n position: absolute;\n display: block;\n height: 1px;\n content: \"\";\n top: 15px;\n left: calc(50% + 30px);\n right: calc(-50% + 30px);\n}\n\n.paraui-stepper-item-subtitle {\n display: inline;\n margin-left: 8px;\n color: rgb(46, 55, 67);\n font-weight: normal;\n font-size: 14px;\n}\n\n.paraui-stepper-item-description {\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n\n.paraui-stepper-item-wait .paraui-stepper-item-icon {\n background-color: rgba(171, 176, 185, 0.12);\n}\n\n.paraui-stepper-item-wait .paraui-stepper-item-icon > .paraui-stepper-icon {\n color: rgba(46, 55, 67, 0.7);\n}\n\n.paraui-stepper-item-wait .paraui-stepper-item-icon > .paraui-stepper-icon .paraui-stepper-icon-dot {\n background: rgba(171, 176, 185, 0.4);\n}\n\n.paraui-stepper-item-wait > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title {\n color: rgba(46, 55, 67, 0.7);\n}\n\n.paraui-stepper-item-wait > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title::after {\n border-top: 1px dashed rgba(171, 176, 185, 0.4);\n height: 0;\n background: transparent;\n}\n\n.paraui-stepper-item-wait > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-description {\n color: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-wait > .paraui-stepper-item-container > .paraui-stepper-item-tail::after {\n border-left: 1px dashed rgba(171, 176, 185, 0.4);\n}\n\n.paraui-stepper-item-process .paraui-stepper-item-icon {\n background-color: rgb(255, 255, 255);\n}\n\n.paraui-stepper-item-process .paraui-stepper-item-icon > .paraui-stepper-icon {\n color: rgb(54, 102, 214);\n}\n\n.paraui-stepper-item-process .paraui-stepper-item-icon > .paraui-stepper-icon .paraui-stepper-icon-dot {\n background: rgb(54, 102, 214);\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title {\n color: rgb(54, 102, 214);\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title::after {\n background: linear-gradient(90deg, rgb(61, 102, 248), rgb(119, 147, 249) 74%, rgb(216, 223, 250));\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-description {\n color: rgb(46, 55, 67);\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-tail::after {\n background: linear-gradient(180deg, rgb(61, 102, 248), rgb(119, 147, 249) 74%, rgb(216, 223, 250));\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-icon {\n background: rgb(54, 102, 214);\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-icon .paraui-stepper-icon {\n color: rgb(255, 255, 255);\n}\n\n.paraui-stepper-item-process > .paraui-stepper-item-container > .paraui-stepper-item-title {\n font-weight: 400;\n}\n\n.paraui-stepper-item-finish .paraui-stepper-item-icon {\n background-color: rgba(54, 102, 214, 0.8);\n}\n\n.paraui-stepper-item-finish .paraui-stepper-item-icon > .paraui-stepper-icon {\n color: rgb(255, 255, 255);\n}\n\n.paraui-stepper-item-finish .paraui-stepper-item-icon > .paraui-stepper-icon .paraui-stepper-icon-dot {\n background: rgb(54, 102, 214);\n}\n\n.paraui-stepper-item-finish > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title {\n color: rgb(46, 55, 67);\n}\n\n.paraui-stepper-item-finish > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title::after {\n background-color: rgba(171, 176, 185, 0.4);\n}\n\n.paraui-stepper-item-finish > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-description {\n color: rgb(46, 55, 67);\n}\n\n.paraui-stepper-item-finish > .paraui-stepper-item-container > .paraui-stepper-item-tail::after {\n border-left: 1px solid rgba(171, 176, 185, 0.4);\n}\n\n.paraui-stepper-item-error .paraui-stepper-item-icon {\n background-color: rgb(255, 255, 255);\n border-color: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-error .paraui-stepper-item-icon > .paraui-stepper-icon {\n color: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-error .paraui-stepper-item-icon > .paraui-stepper-icon .paraui-stepper-icon-dot {\n background: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-error > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title {\n color: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-error > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title::after {\n background-color: rgba(248, 249, 251, 0.8);\n}\n\n.paraui-stepper-item-error > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-description {\n color: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-error > .paraui-stepper-item-container > .paraui-stepper-item-tail::after {\n background-color: rgba(248, 249, 251, 0.8);\n}\n\n.paraui-stepper-item.paraui-stepper-next-error .paraui-stepper-item-title::after {\n background: rgb(235, 96, 84);\n}\n\n.paraui-stepper-item-disabled {\n cursor: not-allowed;\n}\n\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button] {\n cursor: pointer;\n}\n\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button] .paraui-stepper-item-title,\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button] .paraui-stepper-item-subtitle,\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button] .paraui-stepper-item-description,\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button] .paraui-stepper-item-icon .paraui-stepper-icon {\n transition: color 0.3s;\n}\n\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button]:hover .paraui-stepper-item-title,\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button]:hover .paraui-stepper-item-subtitle,\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active) > .paraui-stepper-item-container[role=button]:hover .paraui-stepper-item-description {\n color: rgb(54, 102, 214);\n}\n\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active):not(.paraui-stepper-item-process) > .paraui-stepper-item-container[role=button]:hover .paraui-stepper-item-icon {\n border-color: rgb(54, 102, 214);\n}\n\n.paraui-stepper .paraui-stepper-item:not(.paraui-stepper-item-active):not(.paraui-stepper-item-process) > .paraui-stepper-item-container[role=button]:hover .paraui-stepper-item-icon .paraui-stepper-icon {\n color: rgb(54, 102, 214);\n}\n\n.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item {\n white-space: nowrap;\n}\n\n.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item:first-child {\n padding-left: 0;\n}\n\n.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item:last-child .paraui-stepper-item-title {\n padding-right: 0;\n}\n\n.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item-tail {\n display: none;\n}\n\n.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item-description {\n max-width: 140px;\n white-space: normal;\n}\n\n.paraui-stepper-item-custom > .paraui-stepper-item-container > .paraui-stepper-item-icon {\n height: auto;\n border: 0;\n}\n\n.paraui-stepper-item-custom > .paraui-stepper-item-container > .paraui-stepper-item-icon > .paraui-stepper-icon {\n top: 0;\n left: 0;\n width: 30px;\n height: 30px;\n background-color: rgba(171, 176, 185, 0.12);\n border-radius: 50%;\n}\n\n.paraui-stepper-item-custom.paraui-stepper-item-process .paraui-stepper-item-icon > .paraui-stepper-icon {\n background: rgb(54, 102, 214);\n}\n\n.paraui-stepper:not(.paraui-stepper-vertical) .paraui-stepper-item-custom .paraui-stepper-item-icon {\n width: auto;\n background: none;\n}\n\n.paraui-stepper:not(.paraui-stepper-vertical) .paraui-stepper-item-custom.paraui-stepper-item-process .paraui-stepper-item-icon {\n background: rgb(54, 102, 214);\n}\n\n.paraui-stepper:not(.paraui-stepper-vertical) .paraui-stepper-item-custom.paraui-stepper-item-finish .paraui-stepper-item-icon {\n background: rgba(54, 102, 214, 0.8);\n}\n\n.paraui-stepper-small.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item {\n padding-left: 12px;\n}\n\n.paraui-stepper-small.paraui-stepper-horizontal:not(.paraui-stepper-label-vertical) .paraui-stepper-item:first-child {\n padding-left: 0;\n}\n\n.paraui-stepper-small .paraui-stepper-item-icon {\n width: 24px;\n height: 24px;\n margin: 0 8px 0 0;\n font-size: 12px;\n line-height: 24px;\n text-align: center;\n border-radius: 24px;\n}\n\n.paraui-stepper-small .paraui-stepper-item-title {\n padding-right: 12px;\n font-size: 14px;\n line-height: 24px;\n}\n\n.paraui-stepper-small .paraui-stepper-item-title::after {\n top: 12px;\n}\n\n.paraui-stepper-small .paraui-stepper-item-description {\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n\n.paraui-stepper-small .paraui-stepper-item-tail {\n top: 8px;\n}\n\n.paraui-stepper-small .paraui-stepper-item-custom .paraui-stepper-item-icon {\n width: inherit;\n height: inherit;\n line-height: inherit;\n background: none;\n border: 0;\n border-radius: 0;\n}\n\n.paraui-stepper-small .paraui-stepper-item-custom .paraui-stepper-item-icon > .paraui-stepper-icon {\n font-size: 24px;\n line-height: 24px;\n transform: none;\n}\n\n.paraui-stepper-vertical {\n display: flex;\n flex-direction: column;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item {\n display: block;\n flex: 1 0 auto;\n padding-left: 0;\n overflow: visible;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item .paraui-stepper-item-icon {\n float: left;\n margin-right: 16px;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item .paraui-stepper-item-content {\n display: block;\n min-height: 68px;\n overflow: hidden;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item .paraui-stepper-item-title {\n line-height: 32px;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item .paraui-stepper-item-description {\n padding-bottom: 12px;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item > .paraui-stepper-item-container {\n flex-direction: row;\n align-items: flex-start;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item > .paraui-stepper-item-container > .paraui-stepper-item-tail {\n position: absolute;\n top: 0;\n left: 15px;\n width: 1px;\n height: 100%;\n padding: 36px 0 6px;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item > .paraui-stepper-item-container > .paraui-stepper-item-tail::after {\n width: 1px;\n height: 100%;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item:not(:last-child) > .paraui-stepper-item-container > .paraui-stepper-item-tail {\n display: block;\n}\n\n.paraui-stepper-vertical > .paraui-stepper-item > .paraui-stepper-item-container > .paraui-stepper-item-content > .paraui-stepper-item-title::after {\n display: none;\n}\n\n.paraui-stepper-vertical.paraui-stepper-small .paraui-stepper-item-container .paraui-stepper-item-tail {\n position: absolute;\n top: 0;\n left: 12px;\n padding: 30px 0 6px;\n}\n\n.paraui-stepper-vertical.paraui-stepper-small .paraui-stepper-item-container .paraui-stepper-item-title {\n line-height: 24px;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item {\n overflow: visible;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item-tail {\n margin-left: 58px;\n padding: 3.5px 24px;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item-content {\n display: block;\n width: 116px;\n margin-top: 8px;\n text-align: center;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item-icon {\n display: inline-block;\n margin-left: 42px;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item-title {\n padding-right: 0;\n padding-left: 0;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item-title::after {\n display: none;\n}\n\n.paraui-stepper-label-vertical .paraui-stepper-item-subtitle {\n display: block;\n margin-bottom: 4px;\n margin-left: 0;\n line-height: 1.5715;\n}\n\n.paraui-stepper-label-vertical.paraui-stepper-small:not(.paraui-stepper-dot) .paraui-stepper-item-icon {\n margin-left: 46px;\n}";
|
|
32
|
+
styleInject(css_248z);
|
|
33
|
+
|
|
34
|
+
var Stepper = function Stepper(props) {
|
|
35
|
+
var _props$current = props.current,
|
|
36
|
+
current = _props$current === void 0 ? 0 : _props$current,
|
|
37
|
+
activeStep = props.activeStep,
|
|
38
|
+
_props$mode = props.mode,
|
|
39
|
+
mode = _props$mode === void 0 ? 'number' : _props$mode,
|
|
40
|
+
steps = props.steps,
|
|
41
|
+
orientation = props.orientation,
|
|
42
|
+
_props$direction = props.direction,
|
|
43
|
+
direction = _props$direction === void 0 ? 'horizontal' : _props$direction,
|
|
44
|
+
children = props.children,
|
|
45
|
+
restProps = __rest(props, ["current", "activeStep", "mode", "steps", "orientation", "direction", "children"]);
|
|
46
|
+
|
|
47
|
+
var prefixCls = 'paraui-stepper';
|
|
48
|
+
var icons = {
|
|
49
|
+
finish: Icons['done'],
|
|
50
|
+
error: Icons['done']
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var stepIconRender = function stepIconRender(_ref) {
|
|
54
|
+
var node = _ref.node,
|
|
55
|
+
status = _ref.status;
|
|
56
|
+
|
|
57
|
+
if (status === 'finish') {
|
|
58
|
+
return /*#__PURE__*/React__default.cloneElement(node, {}, Icons['done']);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return node;
|
|
62
|
+
}; //渲染Step
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
var renderStep = function renderStep() {
|
|
66
|
+
if (!(steps === null || steps === void 0 ? void 0 : steps.length)) return children;
|
|
67
|
+
return steps.map(function (item, index) {
|
|
68
|
+
var label = '';
|
|
69
|
+
var icon = null;
|
|
70
|
+
|
|
71
|
+
if (mode === 'number') {
|
|
72
|
+
label = item;
|
|
73
|
+
icon = Icons[index];
|
|
74
|
+
} else if (_typeof(item) === 'object') {
|
|
75
|
+
label = item.label;
|
|
76
|
+
icon = item.icon;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return jsx(Stepper.Step, {
|
|
80
|
+
title: label,
|
|
81
|
+
icon: icon
|
|
82
|
+
}, index);
|
|
83
|
+
});
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return jsx(RcSteps, Object.assign({
|
|
87
|
+
current: activeStep !== null && activeStep !== void 0 ? activeStep : current,
|
|
88
|
+
icons: icons
|
|
89
|
+
}, restProps, {
|
|
90
|
+
direction: orientation !== null && orientation !== void 0 ? orientation : direction,
|
|
91
|
+
stepIcon: stepIconRender,
|
|
92
|
+
prefixCls: prefixCls
|
|
93
|
+
}, {
|
|
94
|
+
children: renderStep()
|
|
95
|
+
}));
|
|
96
|
+
};
|
|
97
|
+
Stepper.Step = RcSteps.Step;
|
|
98
|
+
|
|
99
|
+
export { Stepper, Stepper as default };
|
package/Switch/index.d.ts
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Hanz
|
|
3
|
-
* @date 2021/8/5
|
|
4
|
-
* @description switch 开关
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { LabelTooltipProps } from '../Label';
|
|
8
|
-
import "./index.scss";
|
|
9
|
-
declare type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
|
-
declare type SwitchClickEventHandler = SwitchChangeEventHandler;
|
|
11
|
-
export interface SwitchProps {
|
|
12
|
-
/**
|
|
13
|
-
* 开关大小
|
|
14
|
-
*/
|
|
15
|
-
size?: 'small' | 'default';
|
|
16
|
-
/**
|
|
17
|
-
* 类名
|
|
18
|
-
*/
|
|
19
|
-
className?: string;
|
|
20
|
-
/**
|
|
21
|
-
* style
|
|
22
|
-
*/
|
|
23
|
-
style?: React.CSSProperties;
|
|
24
|
-
/**
|
|
25
|
-
* 是否选中
|
|
26
|
-
*/
|
|
27
|
-
checked?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 默认是否选中
|
|
30
|
-
*/
|
|
31
|
-
defaultChecked?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* 变化时回调函数
|
|
34
|
-
*/
|
|
35
|
-
onChange?: SwitchChangeEventHandler;
|
|
36
|
-
/**
|
|
37
|
-
* 点击时回调函数
|
|
38
|
-
*/
|
|
39
|
-
onClick?: SwitchClickEventHandler;
|
|
40
|
-
/**
|
|
41
|
-
* 选中的是内容
|
|
42
|
-
*/
|
|
43
|
-
checkedChildren?: React.ReactNode;
|
|
44
|
-
/**
|
|
45
|
-
* 非选中时内容
|
|
46
|
-
*/
|
|
47
|
-
unCheckedChildren?: React.ReactNode;
|
|
48
|
-
/**
|
|
49
|
-
* 是否禁用
|
|
50
|
-
*/
|
|
51
|
-
disabled?: boolean;
|
|
52
|
-
/**
|
|
53
|
-
* 是否显示loading
|
|
54
|
-
*/
|
|
55
|
-
loading?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* 自动获得焦点
|
|
58
|
-
*/
|
|
59
|
-
autoFocus?: boolean;
|
|
60
|
-
/**
|
|
61
|
-
* 紧凑型开关
|
|
62
|
-
*/
|
|
63
|
-
compact?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* 标题
|
|
66
|
-
*/
|
|
67
|
-
label?: ReactNode;
|
|
68
|
-
/**
|
|
69
|
-
* 帮助提示
|
|
70
|
-
*/
|
|
71
|
-
labelTooltip?: LabelTooltipProps;
|
|
72
|
-
/**
|
|
73
|
-
* 标题位置
|
|
74
|
-
*/
|
|
75
|
-
labelPlacement?: 'top' | 'bottom' | 'start' | 'end';
|
|
76
|
-
}
|
|
77
|
-
export declare const Switch: FunctionComponent<SwitchProps>;
|
|
78
|
-
export default Switch;
|
|
1
|
+
/**
|
|
2
|
+
* @author Hanz
|
|
3
|
+
* @date 2021/8/5
|
|
4
|
+
* @description switch 开关
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { LabelTooltipProps } from '../Label';
|
|
8
|
+
import "./index.scss";
|
|
9
|
+
declare type SwitchChangeEventHandler = (checked: boolean, event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
10
|
+
declare type SwitchClickEventHandler = SwitchChangeEventHandler;
|
|
11
|
+
export interface SwitchProps {
|
|
12
|
+
/**
|
|
13
|
+
* 开关大小
|
|
14
|
+
*/
|
|
15
|
+
size?: 'small' | 'default';
|
|
16
|
+
/**
|
|
17
|
+
* 类名
|
|
18
|
+
*/
|
|
19
|
+
className?: string;
|
|
20
|
+
/**
|
|
21
|
+
* style
|
|
22
|
+
*/
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/**
|
|
25
|
+
* 是否选中
|
|
26
|
+
*/
|
|
27
|
+
checked?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 默认是否选中
|
|
30
|
+
*/
|
|
31
|
+
defaultChecked?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* 变化时回调函数
|
|
34
|
+
*/
|
|
35
|
+
onChange?: SwitchChangeEventHandler;
|
|
36
|
+
/**
|
|
37
|
+
* 点击时回调函数
|
|
38
|
+
*/
|
|
39
|
+
onClick?: SwitchClickEventHandler;
|
|
40
|
+
/**
|
|
41
|
+
* 选中的是内容
|
|
42
|
+
*/
|
|
43
|
+
checkedChildren?: React.ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* 非选中时内容
|
|
46
|
+
*/
|
|
47
|
+
unCheckedChildren?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* 是否禁用
|
|
50
|
+
*/
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 是否显示loading
|
|
54
|
+
*/
|
|
55
|
+
loading?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* 自动获得焦点
|
|
58
|
+
*/
|
|
59
|
+
autoFocus?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* 紧凑型开关
|
|
62
|
+
*/
|
|
63
|
+
compact?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 标题
|
|
66
|
+
*/
|
|
67
|
+
label?: ReactNode;
|
|
68
|
+
/**
|
|
69
|
+
* 帮助提示
|
|
70
|
+
*/
|
|
71
|
+
labelTooltip?: LabelTooltipProps;
|
|
72
|
+
/**
|
|
73
|
+
* 标题位置
|
|
74
|
+
*/
|
|
75
|
+
labelPlacement?: 'top' | 'bottom' | 'start' | 'end';
|
|
76
|
+
}
|
|
77
|
+
export declare const Switch: FunctionComponent<SwitchProps>;
|
|
78
|
+
export default Switch;
|
package/Switch/index.js
CHANGED
|
@@ -1,14 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
*/r(7418);var i=r(8156),a=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var n=Symbol.for;a=n("react.element"),t.Fragment=n("react.fragment")}var o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var i,n={},s=null,p=null;for(i in void 0!==r&&(s=""+r),void 0!==t.key&&(s=""+t.key),void 0!==t.ref&&(p=t.ref),t)l.call(t,i)&&!c.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps)void 0===n[i]&&(n[i]=t[i]);return{$$typeof:a,type:e,key:s,ref:p,props:n,_owner:o.current}}t.jsx=s,t.jsxs=s},5893:function(e,t,r){"use strict";e.exports=r(5251)},2113:function(e,t,r){var i=r(3379),a=r(7381);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},9663:function(e,t,r){var i=r(3379),a=r(4928);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},7809:function(e,t,r){var i=r(3379),a=r(6378);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},2310:function(e,t,r){var i=r(3379),a=r(9929);"string"==typeof(a=a.__esModule?a.default:a)&&(a=[[e.id,a,""]]);var n={insert:("body","body"),singleton:!1};i(a,n);e.exports=a.locals||{}},3379:function(e,t,r){"use strict";var i,a=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},n=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),o=[];function l(e){for(var t=-1,r=0;r<o.length;r++)if(o[r].identifier===e){t=r;break}return t}function c(e,t){for(var r={},i=[],a=0;a<e.length;a++){var n=e[a],c=t.base?n[0]+t.base:n[0],s=r[c]||0,p="".concat(c," ").concat(s);r[c]=s+1;var u=l(p),d={css:n[1],media:n[2],sourceMap:n[3]};-1!==u?(o[u].references++,o[u].updater(d)):o.push({identifier:p,updater:m(d,t),references:1}),i.push(p)}return i}function s(e){var t=document.createElement("style"),i=e.attributes||{};if(void 0===i.nonce){var a=r.nc;a&&(i.nonce=a)}if(Object.keys(i).forEach((function(e){t.setAttribute(e,i[e])})),"function"==typeof e.insert)e.insert(t);else{var o=n(e.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}return t}var p,u=(p=[],function(e,t){return p[e]=t,p.filter(Boolean).join("\n")});function d(e,t,r,i){var a=r?"":i.media?"@media ".concat(i.media," {").concat(i.css,"}"):i.css;if(e.styleSheet)e.styleSheet.cssText=u(t,a);else{var n=document.createTextNode(a),o=e.childNodes;o[t]&&e.removeChild(o[t]),o.length?e.insertBefore(n,o[t]):e.appendChild(n)}}function f(e,t,r){var i=r.css,a=r.media,n=r.sourceMap;if(a?e.setAttribute("media",a):e.removeAttribute("media"),n&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),e.styleSheet)e.styleSheet.cssText=i;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(i))}}var h=null,b=0;function m(e,t){var r,i,a;if(t.singleton){var n=b++;r=h||(h=s(t)),i=d.bind(null,r,n,!1),a=d.bind(null,r,n,!0)}else r=s(t),i=f.bind(null,r,t),a=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(r)};return i(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;i(e=t)}else a()}}e.exports=function(e,t){(t=t||{}).singleton||"boolean"==typeof t.singleton||(t.singleton=a());var r=c(e=e||[],t);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var i=0;i<r.length;i++){var a=l(r[i]);o[a].references--}for(var n=c(e,t),s=0;s<r.length;s++){var p=l(r[s]);0===o[p].references&&(o[p].updater(),o.splice(p,1))}r=n}}}},3566:function(e,t,r){"use strict";var i=r(5893),a=r(7371),n=r(8076),o=r.n(n),l=r(5744),c=r.n(l),s=(r(2113),function(){return s=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)}),p=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r};t.default=function(e){var t=e.title,r=void 0===t?"":t,n=e.children,l=e.arrow,u=void 0===l||l,d=e.interactive,f=void 0===d||d,h=e.className,b=e.placement,m=void 0===b?"top-start":b,g=p(e,["title","children","arrow","interactive","className","placement"]);return(0,i.jsx)(a.default,s({title:r,arrow:u,interactive:f,placement:m},g,{children:(0,i.jsx)("span",s({className:c()("paraui-help",h)},{children:n||(0,i.jsx)(o(),{})}))}))}},8767:function(e,t,r){"use strict";var i=r(5893),a=r(3566),n=(r(9663),function(){return n=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},n.apply(this,arguments)});t.default=function(e){var t=e.className,r=e.style,o=e.label,l=e.labelSign,c=e.required,s=void 0!==c&&c,p=e.tooltip,u=e.tooltipType,d=void 0===u?"icon":u,f=e.placement,h=e.arrow,b=e.tooltipIcon,m=function(){var e="paraui-label";return d&&(e+=" paraui-label-"+d),p&&(e+=" paraui-label-tooltip"),t&&(e+=" "+t),e};return(0,i.jsxs)(i.Fragment,{children:["icon"===d&&(0,i.jsxs)("label",n({className:m(),style:r},{children:[(0,i.jsx)(i.Fragment,{children:o}),s&&(0,i.jsx)("span",n({className:"paraui-label-required"},{children:"*"})),l&&(0,i.jsx)("span",{children:l}),p&&(0,i.jsx)(a.default,n({title:p,placement:f,arrow:h},{children:b}))]})),"line"===d&&(0,i.jsx)(a.default,n({title:p||"",placement:f,arrow:h},{children:(0,i.jsxs)("label",n({className:m(),style:r},{children:[(0,i.jsx)(i.Fragment,{children:o}),s&&(0,i.jsx)("span",n({className:"paraui-label-required"},{children:"*"})),l&&(0,i.jsx)("span",{children:l})]}))}))]})}},7371:function(e,t,r){"use strict";var i=r(5893),a=r(670),n=r(5744),o=r.n(n),l=(r(2310),function(){return l=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},l.apply(this,arguments)}),c=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r};t.default=function(e){var t,r=e.placement,n=void 0===r?"top-start":r,s=e.className,p=e.arrow,u=void 0===p||p,d=e.PopperProps,f=e.boundariesElement,h=void 0===f?"scrollParent":f,b=c(e,["placement","className","arrow","PopperProps","boundariesElement"]),m=l(l({},e.classes),{popper:o()("paraui-tooltip",s,null===(t=e.classes)||void 0===t?void 0:t.popper,{"paraui-tooltip-left-right":(null==n?void 0:n.includes("left"))||(null==n?void 0:n.includes("right")),"paraui-tooltip-top-bottom":(null==n?void 0:n.includes("top"))||(null==n?void 0:n.includes("bottom"))})});return(0,i.jsx)(a.Tooltip,l({},b,{enterTouchDelay:0,arrow:u,placement:n,classes:m,PopperProps:l(l({},d),{modifiers:{preventOverflow:{boundariesElement:h}}})}))}},670:function(e){"use strict";e.exports=a},8076:function(e){"use strict";e.exports=n},2788:function(e){"use strict";e.exports=i},5744:function(e){"use strict";e.exports=r},2284:function(e){"use strict";e.exports=t},8156:function(t){"use strict";t.exports=e}},l={};function c(e){var t=l[e];if(void 0!==t)return t.exports;var r=l[e]={id:e,exports:{}};return o[e](r,r.exports,c),r.exports}c.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(t,{a:t}),t},c.d=function(e,t){for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.nc=void 0;var s={};return function(){"use strict";c.r(s),c.d(s,{Switch:function(){return d}});var e=c(5893),t=c(2284),r=c.n(t),i=c(5744),a=c.n(i),n=c(2788),o=c.n(n),l=c(8767),p=(c(7809),function(){return p=Object.assign||function(e){for(var t,r=1,i=arguments.length;r<i;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},p.apply(this,arguments)}),u=function(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(i=Object.getOwnPropertySymbols(e);a<i.length;a++)t.indexOf(i[a])<0&&Object.prototype.propertyIsEnumerable.call(e,i[a])&&(r[i[a]]=e[i[a]])}return r},d=function(t){t.compact,t.size;var i=t.loading,n=t.disabled,c=t.className,s=t.label,d=t.labelTooltip,f=t.labelPlacement,h=void 0===f?"top":f,b=u(t,["compact","size","loading","disabled","className","label","labelTooltip","labelPlacement"]),m=a()("paraui-switch",{"paraui-switch-loading":i},c),g=a()("paraui-switch-label","paraui-switch-label-".concat(h)),v=(0,e.jsx)("div",p({className:"paraui-switch-handle"},{children:i&&(0,e.jsx)(o(),{className:"paraui-switch-loading-icon"})}));return s?(0,e.jsxs)("span",p({className:g},{children:[(0,e.jsx)(r(),p({},b,{prefixCls:"paraui-switch",className:m,disabled:n||i,loadingIcon:v})),(0,e.jsx)(l.default,p({label:s},d,{className:"paraui-switch-text"}))]})):(0,e.jsx)(r(),p({},b,{prefixCls:"paraui-switch",className:m,disabled:n||i,loadingIcon:v}))};s.default=d}(),s}()}));
|
|
1
|
+
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import RcSwitch from 'rc-switch';
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
6
|
+
import Label from '../Label/index.js';
|
|
7
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
|
+
import '../Help/index.js';
|
|
9
|
+
import '../Tooltip/index.js';
|
|
10
|
+
import '../_verture/slicedToArray-d7722f4b.js';
|
|
11
|
+
import 'react';
|
|
12
|
+
import 'rc-tooltip';
|
|
13
|
+
import 'rc-tooltip/lib/placements';
|
|
14
|
+
import '@para-ui/icons/Help';
|
|
15
|
+
|
|
16
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/3 下午5:58\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-switch {\n position: relative;\n display: inline-block;\n min-width: 32px;\n height: 18px;\n vertical-align: middle;\n background-color: transparent;\n border: 0;\n border-radius: 100px;\n cursor: pointer;\n transition: all 0.2s;\n user-select: none;\n}\n.paraui-switch:before {\n position: absolute;\n top: 2px;\n left: 0;\n width: 100%;\n height: 14px;\n border-radius: 100px;\n background-color: rgba(171, 176, 185, 0.4);\n content: \"\";\n transition: all 0.2s;\n}\n.paraui-switch:focus {\n outline: 0;\n box-shadow: none;\n}\n.paraui-switch-checked:focus {\n box-shadow: none;\n}\n.paraui-switch:focus:hover {\n box-shadow: none;\n}\n.paraui-switch-checked:before {\n background-color: rgba(54, 102, 214, 0.2);\n}\n.paraui-switch-loading, .paraui-switch-disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n.paraui-switch-loading *, .paraui-switch-disabled * {\n box-shadow: none;\n cursor: not-allowed;\n}\n.paraui-switch-inner {\n display: block;\n margin: 0 7px 0 25px;\n color: rgb(255, 255, 255);\n font-size: 14px;\n transition: margin 0.2s;\n}\n.paraui-switch-checked .paraui-switch-inner {\n margin: 0 25px 0 7px;\n}\n.paraui-switch-handle {\n position: absolute;\n top: 0;\n left: 0;\n width: 18px;\n height: 18px;\n transition: all 0.2s ease-in-out;\n}\n.paraui-switch-handle::before {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n background-color: #8996AA;\n border-radius: 9px;\n box-shadow: none;\n transition: all 0.2s ease-in-out;\n content: \"\";\n}\n.paraui-switch-checked .paraui-switch-handle {\n left: calc(100% - 18px);\n}\n.paraui-switch-checked .paraui-switch-handle::before {\n background-color: rgb(54, 102, 214);\n}\n.paraui-switch:not(.paraui-switch-disabled):active .paraui-switch-handle::before {\n right: -30%;\n left: 0;\n}\n.paraui-switch:not(.paraui-switch-disabled):active.paraui-switch-checked .paraui-switch-handle::before {\n right: 0;\n left: -30%;\n}\n.paraui-switch-loading-icon {\n position: relative;\n top: 1px;\n color: rgb(54, 102, 214);\n vertical-align: top;\n animation: loadingCircle 1s infinite linear;\n}\n.paraui-switch-checked .paraui-switch-loading-icon {\n color: rgb(255, 255, 255);\n}\n.paraui-switch-small {\n min-width: 28px;\n height: 14px;\n line-height: 14px;\n}\n.paraui-switch-small .paraui-switch-inner {\n margin: 0 5px 0 18px;\n font-size: 14px;\n}\n.paraui-switch-small .paraui-switch-handle {\n width: 12px;\n height: 12px;\n}\n.paraui-switch-small .paraui-switch-loading-icon {\n top: 1.5px;\n font-size: 9px;\n}\n.paraui-switch-small.paraui-switch-checked .paraui-switch-inner {\n margin: 0 18px 0 5px;\n}\n.paraui-switch-small.paraui-switch-checked .paraui-switch-handle {\n left: calc(100% - 12px - 2px);\n}\n@keyframes loadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-switch-label {\n display: inline-flex;\n}\n.paraui-switch-label .paraui-switch-text {\n color: rgba(46, 55, 67, 0.7);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-switch-label-top {\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n.paraui-switch-label-top .paraui-switch-text {\n margin-bottom: 8px;\n}\n.paraui-switch-label-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n.paraui-switch-label-bottom .paraui-switch-text {\n margin-top: 8px;\n margin-bottom: 0;\n}\n.paraui-switch-label-start {\n flex-direction: row-reverse;\n align-items: center;\n}\n.paraui-switch-label-start .paraui-switch-text {\n margin-right: 8px;\n margin-bottom: 0;\n}\n.paraui-switch-label-end {\n flex-direction: row;\n align-items: center;\n}\n.paraui-switch-label-end .paraui-switch-text {\n margin-left: 8px;\n margin-bottom: 0;\n}";
|
|
17
|
+
styleInject(css_248z);
|
|
18
|
+
|
|
19
|
+
var Switch = function Switch(props) {
|
|
20
|
+
props.compact;
|
|
21
|
+
props.size;
|
|
22
|
+
var loading = props.loading,
|
|
23
|
+
disabled = props.disabled,
|
|
24
|
+
className = props.className,
|
|
25
|
+
label = props.label,
|
|
26
|
+
labelTooltip = props.labelTooltip,
|
|
27
|
+
_props$labelPlacement = props.labelPlacement,
|
|
28
|
+
labelPlacement = _props$labelPlacement === void 0 ? 'top' : _props$labelPlacement,
|
|
29
|
+
restProps = __rest(props, ["compact", "size", "loading", "disabled", "className", "label", "labelTooltip", "labelPlacement"]); //cls
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var classes = clsx('paraui-switch', {
|
|
33
|
+
// 'paraui-switch-small': size === 'small',
|
|
34
|
+
'paraui-switch-loading': loading // 'paraui-switch-compact': compact
|
|
35
|
+
|
|
36
|
+
}, className); //label cls
|
|
37
|
+
|
|
38
|
+
var labelClasses = clsx('paraui-switch-label', "paraui-switch-label-".concat(labelPlacement)); //loading circle
|
|
39
|
+
|
|
40
|
+
var loadingIcon = jsx("div", Object.assign({
|
|
41
|
+
className: 'paraui-switch-handle'
|
|
42
|
+
}, {
|
|
43
|
+
children: loading && jsx(LoadingOutlined, {
|
|
44
|
+
className: 'paraui-switch-loading-icon'
|
|
45
|
+
})
|
|
46
|
+
}));
|
|
47
|
+
|
|
48
|
+
if (label) {
|
|
49
|
+
return jsxs("span", Object.assign({
|
|
50
|
+
className: labelClasses
|
|
51
|
+
}, {
|
|
52
|
+
children: [jsx(RcSwitch, Object.assign({}, restProps, {
|
|
53
|
+
prefixCls: 'paraui-switch',
|
|
54
|
+
className: classes,
|
|
55
|
+
disabled: disabled || loading,
|
|
56
|
+
loadingIcon: loadingIcon
|
|
57
|
+
})), jsx(Label, Object.assign({
|
|
58
|
+
label: label
|
|
59
|
+
}, labelTooltip, {
|
|
60
|
+
className: 'paraui-switch-text'
|
|
61
|
+
}))]
|
|
62
|
+
}));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return jsx(RcSwitch, Object.assign({}, restProps, {
|
|
66
|
+
prefixCls: 'paraui-switch',
|
|
67
|
+
className: classes,
|
|
68
|
+
disabled: disabled || loading,
|
|
69
|
+
loadingIcon: loadingIcon
|
|
70
|
+
}));
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { Switch, Switch as default };
|
package/Table/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2022/5/5 3:13 PM
|
|
4
|
-
* @description 表格
|
|
5
|
-
*/
|
|
6
|
-
import { FunctionComponent } from 'react';
|
|
7
|
-
import { TableProps } from './interface';
|
|
8
|
-
import './index.scss';
|
|
9
|
-
declare const Table: FunctionComponent<TableProps>;
|
|
10
|
-
export default Table;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2022/5/5 3:13 PM
|
|
4
|
+
* @description 表格
|
|
5
|
+
*/
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { TableProps } from './interface';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
declare const Table: FunctionComponent<TableProps>;
|
|
10
|
+
export default Table;
|