@true-engineering/true-react-common-ui-kit 4.0.0-alpha3 → 4.0.0-alpha5

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-alpha3",
3
+ "version": "4.0.0-alpha5",
4
4
  "description": "True Engineering React UI Kit with theming support",
5
5
  "author": "True Engineering (https://trueengineering.ru)",
6
6
  "keywords": [
@@ -1,4 +1,5 @@
1
1
  import { forwardRef } from 'react';
2
+ import { getTestId } from '@true-engineering/true-react-platform-helpers';
2
3
  import { useTweakStyles } from '../../hooks';
3
4
  import { IWithMessagesProps, WithMessages } from '../WithMessages';
4
5
  import { IInputBaseProps, InputBase } from './InputBase';
@@ -17,7 +18,7 @@ export const Input = forwardRef<HTMLInputElement, IInputProps>(
17
18
  <WithMessages
18
19
  errorMessage={errorMessage}
19
20
  infoMessage={infoMessage}
20
- testId={testId}
21
+ testId={getTestId(testId, 'wrapper')}
21
22
  tweakStyles={tweakWithMessagesStyles}
22
23
  >
23
24
  <InputBase
@@ -194,7 +194,7 @@ export const InputBase = forwardRef<HTMLInputElement, IInputBaseProps>(
194
194
  onFocus: handleFocus,
195
195
  onBlur: handleBlur,
196
196
  onChange: handleChange,
197
- ...addDataTestId(testId, 'input'),
197
+ ...addDataTestId(testId),
198
198
  };
199
199
 
200
200
  useEffect(() => {
@@ -581,6 +581,7 @@ export function Select<Value>(
581
581
  errorMessage={errorMessage}
582
582
  infoMessage={infoMessage}
583
583
  tweakStyles={tweakWithMessagesStyles}
584
+ testId={getTestId(testId, 'wrapper')}
584
585
  >
585
586
  <div className={classes.root} onKeyDown={handleKeyDown} ref={root}>
586
587
  <div
@@ -2,6 +2,7 @@ import { ChangeEvent, FocusEvent, FormEvent, forwardRef, useState } from 'react'
2
2
  import clsx from 'clsx';
3
3
  import {
4
4
  addDataAttributes,
5
+ getTestId,
5
6
  isNotEmpty,
6
7
  isReactNodeNotEmpty,
7
8
  isStringNotEmpty,
@@ -114,6 +115,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
114
115
  errorMessage={errorMessage}
115
116
  infoMessage={infoMessage}
116
117
  tweakStyles={tweakWithMessagesStyles}
118
+ testId={getTestId(testId, 'wrapper')}
117
119
  >
118
120
  <ControlWrapper
119
121
  label={label}
@@ -122,7 +124,6 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
122
124
  isDisabled={isDisabled}
123
125
  hasValue={hasValue}
124
126
  isFullWidth
125
- testId={testId}
126
127
  {...controlProps}
127
128
  >
128
129
  <div
@@ -142,7 +143,7 @@ export const TextArea = forwardRef<HTMLTextAreaElement, ITextAreaProps>(
142
143
  onFocus={handleFocus}
143
144
  onBlur={handleBlur}
144
145
  onChange={handleChange}
145
- {...addDataAttributes(data, testId, 'control')}
146
+ {...addDataAttributes(data, testId)}
146
147
  />
147
148
  </div>
148
149
  </ControlWrapper>