@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/es/_utils/hooks.js
CHANGED
|
@@ -226,15 +226,7 @@ export function useResizeObserver(element, handler) {
|
|
|
226
226
|
|
|
227
227
|
['width', 'height', 'x', 'y', 'bottom', 'top', 'left', 'right'].forEach(function (prop) {
|
|
228
228
|
rect[prop] = contentRect[prop];
|
|
229
|
-
});
|
|
230
|
-
// rect.height = contentRect.height
|
|
231
|
-
// rect.x = contentRect.x
|
|
232
|
-
// rect.y = contentRect.y
|
|
233
|
-
// rect.bottom = contentRect.bottom
|
|
234
|
-
// rect.top = contentRect.top
|
|
235
|
-
// rect.left = contentRect.left
|
|
236
|
-
// rect.right = contentRect.right
|
|
237
|
-
|
|
229
|
+
});
|
|
238
230
|
handler && handler(rect);
|
|
239
231
|
};
|
|
240
232
|
|
package/es/cascader/cascader.js
CHANGED
|
@@ -130,7 +130,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
var handleClear = function handleClear() {
|
|
133
|
-
|
|
133
|
+
onChange([]);
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
var inputProps = {
|
|
@@ -162,7 +162,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
162
162
|
}, /*#__PURE__*/React.createElement(Input, _extends({}, inputProps)), /*#__PURE__*/React.createElement("span", {
|
|
163
163
|
className: "".concat(prefixCls, "-picker-label")
|
|
164
164
|
}, (labels === null || labels === void 0 ? void 0 : labels.length) ? displayRender(labels, currentOptions) : '')), allowClear && /*#__PURE__*/React.createElement(Icon, {
|
|
165
|
-
type: "close",
|
|
165
|
+
type: "close-solid",
|
|
166
166
|
className: "".concat(prefixCls, "-picker-close"),
|
|
167
167
|
onClick: handleClear
|
|
168
168
|
})));
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
opacity: 0;
|
|
189
189
|
cursor: pointer;
|
|
190
190
|
visibility: hidden;
|
|
191
|
-
color: var(--kd-c-cascader-
|
|
191
|
+
color: var(--kd-c-cascader-clear-color-text, #666);
|
|
192
192
|
-webkit-transition: all 0.1s;
|
|
193
193
|
transition: all 0.1s;
|
|
194
194
|
-webkit-transform-origin: 50% 50%;
|
|
@@ -196,6 +196,9 @@
|
|
|
196
196
|
-webkit-transform: scale(0.9) translateY(-50%);
|
|
197
197
|
transform: scale(0.9) translateY(-50%);
|
|
198
198
|
}
|
|
199
|
+
.kd-cascader-picker-close:hover {
|
|
200
|
+
color: var(--kd-c-cascader-color-active, var(--kd-g-color-theme, #5582f3));
|
|
201
|
+
}
|
|
199
202
|
.kd-cascader-menus {
|
|
200
203
|
-webkit-box-sizing: border-box;
|
|
201
204
|
box-sizing: border-box;
|
|
@@ -99,10 +99,14 @@
|
|
|
99
99
|
opacity: 0;
|
|
100
100
|
cursor: pointer;
|
|
101
101
|
visibility: hidden;
|
|
102
|
-
color: @cascader-
|
|
102
|
+
color: @cascader-clear-color;
|
|
103
103
|
transition: all 0.1s;
|
|
104
104
|
transform-origin: 50% 50%;
|
|
105
105
|
transform: scale(0.9) translateY(-50%);
|
|
106
|
+
|
|
107
|
+
&:hover {
|
|
108
|
+
color: @cascader-active-color;
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
}
|
|
108
112
|
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
@cascader-selected-color: var(~'@{cascader-prefix}-color-text-selected', @color-theme);
|
|
20
20
|
@cascader-selected-bg-color: var(~'@{cascader-prefix}-color-background-selected', @color-background-ongoing);
|
|
21
21
|
@cascader-disabled-color: var(~'@{cascader-prefix}-color-text-disabled', @color-disabled);
|
|
22
|
+
@cascader-clear-color: var(~'@{cascader-prefix}-clear-color-text', #666);
|
|
22
23
|
|
|
23
24
|
// font
|
|
24
25
|
@cascader-font-size: var(~'@{cascader-prefix}-font-size', @font-size-small);
|
package/es/input/TextArea.d.ts
CHANGED
package/es/input/TextArea.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
2
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
3
3
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
4
4
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
5
5
|
import _Number$MAX_SAFE_INTEGER from "@babel/runtime-corejs3/core-js-stable/number/max-safe-integer";
|
|
@@ -49,6 +49,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
49
49
|
borderType = textAreaProps.borderType,
|
|
50
50
|
defaultValue = textAreaProps.defaultValue,
|
|
51
51
|
count = textAreaProps.count,
|
|
52
|
+
countPosition = textAreaProps.countPosition,
|
|
52
53
|
autoSize = textAreaProps.autoSize,
|
|
53
54
|
className = textAreaProps.className,
|
|
54
55
|
customPrefixcls = textAreaProps.prefixCls,
|
|
@@ -61,7 +62,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
61
62
|
placeholder = textAreaProps.placeholder,
|
|
62
63
|
style = textAreaProps.style,
|
|
63
64
|
size = textAreaProps.size,
|
|
64
|
-
others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
|
|
65
|
+
others = __rest(textAreaProps, ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"]);
|
|
65
66
|
|
|
66
67
|
var textAreaPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // TextArea样式前缀
|
|
67
68
|
|
|
@@ -116,7 +117,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
var handleBlur = function handleBlur(e) {
|
|
119
|
-
showNumberMark && setShowNumberMark(false)
|
|
120
|
+
// showNumberMark && setShowNumberMark(false)
|
|
120
121
|
onBlur && onBlur(e);
|
|
121
122
|
};
|
|
122
123
|
|
|
@@ -145,8 +146,9 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
145
146
|
}
|
|
146
147
|
|
|
147
148
|
if (count && showNumberMark && !disabled && maxLength !== '' && maxLength >= 0) {
|
|
149
|
+
var countClass = classNames("".concat(textAreaPrefixCls, "-textarea-mark"), _defineProperty({}, "".concat(textAreaPrefixCls, "-textarea-mark-inner"), countPosition === 'inner'));
|
|
148
150
|
return /*#__PURE__*/React.createElement("div", {
|
|
149
|
-
className:
|
|
151
|
+
className: countClass
|
|
150
152
|
}, enteredLength, "/", maxLength);
|
|
151
153
|
}
|
|
152
154
|
|
|
@@ -163,7 +165,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
163
165
|
}, [propsValue, setValue]);
|
|
164
166
|
|
|
165
167
|
var renderTextArea = function renderTextArea(prefixCls) {
|
|
166
|
-
var _context,
|
|
168
|
+
var _context, _classNames2, _context2;
|
|
167
169
|
|
|
168
170
|
var hadCount = count && !disabled && !allowClear;
|
|
169
171
|
|
|
@@ -195,7 +197,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
195
197
|
ref: textareaRef,
|
|
196
198
|
disabled: disabled,
|
|
197
199
|
style: _extends({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
|
|
198
|
-
className: classNames("".concat(prefixCls, "-textarea"), (
|
|
200
|
+
className: classNames("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _defineProperty(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _defineProperty(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _classNames2), _defineProperty({}, className, className && !allowClear && !hadCount)),
|
|
199
201
|
onChange: handleChange,
|
|
200
202
|
onFocus: !disabled ? handleFocus : undefined,
|
|
201
203
|
onBlur: !disabled ? handleBlur : undefined,
|
package/es/input/style/index.css
CHANGED
|
@@ -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/es/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/es/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/es/locale/zh-CN.js
CHANGED
|
@@ -15,7 +15,9 @@ var locale = _extends(_extends({
|
|
|
15
15
|
'Progress.success': '加载成功',
|
|
16
16
|
'Pagination.prevPage': '上一页',
|
|
17
17
|
'Pagination.nextPage': '下一页',
|
|
18
|
-
'Pagination.total': '共{
|
|
18
|
+
'Pagination.total': '共{page}页{row}条',
|
|
19
|
+
'Pagination.page': '共{page}页',
|
|
20
|
+
'Pagination.row': '共{row}条',
|
|
19
21
|
'Pagination.first': '第一页',
|
|
20
22
|
'Pagination.last': '最后一页',
|
|
21
23
|
'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;
|
|
@@ -17,6 +17,7 @@ import Dropdown from '../dropdown';
|
|
|
17
17
|
import devWarning from '../_utils/devwarning';
|
|
18
18
|
import { tuple } from '../_utils/type';
|
|
19
19
|
export var PageTypes = tuple('basic', 'bill', 'simple', 'less', 'nicety');
|
|
20
|
+
export var TotalTypes = tuple('page', 'row', 'all');
|
|
20
21
|
|
|
21
22
|
var Pagination = function Pagination(props) {
|
|
22
23
|
var _context4;
|
|
@@ -198,14 +199,30 @@ var Pagination = function Pagination(props) {
|
|
|
198
199
|
size: size
|
|
199
200
|
}));
|
|
200
201
|
}));
|
|
202
|
+
var mapShowTotal = {
|
|
203
|
+
basic: 'page',
|
|
204
|
+
nicety: 'row'
|
|
205
|
+
};
|
|
206
|
+
var mapTotalText = {
|
|
207
|
+
page: locale.getLangMsg('Pagination', 'page', {
|
|
208
|
+
page: totalPage
|
|
209
|
+
}),
|
|
210
|
+
row: locale.getLangMsg('Pagination', 'row', {
|
|
211
|
+
row: total
|
|
212
|
+
}),
|
|
213
|
+
all: locale.getLangMsg('Pagination', 'total', {
|
|
214
|
+
page: totalPage,
|
|
215
|
+
row: total
|
|
216
|
+
})
|
|
217
|
+
};
|
|
218
|
+
var showTotal = props.showTotal ? props.showTotal === true ? 'page' : props.showTotal : mapShowTotal[pageType];
|
|
219
|
+
var Total = showTotal && /*#__PURE__*/React.createElement("span", {
|
|
220
|
+
className: "".concat(prefixCls, "-total")
|
|
221
|
+
}, mapTotalText[showTotal]);
|
|
201
222
|
var normalPagination = /*#__PURE__*/React.createElement("div", {
|
|
202
223
|
className: classNames(prefixCls, className),
|
|
203
224
|
style: style
|
|
204
|
-
},
|
|
205
|
-
className: "".concat(prefixCls, "-total")
|
|
206
|
-
}, locale.getLangMsg('Pagination', 'total', {
|
|
207
|
-
total: totalPage
|
|
208
|
-
})), showJumper && /*#__PURE__*/React.createElement("span", {
|
|
225
|
+
}, Total, showJumper && /*#__PURE__*/React.createElement("span", {
|
|
209
226
|
className: "".concat(prefixCls, "-current")
|
|
210
227
|
}, locale.getLangMsg('Pagination', 'order', {
|
|
211
228
|
order: /*#__PURE__*/React.createElement("input", {
|
|
@@ -266,18 +283,20 @@ var Pagination = function Pagination(props) {
|
|
|
266
283
|
type: "arrow-down",
|
|
267
284
|
className: classNames("".concat(prefixCls, "-dropdown-icon"), _defineProperty({}, "".concat(prefixCls, "-dropdown-icon-open"), isOpen))
|
|
268
285
|
})))));
|
|
269
|
-
var simplePagination = /*#__PURE__*/React.createElement("
|
|
270
|
-
className: classNames(prefixCls, 'simple',
|
|
286
|
+
var simplePagination = /*#__PURE__*/React.createElement("div", {
|
|
287
|
+
className: classNames(prefixCls, 'simple', className),
|
|
288
|
+
style: style
|
|
289
|
+
}, Total, /*#__PURE__*/React.createElement("ul", {
|
|
290
|
+
className: classNames("".concat(prefixCls, "-action"), {
|
|
271
291
|
bordered: bordered,
|
|
272
292
|
disabled: disabled
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
}, /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
293
|
+
})
|
|
294
|
+
}, /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
276
295
|
onClick: handlePrev,
|
|
277
296
|
disabled: page === 1 || disabled
|
|
278
297
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
279
298
|
type: "arrow-left"
|
|
280
|
-
}))), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('item', _concatInstanceProperty(_context4 = "".concat(page, "/")).call(_context4, totalPage))), /*#__PURE__*/React.createElement("span", {
|
|
299
|
+
}))), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', _concatInstanceProperty(_context4 = "".concat(page, "/")).call(_context4, totalPage))), /*#__PURE__*/React.createElement("span", {
|
|
281
300
|
className: "".concat(prefixCls, "-current")
|
|
282
301
|
}, showJumper ? /*#__PURE__*/React.createElement("input", {
|
|
283
302
|
type: "text",
|
|
@@ -289,12 +308,12 @@ var Pagination = function Pagination(props) {
|
|
|
289
308
|
value: inputPage === undefined ? page : inputPage
|
|
290
309
|
}) : page), "/ ", /*#__PURE__*/React.createElement("span", {
|
|
291
310
|
className: "".concat(prefixCls, "-total")
|
|
292
|
-
}, totalPage)), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('item', paginationLangMsg.nextPage)), /*#__PURE__*/React.createElement("button", {
|
|
311
|
+
}, totalPage)), /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('action-item', paginationLangMsg.nextPage)), /*#__PURE__*/React.createElement("button", {
|
|
293
312
|
onClick: handleNext,
|
|
294
313
|
disabled: page === totalPage || disabled
|
|
295
314
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
296
315
|
type: "arrow-right"
|
|
297
|
-
}))));
|
|
316
|
+
})))));
|
|
298
317
|
var lessPages = genArray(1, totalPage);
|
|
299
318
|
var lessPagination = /*#__PURE__*/React.createElement("div", {
|
|
300
319
|
className: classNames(prefixCls, 'less', {
|
|
@@ -302,7 +321,7 @@ var Pagination = function Pagination(props) {
|
|
|
302
321
|
disabled: disabled
|
|
303
322
|
}, className),
|
|
304
323
|
style: style
|
|
305
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
324
|
+
}, Total, /*#__PURE__*/React.createElement("ul", {
|
|
306
325
|
className: "".concat(prefixCls, "-pages")
|
|
307
326
|
}, /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('pages-item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
308
327
|
onClick: handlePrev,
|
|
@@ -347,7 +366,7 @@ var Pagination = function Pagination(props) {
|
|
|
347
366
|
disabled: disabled
|
|
348
367
|
}, className),
|
|
349
368
|
style: style
|
|
350
|
-
}, /*#__PURE__*/React.createElement("ul", {
|
|
369
|
+
}, Total, /*#__PURE__*/React.createElement("ul", {
|
|
351
370
|
className: "".concat(prefixCls, "-pages")
|
|
352
371
|
}, /*#__PURE__*/React.createElement("li", _extends({}, itemAttr('pages-item', paginationLangMsg.prevPage)), /*#__PURE__*/React.createElement("button", {
|
|
353
372
|
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;
|