@patternfly/react-core 5.2.0-prerelease.9 → 6.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +129 -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/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/esm/components/CalendarMonth/CalendarMonth.js +15 -39
- package/dist/esm/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/esm/components/Chip/Chip.d.ts.map +1 -1
- package/dist/esm/components/Chip/Chip.js +2 -2
- package/dist/esm/components/Chip/Chip.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.js +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.js +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyToggle.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +4 -4
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/esm/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/esm/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/esm/components/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/esm/components/InputGroup/InputGroup.js +1 -51
- package/dist/esm/components/InputGroup/InputGroup.js.map +1 -1
- package/dist/esm/components/Masthead/Masthead.d.ts +0 -2
- package/dist/esm/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/esm/components/Masthead/Masthead.js +3 -3
- package/dist/esm/components/Masthead/Masthead.js.map +1 -1
- package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
- package/dist/esm/components/Menu/Menu.js +2 -1
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/Menu/MenuContainer.d.ts +2 -0
- package/dist/esm/components/Menu/MenuContainer.d.ts.map +1 -1
- package/dist/esm/components/Menu/MenuContainer.js.map +1 -1
- package/dist/esm/components/Nav/NavExpandable.d.ts +3 -3
- package/dist/esm/components/Nav/NavExpandable.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavExpandable.js +2 -2
- package/dist/esm/components/Nav/NavExpandable.js.map +1 -1
- package/dist/esm/components/Nav/NavItem.d.ts +2 -0
- package/dist/esm/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItem.js +2 -2
- package/dist/esm/components/Nav/NavItem.js.map +1 -1
- package/dist/esm/components/Nav/NavList.js +3 -3
- package/dist/esm/components/Nav/NavList.js.map +1 -1
- package/dist/esm/components/NotificationBadge/NotificationBadge.js +1 -1
- package/dist/esm/components/NotificationBadge/NotificationBadge.js.map +1 -1
- package/dist/esm/components/Page/PageSection.d.ts +2 -5
- package/dist/esm/components/Page/PageSection.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSection.js +1 -7
- package/dist/esm/components/Page/PageSection.js.map +1 -1
- package/dist/esm/components/Page/PageSidebar.d.ts +0 -2
- package/dist/esm/components/Page/PageSidebar.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSidebar.js +2 -2
- package/dist/esm/components/Page/PageSidebar.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.d.ts +2 -0
- package/dist/esm/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +2 -2
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts +2 -0
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Slider/Slider.d.ts.map +1 -1
- package/dist/esm/components/Slider/Slider.js +2 -1
- package/dist/esm/components/Slider/Slider.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +3 -3
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/demos/DashboardWrapper.js +1 -1
- package/dist/esm/demos/DashboardWrapper.js.map +1 -1
- package/dist/esm/deprecated/components/PageHeader/PageHeaderToolsItem.d.ts +0 -2
- package/dist/esm/deprecated/components/PageHeader/PageHeaderToolsItem.d.ts.map +1 -1
- package/dist/esm/deprecated/components/PageHeader/PageHeaderToolsItem.js +2 -2
- package/dist/esm/deprecated/components/PageHeader/PageHeaderToolsItem.js.map +1 -1
- package/dist/esm/helpers/Popper/Popper.d.ts +2 -1
- package/dist/esm/helpers/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/helpers/Popper/Popper.js +7 -16
- package/dist/esm/helpers/Popper/Popper.js.map +1 -1
- package/dist/esm/helpers/datetimeUtils.d.ts +1 -1
- package/dist/esm/helpers/datetimeUtils.d.ts.map +1 -1
- package/dist/esm/helpers/datetimeUtils.js.map +1 -1
- package/dist/esm/helpers/util.d.ts +9 -0
- package/dist/esm/helpers/util.d.ts.map +1 -1
- package/dist/esm/helpers/util.js +18 -0
- package/dist/esm/helpers/util.js.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.d.ts.map +1 -1
- package/dist/js/components/CalendarMonth/CalendarMonth.js +15 -39
- package/dist/js/components/CalendarMonth/CalendarMonth.js.map +1 -1
- package/dist/js/components/Chip/Chip.d.ts.map +1 -1
- package/dist/js/components/Chip/Chip.js +2 -2
- package/dist/js/components/Chip/Chip.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.js +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.js +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyToggle.js.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +3 -3
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.d.ts +2 -0
- package/dist/js/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/js/components/Dropdown/Dropdown.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/js/components/InputGroup/InputGroup.d.ts.map +1 -1
- package/dist/js/components/InputGroup/InputGroup.js +1 -51
- package/dist/js/components/InputGroup/InputGroup.js.map +1 -1
- package/dist/js/components/Masthead/Masthead.d.ts +0 -2
- package/dist/js/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/js/components/Masthead/Masthead.js +3 -3
- package/dist/js/components/Masthead/Masthead.js.map +1 -1
- package/dist/js/components/Menu/Menu.d.ts.map +1 -1
- package/dist/js/components/Menu/Menu.js +2 -1
- package/dist/js/components/Menu/Menu.js.map +1 -1
- package/dist/js/components/Menu/MenuContainer.d.ts +2 -0
- package/dist/js/components/Menu/MenuContainer.d.ts.map +1 -1
- package/dist/js/components/Menu/MenuContainer.js.map +1 -1
- package/dist/js/components/Nav/NavExpandable.d.ts +3 -3
- package/dist/js/components/Nav/NavExpandable.d.ts.map +1 -1
- package/dist/js/components/Nav/NavExpandable.js +2 -2
- package/dist/js/components/Nav/NavExpandable.js.map +1 -1
- package/dist/js/components/Nav/NavItem.d.ts +2 -0
- package/dist/js/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItem.js +2 -2
- package/dist/js/components/Nav/NavItem.js.map +1 -1
- package/dist/js/components/Nav/NavList.js +2 -2
- package/dist/js/components/Nav/NavList.js.map +1 -1
- package/dist/js/components/NotificationBadge/NotificationBadge.js +1 -1
- package/dist/js/components/NotificationBadge/NotificationBadge.js.map +1 -1
- package/dist/js/components/Page/PageSection.d.ts +2 -5
- package/dist/js/components/Page/PageSection.d.ts.map +1 -1
- package/dist/js/components/Page/PageSection.js +1 -7
- package/dist/js/components/Page/PageSection.js.map +1 -1
- package/dist/js/components/Page/PageSidebar.d.ts +0 -2
- package/dist/js/components/Page/PageSidebar.d.ts.map +1 -1
- package/dist/js/components/Page/PageSidebar.js +2 -2
- package/dist/js/components/Page/PageSidebar.js.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.d.ts +2 -0
- package/dist/js/components/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/js/components/SearchInput/SearchInput.js +2 -2
- package/dist/js/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts +2 -0
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Slider/Slider.d.ts.map +1 -1
- package/dist/js/components/Slider/Slider.js +2 -1
- package/dist/js/components/Slider/Slider.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +2 -2
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/demos/DashboardWrapper.js +1 -1
- package/dist/js/demos/DashboardWrapper.js.map +1 -1
- package/dist/js/deprecated/components/PageHeader/PageHeaderToolsItem.d.ts +0 -2
- package/dist/js/deprecated/components/PageHeader/PageHeaderToolsItem.d.ts.map +1 -1
- package/dist/js/deprecated/components/PageHeader/PageHeaderToolsItem.js +2 -2
- package/dist/js/deprecated/components/PageHeader/PageHeaderToolsItem.js.map +1 -1
- package/dist/js/helpers/Popper/Popper.d.ts +2 -1
- package/dist/js/helpers/Popper/Popper.d.ts.map +1 -1
- package/dist/js/helpers/Popper/Popper.js +9 -19
- package/dist/js/helpers/Popper/Popper.js.map +1 -1
- package/dist/js/helpers/datetimeUtils.d.ts +1 -1
- package/dist/js/helpers/datetimeUtils.d.ts.map +1 -1
- package/dist/js/helpers/datetimeUtils.js.map +1 -1
- package/dist/js/helpers/util.d.ts +9 -0
- package/dist/js/helpers/util.d.ts.map +1 -1
- package/dist/js/helpers/util.js +20 -1
- package/dist/js/helpers/util.js.map +1 -1
- package/dist/styles/assets/images/logo__pf--reverse-on-md.svg +1 -1
- package/dist/styles/assets/images/pf-c-brand__logo-on-sm.svg +1 -1
- package/dist/styles/base-no-reset.css +849 -0
- package/dist/styles/base.css +861 -13
- 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 +8 -7
- package/src/components/CalendarMonth/CalendarMonth.tsx +18 -43
- package/src/components/Checkbox/__tests__/Checkbox.test.tsx +223 -69
- package/src/components/Checkbox/__tests__/__snapshots__/Checkbox.test.tsx.snap +3 -198
- package/src/components/Chip/Chip.tsx +2 -1
- package/src/components/Chip/__tests__/Chip.test.tsx +249 -32
- package/src/components/Chip/__tests__/ChipGroup.test.tsx +288 -61
- package/src/components/Chip/__tests__/__snapshots__/Chip.test.tsx.snap +9 -209
- package/src/components/Chip/__tests__/__snapshots__/ChipGroup.test.tsx.snap +2 -313
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +1 -1
- package/src/components/ClipboardCopy/ClipboardCopyButton.tsx +2 -0
- package/src/components/ClipboardCopy/ClipboardCopyToggle.tsx +1 -1
- package/src/components/ClipboardCopy/__tests__/ClipboardCopy.test.tsx +344 -0
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyAction.test.tsx +37 -0
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyButton.test.tsx +136 -19
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyExpanded.test.tsx +71 -14
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyToggle.test.tsx +78 -34
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopy.test.tsx.snap +57 -0
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyAction.test.tsx.snap +11 -0
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyButton.test.tsx.snap +50 -24
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyExpanded.test.tsx.snap +3 -23
- package/src/components/ClipboardCopy/__tests__/__snapshots__/ClipboardCopyToggle.test.tsx.snap +5 -6
- package/src/components/Drawer/DrawerPanelContent.tsx +4 -4
- package/src/components/Dropdown/Dropdown.tsx +2 -0
- package/src/components/ExpandableSection/ExpandableSection.tsx +1 -1
- package/src/components/InputGroup/InputGroup.tsx +1 -53
- package/src/components/InputGroup/__tests__/InputGroup.test.tsx +7 -44
- package/src/components/Masthead/Masthead.tsx +0 -5
- package/src/components/Masthead/examples/Masthead.md +0 -44
- package/src/components/Menu/Menu.tsx +2 -1
- package/src/components/Menu/MenuContainer.tsx +2 -0
- package/src/components/Nav/NavExpandable.tsx +5 -5
- package/src/components/Nav/NavItem.tsx +4 -1
- package/src/components/Nav/NavList.tsx +3 -3
- package/src/components/Nav/examples/Nav.md +8 -0
- package/src/components/Nav/examples/NavExpandableThirdLevel.tsx +1 -1
- package/src/components/Nav/examples/NavLinkText.tsx +109 -0
- package/src/components/Nav/examples/nav.css +1 -0
- package/src/components/NotificationBadge/NotificationBadge.tsx +1 -1
- package/src/components/NumberInput/__tests__/NumberInput.test.tsx +0 -1
- package/src/components/Page/PageSection.tsx +3 -9
- package/src/components/Page/PageSidebar.tsx +0 -4
- package/src/components/Page/__tests__/Generated/PageSidebar.test.tsx +1 -1
- package/src/components/Page/__tests__/Page.test.tsx +1 -40
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +0 -195
- package/src/components/Page/examples/PageGroupSection.tsx +3 -4
- package/src/components/Page/examples/PageHorizontalNav.tsx +3 -4
- package/src/components/Page/examples/PageMainSectionPadding.tsx +2 -7
- package/src/components/Page/examples/PageMultipleSidebarBody.tsx +3 -4
- package/src/components/Page/examples/PageTertiaryNav.tsx +3 -4
- package/src/components/Page/examples/PageUncontrolledNav.tsx +3 -4
- package/src/components/Page/examples/PageVerticalNav.tsx +3 -4
- package/src/components/SearchInput/SearchInput.tsx +5 -1
- package/src/components/SearchInput/__tests__/SearchInput.test.tsx +8 -0
- package/src/components/Select/Select.tsx +2 -0
- package/src/components/Slider/Slider.tsx +2 -1
- package/src/components/Tabs/Tabs.tsx +3 -3
- package/src/demos/Banner.md +2 -4
- package/src/demos/CardView/examples/CardView.tsx +2 -8
- package/src/demos/DashboardWrapper.tsx +1 -1
- package/src/demos/JumpLinks.md +1 -1
- package/src/demos/Nav.md +10 -1673
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +2 -3
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +2 -3
- package/src/demos/PrimaryDetail.md +4 -7
- package/src/demos/Tabs.md +6 -8
- package/src/demos/Wizard/WizardDemo.md +6 -761
- package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +4 -5
- package/src/demos/examples/BackToTop/BackToTopNameDemo.tsx +1 -2
- package/src/demos/examples/DashboardWrapper.js +127 -0
- package/src/demos/examples/JumpLinks/JumpLinksWithDrawer.js +3 -4
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +1 -2
- package/src/demos/examples/Nav/NavDefault.tsx +97 -0
- package/src/demos/examples/Nav/NavDrilldown.tsx +2 -0
- package/src/demos/examples/Nav/NavExpandable.tsx +123 -0
- package/src/demos/examples/Nav/NavFlyout.tsx +277 -0
- package/src/demos/examples/Nav/NavGrouped.tsx +98 -0
- package/src/demos/examples/Nav/NavHorizontal.tsx +236 -0
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +296 -0
- package/src/demos/examples/Nav/NavManual.tsx +272 -0
- package/src/demos/examples/Nav/NavWithSubnav.tsx +141 -0
- package/src/demos/examples/Nav/deprecated/NavLight.tsx +95 -0
- package/src/demos/examples/Nav/deprecated/NavTertiary.tsx +91 -0
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +1 -2
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +1 -2
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +1 -2
- package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +1 -2
- package/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +2 -3
- package/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +2 -3
- package/src/demos/examples/Tabs/ModalTabs.tsx +1 -2
- package/src/demos/examples/Tabs/NestedUnindentedTabs.tsx +2 -2
- package/src/demos/examples/Tabs/TabsAndTable.tsx +2 -3
- package/src/demos/examples/Toolbar/ConsoleLogViewerToolbar.tsx +1 -2
- package/src/demos/examples/Wizard/InModal.tsx +75 -0
- package/src/demos/examples/Wizard/InModalWithDrawer.tsx +115 -0
- package/src/demos/examples/Wizard/InModalWithDrawerInformationalStep.tsx +122 -0
- package/src/demos/examples/Wizard/InPage.tsx +35 -0
- package/src/demos/examples/Wizard/InPageWithDrawer.tsx +195 -0
- package/src/demos/examples/Wizard/InPageWithDrawerInformationalStep.tsx +200 -0
- package/src/deprecated/components/PageHeader/PageHeaderToolsItem.tsx +0 -4
- package/src/deprecated/components/PageHeader/examples/PageVerticalNavUsingPageHeaderComponent.tsx +4 -4
- package/src/deprecated/components/PageHeader/tests/PageHeaderToolsItem.test.tsx +1 -3
- package/src/deprecated/components/PageHeader/tests/__snapshots__/PageHeaderToolsItem.test.tsx.snap +1 -1
- package/src/helpers/Popper/Popper.tsx +10 -19
- package/src/helpers/__mocks__/util.ts +2 -0
- package/src/helpers/datetimeUtils.ts +1 -1
- package/src/helpers/util.ts +22 -0
- package/dist/styles/assets/images/pf-c-brand__logo-on-lg-white.svg +0 -32
- package/dist/styles/assets/images/pf-c-brand__logo-on-md-white.svg +0 -42
- package/dist/styles/assets/images/pf-c-brand__logo-on-sm-white.svg +0 -17
- package/dist/styles/assets/images/pf-c-brand__logo-on-xl-white.svg +0 -39
- package/dist/styles/assets/images/pf_logo_white.hbs +0 -35
- package/dist/styles/assets/images/pf_logo_white.svg +0 -38
- package/src/components/ClipboardCopy/__tests__/Generated/ClipboardCopy.test.tsx +0 -40
- package/src/components/ClipboardCopy/__tests__/Generated/__snapshots__/ClipboardCopy.test.tsx.snap +0 -55
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Drawer,
|
|
5
|
+
DrawerContent,
|
|
6
|
+
DrawerPanelContent,
|
|
7
|
+
DrawerHead,
|
|
8
|
+
DrawerActions,
|
|
9
|
+
DrawerCloseButton,
|
|
10
|
+
Flex,
|
|
11
|
+
Modal,
|
|
12
|
+
ModalVariant,
|
|
13
|
+
Wizard,
|
|
14
|
+
WizardHeader,
|
|
15
|
+
WizardStep,
|
|
16
|
+
DrawerColorVariant
|
|
17
|
+
} from '@patternfly/react-core';
|
|
18
|
+
|
|
19
|
+
export const WizardModalWithDrawerDemo: React.FunctionComponent = () => {
|
|
20
|
+
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
|
|
21
|
+
const drawerRef = React.useRef<HTMLSpanElement | null>(null);
|
|
22
|
+
|
|
23
|
+
const onExpand = () => {
|
|
24
|
+
if (drawerRef.current) {
|
|
25
|
+
drawerRef.current.focus();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const onOpenClick = () => {
|
|
30
|
+
setIsDrawerExpanded(true);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const onCloseClick = () => {
|
|
34
|
+
setIsDrawerExpanded(false);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const createStepContentWithDrawer = (stepName: string) => (
|
|
38
|
+
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
39
|
+
<DrawerContent
|
|
40
|
+
panelContent={
|
|
41
|
+
<DrawerPanelContent widths={{ default: 'width_33' }} colorVariant={DrawerColorVariant.light200}>
|
|
42
|
+
<DrawerHead>
|
|
43
|
+
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
44
|
+
Drawer content: {stepName}
|
|
45
|
+
</span>
|
|
46
|
+
<DrawerActions>
|
|
47
|
+
<DrawerCloseButton onClick={onCloseClick} />
|
|
48
|
+
</DrawerActions>
|
|
49
|
+
</DrawerHead>
|
|
50
|
+
</DrawerPanelContent>
|
|
51
|
+
}
|
|
52
|
+
>
|
|
53
|
+
<Flex
|
|
54
|
+
className="pf-v5-c-wizard__main-body"
|
|
55
|
+
direction={{ default: 'column' }}
|
|
56
|
+
spaceItems={{ default: 'spaceItemsLg' }}
|
|
57
|
+
height="100%"
|
|
58
|
+
>
|
|
59
|
+
{!isDrawerExpanded && (
|
|
60
|
+
<Button isInline variant="link" onClick={onOpenClick}>
|
|
61
|
+
Open drawer
|
|
62
|
+
</Button>
|
|
63
|
+
)}
|
|
64
|
+
<div>{stepName} content</div>
|
|
65
|
+
</Flex>
|
|
66
|
+
</DrawerContent>
|
|
67
|
+
</Drawer>
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<Modal
|
|
72
|
+
isOpen
|
|
73
|
+
variant={ModalVariant.large}
|
|
74
|
+
showClose={false}
|
|
75
|
+
hasNoBodyWrapper
|
|
76
|
+
aria-describedby="wiz-modal-demo-description"
|
|
77
|
+
aria-labelledby="wiz-modal-demo-title"
|
|
78
|
+
>
|
|
79
|
+
<Wizard
|
|
80
|
+
header={
|
|
81
|
+
<WizardHeader
|
|
82
|
+
closeButtonAriaLabel="Close wizard"
|
|
83
|
+
title="Wizard in modal with drawer"
|
|
84
|
+
titleId="wiz-modal-demo-title"
|
|
85
|
+
description="Simple wizard description"
|
|
86
|
+
descriptionId="wiz-modal-demo-description"
|
|
87
|
+
/>
|
|
88
|
+
}
|
|
89
|
+
height={400}
|
|
90
|
+
>
|
|
91
|
+
<WizardStep body={null} name="Information" id="wizard-step-1">
|
|
92
|
+
{createStepContentWithDrawer('Information step')}
|
|
93
|
+
</WizardStep>
|
|
94
|
+
<WizardStep
|
|
95
|
+
name="Configuration"
|
|
96
|
+
id="wizard-step-2"
|
|
97
|
+
steps={[
|
|
98
|
+
<WizardStep body={null} name="Substep A" id="wizard-step-2a" key="wizard-step-2a">
|
|
99
|
+
{createStepContentWithDrawer('Configuration substep A')}
|
|
100
|
+
</WizardStep>,
|
|
101
|
+
<WizardStep body={null} name="Substep B" id="wizard-step-2b" key="wizard-step-2b">
|
|
102
|
+
{createStepContentWithDrawer('Configuration substep B')}
|
|
103
|
+
</WizardStep>
|
|
104
|
+
]}
|
|
105
|
+
/>
|
|
106
|
+
<WizardStep body={null} name="Additional" id="wizard-step-3">
|
|
107
|
+
{createStepContentWithDrawer('Additional step')}
|
|
108
|
+
</WizardStep>
|
|
109
|
+
<WizardStep body={null} name="Review" id="wizard-step-4" footer={{ nextButtonText: 'Finish' }}>
|
|
110
|
+
{createStepContentWithDrawer('Review step')}
|
|
111
|
+
</WizardStep>
|
|
112
|
+
</Wizard>
|
|
113
|
+
</Modal>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Button,
|
|
4
|
+
Drawer,
|
|
5
|
+
DrawerActions,
|
|
6
|
+
DrawerCloseButton,
|
|
7
|
+
DrawerContent,
|
|
8
|
+
DrawerPanelContent,
|
|
9
|
+
DrawerHead,
|
|
10
|
+
Flex,
|
|
11
|
+
Modal,
|
|
12
|
+
ModalVariant,
|
|
13
|
+
Text,
|
|
14
|
+
TextContent,
|
|
15
|
+
TextVariants,
|
|
16
|
+
Wizard,
|
|
17
|
+
WizardHeader,
|
|
18
|
+
WizardStep,
|
|
19
|
+
DrawerColorVariant
|
|
20
|
+
} from '@patternfly/react-core';
|
|
21
|
+
|
|
22
|
+
export const WizardModalWithDrawerInfoStepDemo: React.FunctionComponent = () => {
|
|
23
|
+
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
|
|
24
|
+
const drawerRef = React.useRef<HTMLSpanElement | null>(null);
|
|
25
|
+
|
|
26
|
+
const onExpand = () => {
|
|
27
|
+
if (drawerRef.current) {
|
|
28
|
+
drawerRef.current.focus();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const onOpenClick = () => {
|
|
33
|
+
setIsDrawerExpanded(true);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const onCloseClick = () => {
|
|
37
|
+
setIsDrawerExpanded(false);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const createStepContentWithDrawer = (stepName: string) => (
|
|
41
|
+
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
42
|
+
<DrawerContent
|
|
43
|
+
panelContent={
|
|
44
|
+
<DrawerPanelContent widths={{ default: 'width_33' }} colorVariant={DrawerColorVariant.light200}>
|
|
45
|
+
<DrawerHead>
|
|
46
|
+
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
47
|
+
Drawer content: {stepName}
|
|
48
|
+
</span>
|
|
49
|
+
<DrawerActions>
|
|
50
|
+
<DrawerCloseButton onClick={onCloseClick} />
|
|
51
|
+
</DrawerActions>
|
|
52
|
+
</DrawerHead>
|
|
53
|
+
</DrawerPanelContent>
|
|
54
|
+
}
|
|
55
|
+
>
|
|
56
|
+
<Flex
|
|
57
|
+
className="pf-v5-c-wizard__main-body"
|
|
58
|
+
direction={{ default: 'column' }}
|
|
59
|
+
spaceItems={{ default: 'spaceItemsLg' }}
|
|
60
|
+
height="100%"
|
|
61
|
+
>
|
|
62
|
+
<TextContent>
|
|
63
|
+
<Text component={TextVariants.h1}>{stepName} content</Text>
|
|
64
|
+
<p>
|
|
65
|
+
Wizard description goes here. If you need more assistance,{' '}
|
|
66
|
+
<Button isInline variant="link" onClick={onOpenClick}>
|
|
67
|
+
see more information
|
|
68
|
+
</Button>{' '}
|
|
69
|
+
in the side drawer.{' '}
|
|
70
|
+
</p>
|
|
71
|
+
</TextContent>
|
|
72
|
+
</Flex>
|
|
73
|
+
</DrawerContent>
|
|
74
|
+
</Drawer>
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
return (
|
|
78
|
+
<Modal
|
|
79
|
+
isOpen
|
|
80
|
+
variant={ModalVariant.large}
|
|
81
|
+
showClose={false}
|
|
82
|
+
hasNoBodyWrapper
|
|
83
|
+
aria-describedby="wiz-modal-demo-description"
|
|
84
|
+
aria-labelledby="wiz-modal-demo-title"
|
|
85
|
+
>
|
|
86
|
+
<Wizard
|
|
87
|
+
header={
|
|
88
|
+
<WizardHeader
|
|
89
|
+
closeButtonAriaLabel="Close wizard"
|
|
90
|
+
title="Wizard in modal with drawer and info step"
|
|
91
|
+
titleId="wiz-modal-demo-title"
|
|
92
|
+
description="Simple wizard description"
|
|
93
|
+
descriptionId="wiz-modal-demo-description"
|
|
94
|
+
/>
|
|
95
|
+
}
|
|
96
|
+
height={400}
|
|
97
|
+
>
|
|
98
|
+
<WizardStep body={null} name="Information" id="wizard-step-1">
|
|
99
|
+
{createStepContentWithDrawer('Information step')}
|
|
100
|
+
</WizardStep>
|
|
101
|
+
<WizardStep
|
|
102
|
+
name="Configuration"
|
|
103
|
+
id="wizard-step-2"
|
|
104
|
+
steps={[
|
|
105
|
+
<WizardStep body={null} name="Substep A" id="wizard-step-2a" key="wizard-step-2a">
|
|
106
|
+
{createStepContentWithDrawer('Configuration substep A')}
|
|
107
|
+
</WizardStep>,
|
|
108
|
+
<WizardStep body={null} name="Substep B" id="wizard-step-2b" key="wizard-step-2b">
|
|
109
|
+
{createStepContentWithDrawer('Configuration substep B')}
|
|
110
|
+
</WizardStep>
|
|
111
|
+
]}
|
|
112
|
+
/>
|
|
113
|
+
<WizardStep body={null} name="Additional" id="wizard-step-3">
|
|
114
|
+
{createStepContentWithDrawer('Additional step')}
|
|
115
|
+
</WizardStep>
|
|
116
|
+
<WizardStep body={null} name="Review" id="wizard-step-4" footer={{ nextButtonText: 'Finish' }}>
|
|
117
|
+
{createStepContentWithDrawer('Review step')}
|
|
118
|
+
</WizardStep>
|
|
119
|
+
</Wizard>
|
|
120
|
+
</Modal>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PageSection, PageSectionTypes, Wizard, WizardStep } from '@patternfly/react-core';
|
|
3
|
+
import { DashboardWrapper } from '@patternfly/react-core/src/demos/DashboardWrapper';
|
|
4
|
+
|
|
5
|
+
export const WizardFullPage: React.FunctionComponent = () => (
|
|
6
|
+
<React.Fragment>
|
|
7
|
+
<DashboardWrapper hasPageTemplateTitle>
|
|
8
|
+
<PageSection type={PageSectionTypes.wizard}>
|
|
9
|
+
<Wizard>
|
|
10
|
+
<WizardStep name="Information" id="wizard-step-1">
|
|
11
|
+
<p>Step 1 content</p>
|
|
12
|
+
</WizardStep>
|
|
13
|
+
<WizardStep
|
|
14
|
+
name="Configuration"
|
|
15
|
+
id="wizard-step-2"
|
|
16
|
+
steps={[
|
|
17
|
+
<WizardStep name="Substep A" id="wizard-step-2a" key="wizard-step-2a">
|
|
18
|
+
<p>Configuration substep A</p>
|
|
19
|
+
</WizardStep>,
|
|
20
|
+
<WizardStep name="Substep B" id="wizard-step-2b" key="wizard-step-2b">
|
|
21
|
+
<p>Configuration substep B</p>
|
|
22
|
+
</WizardStep>
|
|
23
|
+
]}
|
|
24
|
+
/>
|
|
25
|
+
<WizardStep name="Additional" id="wizard-step-3">
|
|
26
|
+
<p>Step 3 content</p>
|
|
27
|
+
</WizardStep>
|
|
28
|
+
<WizardStep name="Review" id="wizard-step-4" footer={{ nextButtonText: 'Finish' }}>
|
|
29
|
+
<p>Review step content</p>
|
|
30
|
+
</WizardStep>
|
|
31
|
+
</Wizard>
|
|
32
|
+
</PageSection>
|
|
33
|
+
</DashboardWrapper>
|
|
34
|
+
</React.Fragment>
|
|
35
|
+
);
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Brand,
|
|
4
|
+
Breadcrumb,
|
|
5
|
+
BreadcrumbItem,
|
|
6
|
+
Button,
|
|
7
|
+
Drawer,
|
|
8
|
+
DrawerActions,
|
|
9
|
+
DrawerCloseButton,
|
|
10
|
+
DrawerContent,
|
|
11
|
+
DrawerPanelContent,
|
|
12
|
+
DrawerHead,
|
|
13
|
+
Flex,
|
|
14
|
+
Nav,
|
|
15
|
+
NavItem,
|
|
16
|
+
NavList,
|
|
17
|
+
Page,
|
|
18
|
+
PageSection,
|
|
19
|
+
PageSectionTypes,
|
|
20
|
+
PageSidebar,
|
|
21
|
+
PageSidebarBody,
|
|
22
|
+
SkipToContent,
|
|
23
|
+
Text,
|
|
24
|
+
TextContent,
|
|
25
|
+
Masthead,
|
|
26
|
+
PageToggleButton,
|
|
27
|
+
MastheadToggle,
|
|
28
|
+
MastheadMain,
|
|
29
|
+
MastheadBrand,
|
|
30
|
+
Wizard,
|
|
31
|
+
WizardStep,
|
|
32
|
+
DrawerColorVariant
|
|
33
|
+
} from '@patternfly/react-core';
|
|
34
|
+
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';
|
|
35
|
+
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
36
|
+
|
|
37
|
+
export const WizardFullPageWithDrawerDemo: React.FunctionComponent = () => {
|
|
38
|
+
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
|
|
39
|
+
const [activeItem, setActiveItem] = React.useState(0);
|
|
40
|
+
|
|
41
|
+
const drawerRef = React.useRef<HTMLSpanElement>(null);
|
|
42
|
+
|
|
43
|
+
const onExpand = () => {
|
|
44
|
+
if (drawerRef.current) {
|
|
45
|
+
drawerRef.current.focus();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const onOpenClick = () => {
|
|
50
|
+
setIsDrawerExpanded(true);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const onCloseClick = () => {
|
|
54
|
+
setIsDrawerExpanded(false);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const onNavSelect = (_event: React.FormEvent<HTMLElement>, result: { itemId: number | string }) => {
|
|
58
|
+
setActiveItem(result.itemId as number);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const PageNav = (
|
|
62
|
+
<Nav onSelect={onNavSelect} aria-label="Nav">
|
|
63
|
+
<NavList>
|
|
64
|
+
<NavItem itemId={0} isActive={activeItem === 0}>
|
|
65
|
+
System Panel
|
|
66
|
+
</NavItem>
|
|
67
|
+
<NavItem itemId={1} isActive={activeItem === 1}>
|
|
68
|
+
Policy
|
|
69
|
+
</NavItem>
|
|
70
|
+
<NavItem itemId={2} isActive={activeItem === 2}>
|
|
71
|
+
Authentication
|
|
72
|
+
</NavItem>
|
|
73
|
+
<NavItem itemId={3} isActive={activeItem === 3}>
|
|
74
|
+
Network Services
|
|
75
|
+
</NavItem>
|
|
76
|
+
<NavItem itemId={4} isActive={activeItem === 4}>
|
|
77
|
+
Server
|
|
78
|
+
</NavItem>
|
|
79
|
+
</NavList>
|
|
80
|
+
</Nav>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const Header = (
|
|
84
|
+
<Masthead id="basic">
|
|
85
|
+
<MastheadToggle>
|
|
86
|
+
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
87
|
+
<BarsIcon />
|
|
88
|
+
</PageToggleButton>
|
|
89
|
+
</MastheadToggle>
|
|
90
|
+
<MastheadMain>
|
|
91
|
+
<MastheadBrand>
|
|
92
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
93
|
+
</MastheadBrand>
|
|
94
|
+
</MastheadMain>
|
|
95
|
+
</Masthead>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const Sidebar = (
|
|
99
|
+
<PageSidebar>
|
|
100
|
+
<PageSidebarBody>{PageNav}</PageSidebarBody>
|
|
101
|
+
</PageSidebar>
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const pageId = 'main-content-page-layout-default-nav';
|
|
105
|
+
const PageSkipToContent = <SkipToContent href={`#${pageId}`}>Skip to content</SkipToContent>;
|
|
106
|
+
|
|
107
|
+
const PageBreadcrumb = (
|
|
108
|
+
<Breadcrumb>
|
|
109
|
+
<BreadcrumbItem>Section home</BreadcrumbItem>
|
|
110
|
+
<BreadcrumbItem to="#">Section title</BreadcrumbItem>
|
|
111
|
+
<BreadcrumbItem to="#">Section title</BreadcrumbItem>
|
|
112
|
+
<BreadcrumbItem to="#" isActive>
|
|
113
|
+
Section landing
|
|
114
|
+
</BreadcrumbItem>
|
|
115
|
+
</Breadcrumb>
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const createStepContentWithDrawer = (stepName: string) => (
|
|
119
|
+
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
120
|
+
<DrawerContent
|
|
121
|
+
panelContent={
|
|
122
|
+
<DrawerPanelContent widths={{ default: 'width_33' }} colorVariant={DrawerColorVariant.light200}>
|
|
123
|
+
<DrawerHead>
|
|
124
|
+
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
125
|
+
Drawer content: {stepName}
|
|
126
|
+
</span>
|
|
127
|
+
<DrawerActions>
|
|
128
|
+
<DrawerCloseButton onClick={onCloseClick} />
|
|
129
|
+
</DrawerActions>
|
|
130
|
+
</DrawerHead>
|
|
131
|
+
</DrawerPanelContent>
|
|
132
|
+
}
|
|
133
|
+
>
|
|
134
|
+
<Flex
|
|
135
|
+
className="pf-v5-c-wizard__main-body"
|
|
136
|
+
direction={{ default: 'column' }}
|
|
137
|
+
spaceItems={{ default: 'spaceItemsLg' }}
|
|
138
|
+
height="100%"
|
|
139
|
+
>
|
|
140
|
+
{!isDrawerExpanded && (
|
|
141
|
+
<Button isInline variant="link" onClick={onOpenClick}>
|
|
142
|
+
Open drawer
|
|
143
|
+
</Button>
|
|
144
|
+
)}
|
|
145
|
+
<div>{stepName} content</div>
|
|
146
|
+
</Flex>
|
|
147
|
+
</DrawerContent>
|
|
148
|
+
</Drawer>
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
return (
|
|
152
|
+
<React.Fragment>
|
|
153
|
+
<Page
|
|
154
|
+
header={Header}
|
|
155
|
+
sidebar={Sidebar}
|
|
156
|
+
isManagedSidebar
|
|
157
|
+
skipToContent={PageSkipToContent}
|
|
158
|
+
breadcrumb={PageBreadcrumb}
|
|
159
|
+
mainContainerId={pageId}
|
|
160
|
+
>
|
|
161
|
+
<PageSection>
|
|
162
|
+
<TextContent>
|
|
163
|
+
<Text component="h1">Main title</Text>
|
|
164
|
+
<Text component="p">A demo of a wizard in a page.</Text>
|
|
165
|
+
</TextContent>
|
|
166
|
+
</PageSection>
|
|
167
|
+
<PageSection type={PageSectionTypes.wizard}>
|
|
168
|
+
<Wizard>
|
|
169
|
+
<WizardStep body={null} name="Information" id="wizard-step-1">
|
|
170
|
+
{createStepContentWithDrawer('Information step')}
|
|
171
|
+
</WizardStep>
|
|
172
|
+
<WizardStep
|
|
173
|
+
name="Configuration"
|
|
174
|
+
id="wizard-step-2"
|
|
175
|
+
steps={[
|
|
176
|
+
<WizardStep body={null} name="Substep A" id="wizard-step-2a" key="wizard-step-2a">
|
|
177
|
+
{createStepContentWithDrawer('Configuration substep A')}
|
|
178
|
+
</WizardStep>,
|
|
179
|
+
<WizardStep body={null} name="Substep B" id="wizard-step-2b" key="wizard-step-2b">
|
|
180
|
+
{createStepContentWithDrawer('Configuration substep B')}
|
|
181
|
+
</WizardStep>
|
|
182
|
+
]}
|
|
183
|
+
/>
|
|
184
|
+
<WizardStep body={null} name="Additional" id="wizard-step-3">
|
|
185
|
+
{createStepContentWithDrawer('Additional step')}
|
|
186
|
+
</WizardStep>
|
|
187
|
+
<WizardStep body={null} name="Review" id="wizard-step-4" footer={{ nextButtonText: 'Finish' }}>
|
|
188
|
+
{createStepContentWithDrawer('Review step')}
|
|
189
|
+
</WizardStep>
|
|
190
|
+
</Wizard>
|
|
191
|
+
</PageSection>
|
|
192
|
+
</Page>
|
|
193
|
+
</React.Fragment>
|
|
194
|
+
);
|
|
195
|
+
};
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Brand,
|
|
4
|
+
Breadcrumb,
|
|
5
|
+
BreadcrumbItem,
|
|
6
|
+
Button,
|
|
7
|
+
Drawer,
|
|
8
|
+
DrawerActions,
|
|
9
|
+
DrawerCloseButton,
|
|
10
|
+
DrawerColorVariant,
|
|
11
|
+
DrawerContent,
|
|
12
|
+
DrawerHead,
|
|
13
|
+
DrawerPanelContent,
|
|
14
|
+
Flex,
|
|
15
|
+
Nav,
|
|
16
|
+
NavItem,
|
|
17
|
+
NavList,
|
|
18
|
+
Page,
|
|
19
|
+
PageSection,
|
|
20
|
+
PageSectionTypes,
|
|
21
|
+
PageSidebar,
|
|
22
|
+
PageSidebarBody,
|
|
23
|
+
SkipToContent,
|
|
24
|
+
Text,
|
|
25
|
+
TextContent,
|
|
26
|
+
Masthead,
|
|
27
|
+
PageToggleButton,
|
|
28
|
+
MastheadToggle,
|
|
29
|
+
MastheadMain,
|
|
30
|
+
MastheadBrand,
|
|
31
|
+
Wizard,
|
|
32
|
+
WizardStep
|
|
33
|
+
} from '@patternfly/react-core';
|
|
34
|
+
import pfLogo from '@patternfly/react-core/src/demos/assets/pf-logo.svg';
|
|
35
|
+
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
36
|
+
|
|
37
|
+
export const WizardFullPageWithDrawerInfoStepDemo: React.FunctionComponent = () => {
|
|
38
|
+
const [isDrawerExpanded, setIsDrawerExpanded] = React.useState(false);
|
|
39
|
+
const [activeItem, setActiveItem] = React.useState(0);
|
|
40
|
+
|
|
41
|
+
const drawerRef = React.useRef<HTMLSpanElement | null>(null);
|
|
42
|
+
|
|
43
|
+
const onExpand = () => {
|
|
44
|
+
if (drawerRef.current) {
|
|
45
|
+
drawerRef.current.focus();
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
const onOpenClick = () => {
|
|
50
|
+
setIsDrawerExpanded(true);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const onCloseClick = () => {
|
|
54
|
+
setIsDrawerExpanded(false);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const onNavSelect = (_event: any, result: any) => {
|
|
58
|
+
setActiveItem(result.itemId);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const PageNav = (
|
|
62
|
+
<Nav onSelect={onNavSelect} aria-label="Nav">
|
|
63
|
+
<NavList>
|
|
64
|
+
<NavItem itemId={0} isActive={activeItem === 0}>
|
|
65
|
+
System Panel
|
|
66
|
+
</NavItem>
|
|
67
|
+
<NavItem itemId={1} isActive={activeItem === 1}>
|
|
68
|
+
Policy
|
|
69
|
+
</NavItem>
|
|
70
|
+
<NavItem itemId={2} isActive={activeItem === 2}>
|
|
71
|
+
Authentication
|
|
72
|
+
</NavItem>
|
|
73
|
+
<NavItem itemId={3} isActive={activeItem === 3}>
|
|
74
|
+
Network Services
|
|
75
|
+
</NavItem>
|
|
76
|
+
<NavItem itemId={4} isActive={activeItem === 4}>
|
|
77
|
+
Server
|
|
78
|
+
</NavItem>
|
|
79
|
+
</NavList>
|
|
80
|
+
</Nav>
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
const Header = (
|
|
84
|
+
<Masthead id="basic">
|
|
85
|
+
<MastheadToggle>
|
|
86
|
+
<PageToggleButton variant="plain" aria-label="Global navigation">
|
|
87
|
+
<BarsIcon />
|
|
88
|
+
</PageToggleButton>
|
|
89
|
+
</MastheadToggle>
|
|
90
|
+
<MastheadMain>
|
|
91
|
+
<MastheadBrand>
|
|
92
|
+
<Brand src={pfLogo} alt="PatternFly" heights={{ default: '36px' }} />
|
|
93
|
+
</MastheadBrand>
|
|
94
|
+
</MastheadMain>
|
|
95
|
+
</Masthead>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const Sidebar = (
|
|
99
|
+
<PageSidebar>
|
|
100
|
+
<PageSidebarBody>{PageNav}</PageSidebarBody>
|
|
101
|
+
</PageSidebar>
|
|
102
|
+
);
|
|
103
|
+
|
|
104
|
+
const pageId = 'main-content-page-layout-default-nav';
|
|
105
|
+
|
|
106
|
+
const PageSkipToContent = <SkipToContent href={`#${pageId}`}>Skip to content</SkipToContent>;
|
|
107
|
+
|
|
108
|
+
const PageBreadcrumb = (
|
|
109
|
+
<Breadcrumb>
|
|
110
|
+
<BreadcrumbItem>Section home</BreadcrumbItem>
|
|
111
|
+
<BreadcrumbItem to="#">Section title</BreadcrumbItem>
|
|
112
|
+
<BreadcrumbItem to="#">Section title</BreadcrumbItem>
|
|
113
|
+
<BreadcrumbItem to="#" isActive>
|
|
114
|
+
Section landing
|
|
115
|
+
</BreadcrumbItem>
|
|
116
|
+
</Breadcrumb>
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
const createStepContentWithDrawer = (stepName: string) => (
|
|
120
|
+
<Drawer isInline isExpanded={isDrawerExpanded} onExpand={onExpand}>
|
|
121
|
+
<DrawerContent
|
|
122
|
+
panelContent={
|
|
123
|
+
<DrawerPanelContent widths={{ default: 'width_33' }} colorVariant={DrawerColorVariant.light200}>
|
|
124
|
+
<DrawerHead>
|
|
125
|
+
<span tabIndex={isDrawerExpanded ? 0 : -1} ref={drawerRef}>
|
|
126
|
+
Drawer content: {stepName}
|
|
127
|
+
</span>
|
|
128
|
+
<DrawerActions>
|
|
129
|
+
<DrawerCloseButton onClick={onCloseClick} />
|
|
130
|
+
</DrawerActions>
|
|
131
|
+
</DrawerHead>
|
|
132
|
+
</DrawerPanelContent>
|
|
133
|
+
}
|
|
134
|
+
>
|
|
135
|
+
<Flex
|
|
136
|
+
className="pf-v5-c-wizard__main-body"
|
|
137
|
+
direction={{ default: 'column' }}
|
|
138
|
+
spaceItems={{ default: 'spaceItemsLg' }}
|
|
139
|
+
height="100%"
|
|
140
|
+
>
|
|
141
|
+
<TextContent>
|
|
142
|
+
<Text>{stepName} content</Text>
|
|
143
|
+
<p>
|
|
144
|
+
Wizard description goes here. If you need more assistance,{' '}
|
|
145
|
+
<Button isInline variant="link" onClick={onOpenClick}>
|
|
146
|
+
see more information
|
|
147
|
+
</Button>{' '}
|
|
148
|
+
in the side drawer.{' '}
|
|
149
|
+
</p>
|
|
150
|
+
</TextContent>
|
|
151
|
+
</Flex>
|
|
152
|
+
</DrawerContent>
|
|
153
|
+
</Drawer>
|
|
154
|
+
);
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<React.Fragment>
|
|
158
|
+
<Page
|
|
159
|
+
header={Header}
|
|
160
|
+
sidebar={Sidebar}
|
|
161
|
+
isManagedSidebar
|
|
162
|
+
skipToContent={PageSkipToContent}
|
|
163
|
+
breadcrumb={PageBreadcrumb}
|
|
164
|
+
mainContainerId={pageId}
|
|
165
|
+
>
|
|
166
|
+
<PageSection>
|
|
167
|
+
<TextContent>
|
|
168
|
+
<Text component="h1">Main title</Text>
|
|
169
|
+
<Text component="p">A demo of a wizard in a page.</Text>
|
|
170
|
+
</TextContent>
|
|
171
|
+
</PageSection>
|
|
172
|
+
<PageSection type={PageSectionTypes.wizard} ß>
|
|
173
|
+
<Wizard>
|
|
174
|
+
<WizardStep body={null} name="Information" id="wizard-step-1">
|
|
175
|
+
{createStepContentWithDrawer('Information step')}
|
|
176
|
+
</WizardStep>
|
|
177
|
+
<WizardStep
|
|
178
|
+
name="Configuration"
|
|
179
|
+
id="wizard-step-2"
|
|
180
|
+
steps={[
|
|
181
|
+
<WizardStep body={null} name="Substep A" id="wizard-step-2a" key="wizard-step-2a">
|
|
182
|
+
{createStepContentWithDrawer('Configuration substep A')}
|
|
183
|
+
</WizardStep>,
|
|
184
|
+
<WizardStep body={null} name="Substep B" id="wizard-step-2b" key="wizard-step-2b">
|
|
185
|
+
{createStepContentWithDrawer('Configuration substep B')}
|
|
186
|
+
</WizardStep>
|
|
187
|
+
]}
|
|
188
|
+
/>
|
|
189
|
+
<WizardStep body={null} name="Additional" id="wizard-step-3">
|
|
190
|
+
{createStepContentWithDrawer('Additional step')}
|
|
191
|
+
</WizardStep>
|
|
192
|
+
<WizardStep body={null} name="Review" id="wizard-step-4" footer={{ nextButtonText: 'Finish' }}>
|
|
193
|
+
{createStepContentWithDrawer('Review step')}
|
|
194
|
+
</WizardStep>
|
|
195
|
+
</Wizard>
|
|
196
|
+
</PageSection>
|
|
197
|
+
</Page>
|
|
198
|
+
</React.Fragment>
|
|
199
|
+
);
|
|
200
|
+
};
|
|
@@ -20,8 +20,6 @@ export interface PageHeaderToolsItemProps extends React.HTMLProps<HTMLDivElement
|
|
|
20
20
|
xl?: 'hidden' | 'visible';
|
|
21
21
|
'2xl'?: 'hidden' | 'visible';
|
|
22
22
|
};
|
|
23
|
-
/** True to make an icon button appear selected */
|
|
24
|
-
isSelected?: boolean;
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
export const PageHeaderToolsItem: React.FunctionComponent<PageHeaderToolsItemProps> = ({
|
|
@@ -29,7 +27,6 @@ export const PageHeaderToolsItem: React.FunctionComponent<PageHeaderToolsItemPro
|
|
|
29
27
|
id,
|
|
30
28
|
className,
|
|
31
29
|
visibility,
|
|
32
|
-
isSelected,
|
|
33
30
|
...props
|
|
34
31
|
}: PageHeaderToolsItemProps) => {
|
|
35
32
|
const { width, getBreakpoint } = React.useContext(PageContext);
|
|
@@ -37,7 +34,6 @@ export const PageHeaderToolsItem: React.FunctionComponent<PageHeaderToolsItemPro
|
|
|
37
34
|
<div
|
|
38
35
|
className={css(
|
|
39
36
|
styles.pageHeaderToolsItem,
|
|
40
|
-
isSelected && styles.modifiers.selected,
|
|
41
37
|
formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
|
|
42
38
|
className
|
|
43
39
|
)}
|