@bitrise/bitkit 9.21.0-alpha-chakra.1 → 9.21.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": "9.21.0-alpha-chakra.1",
4
+ "version": "9.21.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -9,6 +9,7 @@ export interface IconButtonProps extends ChakraIconButtonProps {
9
9
  isDanger?: boolean;
10
10
  label?: string;
11
11
  size?: 'small' | 'medium';
12
+ tooltipCloseDelay?: number;
12
13
  variant?: 'primary' | 'secondary' | 'tertiary';
13
14
  }
14
15
 
@@ -16,7 +17,7 @@ export interface IconButtonProps extends ChakraIconButtonProps {
16
17
  * IconButton composes the `Button` component except that it renders only an icon.
17
18
  */
18
19
  const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
19
- const { as, iconName, isDanger, isDisabled, label, variant, ...rest } = props;
20
+ const { as, iconName, isDanger, isDisabled, label, tooltipCloseDelay, variant, ...rest } = props;
20
21
  const properties: ChakraIconButtonProps = {
21
22
  as: isDisabled ? 'button' : as,
22
23
  icon: <Icon name={iconName} />,
@@ -25,7 +26,7 @@ const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
25
26
  ...rest,
26
27
  };
27
28
  return (
28
- <Tooltip label={label || rest['aria-label']} shouldWrapChildren={isDisabled}>
29
+ <Tooltip closeDelay={tooltipCloseDelay} label={label || rest['aria-label']} shouldWrapChildren={isDisabled}>
29
30
  <ChakraIconButton {...properties} ref={ref} />
30
31
  </Tooltip>
31
32
  );
@@ -34,6 +35,7 @@ const IconButton = forwardRef<IconButtonProps, 'button'>((props, ref) => {
34
35
  IconButton.defaultProps = {
35
36
  as: 'button',
36
37
  size: 'medium',
38
+ tooltipCloseDelay: 0,
37
39
  variant: 'primary',
38
40
  } as IconButtonProps;
39
41
 
@@ -13,6 +13,7 @@ const Tooltip = forwardRef<TooltipProps, 'div'>((props, ref) => {
13
13
  bg: 'neutral.10',
14
14
  children,
15
15
  hasArrow: true,
16
+ placement: 'top',
16
17
  ...rest,
17
18
  };
18
19
  if (shouldWrapChildren) {
package/src/index.ts CHANGED
@@ -62,3 +62,6 @@ export { default as Badge } from './Components/Badge/Badge';
62
62
 
63
63
  export type { IconButtonProps } from './Components/IconButton/IconButton';
64
64
  export { default as IconButton } from './Components/IconButton/IconButton';
65
+
66
+ export type { TooltipProps } from './Components/Tooltip/Tooltip';
67
+ export { default as Tooltip } from './Components/Tooltip/Tooltip';
package/src/old.ts CHANGED
@@ -225,9 +225,6 @@ export { default as Textarea } from './Old/Textarea/Textarea';
225
225
  export type { Props as ToggleProps } from './Old/Toggle/Toggle';
226
226
  export { default as Toggle } from './Old/Toggle/Toggle';
227
227
 
228
- export type { Props as TooltipProps } from './Old/Tooltip/Tooltip';
229
- export { default as Tooltip } from './Old/Tooltip/Tooltip';
230
-
231
228
  export type { Props as VisibilityProps } from './Old/Visibility/Visibility';
232
229
  export { default as Visibility } from './Old/Visibility/Visibility';
233
230