@box/blueprint-web 12.79.0 → 12.80.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.
|
@@ -16,7 +16,8 @@ import { RACTooltip } from './utils/rac-tooltip.js';
|
|
|
16
16
|
|
|
17
17
|
const BaseListActions = ({
|
|
18
18
|
children,
|
|
19
|
-
selectionEnabled
|
|
19
|
+
selectionEnabled,
|
|
20
|
+
isSelectionCheckboxDisabled
|
|
20
21
|
}) => {
|
|
21
22
|
return jsxs(Fragment, {
|
|
22
23
|
children: [jsx("div", {
|
|
@@ -27,18 +28,21 @@ const BaseListActions = ({
|
|
|
27
28
|
className: styles.inner,
|
|
28
29
|
children: children
|
|
29
30
|
}), selectionEnabled && jsx(ListCheckbox, {
|
|
30
|
-
className: styles.selection
|
|
31
|
+
className: styles.selection,
|
|
32
|
+
isDisabled: isSelectionCheckboxDisabled
|
|
31
33
|
})]
|
|
32
34
|
})]
|
|
33
35
|
});
|
|
34
36
|
};
|
|
35
37
|
const GridListActions = ({
|
|
36
38
|
children,
|
|
37
|
-
selectionEnabled
|
|
39
|
+
selectionEnabled,
|
|
40
|
+
isSelectionCheckboxDisabled
|
|
38
41
|
}) => {
|
|
39
42
|
return jsxs(Fragment, {
|
|
40
43
|
children: [selectionEnabled && jsx(ListCheckbox, {
|
|
41
|
-
className: styles.selection
|
|
44
|
+
className: styles.selection,
|
|
45
|
+
isDisabled: isSelectionCheckboxDisabled
|
|
42
46
|
}), jsx("div", {
|
|
43
47
|
className: styles.inner,
|
|
44
48
|
children: children
|
|
@@ -91,6 +95,7 @@ const BaseGridListActions = /*#__PURE__*/forwardRef(function BaseGridListActions
|
|
|
91
95
|
const {
|
|
92
96
|
children,
|
|
93
97
|
className,
|
|
98
|
+
isSelectionCheckboxDisabled,
|
|
94
99
|
...rest
|
|
95
100
|
} = props;
|
|
96
101
|
const {
|
|
@@ -113,9 +118,11 @@ const BaseGridListActions = /*#__PURE__*/forwardRef(function BaseGridListActions
|
|
|
113
118
|
ref: forkRef,
|
|
114
119
|
className: clsx(styles.actions, className),
|
|
115
120
|
children: isList ? jsx(BaseListActions, {
|
|
121
|
+
isSelectionCheckboxDisabled: isSelectionCheckboxDisabled,
|
|
116
122
|
selectionEnabled: isSelectionEnabled,
|
|
117
123
|
children: isRenderPropUsed ? children(setIsItemInteracted) : children
|
|
118
124
|
}) : jsx(GridListActions, {
|
|
125
|
+
isSelectionCheckboxDisabled: isSelectionCheckboxDisabled,
|
|
119
126
|
selectionEnabled: isSelectionEnabled,
|
|
120
127
|
children: isRenderPropUsed ? children(setIsItemInteracted) : children
|
|
121
128
|
})
|
|
@@ -30,6 +30,7 @@ export type BaseGridListSubtitleProps = ComponentPropsWithRef<'span'>;
|
|
|
30
30
|
export type BaseGridListDescriptionProps = ComponentPropsWithRef<'p'>;
|
|
31
31
|
export type BaseGridListActionsProps = Modify<ComponentPropsWithRef<'div'>, {
|
|
32
32
|
children: ReactNode | ((setIsInteracted: (open: boolean) => void) => ReactNode);
|
|
33
|
+
isSelectionCheckboxDisabled?: boolean;
|
|
33
34
|
}>;
|
|
34
35
|
export type BaseGridListActionIconButtonProps = IconButtonProps;
|
|
35
36
|
export interface BaseGridListProps extends Omit<RAGridListProps<object>, 'layout'>, CustomGridListProps {
|