@kdcloudjs/kdesign 1.6.3 → 1.6.5
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 +13 -0
- package/dist/kdesign-complete.less +108 -94
- package/dist/kdesign.css +76 -71
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +92 -31
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +6 -6
- package/dist/kdesign.min.js.map +1 -1
- package/es/cascader/cascader.js +2 -2
- package/es/cascader/style/index.css +4 -1
- package/es/cascader/style/index.less +5 -1
- package/es/cascader/style/token.less +1 -0
- package/es/date-picker/style/index.css +40 -40
- package/es/date-picker/style/index.less +3 -8
- package/es/date-picker/style/token.less +3 -0
- package/es/input/style/index.css +3 -3
- package/es/input/style/token.less +1 -1
- package/es/locale/locale.d.ts +2 -3
- package/es/locale/zh-CN.d.ts +2 -0
- package/es/locale/zh-CN.js +3 -1
- package/es/pagination/pagination.d.ts +3 -0
- package/es/pagination/pagination.js +34 -15
- package/es/pagination/style/index.css +24 -21
- package/es/pagination/style/index.less +85 -79
- package/es/rate/rate.js +1 -1
- package/es/rate/style/index.css +3 -3
- package/es/rate/style/index.less +9 -3
- package/es/search/search.js +12 -6
- package/es/transfer/list.d.ts +1 -1
- package/es/transfer/list.js +8 -2
- package/es/transfer/transfer.d.ts +1 -1
- package/es/transfer/transfer.js +29 -4
- package/es/upload/style/index.css +1 -2
- package/es/upload/style/index.less +1 -2
- package/lib/cascader/cascader.js +2 -2
- package/lib/cascader/style/index.css +4 -1
- package/lib/cascader/style/index.less +5 -1
- package/lib/cascader/style/token.less +1 -0
- package/lib/date-picker/style/index.css +40 -40
- package/lib/date-picker/style/index.less +3 -8
- package/lib/date-picker/style/token.less +3 -0
- package/lib/input/style/index.css +3 -3
- package/lib/input/style/token.less +1 -1
- package/lib/locale/locale.d.ts +2 -3
- package/lib/locale/zh-CN.d.ts +2 -0
- package/lib/locale/zh-CN.js +3 -1
- package/lib/pagination/pagination.d.ts +3 -0
- package/lib/pagination/pagination.js +36 -16
- package/lib/pagination/style/index.css +24 -21
- package/lib/pagination/style/index.less +85 -79
- package/lib/rate/rate.js +1 -1
- package/lib/rate/style/index.css +3 -3
- package/lib/rate/style/index.less +9 -3
- package/lib/search/search.js +12 -6
- package/lib/transfer/list.d.ts +1 -1
- package/lib/transfer/list.js +8 -1
- package/lib/transfer/transfer.d.ts +1 -1
- package/lib/transfer/transfer.js +29 -3
- package/lib/upload/style/index.css +1 -2
- package/lib/upload/style/index.less +1 -2
- package/package.json +1 -1
|
@@ -51,3 +51,6 @@
|
|
|
51
51
|
// radius
|
|
52
52
|
@date-input-border-radius: var(~'@{date-picker-custom-prefix}-input-radius-border', @radius-border);
|
|
53
53
|
@date-panel-border-radius: var(~'@{date-picker-custom-prefix}-panel-radius-border', @radius-border);
|
|
54
|
+
|
|
55
|
+
// z-index
|
|
56
|
+
@date-panel-z-index: var(~'@{date-picker-custom-prefix}-panel-z-index', @z-index-popper);
|
|
@@ -225,7 +225,7 @@ textarea {
|
|
|
225
225
|
.kd-input-disabled {
|
|
226
226
|
background-color: var(--kd-c-input-color-background-disabled, var(--kd-g-color-background-contain-disabled, #f5f5f5));
|
|
227
227
|
border-color: var(--kd-c-input-color-border-disabled, var(--kd-g-color-border-strong, #d9d9d9));
|
|
228
|
-
color: var(--kd-c-input-affix-color-text,
|
|
228
|
+
color: var(--kd-c-input-affix-color-text, #666);
|
|
229
229
|
cursor: not-allowed;
|
|
230
230
|
}
|
|
231
231
|
.kd-input-underline.kd-input-disabled {
|
|
@@ -318,7 +318,7 @@ textarea {
|
|
|
318
318
|
-ms-flex-pack: center;
|
|
319
319
|
justify-content: center;
|
|
320
320
|
word-break: keep-all;
|
|
321
|
-
color: var(--kd-c-input-affix-color-text,
|
|
321
|
+
color: var(--kd-c-input-affix-color-text, #666);
|
|
322
322
|
}
|
|
323
323
|
.kd-input-wrapper .kd-input-suffix {
|
|
324
324
|
margin-left: 4px;
|
|
@@ -472,7 +472,7 @@ textarea {
|
|
|
472
472
|
}
|
|
473
473
|
.kd-input-group-wrapper .kd-input-group .kd-input-group-addon {
|
|
474
474
|
position: relative;
|
|
475
|
-
color: var(--kd-c-input-affix-color-text,
|
|
475
|
+
color: var(--kd-c-input-affix-color-text, #666);
|
|
476
476
|
padding: 0 9px;
|
|
477
477
|
font-weight: 400;
|
|
478
478
|
font-size: 14px;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
@input-border-color-disabled-inner: var(~'@{input-prefix}-color-border-disabled', @color-border-strong);
|
|
14
14
|
@input-underline-border-color-disabled-inner: var(~'@{input-prefix}-underline-color-border-disabled', @color-border-weak);
|
|
15
15
|
@input-color-disabled-inner: var(~'@{input-prefix}-color-disabled', @color-disabled);
|
|
16
|
-
@input-affix-color: var(~'@{input-prefix}-affix-color-text',
|
|
16
|
+
@input-affix-color: var(~'@{input-prefix}-affix-color-text', #666);
|
|
17
17
|
|
|
18
18
|
// font
|
|
19
19
|
@input-small-font-size-inner: var(~'@{input-prefix}-font-size-small', @font-size-small);
|
package/lib/locale/locale.d.ts
CHANGED
|
@@ -37,6 +37,8 @@ declare class LocaleCache {
|
|
|
37
37
|
'Pagination.prevPage': string;
|
|
38
38
|
'Pagination.nextPage': string;
|
|
39
39
|
'Pagination.total': string;
|
|
40
|
+
'Pagination.page': string;
|
|
41
|
+
'Pagination.row': string;
|
|
40
42
|
'Pagination.first': string;
|
|
41
43
|
'Pagination.last': string;
|
|
42
44
|
'Pagination.perPage': string;
|
|
@@ -62,9 +64,6 @@ declare class LocaleCache {
|
|
|
62
64
|
'CityPicker.internation': string;
|
|
63
65
|
'CityPicker.common': string;
|
|
64
66
|
'CityPicker.noData': string;
|
|
65
|
-
/**
|
|
66
|
-
* 获取所有语言包数据
|
|
67
|
-
*/
|
|
68
67
|
'Search.placeholder': string;
|
|
69
68
|
'Search.desc': string[];
|
|
70
69
|
'Search.nplDesc': string;
|
package/lib/locale/zh-CN.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ declare const locale: {
|
|
|
11
11
|
'Pagination.prevPage': string;
|
|
12
12
|
'Pagination.nextPage': string;
|
|
13
13
|
'Pagination.total': string;
|
|
14
|
+
'Pagination.page': string;
|
|
15
|
+
'Pagination.row': string;
|
|
14
16
|
'Pagination.first': string;
|
|
15
17
|
'Pagination.last': string;
|
|
16
18
|
'Pagination.perPage': string;
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -25,7 +25,9 @@ var locale = (0, _extends2.default)((0, _extends2.default)({
|
|
|
25
25
|
'Progress.success': '加载成功',
|
|
26
26
|
'Pagination.prevPage': '上一页',
|
|
27
27
|
'Pagination.nextPage': '下一页',
|
|
28
|
-
'Pagination.total': '共{
|
|
28
|
+
'Pagination.total': '共{page}页{row}条',
|
|
29
|
+
'Pagination.page': '共{page}页',
|
|
30
|
+
'Pagination.row': '共{row}条',
|
|
29
31
|
'Pagination.first': '第一页',
|
|
30
32
|
'Pagination.last': '最后一页',
|
|
31
33
|
'Pagination.perPage': '{size}条/页',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DropDownProps } from '../dropdown';
|
|
3
3
|
export declare const PageTypes: ["basic", "bill", "simple", "less", "nicety"];
|
|
4
|
+
export declare const TotalTypes: ["page", "row", "all"];
|
|
4
5
|
export declare type pageType = typeof PageTypes[number];
|
|
6
|
+
export declare type totalType = typeof TotalTypes[number];
|
|
5
7
|
export interface IPaginationProps {
|
|
6
8
|
total?: number;
|
|
7
9
|
current?: number;
|
|
@@ -12,6 +14,7 @@ export interface IPaginationProps {
|
|
|
12
14
|
bordered?: boolean;
|
|
13
15
|
pageType?: pageType;
|
|
14
16
|
showTitle?: boolean;
|
|
17
|
+
showTotal?: boolean | totalType;
|
|
15
18
|
defaultCurrent?: number;
|
|
16
19
|
defaultPageSize?: number;
|
|
17
20
|
showSizeChanger?: boolean;
|
|
@@ -11,7 +11,7 @@ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequ
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", {
|
|
12
12
|
value: true
|
|
13
13
|
});
|
|
14
|
-
exports.default = exports.PageTypes = void 0;
|
|
14
|
+
exports.default = exports.TotalTypes = exports.PageTypes = void 0;
|
|
15
15
|
|
|
16
16
|
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
|
17
17
|
|
|
@@ -55,6 +55,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
55
55
|
|
|
56
56
|
var PageTypes = (0, _type.tuple)('basic', 'bill', 'simple', 'less', 'nicety');
|
|
57
57
|
exports.PageTypes = PageTypes;
|
|
58
|
+
var TotalTypes = (0, _type.tuple)('page', 'row', 'all');
|
|
59
|
+
exports.TotalTypes = TotalTypes;
|
|
58
60
|
|
|
59
61
|
var Pagination = function Pagination(props) {
|
|
60
62
|
var _context4;
|
|
@@ -236,14 +238,30 @@ var Pagination = function Pagination(props) {
|
|
|
236
238
|
size: size
|
|
237
239
|
}));
|
|
238
240
|
}));
|
|
241
|
+
var mapShowTotal = {
|
|
242
|
+
basic: 'page',
|
|
243
|
+
nicety: 'row'
|
|
244
|
+
};
|
|
245
|
+
var mapTotalText = {
|
|
246
|
+
page: locale.getLangMsg('Pagination', 'page', {
|
|
247
|
+
page: totalPage
|
|
248
|
+
}),
|
|
249
|
+
row: locale.getLangMsg('Pagination', 'row', {
|
|
250
|
+
row: total
|
|
251
|
+
}),
|
|
252
|
+
all: locale.getLangMsg('Pagination', 'total', {
|
|
253
|
+
page: totalPage,
|
|
254
|
+
row: total
|
|
255
|
+
})
|
|
256
|
+
};
|
|
257
|
+
var showTotal = props.showTotal ? props.showTotal === true ? 'page' : props.showTotal : mapShowTotal[pageType];
|
|
258
|
+
var Total = showTotal && /*#__PURE__*/React.createElement("span", {
|
|
259
|
+
className: "".concat(prefixCls, "-total")
|
|
260
|
+
}, mapTotalText[showTotal]);
|
|
239
261
|
var normalPagination = /*#__PURE__*/React.createElement("div", {
|
|
240
262
|
className: (0, _classnames.default)(prefixCls, className),
|
|
241
263
|
style: style
|
|
242
|
-
},
|
|
243
|
-
className: "".concat(prefixCls, "-total")
|
|
244
|
-
}, locale.getLangMsg('Pagination', 'total', {
|
|
245
|
-
total: totalPage
|
|
246
|
-
})), showJumper && /*#__PURE__*/React.createElement("span", {
|
|
264
|
+
}, Total, showJumper && /*#__PURE__*/React.createElement("span", {
|
|
247
265
|
className: "".concat(prefixCls, "-current")
|
|
248
266
|
}, locale.getLangMsg('Pagination', 'order', {
|
|
249
267
|
order: /*#__PURE__*/React.createElement("input", {
|
|
@@ -304,18 +322,20 @@ var Pagination = function Pagination(props) {
|
|
|
304
322
|
type: "arrow-down",
|
|
305
323
|
className: (0, _classnames.default)("".concat(prefixCls, "-dropdown-icon"), (0, _defineProperty2.default)({}, "".concat(prefixCls, "-dropdown-icon-open"), isOpen))
|
|
306
324
|
})))));
|
|
307
|
-
var simplePagination = /*#__PURE__*/React.createElement("
|
|
308
|
-
className: (0, _classnames.default)(prefixCls, 'simple',
|
|
325
|
+
var simplePagination = /*#__PURE__*/React.createElement("div", {
|
|
326
|
+
className: (0, _classnames.default)(prefixCls, 'simple', className),
|
|
327
|
+
style: style
|
|
328
|
+
}, Total, /*#__PURE__*/React.createElement("ul", {
|
|
329
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-action"), {
|
|
309
330
|
bordered: bordered,
|
|
310
331
|
disabled: disabled
|
|
311
|
-
}
|
|
312
|
-
|
|
313
|
-
}, /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
332
|
+
})
|
|
333
|
+
}, /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('action-item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
314
334
|
onClick: handlePrev,
|
|
315
335
|
disabled: page === 1 || disabled
|
|
316
336
|
}, /*#__PURE__*/React.createElement(_icon.default, {
|
|
317
337
|
type: "arrow-left"
|
|
318
|
-
}))), /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('item', (0, _concat.default)(_context4 = "".concat(page, "/")).call(_context4, totalPage))), /*#__PURE__*/React.createElement("span", {
|
|
338
|
+
}))), /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('action-item', (0, _concat.default)(_context4 = "".concat(page, "/")).call(_context4, totalPage))), /*#__PURE__*/React.createElement("span", {
|
|
319
339
|
className: "".concat(prefixCls, "-current")
|
|
320
340
|
}, showJumper ? /*#__PURE__*/React.createElement("input", {
|
|
321
341
|
type: "text",
|
|
@@ -327,12 +347,12 @@ var Pagination = function Pagination(props) {
|
|
|
327
347
|
value: inputPage === undefined ? page : inputPage
|
|
328
348
|
}) : page), "/ ", /*#__PURE__*/React.createElement("span", {
|
|
329
349
|
className: "".concat(prefixCls, "-total")
|
|
330
|
-
}, totalPage)), /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('item', paginationLangMsg.nextPage)), /*#__PURE__*/React.createElement("button", {
|
|
350
|
+
}, totalPage)), /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('action-item', paginationLangMsg.nextPage)), /*#__PURE__*/React.createElement("button", {
|
|
331
351
|
onClick: handleNext,
|
|
332
352
|
disabled: page === totalPage || disabled
|
|
333
353
|
}, /*#__PURE__*/React.createElement(_icon.default, {
|
|
334
354
|
type: "arrow-right"
|
|
335
|
-
}))));
|
|
355
|
+
})))));
|
|
336
356
|
var lessPages = genArray(1, totalPage);
|
|
337
357
|
var lessPagination = /*#__PURE__*/React.createElement("div", {
|
|
338
358
|
className: (0, _classnames.default)(prefixCls, 'less', {
|
|
@@ -340,7 +360,7 @@ var Pagination = function Pagination(props) {
|
|
|
340
360
|
disabled: disabled
|
|
341
361
|
}, className),
|
|
342
362
|
style: style
|
|
343
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
363
|
+
}, Total, /*#__PURE__*/React.createElement("ul", {
|
|
344
364
|
className: "".concat(prefixCls, "-pages")
|
|
345
365
|
}, /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('pages-item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
346
366
|
onClick: handlePrev,
|
|
@@ -385,7 +405,7 @@ var Pagination = function Pagination(props) {
|
|
|
385
405
|
disabled: disabled
|
|
386
406
|
}, className),
|
|
387
407
|
style: style
|
|
388
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
408
|
+
}, Total, /*#__PURE__*/React.createElement("ul", {
|
|
389
409
|
className: "".concat(prefixCls, "-pages")
|
|
390
410
|
}, /*#__PURE__*/React.createElement("li", (0, _extends2.default)({}, itemAttr('pages-item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
391
411
|
onClick: handlePrev,
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
.kd-pagination .kd-pagination-selector .kd-dropdown-menu-item span {
|
|
293
293
|
white-space: nowrap;
|
|
294
294
|
}
|
|
295
|
-
.kd-pagination.simple {
|
|
295
|
+
.kd-pagination.simple .kd-pagination-action {
|
|
296
296
|
display: -webkit-inline-box;
|
|
297
297
|
display: -ms-inline-flexbox;
|
|
298
298
|
display: inline-flex;
|
|
@@ -305,22 +305,22 @@
|
|
|
305
305
|
border-radius: var(--kd-g-radius-border, 2px);
|
|
306
306
|
border: var(--kd-c-pagination-sizing-border-width, 1px) solid transparent;
|
|
307
307
|
}
|
|
308
|
-
.kd-pagination.simple.bordered {
|
|
308
|
+
.kd-pagination.simple .kd-pagination-action.bordered {
|
|
309
309
|
border-color: var(--kd-c-pagination-color-border, var(--kd-g-color-border-strong, #d9d9d9));
|
|
310
310
|
-webkit-transition: border-color var(--kd-g-duration, 0.3s);
|
|
311
311
|
transition: border-color var(--kd-g-duration, 0.3s);
|
|
312
312
|
}
|
|
313
|
-
.kd-pagination.simple.bordered:active:not(.disabled) {
|
|
313
|
+
.kd-pagination.simple .kd-pagination-action.bordered:active:not(.disabled) {
|
|
314
314
|
border-color: var(--kd-c-pagination-color-border-hover, var(--kd-g-color-theme-7, #375cca));
|
|
315
315
|
}
|
|
316
|
-
.kd-pagination.simple.bordered.disabled,
|
|
317
|
-
.kd-pagination.simple.bordered.disabled > .kd-pagination-item > button {
|
|
316
|
+
.kd-pagination.simple .kd-pagination-action.bordered.disabled,
|
|
317
|
+
.kd-pagination.simple .kd-pagination-action.bordered.disabled > .kd-pagination-item > button {
|
|
318
318
|
background-color: var(--kd-c-pagination-button-color-background-disabled, var(--kd-g-color-background-contain-disabled, #f5f5f5));
|
|
319
319
|
}
|
|
320
|
-
.kd-pagination.simple.disabled > .kd-pagination-item {
|
|
320
|
+
.kd-pagination.simple .kd-pagination-action.disabled > .kd-pagination-action-item {
|
|
321
321
|
color: var(--kd-c-pagination-color-disabled, var(--kd-g-color-disabled, #b2b2b2));
|
|
322
322
|
}
|
|
323
|
-
.kd-pagination.simple .kd-pagination-item {
|
|
323
|
+
.kd-pagination.simple .kd-pagination-action-item {
|
|
324
324
|
-webkit-box-sizing: border-box;
|
|
325
325
|
box-sizing: border-box;
|
|
326
326
|
margin: 0;
|
|
@@ -336,26 +336,29 @@
|
|
|
336
336
|
vertical-align: middle;
|
|
337
337
|
color: var(--kd-g-color-text-primary, #212121);
|
|
338
338
|
}
|
|
339
|
-
.kd-pagination.simple .kd-pagination-item:first-child,
|
|
340
|
-
.kd-pagination.simple .kd-pagination-item:last-child {
|
|
339
|
+
.kd-pagination.simple .kd-pagination-action-item:first-child,
|
|
340
|
+
.kd-pagination.simple .kd-pagination-action-item:last-child {
|
|
341
341
|
margin: 0;
|
|
342
342
|
}
|
|
343
|
-
.kd-pagination.simple .kd-pagination-item .kd-pagination-current {
|
|
343
|
+
.kd-pagination.simple .kd-pagination-action-item .kd-pagination-current {
|
|
344
344
|
margin-right: 2px;
|
|
345
345
|
vertical-align: middle;
|
|
346
346
|
}
|
|
347
|
-
.kd-pagination.simple .kd-pagination-item .kd-pagination-current .kd-pagination-current-input {
|
|
347
|
+
.kd-pagination.simple .kd-pagination-action-item .kd-pagination-current .kd-pagination-current-input {
|
|
348
348
|
margin: 0;
|
|
349
349
|
}
|
|
350
|
-
.kd-pagination.simple .kd-pagination-item .kd-pagination-current .kd-pagination-current-input:disabled {
|
|
350
|
+
.kd-pagination.simple .kd-pagination-action-item .kd-pagination-current .kd-pagination-current-input:disabled {
|
|
351
351
|
color: var(--kd-c-pagination-color-disabled, var(--kd-g-color-disabled, #b2b2b2));
|
|
352
352
|
cursor: not-allowed;
|
|
353
353
|
}
|
|
354
|
-
.kd-pagination.simple .kd-pagination-item .kd-pagination-total {
|
|
354
|
+
.kd-pagination.simple .kd-pagination-action-item .kd-pagination-total {
|
|
355
355
|
vertical-align: middle;
|
|
356
356
|
margin-right: 0;
|
|
357
357
|
}
|
|
358
|
-
.kd-pagination.simple .kd-pagination-item button {
|
|
358
|
+
.kd-pagination.simple .kd-pagination-action-item.bordered > button {
|
|
359
|
+
border: none;
|
|
360
|
+
}
|
|
361
|
+
.kd-pagination.simple .kd-pagination-action-item button {
|
|
359
362
|
-webkit-box-sizing: border-box;
|
|
360
363
|
box-sizing: border-box;
|
|
361
364
|
position: relative;
|
|
@@ -370,21 +373,21 @@
|
|
|
370
373
|
-webkit-transition: border-color var(--kd-g-duration, 0.3s);
|
|
371
374
|
transition: border-color var(--kd-g-duration, 0.3s);
|
|
372
375
|
}
|
|
373
|
-
.kd-pagination.simple .kd-pagination-item button:hover:not(:disabled),
|
|
374
|
-
.kd-pagination.simple .kd-pagination-item button:active:not(:disabled) {
|
|
376
|
+
.kd-pagination.simple .kd-pagination-action-item button:hover:not(:disabled),
|
|
377
|
+
.kd-pagination.simple .kd-pagination-action-item button:active:not(:disabled) {
|
|
375
378
|
border-color: var(--kd-c-pagination-color-border-hover, var(--kd-g-color-theme-7, #375cca));
|
|
376
379
|
}
|
|
377
|
-
.kd-pagination.simple .kd-pagination-item button:hover i,
|
|
378
|
-
.kd-pagination.simple .kd-pagination-item button:active i {
|
|
380
|
+
.kd-pagination.simple .kd-pagination-action-item button:hover i,
|
|
381
|
+
.kd-pagination.simple .kd-pagination-action-item button:active i {
|
|
379
382
|
color: var(--kd-c-pagination-color-text-hover, var(--kd-g-color-theme, #5582f3));
|
|
380
383
|
}
|
|
381
|
-
.kd-pagination.simple .kd-pagination-item button:disabled {
|
|
384
|
+
.kd-pagination.simple .kd-pagination-action-item button:disabled {
|
|
382
385
|
cursor: not-allowed;
|
|
383
386
|
}
|
|
384
|
-
.kd-pagination.simple .kd-pagination-item button:disabled i {
|
|
387
|
+
.kd-pagination.simple .kd-pagination-action-item button:disabled i {
|
|
385
388
|
color: var(--kd-c-pagination-color-disabled, var(--kd-g-color-disabled, #b2b2b2));
|
|
386
389
|
}
|
|
387
|
-
.kd-pagination.simple .kd-pagination-item button i {
|
|
390
|
+
.kd-pagination.simple .kd-pagination-action-item button i {
|
|
388
391
|
position: absolute;
|
|
389
392
|
top: 0;
|
|
390
393
|
right: 0;
|
|
@@ -186,107 +186,113 @@
|
|
|
186
186
|
|
|
187
187
|
// 简化版分页
|
|
188
188
|
&.simple {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
189
|
+
.@{pagination-prefix-cls}-action {
|
|
190
|
+
display: inline-flex;
|
|
191
|
+
justify-content: space-around;
|
|
192
|
+
align-items: center;
|
|
193
|
+
height: @pagination-size;
|
|
194
|
+
border-radius: @radius-border;
|
|
195
|
+
border: @pagination-border-size solid transparent;
|
|
195
196
|
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
197
|
+
&.bordered {
|
|
198
|
+
border-color: @pagination-border-color;
|
|
199
|
+
transition: border-color @duration-promptly;
|
|
199
200
|
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
&:active:not(.disabled) {
|
|
202
|
+
border-color: @pagination-border-hover-color;
|
|
203
|
+
}
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
&.disabled,
|
|
206
|
+
&.disabled > .@{pagination-prefix-cls}-item > button {
|
|
207
|
+
background-color: @pagination-button-disabled-background-color;
|
|
208
|
+
}
|
|
207
209
|
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
&.disabled > .@{pagination-prefix-cls}-item {
|
|
211
|
-
color: @pagination-disabled-color;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
.@{pagination-prefix-cls}-item {
|
|
215
|
-
.reset-component;
|
|
216
|
-
display: inline-block;
|
|
217
|
-
height: @pagination-size;
|
|
218
|
-
overflow: hidden;
|
|
219
|
-
margin: 0 8px;
|
|
220
|
-
vertical-align: middle;
|
|
221
|
-
color: @color-text-primary;
|
|
222
210
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
margin: 0;
|
|
211
|
+
&.disabled > .@{pagination-prefix-cls}-action-item {
|
|
212
|
+
color: @pagination-disabled-color;
|
|
226
213
|
}
|
|
227
214
|
|
|
228
|
-
|
|
229
|
-
|
|
215
|
+
&-item {
|
|
216
|
+
.reset-component;
|
|
217
|
+
display: inline-block;
|
|
218
|
+
height: @pagination-size;
|
|
219
|
+
overflow: hidden;
|
|
220
|
+
margin: 0 8px;
|
|
230
221
|
vertical-align: middle;
|
|
222
|
+
color: @color-text-primary;
|
|
231
223
|
|
|
232
|
-
|
|
224
|
+
&:first-child,
|
|
225
|
+
&:last-child {
|
|
233
226
|
margin: 0;
|
|
227
|
+
}
|
|
234
228
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
229
|
+
.@{pagination-prefix-cls}-current {
|
|
230
|
+
margin-right: 2px;
|
|
231
|
+
vertical-align: middle;
|
|
232
|
+
|
|
233
|
+
.@{pagination-prefix-cls}-current-input {
|
|
234
|
+
margin: 0;
|
|
235
|
+
|
|
236
|
+
&:disabled {
|
|
237
|
+
color: @pagination-disabled-color;
|
|
238
|
+
cursor: not-allowed;
|
|
239
|
+
}
|
|
238
240
|
}
|
|
239
241
|
}
|
|
240
|
-
}
|
|
241
242
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
243
|
+
.@{pagination-prefix-cls}-total {
|
|
244
|
+
vertical-align: middle;
|
|
245
|
+
margin-right: 0;
|
|
246
|
+
}
|
|
246
247
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
width: calc(@pagination-size - 2px);
|
|
251
|
-
height: calc(@pagination-size - 2px);
|
|
252
|
-
border: none;
|
|
253
|
-
background-color: @color-background;
|
|
254
|
-
border-radius: @radius-border;
|
|
255
|
-
cursor: pointer;
|
|
256
|
-
outline: none;
|
|
257
|
-
vertical-align: middle;
|
|
258
|
-
transition: border-color @duration-promptly;
|
|
248
|
+
&.bordered > button {
|
|
249
|
+
border: none;
|
|
250
|
+
}
|
|
259
251
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
252
|
+
button {
|
|
253
|
+
box-sizing: border-box;
|
|
254
|
+
position: relative;
|
|
255
|
+
width: calc(@pagination-size - 2px);
|
|
256
|
+
height: calc(@pagination-size - 2px);
|
|
257
|
+
border: none;
|
|
258
|
+
background-color: @color-background;
|
|
259
|
+
border-radius: @radius-border;
|
|
260
|
+
cursor: pointer;
|
|
261
|
+
outline: none;
|
|
262
|
+
vertical-align: middle;
|
|
263
|
+
transition: border-color @duration-promptly;
|
|
265
264
|
|
|
266
|
-
|
|
267
|
-
|
|
265
|
+
&:hover,
|
|
266
|
+
&:active {
|
|
267
|
+
&:not(:disabled) {
|
|
268
|
+
border-color: @pagination-border-hover-color;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
i {
|
|
272
|
+
color: @pagination-hover-color;
|
|
273
|
+
}
|
|
268
274
|
}
|
|
269
|
-
}
|
|
270
275
|
|
|
271
|
-
|
|
272
|
-
|
|
276
|
+
&:disabled {
|
|
277
|
+
cursor: not-allowed;
|
|
273
278
|
|
|
274
|
-
|
|
275
|
-
|
|
279
|
+
i {
|
|
280
|
+
color: @pagination-disabled-color;
|
|
281
|
+
}
|
|
276
282
|
}
|
|
277
|
-
}
|
|
278
283
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
284
|
+
i {
|
|
285
|
+
position: absolute;
|
|
286
|
+
top: 0;
|
|
287
|
+
right: 0;
|
|
288
|
+
bottom: 0;
|
|
289
|
+
left: 0;
|
|
290
|
+
margin: auto;
|
|
291
|
+
line-height: calc(@pagination-size - 2px);
|
|
292
|
+
font-size: @pagination-icon-size;
|
|
293
|
+
color: @pagination-icon-color;
|
|
294
|
+
transition: color @duration-promptly;
|
|
295
|
+
}
|
|
290
296
|
}
|
|
291
297
|
}
|
|
292
298
|
}
|
package/lib/rate/rate.js
CHANGED
|
@@ -84,7 +84,7 @@ var Rate = function Rate(props) {
|
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
React.useEffect(function () {
|
|
87
|
-
if (value
|
|
87
|
+
if (value !== undefined && value !== selectedValue) {
|
|
88
88
|
setSelectedValue(value);
|
|
89
89
|
}
|
|
90
90
|
}, [value, selectedValue]); // const shouldSetValue = (value: number) => {
|
package/lib/rate/style/index.css
CHANGED
|
@@ -120,13 +120,13 @@
|
|
|
120
120
|
-ms-flex-pack: start;
|
|
121
121
|
justify-content: flex-start;
|
|
122
122
|
}
|
|
123
|
-
.kd-rate-size-large {
|
|
123
|
+
.kd-rate-size-large .kdicon {
|
|
124
124
|
font-size: var(--kd-c-rate-font-size-large, 20px);
|
|
125
125
|
}
|
|
126
|
-
.kd-rate-size-middle {
|
|
126
|
+
.kd-rate-size-middle .kdicon {
|
|
127
127
|
font-size: var(--kd-c-rate-font-size-middle, 16px);
|
|
128
128
|
}
|
|
129
|
-
.kd-rate-size-small {
|
|
129
|
+
.kd-rate-size-small .kdicon {
|
|
130
130
|
font-size: var(--kd-c-rate-font-size-small, 12px);
|
|
131
131
|
}
|
|
132
132
|
.kd-rate-item {
|
|
@@ -9,13 +9,19 @@
|
|
|
9
9
|
display: inline-flex;
|
|
10
10
|
justify-content: flex-start;
|
|
11
11
|
&-size-large {
|
|
12
|
-
|
|
12
|
+
.@{kd-prefix}icon {
|
|
13
|
+
font-size: @rate-large-font-size;
|
|
14
|
+
}
|
|
13
15
|
}
|
|
14
16
|
&-size-middle {
|
|
15
|
-
|
|
17
|
+
.@{kd-prefix}icon {
|
|
18
|
+
font-size: @rate-middle-font-size;
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
21
|
&-size-small {
|
|
18
|
-
|
|
22
|
+
.@{kd-prefix}icon {
|
|
23
|
+
font-size: @rate-small-font-size;
|
|
24
|
+
}
|
|
19
25
|
}
|
|
20
26
|
}
|
|
21
27
|
.@{rate-prefix-cls}-item {
|
package/lib/search/search.js
CHANGED
|
@@ -85,7 +85,9 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
85
85
|
type = searchProps.type,
|
|
86
86
|
placeholder = searchProps.placeholder,
|
|
87
87
|
onSearch = searchProps.onSearch,
|
|
88
|
-
|
|
88
|
+
onFocus = searchProps.onFocus,
|
|
89
|
+
onBlur = searchProps.onBlur,
|
|
90
|
+
restProps = __rest(searchProps, ["prefixCls", "className", "style", "size", "disabled", "onPressEnter", "prefix", "suffix", "borderType", "children", "type", "placeholder", "onSearch", "onFocus", "onBlur"]);
|
|
89
91
|
|
|
90
92
|
(0, _devwarning.default)(_interface.SearchSizeTypes.indexOf(size) === -1, 'search', "cannot found search size '".concat(size, "'"));
|
|
91
93
|
(0, _devwarning.default)(_interface.BorderTypes.indexOf(borderType) === -1, 'search', "cannot found search borderType '".concat(borderType, "'"));
|
|
@@ -104,12 +106,14 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
104
106
|
var handlePressEnter = (0, _react.useCallback)(function (_, event) {
|
|
105
107
|
onPressEnter && (onPressEnter === null || onPressEnter === void 0 ? void 0 : onPressEnter(searchRef.current.value, event));
|
|
106
108
|
}, [onPressEnter, searchRef]);
|
|
107
|
-
var handleFocus = (0, _react.useCallback)(function () {
|
|
109
|
+
var handleFocus = (0, _react.useCallback)(function (event) {
|
|
108
110
|
setFocused(true);
|
|
109
|
-
|
|
110
|
-
|
|
111
|
+
onFocus && onFocus(event);
|
|
112
|
+
}, [onFocus]);
|
|
113
|
+
var handleBlur = (0, _react.useCallback)(function (event) {
|
|
111
114
|
setFocused(false);
|
|
112
|
-
|
|
115
|
+
onBlur && onBlur(event);
|
|
116
|
+
}, [onBlur]);
|
|
113
117
|
var renderPrefix = (0, _react.useCallback)(function () {
|
|
114
118
|
if (!prefix) {
|
|
115
119
|
return null;
|
|
@@ -142,7 +146,9 @@ var InternalSearch = function InternalSearch(props, ref) {
|
|
|
142
146
|
onSearch: onSearch,
|
|
143
147
|
className: className,
|
|
144
148
|
style: style,
|
|
145
|
-
placeholder: placeholder
|
|
149
|
+
placeholder: placeholder,
|
|
150
|
+
onFocus: onFocus,
|
|
151
|
+
onBlur: onBlur
|
|
146
152
|
}), children);
|
|
147
153
|
}
|
|
148
154
|
|
package/lib/transfer/list.d.ts
CHANGED
|
@@ -32,5 +32,5 @@ export interface TransferListProps {
|
|
|
32
32
|
showRemove?: boolean;
|
|
33
33
|
pagination?: PaginationType;
|
|
34
34
|
}
|
|
35
|
-
declare const TransferList: React.
|
|
35
|
+
declare const TransferList: React.ForwardRefExoticComponent<TransferListProps & React.RefAttributes<unknown>>;
|
|
36
36
|
export default TransferList;
|
package/lib/transfer/list.js
CHANGED
|
@@ -49,7 +49,7 @@ function isRenderResultPlainObject(result) {
|
|
|
49
49
|
return result && ! /*#__PURE__*/_react.default.isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]';
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
var
|
|
52
|
+
var ITransferList = function ITransferList(props, ref) {
|
|
53
53
|
var _classNames;
|
|
54
54
|
|
|
55
55
|
var prefixCls = props.prefixCls,
|
|
@@ -80,6 +80,11 @@ var TransferList = function TransferList(props) {
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
var footerDom = footer && footer(props);
|
|
83
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
84
|
+
return {
|
|
85
|
+
onClear: onClear
|
|
86
|
+
};
|
|
87
|
+
});
|
|
83
88
|
|
|
84
89
|
var renderItem = function renderItem(item) {
|
|
85
90
|
var renderResult = render(item);
|
|
@@ -258,6 +263,8 @@ var TransferList = function TransferList(props) {
|
|
|
258
263
|
}, getSelectAllLabel(checkedKeys.length, filteredItems.length))), listBody, listFooter);
|
|
259
264
|
};
|
|
260
265
|
|
|
266
|
+
var TransferList = /*#__PURE__*/_react.default.forwardRef(ITransferList);
|
|
267
|
+
|
|
261
268
|
TransferList.defaultProps = {
|
|
262
269
|
dataSource: [],
|
|
263
270
|
titleText: '',
|
|
@@ -29,5 +29,5 @@ export interface TransferProps {
|
|
|
29
29
|
pagination?: PaginationType;
|
|
30
30
|
footer?: (props: TransferListProps) => React.ReactNode;
|
|
31
31
|
}
|
|
32
|
-
declare const Transfer: React.
|
|
32
|
+
declare const Transfer: React.ForwardRefExoticComponent<TransferProps & React.RefAttributes<unknown>>;
|
|
33
33
|
export default Transfer;
|