@kdcloudjs/kdesign 1.6.5 → 1.6.7
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 +36 -0
- package/dist/kdesign-complete.less +113 -106
- package/dist/kdesign.css +108 -84
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +758 -513
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +3 -3
- package/dist/kdesign.min.js +8 -8
- package/dist/kdesign.min.js.map +1 -1
- package/es/_utils/hooks.js +1 -9
- package/es/carousel/style/index.css +3 -0
- package/es/carousel/style/index.less +4 -0
- package/es/cascader/style/index.css +7 -7
- package/es/cascader/style/token.less +2 -2
- package/es/config-provider/compDefaultProps.d.ts +5 -0
- package/es/config-provider/compDefaultProps.js +6 -1
- package/es/date-picker/date-picker.js +11 -14
- package/es/date-picker/panel/month/month.d.ts +0 -1
- package/es/date-picker/panel/month/month.js +6 -4
- package/es/date-picker/range/input-range.js +41 -11
- package/es/date-picker/range-picker.js +8 -11
- package/es/date-picker/single/input-date.js +40 -10
- package/es/date-picker/style/index.css +27 -23
- package/es/date-picker/style/index.less +16 -33
- package/es/date-picker/style/mixin.less +7 -0
- package/es/date-picker/style/token.less +2 -1
- package/es/form/Field.d.ts +1 -0
- package/es/form/Field.js +9 -5
- package/es/form/FieldLabel.d.ts +1 -0
- package/es/form/FieldLabel.js +4 -2
- package/es/input/ClearableLabeledInput.js +23 -5
- package/es/input/TextArea.d.ts +1 -0
- package/es/input/TextArea.js +8 -6
- package/es/input/style/index.css +12 -8
- package/es/input/style/index.less +9 -5
- package/es/input/style/mixin.less +3 -3
- package/es/input/style/token.less +2 -0
- package/es/search/style/index.css +3 -1
- package/es/search/style/index.less +3 -1
- package/es/search/style/token.less +2 -1
- package/es/select/interface.d.ts +2 -0
- package/es/select/option.js +1 -1
- package/es/select/select.js +180 -128
- package/es/select/style/index.css +54 -24
- package/es/select/style/index.less +60 -43
- package/es/select/style/mixin.less +0 -2
- package/es/select/style/token.less +2 -0
- package/es/split-panel/style/index.css +0 -6
- package/es/split-panel/style/index.less +0 -3
- 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/tooltip/style/index.css +1 -1
- package/es/tooltip/style/token.less +1 -1
- package/lib/_utils/hooks.js +1 -9
- package/lib/carousel/style/index.css +3 -0
- package/lib/carousel/style/index.less +4 -0
- package/lib/cascader/style/index.css +7 -7
- package/lib/cascader/style/token.less +2 -2
- package/lib/config-provider/compDefaultProps.d.ts +5 -0
- package/lib/config-provider/compDefaultProps.js +6 -1
- package/lib/date-picker/date-picker.js +10 -16
- package/lib/date-picker/panel/month/month.d.ts +0 -1
- package/lib/date-picker/panel/month/month.js +10 -8
- package/lib/date-picker/range/input-range.js +40 -11
- package/lib/date-picker/range-picker.js +7 -13
- package/lib/date-picker/single/input-date.js +37 -9
- package/lib/date-picker/style/index.css +27 -23
- package/lib/date-picker/style/index.less +16 -33
- package/lib/date-picker/style/mixin.less +7 -0
- package/lib/date-picker/style/token.less +2 -1
- package/lib/form/Field.d.ts +1 -0
- package/lib/form/Field.js +10 -6
- package/lib/form/FieldLabel.d.ts +1 -0
- package/lib/form/FieldLabel.js +4 -2
- package/lib/input/ClearableLabeledInput.js +34 -5
- package/lib/input/TextArea.d.ts +1 -0
- package/lib/input/TextArea.js +9 -7
- package/lib/input/style/index.css +12 -8
- package/lib/input/style/index.less +9 -5
- package/lib/input/style/mixin.less +3 -3
- package/lib/input/style/token.less +2 -0
- package/lib/search/style/index.css +3 -1
- package/lib/search/style/index.less +3 -1
- package/lib/search/style/token.less +2 -1
- package/lib/select/interface.d.ts +2 -0
- package/lib/select/option.js +1 -1
- package/lib/select/select.js +179 -126
- package/lib/select/style/index.css +54 -24
- package/lib/select/style/index.less +60 -43
- package/lib/select/style/mixin.less +0 -2
- package/lib/select/style/token.less +2 -0
- package/lib/split-panel/style/index.css +0 -6
- package/lib/split-panel/style/index.less +0 -3
- 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/tooltip/style/index.css +1 -1
- package/lib/tooltip/style/token.less +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
@datePicker-prefix-cls: ~'@{kd-prefix}-date-picker';
|
|
7
|
-
// @rangePicker-prefix-cls: ~'@{kd-prefix}-rangePicker';
|
|
8
|
-
// @datePicker-prefix-cls-input: ~'@{datePicker-prefix-cls}-input';
|
|
9
7
|
@datePicker-prefix-cls-panel: ~'@{datePicker-prefix-cls}-panel';
|
|
10
8
|
|
|
11
9
|
@datePicker-calendar-text: 24px;
|
|
@@ -21,14 +19,6 @@
|
|
|
21
19
|
input {
|
|
22
20
|
font-size: @date-small-font-size;
|
|
23
21
|
}
|
|
24
|
-
|
|
25
|
-
.@{datePicker-prefix-cls}-clear {
|
|
26
|
-
right: calc(@date-small-font-size + 1px);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
&.@{datePicker-prefix-cls}-range .@{datePicker-prefix-cls}-clear {
|
|
30
|
-
right: calc(@date-small-font-size + 12px);
|
|
31
|
-
}
|
|
32
22
|
}
|
|
33
23
|
|
|
34
24
|
&-large {
|
|
@@ -37,14 +27,6 @@
|
|
|
37
27
|
input {
|
|
38
28
|
font-size: @date-large-font-size;
|
|
39
29
|
}
|
|
40
|
-
|
|
41
|
-
.@{datePicker-prefix-cls}-clear {
|
|
42
|
-
right:calc(@date-large-font-size + 1px);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&.@{datePicker-prefix-cls}-range .@{datePicker-prefix-cls}-clear {
|
|
46
|
-
right: calc(@date-large-font-size + 9px);
|
|
47
|
-
}
|
|
48
30
|
}
|
|
49
31
|
|
|
50
32
|
&-middle {
|
|
@@ -53,14 +35,6 @@
|
|
|
53
35
|
input {
|
|
54
36
|
font-size: @date-middle-font-size;
|
|
55
37
|
}
|
|
56
|
-
|
|
57
|
-
.@{datePicker-prefix-cls}-clear {
|
|
58
|
-
right: calc(@date-middle-font-size + 1px);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&.@{datePicker-prefix-cls}-range .@{datePicker-prefix-cls}-clear {
|
|
62
|
-
right: calc(@date-middle-font-size + 11px);
|
|
63
|
-
}
|
|
64
38
|
}
|
|
65
39
|
|
|
66
40
|
&-input {
|
|
@@ -102,6 +76,7 @@
|
|
|
102
76
|
|
|
103
77
|
&-range {
|
|
104
78
|
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
105
80
|
position: relative;
|
|
106
81
|
|
|
107
82
|
&-separator {
|
|
@@ -146,15 +121,12 @@
|
|
|
146
121
|
.@{datePicker-prefix-cls}-clear {
|
|
147
122
|
opacity: 1;
|
|
148
123
|
}
|
|
149
|
-
|
|
150
|
-
.@{datePicker-prefix-cls}-suffix {
|
|
151
|
-
color: @date-color-background-checked;
|
|
152
|
-
}
|
|
153
124
|
}
|
|
154
125
|
|
|
155
126
|
&-clear {
|
|
156
127
|
position: absolute;
|
|
157
128
|
top: 50%;
|
|
129
|
+
right: 0;
|
|
158
130
|
color: @date-icon-color;
|
|
159
131
|
line-height: 1;
|
|
160
132
|
background: @date-clear-background-color;
|
|
@@ -167,7 +139,19 @@
|
|
|
167
139
|
}
|
|
168
140
|
|
|
169
141
|
&:hover {
|
|
170
|
-
color: @date-
|
|
142
|
+
color: @date-icon-color-hover;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.@{datePicker-prefix-cls}-range-clear {
|
|
147
|
+
align-self: center;
|
|
148
|
+
margin-left: @date-suffix-spacing-margin-left;
|
|
149
|
+
color: @date-icon-color;
|
|
150
|
+
line-height: 1;
|
|
151
|
+
cursor: pointer;
|
|
152
|
+
|
|
153
|
+
&:hover {
|
|
154
|
+
color: @date-icon-color-hover;
|
|
171
155
|
}
|
|
172
156
|
}
|
|
173
157
|
|
|
@@ -809,8 +793,6 @@
|
|
|
809
793
|
}
|
|
810
794
|
}
|
|
811
795
|
}
|
|
812
|
-
|
|
813
|
-
|
|
814
796
|
}
|
|
815
797
|
|
|
816
798
|
.@{datePicker-prefix-cls}-container {
|
|
@@ -834,6 +816,7 @@
|
|
|
834
816
|
line-height: @date-panel-header-height;
|
|
835
817
|
font-size: @date-container-font-size;
|
|
836
818
|
border-bottom: .5px solid @date-container-color-border;
|
|
819
|
+
cursor: pointer;
|
|
837
820
|
}
|
|
838
821
|
}
|
|
839
822
|
}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
@import '../../style/themes/index';
|
|
1
2
|
@import './token.less';
|
|
2
3
|
|
|
4
|
+
@datePicker-prefix-cls: ~'@{kd-prefix}-date-picker';
|
|
5
|
+
|
|
3
6
|
.input-wrapper() {
|
|
4
7
|
display: inline-flex;
|
|
5
8
|
border: 1px solid @date-input-color-border;
|
|
@@ -71,6 +74,10 @@
|
|
|
71
74
|
line-height: calc(@height - (@padding-vertical * 2) - 2);
|
|
72
75
|
font-size: @fonSize;
|
|
73
76
|
padding: @padding-vertical @padding-horizontal;
|
|
77
|
+
|
|
78
|
+
&.@{datePicker-prefix-cls}-underline {
|
|
79
|
+
padding: @padding-vertical 0;
|
|
80
|
+
}
|
|
74
81
|
}
|
|
75
82
|
|
|
76
83
|
.today-after(@background) {
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
@date-input-color-background: var(~'@{date-picker-custom-prefix}-input-color-background', @color-white);
|
|
14
14
|
@date-input-color-background-disabled: var(~'@{date-picker-custom-prefix}-input-color-background-disabled', @color-background-contain-disabled);
|
|
15
15
|
@date-input-color-focus: var(~'@{date-picker-custom-prefix}-input-color-focused', @color-text-primary);
|
|
16
|
-
@date-icon-color: var(~'@{date-picker-custom-prefix}-icon-color',
|
|
16
|
+
@date-icon-color: var(~'@{date-picker-custom-prefix}-icon-color', #d9d9d9);
|
|
17
|
+
@date-icon-color-hover: var(~'@{date-picker-custom-prefix}-icon-color-hover', #999);
|
|
17
18
|
@date-clear-background-color: var(~'@{date-picker-custom-prefix}-clear-color-background', @color-background);
|
|
18
19
|
@date-clear-background-color-hover: var(~'@{date-picker-custom-prefix}-clear-color-background-hover', @color-theme-5);
|
|
19
20
|
@date-clear-background-color-focused: var(~'@{date-picker-custom-prefix}-clear-color-background-focused', @color-theme);
|
package/es/form/Field.d.ts
CHANGED
package/es/form/Field.js
CHANGED
|
@@ -3,8 +3,8 @@ import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
|
3
3
|
import _typeof from "@babel/runtime-corejs3/helpers/typeof";
|
|
4
4
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
5
5
|
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
|
6
|
-
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
7
6
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
7
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
|
8
8
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
|
9
9
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
10
10
|
|
|
@@ -74,7 +74,7 @@ var INNER_VALUE_PROPS_LIST = [{
|
|
|
74
74
|
}];
|
|
75
75
|
|
|
76
76
|
var Field = function Field(props) {
|
|
77
|
-
var _classnames;
|
|
77
|
+
var _context, _classnames;
|
|
78
78
|
|
|
79
79
|
var _a;
|
|
80
80
|
|
|
@@ -107,6 +107,7 @@ var Field = function Field(props) {
|
|
|
107
107
|
setDefaultValues = _getInternalHooks.setDefaultValues;
|
|
108
108
|
|
|
109
109
|
var name = props.name,
|
|
110
|
+
customizeHtmlFor = props.htmlFor,
|
|
110
111
|
children = props.children,
|
|
111
112
|
className = props.className,
|
|
112
113
|
disabled = props.disabled,
|
|
@@ -122,6 +123,7 @@ var Field = function Field(props) {
|
|
|
122
123
|
validateTrigger = props.validateTrigger,
|
|
123
124
|
defaultValue = props.defaultValue,
|
|
124
125
|
valuePropName = props.valuePropName;
|
|
126
|
+
var htmlFor = customizeHtmlFor || (name ? _concatInstanceProperty(_context = "form_".concat(name, "_")).call(_context, (Math.random() * 100).toFixed(0)) : undefined);
|
|
125
127
|
var childrenNode = null;
|
|
126
128
|
var innerValuePropName = 'value';
|
|
127
129
|
var childrenArray = toArray(children);
|
|
@@ -177,11 +179,11 @@ var Field = function Field(props) {
|
|
|
177
179
|
if (Array.isArray(rules) && !rules.some(function (rule) {
|
|
178
180
|
return Object.prototype.hasOwnProperty.call(rule, 'required');
|
|
179
181
|
}) && required) {
|
|
180
|
-
var
|
|
182
|
+
var _context2;
|
|
181
183
|
|
|
182
184
|
rules.push({
|
|
183
185
|
required: true,
|
|
184
|
-
message: _concatInstanceProperty(
|
|
186
|
+
message: _concatInstanceProperty(_context2 = "".concat(local && local.requiredMessage)).call(_context2, label)
|
|
185
187
|
});
|
|
186
188
|
}
|
|
187
189
|
|
|
@@ -299,6 +301,7 @@ var Field = function Field(props) {
|
|
|
299
301
|
return /*#__PURE__*/React.createElement("div", {
|
|
300
302
|
className: formItemClassName
|
|
301
303
|
}, /*#__PURE__*/React.createElement(FieldLabel, {
|
|
304
|
+
htmlFor: htmlFor,
|
|
302
305
|
value: label,
|
|
303
306
|
width: labelWidth,
|
|
304
307
|
textAlign: labelAlign,
|
|
@@ -310,7 +313,8 @@ var Field = function Field(props) {
|
|
|
310
313
|
var keys = mergeProps(_extends(_extends(_defineProperty({
|
|
311
314
|
disabled: disabled
|
|
312
315
|
}, innerValuePropName, value), trigger), {
|
|
313
|
-
key: index
|
|
316
|
+
key: index,
|
|
317
|
+
id: customizeHtmlFor ? undefined : htmlFor
|
|
314
318
|
}), child);
|
|
315
319
|
return child ? /*#__PURE__*/React.cloneElement(child, keys) : child;
|
|
316
320
|
})));
|
package/es/form/FieldLabel.d.ts
CHANGED
package/es/form/FieldLabel.js
CHANGED
|
@@ -22,7 +22,8 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
22
22
|
width = _getCompProps.width,
|
|
23
23
|
textAlign = _getCompProps.textAlign,
|
|
24
24
|
customizePrefixCls = _getCompProps.prefixCls,
|
|
25
|
-
requiredMark = _getCompProps.requiredMark
|
|
25
|
+
requiredMark = _getCompProps.requiredMark,
|
|
26
|
+
htmlFor = _getCompProps.htmlFor;
|
|
26
27
|
|
|
27
28
|
if (value === undefined) return null;
|
|
28
29
|
var fieldLabelPrefixCls = getPrefixCls === null || getPrefixCls === void 0 ? void 0 : getPrefixCls(prefixCls, 'form-field-label', customizePrefixCls);
|
|
@@ -38,7 +39,8 @@ var FieldLabel = function FieldLabel(props) {
|
|
|
38
39
|
style: style
|
|
39
40
|
}, /*#__PURE__*/React.createElement("label", {
|
|
40
41
|
className: labelClassName,
|
|
41
|
-
title: value
|
|
42
|
+
title: value,
|
|
43
|
+
htmlFor: htmlFor
|
|
42
44
|
}, value));
|
|
43
45
|
};
|
|
44
46
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime-corejs3/helpers/slicedToArray";
|
|
2
3
|
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
|
3
|
-
import React from 'react';
|
|
4
|
+
import React, { useState } from 'react';
|
|
4
5
|
import { Icon } from '../index';
|
|
5
6
|
import classNames from 'classnames';
|
|
6
7
|
import { tuple } from '../_utils/type';
|
|
@@ -28,6 +29,19 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
28
29
|
focused = props.focused,
|
|
29
30
|
numberMark = props.numberMark;
|
|
30
31
|
|
|
32
|
+
var _useState = useState(false),
|
|
33
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
34
|
+
isMouseEnter = _useState2[0],
|
|
35
|
+
setIsMouseEnter = _useState2[1];
|
|
36
|
+
|
|
37
|
+
var mouseEnterHandle = function mouseEnterHandle() {
|
|
38
|
+
setIsMouseEnter(true);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var mouseLeaveHandle = function mouseLeaveHandle() {
|
|
42
|
+
setIsMouseEnter(false);
|
|
43
|
+
};
|
|
44
|
+
|
|
31
45
|
var renderClearIcon = function renderClearIcon() {
|
|
32
46
|
var _classNames;
|
|
33
47
|
|
|
@@ -35,13 +49,13 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
35
49
|
return null;
|
|
36
50
|
}
|
|
37
51
|
|
|
38
|
-
var needClear = !disabled && value;
|
|
52
|
+
var needClear = !disabled && value && isMouseEnter;
|
|
39
53
|
var clearIconclasses = classNames((_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "-textarea-clear-icon"), inputType === ClearableInputType[1]), _defineProperty(_classNames, "".concat(prefixCls, "-clear-icon"), inputType === ClearableInputType[0]), _defineProperty(_classNames, "".concat(prefixCls, "-clear-icon-hidden"), !needClear), _defineProperty(_classNames, "".concat(prefixCls, "-clear-icon-rightSpace"), suffix), _classNames));
|
|
40
54
|
return /*#__PURE__*/React.createElement("span", {
|
|
41
55
|
onClick: handleReset,
|
|
42
56
|
className: clearIconclasses
|
|
43
57
|
}, typeof allowClear === 'boolean' ? /*#__PURE__*/React.createElement(Icon, {
|
|
44
|
-
type: "close"
|
|
58
|
+
type: "close-solid"
|
|
45
59
|
}) : allowClear);
|
|
46
60
|
};
|
|
47
61
|
|
|
@@ -69,7 +83,9 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
69
83
|
var inputWrapperClasses = classNames((_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper"), true), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-disabled"), disabled), _defineProperty(_classNames2, _concatInstanceProperty(_context = "".concat(prefixCls, "-wrapper-size-")).call(_context, size), size), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-borderless"), borderType === 'none'), _defineProperty(_classNames2, "".concat(prefixCls, "-wrapper-underline"), borderType === 'underline'), _classNames2), _defineProperty({}, className, className && !addonBefore && !addonAfter));
|
|
70
84
|
return /*#__PURE__*/React.createElement("span", {
|
|
71
85
|
className: inputWrapperClasses,
|
|
72
|
-
style: style
|
|
86
|
+
style: style,
|
|
87
|
+
onMouseEnter: mouseEnterHandle,
|
|
88
|
+
onMouseLeave: mouseLeaveHandle
|
|
73
89
|
}, prefixNode, /*#__PURE__*/React.cloneElement(originElement, {
|
|
74
90
|
style: null
|
|
75
91
|
}), suffixNode);
|
|
@@ -131,7 +147,9 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
131
147
|
var textAreaWrapperClasses = classNames(className, _defineProperty({}, "".concat(prefixCls, "-wrapper-textarea"), true));
|
|
132
148
|
return /*#__PURE__*/React.createElement("span", {
|
|
133
149
|
className: textAreaWrapperClasses,
|
|
134
|
-
style: wrapperStyle
|
|
150
|
+
style: wrapperStyle,
|
|
151
|
+
onMouseEnter: mouseEnterHandle,
|
|
152
|
+
onMouseLeave: mouseLeaveHandle
|
|
135
153
|
}, originElement, renderClearIcon(), numberMark && numberMark);
|
|
136
154
|
};
|
|
137
155
|
|
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;
|
|
@@ -356,10 +363,6 @@ textarea {
|
|
|
356
363
|
.kd-input-wrapper-focused {
|
|
357
364
|
border-color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
|
|
358
365
|
}
|
|
359
|
-
.kd-input-wrapper-focused .kd-input-clear-icon,
|
|
360
|
-
.kd-input-wrapper-focused .kd-input-textarea-clear-icon {
|
|
361
|
-
color: var(--kd-c-input-color-border-focused, var(--kd-g-color-theme, #5582f3));
|
|
362
|
-
}
|
|
363
366
|
.kd-input-wrapper-disabled {
|
|
364
367
|
background-color: var(--kd-c-input-color-background-disabled, var(--kd-g-color-background-contain-disabled, #f5f5f5));
|
|
365
368
|
border-color: var(--kd-c-input-color-border-disabled, var(--kd-g-color-border-strong, #d9d9d9));
|
|
@@ -411,22 +414,23 @@ textarea {
|
|
|
411
414
|
}
|
|
412
415
|
.kd-input-wrapper-textarea .kd-input-textarea-clear-icon {
|
|
413
416
|
position: absolute;
|
|
417
|
+
z-index: 2;
|
|
414
418
|
right: 8px;
|
|
415
|
-
top:
|
|
419
|
+
top: 3px;
|
|
416
420
|
}
|
|
417
421
|
.kd-input-clear-icon,
|
|
418
422
|
.kd-input-textarea-clear-icon {
|
|
419
423
|
cursor: pointer;
|
|
420
|
-
color: var(--kd-c-input-color
|
|
424
|
+
color: var(--kd-c-input-clear-color, #d9d9d9);
|
|
421
425
|
}
|
|
422
426
|
.kd-input-clear-icon:hover,
|
|
423
427
|
.kd-input-textarea-clear-icon:hover {
|
|
424
|
-
color: var(--kd-c-input-
|
|
428
|
+
color: var(--kd-c-input-clear-color-hover, #999);
|
|
425
429
|
}
|
|
426
430
|
.kd-input-clear-icon i,
|
|
427
431
|
.kd-input-textarea-clear-icon i {
|
|
428
432
|
vertical-align: middle;
|
|
429
|
-
font-size:
|
|
433
|
+
font-size: 16px;
|
|
430
434
|
}
|
|
431
435
|
.kd-input-clear-icon-hidden {
|
|
432
436
|
visibility: hidden;
|
|
@@ -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;
|
|
@@ -121,10 +128,6 @@ textarea {
|
|
|
121
128
|
|
|
122
129
|
&-focused {
|
|
123
130
|
border-color: @input-border-color-focused;
|
|
124
|
-
|
|
125
|
-
.@{input-prefix-cls}-clear-icon, .@{input-prefix-cls}-textarea-clear-icon {
|
|
126
|
-
color: @input-border-color-focused;
|
|
127
|
-
}
|
|
128
131
|
}
|
|
129
132
|
|
|
130
133
|
&-disabled {
|
|
@@ -146,8 +149,9 @@ textarea {
|
|
|
146
149
|
.@{input-prefix-cls} {
|
|
147
150
|
&-textarea-clear-icon {
|
|
148
151
|
position: absolute;
|
|
152
|
+
z-index: 2;
|
|
149
153
|
right: 8px;
|
|
150
|
-
top:
|
|
154
|
+
top: 3px;
|
|
151
155
|
}
|
|
152
156
|
}
|
|
153
157
|
}
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
|
|
48
48
|
.input-clear-icon() {
|
|
49
49
|
cursor: pointer;
|
|
50
|
-
color: @input-color
|
|
50
|
+
color: @input-clear-color;
|
|
51
51
|
|
|
52
52
|
&:hover {
|
|
53
|
-
color: @input-
|
|
53
|
+
color: @input-clear-color-hover;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
i {
|
|
57
57
|
vertical-align: middle;
|
|
58
|
-
font-size:
|
|
58
|
+
font-size: 16px;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
@input-font-color-inner: var(~'@{input-prefix}-color-text', @color-text-primary);
|
|
8
8
|
@input-placeholder-color-inner: var(~'@{input-prefix}-placeholder-color-text', @color-text-placeholder);
|
|
9
9
|
@input-color-border: var(~'@{input-prefix}-color-border', #999);
|
|
10
|
+
@input-clear-color: var(~'@{input-prefix}-clear-color', #d9d9d9);
|
|
11
|
+
@input-clear-color-hover: var(~'@{input-prefix}-clear-color-hover', #999);
|
|
10
12
|
@input-background-color-inner: var(~'@{input-prefix}-color-background', @color-white);
|
|
11
13
|
@input-background-color-disabled-inner: var(~'@{input-prefix}-color-background-disabled', @color-background-contain-disabled);
|
|
12
14
|
@input-border-color-focused: var(~'@{input-prefix}-color-border-focused', @color-theme);
|
|
@@ -205,6 +205,7 @@
|
|
|
205
205
|
}
|
|
206
206
|
.kd-search-border {
|
|
207
207
|
border: var(--kd-c-search-sizing-border-width, 1px) solid var(--kd-c-search-color-border, var(--kd-g-color-border-strong-2, #d9d9d9));
|
|
208
|
+
border-radius: var(--kd-c-search-radius-border, var(--kd-g-radius-border, 2px));
|
|
208
209
|
}
|
|
209
210
|
.kd-search-prefix,
|
|
210
211
|
.kd-search-suffix {
|
|
@@ -238,6 +239,7 @@
|
|
|
238
239
|
}
|
|
239
240
|
.kd-quick-search-border {
|
|
240
241
|
border: var(--kd-c-search-sizing-border-width, 1px) solid var(--kd-c-search-color-border, var(--kd-g-color-border-strong-2, #d9d9d9));
|
|
242
|
+
border-radius: var(--kd-c-search-radius-border, var(--kd-g-radius-border, 2px));
|
|
241
243
|
}
|
|
242
244
|
.kd-quick-search:hover:not(.kd-quick-search-disabled) {
|
|
243
245
|
border-color: var(--kd-c-search-color-theme, var(--kd-g-color-theme, #5582f3));
|
|
@@ -414,7 +416,7 @@
|
|
|
414
416
|
font-size: var(--kd-c-search-dropdown-font-size, 12px);
|
|
415
417
|
-webkit-box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
416
418
|
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
417
|
-
border-radius: var(--kd-c-search-radius-border, var(--kd-g-radius-border, 2px));
|
|
419
|
+
border-radius: var(--kd-c-search-dropdown-radius-border, var(--kd-g-radius-border, 2px));
|
|
418
420
|
background: var(--kd-c-search-color-background, var(--kd-g-color-background, #fff));
|
|
419
421
|
overflow: auto;
|
|
420
422
|
}
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
&-border {
|
|
29
29
|
border: @search-sizing-border-width solid @quick-search-border-bottom-color;
|
|
30
|
+
border-radius: @search-border-radius;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
&-prefix,
|
|
@@ -61,6 +62,7 @@
|
|
|
61
62
|
}
|
|
62
63
|
&-border {
|
|
63
64
|
border: @search-sizing-border-width solid @quick-search-border-bottom-color;
|
|
65
|
+
border-radius: @search-border-radius;
|
|
64
66
|
}
|
|
65
67
|
&:hover:not(&-disabled) {
|
|
66
68
|
border-color: @search-color-theme;
|
|
@@ -206,7 +208,7 @@
|
|
|
206
208
|
z-index: @zIndex-popper;
|
|
207
209
|
font-size: @quick-search-dropdown-font-size;
|
|
208
210
|
box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
|
|
209
|
-
border-radius: @search-radius
|
|
211
|
+
border-radius: @search-dropdown-border-radius;
|
|
210
212
|
background: @search-color-background;
|
|
211
213
|
overflow: auto;
|
|
212
214
|
&-scroll {
|
|
@@ -57,4 +57,5 @@
|
|
|
57
57
|
@search-transition-duration: var(~'@{search-prefix}-motion-duration', @duration-promptly);
|
|
58
58
|
|
|
59
59
|
// radius
|
|
60
|
-
@search-radius
|
|
60
|
+
@search-dropdown-border-radius: var(~'@{search-prefix}-dropdown-radius-border', @radius-border);
|
|
61
|
+
@search-border-radius: var(~'@{search-prefix}-radius-border', @radius-border);
|
package/es/select/interface.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export interface AbstractSelectProps extends PopperProps {
|
|
|
34
34
|
listHeight?: number;
|
|
35
35
|
labelInValue?: boolean;
|
|
36
36
|
maxTagPlaceholder?: React.ReactNode | ((omittedValues: LabeledValue[]) => React.ReactNode);
|
|
37
|
+
filterOption?: boolean | ((inputValue: string, option?: OptionsType) => boolean);
|
|
38
|
+
optionFilterProp?: string;
|
|
37
39
|
}
|
|
38
40
|
export interface LabeledValue {
|
|
39
41
|
key?: string;
|
package/es/select/option.js
CHANGED
|
@@ -57,7 +57,7 @@ var InternalOption = function InternalOption(props, ref) {
|
|
|
57
57
|
|
|
58
58
|
var titleText = _typeof(children) !== 'object' ? children : null;
|
|
59
59
|
var checkStyle = {
|
|
60
|
-
|
|
60
|
+
minHeight: '22px',
|
|
61
61
|
background: 'none'
|
|
62
62
|
};
|
|
63
63
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|