@para-ui/core 3.0.86 → 4.0.0-alpha
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 -11
- 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/Radio/index.d.ts
CHANGED
|
@@ -5,12 +5,15 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { LabelTooltipProps } from '../Label';
|
|
8
|
+
import { TooltipProps } from "../Tooltip";
|
|
8
9
|
import './index.scss';
|
|
9
10
|
export interface RadioProps {
|
|
10
11
|
/** 样式class */
|
|
11
12
|
className?: string;
|
|
12
13
|
/** style */
|
|
13
14
|
style?: React.CSSProperties;
|
|
15
|
+
/** 宽度 */
|
|
16
|
+
width?: string;
|
|
14
17
|
/** 标题 */
|
|
15
18
|
label?: ReactNode;
|
|
16
19
|
/** 帮组提示信息 */
|
|
@@ -23,6 +26,10 @@ export interface RadioProps {
|
|
|
23
26
|
checked?: boolean;
|
|
24
27
|
/** 禁用 */
|
|
25
28
|
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* 禁用提示
|
|
31
|
+
*/
|
|
32
|
+
disabledTooltip?: TooltipProps;
|
|
26
33
|
/** inputProps */
|
|
27
34
|
inputProps?: {
|
|
28
35
|
type?: string;
|
package/Radio/index.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import Label from '../Label/index.js';
|
|
5
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
5
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
6
|
+
import { Tooltip } from '../Tooltip/index.js';
|
|
6
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
8
9
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
9
10
|
import '../Help/index.js';
|
|
10
|
-
import '
|
|
11
|
+
import '@para-ui/icons/Help';
|
|
12
|
+
import 'clsx';
|
|
11
13
|
import 'rc-tooltip';
|
|
12
14
|
import 'rc-tooltip/lib/placements';
|
|
13
|
-
import '
|
|
14
|
-
import '@para-ui/icons/Help';
|
|
15
|
+
import '@para-ui/icons/Forbid';
|
|
15
16
|
|
|
16
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
17
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-radio {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n cursor: pointer;\n display: inline-flex;\n align-items: flex-start;\n line-height: 16px;\n}\n.paraui-v4-radio:hover {\n /*& > .radio-label {\n color: $PT8;\n cursor: pointer;\n\n svg {\n color: $PT8;\n }\n }*/\n /*& > .radio-help {\n & > .radio-label {\n color: $P1;\n cursor: pointer;\n\n svg {\n color: $P1;\n }\n }\n }*/\n}\n.paraui-v4-radio:hover > .radio-box > .radio-box-inner {\n border-color: rgb(87, 131, 235);\n}\n.paraui-v4-radio > .radio-box {\n position: relative;\n}\n.paraui-v4-radio > .radio-box > input {\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner {\n position: relative;\n top: 0;\n left: 0;\n display: block;\n background-color: white;\n border: 1px solid rgb(212, 218, 227);\n border-radius: 50%;\n}\n.paraui-v4-radio > .radio-box > .radio-box-inner:after {\n position: absolute;\n display: table;\n content: \" \";\n transform: scale(1) translate(-50%, -50%);\n background-color: white;\n border-radius: 50%;\n left: 50%;\n top: 50%;\n}\n.paraui-v4-radio > .radio-label {\n color: rgb(29, 33, 38);\n padding: 0 8px;\n margin: 0;\n display: inline-flex;\n align-items: flex-start;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio > .radio-label > .radio-help > svg {\n top: 0;\n}\n.paraui-v4-radio .radio-label {\n line-height: 16px;\n}\n.paraui-v4-radio > .radio-help {\n padding: 0 8px;\n position: relative;\n top: -1px;\n overflow: hidden;\n}\n.paraui-v4-radio > .radio-help > .radio-label {\n width: 100%;\n color: rgb(29, 33, 38);\n margin: 0;\n display: inline-flex;\n align-items: center;\n overflow: hidden;\n cursor: pointer;\n}\n.paraui-v4-radio.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(46, 101, 230);\n}\n.paraui-v4-radio.paraui-v4-radio-checked:hover > .radio-box > .radio-box-inner {\n border-color: transparent;\n background-color: rgb(87, 131, 235);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled {\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled:hover > .radio-box > .radio-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-label svg {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > input {\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > .radio-box-inner {\n background-color: rgb(234, 236, 241);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-box > .radio-box-inner:after {\n background-color: rgb(234, 236, 241);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner {\n background-color: rgb(212, 218, 227);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner:hover > .radio-box > .radio-box-inner {\n background-color: rgb(212, 218, 227);\n border-color: rgb(212, 218, 227);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled.paraui-v4-radio-checked > .radio-box > .radio-box-inner:after {\n background-color: rgb(247, 248, 250);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-help {\n color: rgb(161, 168, 179);\n}\n.paraui-v4-radio.paraui-v4-radio-disabled > .radio-help > .radio-label {\n color: rgb(161, 168, 179);\n cursor: not-allowed;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box {\n top: 1px;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-small > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box {\n top: 1px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-medium > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box {\n top: 1px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box > .radio-box-inner {\n width: 14px;\n height: 14px;\n}\n.paraui-v4-radio.paraui-v4-radio-large > .radio-box > .radio-box-inner:after {\n width: 4px;\n height: 4px;\n}";
|
|
17
18
|
styleInject(css_248z);
|
|
18
19
|
|
|
19
20
|
var Radio = function Radio(props) {
|
|
@@ -26,6 +27,8 @@ var Radio = function Radio(props) {
|
|
|
26
27
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
27
28
|
_props$disabled = props.disabled,
|
|
28
29
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
30
|
+
disabledTooltip = props.disabledTooltip,
|
|
31
|
+
width = props.width,
|
|
29
32
|
onChange = props.onChange,
|
|
30
33
|
style = props.style;
|
|
31
34
|
var _useState = useState(false),
|
|
@@ -71,27 +74,46 @@ var Radio = function Radio(props) {
|
|
|
71
74
|
}
|
|
72
75
|
return str;
|
|
73
76
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
/** 处理样式 */
|
|
78
|
+
var handStyle = function handStyle() {
|
|
79
|
+
var obj = Object.assign({}, style);
|
|
80
|
+
if (width) obj.width = width;
|
|
81
|
+
return obj;
|
|
82
|
+
};
|
|
83
|
+
var contentRender = function contentRender() {
|
|
84
|
+
return jsxs("label", Object.assign({
|
|
85
|
+
className: handClass(),
|
|
86
|
+
style: handStyle(),
|
|
87
|
+
onClick: clickCheck
|
|
81
88
|
}, {
|
|
82
|
-
children: [
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
children: [jsxs("span", Object.assign({
|
|
90
|
+
className: "radio-box"
|
|
91
|
+
}, {
|
|
92
|
+
children: [jsx("input", Object.assign({
|
|
93
|
+
type: "radio",
|
|
94
|
+
value: checkedCom
|
|
95
|
+
}, props.inputProps)), jsx("span", {
|
|
96
|
+
className: "radio-box-inner"
|
|
97
|
+
})]
|
|
98
|
+
})), label !== undefined && label !== '' && label !== null ? jsx(Label, Object.assign({
|
|
99
|
+
label: label
|
|
100
|
+
}, labelTooltip, {
|
|
101
|
+
helpClassName: handHelpClassName(),
|
|
102
|
+
className: handLabelClass()
|
|
103
|
+
})) : null]
|
|
104
|
+
}));
|
|
105
|
+
};
|
|
106
|
+
var handleContentRender = function handleContentRender() {
|
|
107
|
+
if (disabledTooltip) {
|
|
108
|
+
return jsx(Tooltip, Object.assign({
|
|
109
|
+
disabled: true
|
|
110
|
+
}, disabledTooltip, {
|
|
111
|
+
children: contentRender()
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
return contentRender();
|
|
115
|
+
};
|
|
116
|
+
return handleContentRender();
|
|
95
117
|
};
|
|
96
118
|
|
|
97
119
|
export { Radio, Radio as default };
|
package/RadioGroup/index.d.ts
CHANGED
|
@@ -16,6 +16,8 @@ export interface RadioGroupProps extends HelperTextDetailProps {
|
|
|
16
16
|
className?: string;
|
|
17
17
|
/** style */
|
|
18
18
|
style?: React.CSSProperties;
|
|
19
|
+
/** 每一项的宽度 */
|
|
20
|
+
itemWidth?: string;
|
|
19
21
|
/** 间距 只有在横向布局的时候生效 */
|
|
20
22
|
spacing?: string;
|
|
21
23
|
/** 标题 */
|
|
@@ -37,7 +39,7 @@ export interface RadioGroupProps extends HelperTextDetailProps {
|
|
|
37
39
|
/** 选中选值 */
|
|
38
40
|
id?: string;
|
|
39
41
|
/** 选项数据 */
|
|
40
|
-
list: RadioListProps[];
|
|
42
|
+
list: RadioListProps[] | RadioListProps[][];
|
|
41
43
|
/** 改变值 */
|
|
42
44
|
onChange?: (val: any, item?: RadioListProps) => void;
|
|
43
45
|
[name: string]: any;
|
package/RadioGroup/index.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
2
|
-
import { useState, useEffect, createElement } from 'react';
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
3
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
4
|
import { Radio } from '../Radio/index.js';
|
|
5
5
|
import Label from '../Label/index.js';
|
|
6
6
|
import HelperText from '../HelperText/index.js';
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
7
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
8
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
9
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
10
|
-
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
11
|
-
import '../Help/index.js';
|
|
12
10
|
import '../Tooltip/index.js';
|
|
11
|
+
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
13
12
|
import 'rc-tooltip';
|
|
14
13
|
import 'rc-tooltip/lib/placements';
|
|
15
14
|
import 'clsx';
|
|
15
|
+
import '@para-ui/icons/Forbid';
|
|
16
|
+
import '../Help/index.js';
|
|
16
17
|
import '@para-ui/icons/Help';
|
|
17
18
|
|
|
18
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
19
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-radio-group {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n width: 100%;\n}\n.paraui-v4-radio-group > .radio-group-label {\n margin-bottom: 6px;\n}\n.paraui-v4-radio-group > .radio-group-content {\n line-height: 0;\n margin-bottom: 2px;\n}\n.paraui-v4-radio-group > .radio-group-content > .radio-group-content-item {\n margin-bottom: 10px;\n}\n.paraui-v4-radio-group > .radio-group-content > .radio-group-content-item:last-child {\n margin-bottom: 0;\n}\n.paraui-v4-radio-group.paraui-v4-radio-group-column > .radio-group-content {\n display: flex;\n flex-direction: column;\n}\n.paraui-v4-radio-group.paraui-v4-radio-group-column > .radio-group-content > span {\n margin-bottom: 10px;\n}\n.paraui-v4-radio-group.paraui-v4-radio-group-column > .radio-group-content > span:last-child {\n margin-bottom: 0;\n}";
|
|
19
20
|
styleInject(css_248z);
|
|
20
21
|
|
|
21
22
|
var RadioGroup = function RadioGroup(props) {
|
|
22
23
|
var _props$className = props.className,
|
|
23
24
|
className = _props$className === void 0 ? '' : _props$className,
|
|
24
25
|
style = props.style,
|
|
25
|
-
|
|
26
|
-
label = _props$label === void 0 ? '' : _props$label,
|
|
26
|
+
label = props.label,
|
|
27
27
|
labelTooltip = props.labelTooltip,
|
|
28
28
|
_props$spacing = props.spacing,
|
|
29
|
-
spacing = _props$spacing === void 0 ? '
|
|
29
|
+
spacing = _props$spacing === void 0 ? '40px' : _props$spacing,
|
|
30
|
+
itemWidth = props.itemWidth,
|
|
30
31
|
_props$size = props.size,
|
|
31
32
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
32
33
|
_props$row = props.row,
|
|
@@ -83,16 +84,20 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
83
84
|
className: handLabelClass()
|
|
84
85
|
}));
|
|
85
86
|
}
|
|
86
|
-
return null;
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* @description 处理单选框每一项样式
|
|
90
90
|
* */
|
|
91
|
-
var handStyleItem = function handStyleItem(item, index) {
|
|
92
|
-
var obj = Object.assign({
|
|
93
|
-
|
|
91
|
+
var handStyleItem = function handStyleItem(item, index, arr) {
|
|
92
|
+
var obj = Object.assign({
|
|
93
|
+
display: 'inline-block'
|
|
94
|
+
}, item.style);
|
|
95
|
+
if (spacing && row && arr.length !== index + 1) {
|
|
94
96
|
obj.marginRight = spacing;
|
|
95
97
|
}
|
|
98
|
+
if (itemWidth) {
|
|
99
|
+
obj.width = itemWidth;
|
|
100
|
+
}
|
|
96
101
|
return obj;
|
|
97
102
|
};
|
|
98
103
|
// 处理class
|
|
@@ -113,14 +118,36 @@ var RadioGroup = function RadioGroup(props) {
|
|
|
113
118
|
className: "radio-group-content"
|
|
114
119
|
}, {
|
|
115
120
|
children: list.map(function (item, index) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
if (Array.isArray(item)) {
|
|
122
|
+
return jsx("div", Object.assign({
|
|
123
|
+
className: "radio-group-content-item"
|
|
124
|
+
}, {
|
|
125
|
+
children: item.map(function (itemChild, inx) {
|
|
126
|
+
return jsx("span", Object.assign({
|
|
127
|
+
style: handStyleItem(itemChild, inx, item)
|
|
128
|
+
}, {
|
|
129
|
+
children: jsx(Radio, Object.assign({}, itemChild, {
|
|
130
|
+
style: {},
|
|
131
|
+
checked: valueCom === itemChild[id],
|
|
132
|
+
size: size,
|
|
133
|
+
disabled: Boolean(disabled || itemChild.disabled),
|
|
134
|
+
onChange: onchangeCom(itemChild)
|
|
135
|
+
}))
|
|
136
|
+
}), inx);
|
|
137
|
+
})
|
|
138
|
+
}), index);
|
|
139
|
+
}
|
|
140
|
+
return jsx("span", Object.assign({
|
|
141
|
+
style: handStyleItem(item, index, list)
|
|
142
|
+
}, {
|
|
143
|
+
children: jsx(Radio, Object.assign({}, item, {
|
|
144
|
+
style: {},
|
|
145
|
+
checked: valueCom === item[id],
|
|
146
|
+
size: size,
|
|
147
|
+
disabled: Boolean(disabled || item.disabled),
|
|
148
|
+
onChange: onchangeCom(item)
|
|
149
|
+
}))
|
|
150
|
+
}), index);
|
|
124
151
|
})
|
|
125
152
|
})), jsx(HelperText, {
|
|
126
153
|
className: "radio-group-error-text",
|
package/Search/index.d.ts
CHANGED
|
@@ -11,30 +11,18 @@ export interface SearchProps {
|
|
|
11
11
|
style?: React.CSSProperties;
|
|
12
12
|
/** 尺寸 小/中/大 */
|
|
13
13
|
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/** 圆角 */
|
|
15
|
+
radius?: boolean;
|
|
14
16
|
/** 输入框placeholder */
|
|
15
17
|
placeholder?: ReactNode;
|
|
16
18
|
/** 默认值 不受控 */
|
|
17
19
|
defaultValue?: string;
|
|
18
20
|
/** 输入框值 */
|
|
19
21
|
value?: string;
|
|
20
|
-
/** 是否显示按钮 */
|
|
21
|
-
showBtn?: boolean;
|
|
22
|
-
/** 按钮位置 分离/内置 */
|
|
23
|
-
btnType?: 'outside' | 'inside';
|
|
24
|
-
/** 按钮文本 */
|
|
25
|
-
btnText?: ReactNode;
|
|
26
|
-
/** 按钮图标 */
|
|
27
|
-
btnIcon?: ReactNode;
|
|
28
|
-
/** 输入框右侧图标 */
|
|
29
|
-
rightIcon?: ReactNode;
|
|
30
|
-
/** 一直存在右侧图标 */
|
|
31
|
-
rightIconExist?: boolean;
|
|
32
|
-
/** 是否显示输入框右侧图标 */
|
|
33
|
-
showRightIcon?: boolean;
|
|
34
22
|
/** 是否显示清空按钮 */
|
|
35
23
|
allowClear?: boolean;
|
|
36
24
|
/** 改变值 */
|
|
37
|
-
onChange?: (val: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
25
|
+
onChange?: (val: string, event: React.ChangeEvent<HTMLInputElement> | null) => void;
|
|
38
26
|
/** 失去焦点 */
|
|
39
27
|
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
40
28
|
/** 得到焦点 */
|
package/Search/index.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { _ as _slicedToArray } from '../_verture/slicedToArray-
|
|
2
|
-
import {
|
|
1
|
+
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState, useEffect } from 'react';
|
|
4
4
|
import { TextField } from '../TextField/index.js';
|
|
5
|
-
import { Button } from '../Button/index.js';
|
|
6
5
|
import SearchIcon from '@para-ui/icons/Search';
|
|
7
|
-
import { $ as $prefixCls } from '../_verture/constant-
|
|
6
|
+
import { $ as $prefixCls } from '../_verture/constant-0d9802f7.js';
|
|
8
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
9
8
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
10
|
-
import '../_verture/typeof-
|
|
9
|
+
import '../_verture/typeof-adeedc13.js';
|
|
11
10
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
12
11
|
import '../Label/index.js';
|
|
13
12
|
import '../Help/index.js';
|
|
@@ -15,26 +14,24 @@ import '../Tooltip/index.js';
|
|
|
15
14
|
import 'rc-tooltip';
|
|
16
15
|
import 'rc-tooltip/lib/placements';
|
|
17
16
|
import 'clsx';
|
|
17
|
+
import '@para-ui/icons/Forbid';
|
|
18
18
|
import '@para-ui/icons/Help';
|
|
19
19
|
import '@paraview/lib';
|
|
20
20
|
import '@para-ui/icons/PreviewClose';
|
|
21
21
|
import '@para-ui/icons/PreviewOpen';
|
|
22
|
-
import '@para-ui/icons/
|
|
22
|
+
import '@para-ui/icons/CloseCircleF';
|
|
23
23
|
import '../AutoTips/index.js';
|
|
24
24
|
import '../Loading/index.js';
|
|
25
25
|
import '@para-ui/icons/LoadingF';
|
|
26
26
|
import '../HelperText/index.js';
|
|
27
27
|
import '../_verture/useGlobalProps-1b846a65.js';
|
|
28
28
|
import '@para-ui/core/GlobalContext';
|
|
29
|
-
import '../_verture/index-
|
|
29
|
+
import '../_verture/index-e9007d6a.js';
|
|
30
30
|
import 'rc-dropdown';
|
|
31
31
|
import '../_verture/usePopupContainer-87febeb9.js';
|
|
32
32
|
import 'dayjs';
|
|
33
|
-
import '@para-ui/icons/Forbid';
|
|
34
|
-
import '@para-ui/icons/Down';
|
|
35
|
-
import '../_verture/useFormatMessage-703f8b20.js';
|
|
36
33
|
|
|
37
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author
|
|
34
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2023/4/11 14:16\n* @description 最新色卡\n*/\n.paraui-v4-search .search-text-field .text-field-content .text-field-content-within .right-icon svg {\n font-size: 18px;\n}\n.paraui-v4-search .search-text-field .text-field-content .text-field-content-within .right-icon:hover svg {\n color: rgb(46, 101, 230);\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content {\n border-radius: 14px;\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 14px;\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding-left: 14px;\n}\n.paraui-v4-search.paraui-v4-search-small.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .right-icon {\n margin-right: 14px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content {\n border-radius: 14px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 14px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding-left: 14px;\n}\n.paraui-v4-search.paraui-v4-search-medium.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .right-icon {\n margin-right: 14px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content {\n border-radius: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input input {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .text-field-content-within-input .text-field-label-placeholder {\n padding-left: 16px;\n}\n.paraui-v4-search.paraui-v4-search-large.paraui-v4-search-radius .search-text-field .text-field-content .text-field-content-within .right-icon {\n margin-right: 16px;\n}";
|
|
38
35
|
styleInject(css_248z);
|
|
39
36
|
|
|
40
37
|
var Search = function Search(props) {
|
|
@@ -43,31 +40,20 @@ var Search = function Search(props) {
|
|
|
43
40
|
style = props.style,
|
|
44
41
|
_props$size = props.size,
|
|
45
42
|
size = _props$size === void 0 ? 'large' : _props$size,
|
|
46
|
-
_props$
|
|
47
|
-
|
|
48
|
-
_props$showBtn = props.showBtn,
|
|
49
|
-
showBtn = _props$showBtn === void 0 ? true : _props$showBtn,
|
|
50
|
-
btnIcon = props.btnIcon,
|
|
51
|
-
_props$btnText = props.btnText,
|
|
52
|
-
btnText = _props$btnText === void 0 ? '' : _props$btnText,
|
|
43
|
+
_props$radius = props.radius,
|
|
44
|
+
radius = _props$radius === void 0 ? false : _props$radius,
|
|
53
45
|
_props$placeholder = props.placeholder,
|
|
54
|
-
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder
|
|
55
|
-
props.
|
|
56
|
-
var value = props.value,
|
|
46
|
+
placeholder = _props$placeholder === void 0 ? '' : _props$placeholder,
|
|
47
|
+
value = props.value,
|
|
57
48
|
rightIcon = props.rightIcon,
|
|
58
|
-
_props$showRightIcon = props.showRightIcon,
|
|
59
|
-
showRightIcon = _props$showRightIcon === void 0 ? true : _props$showRightIcon,
|
|
60
49
|
_props$allowClear = props.allowClear,
|
|
61
50
|
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
62
|
-
_props$rightIconExist = props.rightIconExist,
|
|
63
|
-
rightIconExist = _props$rightIconExist === void 0 ? false : _props$rightIconExist,
|
|
64
51
|
onChange = props.onChange,
|
|
65
52
|
onBlur = props.onBlur,
|
|
66
53
|
onFocus = props.onFocus,
|
|
67
54
|
onKeydown = props.onKeydown,
|
|
68
55
|
onKeyUp = props.onKeyUp,
|
|
69
56
|
onClickBtn = props.onClickBtn,
|
|
70
|
-
onClickRightIcon = props.onClickRightIcon,
|
|
71
57
|
onEnter = props.onEnter,
|
|
72
58
|
onClear = props.onClear,
|
|
73
59
|
otherProps = props.otherProps;
|
|
@@ -91,30 +77,18 @@ var Search = function Search(props) {
|
|
|
91
77
|
* @return {ReactNode}
|
|
92
78
|
*/
|
|
93
79
|
var clearIcon = function clearIcon() {
|
|
94
|
-
if (!showRightIcon) return '';
|
|
95
80
|
if (rightIcon) return rightIcon;
|
|
96
|
-
};
|
|
97
|
-
/**
|
|
98
|
-
* 搜索按钮图标
|
|
99
|
-
* @return {ReactNode}
|
|
100
|
-
*/
|
|
101
|
-
var searchBtnIcon = function searchBtnIcon() {
|
|
102
|
-
if (btnIcon) return btnIcon;
|
|
103
81
|
return jsx(SearchIcon, {});
|
|
104
82
|
};
|
|
105
83
|
/**
|
|
106
84
|
* 点击输入框右侧按钮
|
|
107
85
|
*/
|
|
108
86
|
var clickRightIcon = function clickRightIcon() {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
if (props.value === undefined) {
|
|
113
|
-
val = '';
|
|
114
|
-
setValueCom('');
|
|
115
|
-
}
|
|
87
|
+
if (onClickBtn) {
|
|
88
|
+
onClickBtn(valueCom);
|
|
89
|
+
return;
|
|
116
90
|
}
|
|
117
|
-
|
|
91
|
+
onChange && onChange(valueCom, null);
|
|
118
92
|
};
|
|
119
93
|
/**
|
|
120
94
|
* 改变输入框
|
|
@@ -127,29 +101,6 @@ var Search = function Search(props) {
|
|
|
127
101
|
}
|
|
128
102
|
onChange && onChange(val, event);
|
|
129
103
|
};
|
|
130
|
-
/**
|
|
131
|
-
* 点击按钮
|
|
132
|
-
*/
|
|
133
|
-
var clickBtn = function clickBtn() {
|
|
134
|
-
onClickBtn && onClickBtn(valueCom);
|
|
135
|
-
};
|
|
136
|
-
/**
|
|
137
|
-
* 内置按钮
|
|
138
|
-
* */
|
|
139
|
-
var buttonDom = function buttonDom() {
|
|
140
|
-
if (showBtn && btnType === 'inside') {
|
|
141
|
-
return jsx(Button, Object.assign({
|
|
142
|
-
className: 'search-button',
|
|
143
|
-
size: size,
|
|
144
|
-
startIcon: searchBtnIcon(),
|
|
145
|
-
variant: 'outlined',
|
|
146
|
-
onClick: clickBtn
|
|
147
|
-
}, {
|
|
148
|
-
children: btnText
|
|
149
|
-
}));
|
|
150
|
-
}
|
|
151
|
-
return undefined;
|
|
152
|
-
};
|
|
153
104
|
/**
|
|
154
105
|
* 处理class
|
|
155
106
|
* @return {string}
|
|
@@ -158,11 +109,7 @@ var Search = function Search(props) {
|
|
|
158
109
|
var str = "".concat($prefixCls, "-search");
|
|
159
110
|
if (className) str += ' ' + className;
|
|
160
111
|
if (size) str += " ".concat($prefixCls, "-search-").concat(size);
|
|
161
|
-
if (
|
|
162
|
-
if (showBtn) str += " ".concat($prefixCls, "-search-showbtn");
|
|
163
|
-
if (btnText) str += " ".concat($prefixCls, "-search-btntext");else str += " ".concat($prefixCls, "-search-no-btntext");
|
|
164
|
-
if (valueCom) str += " ".concat($prefixCls, "-search-value");
|
|
165
|
-
if (rightIconExist) str += " ".concat($prefixCls, "-search-right-icon-exist");
|
|
112
|
+
if (radius) str += " ".concat($prefixCls, "-search-radius");
|
|
166
113
|
return str;
|
|
167
114
|
};
|
|
168
115
|
var handValue = function handValue() {
|
|
@@ -171,18 +118,18 @@ var Search = function Search(props) {
|
|
|
171
118
|
}
|
|
172
119
|
return value;
|
|
173
120
|
};
|
|
174
|
-
return
|
|
121
|
+
return jsx("div", Object.assign({
|
|
175
122
|
className: handClass(),
|
|
176
123
|
style: style
|
|
177
124
|
}, {
|
|
178
|
-
children:
|
|
125
|
+
children: jsx(TextField, Object.assign({
|
|
179
126
|
className: "search-text-field",
|
|
180
127
|
size: size,
|
|
181
128
|
placeholder: placeholder,
|
|
182
129
|
value: handValue(),
|
|
183
130
|
rightIcon: clearIcon(),
|
|
184
|
-
hideErrorDom: true,
|
|
185
131
|
onClickIcon: clickRightIcon,
|
|
132
|
+
hideErrorDom: true,
|
|
186
133
|
onChange: changeInput,
|
|
187
134
|
onBlur: onBlur,
|
|
188
135
|
onFocus: onFocus,
|
|
@@ -190,18 +137,9 @@ var Search = function Search(props) {
|
|
|
190
137
|
onKeyUp: onKeyUp,
|
|
191
138
|
onEnter: onEnter,
|
|
192
139
|
autoComplete: "new-password",
|
|
193
|
-
addonAfter: buttonDom(),
|
|
194
140
|
allowClear: allowClear,
|
|
195
141
|
onClear: onClear
|
|
196
|
-
}, otherProps))
|
|
197
|
-
className: 'search-button',
|
|
198
|
-
size: size,
|
|
199
|
-
startIcon: searchBtnIcon(),
|
|
200
|
-
variant: 'contained',
|
|
201
|
-
onClick: clickBtn
|
|
202
|
-
}, {
|
|
203
|
-
children: btnText
|
|
204
|
-
}))]
|
|
142
|
+
}, otherProps))
|
|
205
143
|
}));
|
|
206
144
|
};
|
|
207
145
|
|
package/Select/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
7
|
import { EmptyProps } from "../Empty";
|
|
8
8
|
import { LabelTooltipProps } from "../Label";
|
|
9
|
+
import { TooltipProps } from '../Tooltip';
|
|
9
10
|
import { HelperTextDetailProps } from "../HelperText";
|
|
10
11
|
import './index.scss';
|
|
11
12
|
export interface SelectProps extends HelperTextDetailProps {
|
|
@@ -35,6 +36,10 @@ export interface SelectProps extends HelperTextDetailProps {
|
|
|
35
36
|
searchPlaceholder?: string;
|
|
36
37
|
/** 是否禁用 */
|
|
37
38
|
disabled?: boolean | any[];
|
|
39
|
+
/**
|
|
40
|
+
* 禁用提示
|
|
41
|
+
*/
|
|
42
|
+
disabledTooltip?: TooltipProps;
|
|
38
43
|
/** 是否多选 */
|
|
39
44
|
multiple?: boolean;
|
|
40
45
|
/** 是否必填 */
|
|
@@ -44,9 +49,9 @@ export interface SelectProps extends HelperTextDetailProps {
|
|
|
44
49
|
/**
|
|
45
50
|
* 自定义渲染
|
|
46
51
|
* item: 当前想数据
|
|
47
|
-
*
|
|
52
|
+
* type: true 下拉选项 false 已选项 more: 更多选项
|
|
48
53
|
* */
|
|
49
|
-
renderContent?: (item: any,
|
|
54
|
+
renderContent?: (item: any, type: boolean | 'more') => ReactNode;
|
|
50
55
|
/** 下拉选中是否有图标, 默认有 */
|
|
51
56
|
selectCheckIcon?: boolean;
|
|
52
57
|
/** 显示名字段 */
|