@bitrise/bitkit 13.291.0 → 13.293.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
|
@@ -59,9 +59,11 @@ const baseStyle = defineStyle(({ variant, size, isExpanded }): SystemStyleObject
|
|
|
59
59
|
zIndex: 1,
|
|
60
60
|
},
|
|
61
61
|
bg: 'background/secondary',
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
border: isMultiline ? '1px solid' : undefined,
|
|
63
|
+
borderColor: isMultiline ? 'border/regular' : undefined,
|
|
64
|
+
borderRadius: '4',
|
|
65
|
+
borderTopRightRadius: variant === 'single' ? '0' : '4',
|
|
66
|
+
borderBottomRightRadius: variant === 'single' ? '0' : '4',
|
|
65
67
|
cursor: 'pointer',
|
|
66
68
|
div: {
|
|
67
69
|
overflow: variant !== 'multi-breakwords' && 'auto !important',
|
|
@@ -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
|
|
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
|
-
{(
|
|
165
|
+
{(showClearButton || showSearch) && (
|
|
164
166
|
<Box sx={filterStyle.rightContent}>
|
|
165
|
-
{
|
|
167
|
+
{showClearButton && (
|
|
166
168
|
<Button
|
|
167
169
|
isDisabled={isLoading}
|
|
168
170
|
leftIconName="Cross"
|