@kdcloudjs/kdesign 1.7.5 → 1.7.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/dist/kdesign-complete.less +11 -3
- package/dist/kdesign.css +13 -10
- package/dist/kdesign.css.map +1 -1
- package/dist/kdesign.js +12 -8
- package/dist/kdesign.js.map +1 -1
- package/dist/kdesign.min.css +2 -2
- package/dist/kdesign.min.js +2 -2
- package/dist/kdesign.min.js.map +1 -1
- package/es/form/Field.js +1 -0
- package/es/input/ClearableLabeledInput.d.ts +1 -0
- package/es/input/ClearableLabeledInput.js +4 -3
- package/es/input/TextArea.d.ts +1 -0
- package/es/input/TextArea.js +3 -2
- package/es/input/input.d.ts +1 -0
- package/es/input/input.js +3 -2
- package/es/input/style/index.css +12 -9
- package/es/input/style/index.less +5 -1
- package/es/input/style/mixin.less +5 -2
- package/es/input/style/token.less +1 -0
- package/lib/form/Field.js +1 -0
- package/lib/input/ClearableLabeledInput.d.ts +1 -0
- package/lib/input/ClearableLabeledInput.js +4 -3
- package/lib/input/TextArea.d.ts +1 -0
- package/lib/input/TextArea.js +3 -2
- package/lib/input/input.d.ts +1 -0
- package/lib/input/input.js +3 -2
- package/lib/input/style/index.css +12 -9
- package/lib/input/style/index.less +5 -1
- package/lib/input/style/mixin.less +5 -2
- package/lib/input/style/token.less +1 -0
- package/package.json +1 -1
package/dist/kdesign.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* @kdcloudjs/kdesign v1.7.
|
|
3
|
+
* @kdcloudjs/kdesign v1.7.5
|
|
4
4
|
*
|
|
5
5
|
* Copyright 2020-present, Kingdee, Inc.
|
|
6
6
|
* All rights reserved.
|
|
@@ -17692,6 +17692,7 @@ var Field = function Field(props) {
|
|
|
17692
17692
|
}, childrenArray.map(function (child, index) {
|
|
17693
17693
|
var keys = mergeProps(_objectSpread(_objectSpread({}, generateEventHandler(handleValueValidate, validateTrigger)), {}, {
|
|
17694
17694
|
key: index,
|
|
17695
|
+
status: typeof validateMessage !== 'undefined' ? 'error' : undefined,
|
|
17695
17696
|
id: customizeHtmlFor ? undefined : htmlFor
|
|
17696
17697
|
}), child);
|
|
17697
17698
|
return child ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_18___default.a.cloneElement(child, keys) : child;
|
|
@@ -20870,7 +20871,8 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
20870
20871
|
focused = props.focused,
|
|
20871
20872
|
numberMark = props.numberMark,
|
|
20872
20873
|
inputCount = props.inputCount,
|
|
20873
|
-
count = props.count
|
|
20874
|
+
count = props.count,
|
|
20875
|
+
status = props.status;
|
|
20874
20876
|
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_3__["useState"])(false),
|
|
20875
20877
|
_useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_1___default()(_useState, 2),
|
|
20876
20878
|
isMouseEnter = _useState2[0],
|
|
@@ -20922,7 +20924,7 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
20922
20924
|
className: "".concat(prefixCls, "-prefix"),
|
|
20923
20925
|
onMouseDown: mouseDownHandle
|
|
20924
20926
|
}, prefix) : null;
|
|
20925
|
-
var inputWrapperClasses = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-
|
|
20927
|
+
var inputWrapperClasses = classnames__WEBPACK_IMPORTED_MODULE_5___default()((_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper"), true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-focused"), focused && !disabled), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames2, "".concat(prefixCls, "-wrapper-disabled"), disabled), _classNames2), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, className, className && !addonBefore && !addonAfter));
|
|
20926
20928
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", {
|
|
20927
20929
|
className: inputWrapperClasses,
|
|
20928
20930
|
style: style,
|
|
@@ -20937,7 +20939,7 @@ var ClearableInput = function ClearableInput(props) {
|
|
|
20937
20939
|
if (!addonBefore && !addonAfter && !count) {
|
|
20938
20940
|
return originElement;
|
|
20939
20941
|
}
|
|
20940
|
-
var addonClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-group-addon"), (_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-group-addon-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-group-addon-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-group-addon-disabled"), disabled), _classNames4));
|
|
20942
|
+
var addonClassName = classnames__WEBPACK_IMPORTED_MODULE_5___default()("".concat(prefixCls, "-group-addon"), (_classNames4 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-group-addon-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-group-addon-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-error"), status === 'error'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames4, "".concat(prefixCls, "-group-addon-disabled"), disabled), _classNames4));
|
|
20941
20943
|
var addonBeforeNode = addonBefore ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement("span", {
|
|
20942
20944
|
className: addonClassName
|
|
20943
20945
|
}, addonBefore) : null;
|
|
@@ -21033,7 +21035,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21033
21035
|
|
|
21034
21036
|
|
|
21035
21037
|
|
|
21036
|
-
var _excluded = ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size"],
|
|
21038
|
+
var _excluded = ["value", "allowClear", "borderType", "defaultValue", "count", "countPosition", "autoSize", "className", "prefixCls", "canResize", "maxLength", "disabled", "onBlur", "onFocus", "onChange", "placeholder", "style", "size", "status"],
|
|
21037
21039
|
_excluded2 = ["width", "margin", "marginLeft", "marginRight", "marginTop", "marginBottom"];
|
|
21038
21040
|
|
|
21039
21041
|
|
|
@@ -21077,6 +21079,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
21077
21079
|
placeholder = textAreaProps.placeholder,
|
|
21078
21080
|
style = textAreaProps.style,
|
|
21079
21081
|
size = textAreaProps.size,
|
|
21082
|
+
status = textAreaProps.status,
|
|
21080
21083
|
others = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2___default()(textAreaProps, _excluded);
|
|
21081
21084
|
var textAreaPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // TextArea样式前缀
|
|
21082
21085
|
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_15__["default"])(_input__WEBPACK_IMPORTED_MODULE_12__["BorderTypes"].indexOf(borderType) === -1, 'textarea', "cannot found textarea borderType '".concat(borderType, "'"));
|
|
@@ -21199,7 +21202,7 @@ var InternalTextarea = function InternalTextarea(props, ref) {
|
|
|
21199
21202
|
ref: textareaRef,
|
|
21200
21203
|
disabled: disabled,
|
|
21201
21204
|
style: _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, textareaStyles, hadCount || !!allowClear ? otherStyles : style),
|
|
21202
|
-
className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-
|
|
21205
|
+
className: classnames__WEBPACK_IMPORTED_MODULE_8___default()("".concat(prefixCls, "-textarea"), (_classNames2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-no-resize"), canResize !== true), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-allowClear-spacing"), !!allowClear), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-error"), status === 'error'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames2, "".concat(prefixCls, "-disabled"), disabled), _classNames2), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, className, className && !allowClear && !hadCount)),
|
|
21203
21206
|
onChange: handleChange,
|
|
21204
21207
|
onFocus: !disabled ? handleFocus : undefined,
|
|
21205
21208
|
onBlur: !disabled ? handleBlur : undefined,
|
|
@@ -21423,7 +21426,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
21423
21426
|
|
|
21424
21427
|
|
|
21425
21428
|
|
|
21426
|
-
var _excluded = ["type", "size", "disabled", "onPressEnter", "borderType", "prefixCls", "onFocus", "onBlur", "onChange", "placeholderTobeValue", "defaultValue", "value", "className", "maxLength", "count"];
|
|
21429
|
+
var _excluded = ["type", "size", "disabled", "onPressEnter", "borderType", "prefixCls", "onFocus", "onBlur", "onChange", "placeholderTobeValue", "defaultValue", "value", "className", "maxLength", "count", "status"];
|
|
21427
21430
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21428
21431
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
21429
21432
|
|
|
@@ -21472,6 +21475,7 @@ var InternalInput = function InternalInput(props, ref) {
|
|
|
21472
21475
|
className = inputProps.className,
|
|
21473
21476
|
maxLength = inputProps.maxLength,
|
|
21474
21477
|
count = inputProps.count,
|
|
21478
|
+
status = inputProps.status,
|
|
21475
21479
|
others = _babel_runtime_helpers_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_3___default()(inputProps, _excluded);
|
|
21476
21480
|
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_18__["default"])(InputSiteTypes.indexOf(size) === -1, 'input', "cannot found input size '".concat(size, "'"));
|
|
21477
21481
|
Object(_utils_devwarning__WEBPACK_IMPORTED_MODULE_18__["default"])(BorderTypes.indexOf(borderType) === -1, 'input', "cannot found input borderType '".concat(borderType, "'"));
|
|
@@ -21495,7 +21499,7 @@ var InternalInput = function InternalInput(props, ref) {
|
|
|
21495
21499
|
var inputPrefixCls = getPrefixCls(prefixCls, 'input', customPrefixcls); // 按钮样式前缀
|
|
21496
21500
|
var addonBefore = others.addonBefore,
|
|
21497
21501
|
addonAfter = others.addonAfter;
|
|
21498
|
-
var inputClasses = classnames__WEBPACK_IMPORTED_MODULE_13___default()(inputPrefixCls, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-disabled"), disabled), _classNames), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, className, className && !Object(_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_17__["hasPrefixSuffix"])(inputProps) && !addonBefore && !addonAfter));
|
|
21502
|
+
var inputClasses = classnames__WEBPACK_IMPORTED_MODULE_13___default()(inputPrefixCls, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-size-").concat(size), size), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-borderless"), borderType === 'none'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-underline"), borderType === 'underline'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-error"), status === 'error'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(inputPrefixCls, "-disabled"), disabled), _classNames), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, className, className && !Object(_ClearableLabeledInput__WEBPACK_IMPORTED_MODULE_17__["hasPrefixSuffix"])(inputProps) && !addonBefore && !addonAfter));
|
|
21499
21503
|
var handleFocus = function handleFocus(event) {
|
|
21500
21504
|
setFocused(true);
|
|
21501
21505
|
onFocus && onFocus(event);
|