@bitrise/bitkit 13.292.0 → 13.294.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.292.0",
4
+ "version": "13.294.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -16,6 +16,7 @@ const ScrollButton = (props: BoxProps) => {
16
16
  boxShadow="large"
17
17
  h={32}
18
18
  w={32}
19
+ type="button"
19
20
  >
20
21
  <Icon color="icon/tertiary" name="ArrowDown" size="16" />
21
22
  </Box>
@@ -72,11 +73,13 @@ const ScrollableDialogBody = (props: DialogBodyProps) => {
72
73
  alignSelf="center"
73
74
  bottom={8}
74
75
  flexShrink={0}
75
- onClick={() => {
76
+ onClick={(e) => {
76
77
  if (!contentRef.current) {
77
78
  return;
78
79
  }
79
80
 
81
+ (e.currentTarget as HTMLElement).blur();
82
+
80
83
  contentRef.current.scrollTo({
81
84
  top: contentRef.current.scrollHeight,
82
85
  behavior: 'smooth',
@@ -31,6 +31,7 @@ export interface FilterProps extends Omit<BoxProps, 'onChange'> {
31
31
  searchTooltip?: ReactNode;
32
32
  showAdd?: boolean;
33
33
  showFilterIcon?: boolean;
34
+ showClearFilters?: boolean;
34
35
  showSearch?: boolean;
35
36
  state: FilterState;
36
37
  }
@@ -45,6 +46,7 @@ const Filter = (props: FilterProps) => {
45
46
  searchTooltip,
46
47
  showAdd = true,
47
48
  showFilterIcon = true,
49
+ showClearFilters = true,
48
50
  showSearch,
49
51
  state,
50
52
  ...rest
@@ -116,7 +118,7 @@ const Filter = (props: FilterProps) => {
116
118
  filters[value.type || 'tag'][category] = value;
117
119
  });
118
120
 
119
- const showClearFilters = !isEqual(stateToRestore, state);
121
+ const showClearButton = showClearFilters && !isEqual(stateToRestore, state);
120
122
 
121
123
  const contextValue: FilterContextType = useMemo(
122
124
  () => ({
@@ -160,9 +162,9 @@ const Filter = (props: FilterProps) => {
160
162
 
161
163
  {showAdd && <FilterAdd onChange={onFilterChange} />}
162
164
  </Box>
163
- {(showClearFilters || showSearch) && (
165
+ {(showClearButton || showSearch) && (
164
166
  <Box sx={filterStyle.rightContent}>
165
- {showClearFilters && (
167
+ {showClearButton && (
166
168
  <Button
167
169
  isDisabled={isLoading}
168
170
  leftIconName="Cross"