@kdcloudjs/kdesign 1.5.8 → 1.5.11
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 +48 -0
- package/dist/default-theme.js +1 -1
- package/dist/kdesign-complete.less +156 -114
- package/dist/kdesign.css +122 -101
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +1083 -321
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/KeyCode.d.ts +436 -0
- package/es/_utils/KeyCode.js +623 -0
- package/es/_utils/hooks.d.ts +1 -0
- package/es/_utils/hooks.js +51 -1
- package/es/_utils/usePopper.js +2 -2
- package/es/alert/style/index.css +0 -1
- package/es/alert/style/index.less +0 -1
- package/es/button/style/index.css +3 -0
- package/es/button/style/mixin.less +3 -0
- package/es/carousel/slidebar.d.ts +1 -0
- package/es/checkbox/checkbox.d.ts +1 -0
- package/es/checkbox/checkbox.js +21 -3
- package/es/city-picker/no-data.d.ts +1 -0
- package/es/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +2 -1
- package/es/date-picker/calendar.d.ts +1 -0
- package/es/date-picker/date-picker.js +15 -14
- package/es/date-picker/hooks/use-picker-input.js +44 -38
- package/es/date-picker/panel/month/month.d.ts +1 -0
- package/es/date-picker/panel/quarter/quarter.d.ts +1 -0
- package/es/date-picker/panel/time/time.d.ts +1 -0
- package/es/date-picker/panel/week/week.d.ts +1 -0
- package/es/date-picker/panel/year/year.d.ts +1 -0
- package/es/date-picker/range-picker.js +24 -13
- package/es/date-picker/utils/get-ranges.d.ts +1 -0
- package/es/drawer/drawer.d.ts +1 -0
- package/es/drawer/drawer.js +6 -3
- package/es/dropdown/dropdown.js +1 -1
- package/es/empty/defaultEmptyImg.d.ts +1 -0
- package/es/empty/illustrationEmptyImg.d.ts +1 -0
- package/es/modal/style/index.css +1 -7
- package/es/modal/style/index.less +1 -7
- package/es/modal/style/token.less +7 -4
- package/es/notification-base/notification.js +4 -4
- package/es/pagination/style/index.css +1 -3
- package/es/pagination/style/index.less +1 -3
- package/es/progress/progress.js +1 -1
- package/es/progress/style/index.css +18 -5
- package/es/progress/style/index.less +19 -5
- package/es/progress/style/token.less +5 -1
- package/es/slider/track.d.ts +1 -0
- package/es/style/themes/default.less +1 -1
- package/es/table/table.d.ts +1 -0
- package/es/tabs/style/index.css +79 -74
- package/es/tabs/style/index.less +76 -73
- package/es/tabs/style/mixin.less +0 -6
- package/es/tabs/style/token.less +8 -3
- package/es/transfer/style/index.css +0 -3
- package/es/transfer/style/index.less +0 -3
- package/es/tree/style/index.css +2 -1
- package/es/tree/style/index.less +5 -4
- package/es/tree/style/token.less +2 -1
- package/es/tree/treeNode.js +4 -1
- package/es/upload/style/index.css +17 -6
- package/es/upload/style/index.less +18 -5
- package/es/upload/style/token.less +11 -0
- package/es/upload/upload.js +6 -4
- package/lib/_utils/KeyCode.d.ts +436 -0
- package/lib/_utils/KeyCode.js +631 -0
- package/lib/_utils/hooks.d.ts +1 -0
- package/lib/_utils/hooks.js +54 -1
- package/lib/_utils/usePopper.js +2 -2
- package/lib/alert/style/index.css +0 -1
- package/lib/alert/style/index.less +0 -1
- package/lib/button/style/index.css +3 -0
- package/lib/button/style/mixin.less +3 -0
- package/lib/carousel/slidebar.d.ts +1 -0
- package/lib/checkbox/checkbox.d.ts +1 -0
- package/lib/checkbox/checkbox.js +23 -4
- package/lib/city-picker/no-data.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +2 -1
- package/lib/date-picker/calendar.d.ts +1 -0
- package/lib/date-picker/date-picker.js +15 -15
- package/lib/date-picker/hooks/use-picker-input.js +45 -37
- package/lib/date-picker/panel/month/month.d.ts +1 -0
- package/lib/date-picker/panel/quarter/quarter.d.ts +1 -0
- package/lib/date-picker/panel/time/time.d.ts +1 -0
- package/lib/date-picker/panel/week/week.d.ts +1 -0
- package/lib/date-picker/panel/year/year.d.ts +1 -0
- package/lib/date-picker/range-picker.js +24 -14
- package/lib/date-picker/utils/get-ranges.d.ts +1 -0
- package/lib/drawer/drawer.d.ts +1 -0
- package/lib/drawer/drawer.js +5 -2
- package/lib/dropdown/dropdown.js +1 -1
- package/lib/empty/defaultEmptyImg.d.ts +1 -0
- package/lib/empty/illustrationEmptyImg.d.ts +1 -0
- package/lib/modal/style/index.css +1 -7
- package/lib/modal/style/index.less +1 -7
- package/lib/modal/style/token.less +7 -4
- package/lib/notification-base/notification.js +4 -3
- package/lib/pagination/style/index.css +1 -3
- package/lib/pagination/style/index.less +1 -3
- package/lib/progress/progress.js +1 -1
- package/lib/progress/style/index.css +18 -5
- package/lib/progress/style/index.less +19 -5
- package/lib/progress/style/token.less +5 -1
- package/lib/slider/track.d.ts +1 -0
- package/lib/style/themes/default.less +1 -1
- package/lib/table/table.d.ts +1 -0
- package/lib/tabs/style/index.css +79 -74
- package/lib/tabs/style/index.less +76 -73
- package/lib/tabs/style/mixin.less +0 -6
- package/lib/tabs/style/token.less +8 -3
- package/lib/transfer/style/index.css +0 -3
- package/lib/transfer/style/index.less +0 -3
- package/lib/tree/style/index.css +2 -1
- package/lib/tree/style/index.less +5 -4
- package/lib/tree/style/token.less +2 -1
- package/lib/tree/treeNode.js +4 -1
- package/lib/upload/style/index.css +17 -6
- package/lib/upload/style/index.less +18 -5
- package/lib/upload/style/token.less +11 -0
- package/lib/upload/upload.js +6 -4
- package/package.json +2 -2
package/es/tree/style/index.css
CHANGED
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
flex-grow: 1;
|
|
132
132
|
font-size: var(--kd-c-tree-font-size, var(--kd-g-font-size-small, 12px));
|
|
133
133
|
color: var(--kd-c-tree-color-text, var(--kd-g-color-text-primary, #212121));
|
|
134
|
+
margin-left: var(--kd-c-tree-spacing-margin-left, 16px);
|
|
134
135
|
}
|
|
135
136
|
.kd-tree-root {
|
|
136
137
|
min-width: 100%;
|
|
@@ -155,7 +156,7 @@
|
|
|
155
156
|
align-items: center;
|
|
156
157
|
}
|
|
157
158
|
.kd-tree-node-root .kd-spin-dot-spin {
|
|
158
|
-
border:
|
|
159
|
+
border: 2px solid transparent;
|
|
159
160
|
width: var(--kd-c-tree-expand-icon-loading-sizing-width, 16px);
|
|
160
161
|
height: var(--kd-c-tree-expand-icon-loading-sizing-height, 16px);
|
|
161
162
|
}
|
package/es/tree/style/index.less
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
flex-grow: 1;
|
|
12
12
|
font-size: @tree-font-size;
|
|
13
13
|
color: @tree-color-text;
|
|
14
|
+
margin-left: @tree-margin-left;
|
|
14
15
|
&-root {
|
|
15
16
|
min-width: 100%;
|
|
16
17
|
flex-shrink: 0;
|
|
@@ -30,7 +31,7 @@
|
|
|
30
31
|
align-items: center;
|
|
31
32
|
|
|
32
33
|
.@{kd-prefix}-spin-dot-spin {
|
|
33
|
-
border:
|
|
34
|
+
border: 2px solid transparent;
|
|
34
35
|
width: @tree-expand-icon-loading-width;
|
|
35
36
|
height: @tree-expand-icon-loading-height;
|
|
36
37
|
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
display: flex;
|
|
48
49
|
align-items: center;
|
|
49
50
|
|
|
50
|
-
.node-hover()
|
|
51
|
+
.node-hover();
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
&-indent {
|
|
@@ -115,14 +116,14 @@
|
|
|
115
116
|
.node-hover();
|
|
116
117
|
|
|
117
118
|
&-selected {
|
|
118
|
-
.node-selected()
|
|
119
|
+
.node-selected();
|
|
119
120
|
}
|
|
120
121
|
}
|
|
121
122
|
&-title {
|
|
122
123
|
white-space: nowrap;
|
|
123
124
|
}
|
|
124
125
|
&-selected {
|
|
125
|
-
.node-selected()
|
|
126
|
+
.node-selected();
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
&-draggabled {
|
package/es/tree/style/token.less
CHANGED
|
@@ -22,10 +22,11 @@
|
|
|
22
22
|
@tree-expand-icon-loading-width: var(~'@{tree-prefix}-expand-icon-loading-sizing-width', 16px);
|
|
23
23
|
@tree-node-icon-height: var(~'@{tree-prefix}-node-icon-sizing-height', 16px);
|
|
24
24
|
@tree-node-icon-width: var(~'@{tree-prefix}-node-icon-sizing-width', 16px);
|
|
25
|
+
@tree-margin-left: var(~'@{tree-prefix}-spacing-margin-left', 16px);
|
|
25
26
|
|
|
26
27
|
// font
|
|
27
28
|
@tree-font-size: var(~'@{tree-prefix}-font-size', @font-size-small);
|
|
28
29
|
@tree-node-icon-size: var(~'@{tree-prefix}-node-icon-font-size', 16px);
|
|
29
30
|
|
|
30
31
|
// motion
|
|
31
|
-
@tree-transition-duration: var(~'@{tree-prefix}-motion-duration', @duration-promptly);
|
|
32
|
+
@tree-transition-duration: var(~'@{tree-prefix}-motion-duration', @duration-promptly);
|
package/es/tree/treeNode.js
CHANGED
|
@@ -241,7 +241,10 @@ var TreeNode = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
241
241
|
onChange: handleOnchange,
|
|
242
242
|
checked: checked,
|
|
243
243
|
indeterminate: !disabled && indeterminate,
|
|
244
|
-
disabled: disabled
|
|
244
|
+
disabled: disabled,
|
|
245
|
+
onClick: function onClick(e) {
|
|
246
|
+
return e.stopPropagation();
|
|
247
|
+
}
|
|
245
248
|
}, /*#__PURE__*/React.createElement("span", {
|
|
246
249
|
className: classNames("".concat(treeNodePrefixCls, "-title"), _defineProperty({}, "".concat(treeNodePrefixCls, "-title-disabled"), disabled))
|
|
247
250
|
}, title)) : /*#__PURE__*/React.createElement("span", {
|
|
@@ -180,13 +180,14 @@
|
|
|
180
180
|
list-style: none;
|
|
181
181
|
-webkit-font-feature-settings: 'tnum';
|
|
182
182
|
font-feature-settings: 'tnum';
|
|
183
|
-
margin-top: 16px;
|
|
183
|
+
margin-top: var(--kd-c-upload-text-list-margin-top, 16px);
|
|
184
184
|
font-size: var(--kd-c-upload-font-size, var(--kd-g-font-size-middle, 14px));
|
|
185
185
|
border-top: 1px dashed var(--kd-c-upload-division-color, var(--kd-g-color-border-strong, #d9d9d9));
|
|
186
186
|
}
|
|
187
187
|
.kd-upload .kd-upload-text-list-item {
|
|
188
188
|
position: relative;
|
|
189
|
-
padding:
|
|
189
|
+
padding: 0 var(--kd-c-upload-text-list-item-padding-horizontal, 20px);
|
|
190
|
+
height: var(--kd-c-upload-list-item-height, 44px);
|
|
190
191
|
overflow: hidden;
|
|
191
192
|
white-space: nowrap;
|
|
192
193
|
display: -webkit-box;
|
|
@@ -212,9 +213,12 @@
|
|
|
212
213
|
.kd-upload .kd-upload-text-list-item.error .kd-upload-text-list-item-name {
|
|
213
214
|
color: var(--kd-c-upload-error-color, var(--kd-g-color-error, #fb2323));
|
|
214
215
|
}
|
|
216
|
+
.kd-upload .kd-upload-text-list-item-icon > i {
|
|
217
|
+
font-size: var(--kd-c-upload-font-size, var(--kd-g-font-size-middle, 14px));
|
|
218
|
+
}
|
|
215
219
|
.kd-upload .kd-upload-text-list-item-name {
|
|
216
220
|
display: inline-block;
|
|
217
|
-
margin: 0
|
|
221
|
+
margin: 0 var(--kd-c-upload-text-list-item-name-padding-right, 8px) 0 var(--kd-c-upload-text-list-item-name-padding-left, 4px);
|
|
218
222
|
white-space: nowrap;
|
|
219
223
|
overflow: hidden;
|
|
220
224
|
text-overflow: ellipsis;
|
|
@@ -227,7 +231,9 @@
|
|
|
227
231
|
position: absolute;
|
|
228
232
|
top: 0;
|
|
229
233
|
right: 0;
|
|
230
|
-
padding:
|
|
234
|
+
padding: 0 var(--kd-c-upload-text-list-item-padding-horizontal, 20px);
|
|
235
|
+
height: var(--kd-c-upload-list-item-height, 44px);
|
|
236
|
+
line-height: var(--kd-c-upload-list-item-height, 44px);
|
|
231
237
|
background-color: transparent;
|
|
232
238
|
opacity: 0;
|
|
233
239
|
visibility: hidden;
|
|
@@ -321,7 +327,8 @@
|
|
|
321
327
|
max-height: 100%;
|
|
322
328
|
}
|
|
323
329
|
.kd-upload .kd-upload-picture-list-item.error {
|
|
324
|
-
border-color: var(--kd-c-upload-color-border-error, var(--kd-g-color-border-error, #
|
|
330
|
+
border-color: var(--kd-c-upload-color-border-error, var(--kd-g-color-border-error, #fc808B));
|
|
331
|
+
background-color: var(--kd-c-upload-color-background-error, var(--kd-g-color-background-error, #fff2f4));
|
|
325
332
|
}
|
|
326
333
|
.kd-upload .kd-upload-picture-list-item-loading {
|
|
327
334
|
width: 100%;
|
|
@@ -361,7 +368,7 @@
|
|
|
361
368
|
justify-content: center;
|
|
362
369
|
}
|
|
363
370
|
.kd-upload .kd-upload-picture-list-item-error-text {
|
|
364
|
-
margin-bottom:
|
|
371
|
+
margin-bottom: 4px;
|
|
365
372
|
color: var(--kd-c-upload-error-color, var(--kd-g-color-error, #fb2323));
|
|
366
373
|
}
|
|
367
374
|
.kd-upload .kd-upload-picture-list-item-error a {
|
|
@@ -370,3 +377,7 @@
|
|
|
370
377
|
.kd-upload .kd-upload-picture-list-item-error a:not(:first-child) {
|
|
371
378
|
margin-left: 10px;
|
|
372
379
|
}
|
|
380
|
+
.kd-upload .kd-upload-picture-list-item-action > a {
|
|
381
|
+
color: var(--kd-c-upload-panel-button-color, #0E5FD8);
|
|
382
|
+
font-size: var(--kd-c-upload-picture-action-font-size, var(--kd-g-font-size-small, 12px));
|
|
383
|
+
}
|
|
@@ -59,13 +59,14 @@
|
|
|
59
59
|
|
|
60
60
|
.@{upload-prefix-text-list-cls} {
|
|
61
61
|
.reset-component;
|
|
62
|
-
margin-top:
|
|
62
|
+
margin-top: @upload-text-list-margin-top;
|
|
63
63
|
font-size: @upload-font-size;
|
|
64
64
|
border-top: 1px dashed @upload-border-color-strong;
|
|
65
65
|
|
|
66
66
|
&-item {
|
|
67
67
|
position: relative;
|
|
68
|
-
padding:
|
|
68
|
+
padding: 0 @upload-text-list-item-padding-horizontal;
|
|
69
|
+
height: @upload-list-item-height;
|
|
69
70
|
overflow: hidden;
|
|
70
71
|
white-space: nowrap;
|
|
71
72
|
display: flex;
|
|
@@ -90,9 +91,13 @@
|
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
&-icon > i {
|
|
95
|
+
font-size: @upload-font-size;
|
|
96
|
+
}
|
|
97
|
+
|
|
93
98
|
&-name {
|
|
94
99
|
display: inline-block;
|
|
95
|
-
margin: 0
|
|
100
|
+
margin: 0 @upload-text-list-item-name-padding-right 0 @upload-text-list-item-name-padding-left;
|
|
96
101
|
.ellipsis;
|
|
97
102
|
color: @upload-panel-color;
|
|
98
103
|
}
|
|
@@ -105,7 +110,9 @@
|
|
|
105
110
|
position: absolute;
|
|
106
111
|
top: 0;
|
|
107
112
|
right: 0;
|
|
108
|
-
padding:
|
|
113
|
+
padding: 0 @upload-text-list-item-padding-horizontal;
|
|
114
|
+
height: @upload-list-item-height;
|
|
115
|
+
line-height: @upload-list-item-height;
|
|
109
116
|
background-color: transparent;
|
|
110
117
|
opacity: 0;
|
|
111
118
|
visibility: hidden;
|
|
@@ -185,6 +192,7 @@
|
|
|
185
192
|
|
|
186
193
|
&.error {
|
|
187
194
|
border-color: @upload-border-error-color;
|
|
195
|
+
background-color: @upload-background-error-color;
|
|
188
196
|
}
|
|
189
197
|
|
|
190
198
|
&-loading {
|
|
@@ -209,7 +217,7 @@
|
|
|
209
217
|
justify-content: center;
|
|
210
218
|
|
|
211
219
|
&-text {
|
|
212
|
-
margin-bottom:
|
|
220
|
+
margin-bottom: 4px;
|
|
213
221
|
color: @upload-text-error-color;
|
|
214
222
|
}
|
|
215
223
|
|
|
@@ -220,6 +228,11 @@
|
|
|
220
228
|
}
|
|
221
229
|
}
|
|
222
230
|
}
|
|
231
|
+
|
|
232
|
+
&-action > a {
|
|
233
|
+
color: @upload-panel-button-color;
|
|
234
|
+
font-size: @upload-picture-action-font-size;
|
|
235
|
+
}
|
|
223
236
|
}
|
|
224
237
|
}
|
|
225
238
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
@upload-text-color: var(~'@{upload-prefix}-color', @color-text-third);
|
|
7
7
|
|
|
8
8
|
@upload-text-error-color: var(~'@{upload-prefix}-error-color', @color-error);
|
|
9
|
+
@upload-background-error-color: var(~'@{upload-prefix}-color-background-error', @color-background-error);
|
|
9
10
|
@upload-border-error-color: var(~'@{upload-prefix}-color-border-error', @color-border-error);
|
|
10
11
|
@upload-border-color: var(~'@{upload-prefix}-color-border', @color-border-weak);
|
|
11
12
|
@upload-border-color-strong: var(~'@{upload-prefix}-division-color', @color-border-strong);
|
|
@@ -22,7 +23,17 @@
|
|
|
22
23
|
|
|
23
24
|
// font
|
|
24
25
|
@upload-font-size: var(~'@{upload-prefix}-font-size', @font-size-middle);
|
|
26
|
+
@upload-picture-action-font-size: var(~'@{upload-prefix}-picture-action-font-size', @font-size-small);
|
|
25
27
|
|
|
26
28
|
// radius
|
|
27
29
|
@upload-border-radius: var(~'@{upload-prefix}-radius-border', @radius-border);
|
|
28
30
|
|
|
31
|
+
// sizing
|
|
32
|
+
@upload-list-item-height: var(~'@{upload-prefix}-list-item-height', 44px);
|
|
33
|
+
|
|
34
|
+
//spacing
|
|
35
|
+
@upload-text-list-margin-top: var(~'@{upload-prefix}-text-list-margin-top', 16px);
|
|
36
|
+
@upload-text-list-item-padding-horizontal: var(~'@{upload-prefix}-text-list-item-padding-horizontal', 20px);
|
|
37
|
+
@upload-text-list-item-name-padding-left: var(~'@{upload-prefix}-text-list-item-name-padding-left', 4px);
|
|
38
|
+
@upload-text-list-item-name-padding-right: var(~'@{upload-prefix}-text-list-item-name-padding-right', 8px);
|
|
39
|
+
|
package/es/upload/upload.js
CHANGED
|
@@ -461,7 +461,7 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
461
461
|
}, inputFileProps, {
|
|
462
462
|
ref: mergedRef
|
|
463
463
|
}))))), showUploadList && _mapInstanceProperty(fileList).call(fileList, function (file) {
|
|
464
|
-
var _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19;
|
|
464
|
+
var _context8, _context9, _context10, _context11, _context12, _context13, _context14, _context15, _context16, _context17, _context18, _context19, _context20;
|
|
465
465
|
|
|
466
466
|
return /*#__PURE__*/React.createElement("li", {
|
|
467
467
|
key: file.uid,
|
|
@@ -503,13 +503,15 @@ var InternalUpload = function InternalUpload(props, ref) {
|
|
|
503
503
|
style: {
|
|
504
504
|
verticalAlign: 'top'
|
|
505
505
|
}
|
|
506
|
-
}), "\u4E0A\u4F20\u5931\u8D25"), /*#__PURE__*/React.createElement("div",
|
|
506
|
+
}), "\u4E0A\u4F20\u5931\u8D25"), /*#__PURE__*/React.createElement("div", {
|
|
507
|
+
className: _concatInstanceProperty(_context18 = "".concat(prefixCls, "-")).call(_context18, listType, "-list-item-action")
|
|
508
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
507
509
|
href: "true",
|
|
508
|
-
className: _concatInstanceProperty(
|
|
510
|
+
className: _concatInstanceProperty(_context19 = "".concat(prefixCls, "-")).call(_context19, listType, "-list-item-reupload"),
|
|
509
511
|
onClick: handleReUpload.bind(_this, file)
|
|
510
512
|
}, "\u91CD\u65B0\u4E0A\u4F20"), /*#__PURE__*/React.createElement("a", {
|
|
511
513
|
href: "true",
|
|
512
|
-
className: _concatInstanceProperty(
|
|
514
|
+
className: _concatInstanceProperty(_context20 = "".concat(prefixCls, "-")).call(_context20, listType, "-list-item-delete"),
|
|
513
515
|
onClick: handleRemove.bind(_this, file)
|
|
514
516
|
}, "\u5220\u9664"))) : /*#__PURE__*/React.createElement(Image, {
|
|
515
517
|
previewType: "upload",
|