@bitrise/bitkit 12.117.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.
Files changed (52) hide show
  1. package/package.json +16 -16
  2. package/src/Components/Button/Button.theme.ts +91 -141
  3. package/src/Components/Button/Button.tsx +7 -11
  4. package/src/Components/CodeBlock/CodeBlock.tsx +1 -1
  5. package/src/Components/DatePicker/DatePickerFooter.tsx +3 -3
  6. package/src/Components/DatePicker/DatePickerHeader.tsx +2 -2
  7. package/src/Components/DatePicker/DatePickerMonth.tsx +1 -1
  8. package/src/Components/Filter/Filter.theme.ts +8 -7
  9. package/src/Components/Filter/Filter.tsx +1 -1
  10. package/src/Components/Filter/FilterAdd/FilterAdd.tsx +1 -1
  11. package/src/Components/Filter/FilterForm/FilterForm.tsx +3 -3
  12. package/src/Components/Filter/FilterItem/FilterItem.tsx +1 -1
  13. package/src/Components/Filter/FilterSearch/FilterSearch.tsx +1 -1
  14. package/src/Components/Form/FileInput/FileInput.tsx +1 -1
  15. package/src/Components/IconButton/IconButton.tsx +6 -5
  16. package/src/Components/Icons/16x16/Android.tsx +1 -3
  17. package/src/Components/Icons/16x16/AppStore.tsx +14 -0
  18. package/src/Components/Icons/16x16/AppStoreColor.tsx +26 -0
  19. package/src/Components/Icons/16x16/Apple.tsx +1 -3
  20. package/src/Components/Icons/16x16/BitbucketBlue.tsx +7 -7
  21. package/src/Components/Icons/16x16/BitbucketNeutral.tsx +33 -0
  22. package/src/Components/Icons/16x16/BitbucketPlain.tsx +1 -1
  23. package/src/Components/Icons/16x16/BitbucketShadedWhite.tsx +10 -14
  24. package/src/Components/Icons/16x16/Doc.tsx +4 -1
  25. package/src/Components/Icons/16x16/GitlabColor.tsx +8 -15
  26. package/src/Components/Icons/16x16/GitlabPlain.tsx +1 -3
  27. package/src/Components/Icons/16x16/GitlabShadedWhite.tsx +1 -38
  28. package/src/Components/Icons/16x16/Go.tsx +6 -10
  29. package/src/Components/Icons/16x16/GooglePlay.tsx +21 -0
  30. package/src/Components/Icons/16x16/GooglePlayColor.tsx +24 -0
  31. package/src/Components/Icons/16x16/XTwitter.tsx +12 -0
  32. package/src/Components/Icons/16x16/index.ts +8 -2
  33. package/src/Components/Icons/24x24/Android.tsx +1 -3
  34. package/src/Components/Icons/24x24/AppStore.tsx +14 -0
  35. package/src/Components/Icons/24x24/AppStoreColor.tsx +26 -0
  36. package/src/Components/Icons/24x24/Apple.tsx +1 -3
  37. package/src/Components/Icons/24x24/BitbucketBlue.tsx +7 -7
  38. package/src/Components/Icons/24x24/BitbucketNeutral.tsx +33 -0
  39. package/src/Components/Icons/24x24/BitbucketPlain.tsx +1 -1
  40. package/src/Components/Icons/24x24/BitbucketShadedWhite.tsx +10 -32
  41. package/src/Components/Icons/24x24/Doc.tsx +4 -1
  42. package/src/Components/Icons/24x24/GitlabColor.tsx +8 -15
  43. package/src/Components/Icons/24x24/GitlabPlain.tsx +1 -3
  44. package/src/Components/Icons/24x24/GitlabShadedWhite.tsx +1 -31
  45. package/src/Components/Icons/24x24/Go.tsx +6 -10
  46. package/src/Components/Icons/24x24/GooglePlay.tsx +24 -0
  47. package/src/Components/Icons/24x24/GooglePlayColor.tsx +24 -0
  48. package/src/Components/Icons/24x24/XTwitter.tsx +12 -0
  49. package/src/Components/Icons/24x24/index.ts +8 -2
  50. package/src/Components/Note/Note.tsx +1 -1
  51. package/src/Components/OverflowMenu/OverflowMenu.tsx +1 -1
  52. 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.117.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.10.1",
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.15",
62
- "@storybook/addon-essentials": "^7.6.15",
63
- "@storybook/addon-interactions": "^7.6.15",
64
- "@storybook/addon-links": "^7.6.15",
65
- "@storybook/addons": "^7.6.15",
66
- "@storybook/blocks": "^7.6.15",
67
- "@storybook/react": "^7.6.15",
68
- "@storybook/react-webpack5": "^7.6.15",
69
- "@storybook/theming": "^7.6.15",
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.55",
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.8.0",
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.6.15",
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.0.5",
97
- "storybook": "^7.6.15",
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
- 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
- },
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 ButtonTheme = {
25
- baseStyle: {
26
- _disabled: {
27
- cursor: 'not-allowed',
28
- },
29
- _hover: {
30
- _disabled: {
31
- bg: 'initial',
32
- },
33
- },
34
- border: '0.0625rem solid',
35
- borderRadius: '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,
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
- background: 'neutral.95',
123
- borderColor: 'neutral.95',
124
- ...disabledStates.tertiary,
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
- background: 'red.90',
134
- borderColor: 'red.90',
135
- ...disabledStates.tertiary,
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
- _hover: {
138
- background: 'red.93',
139
- borderColor: 'red.93',
140
- ...disabledStates.tertiary,
73
+ _disabled: {
74
+ backgroundColor: `button/${variant}/bg-disabled`,
75
+ borderColor: disabledBorderColor,
76
+ color: `button/${variant}/fg-disabled`,
77
+ cursor: 'not-allowed',
141
78
  },
142
- background: 'transparent',
143
- borderColor: 'transparent',
144
- color: 'red.50',
145
- ...disabledStates.tertiary,
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 ButtonTheme;
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?: 'small' | 'medium';
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 = 'medium', variant, ...rest } = props;
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 ? `${variant}--danger` : variant,
23
+ variant: isDanger ? `danger-${variant}` : variant,
24
24
  ...rest,
25
25
  };
26
- const iconSize = size === 'medium' ? '24' : '16';
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: 'medium',
38
+ size: 'lg',
43
39
  variant: 'primary',
44
40
  } as ButtonProps;
