@para-ui/core 2.2.5-beta → 2.2.7
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 +6 -12
- package/AutoBox/index.js +15 -203
- package/AutoTips/index.d.ts +6 -12
- package/AutoTips/index.js +15 -84
- package/Breadcrumbs/index.d.ts +7 -13
- package/Breadcrumbs/index.js +15 -227
- package/Button/SplitButton.d.ts +61 -0
- package/Button/index.d.ts +11 -92
- package/Button/index.js +14 -348
- package/Button/lang/en_US.d.ts +4 -0
- package/Button/lang/index.d.ts +9 -0
- package/Button/lang/zh_CN.d.ts +4 -0
- package/ButtonGroup/index.d.ts +9 -21
- package/ButtonGroup/index.js +14 -128
- package/Carousel/index.d.ts +11 -17
- package/Carousel/index.js +15 -74
- package/Cascader/index.d.ts +7 -12
- package/Cascader/index.js +15 -166
- package/Cascader/lang/en_US.d.ts +4 -0
- package/Cascader/lang/index.d.ts +9 -0
- package/Cascader/lang/zh_CN.d.ts +4 -0
- package/Checkbox/index.d.ts +7 -13
- package/Checkbox/index.js +14 -105
- package/CheckboxGroup/index.d.ts +9 -15
- package/CheckboxGroup/index.js +14 -138
- package/Collapse/collapsePanel.d.ts +30 -0
- package/Collapse/index.d.ts +14 -49
- package/Collapse/index.js +15 -171
- package/Collapse/motion.d.ts +5 -0
- package/Collapse/util.d.ts +11 -0
- package/CollapseBox/index.d.ts +5 -11
- package/CollapseBox/index.js +15 -164
- package/CollapseBox/util.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -4
- package/ColorPicker/index.js +1 -4
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -0
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -0
- package/ComboSelect/index.d.ts +6 -306
- package/ComboSelect/index.js +14 -1803
- package/ComboSelect/interface.d.ts +143 -0
- package/ComboSelect/lang/en_US.d.ts +8 -0
- package/ComboSelect/lang/index.d.ts +17 -0
- package/ComboSelect/lang/zh_CN.d.ts +8 -0
- package/ComboSelect/utils.d.ts +12 -0
- package/Container/index.d.ts +8 -13
- package/Container/index.js +15 -239
- package/DatePicker/PickerButton.d.ts +3 -0
- package/DatePicker/PickerTag.d.ts +3 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -0
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -0
- package/DatePicker/generatePicker/index.d.ts +77 -0
- package/DatePicker/index.d.ts +17 -30
- package/DatePicker/index.js +14 -733
- package/DatePicker/lang/en_US.d.ts +3 -0
- package/DatePicker/lang/index.d.ts +7 -0
- package/DatePicker/lang/zh_CN.d.ts +3 -0
- package/DatePicker/util.d.ts +20 -0
- package/Desktop/index.d.ts +6 -14
- package/Desktop/index.js +14 -853
- package/Drawer/index.d.ts +6 -92
- package/Drawer/index.js +14 -186
- package/Drawer/interface.d.ts +83 -0
- package/Drawer/lang/en_US.d.ts +5 -0
- package/Drawer/lang/index.d.ts +11 -0
- package/Drawer/lang/zh_CN.d.ts +5 -0
- package/Empty/images/index.d.ts +2 -0
- package/Empty/index.d.ts +10 -16
- package/Empty/index.js +14 -644
- package/Empty/lang/en_US.d.ts +6 -0
- package/Empty/lang/index.d.ts +13 -0
- package/Empty/lang/zh_CN.d.ts +6 -0
- package/Form/index.d.ts +9 -11
- package/Form/index.js +14 -384
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -0
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -0
- package/FormItem/compoments/formFile/index.d.ts +38 -0
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -0
- package/FormItem/compoments/formSelect/index.d.ts +18 -0
- package/FormItem/errorTips.d.ts +12 -0
- package/FormItem/index.d.ts +152 -5
- package/FormItem/index.js +14 -81
- package/FormItem/itemType.d.ts +42 -0
- package/FormItem/validateFunction.d.ts +15 -0
- package/FunctionModal/dialog.d.ts +58 -0
- package/FunctionModal/index.d.ts +3 -14
- package/FunctionModal/index.js +14 -39
- package/FunctionModal/modalContext.d.ts +14 -0
- package/GlobalContext/componentsProps.d.ts +19 -0
- package/GlobalContext/confirmLocale.d.ts +7 -0
- package/GlobalContext/index.d.ts +8 -38
- package/GlobalContext/index.js +16 -41
- package/GlobalContext/intl.d.ts +34 -0
- package/GlobalContext/useFormatMessage.d.ts +3 -0
- package/Help/index.d.ts +10 -16
- package/Help/index.js +15 -39
- package/HelperText/index.d.ts +5 -11
- package/HelperText/index.js +15 -29
- package/Hooks/useGlobalProps.d.ts +1 -0
- package/InputLang/index.d.ts +7 -13
- package/InputLang/index.js +14 -270
- package/InputNumber/index.d.ts +10 -16
- package/InputNumber/index.js +14 -308
- package/Label/index.d.ts +6 -12
- package/Label/index.js +14 -81
- package/Loading/index.d.ts +6 -12
- package/Loading/index.js +15 -47
- package/Menu/footerExpansion.d.ts +9 -0
- package/Menu/index.d.ts +5 -123
- package/Menu/index.js +14 -1232
- package/Menu/interface.d.ts +139 -0
- package/Menu/logo.d.ts +9 -0
- package/Menu/verticalMenuList.d.ts +14 -0
- package/Message/index.d.ts +19 -11
- package/Message/index.js +15 -222
- package/Modal/Confirm/index.d.ts +66 -0
- package/Modal/index.d.ts +40 -142
- package/Modal/index.js +14 -443
- package/Modal/lang/en_US.d.ts +5 -0
- package/Modal/lang/index.d.ts +11 -0
- package/Modal/lang/zh_CN.d.ts +5 -0
- package/MultiBox/index.d.ts +7 -13
- package/MultiBox/index.js +14 -231
- package/Notification/index.d.ts +16 -22
- package/Notification/index.js +15 -266
- package/OperateBtn/index.d.ts +10 -16
- package/OperateBtn/index.js +14 -260
- package/OperateBtn/lang/en_US.d.ts +4 -0
- package/OperateBtn/lang/index.d.ts +9 -0
- package/OperateBtn/lang/zh_CN.d.ts +4 -0
- package/PageHeader/horizontalMeun.d.ts +9 -0
- package/PageHeader/horizontalMeunRight.d.ts +9 -0
- package/PageHeader/index.d.ts +5 -178
- package/PageHeader/index.js +14 -1171
- package/PageHeader/interface.d.ts +167 -0
- package/Pagination/index.d.ts +6 -12
- package/Pagination/index.js +14 -469
- package/Pagination/lang/en_US.d.ts +8 -0
- package/Pagination/lang/index.d.ts +17 -0
- package/Pagination/lang/zh_CN.d.ts +8 -0
- package/ParauiProvider/index.d.ts +8 -9
- package/ParauiProvider/index.js +15 -53
- package/PopConfirm/index.d.ts +10 -23
- package/PopConfirm/index.js +14 -189
- package/PopConfirm/lang/en_US.d.ts +5 -0
- package/PopConfirm/lang/index.d.ts +11 -0
- package/PopConfirm/lang/zh_CN.d.ts +5 -0
- package/Popover/index.d.ts +11 -18
- package/Popover/index.js +15 -66
- package/Popper/index.d.ts +13 -0
- package/Popper/index.js +16 -0
- package/Progress/Line.d.ts +47 -0
- package/Progress/Steps.d.ts +17 -0
- package/Progress/index.d.ts +12 -18
- package/Progress/index.js +20 -358
- package/Progress/utils.d.ts +6 -0
- package/Querying/images/index.d.ts +2 -0
- package/Querying/index.d.ts +9 -15
- package/Querying/index.js +14 -762
- package/Querying/lang/en_US.d.ts +4 -0
- package/Querying/lang/index.d.ts +9 -0
- package/Querying/lang/zh_CN.d.ts +4 -0
- package/README.md +506 -0
- package/Radio/index.d.ts +7 -13
- package/Radio/index.js +14 -94
- package/RadioGroup/index.d.ts +9 -15
- package/RadioGroup/index.js +14 -128
- package/Search/index.d.ts +12 -18
- package/Search/index.js +14 -220
- package/Select/index.d.ts +7 -13
- package/Select/index.js +14 -1288
- package/Select/lang/en_US.d.ts +5 -0
- package/Select/lang/index.d.ts +11 -0
- package/Select/lang/zh_CN.d.ts +5 -0
- package/SelectInput/index.d.ts +5 -11
- package/SelectInput/index.js +14 -51
- package/SingleBox/index.d.ts +7 -13
- package/SingleBox/index.js +14 -194
- package/Slider/index.d.ts +7 -104
- package/Slider/index.js +15 -125
- package/Slider/interface.d.ts +102 -0
- package/Split/index.d.ts +3 -8
- package/Split/index.js +15 -134
- package/Stepper/icons.d.ts +5 -0
- package/Stepper/index.d.ts +25 -41
- package/Stepper/index.js +15 -99
- package/Switch/index.d.ts +10 -16
- package/Switch/index.js +14 -73
- package/Table/index.d.ts +4 -12
- package/Table/index.js +14 -2725
- package/{_verture/interface-a9b7c716.js → Table/interface.d.ts} +28 -20
- package/Table/lang/en_US.d.ts +6 -0
- package/Table/lang/index.d.ts +13 -0
- package/Table/lang/zh_CN.d.ts +6 -0
- package/Table/tableBody.d.ts +9 -0
- package/Table/tableBodyElement/index.d.ts +15 -0
- package/Table/tableBodyInterface.d.ts +67 -0
- package/Table/tableContainer/index.d.ts +16 -0
- package/Table/tableElement/index.d.ts +17 -0
- package/Table/tableHead.d.ts +9 -0
- package/Table/tableHeadElement/index.d.ts +15 -0
- package/Table/tableHeadInterface.d.ts +30 -0
- package/Table/tablePagination.d.ts +9 -0
- package/Table/tablePaginationInterFace.d.ts +24 -0
- package/Table/tdElement/index.d.ts +15 -0
- package/Table/thElement/index.d.ts +15 -0
- package/Table/trElement/index.d.ts +15 -0
- package/Table/util.d.ts +16 -0
- package/Tabs/index.d.ts +29 -64
- package/Tabs/index.js +14 -218
- package/Tag/TagGroup.d.ts +66 -0
- package/Tag/index.d.ts +12 -78
- package/Tag/index.js +14 -286
- package/Test/index.d.ts +2 -3
- package/Test/index.js +16 -9
- package/TextField/index.d.ts +16 -22
- package/TextField/index.js +14 -686
- package/TimePicker/index.d.ts +10 -20
- package/TimePicker/index.js +14 -77
- package/TimePicker/locale/en_US.d.ts +3 -0
- package/TimePicker/locale/zh_CN.d.ts +3 -0
- package/TimePicker/style/index.d.ts +1 -0
- package/Timeline/index.d.ts +13 -49
- package/Timeline/index.js +15 -150
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -0
- package/ToggleButton/index.d.ts +10 -61
- package/ToggleButton/index.js +14 -200
- package/Tooltip/index.d.ts +10 -12
- package/Tooltip/index.js +15 -335
- package/Transfer/index.d.ts +3 -8
- package/Transfer/index.js +14 -343
- package/Transfer/lang/en_US.d.ts +6 -0
- package/Transfer/lang/index.d.ts +13 -0
- package/Transfer/lang/zh_CN.d.ts +6 -0
- package/Tree/OperateBar/index.d.ts +13 -0
- package/Tree/Tree.d.ts +4 -0
- package/Tree/index.d.ts +5 -8
- package/Tree/index.js +14 -35
- package/{_verture/interface-128abdd3.js → Tree/interface.d.ts} +25 -15
- package/Tree/lang/en_US.d.ts +8 -0
- package/Tree/lang/index.d.ts +17 -0
- package/Tree/lang/zh_CN.d.ts +8 -0
- package/Tree/utils/closestPolyfill.d.ts +0 -0
- package/Tree/utils/tools.d.ts +26 -0
- package/Tree/utils/treeUtil.d.ts +15 -0
- package/Upload/Dragger/index.d.ts +10 -0
- package/Upload/ErroTip/index.d.ts +13 -0
- package/Upload/ImageUpload/index.d.ts +14 -0
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -0
- package/Upload/ImgCrop/constants.d.ts +7 -0
- package/Upload/ImgCrop/index.d.ts +6 -0
- package/Upload/ImgCrop/interface.d.ts +24 -0
- package/Upload/UploadList/index.d.ts +5 -0
- package/Upload/index.d.ts +8 -179
- package/Upload/index.js +14 -1542
- package/Upload/interface.d.ts +134 -0
- package/Upload/lang/en_US.d.ts +12 -0
- package/Upload/lang/index.d.ts +25 -0
- package/Upload/lang/zh_CN.d.ts +12 -0
- package/cdn/AutoBox/index.js +29 -0
- package/cdn/AutoTips/index.js +40 -0
- package/cdn/Breadcrumbs/index.js +53 -0
- package/cdn/Button/index.js +79 -0
- package/cdn/ButtonGroup/index.js +79 -0
- package/cdn/Carousel/index.js +6 -0
- package/cdn/Cascader/index.js +42 -0
- package/cdn/Checkbox/index.js +53 -0
- package/cdn/CheckboxGroup/index.js +53 -0
- package/cdn/Collapse/index.js +27 -0
- package/cdn/CollapseBox/index.js +1 -0
- package/cdn/ColorPicker/index.js +1 -0
- package/cdn/ComboSelect/index.js +438 -0
- package/cdn/Container/index.js +1 -0
- package/cdn/DatePicker/index.js +185 -0
- package/cdn/Desktop/index.js +24 -0
- package/cdn/Drawer/index.js +84 -0
- package/cdn/Empty/index.js +1 -0
- package/cdn/Form/index.js +477 -0
- package/cdn/FormItem/index.js +477 -0
- package/cdn/FunctionModal/index.js +144 -0
- package/cdn/GlobalContext/index.js +1 -0
- package/cdn/Help/index.js +53 -0
- package/cdn/HelperText/index.js +1 -0
- package/cdn/InputLang/index.js +144 -0
- package/cdn/InputNumber/index.js +118 -0
- package/cdn/Label/index.js +53 -0
- package/cdn/Loading/index.js +14 -0
- package/cdn/Menu/index.js +40 -0
- package/cdn/Message/index.js +53 -0
- package/cdn/Modal/index.js +144 -0
- package/cdn/MultiBox/index.js +131 -0
- package/cdn/Notification/index.js +66 -0
- package/cdn/OperateBtn/index.js +92 -0
- package/cdn/PageHeader/index.js +92 -0
- package/cdn/Pagination/index.js +214 -0
- package/cdn/ParauiProvider/index.js +9 -0
- package/cdn/PopConfirm/index.js +131 -0
- package/cdn/Popover/index.js +16 -0
- package/cdn/Popper/index.js +26 -0
- package/cdn/Progress/index.js +58 -0
- package/cdn/Querying/index.js +1 -0
- package/cdn/Radio/index.js +53 -0
- package/cdn/RadioGroup/index.js +53 -0
- package/cdn/Search/index.js +144 -0
- package/cdn/Select/index.js +131 -0
- package/cdn/SelectInput/index.js +131 -0
- package/cdn/SingleBox/index.js +131 -0
- package/cdn/Slider/index.js +16 -0
- package/cdn/Split/index.js +1 -0
- package/cdn/Stepper/index.js +154 -0
- package/cdn/Switch/index.js +71 -0
- package/cdn/Table/index.js +292 -0
- package/cdn/Tabs/index.js +165 -0
- package/cdn/Tag/index.js +27 -0
- package/cdn/Test/index.js +1 -0
- package/cdn/TextField/index.js +105 -0
- package/cdn/TimePicker/index.js +185 -0
- package/cdn/Timeline/index.js +16 -0
- package/cdn/ToggleButton/index.js +79 -0
- package/cdn/Tooltip/index.js +40 -0
- package/cdn/Transfer/index.js +170 -0
- package/cdn/Tree/index.js +170 -0
- package/cdn/Upload/index.js +252 -0
- package/index.d.ts +128 -88
- package/index.js +19 -160
- package/package.json +22 -59
- package/style.css +72 -0
- package/Dropdown/index.d.ts +0 -29
- package/Dropdown/index.js +0 -67
- package/_verture/defineProperty-0590dc61.js +0 -16
- package/_verture/index-0d8e1d07.js +0 -4
- package/_verture/index-14a47097.js +0 -4
- package/_verture/index-342379c6.js +0 -391
- package/_verture/index-458032d7.js +0 -10
- package/_verture/index-46bfb2f0.js +0 -778
- package/_verture/index-50401de7.js +0 -4
- package/_verture/index-5b08df83.js +0 -4
- package/_verture/index-6190b129.js +0 -4
- package/_verture/index-7ef1e3b6.js +0 -1553
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-c60911dc.js +0 -39
- package/_verture/index-e2881a53.js +0 -16
- package/_verture/index-ff4c2a27.js +0 -200
- package/_verture/interface-a77a851e.js +0 -25
- package/_verture/intl-336570e4.js +0 -65
- package/_verture/modalContext-25890584.js +0 -228
- package/_verture/modalContext-639f2787.js +0 -58
- package/_verture/slicedToArray-d7722f4b.js +0 -62
- package/_verture/style-inject.es-300983ab.js +0 -28
- package/_verture/toConsumableArray-f8047a75.js +0 -19
- package/_verture/tslib.es6-55ed4bd2.js +0 -38
- package/_verture/typeof-498dd2b1.js +0 -11
- package/_verture/useFormatMessage-ac9d6acf.js +0 -20
- package/_verture/useGlobalProps-af9a2af6.js +0 -12
package/Switch/index.js
CHANGED
|
@@ -1,73 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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 };
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("rc-switch"),require("clsx"),require("@para-ui/icons/LoadingF"),require("@material-ui/core"),require("@para-ui/icons/Help")):"function"==typeof define&&define.amd?define(["react","rc-switch","clsx","@para-ui/icons/LoadingF","@material-ui/core","@para-ui/icons/Help"],t):"object"==typeof exports?exports.ParaUI=t(require("react"),require("rc-switch"),require("clsx"),require("@para-ui/icons/LoadingF"),require("@material-ui/core"),require("@para-ui/icons/Help")):e.ParaUI=t(e.react,e["rc-switch"],e.clsx,e["@para-ui/icons/LoadingF"],e["@material-ui/core"],e["@para-ui/icons/Help"])}(self,(function(e,t,r,i,a,n){return function(){var o={7381:function(e,t,r){(t=r(3645)(!1)).push([e.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),e.exports=t},4928:function(e,t,r){(t=r(3645)(!1)).push([e.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),e.exports=t},6378:function(e,t,r){(t=r(3645)(!1)).push([e.id,'.paraui-switch{position:relative;display:inline-block;min-width:32px;height:18px;vertical-align:middle;background-color:rgba(0,0,0,0);border:0;border-radius:100px;cursor:pointer;transition:all .2s;user-select:none}.paraui-switch:before{position:absolute;top:2px;left:0;width:100%;height:14px;border-radius:100px;background-color:rgba(171,176,185,.4);content:"";transition:all .2s}.paraui-switch:focus{outline:0;box-shadow:none}.paraui-switch-checked:focus{box-shadow:none}.paraui-switch:focus:hover{box-shadow:none}.paraui-switch-checked:before{background-color:rgba(54,102,214,.2)}.paraui-switch-loading,.paraui-switch-disabled{cursor:not-allowed;opacity:.4}.paraui-switch-loading *,.paraui-switch-disabled *{box-shadow:none;cursor:not-allowed}.paraui-switch-inner{display:block;margin:0 7px 0 25px;color:#fff;font-size:14px;transition:margin .2s}.paraui-switch-checked .paraui-switch-inner{margin:0 25px 0 7px}.paraui-switch-handle{position:absolute;top:0;left:0;width:18px;height:18px;transition:all .2s ease-in-out}.paraui-switch-handle::before{position:absolute;top:0;right:0;bottom:0;left:0;background-color:#8996aa;border-radius:9px;box-shadow:none;transition:all .2s ease-in-out;content:""}.paraui-switch-checked .paraui-switch-handle{left:calc(100% - 18px)}.paraui-switch-checked .paraui-switch-handle::before{background-color:#3666d6}.paraui-switch:not(.paraui-switch-disabled):active .paraui-switch-handle::before{right:-30%;left:0}.paraui-switch:not(.paraui-switch-disabled):active.paraui-switch-checked .paraui-switch-handle::before{right:0;left:-30%}.paraui-switch-loading-icon{position:relative;top:1px;color:#3666d6;vertical-align:top;animation:loadingCircle 1s infinite linear}.paraui-switch-checked .paraui-switch-loading-icon{color:#fff}.paraui-switch-small{min-width:28px;height:14px;line-height:14px}.paraui-switch-small .paraui-switch-inner{margin:0 5px 0 18px;font-size:14px}.paraui-switch-small .paraui-switch-handle{width:12px;height:12px}.paraui-switch-small .paraui-switch-loading-icon{top:1.5px;font-size:9px}.paraui-switch-small.paraui-switch-checked .paraui-switch-inner{margin:0 18px 0 5px}.paraui-switch-small.paraui-switch-checked .paraui-switch-handle{left:calc(100% - 12px - 2px)}@keyframes loadingCircle{100%{transform:rotate(360deg)}}.paraui-switch-label{display:inline-flex}.paraui-switch-label .paraui-switch-text{color:rgba(46,55,67,.7);font-size:14px;font-weight:400}.paraui-switch-label-top{flex-direction:column-reverse;align-items:flex-start}.paraui-switch-label-top .paraui-switch-text{margin-bottom:8px}.paraui-switch-label-bottom{flex-direction:column;align-items:flex-start}.paraui-switch-label-bottom .paraui-switch-text{margin-top:8px;margin-bottom:0}.paraui-switch-label-start{flex-direction:row-reverse;align-items:center}.paraui-switch-label-start .paraui-switch-text{margin-right:8px;margin-bottom:0}.paraui-switch-label-end{flex-direction:row;align-items:center}.paraui-switch-label-end .paraui-switch-text{margin-left:8px;margin-bottom:0}',""]),e.exports=t},9929:function(e,t,r){(t=r(3645)(!1)).push([e.id,".paraui-tooltip>div{padding-left:12px;padding-right:12px;font-size:14px;font-weight:400;color:#fff;background-color:rgba(46,55,67,.7)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}",""]),e.exports=t},3645:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=function(e,t){var r=e[1]||"",i=e[3];if(!i)return r;if(t&&"function"==typeof btoa){var a=(o=i,l=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(c," */")),n=i.sources.map((function(e){return"/*# sourceURL=".concat(i.sourceRoot||"").concat(e," */")}));return[r].concat(n).concat([a]).join("\n")}var o,l,c;return[r].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,i){"string"==typeof e&&(e=[[null,e,""]]);var a={};if(i)for(var n=0;n<this.length;n++){var o=this[n][0];null!=o&&(a[o]=!0)}for(var l=0;l<e.length;l++){var c=[].concat(e[l]);i&&a[c[0]]||(r&&(c[2]?c[2]="".concat(r," and ").concat(c[2]):c[2]=r),t.push(c))}},t}},7418:function(e){"use strict";
|
|
2
|
+
/*
|
|
3
|
+
object-assign
|
|
4
|
+
(c) Sindre Sorhus
|
|
5
|
+
@license MIT
|
|
6
|
+
*/var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach((function(e){i[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(e){return!1}}()?Object.assign:function(e,n){for(var o,l,c=a(e),s=1;s<arguments.length;s++){for(var p in o=Object(arguments[s]))r.call(o,p)&&(c[p]=o[p]);if(t){l=t(o);for(var u=0;u<l.length;u++)i.call(o,l[u])&&(c[l[u]]=o[l[u]])}}return c}},5251:function(e,t,r){"use strict";
|
|
7
|
+
/** @license React v17.0.2
|
|
8
|
+
* react-jsx-runtime.production.min.js
|
|
9
|
+
*
|
|
10
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
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}()}));
|
package/Table/index.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { FunctionComponent } from 'react';
|
|
2
|
-
import { T as TableProps } from '../_verture/interface-a9b7c716.js';
|
|
3
|
-
import styleInject from './node_modules/style-inject/dist/style-inject.es.js';
|
|
4
|
-
import '../Empty/index.js';
|
|
5
|
-
import '../OperateBtn/index.js';
|
|
6
|
-
|
|
7
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-table {\n width: 100%;\n height: 100%;\n display: inline-block;\n overflow: auto;\n background-color: white;\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}\n.paraui-table.paraui-table-no-data > .paraui-table-container > table {\n height: 100%;\n}\n.paraui-table.paraui-table-load.paraui-table-no-data > .paraui-table-container > table {\n height: auto;\n}\n.paraui-table.paraui-table-radio.paraui-table-check .table-radio {\n left: 48px;\n}\n.paraui-table.paraui-table-expandable.paraui-table-check .table-expandable {\n left: 48px;\n}\n.paraui-table.paraui-table-expandable.paraui-table-check.paraui-table-radio .table-expandable {\n left: 80px;\n}\n.paraui-table > .table-contain {\n height: 100%;\n position: relative;\n}\n.paraui-table > .table-contain > table {\n height: auto;\n}\n.paraui-table > .table-contain > table .table-checkbox {\n left: 0;\n}\n.paraui-table > .table-contain > table .table-checkbox > label {\n vertical-align: middle;\n}\n.paraui-table > .table-contain > table .table-radio {\n left: 0;\n}\n.paraui-table > .table-contain > table .table-radio > label {\n vertical-align: middle;\n}\n.paraui-table > .table-contain > table .table-expandable {\n left: 0;\n}\n.paraui-table > .table-contain > table .table-expandable > svg {\n vertical-align: middle;\n}\n.paraui-table > .table-contain > table > .table-head {\n width: 100%;\n white-space: nowrap;\n}\n.paraui-table > .table-contain > table > .table-head > tr th {\n height: 50px;\n}\n.paraui-table > .table-contain > table > .table-head.table-head-scroll tr th {\n max-width: 240px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box {\n height: 49px;\n line-height: 49px;\n position: relative;\n padding: 0 8px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title {\n height: 100%;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > span {\n height: 100%;\n display: inline-block;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-header-title-label {\n width: 100%;\n color: rgba(46, 55, 67, 0.7);\n font-weight: 700;\n font-size: 14px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg {\n line-height: 0;\n width: 12px;\n margin-left: 5px;\n white-space: pre-wrap;\n vertical-align: top;\n height: inherit;\n padding-top: 15px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg > svg {\n font-size: 12px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg > .up-svg {\n position: relative;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-title > .table-sort-svg > .down-svg {\n position: relative;\n top: -5px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter {\n position: absolute;\n right: 0;\n top: 0;\n cursor: pointer;\n width: 28px;\n text-align: left;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-select > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter.table-header-filter-show > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter:hover {\n background-color: rgb(227, 234, 247);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box > .table-header-filter > svg {\n font-size: 14px;\n color: rgba(46, 55, 67, 0.7);\n margin-left: 7px;\n position: relative;\n top: 2px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort {\n cursor: pointer;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort > .table-header-title > .table-header-title-label {\n max-width: calc(100% - 18px);\n width: auto;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-filter > .table-header-title {\n margin-right: 18px;\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-asc > .table-header-title > .table-sort-svg > .up-svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .table-header-box.table-header-box-sort-desc > .table-header-title > .table-sort-svg > .down-svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head .show-colums {\n width: 56px;\n cursor: pointer;\n border-left: 1px solid rgba(171, 176, 185, 0.12);\n right: 0;\n}\n.paraui-table > .table-contain > table > .table-head .show-colums > svg {\n font-size: 24px;\n color: rgba(46, 55, 67, 0.7);\n position: relative;\n top: 5px;\n}\n.paraui-table > .table-contain > table > .table-head .show-colums:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-head.table-head-no-btn tr th:first-child .table-header-box {\n padding-left: 16px;\n}\n.paraui-table > .table-contain > table > .table-head .table-head-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-table > .table-contain > table > .table-head .table-head-btn:first-child {\n width: 48px;\n}\n.paraui-table > .table-contain > table > .table-body {\n width: 100%;\n}\n.paraui-table > .table-contain > table > .table-body.table-body-scroll tr td {\n max-width: 240px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-body tr {\n height: 56px;\n}\n.paraui-table > .table-contain > table > .table-body tr td {\n background-color: white;\n}\n.paraui-table > .table-contain > table > .table-body tr:nth-of-type(2n) td {\n background-color: rgb(249, 250, 251);\n}\n.paraui-table > .table-contain > table > .table-body tr:hover td {\n background-color: rgb(237, 241, 249);\n}\n.paraui-table > .table-contain > table > .table-body tr .table-expandable > svg {\n transition: all 0.3s;\n cursor: pointer;\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-table > .table-contain > table > .table-body tr .table-expandable > svg:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-body tr .table-expandable > .expand {\n transform: rotate(180deg);\n color: rgb(54, 102, 214);\n}\n.paraui-table > .table-contain > table > .table-body .more-table-row {\n cursor: pointer;\n}\n.paraui-table > .table-contain > table > .table-body .more-table-row .more-btn {\n color: rgb(54, 102, 214);\n font-size: 14px;\n}\n.paraui-table > .table-contain > table > .table-body.table-body-no-btn tr td:first-child {\n padding-left: 16px;\n}\n.paraui-table > .table-contain > table > .table-body.table-body-no-btn > .table-no-data > td:first-child {\n padding: 0;\n}\n.paraui-table > .table-contain > table > .table-body .table-body-btn {\n width: 32px;\n padding: 0;\n}\n.paraui-table > .table-contain > table > .table-body .table-body-btn:first-child {\n width: 48px;\n}\n.paraui-table > .table-contain > table > .table-body > .table-no-data {\n height: calc(100% - 50px);\n}\n.paraui-table > .table-contain > table > .table-body > .table-no-data:hover td {\n background-color: white;\n}\n.paraui-table > .table-contain > table > .table-body > .table-no-data > td {\n padding: 56px 0 0 0;\n}\n.paraui-table > .paraui-table-pagination {\n width: 100%;\n height: 60px;\n padding-right: 10px;\n display: flex;\n align-items: flex-end;\n justify-content: flex-end;\n}\n.paraui-table.table-pagination > .table-contain {\n height: calc(100% - 60px);\n}\n.paraui-table.table-pagination.table-load-more > .table-contain {\n height: 100%;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content {\n width: 200px;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box {\n padding-top: 8px;\n max-height: 224px;\n overflow-y: auto;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item {\n height: 36px;\n line-height: 36px;\n cursor: pointer;\n display: flex;\n padding: 0 4px;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > label {\n width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item > span {\n color: rgb(46, 55, 67);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 32px);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover > span {\n color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item:hover > label .paraui-checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-select > span {\n color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-box > .show-colums-select-item.show-colums-select-item-select > label .paraui-checkbox-box-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer {\n height: 45px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n text-align: center;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button {\n width: 100%;\n height: 100%;\n border: 0;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button > span {\n font-size: 14px;\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button > span > span {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button > span > span svg {\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-table-show-colums-popover > .paraui-popover-content .show-colums-select > .show-colums-select-footer > button:hover > span > span svg {\n color: rgb(54, 102, 214);\n}\n\n.paraui-filter-popover > .paraui-popover-content {\n width: 200px;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box {\n padding-top: 8px;\n max-height: 224px;\n overflow-y: auto;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item {\n height: 36px;\n line-height: 36px;\n cursor: pointer;\n display: flex;\n padding: 0 4px;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item > label {\n width: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item > span {\n color: rgb(46, 55, 67);\n font-size: 14px;\n display: inline-block;\n width: calc(100% - 32px);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item:hover > span {\n color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item:hover > label .rc-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item.filter-select-item-select > span {\n color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-box > .filter-select-item.filter-select-item-select > label .rc-checkbox-inner {\n border-color: rgb(54, 102, 214);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer {\n height: 45px;\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n text-align: center;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button {\n width: 50%;\n height: 100%;\n border: 0;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button > span {\n font-size: 14px;\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button > span > span {\n margin-right: 5px;\n color: rgb(46, 55, 67);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button > span > span svg {\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-filter-popover > .paraui-popover-content .filter-select > .filter-select-footer > button:hover > span > span svg {\n color: rgb(54, 102, 214);\n}";
|
|
8
|
-
styleInject(css_248z);
|
|
9
|
-
|
|
10
1
|
/**
|
|
11
2
|
* @author linhd
|
|
12
3
|
* @date 2022/5/5 3:13 PM
|
|
13
4
|
* @description 表格
|
|
14
5
|
*/
|
|
15
|
-
|
|
6
|
+
import { FunctionComponent } from 'react';
|
|
7
|
+
import { TableProps } from './interface';
|
|
8
|
+
import './index.scss';
|
|
16
9
|
declare const Table: FunctionComponent<TableProps>;
|
|
17
|
-
|
|
18
|
-
export { Table as default };
|
|
10
|
+
export default Table;
|