@patternfly/react-core 4.217.1 → 4.217.2
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/ApplicationLauncher/ApplicationLauncher.d.ts +9 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/dist/esm/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelector.d.ts +9 -1
- package/dist/esm/components/ContextSelector/ContextSelector.d.ts.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.d.ts +9 -1
- package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js +2 -2
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/OptionsMenu/OptionsMenu.d.ts +9 -1
- package/dist/esm/components/OptionsMenu/OptionsMenu.d.ts.map +1 -1
- package/dist/esm/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts +9 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/helpers/Popper/Popper.d.ts +1 -0
- package/dist/esm/helpers/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/helpers/Popper/Popper.js.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.d.ts +9 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.d.ts.map +1 -1
- package/dist/js/components/ApplicationLauncher/ApplicationLauncher.js.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelector.d.ts +9 -1
- package/dist/js/components/ContextSelector/ContextSelector.d.ts.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.d.ts +9 -1
- package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.js +2 -2
- package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/js/components/OptionsMenu/OptionsMenu.d.ts +9 -1
- package/dist/js/components/OptionsMenu/OptionsMenu.d.ts.map +1 -1
- package/dist/js/components/OptionsMenu/OptionsMenu.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts +9 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/helpers/Popper/Popper.d.ts +1 -0
- package/dist/js/helpers/Popper/Popper.d.ts.map +1 -1
- package/dist/js/helpers/Popper/Popper.js.map +1 -1
- package/dist/umd/react-core.css +69 -69
- package/dist/umd/react-core.js +2 -2
- package/dist/umd/react-core.min.js +1 -1
- package/package.json +5 -5
- package/src/components/ApplicationLauncher/ApplicationLauncher.tsx +11 -1
- package/src/components/ContextSelector/ContextSelector.tsx +9 -1
- package/src/components/Dropdown/Dropdown.tsx +14 -2
- package/src/components/OptionsMenu/OptionsMenu.tsx +12 -1
- package/src/components/Select/Select.tsx +9 -1
- package/src/helpers/Popper/Popper.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "4.217.
|
|
3
|
+
"version": "4.217.2",
|
|
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",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"generate": "node scripts/copyStyles.js"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@patternfly/react-icons": "^4.68.
|
|
38
|
-
"@patternfly/react-styles": "^4.67.
|
|
39
|
-
"@patternfly/react-tokens": "^4.69.
|
|
37
|
+
"@patternfly/react-icons": "^4.68.2",
|
|
38
|
+
"@patternfly/react-styles": "^4.67.2",
|
|
39
|
+
"@patternfly/react-tokens": "^4.69.2",
|
|
40
40
|
"focus-trap": "6.2.2",
|
|
41
41
|
"react-dropzone": "9.0.0",
|
|
42
42
|
"tippy.js": "5.1.2",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"react": "^16.8.0 || ^17.0.0",
|
|
61
61
|
"react-dom": "^16.8.0 || ^17.0.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "9aeee7e7186d7d8e8d572108ec54bea7bbb2bc6b"
|
|
64
64
|
}
|
|
@@ -12,7 +12,9 @@ import { ApplicationLauncherContext } from './ApplicationLauncherContext';
|
|
|
12
12
|
import { ToggleMenuBaseProps } from '../../helpers/Popper/Popper';
|
|
13
13
|
import { createRenderableFavorites, extendItemsWithFavorite } from '../../helpers/favorites';
|
|
14
14
|
|
|
15
|
-
export interface ApplicationLauncherProps
|
|
15
|
+
export interface ApplicationLauncherProps
|
|
16
|
+
extends Omit<ToggleMenuBaseProps, 'menuAppendTo'>,
|
|
17
|
+
React.HTMLProps<HTMLDivElement> {
|
|
16
18
|
/** Additional element css classes */
|
|
17
19
|
className?: string;
|
|
18
20
|
/** Display menu above or below dropdown toggle */
|
|
@@ -35,6 +37,14 @@ export interface ApplicationLauncherProps extends ToggleMenuBaseProps, React.HTM
|
|
|
35
37
|
isGrouped?: boolean;
|
|
36
38
|
/** Toggle Icon, optional to override the icon used for the toggle */
|
|
37
39
|
toggleIcon?: React.ReactNode;
|
|
40
|
+
/** The container to append the menu to. Defaults to 'inline'.
|
|
41
|
+
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
42
|
+
* Some examples:
|
|
43
|
+
* menuAppendTo="parent"
|
|
44
|
+
* menuAppendTo={() => document.body}
|
|
45
|
+
* menuAppendTo={document.getElementById('target')}
|
|
46
|
+
*/
|
|
47
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
38
48
|
/** ID list of favorited ApplicationLauncherItems */
|
|
39
49
|
favorites?: string[];
|
|
40
50
|
/** Enables favorites. Callback called when an ApplicationLauncherItem's favorite button is clicked */
|
|
@@ -18,7 +18,7 @@ import { getOUIAProps, OUIAProps, getDefaultOUIAId } from '../../helpers';
|
|
|
18
18
|
let currentId = 0;
|
|
19
19
|
const newId = currentId++;
|
|
20
20
|
|
|
21
|
-
export interface ContextSelectorProps extends ToggleMenuBaseProps, OUIAProps {
|
|
21
|
+
export interface ContextSelectorProps extends Omit<ToggleMenuBaseProps, 'menuAppendTo'>, OUIAProps {
|
|
22
22
|
/** content rendered inside the Context Selector */
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
/** Classes applied to root element of Context Selector */
|
|
@@ -29,6 +29,14 @@ export interface ContextSelectorProps extends ToggleMenuBaseProps, OUIAProps {
|
|
|
29
29
|
onToggle?: (event: any, value: boolean) => void;
|
|
30
30
|
/** Function callback called when user selects item */
|
|
31
31
|
onSelect?: (event: any, value: React.ReactNode) => void;
|
|
32
|
+
/** The container to append the menu to. Defaults to 'inline'.
|
|
33
|
+
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
34
|
+
* Some examples:
|
|
35
|
+
* menuAppendTo="parent"
|
|
36
|
+
* menuAppendTo={() => document.body}
|
|
37
|
+
* menuAppendTo={document.getElementById('target')}
|
|
38
|
+
*/
|
|
39
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
32
40
|
/** Flag indicating that the context selector should expand to full height */
|
|
33
41
|
isFullHeight?: boolean;
|
|
34
42
|
/** Labels the Context Selector for Screen Readers */
|
|
@@ -5,7 +5,10 @@ import { DropdownWithContext } from './DropdownWithContext';
|
|
|
5
5
|
import { ToggleMenuBaseProps } from '../../helpers/Popper/Popper';
|
|
6
6
|
import { OUIAProps, useOUIAId } from '../../helpers';
|
|
7
7
|
|
|
8
|
-
export interface DropdownProps
|
|
8
|
+
export interface DropdownProps
|
|
9
|
+
extends Omit<ToggleMenuBaseProps, 'menuAppendTo'>,
|
|
10
|
+
React.HTMLProps<HTMLDivElement>,
|
|
11
|
+
OUIAProps {
|
|
9
12
|
/** Anything which can be rendered in a dropdown */
|
|
10
13
|
children?: React.ReactNode;
|
|
11
14
|
/** Classes applied to root element of dropdown */
|
|
@@ -32,6 +35,14 @@ export interface DropdownProps extends ToggleMenuBaseProps, React.HTMLProps<HTML
|
|
|
32
35
|
};
|
|
33
36
|
/** Display menu above or below dropdown toggle */
|
|
34
37
|
direction?: DropdownDirection | 'up' | 'down';
|
|
38
|
+
/** The container to append the menu to. Defaults to 'inline'.
|
|
39
|
+
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
40
|
+
* Some examples:
|
|
41
|
+
* menuAppendTo="parent"
|
|
42
|
+
* menuAppendTo={() => document.body}
|
|
43
|
+
* menuAppendTo={document.getElementById('target')}
|
|
44
|
+
*/
|
|
45
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
35
46
|
/** Flag to indicate if dropdown has groups */
|
|
36
47
|
isGrouped?: boolean;
|
|
37
48
|
/** Toggle for the dropdown, examples: <DropdownToggle> or <DropdownToggleCheckbox> */
|
|
@@ -54,6 +65,7 @@ export const Dropdown: React.FunctionComponent<DropdownProps> = ({
|
|
|
54
65
|
ouiaSafe,
|
|
55
66
|
alignments,
|
|
56
67
|
contextProps,
|
|
68
|
+
menuAppendTo = 'inline',
|
|
57
69
|
...props
|
|
58
70
|
}: DropdownProps) => (
|
|
59
71
|
<DropdownContext.Provider
|
|
@@ -79,7 +91,7 @@ export const Dropdown: React.FunctionComponent<DropdownProps> = ({
|
|
|
79
91
|
...contextProps
|
|
80
92
|
}}
|
|
81
93
|
>
|
|
82
|
-
<DropdownWithContext {...props} />
|
|
94
|
+
<DropdownWithContext menuAppendTo={menuAppendTo} {...props} />
|
|
83
95
|
</DropdownContext.Provider>
|
|
84
96
|
);
|
|
85
97
|
Dropdown.displayName = 'Dropdown';
|
|
@@ -15,7 +15,10 @@ export enum OptionsMenuDirection {
|
|
|
15
15
|
down = 'down'
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
export interface OptionsMenuProps
|
|
18
|
+
export interface OptionsMenuProps
|
|
19
|
+
extends Omit<ToggleMenuBaseProps, 'menuAppendTo'>,
|
|
20
|
+
React.HTMLProps<HTMLDivElement>,
|
|
21
|
+
OUIAProps {
|
|
19
22
|
/** Classes applied to root element of the options menu */
|
|
20
23
|
className?: string;
|
|
21
24
|
/** Id of the root element of the options menu */
|
|
@@ -36,6 +39,14 @@ export interface OptionsMenuProps extends ToggleMenuBaseProps, React.HTMLProps<H
|
|
|
36
39
|
position?: 'right' | 'left';
|
|
37
40
|
/** Menu will open up or open down from the options menu toggle */
|
|
38
41
|
direction?: 'up' | 'down';
|
|
42
|
+
/** The container to append the menu to. Defaults to 'inline'.
|
|
43
|
+
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
44
|
+
* Some examples:
|
|
45
|
+
* menuAppendTo="parent"
|
|
46
|
+
* menuAppendTo={() => document.body}
|
|
47
|
+
* menuAppendTo={document.getElementById('target')}
|
|
48
|
+
*/
|
|
49
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
39
50
|
}
|
|
40
51
|
|
|
41
52
|
export const OptionsMenu: React.FunctionComponent<OptionsMenuProps> = ({
|
|
@@ -48,7 +48,7 @@ export interface SelectViewMoreObject {
|
|
|
48
48
|
onClick: (event: React.MouseEvent | React.ChangeEvent) => void;
|
|
49
49
|
}
|
|
50
50
|
export interface SelectProps
|
|
51
|
-
extends ToggleMenuBaseProps,
|
|
51
|
+
extends Omit<ToggleMenuBaseProps, 'menuAppendTo'>,
|
|
52
52
|
Omit<React.HTMLProps<HTMLDivElement>, 'onSelect' | 'ref' | 'checked' | 'selected'>,
|
|
53
53
|
OUIAProps {
|
|
54
54
|
/** Content rendered inside the Select. Must be React.ReactElement<SelectGroupProps>[] */
|
|
@@ -165,6 +165,14 @@ export interface SelectProps
|
|
|
165
165
|
shouldResetOnSelect?: boolean;
|
|
166
166
|
/** Content rendered in the footer of the select menu */
|
|
167
167
|
footer?: React.ReactNode;
|
|
168
|
+
/** The container to append the menu to. Defaults to 'inline'.
|
|
169
|
+
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|
|
170
|
+
* Some examples:
|
|
171
|
+
* menuAppendTo="parent"
|
|
172
|
+
* menuAppendTo={() => document.body}
|
|
173
|
+
* menuAppendTo={document.getElementById('target')}
|
|
174
|
+
*/
|
|
175
|
+
menuAppendTo?: HTMLElement | (() => HTMLElement) | 'inline' | 'parent';
|
|
168
176
|
}
|
|
169
177
|
|
|
170
178
|
export interface SelectState {
|
|
@@ -14,6 +14,7 @@ const getOppositePlacement = (placement: Placement): any =>
|
|
|
14
14
|
(matched: string) => hash[matched as 'left' | 'right' | 'bottom' | 'top'] as BasePlacement
|
|
15
15
|
);
|
|
16
16
|
|
|
17
|
+
/** @deprecated Please use the menuAppendTo prop directly from within the PF component which uses it. */
|
|
17
18
|
export interface ToggleMenuBaseProps {
|
|
18
19
|
/** The container to append the menu to. Defaults to 'inline'
|
|
19
20
|
* If your menu is being cut off you can append it to an element higher up the DOM tree.
|