@true-engineering/true-react-common-ui-kit 4.0.0-alpha13 → 4.0.0-alpha15
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/components/TextArea/TextArea.styles.d.ts +0 -1
- package/dist/true-react-common-ui-kit.js +10 -25
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +9 -24
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ControlWrapper/ControlWrapper.styles.ts +1 -1
- package/src/components/ControlWrapper/types.ts +1 -0
- package/src/components/Input/InputBase.tsx +3 -2
- package/src/components/NumberInput/NumberInput.stories.tsx +5 -1
- package/src/components/SearchInput/SearchInput.tsx +1 -5
- package/src/components/TextArea/TextArea.styles.ts +0 -6
- package/src/components/TextArea/TextArea.tsx +2 -2
- package/src/components/TextButton/TextButton.styles.ts +1 -0
|
@@ -9918,7 +9918,7 @@
|
|
|
9918
9918
|
position: "absolute",
|
|
9919
9919
|
pointerEvents: "none",
|
|
9920
9920
|
left: "var(--control-padding)",
|
|
9921
|
-
top: "
|
|
9921
|
+
top: "calc(var(--control-height) / 2)",
|
|
9922
9922
|
transformOrigin: "top left",
|
|
9923
9923
|
transform: "translateY(-50%)",
|
|
9924
9924
|
transition: animations.defaultTransition,
|
|
@@ -10531,7 +10531,7 @@
|
|
|
10531
10531
|
"url"
|
|
10532
10532
|
].includes(type) ? type : void 0;
|
|
10533
10533
|
var hasFocus = isFocused || isActive;
|
|
10534
|
-
var hasValue = trueReactPlatformHelpers.
|
|
10534
|
+
var hasValue = trueReactPlatformHelpers.isArrayLikeNotEmpty(value);
|
|
10535
10535
|
var hasUnits = trueReactPlatformHelpers.isReactNodeNotEmpty(units);
|
|
10536
10536
|
var hasPlaceholder = (!trueReactPlatformHelpers.isReactNodeNotEmpty(label) || hasFocus || shouldAlwaysShowPlaceholder) && trueReactPlatformHelpers.isStringNotEmpty(placeholder);
|
|
10537
10537
|
var handleChange = function(event) {
|
|
@@ -10628,7 +10628,7 @@
|
|
|
10628
10628
|
isDisabled,
|
|
10629
10629
|
isFocused: hasFocus,
|
|
10630
10630
|
isInvalid,
|
|
10631
|
-
hasValue
|
|
10631
|
+
hasValue,
|
|
10632
10632
|
isFullWidth: !isAutoSized,
|
|
10633
10633
|
tweakStyles: tweakControlWrapperStyles,
|
|
10634
10634
|
onClear: isClearable && hasValue ? handleInputClear : void 0,
|
|
@@ -10988,15 +10988,9 @@
|
|
|
10988
10988
|
return target;
|
|
10989
10989
|
}
|
|
10990
10990
|
var SearchInput = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
|
|
10991
|
-
var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable,
|
|
10992
|
-
_param.data;
|
|
10993
|
-
var props = _object_without_properties$f(_param, [
|
|
10991
|
+
var _param_isClearable = _param.isClearable, isClearable = _param_isClearable === void 0 ? true : _param_isClearable, tweakStyles = _param.tweakStyles, props = _object_without_properties$f(_param, [
|
|
10994
10992
|
"isClearable",
|
|
10995
|
-
"
|
|
10996
|
-
"value",
|
|
10997
|
-
"testId",
|
|
10998
|
-
"tweakStyles",
|
|
10999
|
-
"data"
|
|
10993
|
+
"tweakStyles"
|
|
11000
10994
|
]);
|
|
11001
10995
|
var tweakInputStyles = useTweakStyles({
|
|
11002
10996
|
innerStyles: inputStyles$4,
|
|
@@ -11006,11 +11000,8 @@
|
|
|
11006
11000
|
});
|
|
11007
11001
|
return /* @__PURE__ */ jsx(Input, _object_spread$N({
|
|
11008
11002
|
ref,
|
|
11009
|
-
value,
|
|
11010
|
-
placeholder,
|
|
11011
11003
|
icon: "search",
|
|
11012
11004
|
isClearable,
|
|
11013
|
-
testId: trueReactPlatformHelpers.getTestId(testId, "input"),
|
|
11014
11005
|
tweakStyles: tweakInputStyles
|
|
11015
11006
|
}, props));
|
|
11016
11007
|
});
|
|
@@ -31262,11 +31253,6 @@
|
|
|
31262
31253
|
},
|
|
31263
31254
|
withLabel: {}
|
|
31264
31255
|
});
|
|
31265
|
-
var controlWrapperStyles = {
|
|
31266
|
-
label: {
|
|
31267
|
-
top: 16
|
|
31268
|
-
}
|
|
31269
|
-
};
|
|
31270
31256
|
function _array_like_to_array(arr, len) {
|
|
31271
31257
|
if (len == null || len > arr.length)
|
|
31272
31258
|
len = arr.length;
|
|
@@ -31411,9 +31397,7 @@
|
|
|
31411
31397
|
}
|
|
31412
31398
|
var DEFAULT_VALUE = "";
|
|
31413
31399
|
var TextArea = /* @__PURE__ */ React.forwardRef(function(_param, ref) {
|
|
31414
|
-
var _param_value = _param.value, value = _param_value === void 0 ? DEFAULT_VALUE : _param_value, label = _param.label, placeholder = _param.placeholder, name = _param.name
|
|
31415
|
-
_param.shouldFocusOnMount;
|
|
31416
|
-
var _param_hasCounter = _param.hasCounter, hasCounter = _param_hasCounter === void 0 ? true : _param_hasCounter, shouldTrimAfterMaxLength = _param.shouldTrimAfterMaxLength, _param_isAutoSized = _param.isAutoSized, isAutoSized = _param_isAutoSized === void 0 ? true : _param_isAutoSized, shouldAlwaysShowPlaceholder = _param.shouldAlwaysShowPlaceholder, isDisabled = _param.isDisabled, isActive = _param.isActive, maxLength = _param.maxLength, rows = _param.rows, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, onChange = _param.onChange, onPaste = _param.onPaste, onFocus = _param.onFocus, onBlur = _param.onBlur, infoMessage = _param.infoMessage, errorMessage = _param.errorMessage, isInvalid = _param.isInvalid, isRequired = _param.isRequired, size = _param.size, textAreaProps = _object_without_properties$3(_param, [
|
|
31400
|
+
var _param_value = _param.value, value = _param_value === void 0 ? DEFAULT_VALUE : _param_value, label = _param.label, placeholder = _param.placeholder, name = _param.name, shouldFocusOnMount = _param.shouldFocusOnMount, _param_hasCounter = _param.hasCounter, hasCounter = _param_hasCounter === void 0 ? true : _param_hasCounter, shouldTrimAfterMaxLength = _param.shouldTrimAfterMaxLength, _param_isAutoSized = _param.isAutoSized, isAutoSized = _param_isAutoSized === void 0 ? true : _param_isAutoSized, shouldAlwaysShowPlaceholder = _param.shouldAlwaysShowPlaceholder, isDisabled = _param.isDisabled, isActive = _param.isActive, maxLength = _param.maxLength, rows = _param.rows, data = _param.data, testId = _param.testId, tweakStyles = _param.tweakStyles, onChange = _param.onChange, onPaste = _param.onPaste, onFocus = _param.onFocus, onBlur = _param.onBlur, infoMessage = _param.infoMessage, errorMessage = _param.errorMessage, isInvalid = _param.isInvalid, isRequired = _param.isRequired, size = _param.size, textAreaProps = _object_without_properties$3(_param, [
|
|
31417
31401
|
"value",
|
|
31418
31402
|
"label",
|
|
31419
31403
|
"placeholder",
|
|
@@ -31449,7 +31433,6 @@
|
|
|
31449
31433
|
currentComponentName: "TextArea"
|
|
31450
31434
|
});
|
|
31451
31435
|
var tweakControlWrapperStyles = useTweakStyles({
|
|
31452
|
-
innerStyles: controlWrapperStyles,
|
|
31453
31436
|
tweakStyles,
|
|
31454
31437
|
className: "tweakControlWrapper",
|
|
31455
31438
|
currentComponentName: "TextArea"
|
|
@@ -31504,7 +31487,8 @@
|
|
|
31504
31487
|
onPaste,
|
|
31505
31488
|
onFocus: handleFocus,
|
|
31506
31489
|
onBlur: handleBlur,
|
|
31507
|
-
onChange: handleChange
|
|
31490
|
+
onChange: handleChange,
|
|
31491
|
+
autoFocus: shouldFocusOnMount
|
|
31508
31492
|
}, trueReactPlatformHelpers.addDataAttributes(data, testId), textAreaProps))
|
|
31509
31493
|
}))
|
|
31510
31494
|
}),
|
|
@@ -31525,6 +31509,7 @@
|
|
|
31525
31509
|
alignItems: "center",
|
|
31526
31510
|
height: 24,
|
|
31527
31511
|
padding: 0,
|
|
31512
|
+
position: "relative",
|
|
31528
31513
|
background: "transparent",
|
|
31529
31514
|
border: "none",
|
|
31530
31515
|
borderRadius: 0,
|