@kdcloudjs/kdesign 1.6.4 → 1.6.5-stable.1
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 +76 -0
- package/dist/kdesign-complete.less +102 -97
- package/dist/kdesign.css +36 -44
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +271 -97
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/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/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/steps/style/index.css +0 -13
- package/es/steps/style/index.less +0 -11
- package/es/table/feature/mergeCellHover.d.ts +3 -0
- package/es/table/feature/mergeCellHover.js +7 -0
- package/es/table/interface.d.ts +8 -0
- package/es/table/table.d.ts +2 -2
- package/es/table/table.js +20 -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/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/steps/style/index.css +0 -13
- package/lib/steps/style/index.less +0 -11
- package/lib/table/feature/mergeCellHover.d.ts +3 -0
- package/lib/table/feature/mergeCellHover.js +15 -0
- package/lib/table/interface.d.ts +8 -0
- package/lib/table/table.d.ts +2 -2
- package/lib/table/table.js +20 -4
- 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 +2 -2
package/es/steps/style/index.css
CHANGED
|
@@ -164,9 +164,6 @@
|
|
|
164
164
|
-webkit-box-direction: normal;
|
|
165
165
|
-ms-flex-direction: column;
|
|
166
166
|
flex-direction: column;
|
|
167
|
-
-webkit-box-pack: center;
|
|
168
|
-
-ms-flex-pack: center;
|
|
169
|
-
justify-content: center;
|
|
170
167
|
}
|
|
171
168
|
.kd-steps-item-iconContainer {
|
|
172
169
|
display: -webkit-box;
|
|
@@ -233,21 +230,11 @@
|
|
|
233
230
|
line-height: 20px;
|
|
234
231
|
font-size: var(--kd-c-steps-font-size, var(--kd-g-font-size-small, 12px));
|
|
235
232
|
color: var(--kd-c-steps-color-wait, #999);
|
|
236
|
-
overflow: hidden;
|
|
237
|
-
text-overflow: ellipsis;
|
|
238
|
-
word-break: break-word;
|
|
239
|
-
display: -webkit-box;
|
|
240
|
-
-webkit-box-orient: vertical;
|
|
241
233
|
}
|
|
242
234
|
.kd-steps-item-content .kd-steps-item-description {
|
|
243
235
|
line-height: 20px;
|
|
244
236
|
font-size: var(--kd-c-steps-font-size, var(--kd-g-font-size-small, 12px));
|
|
245
237
|
color: var(--kd-c-steps-color-wait, #999);
|
|
246
|
-
overflow: hidden;
|
|
247
|
-
text-overflow: ellipsis;
|
|
248
|
-
word-break: break-word;
|
|
249
|
-
display: -webkit-box;
|
|
250
|
-
-webkit-box-orient: vertical;
|
|
251
238
|
width: var(--kd-c-steps-vertical-description-sizing-width, 200px);
|
|
252
239
|
}
|
|
253
240
|
.kd-steps-item-process {
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
width: 100%;
|
|
70
70
|
display: flex;
|
|
71
71
|
flex-direction: column;
|
|
72
|
-
justify-content: center;
|
|
73
72
|
}
|
|
74
73
|
|
|
75
74
|
&-iconContainer {
|
|
@@ -126,22 +125,12 @@
|
|
|
126
125
|
line-height: 20px;
|
|
127
126
|
font-size: @steps-font-size;
|
|
128
127
|
color: @steps-color-wait;
|
|
129
|
-
overflow: hidden;
|
|
130
|
-
text-overflow: ellipsis;
|
|
131
|
-
word-break: break-word;
|
|
132
|
-
display: -webkit-box;
|
|
133
|
-
-webkit-box-orient: vertical;
|
|
134
128
|
}
|
|
135
129
|
|
|
136
130
|
.@{steps-prefix-cls}-item-description {
|
|
137
131
|
line-height: 20px;
|
|
138
132
|
font-size: @steps-font-size;
|
|
139
133
|
color: @steps-color-wait;
|
|
140
|
-
overflow: hidden;
|
|
141
|
-
text-overflow: ellipsis;
|
|
142
|
-
word-break: break-word;
|
|
143
|
-
display: -webkit-box;
|
|
144
|
-
-webkit-box-orient: vertical;
|
|
145
134
|
width: @steps-vertical-description-sizing-width;
|
|
146
135
|
}
|
|
147
136
|
}
|
package/es/table/interface.d.ts
CHANGED
|
@@ -10,6 +10,14 @@ declare type TablePropsOfComponents = Pick<BaseTableProps, 'components'> & {
|
|
|
10
10
|
};
|
|
11
11
|
};
|
|
12
12
|
declare type TablePropsOfExtend = Omit<BaseTableProps, 'components'>;
|
|
13
|
+
export declare type TableApi = {
|
|
14
|
+
getColumns: () => any[];
|
|
15
|
+
getDataSource: () => any[];
|
|
16
|
+
getFooterDataSource: () => any[];
|
|
17
|
+
};
|
|
18
|
+
export declare type TableInstance = {
|
|
19
|
+
api: TableApi;
|
|
20
|
+
};
|
|
13
21
|
export interface TableProps extends TablePropsOfExtend, TablePropsOfComponents {
|
|
14
22
|
rowSelection?: TableRowSelection;
|
|
15
23
|
prefixCls?: string;
|
package/es/table/table.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TableProps } from './interface';
|
|
3
|
-
declare
|
|
3
|
+
declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<unknown>>;
|
|
4
4
|
export default Table;
|
package/es/table/table.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/extends";
|
|
2
2
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
3
3
|
import _sortInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/sort";
|
|
4
|
-
import React, { useContext } from 'react';
|
|
4
|
+
import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
|
|
5
5
|
import { Table as BaseTable, useTablePipeline } from '@kdcloudjs/table';
|
|
6
6
|
import ConfigContext from '../config-provider/ConfigContext';
|
|
7
7
|
import Checkbox from '../checkbox/index';
|
|
@@ -18,9 +18,9 @@ import useColumnResize from './feature/columnResize';
|
|
|
18
18
|
import useColumnDrag from './feature/columnDrag';
|
|
19
19
|
import useContextMenu from './feature/contextMenu';
|
|
20
20
|
import useRangeSelection from './feature/useRangeSelection';
|
|
21
|
+
import useMergeCellHover from './feature/mergeCellHover';
|
|
21
22
|
import devWarning from '../_utils/devwarning';
|
|
22
|
-
|
|
23
|
-
function Table(props) {
|
|
23
|
+
var Table = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
24
24
|
var columns = props.columns,
|
|
25
25
|
dataSource = props.dataSource,
|
|
26
26
|
columnDrag = props.columnDrag,
|
|
@@ -68,19 +68,32 @@ function Table(props) {
|
|
|
68
68
|
columns: columns,
|
|
69
69
|
dataSource: dataSource
|
|
70
70
|
});
|
|
71
|
+
var pipelineRef = useRef(pipeline);
|
|
72
|
+
pipelineRef.current = pipeline;
|
|
71
73
|
|
|
72
74
|
if (footerDataSource) {
|
|
73
75
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
74
76
|
// @ts-ignore
|
|
75
77
|
pipeline.footerDataSource(footerDataSource);
|
|
76
78
|
}
|
|
79
|
+
|
|
80
|
+
useImperativeHandle(ref, function () {
|
|
81
|
+
var _a, _b, _c;
|
|
82
|
+
|
|
83
|
+
return {
|
|
84
|
+
api: {
|
|
85
|
+
getColumns: (_a = pipelineRef.current.getColumns) === null || _a === void 0 ? void 0 : _a.bind(pipelineRef.current),
|
|
86
|
+
getDataSource: (_b = pipelineRef.current.getDataSource) === null || _b === void 0 ? void 0 : _b.bind(pipelineRef.current),
|
|
87
|
+
getFooterDataSource: (_c = pipelineRef.current.getFooterDataSource) === null || _c === void 0 ? void 0 : _c.bind(pipelineRef.current)
|
|
88
|
+
}
|
|
89
|
+
};
|
|
90
|
+
});
|
|
77
91
|
/* -------------------------------------------------------------------------- */
|
|
78
92
|
|
|
79
93
|
/* features */
|
|
80
94
|
|
|
81
95
|
/* -------------------------------------------------------------------------- */
|
|
82
96
|
|
|
83
|
-
|
|
84
97
|
useRowSelection(pipeline, rowSelection);
|
|
85
98
|
useRowDetail(pipeline, rowDetail);
|
|
86
99
|
useFilter(pipeline, filter);
|
|
@@ -91,6 +104,7 @@ function Table(props) {
|
|
|
91
104
|
useColumnDrag(pipeline, columnDrag);
|
|
92
105
|
useContextMenu(pipeline, contextMenu);
|
|
93
106
|
useRangeSelection(pipeline, rangeSelection);
|
|
107
|
+
useMergeCellHover(pipeline);
|
|
94
108
|
/* -------------------------------------------------------------------------- */
|
|
95
109
|
|
|
96
110
|
/* after useTablePipeline, merge pipeline.getProps result */
|
|
@@ -135,6 +149,6 @@ function Table(props) {
|
|
|
135
149
|
scrollbarWidth: scrollbarWidth,
|
|
136
150
|
scrollLoad: scrollLoad
|
|
137
151
|
}));
|
|
138
|
-
}
|
|
139
|
-
|
|
152
|
+
});
|
|
153
|
+
Table.displayName = 'Table';
|
|
140
154
|
export default Table;
|
package/es/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/es/transfer/list.js
CHANGED
|
@@ -4,7 +4,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
|
4
4
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
5
5
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
6
6
|
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
7
|
-
import React, { useState } from 'react';
|
|
7
|
+
import React, { useState, useImperativeHandle } from 'react';
|
|
8
8
|
import { omit } from '../_utils/omit';
|
|
9
9
|
import Search from './search';
|
|
10
10
|
import DefaultListBody, { OmitProps } from './list-body';
|
|
@@ -19,7 +19,7 @@ function isRenderResultPlainObject(result) {
|
|
|
19
19
|
return result && ! /*#__PURE__*/React.isValidElement(result) && Object.prototype.toString.call(result) === '[object Object]';
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var ITransferList = function ITransferList(props, ref) {
|
|
23
23
|
var _classNames;
|
|
24
24
|
|
|
25
25
|
var prefixCls = props.prefixCls,
|
|
@@ -50,6 +50,11 @@ var TransferList = function TransferList(props) {
|
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
var footerDom = footer && footer(props);
|
|
53
|
+
useImperativeHandle(ref, function () {
|
|
54
|
+
return {
|
|
55
|
+
onClear: onClear
|
|
56
|
+
};
|
|
57
|
+
});
|
|
53
58
|
|
|
54
59
|
var renderItem = function renderItem(item) {
|
|
55
60
|
var renderResult = render(item);
|
|
@@ -226,6 +231,7 @@ var TransferList = function TransferList(props) {
|
|
|
226
231
|
}, getSelectAllLabel(checkedKeys.length, filteredItems.length))), listBody, listFooter);
|
|
227
232
|
};
|
|
228
233
|
|
|
234
|
+
var TransferList = /*#__PURE__*/React.forwardRef(ITransferList);
|
|
229
235
|
TransferList.defaultProps = {
|
|
230
236
|
dataSource: [],
|
|
231
237
|
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;
|
package/es/transfer/transfer.js
CHANGED
|
@@ -6,7 +6,7 @@ import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/insta
|
|
|
6
6
|
import _Set from "@babel/runtime-corejs3/core-js-stable/set";
|
|
7
7
|
import _spliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/splice";
|
|
8
8
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
9
|
-
import React, { useContext, useState } from 'react';
|
|
9
|
+
import React, { useContext, useState, useImperativeHandle, useRef } from 'react';
|
|
10
10
|
import classNames from 'classnames';
|
|
11
11
|
import List from './list';
|
|
12
12
|
import Operation from './operation';
|
|
@@ -14,7 +14,7 @@ import ConfigContext from '../config-provider/ConfigContext';
|
|
|
14
14
|
import { getCompProps } from '../_utils';
|
|
15
15
|
import noDataImg from './img/transfer-empty.png';
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var InternalTransfer = function InternalTransfer(props, ref) {
|
|
18
18
|
var _classNames;
|
|
19
19
|
|
|
20
20
|
var _useContext = useContext(ConfigContext),
|
|
@@ -75,6 +75,8 @@ var Transfer = function Transfer(props) {
|
|
|
75
75
|
targetSelectedKeys = _useState4[0],
|
|
76
76
|
setTargetSelectedKeys = _useState4[1];
|
|
77
77
|
|
|
78
|
+
var leftListRef = useRef(null);
|
|
79
|
+
var rightListRef = useRef(null);
|
|
78
80
|
var leftActive = targetSelectedKeys.length > 0;
|
|
79
81
|
var rightActive = sourceSelectedKeys.length > 0;
|
|
80
82
|
var mergedPagination = !children && pagination;
|
|
@@ -82,6 +84,25 @@ var Transfer = function Transfer(props) {
|
|
|
82
84
|
var rightTitle = titles[1] || transferLang.rightTitle;
|
|
83
85
|
var leftPlaceholder = searchPlaceholder[0] || transferLang.searchPlaceholder[0];
|
|
84
86
|
var rightPlaceholder = searchPlaceholder[1] || transferLang.searchPlaceholder[1];
|
|
87
|
+
useImperativeHandle(ref, function () {
|
|
88
|
+
return {
|
|
89
|
+
clearSearch: clearSearch
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
var clearSearch = function clearSearch(position) {
|
|
94
|
+
var _a, _b;
|
|
95
|
+
|
|
96
|
+
if (position === 'left' || position === undefined) {
|
|
97
|
+
;
|
|
98
|
+
(_a = leftListRef === null || leftListRef === void 0 ? void 0 : leftListRef.current) === null || _a === void 0 ? void 0 : _a.onClear();
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (position === 'right' || position === undefined) {
|
|
102
|
+
;
|
|
103
|
+
(_b = rightListRef === null || rightListRef === void 0 ? void 0 : rightListRef.current) === null || _b === void 0 ? void 0 : _b.onClear();
|
|
104
|
+
}
|
|
105
|
+
};
|
|
85
106
|
|
|
86
107
|
var setStateKeys = function setStateKeys(direction, keys) {
|
|
87
108
|
if (direction === 'left') {
|
|
@@ -301,7 +322,8 @@ var Transfer = function Transfer(props) {
|
|
|
301
322
|
showSelectAll: showSelectAll,
|
|
302
323
|
pagination: mergedPagination,
|
|
303
324
|
noDataContent: handleNoDataContent(noDataContent, 'left'),
|
|
304
|
-
footer: footer
|
|
325
|
+
footer: footer,
|
|
326
|
+
ref: leftListRef
|
|
305
327
|
}), /*#__PURE__*/React.createElement(Operation, {
|
|
306
328
|
className: "".concat(transferPrefixCls, "-operation"),
|
|
307
329
|
rightActive: rightActive,
|
|
@@ -335,8 +357,11 @@ var Transfer = function Transfer(props) {
|
|
|
335
357
|
pagination: mergedPagination,
|
|
336
358
|
noDataContent: handleNoDataContent(noDataContent, 'right'),
|
|
337
359
|
footer: footer,
|
|
338
|
-
showRemove: oneWay
|
|
360
|
+
showRemove: oneWay,
|
|
361
|
+
ref: rightListRef
|
|
339
362
|
}));
|
|
340
363
|
};
|
|
341
364
|
|
|
365
|
+
var Transfer = /*#__PURE__*/React.forwardRef(InternalTransfer);
|
|
366
|
+
Transfer.displayName = 'Transfer';
|
|
342
367
|
export default Transfer;
|
|
@@ -207,7 +207,6 @@
|
|
|
207
207
|
visibility: visible;
|
|
208
208
|
-webkit-transform: translateX(0);
|
|
209
209
|
transform: translateX(0);
|
|
210
|
-
background-color: var(--kd-c-upload-color-background-hover, var(--kd-g-color-hover, #f5f5f5));
|
|
211
210
|
}
|
|
212
211
|
.kd-upload .kd-upload-text-list-item.error i,
|
|
213
212
|
.kd-upload .kd-upload-text-list-item.error .kd-upload-text-list-item-name {
|
|
@@ -234,7 +233,7 @@
|
|
|
234
233
|
padding: 0 var(--kd-c-upload-text-list-item-padding-horizontal, 20px);
|
|
235
234
|
height: var(--kd-c-upload-list-item-height, 44px);
|
|
236
235
|
line-height: var(--kd-c-upload-list-item-height, 44px);
|
|
237
|
-
background
|
|
236
|
+
background: transparent;
|
|
238
237
|
opacity: 0;
|
|
239
238
|
visibility: hidden;
|
|
240
239
|
-webkit-transform: translateX(5px);
|
|
@@ -80,7 +80,6 @@
|
|
|
80
80
|
opacity: 1;
|
|
81
81
|
visibility: visible;
|
|
82
82
|
transform: translateX(0);
|
|
83
|
-
background-color: @upload-background-color-hover;
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -113,7 +112,7 @@
|
|
|
113
112
|
padding: 0 @upload-text-list-item-padding-horizontal;
|
|
114
113
|
height: @upload-list-item-height;
|
|
115
114
|
line-height: @upload-list-item-height;
|
|
116
|
-
background
|
|
115
|
+
background: transparent;
|
|
117
116
|
opacity: 0;
|
|
118
117
|
visibility: hidden;
|
|
119
118
|
transform: translateX(5px);
|
package/lib/cascader/cascader.js
CHANGED
|
@@ -164,7 +164,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
164
164
|
};
|
|
165
165
|
|
|
166
166
|
var handleClear = function handleClear() {
|
|
167
|
-
|
|
167
|
+
onChange([]);
|
|
168
168
|
};
|
|
169
169
|
|
|
170
170
|
var inputProps = {
|
|
@@ -196,7 +196,7 @@ var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
196
196
|
}, /*#__PURE__*/React.createElement(_input.default, (0, _extends2.default)({}, inputProps)), /*#__PURE__*/React.createElement("span", {
|
|
197
197
|
className: "".concat(prefixCls, "-picker-label")
|
|
198
198
|
}, (labels === null || labels === void 0 ? void 0 : labels.length) ? displayRender(labels, currentOptions) : '')), allowClear && /*#__PURE__*/React.createElement(_icon.default, {
|
|
199
|
-
type: "close",
|
|
199
|
+
type: "close-solid",
|
|
200
200
|
className: "".concat(prefixCls, "-picker-close"),
|
|
201
201
|
onClick: handleClear
|
|
202
202
|
})));
|
|
@@ -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);
|
|
@@ -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,
|