@true-engineering/true-react-common-ui-kit 4.0.0-alpha14 → 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/true-react-common-ui-kit.js +7 -7
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +6 -6
- 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 +3 -2
- package/src/components/TextArea/TextArea.tsx +1 -0
- package/src/components/TextButton/TextButton.styles.ts +1 -0
package/package.json
CHANGED
|
@@ -15,6 +15,7 @@ import InputMask, { Props as ReactInputMaskBaseProps } from 'react-input-mask';
|
|
|
15
15
|
import clsx from 'clsx';
|
|
16
16
|
import {
|
|
17
17
|
addDataTestId,
|
|
18
|
+
isArrayLikeNotEmpty,
|
|
18
19
|
isNotEmpty,
|
|
19
20
|
isReactNodeNotEmpty,
|
|
20
21
|
isStringNotEmpty,
|
|
@@ -127,7 +128,7 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
127
128
|
(['email', 'tel', 'url'].includes(type) ? (type as 'email' | 'tel' | 'url') : undefined);
|
|
128
129
|
|
|
129
130
|
const hasFocus = isFocused || isActive;
|
|
130
|
-
const hasValue =
|
|
131
|
+
const hasValue = isArrayLikeNotEmpty(value);
|
|
131
132
|
const hasUnits = isReactNodeNotEmpty(units);
|
|
132
133
|
const hasPlaceholder =
|
|
133
134
|
(!isReactNodeNotEmpty(label) || hasFocus || shouldAlwaysShowPlaceholder) &&
|
|
@@ -231,7 +232,7 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
|
|
|
231
232
|
isDisabled={isDisabled}
|
|
232
233
|
isFocused={hasFocus}
|
|
233
234
|
isInvalid={isInvalid}
|
|
234
|
-
hasValue={hasValue
|
|
235
|
+
hasValue={hasValue}
|
|
235
236
|
isFullWidth={!isAutoSized}
|
|
236
237
|
tweakStyles={tweakControlWrapperStyles}
|
|
237
238
|
onClear={isClearable && hasValue ? handleInputClear : undefined}
|
|
@@ -158,6 +158,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
|
|
|
158
158
|
onFocus={handleFocus}
|
|
159
159
|
onBlur={handleBlur}
|
|
160
160
|
onChange={handleChange}
|
|
161
|
+
autoFocus={shouldFocusOnMount}
|
|
161
162
|
{...addDataAttributes(data, testId)}
|
|
162
163
|
{...textAreaProps}
|
|
163
164
|
/>
|