@bitrise/bitkit 12.6.1 → 12.6.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.6.1",
4
+ "version": "12.6.3",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -7,13 +7,13 @@ import {
7
7
  useBreakpointValue,
8
8
  usePrefersReducedMotion,
9
9
  HTMLChakraProps,
10
+ ComponentWithAs,
10
11
  } from '@chakra-ui/react';
11
12
  import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
12
13
  import Icon from '../Icon/Icon';
13
14
  import Text from '../Text/Text';
14
15
 
15
16
  export interface DialogProps extends Omit<HTMLChakraProps<'section'>, 'scrollBehavior'> {
16
- dataTestid?: string;
17
17
  isClosable?: boolean;
18
18
  isOpen: boolean;
19
19
  onClose(): void;
@@ -24,9 +24,8 @@ export interface DialogProps extends Omit<HTMLChakraProps<'section'>, 'scrollBeh
24
24
  variant?: 'default' | 'empty';
25
25
  }
26
26
 
27
- const Dialog = ({
27
+ const Dialog: ComponentWithAs<'section', DialogProps> = ({
28
28
  children,
29
- dataTestid,
30
29
  isClosable,
31
30
  isOpen,
32
31
  onClose,
@@ -52,7 +51,7 @@ const Dialog = ({
52
51
  trapFocus={trapFocus}
53
52
  >
54
53
  <ModalOverlay />
55
- <ModalContent data-testid={dataTestid} {...rest}>
54
+ <ModalContent {...rest}>
56
55
  {variant !== 'empty' && (
57
56
  <>
58
57
  <ModalHeader marginRight="48">
@@ -143,7 +143,7 @@ function useDropdown<T>({
143
143
  optionsRef,
144
144
  defaultValue,
145
145
  dropdownWidth = 'match',
146
- placement,
146
+ placement = 'bottom-end',
147
147
  ref,
148
148
  children,
149
149
  readOnly,