@patternfly/react-core 4.183.11 → 4.185.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/Dropdown/Dropdown.d.ts +2 -0
- package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts +2 -0
- package/dist/esm/components/Dropdown/DropdownToggle.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/DropdownToggle.js +3 -3
- package/dist/esm/components/Dropdown/DropdownToggle.js.map +1 -1
- package/dist/esm/components/Dropdown/DropdownWithContext.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/DropdownWithContext.js +4 -2
- package/dist/esm/components/Dropdown/DropdownWithContext.js.map +1 -1
- package/dist/esm/components/Dropdown/Toggle.d.ts +2 -0
- package/dist/esm/components/Dropdown/Toggle.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Toggle.js +4 -3
- package/dist/esm/components/Dropdown/Toggle.js.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/js/components/Dropdown/DropdownToggle.d.ts +2 -0
- package/dist/js/components/Dropdown/DropdownToggle.d.ts.map +1 -1
- package/dist/js/components/Dropdown/DropdownToggle.js +3 -3
- package/dist/js/components/Dropdown/DropdownToggle.js.map +1 -1
- package/dist/js/components/Dropdown/DropdownWithContext.d.ts.map +1 -1
- package/dist/js/components/Dropdown/DropdownWithContext.js +4 -2
- package/dist/js/components/Dropdown/DropdownWithContext.js.map +1 -1
- package/dist/js/components/Dropdown/Toggle.d.ts +2 -0
- package/dist/js/components/Dropdown/Toggle.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Toggle.js +4 -3
- package/dist/js/components/Dropdown/Toggle.js.map +1 -1
- package/dist/umd/react-core.css +16 -2
- package/dist/umd/react-core.js +11 -8
- package/dist/umd/react-core.min.css +47 -33
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +6 -6
- package/src/components/ActionList/examples/ActionList.md +4 -201
- package/src/components/ActionList/examples/ActionListMultipleGroups.tsx +31 -0
- package/src/components/ActionList/examples/ActionListSingleGroup.tsx +86 -0
- package/src/components/ActionList/examples/ActionListWithCancelButton.tsx +43 -0
- package/src/components/ActionList/examples/ActionListWithIcons.tsx +19 -0
- package/src/components/ApplicationLauncher/__tests__/Generated/__snapshots__/ApplicationLauncher.test.tsx.snap +1 -0
- package/src/components/ApplicationLauncher/__tests__/__snapshots__/ApplicationLauncher.test.tsx.snap +18 -0
- package/src/components/Dropdown/Dropdown.tsx +2 -0
- package/src/components/Dropdown/DropdownToggle.tsx +4 -0
- package/src/components/Dropdown/DropdownWithContext.tsx +3 -0
- package/src/components/Dropdown/Toggle.tsx +5 -0
- package/src/components/Dropdown/__tests__/DropdownToggle.test.tsx +11 -0
- package/src/components/Dropdown/__tests__/Generated/__snapshots__/Dropdown.test.tsx.snap +1 -0
- package/src/components/Dropdown/__tests__/Generated/__snapshots__/KebabToggle.test.tsx.snap +1 -0
- package/src/components/Dropdown/__tests__/__snapshots__/Dropdown.test.tsx.snap +45 -0
- package/src/components/Dropdown/__tests__/__snapshots__/DropdownToggle.test.tsx.snap +94 -8
- package/src/components/Dropdown/__tests__/__snapshots__/Toggle.test.tsx.snap +2 -0
- package/src/components/Dropdown/examples/Dropdown.md +57 -0
- package/src/components/OptionsMenu/__tests__/Generated/__snapshots__/OptionsMenu.test.tsx.snap +1 -0
- package/src/components/OptionsMenu/__tests__/__snapshots__/OptionsMenu.test.tsx.snap +31 -0
- package/src/components/Pagination/__tests__/Generated/__snapshots__/PaginationOptionsMenu.test.tsx.snap +1 -0
- package/src/components/Pagination/__tests__/__snapshots__/Pagination.test.tsx.snap +47 -0
package/dist/umd/react-core.js
CHANGED
|
@@ -4702,9 +4702,9 @@
|
|
|
4702
4702
|
}
|
|
4703
4703
|
}
|
|
4704
4704
|
render() {
|
|
4705
|
-
const _a = this.props, { children, className, direction, dropdownItems, isOpen, isPlain, isGrouped, isFullHeight,
|
|
4705
|
+
const _a = this.props, { children, className, direction, dropdownItems, isOpen, isPlain, isText, isGrouped, isFullHeight,
|
|
4706
4706
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4707
|
-
onSelect, position, toggle, autoFocus, menuAppendTo } = _a, props = __rest$1(_a, ["children", "className", "direction", "dropdownItems", "isOpen", "isPlain", "isGrouped", "isFullHeight", "onSelect", "position", "toggle", "autoFocus", "menuAppendTo"]);
|
|
4707
|
+
onSelect, position, toggle, autoFocus, menuAppendTo } = _a, props = __rest$1(_a, ["children", "className", "direction", "dropdownItems", "isOpen", "isPlain", "isText", "isGrouped", "isFullHeight", "onSelect", "position", "toggle", "autoFocus", "menuAppendTo"]);
|
|
4708
4708
|
const id = toggle.props.id || `pf-dropdown-toggle-id-${DropdownWithContext.currentId++}`;
|
|
4709
4709
|
let component;
|
|
4710
4710
|
let renderedContent;
|
|
@@ -4730,6 +4730,7 @@
|
|
|
4730
4730
|
isOpen,
|
|
4731
4731
|
id,
|
|
4732
4732
|
isPlain,
|
|
4733
|
+
isText,
|
|
4733
4734
|
'aria-haspopup': ariaHasPopup,
|
|
4734
4735
|
onEnter: () => {
|
|
4735
4736
|
this.onEnter();
|
|
@@ -4755,6 +4756,7 @@
|
|
|
4755
4756
|
dropdownItems: [],
|
|
4756
4757
|
isOpen: false,
|
|
4757
4758
|
isPlain: false,
|
|
4759
|
+
isText: false,
|
|
4758
4760
|
isGrouped: false,
|
|
4759
4761
|
position: exports.DropdownPosition.left,
|
|
4760
4762
|
direction: exports.DropdownDirection.down,
|
|
@@ -5097,12 +5099,12 @@
|
|
|
5097
5099
|
};
|
|
5098
5100
|
}
|
|
5099
5101
|
render() {
|
|
5100
|
-
const _a = this.props, { className, children, isOpen, isDisabled, isPlain, isPrimary, isSplitButton, toggleVariant, onToggle, 'aria-haspopup': ariaHasPopup,
|
|
5102
|
+
const _a = this.props, { className, children, isOpen, isDisabled, isPlain, isText, isPrimary, isSplitButton, toggleVariant, onToggle, 'aria-haspopup': ariaHasPopup,
|
|
5101
5103
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5102
5104
|
isActive, bubbleEvent, onEnter, parentRef, getMenuRef,
|
|
5103
5105
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5104
|
-
id, type } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isDisabled", "isPlain", "isPrimary", "isSplitButton", "toggleVariant", "onToggle", 'aria-haspopup', "isActive", "bubbleEvent", "onEnter", "parentRef", "getMenuRef", "id", "type"]);
|
|
5105
|
-
return (React__namespace.createElement(DropdownContext.Consumer, null, ({ toggleClass }) => (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.buttonRef, className: css(isSplitButton ? _default$1a.dropdownToggleButton : toggleClass || _default$1a.dropdownToggle, isActive && _default$1a.modifiers.active, isPlain && _default$1a.modifiers.plain, isPrimary && _default$1a.modifiers.primary, buttonVariantStyles[toggleVariant], className), type: type || 'button', onClick: event => onToggle(!isOpen, event), "aria-expanded": isOpen, "aria-haspopup": ariaHasPopup, onKeyDown: event => this.onKeyDown(event), disabled: isDisabled }), children))));
|
|
5106
|
+
id, type } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isDisabled", "isPlain", "isText", "isPrimary", "isSplitButton", "toggleVariant", "onToggle", 'aria-haspopup', "isActive", "bubbleEvent", "onEnter", "parentRef", "getMenuRef", "id", "type"]);
|
|
5107
|
+
return (React__namespace.createElement(DropdownContext.Consumer, null, ({ toggleClass }) => (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.buttonRef, className: css(isSplitButton ? _default$1a.dropdownToggleButton : toggleClass || _default$1a.dropdownToggle, isActive && _default$1a.modifiers.active, isPlain && _default$1a.modifiers.plain, isText && _default$1a.modifiers.text, isPrimary && _default$1a.modifiers.primary, buttonVariantStyles[toggleVariant], className), type: type || 'button', onClick: event => onToggle(!isOpen, event), "aria-expanded": isOpen, "aria-haspopup": ariaHasPopup, onKeyDown: event => this.onKeyDown(event), disabled: isDisabled }), children))));
|
|
5106
5108
|
}
|
|
5107
5109
|
}
|
|
5108
5110
|
Toggle.displayName = 'Toggle';
|
|
@@ -5112,6 +5114,7 @@
|
|
|
5112
5114
|
isActive: false,
|
|
5113
5115
|
isDisabled: false,
|
|
5114
5116
|
isPlain: false,
|
|
5117
|
+
isText: false,
|
|
5115
5118
|
isPrimary: false,
|
|
5116
5119
|
isSplitButton: false,
|
|
5117
5120
|
onToggle: () => { },
|
|
@@ -5172,16 +5175,16 @@
|
|
|
5172
5175
|
KebabToggle.displayName = 'KebabToggle';
|
|
5173
5176
|
|
|
5174
5177
|
const DropdownToggle = (_a) => {
|
|
5175
|
-
var { id = '', children = null, className = '', isOpen = false, parentRef = null, getMenuRef = null, isDisabled = false, isPlain = false, isPrimary = false, toggleVariant = 'default',
|
|
5178
|
+
var { id = '', children = null, className = '', isOpen = false, parentRef = null, getMenuRef = null, isDisabled = false, isPlain = false, isText = false, isPrimary = false, toggleVariant = 'default',
|
|
5176
5179
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5177
5180
|
isActive = false,
|
|
5178
5181
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5179
5182
|
onToggle = (_isOpen) => undefined, icon = null, toggleIndicator: ToggleIndicator = CaretDownIcon$1, splitButtonItems, splitButtonVariant = 'checkbox', 'aria-haspopup': ariaHasPopup, ouiaId, ouiaSafe,
|
|
5180
5183
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5181
5184
|
ref } = _a, // Types of Ref are different for React.FC vs React.Component
|
|
5182
|
-
props = __rest$1(_a, ["id", "children", "className", "isOpen", "parentRef", "getMenuRef", "isDisabled", "isPlain", "isPrimary", "toggleVariant", "isActive", "onToggle", "icon", "toggleIndicator", "splitButtonItems", "splitButtonVariant", 'aria-haspopup', "ouiaId", "ouiaSafe", "ref"]);
|
|
5185
|
+
props = __rest$1(_a, ["id", "children", "className", "isOpen", "parentRef", "getMenuRef", "isDisabled", "isPlain", "isText", "isPrimary", "toggleVariant", "isActive", "onToggle", "icon", "toggleIndicator", "splitButtonItems", "splitButtonVariant", 'aria-haspopup', "ouiaId", "ouiaSafe", "ref"]);
|
|
5183
5186
|
const ouiaProps = useOUIAProps(DropdownToggle.displayName, ouiaId, ouiaSafe);
|
|
5184
|
-
const toggle = (React__namespace.createElement(DropdownContext.Consumer, null, ({ toggleTextClass, toggleIndicatorClass, toggleIconClass }) => (React__namespace.createElement(Toggle, Object.assign({}, props, { id: id, className: className, isOpen: isOpen, parentRef: parentRef, getMenuRef: getMenuRef, isActive: isActive, isDisabled: isDisabled, isPlain: isPlain, isPrimary: isPrimary, toggleVariant: toggleVariant, onToggle: onToggle, "aria-haspopup": ariaHasPopup }, ouiaProps, (splitButtonItems && { isSplitButton: true, 'aria-label': props['aria-label'] || 'Select' })),
|
|
5187
|
+
const toggle = (React__namespace.createElement(DropdownContext.Consumer, null, ({ toggleTextClass, toggleIndicatorClass, toggleIconClass }) => (React__namespace.createElement(Toggle, Object.assign({}, props, { id: id, className: className, isOpen: isOpen, parentRef: parentRef, getMenuRef: getMenuRef, isActive: isActive, isDisabled: isDisabled, isPlain: isPlain, isText: isText, isPrimary: isPrimary, toggleVariant: toggleVariant, onToggle: onToggle, "aria-haspopup": ariaHasPopup }, ouiaProps, (splitButtonItems && { isSplitButton: true, 'aria-label': props['aria-label'] || 'Select' })),
|
|
5185
5188
|
icon && React__namespace.createElement("span", { className: css(toggleIconClass) }, icon),
|
|
5186
5189
|
children && React__namespace.createElement("span", { className: ToggleIndicator && css(toggleTextClass) }, children),
|
|
5187
5190
|
ToggleIndicator && (React__namespace.createElement("span", { className: css(!splitButtonItems && toggleIndicatorClass) },
|
|
@@ -21,6 +21,37 @@
|
|
|
21
21
|
overflow: hidden;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
+
.pf-c-action-list {
|
|
25
|
+
--pf-c-action-list--m-icon--spacer: 0;
|
|
26
|
+
--pf-c-action-list--child--spacer-base: var(--pf-global--spacer--md);
|
|
27
|
+
--pf-c-action-list--group--spacer-base: var(--pf-global--spacer--2xl);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.pf-c-action-list,
|
|
31
|
+
.pf-c-action-list__group {
|
|
32
|
+
--pf-c-action-list--child--spacer: var(--pf-c-action-list--child--spacer-base);
|
|
33
|
+
--pf-c-action-list--group--spacer: var(--pf-c-action-list--group--spacer-base);
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.pf-c-action-list > * + *,
|
|
39
|
+
.pf-c-action-list__group > * + * {
|
|
40
|
+
margin-left: var(--pf-c-action-list--child--spacer);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.pf-c-action-list > * + .pf-c-action-list__group,
|
|
44
|
+
.pf-c-action-list .pf-c-action-list__group + *,
|
|
45
|
+
.pf-c-action-list__group > * + .pf-c-action-list__group,
|
|
46
|
+
.pf-c-action-list__group .pf-c-action-list__group + * {
|
|
47
|
+
margin-left: var(--pf-c-action-list--group--spacer);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.pf-c-action-list.pf-m-icons,
|
|
51
|
+
.pf-c-action-list__group.pf-m-icons {
|
|
52
|
+
--pf-c-action-list--child--spacer: var(--pf-c-action-list--m-icon--spacer);
|
|
53
|
+
}
|
|
54
|
+
|
|
24
55
|
.pf-c-accordion {
|
|
25
56
|
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
26
57
|
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
@@ -259,37 +290,6 @@
|
|
|
259
290
|
--pf-c-accordion__expanded-content-body--PaddingTop: var(--pf-c-accordion__expanded-content-body--expanded-content-body--PaddingTop);
|
|
260
291
|
}
|
|
261
292
|
|
|
262
|
-
.pf-c-action-list {
|
|
263
|
-
--pf-c-action-list--m-icon--spacer: 0;
|
|
264
|
-
--pf-c-action-list--child--spacer-base: var(--pf-global--spacer--md);
|
|
265
|
-
--pf-c-action-list--group--spacer-base: var(--pf-global--spacer--2xl);
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
.pf-c-action-list,
|
|
269
|
-
.pf-c-action-list__group {
|
|
270
|
-
--pf-c-action-list--child--spacer: var(--pf-c-action-list--child--spacer-base);
|
|
271
|
-
--pf-c-action-list--group--spacer: var(--pf-c-action-list--group--spacer-base);
|
|
272
|
-
display: flex;
|
|
273
|
-
align-items: center;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
.pf-c-action-list > * + *,
|
|
277
|
-
.pf-c-action-list__group > * + * {
|
|
278
|
-
margin-left: var(--pf-c-action-list--child--spacer);
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
.pf-c-action-list > * + .pf-c-action-list__group,
|
|
282
|
-
.pf-c-action-list .pf-c-action-list__group + *,
|
|
283
|
-
.pf-c-action-list__group > * + .pf-c-action-list__group,
|
|
284
|
-
.pf-c-action-list__group .pf-c-action-list__group + * {
|
|
285
|
-
margin-left: var(--pf-c-action-list--group--spacer);
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.pf-c-action-list.pf-m-icons,
|
|
289
|
-
.pf-c-action-list__group.pf-m-icons {
|
|
290
|
-
--pf-c-action-list--child--spacer: var(--pf-c-action-list--m-icon--spacer);
|
|
291
|
-
}
|
|
292
|
-
|
|
293
293
|
.pf-c-alert {
|
|
294
294
|
--pf-global--Color--100: var(--pf-global--Color--dark-100);
|
|
295
295
|
--pf-global--Color--200: var(--pf-global--Color--dark-200);
|
|
@@ -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 {
|