@bitrise/bitkit 13.247.0 → 13.248.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.247.0",
4
+ "version": "13.248.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -1,6 +1,7 @@
1
1
  import { FormEvent, useEffect, useMemo, useState } from 'react';
2
2
  import { useMultiStyleConfig } from '@chakra-ui/react';
3
3
  import FocusLock from 'react-focus-lock';
4
+ import Tooltip from '../../Tooltip/Tooltip';
4
5
  import Badge from '../../Badge/Badge';
5
6
  import Box from '../../Box/Box';
6
7
  import Button from '../../Button/Button';
@@ -43,8 +44,8 @@ const MatchingResults = (props: MatchingResultsProps) => {
43
44
  let matchingResults: FilterOptions = [];
44
45
  if (!selected.length || selected[0] === '') {
45
46
  content = (
46
- <Text textStyle="body/md/regular" color="text/secondary">
47
- Enter pattern to view {categoryNamePlural} with matching names.
47
+ <Text textStyle="body/md/regular" color="text/secondary" maxWidth="320px">
48
+ Enter a pattern with the wildcard `*` to view {categoryNamePlural} with matching names.
48
49
  </Text>
49
50
  );
50
51
  } else {
@@ -127,8 +128,7 @@ const FilterForm = (props: FilterFormProps) => {
127
128
  const isAsync = !!onAsyncSearch;
128
129
  const withSearch = (options && options.length > 5) || isAsync;
129
130
 
130
- const isDisabled = isEqual(selected, value);
131
-
131
+ const isDisabled = isEqual(selected, value) || !selected[0].includes('*');
132
132
  const filteredOptions = useMemo(() => {
133
133
  if (options?.length) {
134
134
  return options.filter((opt) => {
@@ -314,9 +314,11 @@ const FilterForm = (props: FilterFormProps) => {
314
314
  <Button onClick={onCancelClick} size="sm" type="reset" variant="secondary">
315
315
  Cancel
316
316
  </Button>
317
- <Button isDisabled={isDisabled} size="sm" type="submit">
318
- {(selected.length === 0 || selected[0] === '') && isEditMode ? 'Remove' : 'Apply'}
319
- </Button>
317
+ <Tooltip label={isDisabled ? 'Add `*` in the pattern or select manually.' : undefined}>
318
+ <Button isDisabled={isDisabled} size="sm" type="submit">
319
+ {(selected.length === 0 || selected[0] === '') && isEditMode ? 'Remove' : 'Apply'}
320
+ </Button>
321
+ </Tooltip>
320
322
  </ButtonGroup>
321
323
  </Box>
322
324
  </FocusLock>