@true-engineering/true-react-common-ui-kit 4.0.0-alpha14 → 4.0.0-alpha16
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/true-react-common-ui-kit.js +8 -8
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +7 -7
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ControlWrapper/types.ts +1 -0
- package/src/components/Input/InputBase.tsx +5 -5
- package/src/components/TextArea/TextArea.tsx +1 -0
- package/src/components/TextButton/TextButton.styles.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { createContext, useMemo, useContext, useInsertionEffect, useRef, useEffect, useCallback, useState, createElement, Fragment as Fragment$1, forwardRef, createRef, PureComponent, memo } from "react";
|
|
2
2
|
import { jss, JssContext as JssContext$1, createUseStyles } from "react-jss";
|
|
3
|
-
import { isNotEmpty, isArrayNotEmpty, mergeStyles, joinStrings, isObject as isObject$1, isStringEmpty, isString, isStringNotEmpty, mergeRefs, addDataTestId, applyAction, addDataAttributes as addDataAttributes$1, stopPropagation, isReactNodeNotEmpty, addClickHandler, getTestId, getSelectKeyHandler, getArray, createFilter, isEmpty, isFunction as isFunction$1, getTransition, indexMap, isNumberInteger, hasDuplicates,
|
|
3
|
+
import { isNotEmpty, isArrayNotEmpty, mergeStyles, joinStrings, isObject as isObject$1, isStringEmpty, isString, isStringNotEmpty, mergeRefs, addDataTestId, applyAction, addDataAttributes as addDataAttributes$1, stopPropagation, isReactNodeNotEmpty, addClickHandler, getTestId, getSelectKeyHandler, isArrayLikeNotEmpty, getArray, createFilter, isEmpty, isFunction as isFunction$1, getTransition, indexMap, isNumberInteger, hasDuplicates, isArrayEmpty } from "@true-engineering/true-react-platform-helpers";
|
|
4
4
|
import { merge as merge$2 } from "lodash-es";
|
|
5
5
|
import { CSSTransition } from "react-transition-group";
|
|
6
6
|
import clsx from "clsx";
|
|
@@ -10534,7 +10534,7 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10534
10534
|
var _useState = _sliced_to_array$j(useState(false), 2), isFocused = _useState[0], setFocused = _useState[1];
|
|
10535
10535
|
var _useState1 = _sliced_to_array$j(useState(), 2), unitsWidth = _useState1[0], setUnitsWidth = _useState1[1];
|
|
10536
10536
|
var inputRef = useRef(null);
|
|
10537
|
-
var mergedRef =
|
|
10537
|
+
var mergedRef = useMergedRefs([
|
|
10538
10538
|
ref,
|
|
10539
10539
|
inputRef
|
|
10540
10540
|
]);
|
|
@@ -10544,7 +10544,7 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10544
10544
|
"url"
|
|
10545
10545
|
].includes(type) ? type : void 0;
|
|
10546
10546
|
var hasFocus = isFocused || isActive;
|
|
10547
|
-
var hasValue =
|
|
10547
|
+
var hasValue = isArrayLikeNotEmpty(value);
|
|
10548
10548
|
var hasUnits = isReactNodeNotEmpty(units);
|
|
10549
10549
|
var hasPlaceholder = (!isReactNodeNotEmpty(label) || hasFocus || shouldAlwaysShowPlaceholder) && isStringNotEmpty(placeholder);
|
|
10550
10550
|
var handleChange = function(event) {
|
|
@@ -10641,7 +10641,7 @@ var InputBase = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
10641
10641
|
isDisabled,
|
|
10642
10642
|
isFocused: hasFocus,
|
|
10643
10643
|
isInvalid,
|
|
10644
|
-
hasValue
|
|
10644
|
+
hasValue,
|
|
10645
10645
|
isFullWidth: !isAutoSized,
|
|
10646
10646
|
tweakStyles: tweakControlWrapperStyles,
|
|
10647
10647
|
onClear: isClearable && hasValue ? handleInputClear : void 0,
|
|
@@ -31410,9 +31410,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
31410
31410
|
}
|
|
31411
31411
|
var DEFAULT_VALUE = "";
|
|
31412
31412
|
var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
31413
|
-
var _param_value = _param.value, value = _param_value === void 0 ? DEFAULT_VALUE : _param_value, label = _param.label, placeholder = _param.placeholder, name = _param.name
|
|
31414
|
-
_param.shouldFocusOnMount;
|
|
31415
|
-
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, size2 = _param.size, textAreaProps = _object_without_properties$3(_param, [
|
|
31413
|
+
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, size2 = _param.size, textAreaProps = _object_without_properties$3(_param, [
|
|
31416
31414
|
"value",
|
|
31417
31415
|
"label",
|
|
31418
31416
|
"placeholder",
|
|
@@ -31502,7 +31500,8 @@ var TextArea = /* @__PURE__ */ forwardRef(function(_param, ref) {
|
|
|
31502
31500
|
onPaste,
|
|
31503
31501
|
onFocus: handleFocus,
|
|
31504
31502
|
onBlur: handleBlur,
|
|
31505
|
-
onChange: handleChange
|
|
31503
|
+
onChange: handleChange,
|
|
31504
|
+
autoFocus: shouldFocusOnMount
|
|
31506
31505
|
}, addDataAttributes$1(data, testId), textAreaProps))
|
|
31507
31506
|
}))
|
|
31508
31507
|
}),
|
|
@@ -31523,6 +31522,7 @@ var useStyles$3 = createThemedStyles("TextButton", {
|
|
|
31523
31522
|
alignItems: "center",
|
|
31524
31523
|
height: 24,
|
|
31525
31524
|
padding: 0,
|
|
31525
|
+
position: "relative",
|
|
31526
31526
|
background: "transparent",
|
|
31527
31527
|
border: "none",
|
|
31528
31528
|
borderRadius: 0,
|