@commercetools-uikit/money-input 16.1.0 → 16.2.0
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.
|
@@ -804,14 +804,11 @@ const createCurrencySelectStyles = _ref4 => {
|
|
|
804
804
|
isDisabled = _ref4.isDisabled,
|
|
805
805
|
isReadOnly = _ref4.isReadOnly,
|
|
806
806
|
menuPortalZIndex = _ref4.menuPortalZIndex,
|
|
807
|
-
isNewTheme = _ref4.isNewTheme,
|
|
808
|
-
amountHasFocus = _ref4.amountHasFocus,
|
|
809
807
|
currencyHasFocus = _ref4.currencyHasFocus;
|
|
810
808
|
const selectStyles = selectUtils.createSelectStyles({
|
|
811
809
|
hasWarning,
|
|
812
810
|
hasError,
|
|
813
811
|
menuPortalZIndex,
|
|
814
|
-
isNewTheme,
|
|
815
812
|
isReadOnly,
|
|
816
813
|
isDisabled
|
|
817
814
|
});
|
|
@@ -828,9 +825,6 @@ const createCurrencySelectStyles = _ref4 => {
|
|
|
828
825
|
if (isReadOnly) return "".concat(designSystem.designTokens.borderColorForInputWhenReadonly, " !important");
|
|
829
826
|
if (hasError) return designSystem.designTokens.borderColorForInputWhenError;
|
|
830
827
|
if (hasWarning) return designSystem.designTokens.borderColorForInputWhenWarning;
|
|
831
|
-
if (amountHasFocus && !isNewTheme) {
|
|
832
|
-
return designSystem.designTokens.borderColorForInputWhenFocused;
|
|
833
|
-
}
|
|
834
828
|
if (currencyHasFocus) {
|
|
835
829
|
return designSystem.designTokens.borderColorForInputWhenFocused;
|
|
836
830
|
}
|
|
@@ -1067,8 +1061,6 @@ const MoneyInput = props => {
|
|
|
1067
1061
|
_useToggleState4 = _slicedToArray(_useToggleState3, 2),
|
|
1068
1062
|
amountHasFocus = _useToggleState4[0],
|
|
1069
1063
|
toggleAmountHasFocus = _useToggleState4[1];
|
|
1070
|
-
const _useTheme = designSystem.useTheme(),
|
|
1071
|
-
isNewTheme = _useTheme.isNewTheme;
|
|
1072
1064
|
const containerRef = react$1.useRef(null);
|
|
1073
1065
|
const amountInputRef = react$1.useRef(null);
|
|
1074
1066
|
const moneyInputId = hooks.useFieldId(props.id, moneyInputSequentialId);
|
|
@@ -1187,8 +1179,6 @@ const MoneyInput = props => {
|
|
|
1187
1179
|
isDisabled: props.isDisabled,
|
|
1188
1180
|
isReadOnly: props.isReadOnly,
|
|
1189
1181
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
1190
|
-
isNewTheme,
|
|
1191
|
-
amountHasFocus,
|
|
1192
1182
|
currencyHasFocus
|
|
1193
1183
|
});
|
|
1194
1184
|
const options = _mapInstanceProperty__default["default"](_context7 = props.currencies).call(_context7, currencyCode => ({
|
|
@@ -1282,7 +1272,7 @@ const MoneyInput = props => {
|
|
|
1282
1272
|
hasFocus
|
|
1283
1273
|
})),
|
|
1284
1274
|
// accounts for size of icon
|
|
1285
|
-
props.hasHighPrecisionBadge && isHighPrecision && /*#__PURE__*/react.css("padding-right:", designSystem.designTokens.spacing40, ";" + ("" ), "" ), currencyHasFocus &&
|
|
1275
|
+
props.hasHighPrecisionBadge && isHighPrecision && /*#__PURE__*/react.css("padding-right:", designSystem.designTokens.spacing40, ";" + ("" ), "" ), currencyHasFocus && !props.isDisabled && !props.isReadOnly && /*#__PURE__*/react.css("border-left-color:", designSystem.designTokens.borderColorForInputWhenFocused, ";" + ("" ), "" ), "" , "" ],
|
|
1286
1276
|
placeholder: props.placeholder,
|
|
1287
1277
|
onChange: handleAmountChange,
|
|
1288
1278
|
onBlur: handleAmountBlur,
|
|
@@ -1360,7 +1350,7 @@ MoneyInput.defaultProps = defaultProps;
|
|
|
1360
1350
|
var MoneyInput$1 = MoneyInput;
|
|
1361
1351
|
|
|
1362
1352
|
// NOTE: This string will be replaced on build time with the package version.
|
|
1363
|
-
var version = "16.
|
|
1353
|
+
var version = "16.2.0";
|
|
1364
1354
|
|
|
1365
1355
|
exports["default"] = MoneyInput$1;
|
|
1366
1356
|
exports.version = version;
|