@bitrise/bitkit 9.38.2 → 9.39.0-alpha-chakra.1
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/Checkbox/Checkbox.stories.tsx +16 -0
- package/src/Components/Checkbox/Checkbox.theme.ts +46 -0
- package/src/Components/Checkbox/Checkbox.tsx +14 -0
- package/src/Components/Icons/16x16/index.ts +0 -1
- package/src/Components/Icons/24x24/index.ts +0 -1
- package/src/index.ts +3 -0
- package/src/old.ts +0 -3
- package/src/theme.ts +2 -0
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Components/Icons/16x16/SampleApp.tsx +0 -18
- package/src/Components/Icons/24x24/SampleApp.tsx +0 -24
- package/src/Old/Checkbox/Checkbox.css +0 -39
- package/src/Old/Checkbox/Checkbox.tsx +0 -32
package/package.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
2
|
+
import Checkbox from './Checkbox';
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: 'Components/Checkbox',
|
|
6
|
+
component: Checkbox,
|
|
7
|
+
} as ComponentMeta<typeof Checkbox>;
|
|
8
|
+
|
|
9
|
+
const Template: ComponentStory<typeof Checkbox> = (props) => <Checkbox {...props} />;
|
|
10
|
+
|
|
11
|
+
export const WithProps = Template.bind({});
|
|
12
|
+
WithProps.args = {
|
|
13
|
+
children: 'Checkbox',
|
|
14
|
+
isDisabled: false,
|
|
15
|
+
isIndeterminate: false,
|
|
16
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ComponentStyleConfig } from '@chakra-ui/theme';
|
|
2
|
+
|
|
3
|
+
const CheckboxTheme: ComponentStyleConfig = {
|
|
4
|
+
baseStyle: {
|
|
5
|
+
icon: {
|
|
6
|
+
color: 'neutral.100',
|
|
7
|
+
},
|
|
8
|
+
container: {
|
|
9
|
+
_disabled: {
|
|
10
|
+
cursor: 'not-allowed',
|
|
11
|
+
':hover > span:first-of-type': {
|
|
12
|
+
borderColor: 'neutral.90',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
':hover > span:first-of-type': {
|
|
16
|
+
borderColor: 'neutral.70',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
control: {
|
|
20
|
+
width: '24',
|
|
21
|
+
height: '24',
|
|
22
|
+
border: '1px solid',
|
|
23
|
+
borderColor: 'neutral.90',
|
|
24
|
+
borderRadius: '4',
|
|
25
|
+
boxShadow: 'inner',
|
|
26
|
+
_checked: {
|
|
27
|
+
backgroundColor: 'purple.50',
|
|
28
|
+
_disabled: {
|
|
29
|
+
backgroundColor: 'neutral.80',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
_hover: {
|
|
33
|
+
borderColor: 'neutral.70',
|
|
34
|
+
},
|
|
35
|
+
_focusVisible: {
|
|
36
|
+
boxShadow: 'outline',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
label: {
|
|
40
|
+
userSelect: 'none',
|
|
41
|
+
_disabled: { color: 'neutral.60' },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default CheckboxTheme;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Checkbox as ChakraCheckbox, CheckboxProps, forwardRef } from '@chakra-ui/react';
|
|
2
|
+
import Icon from '../Icon/Icon';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Checkbox component is used in forms when a user needs to select multiple values from several options.
|
|
6
|
+
*/
|
|
7
|
+
const Checkbox = forwardRef<CheckboxProps, 'input'>((props, ref) => {
|
|
8
|
+
const { isIndeterminate } = props;
|
|
9
|
+
return <ChakraCheckbox icon={<Icon name={isIndeterminate ? 'MinusClose' : 'Tick'} />} {...props} ref={ref} />;
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export type { CheckboxProps };
|
|
13
|
+
|
|
14
|
+
export default Checkbox;
|
|
@@ -141,7 +141,6 @@ export { default as ReactIcon } from './ReactIcon';
|
|
|
141
141
|
export { default as Refresh } from './Refresh';
|
|
142
142
|
export { default as Request } from './Request';
|
|
143
143
|
export { default as Responsiveness } from './Responsiveness';
|
|
144
|
-
export { default as SampleApp } from './SampleApp';
|
|
145
144
|
export { default as Save } from './Save';
|
|
146
145
|
export { default as Screenshare } from './Screenshare';
|
|
147
146
|
export { default as SecurityShield } from './SecurityShield';
|
|
@@ -141,7 +141,6 @@ export { default as ReactIcon } from './ReactIcon';
|
|
|
141
141
|
export { default as Refresh } from './Refresh';
|
|
142
142
|
export { default as Request } from './Request';
|
|
143
143
|
export { default as Responsiveness } from './Responsiveness';
|
|
144
|
-
export { default as SampleApp } from './SampleApp';
|
|
145
144
|
export { default as Save } from './Save';
|
|
146
145
|
export { default as Screenshare } from './Screenshare';
|
|
147
146
|
export { default as SecurityShield } from './SecurityShield';
|
package/src/index.ts
CHANGED
|
@@ -117,3 +117,6 @@ export { default as List } from './Components/List/List';
|
|
|
117
117
|
|
|
118
118
|
export type { ListItemProps } from './Components/List/ListItem';
|
|
119
119
|
export { default as ListItem } from './Components/List/ListItem';
|
|
120
|
+
|
|
121
|
+
export type { CheckboxProps } from './Components/Checkbox/Checkbox';
|
|
122
|
+
export { default as Checkbox } from './Components/Checkbox/Checkbox';
|
package/src/old.ts
CHANGED
|
@@ -43,9 +43,6 @@ export { default as Base } from './Old/Base/Base';
|
|
|
43
43
|
export type { Props as BoundsProps } from './Old/Bounds/Bounds';
|
|
44
44
|
export { default as Bounds } from './Old/Bounds/Bounds';
|
|
45
45
|
|
|
46
|
-
export type { Props as CheckboxProps } from './Old/Checkbox/Checkbox';
|
|
47
|
-
export { default as Checkbox } from './Old/Checkbox/Checkbox';
|
|
48
|
-
|
|
49
46
|
export type { Props as DatePickerProps } from './Old/DatePicker/DatePicker';
|
|
50
47
|
export { default as DatePicker } from './Old/DatePicker/DatePicker';
|
|
51
48
|
|
package/src/theme.ts
CHANGED
|
@@ -2,6 +2,7 @@ import Avatar from './Components/Avatar/Avatar.theme';
|
|
|
2
2
|
import Badge from './Components/Badge/Badge.theme';
|
|
3
3
|
import Button from './Components/Button/Button.theme';
|
|
4
4
|
import Card from './Components/Card/Card.theme';
|
|
5
|
+
import Checkbox from './Components/Checkbox/Checkbox.theme';
|
|
5
6
|
import ColorButton from './Components/ColorButton/ColorButton.theme';
|
|
6
7
|
import Dialog from './Components/Dialog/Dialog.theme';
|
|
7
8
|
import Divider from './Components/Divider/Divider.theme';
|
|
@@ -65,6 +66,7 @@ const theme = {
|
|
|
65
66
|
Badge,
|
|
66
67
|
Button,
|
|
67
68
|
Card,
|
|
69
|
+
Checkbox,
|
|
68
70
|
ColorButton,
|
|
69
71
|
Divider,
|
|
70
72
|
EmptyState,
|