@bitrise/bitkit 13.205.0 → 13.206.0
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
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
import Icon, { TypeIconName } from '../../Icon/Icon';
|
|
21
21
|
import { TooltipProps } from '../../Tooltip/Tooltip';
|
|
22
22
|
import FormLabel, { FormLabelProps } from '../FormLabel';
|
|
23
|
+
import { getDataAttributes } from '../../../utils/utils';
|
|
23
24
|
|
|
24
25
|
type UsedFormControlProps = Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'>;
|
|
25
26
|
type UsedChakraInputProps = Pick<
|
|
@@ -42,7 +43,6 @@ type UsedChakraInputProps = Pick<
|
|
|
42
43
|
>;
|
|
43
44
|
export interface InputProps extends UsedFormControlProps, UsedChakraInputProps {
|
|
44
45
|
badge?: FormLabelProps['badge'];
|
|
45
|
-
'data-testid'?: string;
|
|
46
46
|
errorText?: ReactNode;
|
|
47
47
|
infoTooltipLabel?: string;
|
|
48
48
|
infoTooltipProps?: TooltipProps;
|
|
@@ -74,7 +74,6 @@ const Input = forwardRef<InputProps, 'div'>((props, ref) => {
|
|
|
74
74
|
autoComplete,
|
|
75
75
|
autoFocus,
|
|
76
76
|
badge,
|
|
77
|
-
'data-testid': dataTestid,
|
|
78
77
|
defaultValue,
|
|
79
78
|
errorText,
|
|
80
79
|
helperText,
|
|
@@ -124,7 +123,6 @@ const Input = forwardRef<InputProps, 'div'>((props, ref) => {
|
|
|
124
123
|
const inputProps = {
|
|
125
124
|
autoComplete,
|
|
126
125
|
autoFocus,
|
|
127
|
-
'data-testid': dataTestid,
|
|
128
126
|
defaultValue,
|
|
129
127
|
max,
|
|
130
128
|
maxLength,
|
|
@@ -142,6 +140,8 @@ const Input = forwardRef<InputProps, 'div'>((props, ref) => {
|
|
|
142
140
|
value,
|
|
143
141
|
};
|
|
144
142
|
|
|
143
|
+
const dataAttributes = getDataAttributes(rest);
|
|
144
|
+
|
|
145
145
|
const inputInlinePadding = size === 'lg' ? '15' : '11';
|
|
146
146
|
|
|
147
147
|
const RightContentWrapper = rightAddonPlacement === 'inside' ? InputRightElement : InputRightAddon;
|
|
@@ -193,6 +193,7 @@ const Input = forwardRef<InputProps, 'div'>((props, ref) => {
|
|
|
193
193
|
paddingLeft={inputLeftPadding}
|
|
194
194
|
paddingRight={inputRightPadding}
|
|
195
195
|
{...inputProps}
|
|
196
|
+
{...dataAttributes}
|
|
196
197
|
onChange={onInputChange}
|
|
197
198
|
/>
|
|
198
199
|
{rightAddon && <RightContentWrapper>{rightAddon}</RightContentWrapper>}
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
} from '@chakra-ui/react';
|
|
11
11
|
import { TooltipProps } from '../../Tooltip/Tooltip';
|
|
12
12
|
import FormLabel, { FormLabelProps } from '../FormLabel';
|
|
13
|
+
import { getDataAttributes } from '../../../utils/utils';
|
|
13
14
|
|
|
14
15
|
type UsedFormControlProps = Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'>;
|
|
15
16
|
type UsedChakraTextProps = Pick<
|
|
@@ -28,7 +29,6 @@ type UsedChakraTextProps = Pick<
|
|
|
28
29
|
|
|
29
30
|
export interface TextareaProps extends UsedFormControlProps, UsedChakraTextProps {
|
|
30
31
|
badge?: FormLabelProps['badge'];
|
|
31
|
-
'data-testid'?: string;
|
|
32
32
|
errorText?: string;
|
|
33
33
|
infoTooltipLabel?: string;
|
|
34
34
|
infoTooltipProps?: TooltipProps;
|
|
@@ -50,7 +50,6 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
|
50
50
|
autoComplete,
|
|
51
51
|
autoFocus,
|
|
52
52
|
badge,
|
|
53
|
-
'data-testid': dataTestid,
|
|
54
53
|
errorText,
|
|
55
54
|
helperText,
|
|
56
55
|
infoTooltipLabel,
|
|
@@ -80,7 +79,6 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
|
80
79
|
const textareaProps = {
|
|
81
80
|
autoComplete,
|
|
82
81
|
autoFocus,
|
|
83
|
-
'data-testid': dataTestid,
|
|
84
82
|
maxLength,
|
|
85
83
|
minLength,
|
|
86
84
|
name,
|
|
@@ -101,6 +99,8 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
|
101
99
|
}
|
|
102
100
|
};
|
|
103
101
|
|
|
102
|
+
const dataAttributes = getDataAttributes(props);
|
|
103
|
+
|
|
104
104
|
return (
|
|
105
105
|
<FormControl {...formControlProps}>
|
|
106
106
|
<FormLabel
|
|
@@ -114,7 +114,7 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
|
114
114
|
{label}
|
|
115
115
|
</FormLabel>
|
|
116
116
|
|
|
117
|
-
<ChakraTextarea {...textareaProps} onChange={onTextareaChange} />
|
|
117
|
+
<ChakraTextarea {...textareaProps} {...dataAttributes} onChange={onTextareaChange} />
|
|
118
118
|
{errorText && <FormErrorMessage as="p">{errorText}</FormErrorMessage>}
|
|
119
119
|
{helperText && <FormHelperText as="p">{helperText}</FormHelperText>}
|
|
120
120
|
</FormControl>
|
|
@@ -14,6 +14,7 @@ import Icon from '../Icon/Icon';
|
|
|
14
14
|
import ProgressSpinner from '../ProgressSpinner/ProgressSpinner';
|
|
15
15
|
import FormLabel, { FormLabelProps } from '../Form/FormLabel';
|
|
16
16
|
import { TooltipProps } from '../Tooltip/Tooltip';
|
|
17
|
+
import { getDataAttributes } from '../../utils/utils';
|
|
17
18
|
|
|
18
19
|
export interface SelectProps extends Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'> {
|
|
19
20
|
badge?: FormLabelProps['badge'];
|
|
@@ -72,6 +73,9 @@ const Select = forwardRef<SelectProps, 'div'>((props, ref) => {
|
|
|
72
73
|
size,
|
|
73
74
|
value,
|
|
74
75
|
};
|
|
76
|
+
|
|
77
|
+
const dataAttributes = getDataAttributes(props);
|
|
78
|
+
|
|
75
79
|
if (placeholder) {
|
|
76
80
|
if ('value' in props) {
|
|
77
81
|
selectProperties.value = selectProperties.value ?? '';
|
|
@@ -92,7 +96,7 @@ const Select = forwardRef<SelectProps, 'div'>((props, ref) => {
|
|
|
92
96
|
{label}
|
|
93
97
|
</FormLabel>
|
|
94
98
|
<Box sx={style.selectContainer}>
|
|
95
|
-
<ChakraSelect ref={ref} {...selectProperties} sx={style.field}>
|
|
99
|
+
<ChakraSelect ref={ref} {...selectProperties} {...dataAttributes} sx={style.field}>
|
|
96
100
|
{placeholder && (
|
|
97
101
|
<option disabled value="">
|
|
98
102
|
{placeholder}
|