@bitrise/bitkit 10.19.0-alpha-chakra.1 → 10.20.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 +1 -1
- package/src/Components/Collapse/Collapse.tsx +5 -0
- package/src/Components/Form/Textarea/Textarea.tsx +25 -3
- package/src/index.ts +3 -0
- package/src/old.ts +0 -3
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Old/Expand/Expand.css +0 -26
- package/src/Old/Expand/Expand.test.tsx +0 -52
- package/src/Old/Expand/Expand.tsx +0 -133
- package/src/Old/Expand/__snapshots__/Expand.test.tsx.snap +0 -211
package/package.json
CHANGED
|
@@ -6,25 +6,47 @@ import {
|
|
|
6
6
|
FormHelperText,
|
|
7
7
|
FormLabel,
|
|
8
8
|
Textarea as ChakraTextarea,
|
|
9
|
+
TextareaProps as ChakraTextareaProps,
|
|
9
10
|
forwardRef,
|
|
10
11
|
} from '@chakra-ui/react';
|
|
11
12
|
|
|
12
|
-
export interface TextareaProps extends Omit<FormControlProps, 'label'> {
|
|
13
|
+
export interface TextareaProps extends Omit<FormControlProps, 'label' | 'onChange'> {
|
|
14
|
+
dataTestid?: string;
|
|
13
15
|
errorText?: string;
|
|
14
16
|
isLoading?: boolean;
|
|
15
17
|
helpherText?: string;
|
|
16
18
|
label?: ReactNode;
|
|
19
|
+
onChange?: ChakraTextareaProps['onChange'];
|
|
20
|
+
value?: ChakraTextareaProps['value'];
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
/**
|
|
20
24
|
* The Textarea component allows you to easily create multi-line text inputs.
|
|
21
25
|
*/
|
|
22
26
|
const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
23
|
-
const {
|
|
27
|
+
const {
|
|
28
|
+
dataTestid,
|
|
29
|
+
errorText,
|
|
30
|
+
helpherText,
|
|
31
|
+
isDisabled,
|
|
32
|
+
isInvalid,
|
|
33
|
+
isLoading,
|
|
34
|
+
label,
|
|
35
|
+
placeholder,
|
|
36
|
+
onChange,
|
|
37
|
+
value,
|
|
38
|
+
...rest
|
|
39
|
+
} = props;
|
|
40
|
+
const textareaProps = {
|
|
41
|
+
dataTestid,
|
|
42
|
+
onChange,
|
|
43
|
+
placeholder,
|
|
44
|
+
value,
|
|
45
|
+
};
|
|
24
46
|
return (
|
|
25
47
|
<FormControl isDisabled={isDisabled || isLoading} isInvalid={isInvalid || !!errorText} {...rest} ref={ref}>
|
|
26
48
|
{label && <FormLabel>{label}</FormLabel>}
|
|
27
|
-
<ChakraTextarea
|
|
49
|
+
<ChakraTextarea {...textareaProps} />
|
|
28
50
|
{errorText && <FormErrorMessage as="p">{errorText}</FormErrorMessage>}
|
|
29
51
|
{helpherText && <FormHelperText as="p">{helpherText}</FormHelperText>}
|
|
30
52
|
</FormControl>
|
package/src/index.ts
CHANGED
|
@@ -196,5 +196,8 @@ export { default as Tr } from './Components/Table/Tr';
|
|
|
196
196
|
export type { ToggleProps } from './Components/Toggle/Toggle';
|
|
197
197
|
export { default as Toggle } from './Components/Toggle/Toggle';
|
|
198
198
|
|
|
199
|
+
export type { CollapseProps } from './Components/Collapse/Collapse';
|
|
200
|
+
export { default as Collapse } from './Components/Collapse/Collapse';
|
|
201
|
+
|
|
199
202
|
export type { TextareaProps } from './Components/Form/Textarea/Textarea';
|
|
200
203
|
export { default as Textarea } from './Components/Form/Textarea/Textarea';
|
package/src/old.ts
CHANGED
|
@@ -24,9 +24,6 @@ export { default as DropdownMenuItem } from './Old/Dropdown/DropdownMenuItem';
|
|
|
24
24
|
export type { Props as DropdownMenuItemGroupProps } from './Old/Dropdown/DropdownMenuItemGroup';
|
|
25
25
|
export { default as DropdownMenuItemGroup } from './Old/Dropdown/DropdownMenuItemGroup';
|
|
26
26
|
|
|
27
|
-
export type { Props as ExpandProps } from './Old/Expand/Expand';
|
|
28
|
-
export { default as Expand } from './Old/Expand/Expand';
|
|
29
|
-
|
|
30
27
|
export type { Props as FlexProps } from './Old/Flex/Flex';
|
|
31
28
|
export { default as Flex } from './Old/Flex/Flex';
|
|
32
29
|
|