@bitrise/bitkit 10.25.1 → 10.25.4
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 +1 -4
- package/src/Components/Accordion/Accordion.tsx +1 -1
- package/src/Components/Breadcrumb/Breadcrumb.tsx +2 -3
- package/src/Components/Breadcrumb/BreadcrumbLink.tsx +2 -3
- package/src/Components/Dialog/Dialog.tsx +2 -2
- package/src/Components/LightBox/LightBox.tsx +2 -2
- package/src/Components/Ribbon/Ribbon.tsx +2 -14
- package/src/Foundations/Responsive/Responsive.examples.tsx +3 -3
- package/src/Old/hooks/index.ts +0 -1
- package/src/old.ts +0 -9
- package/src/tsconfig.tsbuildinfo +1 -1
- package/src/Old/Dropdown/Dropdown.tsx +0 -101
- package/src/Old/Dropdown/DropdownMenu.css +0 -48
- package/src/Old/Dropdown/DropdownMenu.tsx +0 -35
- package/src/Old/Dropdown/DropdownMenuItem.tsx +0 -62
- package/src/Old/Dropdown/DropdownMenuItemGroup.tsx +0 -19
- package/src/Old/hooks/useCopyToClipboard.ts +0 -25
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitrise/bitkit",
|
|
3
3
|
"description": "Bitrise React component library",
|
|
4
|
-
"version": "10.25.
|
|
4
|
+
"version": "10.25.4",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
@@ -28,7 +28,6 @@
|
|
|
28
28
|
"@floating-ui/react-dom-interactions": "^0.8.1",
|
|
29
29
|
"@popperjs/core": "^2.11.5",
|
|
30
30
|
"classnames": "^2.3.1",
|
|
31
|
-
"clipboard": "^2.0.11",
|
|
32
31
|
"framer-motion": "^6.5.1",
|
|
33
32
|
"luxon": "^2.5.0",
|
|
34
33
|
"react": "^18.2.0",
|
|
@@ -66,7 +65,6 @@
|
|
|
66
65
|
"@testing-library/react": "^13.3.0",
|
|
67
66
|
"@testing-library/user-event": "^14.3.0",
|
|
68
67
|
"@types/cheerio": "^0.22.31",
|
|
69
|
-
"@types/clipboard": "^2.0.1",
|
|
70
68
|
"@types/enzyme": "^3.10.12",
|
|
71
69
|
"@types/jest": "^28.1.6",
|
|
72
70
|
"@types/luxon": "^2.4.0",
|
|
@@ -109,7 +107,6 @@
|
|
|
109
107
|
},
|
|
110
108
|
"files": [
|
|
111
109
|
"src",
|
|
112
|
-
"icons.ts",
|
|
113
110
|
"tsconfig.json"
|
|
114
111
|
],
|
|
115
112
|
"publishConfig": {
|
|
@@ -24,7 +24,7 @@ const getItemIds = (props: AccordionProps) => {
|
|
|
24
24
|
* Accordions display a list of high-level options that can expand/collapse to reveal more information.
|
|
25
25
|
*/
|
|
26
26
|
const Accordion = (props: AccordionProps) => {
|
|
27
|
-
const prefersReducedMotion = usePrefersReducedMotion();
|
|
27
|
+
const prefersReducedMotion = usePrefersReducedMotion({ ssr: false });
|
|
28
28
|
const { children, colorScheme, onChange, ...rest } = props;
|
|
29
29
|
const itemIds = getItemIds(props);
|
|
30
30
|
|
|
@@ -5,10 +5,9 @@ import {
|
|
|
5
5
|
BreadcrumbItem,
|
|
6
6
|
BreadcrumbSeparator,
|
|
7
7
|
forwardRef,
|
|
8
|
-
useBreakpointValue,
|
|
9
8
|
} from '@chakra-ui/react';
|
|
10
|
-
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
11
9
|
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
10
|
+
import { useResponsive } from '../../hooks';
|
|
12
11
|
|
|
13
12
|
export interface BreadcrumbProps extends ChakraBreadcrumbProps {
|
|
14
13
|
hasSeparatorAfterLast?: boolean;
|
|
@@ -21,7 +20,7 @@ export interface BreadcrumbProps extends ChakraBreadcrumbProps {
|
|
|
21
20
|
*/
|
|
22
21
|
const Breadcrumb = forwardRef<BreadcrumbProps, 'nav'>((props, ref) => {
|
|
23
22
|
const { children, hasSeparatorAfterLast, hasSeparatorBeforeFirst, separatorIconName, ...rest } = props;
|
|
24
|
-
const isMobile =
|
|
23
|
+
const { isMobile } = useResponsive();
|
|
25
24
|
|
|
26
25
|
const childrenCount = Children.count(children);
|
|
27
26
|
const items = Children.map(children, (child, index) => {
|
|
@@ -2,10 +2,9 @@ import {
|
|
|
2
2
|
BreadcrumbLink as ChakraBreadcrumbLink,
|
|
3
3
|
BreadcrumbLinkProps as ChakraBreadcrumbLinkProps,
|
|
4
4
|
forwardRef,
|
|
5
|
-
useBreakpointValue,
|
|
6
5
|
} from '@chakra-ui/react';
|
|
7
|
-
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
8
6
|
import Avatar from '../Avatar/Avatar';
|
|
7
|
+
import { useResponsive } from '../../hooks';
|
|
9
8
|
|
|
10
9
|
export interface BreadcrumbLinkProps extends ChakraBreadcrumbLinkProps {
|
|
11
10
|
avatarName?: string;
|
|
@@ -14,7 +13,7 @@ export interface BreadcrumbLinkProps extends ChakraBreadcrumbLinkProps {
|
|
|
14
13
|
|
|
15
14
|
const BreadcrumbLink = forwardRef<BreadcrumbLinkProps, 'a'>((props, ref) => {
|
|
16
15
|
const { avatarName, avatarUrl, children, isCurrentPage, ...rest } = props;
|
|
17
|
-
const isMobile =
|
|
16
|
+
const { isMobile } = useResponsive();
|
|
18
17
|
|
|
19
18
|
const properties: ChakraBreadcrumbLinkProps = {
|
|
20
19
|
color: isCurrentPage ? 'neutral.40' : 'inherit',
|
|
@@ -37,8 +37,8 @@ const Dialog = ({
|
|
|
37
37
|
variant,
|
|
38
38
|
...rest
|
|
39
39
|
}: DialogProps) => {
|
|
40
|
-
const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'mobile', [BREAKPOINTS.
|
|
41
|
-
const prefersReducedMotion = usePrefersReducedMotion();
|
|
40
|
+
const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'mobile', [BREAKPOINTS.TABLET]: size });
|
|
41
|
+
const prefersReducedMotion = usePrefersReducedMotion({ ssr: false });
|
|
42
42
|
|
|
43
43
|
return (
|
|
44
44
|
<Modal
|
|
@@ -16,8 +16,8 @@ export interface LightBoxProps extends Omit<HTMLChakraProps<'section'>, 'scrollB
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
const LightBox = ({ children, dataTestid, size, isOpen, onClose, ...rest }: LightBoxProps) => {
|
|
19
|
-
const prefersReducedMotion = usePrefersReducedMotion();
|
|
20
|
-
const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'mobile', [BREAKPOINTS.
|
|
19
|
+
const prefersReducedMotion = usePrefersReducedMotion({ ssr: false });
|
|
20
|
+
const dialogSize = useBreakpointValue({ [BREAKPOINTS.MOBILE]: 'mobile', [BREAKPOINTS.TABLET]: size });
|
|
21
21
|
|
|
22
22
|
return (
|
|
23
23
|
<Modal isOpen={isOpen} motionPreset={prefersReducedMotion ? 'none' : 'scale'} onClose={onClose} size={dialogSize}>
|
|
@@ -2,7 +2,6 @@ import { createContext, useContext, useMemo } from 'react';
|
|
|
2
2
|
import { Alert as ChakraAlert, AlertProps, forwardRef } from '@chakra-ui/react';
|
|
3
3
|
|
|
4
4
|
import { ColorScheme } from '../../Foundations/Colors/Colors';
|
|
5
|
-
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
6
5
|
import CloseButton from '../CloseButton/CloseButton';
|
|
7
6
|
import ColorButton, { ColorButtonProps } from '../ColorButton/ColorButton';
|
|
8
7
|
import Icon from '../Icon/Icon';
|
|
@@ -62,19 +61,8 @@ const Ribbon = forwardRef<RibbonProps, 'div'>((props, ref) => {
|
|
|
62
61
|
{...rest}
|
|
63
62
|
>
|
|
64
63
|
<ActionContext.Provider value={actionContext}>
|
|
65
|
-
{onClose &&
|
|
66
|
-
|
|
67
|
-
display={{ [BREAKPOINTS.MOBILE]: 'none', [BREAKPOINTS.DESKTOP]: 'block' }}
|
|
68
|
-
width={24}
|
|
69
|
-
height={24}
|
|
70
|
-
marginEnd="auto"
|
|
71
|
-
/>
|
|
72
|
-
)}
|
|
73
|
-
<Box
|
|
74
|
-
display="flex"
|
|
75
|
-
flexDirection={{ [BREAKPOINTS.MOBILE]: 'column', [BREAKPOINTS.DESKTOP]: 'row' }}
|
|
76
|
-
gap={{ [BREAKPOINTS.MOBILE]: 12, [BREAKPOINTS.DESKTOP]: 16 }}
|
|
77
|
-
>
|
|
64
|
+
{onClose && <Box display={['none', 'block']} width={24} height={24} marginEnd="auto" />}
|
|
65
|
+
<Box display="flex" flexDirection={['column', 'row']} gap={['12', '16']}>
|
|
78
66
|
{children}
|
|
79
67
|
{actionButton}
|
|
80
68
|
</Box>
|
|
@@ -47,9 +47,9 @@ export const Responsive = () => {
|
|
|
47
47
|
This Box is
|
|
48
48
|
<List>
|
|
49
49
|
<ListItem>green below 848px (53rem)</ListItem>
|
|
50
|
-
<ListItem>purple from 848px (53rem)
|
|
51
|
-
<ListItem>red from 1280px (80rem)
|
|
52
|
-
<ListItem>gray from 1616px (101rem)</ListItem>
|
|
50
|
+
<ListItem>purple from 848px (53rem)</ListItem>
|
|
51
|
+
<ListItem>but red from 1280px (80rem)</ListItem>
|
|
52
|
+
<ListItem>but gray from 1616px (101rem)</ListItem>
|
|
53
53
|
</List>
|
|
54
54
|
</Box>
|
|
55
55
|
</CardContent>
|
package/src/Old/hooks/index.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { default as useCopyToClipboard } from './useCopyToClipboard';
|
|
2
1
|
export { default as useEventListener } from './useEventListener';
|
|
3
2
|
export { default as useMediaQuery } from './useMediaQuery';
|
|
4
3
|
export { default as useSyncedStateAndProps } from './useSyncedStateAndProps';
|
package/src/old.ts
CHANGED
|
@@ -15,15 +15,6 @@ export { default as Base } from './Old/Base/Base';
|
|
|
15
15
|
export type { Props as DatePickerProps } from './Old/DatePicker/DatePicker';
|
|
16
16
|
export { default as DatePicker } from './Old/DatePicker/DatePicker';
|
|
17
17
|
|
|
18
|
-
export type { Props as DropdownMenuProps } from './Old/Dropdown/DropdownMenu';
|
|
19
|
-
export { default as DropdownMenu } from './Old/Dropdown/DropdownMenu';
|
|
20
|
-
|
|
21
|
-
export type { Props as DropdownMenuItemProps } from './Old/Dropdown/DropdownMenuItem';
|
|
22
|
-
export { default as DropdownMenuItem } from './Old/Dropdown/DropdownMenuItem';
|
|
23
|
-
|
|
24
|
-
export type { Props as DropdownMenuItemGroupProps } from './Old/Dropdown/DropdownMenuItemGroup';
|
|
25
|
-
export { default as DropdownMenuItemGroup } from './Old/Dropdown/DropdownMenuItemGroup';
|
|
26
|
-
|
|
27
18
|
export type { Props as FlexProps } from './Old/Flex/Flex';
|
|
28
19
|
export { default as Flex } from './Old/Flex/Flex';
|
|
29
20
|
|