45
41
 
@@ -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="small"
27
+ size="sm"
28
28
  sx={style.copyIcon}
29
29
  variant="secondary"
30
30
  />
@@ -38,7 +38,7 @@ const DatePickerFooter = ({
38
38
  gridColumn="1"
39
39
  gridRow={styleGrid('2', '1')}
40
40
  onClick={() => onClear()}
41
- size="small"
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="small" variant="secondary">
71
+ <Button onClick={onClose} size="sm" variant="secondary">
72
72
  Cancel
73
73
  </Button>
74
74
 
75
- <Button onClick={onApply} size="small">
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="small"
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="small"
42
+ size="sm"
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="small"
62
+ size="sm"
63
63
  variant="tertiary"
64
64
  >
65
65
  {viewDate.monthLong}
@@ -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
- ...disabledStates.tertiary,
120
- _active: disabledStates.tertiary,
121
- _hover: disabledStates.tertiary,
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
- ...disabledStates.tertiary,
143
- _active: disabledStates.tertiary,
144
- _hover: disabledStates.tertiary,
143
+ ...disabledState,
144
+ _active: disabledState,
145
+ _hover: disabledState,
145
146
  },
146
147
  _hover: {
147
148
  background: 'neutral.93',
@@ -163,7 +163,7 @@ const Filter = (props: FilterProps) => {
163
163
  leftIconName="CloseSmall"
164
164
  minWidth="7.5rem"
165
165
  onClick={onClearFilters}
166
- size="small"
166
+ size="sm"
167
167
  variant="tertiary"
168
168
  >
169
169
  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="small"
60
+ size="sm"
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="small" variant="tertiary">
173
+ <Button marginInlineEnd="auto" onClick={onClearClick} size="sm" variant="tertiary">
174
174
  Clear
175
175
  </Button>
176
176
  )}
177
- <Button onClick={onCancelClick} size="small" type="reset" variant="secondary">
177
+ <Button onClick={onCancelClick} size="sm" type="reset" variant="secondary">
178
178
  Cancel
179
179
  </Button>
180
- <Button isDisabled={isDisabled} size="small" type="submit">
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="small"
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="small" variant="tertiary" />
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="small" variant="secondary">
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?: 'small' | 'medium';
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 === 'small' ? '16' : '24')} />,
39
+ icon: <Icon name={iconName} size={iconSize || (size === 'lg' ? '24' : '16')} />,
39
40
  isDisabled,
