@patternfly/react-core 4.186.0 → 4.187.2
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 +38 -0
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +2 -0
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js +3 -2
- package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +13 -7
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +2 -0
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js +3 -2
- package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +13 -7
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/umd/react-core.js +16 -9
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +6 -6
- package/src/components/ExpandableSection/ExpandableSection.tsx +5 -0
- package/src/components/ExpandableSection/__tests__/ExpandableSection.test.tsx +5 -0
- package/src/components/ExpandableSection/__tests__/__snapshots__/ExpandableSection.test.tsx.snap +35 -0
- package/src/components/ExpandableSection/examples/ExpandableSection.md +35 -0
- package/src/components/Select/Select.tsx +17 -8
- package/src/components/Select/examples/Select.md +31 -13
package/dist/umd/react-core.js
CHANGED
|
@@ -6702,16 +6702,22 @@
|
|
|
6702
6702
|
this.refCollection[this.state.viewMoreNextIndex][0]) {
|
|
6703
6703
|
this.refCollection[this.state.viewMoreNextIndex][0].focus();
|
|
6704
6704
|
}
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6705
|
+
const hasUpdatedChildren = prevProps.children.length !== this.props.children.length ||
|
|
6706
|
+
prevProps.children.some((prevChild, index) => {
|
|
6707
|
+
const prevChildProps = prevChild.props;
|
|
6708
|
+
const currChild = this.props.children[index];
|
|
6709
|
+
const { props: currChildProps } = currChild;
|
|
6710
|
+
if (prevChildProps && currChildProps) {
|
|
6711
|
+
return (prevChildProps.value !== currChildProps.value ||
|
|
6712
|
+
prevChildProps.label !== currChildProps.label ||
|
|
6713
|
+
prevChildProps.isDisabled !== currChildProps.isDisabled ||
|
|
6714
|
+
prevChildProps.isPlaceholder !== currChildProps.isPlaceholder);
|
|
6710
6715
|
}
|
|
6711
6716
|
else {
|
|
6712
|
-
return
|
|
6717
|
+
return prevChild !== currChild;
|
|
6713
6718
|
}
|
|
6714
|
-
})
|
|
6719
|
+
});
|
|
6720
|
+
if (hasUpdatedChildren) {
|
|
6715
6721
|
this.updateTypeAheadFilteredChildren(prevState.typeaheadInputValue || '', null);
|
|
6716
6722
|
}
|
|
6717
6723
|
// for menus with favorites,
|
|
@@ -10668,7 +10674,7 @@
|
|
|
10668
10674
|
render() {
|
|
10669
10675
|
const _a = this.props, { onToggle: onToggleProp,
|
|
10670
10676
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10671
|
-
isActive, className, toggleText, toggleTextExpanded, toggleTextCollapsed, children, isExpanded, isDetached, displaySize, isWidthLimited, contentId } = _a, props = __rest$1(_a, ["onToggle", "isActive", "className", "toggleText", "toggleTextExpanded", "toggleTextCollapsed", "children", "isExpanded", "isDetached", "displaySize", "isWidthLimited", "contentId"]);
|
|
10677
|
+
isActive, className, toggleText, toggleTextExpanded, toggleTextCollapsed, children, isExpanded, isDetached, displaySize, isWidthLimited, isIndented, contentId } = _a, props = __rest$1(_a, ["onToggle", "isActive", "className", "toggleText", "toggleTextExpanded", "toggleTextCollapsed", "children", "isExpanded", "isDetached", "displaySize", "isWidthLimited", "isIndented", "contentId"]);
|
|
10672
10678
|
let onToggle = onToggleProp;
|
|
10673
10679
|
let propOrStateIsExpanded = isExpanded;
|
|
10674
10680
|
// uncontrolled
|
|
@@ -10679,7 +10685,7 @@
|
|
|
10679
10685
|
};
|
|
10680
10686
|
}
|
|
10681
10687
|
const computedToggleText = this.calculateToggleText(toggleText, toggleTextExpanded, toggleTextCollapsed, propOrStateIsExpanded);
|
|
10682
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$L.expandableSection, propOrStateIsExpanded && _default$L.modifiers.expanded, isActive && _default$L.modifiers.active, isDetached && _default$L.modifiers.detached, displaySize === 'large' && _default$L.modifiers.displayLg, isWidthLimited && _default$L.modifiers.limitWidth, className) }),
|
|
10688
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$L.expandableSection, propOrStateIsExpanded && _default$L.modifiers.expanded, isActive && _default$L.modifiers.active, isDetached && _default$L.modifiers.detached, displaySize === 'large' && _default$L.modifiers.displayLg, isWidthLimited && _default$L.modifiers.limitWidth, isIndented && _default$L.modifiers.indented, className) }),
|
|
10683
10689
|
!isDetached && (React__namespace.createElement("button", { className: css(_default$L.expandableSectionToggle), type: "button", "aria-expanded": propOrStateIsExpanded, onClick: () => onToggle(!propOrStateIsExpanded) },
|
|
10684
10690
|
React__namespace.createElement("span", { className: css(_default$L.expandableSectionToggleIcon) },
|
|
10685
10691
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true })),
|
|
@@ -10699,6 +10705,7 @@
|
|
|
10699
10705
|
isDetached: false,
|
|
10700
10706
|
displaySize: 'default',
|
|
10701
10707
|
isWidthLimited: false,
|
|
10708
|
+
isIndented: false,
|
|
10702
10709
|
contentId: ''
|
|
10703
10710
|
};
|
|
10704
10711
|
|