@bitrise/bitkit 12.118.0 → 12.118.1-alpha.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 +16 -16
- package/src/Components/Button/Button.theme.ts +91 -141
- package/src/Components/Button/Button.tsx +7 -11
- package/src/Components/CodeBlock/CodeBlock.tsx +1 -1
- 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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit",
|
|
3
3
|
"description": "Bitrise React component library",
|
|
4
|
-
"version": "12.118.0",
|
|
4
|
+
"version": "12.118.1-alpha.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"luxon": "^3.4.4",
|
|
43
43
|
"react": "^18.2.0",
|
|
44
44
|
"react-dom": "^18.2.0",
|
|
45
|
-
"react-focus-lock": "^2.
|
|
45
|
+
"react-focus-lock": "^2.11.1",
|
|
46
46
|
"react-imask": "^7.4.0",
|
|
47
47
|
"react-markdown": "^9.0.1"
|
|
48
48
|
},
|
|
@@ -58,34 +58,34 @@
|
|
|
58
58
|
"@bitrise/eslint-plugin": "^2.5.0",
|
|
59
59
|
"@chakra-ui/cli": "^2.4.1",
|
|
60
60
|
"@google-cloud/storage": "^7.7.0",
|
|
61
|
-
"@storybook/addon-actions": "^7.6.
|
|
62
|
-
"@storybook/addon-essentials": "^7.6.
|
|
63
|
-
"@storybook/addon-interactions": "^7.6.
|
|
64
|
-
"@storybook/addon-links": "^7.6.
|
|
65
|
-
"@storybook/addons": "^7.6.
|
|
66
|
-
"@storybook/blocks": "^7.6.
|
|
67
|
-
"@storybook/react": "^7.6.
|
|
68
|
-
"@storybook/react-webpack5": "^7.6.
|
|
69
|
-
"@storybook/theming": "^7.6.
|
|
61
|
+
"@storybook/addon-actions": "^7.6.17",
|
|
62
|
+
"@storybook/addon-essentials": "^7.6.17",
|
|
63
|
+
"@storybook/addon-interactions": "^7.6.17",
|
|
64
|
+
"@storybook/addon-links": "^7.6.17",
|
|
65
|
+
"@storybook/addons": "^7.6.17",
|
|
66
|
+
"@storybook/blocks": "^7.6.17",
|
|
67
|
+
"@storybook/react": "^7.6.17",
|
|
68
|
+
"@storybook/react-webpack5": "^7.6.17",
|
|
69
|
+
"@storybook/theming": "^7.6.17",
|
|
70
70
|
"@testing-library/dom": "^9.3.4",
|
|
71
71
|
"@testing-library/jest-dom": "^6.4.2",
|
|
72
72
|
"@testing-library/react": "^14.2.1",
|
|
73
73
|
"@testing-library/user-event": "^14.5.2",
|
|
74
74
|
"@types/jest": "^29.5.12",
|
|
75
75
|
"@types/luxon": "^3.4.2",
|
|
76
|
-
"@types/react": "^18.2.
|
|
76
|
+
"@types/react": "^18.2.57",
|
|
77
77
|
"@types/react-dom": "^18.2.19",
|
|
78
78
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
79
79
|
"@typescript-eslint/parser": "^6.21.0",
|
|
80
80
|
"axios": "^1.6.7",
|
|
81
81
|
"eslint": "^8.56.0",
|
|
82
82
|
"eslint-plugin-import": "^2.29.1",
|
|
83
|
-
"eslint-plugin-jest": "^27.
|
|
83
|
+
"eslint-plugin-jest": "^27.9.0",
|
|
84
84
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
85
85
|
"eslint-plugin-prettier": "^5.1.3",
|
|
86
86
|
"eslint-plugin-react": "^7.33.2",
|
|
87
87
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
88
|
-
"eslint-plugin-storybook": "^0.
|
|
88
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
89
89
|
"eslint-plugin-testing-library": "^6.2.0",
|
|
90
90
|
"glob": "^10.3.10",
|
|
91
91
|
"jest": "^29.7.0",
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"jsdom": "^24.0.0",
|
|
94
94
|
"prettier": "^3.2.5",
|
|
95
95
|
"react-hook-form": "^7.50.1",
|
|
96
|
-
"release-it": "^17.
|
|
97
|
-
"storybook": "^7.6.
|
|
96
|
+
"release-it": "^17.1.1",
|
|
97
|
+
"storybook": "^7.6.17",
|
|
98
98
|
"ts-jest": "^29.1.2",
|
|
99
99
|
"typescript": "^5.3.3"
|
|
100
100
|
},
|
|
@@ -1,150 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
/* eslint-disable sort/object-properties */
|
|
2
|
+
import { defineStyle, defineStyleConfig, SystemStyleInterpolation } from '@chakra-ui/styled-system';
|
|
3
|
+
import { rem } from '../../utils/utils';
|
|
4
|
+
import { ButtonProps } from './Button';
|
|
5
|
+
|
|
6
|
+
const baseStyle = defineStyle({
|
|
7
|
+
borderRadius: '4',
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
const sizes = {
|
|
11
|
+
lg: defineStyle((props) => {
|
|
12
|
+
return {
|
|
13
|
+
paddingBlock: rem(11),
|
|
14
|
+
paddingInlineEnd: props.rightIcon ? rem(11) : rem(15),
|
|
15
|
+
paddingInlineStart: props.leftIcon ? rem(11) : rem(15),
|
|
16
|
+
textStyle: 'comp/button/lg',
|
|
17
|
+
minWidth: 48,
|
|
18
|
+
minHeight: 48,
|
|
19
|
+
};
|
|
20
|
+
}),
|
|
21
|
+
md: defineStyle((props) => {
|
|
22
|
+
return {
|
|
23
|
+
paddingBlock: rem(9),
|
|
24
|
+
paddingInlineEnd: props.rightIcon ? rem(11) : rem(15),
|
|
25
|
+
paddingInlineStart: props.leftIcon ? rem(11) : rem(15),
|
|
26
|
+
textStyle: 'comp/button/md',
|
|
27
|
+
minWidth: 40,
|
|
28
|
+
minHeight: 40,
|
|
29
|
+
};
|
|
30
|
+
}),
|
|
31
|
+
sm: defineStyle((props) => {
|
|
32
|
+
return {
|
|
33
|
+
paddingBlock: rem(5),
|
|
34
|
+
paddingInlineEnd: props.rightIcon ? rem(7) : rem(11),
|
|
35
|
+
paddingInlineStart: props.leftIcon ? rem(7) : rem(11),
|
|
36
|
+
textStyle: 'comp/button/sm',
|
|
37
|
+
minWidth: 32,
|
|
38
|
+
minHeight: 32,
|
|
39
|
+
};
|
|
40
|
+
}),
|
|
22
41
|
};
|
|
23
42
|
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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,
|
|
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,
|
|
120
|
-
},
|
|
43
|
+
const variants = (
|
|
44
|
+
[
|
|
45
|
+
'primary',
|
|
46
|
+
'secondary',
|
|
47
|
+
'tertiary',
|
|
48
|
+
'danger-primary',
|
|
49
|
+
'danger-secondary',
|
|
50
|
+
'danger-tertiary',
|
|
51
|
+
] as ButtonProps['variant'][]
|
|
52
|
+
).reduce(
|
|
53
|
+
(obj, variant) => {
|
|
54
|
+
let borderColor = variant?.includes('secondary') ? `button/${variant}/border` : `button/${variant}/bg`;
|
|
55
|
+
let disabledBorderColor = variant?.includes('secondary')
|
|
56
|
+
? `button/${variant}/border-disabled`
|
|
57
|
+
: `button/${variant}/bg-disabled`;
|
|
58
|
+
if (variant?.includes('tertiary')) {
|
|
59
|
+
borderColor = 'transparent';
|
|
60
|
+
disabledBorderColor = 'transparent';
|
|
61
|
+
}
|
|
62
|
+
obj[variant as NonNullable<ButtonProps['variant']>] = defineStyle({
|
|
121
63
|
_hover: {
|
|
122
|
-
|
|
123
|
-
borderColor: '
|
|
124
|
-
|
|
64
|
+
backgroundColor: `button/${variant}/bg-hover`,
|
|
65
|
+
borderColor: variant?.includes('secondary') ? `button/${variant}/border-hover` : `button/${variant}/bg-hover`,
|
|
66
|
+
color: `button/${variant}/fg-hover`,
|
|
125
67
|
},
|
|
126
|
-
background: 'transparent',
|
|
127
|
-
borderColor: 'transparent',
|
|
128
|
-
color: 'purple.50',
|
|
129
|
-
...disabledStates.tertiary,
|
|
130
|
-
},
|
|
131
|
-
'tertiary--danger': {
|
|
132
68
|
_active: {
|
|
133
|
-
|
|
134
|
-
borderColor: '
|
|
135
|
-
|
|
69
|
+
backgroundColor: `button/${variant}/bg-active`,
|
|
70
|
+
borderColor: variant?.includes('secondary') ? `button/${variant}/border-active` : `button/${variant}/bg-active`,
|
|
71
|
+
color: `button/${variant}/fg-active`,
|
|
136
72
|
},
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
borderColor:
|
|
140
|
-
|
|
73
|
+
_disabled: {
|
|
74
|
+
backgroundColor: `button/${variant}/bg-disabled`,
|
|
75
|
+
borderColor: disabledBorderColor,
|
|
76
|
+
color: `button/${variant}/fg-disabled`,
|
|
77
|
+
cursor: 'not-allowed',
|
|
141
78
|
},
|
|
142
|
-
|
|
143
|
-
borderColor
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
79
|
+
backgroundColor: `button/${variant}/bg`,
|
|
80
|
+
borderColor,
|
|
81
|
+
borderStyle: 'solid',
|
|
82
|
+
borderWidth: rem(1),
|
|
83
|
+
color: `button/${variant}/fg`,
|
|
84
|
+
});
|
|
85
|
+
return obj;
|
|
147
86
|
},
|
|
148
|
-
}
|
|
87
|
+
{} as Record<NonNullable<ButtonProps['variant']>, SystemStyleInterpolation>,
|
|
88
|
+
);
|
|
89
|
+
|
|
90
|
+
const buttonTheme = defineStyleConfig({
|
|
91
|
+
baseStyle,
|
|
92
|
+
defaultProps: {
|
|
93
|
+
size: 'lg',
|
|
94
|
+
variant: 'primary',
|
|
95
|
+
},
|
|
96
|
+
sizes,
|
|
97
|
+
variants,
|
|
98
|
+
});
|
|
149
99
|
|
|
150
|
-
export default
|
|
100
|
+
export default buttonTheme;
|
|
@@ -3,43 +3,39 @@ 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
9
|
rightIconName?: TypeIconName;
|
|
9
|
-
size?: '
|
|
10
|
-
variant?: 'primary' | 'secondary' | 'tertiary';
|
|
11
|
-
disabled?: never;
|
|
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 ? `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
|
-
if ((properties.leftIcon || properties.rightIcon) && !properties.iconSpacing) {
|
|
34
|
-
properties.iconSpacing = size === 'medium' ? '0.625rem' : '0.375rem';
|
|
35
|
-
}
|
|
36
|
-
|
|
37
33
|
return <ChakraButton {...properties} ref={ref} />;
|
|
38
34
|
});
|
|
39
35
|
|
|
40
36
|
Button.defaultProps = {
|
|
41
37
|
as: 'button',
|
|
42
|
-
size: '
|
|
38
|
+
size: 'lg',
|
|
43
39
|
variant: 'primary',
|
|
44
40
|
} as ButtonProps;
|
|
45
41
|
|
|
@@ -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>
|