@patternfly/react-core 4.227.9 → 4.229.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/CHANGELOG.md +33 -0
- package/dist/esm/components/DescriptionList/DescriptionList.d.ts +4 -0
- package/dist/esm/components/DescriptionList/DescriptionList.d.ts.map +1 -1
- package/dist/esm/components/DescriptionList/DescriptionList.js +5 -2
- package/dist/esm/components/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/esm/components/DescriptionList/DescriptionListGroup.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +5 -3
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItem.js +5 -1
- package/dist/esm/components/Nav/NavItem.js.map +1 -1
- package/dist/esm/components/Tabs/OverflowTab.d.ts +16 -0
- package/dist/esm/components/Tabs/OverflowTab.d.ts.map +1 -0
- package/dist/esm/components/Tabs/OverflowTab.js +74 -0
- package/dist/esm/components/Tabs/OverflowTab.js.map +1 -0
- package/dist/esm/components/Tabs/Tabs.d.ts +12 -0
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +36 -13
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/TreeView/TreeView.d.ts +2 -0
- package/dist/esm/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeView.js +3 -3
- package/dist/esm/components/TreeView/TreeView.js.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts +2 -0
- package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.js +23 -14
- package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/js/components/DescriptionList/DescriptionList.d.ts +4 -0
- package/dist/js/components/DescriptionList/DescriptionList.d.ts.map +1 -1
- package/dist/js/components/DescriptionList/DescriptionList.js +5 -2
- package/dist/js/components/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/js/components/DescriptionList/DescriptionListGroup.js.map +1 -1
- package/dist/js/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuItem.js +5 -3
- package/dist/js/components/Menu/MenuItem.js.map +1 -1
- package/dist/js/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItem.js +5 -1
- package/dist/js/components/Nav/NavItem.js.map +1 -1
- package/dist/js/components/Tabs/OverflowTab.d.ts +16 -0
- package/dist/js/components/Tabs/OverflowTab.d.ts.map +1 -0
- package/dist/js/components/Tabs/OverflowTab.js +78 -0
- package/dist/js/components/Tabs/OverflowTab.js.map +1 -0
- package/dist/js/components/Tabs/Tabs.d.ts +12 -0
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +36 -13
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/TreeView/TreeView.d.ts +2 -0
- package/dist/js/components/TreeView/TreeView.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeView.js +3 -3
- package/dist/js/components/TreeView/TreeView.js.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.d.ts +2 -0
- package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.js +23 -14
- package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/styles/base-no-reset.css +9 -0
- package/dist/styles/base.css +9 -0
- package/dist/umd/react-core.css +37 -44
- package/dist/umd/react-core.js +147 -42
- package/dist/umd/react-core.min.css +6 -13
- package/dist/umd/react-core.min.js +4 -4
- package/package.json +6 -6
- package/src/components/DescriptionList/DescriptionList.tsx +14 -0
- package/src/components/DescriptionList/DescriptionListGroup.tsx +1 -0
- package/src/components/DescriptionList/examples/DescriptionList.md +31 -1
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCard.tsx +63 -0
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +34 -0
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +34 -0
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +62 -0
- package/src/components/DescriptionList/examples/DescriptionListWithDisplaySize.tsx +63 -0
- package/src/components/Menu/MenuItem.tsx +7 -5
- package/src/components/Nav/NavItem.tsx +6 -0
- package/src/components/Tabs/OverflowTab.tsx +141 -0
- package/src/components/Tabs/Tabs.tsx +72 -25
- package/src/components/Tabs/examples/Tabs.md +6 -1
- package/src/components/Tabs/examples/TabsHorizontalOverflow.tsx +67 -0
- package/src/components/TreeView/TreeView.tsx +5 -0
- package/src/components/TreeView/TreeViewListItem.tsx +31 -17
- package/src/components/TreeView/__tests__/__snapshots__/TreeView.test.tsx.snap +299 -299
- package/src/components/TreeView/examples/TreeView.md +125 -7
package/dist/umd/react-core.js
CHANGED
|
@@ -10472,14 +10472,17 @@
|
|
|
10472
10472
|
return Object.keys(mods || {}).reduce((acc, curr) => curr === 'default' ? Object.assign(Object.assign({}, acc), { [prefix]: mods[curr] }) : Object.assign(Object.assign({}, acc), { [`${prefix}-on-${curr}`]: mods[curr] }), {});
|
|
10473
10473
|
};
|
|
10474
10474
|
const DescriptionList = (_a) => {
|
|
10475
|
-
var { className = '', children = null, isHorizontal = false, isAutoColumnWidths, isAutoFit, isInlineGrid, isCompact, isFluid, isFillColumns, columnModifier, autoFitMinModifier, horizontalTermWidthModifier, orientation, style } = _a, props = __rest$1(_a, ["className", "children", "isHorizontal", "isAutoColumnWidths", "isAutoFit", "isInlineGrid", "isCompact", "isFluid", "isFillColumns", "columnModifier", "autoFitMinModifier", "horizontalTermWidthModifier", "orientation", "style"]);
|
|
10475
|
+
var { className = '', children = null, isHorizontal = false, isAutoColumnWidths, isAutoFit, isInlineGrid, isCompact, isFluid, isFillColumns, displaySize, columnModifier, autoFitMinModifier, termWidth, horizontalTermWidthModifier, orientation, style } = _a, props = __rest$1(_a, ["className", "children", "isHorizontal", "isAutoColumnWidths", "isAutoFit", "isInlineGrid", "isCompact", "isFluid", "isFillColumns", "displaySize", "columnModifier", "autoFitMinModifier", "termWidth", "horizontalTermWidthModifier", "orientation", "style"]);
|
|
10476
10476
|
if (isAutoFit && autoFitMinModifier) {
|
|
10477
10477
|
style = Object.assign(Object.assign({}, style), setBreakpointModifiers('--pf-c-description-list--GridTemplateColumns--min', autoFitMinModifier));
|
|
10478
10478
|
}
|
|
10479
|
+
if (termWidth) {
|
|
10480
|
+
style = Object.assign(Object.assign({}, style), { '--pf-c-description-list__term--width': termWidth });
|
|
10481
|
+
}
|
|
10479
10482
|
if (isHorizontal && horizontalTermWidthModifier) {
|
|
10480
10483
|
style = Object.assign(Object.assign({}, style), setBreakpointModifiers('--pf-c-description-list--m-horizontal__term--width', horizontalTermWidthModifier));
|
|
10481
10484
|
}
|
|
10482
|
-
return (React__namespace.createElement("dl", Object.assign({ className: css(styles$M.descriptionList, (isHorizontal || isFluid) && styles$M.modifiers.horizontal, isAutoColumnWidths && styles$M.modifiers.autoColumnWidths, isAutoFit && styles$M.modifiers.autoFit, formatBreakpointMods(columnModifier, styles$M), formatBreakpointMods(orientation, styles$M), isInlineGrid && styles$M.modifiers.inlineGrid, isCompact && styles$M.modifiers.compact, isFluid && styles$M.modifiers.fluid, isFillColumns && styles$M.modifiers.fillColumns, className), style: style }, props), children));
|
|
10485
|
+
return (React__namespace.createElement("dl", Object.assign({ className: css(styles$M.descriptionList, (isHorizontal || isFluid) && styles$M.modifiers.horizontal, isAutoColumnWidths && styles$M.modifiers.autoColumnWidths, isAutoFit && styles$M.modifiers.autoFit, formatBreakpointMods(columnModifier, styles$M), formatBreakpointMods(orientation, styles$M), isInlineGrid && styles$M.modifiers.inlineGrid, isCompact && styles$M.modifiers.compact, isFluid && styles$M.modifiers.fluid, isFillColumns && styles$M.modifiers.fillColumns, displaySize === 'lg' && styles$M.modifiers.displayLg, displaySize === '2xl' && styles$M.modifiers.display_2xl, className), style: style }, props), children));
|
|
10483
10486
|
};
|
|
10484
10487
|
DescriptionList.displayName = 'DescriptionList';
|
|
10485
10488
|
|
|
@@ -15755,7 +15758,8 @@
|
|
|
15755
15758
|
const handleFlyout = (event) => {
|
|
15756
15759
|
const key = event.key;
|
|
15757
15760
|
const target = event.target;
|
|
15758
|
-
|
|
15761
|
+
const type = event.type;
|
|
15762
|
+
if (key === ' ' || key === 'Enter' || key === 'ArrowRight' || type === 'click') {
|
|
15759
15763
|
event.stopPropagation();
|
|
15760
15764
|
if (!flyoutVisible) {
|
|
15761
15765
|
showFlyout(true);
|
|
@@ -15806,7 +15810,7 @@
|
|
|
15806
15810
|
additionalProps['aria-expanded'] = true;
|
|
15807
15811
|
}
|
|
15808
15812
|
else if (hasFlyout) {
|
|
15809
|
-
additionalProps['aria-haspopup'] =
|
|
15813
|
+
additionalProps['aria-haspopup'] = 'menu';
|
|
15810
15814
|
additionalProps['aria-expanded'] = flyoutVisible;
|
|
15811
15815
|
}
|
|
15812
15816
|
const getAriaCurrent = () => {
|
|
@@ -15844,10 +15848,11 @@
|
|
|
15844
15848
|
}
|
|
15845
15849
|
};
|
|
15846
15850
|
return (React__namespace.createElement("li", Object.assign({ className: css(menuStyles.menuListItem, isDisabled && menuStyles.modifiers.disabled, _isOnPath && menuStyles.modifiers.currentPath, isLoadButton && menuStyles.modifiers.load, isLoading && menuStyles.modifiers.loading, isFocused && menuStyles.modifiers.focus, className), onMouseOver: onMouseOver }, (flyoutMenu && { onKeyDown: handleFlyout }), { ref: ref, role: !hasCheck ? 'none' : 'menuitem' }, props),
|
|
15847
|
-
React__namespace.createElement(GenerateId, null, randomId => (React__namespace.createElement(Component, Object.assign({ tabIndex: -1, className: css(menuStyles.menuItem, getIsSelected() && !hasCheck && menuStyles.modifiers.selected, className), "aria-current": getAriaCurrent() }, (!hasCheck && { disabled: isDisabled }), (!hasCheck && { role: 'menuitem' }), { ref: innerRef }, (!hasCheck && {
|
|
15851
|
+
React__namespace.createElement(GenerateId, null, randomId => (React__namespace.createElement(Component, Object.assign({ tabIndex: -1, className: css(menuStyles.menuItem, getIsSelected() && !hasCheck && menuStyles.modifiers.selected, className), "aria-current": getAriaCurrent() }, (!hasCheck && { disabled: isDisabled }), (!hasCheck && !flyoutMenu && { role: 'menuitem' }), { ref: innerRef }, (!hasCheck && {
|
|
15848
15852
|
onClick: (event) => {
|
|
15849
15853
|
onItemSelect(event, onSelect);
|
|
15850
15854
|
_drill && _drill();
|
|
15855
|
+
flyoutMenu && handleFlyout(event);
|
|
15851
15856
|
}
|
|
15852
15857
|
}), (hasCheck && { htmlFor: randomId }), additionalProps),
|
|
15853
15858
|
React__namespace.createElement("span", { className: css(menuStyles.menuItemMain) },
|
|
@@ -16884,9 +16889,13 @@
|
|
|
16884
16889
|
const flyoutButton = (React__namespace.createElement("span", { className: css(styles$u.navToggle) },
|
|
16885
16890
|
React__namespace.createElement("span", { className: css(styles$u.navToggleIcon) },
|
|
16886
16891
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true }))));
|
|
16892
|
+
const ariaFlyoutProps = {
|
|
16893
|
+
'aria-haspopup': 'menu',
|
|
16894
|
+
'aria-expanded': flyoutVisible
|
|
16895
|
+
};
|
|
16887
16896
|
const renderDefaultLink = (context) => {
|
|
16888
16897
|
const preventLinkDefault = preventDefault || !to;
|
|
16889
|
-
return (React__namespace.createElement(Component, Object.assign({ href: to, onClick: (e) => context.onSelect(e, groupId, itemId, to, preventLinkDefault, onClick), className: css(styles$u.navLink, isActive && styles$u.modifiers.current, isHovered && styles$u.modifiers.hover, className), "aria-current": isActive ? 'page' : null, tabIndex: isNavOpen ? null : '-1' }, props),
|
|
16898
|
+
return (React__namespace.createElement(Component, Object.assign({ href: to, onClick: (e) => context.onSelect(e, groupId, itemId, to, preventLinkDefault, onClick), className: css(styles$u.navLink, isActive && styles$u.modifiers.current, isHovered && styles$u.modifiers.hover, className), "aria-current": isActive ? 'page' : null, tabIndex: isNavOpen ? null : '-1' }, (hasFlyout && Object.assign({}, ariaFlyoutProps)), props),
|
|
16890
16899
|
children,
|
|
16891
16900
|
flyout && flyoutButton));
|
|
16892
16901
|
};
|
|
@@ -19216,6 +19225,77 @@
|
|
|
19216
19225
|
};
|
|
19217
19226
|
const TabContent = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(TabContentBase, Object.assign({}, props, { innerRef: ref }))));
|
|
19218
19227
|
|
|
19228
|
+
const TabTitleText = (_a) => {
|
|
19229
|
+
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
19230
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(styles$f.tabsItemText, className) }, props), children));
|
|
19231
|
+
};
|
|
19232
|
+
TabTitleText.displayName = 'TabTitleText';
|
|
19233
|
+
|
|
19234
|
+
const OverflowTab = (_a) => {
|
|
19235
|
+
var { className, overflowingTabs = [], showTabCount, defaultTitleText = 'More', toggleAriaLabel } = _a, props = __rest$1(_a, ["className", "overflowingTabs", "showTabCount", "defaultTitleText", "toggleAriaLabel"]);
|
|
19236
|
+
const menuRef = React__default["default"].useRef();
|
|
19237
|
+
const overflowTabRef = React__default["default"].useRef();
|
|
19238
|
+
const overflowLIRef = React__default["default"].useRef();
|
|
19239
|
+
const [isExpanded, setIsExpanded] = React__default["default"].useState(false);
|
|
19240
|
+
const { localActiveKey, handleTabClick } = React__default["default"].useContext(TabsContext);
|
|
19241
|
+
const closeMenu = () => {
|
|
19242
|
+
setIsExpanded(false);
|
|
19243
|
+
overflowTabRef.current.focus();
|
|
19244
|
+
};
|
|
19245
|
+
const handleMenuKeys = (ev) => {
|
|
19246
|
+
var _a;
|
|
19247
|
+
const menuContainsEventTarget = (_a = menuRef === null || menuRef === void 0 ? void 0 : menuRef.current) === null || _a === void 0 ? void 0 : _a.contains(ev.target);
|
|
19248
|
+
if (isExpanded && menuContainsEventTarget && ev.key === 'Escape') {
|
|
19249
|
+
closeMenu();
|
|
19250
|
+
}
|
|
19251
|
+
};
|
|
19252
|
+
const handleClick = (ev) => {
|
|
19253
|
+
var _a, _b;
|
|
19254
|
+
const clickIsOutsideMenu = !((_a = menuRef === null || menuRef === void 0 ? void 0 : menuRef.current) === null || _a === void 0 ? void 0 : _a.contains(ev.target));
|
|
19255
|
+
const clickIsOutsideOverflowTab = !((_b = overflowTabRef === null || overflowTabRef === void 0 ? void 0 : overflowTabRef.current) === null || _b === void 0 ? void 0 : _b.contains(ev.target));
|
|
19256
|
+
if (isExpanded && clickIsOutsideMenu && clickIsOutsideOverflowTab) {
|
|
19257
|
+
closeMenu();
|
|
19258
|
+
}
|
|
19259
|
+
};
|
|
19260
|
+
React__default["default"].useEffect(() => {
|
|
19261
|
+
window.addEventListener('click', handleClick);
|
|
19262
|
+
window.addEventListener('keydown', handleMenuKeys);
|
|
19263
|
+
return () => {
|
|
19264
|
+
window.removeEventListener('click', handleClick);
|
|
19265
|
+
window.removeEventListener('keydown', handleMenuKeys);
|
|
19266
|
+
};
|
|
19267
|
+
}, [isExpanded, menuRef, overflowTabRef]);
|
|
19268
|
+
const selectedTab = overflowingTabs.find(tab => tab.eventKey === localActiveKey);
|
|
19269
|
+
const tabTitle = (selectedTab === null || selectedTab === void 0 ? void 0 : selectedTab.title) ? selectedTab.title : defaultTitleText;
|
|
19270
|
+
const toggleMenu = () => {
|
|
19271
|
+
setIsExpanded(prevIsExpanded => !prevIsExpanded);
|
|
19272
|
+
setTimeout(() => {
|
|
19273
|
+
if (menuRef === null || menuRef === void 0 ? void 0 : menuRef.current) {
|
|
19274
|
+
const firstElement = menuRef.current.querySelector('li > button,input:not(:disabled)');
|
|
19275
|
+
firstElement && firstElement.focus();
|
|
19276
|
+
}
|
|
19277
|
+
}, 0);
|
|
19278
|
+
};
|
|
19279
|
+
const overflowTab = (React__default["default"].createElement("li", Object.assign({ className: css(styles$f.tabsItem, 'pf-m-overflow', selectedTab && styles$f.modifiers.current, className), role: "presentation", ref: overflowLIRef }, props),
|
|
19280
|
+
React__default["default"].createElement("button", { className: css(styles$f.tabsLink, isExpanded && styles$f.modifiers.expanded), onClick: () => toggleMenu(), "aria-label": toggleAriaLabel, "aria-haspopup": "menu", "aria-expanded": isExpanded, role: "tab", ref: overflowTabRef },
|
|
19281
|
+
React__default["default"].createElement(TabTitleText, null,
|
|
19282
|
+
tabTitle,
|
|
19283
|
+
showTabCount && tabTitle === defaultTitleText && ` (${overflowingTabs.length})`),
|
|
19284
|
+
React__default["default"].createElement("span", { className: styles$f.tabsLinkToggleIcon },
|
|
19285
|
+
React__default["default"].createElement(AngleRightIcon$1, null)))));
|
|
19286
|
+
const tabs = overflowingTabs.map(tab => (React__default["default"].createElement(MenuItem, { key: tab.eventKey, itemId: tab.eventKey, isSelected: localActiveKey === tab.eventKey }, tab.title)));
|
|
19287
|
+
const onTabSelect = (event, key) => {
|
|
19288
|
+
closeMenu();
|
|
19289
|
+
const selectedTabRef = overflowingTabs.find(tab => tab.eventKey === key).tabContentRef;
|
|
19290
|
+
handleTabClick(event, key, selectedTabRef);
|
|
19291
|
+
};
|
|
19292
|
+
const overflowMenu = (React__default["default"].createElement(Menu, { ref: menuRef, onSelect: (ev, itemId) => onTabSelect(ev, itemId) },
|
|
19293
|
+
React__default["default"].createElement(MenuContent, null,
|
|
19294
|
+
React__default["default"].createElement(MenuList, null, tabs))));
|
|
19295
|
+
return (React__default["default"].createElement(Popper, { trigger: overflowTab, popper: overflowMenu, isVisible: isExpanded, popperMatchesTriggerWidth: false, appendTo: overflowLIRef.current }));
|
|
19296
|
+
};
|
|
19297
|
+
OverflowTab.displayName = 'OverflowTab';
|
|
19298
|
+
|
|
19219
19299
|
exports.TabsComponent = void 0;
|
|
19220
19300
|
(function (TabsComponent) {
|
|
19221
19301
|
TabsComponent["div"] = "div";
|
|
@@ -19230,7 +19310,12 @@
|
|
|
19230
19310
|
super(props);
|
|
19231
19311
|
this.tabList = React__namespace.createRef();
|
|
19232
19312
|
this.scrollTimeout = null;
|
|
19313
|
+
this.countOverflowingElements = (container) => {
|
|
19314
|
+
const elements = Array.from(container.children);
|
|
19315
|
+
return elements.filter(element => !isElementInView(container, element, false)).length;
|
|
19316
|
+
};
|
|
19233
19317
|
this.handleScrollButtons = () => {
|
|
19318
|
+
const { isOverflowHorizontal: isOverflowHorizontal } = this.props;
|
|
19234
19319
|
// add debounce to the scroll event
|
|
19235
19320
|
clearTimeout(this.scrollTimeout);
|
|
19236
19321
|
this.scrollTimeout = setTimeout(() => {
|
|
@@ -19238,7 +19323,8 @@
|
|
|
19238
19323
|
let disableLeftScrollButton = true;
|
|
19239
19324
|
let disableRightScrollButton = true;
|
|
19240
19325
|
let showScrollButtons = false;
|
|
19241
|
-
|
|
19326
|
+
let overflowingTabCount = 0;
|
|
19327
|
+
if (container && !this.props.isVertical && !isOverflowHorizontal) {
|
|
19242
19328
|
// get first element and check if it is in view
|
|
19243
19329
|
const overflowOnLeft = !isElementInView(container, container.firstChild, false);
|
|
19244
19330
|
// get last element and check if it is in view
|
|
@@ -19247,10 +19333,14 @@
|
|
|
19247
19333
|
disableLeftScrollButton = !overflowOnLeft;
|
|
19248
19334
|
disableRightScrollButton = !overflowOnRight;
|
|
19249
19335
|
}
|
|
19336
|
+
if (isOverflowHorizontal) {
|
|
19337
|
+
overflowingTabCount = this.countOverflowingElements(container);
|
|
19338
|
+
}
|
|
19250
19339
|
this.setState({
|
|
19251
19340
|
showScrollButtons,
|
|
19252
19341
|
disableLeftScrollButton,
|
|
19253
|
-
disableRightScrollButton
|
|
19342
|
+
disableRightScrollButton,
|
|
19343
|
+
overflowingTabCount
|
|
19254
19344
|
});
|
|
19255
19345
|
}, 100);
|
|
19256
19346
|
};
|
|
@@ -19298,7 +19388,8 @@
|
|
|
19298
19388
|
shownKeys: this.props.defaultActiveKey !== undefined ? [this.props.defaultActiveKey] : [this.props.activeKey],
|
|
19299
19389
|
uncontrolledActiveKey: this.props.defaultActiveKey,
|
|
19300
19390
|
uncontrolledIsExpandedLocal: this.props.defaultIsExpanded,
|
|
19301
|
-
ouiaStateId: getDefaultOUIAId(Tabs.displayName)
|
|
19391
|
+
ouiaStateId: getDefaultOUIAId(Tabs.displayName),
|
|
19392
|
+
overflowingTabCount: 0
|
|
19302
19393
|
};
|
|
19303
19394
|
if (this.props.isVertical && this.props.expandable !== undefined) {
|
|
19304
19395
|
if (!this.props.toggleAriaLabel && !this.props.toggleText) {
|
|
@@ -19354,8 +19445,8 @@
|
|
|
19354
19445
|
clearTimeout(this.scrollTimeout);
|
|
19355
19446
|
}
|
|
19356
19447
|
componentDidUpdate(prevProps) {
|
|
19357
|
-
const { activeKey, mountOnEnter, children } = this.props;
|
|
19358
|
-
const { shownKeys } = this.state;
|
|
19448
|
+
const { activeKey, mountOnEnter, isOverflowHorizontal, children } = this.props;
|
|
19449
|
+
const { shownKeys, overflowingTabCount } = this.state;
|
|
19359
19450
|
if (prevProps.activeKey !== activeKey && mountOnEnter && shownKeys.indexOf(activeKey) < 0) {
|
|
19360
19451
|
this.setState({
|
|
19361
19452
|
shownKeys: shownKeys.concat(activeKey)
|
|
@@ -19366,13 +19457,20 @@
|
|
|
19366
19457
|
React__namespace.Children.toArray(prevProps.children).length !== React__namespace.Children.toArray(children).length) {
|
|
19367
19458
|
this.handleScrollButtons();
|
|
19368
19459
|
}
|
|
19460
|
+
const currentOverflowingTabCount = this.countOverflowingElements(this.tabList.current);
|
|
19461
|
+
if (isOverflowHorizontal && currentOverflowingTabCount) {
|
|
19462
|
+
this.setState({ overflowingTabCount: currentOverflowingTabCount + overflowingTabCount });
|
|
19463
|
+
}
|
|
19369
19464
|
}
|
|
19370
19465
|
render() {
|
|
19371
|
-
const _a = this.props, { className, children, activeKey, defaultActiveKey, id, isFilled, isSecondary, isVertical, isBox, hasBorderBottom, hasSecondaryBorderBottom, leftScrollAriaLabel, rightScrollAriaLabel, 'aria-label': ariaLabel, component, ouiaId, ouiaSafe, mountOnEnter, unmountOnExit, usePageInsets, inset, variant, expandable, isExpanded, defaultIsExpanded, toggleText, toggleAriaLabel, addButtonAriaLabel, onToggle, onClose, onAdd } = _a, props = __rest$1(_a, ["className", "children", "activeKey", "defaultActiveKey", "id", "isFilled", "isSecondary", "isVertical", "isBox", "hasBorderBottom", "hasSecondaryBorderBottom", "leftScrollAriaLabel", "rightScrollAriaLabel", 'aria-label', "component", "ouiaId", "ouiaSafe", "mountOnEnter", "unmountOnExit", "usePageInsets", "inset", "variant", "expandable", "isExpanded", "defaultIsExpanded", "toggleText", "toggleAriaLabel", "addButtonAriaLabel", "onToggle", "onClose", "onAdd"]);
|
|
19372
|
-
const { showScrollButtons, disableLeftScrollButton, disableRightScrollButton, shownKeys, uncontrolledActiveKey, uncontrolledIsExpandedLocal } = this.state;
|
|
19466
|
+
const _a = this.props, { className, children, activeKey, defaultActiveKey, id, isFilled, isSecondary, isVertical, isBox, hasBorderBottom, hasSecondaryBorderBottom, leftScrollAriaLabel, rightScrollAriaLabel, 'aria-label': ariaLabel, component, ouiaId, ouiaSafe, mountOnEnter, unmountOnExit, usePageInsets, inset, variant, expandable, isExpanded, defaultIsExpanded, toggleText, toggleAriaLabel, addButtonAriaLabel, onToggle, onClose, onAdd, isOverflowHorizontal: isOverflowHorizontal } = _a, props = __rest$1(_a, ["className", "children", "activeKey", "defaultActiveKey", "id", "isFilled", "isSecondary", "isVertical", "isBox", "hasBorderBottom", "hasSecondaryBorderBottom", "leftScrollAriaLabel", "rightScrollAriaLabel", 'aria-label', "component", "ouiaId", "ouiaSafe", "mountOnEnter", "unmountOnExit", "usePageInsets", "inset", "variant", "expandable", "isExpanded", "defaultIsExpanded", "toggleText", "toggleAriaLabel", "addButtonAriaLabel", "onToggle", "onClose", "onAdd", "isOverflowHorizontal"]);
|
|
19467
|
+
const { showScrollButtons, disableLeftScrollButton, disableRightScrollButton, shownKeys, uncontrolledActiveKey, uncontrolledIsExpandedLocal, overflowingTabCount } = this.state;
|
|
19373
19468
|
const filteredChildren = React__namespace.Children.toArray(children)
|
|
19374
19469
|
.filter(Boolean)
|
|
19375
19470
|
.filter(child => !child.props.isHidden);
|
|
19471
|
+
const filteredChildrenWithoutOverflow = filteredChildren.slice(0, filteredChildren.length - overflowingTabCount);
|
|
19472
|
+
const filteredChildrenOverflowing = filteredChildren.slice(filteredChildren.length - overflowingTabCount);
|
|
19473
|
+
const overflowingTabProps = filteredChildrenOverflowing.map((child) => child.props);
|
|
19376
19474
|
const uniqueId = id || getUniqueId();
|
|
19377
19475
|
const Component = component === exports.TabsComponent.nav ? 'nav' : 'div';
|
|
19378
19476
|
const localActiveKey = defaultActiveKey !== undefined ? uncontrolledActiveKey : activeKey;
|
|
@@ -19386,6 +19484,8 @@
|
|
|
19386
19484
|
onToggle(newValue);
|
|
19387
19485
|
}
|
|
19388
19486
|
};
|
|
19487
|
+
const hasOverflowTab = isOverflowHorizontal && overflowingTabCount > 0;
|
|
19488
|
+
const overflowObjectProps = typeof isOverflowHorizontal === 'object' ? Object.assign({}, isOverflowHorizontal) : {};
|
|
19389
19489
|
return (React__namespace.createElement(TabsContextProvider, { value: {
|
|
19390
19490
|
variant,
|
|
19391
19491
|
mountOnEnter,
|
|
@@ -19395,18 +19495,20 @@
|
|
|
19395
19495
|
handleTabClick: (...args) => this.handleTabClick(...args),
|
|
19396
19496
|
handleTabClose: onClose
|
|
19397
19497
|
} },
|
|
19398
|
-
React__namespace.createElement(Component, Object.assign({ "aria-label": ariaLabel, className: css(styles$f.tabs, isFilled && styles$f.modifiers.fill, isSecondary && styles$f.modifiers.secondary, isVertical && styles$f.modifiers.vertical, isVertical && expandable && formatBreakpointMods(expandable, styles$f), isVertical && expandable && isExpandedLocal && styles$f.modifiers.expanded, isBox && styles$f.modifiers.box, showScrollButtons && !isVertical && styles$f.modifiers.scrollable, usePageInsets && styles$f.modifiers.pageInsets, !hasBorderBottom && styles$f.modifiers.noBorderBottom, hasSecondaryBorderBottom && styles$f.modifiers.borderBottom, formatBreakpointMods(inset, styles$f), variantStyle[variant], className) }, getOUIAProps(Tabs.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { id: id && id }, props),
|
|
19498
|
+
React__namespace.createElement(Component, Object.assign({ "aria-label": ariaLabel, className: css(styles$f.tabs, isFilled && styles$f.modifiers.fill, isSecondary && styles$f.modifiers.secondary, isVertical && styles$f.modifiers.vertical, isVertical && expandable && formatBreakpointMods(expandable, styles$f), isVertical && expandable && isExpandedLocal && styles$f.modifiers.expanded, isBox && styles$f.modifiers.box, showScrollButtons && !isVertical && styles$f.modifiers.scrollable, usePageInsets && styles$f.modifiers.pageInsets, !hasBorderBottom && styles$f.modifiers.noBorderBottom, hasSecondaryBorderBottom && styles$f.modifiers.borderBottom, formatBreakpointMods(inset, styles$f), variantStyle[variant], hasOverflowTab && styles$f.modifiers.overflow, className) }, getOUIAProps(Tabs.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { id: id && id }, props),
|
|
19399
19499
|
expandable && isVertical && (React__namespace.createElement(GenerateId, null, randomId => (React__namespace.createElement("div", { className: css(styles$f.tabsToggle) },
|
|
19400
19500
|
React__namespace.createElement("div", { className: css(styles$f.tabsToggleButton) },
|
|
19401
19501
|
React__namespace.createElement(Button, { onClick: () => toggleTabs(!isExpandedLocal), variant: "plain", "aria-label": toggleAriaLabel, "aria-expanded": isExpandedLocal, id: `${randomId}-button`, "aria-labelledby": `${randomId}-text ${randomId}-button` },
|
|
19402
19502
|
React__namespace.createElement("span", { className: css(styles$f.tabsToggleIcon) },
|
|
19403
19503
|
React__namespace.createElement(AngleRightIcon$1, { "arian-hidden": "true" })),
|
|
19404
19504
|
toggleText && (React__namespace.createElement("span", { className: css('pf-c-tabs__toggle-text'), id: `${randomId}-text` }, toggleText)))))))),
|
|
19405
|
-
React__namespace.createElement("button", { className: css(styles$f.tabsScrollButton, isSecondary && buttonStyles.modifiers.secondary), "aria-label": leftScrollAriaLabel, onClick: this.scrollLeft, disabled: disableLeftScrollButton, "aria-hidden": disableLeftScrollButton },
|
|
19406
|
-
React__namespace.createElement(AngleLeftIcon$1, null)),
|
|
19407
|
-
React__namespace.createElement("ul", { className: css(styles$f.tabsList), ref: this.tabList, onScroll: this.handleScrollButtons, role: "tablist" },
|
|
19408
|
-
|
|
19409
|
-
React__namespace.createElement(
|
|
19505
|
+
!isOverflowHorizontal && (React__namespace.createElement("button", { className: css(styles$f.tabsScrollButton, isSecondary && buttonStyles.modifiers.secondary), "aria-label": leftScrollAriaLabel, onClick: this.scrollLeft, disabled: disableLeftScrollButton, "aria-hidden": disableLeftScrollButton },
|
|
19506
|
+
React__namespace.createElement(AngleLeftIcon$1, null))),
|
|
19507
|
+
React__namespace.createElement("ul", { className: css(styles$f.tabsList), ref: this.tabList, onScroll: this.handleScrollButtons, role: "tablist" },
|
|
19508
|
+
isOverflowHorizontal ? filteredChildrenWithoutOverflow : filteredChildren,
|
|
19509
|
+
hasOverflowTab && React__namespace.createElement(OverflowTab, Object.assign({ overflowingTabs: overflowingTabProps }, overflowObjectProps))),
|
|
19510
|
+
!isOverflowHorizontal && (React__namespace.createElement("button", { className: css(styles$f.tabsScrollButton, isSecondary && buttonStyles.modifiers.secondary), "aria-label": rightScrollAriaLabel, onClick: this.scrollRight, disabled: disableRightScrollButton, "aria-hidden": disableRightScrollButton },
|
|
19511
|
+
React__namespace.createElement(AngleRightIcon$1, null))),
|
|
19410
19512
|
onAdd !== undefined && (React__namespace.createElement("span", { className: css(styles$f.tabsAdd) },
|
|
19411
19513
|
React__namespace.createElement(Button, { variant: "plain", "aria-label": addButtonAriaLabel || 'Add tab', onClick: onAdd },
|
|
19412
19514
|
React__namespace.createElement(PlusIcon$1, null))))),
|
|
@@ -19443,12 +19545,6 @@
|
|
|
19443
19545
|
};
|
|
19444
19546
|
TabContentBody.displayName = 'TabContentBody';
|
|
19445
19547
|
|
|
19446
|
-
const TabTitleText = (_a) => {
|
|
19447
|
-
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
19448
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(styles$f.tabsItemText, className) }, props), children));
|
|
19449
|
-
};
|
|
19450
|
-
TabTitleText.displayName = 'TabTitleText';
|
|
19451
|
-
|
|
19452
19548
|
const TabTitleIcon = (_a) => {
|
|
19453
19549
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
19454
19550
|
return (React__namespace.createElement("span", Object.assign({ className: css(styles$f.tabsItemIcon, className) }, props), children));
|
|
@@ -20599,7 +20695,7 @@
|
|
|
20599
20695
|
|
|
20600
20696
|
const TreeViewListItemBase = ({ name, title, id, isExpanded, defaultExpanded = false, children = null, onSelect, onCheck, hasCheck = false, checkProps = {
|
|
20601
20697
|
checked: false
|
|
20602
|
-
}, hasBadge = false, customBadgeContent, badgeProps = { isRead: true }, isCompact, activeItems = [], itemData, parentItem, icon, expandedIcon, action, compareItems,
|
|
20698
|
+
}, hasBadge = false, customBadgeContent, badgeProps = { isRead: true }, isSelectable = false, isCompact, activeItems = [], itemData, parentItem, icon, expandedIcon, action, compareItems,
|
|
20603
20699
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
20604
20700
|
useMemo }) => {
|
|
20605
20701
|
const [internalIsExpanded, setIsExpanded] = React.useState(defaultExpanded);
|
|
@@ -20611,13 +20707,22 @@
|
|
|
20611
20707
|
setIsExpanded(internalIsExpanded || defaultExpanded);
|
|
20612
20708
|
}
|
|
20613
20709
|
}, [isExpanded, defaultExpanded]);
|
|
20614
|
-
|
|
20615
|
-
|
|
20616
|
-
|
|
20617
|
-
|
|
20710
|
+
let Component = 'button';
|
|
20711
|
+
if (hasCheck) {
|
|
20712
|
+
Component = 'label';
|
|
20713
|
+
}
|
|
20714
|
+
else if (isSelectable) {
|
|
20715
|
+
Component = 'div';
|
|
20716
|
+
}
|
|
20717
|
+
const ToggleComponent = hasCheck || isSelectable ? 'button' : 'span';
|
|
20718
|
+
const renderToggle = (randomId) => (React__default["default"].createElement(ToggleComponent, Object.assign({ className: css(styles$9.treeViewNodeToggle), onClick: (evt) => {
|
|
20719
|
+
if (isSelectable || hasCheck) {
|
|
20618
20720
|
setIsExpanded(!internalIsExpanded);
|
|
20619
20721
|
}
|
|
20620
|
-
|
|
20722
|
+
if (isSelectable) {
|
|
20723
|
+
evt.stopPropagation();
|
|
20724
|
+
}
|
|
20725
|
+
} }, ((hasCheck || isSelectable) && { 'aria-labelledby': `label-${randomId}` }), { tabIndex: -1 }),
|
|
20621
20726
|
React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeToggleIcon) },
|
|
20622
20727
|
React__default["default"].createElement(AngleRightIcon$1, { "aria-hidden": "true" }))));
|
|
20623
20728
|
const renderCheck = (randomId) => (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeCheck) },
|
|
@@ -20625,11 +20730,11 @@
|
|
|
20625
20730
|
const iconRendered = (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeIcon) },
|
|
20626
20731
|
!internalIsExpanded && icon,
|
|
20627
20732
|
internalIsExpanded && (expandedIcon || icon)));
|
|
20628
|
-
const renderNodeContent = (
|
|
20733
|
+
const renderNodeContent = () => {
|
|
20629
20734
|
const content = (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
20630
20735
|
isCompact && title && React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeTitle) }, title),
|
|
20631
|
-
hasCheck ? (React__default["default"].createElement("
|
|
20632
|
-
return isCompact ? React__default["default"].createElement("
|
|
20736
|
+
hasCheck ? (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeText) }, name)) : (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeText) }, name))));
|
|
20737
|
+
return isCompact ? React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeContent) }, content) : content;
|
|
20633
20738
|
};
|
|
20634
20739
|
const badgeRendered = (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
20635
20740
|
hasBadge && children && (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeCount) },
|
|
@@ -20638,7 +20743,7 @@
|
|
|
20638
20743
|
React__default["default"].createElement(Badge, Object.assign({}, badgeProps), customBadgeContent)))));
|
|
20639
20744
|
return (React__default["default"].createElement("li", Object.assign({ id: id, className: css(styles$9.treeViewListItem, internalIsExpanded && styles$9.modifiers.expanded) }, (internalIsExpanded && { 'aria-expanded': 'true' }), { role: "treeitem", tabIndex: -1 }),
|
|
20640
20745
|
React__default["default"].createElement("div", { className: css(styles$9.treeViewContent) },
|
|
20641
|
-
React__default["default"].createElement(GenerateId, { prefix:
|
|
20746
|
+
React__default["default"].createElement(GenerateId, { prefix: isSelectable ? 'selectable-id' : 'checkbox-id' }, randomId => (React__default["default"].createElement(Component, Object.assign({ className: css(styles$9.treeViewNode, children && (isSelectable || hasCheck) && styles$9.modifiers.selectable, (!children || isSelectable) &&
|
|
20642
20747
|
activeItems &&
|
|
20643
20748
|
activeItems.length > 0 &&
|
|
20644
20749
|
activeItems.some(item => compareItems && item && compareItems(item, itemData))
|
|
@@ -20646,16 +20751,16 @@
|
|
|
20646
20751
|
: ''), onClick: (evt) => {
|
|
20647
20752
|
if (!hasCheck) {
|
|
20648
20753
|
onSelect && onSelect(evt, itemData, parentItem);
|
|
20649
|
-
if (children && evt.isDefaultPrevented() !== true) {
|
|
20754
|
+
if (!isSelectable && children && evt.isDefaultPrevented() !== true) {
|
|
20650
20755
|
setIsExpanded(!internalIsExpanded);
|
|
20651
20756
|
}
|
|
20652
20757
|
}
|
|
20653
|
-
}, tabIndex: -1 },
|
|
20654
|
-
React__default["default"].createElement("
|
|
20758
|
+
}, tabIndex: isSelectable ? 0 : -1 }, (hasCheck && { htmlFor: randomId }), ((hasCheck || (isSelectable && children)) && { id: `label-${randomId}` })),
|
|
20759
|
+
React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeContainer) },
|
|
20655
20760
|
children && renderToggle(randomId),
|
|
20656
20761
|
hasCheck && renderCheck(randomId),
|
|
20657
20762
|
icon && iconRendered,
|
|
20658
|
-
renderNodeContent(
|
|
20763
|
+
renderNodeContent(),
|
|
20659
20764
|
badgeRendered)))),
|
|
20660
20765
|
action && React__default["default"].createElement("div", { className: css(styles$9.treeViewAction) }, action)),
|
|
20661
20766
|
internalIsExpanded && children));
|
|
@@ -20826,11 +20931,11 @@
|
|
|
20826
20931
|
}
|
|
20827
20932
|
|
|
20828
20933
|
const TreeView = (_a) => {
|
|
20829
|
-
var { data, isNested = false, hasChecks = false, hasBadges = false, hasGuides = false, variant = 'default', defaultAllExpanded = false, allExpanded, icon, expandedIcon, parentItem, onSelect, onCheck, toolbar, activeItems, compareItems = (item, itemToCheck) => item.id === itemToCheck.id, className, useMemo } = _a, props = __rest$1(_a, ["data", "isNested", "hasChecks", "hasBadges", "hasGuides", "variant", "defaultAllExpanded", "allExpanded", "icon", "expandedIcon", "parentItem", "onSelect", "onCheck", "toolbar", "activeItems", "compareItems", "className", "useMemo"]);
|
|
20934
|
+
var { data, isNested = false, hasChecks = false, hasBadges = false, hasGuides = false, hasSelectableNodes = false, variant = 'default', defaultAllExpanded = false, allExpanded, icon, expandedIcon, parentItem, onSelect, onCheck, toolbar, activeItems, compareItems = (item, itemToCheck) => item.id === itemToCheck.id, className, useMemo } = _a, props = __rest$1(_a, ["data", "isNested", "hasChecks", "hasBadges", "hasGuides", "hasSelectableNodes", "variant", "defaultAllExpanded", "allExpanded", "icon", "expandedIcon", "parentItem", "onSelect", "onCheck", "toolbar", "activeItems", "compareItems", "className", "useMemo"]);
|
|
20830
20935
|
const treeViewList = (React__namespace.createElement(TreeViewList, { isNested: isNested, toolbar: toolbar }, data.map(item => {
|
|
20831
20936
|
var _a;
|
|
20832
|
-
return (React__namespace.createElement(TreeViewListItem, Object.assign({ key: ((_a = item.id) === null || _a === void 0 ? void 0 : _a.toString()) || item.name.toString(), name: item.name, title: item.title, id: item.id, isExpanded: allExpanded, defaultExpanded: item.defaultExpanded !== undefined ? item.defaultExpanded : defaultAllExpanded, onSelect: onSelect, onCheck: onCheck, hasCheck: item.hasCheck !== undefined ? item.hasCheck : hasChecks, checkProps: item.checkProps, hasBadge: item.hasBadge !== undefined ? item.hasBadge : hasBadges, customBadgeContent: item.customBadgeContent, badgeProps: item.badgeProps, activeItems: activeItems, parentItem: parentItem, itemData: item, icon: item.icon !== undefined ? item.icon : icon, expandedIcon: item.expandedIcon !== undefined ? item.expandedIcon : expandedIcon, action: item.action, compareItems: compareItems, isCompact: variant === 'compact' || variant === 'compactNoBackground', useMemo: useMemo }, (item.children && {
|
|
20833
|
-
children: (React__namespace.createElement(TreeView, { data: item.children, isNested: true, parentItem: item, hasChecks: hasChecks, hasBadges: hasBadges, hasGuides: hasGuides, variant: variant, allExpanded: allExpanded, defaultAllExpanded: defaultAllExpanded, onSelect: onSelect, onCheck: onCheck, activeItems: activeItems, icon: icon, expandedIcon: expandedIcon }))
|
|
20937
|
+
return (React__namespace.createElement(TreeViewListItem, Object.assign({ key: ((_a = item.id) === null || _a === void 0 ? void 0 : _a.toString()) || item.name.toString(), name: item.name, title: item.title, id: item.id, isExpanded: allExpanded, isSelectable: hasSelectableNodes, defaultExpanded: item.defaultExpanded !== undefined ? item.defaultExpanded : defaultAllExpanded, onSelect: onSelect, onCheck: onCheck, hasCheck: item.hasCheck !== undefined ? item.hasCheck : hasChecks, checkProps: item.checkProps, hasBadge: item.hasBadge !== undefined ? item.hasBadge : hasBadges, customBadgeContent: item.customBadgeContent, badgeProps: item.badgeProps, activeItems: activeItems, parentItem: parentItem, itemData: item, icon: item.icon !== undefined ? item.icon : icon, expandedIcon: item.expandedIcon !== undefined ? item.expandedIcon : expandedIcon, action: item.action, compareItems: compareItems, isCompact: variant === 'compact' || variant === 'compactNoBackground', useMemo: useMemo }, (item.children && {
|
|
20938
|
+
children: (React__namespace.createElement(TreeView, { data: item.children, isNested: true, parentItem: item, hasChecks: hasChecks, hasBadges: hasBadges, hasGuides: hasGuides, hasSelectableNodes: hasSelectableNodes, variant: variant, allExpanded: allExpanded, defaultAllExpanded: defaultAllExpanded, onSelect: onSelect, onCheck: onCheck, activeItems: activeItems, icon: icon, expandedIcon: expandedIcon }))
|
|
20834
20939
|
}))));
|
|
20835
20940
|
})));
|
|
20836
20941
|
return (React__namespace.createElement(React__namespace.Fragment, null, parentItem ? (treeViewList) : (React__namespace.createElement(TreeViewRoot, Object.assign({ hasChecks: hasChecks, hasGuides: hasGuides, variant: variant, className: className }, props), treeViewList))));
|
|
@@ -22772,23 +22772,16 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
22772
22772
|
--pf-c-badge--m-read--BackgroundColor: var(--pf-c-tree-view__node-count--c-badge--m-read--BackgroundColor);
|
|
22773
22773
|
}
|
|
22774
22774
|
|
|
22775
|
-
.pf-c-tree-view__node.pf-m-selectable .pf-c-tree-view__node-toggle {
|
|
22776
|
-
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--Color
|
|
22777
|
-
}
|
|
22778
|
-
|
|
22779
|
-
.pf-c-tree-view__node:hover,
|
|
22780
|
-
.pf-c-tree-view__node .pf-c-tree-view__node-toggle:hover {
|
|
22781
|
-
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--hover__icon--Color);
|
|
22775
|
+
.pf-c-tree-view__node:not(.pf-m-selectable):hover, .pf-c-tree-view__node.pf-m-selectable .pf-c-tree-view__node-toggle:hover {
|
|
22776
|
+
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--hover--Color);
|
|
22782
22777
|
}
|
|
22783
22778
|
|
|
22784
|
-
.pf-c-tree-view__node:focus,
|
|
22785
|
-
|
|
22786
|
-
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--focus__icon--Color);
|
|
22779
|
+
.pf-c-tree-view__node:not(.pf-m-selectable):focus, .pf-c-tree-view__node.pf-m-selectable .pf-c-tree-view__node-toggle:focus {
|
|
22780
|
+
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--focus--Color);
|
|
22787
22781
|
}
|
|
22788
22782
|
|
|
22789
|
-
.pf-c-tree-view__node:active,
|
|
22790
|
-
|
|
22791
|
-
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--active__icon--Color);
|
|
22783
|
+
.pf-c-tree-view__node:not(.pf-m-selectable):active, .pf-c-tree-view__node.pf-m-selectable .pf-c-tree-view__node-toggle:active {
|
|
22784
|
+
--pf-c-tree-view__node-toggle--Color: var(--pf-c-tree-view__node-toggle--active--Color);
|
|
22792
22785
|
}
|
|
22793
22786
|
|
|
22794
22787
|
.pf-c-tree-view__node-container {
|