@patternfly/react-core 4.227.8 → 4.227.9
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 +8 -0
- package/dist/esm/components/Menu/MenuItem.d.ts +3 -1
- package/dist/esm/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +2 -2
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts +6 -12
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js +12 -8
- package/dist/esm/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts +2 -0
- package/dist/esm/components/TextInputGroup/TextInputGroup.d.ts.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroup.js +2 -2
- package/dist/esm/components/TextInputGroup/TextInputGroup.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuItem.d.ts +3 -1
- package/dist/js/components/Menu/MenuItem.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuItem.js +2 -2
- package/dist/js/components/Menu/MenuItem.js.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.d.ts +6 -12
- package/dist/js/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js +12 -8
- package/dist/js/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts +2 -0
- package/dist/js/components/TextInputGroup/TextInputGroup.d.ts.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroup.js +2 -2
- package/dist/js/components/TextInputGroup/TextInputGroup.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/umd/react-core.css +815 -818
- package/dist/umd/react-core.js +17 -12
- package/dist/umd/react-core.min.css +15 -18
- package/dist/umd/react-core.min.js +5 -5
- package/package.json +6 -6
- package/src/components/Menu/MenuItem.tsx +4 -0
- package/src/components/MenuToggle/MenuToggle.tsx +63 -25
- package/src/components/TextInputGroup/TextInputGroup.tsx +9 -1
- package/src/components/TextInputGroup/TextInputGroupMain.tsx +1 -1
- package/src/demos/ComposableMenu/ComposableMenu.md +8 -0
- package/src/demos/ComposableMenu/examples/ComposableTypeaheadSelect.tsx +196 -0
package/dist/umd/react-core.js
CHANGED
|
@@ -15677,7 +15677,7 @@
|
|
|
15677
15677
|
direction: 'right'
|
|
15678
15678
|
});
|
|
15679
15679
|
const MenuItemBase = (_a) => {
|
|
15680
|
-
var { children, className, itemId = null, to, hasCheck = false, isActive = null, isFavorited = null, isLoadButton = false, isLoading = false, flyoutMenu, direction, description = null, onClick = () => { }, component = 'button', isDisabled = false, isExternalLink = false, isSelected = null, icon, actions, onShowFlyout, drilldownMenu, isOnPath, innerRef } = _a, props = __rest$1(_a, ["children", "className", "itemId", "to", "hasCheck", "isActive", "isFavorited", "isLoadButton", "isLoading", "flyoutMenu", "direction", "description", "onClick", "component", "isDisabled", "isExternalLink", "isSelected", "icon", "actions", "onShowFlyout", "drilldownMenu", "isOnPath", "innerRef"]);
|
|
15680
|
+
var { children, className, itemId = null, to, hasCheck = false, isActive = null, isFavorited = null, isLoadButton = false, isLoading = false, flyoutMenu, direction, description = null, onClick = () => { }, component = 'button', isDisabled = false, isExternalLink = false, isSelected = null, isFocused, icon, actions, onShowFlyout, drilldownMenu, isOnPath, innerRef } = _a, props = __rest$1(_a, ["children", "className", "itemId", "to", "hasCheck", "isActive", "isFavorited", "isLoadButton", "isLoading", "flyoutMenu", "direction", "description", "onClick", "component", "isDisabled", "isExternalLink", "isSelected", "isFocused", "icon", "actions", "onShowFlyout", "drilldownMenu", "isOnPath", "innerRef"]);
|
|
15681
15681
|
const { menuId, parentMenu, onSelect, onActionClick, activeItemId, selected, drilldownItemPath, onDrillIn, onDrillOut, flyoutRef, setFlyoutRef, disableHover } = React__namespace.useContext(MenuContext);
|
|
15682
15682
|
let Component = (to ? 'a' : component);
|
|
15683
15683
|
if (hasCheck && !to) {
|
|
@@ -15843,7 +15843,7 @@
|
|
|
15843
15843
|
setFlyoutRef(null);
|
|
15844
15844
|
}
|
|
15845
15845
|
};
|
|
15846
|
-
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, className), onMouseOver: onMouseOver }, (flyoutMenu && { onKeyDown: handleFlyout }), { ref: ref, role: !hasCheck ? 'none' : 'menuitem' }, props),
|
|
15846
|
+
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
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 && {
|
|
15848
15848
|
onClick: (event) => {
|
|
15849
15849
|
onItemSelect(event, onSelect);
|
|
@@ -15936,19 +15936,23 @@
|
|
|
15936
15936
|
this.displayName = 'MenuToggleBase';
|
|
15937
15937
|
}
|
|
15938
15938
|
render() {
|
|
15939
|
-
const _a = this.props, { children, className, icon, badge, isExpanded, isDisabled, isFullHeight, isFullWidth, variant, innerRef } = _a,
|
|
15939
|
+
const _a = this.props, { children, className, icon, badge, isExpanded, isDisabled, isFullHeight, isFullWidth, variant, innerRef, onClick, 'aria-label': ariaLabel } = _a, otherProps = __rest$1(_a, ["children", "className", "icon", "badge", "isExpanded", "isDisabled", "isFullHeight", "isFullWidth", "variant", "innerRef", "onClick", 'aria-label']);
|
|
15940
15940
|
const isPlain = variant === 'plain';
|
|
15941
15941
|
const isPlainText = variant === 'plainText';
|
|
15942
|
+
const isTypeahead = variant === 'typeahead';
|
|
15943
|
+
const toggleControls = (React__namespace.createElement("span", { className: css(styles$x.menuToggleControls) },
|
|
15944
|
+
React__namespace.createElement("span", { className: css(styles$x.menuToggleToggleIcon) },
|
|
15945
|
+
React__namespace.createElement(CaretDownIcon$1, { "aria-hidden": true }))));
|
|
15942
15946
|
const content = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
15943
15947
|
icon && React__namespace.createElement("span", { className: css(styles$x.menuToggleIcon) }, icon),
|
|
15944
|
-
React__namespace.createElement("span", { className: "pf-c-menu-toggle__text" }, children),
|
|
15948
|
+
isTypeahead ? children : React__namespace.createElement("span", { className: "pf-c-menu-toggle__text" }, children),
|
|
15945
15949
|
badge && React__namespace.createElement("span", { className: css(styles$x.menuToggleCount) }, badge),
|
|
15946
|
-
React__namespace.createElement("
|
|
15947
|
-
|
|
15948
|
-
|
|
15949
|
-
|
|
15950
|
-
|
|
15951
|
-
|
|
15950
|
+
isTypeahead ? (React__namespace.createElement("button", { type: "button", className: css(styles$x.menuToggleButton), "aria-expanded": isExpanded, onClick: onClick, "aria-label": "Menu toggle" }, toggleControls)) : (toggleControls)));
|
|
15951
|
+
const componentProps = Object.assign(Object.assign({ className: css(styles$x.menuToggle, isExpanded && styles$x.modifiers.expanded, variant === 'primary' && styles$x.modifiers.primary, (isPlain || isPlainText) && styles$x.modifiers.plain, isPlainText && styles$x.modifiers.text, isFullHeight && styles$x.modifiers.fullHeight, isTypeahead && styles$x.modifiers.typeahead, isFullWidth && styles$x.modifiers.fullWidth, className), children: isPlain ? children : content }, (isDisabled && { disabled: true })), otherProps);
|
|
15952
|
+
if (isTypeahead) {
|
|
15953
|
+
return React__namespace.createElement("div", Object.assign({ ref: innerRef }, componentProps));
|
|
15954
|
+
}
|
|
15955
|
+
return (React__namespace.createElement("button", Object.assign({ className: css(styles$x.menuToggle, isExpanded && styles$x.modifiers.expanded, variant === 'primary' && styles$x.modifiers.primary, variant === 'secondary' && styles$x.modifiers.secondary, (isPlain || isPlainText) && styles$x.modifiers.plain, isPlainText && styles$x.modifiers.text, isFullHeight && styles$x.modifiers.fullHeight, isFullWidth && styles$x.modifiers.fullWidth, className), ref: innerRef, type: "button", "aria-label": ariaLabel, "aria-expanded": isExpanded, onClick: onClick }, componentProps)));
|
|
15952
15956
|
}
|
|
15953
15957
|
}
|
|
15954
15958
|
MenuToggleBase.defaultProps = {
|
|
@@ -18387,10 +18391,10 @@
|
|
|
18387
18391
|
isDisabled: false
|
|
18388
18392
|
});
|
|
18389
18393
|
const TextInputGroup = (_a) => {
|
|
18390
|
-
var { children, className, isDisabled, innerRef } = _a, props = __rest$1(_a, ["children", "className", "isDisabled", "innerRef"]);
|
|
18394
|
+
var { children, className, isDisabled, isPlain, innerRef } = _a, props = __rest$1(_a, ["children", "className", "isDisabled", "isPlain", "innerRef"]);
|
|
18391
18395
|
const textInputGroupRef = innerRef || React__namespace.useRef(null);
|
|
18392
18396
|
return (React__namespace.createElement(TextInputGroupContext.Provider, { value: { isDisabled } },
|
|
18393
|
-
React__namespace.createElement("div", Object.assign({ ref: textInputGroupRef, className: css(styles$l.textInputGroup, isDisabled && styles$l.modifiers.disabled, className) }, props), children)));
|
|
18397
|
+
React__namespace.createElement("div", Object.assign({ ref: textInputGroupRef, className: css(styles$l.textInputGroup, isDisabled && styles$l.modifiers.disabled, isPlain && styles$l.modifiers.plain, className) }, props), children)));
|
|
18394
18398
|
};
|
|
18395
18399
|
TextInputGroup.displayName = 'TextInputGroup';
|
|
18396
18400
|
|
|
@@ -19054,6 +19058,7 @@
|
|
|
19054
19058
|
"nonExpandableOn_2xl": "pf-m-non-expandable-on-2xl",
|
|
19055
19059
|
"expanded": "pf-m-expanded",
|
|
19056
19060
|
"pageInsets": "pf-m-page-insets",
|
|
19061
|
+
"overflow": "pf-m-overflow",
|
|
19057
19062
|
"action": "pf-m-action",
|
|
19058
19063
|
"active": "pf-m-active",
|
|
19059
19064
|
"disabled": "pf-m-disabled",
|
|
@@ -587,8 +587,8 @@
|
|
|
587
587
|
--pf-c-app-launcher__group-title--PaddingRight: var(--pf-c-app-launcher__menu-item--PaddingRight);
|
|
588
588
|
--pf-c-app-launcher__group-title--PaddingBottom: var(--pf-c-app-launcher__menu-item--PaddingBottom);
|
|
589
589
|
--pf-c-app-launcher__group-title--PaddingLeft: var(--pf-c-app-launcher__menu-item--PaddingLeft);
|
|
590
|
-
--pf-c-app-launcher__group-title--FontSize: var(--pf-global--FontSize--
|
|
591
|
-
--pf-c-app-launcher__group-title--FontWeight: var(--pf-global--FontWeight--
|
|
590
|
+
--pf-c-app-launcher__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
591
|
+
--pf-c-app-launcher__group-title--FontWeight: var(--pf-global--FontWeight--normal);
|
|
592
592
|
--pf-c-app-launcher__group-title--Color: var(--pf-global--Color--dark-200);
|
|
593
593
|
--pf-c-app-launcher--c-divider--MarginTop: var(--pf-global--spacer--sm);
|
|
594
594
|
--pf-c-app-launcher--c-divider--MarginBottom: var(--pf-global--spacer--sm);
|
|
@@ -766,8 +766,6 @@
|
|
|
766
766
|
--pf-c-app-launcher__menu-item--m-action--Color: var(--pf-global--Color--200);
|
|
767
767
|
--pf-c-app-launcher__menu-item--m-favorite__menu-item--m-action--Color: var(--pf-global--palette--gold-300);
|
|
768
768
|
--pf-c-app-launcher__menu-item--m-favorite__menu-item--m-action--hover--Color: var(--pf-global--palette--gold-100);
|
|
769
|
-
--pf-c-app-launcher__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
770
|
-
--pf-c-app-launcher__group-title--FontWeight: var(--pf-global--FontWeight--bold);
|
|
771
769
|
}
|
|
772
770
|
|
|
773
771
|
.pf-c-form-control {
|
|
@@ -7348,8 +7346,8 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
7348
7346
|
--pf-c-dropdown__group-title--PaddingRight: var(--pf-c-dropdown__menu-item--PaddingRight);
|
|
7349
7347
|
--pf-c-dropdown__group-title--PaddingBottom: var(--pf-c-dropdown__menu-item--PaddingBottom);
|
|
7350
7348
|
--pf-c-dropdown__group-title--PaddingLeft: var(--pf-c-dropdown__menu-item--PaddingLeft);
|
|
7351
|
-
--pf-c-dropdown__group-title--FontSize: var(--pf-global--FontSize--
|
|
7352
|
-
--pf-c-dropdown__group-title--FontWeight: var(--pf-global--FontWeight--
|
|
7349
|
+
--pf-c-dropdown__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
7350
|
+
--pf-c-dropdown__group-title--FontWeight: var(--pf-global--FontWeight--normal);
|
|
7353
7351
|
--pf-c-dropdown__group-title--Color: var(--pf-global--Color--dark-200);
|
|
7354
7352
|
--pf-c-dropdown__toggle-image--MarginTop: 0;
|
|
7355
7353
|
--pf-c-dropdown__toggle-image--MarginBottom: 0;
|
|
@@ -7952,8 +7950,6 @@ label.pf-c-check, .pf-c-check__label,
|
|
|
7952
7950
|
--pf-c-dropdown__menu--Top: 100%;
|
|
7953
7951
|
--pf-c-dropdown--m-top__menu--TranslateY: -100%;
|
|
7954
7952
|
--pf-c-dropdown__menu-item--hover--BackgroundColor: var(--pf-global--BackgroundColor--400);
|
|
7955
|
-
--pf-c-dropdown__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
7956
|
-
--pf-c-dropdown__group-title--FontWeight: var(--pf-global--FontWeight--bold);
|
|
7957
7953
|
}
|
|
7958
7954
|
|
|
7959
7955
|
:where(.pf-theme-dark) .pf-c-dropdown__toggle:not(.pf-m-plain):disabled, :where(.pf-theme-dark) .pf-c-dropdown__toggle:not(.pf-m-plain).pf-m-disabled {
|
|
@@ -12022,8 +12018,8 @@ ul.pf-c-list {
|
|
|
12022
12018
|
--pf-c-menu__group-title--PaddingTop: var(--pf-global--spacer--md);
|
|
12023
12019
|
--pf-c-menu__group-title--PaddingRight: var(--pf-c-menu__item--PaddingRight);
|
|
12024
12020
|
--pf-c-menu__group-title--PaddingLeft: var(--pf-c-menu__item--PaddingLeft);
|
|
12025
|
-
--pf-c-menu__group-title--FontSize: var(--pf-global--FontSize--
|
|
12026
|
-
--pf-c-menu__group-title--FontWeight: var(--pf-global--FontWeight--
|
|
12021
|
+
--pf-c-menu__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
12022
|
+
--pf-c-menu__group-title--FontWeight: var(--pf-global--FontWeight--normal);
|
|
12027
12023
|
--pf-c-menu__group-title--Color: var(--pf-global--Color--200);
|
|
12028
12024
|
--pf-c-menu__item-description--FontSize: var(--pf-global--FontSize--xs);
|
|
12029
12025
|
--pf-c-menu__item-description--Color: var(--pf-global--Color--200);
|
|
@@ -12573,8 +12569,6 @@ label.pf-c-menu__item:where(:not([disabled], .pf-m-disabled)) {
|
|
|
12573
12569
|
--pf-c-menu__list-item--hover--BackgroundColor: var(--pf-global--BackgroundColor--400);
|
|
12574
12570
|
--pf-c-menu__list-item--focus-within--BackgroundColor: var(--pf-global--BackgroundColor--400);
|
|
12575
12571
|
--pf-c-menu__list-item--m-disabled__item--Color: var(--pf-global--Color--200);
|
|
12576
|
-
--pf-c-menu__group-title--FontWeight: var(--pf-global--FontWeight--bold);
|
|
12577
|
-
--pf-c-menu__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
12578
12572
|
}
|
|
12579
12573
|
|
|
12580
12574
|
.pf-c-menu-toggle {
|
|
@@ -14952,8 +14946,8 @@ label.pf-c-menu__item:where(:not([disabled], .pf-m-disabled)) {
|
|
|
14952
14946
|
--pf-c-options-menu__group-title--PaddingRight: var(--pf-c-options-menu__menu-item--PaddingRight);
|
|
14953
14947
|
--pf-c-options-menu__group-title--PaddingBottom: var(--pf-c-options-menu__menu-item--PaddingBottom);
|
|
14954
14948
|
--pf-c-options-menu__group-title--PaddingLeft: var(--pf-c-options-menu__menu-item--PaddingLeft);
|
|
14955
|
-
--pf-c-options-menu__group-title--FontSize: var(--pf-global--FontSize--
|
|
14956
|
-
--pf-c-options-menu__group-title--FontWeight: var(--pf-global--FontWeight--
|
|
14949
|
+
--pf-c-options-menu__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
14950
|
+
--pf-c-options-menu__group-title--FontWeight: var(--pf-global--FontWeight--normal);
|
|
14957
14951
|
--pf-c-options-menu__group-title--Color: var(--pf-global--Color--dark-200);
|
|
14958
14952
|
--pf-c-options-menu--c-divider--MarginTop: var(--pf-global--spacer--sm);
|
|
14959
14953
|
--pf-c-options-menu--c-divider--MarginBottom: var(--pf-global--spacer--sm);
|
|
@@ -15162,8 +15156,6 @@ label.pf-c-menu__item:where(:not([disabled], .pf-m-disabled)) {
|
|
|
15162
15156
|
--pf-c-options-menu__toggle--disabled--BackgroundColor: var(--pf-global--palette--black-500);
|
|
15163
15157
|
--pf-c-options-menu__menu--BackgroundColor: var(--pf-global--BackgroundColor--300);
|
|
15164
15158
|
--pf-c-options-menu__menu-item--hover--BackgroundColor: var(--pf-global--BackgroundColor--400);
|
|
15165
|
-
--pf-c-options-menu__group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
15166
|
-
--pf-c-options-menu__group-title--FontWeight: var(--pf-global--FontWeight--bold);
|
|
15167
15159
|
--pf-c-options-menu__menu--Top: 100%;
|
|
15168
15160
|
}
|
|
15169
15161
|
|
|
@@ -17920,8 +17912,8 @@ label.pf-c-radio, .pf-c-radio__label,
|
|
|
17920
17912
|
--pf-c-select__menu-group-title--PaddingRight: var(--pf-c-select__menu-item--PaddingRight);
|
|
17921
17913
|
--pf-c-select__menu-group-title--PaddingBottom: var(--pf-c-select__menu-item--PaddingBottom);
|
|
17922
17914
|
--pf-c-select__menu-group-title--PaddingLeft: var(--pf-c-select__menu-item--PaddingLeft);
|
|
17923
|
-
--pf-c-select__menu-group-title--FontSize: var(--pf-global--FontSize--
|
|
17924
|
-
--pf-c-select__menu-group-title--FontWeight: var(--pf-global--FontWeight--
|
|
17915
|
+
--pf-c-select__menu-group-title--FontSize: var(--pf-global--FontSize--xs);
|
|
17916
|
+
--pf-c-select__menu-group-title--FontWeight: var(--pf-global--FontWeight--normal);
|
|
17925
17917
|
--pf-c-select__menu-group-title--Color: var(--pf-global--Color--dark-200);
|
|
17926
17918
|
--pf-c-select__menu-item-count--MarginLeft: var(--pf-global--spacer--md);
|
|
17927
17919
|
--pf-c-select__menu-item-count--FontSize: var(--pf-global--FontSize--sm);
|
|
@@ -19774,6 +19766,11 @@ svg.pf-c-spinner.pf-m-xl {
|
|
|
19774
19766
|
--pf-c-tabs--inset: var(--pf-c-tabs--m-page-insets--inset);
|
|
19775
19767
|
}
|
|
19776
19768
|
|
|
19769
|
+
.pf-c-tabs.pf-m-overflow,
|
|
19770
|
+
.pf-c-tabs.pf-m-overflow .pf-c-tabs__list {
|
|
19771
|
+
overflow: visible;
|
|
19772
|
+
}
|
|
19773
|
+
|
|
19777
19774
|
.pf-c-tabs__toggle {
|
|
19778
19775
|
display: var(--pf-c-tabs__toggle--Display);
|
|
19779
19776
|
align-items: center;
|