@bitrise/bitkit 12.73.1 → 12.73.3

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.73.1",
4
+ "version": "12.73.3",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -1,8 +1,7 @@
1
1
  import { rem } from '../../utils/utils';
2
- import { TableProps } from './Table';
3
2
 
4
3
  const Tabletheme = {
5
- baseStyle: ({ disableRowHover, isFixed }: TableProps) => {
4
+ baseStyle: () => {
6
5
  return {
7
6
  caption: {
8
7
  textAlign: 'left',
@@ -12,24 +11,30 @@ const Tabletheme = {
12
11
  fontSize: '4',
13
12
  lineHeight: '1.75rem',
14
13
  fontWeight: 'bold',
15
- color: 'purple.10',
14
+ color: 'pal.purple.10',
16
15
  },
17
16
  captionDescription: {
18
17
  marginTop: '4',
19
- color: 'neutral.30',
18
+ color: 'pal.neutral.30',
20
19
  },
21
20
  table: {
22
21
  fontVariantNumeric: 'lining-nums tabular-nums',
23
22
  borderCollapse: 'separate',
24
23
  borderRadius: '4',
25
24
  border: '1px solid',
26
- borderColor: 'neutral.93',
25
+ borderColor: 'pal.neutral.93',
27
26
  width: '100%',
28
27
  borderSpacing: 0,
29
- tableLayout: isFixed ? 'fixed' : 'auto',
28
+ '&:not(.disable-row-hover)': {
29
+ tr: {
30
+ _hover: {
31
+ td: { backgroundColor: 'pal.neutral.95' },
32
+ },
33
+ },
34
+ },
30
35
  },
31
36
  thead: {
32
- backgroundColor: 'neutral.93',
37
+ backgroundColor: 'pal.neutral.93',
33
38
  borderTopLeftRadius: '4',
34
39
  borderTopRightRadius: '4',
35
40
  },
@@ -55,34 +60,27 @@ const Tabletheme = {
55
60
  fontWeight: 'bold',
56
61
  textAlign: 'left',
57
62
  _hover: {
58
- backgroundColor: 'neutral.90',
63
+ backgroundColor: 'pal.neutral.90',
59
64
  },
60
65
  },
61
66
  sortIcon: {
62
67
  path: {
63
- fill: 'neutral.80',
68
+ fill: 'pal.neutral.80',
64
69
  },
65
70
  '[aria-sort="none"]:hover & path': {
66
- fill: 'purple.10',
71
+ fill: 'pal.purple.10',
67
72
  },
68
73
  '[aria-sort="ascending"] & path:first-of-type': {
69
- fill: 'purple.10',
74
+ fill: 'pal.purple.10',
70
75
  },
71
76
  '[aria-sort="descending"] & path:last-of-type': {
72
- fill: 'purple.10',
73
- },
74
- },
75
- tbody: {
76
- tr: {
77
- _hover: {
78
- td: { backgroundColor: !disableRowHover && 'neutral.95' },
79
- },
77
+ fill: 'pal.purple.10',
80
78
  },
81
79
  },
82
80
  td: {
83
- backgroundColor: 'neutral.100',
81
+ backgroundColor: 'pal.neutral.100',
84
82
  borderTop: '1px solid',
85
- borderColor: 'neutral.93',
83
+ borderColor: 'pal.neutral.93',
86
84
  height: rem(65),
87
85
  paddingX: '16',
88
86
  paddingY: '8',
@@ -1,9 +1,9 @@
1
1
  import { Table as ChakraTable, TableProps as ChakraTableProps, forwardRef } from '@chakra-ui/react';
2
2
 
3
3
  export interface TableProps extends ChakraTableProps {
4
+ disableRowHover?: boolean;
4
5
  isFixed?: boolean;
5
6
  variant?: 'borderless' | 'default';
6
- disableRowHover?: boolean;
7
7
  }
8
8
 
9
9
  /**
@@ -11,7 +11,14 @@ export interface TableProps extends ChakraTableProps {
11
11
  */
12
12
  const Table = forwardRef<TableProps, 'table'>((props, ref) => {
13
13
  const { disableRowHover, isFixed, ...rest } = props;
14
- return <ChakraTable {...rest} ref={ref} />;
14
+ return (
15
+ <ChakraTable
16
+ layout={isFixed ? 'fixed' : 'auto'}
17
+ className={disableRowHover ? 'disable-row-hover' : undefined}
18
+ {...rest}
19
+ ref={ref}
20
+ />
21
+ );
15
22
  });
16
23
 
17
24
  export default Table;
@@ -7,17 +7,17 @@ const TableIconButton = forwardRef<TableIconButtonProps, 'button'>((props, ref)
7
7
  const { isDanger } = props;
8
8
  return (
9
9
  <IconButton
10
- color={isDanger ? undefined : 'purple.10'}
10
+ color={isDanger ? undefined : 'pal.purple.10'}
11
11
  iconSize="24"
12
12
  size="small"
13
13
  isDanger={isDanger}
14
14
  variant="tertiary"
15
15
  ref={ref}
16
16
  _active={{
17
- backgroundColor: 'neutral.80',
17
+ backgroundColor: 'pal.neutral.80',
18
18
  }}
19
19
  _hover={{
20
- backgroundColor: 'neutral.90',
20
+ backgroundColor: 'pal.neutral.90',
21
21
  }}
22
22
  {...props}
23
23
  />
@@ -54,11 +54,11 @@ const TablePagination = ({
54
54
  ))}
55
55
  </Dropdown>
56
56
  </Box>
57
- <Divider orientation="vertical" height="3rem" color="neutral.90" />
57
+ <Divider orientation="vertical" height="3rem" color="pal.neutral.90" />
58
58
  <Text as="span" marginRight="auto">
59
59
  {itemsStartIndex}-{itemsEndIndex} of {totalCount} items
60
60
  </Text>
61
- <Divider orientation="vertical" height="3rem" color="neutral.90" />
61
+ <Divider orientation="vertical" height="3rem" color="pal.neutral.90" />
62
62
  <Box display="flex" gap="0.5rem" alignItems="center">
63
63
  <Dropdown
64
64
  onChange={({ target }) => setPage(Number(target.value))}
@@ -1,13 +1,20 @@
1
- import { Tooltip as ChakraTooltip, TooltipProps as ChakraTooltipProps, forwardRef, chakra } from '@chakra-ui/react';
1
+ import {
2
+ Tooltip as ChakraTooltip,
3
+ TooltipProps as ChakraTooltipProps,
4
+ forwardRef,
5
+ chakra,
6
+ BoxProps,
7
+ } from '@chakra-ui/react';
2
8
 
3
9
  export interface TooltipProps extends Omit<ChakraTooltipProps, 'shouldWrapChildren'> {
4
10
  shouldWrapChildren?: boolean | 'block';
11
+ wrapperProps?: BoxProps;
5
12
  }
6
13
  /**
7
14
  * A tooltip is a brief, informative message that appears when a user interacts with an element. Tooltips are usually initiated in one of two ways: through a mouse-hover gesture or through a keyboard-hover gesture.
8
15
  */
9
16
  const Tooltip = forwardRef<TooltipProps, 'div'>((props, ref) => {
10
- const { children, shouldWrapChildren, ...rest } = props;
17
+ const { children, shouldWrapChildren, wrapperProps = {}, ...rest } = props;
11
18
  const properties: ChakraTooltipProps = {
12
19
  bg: 'neutral.10',
13
20
  children,
@@ -18,7 +25,7 @@ const Tooltip = forwardRef<TooltipProps, 'div'>((props, ref) => {
18
25
  };
19
26
  if (shouldWrapChildren) {
20
27
  properties.children = (
21
- <chakra.span display={shouldWrapChildren === 'block' ? 'block' : 'inline-block'} tabIndex={0}>
28
+ <chakra.span sx={wrapperProps} display={shouldWrapChildren === 'block' ? 'block' : 'inline-block'} tabIndex={0}>
22
29
  {children}
23
30
  </chakra.span>
24
31
  );