@para-ui/core 3.0.86 → 4.0.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AutoBox/index.js +18 -19
- package/AutoTips/index.js +5 -4
- package/Breadcrumbs/index.js +5 -4
- package/Button/SplitButton.d.ts +13 -0
- package/Button/index.d.ts +1 -1
- package/Button/index.js +54 -12
- package/ButtonGroup/index.js +6 -5
- package/Carousel/index.d.ts +5 -5
- package/Carousel/index.js +21 -9
- package/Cascader/Cascader.d.ts +99 -0
- package/Cascader/OptionList/CacheContent.d.ts +7 -0
- package/Cascader/OptionList/Column.d.ts +21 -0
- package/Cascader/OptionList/index.d.ts +4 -0
- package/Cascader/OptionList/useActive.d.ts +6 -0
- package/Cascader/context.d.ts +23 -0
- package/Cascader/hooks/useDisplayValues.d.ts +10 -0
- package/Cascader/hooks/useEntities.d.ts +10 -0
- package/Cascader/hooks/useMissingValues.d.ts +3 -0
- package/Cascader/index.d.ts +3 -58
- package/Cascader/index.js +28 -177
- package/Cascader/utils/commonUtil.d.ts +18 -0
- package/Cascader/utils/treeUtil.d.ts +55 -0
- package/Checkbox/index.d.ts +7 -0
- package/Checkbox/index.js +50 -29
- package/CheckboxGroup/index.d.ts +3 -1
- package/CheckboxGroup/index.js +48 -18
- package/Collapse/index.js +2 -2
- package/Collapse/motion.d.ts +0 -2
- package/CollapseBox/index.js +3 -3
- package/CollapseLayout/index.d.ts +5 -0
- package/CollapseLayout/index.js +144 -22
- package/ColorPicker/chromePicker/index.d.ts +9 -0
- package/ColorPicker/compactPicker/index.d.ts +9 -0
- package/ColorPicker/config.d.ts +5 -0
- package/ColorPicker/index.d.ts +4 -1
- package/ColorPicker/index.js +7 -3
- package/ColorPicker/sketchPicker/index.d.ts +11 -0
- package/ColorPicker/swatchesPicker/index.d.ts +9 -0
- package/ComboSelect/index.js +14 -12
- package/Container/index.js +2 -2
- package/CopyText/index.d.ts +33 -0
- package/CopyText/index.js +180 -0
- package/DatePicker/generatePicker/generateRangePicker.d.ts +9 -2
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +8 -8
- package/DatePicker/generatePicker/index.d.ts +32 -26
- package/DatePicker/generatePicker/interface.d.ts +12 -0
- package/DatePicker/index.d.ts +12 -8
- package/DatePicker/index.js +367 -454
- package/DatePicker/util.d.ts +40 -4
- package/Desktop/index.d.ts +16 -3
- package/Desktop/index.js +177 -68
- package/Desktop/lang/en_US.d.ts +6 -0
- package/Desktop/lang/index.d.ts +13 -0
- package/Desktop/lang/zh_CN.d.ts +6 -0
- package/DragVerify/index.js +9 -100
- package/Drawer/index.js +8 -8
- package/Drawer/interface.d.ts +2 -2
- package/Dropdown/index.js +2 -2
- package/DynamicMultiBox/index.js +57 -41
- package/DynamicMultiBox/interface.d.ts +4 -4
- package/Empty/index.js +2 -2
- package/Form/index.d.ts +20 -26
- package/Form/index.js +48 -69
- package/FormItem/index.js +15 -15
- package/FunctionModal/index.js +11 -9
- package/GlobalContext/constant.d.ts +1 -1
- package/GlobalContext/index.js +2 -2
- package/Help/index.js +4 -3
- package/HelperText/index.js +2 -2
- package/InputLang/index.d.ts +5 -0
- package/InputLang/index.js +35 -29
- package/InputNumber/index.d.ts +5 -0
- package/InputNumber/index.js +95 -80
- package/Label/index.js +4 -3
- package/Loading/index.js +2 -2
- package/Menu/index.js +114 -39
- package/Menu/interface.d.ts +8 -0
- package/Message/index.d.ts +4 -4
- package/Message/index.js +13 -11
- package/Modal/index.js +29 -15
- package/MultiBox/index.js +9 -8
- package/Notification/index.d.ts +9 -1
- package/Notification/index.js +29 -15
- package/OperateBtn/index.js +28 -11
- package/PageHeader/index.js +270 -74
- package/PageHeader/interface.d.ts +17 -0
- package/Pagination/index.d.ts +4 -3
- package/Pagination/index.js +117 -95
- package/Pagination/lang/en_US.d.ts +3 -2
- package/Pagination/lang/index.d.ts +6 -4
- package/Pagination/lang/zh_CN.d.ts +3 -2
- package/ParauiProvider/index.js +4 -4
- package/PasswordRules/index.js +5 -5
- package/PopConfirm/index.d.ts +15 -5
- package/PopConfirm/index.js +62 -16
- package/Popover/index.js +4 -3
- package/Progress/index.js +10 -9
- package/Querying/index.js +7 -7
- package/README.md +40 -1120
- package/Radio/index.d.ts +7 -0
- package/Radio/index.js +49 -27
- package/RadioGroup/index.d.ts +3 -1
- package/RadioGroup/index.js +48 -21
- package/Search/index.d.ts +3 -15
- package/Search/index.js +21 -83
- package/Select/index.d.ts +7 -2
- package/Select/index.js +114 -91
- package/Select/lang/en_US.d.ts +1 -1
- package/Select/lang/index.d.ts +2 -2
- package/Select/lang/zh_CN.d.ts +1 -1
- package/SelectInput/index.js +8 -7
- package/Selector/index.js +30 -22
- package/SelectorPicker/index.d.ts +5 -0
- package/SelectorPicker/index.js +47 -32
- package/SelectorPicker/lang/en_US.d.ts +1 -0
- package/SelectorPicker/lang/index.d.ts +2 -0
- package/SelectorPicker/lang/zh_CN.d.ts +1 -0
- package/SingleBox/index.js +8 -7
- package/Slider/index.js +5 -5
- package/Status/index.d.ts +6 -5
- package/Status/index.js +27 -4
- package/Stepper/index.d.ts +9 -10
- package/Stepper/index.js +69 -29
- package/Styles/index.scss +4 -0
- package/Styles/scrollbar.scss +24 -24
- package/Styles/theme.scss +104 -57
- package/Switch/index.d.ts +34 -14
- package/Switch/index.js +97 -30
- package/Table/index.js +33 -27
- package/Table/interface.d.ts +3 -1
- package/Table/tableHeadInterface.d.ts +1 -1
- package/Table/tablePaginationInterface.d.ts +5 -5
- package/Tabs/index.d.ts +11 -1
- package/Tabs/index.js +49 -16
- package/Tag/TagGroup.d.ts +11 -7
- package/Tag/index.d.ts +22 -7
- package/Tag/index.js +1382 -53
- package/TextEditor/index.js +4 -3
- package/TextField/index.d.ts +5 -0
- package/TextField/index.js +50 -32
- package/TimePicker/index.d.ts +5 -0
- package/TimePicker/index.js +39 -23
- package/Timeline/TimelineItem.d.ts +1 -1
- package/Timeline/index.d.ts +5 -5
- package/Timeline/index.js +21 -18
- package/Title/index.d.ts +15 -3
- package/Title/index.js +95 -29
- package/ToggleButton/ToggleButtonGroup.d.ts +1 -0
- package/ToggleButton/index.d.ts +4 -0
- package/ToggleButton/index.js +14 -52
- package/Tooltip/index.js +28 -34
- package/Tooltip/interface.d.ts +4 -10
- package/Tooltip/utils.d.ts +1 -3
- package/Transfer/index.d.ts +3 -3
- package/Transfer/index.js +72 -68
- package/Tree/Tree.d.ts +2 -2
- package/Tree/index.js +10 -9
- package/Tree/utils/treeUtil.d.ts +0 -7
- package/Upload/index.js +16 -14
- package/_verture/{constant-66aa48a1.js → constant-0d9802f7.js} +1 -1
- package/_verture/{defineProperty-62acccfc.js → defineProperty-1d116156.js} +1 -1
- package/_verture/index-5c77417d.js +150 -0
- package/_verture/index-68db2bc3.js +10530 -0
- package/_verture/{index-9738004e.js → index-7ec72724.js} +44 -38
- package/_verture/index-d63bd287.js +327 -0
- package/_verture/{index-fa8a0124.js → index-e6f85fd5.js} +7 -8
- package/_verture/{index-77f9e0fb.js → index-e9007d6a.js} +6 -6
- package/_verture/{intl-4a9f1b44.js → intl-5c1ec055.js} +1 -1
- package/_verture/{modalContext-20780c9a.js → modalContext-c12ca3e8.js} +3 -3
- package/_verture/slicedToArray-a8206399.js +43 -0
- package/_verture/{toConsumableArray-81040c9e.js → toConsumableArray-8f4c9589.js} +1 -1
- package/_verture/typeof-adeedc13.js +11 -0
- package/_verture/typeof-b240b062.js +16 -0
- package/_verture/{utils-c9b9a157.js → utils-f0e81540.js} +8 -8
- package/index.d.ts +2 -2
- package/index.js +32 -27
- package/locale/en-US.d.ts +10 -6
- package/locale/index.d.ts +20 -12
- package/locale/index.js +33 -25
- package/locale/zh-CN.d.ts +10 -6
- package/package.json +25 -10
- package/umd/AutoBox.js +20 -21
- package/umd/AutoTips.js +31 -4
- package/umd/Breadcrumbs.js +7 -7
- package/umd/Button.js +7 -8
- package/umd/ButtonGroup.js +7 -8
- package/umd/Carousel.js +29 -1
- package/umd/Cascader.js +20 -21
- package/umd/Checkbox.js +7 -7
- package/umd/CheckboxGroup.js +7 -7
- package/umd/Collapse.js +19 -21
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +7 -7
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +42 -0
- package/umd/DatePicker.js +7 -7
- package/umd/Desktop.js +7 -7
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +7 -8
- package/umd/Dropdown.js +3 -3
- package/umd/DynamicMultiBox.js +7 -7
- package/umd/Empty.js +1 -1
- package/umd/Form.js +6 -6
- package/umd/FormItem.js +6 -6
- package/umd/FunctionModal.js +7 -7
- package/umd/Help.js +7 -7
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +7 -7
- package/umd/InputNumber.js +7 -7
- package/umd/Label.js +7 -7
- package/umd/Loading.js +4 -5
- package/umd/Menu.js +4 -4
- package/umd/Message.js +3 -4
- package/umd/Modal.js +7 -7
- package/umd/MultiBox.js +7 -7
- package/umd/Notification.js +5 -6
- package/umd/OperateBtn.js +7 -7
- package/umd/PageHeader.js +7 -7
- package/umd/Pagination.js +7 -7
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +3 -4
- package/umd/PopConfirm.js +7 -7
- package/umd/Popover.js +31 -4
- package/umd/Progress.js +4 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +7 -7
- package/umd/RadioGroup.js +7 -7
- package/umd/Search.js +7 -7
- package/umd/Select.js +7 -7
- package/umd/SelectInput.js +7 -7
- package/umd/Selector.js +7 -7
- package/umd/SelectorPicker.js +7 -7
- package/umd/SingleBox.js +7 -7
- package/umd/Slider.js +3 -3
- package/umd/Status.js +29 -1
- package/umd/Stepper.js +20 -20
- package/umd/Switch.js +7 -7
- package/umd/Table.js +7 -7
- package/umd/Tabs.js +7 -7
- package/umd/Tag.js +7 -8
- package/umd/TextEditor.js +19 -19
- package/umd/TextField.js +7 -7
- package/umd/TimePicker.js +7 -7
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +42 -1
- package/umd/ToggleButton.js +7 -8
- package/umd/Tooltip.js +31 -4
- package/umd/Transfer.js +8 -8
- package/umd/Tree.js +7 -7
- package/umd/Upload.js +8 -8
- package/umd/locale.js +1 -1
- package/Cascader/lang/en_US.d.ts +0 -4
- package/Cascader/lang/index.d.ts +0 -9
- package/Cascader/lang/zh_CN.d.ts +0 -4
- package/Split/index.d.ts +0 -7
- package/Split/index.js +0 -123
- package/_verture/index-a369ca3f.js +0 -4
- package/_verture/index-beef914f.js +0 -340
- package/_verture/slicedToArray-76060636.js +0 -43
- package/_verture/typeof-498dd2b1.js +0 -11
- package/umd/Split.js +0 -1
package/InputLang/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-
|
|
2
|
-
import { _ as _typeof } from '../_verture/typeof-
|
|
3
|
-
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-
|
|
4
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _defineProperty } from '../_verture/defineProperty-1d116156.js';
|
|
2
|
+
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
3
|
+
import { _ as _toConsumableArray } from '../_verture/toConsumableArray-8f4c9589.js';
|
|
4
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
5
5
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
6
6
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
7
7
|
import { TextField } from '../TextField/index.js';
|
|
@@ -9,9 +9,9 @@ import HelperText from '../HelperText/index.js';
|
|
|
9
9
|
import { MultiBox } from '../MultiBox/index.js';
|
|
10
10
|
import AutoTips from '../AutoTips/index.js';
|
|
11
11
|
import { Popover } from '../Popover/index.js';
|
|
12
|
-
import
|
|
12
|
+
import Internet from '@para-ui/icons/Internet';
|
|
13
13
|
import { GetLanguage, ArrayToObject } from '@paraview/lib';
|
|
14
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
14
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
15
15
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
16
16
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
17
17
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
@@ -21,15 +21,16 @@ import '../Tooltip/index.js';
|
|
|
21
21
|
import 'rc-tooltip';
|
|
22
22
|
import 'rc-tooltip/lib/placements';
|
|
23
23
|
import 'clsx';
|
|
24
|
+
import '@para-ui/icons/Forbid';
|
|
24
25
|
import '@para-ui/icons/Help';
|
|
25
26
|
import '@para-ui/icons/PreviewClose';
|
|
26
27
|
import '@para-ui/icons/PreviewOpen';
|
|
27
|
-
import '@para-ui/icons/
|
|
28
|
+
import '@para-ui/icons/CloseCircleF';
|
|
28
29
|
import '../Loading/index.js';
|
|
29
30
|
import '@para-ui/icons/LoadingF';
|
|
30
31
|
import '../_verture/useGlobalProps-1b846a65.js';
|
|
31
32
|
import '@para-ui/core/GlobalContext';
|
|
32
|
-
import '../_verture/index-
|
|
33
|
+
import '../_verture/index-e9007d6a.js';
|
|
33
34
|
import 'rc-dropdown';
|
|
34
35
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
35
36
|
import 'dayjs';
|
|
@@ -37,24 +38,20 @@ import '@para-ui/icons/Delete';
|
|
|
37
38
|
import '@para-ui/icons/PlusCircleF';
|
|
38
39
|
import '../_verture/useFormatMessage-703f8b20.js';
|
|
39
40
|
|
|
40
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
41
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-input-lang {\n display: inline-block;\n width: 100%;\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n}\n.paraui-v4-input-lang .input-lang-text-field > .text-field-content > .text-field-content-before .lang-key {\n max-width: 100px;\n}\n.paraui-v4-input-lang .input-lang-text-field > .text-field-content > .text-field-content-within > .right-icon .lang-list-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n.paraui-v4-input-lang .input-lang-text-field > .text-field-content > .text-field-content-within > .right-icon .lang-list-icon:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-input-lang .input-lang-text-field > .paraui-v4-helper-text {\n display: none;\n}\n\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner {\n padding: 20px;\n line-height: 0;\n}\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box {\n padding-bottom: 0;\n}\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content .multi-box-content-item .multi-box-content-item-input .multi-box-text-field:first-child {\n flex: 1;\n}\n.paraui-v4-input-lang-popover > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content .multi-box-content-item .multi-box-content-item-input .multi-box-text-field:last-child {\n flex: 3;\n}\n.paraui-v4-input-lang-popover.paraui-v4-input-lang-popover-disabled-add > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-add {\n display: none;\n}\n.paraui-v4-input-lang-popover.paraui-v4-input-lang-popover-disabled-delete > .component-popover-content > .component-popover-inner .input-lang-multi-box .multi-box-content > .multi-box-content-item .opera-box {\n display: none;\n}";
|
|
41
42
|
styleInject(css_248z);
|
|
42
43
|
|
|
43
44
|
var InputLang = function InputLang(props) {
|
|
44
|
-
var
|
|
45
|
-
|
|
45
|
+
var _a;
|
|
46
|
+
var className = props.className,
|
|
46
47
|
style = props.style,
|
|
47
|
-
|
|
48
|
-
label = _props$label === void 0 ? '' : _props$label,
|
|
48
|
+
label = props.label,
|
|
49
49
|
labelTooltip = props.labelTooltip,
|
|
50
50
|
_props$size = props.size,
|
|
51
51
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
placeholderKey = _props$placeholderKey === void 0 ? '' : _props$placeholderKey,
|
|
56
|
-
_props$placeholderVal = props.placeholderValue,
|
|
57
|
-
placeholderValue = _props$placeholderVal === void 0 ? '' : _props$placeholderVal,
|
|
52
|
+
placeholder = props.placeholder,
|
|
53
|
+
placeholderKey = props.placeholderKey,
|
|
54
|
+
placeholderValue = props.placeholderValue,
|
|
58
55
|
_props$error = props.error,
|
|
59
56
|
error = _props$error === void 0 ? false : _props$error,
|
|
60
57
|
hideErrorDom = props.hideErrorDom,
|
|
@@ -69,6 +66,7 @@ var InputLang = function InputLang(props) {
|
|
|
69
66
|
langList = _props$langList === void 0 ? ['zh', 'en'] : _props$langList,
|
|
70
67
|
_props$disabled = props.disabled,
|
|
71
68
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
69
|
+
disabledTooltip = props.disabledTooltip,
|
|
72
70
|
defaultLang = props.defaultLang,
|
|
73
71
|
disabledDelete = props.disabledDelete,
|
|
74
72
|
disabledAdd = props.disabledAdd,
|
|
@@ -99,6 +97,7 @@ var InputLang = function InputLang(props) {
|
|
|
99
97
|
langMapping: {},
|
|
100
98
|
langLabelMapping: {}
|
|
101
99
|
});
|
|
100
|
+
var refDom = useRef(null);
|
|
102
101
|
constData.current.lang = lang;
|
|
103
102
|
constData.current.disabledDelete = disabledDelete;
|
|
104
103
|
useEffect(function () {
|
|
@@ -228,7 +227,7 @@ var InputLang = function InputLang(props) {
|
|
|
228
227
|
cb(arr);
|
|
229
228
|
};
|
|
230
229
|
/** 点击国际化图标 */
|
|
231
|
-
var
|
|
230
|
+
var clickRight = function clickRight() {
|
|
232
231
|
setOpen(true);
|
|
233
232
|
};
|
|
234
233
|
/** 关闭弹窗 */
|
|
@@ -253,18 +252,18 @@ var InputLang = function InputLang(props) {
|
|
|
253
252
|
className: 'lang-key'
|
|
254
253
|
}, {
|
|
255
254
|
children: jsx(AutoTips, Object.assign({
|
|
256
|
-
tipMaxWidth: '
|
|
255
|
+
tipMaxWidth: 'none'
|
|
257
256
|
}, {
|
|
258
257
|
children: ((_a = langMapping[lang]) === null || _a === void 0 ? void 0 : _a.label) || lang
|
|
259
258
|
}))
|
|
260
259
|
}));
|
|
261
260
|
};
|
|
262
261
|
/** 加载更多语言 */
|
|
263
|
-
var
|
|
262
|
+
var RightIcon = useMemo(function () {
|
|
264
263
|
return jsx("div", Object.assign({
|
|
265
264
|
className: "lang-list-icon"
|
|
266
265
|
}, {
|
|
267
|
-
children: jsx(
|
|
266
|
+
children: jsx(Internet, {})
|
|
268
267
|
}));
|
|
269
268
|
}, []);
|
|
270
269
|
/** 处理弹出框className */
|
|
@@ -276,7 +275,7 @@ var InputLang = function InputLang(props) {
|
|
|
276
275
|
return str;
|
|
277
276
|
};
|
|
278
277
|
var handleDisabled = function handleDisabled() {
|
|
279
|
-
if (disabled === true) return;
|
|
278
|
+
if (disabled === true) return true;
|
|
280
279
|
var arr = [];
|
|
281
280
|
if (disabledKey) {
|
|
282
281
|
var bol = _typeof(disabledKey) === 'object';
|
|
@@ -307,7 +306,7 @@ var InputLang = function InputLang(props) {
|
|
|
307
306
|
onChange: changeListLang,
|
|
308
307
|
fetchSuggestionsKey: fetchSuggestionsKey,
|
|
309
308
|
placeholderKey: placeholderKey,
|
|
310
|
-
placeholderValue: placeholderValue
|
|
309
|
+
placeholderValue: placeholderValue || placeholder
|
|
311
310
|
})
|
|
312
311
|
}));
|
|
313
312
|
};
|
|
@@ -324,29 +323,36 @@ var InputLang = function InputLang(props) {
|
|
|
324
323
|
};
|
|
325
324
|
return jsxs("div", Object.assign({
|
|
326
325
|
className: handClass(),
|
|
327
|
-
style: style
|
|
326
|
+
style: style,
|
|
327
|
+
ref: refDom
|
|
328
328
|
}, {
|
|
329
329
|
children: [jsx(Popover, Object.assign({
|
|
330
330
|
placement: "bottom-end",
|
|
331
331
|
visible: open,
|
|
332
332
|
content: langListPopoverContent(),
|
|
333
333
|
onVisibleChange: handleClose,
|
|
334
|
-
overlayClassName: popoverHandClass()
|
|
334
|
+
overlayClassName: popoverHandClass(),
|
|
335
|
+
maxWidth: 'none',
|
|
336
|
+
overlayInnerStyle: {
|
|
337
|
+
minWidth: '440px',
|
|
338
|
+
width: ((_a = refDom.current) === null || _a === void 0 ? void 0 : _a.offsetWidth) + 'px'
|
|
339
|
+
}
|
|
335
340
|
}, {
|
|
336
341
|
children: jsx(TextField, {
|
|
337
342
|
className: 'input-lang-text-field',
|
|
338
343
|
size: size,
|
|
339
344
|
error: error,
|
|
340
345
|
disabled: disabled,
|
|
346
|
+
disabledTooltip: disabledTooltip,
|
|
341
347
|
required: required,
|
|
342
348
|
label: label,
|
|
343
349
|
labelTooltip: labelTooltip,
|
|
344
350
|
placeholder: placeholder,
|
|
345
351
|
value: valueCom[lang] || '',
|
|
346
|
-
|
|
352
|
+
rightIcon: RightIcon,
|
|
347
353
|
addonBefore: AddonBeforeMemo(),
|
|
348
354
|
hideErrorDom: true,
|
|
349
|
-
|
|
355
|
+
onClickIcon: clickRight,
|
|
350
356
|
onChange: changeValue
|
|
351
357
|
})
|
|
352
358
|
})), jsx(HelperText, {
|
package/InputNumber/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { LabelTooltipProps } from "../Label";
|
|
8
8
|
import { HelperTextDetailProps } from "../HelperText";
|
|
9
|
+
import { TooltipProps } from '../Tooltip';
|
|
9
10
|
import './index.scss';
|
|
10
11
|
export interface InputNumberProps extends HelperTextDetailProps {
|
|
11
12
|
/** 样式class */
|
|
@@ -34,6 +35,10 @@ export interface InputNumberProps extends HelperTextDetailProps {
|
|
|
34
35
|
btnMode?: 'lr' | 'tb' | 'none';
|
|
35
36
|
/** 是否禁用 */
|
|
36
37
|
disabled?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 禁用提示
|
|
40
|
+
*/
|
|
41
|
+
disabledTooltip?: TooltipProps;
|
|
37
42
|
/** 禁用加 */
|
|
38
43
|
disabledAdd?: boolean;
|
|
39
44
|
/** 禁用减 */
|
package/InputNumber/index.js
CHANGED
|
@@ -1,25 +1,24 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
2
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
4
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
5
5
|
import RcInputNumber from 'rc-input-number';
|
|
6
6
|
import ExpandLess from '@para-ui/icons/Up';
|
|
7
7
|
import Down from '@para-ui/icons/Down';
|
|
8
|
-
import Minus from '@para-ui/icons/Minus';
|
|
9
|
-
import Plus from '@para-ui/icons/Plus';
|
|
10
8
|
import Label from '../Label/index.js';
|
|
11
9
|
import HelperText from '../HelperText/index.js';
|
|
12
|
-
import {
|
|
10
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
11
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
13
12
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
14
13
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
15
14
|
import '../Help/index.js';
|
|
16
|
-
import '
|
|
15
|
+
import '@para-ui/icons/Help';
|
|
16
|
+
import 'clsx';
|
|
17
17
|
import 'rc-tooltip';
|
|
18
18
|
import 'rc-tooltip/lib/placements';
|
|
19
|
-
import '
|
|
20
|
-
import '@para-ui/icons/Help';
|
|
19
|
+
import '@para-ui/icons/Forbid';
|
|
21
20
|
|
|
22
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-input-number {\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 display: inline-block;\n width: 100%;\n}\n.paraui-v3-input-number > .input-number-content {\n border: 1px solid;\n border-radius: 4px;\n border-color: rgba(171, 176, 185, 0.4);\n display: flex;\n width: 100%;\n position: relative;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v3-input-number > .input-number-content:hover {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-before {\n width: 30px;\n color: rgb(46, 55, 67);\n border-right: 1px solid rgba(171, 176, 185, 0.4);\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within {\n width: 100%;\n position: relative;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component {\n width: 100%;\n height: 100%;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap {\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input {\n width: 100%;\n height: 100%;\n border: 0;\n border-radius: 4px;\n padding: 10px 12px;\n background: transparent;\n font-size: 14px;\n color: rgb(46, 55, 67);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input::-ms-clear {\n display: none;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input::-ms-reveal {\n display: none;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .component.component-out-of-range > .component-input-wrap > input {\n color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n padding: 0 12px;\n color: rgba(46, 55, 67, 0.4);\n cursor: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-within > .input-number-label-placeholder > .input-number-required {\n margin-left: 2px;\n color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number > .input-number-content > .input-number-content-after {\n width: 30px;\n color: rgb(46, 55, 67);\n border-left: 1px solid rgba(171, 176, 185, 0.4);\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within {\n width: calc(100% - 30px);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap {\n position: absolute;\n top: 0;\n right: -30px;\n width: 30px;\n height: 100%;\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n overflow: hidden;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n line-height: 0;\n height: 50%;\n width: 100%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:last-child {\n border-top: 1px solid;\n border-color: rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n line-height: 0;\n height: 50%;\n width: 100%;\n cursor: pointer;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-input-number.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:last-child {\n border-top: 1px solid;\n border-color: rgba(171, 176, 185, 0.2);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within {\n width: calc(100% - 60px);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap {\n position: absolute;\n width: 100%;\n height: 100%;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up {\n position: absolute;\n left: -30px;\n top: 0;\n height: 100%;\n border-bottom-left-radius: 4px;\n border-top-left-radius: 4px;\n overflow: hidden;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .add-btn {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .add-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .add-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 100%;\n cursor: pointer;\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn > svg {\n color: rgba(46, 55, 67, 0.7);\n font-size: 20px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down {\n position: absolute;\n right: -30px;\n top: 0;\n height: 100%;\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n overflow: hidden;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .reduce-btn {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .reduce-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .reduce-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 100%;\n cursor: pointer;\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn > svg {\n color: rgba(46, 55, 67, 0.7);\n font-size: 20px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-focus > .input-number-content {\n border-color: rgb(54, 102, 214);\n}\n.paraui-v3-input-number.paraui-v3-input-number-error > .input-number-content {\n border-color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number.paraui-v3-input-number-error > .input-number-content:hover {\n border-color: rgb(235, 96, 84);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content:hover {\n border-color: rgba(171, 176, 185, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content > .input-number-content-within {\n cursor: not-allowed;\n width: 100%;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-add.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .add-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn {\n cursor: not-allowed;\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn:hover > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-disabled-reduce.paraui-v3-input-number-lr > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .reduce-btn > svg {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-input-number.paraui-v3-input-number-small > .input-number-content {\n height: 28px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-small > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n line-height: 26px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-small.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n font-size: 13px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-small.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n font-size: 13px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium > .input-number-content {\n height: 32px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n line-height: 30px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n font-size: 15px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-medium.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n font-size: 15px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large > .input-number-content {\n height: 36px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n line-height: 34px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n font-size: 17px;\n}\n.paraui-v3-input-number.paraui-v3-input-number-large.paraui-v3-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n font-size: 17px;\n}";
|
|
21
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-input-number {\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 display: inline-block;\n width: 100%;\n /*&.paraui-v4-input-number-lr {\n & > .input-number-content {\n & > .input-number-content-within {\n width: calc(100% - 60px);\n\n & > .component {\n & > .component-handler-wrap {\n position: absolute;\n width: 100%;\n height: 100%;\n\n & > .component-handler-up {\n position: absolute;\n left: -30px;\n top: 0;\n height: 100%;\n border-bottom-left-radius: $radius;\n border-top-left-radius: $radius;\n overflow: hidden;\n // 禁用加\n &.component-handler-up-disabled {\n & > .add-btn {\n cursor: not-allowed;\n\n &:hover {\n & > svg {\n color: $D3;\n }\n }\n\n & > svg {\n color: $D3;\n }\n }\n }\n\n & > .add-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 100%;\n cursor: pointer;\n background-color: $B8;\n\n &:hover {\n & > svg {\n color: $A5;\n }\n }\n\n & > svg {\n color: $D2;\n font-size: 20px;\n }\n }\n }\n\n & > .component-handler-down {\n position: absolute;\n right: -30px;\n top: 0;\n height: 100%;\n border-bottom-right-radius: $radius;\n border-top-right-radius: $radius;\n overflow: hidden;\n // 禁用减\n &.component-handler-down-disabled {\n & > .reduce-btn {\n cursor: not-allowed;\n\n &:hover {\n & > svg {\n color: $D3;\n }\n }\n\n & > svg {\n color: $D3;\n }\n }\n }\n\n & > .reduce-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 30px;\n height: 100%;\n cursor: pointer;\n background-color: $B8;\n\n &:hover {\n & > svg {\n color: $A5;\n }\n }\n\n & > svg {\n color: $D2;\n font-size: 20px;\n }\n }\n }\n }\n }\n }\n }\n }*/\n}\n.paraui-v4-input-number > .input-number-content {\n border: 1px solid;\n border-radius: 4px;\n border-color: rgb(212, 218, 227);\n display: flex;\n width: 100%;\n position: relative;\n background-color: rgb(255, 255, 255);\n}\n.paraui-v4-input-number > .input-number-content:hover {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-before {\n width: 34px;\n color: rgb(92, 101, 115);\n border-right: 1px solid rgb(212, 218, 227);\n border-top-left-radius: 4px;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within {\n width: 100%;\n position: relative;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .component {\n width: 100%;\n height: 100%;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap {\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input {\n width: 100%;\n height: 100%;\n border: 0;\n border-radius: 4px;\n padding: 10px 0 10px 10px;\n background: transparent;\n font-size: 14px;\n color: rgb(29, 33, 38);\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input::-ms-clear {\n display: none;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input::-ms-reveal {\n display: none;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .component.component-out-of-range > .component-input-wrap > input {\n color: rgb(244, 66, 66);\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n width: 100%;\n position: absolute;\n left: 0;\n top: 0;\n height: 100%;\n padding: 0 12px;\n color: rgb(161, 168, 179);\n cursor: text;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-within > .input-number-label-placeholder > .input-number-required {\n margin-left: 2px;\n color: rgb(244, 66, 66);\n}\n.paraui-v4-input-number > .input-number-content > .input-number-content-after {\n width: 34px;\n color: rgb(92, 101, 115);\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within {\n width: calc(100% - 34px);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap {\n position: absolute;\n top: 0;\n right: -34px;\n width: 34px;\n height: 100%;\n border-bottom-right-radius: 4px;\n border-top-right-radius: 4px;\n overflow: hidden;\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up.component-handler-up-disabled > .tb-btn-top > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n line-height: 0;\n height: 50%;\n width: 100%;\n cursor: pointer;\n display: flex;\n align-items: flex-end;\n justify-content: center;\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down.component-handler-down-disabled > .tb-btn-bottom > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n line-height: 0;\n height: 50%;\n width: 100%;\n cursor: pointer;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n color: rgb(87, 131, 235);\n}\n.paraui-v4-input-number.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n color: rgb(92, 101, 115);\n}\n.paraui-v4-input-number.paraui-v4-input-number-focus > .input-number-content {\n border-color: rgb(46, 101, 230);\n}\n.paraui-v4-input-number.paraui-v4-input-number-error > .input-number-content {\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-input-number.paraui-v4-input-number-error > .input-number-content:hover {\n border-color: rgb(244, 66, 66);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content:hover {\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within {\n cursor: not-allowed;\n width: 100%;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-input-wrap > input {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-add {\n /*&.paraui-v4-input-number-lr {\n & > .input-number-content {\n & > .input-number-content-within {\n & > .component {\n & > .component-handler-wrap {\n & > .component-handler-up {\n // 禁用加\n & > .add-btn {\n cursor: not-allowed;\n\n &:hover {\n & > svg {\n color: $D3;\n }\n }\n\n & > svg {\n color: $D3;\n }\n }\n }\n }\n }\n }\n }\n }*/\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-add.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-add.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-add.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-reduce {\n /*&.paraui-v4-input-number-lr {\n & > .input-number-content {\n & > .input-number-content-within {\n & > .component {\n & > .component-handler-wrap {\n & > .component-handler-down {\n // 禁用减\n & > .reduce-btn {\n cursor: not-allowed;\n\n &:hover {\n & > svg {\n color: $D3;\n }\n }\n\n & > svg {\n color: $D3;\n }\n }\n }\n }\n }\n }\n }\n }*/\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-reduce.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom {\n cursor: not-allowed;\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-reduce.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom:hover > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-disabled-reduce.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-input-number.paraui-v4-input-number-small > .input-number-content {\n height: 28px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-small > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n line-height: 26px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-small.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n font-size: 14px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-small.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n font-size: 14px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-medium > .input-number-content {\n height: 28px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-medium > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n line-height: 26px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-medium.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n font-size: 14px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-medium.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n font-size: 14px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-large {\n /*& > .input-number-content {\n height: 36px;\n\n & > .input-number-content-within {\n & > .input-number-label-placeholder {\n line-height: 34px;\n }\n }\n }\n\n &.paraui-v4-input-number-tb {\n & > .input-number-content {\n & > .input-number-content-within {\n & > .component {\n & > .component-handler-wrap {\n & > .component-handler-up {\n & > .tb-btn-top {\n & > svg {\n font-size: 17px;\n }\n }\n }\n\n & > .component-handler-down {\n & > .tb-btn-bottom {\n & > svg {\n font-size: 17px;\n }\n }\n }\n }\n }\n }\n }\n }*/\n}\n.paraui-v4-input-number.paraui-v4-input-number-large > .input-number-content {\n height: 32px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-large > .input-number-content > .input-number-content-within > .input-number-label-placeholder {\n line-height: 30px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-large.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-up > .tb-btn-top > svg {\n font-size: 14px;\n}\n.paraui-v4-input-number.paraui-v4-input-number-large.paraui-v4-input-number-tb > .input-number-content > .input-number-content-within > .component > .component-handler-wrap > .component-handler-down > .tb-btn-bottom > svg {\n font-size: 14px;\n}";
|
|
23
22
|
styleInject(css_248z);
|
|
24
23
|
|
|
25
24
|
var InputNumber = function InputNumber(props) {
|
|
@@ -32,8 +31,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
32
31
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
33
32
|
_props$placeholder = props.placeholder,
|
|
34
33
|
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
|
|
35
|
-
|
|
36
|
-
label = _props$label === void 0 ? '' : _props$label,
|
|
34
|
+
label = props.label,
|
|
37
35
|
labelTooltip = props.labelTooltip,
|
|
38
36
|
_props$labelMode = props.labelMode,
|
|
39
37
|
labelMode = _props$labelMode === void 0 ? 'outside' : _props$labelMode,
|
|
@@ -42,6 +40,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
42
40
|
btnMode = _props$btnMode === void 0 ? 'tb' : _props$btnMode,
|
|
43
41
|
_props$disabled = props.disabled,
|
|
44
42
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
43
|
+
disabledTooltip = props.disabledTooltip,
|
|
45
44
|
_props$readOnly = props.readOnly,
|
|
46
45
|
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
|
47
46
|
_props$disabledAdd = props.disabledAdd,
|
|
@@ -66,7 +65,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
66
65
|
onEnter = props.onEnter,
|
|
67
66
|
onBlur = props.onBlur,
|
|
68
67
|
onFocus = props.onFocus,
|
|
69
|
-
otherProps = __rest(props, ["className", "style", "step", "min", "max", "size", "placeholder", "label", "labelTooltip", "labelMode", "labelSign", "btnMode", "disabled", "readOnly", "disabledAdd", "disabledReduce", "required", "error", "hideErrorDom", "helperText", "keyboard", "autoFocus", "formatter", "parser", "value", "onChange", "onEnter", "onBlur", "onFocus"]);
|
|
68
|
+
otherProps = __rest(props, ["className", "style", "step", "min", "max", "size", "placeholder", "label", "labelTooltip", "labelMode", "labelSign", "btnMode", "disabled", "disabledTooltip", "readOnly", "disabledAdd", "disabledReduce", "required", "error", "hideErrorDom", "helperText", "keyboard", "autoFocus", "formatter", "parser", "value", "onChange", "onEnter", "onBlur", "onFocus"]);
|
|
70
69
|
var _useState = useState(false),
|
|
71
70
|
_useState2 = _slicedToArray(_useState, 2),
|
|
72
71
|
focus = _useState2[0],
|
|
@@ -140,7 +139,6 @@ var InputNumber = function InputNumber(props) {
|
|
|
140
139
|
className: handLabelClass()
|
|
141
140
|
}));
|
|
142
141
|
}
|
|
143
|
-
return null;
|
|
144
142
|
}, [labelMode, label, labelSign, required]);
|
|
145
143
|
/** 处理placeholder, 内标题 */
|
|
146
144
|
var handPlaceholderLabel = function handPlaceholderLabel() {
|
|
@@ -167,78 +165,63 @@ var InputNumber = function InputNumber(props) {
|
|
|
167
165
|
};
|
|
168
166
|
// 后
|
|
169
167
|
var addonAfterDom = function addonAfterDom(bol) {
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
className
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
168
|
+
if (btnMode === 'none') return undefined;
|
|
169
|
+
if (bol) return jsx("span", Object.assign({
|
|
170
|
+
className: "tb-btn-bottom",
|
|
171
|
+
onMouseDown: reduce
|
|
172
|
+
}, {
|
|
173
|
+
children: jsx(Down, {})
|
|
174
|
+
}));
|
|
175
|
+
return jsx("div", {
|
|
176
|
+
className: "input-number-content-after"
|
|
177
|
+
});
|
|
178
|
+
/*if (disabled || readOnly) return undefined;
|
|
179
|
+
// 上下
|
|
180
|
+
if (btnMode === 'tb') {
|
|
181
|
+
if (bol) return (
|
|
182
|
+
<span className="tb-btn-bottom" onMouseDown={reduce}><Down /></span>
|
|
183
|
+
)
|
|
184
|
+
return (
|
|
185
|
+
<div className="input-number-content-after"></div>
|
|
186
|
+
)
|
|
187
|
+
}
|
|
188
|
+
// 左右
|
|
189
|
+
if (btnMode === 'lr') {
|
|
190
|
+
if (bol) return <span className="reduce-btn" onMouseDown={reduce}><Minus /></span>
|
|
191
|
+
return (
|
|
192
|
+
<div className="input-number-content-after"></div>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
return undefined;*/
|
|
196
196
|
};
|
|
197
197
|
// 前
|
|
198
198
|
var addonBeforeDom = function addonBeforeDom(bol) {
|
|
199
|
-
if (
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
children: jsx(ExpandLess, {})
|
|
207
|
-
}));
|
|
208
|
-
return undefined;
|
|
209
|
-
}
|
|
210
|
-
// 左右
|
|
211
|
-
if (btnMode === 'lr') {
|
|
212
|
-
if (bol) return jsx("span", Object.assign({
|
|
213
|
-
className: "add-btn",
|
|
214
|
-
onMouseDown: add
|
|
215
|
-
}, {
|
|
216
|
-
children: jsx(Plus, {})
|
|
217
|
-
}));
|
|
218
|
-
return jsx("div", {
|
|
219
|
-
className: "input-number-content-before"
|
|
220
|
-
});
|
|
221
|
-
}
|
|
199
|
+
if (btnMode === 'none') return undefined;
|
|
200
|
+
if (bol) return jsx("span", Object.assign({
|
|
201
|
+
className: "tb-btn-top",
|
|
202
|
+
onMouseDown: add
|
|
203
|
+
}, {
|
|
204
|
+
children: jsx(ExpandLess, {})
|
|
205
|
+
}));
|
|
222
206
|
return undefined;
|
|
207
|
+
/*if (disabled || readOnly) return undefined;
|
|
208
|
+
// 上下
|
|
209
|
+
if (btnMode === 'tb') {
|
|
210
|
+
if (bol) return <span className="tb-btn-top" onMouseDown={add}><ExpandLess /></span>
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
// 左右
|
|
214
|
+
if (btnMode === 'lr') {
|
|
215
|
+
if (bol) return <span className="add-btn" onMouseDown={add}><Plus /></span>;
|
|
216
|
+
return (
|
|
217
|
+
<div className="input-number-content-before"></div>
|
|
218
|
+
);
|
|
219
|
+
}
|
|
220
|
+
return undefined;*/
|
|
223
221
|
};
|
|
224
|
-
/**
|
|
225
|
-
var
|
|
226
|
-
|
|
227
|
-
if (className) str += ' ' + className;
|
|
228
|
-
if (size) str += " ".concat($prefixCls, "-input-number-").concat(size);
|
|
229
|
-
if (btnMode) str += " ".concat($prefixCls, "-input-number-").concat(btnMode);
|
|
230
|
-
if (focus) str += " ".concat($prefixCls, "-input-number-focus");
|
|
231
|
-
if (disabled) str += " ".concat($prefixCls, "-input-number-disabled");
|
|
232
|
-
if (disabledAdd) str += " ".concat($prefixCls, "-input-number-disabled-add");
|
|
233
|
-
if (disabledReduce) str += " ".concat($prefixCls, "-input-number-disabled-reduce");
|
|
234
|
-
if (error) str += " ".concat($prefixCls, "-input-number-error");
|
|
235
|
-
return str;
|
|
236
|
-
};
|
|
237
|
-
return jsxs("div", Object.assign({
|
|
238
|
-
className: handClass(),
|
|
239
|
-
style: style
|
|
240
|
-
}, {
|
|
241
|
-
children: [outSideMemo, jsxs("div", Object.assign({
|
|
222
|
+
/** 内容渲染 */
|
|
223
|
+
var contentRender = function contentRender() {
|
|
224
|
+
return jsxs("div", Object.assign({
|
|
242
225
|
className: "input-number-content"
|
|
243
226
|
}, {
|
|
244
227
|
children: [addonBeforeDom(), jsxs("div", Object.assign({
|
|
@@ -265,7 +248,39 @@ var InputNumber = function InputNumber(props) {
|
|
|
265
248
|
onPressEnter: onEnter
|
|
266
249
|
}, otherProps)), handPlaceholderLabel()]
|
|
267
250
|
})), addonAfterDom()]
|
|
268
|
-
}))
|
|
251
|
+
}));
|
|
252
|
+
};
|
|
253
|
+
/** 处理内容 */
|
|
254
|
+
var handleContent = function handleContent() {
|
|
255
|
+
if (disabledTooltip) {
|
|
256
|
+
return jsx(Tooltip, Object.assign({
|
|
257
|
+
disabled: true
|
|
258
|
+
}, disabledTooltip, {
|
|
259
|
+
children: contentRender()
|
|
260
|
+
}));
|
|
261
|
+
}
|
|
262
|
+
return contentRender();
|
|
263
|
+
};
|
|
264
|
+
/** 处理class */
|
|
265
|
+
var handClass = function handClass() {
|
|
266
|
+
var str = $prefixCls + '-input-number ';
|
|
267
|
+
if (className) str += ' ' + className;
|
|
268
|
+
if (size) str += " ".concat($prefixCls, "-input-number-").concat(size);
|
|
269
|
+
if (btnMode) {
|
|
270
|
+
str += " ".concat($prefixCls, "-input-number-").concat(btnMode === 'none' ? 'none' : 'tb');
|
|
271
|
+
}
|
|
272
|
+
if (focus) str += " ".concat($prefixCls, "-input-number-focus");
|
|
273
|
+
if (disabled) str += " ".concat($prefixCls, "-input-number-disabled");
|
|
274
|
+
if (disabledAdd) str += " ".concat($prefixCls, "-input-number-disabled-add");
|
|
275
|
+
if (disabledReduce) str += " ".concat($prefixCls, "-input-number-disabled-reduce");
|
|
276
|
+
if (error) str += " ".concat($prefixCls, "-input-number-error");
|
|
277
|
+
return str;
|
|
278
|
+
};
|
|
279
|
+
return jsxs("div", Object.assign({
|
|
280
|
+
className: handClass(),
|
|
281
|
+
style: style
|
|
282
|
+
}, {
|
|
283
|
+
children: [outSideMemo, handleContent(), jsx(HelperText, {
|
|
269
284
|
className: "input-number-error-text",
|
|
270
285
|
error: error,
|
|
271
286
|
helperText: helperText,
|
package/Label/index.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import Help from '../Help/index.js';
|
|
4
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
4
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
6
|
import '../Tooltip/index.js';
|
|
7
|
-
import '../_verture/slicedToArray-
|
|
7
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
8
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
9
|
import 'react';
|
|
10
10
|
import 'rc-tooltip';
|
|
11
11
|
import 'rc-tooltip/lib/placements';
|
|
12
12
|
import 'clsx';
|
|
13
|
+
import '@para-ui/icons/Forbid';
|
|
13
14
|
import '@para-ui/icons/Help';
|
|
14
15
|
|
|
15
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/3/23 8:29 PM\n* @description 标题\n*/\n/**\n* @author
|
|
16
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/3/23 8:29 PM\n* @description 标题\n*/\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-label {\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 color: rgb(92, 101, 115);\n margin-bottom: 4px;\n display: inline-block;\n line-height: 1.43;\n word-break: break-all;\n}\n.paraui-v4-label > .label-required {\n margin-left: 2px;\n color: rgb(244, 66, 66);\n}\n.paraui-v4-label > .paraui-v4-help {\n vertical-align: top;\n margin-left: 4px;\n}\n.paraui-v4-label > .paraui-v4-help svg {\n vertical-align: top;\n position: relative;\n top: 2px;\n}\n.paraui-v4-label.paraui-v4-label-line.paraui-v4-label-tooltip {\n border-bottom: 1px dashed rgb(161, 168, 179);\n padding-bottom: 2px;\n}";
|
|
16
17
|
styleInject(css_248z);
|
|
17
18
|
|
|
18
19
|
var Label = function Label(props) {
|
package/Loading/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useRef, useEffect } from 'react';
|
|
3
3
|
import LoadingOutlined from '@para-ui/icons/LoadingF';
|
|
4
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
4
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
6
|
|
|
7
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
7
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-loading {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n}\n@keyframes rotateLoading {\n 0% {\n transformOrigin: 50% 50%;\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.paraui-v4-loading .loading-mask {\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: white;\n z-index: 100;\n}\n.paraui-v4-loading .loading-box {\n position: absolute;\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 101;\n}\n.paraui-v4-loading .loading-box > svg {\n transition: all 0.3s ease-in-out;\n animation: rotateLoading 1s infinite linear;\n font-size: 20px;\n}";
|
|
8
8
|
styleInject(css_248z);
|
|
9
9
|
|
|
10
10
|
var Loading = function Loading(props) {
|