@kdcloudjs/kdesign 1.6.4 → 1.6.6
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 +33 -0
- package/dist/kdesign-complete.less +110 -87
- package/dist/kdesign.css +44 -32
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +125 -57
- 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/_utils/hooks.js +1 -9
- 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/config-provider/compDefaultProps.d.ts +1 -0
- package/es/config-provider/compDefaultProps.js +1 -0
- package/es/input/TextArea.d.ts +1 -0
- package/es/input/TextArea.js +8 -6
- package/es/input/style/index.css +10 -3
- package/es/input/style/index.less +7 -0
- 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/table/interface.d.ts +8 -0
- package/es/table/table.d.ts +2 -2
- package/es/table/table.js +18 -6
- package/es/tooltip/style/index.css +1 -1
- package/es/tooltip/style/token.less +1 -1
- 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/_utils/hooks.js +1 -9
- 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/config-provider/compDefaultProps.d.ts +1 -0
- package/lib/config-provider/compDefaultProps.js +1 -0
- package/lib/input/TextArea.d.ts +1 -0
- package/lib/input/TextArea.js +9 -7
- package/lib/input/style/index.css +10 -3
- package/lib/input/style/index.less +7 -0
- 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/table/interface.d.ts +8 -0
- package/lib/table/table.d.ts +2 -2
- package/lib/table/table.js +17 -4
- package/lib/tooltip/style/index.css +1 -1
- package/lib/tooltip/style/token.less +1 -1
- 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
package/lib/input/TextArea.d.ts
CHANGED
package/lib/input/TextArea.js
CHANGED
|
@@ -13,10 +13,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
13
13
|
});
|
|
14
14
|
exports.default = void 0;
|
|
15
15
|
|
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
17
|
-
|
|
18
16
|
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
|
19
17
|
|
|
18
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
19
|
+
|
|
20
20
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
|
21
21
|
|
|
22
22
|
var _getOwnPropertySymbols = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols"));
|
|
@@ -81,6 +81,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
81
81
|
borderType = textAreaProps.borderType,
|
|
82
82
|
defaultValue = textAreaProps.defaultValue,
|
|
83
83
|
count = textAreaProps.count,
|
|
84
|
+
countPosition = textAreaProps.countPosition,
|
|
84
85
|
autoSize = textAreaProps.autoSize,
|
|
85
86
|
className = textAreaProps.className,
|
|
86
87
|
customPrefixcls = textAreaProps.prefixCls,
|
|
@@ -93,7 +94,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
93
94
|
placeholder = textAreaProps.placeholder,
|
|
94
95
|
style = textAreaProps.style,
|
|
95
96
|
size = textAreaProps.size,
|
|
96
|
-
others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
|
|
97
|
+
others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
|
|
97
98
|
|
|
98
99
|
var textAreaPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // TextArea样式前缀
|
|
99
100
|
|
|
@@ -148,7 +149,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
148
149
|
};
|
|
149
150
|
|
|
150
151
|
var handleBlur = function handleBlur(e) {
|
|
151
|
-
showNumberMark && setShowNumberMark(false)
|
|
152
|
+
// showNumberMark && setShowNumberMark(false)
|
|
152
153
|
onBlur && onBlur(e);
|
|
153
154
|
};
|
|
154
155
|
|
|
@@ -177,8 +178,9 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
177
178
|
}
|
|
178
179
|
|
|
179
180
|
if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
|
|
181
|
+
var countClass = (0, _classnames.default)("".concat(textAreaPrefixCls, "-textarea-mark"), (0, _defineProperty2.default)({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
|
|
180
182
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
181
|
-
className:
|
|
183
|
+
className: countClass
|
|
182
184
|
}, enteredLength, "/", maxLength);
|
|
183
185
|
}
|
|
184
186
|
|
|
@@ -195,7 +197,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
195
197
|
}, [propsValue, setValue]);
|
|
196
198
|
|
|
197
199
|
var renderTextArea = function renderTextArea(prefixCls) {
|
|
198
|
-
var _context,
|
|
200
|
+
var _context, _classNames2, _context2;
|
|
199
201
|
|
|
200
202
|
var hadCount = count && !disabled && !allowClear;
|
|
201
203
|
|
|
@@ -227,7 +229,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
227
229
|
ref: textareaRef,
|
|
228
230
|
disabled: disabled,
|
|
229
231
|
style: (0, _extends2.default)({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
|
|
230
|
-
className: (0, _classnames.default)("".concat(prefixCls, "-textarea"), (
|
|
232
|
+
className: (0, _classnames.default)("".concat(prefixCls, "-textarea"), (_classNames2 = {}, (0, _defineProperty2.default)(_classNames2, (0, _concat.default)(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), (0, _defineProperty2.default)(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames2), (0, _defineProperty2.default)({}, className, className && !allowClear && !hadCount)),
|
|
231
233
|
onChange: handleChange,
|
|
232
234
|
onFocus: !disabled ? handleFocus : undefined,
|
|
233
235
|
onBlur: !disabled ? handleBlur : undefined,
|
|
@@ -205,6 +205,13 @@ textarea {
|
|
|
205
205
|
z-index: 1;
|
|
206
206
|
color: var(--kd-c-input-placeholder-color-text, var(--kd-g-color-text-placeholder, #ccc));
|
|
207
207
|
font-size: var(--kd-c-input-font-size-small, var(--kd-g-font-size-small, 12px));
|
|
208
|
+
line-height: 18px;
|
|
209
|
+
background-color: #fff;
|
|
210
|
+
}
|
|
211
|
+
.kd-input-textarea-mark-inner {
|
|
212
|
+
top: auto;
|
|
213
|
+
bottom: 5px;
|
|
214
|
+
right: 8px;
|
|
208
215
|
}
|
|
209
216
|
.kd-input-no-resize {
|
|
210
217
|
resize: none;
|
|
@@ -225,7 +232,7 @@ textarea {
|
|
|
225
232
|
.kd-input-disabled {
|
|
226
233
|
background-color: var(--kd-c-input-color-background-disabled, var(--kd-g-color-background-contain-disabled, #f5f5f5));
|
|
227
234
|
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,
|
|
235
|
+
color: var(--kd-c-input-affix-color-text, #666);
|
|
229
236
|
cursor: not-allowed;
|
|
230
237
|
}
|
|
231
238
|
.kd-input-underline.kd-input-disabled {
|
|
@@ -318,7 +325,7 @@ textarea {
|
|
|
318
325
|
-ms-flex-pack: center;
|
|
319
326
|
justify-content: center;
|
|
320
327
|
word-break: keep-all;
|
|
321
|
-
color: var(--kd-c-input-affix-color-text,
|
|
328
|
+
color: var(--kd-c-input-affix-color-text, #666);
|
|
322
329
|
}
|
|
323
330
|
.kd-input-wrapper .kd-input-suffix {
|
|
324
331
|
margin-left: 4px;
|
|
@@ -472,7 +479,7 @@ textarea {
|
|
|
472
479
|
}
|
|
473
480
|
.kd-input-group-wrapper .kd-input-group .kd-input-group-addon {
|
|
474
481
|
position: relative;
|
|
475
|
-
color: var(--kd-c-input-affix-color-text,
|
|
482
|
+
color: var(--kd-c-input-affix-color-text, #666);
|
|
476
483
|
padding: 0 9px;
|
|
477
484
|
font-weight: 400;
|
|
478
485
|
font-size: 14px;
|
|
@@ -37,7 +37,14 @@ textarea {
|
|
|
37
37
|
z-index: 1;
|
|
38
38
|
color: @input-placeholder-color-inner;
|
|
39
39
|
font-size: @input-small-font-size-inner;
|
|
40
|
+
line-height: 18px;
|
|
41
|
+
background-color: #fff;
|
|
40
42
|
}
|
|
43
|
+
&-mark-inner {
|
|
44
|
+
top: auto;
|
|
45
|
+
bottom: 5px;
|
|
46
|
+
right: 8px;
|
|
47
|
+
}
|
|
41
48
|
}
|
|
42
49
|
&-no-resize {
|
|
43
50
|
resize: none;
|
|
@@ -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 {
|