@bitrise/bitkit 13.27.0 → 13.29.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
|
@@ -3,6 +3,7 @@ import { chakra } from '@chakra-ui/react';
|
|
|
3
3
|
import { cx } from '@chakra-ui/utils';
|
|
4
4
|
import Text, { TextProps } from '../Text/Text';
|
|
5
5
|
import Divider from '../Divider/Divider';
|
|
6
|
+
import Tooltip from '../Tooltip/Tooltip';
|
|
6
7
|
import { useDropdownContext, useDropdownStyles } from './Dropdown.context';
|
|
7
8
|
|
|
8
9
|
export type DropdownOptionProps<T> = {
|
|
@@ -11,10 +12,12 @@ export type DropdownOptionProps<T> = {
|
|
|
11
12
|
'aria-label'?: string;
|
|
12
13
|
onClick?: MouseEventHandler<HTMLElement>;
|
|
13
14
|
isDisabled?: boolean;
|
|
15
|
+
disabledText?: string;
|
|
14
16
|
};
|
|
15
17
|
const DropdownOption = <T = string,>({
|
|
16
18
|
children,
|
|
17
19
|
isDisabled,
|
|
20
|
+
disabledText,
|
|
18
21
|
onClick,
|
|
19
22
|
value = null,
|
|
20
23
|
...rest
|
|
@@ -52,7 +55,9 @@ const DropdownOption = <T = string,>({
|
|
|
52
55
|
},
|
|
53
56
|
)}
|
|
54
57
|
>
|
|
55
|
-
{
|
|
58
|
+
<Tooltip label={disabledText} isDisabled={Boolean(!isDisabled && disabledText)}>
|
|
59
|
+
{children}
|
|
60
|
+
</Tooltip>
|
|
56
61
|
</chakra.div>
|
|
57
62
|
);
|
|
58
63
|
};
|
|
@@ -83,15 +88,17 @@ const DropdownGroup = ({
|
|
|
83
88
|
|
|
84
89
|
type DropdownDetailedOptionProps<T> = DropdownOptionProps<T> & {
|
|
85
90
|
icon: ReactNode;
|
|
86
|
-
subtitle: string;
|
|
87
91
|
title: string;
|
|
92
|
+
subtitle: string;
|
|
93
|
+
disabledText?: string;
|
|
88
94
|
};
|
|
89
95
|
|
|
90
96
|
const DropdownDetailedOption = <T = string,>({
|
|
91
97
|
icon,
|
|
92
98
|
title,
|
|
93
|
-
isDisabled,
|
|
94
99
|
subtitle,
|
|
100
|
+
isDisabled,
|
|
101
|
+
disabledText,
|
|
95
102
|
...rest
|
|
96
103
|
}: DropdownDetailedOptionProps<T>) => {
|
|
97
104
|
return (
|
|
@@ -99,7 +106,9 @@ const DropdownDetailedOption = <T = string,>({
|
|
|
99
106
|
<chakra.div alignItems="center" display="flex" flexDir="row" gap="12">
|
|
100
107
|
<chakra.div opacity={isDisabled ? '0.5' : '1'}>{icon}</chakra.div>
|
|
101
108
|
<chakra.div>
|
|
102
|
-
{
|
|
109
|
+
<Tooltip label={disabledText} isDisabled={Boolean(!isDisabled && disabledText)}>
|
|
110
|
+
{title}
|
|
111
|
+
</Tooltip>
|
|
103
112
|
<Text color={isDisabled ? 'text/disabled' : 'input/text/helper'} size="2">
|
|
104
113
|
{subtitle}
|
|
105
114
|
</Text>
|
package/src/utils/reexports.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { forwardRef, keyframes } from '@chakra-ui/react';
|
|
1
|
+
export { forwardRef, keyframes, Portal } from '@chakra-ui/react';
|
|
2
2
|
export { IMask, useIMask } from 'react-imask';
|