@para-ui/core 3.0.0 → 3.0.2
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.d.ts +8 -0
- package/Button/index.js +77 -37
- 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 +266 -93
- package/ComboSelect/interface.d.ts +12 -9
- package/ComboSelect/lang/en_US.d.ts +1 -0
- package/ComboSelect/lang/index.d.ts +2 -0
- package/ComboSelect/lang/zh_CN.d.ts +1 -0
- package/Container/index.js +27 -31
- 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/componentsProps.d.ts +2 -0
- 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 +22 -23
- package/Pagination/index.js +10 -4
- package/ParauiProvider/index.js +1 -1
- package/PopConfirm/index.d.ts +2 -0
- 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 +32 -1
- 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 +4 -5
- package/Select/index.js +27 -22
- package/SelectInput/index.js +3 -2
- package/Selector/index.d.ts +3 -19
- package/Selector/index.js +2102 -213
- package/Selector/interface.d.ts +365 -0
- package/Selector/lang/en_US.d.ts +9 -0
- package/Selector/lang/index.d.ts +17 -0
- package/Selector/lang/zh_CN.d.ts +9 -0
- package/Selector/selectorData/index.d.ts +10 -0
- package/Selector/selectorMain/index.d.ts +2 -9
- package/Selector/selectorNode/index.d.ts +10 -0
- package/Selector/util.d.ts +15 -0
- package/SelectorPicker/index.d.ts +46 -0
- package/SelectorPicker/index.js +319 -0
- 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 +542 -313
- package/Table/interface.d.ts +43 -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 +4 -5
- package/TextField/index.js +23 -20
- 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 +51 -11
- package/Tooltip/interface.d.ts +2 -0
- package/Transfer/index.d.ts +6 -2
- package/Transfer/index.js +8 -4
- package/Tree/index.js +3 -2
- package/Tree/interface.d.ts +0 -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-3d26f6a5.js → index-cc4c83b8.js} +63 -31
- package/_verture/{index-ce3860a0.js → index-cf5bf211.js} +30 -21
- package/_verture/{modalContext-fc19f4ae.js → modalContext-95c3fc87.js} +0 -0
- package/index.d.ts +4 -0
- package/index.js +10 -6
- package/package.json +8 -5
- package/Selector/branchNode/index.d.ts +0 -32
- package/Selector/leafNode/index.d.ts +0 -34
- package/Selector/selectorRight/index.d.ts +0 -16
- package/Selector/selectorTop/index.d.ts +0 -16
package/Drawer/index.js
CHANGED
|
@@ -6,6 +6,7 @@ import RcDrawer from 'rc-drawer';
|
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { Button } from '../Button/index.js';
|
|
8
8
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-ac9d6acf.js';
|
|
9
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
9
10
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
10
11
|
import '../_verture/typeof-498dd2b1.js';
|
|
11
12
|
import '@para-ui/icons/LoadingF';
|
|
@@ -33,7 +34,7 @@ var localeJson = {
|
|
|
33
34
|
en: en
|
|
34
35
|
};
|
|
35
36
|
|
|
36
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-drawer {\n position: fixed;\n z-index: 1000;\n transition: width 0s ease 0.3s, height 0s ease 0.3s;\n}\n.paraui-drawer
|
|
37
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/11/8 下午2:51\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-drawer {\n position: fixed;\n z-index: 1000;\n transition: width 0s ease 0.3s, height 0s ease 0.3s;\n}\n.paraui-v3-drawer.component-drawer-open {\n transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);\n}\n.paraui-v3-drawer .component-drawer-mask {\n background: rgba(0, 0, 0, 0.45);\n opacity: 0;\n width: 100%;\n height: 0;\n position: absolute;\n top: 0;\n left: 0;\n transition: opacity 0.3s linear, height 0s ease 0.3s;\n}\n.paraui-v3-drawer .component-drawer-content-wrapper {\n position: absolute;\n background: rgb(255, 255, 255);\n transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1);\n}\n.paraui-v3-drawer .component-drawer-content {\n overflow: auto;\n z-index: 1;\n position: relative;\n}\n.paraui-v3-drawer .component-drawer-content .drawer-content-body {\n display: flex;\n flex-flow: column nowrap;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-drawer .component-drawer-content .drawer-content-body .drawer-body-header {\n position: relative;\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex: none;\n height: 60px;\n padding: 0 24px;\n font-size: 16px;\n font-weight: 700;\n color: rgb(46, 55, 67);\n border-bottom: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer .component-drawer-content .drawer-content-body .drawer-body-header .drawer-header-title {\n display: flex;\n flex: 1;\n align-items: center;\n justify-content: space-between;\n}\n.paraui-v3-drawer .component-drawer-content .drawer-content-body .drawer-body-header .drawer-header-extra button + button {\n margin-left: 16px;\n}\n.paraui-v3-drawer .component-drawer-content .drawer-content-body .drawer-body-content {\n flex: 1;\n padding: 24px;\n overflow: auto;\n word-wrap: break-word;\n}\n.paraui-v3-drawer .component-drawer-content .drawer-content-body .drawer-body-footer {\n display: flex;\n align-items: center;\n flex: none;\n padding: 16px 24px;\n font-size: 16px;\n color: rgb(46, 55, 67);\n border-top: 1px solid rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-drawer .component-drawer-handle {\n position: absolute;\n top: 72px;\n width: 41px;\n height: 40px;\n cursor: pointer;\n z-index: 0;\n text-align: center;\n line-height: 40px;\n font-size: 16px;\n display: flex;\n justify-content: center;\n align-items: center;\n background: rgb(255, 255, 255);\n}\n.paraui-v3-drawer .component-drawer-handle-icon {\n width: 14px;\n height: 2px;\n background: #333;\n position: relative;\n transition: background 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n.paraui-v3-drawer .component-drawer-handle-icon:before, .paraui-v3-drawer .component-drawer-handle-icon:after {\n content: \"\";\n display: block;\n position: absolute;\n background: #333;\n width: 100%;\n height: 2px;\n transition: transform 0.3s cubic-bezier(0.78, 0.14, 0.15, 0.86);\n}\n.paraui-v3-drawer .component-drawer-handle-icon:before {\n top: -5px;\n}\n.paraui-v3-drawer .component-drawer-handle-icon:after {\n top: 5px;\n}\n.paraui-v3-drawer.component-drawer-left, .paraui-v3-drawer.component-drawer-right {\n width: 0%;\n height: 100%;\n}\n.paraui-v3-drawer.component-drawer-left .component-drawer-content-wrapper, .paraui-v3-drawer.component-drawer-right .component-drawer-content-wrapper, .paraui-v3-drawer.component-drawer-left .component-drawer-content, .paraui-v3-drawer.component-drawer-right .component-drawer-content {\n height: 100%;\n}\n.paraui-v3-drawer.component-drawer-left.component-drawer-open, .paraui-v3-drawer.component-drawer-right.component-drawer-open {\n width: 100%;\n}\n.paraui-v3-drawer.component-drawer-left.component-drawer-open.no-mask, .paraui-v3-drawer.component-drawer-right.component-drawer-open.no-mask {\n width: 0%;\n}\n.paraui-v3-drawer.component-drawer-left {\n top: 0;\n left: 0;\n}\n.paraui-v3-drawer.component-drawer-left .component-drawer-handle {\n right: -40px;\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);\n border-radius: 0 4px 4px 0;\n}\n.paraui-v3-drawer.component-drawer-left.component-drawer-open .component-drawer-content-wrapper {\n box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);\n}\n.paraui-v3-drawer.component-drawer-right {\n top: 0;\n right: 0;\n}\n.paraui-v3-drawer.component-drawer-right .component-drawer-content-wrapper {\n right: 0;\n}\n.paraui-v3-drawer.component-drawer-right .component-drawer-handle {\n left: -40px;\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);\n border-radius: 4px 0 0 4px;\n}\n.paraui-v3-drawer.component-drawer-right.component-drawer-open .component-drawer-content-wrapper {\n box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);\n}\n.paraui-v3-drawer.component-drawer-right.component-drawer-open.no-mask {\n right: 1px;\n transform: translateX(1px);\n}\n.paraui-v3-drawer.component-drawer-top, .paraui-v3-drawer.component-drawer-bottom {\n width: 100%;\n height: 0%;\n}\n.paraui-v3-drawer.component-drawer-top .component-drawer-content-wrapper, .paraui-v3-drawer.component-drawer-bottom .component-drawer-content-wrapper, .paraui-v3-drawer.component-drawer-top .component-drawer-content, .paraui-v3-drawer.component-drawer-bottom .component-drawer-content {\n width: 100%;\n}\n.paraui-v3-drawer.component-drawer-top .component-drawer-content, .paraui-v3-drawer.component-drawer-bottom .component-drawer-content {\n height: 100%;\n}\n.paraui-v3-drawer.component-drawer-top.component-drawer-open, .paraui-v3-drawer.component-drawer-bottom.component-drawer-open {\n height: 100%;\n}\n.paraui-v3-drawer.component-drawer-top.component-drawer-open.no-mask, .paraui-v3-drawer.component-drawer-bottom.component-drawer-open.no-mask {\n height: 0%;\n}\n.paraui-v3-drawer.component-drawer-top .component-drawer-handle, .paraui-v3-drawer.component-drawer-bottom .component-drawer-handle {\n left: 50%;\n margin-left: -20px;\n}\n.paraui-v3-drawer.component-drawer-top {\n top: 0;\n left: 0;\n}\n.paraui-v3-drawer.component-drawer-top .component-drawer-handle {\n top: auto;\n bottom: -40px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n border-radius: 0 0 4px 4px;\n}\n.paraui-v3-drawer.component-drawer-top.component-drawer-open .component-drawer-content-wrapper {\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);\n}\n.paraui-v3-drawer.component-drawer-bottom {\n bottom: 0;\n left: 0;\n}\n.paraui-v3-drawer.component-drawer-bottom .component-drawer-content-wrapper {\n bottom: 0;\n}\n.paraui-v3-drawer.component-drawer-bottom .component-drawer-handle {\n top: -40px;\n box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);\n border-radius: 4px 4px 0 0;\n}\n.paraui-v3-drawer.component-drawer-bottom.component-drawer-open .component-drawer-content-wrapper {\n box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);\n}\n.paraui-v3-drawer.component-drawer-bottom.component-drawer-open.no-mask {\n bottom: 1px;\n transform: translateY(1px);\n}\n.paraui-v3-drawer.component-drawer-open.component-drawer .component-drawer-mask {\n opacity: 1;\n height: 100%;\n transition: none;\n animation: componentDrawerFadeIn 0.3s cubic-bezier(0.23, 1, 0.32, 1);\n pointer-events: auto;\n}\n.paraui-v3-drawer.component-drawer.component-drawer-open .component-drawer-handle-icon {\n background: transparent;\n}\n.paraui-v3-drawer.component-drawer.component-drawer-open .component-drawer-handle-icon:before {\n transform: translateY(5px) rotate(45deg);\n}\n.paraui-v3-drawer.component-drawer.component-drawer-open .component-drawer-handle-icon:after {\n transform: translateY(-5px) rotate(-45deg);\n}\n\n@keyframes componentDrawerFadeIn {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}";
|
|
37
38
|
styleInject(css_248z);
|
|
38
39
|
|
|
39
40
|
var Drawer = function Drawer(props) {
|
|
@@ -110,15 +111,15 @@ var Drawer = function Drawer(props) {
|
|
|
110
111
|
|
|
111
112
|
|
|
112
113
|
var titleNode = jsxs("div", Object.assign({
|
|
113
|
-
className: '
|
|
114
|
+
className: 'drawer-body-header'
|
|
114
115
|
}, {
|
|
115
116
|
children: [jsx("div", Object.assign({
|
|
116
|
-
className: '
|
|
117
|
+
className: 'drawer-header-title'
|
|
117
118
|
}, {
|
|
118
119
|
children: title
|
|
119
120
|
})), showExtra && jsx(Fragment, {
|
|
120
121
|
children: jsx("div", Object.assign({
|
|
121
|
-
className: '
|
|
122
|
+
className: 'drawer-header-extra'
|
|
122
123
|
}, {
|
|
123
124
|
children: extra || jsxs(Fragment, {
|
|
124
125
|
children: [jsx(Button, Object.assign({
|
|
@@ -147,14 +148,14 @@ var Drawer = function Drawer(props) {
|
|
|
147
148
|
var renderContent = function renderContent() {
|
|
148
149
|
if (!title && !footer) return children;
|
|
149
150
|
return jsxs("div", Object.assign({
|
|
150
|
-
className: '
|
|
151
|
+
className: 'drawer-content-body'
|
|
151
152
|
}, {
|
|
152
153
|
children: [title && titleNode, jsx("div", Object.assign({
|
|
153
|
-
className: '
|
|
154
|
+
className: 'drawer-body-content'
|
|
154
155
|
}, {
|
|
155
156
|
children: children
|
|
156
157
|
})), footer && jsx("div", Object.assign({
|
|
157
|
-
className: '
|
|
158
|
+
className: 'drawer-body-footer'
|
|
158
159
|
}, {
|
|
159
160
|
children: footer
|
|
160
161
|
}))]
|
|
@@ -168,8 +169,8 @@ var Drawer = function Drawer(props) {
|
|
|
168
169
|
|
|
169
170
|
return jsx(RcDrawer, Object.assign({}, restProps, getOffsetStyle(), {
|
|
170
171
|
style: style,
|
|
171
|
-
prefixCls:
|
|
172
|
-
className: clsx(
|
|
172
|
+
prefixCls: "".concat($rcPrefixCls, "-drawer"),
|
|
173
|
+
className: clsx("".concat($prefixCls, "-drawer"), props.className),
|
|
173
174
|
onClose: handleClose,
|
|
174
175
|
afterVisibleChange: function afterVisibleChange(open) {
|
|
175
176
|
if (open) {
|
package/Dropdown/index.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
2
3
|
import RcDropdown from 'rc-dropdown';
|
|
4
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
5
|
+
import clsx from 'clsx';
|
|
3
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
4
7
|
|
|
5
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/27 上午9:58\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-dropdown {\n position: absolute;\n left: -9999px;\n top: -9999px;\n z-index: 1500;\n display: block;\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 line-height: 1.5715;\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n}\n
|
|
8
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/5/27 上午9: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-dropdown {\n position: absolute;\n left: -9999px;\n top: -9999px;\n z-index: 1500;\n display: block;\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 line-height: 1.5715;\n background-color: rgb(255, 255, 255);\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n}\n.paraui-v3-dropdown.component-dropdown-hidden {\n display: none;\n}\n.paraui-v3-dropdown .component-dropdown-arrow {\n position: absolute;\n border-width: 4px;\n border-color: transparent;\n box-shadow: 0px 2px 8px 0px rgba(171, 176, 185, 0.4);\n border-style: solid;\n transform: rotate(45deg);\n}\n.paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-top, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-topLeft, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-topRight {\n padding-bottom: 6px;\n}\n.paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-bottom, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-bottomLeft, .paraui-v3-dropdown.component-dropdown-show-arrow.component-dropdown-placement-bottomRight {\n padding-top: 6px;\n}\n.paraui-v3-dropdown.component-dropdown-placement-top .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-topLeft .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-topRight .component-dropdown-arrow {\n bottom: 4px;\n border-top-color: rgb(255, 255, 255);\n}\n.paraui-v3-dropdown.component-dropdown-placement-top .component-dropdown-arrow {\n left: 50%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-topLeft .component-dropdown-arrow {\n left: 15%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-topRight .component-dropdown-arrow {\n right: 15%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottom .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-bottomLeft .component-dropdown-arrow, .paraui-v3-dropdown.component-dropdown-placement-bottomRight .component-dropdown-arrow {\n top: 4px;\n border-bottom-color: rgb(255, 255, 255);\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottom .component-dropdown-arrow {\n left: 50%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottomLeft .component-dropdown-arrow {\n left: 15%;\n}\n.paraui-v3-dropdown.component-dropdown-placement-bottomRight .component-dropdown-arrow {\n right: 15%;\n}\n\n.component-dropdown-slide-up-enter,\n.component-dropdown-slide-up-appear {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n display: block !important;\n opacity: 0;\n animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);\n animation-play-state: paused;\n}\n\n.component-dropdown-slide-up-leave {\n animation-duration: 0.3s;\n animation-fill-mode: both;\n transform-origin: 0 0;\n display: block !important;\n opacity: 1;\n animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);\n animation-play-state: paused;\n}\n\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-bottomLeft,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-bottomLeft,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-bottomCenter,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-bottomCenter,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-bottomRight,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-bottomRight {\n animation-name: componentDropdownSlideUpIn;\n animation-play-state: running;\n}\n\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-topLeft,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-topLeft,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-topCenter,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-topCenter,\n.component-dropdown-slide-up-enter.component-dropdown-slide-up-enter-active.component-dropdown-placement-topRight,\n.component-dropdown-slide-up-appear.component-dropdown-slide-up-appear-active.component-dropdown-placement-topRight {\n animation-name: componentDropdownSlideDownIn;\n animation-play-state: running;\n}\n\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-bottomLeft,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-bottomCenter,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-bottomRight {\n animation-name: componentDropdownSlideUpOut;\n animation-play-state: running;\n}\n\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-topLeft,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-topCenter,\n.component-dropdown-slide-up-leave.component-dropdown-slide-up-leave-active.component-dropdown-placement-topRight {\n animation-name: componentDropdownSlideDownOut;\n animation-play-state: running;\n}\n\n@keyframes componentDropdownSlideUpIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 0%;\n transform: scaleY(0);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 0%;\n transform: scaleY(1);\n }\n}\n@keyframes componentDropdownSlideUpOut {\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);\n }\n}\n@keyframes componentDropdownSlideDownIn {\n 0% {\n opacity: 0;\n transform-origin: 0% 100%;\n transform: scaleY(0);\n }\n 100% {\n opacity: 1;\n transform-origin: 0% 100%;\n transform: scaleY(1);\n }\n}\n@keyframes componentDropdownSlideDownOut {\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);\n }\n}";
|
|
6
9
|
styleInject(css_248z);
|
|
7
10
|
|
|
8
11
|
var getDropdownOffset = function getDropdownOffset(place) {
|
|
@@ -29,16 +32,59 @@ var getDropdownOffset = function getDropdownOffset(place) {
|
|
|
29
32
|
}
|
|
30
33
|
};
|
|
31
34
|
return (_b = (_a = offsetMap[place]) === null || _a === void 0 ? void 0 : _a.offset) !== null && _b !== void 0 ? _b : [0, 0];
|
|
32
|
-
};
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
function isOverflowElement(element) {
|
|
38
|
+
var _window$getComputedSt = window.getComputedStyle(element),
|
|
39
|
+
overflow = _window$getComputedSt.overflow,
|
|
40
|
+
overflowX = _window$getComputedSt.overflowX,
|
|
41
|
+
overflowY = _window$getComputedSt.overflowY;
|
|
42
|
+
|
|
43
|
+
return /auto|scroll|overlay/.test(overflow + overflowY + overflowX);
|
|
44
|
+
} //最近祖先元素
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
function getNearestOverflowAncestor(node) {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
|
|
50
|
+
var parentNode = node.parentNode || node.ownerDocument;
|
|
51
|
+
var nodeName = ((_a = parentNode === null || parentNode === void 0 ? void 0 : parentNode.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || '';
|
|
52
|
+
|
|
53
|
+
if (['html', 'body', '#document'].includes(nodeName)) {
|
|
54
|
+
return (_b = node === null || node === void 0 ? void 0 : node.ownerDocument) === null || _b === void 0 ? void 0 : _b.body;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (parentNode instanceof window.HTMLElement && isOverflowElement(parentNode)) {
|
|
58
|
+
return parentNode;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return getNearestOverflowAncestor(parentNode);
|
|
62
|
+
} //dropdown
|
|
33
63
|
|
|
34
64
|
|
|
35
65
|
var Dropdown = function Dropdown(props) {
|
|
36
|
-
|
|
66
|
+
var wrapRef = React__default.useRef();
|
|
67
|
+
var popupRef = React__default.useRef(); //浮层渲染容器
|
|
68
|
+
|
|
37
69
|
var getPopupContainer = function getPopupContainer(triggerNode) {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
|
|
38
72
|
var container;
|
|
39
73
|
|
|
40
74
|
if (!props.getPopupContainer) {
|
|
41
|
-
|
|
75
|
+
var rootNode = (_b = (_a = wrapRef.current) === null || _a === void 0 ? void 0 : _a.getRootDomNode) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
76
|
+
|
|
77
|
+
if (rootNode) {
|
|
78
|
+
container = getNearestOverflowAncestor(rootNode);
|
|
79
|
+
} else {
|
|
80
|
+
container = document.body;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
if (!container.style.position) {
|
|
84
|
+
container.style.position = 'relative';
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
popupRef.current = container;
|
|
42
88
|
} else {
|
|
43
89
|
container = props.getPopupContainer(triggerNode) || document.body;
|
|
44
90
|
}
|
|
@@ -46,13 +92,20 @@ var Dropdown = function Dropdown(props) {
|
|
|
46
92
|
return container;
|
|
47
93
|
};
|
|
48
94
|
|
|
95
|
+
React__default.useEffect(function () {
|
|
96
|
+
return function () {
|
|
97
|
+
if (popupRef.current) popupRef.current.style.position = '';
|
|
98
|
+
};
|
|
99
|
+
}, []);
|
|
49
100
|
return jsx(RcDropdown, Object.assign({}, props, {
|
|
50
|
-
prefixCls:
|
|
101
|
+
prefixCls: "".concat($rcPrefixCls, "-dropdown"),
|
|
102
|
+
overlayClassName: clsx("".concat($prefixCls, "-dropdown"), props.overlayClassName),
|
|
51
103
|
animation: "slide-up",
|
|
52
104
|
align: {
|
|
53
105
|
offset: getDropdownOffset(props.placement)
|
|
54
106
|
},
|
|
55
|
-
getPopupContainer: getPopupContainer
|
|
107
|
+
getPopupContainer: getPopupContainer,
|
|
108
|
+
ref: wrapRef
|
|
56
109
|
}, {
|
|
57
110
|
children: props.children
|
|
58
111
|
}));
|
package/Empty/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-ac9d6acf.js';
|
|
4
|
-
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
5
4
|
import { u as useGlobalProps } from '../_verture/useGlobalProps-af9a2af6.js';
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
6
|
+
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
7
|
import 'react';
|
|
7
8
|
import '@para-ui/core/GlobalContext';
|
|
8
9
|
|
|
@@ -565,7 +566,7 @@ var localeJson = {
|
|
|
565
566
|
en: en
|
|
566
567
|
};
|
|
567
568
|
|
|
568
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-empty {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-empty-image img {\n width: 100%;\n}\n.paraui-empty-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-empty-description-refresh {\n display: inline-block;\n}\n.paraui-empty-description-refresh span {\n color: rgb(54, 102, 214);\n cursor: pointer;\n}\n.paraui-empty
|
|
569
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/4/2 上午10:55\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-empty {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n}\n.paraui-v3-empty > .empty-image {\n line-height: 0;\n}\n.paraui-v3-empty > .empty-image img {\n width: 100%;\n}\n.paraui-v3-empty > .empty-description {\n line-height: 17px;\n font-size: 14px;\n font-weight: 400;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-empty > .empty-description > .empty-description-refresh {\n display: inline-block;\n}\n.paraui-v3-empty > .empty-description > .empty-description-refresh span {\n color: rgb(54, 102, 214);\n cursor: pointer;\n}\n.paraui-v3-empty.paraui-v3-empty-large > .empty-description {\n margin-top: 24px;\n}\n.paraui-v3-empty.paraui-v3-empty-small > .empty-description {\n margin-top: 12px;\n font-size: 12px;\n}";
|
|
569
570
|
styleInject(css_248z);
|
|
570
571
|
|
|
571
572
|
var imageMap = {
|
|
@@ -600,7 +601,7 @@ var Empty = function Empty(props) {
|
|
|
600
601
|
var alt = typeof des === 'string' ? des : 'empty';
|
|
601
602
|
var imageNode = null;
|
|
602
603
|
var refreshNode = showRefresh ? jsxs("span", Object.assign({
|
|
603
|
-
className: '
|
|
604
|
+
className: 'empty-description-refresh'
|
|
604
605
|
}, {
|
|
605
606
|
children: [intl({
|
|
606
607
|
id: 'click'
|
|
@@ -623,17 +624,17 @@ var Empty = function Empty(props) {
|
|
|
623
624
|
}
|
|
624
625
|
|
|
625
626
|
return jsx("div", Object.assign({
|
|
626
|
-
className: clsx(
|
|
627
|
+
className: clsx("".concat($prefixCls, "-empty"), className, "".concat($prefixCls, "-empty-").concat(size)),
|
|
627
628
|
style: style
|
|
628
629
|
}, {
|
|
629
630
|
children: customEmpty ? customEmpty : jsxs(Fragment, {
|
|
630
631
|
children: [jsx("div", Object.assign({
|
|
631
|
-
className: '
|
|
632
|
+
className: 'empty-image',
|
|
632
633
|
style: imageStyle
|
|
633
634
|
}, {
|
|
634
635
|
children: imageNode
|
|
635
636
|
})), des && jsxs("div", Object.assign({
|
|
636
|
-
className: '
|
|
637
|
+
className: 'empty-description'
|
|
637
638
|
}, {
|
|
638
639
|
children: [des, refreshNode]
|
|
639
640
|
}))]
|
package/Form/index.js
CHANGED
|
@@ -3,7 +3,8 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-d7722f4b.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { DeepClone } from '@paraview/lib';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { F as FormItem, v as validate } from '../_verture/index-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-cc4c83b8.js';
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
7
8
|
import '../TextField/index.js';
|
|
8
9
|
import '../_verture/typeof-498dd2b1.js';
|
|
9
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -65,7 +66,7 @@ import '@para-ui/icons/DoubleLeft';
|
|
|
65
66
|
import '@para-ui/icons/DoubleRight';
|
|
66
67
|
import '@para-ui/icons/Left';
|
|
67
68
|
import '@para-ui/icons/Right';
|
|
68
|
-
import '../_verture/index-
|
|
69
|
+
import '../_verture/index-cf5bf211.js';
|
|
69
70
|
import 'rc-tree';
|
|
70
71
|
import '@para-ui/icons/Document';
|
|
71
72
|
import 'react-dom';
|
|
@@ -347,10 +348,10 @@ var Form = function Form(props) {
|
|
|
347
348
|
}
|
|
348
349
|
}, [form]);
|
|
349
350
|
return jsx("form", Object.assign({}, FormProps, {
|
|
350
|
-
className:
|
|
351
|
+
className: "".concat($prefixCls, "-form")
|
|
351
352
|
}, {
|
|
352
353
|
children: jsx("div", Object.assign({
|
|
353
|
-
className: "
|
|
354
|
+
className: "form-content ".concat(className)
|
|
354
355
|
}, {
|
|
355
356
|
children: itemsConfig && itemsConfig.length > 0 && itemsConfig.map(function (item, idx) {
|
|
356
357
|
// 不显示则提前保存最后值
|
|
@@ -368,7 +369,7 @@ var Form = function Form(props) {
|
|
|
368
369
|
}, item, {
|
|
369
370
|
backData: refData.current.allValues,
|
|
370
371
|
setValue: setValue
|
|
371
|
-
}), "
|
|
372
|
+
}), "form-item-".concat(idx, "-").concat(refresh));
|
|
372
373
|
})
|
|
373
374
|
}))
|
|
374
375
|
}));
|
|
@@ -3,36 +3,36 @@ import { ButtonProps } from "../../../Button";
|
|
|
3
3
|
import './index.scss';
|
|
4
4
|
export interface FormFileProps {
|
|
5
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
* 禁用
|
|
7
|
+
*/
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* 文件类型 可接受字符串 或数组
|
|
11
|
+
*/
|
|
12
12
|
fileType?: string | Array<string>;
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
* 按钮名称 默认 选择文件
|
|
15
|
+
*/
|
|
16
16
|
buttonLabel?: string;
|
|
17
17
|
/**
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
* 值改变传出
|
|
19
|
+
*/
|
|
20
20
|
onChange?: (value: FileList) => any;
|
|
21
21
|
/**
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
* 默认值
|
|
23
|
+
*/
|
|
24
24
|
defaultValue?: string | FileList;
|
|
25
25
|
/**
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
* input 其他属性
|
|
27
|
+
*/
|
|
28
28
|
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
29
29
|
/**
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
* 按钮配置
|
|
31
|
+
*/
|
|
32
32
|
buttonProps?: ButtonProps;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* 文件组件
|
|
36
|
-
*/
|
|
35
|
+
* 文件组件
|
|
36
|
+
*/
|
|
37
37
|
declare const FormFile: FC<FormFileProps>;
|
|
38
38
|
export default FormFile;
|
package/FormItem/index.d.ts
CHANGED
|
@@ -56,12 +56,12 @@ export interface FormItemProps {
|
|
|
56
56
|
*/
|
|
57
57
|
inputProps?: inputProps;
|
|
58
58
|
/**
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
* label props
|
|
60
|
+
*/
|
|
61
61
|
labelProps?: LabelProps;
|
|
62
62
|
/**
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
* 报错提示其他配置
|
|
64
|
+
*/
|
|
65
65
|
helperTextProps?: HelperTextProps;
|
|
66
66
|
/**
|
|
67
67
|
* 文字宽度, 只对 type === vertical,状态下生效
|
|
@@ -88,12 +88,12 @@ export interface FormItemProps {
|
|
|
88
88
|
*/
|
|
89
89
|
label?: string | ((props: FormItemProps) => ReactNode);
|
|
90
90
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
* 隐藏 label
|
|
92
|
+
*/
|
|
93
93
|
hideLabel?: boolean;
|
|
94
94
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
* 隐藏 error
|
|
96
|
+
*/
|
|
97
97
|
hideError?: boolean;
|
|
98
98
|
/**
|
|
99
99
|
* name,一般对应后台属性,需要唯一性
|
|
@@ -118,29 +118,29 @@ export interface FormItemProps {
|
|
|
118
118
|
[name: string]: any;
|
|
119
119
|
};
|
|
120
120
|
/**
|
|
121
|
-
|
|
122
|
-
|
|
121
|
+
* 是否启用必填框,不允许输入纯空格
|
|
122
|
+
*/
|
|
123
123
|
disOnlySpace?: boolean;
|
|
124
124
|
/**
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
* 必填显示渲染方式
|
|
126
|
+
*/
|
|
127
127
|
requiredElement?: ReactElement | string;
|
|
128
128
|
/**
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
* 隐藏默认必填标记
|
|
130
|
+
*/
|
|
131
131
|
disRequiredElement?: boolean;
|
|
132
132
|
/**
|
|
133
133
|
* 其他配置
|
|
134
134
|
*/
|
|
135
135
|
[name: string]: any;
|
|
136
136
|
/**
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
* 自定义class
|
|
138
|
+
*/
|
|
139
139
|
className?: string;
|
|
140
140
|
/**
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
141
|
+
* 默认值
|
|
142
|
+
* 会被backData,回填数据替换
|
|
143
|
+
*/
|
|
144
144
|
defaultValue?: any;
|
|
145
145
|
}
|
|
146
146
|
/**
|
package/FormItem/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { F as default } from '../_verture/index-
|
|
3
|
+
export { F as default } from '../_verture/index-cc4c83b8.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
|
+
import '../_verture/constant-bf34e6fa.js';
|
|
6
7
|
import '../_verture/slicedToArray-d7722f4b.js';
|
|
7
8
|
import '../TextField/index.js';
|
|
8
9
|
import '../_verture/typeof-498dd2b1.js';
|
|
@@ -65,7 +66,7 @@ import '@para-ui/icons/DoubleLeft';
|
|
|
65
66
|
import '@para-ui/icons/DoubleRight';
|
|
66
67
|
import '@para-ui/icons/Left';
|
|
67
68
|
import '@para-ui/icons/Right';
|
|
68
|
-
import '../_verture/index-
|
|
69
|
+
import '../_verture/index-cf5bf211.js';
|
|
69
70
|
import 'rc-tree';
|
|
70
71
|
import '@para-ui/icons/Document';
|
|
71
72
|
import 'react-dom';
|
package/FunctionModal/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useModal } from '../_verture/modalContext-
|
|
2
|
-
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-
|
|
1
|
+
import { u as useModal } from '../_verture/modalContext-95c3fc87.js';
|
|
2
|
+
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-95c3fc87.js';
|
|
3
3
|
import '../_verture/toConsumableArray-f8047a75.js';
|
|
4
4
|
import '../_verture/slicedToArray-d7722f4b.js';
|
|
5
5
|
import '../_verture/index-342379c6.js';
|
|
@@ -17,6 +17,7 @@ import '@para-ui/icons/Forbid';
|
|
|
17
17
|
import '../Tooltip/index.js';
|
|
18
18
|
import 'rc-tooltip';
|
|
19
19
|
import 'rc-tooltip/lib/placements';
|
|
20
|
+
import '../_verture/constant-bf34e6fa.js';
|
|
20
21
|
import '../_verture/style-inject.es-300983ab.js';
|
|
21
22
|
import '@para-ui/icons/Down';
|
|
22
23
|
import '../Dropdown/index.js';
|
|
@@ -8,12 +8,14 @@ import { TextFieldProps } from "../TextField";
|
|
|
8
8
|
import { TableProps } from "../Table/interface";
|
|
9
9
|
import { EmptyProps } from "../Empty";
|
|
10
10
|
import { QueryingProps } from "../Querying";
|
|
11
|
+
import { SelectorProps } from "../Selector/interface";
|
|
11
12
|
interface ComponentsProps {
|
|
12
13
|
Select?: Partial<SelectProps>;
|
|
13
14
|
TextField?: Partial<TextFieldProps>;
|
|
14
15
|
Table?: Partial<TableProps>;
|
|
15
16
|
Empty?: Partial<EmptyProps>;
|
|
16
17
|
Querying?: Partial<QueryingProps>;
|
|
18
|
+
Selector?: Partial<SelectorProps>;
|
|
17
19
|
[name: string]: any;
|
|
18
20
|
}
|
|
19
21
|
export default ComponentsProps;
|
package/Help/index.js
CHANGED
|
@@ -3,13 +3,14 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { Tooltip } from '../Tooltip/index.js';
|
|
4
4
|
import HelpIcon from '@para-ui/icons/Help';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
6
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
8
|
import '../_verture/slicedToArray-d7722f4b.js';
|
|
8
9
|
import 'react';
|
|
9
10
|
import 'rc-tooltip';
|
|
10
11
|
import 'rc-tooltip/lib/placements';
|
|
11
12
|
|
|
12
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/12/2 下午8:14\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-help {\n display: inline-block;\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-help:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-help
|
|
13
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/12/2 下午8:14\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-help {\n display: inline-block;\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-help:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-help svg {\n font-size: inherit;\n color: inherit;\n}";
|
|
13
14
|
styleInject(css_248z);
|
|
14
15
|
|
|
15
16
|
var Help = function Help(props) {
|
|
@@ -29,7 +30,7 @@ var Help = function Help(props) {
|
|
|
29
30
|
placement: placement
|
|
30
31
|
}, restProps, {
|
|
31
32
|
children: jsx("span", Object.assign({
|
|
32
|
-
className: clsx('
|
|
33
|
+
className: clsx($prefixCls + '-help', className)
|
|
33
34
|
}, {
|
|
34
35
|
children: children || jsx(HelpIcon, {})
|
|
35
36
|
}))
|
package/HelperText/index.d.ts
CHANGED
|
@@ -5,15 +5,19 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import './index.scss';
|
|
8
|
-
export interface
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/** style */
|
|
12
|
-
style?: React.CSSProperties;
|
|
8
|
+
export interface HelperTextDetailProps {
|
|
9
|
+
/** 没有错误的时候,不渲染 */
|
|
10
|
+
hideErrorDom?: boolean;
|
|
13
11
|
/** 是否显示错误 */
|
|
14
12
|
error?: boolean;
|
|
15
13
|
/** 错误提示 */
|
|
16
14
|
helperText?: ReactNode;
|
|
17
15
|
}
|
|
16
|
+
export interface HelperTextProps extends HelperTextDetailProps {
|
|
17
|
+
/** 样式class */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** style */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
}
|
|
18
22
|
declare const HelperText: FunctionComponent<HelperTextProps>;
|
|
19
23
|
export default HelperText;
|
package/HelperText/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
2
3
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
3
4
|
|
|
4
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 表单错误提示\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-helper-text {\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: 12px;\n font-weight: 400;\n padding-left: 12px;\n line-height: 20px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-helper-text.paraui-helper-text-error {\n color: rgb(235, 96, 84);\n}";
|
|
5
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\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-helper-text {\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: 12px;\n font-weight: 400;\n padding-left: 12px;\n line-height: 20px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-helper-text.paraui-v3-helper-text-error {\n color: rgb(235, 96, 84);\n}";
|
|
5
6
|
styleInject(css_248z);
|
|
6
7
|
|
|
7
8
|
var HelperText = function HelperText(props) {
|
|
@@ -9,12 +10,16 @@ var HelperText = function HelperText(props) {
|
|
|
9
10
|
style = props.style,
|
|
10
11
|
_props$error = props.error,
|
|
11
12
|
error = _props$error === void 0 ? false : _props$error,
|
|
12
|
-
|
|
13
|
+
_props$hideErrorDom = props.hideErrorDom,
|
|
14
|
+
hideErrorDom = _props$hideErrorDom === void 0 ? false : _props$hideErrorDom,
|
|
15
|
+
helperText = props.helperText; // 不存在错误,且没有错误隐藏错误dom
|
|
16
|
+
|
|
17
|
+
if (!error && hideErrorDom) return null; // 处理class
|
|
13
18
|
|
|
14
19
|
var handClass = function handClass() {
|
|
15
|
-
var str =
|
|
20
|
+
var str = "".concat($prefixCls, "-helper-text");
|
|
16
21
|
if (className) str += ' ' + className;
|
|
17
|
-
if (error) str +=
|
|
22
|
+
if (error) str += " ".concat($prefixCls, "-helper-text-error");
|
|
18
23
|
return str;
|
|
19
24
|
};
|
|
20
25
|
|
package/InputLang/index.d.ts
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* @description 国际化输入框
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { HelperTextDetailProps } from '../HelperText';
|
|
7
8
|
import { LabelTooltipProps } from "../Label";
|
|
8
9
|
import './index.scss';
|
|
9
10
|
interface valueProps {
|
|
10
11
|
[name: string]: string;
|
|
11
12
|
}
|
|
12
|
-
export interface InputLangProps {
|
|
13
|
+
export interface InputLangProps extends HelperTextDetailProps {
|
|
13
14
|
/** 样式class */
|
|
14
15
|
className?: string;
|
|
15
16
|
/** style */
|
|
@@ -28,10 +29,6 @@ export interface InputLangProps {
|
|
|
28
29
|
placeholderValue?: string;
|
|
29
30
|
/** 是否禁用 */
|
|
30
31
|
disabled?: boolean;
|
|
31
|
-
/** 是否错误模式 */
|
|
32
|
-
error?: boolean;
|
|
33
|
-
/** 错误文本 */
|
|
34
|
-
helperText?: ReactNode;
|
|
35
32
|
/** 是否必填 */
|
|
36
33
|
required?: boolean;
|
|
37
34
|
/** 弹出框样式class */
|