@bitrise/bitkit 13.1.1-alpha.3 → 13.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.1.1-alpha.3",
4
+ "version": "13.3.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -1,129 +1,150 @@
1
- import { defineStyle, defineStyleConfig, SystemStyleInterpolation } from '@chakra-ui/styled-system';
2
- import { rem } from '../../utils/utils';
3
- import { ButtonProps } from './Button';
1
+ export const disabledStates = {
2
+ primary: {
3
+ _disabled: {
4
+ bgGradient: 'linear(to-b, neutral.80, neutral.70)',
5
+ borderColor: 'neutral.70',
6
+ },
7
+ },
8
+ secondary: {
9
+ _disabled: {
10
+ bgGradient: 'linear(to-b, neutral.100, neutral.93)',
11
+ borderColor: 'neutral.90',
12
+ color: 'neutral.70',
13
+ },
14
+ },
15
+ tertiary: {
16
+ _disabled: {
17
+ background: 'transparent',
18
+ borderColor: 'transparent',
19
+ color: 'neutral.70',
20
+ },
21
+ },
22
+ };
4
23
 
5
- const baseStyle = defineStyle((props) => {
6
- const style: any = {
24
+ const ButtonTheme = {
25
+ baseStyle: {
26
+ _disabled: {
27
+ cursor: 'not-allowed',
28
+ },
29
+ _hover: {
30
+ _disabled: {
31
+ bg: 'initial',
32
+ },
33
+ },
34
+ border: '0.0625rem solid',
7
35
  borderRadius: '4',
8
- '.chakra-button__group[data-attached][data-orientation=horizontal] > &': {
9
- borderRadius: 0,
10
- ':first-child': {
11
- borderLeftRadius: '4',
36
+ },
37
+ sizes: {
38
+ medium: {
39
+ fontSize: '3',
40
+ height: '48',
41
+ minWidth: '48',
42
+ paddingX: '16',
43
+ },
44
+ small: {
45
+ fontSize: '2',
46
+ height: '32',
47
+ minWidth: '32',
48
+ paddingX: '12',
49
+ },
50
+ },
51
+ variants: {
52
+ primary: {
53
+ _active: {
54
+ bgGradient: 'linear(to-b, purple.10, purple.10)',
55
+ ...disabledStates.primary,
12
56
  },
13
- // Selects the last .chakra-button item even is there an another element after that (eg menu)
14
- '&:not(:has(~ .chakra-button))': {
15
- borderRightRadius: '4',
57
+ _hover: {
58
+ bgGradient: 'linear(to-b, purple.30, purple.10)',
59
+ ...disabledStates.primary,
16
60
  },
17
- '&:not(:first-child)': {
18
- ...(props.variant.includes('primary')
19
- ? {
20
- _before: {
21
- content: `''`,
22
- pos: 'absolute',
23
- left: `-${rem(1)}`,
24
- top: `-${rem(1)}`,
25
- bottom: `-${rem(1)}`,
26
- width: rem(1),
27
- backgroundColor: 'background/primary',
28
- },
29
- }
30
- : {}),
31
- ...(props.variant.includes('secondary') ? { marginInlineStart: `-${rem(1)}` } : {}),
61
+ bgGradient: 'linear(to-b, purple.40, purple.20)',
62
+ borderColor: 'purple.40',
63
+ color: 'neutral.95',
64
+ fontWeight: 'bold',
65
+ ...disabledStates.primary,
66
+ },
67
+ 'primary--danger': {
68
+ _active: {
69
+ bgGradient: 'linear(to-b, red.20, red.20)',
70
+ borderColor: 'red.20',
71
+ ...disabledStates.primary,
32
72
  },
73
+ _hover: {
74
+ bgGradient: 'linear(to-b, red.40, red.20)',
75
+ borderColor: 'red.40',
76
+ ...disabledStates.primary,
77
+ },
78
+ bgGradient: 'linear(to-b, red.50, red.30)',
79
+ borderColor: 'red.50',
80
+ color: 'neutral.95',
81
+ fontWeight: 'bold',
82
+ ...disabledStates.primary,
33
83
  },
34
- };
35
-
36
- return style;
37
- });
38
-
39
- const sizes = {
40
- lg: defineStyle((props) => {
41
- return {
42
- paddingBlock: rem(11),
43
- paddingInlineEnd: props.rightIcon ? rem(11) : rem(15),
44
- paddingInlineStart: props.leftIcon ? rem(11) : rem(15),
45
- textStyle: 'comp/button/lg',
46
- minWidth: 48,
47
- height: 48,
48
- };
49
- }),
50
- md: defineStyle((props) => {
51
- return {
52
- paddingBlock: rem(9),
53
- paddingInlineEnd: props.rightIcon ? rem(11) : rem(15),
54
- paddingInlineStart: props.leftIcon ? rem(11) : rem(15),
55
- textStyle: 'comp/button/md',
56
- minWidth: 40,
57
- height: 40,
58
- };
59
- }),
60
- sm: defineStyle((props) => {
61
- return {
62
- paddingBlock: rem(5),
63
- paddingInlineEnd: props.rightIcon ? rem(7) : rem(11),
64
- paddingInlineStart: props.leftIcon ? rem(7) : rem(11),
65
- textStyle: 'comp/button/sm',
66
- minWidth: 32,
67
- height: 32,
68
- };
69
- }),
70
- };
71
-
72
- const variants = (
73
- [
74
- 'primary',
75
- 'secondary',
76
- 'tertiary',
77
- 'danger-primary',
78
- 'danger-secondary',
79
- 'danger-tertiary',
80
- ] as ButtonProps['variant'][]
81
- ).reduce(
82
- (obj, variant) => {
83
- let borderColor = variant?.includes('secondary') ? `button/${variant}/border` : `button/${variant}/bg`;
84
- let disabledBorderColor = variant?.includes('secondary')
85
- ? `button/${variant}/border-disabled`
86
- : `button/${variant}/bg-disabled`;
87
- if (variant?.includes('tertiary')) {
88
- borderColor = 'transparent';
89
- disabledBorderColor = 'transparent';
90
- }
91
- obj[variant as NonNullable<ButtonProps['variant']>] = defineStyle({
84
+ secondary: {
85
+ _active: {
86
+ bgGradient: 'linear(to-b, neutral.90, neutral.90)',
87
+ borderColor: 'neutral.80',
88
+ ...disabledStates.secondary,
89
+ },
92
90
  _hover: {
93
- backgroundColor: `button/${variant}/bg-hover`,
94
- borderColor: variant?.includes('secondary') ? `button/${variant}/border-hover` : `button/${variant}/bg-hover`,
95
- color: `button/${variant}/fg-hover`,
91
+ bgGradient: 'linear(to-b, neutral.93, neutral.93)',
92
+ ...disabledStates.secondary,
96
93
  },
94
+ bgGradient: 'linear(to-b, neutral.100, neutral.93)',
95
+ borderColor: 'neutral.90',
96
+ color: 'purple.10',
97
+ ...disabledStates.secondary,
98
+ },
99
+ 'secondary--danger': {
97
100
  _active: {
98
- backgroundColor: `button/${variant}/bg-active`,
99
- borderColor: variant?.includes('secondary') ? `button/${variant}/border-active` : `button/${variant}/bg-active`,
100
- color: `button/${variant}/fg-active`,
101
+ bgGradient: 'linear(to-b, red.90, red.90)',
102
+ borderColor: 'red.70',
103
+ ...disabledStates.secondary,
101
104
  },
102
- _disabled: {
103
- backgroundColor: `button/${variant}/bg-disabled`,
104
- borderColor: disabledBorderColor,
105
- color: `button/${variant}/fg-disabled`,
106
- cursor: 'not-allowed',
105
+ _hover: {
106
+ bgGradient: 'linear(to-b, red.93, red.93)',
107
+ borderColor: 'red.70',
108
+ ...disabledStates.secondary,
107
109
  },
108
- backgroundColor: `button/${variant}/bg`,
109
- borderColor,
110
- borderStyle: 'solid',
111
- borderWidth: rem(1),
112
- color: `button/${variant}/fg`,
113
- });
114
- return obj;
115
- },
116
- {} as Record<NonNullable<ButtonProps['variant']>, SystemStyleInterpolation>,
117
- );
118
-
119
- const buttonTheme = defineStyleConfig({
120
- baseStyle,
121
- defaultProps: {
122
- size: 'lg',
123
- variant: 'primary',
110
+ bgGradient: 'linear(to-b, neutral.100, neutral.93)',
111
+ borderColor: 'neutral.90',
112
+ color: 'red.50',
113
+ ...disabledStates.secondary,
114
+ },
115
+ tertiary: {
116
+ _active: {
117
+ background: 'neutral.90',
118
+ borderColor: 'neutral.90',
119
+ ...disabledStates.tertiary,
120
+ },
121
+ _hover: {
122
+ background: 'neutral.95',
123
+ borderColor: 'neutral.95',
124
+ ...disabledStates.tertiary,
125
+ },
126
+ background: 'transparent',
127
+ borderColor: 'transparent',
128
+ color: 'purple.50',
129
+ ...disabledStates.tertiary,
130
+ },
131
+ 'tertiary--danger': {
132
+ _active: {
133
+ background: 'red.90',
134
+ borderColor: 'red.90',
135
+ ...disabledStates.tertiary,
136
+ },
137
+ _hover: {
138
+ background: 'red.93',
139
+ borderColor: 'red.93',
140
+ ...disabledStates.tertiary,
141
+ },
142
+ background: 'transparent',
143
+ borderColor: 'transparent',
144
+ color: 'red.50',
145
+ ...disabledStates.tertiary,
146
+ },
124
147
  },
125
- sizes,
126
- variants,
127
- });
148
+ };
128
149
 
129
- export default buttonTheme;
150
+ export default ButtonTheme;
@@ -3,40 +3,43 @@ import Icon, { TypeIconName } from '../Icon/Icon';
3
3
 
4
4
  export interface ButtonProps extends ChakraButtonProps {
5
5
  as?: 'a' | 'button';
6
- disabled?: never;
7
6
  isDanger?: boolean;
8
7
  leftIconName?: TypeIconName;
9
- rightIconName?: 'ArrowRight' | 'ChevronDown' | 'ChevronUp' | 'OpenInBrowser';
10
- size?: 'sm' | 'md' | 'lg';
11
- variant?: 'primary' | 'secondary' | 'tertiary' | 'danger-primary' | 'danger-secondary' | 'danger-tertiary';
8
+ rightIconName?: TypeIconName;
9
+ size?: 'small' | 'medium';
10
+ variant?: 'primary' | 'secondary' | 'tertiary';
11
+ disabled?: never;
12
12
  }
13
13
 
14
14
  /**
15
15
  * The Button component is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
16
16
  */
17
17
  const Button = forwardRef<ButtonProps, 'button'>((props, ref) => {
18
- const { as, isDanger, isDisabled, leftIconName, rightIconName, size = 'lg', variant, ...rest } = props;
18
+ const { as, isDanger, isDisabled, leftIconName, rightIconName, size = 'medium', variant, ...rest } = props;
19
19
  const properties: ChakraButtonProps = {
20
20
  as: isDisabled ? 'button' : as,
21
21
  isDisabled,
22
22
  size,
23
- variant: isDanger && !variant?.includes('danger') ? `danger-${variant}` : variant,
23
+ variant: isDanger ? `${variant}--danger` : variant,
24
24
  ...rest,
25
25
  };
26
- const iconSize = size === 'lg' ? '24' : '16';
26
+ const iconSize = size === 'medium' ? '24' : '16';
27
27
  if (leftIconName) {
28
28
  properties.leftIcon = <Icon name={leftIconName} size={iconSize} />;
29
29
  }
30
30
  if (rightIconName) {
31
31
  properties.rightIcon = <Icon name={rightIconName} size={iconSize} />;
32
32
  }
33
- properties.iconSpacing = properties.children ? '8' : '4';
33
+ if ((properties.leftIcon || properties.rightIcon) && !properties.iconSpacing) {
34
+ properties.iconSpacing = size === 'medium' ? '0.625rem' : '0.375rem';
35
+ }
36
+
34
37
  return <ChakraButton {...properties} ref={ref} />;
35
38
  });
36
39
 
37
40
  Button.defaultProps = {
38
41
  as: 'button',
39
- size: 'lg',
42
+ size: 'medium',
40
43
  variant: 'primary',
41
44
  } as ButtonProps;
42
45
 
@@ -24,7 +24,7 @@ const CodeBlock = ({ children, isCopiable, ...props }: CodeBlockProps) => {
24
24
  aria-label="Copy to clipboard"
25
25
  iconName="Duplicate"
26
26
  onClick={onCopy}
27
- size="sm"
27
+ size="small"
28
28
  sx={style.copyIcon}
29
29
  variant="secondary"
30
30
  />
@@ -73,7 +73,6 @@ const ColorButtonTheme = {
73
73
  backgroundColor: 'transparent',
74
74
  display: 'inline-flex',
75
75
  justifyContent: 'center',
76
- borderColor: 'inherit',
77
76
  ...schemeColors[colorScheme || 'blue'],
78
77
  };
79
78
  },
@@ -12,7 +12,7 @@ export interface ColorButtonProps extends ChakraButtonProps {
12
12
  const ColorButton = forwardRef<ColorButtonProps, 'button'>((props, ref) => {
13
13
  const { as, colorScheme, isDisabled, isLoading, ...rest } = props;
14
14
  const styles = {
15
- ...useStyleConfig('Button', { size: 'sm' }),
15
+ ...useStyleConfig('Button', { size: 'small' }),
16
16
  ...useStyleConfig('ColorButton', { colorScheme }),
17
17
  };
18
18
 
@@ -26,7 +26,7 @@ const ColorButton = forwardRef<ColorButtonProps, 'button'>((props, ref) => {
26
26
  if (isDisabled) {
27
27
  properties.as = 'button';
28
28
  }
29
- return <ChakraButton {...properties} ref={ref} size="sm" />;
29
+ return <ChakraButton {...properties} ref={ref} size="small" />;
30
30
  });
31
31
 
32
32
  ColorButton.defaultProps = {
@@ -38,7 +38,7 @@ const DatePickerFooter = ({
38
38
  gridColumn="1"
39
39
  gridRow={styleGrid('2', '1')}
40
40
  onClick={() => onClear()}
41
- size="sm"
41
+ size="small"
42
42
  variant="tertiary"
43
43
  width="fit-content"
44
44
  >
@@ -68,11 +68,11 @@ const DatePickerFooter = ({
68
68
  )}
69
69
  </Text>
70
70
  <ButtonGroup gridColumn={styleGrid('2 / 4', '3')} gridRow={styleGrid('2', '1')} justifyContent="end">
71
- <Button onClick={onClose} size="sm" variant="secondary">
71
+ <Button onClick={onClose} size="small" variant="secondary">
72
72
  Cancel
73
73
  </Button>
74
74
 
75
- <Button onClick={onApply} size="sm">
75
+ <Button onClick={onApply} size="small">
76
76
  Apply
77
77
  </Button>
78
78
  </ButtonGroup>
@@ -23,7 +23,7 @@ export const DatePickerHeaderPrevious = ({ label }: { label: string }) => {
23
23
  iconName="ChevronLeft"
24
24
  isTooltipDisabled
25
25
  onClick={onPrevious}
26
- size="sm"
26
+ size="small"
27
27
  variant="tertiary"
28
28
  visibility={controls === 'right' ? 'hidden' : undefined}
29
29
  />
@@ -39,7 +39,7 @@ export const DatePickerHeaderNext = ({ label }: { label: string }) => {
39
39
  iconName="ChevronRight"
40
40
  isTooltipDisabled
41
41
  onClick={onNext}
42
- size="sm"
42
+ size="small"
43
43
  variant="tertiary"
44
44
  visibility={controls === 'left' ? 'hidden' : undefined}
45
45
  />
@@ -59,7 +59,7 @@ const DatePickerMonth = ({ controls, onMonthClick, onViewDateChange, viewDate }:
59
59
  flexShrink={0}
60
60
  onClick={onMonthClick}
61
61
  rightIconName="ChevronDown"
62
- size="sm"
62
+ size="small"
63
63
  variant="tertiary"
64
64
  >
65
65
  {viewDate.monthLong}
@@ -7,6 +7,7 @@ import {
7
7
  ModalContent,
8
8
  ModalHeader,
9
9
  ModalOverlay,
10
+ ModalProps,
10
11
  useBreakpointValue,
11
12
  usePrefersReducedMotion,
12
13
  } from '@chakra-ui/react';
@@ -15,7 +16,9 @@ import Icon from '../Icon/Icon';
15
16
  import Text from '../Text/Text';
16
17
  import Tooltip from '../Tooltip/Tooltip';
17
18
 
18
- export interface DialogProps extends Omit<HTMLChakraProps<'section'>, 'scrollBehavior'> {
19
+ export interface DialogProps
20
+ extends Omit<HTMLChakraProps<'section'>, 'scrollBehavior'>,
21
+ Pick<ModalProps, 'returnFocusOnClose'> {
19
22
  isClosable?: boolean;
20
23
  isOpen: boolean;
21
24
  onClose(): void;
@@ -35,6 +38,7 @@ const Dialog: ComponentWithAs<'section', DialogProps> = ({
35
38
  isOpen,
36
39
  onClose,
37
40
  onCloseComplete,
41
+ returnFocusOnClose = true,
38
42
  scrollBehavior,
39
43
  size,
40
44
  title,
@@ -60,6 +64,7 @@ const Dialog: ComponentWithAs<'section', DialogProps> = ({
60
64
  motionPreset={prefersReducedMotion ? 'none' : 'scale'}
61
65
  onClose={isClosable ? onClose : () => {}}
62
66
  onCloseComplete={onCloseComplete}
67
+ returnFocusOnClose={returnFocusOnClose}
63
68
  scrollBehavior={scrollBehavior}
64
69
  size={dialogSize}
65
70
  trapFocus={trapFocus}
@@ -1,5 +1,6 @@
1
1
  import { createMultiStyleConfigHelpers, SystemStyleObject } from '@chakra-ui/styled-system';
2
2
  import { rem } from '../../utils/utils';
3
+ import { disabledStates } from '../Button/Button.theme';
3
4
 
4
5
  export const parts = [
5
6
  'container',
@@ -22,8 +23,6 @@ export type FilterStyle = Record<(typeof parts)[number], SystemStyleObject>;
22
23
 
23
24
  const { defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts);
24
25
 
25
- const disabledState = { background: 'transparent', borderColor: 'transparent', color: 'neutral.70' };
26
-
27
26
  const FilterTheme = defineMultiStyleConfig({
28
27
  baseStyle: {
29
28
  container: {
@@ -117,9 +116,9 @@ const FilterTheme = defineMultiStyleConfig({
117
116
  },
118
117
  _disabled: {
119
118
  cursor: 'not-allowed',
120
- ...disabledState,
121
- _active: disabledState,
122
- _hover: disabledState,
119
+ ...disabledStates.tertiary,
120
+ _active: disabledStates.tertiary,
121
+ _hover: disabledStates.tertiary,
123
122
  },
124
123
  _hover: {
125
124
  background: 'neutral.93',
@@ -140,9 +139,9 @@ const FilterTheme = defineMultiStyleConfig({
140
139
  },
141
140
  _disabled: {
142
141
  cursor: 'not-allowed',
143
- ...disabledState,
144
- _active: disabledState,
145
- _hover: disabledState,
142
+ ...disabledStates.tertiary,
143
+ _active: disabledStates.tertiary,
144
+ _hover: disabledStates.tertiary,
146
145
  },
147
146
  _hover: {
148
147
  background: 'neutral.93',
@@ -174,7 +174,7 @@ const Filter = (props: FilterProps) => {
174
174
  leftIconName="CloseSmall"
175
175
  minWidth="7.5rem"
176
176
  onClick={onClearFilters}
177
- size="sm"
177
+ size="small"
178
178
  variant="tertiary"
179
179
  >
180
180
  Clear filters
@@ -57,7 +57,7 @@ const FilterAdd = (props: FilterAddProps) => {
57
57
  isLoading={isLoading}
58
58
  leftIconName="PlusOpen"
59
59
  position={isOpen ? 'relative' : undefined}
60
- size="sm"
60
+ size="small"
61
61
  variant="tertiary"
62
62
  zIndex={isOpen ? 'dialog' : undefined}
63
63
  >
@@ -170,14 +170,14 @@ const FilterForm = (props: FilterFormProps) => {
170
170
  )}
171
171
  <ButtonGroup spacing="12" sx={filterStyle.formButtonGroup}>
172
172
  {isEditMode && (
173
- <Button marginInlineEnd="auto" onClick={onClearClick} size="sm" variant="tertiary">
173
+ <Button marginInlineEnd="auto" onClick={onClearClick} size="small" variant="tertiary">
174
174
  Clear
175
175
  </Button>
176
176
  )}
177
- <Button onClick={onCancelClick} size="sm" type="reset" variant="secondary">
177
+ <Button onClick={onCancelClick} size="small" type="reset" variant="secondary">
178
178
  Cancel
179
179
  </Button>
180
- <Button isDisabled={isDisabled} size="sm" type="submit">
180
+ <Button isDisabled={isDisabled} size="small" type="submit">
181
181
  {(selected.length === 0 || selected[0] === '') && isEditMode ? 'Remove' : 'Apply'}
182
182
  </Button>
183
183
  </ButtonGroup>
@@ -79,7 +79,7 @@ const FilterItem = (props: FilterItemProps) => {
79
79
  iconName="CloseSmall"
80
80
  isDisabled={isLoading}
81
81
  onClick={() => onFilterClear(category)}
82
- size="sm"
82
+ size="small"
83
83
  sx={filterStyle.tagClear}
84
84
  tooltipProps={{ shouldWrapChildren: false }}
85
85
  variant="tertiary"
@@ -56,7 +56,7 @@ const FilterSearch = (props: FilterSearchProps) => {
56
56
  <Input {...inputProps} />
57
57
  {!!searchValue && (
58
58
  <InputRightElement>
59
- <IconButton aria-label="Clear" iconName="CloseSmall" onClick={onClearClick} size="sm" variant="tertiary" />
59
+ <IconButton aria-label="Clear" iconName="CloseSmall" onClick={onClearClick} size="small" variant="tertiary" />
60
60
  </InputRightElement>
61
61
  )}
62
62
  </InputGroup>
@@ -104,7 +104,7 @@ const FileInput = forwardRef<FileInputProps, 'div'>((props, ref) => {
104
104
  </Text>
105
105
  <Text as="span">{selectedFileNames[0]}</Text>
106
106
  </Box>
107
- <Button flexShrink={0} leftIconName="MinusRemove" onClick={onRemoveClick} size="sm" variant="secondary">
107
+ <Button flexShrink={0} leftIconName="MinusRemove" onClick={onRemoveClick} size="small" variant="secondary">
108
108
  Remove
109
109
  </Button>
110
110
  </>
@@ -4,16 +4,15 @@ import Tooltip, { TooltipProps } from '../Tooltip/Tooltip';
4
4
 
5
5
  export interface IconButtonProps extends ChakraIconButtonProps {
6
6
  as?: 'a' | 'button';
7
- disabled?: never;
8
7
  iconName: TypeIconName;
9
8
  isDanger?: boolean;
10
9
  iconSize?: IconProps['size'];
11
10
  isTooltipDisabled?: boolean;
12
11
  label?: string;
13
- size?: 'sm' | 'md' | 'lg';
12
+ size?: 'small' | 'medium';
14
13
  tooltipCloseDelay?: number;
15
14
  tooltipProps?: Omit<TooltipProps, 'children'>;
16
- variant?: 'primary' | 'secondary' | 'tertiary' | 'danger-primary' | 'danger-secondary' | 'danger-tertiary';
15
+ variant?: 'primary' | 'secondary' | 'tertiary';
17
16
  }
18
17
 
19
18
  /**
@@ -36,10 +35,10 @@ const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
36
35
  } = props;
37
36
  const properties: ChakraIconButtonProps = {
38
37
  as: isDisabled ? 'button' : as,
39
- icon: <Icon name={iconName} size={iconSize || (size === 'lg' ? '24' : '16')} />,
38
+ icon: <Icon name={iconName} size={iconSize || (size === 'small' ? '16' : '24')} />,
40
39
  isDisabled,
41
40
  size,
42
- variant: isDanger ? `danger-${variant}` : variant,
41
+ variant: isDanger ? `${variant}--danger` : variant,
43
42
  ...rest,
44
43
  };
45
44
  return (
@@ -57,7 +56,7 @@ const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
57
56
 
58
57
  IconButton.defaultProps = {
59
58
  as: 'button',
60
- size: 'lg',
59
+ size: 'medium',
61
60
  tooltipCloseDelay: 0,
62
61
  variant: 'primary',
63
62
  } as IconButtonProps;
@@ -1,7 +1,7 @@
1
1
  import { forwardRef, Icon, IconProps } from '@chakra-ui/react';
2
2
 
3
3
  const Siren = forwardRef<IconProps, 'svg'>((props, ref) => (
4
- <Icon ref={ref} viewBox="0 0 24 24" {...props} fill="currentColor">
4
+ <Icon ref={ref} viewBox="0 0 16 16" {...props} fill="currentColor">
5
5
  <path d="M7.25 3.5V1.5H8.75V3.5H7.25Z" fill="currentColor" />
6
6
  <path
7
7
  d="M6.75 10C6.75 9.30964 7.30964 8.75 8 8.75V7.25C6.48122 7.25 5.25 8.48122 5.25 10H6.75Z"
@@ -55,7 +55,7 @@ const Note = ({ children, startingHeight, status }: NoteProps) => {
55
55
  </Box>
56
56
  {!!startingHeight && (
57
57
  <Box __css={buttonContainer}>
58
- <Button leftIconName="ChevronDown" onClick={() => setExpanded(!isExpanded)} size="sm" variant="secondary">
58
+ <Button leftIconName="ChevronDown" onClick={() => setExpanded(!isExpanded)} size="small" variant="secondary">
59
59
  {isExpanded ? 'Show less' : 'Show more'}
60
60
  </Button>
61
61
  </Box>
@@ -12,7 +12,7 @@ export interface OverflowMenuProps extends MenuProps {
12
12
  withPortal?: boolean;
13
13
  }
14
14
 
15
- const OverflowMenu = ({ buttonSize = 'sm', children, triggerLabel, withPortal }: OverflowMenuProps) => {
15
+ const OverflowMenu = ({ buttonSize = 'small', children, triggerLabel, withPortal }: OverflowMenuProps) => {
16
16
  const Wrapper = withPortal ? Portal : Fragment;
17
17
  return (
18
18
  <Menu isLazy>
@@ -17,7 +17,7 @@ const TableIconButton = forwardRef<TableIconButtonProps, 'button'>((props, ref)
17
17
  color={isDanger ? undefined : 'pal.purple.10'}
18
18
  iconSize="24"
19
19
  isDanger={isDanger}
20
- size="sm"
20
+ size="small"
21
21
  variant="tertiary"
22
22
  {...props}
23
23
  />