@vention/machine-ui 5.30.2 → 5.30.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/index.esm.js
CHANGED
|
@@ -11694,6 +11694,7 @@ const useStyles$e = tss.withParams().create(({
|
|
|
11694
11694
|
return {
|
|
11695
11695
|
root: {
|
|
11696
11696
|
display: "flex",
|
|
11697
|
+
cursor: "pointer",
|
|
11697
11698
|
visibility: isVisible ? "visible" : "hidden",
|
|
11698
11699
|
alignItems: "center",
|
|
11699
11700
|
transition: "transform 0.2s",
|
|
@@ -11720,7 +11721,8 @@ const defaultProps$2 = {
|
|
|
11720
11721
|
isRenaming: false,
|
|
11721
11722
|
classes: {},
|
|
11722
11723
|
children: [],
|
|
11723
|
-
collapsible: true
|
|
11724
|
+
collapsible: true,
|
|
11725
|
+
selectable: true
|
|
11724
11726
|
};
|
|
11725
11727
|
const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
11726
11728
|
const theme = useTheme();
|
|
@@ -11745,7 +11747,8 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
11745
11747
|
dataTestid,
|
|
11746
11748
|
isRenaming,
|
|
11747
11749
|
onRenaming,
|
|
11748
|
-
collapsible
|
|
11750
|
+
collapsible,
|
|
11751
|
+
selectable
|
|
11749
11752
|
} = applyDefaultProps(inputProps, defaultProps$2);
|
|
11750
11753
|
const [isHovering, setIsHovering] = useState(false);
|
|
11751
11754
|
const [label, setLabel] = useState(labelText);
|
|
@@ -11758,7 +11761,8 @@ const VentionTreeItem = /*#__PURE__*/forwardRef((inputProps, ref) => {
|
|
|
11758
11761
|
isSelected: isSelected,
|
|
11759
11762
|
isExpanded,
|
|
11760
11763
|
captionsRight: captionsRight,
|
|
11761
|
-
indentLevel: indentLevel
|
|
11764
|
+
indentLevel: indentLevel,
|
|
11765
|
+
selectable
|
|
11762
11766
|
});
|
|
11763
11767
|
const handleRenaming = () => {
|
|
11764
11768
|
if (onRenaming) {
|
|
@@ -11907,7 +11911,8 @@ const useStyles$d = tss.withParams().withNestedSelectors().create(({
|
|
|
11907
11911
|
theme,
|
|
11908
11912
|
classes,
|
|
11909
11913
|
indentLevel,
|
|
11910
|
-
captionsRight
|
|
11914
|
+
captionsRight,
|
|
11915
|
+
selectable
|
|
11911
11916
|
}) => {
|
|
11912
11917
|
const getBackgroundColor = () => {
|
|
11913
11918
|
if (isSelected) return theme.palette.button.shaded;
|
|
@@ -11924,7 +11929,7 @@ const useStyles$d = tss.withParams().withNestedSelectors().create(({
|
|
|
11924
11929
|
root: {
|
|
11925
11930
|
display: "flex",
|
|
11926
11931
|
flexDirection: "column",
|
|
11927
|
-
cursor: "pointer",
|
|
11932
|
+
cursor: selectable ? "pointer" : "default",
|
|
11928
11933
|
backgroundColor: theme.palette.background.default,
|
|
11929
11934
|
width: "100%"
|
|
11930
11935
|
},
|
|
@@ -11945,7 +11950,7 @@ const useStyles$d = tss.withParams().withNestedSelectors().create(({
|
|
|
11945
11950
|
visibility: "visible"
|
|
11946
11951
|
},
|
|
11947
11952
|
[`&:hover`]: {
|
|
11948
|
-
border: isSelected ? invisibleBorder : `1px solid ${theme.palette.border.blueSelected}`
|
|
11953
|
+
border: !selectable || isSelected ? invisibleBorder : `1px solid ${theme.palette.border.blueSelected}`
|
|
11949
11954
|
},
|
|
11950
11955
|
overflow: "hidden",
|
|
11951
11956
|
gap: theme.spacing(2),
|
package/package.json
CHANGED
|
@@ -38,6 +38,8 @@ interface VentionTreeItemProps {
|
|
|
38
38
|
dataTestid?: string | undefined;
|
|
39
39
|
isExpanded?: boolean | undefined;
|
|
40
40
|
collapsible?: boolean | undefined;
|
|
41
|
+
/** When false, a row does not select and shows no hover highlight. The caret still works. Defaults to true. */
|
|
42
|
+
selectable?: boolean | undefined;
|
|
41
43
|
}
|
|
42
44
|
export declare const VentionTreeItem: ForwardRefExoticComponent<VentionTreeItemProps & RefAttributes<HTMLDivElement>>;
|
|
43
45
|
declare const useStyles: import("tss-react").Tss.UseStyles<{
|
|
@@ -48,5 +50,6 @@ declare const useStyles: import("tss-react").Tss.UseStyles<{
|
|
|
48
50
|
isExpanded: boolean;
|
|
49
51
|
captionsRight: VentionTreeItemProps["captionsRight"];
|
|
50
52
|
indentLevel: number;
|
|
53
|
+
selectable: boolean;
|
|
51
54
|
}, "label" | "root" | "iconContainer" | "labelContainer" | "actionButton" | "trailingElement" | "trailingElementShowOnHover" | "mainContent" | "singleLineContainer" | "captionRightContainer" | "captionRight" | "captionRightLabel" | "clickableCaptionRight" | "actionButtonsContainer" | "showOnHover" | "childrenItems" | "alertIcon", import("tss-react/mui").MuiThemeStyleOverridesPluginParams>;
|
|
52
55
|
export {};
|