@kdcloudjs/kdesign 1.3.8 → 1.3.9
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 +11 -0
- package/dist/kdesign-complete.less +111 -118
- package/dist/kdesign.css +124 -113
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +40 -21
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +2 -2
- package/dist/kdesign.min.js.map +1 -1
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/menu/menu.js +22 -8
- package/es/menu/style/index.css +122 -110
- package/es/menu/style/index.less +51 -73
- package/es/menu/style/mixin.less +59 -42
- package/es/menu/subMenu.js +5 -4
- package/es/select/select.js +6 -4
- package/es/table/table.js +2 -0
- package/es/tree/style/index.css +1 -2
- package/es/tree/style/index.less +1 -2
- package/es/tree/style/token.less +0 -1
- package/es/tree/tree.js +1 -2
- package/es/tree/treeNode.js +1 -1
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/menu/menu.js +22 -8
- package/lib/menu/style/index.css +122 -110
- package/lib/menu/style/index.less +51 -73
- package/lib/menu/style/mixin.less +59 -42
- package/lib/menu/subMenu.js +5 -4
- package/lib/select/select.js +6 -4
- package/lib/table/table.js +2 -0
- package/lib/tree/style/index.css +1 -2
- package/lib/tree/style/index.less +1 -2
- package/lib/tree/style/token.less +0 -1
- package/lib/tree/tree.js +1 -2
- package/lib/tree/treeNode.js +1 -1
- package/package.json +1 -1
|
@@ -20,12 +20,15 @@
|
|
|
20
20
|
cursor: pointer;
|
|
21
21
|
|
|
22
22
|
&-title {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
height: 50px;
|
|
26
|
+
.ellipsis();
|
|
27
|
+
& > span {
|
|
28
|
+
.ellipsis();
|
|
29
|
+
opacity: 1;
|
|
30
|
+
transition: opacity calc(@menu-motion-duration - 0.1s) cubic-bezier(0, .4, .4, 1);
|
|
31
|
+
}
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
&-collapsed {
|
|
@@ -42,7 +45,7 @@
|
|
|
42
45
|
|
|
43
46
|
& > span {
|
|
44
47
|
opacity: 0;
|
|
45
|
-
transition: opacity calc(@menu-motion-duration - 0.1s) cubic-bezier(0
|
|
48
|
+
transition: opacity calc(@menu-motion-duration - 0.1s) cubic-bezier(0, .4, .4, 1);
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
}
|
|
@@ -54,76 +57,90 @@
|
|
|
54
57
|
|
|
55
58
|
&-disabled {
|
|
56
59
|
cursor: not-allowed;
|
|
57
|
-
color: @menu-color-disabled;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
&-active {
|
|
61
|
-
.hover();
|
|
60
|
+
color: @menu-color-disabled !important;
|
|
61
|
+
background-color: @menu-color-background !important;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&-arrow {
|
|
65
65
|
margin-left: auto;
|
|
66
66
|
font-size: 16px;
|
|
67
|
+
|
|
67
68
|
&-up {
|
|
68
69
|
transform: rotate(180deg);
|
|
69
|
-
transition: transform calc(@menu-motion-duration - 0.1s) cubic-bezier(0
|
|
70
|
+
transition: transform calc(@menu-motion-duration - 0.1s) cubic-bezier(0, .4, .4, 1);
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
&-down {
|
|
73
74
|
transform: rotate(0deg);
|
|
74
|
-
transition: transform calc(@menu-motion-duration - 0.1s) cubic-bezier(0.4,0,0.6,1);
|
|
75
|
+
transition: transform calc(@menu-motion-duration - 0.1s) cubic-bezier(0.4, 0, 0.6, 1);
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
|
|
79
81
|
.hover {
|
|
80
82
|
background-color: @menu-sub-color-background;
|
|
81
83
|
color: @menu-sub-color-hover;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
.
|
|
85
|
-
background-color: @menu-
|
|
86
|
-
color: @menu-
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.light-active {
|
|
90
|
-
background-color: @menu-light-color-background-active;
|
|
91
|
-
color: @menu-light-color-active;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.light-default {
|
|
95
|
-
color: @menu-light-color;
|
|
96
|
-
background: #ffffff;
|
|
86
|
+
.active {
|
|
87
|
+
background-color: @menu-sub-color-background;
|
|
88
|
+
color: @menu-sub-color-hover;
|
|
97
89
|
}
|
|
98
90
|
|
|
99
|
-
.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
.ellipsis();
|
|
104
|
-
& > span {
|
|
105
|
-
.ellipsis();
|
|
106
|
-
}
|
|
91
|
+
.active-inline-title {
|
|
92
|
+
color: @menu-sub-color-hover !important;
|
|
93
|
+
background: @menu-color-background !important;
|
|
94
|
+
border: none;
|
|
107
95
|
}
|
|
108
96
|
|
|
109
97
|
|
|
110
98
|
.light {
|
|
111
99
|
.light-default();
|
|
112
100
|
|
|
113
|
-
.@{submenu-prefix-cls}-
|
|
114
|
-
|
|
115
|
-
.light-default();
|
|
101
|
+
.@{menuitem-prefix-cls}-disabled, .@{submenu-prefix-cls}-disabled {
|
|
102
|
+
background-color: #fff !important;
|
|
116
103
|
}
|
|
117
104
|
|
|
118
|
-
.@{submenu-prefix-cls}-
|
|
119
|
-
color: @menu-light-color
|
|
105
|
+
.@{submenu-prefix-cls}-sub {
|
|
106
|
+
color: @menu-light-color;
|
|
107
|
+
background: #FAFAFA;
|
|
120
108
|
}
|
|
121
109
|
|
|
122
|
-
.@{
|
|
110
|
+
.@{menuitem-prefix-cls}:hover {
|
|
123
111
|
.light-hover();
|
|
124
112
|
}
|
|
125
113
|
|
|
126
|
-
.@{menuitem-prefix-cls}
|
|
114
|
+
.@{menuitem-prefix-cls}-hover, .@{submenu-prefix-cls}-hover {
|
|
127
115
|
.light-hover();
|
|
128
116
|
}
|
|
117
|
+
|
|
118
|
+
.@{menuitem-prefix-cls}-active, .@{submenu-prefix-cls}-active {
|
|
119
|
+
.light-active();
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.light-default {
|
|
124
|
+
color: @menu-light-color;
|
|
125
|
+
background: #ffffff;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.light-hover {
|
|
129
|
+
background-color: @menu-light-color-background-hover;
|
|
130
|
+
color: @menu-light-color-hover;
|
|
131
|
+
border: none;
|
|
129
132
|
}
|
|
133
|
+
|
|
134
|
+
.light-active {
|
|
135
|
+
background-color: @menu-light-color-background-active !important;
|
|
136
|
+
color: @menu-light-color-active !important;
|
|
137
|
+
border: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.light-active-inline-title {
|
|
141
|
+
color: @menu-light-color-active !important;
|
|
142
|
+
background: #ffffff !important;
|
|
143
|
+
border: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
|
package/lib/menu/subMenu.js
CHANGED
|
@@ -74,6 +74,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
74
74
|
collapsed = _a.collapsed,
|
|
75
75
|
keyValue = _a.keyValue,
|
|
76
76
|
selectedKey = _a.selectedKey,
|
|
77
|
+
selectedKeyPath = _a.selectedKeyPath,
|
|
77
78
|
openKeys = _a.openKeys,
|
|
78
79
|
triggerSubMenuAction = _a.triggerSubMenuAction,
|
|
79
80
|
forceSubMenuRender = _a.forceSubMenuRender,
|
|
@@ -83,7 +84,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
83
84
|
handleOnOpenChange = _a.handleOnOpenChange,
|
|
84
85
|
_a$paddingLeft = _a.paddingLeft,
|
|
85
86
|
paddingLeft = _a$paddingLeft === void 0 ? 0 : _a$paddingLeft,
|
|
86
|
-
restProps = __rest(_a, ["prefixCls", "theme", "mode", "title", "icon", "disabled", "children", "collapsed", "keyValue", "selectedKey", "openKeys", "triggerSubMenuAction", "forceSubMenuRender", "inlineIndent", "className", "style", "handleOnOpenChange", "paddingLeft"]);
|
|
87
|
+
restProps = __rest(_a, ["prefixCls", "theme", "mode", "title", "icon", "disabled", "children", "collapsed", "keyValue", "selectedKey", "selectedKeyPath", "openKeys", "triggerSubMenuAction", "forceSubMenuRender", "inlineIndent", "className", "style", "handleOnOpenChange", "paddingLeft"]);
|
|
87
88
|
|
|
88
89
|
var isVertical = mode === 'vertical'; // 初始化level
|
|
89
90
|
|
|
@@ -317,7 +318,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
317
318
|
}; // eslint-disable-next-line react-hooks/rules-of-hooks
|
|
318
319
|
|
|
319
320
|
var verticalView = (0, _usePopper.default)( /*#__PURE__*/_react.default.createElement("li", (0, _extends2.default)({
|
|
320
|
-
className: (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "light", theme === 'light'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-collapsed"), collapsed), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-hover"), !disabled &&
|
|
321
|
+
className: (0, _classnames.default)(prefixCls, className, (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, "light", theme === 'light'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-collapsed"), collapsed), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-hover"), !disabled && Array.isArray(openKeys) && (0, _includes.default)(openKeys).call(openKeys, keyValue)), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-active"), Array.isArray(selectedKeyPath) && (0, _includes.default)(selectedKeyPath).call(selectedKeyPath, keyValue)), _classNames2)),
|
|
321
322
|
ref: subMenuVerticalRef,
|
|
322
323
|
key: keyValue
|
|
323
324
|
}, {
|
|
@@ -361,7 +362,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
361
362
|
arrow: false,
|
|
362
363
|
placement: 'rightTop',
|
|
363
364
|
gap: 0,
|
|
364
|
-
visible: isVertical ? visible : false,
|
|
365
|
+
visible: isVertical && !disabled ? visible : false,
|
|
365
366
|
disabled: isVertical ? undefined : true,
|
|
366
367
|
prefixCls: 'kd-menu-popper',
|
|
367
368
|
popperClassName: theme === 'light' ? 'light' : ''
|
|
@@ -374,7 +375,7 @@ var SubMenu = function SubMenu(props) {
|
|
|
374
375
|
|
|
375
376
|
return /*#__PURE__*/_react.default.createElement("li", (0, _extends2.default)({
|
|
376
377
|
ref: subMenuRef,
|
|
377
|
-
className: (0, _classnames.default)(prefixCls, className, (_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, "".concat(prefixCls, "-collapsed"), collapsed), (0, _defineProperty2.default)(_classNames4, "".concat(prefixCls, "-disabled"), disabled), _classNames4)),
|
|
378
|
+
className: (0, _classnames.default)(prefixCls, className, (_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, "".concat(prefixCls, "-collapsed"), collapsed), (0, _defineProperty2.default)(_classNames4, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames4, "".concat(prefixCls, "-active"), Array.isArray(selectedKeyPath) && (0, _includes.default)(selectedKeyPath).call(selectedKeyPath, keyValue)), _classNames4)),
|
|
378
379
|
key: keyValue
|
|
379
380
|
}, mouseEvent, {
|
|
380
381
|
style: style
|
package/lib/select/select.js
CHANGED
|
@@ -91,7 +91,9 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
91
91
|
placeholder = selectProps.placeholder,
|
|
92
92
|
dropdownStyle = selectProps.dropdownStyle,
|
|
93
93
|
style = selectProps.style,
|
|
94
|
-
clearIcon = selectProps.clearIcon
|
|
94
|
+
clearIcon = selectProps.clearIcon,
|
|
95
|
+
_selectProps$popperSt = selectProps.popperStyle,
|
|
96
|
+
popperStyle = _selectProps$popperSt === void 0 ? {} : _selectProps$popperSt;
|
|
95
97
|
var isMultiple = mode === 'multiple'; // 是否多选
|
|
96
98
|
|
|
97
99
|
var _useMergedState = (0, _hooks.useMergedState)(undefined, {
|
|
@@ -153,7 +155,7 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
153
155
|
|
|
154
156
|
var searchCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-dropdown-search"), true)); // 下拉子项列表样式
|
|
155
157
|
|
|
156
|
-
var dropContentCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-dropdown-scroll"), isMultiple ? (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 8 : (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 10)); // 多选底部样式
|
|
158
|
+
var dropContentCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-dropdown-scroll"), (isMultiple ? (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 8 : (realChildren === null || realChildren === void 0 ? void 0 : realChildren.length) > 10) || selectProps.dropdownRender)); // 多选底部样式
|
|
157
159
|
|
|
158
160
|
var multipleFooterCls = (0, _classnames.default)((0, _defineProperty2.default)({}, "".concat(selectPrefixCls, "-multiple-footer"), true)); // 多选,单选公共样式
|
|
159
161
|
|
|
@@ -695,10 +697,10 @@ var InternalSelect = function InternalSelect(props, ref) {
|
|
|
695
697
|
var _ref2 = (_a = selectRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect(),
|
|
696
698
|
width = _ref2.width;
|
|
697
699
|
|
|
698
|
-
return {
|
|
700
|
+
return (0, _extends2.default)({
|
|
699
701
|
width: (dropdownStyle === null || dropdownStyle === void 0 ? void 0 : dropdownStyle.width) || (width > 75 ? width : 75),
|
|
700
702
|
zIndex: 1050
|
|
701
|
-
};
|
|
703
|
+
}, popperStyle);
|
|
702
704
|
}
|
|
703
705
|
};
|
|
704
706
|
|
package/lib/table/table.js
CHANGED
|
@@ -106,6 +106,8 @@ function Table(props) {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
if (footerDataSource) {
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
110
|
+
// @ts-ignore
|
|
109
111
|
pipeline.footerDataSource(footerDataSource);
|
|
110
112
|
}
|
|
111
113
|
/* -------------------------------------------------------------------------- */
|
package/lib/tree/style/index.css
CHANGED
|
@@ -140,7 +140,6 @@
|
|
|
140
140
|
pointer-events: none;
|
|
141
141
|
}
|
|
142
142
|
.kd-tree-node-item {
|
|
143
|
-
height: var(--kd-c-tree-node-sizing-height, 32px);
|
|
144
143
|
display: -webkit-box;
|
|
145
144
|
display: -ms-flexbox;
|
|
146
145
|
display: flex;
|
|
@@ -167,7 +166,7 @@
|
|
|
167
166
|
border-right: 10px;
|
|
168
167
|
border-color: white;
|
|
169
168
|
border-style: solid;
|
|
170
|
-
height:
|
|
169
|
+
height: 100%;
|
|
171
170
|
cursor: default;
|
|
172
171
|
opacity: 0;
|
|
173
172
|
}
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
pointer-events: none;
|
|
34
34
|
}
|
|
35
35
|
&-item {
|
|
36
|
-
height: @tree-node-height;
|
|
37
36
|
display: flex;
|
|
38
37
|
align-items: center;
|
|
39
38
|
}
|
|
@@ -54,7 +53,7 @@
|
|
|
54
53
|
border-right: 10px;
|
|
55
54
|
border-color: white;
|
|
56
55
|
border-style: solid;
|
|
57
|
-
height:
|
|
56
|
+
height: 100%;
|
|
58
57
|
cursor: default;
|
|
59
58
|
opacity: 0;
|
|
60
59
|
}
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
@tree-node-icon-color-text: var(~'@{tree-prefix}-node-icon-color-text', #666666);
|
|
14
14
|
|
|
15
15
|
// sizing
|
|
16
|
-
@tree-node-height: var(~'@{tree-prefix}-node-sizing-height', 32px);
|
|
17
16
|
@tree-expand-icon-height: var(~'@{tree-prefix}-expand-icon-sizing-height', 22px);
|
|
18
17
|
@tree-expand-icon-width: var(~'@{tree-prefix}-expand-icon-sizing-width', 22px);
|
|
19
18
|
@tree-node-icon-height: var(~'@{tree-prefix}-node-icon-sizing-height', 20px);
|
package/lib/tree/tree.js
CHANGED
|
@@ -89,8 +89,7 @@ var InternalTree = /*#__PURE__*/_react.default.forwardRef(function (props, ref)
|
|
|
89
89
|
setTreeNodeClassName = _TreeProps$setTreeNod2 === void 0 ? function () {
|
|
90
90
|
return '';
|
|
91
91
|
} : _TreeProps$setTreeNod2,
|
|
92
|
-
|
|
93
|
-
innerEstimatedItemSize = _TreeProps$estimatedI === void 0 ? 28 : _TreeProps$estimatedI,
|
|
92
|
+
innerEstimatedItemSize = TreeProps.estimatedItemSize,
|
|
94
93
|
style = TreeProps.style;
|
|
95
94
|
var treePrefixCls = getPrefixCls(prefixCls, 'tree', customPrefixcls); // 树样式前缀
|
|
96
95
|
|
package/lib/tree/treeNode.js
CHANGED
|
@@ -363,7 +363,7 @@ var TreeNode = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
363
363
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
364
364
|
className: (0, _classnames.default)("".concat(treeNodePrefixCls, "-item"), (0, _defineProperty2.default)({}, "".concat(treeNodePrefixCls, "-item-hover"), !disabled && selectable), (0, _defineProperty2.default)({}, "".concat(treeNodePrefixCls, "-selected"), selected && selectable && !disabled), (0, _defineProperty2.default)({}, "".concat(treeNodePrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)({}, "".concat(treeNodePrefixCls, "-opened"), expandState), (0, _concat.default)(_context = "".concat(treeNodePrefixCls, "-item-")).call(_context, nodeKey), className),
|
|
365
365
|
style: (0, _extends2.default)({
|
|
366
|
-
height: "".concat(estimatedItemSize)
|
|
366
|
+
height: "".concat(estimatedItemSize, "px")
|
|
367
367
|
}, style),
|
|
368
368
|
onClick: handleClick
|
|
369
369
|
}, renderNode());
|