@bitrise/bitkit 13.190.0 → 13.191.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.190.0",
4
+ "version": "13.191.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -34,6 +34,7 @@ export const FILTER_STORY_DATA: FilterData = {
34
34
  '792fda8fed0308a6': 'website-docker-base-env #docker',
35
35
  fcb0a0f49138e0a0: 'bitrise-insights-cf',
36
36
  },
37
+ hasNotFilteredOption: false,
37
38
  type: 'select',
38
39
  },
39
40
  branch: {
@@ -20,6 +20,7 @@ export type FilterCategoryProps = {
20
20
  unfilteredLabel?: string;
21
21
  dependsOn?: Record<string, string>;
22
22
  iconsMap?: FilterIconsMap;
23
+ hasNotFilteredOption?: boolean;
23
24
  isMultiple?: boolean;
24
25
  onAsyncSearch?: FilterSearchCallback;
25
26
  options?: FilterOptions;
@@ -31,7 +31,7 @@ const FilterForm = (props: FilterFormProps) => {
31
31
  const filterStyle = useMultiStyleConfig('Filter') as FilterStyle;
32
32
 
33
33
  const { data, state } = useFilterContext();
34
- const { iconsMap, isMultiple, onAsyncSearch, options, optionsMap } = data[category];
34
+ const { iconsMap, hasNotFilteredOption = true, isMultiple, onAsyncSearch, options, optionsMap } = data[category];
35
35
  const value = state[category] || [];
36
36
 
37
37
  const [selected, setSelected] = useState<FilterValue>(value);
@@ -150,11 +150,13 @@ const FilterForm = (props: FilterFormProps) => {
150
150
  )}
151
151
  {!isLoading && !isMultiple && (
152
152
  <RadioGroup onChange={(v) => setSelected([v])} sx={filterStyle.formInputGroup} value={selected[0] || ''}>
153
- <Radio value="">
154
- <Text as="span" color="neutral.40" fontStyle="italic">
155
- Not filtered
156
- </Text>
157
- </Radio>
153
+ {hasNotFilteredOption && (
154
+ <Radio value="">
155
+ <Text as="span" color="neutral.40" fontStyle="italic">
156
+ Not filtered
157
+ </Text>
158
+ </Radio>
159
+ )}
158
160
  {items.length
159
161
  ? items.map((opt) => {
160
162
  const hasIcon = iconsMap && iconsMap[opt];