@bitrise/bitkit 12.14.0 → 12.15.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
|
@@ -2,20 +2,13 @@ import type { SystemStyleObject } from '@chakra-ui/theme-tools';
|
|
|
2
2
|
|
|
3
3
|
const BreadcrumbTheme: SystemStyleObject = {
|
|
4
4
|
baseStyle: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
alignItems: 'center',
|
|
9
|
-
},
|
|
5
|
+
list: {
|
|
6
|
+
display: 'flex',
|
|
7
|
+
alignItems: 'center',
|
|
10
8
|
},
|
|
11
9
|
item: {
|
|
12
10
|
_last: {
|
|
13
11
|
minWidth: 0,
|
|
14
|
-
|
|
15
|
-
'.breadcrumbLinkText': {
|
|
16
|
-
overflow: 'hidden',
|
|
17
|
-
textOverflow: 'ellipsis',
|
|
18
|
-
},
|
|
19
12
|
},
|
|
20
13
|
},
|
|
21
14
|
link: {
|
|
@@ -24,9 +17,19 @@ const BreadcrumbTheme: SystemStyleObject = {
|
|
|
24
17
|
gap: '8',
|
|
25
18
|
whiteSpace: 'nowrap',
|
|
26
19
|
minWidth: 0,
|
|
20
|
+
_activeLink: {
|
|
21
|
+
color: 'neutral.10',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
linkText: {
|
|
25
|
+
color: 'purple.50',
|
|
26
|
+
_groupHover: {
|
|
27
|
+
textDecoration: 'underline',
|
|
28
|
+
},
|
|
27
29
|
},
|
|
28
30
|
separator: {
|
|
29
31
|
display: 'flex',
|
|
32
|
+
color: 'neutral.80',
|
|
30
33
|
},
|
|
31
34
|
},
|
|
32
35
|
};
|
|
@@ -35,7 +35,7 @@ const Breadcrumb = forwardRef<BreadcrumbProps, 'nav'>((props, ref) => {
|
|
|
35
35
|
|
|
36
36
|
const defaultIconName = isMobile ? 'ChevronLeft' : 'ChevronRight';
|
|
37
37
|
const properties = {
|
|
38
|
-
separator: <Icon name={separatorIconName || defaultIconName}
|
|
38
|
+
separator: <Icon name={separatorIconName || defaultIconName} size="24" />,
|
|
39
39
|
...rest,
|
|
40
40
|
};
|
|
41
41
|
return (
|
|
@@ -45,6 +45,4 @@ const Breadcrumb = forwardRef<BreadcrumbProps, 'nav'>((props, ref) => {
|
|
|
45
45
|
);
|
|
46
46
|
});
|
|
47
47
|
|
|
48
|
-
Breadcrumb.defaultProps = {};
|
|
49
|
-
|
|
50
48
|
export default Breadcrumb;
|
|
@@ -2,10 +2,11 @@ import {
|
|
|
2
2
|
BreadcrumbLink as ChakraBreadcrumbLink,
|
|
3
3
|
BreadcrumbLinkProps as ChakraBreadcrumbLinkProps,
|
|
4
4
|
forwardRef,
|
|
5
|
+
useMultiStyleConfig,
|
|
5
6
|
} from '@chakra-ui/react';
|
|
6
7
|
import Avatar from '../Avatar/Avatar';
|
|
7
8
|
import { useResponsive } from '../../hooks';
|
|
8
|
-
import
|
|
9
|
+
import Text from '../Text/Text';
|
|
9
10
|
|
|
10
11
|
export interface BreadcrumbLinkProps extends ChakraBreadcrumbLinkProps {
|
|
11
12
|
avatarName?: string;
|
|
@@ -17,18 +18,18 @@ const BreadcrumbLink = forwardRef<BreadcrumbLinkProps, 'a'>((props, ref) => {
|
|
|
17
18
|
const { isMobile } = useResponsive();
|
|
18
19
|
|
|
19
20
|
const properties: ChakraBreadcrumbLinkProps = {
|
|
20
|
-
color: isCurrentPage ? 'neutral.40' : 'inherit',
|
|
21
21
|
isCurrentPage,
|
|
22
22
|
...rest,
|
|
23
23
|
};
|
|
24
|
+
const style = useMultiStyleConfig('Breadcrumb');
|
|
24
25
|
return (
|
|
25
|
-
<ChakraBreadcrumbLink {...properties}
|
|
26
|
+
<ChakraBreadcrumbLink {...properties} role="group" ref={ref}>
|
|
26
27
|
{!isMobile && (avatarName || avatarUrl) && (
|
|
27
28
|
<Avatar name={avatarName || children?.toString()} src={avatarUrl} borderRadius="4" />
|
|
28
29
|
)}
|
|
29
|
-
<
|
|
30
|
+
<Text as="span" hasEllipsis sx={isCurrentPage ? undefined : style.linkText}>
|
|
30
31
|
{children}
|
|
31
|
-
</
|
|
32
|
+
</Text>
|
|
32
33
|
</ChakraBreadcrumbLink>
|
|
33
34
|
);
|
|
34
35
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { forwardRef, ReactNode } from 'react';
|
|
2
|
-
import { chakra, ChakraProps, createStylesContext, useMultiStyleConfig } from '@chakra-ui/react';
|
|
2
|
+
import { chakra, ChakraProps, createStylesContext, IconProps, useMultiStyleConfig } from '@chakra-ui/react';
|
|
3
3
|
import { DateTime } from 'luxon';
|
|
4
4
|
import Text from '../Text/Text';
|
|
5
5
|
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
@@ -23,6 +23,7 @@ const sidebarVariant = ({ selected, disabled }: { selected?: boolean; disabled?:
|
|
|
23
23
|
}
|
|
24
24
|
return undefined;
|
|
25
25
|
};
|
|
26
|
+
|
|
26
27
|
const SidebarItem = forwardRef(
|
|
27
28
|
(
|
|
28
29
|
{ children, disabled, selected, href, onClick }: SidebarItemProps,
|
|
@@ -44,9 +45,9 @@ const SidebarItem = forwardRef(
|
|
|
44
45
|
},
|
|
45
46
|
);
|
|
46
47
|
|
|
47
|
-
const SidebarItemIcon = ({ name }: { name: TypeIconName }) => {
|
|
48
|
+
const SidebarItemIcon = ({ name, ...iconProps }: { name: TypeIconName } & Omit<IconProps, 'sx'>) => {
|
|
48
49
|
const { icon } = useSidebarItemStyle();
|
|
49
|
-
return <Icon sx={icon} name={name} size="24" />;
|
|
50
|
+
return <Icon sx={icon} name={name} size="24" {...iconProps} />;
|
|
50
51
|
};
|
|
51
52
|
|
|
52
53
|
const SidebarItemLabel = ({ children }: { children: ReactNode }) => (
|
|
@@ -54,6 +55,7 @@ const SidebarItemLabel = ({ children }: { children: ReactNode }) => (
|
|
|
54
55
|
{children}
|
|
55
56
|
</Text>
|
|
56
57
|
);
|
|
58
|
+
|
|
57
59
|
const SidebarItemDateExtra = ({ date }: { date: Date | DateTime }) => {
|
|
58
60
|
const dateTime = DateTime.isDateTime(date) ? date : DateTime.fromJSDate(date);
|
|
59
61
|
return (
|