@patternfly/react-core 4.225.4 → 4.225.7

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/esm/components/Dropdown/DropdownItem.d.ts +1 -1
  3. package/dist/esm/components/Dropdown/DropdownItem.d.ts.map +1 -1
  4. package/dist/esm/components/Dropdown/DropdownItem.js +3 -3
  5. package/dist/esm/components/Dropdown/DropdownItem.js.map +1 -1
  6. package/dist/esm/components/Dropdown/InternalDropdownItem.d.ts +0 -2
  7. package/dist/esm/components/Dropdown/InternalDropdownItem.d.ts.map +1 -1
  8. package/dist/esm/components/Dropdown/InternalDropdownItem.js +1 -2
  9. package/dist/esm/components/Dropdown/InternalDropdownItem.js.map +1 -1
  10. package/dist/esm/components/Switch/Switch.d.ts.map +1 -1
  11. package/dist/esm/components/Switch/Switch.js +1 -1
  12. package/dist/esm/components/Switch/Switch.js.map +1 -1
  13. package/dist/esm/components/TreeView/TreeView.d.ts +1 -1
  14. package/dist/esm/components/TreeView/TreeView.d.ts.map +1 -1
  15. package/dist/esm/components/TreeView/TreeViewListItem.d.ts +1 -1
  16. package/dist/esm/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  17. package/dist/esm/components/TreeView/TreeViewListItem.js +1 -1
  18. package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
  19. package/dist/js/components/Dropdown/DropdownItem.d.ts +1 -1
  20. package/dist/js/components/Dropdown/DropdownItem.d.ts.map +1 -1
  21. package/dist/js/components/Dropdown/DropdownItem.js +3 -3
  22. package/dist/js/components/Dropdown/DropdownItem.js.map +1 -1
  23. package/dist/js/components/Dropdown/InternalDropdownItem.d.ts +0 -2
  24. package/dist/js/components/Dropdown/InternalDropdownItem.d.ts.map +1 -1
  25. package/dist/js/components/Dropdown/InternalDropdownItem.js +1 -2
  26. package/dist/js/components/Dropdown/InternalDropdownItem.js.map +1 -1
  27. package/dist/js/components/Switch/Switch.d.ts.map +1 -1
  28. package/dist/js/components/Switch/Switch.js +1 -1
  29. package/dist/js/components/Switch/Switch.js.map +1 -1
  30. package/dist/js/components/TreeView/TreeView.d.ts +1 -1
  31. package/dist/js/components/TreeView/TreeView.d.ts.map +1 -1
  32. package/dist/js/components/TreeView/TreeViewListItem.d.ts +1 -1
  33. package/dist/js/components/TreeView/TreeViewListItem.d.ts.map +1 -1
  34. package/dist/js/components/TreeView/TreeViewListItem.js +1 -1
  35. package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
  36. package/dist/umd/react-core.css +21086 -21086
  37. package/dist/umd/react-core.js +6 -7
  38. package/dist/umd/react-core.min.js +2 -2
  39. package/package.json +5 -5
  40. package/src/components/Button/examples/ButtonProgress.tsx +11 -17
  41. package/src/components/Dropdown/DropdownItem.tsx +1 -3
  42. package/src/components/Dropdown/InternalDropdownItem.tsx +0 -4
  43. package/src/components/Switch/Switch.tsx +2 -3
  44. package/src/components/Switch/__tests__/__snapshots__/Switch.test.tsx.snap +1 -1
  45. package/src/components/Switch/examples/Switch.md +10 -2
  46. package/src/components/TreeView/TreeView.tsx +1 -1
  47. package/src/components/TreeView/TreeViewListItem.tsx +3 -3
@@ -5572,7 +5572,7 @@
5572
5572
  }
