@bitrise/bitkit 13.238.0 → 13.240.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.238.0",
4
+ "version": "13.240.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -213,7 +213,7 @@ function useDropdown<T>({
213
213
  // clear map when value is changed from the outside
214
214
  useEffect(() => {
215
215
  if (labelMapRef.current && Array.isArray(value)) {
216
- const removed = labelMapRef.current.keys().filter((key) => !value.includes(key));
216
+ const removed = [...labelMapRef.current.keys()].filter((key) => !value.includes(key));
217
217
  removed.forEach((remove) => labelMapRef.current?.delete(remove));
218
218
  }
219
219
  }, [value]);
@@ -103,7 +103,7 @@ const LabeledData = ({
103
103
  {label}
104
104
  </Label>
105
105
  {isLoading ? (
106
- <Skeleton isActive display="flex" flexDirection="column" gap="4">
106
+ <Skeleton display="flex" flexDirection="column" gap="4">
107
107
  <SkeletonBox height={dataSkeletonHeight} width="120px" marginY={dataSkeletonPaddingY} />
108
108
  {skeletonVariant === 'double' && <SkeletonBox height="14" width="120px" marginY="3" />}
109
109
  </Skeleton>
@@ -22,9 +22,9 @@ const afterStyle = (foregroundColor: string) => ({
22
22
  width: '100%',
23
23
  });
24
24
 
25
- const baseStyle = defineStyle(({ foregroundColor, isActive }) => {
25
+ const baseStyle = defineStyle(({ foregroundColor }) => {
26
26
  return {
27
- _after: isActive ? afterStyle(foregroundColor) : {},
27
+ _after: afterStyle(foregroundColor),
28
28
  overflow: 'hidden',
29
29
  position: 'relative',
30
30
  };
@@ -1,7 +1,6 @@
1
1
  import { Box, BoxProps, forwardRef, getToken, useStyleConfig, useTheme } from '@chakra-ui/react';
2
2
 
3
3
  export interface SkeletonProps extends BoxProps {
4
- isActive?: boolean;
5
4
  foregroundColor?: string;
6
5
  }
7
6
 
@@ -11,14 +10,13 @@ export interface SkeletonProps extends BoxProps {
11
10
  * We don't extend Chakra's Skeleton
12
11
  */
13
12
  const Skeleton = forwardRef<SkeletonProps, 'div'>((props, ref) => {
14
- const { foregroundColor: foregroundColorToken, isActive, ...rest } = props;
13
+ const { foregroundColor: foregroundColorToken, ...rest } = props;
15
14
  const theme = useTheme();
16
15
  const foregroundColor = foregroundColorToken
17
16
  ? getToken('colors', foregroundColorToken, foregroundColorToken)(theme)
18
17
  : '#ffffff';
19
18
  const css = useStyleConfig('Skeleton', {
20
19
  foregroundColor,
21
- isActive,
22
20
  });
23
21
 
24
22
  return <Box __css={css} {...rest} ref={ref} />;
@@ -57,7 +57,7 @@ const Tag = forwardRef<TagProps, 'span'>((props, ref) => {
57
57
  )}
58
58
  <Text as="span" hasEllipsis sx={style.label}>
59
59
  {isLoading ? (
60
- <Skeleton isActive>
60
+ <Skeleton>
61
61
  <SkeletonBox sx={style.skeleton} />
62
62
  </Skeleton>
63
63
  ) : (
@@ -88,7 +88,7 @@ const Toggle = forwardRef<ToggleProps, 'div'>((props, ref) => {
88
88
  if (!helperText) return;
89
89
  if (isLoading) {
90
90
  return (
91
- <Skeleton marginTop="4" maxWidth="120px" isActive paddingY="0.125rem">
91
+ <Skeleton marginTop="4" maxWidth="120px" paddingY="0.125rem">
92
92
  <SkeletonBox height="12" />
93
93
  </Skeleton>
94
94
  );
@@ -133,7 +133,7 @@ const Toggle = forwardRef<ToggleProps, 'div'>((props, ref) => {
133
133
  <Box display="flex" flexDirection="row" alignItems="center" gap="8">
134
134
  {switchComponent()}
135
135
  {isLoading ? (
136
- <Skeleton maxWidth="7.5rem" flex="1" isActive>
136
+ <Skeleton maxWidth="7.5rem" flex="1">
137
137
  <SkeletonBox height="16" />
138
138
  </Skeleton>
139
139
  ) : (
@@ -12,7 +12,7 @@ const ToggleComponent = forwardRef<ToggleComponentProps, 'input'>((props, ref) =
12
12
  const { skeleton } = useMultiStyleConfig('Switch', props);
13
13
  if (isLoading) {
14
14
  return (
15
- <Skeleton isActive>
15
+ <Skeleton>
16
16
  <SkeletonBox __css={skeleton} />
17
17
  </Skeleton>
18
18
  );
@@ -143,7 +143,7 @@ export const SettingsCardFooterStatus = ({
143
143
  <SettingsCardFooter>
144
144
  <Box display="flex" flexDirection="row" gap="4" textStyle="body/md/regular" alignItems="center">
145
145
  {status === 'loading' ? (
146
- <Skeleton isActive>
146
+ <Skeleton>
147
147
  <SkeletonBox width="128" height="16" />
148
148
  </Skeleton>
149
149
  ) : (