40
41
  size,
41
- variant: isDanger ? `${variant}--danger` : variant,
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: 'medium',
60
+ size: 'lg',
60
61
  tooltipCloseDelay: 0,
61
62
  variant: 'primary',
62
63
  } as IconButtonProps;
@@ -3,10 +3,8 @@ import { forwardRef, Icon, IconProps } from '@chakra-ui/react';
3
3
  const Android = forwardRef<IconProps, 'svg'>((props, ref) => (
4
4
  <Icon ref={ref} viewBox="0 0 16 16" {...props}>
5
5
  <path
6
- clipRule="evenodd"
7
- d="M6.533 3.333c.467-.2.934-.267 1.467-.267.467 0 .867.067 1.267.2L10.333 2.2a.645.645 0 0 1 .934 0 .644.644 0 0 1 0 .933l-.8.8A3.979 3.979 0 0 1 12 7.062H4c0-1.199.533-2.265 1.4-2.998l-.933-.932a.644.644 0 0 1 0-.933.645.645 0 0 1 .933 0l1.133 1.133Zm-1.2 7.729h-.666c-.4 0-.667-.267-.667-.667V7.73h8v2.665c0 .4-.267.667-.667.667h-.666v1.998a.668.668 0 0 1-.667.667c-.4 0-.667-.267-.667-.667v-1.998H6.667v1.998a.668.668 0 0 1-.667.667c-.4 0-.667-.267-.667-.667v-1.998ZM14 7.73v2.732a.668.668 0 0 1-.667.666c-.4 0-.666-.266-.666-.666V7.73c0-.333.266-.666.666-.666S14 7.33 14 7.73ZM2.667 7.064c.4 0 .666.266.666.666v2.665a.668.668 0 0 1-.666.667c-.4 0-.667-.267-.667-.667V7.73c0-.4.267-.666.667-.666ZM10 6.397c.4 0 .667-.266.667-.666A.668.668 0 0 0 10 5.065c-.4 0-.667.333-.667.666 0 .4.267.667.667.667Zm-4 0c.4 0 .667-.266.667-.666A.668.668 0 0 0 6 5.065c-.4 0-.667.333-.667.666 0 .4.267.667.667.667Z"
6
+ d="M11.2218 9.60336C11.1065 9.60339 10.9938 9.5709 10.8979 9.51C10.802 9.44911 10.7272 9.36255 10.6831 9.26127C10.6389 9.15999 10.6274 9.04853 10.6498 8.941C10.6723 8.83347 10.7278 8.73468 10.8093 8.65715C10.8909 8.57961 10.9947 8.52679 11.1078 8.50539C11.2209 8.48398 11.3381 8.49493 11.4447 8.53687C11.5512 8.57881 11.6423 8.64984 11.7064 8.74099C11.7705 8.83213 11.8047 8.9393 11.8047 9.04893C11.8045 9.19589 11.7431 9.33679 11.6338 9.44072C11.5245 9.54465 11.3764 9.60314 11.2218 9.60336ZM4.77821 9.60336C4.66291 9.60339 4.55018 9.5709 4.45429 9.51C4.3584 9.44911 4.28366 9.36255 4.23951 9.26127C4.19537 9.15999 4.1838 9.04853 4.20627 8.941C4.22875 8.83347 4.28425 8.73468 4.36577 8.65715C4.44729 8.57961 4.55117 8.52679 4.66426 8.50539C4.77735 8.48398 4.89457 8.49493 5.00111 8.53687C5.10765 8.57881 5.19872 8.64984 5.2628 8.74099C5.32688 8.83213 5.3611 8.9393 5.36112 9.04893C5.36097 9.1959 5.29952 9.33681 5.19024 9.44075C5.08096 9.54469 4.93279 9.60317 4.77821 9.60336ZM11.4308 6.26456L12.5959 4.34599C12.6118 4.31979 12.6222 4.29085 12.6263 4.26085C12.6305 4.23084 12.6284 4.20034 12.6202 4.1711C12.612 4.14185 12.5978 4.11444 12.5784 4.09041C12.5591 4.06639 12.5349 4.04622 12.5073 4.03107C12.4798 4.01592 12.4493 4.00608 12.4178 4.00211C12.3862 3.99814 12.3541 4.00013 12.3234 4.00794C12.2926 4.01576 12.2638 4.02926 12.2385 4.04768C12.2133 4.06609 12.1921 4.08905 12.1761 4.11526L10.9964 6.05806C10.0942 5.66658 9.081 5.44859 7.99989 5.44859C6.91879 5.44859 5.90568 5.66689 5.00353 6.05806L3.82388 4.11526C3.80797 4.08905 3.78678 4.06607 3.76153 4.04764C3.73628 4.02922 3.70746 4.0157 3.67671 4.00786C3.64597 4.00002 3.6139 3.99802 3.58234 4.00197C3.55078 4.00591 3.52034 4.01573 3.49277 4.03086C3.4652 4.04599 3.44104 4.06614 3.42166 4.09015C3.40228 4.11416 3.38806 4.14156 3.37982 4.17079C3.37157 4.20003 3.36947 4.23052 3.37362 4.26052C3.37777 4.29053 3.3881 4.31947 3.40401 4.34568L4.56916 6.26456C2.56854 7.29916 1.20016 9.22483 1 11.5H15C14.7996 9.22483 13.4313 7.29916 11.4308 6.26456Z"
8
7
  fill="currentColor"
9
- fillRule="evenodd"
10
8
  />
11
9
  </Icon>
12
10
  ));
