Comparing version 1.4.1 to 1.4.2
@@ -44,8 +44,10 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
}; | ||
var hasAffix = hasPrefixSuffix(props); | ||
var element = /*#__PURE__*/cloneElement(inputElement, { | ||
value: value | ||
value: value, | ||
className: clsx(inputElement.props.className, !hasAffix && (classNames === null || classNames === void 0 ? void 0 : classNames.variant)) || null | ||
}); | ||
// ================== Prefix & Suffix ================== // | ||
if (hasPrefixSuffix(props)) { | ||
if (hasAffix) { | ||
var _clsx2; | ||
@@ -73,3 +75,3 @@ // ================== Clear Icon ================== // | ||
var affixWrapperPrefixCls = "".concat(prefixCls, "-affix-wrapper"); | ||
var affixWrapperCls = clsx(affixWrapperPrefixCls, (_clsx2 = {}, _defineProperty(_clsx2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-disabled"), disabled), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-focused"), focused), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-readonly"), readOnly), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-input-with-clear-btn"), suffix && allowClear && value), _clsx2), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper); | ||
var affixWrapperCls = clsx(affixWrapperPrefixCls, (_clsx2 = {}, _defineProperty(_clsx2, "".concat(prefixCls, "-disabled"), disabled), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-disabled"), disabled), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-focused"), focused), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-readonly"), readOnly), _defineProperty(_clsx2, "".concat(affixWrapperPrefixCls, "-input-with-clear-btn"), suffix && allowClear && value), _clsx2), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.variant); | ||
var suffixNode = (suffix || allowClear) && /*#__PURE__*/React.createElement("span", { | ||
@@ -76,0 +78,0 @@ className: clsx("".concat(prefixCls, "-suffix"), classNames === null || classNames === void 0 ? void 0 : classNames.suffix), |
@@ -21,2 +21,3 @@ import type { CSSProperties, InputHTMLAttributes, KeyboardEventHandler, MouseEventHandler, ReactElement, ReactNode } from 'react'; | ||
wrapper?: string; | ||
variant?: string; | ||
}; | ||
@@ -23,0 +24,0 @@ styles?: { |
@@ -54,8 +54,10 @@ "use strict"; | ||
}; | ||
var hasAffix = (0, _commonUtils.hasPrefixSuffix)(props); | ||
var element = /*#__PURE__*/(0, _react.cloneElement)(inputElement, { | ||
value: value | ||
value: value, | ||
className: (0, _classnames.default)(inputElement.props.className, !hasAffix && (classNames === null || classNames === void 0 ? void 0 : classNames.variant)) || null | ||
}); | ||
// ================== Prefix & Suffix ================== // | ||
if ((0, _commonUtils.hasPrefixSuffix)(props)) { | ||
if (hasAffix) { | ||
var _clsx2; | ||
@@ -83,3 +85,3 @@ // ================== Clear Icon ================== // | ||
var affixWrapperPrefixCls = "".concat(prefixCls, "-affix-wrapper"); | ||
var affixWrapperCls = (0, _classnames.default)(affixWrapperPrefixCls, (_clsx2 = {}, (0, _defineProperty2.default)(_clsx2, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-focused"), focused), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-readonly"), readOnly), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-input-with-clear-btn"), suffix && allowClear && value), _clsx2), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper); | ||
var affixWrapperCls = (0, _classnames.default)(affixWrapperPrefixCls, (_clsx2 = {}, (0, _defineProperty2.default)(_clsx2, "".concat(prefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-disabled"), disabled), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-focused"), focused), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-readonly"), readOnly), (0, _defineProperty2.default)(_clsx2, "".concat(affixWrapperPrefixCls, "-input-with-clear-btn"), suffix && allowClear && value), _clsx2), classes === null || classes === void 0 ? void 0 : classes.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.affixWrapper, classNames === null || classNames === void 0 ? void 0 : classNames.variant); | ||
var suffixNode = (suffix || allowClear) && /*#__PURE__*/_react.default.createElement("span", { | ||
@@ -86,0 +88,0 @@ className: (0, _classnames.default)("".concat(prefixCls, "-suffix"), classNames === null || classNames === void 0 ? void 0 : classNames.suffix), |
@@ -21,2 +21,3 @@ import type { CSSProperties, InputHTMLAttributes, KeyboardEventHandler, MouseEventHandler, ReactElement, ReactNode } from 'react'; | ||
wrapper?: string; | ||
variant?: string; | ||
}; | ||
@@ -23,0 +24,0 @@ styles?: { |
{ | ||
"name": "rc-input", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "React input component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
68633
1214