@bitrise/bitkit 10.29.0-alpha-chakra.1 → 10.29.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 -2
- package/src/Components/Dropdown/Dropdown.tsx +25 -14
- package/src/Components/Fade/Fade.stories.tsx +5 -0
- package/src/Components/Fade/Fade.tsx +4 -0
- package/src/Components/Form/Textarea/Textarea.theme.ts +30 -5
- package/src/Components/Input/Input.theme.ts +20 -0
- package/src/index.ts +2 -2
- package/src/old.ts +3 -6
- package/src/theme.ts +1 -1
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Components/Form/Input/Input.stories.tsx +0 -52
- package/src/Components/Form/Input/Input.theme.ts +0 -38
- package/src/Components/Form/Input/Input.tsx +0 -123
- package/src/Old/Visibility/Visibility.css +0 -13
- package/src/Old/Visibility/Visibility.tsx +0 -29
- package/src/Old/Visibility/VisibilityContainer.tsx +0 -27
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.29.0
|
|
4
|
+
"version": "10.29.0",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@chakra-ui/react": "^2.2.4",
|
|
24
24
|
"@chakra-ui/react-utils": "^2.0.1",
|
|
25
|
-
"@chakra-ui/styled-system": "^2.3.1",
|
|
26
25
|
"@chakra-ui/utils": "^2.0.4",
|
|
27
26
|
"@emotion/react": "^11.9.3",
|
|
28
27
|
"@emotion/styled": "^11.9.3",
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import React, { cloneElement, forwardRef, ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
chakra,
|
|
4
|
+
ChakraProps,
|
|
5
|
+
Input,
|
|
6
|
+
InputGroup,
|
|
7
|
+
InputLeftElement,
|
|
8
|
+
useControllableState,
|
|
9
|
+
useMultiStyleConfig,
|
|
10
|
+
} from '@chakra-ui/react';
|
|
3
11
|
import { FloatingFocusManager, UseFloatingProps } from '@floating-ui/react-dom-interactions';
|
|
4
|
-
import { TypeIconName } from '../Icon/Icon';
|
|
5
|
-
import Input from '../Form/Input/Input';
|
|
12
|
+
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
6
13
|
import { DropdownEventArgs, DropdownProvider, useDropdownContext, useDropdownStyles } from './Dropdown.context';
|
|
7
14
|
import { DropdownOption, DropdownGroup, DropdownDetailedOption, DropdownOptionProps } from './DropdownOption';
|
|
8
15
|
import DropdownButton from './DropdownButton';
|
|
@@ -48,17 +55,21 @@ const DropdownSearch = ({
|
|
|
48
55
|
[searchOnSubmit],
|
|
49
56
|
);
|
|
50
57
|
return (
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
<InputGroup sx={search}>
|
|
59
|
+
<InputLeftElement pointerEvents="none">
|
|
60
|
+
<Icon aria-hidden color="neutral.60" size="24" name="Magnifier" />
|
|
61
|
+
</InputLeftElement>
|
|
62
|
+
<Input
|
|
63
|
+
onKeyDown={onKeyDown}
|
|
64
|
+
ref={searchRef}
|
|
65
|
+
role="search"
|
|
66
|
+
aria-label={placeholder}
|
|
67
|
+
width="100%"
|
|
68
|
+
placeholder={placeholder}
|
|
69
|
+
value={value}
|
|
70
|
+
onChange={onChangeCB}
|
|
71
|
+
/>
|
|
72
|
+
</InputGroup>
|
|
62
73
|
);
|
|
63
74
|
};
|
|
64
75
|
export { DropdownOption, DropdownGroup, DropdownSearch, NoResultsFound, DropdownDetailedOption };
|
|
@@ -1,11 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import InputTheme from '../Input/Input.theme';
|
|
1
|
+
import type { ComponentStyleConfig } from '@chakra-ui/theme';
|
|
3
2
|
|
|
4
|
-
const TextareaTheme =
|
|
3
|
+
const TextareaTheme: ComponentStyleConfig = {
|
|
5
4
|
baseStyle: {
|
|
6
|
-
|
|
5
|
+
width: '100%',
|
|
7
6
|
minHeight: '96',
|
|
7
|
+
padding: '16',
|
|
8
|
+
background: 'neutral.100',
|
|
9
|
+
border: '1px solid',
|
|
10
|
+
borderColor: 'neutral.90',
|
|
11
|
+
borderRadius: '4',
|
|
12
|
+
boxShadow: 'inner',
|
|
13
|
+
outline: 0,
|
|
14
|
+
appearance: 'none',
|
|
15
|
+
lineHeight: 'short',
|
|
16
|
+
verticalAlign: 'top',
|
|
17
|
+
transition: '200ms',
|
|
18
|
+
_placeholder: {
|
|
19
|
+
fontStyle: 'italic',
|
|
20
|
+
},
|
|
21
|
+
_disabled: {
|
|
22
|
+
background: 'neutral.93',
|
|
23
|
+
cursor: 'not-allowed',
|
|
24
|
+
},
|
|
25
|
+
_focusVisible: {
|
|
26
|
+
boxShadow: 'formFocus',
|
|
27
|
+
borderColor: 'purple.50',
|
|
28
|
+
},
|
|
29
|
+
_invalid: {
|
|
30
|
+
color: 'red.50',
|
|
31
|
+
borderColor: 'red.50',
|
|
32
|
+
},
|
|
8
33
|
},
|
|
9
|
-
}
|
|
34
|
+
};
|
|
10
35
|
|
|
11
36
|
export default TextareaTheme;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SystemStyleObject } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
const InputTheme = {
|
|
4
|
+
baseStyle: {
|
|
5
|
+
field: <SystemStyleObject>{
|
|
6
|
+
height: '48',
|
|
7
|
+
borderRadius: '4',
|
|
8
|
+
borderStyle: 'solid',
|
|
9
|
+
borderColor: 'neutral.90',
|
|
10
|
+
borderWidth: '1px',
|
|
11
|
+
boxShadow: 'inner',
|
|
12
|
+
_focusVisible: {
|
|
13
|
+
boxShadow: 'outline',
|
|
14
|
+
outline: 'none',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default InputTheme;
|
package/src/index.ts
CHANGED
|
@@ -202,5 +202,5 @@ export { default as Collapse } from './Components/Collapse/Collapse';
|
|
|
202
202
|
export type { TextareaProps } from './Components/Form/Textarea/Textarea';
|
|
203
203
|
export { default as Textarea } from './Components/Form/Textarea/Textarea';
|
|
204
204
|
|
|
205
|
-
export type {
|
|
206
|
-
export { default as
|
|
205
|
+
export type { FadeProps } from './Components/Fade/Fade';
|
|
206
|
+
export { default as Fade } from './Components/Fade/Fade';
|
package/src/old.ts
CHANGED
|
@@ -18,6 +18,9 @@ export { default as DatePicker } from './Old/DatePicker/DatePicker';
|
|
|
18
18
|
export type { Props as FlexProps } from './Old/Flex/Flex';
|
|
19
19
|
export { default as Flex } from './Old/Flex/Flex';
|
|
20
20
|
|
|
21
|
+
export type { Props as InputProps } from './Old/Input/Input';
|
|
22
|
+
export { default as Input } from './Old/Input/Input';
|
|
23
|
+
|
|
21
24
|
export type { Props as InputContainerProps } from './Old/Input/InputContainer';
|
|
22
25
|
export { default as InputContainer } from './Old/Input/InputContainer';
|
|
23
26
|
|
|
@@ -44,9 +47,3 @@ export { default as Skeleton } from './Old/Skeleton/Skeleton';
|
|
|
44
47
|
|
|
45
48
|
export type { Props as SkeletonBoxProps } from './Old/Skeleton/SkeletonBox';
|
|
46
49
|
export { default as SkeletonBox } from './Old/Skeleton/SkeletonBox';
|
|
47
|
-
|
|
48
|
-
export type { Props as VisibilityProps } from './Old/Visibility/Visibility';
|
|
49
|
-
export { default as Visibility } from './Old/Visibility/Visibility';
|
|
50
|
-
|
|
51
|
-
export type { Props as VisibilityContainerProps } from './Old/Visibility/VisibilityContainer';
|
|
52
|
-
export { default as VisibilityContainer } from './Old/Visibility/VisibilityContainer';
|
package/src/theme.ts
CHANGED
|
@@ -14,7 +14,7 @@ import List from './Components/List/List.theme';
|
|
|
14
14
|
import Menu from './Components/Menu/Menu.theme';
|
|
15
15
|
import Radio from './Components/Form/Radio/Radio.theme';
|
|
16
16
|
import Select from './Components/Select/Select.theme';
|
|
17
|
-
import Input from './Components/
|
|
17
|
+
import Input from './Components/Input/Input.theme';
|
|
18
18
|
import Dropdown from './Components/Dropdown/Dropdown.theme';
|
|
19
19
|
import Tabs from './Components/Tabs/Tabs.theme';
|
|
20
20
|
import Text from './Components/Text/Text.theme';
|