@patternfly/react-core 6.5.0-prerelease.21 → 6.5.0-prerelease.24
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 +17 -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/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Compass/package.json +1 -1
- package/dist/dynamic/components/Content/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/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/Hero/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/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/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/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/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/AnimationsProvider/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/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/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/styles/package.json +1 -1
- package/dist/esm/components/Compass/Compass.d.ts +5 -3
- package/dist/esm/components/Compass/Compass.d.ts.map +1 -1
- package/dist/esm/components/Compass/Compass.js +3 -3
- package/dist/esm/components/Compass/Compass.js.map +1 -1
- package/dist/esm/components/Compass/CompassContent.d.ts +1 -1
- package/dist/esm/components/Compass/CompassContent.js +1 -1
- package/dist/esm/components/Compass/CompassContent.js.map +1 -1
- package/dist/esm/components/Compass/CompassMainHeader.d.ts +4 -4
- package/dist/esm/components/Compass/CompassMainHeaderContent.d.ts +2 -2
- package/dist/esm/components/Compass/CompassMainHeaderTitle.d.ts +2 -2
- package/dist/esm/components/Compass/CompassMainHeaderToolbar.d.ts +2 -2
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +7 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/Form/FormGroup.d.ts.map +1 -1
- package/dist/esm/components/Form/FormGroup.js +1 -1
- package/dist/esm/components/Form/FormGroup.js.map +1 -1
- package/dist/esm/components/Masthead/Masthead.d.ts +2 -0
- package/dist/esm/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/esm/components/Masthead/Masthead.js +2 -2
- package/dist/esm/components/Masthead/Masthead.js.map +1 -1
- package/dist/esm/components/Nav/Nav.d.ts +2 -2
- package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
- package/dist/esm/components/Nav/Nav.js +1 -1
- package/dist/esm/components/Nav/Nav.js.map +1 -1
- package/dist/esm/components/Nav/NavItem.d.ts +5 -1
- package/dist/esm/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItem.js +8 -6
- package/dist/esm/components/Nav/NavItem.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts +2 -0
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +3 -3
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +2 -2
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavInternal.js +3 -3
- package/dist/esm/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/components/Compass/Compass.d.ts +5 -3
- package/dist/js/components/Compass/Compass.d.ts.map +1 -1
- package/dist/js/components/Compass/Compass.js +3 -3
- package/dist/js/components/Compass/Compass.js.map +1 -1
- package/dist/js/components/Compass/CompassContent.d.ts +1 -1
- package/dist/js/components/Compass/CompassContent.js +1 -1
- package/dist/js/components/Compass/CompassContent.js.map +1 -1
- package/dist/js/components/Compass/CompassMainHeader.d.ts +4 -4
- package/dist/js/components/Compass/CompassMainHeaderContent.d.ts +2 -2
- package/dist/js/components/Compass/CompassMainHeaderTitle.d.ts +2 -2
- package/dist/js/components/Compass/CompassMainHeaderToolbar.d.ts +2 -2
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +7 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/Form/FormGroup.d.ts.map +1 -1
- package/dist/js/components/Form/FormGroup.js +1 -1
- package/dist/js/components/Form/FormGroup.js.map +1 -1
- package/dist/js/components/Masthead/Masthead.d.ts +2 -0
- package/dist/js/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/js/components/Masthead/Masthead.js +2 -2
- package/dist/js/components/Masthead/Masthead.js.map +1 -1
- package/dist/js/components/Nav/Nav.d.ts +2 -2
- package/dist/js/components/Nav/Nav.d.ts.map +1 -1
- package/dist/js/components/Nav/Nav.js +1 -1
- package/dist/js/components/Nav/Nav.js.map +1 -1
- package/dist/js/components/Nav/NavItem.d.ts +5 -1
- package/dist/js/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItem.js +7 -6
- package/dist/js/components/Nav/NavItem.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +2 -0
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +3 -3
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +2 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavInternal.js +3 -3
- package/dist/js/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/umd/assets/{output-Bhl00hr4.css → output-BbsSnXfK.css} +15864 -15641
- package/dist/umd/react-core.min.js +5 -5
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +7 -7
- package/src/components/Compass/Compass.tsx +46 -30
- package/src/components/Compass/CompassContent.tsx +2 -2
- package/src/components/Compass/CompassMainHeader.tsx +4 -4
- package/src/components/Compass/CompassMainHeaderContent.tsx +2 -2
- package/src/components/Compass/CompassMainHeaderTitle.tsx +2 -2
- package/src/components/Compass/CompassMainHeaderToolbar.tsx +2 -2
- package/src/components/Compass/__tests__/Compass.test.tsx +10 -0
- package/src/components/Compass/__tests__/__snapshots__/Compass.test.tsx.snap +1 -1
- package/src/components/Compass/__tests__/__snapshots__/CompassContent.test.tsx.snap +1 -1
- package/src/components/Compass/examples/Compass.md +16 -15
- package/src/components/Compass/examples/CompassDockLayout.tsx +25 -0
- package/src/components/Compass/examples/compass.css +16 -4
- package/src/components/Drawer/DrawerPanelContent.tsx +7 -0
- package/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +20 -0
- package/src/components/Drawer/__tests__/Generated/__snapshots__/DrawerPanelContent.test.tsx.snap +1 -0
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.test.tsx.snap +2 -0
- package/src/components/Drawer/examples/Drawer.md +1 -1
- package/src/components/Drawer/examples/DrawerAdditionalSectionAboveContent.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBasic.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBasicInline.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBasicPill.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBreakpoint.tsx +1 -1
- package/src/components/Drawer/examples/DrawerInlinePanelEnd.tsx +1 -1
- package/src/components/Drawer/examples/DrawerInlinePanelStart.tsx +1 -1
- package/src/components/Drawer/examples/DrawerModifiedContentPadding.tsx +1 -1
- package/src/components/Drawer/examples/DrawerModifiedPanelPadding.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPanelBottom.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPanelEnd.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPanelStart.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPillInline.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableAtEnd.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableAtStart.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableOnBottom.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableOnInline.tsx +1 -1
- package/src/components/Drawer/examples/DrawerStatic.tsx +1 -1
- package/src/components/Form/FormGroup.tsx +1 -2
- package/src/components/Form/__tests__/__snapshots__/FormGroup.test.tsx.snap +1 -1
- package/src/components/LoginPage/__tests__/__snapshots__/LoginForm.test.tsx.snap +6 -6
- package/src/components/Masthead/Masthead.tsx +4 -0
- package/src/components/Masthead/__tests__/Masthead.test.tsx +25 -1
- package/src/components/Nav/Nav.tsx +3 -2
- package/src/components/Nav/NavItem.tsx +27 -3
- package/src/components/Nav/__tests__/Nav.test.tsx +15 -0
- package/src/components/Page/Page.tsx +5 -1
- package/src/components/Page/__tests__/Page.test.tsx +17 -0
- package/src/components/Toolbar/Toolbar.tsx +4 -0
- package/src/components/Toolbar/__tests__/Toolbar.test.tsx +34 -1
- package/src/components/Wizard/WizardNavInternal.tsx +3 -3
- package/src/components/Wizard/__tests__/Wizard.test.tsx +39 -0
- package/src/demos/Compass/Compass.md +40 -0
- package/src/demos/Compass/examples/CompassDockDemo.tsx +215 -0
- package/src/demos/Page.md +12 -1
- package/src/demos/assets/PF-IconLogo-color.svg +17 -0
- package/src/demos/examples/Page/PageDockedNav.tsx +259 -0
- package/src/layouts/Bullseye/examples/bullseye.css +2 -2
- package/src/layouts/Flex/examples/flex.css +3 -3
- package/src/layouts/Gallery/examples/gallery.css +2 -2
- package/src/layouts/Grid/examples/grid.css +2 -2
- package/src/layouts/Level/examples/level.css +4 -4
- package/src/layouts/Split/examples/split.css +2 -2
- package/src/layouts/Stack/examples/stack.css +4 -4
- /package/src/{components → demos}/Compass/examples/CompassDemo.tsx +0 -0
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.5.0-prerelease.
|
|
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.5.0-prerelease.23","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.5.0-prerelease.
|
|
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.5.0-prerelease.23","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.5.0-prerelease.
|
|
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.5.0-prerelease.23","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.5.0-prerelease.
|
|
3
|
+
"version": "6.5.0-prerelease.24",
|
|
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.mjs --config subpaths.config.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@patternfly/react-icons": "^6.5.0-prerelease.
|
|
50
|
-
"@patternfly/react-styles": "^6.5.0-prerelease.
|
|
51
|
-
"@patternfly/react-tokens": "^6.5.0-prerelease.
|
|
52
|
-
"focus-trap": "7.6.
|
|
49
|
+
"@patternfly/react-icons": "^6.5.0-prerelease.11",
|
|
50
|
+
"@patternfly/react-styles": "^6.5.0-prerelease.9",
|
|
51
|
+
"@patternfly/react-tokens": "^6.5.0-prerelease.9",
|
|
52
|
+
"focus-trap": "7.6.6",
|
|
53
53
|
"react-dropzone": "^14.3.5",
|
|
54
54
|
"tslib": "^2.8.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@patternfly/patternfly": "6.5.0-prerelease.
|
|
57
|
+
"@patternfly/patternfly": "6.5.0-prerelease.33",
|
|
58
58
|
"case-anything": "^3.1.2",
|
|
59
59
|
"css": "^3.0.0",
|
|
60
60
|
"fs-extra": "^11.3.0"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": "^17 || ^18 || ^19",
|
|
64
64
|
"react-dom": "^17 || ^18 || ^19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a5726d0a999e6397b5df4e339b03c01efdb0f070"
|
|
67
67
|
}
|
|
@@ -6,8 +6,10 @@ import compassBackgroundImageLight from '@patternfly/react-tokens/dist/esm/c_com
|
|
|
6
6
|
import compassBackgroundImageDark from '@patternfly/react-tokens/dist/esm/c_compass_BackgroundImage_dark';
|
|
7
7
|
|
|
8
8
|
export interface CompassProps extends React.HTMLProps<HTMLDivElement> {
|
|
9
|
-
/** Additional classes added to the
|
|
9
|
+
/** Additional classes added to the Compass. */
|
|
10
10
|
className?: string;
|
|
11
|
+
/** Content of the docked navigation area of the layout */
|
|
12
|
+
dock?: React.ReactNode;
|
|
11
13
|
/** Content placed at the top of the layout */
|
|
12
14
|
header?: React.ReactNode;
|
|
13
15
|
/** Flag indicating if the header is expanded */
|
|
@@ -30,14 +32,15 @@ export interface CompassProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
30
32
|
drawerContent?: React.ReactNode;
|
|
31
33
|
/** Additional props passed to the drawer */
|
|
32
34
|
drawerProps?: DrawerProps;
|
|
33
|
-
/** Light theme background image path of the
|
|
35
|
+
/** Light theme background image path of the Compass */
|
|
34
36
|
backgroundSrcLight?: string;
|
|
35
|
-
/** Dark theme background image path of the
|
|
37
|
+
/** Dark theme background image path of the Compass */
|
|
36
38
|
backgroundSrcDark?: string;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
export const Compass: React.FunctionComponent<CompassProps> = ({
|
|
40
42
|
className,
|
|
43
|
+
dock,
|
|
41
44
|
header,
|
|
42
45
|
isHeaderExpanded = true,
|
|
43
46
|
sidebarStart,
|
|
@@ -64,38 +67,51 @@ export const Compass: React.FunctionComponent<CompassProps> = ({
|
|
|
64
67
|
}
|
|
65
68
|
|
|
66
69
|
const compassContent = (
|
|
67
|
-
<div
|
|
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
|
-
|
|
70
|
+
<div
|
|
71
|
+
className={css(styles.compass, dock !== undefined && styles.modifiers.dock, className)}
|
|
72
|
+
{...props}
|
|
73
|
+
style={{ ...props.style, ...backgroundImageStyles }}
|
|
74
|
+
>
|
|
75
|
+
{dock && <div className={css(`${styles.compass}__dock`)}>{dock}</div>}
|
|
76
|
+
{header && (
|
|
77
|
+
<div
|
|
78
|
+
className={css(styles.compassHeader, isHeaderExpanded && 'pf-m-expanded')}
|
|
79
|
+
{...(!isHeaderExpanded && { inert: 'true' })}
|
|
80
|
+
>
|
|
81
|
+
{header}
|
|
82
|
+
</div>
|
|
83
|
+
)}
|
|
84
|
+
{sidebarStart && (
|
|
85
|
+
<div
|
|
86
|
+
className={css(styles.compassSidebar, styles.modifiers.start, isSidebarStartExpanded && 'pf-m-expanded')}
|
|
87
|
+
{...(!isSidebarStartExpanded && { inert: 'true' })}
|
|
88
|
+
>
|
|
89
|
+
{sidebarStart}
|
|
90
|
+
</div>
|
|
91
|
+
)}
|
|
92
|
+
{main && <div className={css(styles.compassMain)}>{main}</div>}
|
|
93
|
+
{sidebarEnd && (
|
|
94
|
+
<div
|
|
95
|
+
className={css(styles.compassSidebar, styles.modifiers.end, isSidebarEndExpanded && 'pf-m-expanded')}
|
|
96
|
+
{...(!isSidebarEndExpanded && { inert: 'true' })}
|
|
97
|
+
>
|
|
98
|
+
{sidebarEnd}
|
|
99
|
+
</div>
|
|
100
|
+
)}
|
|
101
|
+
{footer && (
|
|
102
|
+
<div
|
|
103
|
+
className={css(styles.compassFooter, isFooterExpanded && 'pf-m-expanded')}
|
|
104
|
+
{...(!isFooterExpanded && { inert: 'true' })}
|
|
105
|
+
>
|
|
106
|
+
{footer}
|
|
107
|
+
</div>
|
|
108
|
+
)}
|
|
93
109
|
</div>
|
|
94
110
|
);
|
|
95
111
|
|
|
96
112
|
if (hasDrawer) {
|
|
97
113
|
return (
|
|
98
|
-
<Drawer {...drawerProps}>
|
|
114
|
+
<Drawer isPill {...drawerProps}>
|
|
99
115
|
<DrawerContent panelContent={drawerContent}>
|
|
100
116
|
<DrawerContentBody>{compassContent}</DrawerContentBody>
|
|
101
117
|
</DrawerContent>
|
|
@@ -3,7 +3,7 @@ import styles from '@patternfly/react-styles/css/components/Compass/compass';
|
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
|
|
5
5
|
export interface CompassContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
6
|
-
/** Content of the main
|
|
6
|
+
/** Content of the main Compass area. Typically one or more CompassPanel components. */
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
/** Additional classes added to the CompassContent */
|
|
9
9
|
className?: string;
|
|
@@ -30,7 +30,7 @@ export const CompassContent: React.FunctionComponent<CompassContentProps> = ({
|
|
|
30
30
|
|
|
31
31
|
if (hasDrawer) {
|
|
32
32
|
return (
|
|
33
|
-
<Drawer {...drawerProps}>
|
|
33
|
+
<Drawer isPill {...drawerProps}>
|
|
34
34
|
<DrawerContent panelContent={drawerContent}>{compassContent}</DrawerContent>
|
|
35
35
|
</Drawer>
|
|
36
36
|
);
|
|
@@ -5,8 +5,8 @@ import { CompassMainHeaderToolbar } from './CompassMainHeaderToolbar';
|
|
|
5
5
|
import styles from '@patternfly/react-styles/css/components/Compass/compass';
|
|
6
6
|
import { css } from '@patternfly/react-styles';
|
|
7
7
|
|
|
8
|
-
/** The wrapper component for header content in the main
|
|
9
|
-
* you should ensure any content within the main header is rendered inside a
|
|
8
|
+
/** The wrapper component for header content in the main Compass area. When building out a custom implementation,
|
|
9
|
+
* you should ensure any content within the main header is rendered inside a Compass panel and main header content wrappers.
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
export interface CompassMainHeaderProps extends Omit<React.HTMLProps<HTMLDivElement>, 'title'> {
|
|
@@ -18,8 +18,8 @@ export interface CompassMainHeaderProps extends Omit<React.HTMLProps<HTMLDivElem
|
|
|
18
18
|
title?: React.ReactNode;
|
|
19
19
|
/** Styled toolbar. If title or toolbar is provided, the children will be ignored. */
|
|
20
20
|
toolbar?: React.ReactNode;
|
|
21
|
-
/** Additional props passed to the
|
|
22
|
-
* children prop, you should pass your own
|
|
21
|
+
/** Additional props passed to the Compass panel that wraps the main header content when using the title or toolbar props. When using the
|
|
22
|
+
* children prop, you should pass your own Compass panel.
|
|
23
23
|
*/
|
|
24
24
|
compassPanelProps?: Omit<CompassPanelProps, 'children'>;
|
|
25
25
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styles from '@patternfly/react-styles/css/components/Compass/compass';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
|
|
4
|
-
/** A wrapper component to be passed as custom content for the
|
|
5
|
-
* in a
|
|
4
|
+
/** A wrapper component to be passed as custom content for the Compass main header. This should also be wrapped
|
|
5
|
+
* in a Compass panel component.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export interface CompassMainHeaderContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styles from '@patternfly/react-styles/css/components/Compass/compass';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
|
|
4
|
-
/** A wrapper component for custom title content to be passed into a
|
|
5
|
-
* by a
|
|
4
|
+
/** A wrapper component for custom title content to be passed into a Compass main header. This should also be wrapped
|
|
5
|
+
* by a Compass main header content component.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export interface CompassMainHeaderTitleProps extends React.HTMLProps<HTMLDivElement> {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styles from '@patternfly/react-styles/css/components/Compass/compass';
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
|
|
4
|
-
/** A wrapper component for custom toolbar content to be passed into a
|
|
5
|
-
* by a
|
|
4
|
+
/** A wrapper component for custom toolbar content to be passed into a Compass main header. This should also be wrapped
|
|
5
|
+
* by a Compass main header content component.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
export interface CompassMainHeaderToolbarProps extends React.HTMLProps<HTMLDivElement> {
|
|
@@ -170,3 +170,13 @@ test('Matches the snapshot with drawer', () => {
|
|
|
170
170
|
);
|
|
171
171
|
expect(asFragment()).toMatchSnapshot();
|
|
172
172
|
});
|
|
173
|
+
|
|
174
|
+
test(`Renders with ${styles.modifiers.dock} class when dock is passed`, () => {
|
|
175
|
+
render(<Compass dock={<div>Dock content</div>} data-testid="compass" />);
|
|
176
|
+
expect(screen.getByTestId('compass')).toHaveClass(styles.modifiers.dock);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
test(`Does not render with ${styles.modifiers.dock} class when dock is not passed`, () => {
|
|
180
|
+
render(<Compass data-testid="compass" />);
|
|
181
|
+
expect(screen.getByTestId('compass')).not.toHaveClass(styles.modifiers.dock);
|
|
182
|
+
});
|
|
@@ -47,7 +47,7 @@ exports[`Matches the snapshot with basic layout 1`] = `
|
|
|
47
47
|
exports[`Matches the snapshot with drawer 1`] = `
|
|
48
48
|
<DocumentFragment>
|
|
49
49
|
<div
|
|
50
|
-
class="pf-v6-c-drawer pf-m-expanded"
|
|
50
|
+
class="pf-v6-c-drawer pf-m-expanded pf-m-pill"
|
|
51
51
|
>
|
|
52
52
|
<div
|
|
53
53
|
class="pf-v6-c-drawer__main"
|
|
@@ -12,11 +12,12 @@ propComponents:
|
|
|
12
12
|
'CompassHero',
|
|
13
13
|
'CompassMainHeader',
|
|
14
14
|
'CompassPanel',
|
|
15
|
-
'CompassMessageBar'
|
|
15
|
+
'CompassMessageBar',
|
|
16
|
+
'CompassMainFooter'
|
|
16
17
|
]
|
|
17
18
|
---
|
|
18
19
|
|
|
19
|
-
import { useRef, useState } from 'react';
|
|
20
|
+
import { useRef, useState, useEffect } from 'react';
|
|
20
21
|
import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
21
22
|
import OutlinedPlusSquare from '@patternfly/react-icons/dist/esm/icons/outlined-plus-square-icon';
|
|
22
23
|
import OutlinedCopy from '@patternfly/react-icons/dist/esm/icons/outlined-copy-icon';
|
|
@@ -28,15 +29,15 @@ import './compass.css';
|
|
|
28
29
|
|
|
29
30
|
### Basic
|
|
30
31
|
|
|
31
|
-
In a basic
|
|
32
|
+
In a basic Compass layout, content can be passed to the following props to populate different areas of the page:
|
|
32
33
|
|
|
33
|
-
- `header`:
|
|
34
|
-
- `sidebarStart`:
|
|
35
|
-
- `main`:
|
|
36
|
-
- `sidebarEnd`:
|
|
37
|
-
- `footer`:
|
|
34
|
+
- `header`: Content rendered at the top of the page, typically including a `<CompassHeader>` component that divides the header into 3 areas, with a logo or brand, middle navigation, and profile.
|
|
35
|
+
- `sidebarStart`: Content rendered at the horizontal start of the page (by default, the left side).
|
|
36
|
+
- `main`: Content rendered in the center of the page, typically including a `<CompassMainHeader>` or `<CompassHero>`, along with a `<CompassContent>` filled with 1 or more `<CompassPanel>` components.
|
|
37
|
+
- `sidebarEnd`: Content rendered at the horizontal end of the page (by default, the right side).
|
|
38
|
+
- `footer`: Content rendered at the bottom of the page.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
To customize the background image of the `<Compass>` and `<CompassHero>` components, you can use their respective `backgroundSrcLight` and `backgroundSrcDark` props. You can also add and customize a color gradient background for the `<CompassHero>` component by using the `gradientLight` and `gradientDark` props.
|
|
40
41
|
|
|
41
42
|
```ts isBeta file="CompassBasic.tsx"
|
|
42
43
|
|
|
@@ -44,31 +45,31 @@ The background image of the `Compass` and `CompassHero` may be customized by usi
|
|
|
44
45
|
|
|
45
46
|
### With alternate footer
|
|
46
47
|
|
|
47
|
-
When `footer` is used, its content will
|
|
48
|
+
When `footer` is used, its content will fill the width of the screen. By default, when content inside the footer grows, the height and placement of the start and end sidebars will adjust to allow for the change. To modify this behavior and render footer content without interfering with the sidebars, instead place a `<CompassMainFooter>` inside the `main` section. This will render content at the bottom of the page between the 2 sidebars, rather than across the entire bottom of the page.
|
|
48
49
|
|
|
49
50
|
```ts file="CompassMainFooterDemo.tsx"
|
|
50
51
|
|
|
51
52
|
```
|
|
52
53
|
|
|
53
|
-
###
|
|
54
|
+
### With docked nav
|
|
54
55
|
|
|
55
|
-
```ts
|
|
56
|
+
```ts file="CompassDockLayout.tsx"
|
|
56
57
|
|
|
57
58
|
```
|
|
58
59
|
|
|
59
60
|
## Composable structure
|
|
60
61
|
|
|
61
|
-
When building a more custom implementation
|
|
62
|
+
When building a more custom implementation with Compass components, there are some intended or expected structures that must remain present.
|
|
62
63
|
|
|
63
64
|
### CompassMainHeader structure
|
|
64
65
|
|
|
65
|
-
When using the `children` property in the `<CompassMainHeader>` component,
|
|
66
|
+
When using the `children` property in the `<CompassMainHeader>` component, there are specific structural patterns that you should follow, as shown this general code structure.
|
|
66
67
|
|
|
67
68
|
```noLive
|
|
68
69
|
<CompassMainHeader>
|
|
69
70
|
<CompassPanel>
|
|
70
71
|
<CompassMainHeaderContent>
|
|
71
|
-
{Your custom content goes here, which can include the CompassMainHeaderTitle and/or CompassMainHeaderToolbar sub-components}
|
|
72
|
+
{Your custom content goes here, which can include the <CompassMainHeaderTitle> and/or <CompassMainHeaderToolbar> sub-components}
|
|
72
73
|
</CompassMainHeaderContent>
|
|
73
74
|
</CompassPanel>
|
|
74
75
|
</CompassMainHeader>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Compass,
|
|
3
|
+
CompassContent,
|
|
4
|
+
CompassMainHeader,
|
|
5
|
+
CompassPanel,
|
|
6
|
+
CompassMainHeaderContent
|
|
7
|
+
} from '@patternfly/react-core';
|
|
8
|
+
import './compass.css';
|
|
9
|
+
|
|
10
|
+
export const CompassBasic: React.FunctionComponent = () => {
|
|
11
|
+
const dockContent = <div>Content</div>;
|
|
12
|
+
const mainContent = (
|
|
13
|
+
<CompassContent>
|
|
14
|
+
<CompassMainHeader>
|
|
15
|
+
<CompassPanel>
|
|
16
|
+
<CompassMainHeaderContent>
|
|
17
|
+
<div>Content title</div>
|
|
18
|
+
</CompassMainHeaderContent>
|
|
19
|
+
</CompassPanel>
|
|
20
|
+
</CompassMainHeader>
|
|
21
|
+
<div>Content</div>
|
|
22
|
+
</CompassContent>
|
|
23
|
+
);
|
|
24
|
+
return <Compass dock={dockContent} main={mainContent} />;
|
|
25
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#ws-react-
|
|
1
|
+
#ws-react-a-compass-basic [class*="pf-v6-c-compass"] {
|
|
2
2
|
position: relative;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
#ws-react-
|
|
5
|
+
#ws-react-a-compass-basic [class*="pf-v6-c-compass"]::after {
|
|
6
6
|
content: "";
|
|
7
7
|
position: absolute;
|
|
8
8
|
inset: 0;
|
|
@@ -10,11 +10,23 @@
|
|
|
10
10
|
pointer-events: none;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
#ws-react-
|
|
13
|
+
#ws-react-a-compass-with-alternate-footer [class*="pf-v6-c-compass"] {
|
|
14
14
|
position: relative;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
#ws-react-
|
|
17
|
+
#ws-react-a-compass-with-alternate-footer [class*="pf-v6-c-compass"]:not([class*="footer"])::after {
|
|
18
|
+
content: "";
|
|
19
|
+
position: absolute;
|
|
20
|
+
inset: 0;
|
|
21
|
+
border: var(--pf-t--global--border--width--regular) dashed var(--pf-t--global--border--color--default);
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#ws-react-a-compass-with-docked-nav [class*="pf-v6-c-compass"] {
|
|
26
|
+
position: relative;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#ws-react-a-compass-with-docked-nav [class*="pf-v6-c-compass"]:not([class*="footer"])::after {
|
|
18
30
|
content: "";
|
|
19
31
|
position: absolute;
|
|
20
32
|
inset: 0;
|
|
@@ -90,6 +90,7 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
90
90
|
const hidden = isStatic ? false : !isExpanded;
|
|
91
91
|
const [isExpandedInternal, setIsExpandedInternal] = useState(!hidden);
|
|
92
92
|
const [isFocusTrapActive, setIsFocusTrapActive] = useState(false);
|
|
93
|
+
const [shouldCollapseSpace, setShouldCollapseSpace] = useState(hidden);
|
|
93
94
|
const previouslyFocusedElement = useRef(null);
|
|
94
95
|
let currWidth: number = 0;
|
|
95
96
|
let panelRect: DOMRect;
|
|
@@ -108,6 +109,7 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
108
109
|
useEffect(() => {
|
|
109
110
|
if (!isStatic && isExpanded) {
|
|
110
111
|
setIsExpandedInternal(isExpanded);
|
|
112
|
+
setShouldCollapseSpace(false);
|
|
111
113
|
}
|
|
112
114
|
}, [isStatic, isExpanded]);
|
|
113
115
|
|
|
@@ -380,6 +382,10 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
380
382
|
onExpand(ev);
|
|
381
383
|
}
|
|
382
384
|
setIsExpandedInternal(!hidden);
|
|
385
|
+
// We also need to collapse the space when the panel is hidden to prevent automation from scrolling to it
|
|
386
|
+
if (hidden && ev.nativeEvent.propertyName === 'transform') {
|
|
387
|
+
setShouldCollapseSpace(true);
|
|
388
|
+
}
|
|
383
389
|
if (isValidFocusTrap && ev.nativeEvent.propertyName === 'transform') {
|
|
384
390
|
setIsFocusTrapActive((prevIsFocusTrapActive) => !prevIsFocusTrapActive);
|
|
385
391
|
}
|
|
@@ -390,6 +396,7 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
390
396
|
...((defaultSize || minSize || maxSize) && boundaryCssVars),
|
|
391
397
|
...style
|
|
392
398
|
}}
|
|
399
|
+
{...(shouldCollapseSpace && { inert: '' })}
|
|
393
400
|
{...props}
|
|
394
401
|
ref={panel}
|
|
395
402
|
>
|
|
@@ -122,6 +122,26 @@ test('Renders with role="dialog" when focusTrap.enabled is true', () => {
|
|
|
122
122
|
expect(screen.getByRole('dialog')).toBeInTheDocument();
|
|
123
123
|
});
|
|
124
124
|
|
|
125
|
+
test('Does not render with inert when drawer is expanded', () => {
|
|
126
|
+
render(
|
|
127
|
+
<Drawer isExpanded>
|
|
128
|
+
<DrawerPanelContent data-testid="drawer-content">Drawer panel content</DrawerPanelContent>
|
|
129
|
+
</Drawer>
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
expect(screen.getByTestId('drawer-content')).not.toHaveAttribute('inert');
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test('Renders with inert when drawer is collapsed', () => {
|
|
136
|
+
render(
|
|
137
|
+
<Drawer>
|
|
138
|
+
<DrawerPanelContent data-testid="drawer-content">Drawer panel content</DrawerPanelContent>
|
|
139
|
+
</Drawer>
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
expect(screen.getByTestId('drawer-content')).toHaveAttribute('inert');
|
|
143
|
+
});
|
|
144
|
+
|
|
125
145
|
test('Applies style prop as expected', () => {
|
|
126
146
|
render(
|
|
127
147
|
<Drawer isExpanded>
|
|
@@ -281,6 +281,7 @@ exports[`Drawer isExpanded = false and isInline = false and isStatic = false 1`]
|
|
|
281
281
|
class="pf-v6-c-drawer__panel"
|
|
282
282
|
hidden=""
|
|
283
283
|
id="generated-id"
|
|
284
|
+
inert=""
|
|
284
285
|
/>
|
|
285
286
|
</div>
|
|
286
287
|
</div>
|
|
@@ -308,6 +309,7 @@ exports[`Drawer isExpanded = false and isInline = true and isStatic = false 1`]
|
|
|
308
309
|
class="pf-v6-c-drawer__panel"
|
|
309
310
|
hidden=""
|
|
310
311
|
id="generated-id"
|
|
312
|
+
inert=""
|
|
311
313
|
/>
|
|
312
314
|
</div>
|
|
313
315
|
</div>
|
|
@@ -135,7 +135,7 @@ import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/
|
|
|
135
135
|
|
|
136
136
|
### With focus trap
|
|
137
137
|
|
|
138
|
-
When a [focus trap](/accessibility/
|
|
138
|
+
When a [focus trap](/accessibility/develop#trapping-focus) is enabled on an element, a user will only be able to interact with the contents of that element until the focus trap is closed or deactivated.
|
|
139
139
|
|
|
140
140
|
To enable and customize a focus trap on a drawer panel, apply the `focusTrap` property to the `<DrawerPanelContent>` component. Enabling a focus trap with `focusTrap.enabled` will also automatically place focus on the first focusable element when the drawer panel expands, and return focus to the previously focused element when it collapses.
|
|
141
141
|
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
|
|
14
14
|
export const DrawerAdditionalSectionAboveContent: React.FunctionComponent = () => {
|
|
15
15
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
16
|
-
const drawerRef = useRef<
|
|
16
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
17
17
|
|
|
18
18
|
const onExpand = () => {
|
|
19
19
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
|
|
15
15
|
export const DrawerBasic: React.FunctionComponent = () => {
|
|
16
16
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
17
|
-
const drawerRef = useRef<
|
|
17
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
18
18
|
|
|
19
19
|
const onExpand = () => {
|
|
20
20
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerBasicInline: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerBasicPill: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerBreakpoint: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerInlinePanelEnd: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerInlinePanelStart: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerModifiedContentPadding: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerModifiedPanelPadding: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerPanelBottom: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerPanelEnd: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|