@patternfly/react-core 6.0.0-alpha.15 → 6.0.0-alpha.16
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 +4 -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/package.json +1 -1
- package/dist/esm/components/Card/Card.d.ts.map +1 -1
- package/dist/esm/components/Card/Card.js +19 -8
- package/dist/esm/components/Card/Card.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.d.ts +0 -1
- package/dist/esm/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +0 -1
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerContent.d.ts +1 -1
- package/dist/esm/components/Drawer/DrawerContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerContent.js +1 -1
- package/dist/esm/components/Drawer/DrawerContent.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerSection.d.ts +1 -1
- package/dist/esm/components/Drawer/DrawerSection.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerSection.js +1 -1
- package/dist/esm/components/Drawer/DrawerSection.js.map +1 -1
- package/dist/esm/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/esm/components/NumberInput/NumberInput.js +3 -1
- package/dist/esm/components/NumberInput/NumberInput.js.map +1 -1
- package/dist/js/components/Card/Card.d.ts.map +1 -1
- package/dist/js/components/Card/Card.js +19 -8
- package/dist/js/components/Card/Card.js.map +1 -1
- package/dist/js/components/Drawer/Drawer.d.ts +0 -1
- package/dist/js/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/js/components/Drawer/Drawer.js +0 -1
- package/dist/js/components/Drawer/Drawer.js.map +1 -1
- package/dist/js/components/Drawer/DrawerContent.d.ts +1 -1
- package/dist/js/components/Drawer/DrawerContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerContent.js +1 -1
- package/dist/js/components/Drawer/DrawerContent.js.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/Drawer/DrawerSection.d.ts +1 -1
- package/dist/js/components/Drawer/DrawerSection.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerSection.js +1 -1
- package/dist/js/components/Drawer/DrawerSection.js.map +1 -1
- package/dist/js/components/NumberInput/NumberInput.d.ts.map +1 -1
- package/dist/js/components/NumberInput/NumberInput.js +3 -1
- package/dist/js/components/NumberInput/NumberInput.js.map +1 -1
- 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/Card/Card.tsx +14 -10
- package/src/components/Card/__tests__/Card.test.tsx +10 -5
- package/src/components/Card/examples/CardWithModifiers.tsx +2 -1
- package/src/components/Drawer/Drawer.tsx +0 -1
- package/src/components/Drawer/DrawerContent.tsx +1 -2
- package/src/components/Drawer/DrawerPanelContent.tsx +1 -2
- package/src/components/Drawer/DrawerSection.tsx +1 -2
- package/src/components/Drawer/__tests__/Drawer.test.tsx +3 -3
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.test.tsx.snap +1 -1
- package/src/components/Drawer/examples/DrawerSecondaryBackground.tsx +6 -5
- package/src/components/NumberInput/NumberInput.tsx +2 -1
- package/src/components/NumberInput/__tests__/__snapshots__/NumberInput.test.tsx.snap +3 -3
- package/src/components/Wizard/examples/WizardStepDrawerContent.tsx +2 -2
- package/src/demos/examples/Wizard/InModalWithDrawer.tsx +3 -3
- package/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx +3 -3
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +3 -3
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +2 -2
- package/src/deprecated/components/Wizard/__tests__/Wizard.test.tsx +3 -2
- package/src/deprecated/components/Wizard/examples/WizardWithDrawer.tsx +7 -11
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.15","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.15","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.15","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.16",
|
|
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.8",
|
|
50
|
+
"@patternfly/react-styles": "^6.0.0-alpha.8",
|
|
51
|
+
"@patternfly/react-tokens": "^6.0.0-alpha.8",
|
|
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.63",
|
|
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",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"react": "^17 || ^18",
|
|
73
73
|
"react-dom": "^17 || ^18"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "33b82ec94f4742d6ffca49a9ac03cb5593a2b34a"
|
|
76
76
|
}
|
|
@@ -87,9 +87,11 @@ export const Card: React.FunctionComponent<CardProps> = ({
|
|
|
87
87
|
isSelectableRaised = false,
|
|
88
88
|
isSelected = false,
|
|
89
89
|
isDisabledRaised = false,
|
|
90
|
-
|
|
90
|
+
// TODO: Update with issue #9991
|
|
91
|
+
// isFlat = false,
|
|
91
92
|
isExpanded = false,
|
|
92
|
-
|
|
93
|
+
// TODO: Update with issue #9991
|
|
94
|
+
// isRounded = false,
|
|
93
95
|
isLarge = false,
|
|
94
96
|
isFullHeight = false,
|
|
95
97
|
isPlain = false,
|
|
@@ -112,12 +114,13 @@ export const Card: React.FunctionComponent<CardProps> = ({
|
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
const getSelectableModifiers = () => {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
117
|
+
// TODO: Update with issue #9991
|
|
118
|
+
// if (isDisabledRaised) {
|
|
119
|
+
// return css(styles.modifiers.nonSelectableRaised);
|
|
120
|
+
// }
|
|
121
|
+
// if (isSelectableRaised) {
|
|
122
|
+
// return css(styles.modifiers.selectableRaised, isSelected && styles.modifiers.selectedRaised);
|
|
123
|
+
// }
|
|
121
124
|
if (isSelectable && isClickable) {
|
|
122
125
|
return css(styles.modifiers.selectable, styles.modifiers.clickable, isSelected && styles.modifiers.current);
|
|
123
126
|
}
|
|
@@ -185,8 +188,9 @@ export const Card: React.FunctionComponent<CardProps> = ({
|
|
|
185
188
|
styles.card,
|
|
186
189
|
isCompact && styles.modifiers.compact,
|
|
187
190
|
isExpanded && styles.modifiers.expanded,
|
|
188
|
-
|
|
189
|
-
|
|
191
|
+
// TODO: Update with issue #9991
|
|
192
|
+
// isFlat && styles.modifiers.flat,
|
|
193
|
+
// isRounded && styles.modifiers.rounded,
|
|
190
194
|
isLarge && styles.modifiers.displayLg,
|
|
191
195
|
isFullHeight && styles.modifiers.fullHeight,
|
|
192
196
|
isPlain && styles.modifiers.plain,
|
|
@@ -69,12 +69,14 @@ describe('Card', () => {
|
|
|
69
69
|
expect(card.getAttribute('tabindex')).toBeNull();
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
// TODO: Update with issue #9991
|
|
73
|
+
xtest('card with isDisabledRaised applied', () => {
|
|
73
74
|
render(<Card isDisabledRaised>disabled raised card</Card>);
|
|
74
75
|
expect(screen.getByText('disabled raised card')).toHaveClass('pf-m-non-selectable-raised');
|
|
75
76
|
});
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
// TODO: Update with issue #9991
|
|
79
|
+
xtest('card with isSelectableRaised applied - not change', () => {
|
|
78
80
|
render(<Card isSelectableRaised>raised selectable card</Card>);
|
|
79
81
|
|
|
80
82
|
const card = screen.getByText('raised selectable card');
|
|
@@ -82,7 +84,8 @@ describe('Card', () => {
|
|
|
82
84
|
expect(card).toHaveAttribute('tabindex', '0');
|
|
83
85
|
});
|
|
84
86
|
|
|
85
|
-
|
|
87
|
+
// TODO: Update with issue #9991
|
|
88
|
+
xtest('card with isSelectableRaised and isSelected applied ', () => {
|
|
86
89
|
render(
|
|
87
90
|
<Card isSelected isSelectableRaised>
|
|
88
91
|
raised selected card
|
|
@@ -95,7 +98,8 @@ describe('Card', () => {
|
|
|
95
98
|
expect(card).toHaveAttribute('tabindex', '0');
|
|
96
99
|
});
|
|
97
100
|
|
|
98
|
-
|
|
101
|
+
// TODO: Update with issue #9991
|
|
102
|
+
xtest('card with isFlat applied', () => {
|
|
99
103
|
render(<Card isFlat>flat card</Card>);
|
|
100
104
|
expect(screen.getByText('flat card')).toHaveClass('pf-m-flat');
|
|
101
105
|
});
|
|
@@ -105,7 +109,8 @@ describe('Card', () => {
|
|
|
105
109
|
expect(screen.getByText('expanded card')).toHaveClass('pf-m-expanded');
|
|
106
110
|
});
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
// TODO: Update with issue #9991
|
|
113
|
+
xtest('card with isRounded applied', () => {
|
|
109
114
|
render(<Card isRounded>rounded card</Card>);
|
|
110
115
|
expect(screen.getByText('rounded card')).toHaveClass('pf-m-rounded');
|
|
111
116
|
});
|
|
@@ -2,7 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { Card, CardTitle, CardBody, CardFooter, Checkbox } from '@patternfly/react-core';
|
|
3
3
|
|
|
4
4
|
export const CardWithModifiers: React.FunctionComponent = () => {
|
|
5
|
-
|
|
5
|
+
// TODO: Update with issue #9991 removed isFlat and isRounded
|
|
6
|
+
const mods = ['isCompact', 'isLarge', 'isFullHeight', 'isPlain'];
|
|
6
7
|
const [modifiers, setModifiers] = React.useState({});
|
|
7
8
|
|
|
8
9
|
return (
|
|
@@ -12,7 +12,7 @@ export interface DrawerContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
12
12
|
/** Content rendered in the drawer panel. */
|
|
13
13
|
panelContent: React.ReactNode;
|
|
14
14
|
/** Color variant of the background of the drawer panel */
|
|
15
|
-
colorVariant?: DrawerColorVariant | '
|
|
15
|
+
colorVariant?: DrawerColorVariant | 'no-background' | 'default';
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export const DrawerContent: React.FunctionComponent<DrawerContentProps> = ({
|
|
@@ -30,7 +30,6 @@ export const DrawerContent: React.FunctionComponent<DrawerContentProps> = ({
|
|
|
30
30
|
<div
|
|
31
31
|
className={css(
|
|
32
32
|
styles.drawerContent,
|
|
33
|
-
colorVariant === DrawerColorVariant.light200 && styles.modifiers.light_200,
|
|
34
33
|
colorVariant === DrawerColorVariant.noBackground && styles.modifiers.noBackground,
|
|
35
34
|
className
|
|
36
35
|
)}
|
|
@@ -55,7 +55,7 @@ export interface DrawerPanelContentProps extends Omit<React.HTMLProps<HTMLDivEle
|
|
|
55
55
|
'2xl'?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
|
|
56
56
|
};
|
|
57
57
|
/** Color variant of the background of the drawer panel */
|
|
58
|
-
colorVariant?: DrawerColorVariant | '
|
|
58
|
+
colorVariant?: DrawerColorVariant | 'no-background' | 'default';
|
|
59
59
|
/** Adds and customizes a focus trap on the drawer panel content. */
|
|
60
60
|
focusTrap?: DrawerPanelFocusTrapObject;
|
|
61
61
|
}
|
|
@@ -366,7 +366,6 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
366
366
|
isResizable && styles.modifiers.resizable,
|
|
367
367
|
hasNoBorder && styles.modifiers.noBorder,
|
|
368
368
|
formatBreakpointMods(widths, styles),
|
|
369
|
-
colorVariant === DrawerColorVariant.light200 && styles.modifiers.light_200,
|
|
370
369
|
colorVariant === DrawerColorVariant.noBackground && styles.modifiers.noBackground,
|
|
371
370
|
className
|
|
372
371
|
)}
|
|
@@ -9,7 +9,7 @@ export interface DrawerSectionProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
9
9
|
/** Content to be rendered in the drawer section. */
|
|
10
10
|
children?: React.ReactNode;
|
|
11
11
|
/** Color variant of the background of the drawer Section */
|
|
12
|
-
colorVariant?: DrawerColorVariant | '
|
|
12
|
+
colorVariant?: DrawerColorVariant | 'no-background' | 'default';
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const DrawerSection: React.FunctionComponent<DrawerSectionProps> = ({
|
|
@@ -22,7 +22,6 @@ export const DrawerSection: React.FunctionComponent<DrawerSectionProps> = ({
|
|
|
22
22
|
<div
|
|
23
23
|
className={css(
|
|
24
24
|
styles.drawerSection,
|
|
25
|
-
colorVariant === DrawerColorVariant.light200 && styles.modifiers.light_200,
|
|
26
25
|
colorVariant === DrawerColorVariant.noBackground && styles.modifiers.noBackground,
|
|
27
26
|
className
|
|
28
27
|
)}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
DrawerContentBody,
|
|
7
7
|
DrawerHead,
|
|
8
8
|
DrawerPanelBody,
|
|
9
|
-
DrawerColorVariant,
|
|
10
9
|
DrawerPanelContent
|
|
11
10
|
} from '../';
|
|
12
11
|
import React from 'react';
|
|
@@ -71,14 +70,15 @@ test(`Drawer expands from bottom`, () => {
|
|
|
71
70
|
expect(asFragment()).toMatchSnapshot();
|
|
72
71
|
});
|
|
73
72
|
|
|
74
|
-
|
|
73
|
+
// TODO: Update/renable with issue #9979
|
|
74
|
+
xtest(`Drawer has resizable css and color variants`, () => {
|
|
75
75
|
const panelContent = (
|
|
76
76
|
<DrawerPanelContent
|
|
77
77
|
isResizable
|
|
78
78
|
minSize={'200px'}
|
|
79
79
|
defaultSize={'300px'}
|
|
80
80
|
maxSize={'400px'}
|
|
81
|
-
colorVariant={DrawerColorVariant.light200}
|
|
81
|
+
// colorVariant={DrawerColorVariant.light200}
|
|
82
82
|
>
|
|
83
83
|
<DrawerHead>
|
|
84
84
|
<span>drawer-panel</span>
|
|
@@ -133,7 +133,7 @@ exports[`Drawer has resizable callback and id 1`] = `
|
|
|
133
133
|
aria-disabled="false"
|
|
134
134
|
aria-label="Close drawer panel"
|
|
135
135
|
class="pf-v5-c-button pf-m-plain"
|
|
136
|
-
data-ouia-component-id="OUIA-Generated-Button-plain-
|
|
136
|
+
data-ouia-component-id="OUIA-Generated-Button-plain-5"
|
|
137
137
|
data-ouia-component-type="PF5/Button"
|
|
138
138
|
data-ouia-safe="true"
|
|
139
139
|
type="button"
|
|
@@ -46,7 +46,8 @@ export const DrawerSecondaryBackground: React.FunctionComponent = () => {
|
|
|
46
46
|
};
|
|
47
47
|
|
|
48
48
|
const panelContent = (
|
|
49
|
-
|
|
49
|
+
// TODO: need to update with issue #9979. Removed light color variant for secondary panel.
|
|
50
|
+
<DrawerPanelContent colorVariant={DrawerColorVariant.default}>
|
|
50
51
|
<DrawerHead>
|
|
51
52
|
<span tabIndex={isExpanded ? 0 : -1} ref={drawerRef}>
|
|
52
53
|
drawer-panel
|
|
@@ -92,11 +93,11 @@ export const DrawerSecondaryBackground: React.FunctionComponent = () => {
|
|
|
92
93
|
Toggle drawer
|
|
93
94
|
</Button>
|
|
94
95
|
<Drawer isExpanded={isExpanded} onExpand={onExpand}>
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
</DrawerSection>
|
|
96
|
+
{/* TODO: MAy need to update with issue #9979. Removed light color variant for secondary panel. */}
|
|
97
|
+
<DrawerSection colorVariant={DrawerColorVariant.default}>drawer-section</DrawerSection>
|
|
98
98
|
<DrawerContent
|
|
99
|
-
|
|
99
|
+
// TODO: need to update with issue #9979. Removed light color variant for secondary section.
|
|
100
|
+
colorVariant={DrawerColorVariant.default}
|
|
100
101
|
panelContent={panelContent}
|
|
101
102
|
>
|
|
102
103
|
<DrawerContentBody>{drawerContent}</DrawerContentBody>
|
|
@@ -106,7 +106,8 @@ export const NumberInput: React.FunctionComponent<NumberInputProps> = ({
|
|
|
106
106
|
|
|
107
107
|
return (
|
|
108
108
|
<div
|
|
109
|
-
|
|
109
|
+
// TODO: Update with issue #9978. Removed "validated !== 'default' && styles.modifiers.status" from classname to get build to work
|
|
110
|
+
className={css(styles.numberInput, className)}
|
|
110
111
|
{...(widthChars && {
|
|
111
112
|
style: {
|
|
112
113
|
[cssFormControlWidthChars.name]: widthChars,
|
|
@@ -663,7 +663,7 @@ exports[`numberInput renders disabled 1`] = `
|
|
|
663
663
|
exports[`numberInput renders error validated 1`] = `
|
|
664
664
|
<DocumentFragment>
|
|
665
665
|
<div
|
|
666
|
-
class="pf-v5-c-number-input
|
|
666
|
+
class="pf-v5-c-number-input"
|
|
667
667
|
>
|
|
668
668
|
<div
|
|
669
669
|
class="pf-v5-c-input-group"
|
|
@@ -777,7 +777,7 @@ exports[`numberInput renders error validated 1`] = `
|
|
|
777
777
|
exports[`numberInput renders success validated 1`] = `
|
|
778
778
|
<DocumentFragment>
|
|
779
779
|
<div
|
|
780
|
-
class="pf-v5-c-number-input
|
|
780
|
+
class="pf-v5-c-number-input"
|
|
781
781
|
>
|
|
782
782
|
<div
|
|
783
783
|
class="pf-v5-c-input-group"
|
|
@@ -1180,7 +1180,7 @@ exports[`numberInput renders value 1`] = `
|
|
|
1180
1180
|
exports[`numberInput renders warning validated 1`] = `
|
|
1181
1181
|
<DocumentFragment>
|
|
1182
1182
|
<div
|
|
1183
|
-
class="pf-v5-c-number-input
|
|
1183
|
+
class="pf-v5-c-number-input"
|
|
1184
1184
|
>
|
|
1185
1185
|
<div
|
|
1186
1186
|
class="pf-v5-c-input-group"
|
|
@@ -4,7 +4,6 @@ import {
|
|
|
4
4
|
Drawer,
|
|
5
5
|
DrawerContent,
|
|
6
6
|
DrawerPanelContent,
|
|
7
|
-
DrawerColorVariant,
|
|
8
7
|
DrawerHead,
|
|
9
8
|
DrawerActions,
|
|
10
9
|
DrawerCloseButton,
|
|
@@ -27,7 +26,8 @@ const StepContentWithDrawer: React.FunctionComponent = () => {
|
|
|
27
26
|
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onWizardExpand}>
|
|
28
27
|
<DrawerContent
|
|
29
28
|
panelContent={
|
|
30
|
-
|
|
29
|
+
// TODO: need to update with issue #9979. Removed light color variant for secondary panel.
|
|
30
|
+
<DrawerPanelContent widths={{ default: 'width_50' }}>
|
|
31
31
|
<DrawerHead>
|
|
32
32
|
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
33
33
|
Drawer content: <strong>{activeStep?.name}</strong>
|
|
@@ -12,8 +12,7 @@ import {
|
|
|
12
12
|
ModalVariant,
|
|
13
13
|
Wizard,
|
|
14
14
|
WizardHeader,
|
|
15
|
-
WizardStep
|
|
16
|
-
DrawerColorVariant
|
|
15
|
+
WizardStep
|
|
17
16
|
} from '@patternfly/react-core';
|
|
18
17
|
|
|
19
18
|
export const WizardModalWithDrawerDemo: React.FunctionComponent = () => {
|
|
@@ -38,7 +37,8 @@ export const WizardModalWithDrawerDemo: React.FunctionComponent = () => {
|
|
|
38
37
|
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
39
38
|
<DrawerContent
|
|
40
39
|
panelContent={
|
|
41
|
-
|
|
40
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
41
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
42
42
|
<DrawerHead>
|
|
43
43
|
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
44
44
|
Drawer content: {stepName}
|
|
@@ -15,8 +15,7 @@ import {
|
|
|
15
15
|
TextVariants,
|
|
16
16
|
Wizard,
|
|
17
17
|
WizardHeader,
|
|
18
|
-
WizardStep
|
|
19
|
-
DrawerColorVariant
|
|
18
|
+
WizardStep
|
|
20
19
|
} from '@patternfly/react-core';
|
|
21
20
|
|
|
22
21
|
export const WizardModalWithDrawerInfoStepDemo: React.FunctionComponent = () => {
|
|
@@ -41,7 +40,8 @@ export const WizardModalWithDrawerInfoStepDemo: React.FunctionComponent = () =>
|
|
|
41
40
|
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
42
41
|
<DrawerContent
|
|
43
42
|
panelContent={
|
|
44
|
-
|
|
43
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
44
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
45
45
|
<DrawerHead>
|
|
46
46
|
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
47
47
|
Drawer content: {stepName}
|
|
@@ -28,8 +28,7 @@ import {
|
|
|
28
28
|
MastheadMain,
|
|
29
29
|
MastheadBrand,
|
|
30
30
|
Wizard,
|
|
31
|
-
WizardStep
|
|
32
|
-
DrawerColorVariant
|
|
31
|
+
WizardStep
|
|
33
32
|
} from '@patternfly/react-core';
|
|
34
33
|
import pfLogo from '@patternfly/react-core/src/demos/assets/PF-HorizontalLogo-Color.svg';
|
|
35
34
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
@@ -119,7 +118,8 @@ export const WizardFullPageWithDrawerDemo: React.FunctionComponent = () => {
|
|
|
119
118
|
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
120
119
|
<DrawerContent
|
|
121
120
|
panelContent={
|
|
122
|
-
|
|
121
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
122
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
123
123
|
<DrawerHead>
|
|
124
124
|
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
125
125
|
Drawer content: {stepName}
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
Drawer,
|
|
8
8
|
DrawerActions,
|
|
9
9
|
DrawerCloseButton,
|
|
10
|
-
DrawerColorVariant,
|
|
11
10
|
DrawerContent,
|
|
12
11
|
DrawerHead,
|
|
13
12
|
DrawerPanelContent,
|
|
@@ -120,7 +119,8 @@ export const WizardFullPageWithDrawerInfoStepDemo: React.FunctionComponent = ()
|
|
|
120
119
|
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
121
120
|
<DrawerContent
|
|
122
121
|
panelContent={
|
|
123
|
-
|
|
122
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
123
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
124
124
|
<DrawerHead>
|
|
125
125
|
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
126
126
|
Drawer content: {stepName}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render, screen } from '@testing-library/react';
|
|
3
3
|
import { Wizard, WizardStepFunctionType, WizardStep } from '../Wizard';
|
|
4
|
-
import { DrawerPanelContent,
|
|
4
|
+
import { DrawerPanelContent, DrawerHead } from '../../../../../src/components/Drawer';
|
|
5
5
|
import userEvent from '@testing-library/user-event';
|
|
6
6
|
|
|
7
7
|
describe('Wizard', () => {
|
|
@@ -104,7 +104,8 @@ describe('Wizard', () => {
|
|
|
104
104
|
|
|
105
105
|
test('wiz with drawer', () => {
|
|
106
106
|
const wizDrawerPanelContent = (
|
|
107
|
-
|
|
107
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
108
|
+
<DrawerPanelContent>
|
|
108
109
|
<DrawerHead>
|
|
109
110
|
<span>This wizard has a drawer with drawer panel content</span>
|
|
110
111
|
</DrawerHead>
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Button,
|
|
4
|
-
DrawerActions,
|
|
5
|
-
DrawerCloseButton,
|
|
6
|
-
DrawerColorVariant,
|
|
7
|
-
DrawerHead,
|
|
8
|
-
DrawerPanelContent
|
|
9
|
-
} from '@patternfly/react-core';
|
|
2
|
+
import { Button, DrawerActions, DrawerCloseButton, DrawerHead, DrawerPanelContent } from '@patternfly/react-core';
|
|
10
3
|
import { Wizard as WizardDeprecated } from '@patternfly/react-core/deprecated';
|
|
11
4
|
|
|
12
5
|
export const WizardWithDrawer: React.FunctionComponent = () => {
|
|
@@ -27,7 +20,8 @@ export const WizardWithDrawer: React.FunctionComponent = () => {
|
|
|
27
20
|
};
|
|
28
21
|
|
|
29
22
|
const panel1Content = (
|
|
30
|
-
|
|
23
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
24
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
31
25
|
<DrawerHead>
|
|
32
26
|
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
33
27
|
drawer-panel-1 content
|
|
@@ -40,7 +34,8 @@ export const WizardWithDrawer: React.FunctionComponent = () => {
|
|
|
40
34
|
);
|
|
41
35
|
|
|
42
36
|
const panel2Content = (
|
|
43
|
-
|
|
37
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
38
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
44
39
|
<DrawerHead>
|
|
45
40
|
<span tabIndex={0} ref={drawerRef}>
|
|
46
41
|
drawer-panel-2 content
|
|
@@ -53,7 +48,8 @@ export const WizardWithDrawer: React.FunctionComponent = () => {
|
|
|
53
48
|
);
|
|
54
49
|
|
|
55
50
|
const panel3Content = (
|
|
56
|
-
|
|
51
|
+
// TODO: MAy need to update with issue #9979. Removed light color variant.
|
|
52
|
+
<DrawerPanelContent widths={{ default: 'width_33' }}>
|
|
57
53
|
<DrawerHead>
|
|
58
54
|
<span tabIndex={0} ref={drawerRef}>
|
|
59
55
|
drawer-panel-3 content
|