@@ -0,0 +1,14 @@
1
+ import { forwardRef, Icon, IconProps } from '@chakra-ui/react';
2
+
3
+ const AppStore = forwardRef<IconProps, 'svg'>((props, ref) => (
4
+ <Icon ref={ref} viewBox="0 0 16 16" {...props}>
5
+ <path
6
+ clipRule="evenodd"
7
+ d="M3.82765 1H12.1706C13.7332 1 14.9983 2.26509 15 3.82765V12.1706C15 13.7332 13.7332 14.9983 12.1724 14.9983H3.82765C2.26509 14.9983 1 13.7332 1 12.1724V3.82765C1 2.26509 2.26509 1 3.82765 1ZM8.22309 3.72618L7.93963 4.21612L7.66141 3.72443C7.48294 3.41822 7.09623 3.31499 6.79002 3.48996C6.48381 3.66844 6.38057 4.05514 6.55555 4.36136L7.20472 5.48821L5.12598 9.09101H3.50218C3.14873 9.09101 2.86526 9.37448 2.86526 9.72793C2.86526 10.0814 3.14873 10.3649 3.50218 10.3649H9.29396C9.57217 9.84342 9.21347 9.09101 8.57305 9.09101H6.59755L9.32895 4.3631C9.50393 4.05689 9.4007 3.66669 9.09448 3.49171C8.78827 3.31674 8.39807 3.41997 8.22309 3.72618ZM4.87051 12.0831L5.48294 11.021C5.15223 10.6221 4.73403 10.4996 4.21959 10.6588L3.76465 11.4462C3.58967 11.7524 3.69291 12.1426 3.99912 12.3176C4.30533 12.4926 4.69553 12.3894 4.87051 12.0831ZM12.4138 9.09451H10.7568C10.6299 8.87475 10.5078 8.66335 10.3906 8.46035C9.73694 7.32827 9.23387 6.45699 8.87926 5.84867C8.50306 6.16188 8.12161 7.08576 8.65529 8.00615C8.88671 8.40765 9.17018 8.89841 9.50539 9.47875C9.92545 10.206 10.4268 11.0739 11.0087 12.0831C11.1872 12.3894 11.5739 12.4926 11.8801 12.3176C12.1863 12.1391 12.2896 11.7524 12.1146 11.4462L11.4934 10.3684H12.4138C12.7673 10.3684 13.0507 10.0849 13.0507 9.73143C13.0507 9.37798 12.7673 9.09451 12.4138 9.09451Z"
8
+ fill="currentColor"
9
+ fillRule="evenodd"
10
+ />
11
+ </Icon>
12
+ ));
13
+
14
+ export default AppStore;
@@ -0,0 +1,26 @@
1
+ import { forwardRef, Icon, IconProps } from '@chakra-ui/react';
2
+ import { useIconId } from '../utils';
3
+
4
+ const AppStoreColor = forwardRef<IconProps, 'svg'>((props, ref) => {
5
+ const iconPrefix = useIconId();
6
+ return (
7
+ <Icon ref={ref} viewBox="0 0 16 16" {...props}>
8
+ <path
9
+ d="M12.1706 1H3.82765C2.26509 1 1 2.26509 1 3.82765V12.1724C1 13.7332 2.26509 14.9983 3.82765 14.9983H12.1724C13.7332 14.9983 15 13.7332 15 12.1706V3.82765C14.9983 2.26509 13.7332 1 12.1706 1Z"
10
+ fill={`url(#${iconPrefix}__a)`}
11
+ />
12
+ <path
13
+ d="M7.9405 4.2161L8.224 3.72616C8.399 3.41995 8.78925 3.31671 9.0955 3.49169C9.40175 3.66667 9.505 4.05687 9.33 4.36308L6.59825 9.09099H8.574C9.2145 9.09099 9.57325 9.8434 9.295 10.3648H3.5025C3.149 10.3648 2.8655 10.0814 2.8655 9.72791C2.8655 9.37445 3.149 9.09099 3.5025 9.09099H5.1265L7.2055 5.48819L6.55625 4.36133C6.38125 4.05512 6.4845 3.66842 6.79075 3.48994C7.097 3.31496 7.48375 3.4182 7.66225 3.72441L7.9405 4.2161ZM5.4835 11.021L4.871 12.0831C4.696 12.3893 4.30575 12.4926 3.9995 12.3176C3.69325 12.1426 3.59 11.7524 3.765 11.4462L4.22 10.6588C4.7345 10.4996 5.15275 10.622 5.4835 11.021ZM10.758 9.09449H12.4152C12.7687 9.09449 13.0522 9.37795 13.0522 9.73141C13.0522 10.0849 12.7687 10.3683 12.4152 10.3683H11.4947L12.116 11.4462C12.291 11.7524 12.1877 12.1391 11.8815 12.3176C11.5752 12.4926 11.1885 12.3893 11.01 12.0831C9.9635 10.2686 9.17775 8.91076 8.65625 8.00612C8.1225 7.08574 8.504 6.16186 8.88025 5.84864C9.2985 6.56605 9.92325 7.64917 10.758 9.09449Z"
14
+ fill="#fff"
15
+ />
16
+ <defs>
17
+ <linearGradient gradientUnits="userSpaceOnUse" id={`${iconPrefix}__a`} x1={8} x2={8} y1={1} y2={14.9983}>
18
+ <stop stopColor="#18BFFB" />
19
+ <stop offset={1} stopColor="#2072F3" />
20
+ </linearGradient>
21
+ </defs>
22
+ </Icon>
23
+ );
24
+ });
25
+
26
+ export default AppStoreColor;