@bitrise/bitkit 13.1.0 → 13.1.1-alpha.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/Button/Button.theme.ts +112 -140
- package/src/Components/Button/Button.tsx +9 -12
- package/src/Components/CodeBlock/CodeBlock.tsx +1 -1
- package/src/Components/ColorButton/ColorButton.theme.ts +1 -0
- 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 +8 -7
- 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 +6 -5
- 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,150 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
};
|
|
1
|
+
import { defineStyle, defineStyleConfig, SystemStyleInterpolation } from '@chakra-ui/styled-system';
|
|
2
|
+
import { rem } from '../../utils/utils';
|
|
3
|
+
import { ButtonProps } from './Button';
|
|
23
4
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
_disabled: {
|
|
27
|
-
cursor: 'not-allowed',
|
|
28
|
-
},
|
|
29
|
-
_hover: {
|
|
30
|
-
_disabled: {
|
|
31
|
-
bg: 'initial',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
border: '0.0625rem solid',
|
|
5
|
+
const baseStyle = defineStyle((props) => {
|
|
6
|
+
const style: any = {
|
|
35
7
|
borderRadius: '4',
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
paddingX: '12',
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
variants: {
|
|
52
|
-
primary: {
|
|
53
|
-
_active: {
|
|
54
|
-
bgGradient: 'linear(to-b, purple.10, purple.10)',
|
|
55
|
-
...disabledStates.primary,
|
|
56
|
-
},
|
|
57
|
-
_hover: {
|
|
58
|
-
bgGradient: 'linear(to-b, purple.30, purple.10)',
|
|
59
|
-
...disabledStates.primary,
|
|
60
|
-
},
|
|
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,
|
|
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,
|
|
83
|
-
},
|
|
84
|
-
secondary: {
|
|
85
|
-
_active: {
|
|
86
|
-
bgGradient: 'linear(to-b, neutral.90, neutral.90)',
|
|
87
|
-
borderColor: 'neutral.80',
|
|
88
|
-
...disabledStates.secondary,
|
|
89
|
-
},
|
|
90
|
-
_hover: {
|
|
91
|
-
bgGradient: 'linear(to-b, neutral.93, neutral.93)',
|
|
92
|
-
...disabledStates.secondary,
|
|
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': {
|
|
100
|
-
_active: {
|
|
101
|
-
bgGradient: 'linear(to-b, red.90, red.90)',
|
|
102
|
-
borderColor: 'red.70',
|
|
103
|
-
...disabledStates.secondary,
|
|
104
|
-
},
|
|
105
|
-
_hover: {
|
|
106
|
-
bgGradient: 'linear(to-b, red.93, red.93)',
|
|
107
|
-
borderColor: 'red.70',
|
|
108
|
-
...disabledStates.secondary,
|
|
109
|
-
},
|
|
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,
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
if (props.variant.includes('primary')) {
|
|
11
|
+
style['.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:first-of-type)'] = {
|
|
12
|
+
_before: {
|
|
13
|
+
content: `''`,
|
|
14
|
+
pos: 'absolute',
|
|
15
|
+
left: 0,
|
|
16
|
+
top: `-${rem(1)}`,
|
|
17
|
+
bottom: `-${rem(1)}`,
|
|
18
|
+
width: rem(1),
|
|
19
|
+
backgroundColor: 'background/primary',
|
|
120
20
|
},
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
if (props.variant.includes('secondary')) {
|
|
24
|
+
style['.chakra-button__group[data-attached][data-orientation=horizontal] > &:not(:first-of-type)'] = {
|
|
25
|
+
marginInlineStart: `-${rem(1)}`,
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return style;
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const sizes = {
|
|
33
|
+
lg: defineStyle((props) => {
|
|
34
|
+
return {
|
|
35
|
+
paddingBlock: rem(11),
|
|
36
|
+
paddingInlineEnd: props.rightIcon ? rem(11) : rem(15),
|
|
37
|
+
paddingInlineStart: props.leftIcon ? rem(11) : rem(15),
|
|
38
|
+
textStyle: 'comp/button/lg',
|
|
39
|
+
minWidth: 48,
|
|
40
|
+
height: 48,
|
|
41
|
+
};
|
|
42
|
+
}),
|
|
43
|
+
md: defineStyle((props) => {
|
|
44
|
+
return {
|
|
45
|
+
paddingBlock: rem(9),
|
|
46
|
+
paddingInlineEnd: props.rightIcon ? rem(11) : rem(15),
|
|
47
|
+
paddingInlineStart: props.leftIcon ? rem(11) : rem(15),
|
|
48
|
+
textStyle: 'comp/button/md',
|
|
49
|
+
minWidth: 40,
|
|
50
|
+
height: 40,
|
|
51
|
+
};
|
|
52
|
+
}),
|
|
53
|
+
sm: defineStyle((props) => {
|
|
54
|
+
return {
|
|
55
|
+
paddingBlock: rem(5),
|
|
56
|
+
paddingInlineEnd: props.rightIcon ? rem(7) : rem(11),
|
|
57
|
+
paddingInlineStart: props.leftIcon ? rem(7) : rem(11),
|
|
58
|
+
textStyle: 'comp/button/sm',
|
|
59
|
+
minWidth: 32,
|
|
60
|
+
height: 32,
|
|
61
|
+
};
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
const variants = (
|
|
66
|
+
[
|
|
67
|
+
'primary',
|
|
68
|
+
'secondary',
|
|
69
|
+
'tertiary',
|
|
70
|
+
'danger-primary',
|
|
71
|
+
'danger-secondary',
|
|
72
|
+
'danger-tertiary',
|
|
73
|
+
] as ButtonProps['variant'][]
|
|
74
|
+
).reduce(
|
|
75
|
+
(obj, variant) => {
|
|
76
|
+
let borderColor = variant?.includes('secondary') ? `button/${variant}/border` : `button/${variant}/bg`;
|
|
77
|
+
let disabledBorderColor = variant?.includes('secondary')
|
|
78
|
+
? `button/${variant}/border-disabled`
|
|
79
|
+
: `button/${variant}/bg-disabled`;
|
|
80
|
+
if (variant?.includes('tertiary')) {
|
|
81
|
+
borderColor = 'transparent';
|
|
82
|
+
disabledBorderColor = 'transparent';
|
|
83
|
+
}
|
|
84
|
+
obj[variant as NonNullable<ButtonProps['variant']>] = defineStyle({
|
|
121
85
|
_hover: {
|
|
122
|
-
|
|
123
|
-
borderColor: '
|
|
124
|
-
|
|
86
|
+
backgroundColor: `button/${variant}/bg-hover`,
|
|
87
|
+
borderColor: variant?.includes('secondary') ? `button/${variant}/border-hover` : `button/${variant}/bg-hover`,
|
|
88
|
+
color: `button/${variant}/fg-hover`,
|
|
125
89
|
},
|
|
126
|
-
background: 'transparent',
|
|
127
|
-
borderColor: 'transparent',
|
|
128
|
-
color: 'purple.50',
|
|
129
|
-
...disabledStates.tertiary,
|
|
130
|
-
},
|
|
131
|
-
'tertiary--danger': {
|
|
132
90
|
_active: {
|
|
133
|
-
|
|
134
|
-
borderColor: '
|
|
135
|
-
|
|
91
|
+
backgroundColor: `button/${variant}/bg-active`,
|
|
92
|
+
borderColor: variant?.includes('secondary') ? `button/${variant}/border-active` : `button/${variant}/bg-active`,
|
|
93
|
+
color: `button/${variant}/fg-active`,
|
|
136
94
|
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
borderColor:
|
|
140
|
-
|
|
95
|
+
_disabled: {
|
|
96
|
+
backgroundColor: `button/${variant}/bg-disabled`,
|
|
97
|
+
borderColor: disabledBorderColor,
|
|
98
|
+
color: `button/${variant}/fg-disabled`,
|
|
99
|
+
cursor: 'not-allowed',
|
|
141
100
|
},
|
|
142
|
-
|
|
143
|
-
borderColor
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
101
|
+
backgroundColor: `button/${variant}/bg`,
|
|
102
|
+
borderColor,
|
|
103
|
+
borderStyle: 'solid',
|
|
104
|
+
borderWidth: rem(1),
|
|
105
|
+
color: `button/${variant}/fg`,
|
|
106
|
+
});
|
|
107
|
+
return obj;
|
|
147
108
|
},
|
|
148
|
-
}
|
|
109
|
+
{} as Record<NonNullable<ButtonProps['variant']>, SystemStyleInterpolation>,
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const buttonTheme = defineStyleConfig({
|
|
113
|
+
baseStyle,
|
|
114
|
+
defaultProps: {
|
|
115
|
+
size: 'lg',
|
|
116
|
+
variant: 'primary',
|
|
117
|
+
},
|
|
118
|
+
sizes,
|
|
119
|
+
variants,
|
|
120
|
+
});
|
|
149
121
|
|
|
150
|
-
export default
|
|
122
|
+
export default buttonTheme;
|
|
@@ -3,43 +3,40 @@ import Icon, { TypeIconName } from '../Icon/Icon';
|
|
|
3
3
|
|
|
4
4
|
export interface ButtonProps extends ChakraButtonProps {
|
|
5
5
|
as?: 'a' | 'button';
|
|
6
|
+
disabled?: never;
|
|
6
7
|
isDanger?: boolean;
|
|
7
8
|
leftIconName?: TypeIconName;
|
|
8
|
-
rightIconName?:
|
|
9
|
-
size?: '
|
|
10
|
-
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
11
|
-
disabled?: never;
|
|
9
|
+
rightIconName?: 'ArrowRight' | 'ChevronDown' | 'ChevronUp' | 'OpenInBrowser';
|
|
10
|
+
size?: 'sm' | 'md' | 'lg';
|
|
11
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger-primary' | 'danger-secondary' | 'danger-tertiary';
|
|
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 = 'lg', 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?.includes('danger') ? `danger-${variant}` : variant,
|
|
24
24
|
...rest,
|
|
25
25
|
};
|
|
26
|
-
const iconSize = size === '
|
|
26
|
+
const iconSize = size === 'lg' ? '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
|
-
|
|
34
|
-
properties.iconSpacing = size === 'medium' ? '0.625rem' : '0.375rem';
|
|
35
|
-
}
|
|
36
|
-
|
|
33
|
+
properties.iconSpacing = properties.children ? '8' : '4';
|
|
37
34
|
return <ChakraButton {...properties} ref={ref} />;
|
|
38
35
|
});
|
|
39
36
|
|
|
40
37
|
Button.defaultProps = {
|
|
41
38
|
as: 'button',
|
|
42
|
-
size: '
|
|
39
|
+
size: 'lg',
|
|
43
40
|
variant: 'primary',
|
|
44
41
|
} as ButtonProps;
|
|
45
42
|
|
|
@@ -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: 'sm' }),
|
|
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="sm" />;
|
|
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="sm"
|
|
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="sm" variant="secondary">
|
|
72
72
|
Cancel
|
|
73
73
|
</Button>
|
|
74
74
|
|
|
75
|
-
<Button onClick={onApply} size="
|
|
75
|
+
<Button onClick={onApply} size="sm">
|
|
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="sm"
|
|
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="sm"
|
|
43
43
|
variant="tertiary"
|
|
44
44
|
visibility={controls === 'left' ? 'hidden' : undefined}
|
|
45
45
|
/>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createMultiStyleConfigHelpers, SystemStyleObject } from '@chakra-ui/styled-system';
|
|
2
2
|
import { rem } from '../../utils/utils';
|
|
3
|
-
import { disabledStates } from '../Button/Button.theme';
|
|
4
3
|
|
|
5
4
|
export const parts = [
|
|
6
5
|
'container',
|
|
@@ -23,6 +22,8 @@ export type FilterStyle = Record<(typeof parts)[number], SystemStyleObject>;
|
|
|
23
22
|
|
|
24
23
|
const { defineMultiStyleConfig } = createMultiStyleConfigHelpers(parts);
|
|
25
24
|
|
|
25
|
+
const disabledState = { background: 'transparent', borderColor: 'transparent', color: 'neutral.70' };
|
|
26
|
+
|
|
26
27
|
const FilterTheme = defineMultiStyleConfig({
|
|
27
28
|
baseStyle: {
|
|
28
29
|
container: {
|
|
@@ -116,9 +117,9 @@ const FilterTheme = defineMultiStyleConfig({
|
|
|
116
117
|
},
|
|
117
118
|
_disabled: {
|
|
118
119
|
cursor: 'not-allowed',
|
|
119
|
-
...
|
|
120
|
-
_active:
|
|
121
|
-
_hover:
|
|
120
|
+
...disabledState,
|
|
121
|
+
_active: disabledState,
|
|
122
|
+
_hover: disabledState,
|
|
122
123
|
},
|
|
123
124
|
_hover: {
|
|
124
125
|
background: 'neutral.93',
|
|
@@ -139,9 +140,9 @@ const FilterTheme = defineMultiStyleConfig({
|
|
|
139
140
|
},
|
|
140
141
|
_disabled: {
|
|
141
142
|
cursor: 'not-allowed',
|
|
142
|
-
...
|
|
143
|
-
_active:
|
|
144
|
-
_hover:
|
|
143
|
+
...disabledState,
|
|
144
|
+
_active: disabledState,
|
|
145
|
+
_hover: disabledState,
|
|
145
146
|
},
|
|
146
147
|
_hover: {
|
|
147
148
|
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="sm" variant="tertiary">
|
|
174
174
|
Clear
|
|
175
175
|
</Button>
|
|
176
176
|
)}
|
|
177
|
-
<Button onClick={onCancelClick} size="
|
|
177
|
+
<Button onClick={onCancelClick} size="sm" type="reset" variant="secondary">
|
|
178
178
|
Cancel
|
|
179
179
|
</Button>
|
|
180
|
-
<Button isDisabled={isDisabled} size="
|
|
180
|
+
<Button isDisabled={isDisabled} size="sm" 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="sm"
|
|
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="sm" 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="sm" variant="secondary">
|
|
108
108
|
Remove
|
|
109
109
|
</Button>
|
|
110
110
|
</>
|
|
@@ -4,15 +4,16 @@ import Tooltip, { TooltipProps } from '../Tooltip/Tooltip';
|
|
|
4
4
|
|
|
5
5
|
export interface IconButtonProps extends ChakraIconButtonProps {
|
|
6
6
|
as?: 'a' | 'button';
|
|
7
|
+
disabled?: never;
|
|
7
8
|
iconName: TypeIconName;
|
|
8
9
|
isDanger?: boolean;
|
|
9
10
|
iconSize?: IconProps['size'];
|
|
10
11
|
isTooltipDisabled?: boolean;
|
|
11
12
|
label?: string;
|
|
12
|
-
size?: '
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
14
|
tooltipCloseDelay?: number;
|
|
14
15
|
tooltipProps?: Omit<TooltipProps, 'children'>;
|
|
15
|
-
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
16
|
+
variant?: 'primary' | 'secondary' | 'tertiary' | 'danger-primary' | 'danger-secondary' | 'danger-tertiary';
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -35,10 +36,10 @@ const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
|
|
|
35
36
|
} = props;
|
|
36
37
|
const properties: ChakraIconButtonProps = {
|
|
37
38
|
as: isDisabled ? 'button' : as,
|
|
38
|
-
icon: <Icon name={iconName} size={iconSize || (size === '
|
|
39
|
+
icon: <Icon name={iconName} size={iconSize || (size === 'lg' ? '24' : '16')} />,
|
|
39
40
|
isDisabled,
|
|
40
41
|
size,
|
|
41
|
-
variant: isDanger ?
|
|
42
|
+
variant: isDanger ? `danger-${variant}` : variant,
|
|
42
43
|
...rest,
|
|
43
44
|
};
|
|
44
45
|
return (
|
|
@@ -56,7 +57,7 @@ const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
|
|
|
56
57
|
|
|
57
58
|
IconButton.defaultProps = {
|
|
58
59
|
as: 'button',
|
|
59
|
-
size: '
|
|
60
|
+
size: 'lg',
|
|
60
61
|
tooltipCloseDelay: 0,
|
|
61
62
|
variant: 'primary',
|
|
62
63
|
} as IconButtonProps;
|
|
@@ -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="sm" 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 = 'sm', children, triggerLabel, withPortal }: OverflowMenuProps) => {
|
|
16
16
|
const Wrapper = withPortal ? Portal : Fragment;
|
|
17
17
|
return (
|
|
18
18
|
<Menu isLazy>
|