@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@true-engineering/true-react-common-ui-kit",
3
- "version": "4.0.0-alpha14",
3
+ "version": "4.0.0-alpha15",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -1,3 +1,4 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
1
2
  export interface IControlWrapperSizes {}
2
3
 
3
4
  export type IControlWrapperSize = keyof IControlWrapperSizes;
@@ -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 = isNotEmpty(value) && value !== '';
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 || hasPlaceholder}
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
  />
@@ -7,6 +7,7 @@ export const useStyles = createThemedStyles('TextButton', {
7
7
  alignItems: 'center',
8
8
  height: 24,
9
9
  padding: 0,
10
+ position: 'relative',
10
11
  background: 'transparent',
11
12
  border: 'none',
12
13
  borderRadius: 0,