@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.
@@ -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
- style?: CSSProperties;
11
- className?: string;
10
+ buttonType?: ButtonType;
12
11
  children?: ReactNode;
13
- onClick?: () => void;
14
- overlay?: Array<OverlayType>;
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
- buttonType?: ButtonType;
18
- disabled?: boolean;
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;
@@ -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);
@@ -23,6 +23,7 @@ declare const compDefaultProps: {
23
23
  ButtonGroup: {
24
24
  buttonType: string;
25
25
  type: string;
26
+ size: string;
26
27
  };
27
28
  Card: {
28
29
  hoverable: boolean;
@@ -24,7 +24,8 @@ var compDefaultProps = {
24
24
  },
25
25
  ButtonGroup: {
26
26
  buttonType: 'primary',
27
- type: 'basic'
27
+ type: 'basic',
28
+ size: 'middle'
28
29
  },
29
30
  Card: {
30
31
  hoverable: false,
@@ -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
- style?: CSSProperties;
11
- className?: string;
10
+ buttonType?: ButtonType;
12
11
  children?: ReactNode;
13
- onClick?: () => void;
14
- overlay?: Array<OverlayType>;
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
- buttonType?: ButtonType;
18
- disabled?: boolean;
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;
@@ -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);
@@ -23,6 +23,7 @@ declare const compDefaultProps: {
23
23
  ButtonGroup: {
24
24
  buttonType: string;
25
25
  type: string;
26
+ size: string;
26
27
  };
27
28
  Card: {
28
29
  hoverable: boolean;
@@ -42,7 +42,8 @@ var compDefaultProps = {
42
42
  },
43
43
  ButtonGroup: {
44
44
  buttonType: 'primary',
45
- type: 'basic'
45
+ type: 'basic',
46
+ size: 'middle'
46
47
  },
47
48
  Card: {
48
49
  hoverable: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kdcloudjs/kdesign",
3
- "version": "1.6.12",
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": "^4.14.159",
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",