@bitrise/bitkit 13.255.0 → 13.257.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
|
@@ -40,7 +40,7 @@ import { DropdownProps } from './DropdownProps';
|
|
|
40
40
|
const MultiSelectContext = createContext<{ invalidValues?: string[] } | undefined>(undefined);
|
|
41
41
|
|
|
42
42
|
type DropdownSearchCustomProps = {
|
|
43
|
-
value
|
|
43
|
+
value?: string;
|
|
44
44
|
onChange: (newValue: string) => void;
|
|
45
45
|
};
|
|
46
46
|
type DropdownSearchProps = { placeholder?: string; reset?: boolean };
|
|
@@ -66,7 +66,19 @@ const DropdownOption = <T = string,>({
|
|
|
66
66
|
{avatar && <Avatar size={ctx.size === 'lg' ? '32' : '24'} {...avatar} />}
|
|
67
67
|
{ctx.isMultiSelect ? (
|
|
68
68
|
<>
|
|
69
|
-
<Checkbox
|
|
69
|
+
<Checkbox
|
|
70
|
+
isChecked={isSelected}
|
|
71
|
+
isDisabled={isDisabled}
|
|
72
|
+
onChange={(event) => {
|
|
73
|
+
if (!event.defaultPrevented) {
|
|
74
|
+
ctx.onOptionSelected({ index, label: children, value });
|
|
75
|
+
}
|
|
76
|
+
}}
|
|
77
|
+
onClick={(event) => {
|
|
78
|
+
onClick?.(event);
|
|
79
|
+
event.stopPropagation();
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
70
82
|
<Box flex="1">{children}</Box>
|
|
71
83
|
</>
|
|
72
84
|
) : (
|
|
@@ -2,7 +2,7 @@ import { KeyboardEvent, RefObject, useEffect, useRef, useState } from 'react';
|
|
|
2
2
|
import {
|
|
3
3
|
autoUpdate,
|
|
4
4
|
flip,
|
|
5
|
-
|
|
5
|
+
MiddlewareState,
|
|
6
6
|
size,
|
|
7
7
|
useClick,
|
|
8
8
|
useDismiss,
|
|
@@ -16,7 +16,7 @@ import { ChakraProps } from '@chakra-ui/react';
|
|
|
16
16
|
import { mergeRefs } from '@chakra-ui/react-utils';
|
|
17
17
|
import useAutoScroll from './useAutoScroll';
|
|
18
18
|
|
|
19
|
-
type ApplyFnArgs =
|
|
19
|
+
type ApplyFnArgs = MiddlewareState & {
|
|
20
20
|
availableWidth: number;
|
|
21
21
|
availableHeight: number;
|
|
22
22
|
};
|