@para-ui/core 2.2.40 → 2.2.41
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.d.ts +34 -34
- package/AutoTips/index.d.ts +27 -27
- package/Breadcrumbs/index.d.ts +39 -39
- package/Button/SplitButton.d.ts +61 -61
- package/Button/index.d.ts +56 -56
- package/Button/lang/en_US.d.ts +4 -4
- package/Button/lang/index.d.ts +9 -9
- package/Button/lang/zh_CN.d.ts +4 -4
- package/ButtonGroup/index.d.ts +33 -33
- package/ButtonGroup/index.js +2 -2
- package/Carousel/index.d.ts +30 -30
- package/Cascader/index.d.ts +54 -54
- package/Cascader/lang/en_US.d.ts +4 -4
- package/Cascader/lang/index.d.ts +9 -9
- package/Cascader/lang/zh_CN.d.ts +4 -4
- package/Checkbox/index.d.ts +40 -40
- package/CheckboxGroup/index.d.ts +46 -46
- package/CheckboxGroup/index.js +2 -2
- package/Collapse/collapsePanel.d.ts +30 -30
- package/Collapse/index.d.ts +57 -57
- package/Collapse/motion.d.ts +5 -5
- package/Collapse/util.d.ts +11 -11
- package/CollapseBox/index.d.ts +27 -27
- package/CollapseBox/util.d.ts +5 -5
- package/CollapseLayout/index.d.ts +51 -51
- package/ColorPicker/index.d.ts +4 -4
- package/ComboSelect/WithTabsCombo/index.d.ts +11 -11
- package/ComboSelect/WithTabsCombo/interface.d.ts +141 -141
- package/ComboSelect/index.d.ts +11 -11
- package/ComboSelect/interface.d.ts +149 -149
- package/ComboSelect/lang/en_US.d.ts +9 -9
- package/ComboSelect/lang/index.d.ts +19 -19
- package/ComboSelect/lang/zh_CN.d.ts +9 -9
- package/ComboSelect/utils.d.ts +12 -12
- package/Container/index.d.ts +77 -77
- package/DatePicker/PickerButton.d.ts +3 -3
- package/DatePicker/PickerTag.d.ts +3 -3
- package/DatePicker/generatePicker/generateRangePicker.d.ts +4 -4
- package/DatePicker/generatePicker/generateSinglePicker.d.ts +11 -11
- package/DatePicker/generatePicker/index.d.ts +77 -77
- package/DatePicker/index.d.ts +18 -18
- package/DatePicker/lang/en_US.d.ts +3 -3
- package/DatePicker/lang/index.d.ts +7 -7
- package/DatePicker/lang/zh_CN.d.ts +3 -3
- package/DatePicker/util.d.ts +20 -20
- package/Desktop/index.d.ts +55 -55
- package/Drawer/index.d.ts +11 -11
- package/Drawer/interface.d.ts +83 -83
- package/Drawer/lang/en_US.d.ts +5 -5
- package/Drawer/lang/index.d.ts +11 -11
- package/Drawer/lang/zh_CN.d.ts +5 -5
- package/Dropdown/index.d.ts +39 -39
- package/DynamicMultiBox/formItem.d.ts +13 -13
- package/DynamicMultiBox/index.d.ts +4 -4
- package/DynamicMultiBox/index.js +2 -2
- package/DynamicMultiBox/interface.d.ts +161 -161
- package/DynamicMultiBox/rowForm.d.ts +24 -24
- package/Empty/images/index.d.ts +2 -2
- package/Empty/index.d.ts +30 -30
- package/Empty/lang/en_US.d.ts +6 -6
- package/Empty/lang/index.d.ts +13 -13
- package/Empty/lang/zh_CN.d.ts +6 -6
- package/Form/index.d.ts +181 -181
- package/Form/index.js +2 -2
- package/FormItem/compoments/defaultCompoments/index.d.ts +19 -19
- package/FormItem/compoments/formCheckboxGroup/index.d.ts +8 -8
- package/FormItem/compoments/formFile/index.d.ts +38 -38
- package/FormItem/compoments/formRadioGroup/index.d.ts +8 -8
- package/FormItem/compoments/formSelect/index.d.ts +18 -18
- package/FormItem/errorTips.d.ts +12 -12
- package/FormItem/index.d.ts +152 -152
- package/FormItem/index.js +2 -2
- package/FormItem/itemType.d.ts +42 -42
- package/FormItem/validateFunction.d.ts +15 -15
- package/FunctionModal/dialog.d.ts +58 -58
- package/FunctionModal/index.d.ts +8 -8
- package/FunctionModal/modalContext.d.ts +14 -14
- package/GlobalContext/componentsProps.d.ts +21 -21
- package/GlobalContext/confirmLocale.d.ts +7 -7
- package/GlobalContext/constant.d.ts +7 -7
- package/GlobalContext/index.d.ts +28 -28
- package/GlobalContext/intl.d.ts +34 -34
- package/GlobalContext/useFormatMessage.d.ts +3 -3
- package/Help/index.d.ts +20 -20
- package/HelperText/index.d.ts +19 -19
- package/Hooks/useGlobalProps.d.ts +1 -1
- package/InputLang/index.d.ts +49 -49
- package/InputNumber/index.d.ts +74 -74
- package/Label/index.d.ts +35 -35
- package/Loading/index.d.ts +17 -17
- package/Menu/footerExpansion.d.ts +9 -9
- package/Menu/index.d.ts +10 -10
- package/Menu/interface.d.ts +139 -139
- package/Menu/logo.d.ts +9 -9
- package/Menu/verticalMenuList.d.ts +14 -14
- package/Message/index.d.ts +73 -73
- package/Modal/Confirm/index.d.ts +66 -66
- package/Modal/index.d.ts +61 -61
- package/Modal/lang/en_US.d.ts +5 -5
- package/Modal/lang/index.d.ts +11 -11
- package/Modal/lang/zh_CN.d.ts +5 -5
- package/MultiBox/index.d.ts +54 -54
- package/Notification/index.d.ts +52 -52
- package/OperateBtn/index.d.ts +59 -59
- package/OperateBtn/lang/en_US.d.ts +4 -4
- package/OperateBtn/lang/index.d.ts +9 -9
- package/OperateBtn/lang/zh_CN.d.ts +4 -4
- package/PageHeader/horizontalMeun.d.ts +9 -9
- package/PageHeader/horizontalMeunRight.d.ts +9 -9
- package/PageHeader/index.d.ts +10 -10
- package/PageHeader/interface.d.ts +167 -167
- package/Pagination/index.d.ts +33 -33
- package/Pagination/lang/en_US.d.ts +8 -8
- package/Pagination/lang/index.d.ts +17 -17
- package/Pagination/lang/zh_CN.d.ts +8 -8
- package/ParauiProvider/index.d.ts +12 -12
- package/PasswordRules/index.d.ts +46 -46
- package/PopConfirm/index.d.ts +56 -56
- package/PopConfirm/lang/en_US.d.ts +5 -5
- package/PopConfirm/lang/index.d.ts +11 -11
- package/PopConfirm/lang/zh_CN.d.ts +5 -5
- package/Popover/index.d.ts +14 -14
- package/PopoverNew/TooltipNew/index.d.ts +11 -11
- package/PopoverNew/TooltipNew/interface.d.ts +31 -31
- package/PopoverNew/TooltipNew/utils.d.ts +18 -18
- package/PopoverNew/index.d.ts +16 -16
- package/Popper/index.d.ts +13 -13
- package/Progress/Line.d.ts +47 -47
- package/Progress/Steps.d.ts +17 -17
- package/Progress/index.d.ts +81 -81
- package/Progress/utils.d.ts +6 -6
- package/Querying/images/index.d.ts +2 -2
- package/Querying/index.d.ts +26 -26
- package/Querying/lang/en_US.d.ts +4 -4
- package/Querying/lang/index.d.ts +9 -9
- package/Querying/lang/zh_CN.d.ts +4 -4
- package/README.md +744 -739
- package/Radio/index.d.ts +38 -38
- package/RadioGroup/index.d.ts +47 -47
- package/RadioGroup/index.js +2 -2
- package/Search/index.d.ts +56 -56
- package/Select/index.d.ts +96 -96
- package/Select/lang/en_US.d.ts +5 -5
- package/Select/lang/index.d.ts +11 -11
- package/Select/lang/zh_CN.d.ts +5 -5
- package/SelectInput/index.d.ts +11 -11
- package/Selector/index.d.ts +11 -11
- package/Selector/index.js +2 -2
- package/Selector/interface.d.ts +428 -428
- package/Selector/lang/en_US.d.ts +11 -11
- package/Selector/lang/index.d.ts +23 -23
- package/Selector/lang/zh_CN.d.ts +11 -11
- package/Selector/selectorData/index.d.ts +10 -10
- package/Selector/selectorMain/index.d.ts +10 -10
- package/Selector/selectorNode/index.d.ts +10 -10
- package/Selector/util.d.ts +15 -15
- package/SelectorPicker/index.d.ts +53 -53
- package/SelectorPicker/index.js +2 -2
- package/SingleBox/index.d.ts +42 -42
- package/Slider/index.d.ts +14 -14
- package/Slider/interface.d.ts +102 -102
- package/Split/index.d.ts +7 -7
- package/Stepper/icons.d.ts +5 -5
- package/Stepper/index.d.ts +39 -39
- package/Switch/index.d.ts +78 -78
- package/Table/index.d.ts +10 -10
- package/Table/interface.d.ts +271 -271
- package/Table/lang/en_US.d.ts +8 -8
- package/Table/lang/index.d.ts +17 -17
- package/Table/lang/zh_CN.d.ts +8 -8
- package/Table/tableBody.d.ts +9 -9
- package/Table/tableBodyElement/index.d.ts +15 -15
- package/Table/tableBodyInterface.d.ts +67 -67
- package/Table/tableContainer/index.d.ts +16 -16
- package/Table/tableElement/index.d.ts +15 -15
- package/Table/tableHead.d.ts +9 -9
- package/Table/tableHeadElement/index.d.ts +15 -15
- package/Table/tableHeadInterface.d.ts +30 -30
- package/Table/tablePagination.d.ts +9 -9
- package/Table/tablePaginationInterFace.d.ts +24 -24
- package/Table/tdElement/index.d.ts +15 -15
- package/Table/thElement/index.d.ts +15 -15
- package/Table/trElement/index.d.ts +15 -15
- package/Table/util.d.ts +28 -28
- package/Tabs/index.d.ts +48 -48
- package/Tag/TagGroup.d.ts +66 -66
- package/Tag/index.d.ts +34 -34
- package/TextField/index.d.ts +95 -95
- package/TimePicker/index.d.ts +22 -22
- package/TimePicker/locale/en_US.d.ts +3 -3
- package/TimePicker/locale/zh_CN.d.ts +3 -3
- package/TimePicker/style/index.d.ts +1 -1
- package/Timeline/index.d.ts +22 -22
- package/Title/index.d.ts +30 -30
- package/ToggleButton/ToggleButtonGroup.d.ts +49 -49
- package/ToggleButton/index.d.ts +49 -49
- package/Tooltip/index.d.ts +14 -14
- package/Transfer/index.d.ts +37 -37
- package/Transfer/lang/en_US.d.ts +8 -8
- package/Transfer/lang/index.d.ts +17 -17
- package/Transfer/lang/zh_CN.d.ts +8 -8
- package/Tree/OperateBar/index.d.ts +13 -13
- package/Tree/Tree.d.ts +4 -4
- package/Tree/index.d.ts +5 -5
- package/Tree/interface.d.ts +207 -207
- package/Tree/lang/en_US.d.ts +8 -8
- package/Tree/lang/index.d.ts +17 -17
- package/Tree/lang/zh_CN.d.ts +8 -8
- package/Tree/utils/tools.d.ts +26 -26
- package/Tree/utils/treeUtil.d.ts +15 -15
- package/Upload/Dragger/index.d.ts +10 -10
- package/Upload/ErroTip/index.d.ts +13 -13
- package/Upload/ImageUpload/index.d.ts +14 -14
- package/Upload/ImgCrop/EasyCrop.d.ts +17 -17
- package/Upload/ImgCrop/constants.d.ts +7 -7
- package/Upload/ImgCrop/index.d.ts +6 -6
- package/Upload/ImgCrop/interface.d.ts +48 -48
- package/Upload/UploadList/index.d.ts +5 -5
- package/Upload/index.d.ts +15 -15
- package/Upload/interface.d.ts +134 -134
- package/Upload/lang/en_US.d.ts +12 -12
- package/Upload/lang/index.d.ts +25 -25
- package/Upload/lang/zh_CN.d.ts +12 -12
- package/cdn/ButtonGroup/index.js +2 -2
- package/cdn/Cascader/index.js +6 -6
- package/cdn/CheckboxGroup/index.js +2 -2
- package/cdn/ColorPicker/index.js +1 -1
- package/cdn/ComboSelect/index.js +1 -1
- package/cdn/DatePicker/index.js +8 -8
- package/cdn/Dropdown/index.js +3 -3
- package/cdn/DynamicMultiBox/index.js +7 -7
- package/cdn/Form/index.js +3 -3
- package/cdn/FormItem/index.js +3 -3
- package/cdn/Pagination/index.js +1 -1
- package/cdn/PopoverNew/index.js +3 -3
- package/cdn/RadioGroup/index.js +2 -2
- package/cdn/Select/index.js +1 -1
- package/cdn/SelectInput/index.js +1 -1
- package/cdn/Selector/index.js +10 -10
- package/cdn/SelectorPicker/index.js +10 -10
- package/cdn/Slider/index.js +3 -3
- package/cdn/Table/index.js +1 -1
- package/cdn/Tabs/index.js +1 -1
- package/cdn/TimePicker/index.js +10 -10
- package/cdn/Upload/index.js +10 -10
- package/index.d.ts +142 -142
- package/index.js +2 -2
- package/package.json +131 -131
package/Radio/index.d.ts
CHANGED
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/4 10:20
|
|
4
|
-
* @description 单选框
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { LabelTooltipProps } from '../Label';
|
|
8
|
-
import './index.scss';
|
|
9
|
-
export interface RadioProps {
|
|
10
|
-
/** 样式class */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** style */
|
|
13
|
-
style?: React.CSSProperties;
|
|
14
|
-
/** 标题 */
|
|
15
|
-
label?: ReactNode;
|
|
16
|
-
/** 帮组提示信息 */
|
|
17
|
-
labelTooltip?: LabelTooltipProps;
|
|
18
|
-
/** 大小 */
|
|
19
|
-
size?: 'small' | 'medium' | 'large';
|
|
20
|
-
/** 默认值 有值不受控组件 初始化第一次 */
|
|
21
|
-
defaultChecked?: boolean;
|
|
22
|
-
/** 默认值 有值受控组件*/
|
|
23
|
-
checked?: boolean;
|
|
24
|
-
/** 禁用 */
|
|
25
|
-
disabled?: boolean;
|
|
26
|
-
/** inputProps */
|
|
27
|
-
inputProps?: {
|
|
28
|
-
type?: string;
|
|
29
|
-
value?: any;
|
|
30
|
-
checked?: any;
|
|
31
|
-
[name: string]: any;
|
|
32
|
-
};
|
|
33
|
-
/** 改变事件 */
|
|
34
|
-
onChange?: (e: any, checked: boolean) => void;
|
|
35
|
-
[name: string]: any;
|
|
36
|
-
}
|
|
37
|
-
export declare const Radio: FunctionComponent<RadioProps>;
|
|
38
|
-
export default Radio;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/4 10:20
|
|
4
|
+
* @description 单选框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { LabelTooltipProps } from '../Label';
|
|
8
|
+
import './index.scss';
|
|
9
|
+
export interface RadioProps {
|
|
10
|
+
/** 样式class */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** style */
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
/** 标题 */
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
/** 帮组提示信息 */
|
|
17
|
+
labelTooltip?: LabelTooltipProps;
|
|
18
|
+
/** 大小 */
|
|
19
|
+
size?: 'small' | 'medium' | 'large';
|
|
20
|
+
/** 默认值 有值不受控组件 初始化第一次 */
|
|
21
|
+
defaultChecked?: boolean;
|
|
22
|
+
/** 默认值 有值受控组件*/
|
|
23
|
+
checked?: boolean;
|
|
24
|
+
/** 禁用 */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** inputProps */
|
|
27
|
+
inputProps?: {
|
|
28
|
+
type?: string;
|
|
29
|
+
value?: any;
|
|
30
|
+
checked?: any;
|
|
31
|
+
[name: string]: any;
|
|
32
|
+
};
|
|
33
|
+
/** 改变事件 */
|
|
34
|
+
onChange?: (e: any, checked: boolean) => void;
|
|
35
|
+
[name: string]: any;
|
|
36
|
+
}
|
|
37
|
+
export declare const Radio: FunctionComponent<RadioProps>;
|
|
38
|
+
export default Radio;
|
package/RadioGroup/index.d.ts
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/4 14:18
|
|
4
|
-
* @description 单选框组
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { RadioProps } from '../Radio';
|
|
8
|
-
import { LabelTooltipProps } from "../Label";
|
|
9
|
-
import './index.scss';
|
|
10
|
-
export interface RadioListProps extends RadioProps {
|
|
11
|
-
[name: string]: any;
|
|
12
|
-
}
|
|
13
|
-
export interface RadioGroupProps {
|
|
14
|
-
/** 样式class */
|
|
15
|
-
className?: string;
|
|
16
|
-
/** style */
|
|
17
|
-
style?: React.CSSProperties;
|
|
18
|
-
/** 标题 */
|
|
19
|
-
label?: ReactNode;
|
|
20
|
-
/** 帮组提示信息 */
|
|
21
|
-
labelTooltip?: LabelTooltipProps;
|
|
22
|
-
/** 尺寸 */
|
|
23
|
-
size?: 'small' | 'medium' | 'large';
|
|
24
|
-
/** 是否必填 */
|
|
25
|
-
required?: boolean;
|
|
26
|
-
/** 布局方式 横向/竖向 */
|
|
27
|
-
row?: boolean;
|
|
28
|
-
/** 是否禁用 */
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/** 是否显示错误 */
|
|
31
|
-
error?: boolean;
|
|
32
|
-
/** 错误提示 */
|
|
33
|
-
helperText?: ReactNode;
|
|
34
|
-
/** 默认值 不受控 */
|
|
35
|
-
defaultValue?: any;
|
|
36
|
-
/** 默认值 */
|
|
37
|
-
value?: any;
|
|
38
|
-
/** 选中选值 */
|
|
39
|
-
id?: string;
|
|
40
|
-
/** 选项数据 */
|
|
41
|
-
list: RadioListProps[];
|
|
42
|
-
/** 改变值 */
|
|
43
|
-
onChange?: (val: any, item?: RadioListProps) => void;
|
|
44
|
-
[name: string]: any;
|
|
45
|
-
}
|
|
46
|
-
export declare const RadioGroup: FunctionComponent<RadioGroupProps>;
|
|
47
|
-
export default RadioGroup;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/4 14:18
|
|
4
|
+
* @description 单选框组
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { RadioProps } from '../Radio';
|
|
8
|
+
import { LabelTooltipProps } from "../Label";
|
|
9
|
+
import './index.scss';
|
|
10
|
+
export interface RadioListProps extends RadioProps {
|
|
11
|
+
[name: string]: any;
|
|
12
|
+
}
|
|
13
|
+
export interface RadioGroupProps {
|
|
14
|
+
/** 样式class */
|
|
15
|
+
className?: string;
|
|
16
|
+
/** style */
|
|
17
|
+
style?: React.CSSProperties;
|
|
18
|
+
/** 标题 */
|
|
19
|
+
label?: ReactNode;
|
|
20
|
+
/** 帮组提示信息 */
|
|
21
|
+
labelTooltip?: LabelTooltipProps;
|
|
22
|
+
/** 尺寸 */
|
|
23
|
+
size?: 'small' | 'medium' | 'large';
|
|
24
|
+
/** 是否必填 */
|
|
25
|
+
required?: boolean;
|
|
26
|
+
/** 布局方式 横向/竖向 */
|
|
27
|
+
row?: boolean;
|
|
28
|
+
/** 是否禁用 */
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/** 是否显示错误 */
|
|
31
|
+
error?: boolean;
|
|
32
|
+
/** 错误提示 */
|
|
33
|
+
helperText?: ReactNode;
|
|
34
|
+
/** 默认值 不受控 */
|
|
35
|
+
defaultValue?: any;
|
|
36
|
+
/** 默认值 */
|
|
37
|
+
value?: any;
|
|
38
|
+
/** 选中选值 */
|
|
39
|
+
id?: string;
|
|
40
|
+
/** 选项数据 */
|
|
41
|
+
list: RadioListProps[];
|
|
42
|
+
/** 改变值 */
|
|
43
|
+
onChange?: (val: any, item?: RadioListProps) => void;
|
|
44
|
+
[name: string]: any;
|
|
45
|
+
}
|
|
46
|
+
export declare const RadioGroup: FunctionComponent<RadioGroupProps>;
|
|
47
|
+
export default RadioGroup;
|
package/RadioGroup/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","clsx","@para-ui/icons/Help"],e):"object"==typeof exports?exports.ParaUI=e(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help")):r.ParaUI=e(r.react,r["@material-ui/core"],r.clsx,r["@para-ui/icons/Help"])}(self,(function(r,e,a,o){return function(){var i={7381:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),r.exports=e},9916:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-helper-text{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:12px;font-weight:400;padding-left:12px;line-height:20px;color:rgba(46,55,67,.7)}.paraui-helper-text.paraui-helper-text-error{color:#eb6054}",""]),r.exports=e},4928:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),r.exports=e},
|
|
1
|
+
!function(r,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help")):"function"==typeof define&&define.amd?define(["react","@material-ui/core","clsx","@para-ui/icons/Help"],e):"object"==typeof exports?exports.ParaUI=e(require("react"),require("@material-ui/core"),require("clsx"),require("@para-ui/icons/Help")):r.ParaUI=e(r.react,r["@material-ui/core"],r.clsx,r["@para-ui/icons/Help"])}(self,(function(r,e,a,o){return function(){var i={7381:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-help{display:inline-block;font-size:16px;color:rgba(46,55,67,.7)}.paraui-help:hover{color:#3666d6}.paraui-help .paraui-icon{font-size:inherit;color:inherit}",""]),r.exports=e},9916:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-helper-text{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:12px;font-weight:400;padding-left:12px;line-height:20px;color:rgba(46,55,67,.7)}.paraui-helper-text.paraui-helper-text-error{color:#eb6054}",""]),r.exports=e},4928:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-label{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;color:rgba(46,55,67,.7);margin-bottom:8px;display:inline-block;line-height:1.43;word-break:break-all}.paraui-label>.paraui-label-required{margin-left:2px;color:#eb6054}.paraui-label>.paraui-help{vertical-align:top;margin-left:4px}.paraui-label>.paraui-help svg{color:rgba(46,55,67,.4);vertical-align:top;position:relative;top:2px}.paraui-label.paraui-label-line.paraui-label-tooltip{border-bottom:1px dashed rgba(46,55,67,.4);padding-bottom:2px}",""]),r.exports=e},8979:function(r,e,a){(e=a(3645)(!1)).push([r.id,'.paraui-radio{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;cursor:pointer;display:inline-flex;align-items:flex-start;line-height:16px}.paraui-radio:hover>.paraui-radio-label{color:rgba(54,102,214,.8);cursor:pointer}.paraui-radio:hover>.paraui-radio-label svg{color:rgba(54,102,214,.8)}.paraui-radio:hover>.paraui-help>.paraui-radio-label{color:rgba(54,102,214,.8);cursor:pointer}.paraui-radio:hover>.paraui-help>.paraui-radio-label svg{color:rgba(54,102,214,.8)}.paraui-radio:hover>.paraui-radio-box>.paraui-radio-box-inner{border-color:rgba(54,102,214,.8)}.paraui-radio>.paraui-radio-box{position:relative}.paraui-radio>.paraui-radio-box>input{position:absolute;top:0;right:0;bottom:0;left:0;z-index:1;width:100%;height:100%;opacity:0;cursor:pointer}.paraui-radio>.paraui-radio-box>.paraui-radio-box-inner{position:relative;top:0;left:0;display:block;background-color:#fff;border:1px solid rgba(171,176,185,.4);border-radius:50%}.paraui-radio>.paraui-radio-box>.paraui-radio-box-inner:after{position:absolute;display:table;content:" ";transform:scale(1) translate(-50%, -50%);background-color:#fff;border-radius:50%;left:50%;top:50%}.paraui-radio>.paraui-radio-label{color:#2e3743;padding:0 8px;margin:0;display:inline-flex;align-items:flex-start}.paraui-radio>.paraui-radio-label>.paraui-help>svg{top:0}.paraui-radio .paraui-label{line-height:16px}.paraui-radio>.paraui-help{padding:0 8px}.paraui-radio>.paraui-help>.paraui-radio-label{color:#2e3743;margin:0;display:inline-flex;align-items:center}.paraui-radio.radio-checked>.paraui-radio-box>.paraui-radio-box-inner{border-color:rgba(0,0,0,0);background-color:#3666d6}.paraui-radio.radio-checked:hover>.paraui-radio-box>.paraui-radio-box-inner{border-color:rgba(0,0,0,0);background-color:rgba(54,102,214,.8)}.paraui-radio.radio-disabled{cursor:not-allowed}.paraui-radio.radio-disabled:hover>.paraui-radio-box>.paraui-radio-box-inner{background-color:#f5f6f7;border-color:rgba(171,176,185,.4)}.paraui-radio.radio-disabled>.paraui-radio-label{color:rgba(46,55,67,.4);cursor:not-allowed}.paraui-radio.radio-disabled>.paraui-radio-label svg{color:rgba(46,55,67,.4)}.paraui-radio.radio-disabled>.paraui-radio-box>input{cursor:not-allowed}.paraui-radio.radio-disabled>.paraui-radio-box>.paraui-radio-box-inner{background-color:#f5f6f7;border-color:rgba(171,176,185,.4)}.paraui-radio.radio-disabled>.paraui-radio-box>.paraui-radio-box-inner:after{background-color:#f5f6f7}.paraui-radio.radio-disabled.radio-checked>.paraui-radio-box>.paraui-radio-box-inner:after{background-color:rgba(171,176,185,.4)}.paraui-radio.radio-disabled>.paraui-help{color:rgba(46,55,67,.4)}.paraui-radio.radio-disabled>.paraui-help>.paraui-radio-label{color:rgba(46,55,67,.4);cursor:not-allowed}.paraui-radio.radio-small>.paraui-radio-box{top:1px}.paraui-radio.radio-small>.paraui-radio-box>.paraui-radio-box-inner{width:14px;height:14px}.paraui-radio.radio-small>.paraui-radio-box>.paraui-radio-box-inner:after{width:4px;height:4px}.paraui-radio.radio-medium>.paraui-radio-box>.paraui-radio-box-inner{width:16px;height:16px}.paraui-radio.radio-medium>.paraui-radio-box>.paraui-radio-box-inner:after{width:6px;height:6px}.paraui-radio.radio-large>.paraui-radio-box>.paraui-radio-box-inner{width:16px;height:16px}.paraui-radio.radio-large>.paraui-radio-box>.paraui-radio-box-inner:after{width:6px;height:6px}',""]),r.exports=e},2816:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-radio-group{font-family:-apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif;font-size:14px;font-weight:400;width:100%}.paraui-radio-group>.radio-group-content{line-height:0}.paraui-radio-group.radio-group-column>.radio-group-content{display:flex;flex-direction:column}.paraui-radio-group.radio-group-column>.radio-group-content>.paraui-radio{margin-bottom:8px}.paraui-radio-group.radio-group-column>.radio-group-content>.paraui-radio:last-child{margin-bottom:0}",""]),r.exports=e},9929:function(r,e,a){(e=a(3645)(!1)).push([r.id,".paraui-tooltip>div{padding-left:12px;padding-right:12px;font-size:14px;font-weight:400;color:#fff;background-color:rgba(46,55,67,.7)}.paraui-tooltip-left-right>div{margin:0 8px}.paraui-tooltip-top-bottom>div{margin:8px 0}",""]),r.exports=e},3645:function(r){"use strict";r.exports=function(r){var e=[];return e.toString=function(){return this.map((function(e){var a=function(r,e){var a=r[1]||"",o=r[3];if(!o)return a;if(e&&"function"==typeof btoa){var i=(n=o,l=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),u="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(u," */")),t=o.sources.map((function(r){return"/*# sourceURL=".concat(o.sourceRoot||"").concat(r," */")}));return[a].concat(t).concat([i]).join("\n")}var n,l,u;return[a].join("\n")}(e,r);return e[2]?"@media ".concat(e[2]," {").concat(a,"}"):a})).join("")},e.i=function(r,a,o){"string"==typeof r&&(r=[[null,r,""]]);var i={};if(o)for(var t=0;t<this.length;t++){var n=this[t][0];null!=n&&(i[n]=!0)}for(var l=0;l<r.length;l++){var u=[].concat(r[l]);o&&i[u[0]]||(a&&(u[2]?u[2]="".concat(a," and ").concat(u[2]):u[2]=a),e.push(u))}},e}},7418:function(r){"use strict";
|
|
2
2
|
/*
|
|
3
3
|
object-assign
|
|
4
4
|
(c) Sindre Sorhus
|
|
@@ -11,4 +11,4 @@ object-assign
|
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/a(7418);var o=a(8156),i=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;i=t("react.element"),e.Fragment=t("react.fragment")}var n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function p(r,e,a){var o,t={},p=null,c=null;for(o in void 0!==a&&(p=""+a),void 0!==e.key&&(p=""+e.key),void 0!==e.ref&&(c=e.ref),e)l.call(e,o)&&!u.hasOwnProperty(o)&&(t[o]=e[o]);if(r&&r.defaultProps)for(o in e=r.defaultProps)void 0===t[o]&&(t[o]=e[o]);return{$$typeof:i,type:r,key:p,ref:c,props:t,_owner:n.current}}e.jsx=p,e.jsxs=p},5893:function(r,e,a){"use strict";r.exports=a(5251)},2113:function(r,e,a){var o=a(3379),i=a(7381);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},3936:function(r,e,a){var o=a(3379),i=a(9916);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},9663:function(r,e,a){var o=a(3379),i=a(4928);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},5271:function(r,e,a){var o=a(3379),i=a(2816);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},7510:function(r,e,a){var o=a(3379),i=a(8979);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},2310:function(r,e,a){var o=a(3379),i=a(9929);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},3379:function(r,e,a){"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},t=function(){var r={};return function(e){if(void 0===r[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(r){a=null}r[e]=a}return r[e]}}(),n=[];function l(r){for(var e=-1,a=0;a<n.length;a++)if(n[a].identifier===r){e=a;break}return e}function u(r,e){for(var a={},o=[],i=0;i<r.length;i++){var t=r[i],u=e.base?t[0]+e.base:t[0],p=a[u]||0,c="".concat(u," ").concat(p);a[u]=p+1;var s=l(c),d={css:t[1],media:t[2],sourceMap:t[3]};-1!==s?(n[s].references++,n[s].updater(d)):n.push({identifier:c,updater:h(d,e),references:1}),o.push(c)}return o}function p(r){var e=document.createElement("style"),o=r.attributes||{};if(void 0===o.nonce){var i=a.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(r){e.setAttribute(r,o[r])})),"function"==typeof r.insert)r.insert(e);else{var n=t(r.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var c,s=(c=[],function(r,e){return c[r]=e,c.filter(Boolean).join("\n")});function d(r,e,a,o){var i=a?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(r.styleSheet)r.styleSheet.cssText=s(e,i);else{var t=document.createTextNode(i),n=r.childNodes;n[e]&&r.removeChild(n[e]),n.length?r.insertBefore(t,n[e]):r.appendChild(t)}}function f(r,e,a){var o=a.css,i=a.media,t=a.sourceMap;if(i?r.setAttribute("media",i):r.removeAttribute("media"),t&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(t))))," */")),r.styleSheet)r.styleSheet.cssText=o;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(o))}}var b=null,g=0;function h(r,e){var a,o,i;if(e.singleton){var t=g++;a=b||(b=p(e)),o=d.bind(null,a,t,!1),i=d.bind(null,a,t,!0)}else a=p(e),o=f.bind(null,a,e),i=function(){!function(r){if(null===r.parentNode)return!1;r.parentNode.removeChild(r)}(a)};return o(r),function(e){if(e){if(e.css===r.css&&e.media===r.media&&e.sourceMap===r.sourceMap)return;o(r=e)}else i()}}r.exports=function(r,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var a=u(r=r||[],e);return function(r){if(r=r||[],"[object Array]"===Object.prototype.toString.call(r)){for(var o=0;o<a.length;o++){var i=l(a[o]);n[i].references--}for(var t=u(r,e),p=0;p<a.length;p++){var c=l(a[p]);0===n[c].references&&(n[c].updater(),n.splice(c,1))}a=t}}}},3566:function(r,e,a){"use strict";var o=a(5893),i=a(7371),t=a(8076),n=a.n(t),l=a(5744),u=a.n(l),p=(a(2113),function(){return p=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},p.apply(this,arguments)}),c=function(r,e){var a={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(r);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(r,o[i])&&(a[o[i]]=r[o[i]])}return a};e.default=function(r){var e=r.title,a=void 0===e?"":e,t=r.children,l=r.arrow,s=void 0===l||l,d=r.interactive,f=void 0===d||d,b=r.className,g=r.placement,h=void 0===g?"top-start":g,v=c(r,["title","children","arrow","interactive","className","placement"]);return(0,o.jsx)(i.default,p({title:a,arrow:s,interactive:f,placement:h},v,{children:(0,o.jsx)("span",p({className:u()("paraui-help",b)},{children:t||(0,o.jsx)(n(),{})}))}))}},4254:function(r,e,a){"use strict";var o=a(5893),i=(a(3936),function(){return i=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},i.apply(this,arguments)});e.default=function(r){var e,a=r.className,t=r.style,n=r.error,l=void 0!==n&&n,u=r.helperText;return(0,o.jsx)("p",i({className:(e="paraui-helper-text",a&&(e+=" "+a),l&&(e+=" paraui-helper-text-error"),e),style:t},{children:u}))}},8767:function(r,e,a){"use strict";var o=a(5893),i=a(3566),t=(a(9663),function(){return t=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},t.apply(this,arguments)});e.default=function(r){var e=r.className,a=r.style,n=r.label,l=r.labelSign,u=r.required,p=void 0!==u&&u,c=r.tooltip,s=r.tooltipType,d=void 0===s?"icon":s,f=r.placement,b=r.arrow,g=r.tooltipIcon,h=function(){var r="paraui-label";return d&&(r+=" paraui-label-"+d),c&&(r+=" paraui-label-tooltip"),e&&(r+=" "+e),r};return(0,o.jsxs)(o.Fragment,{children:["icon"===d&&(0,o.jsxs)("label",t({className:h(),style:a},{children:[(0,o.jsx)(o.Fragment,{children:n}),p&&(0,o.jsx)("span",t({className:"paraui-label-required"},{children:"*"})),l&&(0,o.jsx)("span",{children:l}),c&&(0,o.jsx)(i.default,t({title:c,placement:f,arrow:b},{children:g}))]})),"line"===d&&(0,o.jsx)(i.default,t({title:c||"",placement:f,arrow:b},{children:(0,o.jsxs)("label",t({className:h(),style:a},{children:[(0,o.jsx)(o.Fragment,{children:n}),p&&(0,o.jsx)("span",t({className:"paraui-label-required"},{children:"*"})),l&&(0,o.jsx)("span",{children:l})]}))}))]})}},3877:function(r,e,a){"use strict";var o=a(5893),i=a(8156),t=a(8767),n=(a(7510),function(){return n=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},n.apply(this,arguments)});e.default=function(r){var e=r.className,a=void 0===e?"":e,l=r.labelTooltip,u=r.label,p=void 0===u?"":u,c=r.size,s=void 0===c?"large":c,d=r.disabled,f=void 0!==d&&d,b=r.onChange,g=r.style,h=(0,i.useState)(!1),v=h[0],x=h[1];(0,i.useEffect)((function(){void 0!==r.defaultChecked&&x(r.defaultChecked)}),[]),(0,i.useEffect)((function(){void 0!==r.checked&&x(r.checked)}),[r.checked]);var m;return(0,o.jsxs)("label",n({className:(m="paraui-radio",a&&(m+=" "+a),s&&(m+=" radio-"+s),f&&(m+=" radio-disabled"),v&&(m+=" radio-checked"),m),onClick:function(e){e.preventDefault(),f||(void 0===r.checked&&x(!v),e.target.checked=!v,b&&b(e,!v))},style:g},{children:[(0,o.jsxs)("span",n({className:"paraui-radio-box"},{children:[(0,o.jsx)("input",n({type:"radio",value:v},r.inputProps)),(0,o.jsx)("span",{className:"paraui-radio-box-inner"})]})),void 0!==p&&""!==p&&null!==p?(0,o.jsx)(t.default,n({label:p},l,{className:function(){var r="paraui-radio-label";return l&&l.className&&(r+=" "+l.className),r}()})):null]}))}},7371:function(r,e,a){"use strict";var o=a(5893),i=a(670),t=a(5744),n=a.n(t),l=(a(2310),function(){return l=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},l.apply(this,arguments)}),u=function(r,e){var a={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(r);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(r,o[i])&&(a[o[i]]=r[o[i]])}return a};e.default=function(r){var e,a=r.placement,t=void 0===a?"top-start":a,p=r.className,c=r.arrow,s=void 0===c||c,d=r.PopperProps,f=r.boundariesElement,b=void 0===f?"scrollParent":f,g=u(r,["placement","className","arrow","PopperProps","boundariesElement"]),h=l(l({},r.classes),{popper:n()("paraui-tooltip",p,null===(e=r.classes)||void 0===e?void 0:e.popper,{"paraui-tooltip-left-right":(null==t?void 0:t.includes("left"))||(null==t?void 0:t.includes("right")),"paraui-tooltip-top-bottom":(null==t?void 0:t.includes("top"))||(null==t?void 0:t.includes("bottom"))})});return(0,o.jsx)(i.Tooltip,l({},g,{enterTouchDelay:0,arrow:s,placement:t,classes:h,PopperProps:l(l({},d),{modifiers:{preventOverflow:{boundariesElement:b}}})}))}},670:function(r){"use strict";r.exports=e},8076:function(r){"use strict";r.exports=o},5744:function(r){"use strict";r.exports=a},8156:function(e){"use strict";e.exports=r}},t={};function n(r){var e=t[r];if(void 0!==e)return e.exports;var a=t[r]={id:r,exports:{}};return i[r](a,a.exports,n),a.exports}n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,{a:e}),e},n.d=function(r,e){for(var a in e)n.o(e,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:e[a]})},n.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.nc=void 0;var l={};return function(){"use strict";n.r(l),n.d(l,{RadioGroup:function(){return u}});var r=n(8156),e=n(5893),a=n(3877),o=n(8767),i=n(4254),t=(n(5271),function(){return t=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},t.apply(this,arguments)}),u=function(n){var l=n.className,u=void 0===l?"":l,p=n.style,c=n.label,s=void 0===c?"":c,d=n.labelTooltip,f=n.size,b=void 0===f?"large":f,g=n.row,h=void 0===g||g,v=n.disabled,x=void 0!==v&&v,m=n.required,y=void 0!==m&&m,j=n.error,O=void 0!==j&&j,w=n.helperText,S=void 0===w?"":w,N=n.id,k=void 0===N?"name":N,P=n.value,C=n.list,_=n.onChange,M=(0,r.useState)(),E=M[0],H=M[1];(0,r.useEffect)((function(){void 0!==n.defaultValue&&H(n.defaultValue)}),[]),(0,r.useEffect)((function(){void 0!==P&&H(P)}),[P]);var T,q=function(r){return function(){var e=r[k];P!==e&&(void 0===n.value&&H(e),_&&_(e,r))}};return(0,e.jsxs)("div",t({className:(T="paraui-radio-group",u&&(T+=" "+u),b&&(T+=" radio-group-"+b),O&&(T+=" radio-group-error"),x&&(T+=" radio-group-disabled"),T+=h?" radio-group-row":" radio-group-column"),style:p},{children:[function(){if(s||y){return(0,e.jsx)(o.default,t({label:s,required:y},d,{className:(r="radio-group-label",d&&d.className&&(r+=" "+d.className),r)}))}var r;return null}(),(0,e.jsx)("div",t({className:"radio-group-content"},{children:C.map((function(e,o){return(0,r.createElement)(a.default,t({},e,{checked:E===e[k],size:b,disabled:Boolean(x||e.disabled),key:o,onChange:q(e)}))}))})),(0,e.jsx)(i.default,{className:"radio-group-error-text",error:O,helperText:S})]}))};l.default=u}(),l}()}));
|
|
14
|
+
*/a(7418);var o=a(8156),i=60103;if(e.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var t=Symbol.for;i=t("react.element"),e.Fragment=t("react.fragment")}var n=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l=Object.prototype.hasOwnProperty,u={key:!0,ref:!0,__self:!0,__source:!0};function p(r,e,a){var o,t={},p=null,c=null;for(o in void 0!==a&&(p=""+a),void 0!==e.key&&(p=""+e.key),void 0!==e.ref&&(c=e.ref),e)l.call(e,o)&&!u.hasOwnProperty(o)&&(t[o]=e[o]);if(r&&r.defaultProps)for(o in e=r.defaultProps)void 0===t[o]&&(t[o]=e[o]);return{$$typeof:i,type:r,key:p,ref:c,props:t,_owner:n.current}}e.jsx=p,e.jsxs=p},5893:function(r,e,a){"use strict";r.exports=a(5251)},2113:function(r,e,a){var o=a(3379),i=a(7381);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},3936:function(r,e,a){var o=a(3379),i=a(9916);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},9663:function(r,e,a){var o=a(3379),i=a(4928);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},7510:function(r,e,a){var o=a(3379),i=a(8979);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},5271:function(r,e,a){var o=a(3379),i=a(2816);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},2310:function(r,e,a){var o=a(3379),i=a(9929);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[r.id,i,""]]);var t={insert:("body","body"),singleton:!1};o(i,t);r.exports=i.locals||{}},3379:function(r,e,a){"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},t=function(){var r={};return function(e){if(void 0===r[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(r){a=null}r[e]=a}return r[e]}}(),n=[];function l(r){for(var e=-1,a=0;a<n.length;a++)if(n[a].identifier===r){e=a;break}return e}function u(r,e){for(var a={},o=[],i=0;i<r.length;i++){var t=r[i],u=e.base?t[0]+e.base:t[0],p=a[u]||0,c="".concat(u," ").concat(p);a[u]=p+1;var s=l(c),d={css:t[1],media:t[2],sourceMap:t[3]};-1!==s?(n[s].references++,n[s].updater(d)):n.push({identifier:c,updater:h(d,e),references:1}),o.push(c)}return o}function p(r){var e=document.createElement("style"),o=r.attributes||{};if(void 0===o.nonce){var i=a.nc;i&&(o.nonce=i)}if(Object.keys(o).forEach((function(r){e.setAttribute(r,o[r])})),"function"==typeof r.insert)r.insert(e);else{var n=t(r.insert||"head");if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(e)}return e}var c,s=(c=[],function(r,e){return c[r]=e,c.filter(Boolean).join("\n")});function d(r,e,a,o){var i=a?"":o.media?"@media ".concat(o.media," {").concat(o.css,"}"):o.css;if(r.styleSheet)r.styleSheet.cssText=s(e,i);else{var t=document.createTextNode(i),n=r.childNodes;n[e]&&r.removeChild(n[e]),n.length?r.insertBefore(t,n[e]):r.appendChild(t)}}function f(r,e,a){var o=a.css,i=a.media,t=a.sourceMap;if(i?r.setAttribute("media",i):r.removeAttribute("media"),t&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(t))))," */")),r.styleSheet)r.styleSheet.cssText=o;else{for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(document.createTextNode(o))}}var b=null,g=0;function h(r,e){var a,o,i;if(e.singleton){var t=g++;a=b||(b=p(e)),o=d.bind(null,a,t,!1),i=d.bind(null,a,t,!0)}else a=p(e),o=f.bind(null,a,e),i=function(){!function(r){if(null===r.parentNode)return!1;r.parentNode.removeChild(r)}(a)};return o(r),function(e){if(e){if(e.css===r.css&&e.media===r.media&&e.sourceMap===r.sourceMap)return;o(r=e)}else i()}}r.exports=function(r,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var a=u(r=r||[],e);return function(r){if(r=r||[],"[object Array]"===Object.prototype.toString.call(r)){for(var o=0;o<a.length;o++){var i=l(a[o]);n[i].references--}for(var t=u(r,e),p=0;p<a.length;p++){var c=l(a[p]);0===n[c].references&&(n[c].updater(),n.splice(c,1))}a=t}}}},3566:function(r,e,a){"use strict";var o=a(5893),i=a(7371),t=a(8076),n=a.n(t),l=a(5744),u=a.n(l),p=(a(2113),function(){return p=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},p.apply(this,arguments)}),c=function(r,e){var a={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(r);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(r,o[i])&&(a[o[i]]=r[o[i]])}return a};e.default=function(r){var e=r.title,a=void 0===e?"":e,t=r.children,l=r.arrow,s=void 0===l||l,d=r.interactive,f=void 0===d||d,b=r.className,g=r.placement,h=void 0===g?"top-start":g,v=c(r,["title","children","arrow","interactive","className","placement"]);return(0,o.jsx)(i.default,p({title:a,arrow:s,interactive:f,placement:h},v,{children:(0,o.jsx)("span",p({className:u()("paraui-help",b)},{children:t||(0,o.jsx)(n(),{})}))}))}},4254:function(r,e,a){"use strict";var o=a(5893),i=(a(3936),function(){return i=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},i.apply(this,arguments)});e.default=function(r){var e,a=r.className,t=r.style,n=r.error,l=void 0!==n&&n,u=r.helperText;return(0,o.jsx)("p",i({className:(e="paraui-helper-text",a&&(e+=" "+a),l&&(e+=" paraui-helper-text-error"),e),style:t},{children:u}))}},8767:function(r,e,a){"use strict";var o=a(5893),i=a(3566),t=(a(9663),function(){return t=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},t.apply(this,arguments)});e.default=function(r){var e=r.className,a=r.style,n=r.label,l=r.labelSign,u=r.required,p=void 0!==u&&u,c=r.tooltip,s=r.tooltipType,d=void 0===s?"icon":s,f=r.placement,b=r.arrow,g=r.tooltipIcon,h=function(){var r="paraui-label";return d&&(r+=" paraui-label-"+d),c&&(r+=" paraui-label-tooltip"),e&&(r+=" "+e),r};return(0,o.jsxs)(o.Fragment,{children:["icon"===d&&(0,o.jsxs)("label",t({className:h(),style:a},{children:[(0,o.jsx)(o.Fragment,{children:n}),p&&(0,o.jsx)("span",t({className:"paraui-label-required"},{children:"*"})),l&&(0,o.jsx)("span",{children:l}),c&&(0,o.jsx)(i.default,t({title:c,placement:f,arrow:b},{children:g}))]})),"line"===d&&(0,o.jsx)(i.default,t({title:c||"",placement:f,arrow:b},{children:(0,o.jsxs)("label",t({className:h(),style:a},{children:[(0,o.jsx)(o.Fragment,{children:n}),p&&(0,o.jsx)("span",t({className:"paraui-label-required"},{children:"*"})),l&&(0,o.jsx)("span",{children:l})]}))}))]})}},3877:function(r,e,a){"use strict";var o=a(5893),i=a(8156),t=a(8767),n=(a(7510),function(){return n=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},n.apply(this,arguments)});e.default=function(r){var e=r.className,a=void 0===e?"":e,l=r.labelTooltip,u=r.label,p=void 0===u?"":u,c=r.size,s=void 0===c?"large":c,d=r.disabled,f=void 0!==d&&d,b=r.onChange,g=r.style,h=(0,i.useState)(!1),v=h[0],x=h[1];(0,i.useEffect)((function(){void 0!==r.defaultChecked&&x(r.defaultChecked)}),[]),(0,i.useEffect)((function(){void 0!==r.checked&&x(r.checked)}),[r.checked]);var m;return(0,o.jsxs)("label",n({className:(m="paraui-radio",a&&(m+=" "+a),s&&(m+=" radio-"+s),f&&(m+=" radio-disabled"),v&&(m+=" radio-checked"),m),onClick:function(e){e.preventDefault(),f||(void 0===r.checked&&x(!v),e.target.checked=!v,b&&b(e,!v))},style:g},{children:[(0,o.jsxs)("span",n({className:"paraui-radio-box"},{children:[(0,o.jsx)("input",n({type:"radio",value:v},r.inputProps)),(0,o.jsx)("span",{className:"paraui-radio-box-inner"})]})),void 0!==p&&""!==p&&null!==p?(0,o.jsx)(t.default,n({label:p},l,{className:function(){var r="paraui-radio-label";return l&&l.className&&(r+=" "+l.className),r}()})):null]}))}},7371:function(r,e,a){"use strict";var o=a(5893),i=a(670),t=a(5744),n=a.n(t),l=(a(2310),function(){return l=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},l.apply(this,arguments)}),u=function(r,e){var a={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&e.indexOf(o)<0&&(a[o]=r[o]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(r);i<o.length;i++)e.indexOf(o[i])<0&&Object.prototype.propertyIsEnumerable.call(r,o[i])&&(a[o[i]]=r[o[i]])}return a};e.default=function(r){var e,a=r.placement,t=void 0===a?"top-start":a,p=r.className,c=r.arrow,s=void 0===c||c,d=r.PopperProps,f=r.boundariesElement,b=void 0===f?"scrollParent":f,g=u(r,["placement","className","arrow","PopperProps","boundariesElement"]),h=l(l({},r.classes),{popper:n()("paraui-tooltip",p,null===(e=r.classes)||void 0===e?void 0:e.popper,{"paraui-tooltip-left-right":(null==t?void 0:t.includes("left"))||(null==t?void 0:t.includes("right")),"paraui-tooltip-top-bottom":(null==t?void 0:t.includes("top"))||(null==t?void 0:t.includes("bottom"))})});return(0,o.jsx)(i.Tooltip,l({},g,{enterTouchDelay:0,arrow:s,placement:t,classes:h,PopperProps:l(l({},d),{modifiers:{preventOverflow:{boundariesElement:b}}})}))}},670:function(r){"use strict";r.exports=e},8076:function(r){"use strict";r.exports=o},5744:function(r){"use strict";r.exports=a},8156:function(e){"use strict";e.exports=r}},t={};function n(r){var e=t[r];if(void 0!==e)return e.exports;var a=t[r]={id:r,exports:{}};return i[r](a,a.exports,n),a.exports}n.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return n.d(e,{a:e}),e},n.d=function(r,e){for(var a in e)n.o(e,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:e[a]})},n.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n.nc=void 0;var l={};return function(){"use strict";n.r(l),n.d(l,{RadioGroup:function(){return u}});var r=n(8156),e=n(5893),a=n(3877),o=n(8767),i=n(4254),t=(n(5271),function(){return t=Object.assign||function(r){for(var e,a=1,o=arguments.length;a<o;a++)for(var i in e=arguments[a])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},t.apply(this,arguments)}),u=function(n){var l=n.className,u=void 0===l?"":l,p=n.style,c=n.label,s=void 0===c?"":c,d=n.labelTooltip,f=n.size,b=void 0===f?"large":f,g=n.row,h=void 0===g||g,v=n.disabled,x=void 0!==v&&v,m=n.required,y=void 0!==m&&m,j=n.error,O=void 0!==j&&j,w=n.helperText,S=void 0===w?"":w,N=n.id,k=void 0===N?"name":N,P=n.value,C=n.list,_=n.onChange,M=(0,r.useState)(),E=M[0],H=M[1];(0,r.useEffect)((function(){void 0!==n.defaultValue&&H(n.defaultValue)}),[]),(0,r.useEffect)((function(){void 0!==P&&H(P)}),[P]);var T,q=function(r){return function(){var e=r[k];P!==e&&(void 0===n.value&&H(e),_&&_(e,r))}};return(0,e.jsxs)("div",t({className:(T="paraui-radio-group",u&&(T+=" "+u),b&&(T+=" radio-group-"+b),O&&(T+=" radio-group-error"),x&&(T+=" radio-group-disabled"),T+=h?" radio-group-row":" radio-group-column"),style:p},{children:[function(){if(s||y){return(0,e.jsx)(o.default,t({label:s,required:y},d,{className:(r="radio-group-label",d&&d.className&&(r+=" "+d.className),r)}))}var r;return null}(),(0,e.jsx)("div",t({className:"radio-group-content"},{children:C.map((function(e,o){return(0,r.createElement)(a.default,t({},e,{checked:E===e[k],size:b,disabled:Boolean(x||e.disabled),key:o,onChange:q(e)}))}))})),(0,e.jsx)(i.default,{className:"radio-group-error-text",error:O,helperText:S})]}))};l.default=u}(),l}()}));
|
package/Search/index.d.ts
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/11 16:10
|
|
4
|
-
* @description 搜索框
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import './index.scss';
|
|
8
|
-
export interface SearchProps {
|
|
9
|
-
className?: string;
|
|
10
|
-
/** style */
|
|
11
|
-
style?: React.CSSProperties;
|
|
12
|
-
/** 尺寸 小/中/大 */
|
|
13
|
-
size?: 'small' | 'medium' | 'large';
|
|
14
|
-
/** 输入框placeholder */
|
|
15
|
-
placeholder?: ReactNode;
|
|
16
|
-
/** 默认值 不受控 */
|
|
17
|
-
defaultValue?: string;
|
|
18
|
-
/** 输入框值 */
|
|
19
|
-
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
|
-
/** 是否显示清空按钮 */
|
|
35
|
-
allowClear?: boolean;
|
|
36
|
-
/** 改变值 */
|
|
37
|
-
onChange?: (val: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
38
|
-
/** 失去焦点 */
|
|
39
|
-
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
40
|
-
/** 得到焦点 */
|
|
41
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
42
|
-
/** 键盘按下 */
|
|
43
|
-
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
44
|
-
/** 键盘抬起 */
|
|
45
|
-
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
46
|
-
/** 点击按钮 */
|
|
47
|
-
onClickBtn?: (val: string) => void;
|
|
48
|
-
/** 点击输入框右侧按钮 */
|
|
49
|
-
onClickRightIcon?: (val: string) => void;
|
|
50
|
-
/** 点击清空内容回调 */
|
|
51
|
-
onClear?: () => void;
|
|
52
|
-
/** 回车事件 */
|
|
53
|
-
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
54
|
-
}
|
|
55
|
-
export declare const Search: FunctionComponent<SearchProps>;
|
|
56
|
-
export default Search;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/11 16:10
|
|
4
|
+
* @description 搜索框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import './index.scss';
|
|
8
|
+
export interface SearchProps {
|
|
9
|
+
className?: string;
|
|
10
|
+
/** style */
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
/** 尺寸 小/中/大 */
|
|
13
|
+
size?: 'small' | 'medium' | 'large';
|
|
14
|
+
/** 输入框placeholder */
|
|
15
|
+
placeholder?: ReactNode;
|
|
16
|
+
/** 默认值 不受控 */
|
|
17
|
+
defaultValue?: string;
|
|
18
|
+
/** 输入框值 */
|
|
19
|
+
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
|
+
/** 是否显示清空按钮 */
|
|
35
|
+
allowClear?: boolean;
|
|
36
|
+
/** 改变值 */
|
|
37
|
+
onChange?: (val: string, event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
38
|
+
/** 失去焦点 */
|
|
39
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
40
|
+
/** 得到焦点 */
|
|
41
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
42
|
+
/** 键盘按下 */
|
|
43
|
+
onKeydown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
44
|
+
/** 键盘抬起 */
|
|
45
|
+
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
46
|
+
/** 点击按钮 */
|
|
47
|
+
onClickBtn?: (val: string) => void;
|
|
48
|
+
/** 点击输入框右侧按钮 */
|
|
49
|
+
onClickRightIcon?: (val: string) => void;
|
|
50
|
+
/** 点击清空内容回调 */
|
|
51
|
+
onClear?: () => void;
|
|
52
|
+
/** 回车事件 */
|
|
53
|
+
onEnter?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
54
|
+
}
|
|
55
|
+
export declare const Search: FunctionComponent<SearchProps>;
|
|
56
|
+
export default Search;
|
package/Select/index.d.ts
CHANGED
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author linhd
|
|
3
|
-
* @date 2021/8/5 15:07
|
|
4
|
-
* @description 下拉框
|
|
5
|
-
*/
|
|
6
|
-
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
-
import { EmptyProps } from "../Empty";
|
|
8
|
-
import { LabelTooltipProps } from "../Label";
|
|
9
|
-
import './index.scss';
|
|
10
|
-
export interface SelectProps {
|
|
11
|
-
/** 样式class */
|
|
12
|
-
className?: string;
|
|
13
|
-
/** style */
|
|
14
|
-
style?: React.CSSProperties;
|
|
15
|
-
/** 是否显示下拉 */
|
|
16
|
-
showSelect?: boolean;
|
|
17
|
-
/** 是否显示清空按钮 */
|
|
18
|
-
allowClear?: boolean;
|
|
19
|
-
/** 空状态属性 */
|
|
20
|
-
emptyProps?: EmptyProps;
|
|
21
|
-
/** 大小 */
|
|
22
|
-
size?: 'small' | 'medium' | 'large';
|
|
23
|
-
/** 标题模式 outside外,inside内 */
|
|
24
|
-
labelMode?: 'outside' | 'inside';
|
|
25
|
-
/** 标题 */
|
|
26
|
-
label?: ReactNode;
|
|
27
|
-
/** 标题提示 */
|
|
28
|
-
labelSign?: ReactNode;
|
|
29
|
-
/** 帮组提示信息 */
|
|
30
|
-
labelTooltip?: LabelTooltipProps;
|
|
31
|
-
/** 提示语 */
|
|
32
|
-
placeholder?: ReactNode;
|
|
33
|
-
/** 搜索提示语 */
|
|
34
|
-
searchPlaceholder?: string;
|
|
35
|
-
/** 是否禁用 */
|
|
36
|
-
disabled?: boolean | any[];
|
|
37
|
-
/** 是否多选 */
|
|
38
|
-
multiple?: boolean;
|
|
39
|
-
/** 是否必填 */
|
|
40
|
-
required?: boolean;
|
|
41
|
-
/** 是否错误模式 */
|
|
42
|
-
error?: boolean;
|
|
43
|
-
/** 错误文本 */
|
|
44
|
-
helperText?: ReactNode;
|
|
45
|
-
/** 下拉选项 {label: ReactNode, value: any, children: any[]}*/
|
|
46
|
-
list: any[];
|
|
47
|
-
/**
|
|
48
|
-
* 自定义渲染
|
|
49
|
-
* item: 当前想数据
|
|
50
|
-
* isContent: 是内容,还是下拉选项的每一项
|
|
51
|
-
* */
|
|
52
|
-
renderContent?: (item: any, isSelect: boolean) => ReactNode;
|
|
53
|
-
/** 下拉选中是否有图标, 默认有 */
|
|
54
|
-
selectCheckIcon?: boolean;
|
|
55
|
-
/** 显示名字段 */
|
|
56
|
-
showName?: string;
|
|
57
|
-
/** 取值字段 */
|
|
58
|
-
showValue?: string;
|
|
59
|
-
/** 下级字段 */
|
|
60
|
-
childrenName?: string;
|
|
61
|
-
/** 默认值 不受控 */
|
|
62
|
-
defaultValue?: any;
|
|
63
|
-
/** 选中值 多选时为数组 单选单值 受控 */
|
|
64
|
-
value?: any;
|
|
65
|
-
/** 超出换行 */
|
|
66
|
-
overLine?: boolean;
|
|
67
|
-
/** 是否有搜索 */
|
|
68
|
-
search?: boolean;
|
|
69
|
-
/** 搜索框的props, input的所有属性 */
|
|
70
|
-
searchInputProps?: {
|
|
71
|
-
[name: string]: any;
|
|
72
|
-
};
|
|
73
|
-
/** 可输入回车 */
|
|
74
|
-
input?: boolean;
|
|
75
|
-
/** 搜索模块 */
|
|
76
|
-
searchModel?: 'outside' | 'inside';
|
|
77
|
-
/** 下拉框className */
|
|
78
|
-
selectPopoverClassName?: string;
|
|
79
|
-
/** 更多className */
|
|
80
|
-
morePopoverClassName?: string;
|
|
81
|
-
/** 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 */
|
|
82
|
-
fetchSuggestions?: (val: string, cb: (data: any[]) => void) => void;
|
|
83
|
-
/** 改变值 */
|
|
84
|
-
onChange?: (val: any, e: any) => void;
|
|
85
|
-
/** 全局回车事件 */
|
|
86
|
-
onEnter?: (val: any) => void;
|
|
87
|
-
/** 搜索框输入框回车事件 */
|
|
88
|
-
onEnterInput?: (val: string) => void;
|
|
89
|
-
/** 点击清空内容回调 */
|
|
90
|
-
onClear?: () => void;
|
|
91
|
-
/** 弹出边界,默认 window */
|
|
92
|
-
boundariesElement?: 'scrollParent' | typeof window | 'viewport';
|
|
93
|
-
[name: string]: any;
|
|
94
|
-
}
|
|
95
|
-
declare const Select: FunctionComponent<SelectProps>;
|
|
96
|
-
export default Select;
|
|
1
|
+
/**
|
|
2
|
+
* @author linhd
|
|
3
|
+
* @date 2021/8/5 15:07
|
|
4
|
+
* @description 下拉框
|
|
5
|
+
*/
|
|
6
|
+
import React, { FunctionComponent, ReactNode } from 'react';
|
|
7
|
+
import { EmptyProps } from "../Empty";
|
|
8
|
+
import { LabelTooltipProps } from "../Label";
|
|
9
|
+
import './index.scss';
|
|
10
|
+
export interface SelectProps {
|
|
11
|
+
/** 样式class */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** style */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** 是否显示下拉 */
|
|
16
|
+
showSelect?: boolean;
|
|
17
|
+
/** 是否显示清空按钮 */
|
|
18
|
+
allowClear?: boolean;
|
|
19
|
+
/** 空状态属性 */
|
|
20
|
+
emptyProps?: EmptyProps;
|
|
21
|
+
/** 大小 */
|
|
22
|
+
size?: 'small' | 'medium' | 'large';
|
|
23
|
+
/** 标题模式 outside外,inside内 */
|
|
24
|
+
labelMode?: 'outside' | 'inside';
|
|
25
|
+
/** 标题 */
|
|
26
|
+
label?: ReactNode;
|
|
27
|
+
/** 标题提示 */
|
|
28
|
+
labelSign?: ReactNode;
|
|
29
|
+
/** 帮组提示信息 */
|
|
30
|
+
labelTooltip?: LabelTooltipProps;
|
|
31
|
+
/** 提示语 */
|
|
32
|
+
placeholder?: ReactNode;
|
|
33
|
+
/** 搜索提示语 */
|
|
34
|
+
searchPlaceholder?: string;
|
|
35
|
+
/** 是否禁用 */
|
|
36
|
+
disabled?: boolean | any[];
|
|
37
|
+
/** 是否多选 */
|
|
38
|
+
multiple?: boolean;
|
|
39
|
+
/** 是否必填 */
|
|
40
|
+
required?: boolean;
|
|
41
|
+
/** 是否错误模式 */
|
|
42
|
+
error?: boolean;
|
|
43
|
+
/** 错误文本 */
|
|
44
|
+
helperText?: ReactNode;
|
|
45
|
+
/** 下拉选项 {label: ReactNode, value: any, children: any[]}*/
|
|
46
|
+
list: any[];
|
|
47
|
+
/**
|
|
48
|
+
* 自定义渲染
|
|
49
|
+
* item: 当前想数据
|
|
50
|
+
* isContent: 是内容,还是下拉选项的每一项
|
|
51
|
+
* */
|
|
52
|
+
renderContent?: (item: any, isSelect: boolean) => ReactNode;
|
|
53
|
+
/** 下拉选中是否有图标, 默认有 */
|
|
54
|
+
selectCheckIcon?: boolean;
|
|
55
|
+
/** 显示名字段 */
|
|
56
|
+
showName?: string;
|
|
57
|
+
/** 取值字段 */
|
|
58
|
+
showValue?: string;
|
|
59
|
+
/** 下级字段 */
|
|
60
|
+
childrenName?: string;
|
|
61
|
+
/** 默认值 不受控 */
|
|
62
|
+
defaultValue?: any;
|
|
63
|
+
/** 选中值 多选时为数组 单选单值 受控 */
|
|
64
|
+
value?: any;
|
|
65
|
+
/** 超出换行 */
|
|
66
|
+
overLine?: boolean;
|
|
67
|
+
/** 是否有搜索 */
|
|
68
|
+
search?: boolean;
|
|
69
|
+
/** 搜索框的props, input的所有属性 */
|
|
70
|
+
searchInputProps?: {
|
|
71
|
+
[name: string]: any;
|
|
72
|
+
};
|
|
73
|
+
/** 可输入回车 */
|
|
74
|
+
input?: boolean;
|
|
75
|
+
/** 搜索模块 */
|
|
76
|
+
searchModel?: 'outside' | 'inside';
|
|
77
|
+
/** 下拉框className */
|
|
78
|
+
selectPopoverClassName?: string;
|
|
79
|
+
/** 更多className */
|
|
80
|
+
morePopoverClassName?: string;
|
|
81
|
+
/** 返回输入建议的方法,仅当你的输入建议数据 resolve 时,通过调用 callback(data:[]) 来返回它 */
|
|
82
|
+
fetchSuggestions?: (val: string, cb: (data: any[]) => void) => void;
|
|
83
|
+
/** 改变值 */
|
|
84
|
+
onChange?: (val: any, e: any) => void;
|
|
85
|
+
/** 全局回车事件 */
|
|
86
|
+
onEnter?: (val: any) => void;
|
|
87
|
+
/** 搜索框输入框回车事件 */
|
|
88
|
+
onEnterInput?: (val: string) => void;
|
|
89
|
+
/** 点击清空内容回调 */
|
|
90
|
+
onClear?: () => void;
|
|
91
|
+
/** 弹出边界,默认 window */
|
|
92
|
+
boundariesElement?: 'scrollParent' | typeof window | 'viewport';
|
|
93
|
+
[name: string]: any;
|
|
94
|
+
}
|
|
95
|
+
declare const Select: FunctionComponent<SelectProps>;
|
|
96
|
+
export default Select;
|
package/Select/lang/en_US.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
searchPlaceholder: string;
|
|
3
|
-
selected: string;
|
|
4
|
-
};
|
|
5
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
searchPlaceholder: string;
|
|
3
|
+
selected: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
package/Select/lang/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
zh: {
|
|
3
|
-
searchPlaceholder: string;
|
|
4
|
-
selected: string;
|
|
5
|
-
};
|
|
6
|
-
en: {
|
|
7
|
-
searchPlaceholder: string;
|
|
8
|
-
selected: string;
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
zh: {
|
|
3
|
+
searchPlaceholder: string;
|
|
4
|
+
selected: string;
|
|
5
|
+
};
|
|
6
|
+
en: {
|
|
7
|
+
searchPlaceholder: string;
|
|
8
|
+
selected: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
package/Select/lang/zh_CN.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
searchPlaceholder: string;
|
|
3
|
-
selected: string;
|
|
4
|
-
};
|
|
5
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
searchPlaceholder: string;
|
|
3
|
+
selected: string;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|