@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/dist/true-react-common-ui-kit.js +6 -5
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +6 -5
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/src/components/Input/Input.tsx +2 -1
- package/src/components/Input/InputBase.tsx +1 -1
- package/src/components/Select/Select.tsx +1 -0
- package/src/components/TextArea/TextArea.tsx +3 -2
package/package.json
CHANGED
|
@@ -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
|
|
@@ -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
|
|
146
|
+
{...addDataAttributes(data, testId)}
|
|
146
147
|
/>
|
|
147
148
|
</div>
|
|
148
149
|
</ControlWrapper>
|