@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/Carousel/index.js
CHANGED
|
@@ -4,9 +4,10 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import React__default from 'react';
|
|
5
5
|
import SlickCarousel from 'react-slick';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
7
8
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
8
9
|
|
|
9
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/2/28 上午11:01\n* @description Carousel\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-carousel {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n.paraui-carousel .slick-slider {\n position: relative;\n display: block;\n box-sizing: border-box;\n touch-action: pan-y;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: transparent;\n}\n.paraui-carousel .slick-list {\n position: relative;\n display: block;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n.paraui-carousel .slick-list:focus {\n outline: none;\n}\n.paraui-carousel .slick-list.dragging {\n cursor: pointer;\n}\n.paraui-carousel .slick-list .slick-slide {\n pointer-events: none;\n}\n.paraui-carousel .slick-list .slick-slide input.ant-radio-input,\n.paraui-carousel .slick-list .slick-slide input.ant-checkbox-input {\n visibility: hidden;\n}\n.paraui-carousel .slick-list .slick-slide.slick-active {\n pointer-events: auto;\n}\n.paraui-carousel .slick-list .slick-slide.slick-active input.ant-radio-input,\n.paraui-carousel .slick-list .slick-slide.slick-active input.ant-checkbox-input {\n visibility: visible;\n}\n.paraui-carousel .slick-list .slick-slide > div > div {\n vertical-align: bottom;\n}\n.paraui-carousel .slick-slider .slick-track,\n.paraui-carousel .slick-slider .slick-list {\n transform: translate3d(0, 0, 0);\n touch-action: pan-y;\n}\n.paraui-carousel .slick-track {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n}\n.paraui-carousel .slick-track::before,\n.paraui-carousel .slick-track::after {\n display: table;\n content: \"\";\n}\n.paraui-carousel .slick-track::after {\n clear: both;\n}\n.paraui-carousel .slick-slide {\n display: none;\n float: left;\n height: 100%;\n min-height: 1px;\n}\n.paraui-carousel .slick-slide img {\n display: block;\n}\n.paraui-carousel .slick-slide.slick-loading img {\n display: none;\n}\n.paraui-carousel .slick-slide.dragging img {\n pointer-events: none;\n}\n.paraui-carousel .slick-initialized .slick-slide {\n display: block;\n}\n.paraui-carousel .slick-loading .slick-slide {\n visibility: hidden;\n}\n.paraui-carousel .slick-vertical .slick-slide {\n display: block;\n height: auto;\n}\n.paraui-carousel .slick-arrow.slick-hidden {\n display: none;\n}\n.paraui-carousel .slick-prev,\n.paraui-carousel .slick-next {\n position: absolute;\n top: 50%;\n display: block;\n width: 20px;\n height: 20px;\n margin-top: -10px;\n padding: 0;\n color: transparent;\n font-size: 0;\n line-height: 0;\n background: transparent;\n border: 0;\n outline: none;\n cursor: pointer;\n}\n.paraui-carousel .slick-prev:hover,\n.paraui-carousel .slick-next:hover,\n.paraui-carousel .slick-prev:focus,\n.paraui-carousel .slick-next:focus {\n color: transparent;\n background: transparent;\n outline: none;\n}\n.paraui-carousel .slick-prev:hover::before,\n.paraui-carousel .slick-next:hover::before,\n.paraui-carousel .slick-prev:focus::before,\n.paraui-carousel .slick-next:focus::before {\n opacity: 1;\n}\n.paraui-carousel .slick-prev.slick-disabled::before,\n.paraui-carousel .slick-next.slick-disabled::before {\n opacity: 0.25;\n}\n.paraui-carousel .slick-prev {\n left: -25px;\n}\n.paraui-carousel .slick-prev::before {\n content: \"←\";\n}\n.paraui-carousel .slick-next {\n right: -25px;\n}\n.paraui-carousel .slick-next::before {\n content: \"→\";\n}\n.paraui-carousel .slick-dots {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 15;\n display: flex !important;\n justify-content: center;\n margin-right: 15%;\n margin-left: 15%;\n padding-left: 0;\n list-style: none;\n}\n.paraui-carousel .slick-dots-bottom {\n bottom: 12px;\n}\n.paraui-carousel .slick-dots-top {\n top: 12px;\n bottom: auto;\n}\n.paraui-carousel .slick-dots li {\n position: relative;\n display: inline-block;\n flex: 0 1 auto;\n box-sizing: content-box;\n width: 16px;\n height: 3px;\n margin: 0 2px;\n margin-right: 3px;\n margin-left: 3px;\n padding: 0;\n text-align: center;\n text-indent: -999px;\n vertical-align: top;\n transition: all 0.5s;\n}\n.paraui-carousel .slick-dots li button {\n display: block;\n width: 100%;\n height: 3px;\n padding: 0;\n color: transparent;\n font-size: 0;\n background: rgb(255, 255, 255);\n border: 0;\n border-radius: 1px;\n outline: none;\n cursor: pointer;\n opacity: 0.3;\n transition: all 0.5s;\n}\n.paraui-carousel .slick-dots li button:hover,\n.paraui-carousel .slick-dots li button:focus {\n opacity: 0.75;\n}\n.paraui-carousel .slick-dots li.slick-active {\n width: 24px;\n}\n.paraui-carousel .slick-dots li.slick-active button {\n background: rgb(255, 255, 255);\n opacity: 1;\n}\n.paraui-carousel .slick-dots li.slick-active:hover,\n.paraui-carousel .slick-dots li.slick-active:focus {\n opacity: 1;\n}\n.paraui-carousel .slick-loading .paraui-carousel .slick-track {\n visibility: hidden;\n}\n.paraui-carousel-vertical .slick-dots {\n top: 50%;\n bottom: auto;\n flex-direction: column;\n width: 3px;\n height: auto;\n margin: 0;\n transform: translateY(-50%);\n}\n.paraui-carousel-vertical .slick-dots-left {\n right: auto;\n left: 12px;\n}\n.paraui-carousel-vertical .slick-dots-right {\n right: 12px;\n left: auto;\n}\n.paraui-carousel-vertical .slick-dots li {\n width: 3px;\n height: 16px;\n margin: 4px 2px;\n vertical-align: baseline;\n}\n.paraui-carousel-vertical .slick-dots li button {\n width: 3px;\n height: 16px;\n}\n.paraui-carousel-vertical .slick-dots li.slick-active {\n width: 3px;\n height: 24px;\n}\n.paraui-carousel-vertical .slick-dots li.slick-active button {\n width: 3px;\n height: 24px;\n}\n.paraui-carousel-rtl {\n direction: rtl;\n}\n.paraui-carousel-rtl .paraui-carousel .slick-track {\n right: 0;\n left: auto;\n}\n.paraui-carousel-rtl .paraui-carousel .slick-prev {\n right: -25px;\n left: auto;\n}\n.paraui-carousel-rtl .paraui-carousel .slick-prev::before {\n content: \"→\";\n}\n.paraui-carousel-rtl .paraui-carousel .slick-next {\n right: auto;\n left: -25px;\n}\n.paraui-carousel-rtl .paraui-carousel .slick-next::before {\n content: \"←\";\n}\n.paraui-carousel-rtl.paraui-carousel .slick-dots {\n flex-direction: row-reverse;\n}\n.paraui-carousel-rtl.paraui-carousel-vertical .slick-dots {\n flex-direction: column;\n}";
|
|
10
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/2/28 上午11:01\n* @description Carousel\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-carousel {\n color: rgb(46, 55, 67);\n font-size: 14px;\n line-height: 1.5715;\n list-style: none;\n}\n.paraui-v3-carousel .slick-slider {\n position: relative;\n display: block;\n box-sizing: border-box;\n touch-action: pan-y;\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: transparent;\n}\n.paraui-v3-carousel .slick-list {\n position: relative;\n display: block;\n margin: 0;\n padding: 0;\n overflow: hidden;\n}\n.paraui-v3-carousel .slick-list:focus {\n outline: none;\n}\n.paraui-v3-carousel .slick-list.dragging {\n cursor: pointer;\n}\n.paraui-v3-carousel .slick-list .slick-slide {\n pointer-events: none;\n}\n.paraui-v3-carousel .slick-list .slick-slide input.ant-radio-input,\n.paraui-v3-carousel .slick-list .slick-slide input.ant-checkbox-input {\n visibility: hidden;\n}\n.paraui-v3-carousel .slick-list .slick-slide.slick-active {\n pointer-events: auto;\n}\n.paraui-v3-carousel .slick-list .slick-slide.slick-active input.ant-radio-input,\n.paraui-v3-carousel .slick-list .slick-slide.slick-active input.ant-checkbox-input {\n visibility: visible;\n}\n.paraui-v3-carousel .slick-list .slick-slide > div > div {\n vertical-align: bottom;\n}\n.paraui-v3-carousel .slick-slider .slick-track,\n.paraui-v3-carousel .slick-slider .slick-list {\n transform: translate3d(0, 0, 0);\n touch-action: pan-y;\n}\n.paraui-v3-carousel .slick-track {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n}\n.paraui-v3-carousel .slick-track::before,\n.paraui-v3-carousel .slick-track::after {\n display: table;\n content: \"\";\n}\n.paraui-v3-carousel .slick-track::after {\n clear: both;\n}\n.paraui-v3-carousel .slick-slide {\n display: none;\n float: left;\n height: 100%;\n min-height: 1px;\n}\n.paraui-v3-carousel .slick-slide img {\n display: block;\n}\n.paraui-v3-carousel .slick-slide.slick-loading img {\n display: none;\n}\n.paraui-v3-carousel .slick-slide.dragging img {\n pointer-events: none;\n}\n.paraui-v3-carousel .slick-initialized .slick-slide {\n display: block;\n}\n.paraui-v3-carousel .slick-loading .slick-slide {\n visibility: hidden;\n}\n.paraui-v3-carousel .slick-vertical .slick-slide {\n display: block;\n height: auto;\n}\n.paraui-v3-carousel .slick-arrow.slick-hidden {\n display: none;\n}\n.paraui-v3-carousel .slick-prev,\n.paraui-v3-carousel .slick-next {\n position: absolute;\n top: 50%;\n display: block;\n width: 20px;\n height: 20px;\n margin-top: -10px;\n padding: 0;\n color: transparent;\n font-size: 0;\n line-height: 0;\n background: transparent;\n border: 0;\n outline: none;\n cursor: pointer;\n}\n.paraui-v3-carousel .slick-prev:hover,\n.paraui-v3-carousel .slick-next:hover,\n.paraui-v3-carousel .slick-prev:focus,\n.paraui-v3-carousel .slick-next:focus {\n color: transparent;\n background: transparent;\n outline: none;\n}\n.paraui-v3-carousel .slick-prev:hover::before,\n.paraui-v3-carousel .slick-next:hover::before,\n.paraui-v3-carousel .slick-prev:focus::before,\n.paraui-v3-carousel .slick-next:focus::before {\n opacity: 1;\n}\n.paraui-v3-carousel .slick-prev.slick-disabled::before,\n.paraui-v3-carousel .slick-next.slick-disabled::before {\n opacity: 0.25;\n}\n.paraui-v3-carousel .slick-prev {\n left: -25px;\n}\n.paraui-v3-carousel .slick-prev::before {\n content: \"←\";\n}\n.paraui-v3-carousel .slick-next {\n right: -25px;\n}\n.paraui-v3-carousel .slick-next::before {\n content: \"→\";\n}\n.paraui-v3-carousel .slick-dots {\n position: absolute;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 15;\n display: flex !important;\n justify-content: center;\n margin-right: 15%;\n margin-left: 15%;\n padding-left: 0;\n list-style: none;\n}\n.paraui-v3-carousel .slick-dots-bottom {\n bottom: 12px;\n}\n.paraui-v3-carousel .slick-dots-top {\n top: 12px;\n bottom: auto;\n}\n.paraui-v3-carousel .slick-dots li {\n position: relative;\n display: inline-block;\n flex: 0 1 auto;\n box-sizing: content-box;\n width: 16px;\n height: 3px;\n margin: 0 2px;\n margin-right: 3px;\n margin-left: 3px;\n padding: 0;\n text-align: center;\n text-indent: -999px;\n vertical-align: top;\n transition: all 0.5s;\n}\n.paraui-v3-carousel .slick-dots li button {\n display: block;\n width: 100%;\n height: 3px;\n padding: 0;\n color: transparent;\n font-size: 0;\n background: rgb(255, 255, 255);\n border: 0;\n border-radius: 1px;\n outline: none;\n cursor: pointer;\n opacity: 0.3;\n transition: all 0.5s;\n}\n.paraui-v3-carousel .slick-dots li button:hover,\n.paraui-v3-carousel .slick-dots li button:focus {\n opacity: 0.75;\n}\n.paraui-v3-carousel .slick-dots li.slick-active {\n width: 24px;\n}\n.paraui-v3-carousel .slick-dots li.slick-active button {\n background: rgb(255, 255, 255);\n opacity: 1;\n}\n.paraui-v3-carousel .slick-dots li.slick-active:hover,\n.paraui-v3-carousel .slick-dots li.slick-active:focus {\n opacity: 1;\n}\n.paraui-v3-carousel .slick-loading .paraui-v3-carousel .slick-track {\n visibility: hidden;\n}\n.paraui-v3-carousel-vertical .slick-dots {\n top: 50%;\n bottom: auto;\n flex-direction: column;\n width: 3px;\n height: auto;\n margin: 0;\n transform: translateY(-50%);\n}\n.paraui-v3-carousel-vertical .slick-dots-left {\n right: auto;\n left: 12px;\n}\n.paraui-v3-carousel-vertical .slick-dots-right {\n right: 12px;\n left: auto;\n}\n.paraui-v3-carousel-vertical .slick-dots li {\n width: 3px;\n height: 16px;\n margin: 4px 2px;\n vertical-align: baseline;\n}\n.paraui-v3-carousel-vertical .slick-dots li button {\n width: 3px;\n height: 16px;\n}\n.paraui-v3-carousel-vertical .slick-dots li.slick-active {\n width: 3px;\n height: 24px;\n}\n.paraui-v3-carousel-vertical .slick-dots li.slick-active button {\n width: 3px;\n height: 24px;\n}\n.paraui-v3-carousel-rtl {\n direction: rtl;\n}\n.paraui-v3-carousel-rtl .paraui-v3-carousel .slick-track {\n right: 0;\n left: auto;\n}\n.paraui-v3-carousel-rtl .paraui-v3-carousel .slick-prev {\n right: -25px;\n left: auto;\n}\n.paraui-v3-carousel-rtl .paraui-v3-carousel .slick-prev::before {\n content: \"→\";\n}\n.paraui-v3-carousel-rtl .paraui-v3-carousel .slick-next {\n right: auto;\n left: -25px;\n}\n.paraui-v3-carousel-rtl .paraui-v3-carousel .slick-next::before {\n content: \"←\";\n}\n.paraui-v3-carousel-rtl.paraui-v3-carousel .slick-dots {\n flex-direction: row-reverse;\n}\n.paraui-v3-carousel-rtl.paraui-v3-carousel-vertical .slick-dots {\n flex-direction: column;\n}";
|
|
10
11
|
styleInject(css_248z);
|
|
11
12
|
|
|
12
13
|
var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
@@ -18,7 +19,8 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
18
19
|
draggable = _props$draggable === void 0 ? false : _props$draggable,
|
|
19
20
|
_props$dotPosition = props.dotPosition,
|
|
20
21
|
dotPosition = _props$dotPosition === void 0 ? 'bottom' : _props$dotPosition,
|
|
21
|
-
|
|
22
|
+
className = props.className,
|
|
23
|
+
restProps = __rest(props, ["dots", "arrows", "draggable", "dotPosition", "className"]);
|
|
22
24
|
|
|
23
25
|
var slickRef = React__default.useRef(); //切换到指定面板
|
|
24
26
|
|
|
@@ -51,7 +53,7 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
51
53
|
newProps.fade = true;
|
|
52
54
|
}
|
|
53
55
|
|
|
54
|
-
var prefixCls =
|
|
56
|
+
var prefixCls = "".concat($prefixCls, "-carousel");
|
|
55
57
|
var dotsClass = 'slick-dots';
|
|
56
58
|
newProps.vertical = dotPosition === 'left' || dotPosition === 'right'; //启用dots
|
|
57
59
|
|
|
@@ -59,9 +61,9 @@ var Carousel = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
59
61
|
|
|
60
62
|
var dsClass = clsx(dotsClass, "".concat(dotsClass, "-").concat(dotPosition), typeof dots === 'boolean' ? false : dots === null || dots === void 0 ? void 0 : dots.className); //组件cls
|
|
61
63
|
|
|
62
|
-
var
|
|
64
|
+
var cls = clsx(prefixCls, className, _defineProperty({}, "".concat(prefixCls, "-vertical"), newProps.vertical));
|
|
63
65
|
return jsx("div", Object.assign({
|
|
64
|
-
className:
|
|
66
|
+
className: cls
|
|
65
67
|
}, {
|
|
66
68
|
children: jsx(SlickCarousel, Object.assign({
|
|
67
69
|
ref: slickRef
|
package/Cascader/index.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ interface Option {
|
|
|
31
31
|
* @param disabled{ Boolean }: 是否禁用
|
|
32
32
|
* @param placeholder{ String }: 占位符
|
|
33
33
|
* @param loadData{ Function }: 加载数据的方法
|
|
34
|
+
* @param children{ React.ReactNode }: 子节点
|
|
34
35
|
*/
|
|
35
36
|
interface Props {
|
|
36
37
|
data: Option[];
|
|
@@ -47,6 +48,7 @@ interface Props {
|
|
|
47
48
|
size?: 'small' | 'medium' | 'large';
|
|
48
49
|
loadData?: (selectedOptions: Option[], setState?: React.Dispatch<React.SetStateAction<Option[]>>) => void;
|
|
49
50
|
loadingIcon?: React.ReactNode;
|
|
51
|
+
children?: React.ReactNode;
|
|
50
52
|
}
|
|
51
|
-
export declare const Cascader: ({ data, expandTrigger, value, onChange, onDropdownVisibleChange, changeOnSelect, expandIcon, expandJoin, fieldNames, disabled, placeholder, loadData, loadingIcon, }: Props) => JSX.Element;
|
|
53
|
+
export declare const Cascader: ({ data, expandTrigger, value, onChange, onDropdownVisibleChange, changeOnSelect, expandIcon, expandJoin, fieldNames, disabled, placeholder, loadData, loadingIcon, children, }: Props) => JSX.Element;
|
|
52
54
|
export default Cascader;
|
package/Cascader/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import RcCascader from 'rc-cascader';
|
|
|
8
8
|
import Right from '@para-ui/icons/Right';
|
|
9
9
|
import LoadingIcon from '@para-ui/icons/Loading';
|
|
10
10
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-ac9d6acf.js';
|
|
11
|
+
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
11
12
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
12
13
|
import '@para-ui/core/GlobalContext';
|
|
13
14
|
|
|
@@ -24,7 +25,7 @@ var localeJson = {
|
|
|
24
25
|
en: en
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.cascader input {\n color: #333;\n width: 560px;\n padding: 6px 12px;\n overflow: hidden;\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n}\n
|
|
28
|
+
var css_248z = "@charset \"UTF-8\";\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-cascader input {\n color: #333;\n width: 560px;\n padding: 6px 12px;\n overflow: hidden;\n box-sizing: border-box;\n white-space: nowrap;\n text-overflow: ellipsis;\n border-radius: 4px;\n border: 1px solid #d9d9d9;\n}\n.paraui-v3-cascader button {\n background: transparent;\n border: none;\n}\n\n.paraui-v3-cascader.component-cascader-dropdown-hidden {\n display: none;\n}\n.paraui-v3-cascader .component-cascader-menus {\n font-size: 12px;\n overflow: hidden;\n background: #fff;\n position: absolute;\n border: 1px solid #d9d9d9;\n border-radius: 4px;\n box-shadow: 0 0 4px rgba(0, 0, 0, 0.17);\n white-space: nowrap;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-enter, .paraui-v3-cascader .component-cascader-menus.slide-up-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n animation-play-state: paused;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n opacity: 1;\n animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);\n animation-play-state: paused;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-enter.slide-up-enter-active, .paraui-v3-cascader .component-cascader-menus-placement-bottomLeft, .paraui-v3-cascader .component-cascader-menus.slide-up-appear.slide-up-appear-active, .paraui-v3-cascader .component-cascader-menus-placement-bottomLeft {\n animation-name: SlideUpIn;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-enter.slide-up-enter-active, .paraui-v3-cascader .component-cascader-menus-placement-topLeft, .paraui-v3-cascader .component-cascader-menus.slide-up-appear.slide-up-appear-active, .paraui-v3-cascader .component-cascader-menus-placement-topLeft {\n animation-name: SlideDownIn;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-leave.slide-up-leave-active, .paraui-v3-cascader .component-cascader-menus-placement-bottomLeft {\n animation-name: SlideUpOut;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menus.slide-up-leave.slide-up-leave-active, .paraui-v3-cascader .component-cascader-menus-placement-topLeft {\n animation-name: SlideDownOut;\n animation-play-state: running;\n}\n.paraui-v3-cascader .component-cascader-menu {\n display: inline-block;\n min-width: 100px;\n height: 192px;\n list-style: none;\n margin: 0;\n padding: 0;\n border-right: 1px solid #e9e9e9;\n overflow: auto;\n}\n.paraui-v3-cascader .component-cascader-menu:last-child {\n border-right: 0;\n}\n.paraui-v3-cascader .component-cascader-menu-item {\n height: 32px;\n line-height: 32px;\n padding: 0 16px;\n cursor: pointer;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition: all 0.3s ease;\n position: relative;\n}\n.paraui-v3-cascader .component-cascader-menu-item:hover {\n background: rgba(171, 176, 185, 0.231372549);\n}\n.paraui-v3-cascader .component-cascader-menu-item-disabled {\n cursor: not-allowed;\n color: #ccc;\n}\n.paraui-v3-cascader .component-cascader-menu-item-disabled:hover {\n background: transparent;\n}\n.paraui-v3-cascader .component-cascader-menu-item-active {\n color: #3666d6;\n}\n.paraui-v3-cascader .component-cascader-menu-item-loading-icon {\n display: flex;\n align-items: center;\n margin-left: 10px;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand-icon {\n font-size: 12px;\n margin-left: 10px;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand-icon SVG {\n display: flex;\n align-items: center;\n}\n.paraui-v3-cascader .component-cascader-menu-item-expand-icon SVG path {\n fill: #999;\n}\n\n@keyframes SlideUpIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0.8);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n}\n@keyframes SlideUpOut {\n 0% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n 100% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0.8);\n }\n}\n@keyframes SlideDownIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0.8);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n}\n@keyframes SlideDownOut {\n 0% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n 100% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0.8);\n }\n}";
|
|
28
29
|
styleInject(css_248z);
|
|
29
30
|
|
|
30
31
|
var Cascader = function Cascader(_ref) {
|
|
@@ -65,7 +66,8 @@ var Cascader = function Cascader(_ref) {
|
|
|
65
66
|
}));
|
|
66
67
|
} : _ref$loadData,
|
|
67
68
|
_ref$loadingIcon = _ref.loadingIcon,
|
|
68
|
-
loadingIcon = _ref$loadingIcon === void 0 ? jsx(LoadingIcon, {}) : _ref$loadingIcon
|
|
69
|
+
loadingIcon = _ref$loadingIcon === void 0 ? jsx(LoadingIcon, {}) : _ref$loadingIcon,
|
|
70
|
+
children = _ref.children;
|
|
69
71
|
var intl = useFormatMessage('Cascader', localeJson);
|
|
70
72
|
|
|
71
73
|
var _useState = useState(data),
|
|
@@ -113,7 +115,7 @@ var Cascader = function Cascader(_ref) {
|
|
|
113
115
|
};
|
|
114
116
|
|
|
115
117
|
return jsx("div", Object.assign({
|
|
116
|
-
className:
|
|
118
|
+
className: $prefixCls + '-cascader'
|
|
117
119
|
}, {
|
|
118
120
|
children: jsx(RcCascader, Object.assign({
|
|
119
121
|
options: option,
|
|
@@ -125,9 +127,15 @@ var Cascader = function Cascader(_ref) {
|
|
|
125
127
|
loadData: loadingData,
|
|
126
128
|
loadingIcon: loadingIcon,
|
|
127
129
|
onDropdownVisibleChange: onDropdownVisibleChange,
|
|
128
|
-
value: inputValue
|
|
130
|
+
value: inputValue,
|
|
131
|
+
prefixCls: $rcPrefixCls + '-cascader',
|
|
132
|
+
dropdownClassName: $prefixCls + '-cascader'
|
|
129
133
|
}, {
|
|
130
|
-
children: jsx("
|
|
134
|
+
children: children ? jsx("button", Object.assign({
|
|
135
|
+
disabled: disabled
|
|
136
|
+
}, {
|
|
137
|
+
children: children
|
|
138
|
+
})) : jsx("input", {
|
|
131
139
|
value: inputLabel,
|
|
132
140
|
readOnly: true,
|
|
133
141
|
disabled: disabled,
|
package/Checkbox/index.js
CHANGED
|
@@ -2,6 +2,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import Label from '../Label/index.js';
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
5
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
7
|
import '../Help/index.js';
|
|
7
8
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -11,7 +12,7 @@ import 'rc-tooltip/lib/placements';
|
|
|
11
12
|
import 'clsx';
|
|
12
13
|
import '@para-ui/icons/Help';
|
|
13
14
|
|
|
14
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-
|
|
15
|
+
var css_248z = "@charset \"UTF-8\";\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-checkbox {\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 cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n line-height: 16px;\n}\n.paraui-v3-checkbox:hover > .checkbox-label {\n color: rgba(54, 102, 214, 0.8);\n cursor: pointer;\n}\n.paraui-v3-checkbox:hover > .checkbox-label svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-checkbox:hover > .checkbox-help {\n padding: 0 8px;\n}\n.paraui-v3-checkbox:hover > .checkbox-help > .checkbox-label {\n color: rgba(54, 102, 214, 0.8);\n cursor: pointer;\n}\n.paraui-v3-checkbox:hover > .checkbox-help > .checkbox-label svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-checkbox:hover > .checkbox-box > .checkbox-box-inner {\n border-color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-checkbox > .checkbox-box {\n position: relative;\n}\n.paraui-v3-checkbox > .checkbox-box > input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.paraui-v3-checkbox > .checkbox-box > .checkbox-box-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n border-radius: 2px;\n background-color: white;\n border: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-checkbox > .checkbox-box > .checkbox-box-inner:after {\n position: absolute;\n display: table;\n content: \" \";\n}\n.paraui-v3-checkbox > .checkbox-label {\n color: rgb(46, 55, 67);\n padding: 0 8px;\n margin: 0;\n display: inline-flex;\n align-items: flex-start;\n}\n.paraui-v3-checkbox > .checkbox-label > .checkbox-help > svg {\n top: 0;\n}\n.paraui-v3-checkbox .checkbox-label {\n line-height: 16px;\n}\n.paraui-v3-checkbox > .checkbox-help {\n padding: 0 8px;\n position: relative;\n top: -1px;\n}\n.paraui-v3-checkbox > .checkbox-help > .checkbox-label {\n color: rgb(46, 55, 67);\n margin: 0;\n display: inline-flex;\n align-items: center;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-checked:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgba(54, 102, 214, 0.8);\n border-color: transparent;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-checked > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n border: 1px solid white;\n border-top: 0;\n border-left: 0;\n transform: rotate(45deg) scale(1) translate(-50%, -50%);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-indeterminate:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgba(54, 102, 214, 0.8);\n border-color: transparent;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner {\n background-color: rgb(54, 102, 214);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n background-color: white;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%) scale(1);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled > .checkbox-label {\n color: rgba(46, 55, 67, 0.4);\n cursor: not-allowed;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled > .checkbox-label svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled > .checkbox-help > .checkbox-label {\n color: rgba(46, 55, 67, 0.4);\n cursor: not-allowed;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled > .checkbox-help > .checkbox-label svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled > .checkbox-box > input {\n cursor: not-allowed;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled > .checkbox-box > .checkbox-box-inner {\n background-color: rgba(171, 176, 185, 0.12);\n border-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled.paraui-v3-checkbox-checked:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgba(171, 176, 185, 0.12);\n border-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled.paraui-v3-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n border-color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled.paraui-v3-checkbox-indeterminate:hover > .checkbox-box > .checkbox-box-inner {\n background-color: rgba(171, 176, 185, 0.12);\n border-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-disabled.paraui-v3-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n background-color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-small > .checkbox-box {\n top: 1px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-small > .checkbox-box > .checkbox-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-small.paraui-v3-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n top: 45%;\n left: 21%;\n width: 4px;\n height: 7px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-small.paraui-v3-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n width: 8px;\n height: 1px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-medium > .checkbox-box > .checkbox-box-inner {\n width: 16px;\n height: 16px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-medium.paraui-v3-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n top: 45%;\n left: 21%;\n width: 5px;\n height: 8px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-medium.paraui-v3-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n width: 8px;\n height: 1px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-large > .checkbox-box > .checkbox-box-inner {\n width: 16px;\n height: 16px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-large.paraui-v3-checkbox-checked > .checkbox-box > .checkbox-box-inner:after {\n top: 45%;\n left: 21%;\n width: 5px;\n height: 8px;\n}\n.paraui-v3-checkbox.paraui-v3-checkbox-large.paraui-v3-checkbox-indeterminate > .checkbox-box > .checkbox-box-inner:after {\n width: 8px;\n height: 1px;\n}";
|
|
15
16
|
styleInject(css_248z);
|
|
16
17
|
|
|
17
18
|
var Checkbox = function Checkbox(props) {
|
|
@@ -62,16 +63,21 @@ var Checkbox = function Checkbox(props) {
|
|
|
62
63
|
|
|
63
64
|
|
|
64
65
|
var handClass = function handClass() {
|
|
65
|
-
var str = '
|
|
66
|
+
var str = $prefixCls + '-checkbox';
|
|
66
67
|
if (className) str += ' ' + className;
|
|
67
|
-
if (size) str +=
|
|
68
|
-
if (disabled) str +=
|
|
69
|
-
if (indeterminate) str +=
|
|
68
|
+
if (size) str += " ".concat($prefixCls, "-checkbox-").concat(size);
|
|
69
|
+
if (disabled) str += " ".concat($prefixCls, "-checkbox-disabled");
|
|
70
|
+
if (indeterminate) str += " ".concat($prefixCls, "-checkbox-indeterminate");else if (checkedCom) str += " ".concat($prefixCls, "-checkbox-checked");
|
|
71
|
+
|
|
72
|
+
if (labelTooltip && labelTooltip.tooltipType) {
|
|
73
|
+
str += " ".concat($prefixCls, "-checkbox-").concat(labelTooltip.tooltipType);
|
|
74
|
+
}
|
|
75
|
+
|
|
70
76
|
return str;
|
|
71
77
|
};
|
|
72
78
|
|
|
73
79
|
var handLabelClass = function handLabelClass() {
|
|
74
|
-
var str = '
|
|
80
|
+
var str = 'checkbox-label';
|
|
75
81
|
|
|
76
82
|
if (labelTooltip && labelTooltip.className) {
|
|
77
83
|
str += ' ' + labelTooltip.className;
|
|
@@ -79,6 +85,18 @@ var Checkbox = function Checkbox(props) {
|
|
|
79
85
|
|
|
80
86
|
return str;
|
|
81
87
|
};
|
|
88
|
+
/** 处理帮组classNaem */
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
var handHelpClassName = function handHelpClassName() {
|
|
92
|
+
var str = ' checkbox-help';
|
|
93
|
+
|
|
94
|
+
if (labelTooltip && labelTooltip.helpClassName) {
|
|
95
|
+
str += ' ' + labelTooltip.helpClassName;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return str;
|
|
99
|
+
};
|
|
82
100
|
|
|
83
101
|
return jsxs("label", Object.assign({
|
|
84
102
|
className: handClass(),
|
|
@@ -86,17 +104,18 @@ var Checkbox = function Checkbox(props) {
|
|
|
86
104
|
style: style
|
|
87
105
|
}, {
|
|
88
106
|
children: [jsxs("span", Object.assign({
|
|
89
|
-
className: "
|
|
107
|
+
className: "checkbox-box"
|
|
90
108
|
}, {
|
|
91
109
|
children: [jsx("input", Object.assign({
|
|
92
110
|
type: "checkbox",
|
|
93
111
|
value: checkedCom
|
|
94
112
|
}, props.inputProps)), jsx("span", {
|
|
95
|
-
className: "
|
|
113
|
+
className: "checkbox-box-inner"
|
|
96
114
|
})]
|
|
97
115
|
})), label !== undefined && label !== '' && label !== null ? jsx(Label, Object.assign({
|
|
98
116
|
label: label
|
|
99
117
|
}, labelTooltip, {
|
|
118
|
+
helpClassName: handHelpClassName(),
|
|
100
119
|
className: handLabelClass()
|
|
101
120
|
})) : null]
|
|
102
121
|
}));
|
package/CheckboxGroup/index.d.ts
CHANGED
|
@@ -6,11 +6,12 @@
|
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { CheckboxProps } from '../Checkbox';
|
|
8
8
|
import { LabelTooltipProps } from "../Label";
|
|
9
|
+
import { HelperTextDetailProps } from "../HelperText";
|
|
9
10
|
import './index.scss';
|
|
10
11
|
export interface CheckboxListProps extends CheckboxProps {
|
|
11
12
|
[name: string]: any;
|
|
12
13
|
}
|
|
13
|
-
export interface CheckboxGroupProps {
|
|
14
|
+
export interface CheckboxGroupProps extends HelperTextDetailProps {
|
|
14
15
|
/** 样式class */
|
|
15
16
|
className?: string;
|
|
16
17
|
/** style */
|
|
@@ -27,10 +28,6 @@ export interface CheckboxGroupProps {
|
|
|
27
28
|
row?: boolean;
|
|
28
29
|
/** 是否禁用 */
|
|
29
30
|
disabled?: boolean;
|
|
30
|
-
/** 是否显示错误 */
|
|
31
|
-
error?: boolean;
|
|
32
|
-
/** 错误提示 */
|
|
33
|
-
helperText?: ReactNode;
|
|
34
31
|
/** 默认值 不受控 */
|
|
35
32
|
defaultValue?: any;
|
|
36
33
|
/** 值 */
|
package/CheckboxGroup/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { Checkbox } from '../Checkbox/index.js';
|
|
|
5
5
|
import Label from '../Label/index.js';
|
|
6
6
|
import HelperText from '../HelperText/index.js';
|
|
7
7
|
import { DeepClone } from '@paraview/lib';
|
|
8
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
8
9
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
10
|
import '../Help/index.js';
|
|
10
11
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -14,7 +15,7 @@ import 'rc-tooltip/lib/placements';
|
|
|
14
15
|
import 'clsx';
|
|
15
16
|
import '@para-ui/icons/Help';
|
|
16
17
|
|
|
17
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-
|
|
18
|
+
var css_248z = "@charset \"UTF-8\";\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-checkbox-group {\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 width: 100%;\n}\n.paraui-v3-checkbox-group > .checkbox-group-label {\n margin-bottom: 4px;\n}\n.paraui-v3-checkbox-group > .checkbox-group-content {\n line-height: 0;\n}\n.paraui-v3-checkbox-group > .checkbox-group-content > .paraui-v3-checkbox {\n margin-top: 8px;\n margin-bottom: 4px;\n}\n.paraui-v3-checkbox-group.paraui-v3-checkbox-group-column > .checkbox-group-content {\n display: flex;\n flex-direction: column;\n}";
|
|
18
19
|
styleInject(css_248z);
|
|
19
20
|
|
|
20
21
|
var CheckboxGroup = function CheckboxGroup(props) {
|
|
@@ -31,6 +32,7 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
31
32
|
required = _props$required === void 0 ? false : _props$required,
|
|
32
33
|
_props$error = props.error,
|
|
33
34
|
error = _props$error === void 0 ? false : _props$error,
|
|
35
|
+
hideErrorDom = props.hideErrorDom,
|
|
34
36
|
_props$helperText = props.helperText,
|
|
35
37
|
helperText = _props$helperText === void 0 ? '' : _props$helperText,
|
|
36
38
|
_props$id = props.id,
|
|
@@ -80,7 +82,7 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
80
82
|
var handLabel = function handLabel() {
|
|
81
83
|
if (label || required) {
|
|
82
84
|
var handLabelClass = function handLabelClass() {
|
|
83
|
-
var str = '
|
|
85
|
+
var str = 'checkbox-group-label';
|
|
84
86
|
|
|
85
87
|
if (labelTooltip && labelTooltip.className) {
|
|
86
88
|
str += ' ' + labelTooltip.className;
|
|
@@ -102,12 +104,12 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
102
104
|
|
|
103
105
|
|
|
104
106
|
var handClass = function handClass() {
|
|
105
|
-
var str = '
|
|
107
|
+
var str = $prefixCls + '-checkbox-group';
|
|
106
108
|
if (className) str += ' ' + className;
|
|
107
|
-
if (size) str +=
|
|
108
|
-
if (error) str +=
|
|
109
|
-
if (disabled) str +=
|
|
110
|
-
if (row) str +=
|
|
109
|
+
if (size) str += " ".concat($prefixCls, "-checkbox-group-").concat(size);
|
|
110
|
+
if (error) str += " ".concat($prefixCls, "-checkbox-group-error");
|
|
111
|
+
if (disabled) str += " ".concat($prefixCls, "-checkbox-group-disabled");
|
|
112
|
+
if (row) str += " ".concat($prefixCls, "-checkbox-group-row");else str += " ".concat($prefixCls, "-checkbox-group-column");
|
|
111
113
|
return str;
|
|
112
114
|
};
|
|
113
115
|
|
|
@@ -116,7 +118,7 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
116
118
|
style: style
|
|
117
119
|
}, {
|
|
118
120
|
children: [handLabel(), jsx("div", Object.assign({
|
|
119
|
-
className: "
|
|
121
|
+
className: "checkbox-group-content"
|
|
120
122
|
}, {
|
|
121
123
|
children: list.map(function (item, index) {
|
|
122
124
|
return /*#__PURE__*/createElement(Checkbox, Object.assign({}, item, {
|
|
@@ -128,9 +130,10 @@ var CheckboxGroup = function CheckboxGroup(props) {
|
|
|
128
130
|
}));
|
|
129
131
|
})
|
|
130
132
|
})), jsx(HelperText, {
|
|
131
|
-
className: "
|
|
133
|
+
className: "checkbox-group-error-text",
|
|
132
134
|
error: error,
|
|
133
|
-
helperText: helperText
|
|
135
|
+
helperText: helperText,
|
|
136
|
+
hideErrorDom: hideErrorDom
|
|
134
137
|
})]
|
|
135
138
|
}));
|
|
136
139
|
};
|
package/Collapse/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import RcCollapse from 'rc-collapse';
|
|
3
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
3
4
|
import * as React from 'react';
|
|
4
5
|
import Right from '@para-ui/icons/Right';
|
|
5
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
@@ -14,13 +15,13 @@ var CollapsePanelProps = function CollapsePanelProps(props) {
|
|
|
14
15
|
var handClass = function handClass() {
|
|
15
16
|
var str = '';
|
|
16
17
|
if (className) str += className;
|
|
17
|
-
if (!showArrow) str += '
|
|
18
|
+
if (!showArrow) str += ' collapse-panel-no-arrow';
|
|
18
19
|
return str;
|
|
19
20
|
};
|
|
20
21
|
|
|
21
22
|
return jsx(RcCollapse.Panel, Object.assign({}, props, {
|
|
22
23
|
className: handClass(),
|
|
23
|
-
prefixCls: '
|
|
24
|
+
prefixCls: $rcPrefixCls + '-collapse'
|
|
24
25
|
}));
|
|
25
26
|
};
|
|
26
27
|
|
|
@@ -82,7 +83,7 @@ var skipOpacityTransition = function skipOpacityTransition(_, event) {
|
|
|
82
83
|
};
|
|
83
84
|
|
|
84
85
|
var collapseMotion = {
|
|
85
|
-
motionName: '
|
|
86
|
+
motionName: 'collapse-motion-collapse',
|
|
86
87
|
onAppearStart: getCollapsedHeight,
|
|
87
88
|
onEnterStart: getCollapsedHeight,
|
|
88
89
|
onAppearActive: getRealHeight,
|
|
@@ -95,7 +96,7 @@ var collapseMotion = {
|
|
|
95
96
|
motionDeadline: 500
|
|
96
97
|
};
|
|
97
98
|
|
|
98
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-collapse {\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 background-color: white;\n border-bottom: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-collapse .
|
|
99
|
+
var css_248z = "@charset \"UTF-8\";\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-collapse {\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 background-color: white;\n border-bottom: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-collapse .collapse-motion-collapse {\n overflow: hidden;\n transition: height 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1) !important;\n}\n.paraui-v3-collapse > .component-collapse-item {\n border-top: 1px solid rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-header {\n display: flex;\n align-items: center;\n padding: 16px;\n color: rgb(46, 55, 67);\n cursor: pointer;\n font-weight: 700;\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-header > .collapse-svg-box {\n line-height: 0;\n margin-right: 16px;\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-header > .collapse-svg-box svg {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-header > .collapse-svg-box .collapse-expand-svg {\n transition: all 0.3s, visibility 0s;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-header > .component-collapse-extra {\n line-height: 0;\n margin-left: auto;\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-header > .component-collapse-extra svg {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-content.collapse-content-hidden {\n display: none;\n}\n.paraui-v3-collapse > .component-collapse-item > .component-collapse-content > .component-collapse-content-box {\n padding: 0 16px 16px;\n color: rgb(46, 55, 67);\n font-size: 14px;\n}\n.paraui-v3-collapse > .component-collapse-item.component-collapse-item-active > .component-collapse-header > .collapse-svg-box .collapse-expand-svg {\n transform: rotate(90deg);\n}\n.paraui-v3-collapse.paraui-v3-collapse-svg-right > .component-collapse-item > .component-collapse-header {\n padding-right: 40px;\n position: relative;\n}\n.paraui-v3-collapse.paraui-v3-collapse-svg-right > .component-collapse-item > .component-collapse-header > .collapse-svg-box {\n position: absolute;\n right: 12px;\n top: 17px;\n margin-right: 0;\n}\n.paraui-v3-collapse > .component-collapse-item-disabled > .component-collapse-header {\n color: rgb(46, 55, 67);\n cursor: not-allowed;\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-collapse > .component-collapse-item-disabled > .component-collapse-header > .collapse-svg-box svg {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-collapse > .component-collapse-item-disabled > .component-collapse-header > .collapse-svg-box .collapse-expand-svg {\n color: rgb(46, 55, 67);\n}\n.paraui-v3-collapse > .component-collapse-item-disabled > .component-collapse-header > .component-collapse-extra svg {\n color: rgb(46, 55, 67);\n}";
|
|
99
100
|
styleInject(css_248z);
|
|
100
101
|
|
|
101
102
|
var Collapse = function Collapse(props) {
|
|
@@ -132,10 +133,10 @@ var Collapse = function Collapse(props) {
|
|
|
132
133
|
var panelProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
133
134
|
var expandIcon = props.expandIcon;
|
|
134
135
|
var icon = expandIcon ? expandIcon(panelProps) : jsx(Right, {
|
|
135
|
-
className: "
|
|
136
|
+
className: "collapse-expand-svg"
|
|
136
137
|
});
|
|
137
138
|
return jsx("div", Object.assign({
|
|
138
|
-
className: "
|
|
139
|
+
className: "collapse-svg-box"
|
|
139
140
|
}, {
|
|
140
141
|
children: icon
|
|
141
142
|
}));
|
|
@@ -144,9 +145,9 @@ var Collapse = function Collapse(props) {
|
|
|
144
145
|
|
|
145
146
|
|
|
146
147
|
var handClass = function handClass() {
|
|
147
|
-
var str = '';
|
|
148
|
+
var str = $prefixCls + '-collapse';
|
|
148
149
|
if (className) str += className;
|
|
149
|
-
if (expandIconPosition) str +=
|
|
150
|
+
if (expandIconPosition) str += " ".concat($prefixCls, "-collapse-svg-").concat(expandIconPosition);
|
|
150
151
|
return str;
|
|
151
152
|
};
|
|
152
153
|
/** 处理过度动画 */
|
|
@@ -154,13 +155,13 @@ var Collapse = function Collapse(props) {
|
|
|
154
155
|
|
|
155
156
|
var openMotion = Object.assign(Object.assign({}, collapseMotion), {
|
|
156
157
|
motionAppear: false,
|
|
157
|
-
leavedClassName: "
|
|
158
|
+
leavedClassName: "collapse-content-hidden"
|
|
158
159
|
});
|
|
159
160
|
return jsx(RcCollapse, Object.assign({
|
|
160
161
|
openMotion: openMotion
|
|
161
162
|
}, props, {
|
|
162
163
|
expandIcon: renderExpandIcon,
|
|
163
|
-
prefixCls: '
|
|
164
|
+
prefixCls: $rcPrefixCls + '-collapse',
|
|
164
165
|
className: handClass()
|
|
165
166
|
}, {
|
|
166
167
|
children: getItems()
|
package/CollapseBox/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
3
|
import { Transition } from 'react-transition-group';
|
|
4
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
4
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
5
6
|
|
|
6
7
|
function getTransitionProps(props, options) {
|
|
@@ -21,7 +22,7 @@ function getAutoHeightDuration(height) {
|
|
|
21
22
|
return Math.round((4 + 15 * Math.pow(constant, 0.25) + constant / 5) * 10);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
|
-
var css_248z = ".paraui-collapse-box {\n transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n width: 100%;\n overflow: hidden;\n height: 0;\n}\n.paraui-collapse-box > .
|
|
25
|
+
var css_248z = "@charset \"UTF-8\";\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-collapse-box {\n transition: height 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n width: 100%;\n overflow: hidden;\n height: 0;\n}\n.paraui-v3-collapse-box > .collapse-box-wrapper {\n display: flex;\n width: 100%;\n}\n.paraui-v3-collapse-box > .collapse-box-wrapper > .collapse-box-wrapper-inner {\n width: 100%;\n}\n.paraui-v3-collapse-box.paraui-v3-collapse-box-entered {\n overflow: visible;\n}\n.paraui-v3-collapse-box.paraui-v3-collapse-box-hidden {\n visibility: hidden;\n}";
|
|
25
26
|
styleInject(css_248z);
|
|
26
27
|
|
|
27
28
|
var CollapseBox = function CollapseBox(props) {
|
|
@@ -119,10 +120,10 @@ var CollapseBox = function CollapseBox(props) {
|
|
|
119
120
|
|
|
120
121
|
|
|
121
122
|
var handClass = function handClass(state) {
|
|
122
|
-
var str = '
|
|
123
|
+
var str = $prefixCls + '-collapse-box';
|
|
123
124
|
if (className) str += ' ' + className;
|
|
124
|
-
if (state === 'entered') str +=
|
|
125
|
-
if (state === 'exited' && !inProp && collapsedHeight === '0px') str +=
|
|
125
|
+
if (state === 'entered') str += " ".concat($prefixCls, "-collapse-box-entered");
|
|
126
|
+
if (state === 'exited' && !inProp && collapsedHeight === '0px') str += " ".concat($prefixCls, "-collapse-box-hidden");
|
|
126
127
|
return str;
|
|
127
128
|
};
|
|
128
129
|
|
|
@@ -147,11 +148,11 @@ var CollapseBox = function CollapseBox(props) {
|
|
|
147
148
|
ref: nodeRef
|
|
148
149
|
}, childProps, {
|
|
149
150
|
children: jsx("div", Object.assign({
|
|
150
|
-
className: '
|
|
151
|
+
className: 'collapse-box-wrapper',
|
|
151
152
|
ref: wrapperRef
|
|
152
153
|
}, {
|
|
153
154
|
children: jsx("div", Object.assign({
|
|
154
|
-
className: '
|
|
155
|
+
className: 'collapse-box-wrapper-inner'
|
|
155
156
|
}, {
|
|
156
157
|
children: _children
|
|
157
158
|
}))
|