5573
5573
  render() {
5574
5574
  /* eslint-disable @typescript-eslint/no-unused-vars */
5575
- const _a = this.props, { className, children, isHovered, context, onClick, component, role, isDisabled, isAriaDisabled, isPlainText, index, href, tooltip, tooltipProps, id, componentID, listItemClassName, additionalChild, customChild, enterTriggersArrowDown, icon, autoFocus, styleChildren, description, inoperableEvents } = _a, additionalProps = __rest$1(_a, ["className", "children", "isHovered", "context", "onClick", "component", "role", "isDisabled", "isAriaDisabled", "isPlainText", "index", "href", "tooltip", "tooltipProps", "id", "componentID", "listItemClassName", "additionalChild", "customChild", "enterTriggersArrowDown", "icon", "autoFocus", "styleChildren", "description", "inoperableEvents"]);
5575
+ const _a = this.props, { className, children, context, onClick, component, role, isDisabled, isAriaDisabled, isPlainText, index, href, tooltip, tooltipProps, id, componentID, listItemClassName, additionalChild, customChild, enterTriggersArrowDown, icon, autoFocus, styleChildren, description, inoperableEvents } = _a, additionalProps = __rest$1(_a, ["className", "children", "context", "onClick", "component", "role", "isDisabled", "isAriaDisabled", "isPlainText", "index", "href", "tooltip", "tooltipProps", "id", "componentID", "listItemClassName", "additionalChild", "customChild", "enterTriggersArrowDown", "icon", "autoFocus", "styleChildren", "description", "inoperableEvents"]);
5576
5576
  /* eslint-enable @typescript-eslint/no-unused-vars */
5577
5577
  let classes = css(icon && styles$15.modifiers.icon, isAriaDisabled && styles$15.modifiers.ariaDisabled, className);
5578
5578
  if (component === 'a') {
@@ -5623,7 +5623,6 @@
5623
5623
  InternalDropdownItem.displayName = 'InternalDropdownItem';
5624
5624
  InternalDropdownItem.defaultProps = {
5625
5625
  className: '',
5626
- isHovered: false,
5627
5626
  component: 'a',
5628
5627
  role: 'none',
5629
5628
  isDisabled: false,
@@ -5644,12 +5643,12 @@
5644
5643
  };
5645
5644
 
5646
5645
  const DropdownItem = (_a) => {
5647
- var { children, className, component = 'a', isDisabled = false, isAriaDisabled = false, isPlainText = false, isHovered = false, href, tooltip, tooltipProps = {}, listItemClassName, onClick,
5646
+ var { children, className, component = 'a', isDisabled = false, isAriaDisabled = false, isPlainText = false, href, tooltip, tooltipProps = {}, listItemClassName, onClick,
5648
5647
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5649
5648
  ref, // Types of Ref are different for React.FunctionComponent vs React.Component
5650
- additionalChild, customChild, tabIndex = -1, icon = null, autoFocus, description = null, styleChildren, ouiaId, ouiaSafe } = _a, props = __rest$1(_a, ["children", "className", "component", "isDisabled", "isAriaDisabled", "isPlainText", "isHovered", "href", "tooltip", "tooltipProps", "listItemClassName", "onClick", "ref", "additionalChild", "customChild", "tabIndex", "icon", "autoFocus", "description", "styleChildren", "ouiaId", "ouiaSafe"]);
5649
+ additionalChild, customChild, tabIndex = -1, icon = null, autoFocus, description = null, styleChildren, ouiaId, ouiaSafe } = _a, props = __rest$1(_a, ["children", "className", "component", "isDisabled", "isAriaDisabled", "isPlainText", "href", "tooltip", "tooltipProps", "listItemClassName", "onClick", "ref", "additionalChild", "customChild", "tabIndex", "icon", "autoFocus", "description", "styleChildren", "ouiaId", "ouiaSafe"]);
5651
5650
  const ouiaProps = useOUIAProps(DropdownItem.displayName, ouiaId, ouiaSafe);
5652
- return (React__namespace.createElement(DropdownArrowContext.Consumer, null, context => (React__namespace.createElement(InternalDropdownItem, Object.assign({ context: context, role: "menuitem", tabIndex: tabIndex, className: className, component: component, isDisabled: isDisabled, isAriaDisabled: isAriaDisabled, isPlainText: isPlainText, isHovered: isHovered, href: href, tooltip: tooltip, tooltipProps: tooltipProps, listItemClassName: listItemClassName, onClick: onClick, additionalChild: additionalChild, customChild: customChild, icon: icon, autoFocus: autoFocus, styleChildren: styleChildren, description: description }, ouiaProps, props), children))));
5651
+ return (React__namespace.createElement(DropdownArrowContext.Consumer, null, context => (React__namespace.createElement(InternalDropdownItem, Object.assign({ context: context, role: "menuitem", tabIndex: tabIndex, className: className, component: component, isDisabled: isDisabled, isAriaDisabled: isAriaDisabled, isPlainText: isPlainText, href: href, tooltip: tooltip, tooltipProps: tooltipProps, listItemClassName: listItemClassName, onClick: onClick, additionalChild: additionalChild, customChild: customChild, icon: icon, autoFocus: autoFocus, styleChildren: styleChildren, description: description }, ouiaProps, props), children))));
5653
5652
  };
5654
5653
  DropdownItem.displayName = 'DropdownItem';
5655
5654
 
@@ -19004,7 +19003,7 @@
19004
19003
  id, className, label, labelOff, isChecked, defaultChecked, hasCheckIcon, isDisabled, onChange, isReversed, ouiaId, ouiaSafe } = _a, props = __rest$1(_a, ["id", "className", "label", "labelOff", "isChecked", "defaultChecked", "hasCheckIcon", "isDisabled", "onChange", "isReversed", "ouiaId", "ouiaSafe"]);
19005
19004
  const isAriaLabelledBy = props['aria-label'] === '';
19006
19005
  return (React__namespace.createElement("label", Object.assign({ className: css(styles$g.switch, isReversed && styles$g.modifiers.reverse, className), htmlFor: this.id }, getOUIAProps(Switch.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe)),
19007
- React__namespace.createElement("input", Object.assign({ id: this.id, className: css(styles$g.switchInput), type: "checkbox", onChange: event => onChange(event.target.checked, event) }, ([true, false].includes(defaultChecked) && { defaultChecked }), (![true, false].includes(defaultChecked) && { checked: isChecked }), { disabled: isDisabled, "aria-labelledby": isAriaLabelledBy ? `${this.id}-on` : null }, props)),
19006
+ React__namespace.createElement("input", Object.assign({ id: this.id, className: css(styles$g.switchInput), type: "checkbox", onChange: event => onChange(event.target.checked, event) }, (defaultChecked !== undefined ? { defaultChecked } : { checked: isChecked }), { disabled: isDisabled, "aria-labelledby": !isAriaLabelledBy ? null : `${this.id}-${isChecked !== true ? 'off' : 'on'}` }, props)),
19008
19007
  label !== undefined ? (React__namespace.createElement(React__namespace.Fragment, null,
19009
19008
  React__namespace.createElement("span", { className: css(styles$g.switchToggle) }, hasCheckIcon && (React__namespace.createElement("span", { className: css(styles$g.switchToggleIcon), "aria-hidden": "true" },
19010
19009
  React__namespace.createElement(CheckIcon$1, { noVerticalAlign: true })))),
@@ -20609,7 +20608,7 @@
20609
20608
  React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeToggleIcon) },
20610
20609
  React__default["default"].createElement(AngleRightIcon$1, { "aria-hidden": "true" }))));
20611
20610
  const renderCheck = (randomId) => (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeCheck) },
20612
- React__default["default"].createElement("input", Object.assign({ type: "checkbox", onChange: (evt) => onCheck && onCheck(evt, itemData, parentItem), onClick: (evt) => evt.stopPropagation(), ref: elem => elem && (elem.indeterminate = checkProps.checked === null) }, checkProps, { checked: checkProps.checked === null ? false : checkProps.checked, id: randomId, tabIndex: -1 }))));
20611
+ React__default["default"].createElement("input", Object.assign({ type: "checkbox", onChange: evt => onCheck && onCheck(evt, itemData, parentItem), onClick: evt => evt.stopPropagation(), ref: elem => elem && (elem.indeterminate = checkProps.checked === null) }, checkProps, { checked: checkProps.checked === null ? false : checkProps.checked, id: randomId, tabIndex: -1 }))));
20613
20612
  const iconRendered = (React__default["default"].createElement("span", { className: css(styles$9.treeViewNodeIcon) },
20614
20613
  !internalIsExpanded && icon,
20615
20614
  internalIsExpanded && (expandedIcon || icon)));