@patternfly/react-core 4.235.1 → 4.235.4

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/package.json CHANGED
@@ -1,16 +1,10 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "4.235.1",
3
+ "version": "4.235.4",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
8
- "exports": {
9
- ".": "./dist/esm/index.js",
10
- "./next": "./dist/esm/next/index.js",
11
- "./deprecated": "./dist/esm/deprecated/index.js",
12
- "./package.json": "./package.json"
13
- },
14
8
  "typesVersions": {
15
9
  "*": {
16
10
  "next": [
@@ -45,14 +39,14 @@
45
39
  },
46
40
  "homepage": "https://github.com/patternfly/patternfly-react#readme",
47
41
  "scripts": {
48
- "build:umd": "rollup -c && rollup -c --environment IS_PRODUCTION",
42
+ "build:umd": "rollup -c --environment IS_PRODUCTION",
49
43
  "clean": "rimraf dist",
50
44
  "generate": "node scripts/copyStyles.js"
51
45
  },
52
46
  "dependencies": {
53
- "@patternfly/react-icons": "^4.86.1",
54
- "@patternfly/react-styles": "^4.85.1",
55
- "@patternfly/react-tokens": "^4.87.1",
47
+ "@patternfly/react-icons": "^4.86.4",
48
+ "@patternfly/react-styles": "^4.85.4",
49
+ "@patternfly/react-tokens": "^4.87.4",
56
50
  "focus-trap": "6.9.2",
57
51
  "react-dropzone": "9.0.0",
58
52
  "tippy.js": "5.1.2",
@@ -60,21 +54,21 @@
60
54
  },
61
55
  "devDependencies": {
62
56
  "@patternfly/patternfly": "4.210.2",
63
- "@rollup/plugin-commonjs": "^22.0.2",
64
- "@rollup/plugin-node-resolve": "^13.3.0",
65
- "@rollup/plugin-replace": "^4.0.0",
57
+ "@rollup/plugin-commonjs": "^21.0.0",
58
+ "@rollup/plugin-node-resolve": "^13.0.0",
59
+ "@rollup/plugin-replace": "^3.0.0",
66
60
  "css": "^2.2.3",
67
61
  "fs-extra": "^6.0.1",
68
62
  "glob": "^7.1.2",
69
63
  "rimraf": "^3.0.2",
70
- "rollup": "^2.78.0",
64
+ "rollup": "^2.58.0",
71
65
  "rollup-plugin-scss": "^3.0.0",
72
- "rollup-plugin-terser": "^7.0.2",
66
+ "rollup-plugin-terser": "^7.0.0",
73
67
  "typescript": "^4.7.4"
74
68
  },
75
69
  "peerDependencies": {
76
70
  "react": "^16.8.0 || ^17.0.0",
77
71
  "react-dom": "^16.8.0 || ^17.0.0"
78
72
  },
79
- "gitHead": "7261b4ef06344b8f4bad002e5c36b140a478d538"
73
+ "gitHead": "35bd0846f74042fe9a5cb755ac8bf89ae4716bce"
80
74
  }
@@ -81,7 +81,7 @@ export const DualListSelectorComposableDragDrop: React.FunctionComponent = () =>
81
81
  }
82
82
  };
83
83
 
84
- const onDrop = (source: DraggableItemPosition, dest?: DraggableItemPosition) => {
84
+ const onDrop = (source: DraggableItemPosition, dest: DraggableItemPosition | undefined) => {
85
85
  if (dest) {
86
86
  const newList = [...chosenOptions];
87
87
  const [removed] = newList.splice(source.index, 1);
@@ -36,7 +36,7 @@ export const ComposableActionsMenu: React.FunctionComponent = () => {
36
36
  };
37
37
  }, [isOpen, menuRef]);
38
38
 
39
- const onSelect = (event?: React.MouseEvent, itemId?: string | number) => {
39
+ const onSelect = (event: React.MouseEvent | undefined, itemId: string | number | undefined) => {
40
40
  if (typeof itemId === 'string' || typeof itemId === 'undefined') {
41
41
  return;
42
42
  }
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { MenuToggle, Menu, MenuContent, MenuList, MenuItem, Popper } from '@patternfly/react-core';
3
3
 
4
- // eslint-disable-next-line no-console
5
- const onSelect = (event?: React.MouseEvent, itemId?: string | number) => console.log('selected', itemId);
6
-
4
+ /* eslint-disable no-console */
5
+ const onSelect = (event: React.MouseEvent | undefined, itemId: string | number | undefined) =>
6
+ console.log('selected', itemId);
7
+ /* eslint-enable no-console */
7
8
  interface FlyoutMenuProps {
8
9
  children?: React.ReactElement;
9
10
  depth: number;
@@ -50,7 +50,7 @@ export const ComposableSimpleCheckboxSelect: React.FunctionComponent = () => {
50
50
  setIsOpen(!isOpen);
51
51
  };
52
52
 
53
- const onSelect = (event?: React.MouseEvent, itemId?: string | number) => {
53
+ const onSelect = (event: React.MouseEvent | undefined, itemId: string | number | undefined) => {
54
54
  if (typeof itemId === 'string' || typeof itemId === 'undefined') {
55
55
  return;
56
56
  }
@@ -59,7 +59,7 @@ export const ComposableSimpleSelect: React.FunctionComponent = () => {
59
59
  </MenuToggle>
60
60
  );
61
61
 
62
- function onSelect(event?: React.MouseEvent, itemId?: string | number) {
62
+ function onSelect(event: React.MouseEvent | undefined, itemId: string | number | undefined) {
63
63
  if (typeof itemId === 'undefined') {
64
64
  return;
65
65
  }
@@ -55,7 +55,7 @@ export const ComposableTypeaheadSelect: React.FunctionComponent = () => {
55
55
 
56
56
  const focusOnInput = () => menuToggleRef.current?.querySelector('input')?.focus();
57
57
 
58
- const onMenuSelect = (event?: React.MouseEvent, itemId?: string | number) => {
58
+ const onMenuSelect = (event: React.MouseEvent | undefined, itemId: string | number | undefined) => {
59
59
  if (itemId) {
60
60
  setInputValue(itemId.toString());
61
61
  setIsSelected(true);
@@ -124,7 +124,7 @@ export const ComposableTypeaheadSelect: React.FunctionComponent = () => {
124
124
  };
125
125
 
126
126
  // Close the menu when a click occurs outside of the menu toggle content
127
- const onDocumentClick = (event?: MouseEvent) => {
127
+ const onDocumentClick = (event: MouseEvent | undefined) => {
128
128
  if (!menuToggleRef.current?.contains(event?.target as HTMLElement)) {
129
129
  setIsMenuOpen(false);
130
130
  }