@para-ui/core 3.0.1 → 3.0.3
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.js +180 -68
- package/AutoBox/protal.d.ts +17 -0
- package/AutoTips/index.js +4 -3
- package/Breadcrumbs/index.js +10 -7
- package/Button/index.js +15 -14
- package/ButtonGroup/index.js +3 -2
- package/Carousel/index.js +7 -5
- package/Cascader/index.d.ts +3 -1
- package/Cascader/index.js +13 -5
- package/Checkbox/index.js +27 -8
- package/CheckboxGroup/index.d.ts +2 -5
- package/CheckboxGroup/index.js +13 -10
- package/Collapse/index.js +11 -10
- package/CollapseBox/index.js +7 -6
- package/ComboSelect/index.js +161 -67
- package/ComboSelect/interface.d.ts +10 -9
- package/Container/index.js +24 -23
- package/DatePicker/index.js +12 -17
- package/DatePicker/util.d.ts +0 -1
- package/Desktop/index.js +6 -5
- package/Drawer/index.js +10 -9
- package/Dropdown/index.js +59 -6
- package/Empty/index.js +7 -6
- package/Form/index.js +6 -5
- package/FormItem/compoments/formFile/index.d.ts +16 -16
- package/FormItem/index.d.ts +19 -19
- package/FormItem/index.js +3 -2
- package/FunctionModal/index.js +3 -2
- package/GlobalContext/constant.d.ts +8 -0
- package/Help/index.js +3 -2
- package/HelperText/index.d.ts +9 -5
- package/HelperText/index.js +9 -4
- package/InputLang/index.d.ts +2 -5
- package/InputLang/index.js +13 -7
- package/InputNumber/index.d.ts +2 -5
- package/InputNumber/index.js +15 -12
- package/Label/index.d.ts +2 -0
- package/Label/index.js +12 -8
- package/Loading/index.js +5 -4
- package/Menu/index.js +18 -17
- package/Message/index.js +5 -4
- package/Modal/index.js +28 -26
- package/MultiBox/index.d.ts +2 -5
- package/MultiBox/index.js +13 -6
- package/Notification/index.js +3 -2
- package/OperateBtn/index.js +15 -12
- package/PageHeader/index.js +18 -18
- package/Pagination/index.js +10 -4
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.js +3 -2
- package/Popover/index.js +7 -4
- package/Progress/index.d.ts +2 -0
- package/Progress/index.js +13 -9
- package/Querying/index.js +6 -5
- package/README.md +30 -0
- package/Radio/index.js +22 -8
- package/RadioGroup/index.d.ts +2 -5
- package/RadioGroup/index.js +10 -7
- package/Search/index.js +13 -8
- package/Select/index.d.ts +2 -5
- package/Select/index.js +23 -20
- package/SelectInput/index.js +3 -2
- package/Selector/index.js +189 -81
- package/Selector/interface.d.ts +17 -7
- package/Selector/lang/en_US.d.ts +1 -0
- package/Selector/lang/zh_CN.d.ts +1 -0
- package/SelectorPicker/index.d.ts +2 -5
- package/SelectorPicker/index.js +20 -17
- package/SingleBox/index.d.ts +2 -5
- package/SingleBox/index.js +11 -6
- package/Slider/index.d.ts +4 -4
- package/Slider/index.js +9 -4
- package/Split/index.js +8 -7
- package/Stepper/index.js +7 -3
- package/Switch/index.js +10 -12
- package/Table/index.js +528 -300
- package/Table/interface.d.ts +45 -1
- package/Table/tableElement/index.d.ts +2 -2
- package/Table/util.d.ts +13 -1
- package/Tabs/index.js +7 -6
- package/Tag/index.js +12 -14
- package/TextField/index.d.ts +2 -5
- package/TextField/index.js +20 -18
- package/TimePicker/index.js +1 -0
- package/Timeline/index.js +13 -12
- package/Title/index.d.ts +30 -0
- package/Title/index.js +49 -0
- package/ToggleButton/index.js +13 -13
- package/Tooltip/index.js +59 -12
- package/Tooltip/interface.d.ts +2 -0
- package/Transfer/index.d.ts +6 -2
- package/Transfer/index.js +74 -37
- package/Transfer/lang/en_US.d.ts +2 -0
- package/Transfer/lang/zh_CN.d.ts +2 -0
- package/Tree/index.js +3 -2
- package/Tree/utils/tools.d.ts +0 -1
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/ImgCrop/constants.d.ts +1 -1
- package/Upload/ImgCrop/interface.d.ts +5 -0
- package/Upload/index.js +56 -45
- package/_verture/constant-bf34e6fa.js +11 -0
- package/_verture/{index-abfdd262.js → index-3136f653.js} +63 -31
- package/_verture/{index-5bb4b5d7.js → index-77832168.js} +30 -17
- package/_verture/{modalContext-59669f93.js → modalContext-f1a611ab.js} +0 -0
- package/index.d.ts +2 -0
- package/index.js +7 -5
- package/package.json +2 -1
package/Switch/index.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-0590dc61.js';
|
|
1
2
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
3
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
4
|
import RcSwitch from 'rc-switch';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
6
7
|
import Label from '../Label/index.js';
|
|
8
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
7
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
10
|
import '../Help/index.js';
|
|
9
11
|
import '../Tooltip/index.js';
|
|
@@ -13,7 +15,7 @@ import 'rc-tooltip';
|
|
|
13
15
|
import 'rc-tooltip/lib/placements';
|
|
14
16
|
import '@para-ui/icons/Help';
|
|
15
17
|
|
|
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 .
|
|
18
|
+
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/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-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-v3-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-v3-switch:focus {\n outline: 0;\n box-shadow: none;\n}\n.paraui-v3-switch.component-switch-checked:focus {\n box-shadow: none;\n}\n.paraui-v3-switch:focus:hover {\n box-shadow: none;\n}\n.paraui-v3-switch.component-switch-checked:before {\n background-color: rgba(54, 102, 214, 0.2);\n}\n.paraui-v3-switch-loading, .paraui-v3-switch.component-switch-disabled {\n cursor: not-allowed;\n opacity: 0.4;\n}\n.paraui-v3-switch-loading *, .paraui-v3-switch.component-switch-disabled * {\n box-shadow: none;\n cursor: not-allowed;\n}\n.paraui-v3-switch .component-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-v3-switch.component-switch-checked .component-switch-inner {\n margin: 0 25px 0 7px;\n}\n.paraui-v3-switch .component-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-v3-switch .component-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-v3-switch.component-switch-checked .component-switch-handle {\n left: calc(100% - 18px);\n}\n.paraui-v3-switch.component-switch-checked .component-switch-handle::before {\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-switch:not(.paraui-v3-switch-disabled):active .component-switch-handle::before {\n right: -30%;\n left: 0;\n}\n.paraui-v3-switch:not(.paraui-v3-switch-disabled):active.component-switch-checked .component-switch-handle::before {\n right: 0;\n left: -30%;\n}\n.paraui-v3-switch .component-switch-loading-icon {\n position: relative;\n top: 1px;\n color: rgb(54, 102, 214);\n vertical-align: top;\n animation: switchLoadingCircle 1s infinite linear;\n}\n.paraui-v3-switch.component-switch-checked .component-switch-loading-icon {\n color: rgb(255, 255, 255);\n}\n.paraui-v3-switch-small {\n min-width: 28px;\n height: 14px;\n line-height: 14px;\n}\n.paraui-v3-switch-small .component-switch-inner {\n margin: 0 5px 0 18px;\n font-size: 14px;\n}\n.paraui-v3-switch-small .component-switch-handle {\n width: 12px;\n height: 12px;\n top: 3px;\n left: 2px;\n}\n.paraui-v3-switch-small .component-switch-loading-icon {\n top: 1.5px;\n font-size: 9px;\n}\n.paraui-v3-switch-small.component-switch-checked .component-switch-inner {\n margin: 0 18px 0 5px;\n}\n.paraui-v3-switch-small.component-switch-checked .component-switch-handle {\n left: calc(100% - 12px - 2px);\n}\n@keyframes switchLoadingCircle {\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.paraui-v3-switch-label {\n display: inline-flex;\n}\n.paraui-v3-switch-label .component-switch-text {\n color: rgba(46, 55, 67, 0.7);\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v3-switch-label-top {\n flex-direction: column-reverse;\n align-items: flex-start;\n}\n.paraui-v3-switch-label-top .component-switch-text {\n margin-bottom: 8px;\n}\n.paraui-v3-switch-label-bottom {\n flex-direction: column;\n align-items: flex-start;\n}\n.paraui-v3-switch-label-bottom .component-switch-text {\n margin-top: 8px;\n margin-bottom: 0;\n}\n.paraui-v3-switch-label-start {\n flex-direction: row-reverse;\n align-items: center;\n}\n.paraui-v3-switch-label-start .component-switch-text {\n margin-right: 8px;\n margin-bottom: 0;\n}\n.paraui-v3-switch-label-end {\n flex-direction: row;\n align-items: center;\n}\n.paraui-v3-switch-label-end .component-switch-text {\n margin-left: 8px;\n margin-bottom: 0;\n}";
|
|
17
19
|
styleInject(css_248z);
|
|
18
20
|
|
|
19
21
|
var Switch = function Switch(props) {
|
|
@@ -29,19 +31,15 @@ var Switch = function Switch(props) {
|
|
|
29
31
|
restProps = __rest(props, ["compact", "size", "loading", "disabled", "className", "label", "labelTooltip", "labelPlacement"]); //cls
|
|
30
32
|
|
|
31
33
|
|
|
32
|
-
var classes = clsx(
|
|
33
|
-
// 'paraui-switch-small': size === 'small',
|
|
34
|
-
'paraui-switch-loading': loading // 'paraui-switch-compact': compact
|
|
34
|
+
var classes = clsx("".concat($prefixCls, "-switch"), _defineProperty({}, "".concat($prefixCls, "-switch-loading"), loading), className); //label cls
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
var labelClasses = clsx('paraui-switch-label', "paraui-switch-label-".concat(labelPlacement)); //loading circle
|
|
36
|
+
var labelClasses = clsx("".concat($prefixCls, "-switch-label"), "".concat($prefixCls, "-switch-label-").concat(labelPlacement)); //loading circle
|
|
39
37
|
|
|
40
38
|
var loadingIcon = jsx("div", Object.assign({
|
|
41
|
-
className:
|
|
39
|
+
className: "".concat($rcPrefixCls, "-switch-handle")
|
|
42
40
|
}, {
|
|
43
41
|
children: loading && jsx(LoadingOutlined, {
|
|
44
|
-
className:
|
|
42
|
+
className: "".concat($rcPrefixCls, "-switch-loading-icon")
|
|
45
43
|
})
|
|
46
44
|
}));
|
|
47
45
|
|
|
@@ -50,20 +48,20 @@ var Switch = function Switch(props) {
|
|
|
50
48
|
className: labelClasses
|
|
51
49
|
}, {
|
|
52
50
|
children: [jsx(RcSwitch, Object.assign({}, restProps, {
|
|
53
|
-
prefixCls:
|
|
51
|
+
prefixCls: "".concat($rcPrefixCls, "-switch"),
|
|
54
52
|
className: classes,
|
|
55
53
|
disabled: disabled || loading,
|
|
56
54
|
loadingIcon: loadingIcon
|
|
57
55
|
})), jsx(Label, Object.assign({
|
|
58
56
|
label: label
|
|
59
57
|
}, labelTooltip, {
|
|
60
|
-
className:
|
|
58
|
+
className: "".concat($rcPrefixCls, "-switch-text")
|
|
61
59
|
}))]
|
|
62
60
|
}));
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
return jsx(RcSwitch, Object.assign({}, restProps, {
|
|
66
|
-
prefixCls:
|
|
64
|
+
prefixCls: "".concat($rcPrefixCls, "-switch"),
|
|
67
65
|
className: classes,
|
|
68
66
|
disabled: disabled || loading,
|
|
69
67
|
loadingIcon: loadingIcon
|