ywana-core8 0.1.83 → 0.1.84
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/dist/index.cjs +209 -76
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +59 -11
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +210 -77
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +209 -76
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/textfield.css +17 -4
- package/src/html/tree.css +42 -7
- package/src/html/tree.example.js +169 -7
- package/src/html/tree.js +216 -93
package/dist/index.cjs
CHANGED
@@ -11350,10 +11350,20 @@ Token.defaultProps = {
|
|
11350
11350
|
variant: 'default'
|
11351
11351
|
};
|
11352
11352
|
|
11353
|
-
var _excluded$4 = ["nodes", "children", "searchable", "searchPlaceholder", "searchBy", "filterable", "sortable", "sortBy", "sortDirection", "multiSelect", "onMultiSelect", "
|
11353
|
+
var _excluded$4 = ["nodes", "children", "searchable", "searchPlaceholder", "searchBy", "filterable", "sortable", "sortBy", "sortDirection", "multiSelect", "onMultiSelect", "showExpandIcon", "onExpandAll", "onCollapseAll", "disabled", "loading", "empty", "emptyMessage", "emptyIcon", "className", "style", "ariaLabel"],
|
11354
11354
|
_excluded2$1 = ["id", "icon", "label", "tooltip", "open", "children", "actions", "onSelect", "disabled", "draggable", "onDragStart", "onDragEnd", "onDrop", "expandable", "level", "hasChildren", "loading", "badge", "className", "style"],
|
11355
11355
|
_excluded3 = ["id", "icon", "label", "actions", "onSelect", "selected", "onCheck", "checked", "disabled", "draggable", "onDragStart", "onDragEnd", "onDrop", "level", "badge", "tooltip", "className", "style"];
|
11356
11356
|
|
11357
|
+
// Context for tree state
|
11358
|
+
var TreeContext = React.createContext({
|
11359
|
+
multiSelect: false,
|
11360
|
+
selectedItems: [],
|
11361
|
+
onMultiSelect: null,
|
11362
|
+
searchTerm: '',
|
11363
|
+
forceExpandAll: false,
|
11364
|
+
forceCollapseAll: false
|
11365
|
+
});
|
11366
|
+
|
11357
11367
|
/**
|
11358
11368
|
* Enhanced Tree component with improved functionality while maintaining 100% compatibility
|
11359
11369
|
*/
|
@@ -11365,13 +11375,13 @@ var Tree = function Tree(props) {
|
|
11365
11375
|
searchable = _props$searchable === void 0 ? false : _props$searchable,
|
11366
11376
|
_props$searchPlacehol = props.searchPlaceholder,
|
11367
11377
|
searchPlaceholder = _props$searchPlacehol === void 0 ? "Search..." : _props$searchPlacehol,
|
11378
|
+
_props$searchBy = props.searchBy,
|
11379
|
+
searchBy = _props$searchBy === void 0 ? ['label'] : _props$searchBy,
|
11368
11380
|
_props$multiSelect = props.multiSelect,
|
11369
11381
|
multiSelect = _props$multiSelect === void 0 ? false : _props$multiSelect,
|
11370
11382
|
onMultiSelect = props.onMultiSelect,
|
11371
|
-
_props$
|
11372
|
-
|
11373
|
-
_props$collapseAll = props.collapseAll,
|
11374
|
-
collapseAll = _props$collapseAll === void 0 ? false : _props$collapseAll,
|
11383
|
+
_props$showExpandIcon = props.showExpandIcon,
|
11384
|
+
showExpandIcon = _props$showExpandIcon === void 0 ? false : _props$showExpandIcon,
|
11375
11385
|
onExpandAll = props.onExpandAll,
|
11376
11386
|
onCollapseAll = props.onCollapseAll,
|
11377
11387
|
_props$disabled = props.disabled,
|
@@ -11392,8 +11402,18 @@ var Tree = function Tree(props) {
|
|
11392
11402
|
searchTerm = _useState[0],
|
11393
11403
|
setSearchTerm = _useState[1];
|
11394
11404
|
var _useState2 = React.useState([]),
|
11405
|
+
selectedItems = _useState2[0],
|
11395
11406
|
setSelectedItems = _useState2[1];
|
11396
11407
|
React.useState(new Set());
|
11408
|
+
var _useState4 = React.useState(false),
|
11409
|
+
allExpanded = _useState4[0],
|
11410
|
+
setAllExpanded = _useState4[1];
|
11411
|
+
var _useState5 = React.useState(false),
|
11412
|
+
forceExpandAll = _useState5[0],
|
11413
|
+
setForceExpandAll = _useState5[1];
|
11414
|
+
var _useState6 = React.useState(false),
|
11415
|
+
forceCollapseAll = _useState6[0],
|
11416
|
+
setForceCollapseAll = _useState6[1];
|
11397
11417
|
var treeRef = React.useRef(null);
|
11398
11418
|
|
11399
11419
|
// Validate props
|
@@ -11406,8 +11426,70 @@ var Tree = function Tree(props) {
|
|
11406
11426
|
setSearchTerm(value);
|
11407
11427
|
}, []);
|
11408
11428
|
|
11429
|
+
// Apply expansion state to nodes based on current tree state
|
11430
|
+
var applyExpansionState = React.useCallback(function (nodeElements) {
|
11431
|
+
return React__default["default"].Children.toArray(nodeElements).map(function (child) {
|
11432
|
+
var _child$type;
|
11433
|
+
if (!React__default["default"].isValidElement(child)) return child;
|
11434
|
+
|
11435
|
+
// If it's a TreeNode, apply the current expansion state
|
11436
|
+
if (((_child$type = child.type) == null ? void 0 : _child$type.displayName) === 'TreeNode' || child.props.hasOwnProperty('open')) {
|
11437
|
+
var processedChildren = child.props.children ? applyExpansionState(child.props.children) : child.props.children;
|
11438
|
+
return React__default["default"].cloneElement(child, _extends({}, child.props, {
|
11439
|
+
open: allExpanded,
|
11440
|
+
// Apply current expansion state
|
11441
|
+
children: processedChildren
|
11442
|
+
}));
|
11443
|
+
}
|
11444
|
+
return child;
|
11445
|
+
});
|
11446
|
+
}, [allExpanded]);
|
11447
|
+
|
11448
|
+
// Filter nodes based on search term and auto-expand matching nodes
|
11449
|
+
var filterNodes = React.useCallback(function (nodeElements, searchTerm) {
|
11450
|
+
if (!searchTerm.trim()) {
|
11451
|
+
// When search is cleared, apply current expansion state
|
11452
|
+
return applyExpansionState(nodeElements);
|
11453
|
+
}
|
11454
|
+
return React__default["default"].Children.toArray(nodeElements).map(function (child) {
|
11455
|
+
if (!React__default["default"].isValidElement(child)) return child;
|
11456
|
+
|
11457
|
+
// Check if current node matches search
|
11458
|
+
var label = child.props.label || '';
|
11459
|
+
var matches = searchBy.some(function (field) {
|
11460
|
+
var value = child.props[field] || label;
|
11461
|
+
return typeof value === 'string' && value.toLowerCase().includes(searchTerm.toLowerCase());
|
11462
|
+
});
|
11463
|
+
|
11464
|
+
// Check if any children match (recursive)
|
11465
|
+
var hasMatchingChildren = false;
|
11466
|
+
var filteredChildren = child.props.children;
|
11467
|
+
if (child.props.children) {
|
11468
|
+
filteredChildren = filterNodes(child.props.children, searchTerm);
|
11469
|
+
hasMatchingChildren = React__default["default"].Children.count(filteredChildren) > 0;
|
11470
|
+
}
|
11471
|
+
|
11472
|
+
// If current node or children match, include it and auto-expand
|
11473
|
+
if (matches || hasMatchingChildren) {
|
11474
|
+
var _child$type2;
|
11475
|
+
// Clone the element and force it to be open if it's a TreeNode
|
11476
|
+
if (((_child$type2 = child.type) == null ? void 0 : _child$type2.displayName) === 'TreeNode' || child.props.hasOwnProperty('open')) {
|
11477
|
+
return React__default["default"].cloneElement(child, _extends({}, child.props, {
|
11478
|
+
open: true,
|
11479
|
+
// Auto-expand nodes with matches during search
|
11480
|
+
children: filteredChildren
|
11481
|
+
}));
|
11482
|
+
}
|
11483
|
+
return React__default["default"].cloneElement(child, _extends({}, child.props, {
|
11484
|
+
children: filteredChildren
|
11485
|
+
}));
|
11486
|
+
}
|
11487
|
+
return null;
|
11488
|
+
}).filter(Boolean);
|
11489
|
+
}, [searchBy, applyExpansionState]);
|
11490
|
+
|
11409
11491
|
// Handle multi-selection
|
11410
|
-
React.useCallback(function (id, selected) {
|
11492
|
+
var handleMultiSelect = React.useCallback(function (id, selected) {
|
11411
11493
|
if (!multiSelect) return;
|
11412
11494
|
setSelectedItems(function (prev) {
|
11413
11495
|
var newSelected = selected ? [].concat(prev, [id]) : prev.filter(function (item) {
|
@@ -11420,15 +11502,26 @@ var Tree = function Tree(props) {
|
|
11420
11502
|
});
|
11421
11503
|
}, [multiSelect, onMultiSelect]);
|
11422
11504
|
|
11423
|
-
// Handle expand/collapse all
|
11424
|
-
var
|
11425
|
-
|
11426
|
-
|
11427
|
-
|
11428
|
-
|
11429
|
-
|
11430
|
-
|
11431
|
-
|
11505
|
+
// Handle expand/collapse toggle - using context to propagate to all TreeNodes
|
11506
|
+
var handleExpandToggle = React.useCallback(function () {
|
11507
|
+
var newState = !allExpanded;
|
11508
|
+
setAllExpanded(newState);
|
11509
|
+
if (newState) {
|
11510
|
+
if (onExpandAll) onExpandAll();
|
11511
|
+
// Trigger expand all via context
|
11512
|
+
setForceExpandAll(true);
|
11513
|
+
setTimeout(function () {
|
11514
|
+
return setForceExpandAll(false);
|
11515
|
+
}, 100);
|
11516
|
+
} else {
|
11517
|
+
if (onCollapseAll) onCollapseAll();
|
11518
|
+
// Trigger collapse all via context
|
11519
|
+
setForceCollapseAll(true);
|
11520
|
+
setTimeout(function () {
|
11521
|
+
return setForceCollapseAll(false);
|
11522
|
+
}, 100);
|
11523
|
+
}
|
11524
|
+
}, [allExpanded, onExpandAll, onCollapseAll]);
|
11432
11525
|
|
11433
11526
|
// Generate CSS classes
|
11434
11527
|
var cssClasses = ['tree', disabled && 'tree--disabled', loading && 'tree--loading', searchable && 'tree--searchable', multiSelect && 'tree--multi-select', className].filter(Boolean).join(' ');
|
@@ -11476,11 +11569,23 @@ var Tree = function Tree(props) {
|
|
11476
11569
|
size: "large"
|
11477
11570
|
}), /*#__PURE__*/React__default["default"].createElement(Text, null, emptyMessage)));
|
11478
11571
|
}
|
11479
|
-
|
11572
|
+
var contextValue = {
|
11573
|
+
multiSelect: multiSelect,
|
11574
|
+
selectedItems: selectedItems,
|
11575
|
+
onMultiSelect: handleMultiSelect,
|
11576
|
+
searchTerm: searchTerm,
|
11577
|
+
forceExpandAll: forceExpandAll,
|
11578
|
+
forceCollapseAll: forceCollapseAll
|
11579
|
+
};
|
11580
|
+
return /*#__PURE__*/React__default["default"].createElement(TreeContext.Provider, {
|
11581
|
+
value: contextValue
|
11582
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", _extends({
|
11480
11583
|
className: cssClasses,
|
11481
11584
|
style: style,
|
11482
11585
|
ref: treeRef
|
11483
|
-
}, ariaAttributes, restProps), searchable && /*#__PURE__*/React__default["default"].createElement("div", {
|
11586
|
+
}, ariaAttributes, restProps), (searchable || showExpandIcon) && /*#__PURE__*/React__default["default"].createElement("div", {
|
11587
|
+
className: "tree__header " + (!searchable && showExpandIcon ? 'tree__header--expand-only' : '')
|
11588
|
+
}, searchable && /*#__PURE__*/React__default["default"].createElement("div", {
|
11484
11589
|
className: "tree__search"
|
11485
11590
|
}, /*#__PURE__*/React__default["default"].createElement(TextField, {
|
11486
11591
|
id: "tree-search",
|
@@ -11490,29 +11595,17 @@ var Tree = function Tree(props) {
|
|
11490
11595
|
icon: "search",
|
11491
11596
|
outlined: true,
|
11492
11597
|
size: "small"
|
11493
|
-
})),
|
11494
|
-
className: "
|
11495
|
-
}, expandAll && /*#__PURE__*/React__default["default"].createElement("button", {
|
11496
|
-
className: "tree__control-button",
|
11497
|
-
onClick: handleExpandAll,
|
11498
|
-
"aria-label": "Expand all nodes"
|
11598
|
+
})), showExpandIcon && /*#__PURE__*/React__default["default"].createElement("div", {
|
11599
|
+
className: "tree__expand-control"
|
11499
11600
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
11500
|
-
icon: "unfold_more",
|
11501
|
-
size: "small"
|
11502
|
-
|
11503
|
-
|
11504
|
-
|
11505
|
-
|
11506
|
-
onClick: handleCollapseAll,
|
11507
|
-
"aria-label": "Collapse all nodes"
|
11508
|
-
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
11509
|
-
icon: "unfold_less",
|
11510
|
-
size: "small"
|
11511
|
-
}), /*#__PURE__*/React__default["default"].createElement(Text, {
|
11512
|
-
size: "sm"
|
11513
|
-
}, "Collapse All"))), /*#__PURE__*/React__default["default"].createElement("div", {
|
11601
|
+
icon: allExpanded ? "unfold_less" : "unfold_more",
|
11602
|
+
size: "small",
|
11603
|
+
clickable: true,
|
11604
|
+
action: handleExpandToggle,
|
11605
|
+
tooltip: allExpanded ? "Collapse all" : "Expand all"
|
11606
|
+
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
11514
11607
|
className: "tree__content"
|
11515
|
-
}, nodes, children));
|
11608
|
+
}, nodes, searchable ? filterNodes(children, searchTerm) : applyExpansionState(children))));
|
11516
11609
|
};
|
11517
11610
|
|
11518
11611
|
/**
|
@@ -11548,19 +11641,44 @@ var TreeNode = function TreeNode(props) {
|
|
11548
11641
|
className = props.className,
|
11549
11642
|
style = props.style,
|
11550
11643
|
restProps = _objectWithoutPropertiesLoose(props, _excluded2$1);
|
11551
|
-
var
|
11552
|
-
isOpen =
|
11553
|
-
setIsOpen =
|
11554
|
-
var
|
11555
|
-
isDragging =
|
11556
|
-
setIsDragging =
|
11644
|
+
var _useState7 = React.useState(open),
|
11645
|
+
isOpen = _useState7[0],
|
11646
|
+
setIsOpen = _useState7[1];
|
11647
|
+
var _useState8 = React.useState(false),
|
11648
|
+
isDragging = _useState8[0],
|
11649
|
+
setIsDragging = _useState8[1];
|
11557
11650
|
var nodeRef = React.useRef(null);
|
11558
11651
|
|
11652
|
+
// Get tree context for forced expand/collapse
|
11653
|
+
var treeContext = React.useContext(TreeContext);
|
11654
|
+
var forceExpandAll = treeContext.forceExpandAll,
|
11655
|
+
forceCollapseAll = treeContext.forceCollapseAll;
|
11656
|
+
|
11559
11657
|
// Sync with open prop
|
11560
11658
|
React.useEffect(function () {
|
11561
11659
|
setIsOpen(open);
|
11562
11660
|
}, [open]);
|
11563
11661
|
|
11662
|
+
// Handle forced expand/collapse from tree context
|
11663
|
+
React.useEffect(function () {
|
11664
|
+
if (forceExpandAll && expandable) {
|
11665
|
+
setIsOpen(true);
|
11666
|
+
// Also update the DOM element
|
11667
|
+
if (nodeRef.current) {
|
11668
|
+
nodeRef.current.open = true;
|
11669
|
+
}
|
11670
|
+
}
|
11671
|
+
}, [forceExpandAll, expandable]);
|
11672
|
+
React.useEffect(function () {
|
11673
|
+
if (forceCollapseAll && expandable) {
|
11674
|
+
setIsOpen(false);
|
11675
|
+
// Also update the DOM element
|
11676
|
+
if (nodeRef.current) {
|
11677
|
+
nodeRef.current.open = false;
|
11678
|
+
}
|
11679
|
+
}
|
11680
|
+
}, [forceCollapseAll, expandable]);
|
11681
|
+
|
11564
11682
|
// Handle selection (maintaining original behavior)
|
11565
11683
|
var handleSelect = React.useCallback(function (event) {
|
11566
11684
|
if (disabled) return;
|
@@ -11568,14 +11686,13 @@ var TreeNode = function TreeNode(props) {
|
|
11568
11686
|
if (onSelect) onSelect(id);
|
11569
11687
|
}, [disabled, onSelect, id]);
|
11570
11688
|
|
11571
|
-
// Handle toggle
|
11689
|
+
// Handle toggle - sync with details element
|
11572
11690
|
var handleToggle = React.useCallback(function (event) {
|
11573
11691
|
if (disabled || !expandable) return;
|
11574
|
-
|
11575
|
-
|
11576
|
-
|
11577
|
-
|
11578
|
-
});
|
11692
|
+
|
11693
|
+
// Sync our state with the details element
|
11694
|
+
var detailsElement = event.currentTarget;
|
11695
|
+
setIsOpen(detailsElement.open);
|
11579
11696
|
}, [disabled, expandable]);
|
11580
11697
|
|
11581
11698
|
// Handle keyboard interaction
|
@@ -11653,24 +11770,29 @@ var TreeNode = function TreeNode(props) {
|
|
11653
11770
|
onDragStart: handleDragStart,
|
11654
11771
|
onDragEnd: handleDragEnd,
|
11655
11772
|
onDrop: handleDrop,
|
11656
|
-
onDragOver: handleDragOver
|
11773
|
+
onDragOver: handleDragOver,
|
11774
|
+
onToggle: handleToggle
|
11657
11775
|
}, restProps), /*#__PURE__*/React__default["default"].createElement("summary", _extends({
|
11658
11776
|
className: "tree-item",
|
11659
11777
|
onClick: function onClick(event) {
|
11660
|
-
// Si se hace click en el
|
11661
|
-
if (event.target
|
11662
|
-
|
11778
|
+
// Si se hace click en el toggle, permitir el comportamiento natural
|
11779
|
+
if (event.target.closest('.tree-node__toggle')) {
|
11780
|
+
// No hacer nada, dejar que el details maneje el toggle
|
11781
|
+
return;
|
11663
11782
|
}
|
11783
|
+
|
11784
|
+
// Si hay onSelect y se hace click fuera del toggle, seleccionar
|
11785
|
+
if (onSelect) {
|
11786
|
+
event.preventDefault(); // Prevenir el toggle del details
|
11787
|
+
handleSelect(event);
|
11788
|
+
}
|
11789
|
+
// Si no hay onSelect, permitir el comportamiento natural del details
|
11664
11790
|
},
|
11665
11791
|
onKeyDown: handleKeyDown
|
11666
11792
|
}, ariaAttributes, {
|
11667
11793
|
title: tooltip
|
11668
11794
|
}), hasChildren && expandable && /*#__PURE__*/React__default["default"].createElement("div", {
|
11669
|
-
className: "tree-node__toggle"
|
11670
|
-
onClick: function onClick(event) {
|
11671
|
-
event.stopPropagation();
|
11672
|
-
handleToggle(event);
|
11673
|
-
}
|
11795
|
+
className: "tree-node__toggle"
|
11674
11796
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
11675
11797
|
icon: isOpen ? 'expand_less' : 'expand_more',
|
11676
11798
|
size: "small",
|
@@ -11687,11 +11809,7 @@ var TreeNode = function TreeNode(props) {
|
|
11687
11809
|
icon: "hourglass_empty",
|
11688
11810
|
size: "small"
|
11689
11811
|
})), /*#__PURE__*/React__default["default"].createElement("div", {
|
11690
|
-
className: "label " + clickable
|
11691
|
-
onClick: function onClick(event) {
|
11692
|
-
event.stopPropagation();
|
11693
|
-
handleSelect(event);
|
11694
|
-
}
|
11812
|
+
className: "label " + clickable
|
11695
11813
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
11696
11814
|
className: "tree-node__label-text"
|
11697
11815
|
}, labelTxt), badge && /*#__PURE__*/React__default["default"].createElement("span", {
|
@@ -11733,11 +11851,20 @@ var TreeItem = function TreeItem(props) {
|
|
11733
11851
|
className = props.className,
|
11734
11852
|
style = props.style,
|
11735
11853
|
restProps = _objectWithoutPropertiesLoose(props, _excluded3);
|
11736
|
-
var
|
11737
|
-
isDragging =
|
11738
|
-
setIsDragging =
|
11854
|
+
var _useState9 = React.useState(false),
|
11855
|
+
isDragging = _useState9[0],
|
11856
|
+
setIsDragging = _useState9[1];
|
11739
11857
|
var itemRef = React.useRef(null);
|
11740
11858
|
|
11859
|
+
// Get tree context
|
11860
|
+
var treeContext = React.useContext(TreeContext);
|
11861
|
+
var multiSelect = treeContext.multiSelect,
|
11862
|
+
selectedItems = treeContext.selectedItems,
|
11863
|
+
handleTreeMultiSelect = treeContext.onMultiSelect;
|
11864
|
+
|
11865
|
+
// Check if this item is selected in multi-select mode
|
11866
|
+
var isMultiSelected = multiSelect && selectedItems.includes(id);
|
11867
|
+
|
11741
11868
|
// Handle selection (maintaining original behavior)
|
11742
11869
|
var handleSelect = React.useCallback(function (event) {
|
11743
11870
|
if (disabled) return;
|
@@ -11745,12 +11872,20 @@ var TreeItem = function TreeItem(props) {
|
|
11745
11872
|
if (onSelect) onSelect(id);
|
11746
11873
|
}, [disabled, onSelect, id]);
|
11747
11874
|
|
11748
|
-
// Handle checkbox (maintaining original behavior)
|
11875
|
+
// Handle checkbox (maintaining original behavior + multi-select)
|
11749
11876
|
var handleCheck = React.useCallback(function (event) {
|
11750
11877
|
if (disabled) return;
|
11751
11878
|
event.stopPropagation();
|
11752
|
-
|
11753
|
-
|
11879
|
+
var isChecked = event.target.checked;
|
11880
|
+
|
11881
|
+
// Handle original onCheck callback
|
11882
|
+
if (onCheck) onCheck(id, isChecked);
|
11883
|
+
|
11884
|
+
// Handle multi-select if enabled
|
11885
|
+
if (multiSelect && handleTreeMultiSelect) {
|
11886
|
+
handleTreeMultiSelect(id, isChecked);
|
11887
|
+
}
|
11888
|
+
}, [disabled, onCheck, id, multiSelect, handleTreeMultiSelect]);
|
11754
11889
|
|
11755
11890
|
// Handle keyboard interaction
|
11756
11891
|
var handleKeyDown = React.useCallback(function (event) {
|
@@ -11817,11 +11952,11 @@ var TreeItem = function TreeItem(props) {
|
|
11817
11952
|
onDrop: handleDrop,
|
11818
11953
|
onDragOver: handleDragOver,
|
11819
11954
|
title: tooltip
|
11820
|
-
}, ariaAttributes, restProps), onCheck && /*#__PURE__*/React__default["default"].createElement("div", {
|
11955
|
+
}, ariaAttributes, restProps), (onCheck || multiSelect) && /*#__PURE__*/React__default["default"].createElement("div", {
|
11821
11956
|
className: "tree-item__checkbox"
|
11822
11957
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
11823
11958
|
type: "checkbox",
|
11824
|
-
checked: checked,
|
11959
|
+
checked: multiSelect ? isMultiSelected : checked,
|
11825
11960
|
onChange: handleCheck,
|
11826
11961
|
disabled: disabled,
|
11827
11962
|
"aria-label": "Select " + (typeof label === 'string' ? label : 'item')
|
@@ -11864,10 +11999,8 @@ Tree.propTypes = {
|
|
11864
11999
|
multiSelect: PropTypes.bool,
|
11865
12000
|
/** Multi-selection callback */
|
11866
12001
|
onMultiSelect: PropTypes.func,
|
11867
|
-
/** Show expand
|
11868
|
-
|
11869
|
-
/** Show collapse all button */
|
11870
|
-
collapseAll: PropTypes.bool,
|
12002
|
+
/** Show expand/collapse icon */
|
12003
|
+
showExpandIcon: PropTypes.bool,
|
11871
12004
|
/** Expand all callback */
|
11872
12005
|
onExpandAll: PropTypes.func,
|
11873
12006
|
/** Collapse all callback */
|