@patternfly/react-core 6.0.0-alpha.31 → 6.0.0-alpha.33
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 +12 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/Chip/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/DragDrop/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/Text/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/Tile/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/ApplicationLauncher/package.json +1 -1
- package/dist/dynamic/deprecated/components/ContextSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Dropdown/package.json +1 -1
- package/dist/dynamic/deprecated/components/OptionsMenu/package.json +1 -1
- package/dist/dynamic/deprecated/components/PageHeader/package.json +1 -1
- package/dist/dynamic/deprecated/components/Select/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/favorites/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/next/components/Modal/package.json +1 -1
- package/dist/dynamic/next/components/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/esm/components/ActionList/ActionList.js +1 -1
- package/dist/esm/components/ActionList/ActionList.js.map +1 -1
- package/dist/esm/components/ActionList/ActionListGroup.d.ts +2 -0
- package/dist/esm/components/ActionList/ActionListGroup.d.ts.map +1 -1
- package/dist/esm/components/ActionList/ActionListGroup.js +2 -2
- package/dist/esm/components/ActionList/ActionListGroup.js.map +1 -1
- package/dist/esm/components/ActionList/ActionListItem.js +1 -1
- package/dist/esm/components/ActionList/ActionListItem.js.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +2 -2
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/Menu/Menu.js +4 -4
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/MenuItem.js +1 -1
- package/dist/esm/components/Menu/MenuItem.js.map +1 -1
- package/dist/esm/components/Menu/MenuItemAction.js +1 -1
- package/dist/esm/components/Menu/MenuItemAction.js.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.js +1 -1
- package/dist/esm/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/js/components/ActionList/ActionList.js +1 -1
- package/dist/js/components/ActionList/ActionList.js.map +1 -1
- package/dist/js/components/ActionList/ActionListGroup.d.ts +2 -0
- package/dist/js/components/ActionList/ActionListGroup.d.ts.map +1 -1
- package/dist/js/components/ActionList/ActionListGroup.js +2 -2
- package/dist/js/components/ActionList/ActionListGroup.js.map +1 -1
- package/dist/js/components/ActionList/ActionListItem.js +1 -1
- package/dist/js/components/ActionList/ActionListItem.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +2 -2
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/Menu/Menu.js +4 -4
- package/dist/js/components/Menu/Menu.js.map +1 -1
- package/dist/js/components/Menu/MenuItem.js +1 -1
- package/dist/js/components/Menu/MenuItem.js.map +1 -1
- package/dist/js/components/Menu/MenuItemAction.js +1 -1
- package/dist/js/components/Menu/MenuItemAction.js.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.js +1 -1
- package/dist/js/components/TreeView/TreeViewListItem.js.map +1 -1
- package/dist/styles/base-no-reset.css +26 -15
- package/dist/styles/base.css +26 -15
- package/dist/umd/react-core.min.js +1 -1
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/ActionList/ActionList.tsx +1 -1
- package/src/components/ActionList/ActionListGroup.tsx +5 -2
- package/src/components/ActionList/ActionListItem.tsx +1 -1
- package/src/components/ActionList/__tests__/ActionListGroup.test.tsx +8 -2
- package/src/components/ActionList/examples/ActionListSingleGroup.tsx +45 -40
- package/src/components/ActionList/examples/ActionListWithCancelButton.tsx +12 -10
- package/src/components/ActionList/examples/ActionListWithIcons.tsx +44 -13
- package/src/components/CalendarMonth/CalendarMonth.tsx +2 -2
- package/src/components/Divider/examples/Divider.md +11 -3
- package/src/components/Divider/examples/{DividerVerticalFlexInsetMedium.tsx → DividerVerticalFlexInsetSmall.tsx} +2 -2
- package/src/components/Menu/Menu.tsx +2 -2
- package/src/components/Menu/MenuItem.tsx +1 -1
- package/src/components/Menu/MenuItemAction.tsx +1 -1
- package/src/components/Menu/__tests__/Menu.test.tsx +0 -11
- package/src/components/MenuToggle/MenuToggle.tsx +1 -1
- package/src/components/TreeView/TreeViewListItem.tsx +1 -1
- package/src/components/TreeView/__tests__/TreeViewListItem.test.tsx +6 -6
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.0.0-alpha.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.0.0-alpha.32","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.0.0-alpha.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.0.0-alpha.32","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.0.0-alpha.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.0.0-alpha.32","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.0.0-alpha.
|
|
3
|
+
"version": "6.0.0-alpha.33",
|
|
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",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"subpaths": "node ../../scripts/exportSubpaths.js --config subpaths.config.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@patternfly/react-icons": "^6.0.0-alpha.
|
|
50
|
-
"@patternfly/react-styles": "^6.0.0-alpha.
|
|
51
|
-
"@patternfly/react-tokens": "^6.0.0-alpha.
|
|
49
|
+
"@patternfly/react-icons": "^6.0.0-alpha.12",
|
|
50
|
+
"@patternfly/react-styles": "^6.0.0-alpha.12",
|
|
51
|
+
"@patternfly/react-tokens": "^6.0.0-alpha.12",
|
|
52
52
|
"focus-trap": "7.5.2",
|
|
53
53
|
"react-dropzone": "^14.2.3",
|
|
54
54
|
"tslib": "^2.5.0"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@patternfly/patternfly": "6.0.0-alpha.
|
|
57
|
+
"@patternfly/patternfly": "6.0.0-alpha.84",
|
|
58
58
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
59
59
|
"@rollup/plugin-node-resolve": "^15.0.2",
|
|
60
60
|
"@rollup/plugin-replace": "^5.0.2",
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"react": "^17 || ^18",
|
|
74
74
|
"react-dom": "^17 || ^18"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "32be844c4045caae09df6bfa7dcfa601b327da25"
|
|
77
77
|
}
|
|
@@ -14,7 +14,7 @@ export interface ActionListProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
14
14
|
export const ActionList: React.FunctionComponent<ActionListProps> = ({
|
|
15
15
|
children,
|
|
16
16
|
isIconList,
|
|
17
|
-
className
|
|
17
|
+
className,
|
|
18
18
|
...props
|
|
19
19
|
}: ActionListProps) => (
|
|
20
20
|
<div className={css(styles.actionList, isIconList && styles.modifiers.icons, className)} {...props}>
|
|
@@ -7,14 +7,17 @@ export interface ActionListGroupProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
7
7
|
children?: React.ReactNode;
|
|
8
8
|
/** Additional classes added to the action list group */
|
|
9
9
|
className?: string;
|
|
10
|
+
/** Flag indicating the action list group contains multiple icons and item padding should be removed */
|
|
11
|
+
isIconGroup?: boolean;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
export const ActionListGroup: React.FunctionComponent<ActionListGroupProps> = ({
|
|
13
15
|
children,
|
|
14
|
-
className
|
|
16
|
+
className,
|
|
17
|
+
isIconGroup,
|
|
15
18
|
...props
|
|
16
19
|
}: ActionListGroupProps) => (
|
|
17
|
-
<div className={css(styles.actionListGroup, className)} {...props}>
|
|
20
|
+
<div className={css(styles.actionListGroup, isIconGroup && styles.modifiers.icons, className)} {...props}>
|
|
18
21
|
{children}
|
|
19
22
|
</div>
|
|
20
23
|
);
|
|
@@ -11,7 +11,7 @@ export interface ActionListItemProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
11
11
|
|
|
12
12
|
export const ActionListItem: React.FunctionComponent<ActionListItemProps> = ({
|
|
13
13
|
children,
|
|
14
|
-
className
|
|
14
|
+
className,
|
|
15
15
|
...props
|
|
16
16
|
}: ActionListItemProps) => (
|
|
17
17
|
<div className={css(`${styles.actionList}__item`, className)} {...props}>
|
|
@@ -14,10 +14,16 @@ test('Renders children', () => {
|
|
|
14
14
|
expect(screen.getByText('Test')).toBeVisible();
|
|
15
15
|
});
|
|
16
16
|
|
|
17
|
-
test(`Renders with class ${styles.actionListGroup}`, () => {
|
|
17
|
+
test(`Renders with only class ${styles.actionListGroup} by default`, () => {
|
|
18
18
|
render(<ActionListGroup>Test</ActionListGroup>);
|
|
19
19
|
|
|
20
|
-
expect(screen.getByText('Test')).toHaveClass(styles.actionListGroup);
|
|
20
|
+
expect(screen.getByText('Test')).toHaveClass(styles.actionListGroup, { exact: true });
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
test(`Renders with class ${styles.modifiers.icons} when isIconGroup is true`, () => {
|
|
24
|
+
render(<ActionListGroup isIconGroup>Test</ActionListGroup>);
|
|
25
|
+
|
|
26
|
+
expect(screen.getByText('Test')).toHaveClass(styles.modifiers.icons);
|
|
21
27
|
});
|
|
22
28
|
|
|
23
29
|
test('Renders with custom class names provided via prop', () => {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import {
|
|
3
3
|
ActionList,
|
|
4
|
+
ActionListGroup,
|
|
4
5
|
ActionListItem,
|
|
5
6
|
Button,
|
|
6
7
|
Dropdown,
|
|
@@ -46,50 +47,54 @@ export const ActionListSingleGroup: React.FunctionComponent = () => {
|
|
|
46
47
|
return (
|
|
47
48
|
<React.Fragment>
|
|
48
49
|
<ActionList>
|
|
49
|
-
<
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
<ActionListGroup>
|
|
51
|
+
<ActionListItem>
|
|
52
|
+
<Button variant="primary" id="single-group-next-button">
|
|
53
|
+
Next
|
|
54
|
+
</Button>
|
|
55
|
+
</ActionListItem>
|
|
56
|
+
<ActionListItem>
|
|
57
|
+
<Button variant="secondary" id="single-group-back-button">
|
|
58
|
+
Back
|
|
59
|
+
</Button>
|
|
60
|
+
</ActionListItem>
|
|
61
|
+
</ActionListGroup>
|
|
59
62
|
</ActionList>
|
|
60
63
|
<br />
|
|
61
64
|
With kebab
|
|
62
65
|
<ActionList>
|
|
63
|
-
<
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
<
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
66
|
+
<ActionListGroup>
|
|
67
|
+
<ActionListItem>
|
|
68
|
+
<Button variant="primary" id="single-group-next-button2">
|
|
69
|
+
Next
|
|
70
|
+
</Button>
|
|
71
|
+
</ActionListItem>
|
|
72
|
+
<ActionListItem>
|
|
73
|
+
<Button variant="secondary" id="single-group-back-button2">
|
|
74
|
+
Back
|
|
75
|
+
</Button>
|
|
76
|
+
</ActionListItem>
|
|
77
|
+
<ActionListItem>
|
|
78
|
+
<Dropdown
|
|
79
|
+
onSelect={onSelect}
|
|
80
|
+
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
81
|
+
<MenuToggle
|
|
82
|
+
ref={toggleRef}
|
|
83
|
+
onClick={onToggle}
|
|
84
|
+
variant="plain"
|
|
85
|
+
isExpanded={isOpen}
|
|
86
|
+
aria-label="Action list single group kebab"
|
|
87
|
+
>
|
|
88
|
+
<EllipsisVIcon />
|
|
89
|
+
</MenuToggle>
|
|
90
|
+
)}
|
|
91
|
+
isOpen={isOpen}
|
|
92
|
+
onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
|
|
93
|
+
>
|
|
94
|
+
<DropdownList>{dropdownItems}</DropdownList>
|
|
95
|
+
</Dropdown>
|
|
96
|
+
</ActionListItem>
|
|
97
|
+
</ActionListGroup>
|
|
93
98
|
</ActionList>
|
|
94
99
|
</React.Fragment>
|
|
95
100
|
);
|
|
@@ -5,16 +5,18 @@ export const ActionListWithCancelButton: React.FunctionComponent = () => (
|
|
|
5
5
|
<React.Fragment>
|
|
6
6
|
In modals, forms, data lists
|
|
7
7
|
<ActionList>
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
<ActionListGroup>
|
|
9
|
+
<ActionListItem>
|
|
10
|
+
<Button variant="primary" id="with-cancel-save-button">
|
|
11
|
+
Save
|
|
12
|
+
</Button>
|
|
13
|
+
</ActionListItem>
|
|
14
|
+
<ActionListItem>
|
|
15
|
+
<Button variant="link" id="with-cancel-cancel-button">
|
|
16
|
+
Cancel
|
|
17
|
+
</Button>
|
|
18
|
+
</ActionListItem>
|
|
19
|
+
</ActionListGroup>
|
|
18
20
|
</ActionList>
|
|
19
21
|
<br />
|
|
20
22
|
In wizards
|
|
@@ -1,19 +1,50 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ActionList, ActionListItem, Button } from '@patternfly/react-core';
|
|
2
|
+
import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core';
|
|
3
3
|
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
4
4
|
import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
|
|
5
5
|
|
|
6
6
|
export const ActionListWithIcons: React.FunctionComponent = () => (
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
<>
|
|
8
|
+
<h4>With list icons wrapper</h4>
|
|
9
|
+
<ActionList isIconList>
|
|
10
|
+
<ActionListItem>
|
|
11
|
+
<Button variant="plain" id="with-icons-times-button" aria-label="times icon button">
|
|
12
|
+
<TimesIcon />
|
|
13
|
+
</Button>
|
|
14
|
+
</ActionListItem>
|
|
15
|
+
<ActionListItem>
|
|
16
|
+
<Button variant="plain" id="with-icons-check-button" aria-label="check icon button">
|
|
17
|
+
<CheckIcon />
|
|
18
|
+
</Button>
|
|
19
|
+
</ActionListItem>
|
|
20
|
+
</ActionList>
|
|
21
|
+
<br />
|
|
22
|
+
<h4>With group icons wrapper</h4>
|
|
23
|
+
<ActionList>
|
|
24
|
+
<ActionListGroup isIconGroup>
|
|
25
|
+
<ActionListItem>
|
|
26
|
+
<Button variant="plain" id="with-icons-list-times-button" aria-label="times icon button">
|
|
27
|
+
<TimesIcon />
|
|
28
|
+
</Button>
|
|
29
|
+
</ActionListItem>
|
|
30
|
+
<ActionListItem>
|
|
31
|
+
<Button variant="plain" id="with-icons-list-check-button" aria-label="check icon button">
|
|
32
|
+
<CheckIcon />
|
|
33
|
+
</Button>
|
|
34
|
+
</ActionListItem>
|
|
35
|
+
</ActionListGroup>
|
|
36
|
+
<ActionListGroup isIconGroup>
|
|
37
|
+
<ActionListItem>
|
|
38
|
+
<Button variant="plain" id="with-icons-group-times-button" aria-label="times icon button">
|
|
39
|
+
<TimesIcon />
|
|
40
|
+
</Button>
|
|
41
|
+
</ActionListItem>
|
|
42
|
+
<ActionListItem>
|
|
43
|
+
<Button variant="plain" id="with-icons-group-check-button" aria-label="check icon button">
|
|
44
|
+
<CheckIcon />
|
|
45
|
+
</Button>
|
|
46
|
+
</ActionListItem>
|
|
47
|
+
</ActionListGroup>
|
|
48
|
+
</ActionList>
|
|
49
|
+
</>
|
|
19
50
|
);
|
|
@@ -259,7 +259,7 @@ export const CalendarMonth = ({
|
|
|
259
259
|
const calendarToRender = (
|
|
260
260
|
<div className={css(styles.calendarMonth, className)} {...props}>
|
|
261
261
|
<div className={styles.calendarMonthHeader}>
|
|
262
|
-
<div className={css(styles.calendarMonthHeaderNavControl,
|
|
262
|
+
<div className={css(styles.calendarMonthHeaderNavControl, 'pf-m-prev-month')}>
|
|
263
263
|
<Button
|
|
264
264
|
variant="plain"
|
|
265
265
|
aria-label={prevMonthAriaLabel}
|
|
@@ -334,7 +334,7 @@ export const CalendarMonth = ({
|
|
|
334
334
|
</div>
|
|
335
335
|
</InputGroupItem>
|
|
336
336
|
</InputGroup>
|
|
337
|
-
<div className={css(styles.calendarMonthHeaderNavControl,
|
|
337
|
+
<div className={css(styles.calendarMonthHeaderNavControl, 'pf-m-next-month')}>
|
|
338
338
|
<Button
|
|
339
339
|
variant="plain"
|
|
340
340
|
aria-label={nextMonthAriaLabel}
|
|
@@ -10,45 +10,53 @@ propComponents: ['Divider']
|
|
|
10
10
|
### Using hr
|
|
11
11
|
|
|
12
12
|
```ts file='./DividerUsingHr.tsx'
|
|
13
|
+
|
|
13
14
|
```
|
|
14
15
|
|
|
15
16
|
### Using li
|
|
16
17
|
|
|
17
18
|
```ts file='./DividerUsingLi.tsx'
|
|
19
|
+
|
|
18
20
|
```
|
|
19
21
|
|
|
20
22
|
### Using div
|
|
21
23
|
|
|
22
24
|
```ts file='./DividerUsingDiv.tsx'
|
|
25
|
+
|
|
23
26
|
```
|
|
24
27
|
|
|
25
28
|
### Inset medium
|
|
26
29
|
|
|
27
30
|
```ts file='./DividerInsetMedium.tsx'
|
|
31
|
+
|
|
28
32
|
```
|
|
29
33
|
|
|
30
34
|
### Inset at various breakpoints
|
|
31
35
|
|
|
32
36
|
```ts file='./DividerInsetVariousBreakpoints.tsx'
|
|
37
|
+
|
|
33
38
|
```
|
|
34
39
|
|
|
35
40
|
### Vertical in flex layout
|
|
36
41
|
|
|
37
42
|
```ts file='./DividerVerticalFlex.tsx'
|
|
43
|
+
|
|
38
44
|
```
|
|
39
45
|
|
|
40
|
-
### Vertical in flex layout, inset
|
|
46
|
+
### Vertical in flex layout, inset small
|
|
47
|
+
|
|
48
|
+
```ts file='./DividerVerticalFlexInsetSmall.tsx'
|
|
41
49
|
|
|
42
|
-
```ts file='./DividerVerticalFlexInsetMedium.tsx'
|
|
43
50
|
```
|
|
44
51
|
|
|
45
52
|
### Vertical in flex layout, inset at various breakpoints
|
|
46
53
|
|
|
47
54
|
```ts file='./DividerVerticalFlexInsetVariousBreakpoints.tsx'
|
|
55
|
+
|
|
48
56
|
```
|
|
49
57
|
|
|
50
58
|
### Switch orientation at various breakpoints
|
|
51
59
|
|
|
52
60
|
```ts file='./DividerOrientationVariousBreakpoints.tsx'
|
|
53
|
-
```
|
|
54
61
|
|
|
62
|
+
```
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Divider, Flex, FlexItem } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
|
-
export const
|
|
4
|
+
export const DividerVerticalFlexInsetSmall: React.FunctionComponent = () => (
|
|
5
5
|
<Flex>
|
|
6
6
|
<FlexItem>first item</FlexItem>
|
|
7
7
|
<Divider
|
|
8
8
|
orientation={{
|
|
9
9
|
default: 'vertical'
|
|
10
10
|
}}
|
|
11
|
-
inset={{ default: '
|
|
11
|
+
inset={{ default: 'insetSm' }}
|
|
12
12
|
/>
|
|
13
13
|
<FlexItem>second item</FlexItem>
|
|
14
14
|
</Flex>
|
|
@@ -248,7 +248,6 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
|
|
|
248
248
|
ouiaId,
|
|
249
249
|
ouiaSafe,
|
|
250
250
|
containsFlyout,
|
|
251
|
-
isNavFlyout,
|
|
252
251
|
containsDrilldown,
|
|
253
252
|
isMenuDrilledIn,
|
|
254
253
|
isPlain,
|
|
@@ -265,6 +264,7 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
|
|
|
265
264
|
isRootMenu,
|
|
266
265
|
activeMenu,
|
|
267
266
|
role,
|
|
267
|
+
isNavFlyout,
|
|
268
268
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
269
269
|
...props
|
|
270
270
|
} = this.props;
|
|
@@ -325,7 +325,7 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
|
|
|
325
325
|
isPlain && styles.modifiers.plain,
|
|
326
326
|
isScrollable && styles.modifiers.scrollable,
|
|
327
327
|
containsFlyout && styles.modifiers.flyout,
|
|
328
|
-
isNavFlyout &&
|
|
328
|
+
isNavFlyout && 'pf-m-nav',
|
|
329
329
|
containsDrilldown && styles.modifiers.drilldown,
|
|
330
330
|
_isMenuDrilledIn && styles.modifiers.drilledIn,
|
|
331
331
|
className
|
|
@@ -441,7 +441,7 @@ const MenuItemBase: React.FunctionComponent<MenuItemProps> = ({
|
|
|
441
441
|
_isOnPath && styles.modifiers.currentPath,
|
|
442
442
|
isLoadButton && styles.modifiers.load,
|
|
443
443
|
isLoading && styles.modifiers.loading,
|
|
444
|
-
isFocused &&
|
|
444
|
+
isFocused && 'pf-m-focus',
|
|
445
445
|
isDanger && styles.modifiers.danger,
|
|
446
446
|
className
|
|
447
447
|
)}
|
|
@@ -48,7 +48,7 @@ const MenuItemActionBase: React.FunctionComponent<MenuItemActionProps> = ({
|
|
|
48
48
|
<button
|
|
49
49
|
className={css(
|
|
50
50
|
styles.menuItemAction,
|
|
51
|
-
isFavorited !== null &&
|
|
51
|
+
isFavorited !== null && 'pf-m-favorite',
|
|
52
52
|
isFavorited && styles.modifiers.favorited,
|
|
53
53
|
className
|
|
54
54
|
)}
|
|
@@ -40,17 +40,6 @@ describe('Menu', () => {
|
|
|
40
40
|
});
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
-
describe('with isNavFlyout', () => {
|
|
44
|
-
test('should render Menu with nav flyout styles applied', () => {
|
|
45
|
-
render(
|
|
46
|
-
<Menu activeItemId={0} onSelect={jest.fn()} isNavFlyout>
|
|
47
|
-
content
|
|
48
|
-
</Menu>
|
|
49
|
-
);
|
|
50
|
-
expect(screen.getByText('content')).toHaveClass('pf-m-nav');
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
|
|
54
43
|
describe('with hasCheckbox', () => {
|
|
55
44
|
test('should render Menu with checkbox items', () => {
|
|
56
45
|
render(
|
|
@@ -112,7 +112,7 @@ class MenuToggleBase extends React.Component<MenuToggleProps> {
|
|
|
112
112
|
variant === 'primary' && styles.modifiers.primary,
|
|
113
113
|
variant === 'secondary' && styles.modifiers.secondary,
|
|
114
114
|
(isPlain || isPlainText) && styles.modifiers.plain,
|
|
115
|
-
isPlainText &&
|
|
115
|
+
isPlainText && 'pf-m-text',
|
|
116
116
|
isFullHeight && styles.modifiers.fullHeight,
|
|
117
117
|
isFullWidth && styles.modifiers.fullWidth,
|
|
118
118
|
isDisabled && styles.modifiers.disabled,
|
|
@@ -208,7 +208,7 @@ const TreeViewListItemBase: React.FunctionComponent<TreeViewListItemProps> = ({
|
|
|
208
208
|
<Component
|
|
209
209
|
className={css(
|
|
210
210
|
styles.treeViewNode,
|
|
211
|
-
children && (isSelectable || hasCheckbox) &&
|
|
211
|
+
children && (isSelectable || hasCheckbox) && 'pf-m-selectable',
|
|
212
212
|
(!children || isSelectable) &&
|
|
213
213
|
activeItems &&
|
|
214
214
|
activeItems.length > 0 &&
|
|
@@ -371,7 +371,7 @@ test(`Does not render ${styles.treeViewNode} element with additional classes by
|
|
|
371
371
|
expect(treeViewNode).toHaveClass(styles.treeViewNode, { exact: true });
|
|
372
372
|
});
|
|
373
373
|
|
|
374
|
-
test(`Renders ${styles.treeViewNode} element with
|
|
374
|
+
test(`Renders ${styles.treeViewNode} element with pf-m-selectable class when hasCheckbox and children are passed`, () => {
|
|
375
375
|
render(
|
|
376
376
|
<TreeViewListItem hasCheckbox {...requiredProps}>
|
|
377
377
|
Content
|
|
@@ -380,10 +380,10 @@ test(`Renders ${styles.treeViewNode} element with ${styles.modifiers.selectable}
|
|
|
380
380
|
|
|
381
381
|
const treeViewNode = screen.getByRole('treeitem').querySelector(`.${styles.treeViewNode}`);
|
|
382
382
|
|
|
383
|
-
expect(treeViewNode).toHaveClass(
|
|
383
|
+
expect(treeViewNode).toHaveClass('pf-m-selectable');
|
|
384
384
|
});
|
|
385
385
|
|
|
386
|
-
test(`Renders ${styles.treeViewNode} element with
|
|
386
|
+
test(`Renders ${styles.treeViewNode} element with pf-m-selectable class when isSelectable and children are passed`, () => {
|
|
387
387
|
render(
|
|
388
388
|
<TreeViewListItem isSelectable {...requiredProps}>
|
|
389
389
|
Content
|
|
@@ -392,15 +392,15 @@ test(`Renders ${styles.treeViewNode} element with ${styles.modifiers.selectable}
|
|
|
392
392
|
|
|
393
393
|
const treeViewNode = screen.getByRole('treeitem').querySelector(`.${styles.treeViewNode}`);
|
|
394
394
|
|
|
395
|
-
expect(treeViewNode).toHaveClass(
|
|
395
|
+
expect(treeViewNode).toHaveClass('pf-m-selectable');
|
|
396
396
|
});
|
|
397
397
|
|
|
398
|
-
test(`Does not render ${styles.treeViewNode} element with
|
|
398
|
+
test(`Does not render ${styles.treeViewNode} element with pf-m-selectable if children are not passed`, () => {
|
|
399
399
|
render(<TreeViewListItem hasCheckbox isSelectable {...requiredProps} />);
|
|
400
400
|
|
|
401
401
|
const treeViewNode = screen.getByRole('treeitem').querySelector(`.${styles.treeViewNode}`);
|
|
402
402
|
|
|
403
|
-
expect(treeViewNode).not.toHaveClass(
|
|
403
|
+
expect(treeViewNode).not.toHaveClass('pf-m-selectable');
|
|
404
404
|
});
|
|
405
405
|
|
|
406
406
|
test(`Renders ${styles.treeViewNode} element with ${styles.modifiers.current} class when isSelectable and activeItems are passed`, () => {
|