@bitrise/bitkit 12.18.0-alpha-drawer.2 → 12.18.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/CloseButton/CloseButton.tsx +4 -1
- package/src/Components/Dialog/Dialog.theme.ts +0 -4
- package/src/Components/Dialog/Dialog.tsx +1 -1
- package/src/Components/Drawer/Drawer.theme.ts +1 -1
- package/src/Components/Drawer/Drawer.tsx +4 -1
- package/src/Components/Form/Radio/RadioGroup.tsx +3 -17
- package/src/Components/Notification/Notification.tsx +1 -3
- package/src/Components/Ribbon/Ribbon.tsx +1 -6
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
CloseButton as ChakraCloseButton,
|
|
4
4
|
CloseButtonProps as ChakraCloseButtonProps,
|
|
5
5
|
} from '@chakra-ui/react';
|
|
6
|
+
import Icon from '../Icon/Icon';
|
|
6
7
|
import CloseButtonTheme from './CloseButton.theme';
|
|
7
8
|
|
|
8
9
|
type ThemeArguments = Parameters<(typeof CloseButtonTheme)['baseStyle']>[0];
|
|
@@ -12,7 +13,9 @@ export interface CloseButtonProps extends ChakraCloseButtonProps {
|
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
const CloseButton = forwardRef<CloseButtonProps, 'button'>((props, ref) => (
|
|
15
|
-
<ChakraCloseButton ref={ref} {...CloseButtonTheme.defaultProps} {...props}
|
|
16
|
+
<ChakraCloseButton ref={ref} {...CloseButtonTheme.defaultProps} {...props}>
|
|
17
|
+
<Icon name="CloseSmall" />
|
|
18
|
+
</ChakraCloseButton>
|
|
16
19
|
));
|
|
17
20
|
|
|
18
21
|
export default CloseButton;
|
|
@@ -59,7 +59,7 @@ const Dialog: ComponentWithAs<'section', DialogProps> = ({
|
|
|
59
59
|
{title}
|
|
60
60
|
</Text>
|
|
61
61
|
</ModalHeader>
|
|
62
|
-
<ModalCloseButton isDisabled={!isClosable}>
|
|
62
|
+
<ModalCloseButton isDisabled={!isClosable} size="large">
|
|
63
63
|
<Icon name="CloseSmall" />
|
|
64
64
|
</ModalCloseButton>
|
|
65
65
|
</>
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DrawerCloseButton,
|
|
11
11
|
DrawerContentProps,
|
|
12
12
|
} from '@chakra-ui/react';
|
|
13
|
+
import Icon from '../Icon/Icon';
|
|
13
14
|
|
|
14
15
|
export interface DrawerProps
|
|
15
16
|
extends Pick<ChakraDrawerProps, 'finalFocusRef' | 'initialFocusRef' | 'isOpen' | 'onClose'> {
|
|
@@ -25,7 +26,9 @@ const Drawer = (props: DrawerProps) => {
|
|
|
25
26
|
<ChakraDrawer {...drawerProps}>
|
|
26
27
|
<DrawerOverlay />
|
|
27
28
|
<DrawerContent>
|
|
28
|
-
<DrawerCloseButton
|
|
29
|
+
<DrawerCloseButton size="small">
|
|
30
|
+
<Icon name="CloseSmall" />
|
|
31
|
+
</DrawerCloseButton>
|
|
29
32
|
<DrawerHeader as="h3">{title}</DrawerHeader>
|
|
30
33
|
<DrawerBody>{children}</DrawerBody>
|
|
31
34
|
{footer && <DrawerFooter>{footer}</DrawerFooter>}
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import { RadioGroup as ChakraRadioGroup, RadioGroupProps
|
|
2
|
-
import Box, { BoxProps } from '../../Box/Box';
|
|
1
|
+
import { RadioGroup as ChakraRadioGroup, RadioGroupProps } from '@chakra-ui/react';
|
|
3
2
|
|
|
4
|
-
export type RadioGroupProps
|
|
3
|
+
export type { RadioGroupProps };
|
|
5
4
|
|
|
6
5
|
/**
|
|
7
6
|
* RadioGroup component to help manage Radio components and conveniently pass a few shared style props to each.
|
|
8
7
|
* Composes Box.
|
|
9
8
|
*/
|
|
10
9
|
const RadioGroup = (props: RadioGroupProps) => {
|
|
11
|
-
|
|
12
|
-
const groupProps = {
|
|
13
|
-
defaultValue,
|
|
14
|
-
isDisabled,
|
|
15
|
-
isFocusable,
|
|
16
|
-
isNative,
|
|
17
|
-
onChange,
|
|
18
|
-
value,
|
|
19
|
-
};
|
|
20
|
-
return (
|
|
21
|
-
<ChakraRadioGroup {...groupProps}>
|
|
22
|
-
<Box {...boxProps}>{children}</Box>
|
|
23
|
-
</ChakraRadioGroup>
|
|
24
|
-
);
|
|
10
|
+
return <ChakraRadioGroup {...props} />;
|
|
25
11
|
};
|
|
26
12
|
|
|
27
13
|
export default RadioGroup;
|
|
@@ -87,9 +87,7 @@ const Notification = forwardRef<NotificationProps, 'div'>((props, ref) => {
|
|
|
87
87
|
marginTop={marginTop}
|
|
88
88
|
colorScheme={colorScheme}
|
|
89
89
|
onClick={onClose}
|
|
90
|
-
|
|
91
|
-
<Icon name="CloseSmall" />
|
|
92
|
-
</CloseButton>
|
|
90
|
+
/>
|
|
93
91
|
)}
|
|
94
92
|
</ActionContext.Provider>
|
|
95
93
|
</ChakraAlert>
|
|
@@ -4,7 +4,6 @@ import { Alert as ChakraAlert, AlertProps, forwardRef } from '@chakra-ui/react';
|
|
|
4
4
|
import { ColorScheme } from '../../Foundations/Colors/Colors';
|
|
5
5
|
import CloseButton from '../CloseButton/CloseButton';
|
|
6
6
|
import ColorButton, { ColorButtonProps } from '../ColorButton/ColorButton';
|
|
7
|
-
import Icon from '../Icon/Icon';
|
|
8
7
|
import Box from '../Box/Box';
|
|
9
8
|
|
|
10
9
|
export type ActionProps = {
|
|
@@ -66,11 +65,7 @@ const Ribbon = forwardRef<RibbonProps, 'div'>((props, ref) => {
|
|
|
66
65
|
{children}
|
|
67
66
|
{actionButton}
|
|
68
67
|
</Box>
|
|
69
|
-
{onClose &&
|
|
70
|
-
<CloseButton flexShrink={0} colorScheme={colorScheme} marginStart="auto" onClick={onClose}>
|
|
71
|
-
<Icon name="CloseSmall" />
|
|
72
|
-
</CloseButton>
|
|
73
|
-
)}
|
|
68
|
+
{onClose && <CloseButton flexShrink={0} colorScheme={colorScheme} marginStart="auto" onClick={onClose} />}
|
|
74
69
|
</ActionContext.Provider>
|
|
75
70
|
</ChakraAlert>
|
|
76
71
|
);
|