@bitrise/bitkit 12.93.1-alpha.3 → 12.95.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": "12.93.1-alpha.3",
4
+ "version": "12.95.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -146,12 +146,22 @@ const FilterForm = (props: FilterFormProps) => {
146
146
  </Text>
147
147
  </Radio>
148
148
  {items.length
149
- ? items.map((opt) => (
150
- <Radio key={opt} value={opt}>
151
- {iconsMap && iconsMap[opt] && <Icon name={iconsMap[opt]} />}
152
- {getOptionLabel(opt, optionsMap)}
153
- </Radio>
154
- ))
149
+ ? items.map((opt) => {
150
+ const hasIcon = iconsMap && iconsMap[opt];
151
+ const label = getOptionLabel(opt, optionsMap);
152
+ return (
153
+ <Radio key={opt} value={opt}>
154
+ {hasIcon ? (
155
+ <Box alignItems="center" as="span" display="flex" gap="4">
156
+ <Icon name={iconsMap[opt]} />
157
+ {label}
158
+ </Box>
159
+ ) : (
160
+ label
161
+ )}
162
+ </Radio>
163
+ );
164
+ })
155
165
  : getEmptyText()}
156
166
  </RadioGroup>
157
167
  )}
@@ -50,9 +50,6 @@ const RadioTheme = {
50
50
  },
51
51
  label: {
52
52
  _disabled: { color: 'neutral.60' },
53
- alignItems: 'center',
54
- display: 'flex',
55
- gap: '4',
56
53
  userSelect: 'none',
57
54
  },
58
55
  },
@@ -14,7 +14,7 @@ import Tag from '../../Tag/Tag';
14
14
  import Text from '../../Text/Text';
15
15
 
16
16
  type UsedFormControlProps = Omit<FormControlProps, 'label' | 'onBlur' | 'onChange'>;
17
- export interface ChipInputProps extends UsedFormControlProps {
17
+ export interface TagsInputProps extends UsedFormControlProps {
18
18
  label?: string;
19
19
  placeholder?: string;
20
20
  value: string[];
@@ -27,7 +27,7 @@ export interface ChipInputProps extends UsedFormControlProps {
27
27
  helperText?: ReactNode;
28
28
  }
29
29
 
30
- const ChipInput = ({
30
+ const TagsInput = ({
31
31
  errorText,
32
32
  helperText,
33
33
  invalidValues = [],
@@ -39,8 +39,8 @@ const ChipInput = ({
39
39
  separator = /[, ]/,
40
40
  value,
41
41
  ...rest
42
- }: ChipInputProps) => {
43
- const theme = useStyleConfig('ChipInput');
42
+ }: TagsInputProps) => {
43
+ const theme = useStyleConfig('TagsInput');
44
44
  const keyupHandler: KeyboardEventHandler<HTMLInputElement> = (ev) => {
45
45
  const target = ev.currentTarget;
46
46
  if (ev.key === 'Backspace' && target.value.length === 0) {
@@ -147,4 +147,4 @@ const ChipInput = ({
147
147
  );
148
148
  };
149
149
 
150
- export default ChipInput;
150
+ export default TagsInput;
package/src/index.ts CHANGED
@@ -334,5 +334,5 @@ export * from './Components/Filter/Filter.types';
334
334
  export type { DateInputProps } from './Components/Form/DateInput/DateInput';
335
335
  export { default as DateInput } from './Components/Form/DateInput/DateInput';
336
336
 
337
- export type { ChipInputProps } from './Components/Form/ChipInput/ChipInput';
338
- export { default as ChipInput } from './Components/Form/ChipInput/ChipInput';
337
+ export type { TagsInputProps } from './Components/Form/TagsInput/TagsInput';
338
+ export { default as TagsInput } from './Components/Form/TagsInput/TagsInput';
package/src/theme.ts CHANGED
@@ -54,7 +54,7 @@ import zIndices from './Foundations/Zindex/Zindex';
54
54
  import Toggletip from './Components/Toggletip/Toggletip.theme';
55
55
  import FilterSwitch from './Components/Filter/FilterSwitch/FilterSwitch.theme';
56
56
  import { colors, semanticTokens } from './tokens/tokens';
57
- import ChipInput from './Components/Form/ChipInput/ChipInput.theme';
57
+ import TagsInput from './Components/Form/TagsInput/TagsInput.theme';
58
58
 
59
59
  const theme = {
60
60
  breakpoints,
@@ -79,7 +79,6 @@ const theme = {
79
79
  FilterSwitch,
80
80
  ...Form,
81
81
  Alert,
82
- ChipInput,
83
82
  CloseButton,
84
83
  CodeBlock,
85
84
  CodeSnippet,
@@ -109,6 +108,7 @@ const theme = {
109
108
  Table,
110
109
  Tabs,
111
110
  Tag,
111
+ TagsInput,
112
112
  Text,
113
113
  Textarea,
114
114
  Toggletip,