@bitrise/bitkit 10.23.0-alpha-chakra.2 → 10.23.2
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 +3 -3
- package/src/Components/Dropdown/isNodeMatch.ts +3 -6
- package/src/Components/Form/Textarea/Textarea.tsx +4 -4
- package/src/Components/Select/Select.tsx +4 -1
- package/src/Components/Toggle/Toggle.tsx +4 -1
- package/src/Components/Tooltip/Tooltip.tsx +1 -0
- package/src/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit",
|
|
3
3
|
"description": "Bitrise React component library",
|
|
4
|
-
"version": "10.23.
|
|
4
|
+
"version": "10.23.2",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"@types/enzyme": "^3.10.12",
|
|
71
71
|
"@types/jest": "^28.1.6",
|
|
72
72
|
"@types/luxon": "^2.4.0",
|
|
73
|
-
"@types/react": "18.0.
|
|
73
|
+
"@types/react": "18.0.18",
|
|
74
74
|
"@types/react-dom": "^18.0.6",
|
|
75
75
|
"@types/vfile-message": "^2.0.0",
|
|
76
76
|
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"ts-jest": "^28.0.7",
|
|
105
105
|
"ts-node": "^10.9.1",
|
|
106
106
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
107
|
-
"typescript": "^4.
|
|
107
|
+
"typescript": "^4.8.2",
|
|
108
108
|
"webpack": "^5.73.0"
|
|
109
109
|
},
|
|
110
110
|
"files": [
|
|
@@ -15,12 +15,12 @@ function isNodeMatch(node: ReactNode, filter: string): boolean {
|
|
|
15
15
|
return node.toLowerCase().includes(filter.toLowerCase());
|
|
16
16
|
}
|
|
17
17
|
if (Array.isArray(node)) {
|
|
18
|
-
return node.some((child) => isNodeMatch(child, filter));
|
|
18
|
+
return Array.from(node).some((child) => isNodeMatch(child, filter));
|
|
19
19
|
}
|
|
20
20
|
if ('children' in node) {
|
|
21
21
|
return isNodeMatch(node.children, filter);
|
|
22
22
|
}
|
|
23
|
-
if (React.isValidElement(node)) {
|
|
23
|
+
if (React.isValidElement<any>(node)) {
|
|
24
24
|
if (node.type === 'svg') {
|
|
25
25
|
return false;
|
|
26
26
|
}
|
|
@@ -30,10 +30,7 @@ function isNodeMatch(node: ReactNode, filter: string): boolean {
|
|
|
30
30
|
}
|
|
31
31
|
return isNodeMatch(node.props.children, filter);
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
return isNodeMatch(Array.from(node), filter);
|
|
35
|
-
}
|
|
36
|
-
return false;
|
|
33
|
+
return isNodeMatch(Array.from(node), filter);
|
|
37
34
|
}
|
|
38
35
|
|
|
39
36
|
export default isNodeMatch;
|
|
@@ -10,15 +10,15 @@ import {
|
|
|
10
10
|
forwardRef,
|
|
11
11
|
} from '@chakra-ui/react';
|
|
12
12
|
|
|
13
|
-
export interface TextareaProps extends Omit<FormControlProps, 'label' | '
|
|
13
|
+
export interface TextareaProps extends Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'> {
|
|
14
14
|
'data-testid'?: string;
|
|
15
15
|
errorText?: string;
|
|
16
16
|
isLoading?: boolean;
|
|
17
17
|
helperText?: string;
|
|
18
18
|
label?: ReactNode;
|
|
19
19
|
name?: string;
|
|
20
|
-
onChange?: ChakraTextareaProps['onChange'];
|
|
21
20
|
onBlur?: ChakraTextareaProps['onBlur'];
|
|
21
|
+
onChange?: ChakraTextareaProps['onChange'];
|
|
22
22
|
value?: ChakraTextareaProps['value'];
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -35,8 +35,8 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
|
35
35
|
isLoading,
|
|
36
36
|
label,
|
|
37
37
|
placeholder,
|
|
38
|
-
onChange,
|
|
39
38
|
onBlur,
|
|
39
|
+
onChange,
|
|
40
40
|
name,
|
|
41
41
|
value,
|
|
42
42
|
...rest
|
|
@@ -49,8 +49,8 @@ const Textarea = forwardRef<TextareaProps, 'div'>((props, ref) => {
|
|
|
49
49
|
};
|
|
50
50
|
const textareaProps = {
|
|
51
51
|
'data-testid': dataTestid,
|
|
52
|
-
onChange,
|
|
53
52
|
onBlur,
|
|
53
|
+
onChange,
|
|
54
54
|
name,
|
|
55
55
|
placeholder,
|
|
56
56
|
value,
|
|
@@ -12,13 +12,14 @@ import {
|
|
|
12
12
|
} from '@chakra-ui/react';
|
|
13
13
|
import Icon from '../Icon/Icon';
|
|
14
14
|
|
|
15
|
-
export interface SelectProps extends Omit<FormControlProps, 'label' | 'onChange'> {
|
|
15
|
+
export interface SelectProps extends Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'> {
|
|
16
16
|
'data-testid'?: string;
|
|
17
17
|
errorText?: string;
|
|
18
18
|
helperText?: string;
|
|
19
19
|
isLoading?: boolean;
|
|
20
20
|
label?: ReactNode;
|
|
21
21
|
name?: string;
|
|
22
|
+
onBlur?: ChakraSelectProps['onBlur'];
|
|
22
23
|
onChange?: ChakraSelectProps['onChange'];
|
|
23
24
|
size?: 'small' | 'medium';
|
|
24
25
|
value?: ChakraSelectProps['value'];
|
|
@@ -35,6 +36,7 @@ const Select = forwardRef<SelectProps, 'div'>((props, ref) => {
|
|
|
35
36
|
isLoading,
|
|
36
37
|
label,
|
|
37
38
|
name,
|
|
39
|
+
onBlur,
|
|
38
40
|
onChange,
|
|
39
41
|
placeholder,
|
|
40
42
|
size,
|
|
@@ -55,6 +57,7 @@ const Select = forwardRef<SelectProps, 'div'>((props, ref) => {
|
|
|
55
57
|
<Icon name="DropdownArrows" fontSize={iconSize} size={iconSize} />
|
|
56
58
|
),
|
|
57
59
|
name,
|
|
60
|
+
onBlur,
|
|
58
61
|
onChange,
|
|
59
62
|
size,
|
|
60
63
|
value,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
} from '@chakra-ui/react';
|
|
14
14
|
import Box from '../Box/Box';
|
|
15
15
|
|
|
16
|
-
export interface ToggleProps extends Omit<FormControlProps, 'label'> {
|
|
16
|
+
export interface ToggleProps extends Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'> {
|
|
17
17
|
'data-testid'?: string;
|
|
18
18
|
defaultChecked?: SwitchProps['defaultChecked'];
|
|
19
19
|
errorText?: string;
|
|
@@ -24,6 +24,7 @@ export interface ToggleProps extends Omit<FormControlProps, 'label'> {
|
|
|
24
24
|
helperText?: string;
|
|
25
25
|
label?: ReactNode;
|
|
26
26
|
name?: string;
|
|
27
|
+
onBlur?: SwitchProps['onBlur'];
|
|
27
28
|
onChange?: SwitchProps['onChange'];
|
|
28
29
|
value?: SwitchProps['value'];
|
|
29
30
|
}
|
|
@@ -44,6 +45,7 @@ const Toggle = forwardRef<ToggleProps, 'div'>((props, ref) => {
|
|
|
44
45
|
isLoading,
|
|
45
46
|
label,
|
|
46
47
|
name,
|
|
48
|
+
onBlur,
|
|
47
49
|
onChange,
|
|
48
50
|
value,
|
|
49
51
|
...rest
|
|
@@ -61,6 +63,7 @@ const Toggle = forwardRef<ToggleProps, 'div'>((props, ref) => {
|
|
|
61
63
|
isChecked,
|
|
62
64
|
isDisabled: isDisabled || isLoading,
|
|
63
65
|
name,
|
|
66
|
+
onBlur,
|
|
64
67
|
onChange,
|
|
65
68
|
value,
|
|
66
69
|
};
|