@kdcloudjs/kdesign 1.6.12 → 1.6.13
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/CHANGELOG.md +20 -0
- package/dist/kdesign.css +1 -1
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +9 -3
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +1 -1
- package/dist/kdesign.min.js +2 -2
- package/dist/kdesign.min.js.map +1 -1
- package/es/button/group.d.ts +9 -7
- package/es/button/group.js +6 -1
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/lib/button/group.d.ts +9 -7
- package/lib/button/group.js +6 -1
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/package.json +3 -2
package/es/button/group.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { ButtonType } from './button';
|
|
2
|
+
import { ButtonType, ButtonSize } from './button';
|
|
3
3
|
export declare const ButtonGroupTypes: ["basic", "similar"];
|
|
4
4
|
export declare type ButtonGroupType = typeof ButtonGroupTypes[number];
|
|
5
5
|
export interface OverlayType {
|
|
@@ -7,15 +7,17 @@ export interface OverlayType {
|
|
|
7
7
|
label?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export interface ButtonGroupProps {
|
|
10
|
-
|
|
11
|
-
className?: string;
|
|
10
|
+
buttonType?: ButtonType;
|
|
12
11
|
children?: ReactNode;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
className?: string;
|
|
13
|
+
disabled?: boolean;
|
|
15
14
|
icon?: [ReactNode, ReactNode];
|
|
15
|
+
overlay?: Array<OverlayType>;
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
style?: CSSProperties;
|
|
16
18
|
type?: ButtonGroupType;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
onItemClick?: (data: OverlayType) => void;
|
|
19
21
|
}
|
|
20
22
|
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
23
|
export default ButtonGroup;
|
package/es/button/group.js
CHANGED
|
@@ -31,6 +31,7 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
31
31
|
overlay = buttonGoupProps.overlay,
|
|
32
32
|
icon = buttonGoupProps.icon,
|
|
33
33
|
type = buttonGoupProps.type,
|
|
34
|
+
size = buttonGoupProps.size,
|
|
34
35
|
buttonType = buttonGoupProps.buttonType,
|
|
35
36
|
disabled = buttonGoupProps.disabled,
|
|
36
37
|
onVisibleChange = buttonGoupProps.onVisibleChange;
|
|
@@ -64,11 +65,13 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
64
65
|
ref: refBtnGroup
|
|
65
66
|
}, isBsicType && /*#__PURE__*/React.createElement(Button, {
|
|
66
67
|
type: buttonType,
|
|
68
|
+
size: size,
|
|
67
69
|
disabled: disabled
|
|
68
70
|
}, children, /*#__PURE__*/React.createElement("span", {
|
|
69
71
|
className: "".concat(btnGroupPrefixCls, "-basic-icon")
|
|
70
72
|
}, optionShow ? iconUp : iconDown)), !isBsicType && /*#__PURE__*/React.createElement(Button, {
|
|
71
73
|
type: buttonType,
|
|
74
|
+
size: size,
|
|
72
75
|
disabled: disabled,
|
|
73
76
|
onClick: onClick
|
|
74
77
|
}, children), !isBsicType && /*#__PURE__*/React.createElement("span", {
|
|
@@ -77,13 +80,15 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
77
80
|
}, optionShow ? /*#__PURE__*/React.createElement(Button, {
|
|
78
81
|
icon: iconUp,
|
|
79
82
|
type: buttonType,
|
|
83
|
+
size: size,
|
|
80
84
|
disabled: disabled
|
|
81
85
|
}) : /*#__PURE__*/React.createElement(Button, {
|
|
82
86
|
icon: iconDown,
|
|
83
87
|
type: buttonType,
|
|
88
|
+
size: size,
|
|
84
89
|
disabled: disabled
|
|
85
90
|
})));
|
|
86
|
-
}, [icon, btnGroupPrefixCls, style, btnGroupClasses, refBtnGroup, isBsicType, buttonType, disabled, children, optionShow, onClick]);
|
|
91
|
+
}, [icon, btnGroupPrefixCls, style, btnGroupClasses, refBtnGroup, isBsicType, buttonType, disabled, children, optionShow, onClick, size]);
|
|
87
92
|
var handleItemClick = useCallback(function (data) {
|
|
88
93
|
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(data);
|
|
89
94
|
setOptionShow(false);
|
package/lib/button/group.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { ButtonType } from './button';
|
|
2
|
+
import { ButtonType, ButtonSize } from './button';
|
|
3
3
|
export declare const ButtonGroupTypes: ["basic", "similar"];
|
|
4
4
|
export declare type ButtonGroupType = typeof ButtonGroupTypes[number];
|
|
5
5
|
export interface OverlayType {
|
|
@@ -7,15 +7,17 @@ export interface OverlayType {
|
|
|
7
7
|
label?: React.ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export interface ButtonGroupProps {
|
|
10
|
-
|
|
11
|
-
className?: string;
|
|
10
|
+
buttonType?: ButtonType;
|
|
12
11
|
children?: ReactNode;
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
className?: string;
|
|
13
|
+
disabled?: boolean;
|
|
15
14
|
icon?: [ReactNode, ReactNode];
|
|
15
|
+
overlay?: Array<OverlayType>;
|
|
16
|
+
size?: ButtonSize;
|
|
17
|
+
style?: CSSProperties;
|
|
16
18
|
type?: ButtonGroupType;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
+
onClick?: () => void;
|
|
20
|
+
onItemClick?: (data: OverlayType) => void;
|
|
19
21
|
}
|
|
20
22
|
declare const ButtonGroup: React.ForwardRefExoticComponent<ButtonGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
23
|
export default ButtonGroup;
|
package/lib/button/group.js
CHANGED
|
@@ -64,6 +64,7 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
64
64
|
overlay = buttonGoupProps.overlay,
|
|
65
65
|
icon = buttonGoupProps.icon,
|
|
66
66
|
type = buttonGoupProps.type,
|
|
67
|
+
size = buttonGoupProps.size,
|
|
67
68
|
buttonType = buttonGoupProps.buttonType,
|
|
68
69
|
disabled = buttonGoupProps.disabled,
|
|
69
70
|
onVisibleChange = buttonGoupProps.onVisibleChange;
|
|
@@ -99,11 +100,13 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
99
100
|
ref: refBtnGroup
|
|
100
101
|
}, isBsicType && /*#__PURE__*/_react.default.createElement(_index.Button, {
|
|
101
102
|
type: buttonType,
|
|
103
|
+
size: size,
|
|
102
104
|
disabled: disabled
|
|
103
105
|
}, children, /*#__PURE__*/_react.default.createElement("span", {
|
|
104
106
|
className: "".concat(btnGroupPrefixCls, "-basic-icon")
|
|
105
107
|
}, optionShow ? iconUp : iconDown)), !isBsicType && /*#__PURE__*/_react.default.createElement(_index.Button, {
|
|
106
108
|
type: buttonType,
|
|
109
|
+
size: size,
|
|
107
110
|
disabled: disabled,
|
|
108
111
|
onClick: onClick
|
|
109
112
|
}, children), !isBsicType && /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -112,13 +115,15 @@ var InternalButtonGroup = function InternalButtonGroup(props, ref) {
|
|
|
112
115
|
}, optionShow ? /*#__PURE__*/_react.default.createElement(_index.Button, {
|
|
113
116
|
icon: iconUp,
|
|
114
117
|
type: buttonType,
|
|
118
|
+
size: size,
|
|
115
119
|
disabled: disabled
|
|
116
120
|
}) : /*#__PURE__*/_react.default.createElement(_index.Button, {
|
|
117
121
|
icon: iconDown,
|
|
118
122
|
type: buttonType,
|
|
123
|
+
size: size,
|
|
119
124
|
disabled: disabled
|
|
120
125
|
})));
|
|
121
|
-
}, [icon, btnGroupPrefixCls, style, btnGroupClasses, refBtnGroup, isBsicType, buttonType, disabled, children, optionShow, onClick]);
|
|
126
|
+
}, [icon, btnGroupPrefixCls, style, btnGroupClasses, refBtnGroup, isBsicType, buttonType, disabled, children, optionShow, onClick, size]);
|
|
122
127
|
var handleItemClick = (0, _react.useCallback)(function (data) {
|
|
123
128
|
onItemClick === null || onItemClick === void 0 ? void 0 : onItemClick(data);
|
|
124
129
|
setOptionShow(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kdcloudjs/kdesign",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.13",
|
|
4
4
|
"description": "KDesign 金蝶前端react 组件库",
|
|
5
5
|
"title": "kdesign",
|
|
6
6
|
"keywords": [
|
|
@@ -107,10 +107,11 @@
|
|
|
107
107
|
"@types/enzyme": "^3.10.7",
|
|
108
108
|
"@types/jest": "^26.0.14",
|
|
109
109
|
"@types/jest-image-snapshot": "^4.1.0",
|
|
110
|
-
"@types/lodash": "
|
|
110
|
+
"@types/lodash": "ts3.9",
|
|
111
111
|
"@types/puppeteer": "^3.0.2",
|
|
112
112
|
"@types/react": "^16.9.21",
|
|
113
113
|
"@types/react-dom": "^16.9.5",
|
|
114
|
+
"@types/responselike": "ts3.9",
|
|
114
115
|
"@typescript-eslint/eslint-plugin": "^3.0.0",
|
|
115
116
|
"@typescript-eslint/parser": "^3.0.0",
|
|
116
117
|
"algoliasearch": "^4.5.1",
|