@bitrise/bitkit 13.1.1-alpha.3 → 13.2.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/Button/Button.theme.ts +137 -116
- package/src/Components/Button/Button.tsx +12 -9
- package/src/Components/CodeBlock/CodeBlock.tsx +1 -1
- package/src/Components/ColorButton/ColorButton.theme.ts +0 -1
- package/src/Components/ColorButton/ColorButton.tsx +2 -2
- package/src/Components/DatePicker/DatePickerFooter.tsx +3 -3
- package/src/Components/DatePicker/DatePickerHeader.tsx +2 -2
- package/src/Components/DatePicker/DatePickerMonth.tsx +1 -1
- package/src/Components/Filter/Filter.theme.ts +7 -8
- package/src/Components/Filter/Filter.tsx +1 -1
- package/src/Components/Filter/FilterAdd/FilterAdd.tsx +1 -1
- package/src/Components/Filter/FilterForm/FilterForm.tsx +3 -3
- package/src/Components/Filter/FilterItem/FilterItem.tsx +1 -1
- package/src/Components/Filter/FilterSearch/FilterSearch.tsx +1 -1
- package/src/Components/Form/FileInput/FileInput.tsx +1 -1
- package/src/Components/IconButton/IconButton.tsx +5 -6
- package/src/Components/Icons/16x16/Siren.tsx +1 -1
- package/src/Components/Note/Note.tsx +1 -1
- package/src/Components/OverflowMenu/OverflowMenu.tsx +1 -1
- package/src/Components/Table/TableIconButton.tsx +1 -1
package/package.json
CHANGED
|
@@ -1,129 +1,150 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
6
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
57
|
+
_hover: {
|
|
58
|
+
bgGradient: 'linear(to-b, purple.30, purple.10)',
|
|
59
|
+
...disabledStates.primary,
|
|
16
60
|
},
|
|
17
|
-
'
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
94
|
-
|
|
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
|
-
|
|
99
|
-
borderColor:
|
|
100
|
-
|
|
101
|
+
bgGradient: 'linear(to-b, red.90, red.90)',
|
|
102
|
+
borderColor: 'red.70',
|
|
103
|
+
...disabledStates.secondary,
|
|
101
104
|
},
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
borderColor:
|
|
105
|
-
|
|
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
|
-
|
|
109
|
-
borderColor,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
-
|
|
126
|
-
variants,
|
|
127
|
-
});
|
|
148
|
+
};
|
|
128
149
|
|
|
129
|
-
export default
|
|
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?:
|
|
10
|
-
size?: '
|
|
11
|
-
variant?: 'primary' | 'secondary' | '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 = '
|
|
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
|
|
23
|
+
variant: isDanger ? `${variant}--danger` : variant,
|
|
24
24
|
...rest,
|
|
25
25
|
};
|
|
26
|
-
const iconSize = size === '
|
|
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.
|
|
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: '
|
|
42
|
+
size: 'medium',
|
|
40
43
|
variant: 'primary',
|
|
41
44
|
} as ButtonProps;
|
|
42
45
|
|
|
@@ -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: '
|
|
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="
|
|
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="
|
|
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="
|
|
71
|
+
<Button onClick={onClose} size="small" variant="secondary">
|
|
72
72
|
Cancel
|
|
73
73
|
</Button>
|
|
74
74
|
|
|
75
|
-
<Button onClick={onApply} size="
|
|
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="
|
|
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="
|
|
42
|
+
size="small"
|
|
43
43
|
variant="tertiary"
|
|
44
44
|
visibility={controls === 'left' ? 'hidden' : undefined}
|
|
45
45
|
/>
|
|
@@ -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
|
-
...
|
|
121
|
-
_active:
|
|
122
|
-
_hover:
|
|
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
|
-
...
|
|
144
|
-
_active:
|
|
145
|
-
_hover:
|
|
142
|
+
...disabledStates.tertiary,
|
|
143
|
+
_active: disabledStates.tertiary,
|
|
144
|
+
_hover: disabledStates.tertiary,
|
|
146
145
|
},
|
|
147
146
|
_hover: {
|
|
148
147
|
background: 'neutral.93',
|
|
@@ -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="
|
|
173
|
+
<Button marginInlineEnd="auto" onClick={onClearClick} size="small" variant="tertiary">
|
|
174
174
|
Clear
|
|
175
175
|
</Button>
|
|
176
176
|
)}
|
|
177
|
-
<Button onClick={onCancelClick} size="
|
|
177
|
+
<Button onClick={onCancelClick} size="small" type="reset" variant="secondary">
|
|
178
178
|
Cancel
|
|
179
179
|
</Button>
|
|
180
|
-
<Button isDisabled={isDisabled} size="
|
|
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="
|
|
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="
|
|
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="
|
|
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?: '
|
|
12
|
+
size?: 'small' | 'medium';
|
|
14
13
|
tooltipCloseDelay?: number;
|
|
15
14
|
tooltipProps?: Omit<TooltipProps, 'children'>;
|
|
16
|
-
variant?: 'primary' | 'secondary' | '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 === '
|
|
38
|
+
icon: <Icon name={iconName} size={iconSize || (size === 'small' ? '16' : '24')} />,
|
|
40
39
|
isDisabled,
|
|
41
40
|
size,
|
|
42
|
-
variant: isDanger ?
|
|
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: '
|
|
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
|
|
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="
|
|
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 = '
|
|
15
|
+
const OverflowMenu = ({ buttonSize = 'small', children, triggerLabel, withPortal }: OverflowMenuProps) => {
|
|
16
16
|
const Wrapper = withPortal ? Portal : Fragment;
|
|
17
17
|
return (
|
|
18
18
|
<Menu isLazy>
|