@bitrise/bitkit 10.5.4 → 10.7.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/ColorButton/ColorButton.stories.tsx +6 -1
- package/src/Components/ColorButton/ColorButton.theme.ts +14 -3
- package/src/Components/Popover/PopoverArrow.tsx +7 -0
- package/src/Foundations/Colors/Colors.ts +1 -1
- package/src/index.ts +3 -0
- package/src/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
2
2
|
import { sortObjectByKey } from '../../utils/storyUtils';
|
|
3
|
+
import Box from '../Box/Box';
|
|
3
4
|
import ColorButton from './ColorButton';
|
|
4
5
|
|
|
5
6
|
export default {
|
|
@@ -13,7 +14,11 @@ export default {
|
|
|
13
14
|
},
|
|
14
15
|
} as ComponentMeta<typeof ColorButton>;
|
|
15
16
|
|
|
16
|
-
const Template: ComponentStory<typeof ColorButton> = (
|
|
17
|
+
const Template: ComponentStory<typeof ColorButton> = ({ colorScheme, ...props }) => (
|
|
18
|
+
<Box padding={16} backgroundColor={colorScheme === 'neutral' ? 'black' : undefined}>
|
|
19
|
+
<ColorButton colorScheme={colorScheme} {...props} />
|
|
20
|
+
</Box>
|
|
21
|
+
);
|
|
17
22
|
|
|
18
23
|
export const WithProps = Template.bind({});
|
|
19
24
|
WithProps.args = sortObjectByKey({
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { ColorScheme } from '../../Foundations/Colors/Colors';
|
|
2
|
+
|
|
3
|
+
const schemeColors: Record<ColorScheme, any> = {
|
|
2
4
|
blue: {
|
|
3
5
|
color: 'blue.40',
|
|
4
6
|
_active: {
|
|
@@ -44,16 +46,25 @@ const schemeColors = {
|
|
|
44
46
|
backgroundColor: 'purple.93',
|
|
45
47
|
},
|
|
46
48
|
},
|
|
49
|
+
neutral: {
|
|
50
|
+
color: 'neutral.100',
|
|
51
|
+
_active: {
|
|
52
|
+
backgroundColor: 'rgba(255, 255, 255, 0.3)',
|
|
53
|
+
},
|
|
54
|
+
_hover: {
|
|
55
|
+
backgroundColor: 'rgba(255, 255, 255, 0.15)',
|
|
56
|
+
},
|
|
57
|
+
},
|
|
47
58
|
};
|
|
48
59
|
|
|
49
60
|
const ColorButtonTheme = {
|
|
50
|
-
baseStyle: ({ colorScheme
|
|
61
|
+
baseStyle: ({ colorScheme }: { colorScheme?: ColorScheme }) => {
|
|
51
62
|
return {
|
|
52
63
|
display: 'inline-flex',
|
|
53
64
|
alignItems: 'center',
|
|
54
65
|
justifyContent: 'center',
|
|
55
66
|
backgroundColor: 'transparent',
|
|
56
|
-
...schemeColors[
|
|
67
|
+
...schemeColors[colorScheme || 'blue'],
|
|
57
68
|
};
|
|
58
69
|
},
|
|
59
70
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PopoverArrowProps as ChakraPopoverArrowProps, PopoverArrow as ChakraPopoverArrow } from '@chakra-ui/react';
|
|
2
|
+
|
|
3
|
+
export type PopoverArrowProps = ChakraPopoverArrowProps;
|
|
4
|
+
|
|
5
|
+
const PopoverArrow = (props: PopoverArrowProps) => <ChakraPopoverArrow {...props} />;
|
|
6
|
+
|
|
7
|
+
export default PopoverArrow;
|
|
@@ -127,6 +127,6 @@ const colors = {
|
|
|
127
127
|
|
|
128
128
|
export type Colors = typeof colors;
|
|
129
129
|
|
|
130
|
-
export type ColorScheme = 'blue' | 'red' | 'green' | 'yellow' | 'purple';
|
|
130
|
+
export type ColorScheme = 'blue' | 'red' | 'green' | 'yellow' | 'purple' | 'neutral';
|
|
131
131
|
|
|
132
132
|
export default colors;
|
package/src/index.ts
CHANGED
|
@@ -106,6 +106,9 @@ export { default as PopoverTrigger } from './Components/Popover/PopoverTrigger';
|
|
|
106
106
|
export type { PopoverContentProps } from './Components/Popover/PopoverContent';
|
|
107
107
|
export { default as PopoverContent } from './Components/Popover/PopoverContent';
|
|
108
108
|
|
|
109
|
+
export type { PopoverArrowProps } from './Components/Popover/PopoverArrow';
|
|
110
|
+
export { default as PopoverArrow } from './Components/Popover/PopoverArrow';
|
|
111
|
+
|
|
109
112
|
export type { AvatarProps } from './Components/Avatar/Avatar';
|
|
110
113
|
export { default as Avatar } from './Components/Avatar/Avatar';
|
|
111
114
|
|