@patternfly/react-core 4.184.1 → 4.186.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 +38 -0
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +2 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/esm/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
- package/dist/esm/components/ToggleGroup/ToggleGroup.js +7 -4
- package/dist/esm/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +2 -1
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/ToggleGroup/ToggleGroup.d.ts +2 -0
- package/dist/js/components/ToggleGroup/ToggleGroup.d.ts.map +1 -1
- package/dist/js/components/ToggleGroup/ToggleGroup.js +7 -4
- package/dist/js/components/ToggleGroup/ToggleGroup.js.map +1 -1
- package/dist/umd/react-core.css +16 -2
- package/dist/umd/react-core.js +14 -11
- package/dist/umd/react-core.min.css +16 -2
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +6 -6
- package/src/components/Select/Select.tsx +2 -1
- package/src/components/ToggleGroup/ToggleGroup.tsx +9 -3
- package/src/components/ToggleGroup/__tests__/__snapshots__/ToggleGroup.test.tsx.snap +2 -0
- package/src/components/ToggleGroup/examples/ToggleGroup.md +21 -8
package/dist/umd/react-core.js
CHANGED
|
@@ -6698,7 +6698,8 @@
|
|
|
6698
6698
|
// if viewMoreNextIndex is not -1, view more was clicked, set focus on first newly loaded item
|
|
6699
6699
|
if (this.state.viewMoreNextIndex !== -1 &&
|
|
6700
6700
|
this.refCollection.length > this.state.viewMoreNextIndex &&
|
|
6701
|
-
this.props.loadingVariant !== 'spinner'
|
|
6701
|
+
this.props.loadingVariant !== 'spinner' &&
|
|
6702
|
+
this.refCollection[this.state.viewMoreNextIndex][0]) {
|
|
6702
6703
|
this.refCollection[this.state.viewMoreNextIndex][0].focus();
|
|
6703
6704
|
}
|
|
6704
6705
|
// the number or contents of the children has changed, update state.typeaheadFilteredChildren
|
|
@@ -18199,16 +18200,6 @@
|
|
|
18199
18200
|
"toggleGroupText": "pf-c-toggle-group__text"
|
|
18200
18201
|
};
|
|
18201
18202
|
|
|
18202
|
-
const ToggleGroup = (_a) => {
|
|
18203
|
-
var { className, children, isCompact = false, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["className", "children", "isCompact", 'aria-label']);
|
|
18204
|
-
const toggleGroupItemList = [];
|
|
18205
|
-
React__namespace.Children.forEach(children, child => {
|
|
18206
|
-
toggleGroupItemList.push(child);
|
|
18207
|
-
});
|
|
18208
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toggleGroup, isCompact && _default$d.modifiers.compact, className), role: "group", "aria-label": ariaLabel }, props), toggleGroupItemList));
|
|
18209
|
-
};
|
|
18210
|
-
ToggleGroup.displayName = 'ToggleGroup';
|
|
18211
|
-
|
|
18212
18203
|
var ToggleGroupItemVariant;
|
|
18213
18204
|
(function (ToggleGroupItemVariant) {
|
|
18214
18205
|
ToggleGroupItemVariant["icon"] = "icon";
|
|
@@ -18233,6 +18224,18 @@
|
|
|
18233
18224
|
};
|
|
18234
18225
|
ToggleGroupItem.displayName = 'ToggleGroupItem';
|
|
18235
18226
|
|
|
18227
|
+
const ToggleGroup = (_a) => {
|
|
18228
|
+
var { className, children, isCompact = false, areAllGroupsDisabled = false, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["className", "children", "isCompact", "areAllGroupsDisabled", 'aria-label']);
|
|
18229
|
+
const toggleGroupItemList = React__namespace.Children.map(children, child => {
|
|
18230
|
+
const childCompName = child.type.name;
|
|
18231
|
+
return childCompName !== ToggleGroupItem.name
|
|
18232
|
+
? child
|
|
18233
|
+
: React__namespace.cloneElement(child, areAllGroupsDisabled ? { isDisabled: true } : {});
|
|
18234
|
+
});
|
|
18235
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toggleGroup, isCompact && _default$d.modifiers.compact, className), role: "group", "aria-label": ariaLabel }, props), toggleGroupItemList));
|
|
18236
|
+
};
|
|
18237
|
+
ToggleGroup.displayName = 'ToggleGroup';
|
|
18238
|
+
|
|
18236
18239
|
var _default$c = {
|
|
18237
18240
|
"button": "pf-c-button",
|
|
18238
18241
|
"chipGroup": "pf-c-chip-group",
|
|
@@ -1729,6 +1729,7 @@ button.pf-c-breadcrumb__link {
|
|
|
1729
1729
|
--pf-c-button__progress--width: calc(var(--pf-global--icon--FontSize--md) + var(--pf-global--spacer--sm));
|
|
1730
1730
|
--pf-c-button__progress--Opacity: 0;
|
|
1731
1731
|
--pf-c-button__progress--TranslateY: -50%;
|
|
1732
|
+
--pf-c-button__progress--TranslateX: 0;
|
|
1732
1733
|
--pf-c-button__progress--Top: 50%;
|
|
1733
1734
|
--pf-c-button__progress--Left: var(--pf-global--spacer--md);
|
|
1734
1735
|
--pf-c-button--m-progress--TransitionProperty: padding;
|
|
@@ -1737,6 +1738,9 @@ button.pf-c-breadcrumb__link {
|
|
|
1737
1738
|
--pf-c-button--m-progress--PaddingLeft: calc(var(--pf-global--spacer--md) + var(--pf-c-button__progress--width) / 2);
|
|
1738
1739
|
--pf-c-button--m-in-progress--PaddingRight: var(--pf-global--spacer--md);
|
|
1739
1740
|
--pf-c-button--m-in-progress--PaddingLeft: calc(var(--pf-global--spacer--md) + var(--pf-c-button__progress--width));
|
|
1741
|
+
--pf-c-button--m-in-progress--m-plain--Color: var(--pf-global--primary-color--100);
|
|
1742
|
+
--pf-c-button--m-in-progress--m-plain__progress--Left: 50%;
|
|
1743
|
+
--pf-c-button--m-in-progress--m-plain__progress--TranslateX: -50%;
|
|
1740
1744
|
position: relative;
|
|
1741
1745
|
display: inline-block;
|
|
1742
1746
|
padding: var(--pf-c-button--PaddingTop) var(--pf-c-button--PaddingRight) var(--pf-c-button--PaddingBottom) var(--pf-c-button--PaddingLeft);
|
|
@@ -2084,11 +2088,21 @@ button.pf-c-breadcrumb__link {
|
|
|
2084
2088
|
transition: var(--pf-c-button--m-progress--TransitionProperty) var(--pf-c-button--m-progress--TransitionDuration);
|
|
2085
2089
|
}
|
|
2086
2090
|
|
|
2087
|
-
.pf-c-button.pf-m-in-progress {
|
|
2091
|
+
.pf-c-button.pf-m-in-progress:not(.pf-m-plain) {
|
|
2088
2092
|
--pf-c-button--PaddingRight: var(--pf-c-button--m-in-progress--PaddingRight);
|
|
2089
2093
|
--pf-c-button--PaddingLeft: var(--pf-c-button--m-in-progress--PaddingLeft);
|
|
2090
2094
|
}
|
|
2091
2095
|
|
|
2096
|
+
.pf-c-button.pf-m-in-progress.pf-m-plain {
|
|
2097
|
+
--pf-c-button--m-plain--Color: var(--pf-c-button--m-in-progress--m-plain--Color);
|
|
2098
|
+
--pf-c-button__progress--Left: var(--pf-c-button--m-in-progress--m-plain__progress--Left);
|
|
2099
|
+
--pf-c-button__progress--TranslateX: var(--pf-c-button--m-in-progress--m-plain__progress--TranslateX);
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2102
|
+
.pf-c-button.pf-m-in-progress.pf-m-plain > :not(.pf-c-button__progress) {
|
|
2103
|
+
opacity: 0;
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2092
2106
|
.pf-c-button__icon.pf-m-start {
|
|
2093
2107
|
margin-right: var(--pf-c-button__icon--m-start--MarginRight);
|
|
2094
2108
|
}
|
|
@@ -2102,7 +2116,7 @@ button.pf-c-breadcrumb__link {
|
|
|
2102
2116
|
top: var(--pf-c-button__progress--Top);
|
|
2103
2117
|
left: var(--pf-c-button__progress--Left);
|
|
2104
2118
|
line-height: 1;
|
|
2105
|
-
transform:
|
|
2119
|
+
transform: translate(var(--pf-c-button__progress--TranslateX), var(--pf-c-button__progress--TranslateY));
|
|
2106
2120
|
}
|
|
2107
2121
|
|
|
2108
2122
|
.pf-c-button__progress .pf-c-spinner {
|