@para-ui/core 4.0.0-rc.4 → 4.0.0-rc.5
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 +72 -85
- package/AutoTips/index.js +72 -95
- package/Badge/index.js +17 -16
- package/Breadcrumbs/index.js +57 -73
- package/Button/index.js +89 -117
- package/ButtonGroup/index.js +30 -33
- package/Carousel/index.js +29 -33
- package/Cascader/index.js +7 -9
- package/Checkbox/index.js +28 -35
- package/CheckboxGroup/index.js +43 -58
- package/Collapse/index.js +52 -49
- package/CollapseBox/index.js +65 -70
- package/CollapseLayout/index.js +106 -101
- package/ColorPicker/index.js +3 -3
- package/ComboSelect/index.js +242 -330
- package/Container/index.js +17 -21
- package/CopyText/index.js +50 -83
- package/DatePicker/index.js +22 -27
- package/Descriptions/index.js +50 -59
- package/Desktop/index.js +161 -180
- package/DragVerify/index.js +77 -113
- package/Drawer/index.js +80 -95
- package/Dropdown/index.js +3 -3
- package/DynamicMultiBox/index.js +219 -224
- package/DynamicMultiBox/interface.d.ts +7 -0
- package/Empty/index.js +26 -28
- package/Form/index.js +66 -74
- package/FormItem/index.js +14 -15
- package/FunctionModal/index.js +7 -14
- package/GlobalContext/index.js +17 -20
- package/Help/index.js +9 -12
- package/HelperText/index.js +11 -11
- package/InputLang/index.js +104 -124
- package/InputNumber/index.js +62 -81
- package/Label/index.js +19 -21
- package/Loading/index.js +11 -10
- package/Menu/index.js +302 -371
- package/Message/index.js +104 -113
- package/Modal/index.js +122 -148
- package/MultiBox/index.d.ts +5 -0
- package/MultiBox/index.js +111 -115
- package/Notification/index.js +105 -103
- package/OperateBtn/index.d.ts +3 -0
- package/OperateBtn/index.js +77 -107
- package/PageHeader/index.js +327 -406
- package/Pagination/index.js +107 -137
- package/ParauiProvider/index.js +20 -22
- package/PasswordRules/index.js +36 -40
- package/PopConfirm/index.js +60 -77
- package/Popover/index.js +12 -12
- package/Progress/index.js +72 -74
- package/Querying/index.js +22 -23
- package/README.md +2 -0
- package/Radio/index.js +27 -34
- package/RadioGroup/index.js +38 -52
- package/Search/index.js +34 -43
- package/Select/index.js +281 -345
- package/SelectInput/index.js +8 -13
- package/Selector/index.js +905 -796
- package/SelectorPicker/index.js +111 -133
- package/SingleBox/index.d.ts +5 -0
- package/SingleBox/index.js +92 -88
- package/Slider/index.js +46 -57
- package/Status/index.js +14 -13
- package/Stepper/index.js +25 -26
- package/Styles/theme.scss +9 -9
- package/Switch/index.js +32 -35
- package/Table/index.js +767 -963
- package/Tabs/index.js +102 -102
- package/Tag/index.js +115 -162
- package/TextEditor/index.js +81 -103
- package/TextField/index.js +142 -183
- package/TimePicker/index.js +27 -28
- package/Timeline/index.js +67 -58
- package/Title/index.js +32 -34
- package/ToggleButton/index.js +53 -52
- package/Tooltip/index.js +79 -82
- package/Transfer/index.js +159 -201
- package/Tree/index.js +7 -12
- package/Upload/index.js +523 -758
- package/Upload/interface.d.ts +2 -0
- package/_verture/{constant-0d9802f7.js → constant-5317fc89.js} +2 -2
- package/_verture/{index-5a7e2438.js → index-0ced30f7.js} +1127 -1079
- package/_verture/{index-024bbc9b.js → index-775ad32d.js} +29 -25
- package/_verture/{index-05f7bf11.js → index-c568f272.js} +2 -2
- package/_verture/index-da9097d3.js +239 -0
- package/_verture/{index-9331b116.js → index-ef1235fb.js} +125 -134
- package/_verture/{index-b1f80962.js → index-f186b5e8.js} +314 -398
- package/_verture/intl-f2f27722.js +69 -0
- package/_verture/{modalContext-736ff215.js → modalContext-5df08980.js} +36 -64
- package/_verture/{slicedToArray-a8206399.js → slicedToArray-8223a2ef.js} +15 -2
- package/_verture/{useFormatMessage-703f8b20.js → useFormatMessage-eb13cf56.js} +5 -4
- package/_verture/{useGlobalProps-1b846a65.js → useGlobalProps-1e416658.js} +4 -3
- package/_verture/{usePopupContainer-87febeb9.js → usePopupContainer-635f66f4.js} +16 -15
- package/_verture/{util-7e1fb1e2.js → util-82646c4f.js} +5 -4
- package/_verture/{utils-418da0a4.js → utils-46e99c9a.js} +34 -25
- package/index.js +21 -22
- package/locale/index.js +6 -6
- package/package.json +1 -1
- package/umd/AutoBox.js +9 -8
- package/umd/AutoTips.js +9 -8
- package/umd/Badge.js +1 -1
- package/umd/Breadcrumbs.js +9 -8
- package/umd/Button.js +9 -8
- package/umd/ButtonGroup.js +9 -8
- package/umd/Carousel.js +5 -5
- package/umd/Cascader.js +9 -8
- package/umd/Checkbox.js +9 -8
- package/umd/CheckboxGroup.js +9 -8
- package/umd/Collapse.js +8 -7
- package/umd/CollapseBox.js +1 -1
- package/umd/CollapseLayout.js +4 -4
- package/umd/ColorPicker.js +1 -1
- package/umd/ComboSelect.js +9 -8
- package/umd/Container.js +1 -1
- package/umd/CopyText.js +9 -8
- package/umd/DatePicker.js +9 -8
- package/umd/Descriptions.js +9 -8
- package/umd/Desktop.js +9 -8
- package/umd/DragVerify.js +4 -4
- package/umd/Drawer.js +9 -8
- package/umd/Dropdown.js +6 -5
- package/umd/DynamicMultiBox.js +11 -10
- package/umd/Empty.js +1 -1
- package/umd/Form.js +9 -8
- package/umd/FormItem.js +9 -8
- package/umd/FunctionModal.js +9 -8
- package/umd/GlobalContext.js +1 -1
- package/umd/Help.js +9 -8
- package/umd/HelperText.js +1 -1
- package/umd/InputLang.js +9 -8
- package/umd/InputNumber.js +9 -8
- package/umd/Label.js +9 -8
- package/umd/Loading.js +4 -4
- package/umd/Menu.js +4 -4
- package/umd/Message.js +4 -4
- package/umd/Modal.js +9 -8
- package/umd/MultiBox.js +9 -8
- package/umd/Notification.js +8 -7
- package/umd/OperateBtn.js +9 -8
- package/umd/PageHeader.js +9 -8
- package/umd/Pagination.js +9 -8
- package/umd/ParauiProvider.js +1 -1
- package/umd/PasswordRules.js +4 -4
- package/umd/PopConfirm.js +9 -8
- package/umd/Popover.js +9 -8
- package/umd/Progress.js +5 -5
- package/umd/Querying.js +1 -1
- package/umd/Radio.js +9 -8
- package/umd/RadioGroup.js +9 -8
- package/umd/Search.js +9 -8
- package/umd/Select.js +9 -8
- package/umd/SelectInput.js +9 -8
- package/umd/Selector.js +9 -8
- package/umd/SelectorPicker.js +9 -8
- package/umd/SingleBox.js +9 -8
- package/umd/Slider.js +6 -5
- package/umd/Status.js +4 -4
- package/umd/Stepper.js +9 -8
- package/umd/Switch.js +9 -8
- package/umd/Table.js +9 -8
- package/umd/Tabs.js +9 -8
- package/umd/Tag.js +9 -8
- package/umd/TextEditor.js +22 -21
- package/umd/TextField.js +9 -8
- package/umd/TimePicker.js +9 -8
- package/umd/Timeline.js +1 -1
- package/umd/Title.js +9 -8
- package/umd/ToggleButton.js +9 -8
- package/umd/Tooltip.js +9 -8
- package/umd/Transfer.js +10 -9
- package/umd/Tree.js +9 -8
- package/umd/Upload.js +10 -9
- package/umd/locale.js +1 -1
- package/_verture/index-232d890b.js +0 -327
- package/_verture/index-e9007d6a.js +0 -236
- package/_verture/intl-5c1ec055.js +0 -81
- package/_verture/toConsumableArray-8f4c9589.js +0 -19
- package/_verture/unsupportedIterableToArray-cb478f24.js +0 -16
package/InputNumber/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
1
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
3
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
3
|
import { useState, useRef, useEffect, useMemo } from 'react';
|
|
@@ -8,9 +7,8 @@ import Down from '@para-ui/icons/Down';
|
|
|
8
7
|
import Label from '../Label/index.js';
|
|
9
8
|
import HelperText from '../HelperText/index.js';
|
|
10
9
|
import { Tooltip } from '../Tooltip/index.js';
|
|
11
|
-
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-
|
|
10
|
+
import { a as $rcPrefixCls, $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
12
11
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
13
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
14
12
|
import '../Help/index.js';
|
|
15
13
|
import '@para-ui/icons/Help';
|
|
16
14
|
import 'clsx';
|
|
@@ -21,113 +19,96 @@ import '@para-ui/icons/Forbid';
|
|
|
21
19
|
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: $ND3;\n }\n }\n\n & > svg {\n color: $ND3;\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: $NA5;\n }\n }\n\n & > svg {\n color: $ND2;\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: $ND3;\n }\n }\n\n & > svg {\n color: $ND3;\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: $NA5;\n }\n }\n\n & > svg {\n color: $ND2;\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(46, 101, 230);\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(46, 101, 230);\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(46, 101, 230);\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 color: rgb(92, 101, 115);\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: $ND3;\n }\n }\n\n & > svg {\n color: $ND3;\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: $ND3;\n }\n }\n\n & > svg {\n color: $ND3;\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}";
|
|
22
20
|
styleInject(css_248z);
|
|
23
21
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
_props$keyboard = props.keyboard,
|
|
60
|
-
keyboard = _props$keyboard === void 0 ? true : _props$keyboard,
|
|
61
|
-
_props$autoFocus = props.autoFocus,
|
|
62
|
-
autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
|
|
63
|
-
formatter = props.formatter,
|
|
64
|
-
parser = props.parser,
|
|
65
|
-
value = props.value,
|
|
66
|
-
onChange = props.onChange,
|
|
67
|
-
onEnter = props.onEnter,
|
|
68
|
-
onBlur = props.onBlur,
|
|
69
|
-
onFocus = props.onFocus,
|
|
22
|
+
const InputNumber = props => {
|
|
23
|
+
const {
|
|
24
|
+
className,
|
|
25
|
+
style,
|
|
26
|
+
step,
|
|
27
|
+
min,
|
|
28
|
+
max,
|
|
29
|
+
size = 'large',
|
|
30
|
+
placeholder = '',
|
|
31
|
+
label,
|
|
32
|
+
labelTooltip,
|
|
33
|
+
labelMode = 'outside',
|
|
34
|
+
labelSign,
|
|
35
|
+
btnMode = 'tb',
|
|
36
|
+
disabled = false,
|
|
37
|
+
disabledTooltip,
|
|
38
|
+
disabledTooltipAdd,
|
|
39
|
+
disabledTooltipReduce,
|
|
40
|
+
readOnly = false,
|
|
41
|
+
disabledAdd = false,
|
|
42
|
+
disabledReduce = false,
|
|
43
|
+
required = false,
|
|
44
|
+
error = false,
|
|
45
|
+
hideErrorDom,
|
|
46
|
+
helperText = '',
|
|
47
|
+
keyboard = true,
|
|
48
|
+
autoFocus = false,
|
|
49
|
+
formatter,
|
|
50
|
+
parser,
|
|
51
|
+
value,
|
|
52
|
+
onChange,
|
|
53
|
+
onEnter,
|
|
54
|
+
onBlur,
|
|
55
|
+
onFocus
|
|
56
|
+
} = props,
|
|
70
57
|
otherProps = __rest(props, ["className", "style", "step", "min", "max", "size", "placeholder", "label", "labelTooltip", "labelMode", "labelSign", "btnMode", "disabled", "disabledTooltip", "disabledTooltipAdd", "disabledTooltipReduce", "readOnly", "disabledAdd", "disabledReduce", "required", "error", "hideErrorDom", "helperText", "keyboard", "autoFocus", "formatter", "parser", "value", "onChange", "onEnter", "onBlur", "onFocus"]);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
var _useState3 = useState(),
|
|
76
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
77
|
-
valueCom = _useState4[0],
|
|
78
|
-
setValueCom = _useState4[1];
|
|
79
|
-
var inputRef = useRef(null);
|
|
80
|
-
useEffect(function () {
|
|
58
|
+
const [focus, setFocus] = useState(false); // 是否获取焦点
|
|
59
|
+
const [valueCom, setValueCom] = useState();
|
|
60
|
+
const inputRef = useRef(null);
|
|
61
|
+
useEffect(() => {
|
|
81
62
|
if (props.defaultValue !== undefined) setValueCom(props.defaultValue);
|
|
82
63
|
}, []);
|
|
83
64
|
// 监听value
|
|
84
|
-
useEffect(
|
|
65
|
+
useEffect(() => {
|
|
85
66
|
if (value !== undefined) {
|
|
86
67
|
setValueCom(value);
|
|
87
68
|
}
|
|
88
69
|
}, [value]);
|
|
89
|
-
|
|
70
|
+
const handValue = () => {
|
|
90
71
|
if (props.value === undefined) return valueCom;
|
|
91
72
|
return value;
|
|
92
73
|
};
|
|
93
|
-
|
|
74
|
+
const add = e => {
|
|
94
75
|
if (disabled || disabledAdd || readOnly) {
|
|
95
76
|
e.stopPropagation();
|
|
96
77
|
}
|
|
97
78
|
};
|
|
98
|
-
|
|
79
|
+
const reduce = e => {
|
|
99
80
|
if (disabled || disabledReduce || readOnly) {
|
|
100
81
|
e.stopPropagation();
|
|
101
82
|
}
|
|
102
83
|
};
|
|
103
|
-
|
|
84
|
+
const clickPlaceholder = () => {
|
|
104
85
|
if (disabled || readOnly) return;
|
|
105
|
-
|
|
86
|
+
const dom = inputRef && inputRef.current;
|
|
106
87
|
dom.focus();
|
|
107
88
|
};
|
|
108
89
|
/** 得到焦点 */
|
|
109
|
-
|
|
90
|
+
const onFocusCom = event => {
|
|
110
91
|
setFocus(true);
|
|
111
92
|
onFocus && onFocus(event);
|
|
112
93
|
};
|
|
113
94
|
/** 失去焦点 */
|
|
114
|
-
|
|
95
|
+
const onBlurCom = event => {
|
|
115
96
|
setFocus(false);
|
|
116
97
|
onBlur && onBlur(event);
|
|
117
98
|
};
|
|
118
99
|
/** 改变事件 */
|
|
119
|
-
|
|
100
|
+
const onChangeCom = val => {
|
|
120
101
|
if (props.value === undefined) {
|
|
121
102
|
setValueCom(val);
|
|
122
103
|
}
|
|
123
104
|
onChange && onChange(val);
|
|
124
105
|
};
|
|
125
106
|
/** 外标题 */
|
|
126
|
-
|
|
127
|
-
|
|
107
|
+
const outSideMemo = useMemo(() => {
|
|
108
|
+
const showTag = Boolean(required || labelSign || label);
|
|
128
109
|
if (labelMode === 'outside' && showTag) {
|
|
129
|
-
|
|
130
|
-
|
|
110
|
+
const handLabelClass = () => {
|
|
111
|
+
let str = 'input-number-label';
|
|
131
112
|
if (labelTooltip && labelTooltip.className) {
|
|
132
113
|
str += " ".concat(labelTooltip.className);
|
|
133
114
|
}
|
|
@@ -143,10 +124,10 @@ var InputNumber = function InputNumber(props) {
|
|
|
143
124
|
}
|
|
144
125
|
}, [labelMode, label, labelSign, required]);
|
|
145
126
|
/** 处理placeholder, 内标题 */
|
|
146
|
-
|
|
147
|
-
|
|
127
|
+
const handPlaceholderLabel = () => {
|
|
128
|
+
const val = handValue();
|
|
148
129
|
if (focus || val !== undefined && val !== null) return undefined; // 得到焦点不显示 或者 (存在val值)
|
|
149
|
-
|
|
130
|
+
const handPlaceholderCom = () => {
|
|
150
131
|
if (labelMode === 'outside') return placeholder; // 外标题只返回placeholder
|
|
151
132
|
return jsxs(Fragment, {
|
|
152
133
|
children: [label || placeholder, required && jsx("span", Object.assign({
|
|
@@ -166,7 +147,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
166
147
|
}));
|
|
167
148
|
};
|
|
168
149
|
// 后
|
|
169
|
-
|
|
150
|
+
const addonAfterDom = bol => {
|
|
170
151
|
if (btnMode === 'none') return undefined;
|
|
171
152
|
if (bol) return jsx(Tooltip, Object.assign({
|
|
172
153
|
disabled: true,
|
|
@@ -202,7 +183,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
202
183
|
return undefined;*/
|
|
203
184
|
};
|
|
204
185
|
// 前
|
|
205
|
-
|
|
186
|
+
const addonBeforeDom = bol => {
|
|
206
187
|
if (btnMode === 'none') return undefined;
|
|
207
188
|
if (bol) return jsx(Tooltip, Object.assign({
|
|
208
189
|
disabled: true,
|
|
@@ -232,7 +213,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
232
213
|
return undefined;*/
|
|
233
214
|
};
|
|
234
215
|
/** 内容渲染 */
|
|
235
|
-
|
|
216
|
+
const contentRender = () => {
|
|
236
217
|
return jsxs("div", Object.assign({
|
|
237
218
|
className: "input-number-content"
|
|
238
219
|
}, {
|
|
@@ -263,7 +244,7 @@ var InputNumber = function InputNumber(props) {
|
|
|
263
244
|
}));
|
|
264
245
|
};
|
|
265
246
|
/** 处理内容 */
|
|
266
|
-
|
|
247
|
+
const handleContent = () => {
|
|
267
248
|
if (disabledTooltip) {
|
|
268
249
|
return jsx(Tooltip, Object.assign({
|
|
269
250
|
disabled: true
|
|
@@ -274,8 +255,8 @@ var InputNumber = function InputNumber(props) {
|
|
|
274
255
|
return contentRender();
|
|
275
256
|
};
|
|
276
257
|
/** 处理class */
|
|
277
|
-
|
|
278
|
-
|
|
258
|
+
const handClass = () => {
|
|
259
|
+
let str = "".concat($prefixCls, "-input-number ");
|
|
279
260
|
if (className) str += " ".concat(className);
|
|
280
261
|
if (size) str += " ".concat($prefixCls, "-input-number-").concat(size);
|
|
281
262
|
if (btnMode) {
|
package/Label/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
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-5317fc89.js';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
6
|
import '../Tooltip/index.js';
|
|
7
|
-
import '../_verture/slicedToArray-a8206399.js';
|
|
8
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
9
7
|
import 'react';
|
|
10
8
|
import 'rc-tooltip';
|
|
11
9
|
import 'rc-tooltip/lib/placements';
|
|
@@ -16,31 +14,31 @@ import '@para-ui/icons/Help';
|
|
|
16
14
|
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}";
|
|
17
15
|
styleInject(css_248z);
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
const Label = props => {
|
|
18
|
+
const {
|
|
19
|
+
className,
|
|
20
|
+
helpClassName,
|
|
21
|
+
style,
|
|
22
|
+
label,
|
|
23
|
+
labelSign,
|
|
24
|
+
required = false,
|
|
25
|
+
tooltip,
|
|
26
|
+
tooltipType = 'icon',
|
|
27
|
+
placement,
|
|
28
|
+
arrow,
|
|
29
|
+
tooltipIcon,
|
|
30
|
+
onClick
|
|
31
|
+
} = props,
|
|
34
32
|
othersProps = __rest(props, ["className", "helpClassName", "style", "label", "labelSign", "required", "tooltip", "tooltipType", "placement", "arrow", "tooltipIcon", "onClick"]);
|
|
35
33
|
// 处理class
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
const handClass = () => {
|
|
35
|
+
let str = "".concat($prefixCls, "-label");
|
|
38
36
|
if (tooltipType) str += " ".concat($prefixCls, "-label-").concat(tooltipType);
|
|
39
37
|
if (tooltip) str += " ".concat($prefixCls, "-label-tooltip");
|
|
40
38
|
if (className) str += " ".concat(className);
|
|
41
39
|
return str;
|
|
42
40
|
};
|
|
43
|
-
|
|
41
|
+
const onClickCom = e => {
|
|
44
42
|
onClick && onClick(e);
|
|
45
43
|
};
|
|
46
44
|
return jsxs(Fragment, {
|
package/Loading/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
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-5317fc89.js';
|
|
5
5
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
6
6
|
|
|
7
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
opacity =
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
const Loading = props => {
|
|
11
|
+
const {
|
|
12
|
+
className,
|
|
13
|
+
style,
|
|
14
|
+
opacity = 0.7
|
|
15
|
+
} = props;
|
|
16
|
+
const dom = useRef(null);
|
|
17
|
+
useEffect(() => {
|
|
17
18
|
if (dom && dom.current && dom.current.parentNode) {
|
|
18
19
|
if (!dom.current.parentNode.style.position) {
|
|
19
20
|
dom.current.parentNode.style.position = 'relative';
|
|
@@ -21,8 +22,8 @@ var Loading = function Loading(props) {
|
|
|
21
22
|
}
|
|
22
23
|
}, []);
|
|
23
24
|
// 处理class
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
const handClass = () => {
|
|
26
|
+
let str = "".concat($prefixCls, "-loading");
|
|
26
27
|
if (className) str += " ".concat(className);
|
|
27
28
|
return str;
|
|
28
29
|
};
|