@patternfly/react-core 6.4.1-prerelease.9 → 6.5.0-prerelease.10
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 +73 -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 -0
- 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/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/dynamic-modules.json +8 -0
- package/dist/esm/components/ActionList/ActionList.d.ts +2 -0
- package/dist/esm/components/ActionList/ActionList.d.ts.map +1 -1
- package/dist/esm/components/ActionList/ActionList.js +2 -2
- package/dist/esm/components/ActionList/ActionList.js.map +1 -1
- package/dist/esm/components/Button/Button.d.ts +2 -0
- package/dist/esm/components/Button/Button.d.ts.map +1 -1
- package/dist/esm/components/Button/Button.js +2 -2
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Card/CardSubtitle.d.ts +9 -0
- package/dist/esm/components/Card/CardSubtitle.d.ts.map +1 -0
- package/dist/esm/components/Card/CardSubtitle.js +10 -0
- package/dist/esm/components/Card/CardSubtitle.js.map +1 -0
- package/dist/esm/components/Card/CardTitle.d.ts +2 -0
- package/dist/esm/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/esm/components/Card/CardTitle.js +5 -3
- package/dist/esm/components/Card/CardTitle.js.map +1 -1
- package/dist/esm/components/Compass/Compass.d.ts +34 -0
- package/dist/esm/components/Compass/Compass.d.ts.map +1 -0
- package/dist/esm/components/Compass/Compass.js +25 -0
- package/dist/esm/components/Compass/Compass.js.map +1 -0
- package/dist/esm/components/Compass/CompassContent.d.ts +15 -0
- package/dist/esm/components/Compass/CompassContent.d.ts.map +1 -0
- package/dist/esm/components/Compass/CompassContent.js +16 -0
- package/dist/esm/components/Compass/CompassContent.js.map +1 -0
- package/dist/esm/components/Compass/CompassHeader.d.ts +12 -0
- package/dist/esm/components/Compass/CompassHeader.d.ts.map +1 -0
- package/dist/esm/components/Compass/CompassHeader.js +6 -0
- package/dist/esm/components/Compass/CompassHeader.js.map +1 -0
- package/dist/esm/components/Compass/CompassHero.d.ts +26 -0
- package/dist/esm/components/Compass/CompassHero.d.ts.map +1 -0
- package/dist/esm/components/Compass/CompassHero.js +47 -0
- package/dist/esm/components/Compass/CompassHero.js.map +1 -0
- package/dist/esm/components/Compass/CompassMainHeader.d.ts +14 -0
- package/dist/esm/components/Compass/CompassMainHeader.d.ts.map +1 -0
- package/dist/esm/components/Compass/CompassMainHeader.js +13 -0
- package/dist/esm/components/Compass/CompassMainHeader.js.map +1 -0
- package/dist/esm/components/Compass/CompassMessageBar.d.ts +10 -0
- package/dist/esm/components/Compass/CompassMessageBar.d.ts.map +1 -0
- package/dist/esm/components/Compass/CompassMessageBar.js +10 -0
- package/dist/esm/components/Compass/CompassMessageBar.js.map +1 -0
- package/dist/esm/components/Compass/CompassPanel.d.ts +22 -0
- package/dist/esm/components/Compass/CompassPanel.d.ts.map +1 -0
- package/dist/esm/components/Compass/CompassPanel.js +10 -0
- package/dist/esm/components/Compass/CompassPanel.js.map +1 -0
- package/dist/esm/components/Compass/index.d.ts +8 -0
- package/dist/esm/components/Compass/index.d.ts.map +1 -0
- package/dist/esm/components/Compass/index.js +8 -0
- package/dist/esm/components/Compass/index.js.map +1 -0
- package/dist/esm/components/DataList/DataList.d.ts +2 -0
- package/dist/esm/components/DataList/DataList.d.ts.map +1 -1
- package/dist/esm/components/DataList/DataList.js +2 -2
- package/dist/esm/components/DataList/DataList.js.map +1 -1
- package/dist/esm/components/Drawer/Drawer.d.ts +2 -0
- package/dist/esm/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/esm/components/Drawer/Drawer.js +2 -2
- package/dist/esm/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts +2 -0
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +2 -2
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts +9 -2
- package/dist/esm/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSection.js +5 -3
- package/dist/esm/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts +5 -0
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.js +3 -2
- package/dist/esm/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
- package/dist/esm/components/Menu/Menu.d.ts +0 -1
- package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
- package/dist/esm/components/Menu/Menu.js +5 -8
- package/dist/esm/components/Menu/Menu.js.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts +2 -0
- package/dist/esm/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/esm/components/MenuToggle/MenuToggle.js +3 -2
- package/dist/esm/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +1 -0
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageContext.d.ts +1 -0
- package/dist/esm/components/Page/PageContext.d.ts.map +1 -1
- package/dist/esm/components/Page/PageContext.js +1 -0
- package/dist/esm/components/Page/PageContext.js.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/Progress/Progress.d.ts +2 -0
- package/dist/esm/components/Progress/Progress.d.ts.map +1 -1
- package/dist/esm/components/Progress/Progress.js +2 -2
- package/dist/esm/components/Progress/Progress.js.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.d.ts +2 -0
- package/dist/esm/components/Progress/ProgressContainer.d.ts.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.js +2 -2
- package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +2 -0
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +5 -4
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js +5 -4
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/js/components/ActionList/ActionList.d.ts +2 -0
- package/dist/js/components/ActionList/ActionList.d.ts.map +1 -1
- package/dist/js/components/ActionList/ActionList.js +2 -2
- package/dist/js/components/ActionList/ActionList.js.map +1 -1
- package/dist/js/components/Button/Button.d.ts +2 -0
- package/dist/js/components/Button/Button.d.ts.map +1 -1
- package/dist/js/components/Button/Button.js +2 -2
- package/dist/js/components/Button/Button.js.map +1 -1
- package/dist/js/components/Card/CardSubtitle.d.ts +9 -0
- package/dist/js/components/Card/CardSubtitle.d.ts.map +1 -0
- package/dist/js/components/Card/CardSubtitle.js +14 -0
- package/dist/js/components/Card/CardSubtitle.js.map +1 -0
- package/dist/js/components/Card/CardTitle.d.ts +2 -0
- package/dist/js/components/Card/CardTitle.d.ts.map +1 -1
- package/dist/js/components/Card/CardTitle.js +4 -2
- package/dist/js/components/Card/CardTitle.js.map +1 -1
- package/dist/js/components/Compass/Compass.d.ts +34 -0
- package/dist/js/components/Compass/Compass.d.ts.map +1 -0
- package/dist/js/components/Compass/Compass.js +29 -0
- package/dist/js/components/Compass/Compass.js.map +1 -0
- package/dist/js/components/Compass/CompassContent.d.ts +15 -0
- package/dist/js/components/Compass/CompassContent.d.ts.map +1 -0
- package/dist/js/components/Compass/CompassContent.js +20 -0
- package/dist/js/components/Compass/CompassContent.js.map +1 -0
- package/dist/js/components/Compass/CompassHeader.d.ts +12 -0
- package/dist/js/components/Compass/CompassHeader.d.ts.map +1 -0
- package/dist/js/components/Compass/CompassHeader.js +11 -0
- package/dist/js/components/Compass/CompassHeader.js.map +1 -0
- package/dist/js/components/Compass/CompassHero.d.ts +26 -0
- package/dist/js/components/Compass/CompassHero.d.ts.map +1 -0
- package/dist/js/components/Compass/CompassHero.js +51 -0
- package/dist/js/components/Compass/CompassHero.js.map +1 -0
- package/dist/js/components/Compass/CompassMainHeader.d.ts +14 -0
- package/dist/js/components/Compass/CompassMainHeader.d.ts.map +1 -0
- package/dist/js/components/Compass/CompassMainHeader.js +17 -0
- package/dist/js/components/Compass/CompassMainHeader.js.map +1 -0
- package/dist/js/components/Compass/CompassMessageBar.d.ts +10 -0
- package/dist/js/components/Compass/CompassMessageBar.d.ts.map +1 -0
- package/dist/js/components/Compass/CompassMessageBar.js +14 -0
- package/dist/js/components/Compass/CompassMessageBar.js.map +1 -0
- package/dist/js/components/Compass/CompassPanel.d.ts +22 -0
- package/dist/js/components/Compass/CompassPanel.d.ts.map +1 -0
- package/dist/js/components/Compass/CompassPanel.js +14 -0
- package/dist/js/components/Compass/CompassPanel.js.map +1 -0
- package/dist/js/components/Compass/index.d.ts +8 -0
- package/dist/js/components/Compass/index.d.ts.map +1 -0
- package/dist/js/components/Compass/index.js +11 -0
- package/dist/js/components/Compass/index.js.map +1 -0
- package/dist/js/components/DataList/DataList.d.ts +2 -0
- package/dist/js/components/DataList/DataList.d.ts.map +1 -1
- package/dist/js/components/DataList/DataList.js +2 -2
- package/dist/js/components/DataList/DataList.js.map +1 -1
- package/dist/js/components/Drawer/Drawer.d.ts +2 -0
- package/dist/js/components/Drawer/Drawer.d.ts.map +1 -1
- package/dist/js/components/Drawer/Drawer.js +2 -2
- package/dist/js/components/Drawer/Drawer.js.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts +2 -0
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +2 -2
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts +9 -2
- package/dist/js/components/ExpandableSection/ExpandableSection.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSection.js +5 -3
- package/dist/js/components/ExpandableSection/ExpandableSection.js.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts +5 -0
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.d.ts.map +1 -1
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.js +3 -2
- package/dist/js/components/ExpandableSection/ExpandableSectionToggle.js.map +1 -1
- package/dist/js/components/Menu/Menu.d.ts +0 -1
- package/dist/js/components/Menu/Menu.d.ts.map +1 -1
- package/dist/js/components/Menu/Menu.js +5 -8
- package/dist/js/components/Menu/Menu.js.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.d.ts +2 -0
- package/dist/js/components/MenuToggle/MenuToggle.d.ts.map +1 -1
- package/dist/js/components/MenuToggle/MenuToggle.js +3 -2
- package/dist/js/components/MenuToggle/MenuToggle.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +1 -0
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageContext.d.ts +1 -0
- package/dist/js/components/Page/PageContext.d.ts.map +1 -1
- package/dist/js/components/Page/PageContext.js +1 -0
- package/dist/js/components/Page/PageContext.js.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/Progress/Progress.d.ts +2 -0
- package/dist/js/components/Progress/Progress.d.ts.map +1 -1
- package/dist/js/components/Progress/Progress.js +2 -2
- package/dist/js/components/Progress/Progress.js.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.d.ts +2 -0
- package/dist/js/components/Progress/ProgressContainer.d.ts.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.js +2 -2
- package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +2 -0
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +5 -4
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js +5 -4
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/components/index.d.ts +1 -0
- package/dist/js/components/index.d.ts.map +1 -1
- package/dist/js/components/index.js +1 -0
- package/dist/js/components/index.js.map +1 -1
- package/dist/styles/assets/images/RHAiExperienceIcon.svg +27 -0
- package/dist/styles/assets/images/RHAutomationsLogo.svg +96 -0
- package/dist/styles/assets/images/RHServerStackIcon.svg +16 -0
- package/dist/styles/assets/images/compass--hero-bg.png +0 -0
- package/dist/styles/assets/images/compass--rh-wallpaper-dark.png +0 -0
- package/dist/styles/assets/images/compass--rh-wallpaper-light.png +0 -0
- package/dist/styles/assets/images/compass--wallpaper-dark.png +0 -0
- package/dist/styles/assets/images/compass--wallpaper-light.png +0 -0
- package/dist/styles/base-no-reset.css +97 -0
- package/dist/styles/base.css +104 -0
- package/dist/umd/assets/{output-CJfbZNQh.css → output-4DDCBaXc.css} +21118 -20783
- package/dist/umd/react-core.min.js +3 -3
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +6 -6
- package/src/components/ActionList/ActionList.tsx +12 -1
- package/src/components/ActionList/__tests__/ActionList.test.tsx +12 -0
- package/src/components/ActionList/examples/ActionList.md +6 -0
- package/src/components/ActionList/examples/ActionListVertical.tsx +46 -0
- package/src/components/Button/Button.tsx +4 -0
- package/src/components/Button/__tests__/Button.test.tsx +5 -0
- package/src/components/Button/__tests__/__snapshots__/Button.test.tsx.snap +1 -1
- package/src/components/Button/examples/Button.md +8 -0
- package/src/components/Button/examples/ButtonCircle.tsx +63 -0
- package/src/components/Card/CardSubtitle.tsx +20 -0
- package/src/components/Card/CardTitle.tsx +6 -0
- package/src/components/Card/__tests__/CardSubtitle.test.tsx +48 -0
- package/src/components/Card/__tests__/CardTitle.test.tsx +27 -17
- package/src/components/Card/__tests__/__snapshots__/CardSubtitle.test.tsx.snap +21 -0
- package/src/components/Card/__tests__/__snapshots__/CardTitle.test.tsx.snap +1 -1
- package/src/components/Card/examples/Card.md +16 -1
- package/src/components/Card/examples/CardSubtitle.tsx +9 -0
- package/src/components/Card/examples/CardSubtitleActions.tsx +107 -0
- package/src/components/ClipboardCopy/__tests__/ClipboardCopyTruncateIntegration.test.tsx +32 -0
- package/src/components/Compass/Compass.tsx +109 -0
- package/src/components/Compass/CompassContent.tsx +42 -0
- package/src/components/Compass/CompassHeader.tsx +21 -0
- package/src/components/Compass/CompassHero.tsx +87 -0
- package/src/components/Compass/CompassMainHeader.tsx +43 -0
- package/src/components/Compass/CompassMessageBar.tsx +21 -0
- package/src/components/Compass/CompassPanel.tsx +51 -0
- package/src/components/Compass/__tests__/Compass.test.tsx +172 -0
- package/src/components/Compass/__tests__/CompassContent.test.tsx +46 -0
- package/src/components/Compass/__tests__/CompassHeader.test.tsx +56 -0
- package/src/components/Compass/__tests__/CompassHero.test.tsx +150 -0
- package/src/components/Compass/__tests__/CompassMainHeader.test.tsx +90 -0
- package/src/components/Compass/__tests__/CompassMessageBar.test.tsx +41 -0
- package/src/components/Compass/__tests__/CompassPanel.test.tsx +86 -0
- package/src/components/Compass/__tests__/__snapshots__/Compass.test.tsx.snap +108 -0
- package/src/components/Compass/__tests__/__snapshots__/CompassContent.test.tsx.snap +40 -0
- package/src/components/Compass/__tests__/__snapshots__/CompassHeader.test.tsx.snap +27 -0
- package/src/components/Compass/__tests__/__snapshots__/CompassHero.test.tsx.snap +18 -0
- package/src/components/Compass/__tests__/__snapshots__/CompassMainHeader.test.tsx.snap +42 -0
- package/src/components/Compass/__tests__/__snapshots__/CompassMessageBar.test.tsx.snap +13 -0
- package/src/components/Compass/__tests__/__snapshots__/CompassPanel.test.tsx.snap +25 -0
- package/src/components/Compass/examples/Compass.md +47 -0
- package/src/components/Compass/examples/CompassBasic.tsx +33 -0
- package/src/components/Compass/examples/CompassDemo.tsx +151 -0
- package/src/components/Compass/examples/compass.css +11 -0
- package/src/components/Compass/index.ts +7 -0
- package/src/components/DataList/DataList.tsx +4 -0
- package/src/components/DataList/__tests__/DataList.test.tsx +6 -0
- package/src/components/DataList/examples/DataList.md +6 -0
- package/src/components/DataList/examples/DataListPlain.tsx +32 -0
- package/src/components/Drawer/Drawer.tsx +4 -0
- package/src/components/Drawer/DrawerPanelContent.tsx +4 -0
- package/src/components/Drawer/__tests__/Drawer.test.tsx +26 -1
- package/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +10 -0
- package/src/components/Drawer/examples/Drawer.md +13 -0
- package/src/components/Drawer/examples/DrawerBasicPill.tsx +57 -0
- package/src/components/Drawer/examples/DrawerPillInline.tsx +57 -0
- package/src/components/ExpandableSection/ExpandableSection.tsx +17 -5
- package/src/components/ExpandableSection/ExpandableSectionToggle.tsx +48 -38
- package/src/components/ExpandableSection/__tests__/ExpandableSection.test.tsx +63 -0
- package/src/components/ExpandableSection/__tests__/ExpandableSectionToggle.test.tsx +28 -0
- package/src/components/ExpandableSection/examples/ExpandableSection.md +16 -0
- package/src/components/ExpandableSection/examples/ExpandableSectionCustomToggle.tsx +31 -16
- package/src/components/ExpandableSection/examples/ExpandableSectionUncontrolledDynamicToggleFunction.tsx +13 -0
- package/src/components/ExpandableSection/examples/ExpandableSectionWithHeading.tsx +89 -0
- package/src/components/Menu/Menu.tsx +1 -6
- package/src/components/MenuToggle/MenuToggle.tsx +5 -1
- package/src/components/MenuToggle/__tests__/MenuToggle.test.tsx +20 -0
- package/src/components/MenuToggle/examples/MenuToggle.md +18 -0
- package/src/components/MenuToggle/examples/MenuTogglePlainCircle.tsx +11 -0
- package/src/components/Page/Page.tsx +1 -0
- package/src/components/Page/PageContext.tsx +2 -0
- package/src/components/Page/PageSidebar.tsx +2 -2
- package/src/components/Page/__tests__/Generated/__snapshots__/PageSidebar.test.tsx.snap +1 -1
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +12 -12
- package/src/components/Progress/Progress.tsx +4 -0
- package/src/components/Progress/ProgressContainer.tsx +5 -2
- package/src/components/Progress/__tests__/Generated/ProgressContainer.test.tsx +1 -0
- package/src/components/Progress/__tests__/Progress.test.tsx +32 -0
- package/src/components/Progress/examples/Progress.md +2 -14
- package/src/components/Progress/examples/ProgressInteractiveFailure.tsx +55 -0
- package/src/components/Tabs/Tabs.tsx +7 -2
- package/src/components/Tabs/__tests__/Tabs.test.tsx +60 -0
- package/src/components/Tabs/__tests__/__snapshots__/Tabs.test.tsx.snap +13 -13
- package/src/components/Tabs/examples/Tabs.md +8 -0
- package/src/components/Tabs/examples/TabsSiteNav.tsx +40 -0
- package/src/components/Truncate/Truncate.tsx +5 -4
- package/src/components/Truncate/__tests__/Truncate.test.tsx +21 -3
- package/src/components/Truncate/__tests__/__snapshots__/Truncate.test.tsx.snap +3 -9
- package/src/components/index.ts +1 -0
- package/src/components/Progress/examples/ProgressFailureWithoutMeasure.tsx +0 -5
- package/src/components/Progress/examples/ProgressInsideSuccess.tsx +0 -10
- package/src/components/Progress/examples/ProgressOutsideFailure.tsx +0 -10
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: Compass
|
|
3
|
+
cssPrefix: pf-v6-c-compass
|
|
4
|
+
section: components
|
|
5
|
+
beta: true
|
|
6
|
+
propComponents:
|
|
7
|
+
[
|
|
8
|
+
'Compass',
|
|
9
|
+
'CompassHeader',
|
|
10
|
+
'CompassContent',
|
|
11
|
+
'CompassHero',
|
|
12
|
+
'CompassMainHeader',
|
|
13
|
+
'CompassPanel',
|
|
14
|
+
'CompassMessageBar'
|
|
15
|
+
]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
import './compass.css';
|
|
19
|
+
import { useRef, useState } from 'react';
|
|
20
|
+
import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
21
|
+
import OutlinedPlusSquare from '@patternfly/react-icons/dist/esm/icons/outlined-plus-square-icon';
|
|
22
|
+
import OutlinedCopy from '@patternfly/react-icons/dist/esm/icons/outlined-copy-icon';
|
|
23
|
+
import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon';
|
|
24
|
+
|
|
25
|
+
## Examples
|
|
26
|
+
|
|
27
|
+
### Basic
|
|
28
|
+
|
|
29
|
+
In a basic compass layout, content can be passed to the following props to populate areas of the page:
|
|
30
|
+
|
|
31
|
+
- `header`: content rendered in the top of the page. This will typically be a `CompassHeader` component to break the header into 3 areas consisting of a logo or brand, middle navigation, and profile.
|
|
32
|
+
- `sidebarStart`: content rendered in the left side or start side of the page
|
|
33
|
+
- `main`: content rendered in the center of the page. This will typically consist of a `CompassMainHeader` or `CompassHero`, along with a `CompassContent` filled with one or more `CompassPanel` components.
|
|
34
|
+
- `sidebarEnd`: content rendered in the right side or end side of the page
|
|
35
|
+
- `footer`: content rendered in the bottom of the page
|
|
36
|
+
|
|
37
|
+
The background image of the `Compass` and `CompassHero` may be customized by using their respective `backgroundSrcLight` and `backgroundSrcDark` props. The `CompassHero` also allows customization of a color gradient across its container by using the `gradientLight` and `gradientDark` props.
|
|
38
|
+
|
|
39
|
+
```ts file="CompassBasic.tsx"
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Demo
|
|
44
|
+
|
|
45
|
+
```ts isFullscreen file="CompassDemo.tsx"
|
|
46
|
+
|
|
47
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Compass, CompassHeader, CompassHero, CompassContent, CompassMainHeader } from '@patternfly/react-core';
|
|
2
|
+
import './compass.css';
|
|
3
|
+
|
|
4
|
+
export const CompassBasic: React.FunctionComponent = () => {
|
|
5
|
+
const headerContent = <CompassHeader logo={<div>Logo</div>} nav={<div>Nav</div>} profile={<div>Profile</div>} />;
|
|
6
|
+
const sidebarStartContent = <div>Sidebar start</div>;
|
|
7
|
+
// TODO: simplify mainContent to only a div string
|
|
8
|
+
const mainContent = (
|
|
9
|
+
<>
|
|
10
|
+
<CompassHero>
|
|
11
|
+
<div>Hero</div>
|
|
12
|
+
</CompassHero>
|
|
13
|
+
<CompassContent>
|
|
14
|
+
<CompassMainHeader>
|
|
15
|
+
<div>Content title</div>
|
|
16
|
+
</CompassMainHeader>
|
|
17
|
+
<div>Content</div>
|
|
18
|
+
</CompassContent>
|
|
19
|
+
</>
|
|
20
|
+
);
|
|
21
|
+
const sidebarEndContent = <div>Sidebar end</div>;
|
|
22
|
+
const footerContent = <div>Footer</div>;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<Compass
|
|
26
|
+
header={headerContent}
|
|
27
|
+
sidebarStart={sidebarStartContent}
|
|
28
|
+
main={mainContent}
|
|
29
|
+
sidebarEnd={sidebarEndContent}
|
|
30
|
+
footer={footerContent}
|
|
31
|
+
/>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Compass,
|
|
4
|
+
CompassHeader,
|
|
5
|
+
CompassHero,
|
|
6
|
+
CompassContent,
|
|
7
|
+
CompassMainHeader,
|
|
8
|
+
CompassPanel,
|
|
9
|
+
CompassMessageBar,
|
|
10
|
+
Tabs,
|
|
11
|
+
TabsComponent,
|
|
12
|
+
Tab,
|
|
13
|
+
TabContent,
|
|
14
|
+
TabTitleText,
|
|
15
|
+
ActionList,
|
|
16
|
+
ActionListGroup,
|
|
17
|
+
ActionListItem,
|
|
18
|
+
Button,
|
|
19
|
+
Title,
|
|
20
|
+
Tooltip
|
|
21
|
+
} from '@patternfly/react-core';
|
|
22
|
+
import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
23
|
+
import OutlinedPlusSquare from '@patternfly/react-icons/dist/esm/icons/outlined-plus-square-icon';
|
|
24
|
+
import OutlinedCopy from '@patternfly/react-icons/dist/esm/icons/outlined-copy-icon';
|
|
25
|
+
import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon';
|
|
26
|
+
|
|
27
|
+
export const CompassBasic: React.FunctionComponent = () => {
|
|
28
|
+
const [activeTab, setActiveTab] = useState<number>(0);
|
|
29
|
+
const [activeSubtab, setActiveSubtab] = useState<number>(0);
|
|
30
|
+
const subTabsRef = useRef<HTMLDivElement>(null);
|
|
31
|
+
|
|
32
|
+
const navContent = (
|
|
33
|
+
<>
|
|
34
|
+
<CompassPanel isPill hasNoPadding>
|
|
35
|
+
<Tabs
|
|
36
|
+
activeKey={activeTab}
|
|
37
|
+
isNav
|
|
38
|
+
onSelect={(_event, tabIndex) => setActiveTab(tabIndex as number)}
|
|
39
|
+
component={TabsComponent.nav}
|
|
40
|
+
aria-label="Compass navigation tabs"
|
|
41
|
+
inset={{ default: 'insetXl' }}
|
|
42
|
+
>
|
|
43
|
+
<Tab
|
|
44
|
+
tabContentId="subtabs"
|
|
45
|
+
tabContentRef={subTabsRef}
|
|
46
|
+
eventKey={0}
|
|
47
|
+
title={<TabTitleText>Tab 1</TabTitleText>}
|
|
48
|
+
aria-label="Compass tab with subtabs"
|
|
49
|
+
/>
|
|
50
|
+
<Tab eventKey={1} title={<TabTitleText>Tab 2</TabTitleText>} />
|
|
51
|
+
<Tab eventKey={2} title={<TabTitleText>Tab 3</TabTitleText>} />
|
|
52
|
+
<Tab eventKey={3} title={<TabTitleText>Disabled Tab 4</TabTitleText>} isDisabled />
|
|
53
|
+
</Tabs>
|
|
54
|
+
</CompassPanel>
|
|
55
|
+
<CompassPanel isPill hasNoPadding>
|
|
56
|
+
<TabContent id="subtabs" ref={subTabsRef}>
|
|
57
|
+
<Tabs
|
|
58
|
+
activeKey={activeSubtab}
|
|
59
|
+
isSubtab
|
|
60
|
+
isNav
|
|
61
|
+
onSelect={(_event, tabIndex) => setActiveSubtab(tabIndex as number)}
|
|
62
|
+
aria-label="Compass navigation subtabs"
|
|
63
|
+
inset={{ default: 'insetXl' }}
|
|
64
|
+
>
|
|
65
|
+
<Tab
|
|
66
|
+
tabContentId="subtab-1"
|
|
67
|
+
eventKey={0}
|
|
68
|
+
title={
|
|
69
|
+
<TabTitleText>
|
|
70
|
+
<div id="subtab-1">Subtab 1</div>
|
|
71
|
+
</TabTitleText>
|
|
72
|
+
}
|
|
73
|
+
/>
|
|
74
|
+
<Tab eventKey={1} title={<TabTitleText>Subtab 2</TabTitleText>} />
|
|
75
|
+
<Tab eventKey={2} title={<TabTitleText>Disabled Subtab 3</TabTitleText>} isDisabled />
|
|
76
|
+
</Tabs>
|
|
77
|
+
</TabContent>
|
|
78
|
+
</CompassPanel>
|
|
79
|
+
</>
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
const sidebarContent = (
|
|
83
|
+
<CompassPanel isPill>
|
|
84
|
+
<ActionList isIconList isVertical>
|
|
85
|
+
<ActionListGroup>
|
|
86
|
+
<ActionListItem>
|
|
87
|
+
<Tooltip content="Play">
|
|
88
|
+
<Button isCircle variant="plain" icon={<PlayIcon />} aria-label="Play" />
|
|
89
|
+
</Tooltip>
|
|
90
|
+
</ActionListItem>
|
|
91
|
+
<ActionListItem>
|
|
92
|
+
<Tooltip content="Add">
|
|
93
|
+
<Button isCircle variant="plain" icon={<OutlinedPlusSquare />} aria-label="Add" />
|
|
94
|
+
</Tooltip>
|
|
95
|
+
</ActionListItem>
|
|
96
|
+
</ActionListGroup>
|
|
97
|
+
<ActionListItem>
|
|
98
|
+
<Tooltip content="Copy">
|
|
99
|
+
<Button isCircle variant="plain" icon={<OutlinedCopy />} aria-label="Copy" />
|
|
100
|
+
</Tooltip>
|
|
101
|
+
</ActionListItem>
|
|
102
|
+
<ActionListGroup>
|
|
103
|
+
<ActionListItem>
|
|
104
|
+
<Tooltip content="Help">
|
|
105
|
+
<Button isCircle variant="plain" icon={<OutlinedQuestionCircleIcon />} aria-label="Help" />
|
|
106
|
+
</Tooltip>
|
|
107
|
+
</ActionListItem>
|
|
108
|
+
<ActionListItem>
|
|
109
|
+
<Tooltip content="Second copy">
|
|
110
|
+
<Button isCircle variant="plain" icon={<OutlinedCopy />} aria-label="Copy2" />
|
|
111
|
+
</Tooltip>
|
|
112
|
+
</ActionListItem>
|
|
113
|
+
</ActionListGroup>
|
|
114
|
+
</ActionList>
|
|
115
|
+
</CompassPanel>
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
const headerContent = <CompassHeader logo={<div>logo</div>} nav={navContent} profile={<div>Profile</div>} />;
|
|
119
|
+
const sidebarStartContent = sidebarContent;
|
|
120
|
+
const mainContent = (
|
|
121
|
+
<>
|
|
122
|
+
<CompassHero gradientDark={{ stop1: '#000', stop2: '#1b0d33', stop3: '#3d2785' }}>
|
|
123
|
+
<div>Hero</div>
|
|
124
|
+
</CompassHero>
|
|
125
|
+
<CompassMainHeader title={<Title headingLevel="h1">Content title</Title>} />
|
|
126
|
+
<CompassContent>
|
|
127
|
+
<CompassPanel>Content</CompassPanel>
|
|
128
|
+
</CompassContent>
|
|
129
|
+
</>
|
|
130
|
+
);
|
|
131
|
+
const sidebarEndContent = sidebarContent;
|
|
132
|
+
const footerContent = (
|
|
133
|
+
<CompassMessageBar>
|
|
134
|
+
<CompassPanel isPill hasNoPadding>
|
|
135
|
+
Message bar
|
|
136
|
+
</CompassPanel>
|
|
137
|
+
</CompassMessageBar>
|
|
138
|
+
);
|
|
139
|
+
|
|
140
|
+
return (
|
|
141
|
+
<Compass
|
|
142
|
+
header={headerContent}
|
|
143
|
+
sidebarStart={sidebarStartContent}
|
|
144
|
+
main={mainContent}
|
|
145
|
+
sidebarEnd={sidebarEndContent}
|
|
146
|
+
footer={footerContent}
|
|
147
|
+
backgroundSrcDark="/assets/images/pf-background.svg"
|
|
148
|
+
backgroundSrcLight="/assets/images/pf-background.svg"
|
|
149
|
+
/>
|
|
150
|
+
);
|
|
151
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
#ws-react-c-compass-basic [class*="pf-v6-c-compass"] {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
#ws-react-c-compass-basic [class*="pf-v6-c-compass"]::after {
|
|
6
|
+
content: "";
|
|
7
|
+
position: absolute;
|
|
8
|
+
inset: 0;
|
|
9
|
+
border: var(--pf-t--global--border--width--regular) dashed var(--pf-t--global--border--color--default);
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
}
|
|
@@ -31,6 +31,8 @@ export interface DataListProps extends React.HTMLProps<HTMLUListElement> {
|
|
|
31
31
|
selectedDataListItemId?: string;
|
|
32
32
|
/** Flag indicating if DataList should have compact styling */
|
|
33
33
|
isCompact?: boolean;
|
|
34
|
+
/** @beta Flag indicating if DataList should have plain styling with a transparent background */
|
|
35
|
+
isPlain?: boolean;
|
|
34
36
|
/** Specifies the grid breakpoints */
|
|
35
37
|
gridBreakpoint?: 'none' | 'always' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
36
38
|
/** Determines which wrapping modifier to apply to the DataList */
|
|
@@ -59,6 +61,7 @@ export const DataListBase: React.FunctionComponent<DataListProps> = ({
|
|
|
59
61
|
onSelectDataListItem,
|
|
60
62
|
selectedDataListItemId = '',
|
|
61
63
|
isCompact = false,
|
|
64
|
+
isPlain = false,
|
|
62
65
|
gridBreakpoint = 'md',
|
|
63
66
|
wrapModifier = null,
|
|
64
67
|
onSelectableRowChange,
|
|
@@ -84,6 +87,7 @@ export const DataListBase: React.FunctionComponent<DataListProps> = ({
|
|
|
84
87
|
className={css(
|
|
85
88
|
styles.dataList,
|
|
86
89
|
isCompact && styles.modifiers.compact,
|
|
90
|
+
isPlain && styles.modifiers.plain,
|
|
87
91
|
gridBreakpointClasses[gridBreakpoint],
|
|
88
92
|
wrapModifier && styles.modifiers[wrapModifier],
|
|
89
93
|
className
|
|
@@ -71,6 +71,12 @@ test('Renders custom class when passed', () => {
|
|
|
71
71
|
expect(screen.getByLabelText('list')).toHaveClass('data-list-custom');
|
|
72
72
|
});
|
|
73
73
|
|
|
74
|
+
test(`Renders with class ${styles.modifiers.plain} when isPlain is true`, () => {
|
|
75
|
+
render(<DataList key="list-id-1" isPlain aria-label="list" />);
|
|
76
|
+
|
|
77
|
+
expect(screen.getByLabelText('list')).toHaveClass(styles.modifiers.plain);
|
|
78
|
+
});
|
|
79
|
+
|
|
74
80
|
test('Renders with a hidden input to improve a11y when onSelectableRowChange is passed', () => {
|
|
75
81
|
render(
|
|
76
82
|
<DataList aria-label="this is a simple list" onSelectableRowChange={() => {}}>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { DataList, DataListItem, DataListItemRow, DataListItemCells, DataListCell } from '@patternfly/react-core';
|
|
2
|
+
|
|
3
|
+
export const DataListPlain: React.FunctionComponent = () => (
|
|
4
|
+
<DataList aria-label="Plain data list example" isPlain>
|
|
5
|
+
<DataListItem aria-labelledby="plain-item1">
|
|
6
|
+
<DataListItemRow>
|
|
7
|
+
<DataListItemCells
|
|
8
|
+
dataListCells={[
|
|
9
|
+
<DataListCell key="primary content">
|
|
10
|
+
<span id="plain-item1">Primary content</span>
|
|
11
|
+
</DataListCell>,
|
|
12
|
+
<DataListCell key="secondary content">Secondary content</DataListCell>
|
|
13
|
+
]}
|
|
14
|
+
/>
|
|
15
|
+
</DataListItemRow>
|
|
16
|
+
</DataListItem>
|
|
17
|
+
<DataListItem aria-labelledby="plain-item2">
|
|
18
|
+
<DataListItemRow>
|
|
19
|
+
<DataListItemCells
|
|
20
|
+
dataListCells={[
|
|
21
|
+
<DataListCell isFilled={false} key="secondary content fill">
|
|
22
|
+
<span id="plain-item2">Secondary content (pf-m-no-fill)</span>
|
|
23
|
+
</DataListCell>,
|
|
24
|
+
<DataListCell isFilled={false} alignRight key="secondary content align">
|
|
25
|
+
Secondary content (pf-m-align-right pf-m-no-fill)
|
|
26
|
+
</DataListCell>
|
|
27
|
+
]}
|
|
28
|
+
/>
|
|
29
|
+
</DataListItemRow>
|
|
30
|
+
</DataListItem>
|
|
31
|
+
</DataList>
|
|
32
|
+
);
|
|
@@ -17,6 +17,8 @@ export interface DrawerProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
17
17
|
isExpanded?: boolean;
|
|
18
18
|
/** Indicates if the content element and panel element are displayed side by side. */
|
|
19
19
|
isInline?: boolean;
|
|
20
|
+
/** @beta Indicates if the drawer will have pill styles */
|
|
21
|
+
isPill?: boolean;
|
|
20
22
|
/** Indicates if the drawer will always show both content and panel. */
|
|
21
23
|
isStatic?: boolean;
|
|
22
24
|
/** Position of the drawer panel. left and right are deprecated, use start and end instead. */
|
|
@@ -50,6 +52,7 @@ export const Drawer: React.FunctionComponent<DrawerProps> = ({
|
|
|
50
52
|
children,
|
|
51
53
|
isExpanded = false,
|
|
52
54
|
isInline = false,
|
|
55
|
+
isPill = false,
|
|
53
56
|
isStatic = false,
|
|
54
57
|
position = 'end',
|
|
55
58
|
onExpand = () => {},
|
|
@@ -65,6 +68,7 @@ export const Drawer: React.FunctionComponent<DrawerProps> = ({
|
|
|
65
68
|
styles.drawer,
|
|
66
69
|
isExpanded && styles.modifiers.expanded,
|
|
67
70
|
isInline && styles.modifiers.inline,
|
|
71
|
+
isPill && styles.modifiers.pill,
|
|
68
72
|
isStatic && styles.modifiers.static,
|
|
69
73
|
(position === 'left' || position === 'start') && styles.modifiers.panelLeft,
|
|
70
74
|
position === 'bottom' && styles.modifiers.panelBottom,
|
|
@@ -35,6 +35,8 @@ export interface DrawerPanelContentProps extends Omit<React.HTMLProps<HTMLDivEle
|
|
|
35
35
|
hasNoBorder?: boolean;
|
|
36
36
|
/** Flag indicating that the drawer panel should be resizable. */
|
|
37
37
|
isResizable?: boolean;
|
|
38
|
+
/** @beta Flag indicating that the drawer panel should disable glass styles. This prop is intended to work with isPill drawers. */
|
|
39
|
+
hasNoGlass?: boolean;
|
|
38
40
|
/** Callback for resize end. */
|
|
39
41
|
onResize?: (event: MouseEvent | TouchEvent | React.KeyboardEvent, width: number, id: string) => void;
|
|
40
42
|
/** The minimum size of a drawer. */
|
|
@@ -68,6 +70,7 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
68
70
|
children,
|
|
69
71
|
hasNoBorder = false,
|
|
70
72
|
isResizable = false,
|
|
73
|
+
hasNoGlass = false,
|
|
71
74
|
onResize,
|
|
72
75
|
minSize,
|
|
73
76
|
defaultSize,
|
|
@@ -364,6 +367,7 @@ export const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps
|
|
|
364
367
|
className={css(
|
|
365
368
|
styles.drawerPanel,
|
|
366
369
|
isResizable && styles.modifiers.resizable,
|
|
370
|
+
hasNoGlass && styles.modifiers.noGlass,
|
|
367
371
|
hasNoBorder && styles.modifiers.noBorder,
|
|
368
372
|
formatBreakpointMods(widths, styles),
|
|
369
373
|
colorVariant === DrawerColorVariant.noBackground && styles.modifiers.noBackground,
|
|
@@ -10,9 +10,10 @@ import {
|
|
|
10
10
|
DrawerPanelContent,
|
|
11
11
|
DrawerColorVariant
|
|
12
12
|
} from '../';
|
|
13
|
-
import { render } from '@testing-library/react';
|
|
13
|
+
import { screen, render } from '@testing-library/react';
|
|
14
14
|
import userEvent from '@testing-library/user-event';
|
|
15
15
|
import { KeyTypes } from '../../../helpers';
|
|
16
|
+
import styles from '@patternfly/react-styles/css/components/Drawer/drawer';
|
|
16
17
|
|
|
17
18
|
jest.mock('../../../helpers/GenerateId/GenerateId');
|
|
18
19
|
|
|
@@ -162,3 +163,27 @@ test('Resizeable DrawerPanelContent can be wrapped in a context without causing
|
|
|
162
163
|
|
|
163
164
|
expect(consoleError).not.toHaveBeenCalled();
|
|
164
165
|
});
|
|
166
|
+
|
|
167
|
+
test(`Renders with ${styles.modifiers.pill} class when specified`, () => {
|
|
168
|
+
const panelContent = (
|
|
169
|
+
<DrawerPanelContent>
|
|
170
|
+
<DrawerHead>
|
|
171
|
+
<span>drawer-panel</span>
|
|
172
|
+
<DrawerActions>
|
|
173
|
+
<DrawerCloseButton />
|
|
174
|
+
</DrawerActions>
|
|
175
|
+
</DrawerHead>
|
|
176
|
+
<DrawerPanelBody>drawer-panel</DrawerPanelBody>
|
|
177
|
+
</DrawerPanelContent>
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
render(
|
|
181
|
+
<Drawer data-testid="drawer" isExpanded={true} position="left" isPill>
|
|
182
|
+
<DrawerContent panelContent={panelContent}>
|
|
183
|
+
<DrawerContentBody>Drawer content text</DrawerContentBody>
|
|
184
|
+
</DrawerContent>
|
|
185
|
+
</Drawer>
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
expect(screen.getByTestId('drawer')).toHaveClass(styles.modifiers.pill);
|
|
189
|
+
});
|
|
@@ -158,3 +158,13 @@ test('Style prop overrides boundaryCssVars', () => {
|
|
|
158
158
|
'--pf-v6-c-drawer__panel--md--FlexBasis--max': '500px'
|
|
159
159
|
});
|
|
160
160
|
});
|
|
161
|
+
|
|
162
|
+
test(`Renders with class ${styles.modifiers.noGlass} when isPill is true`, () => {
|
|
163
|
+
render(
|
|
164
|
+
<Drawer isExpanded isPill>
|
|
165
|
+
<DrawerPanelContent hasNoGlass>Drawer panel content</DrawerPanelContent>
|
|
166
|
+
</Drawer>
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
expect(screen.getByText('Drawer panel content')).toHaveClass(styles.modifiers.noGlass);
|
|
170
|
+
});
|
|
@@ -17,6 +17,7 @@ propComponents:
|
|
|
17
17
|
]
|
|
18
18
|
section: components
|
|
19
19
|
---
|
|
20
|
+
|
|
20
21
|
import { Fragment, useRef, useState } from 'react';
|
|
21
22
|
import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/accessibility';
|
|
22
23
|
|
|
@@ -143,3 +144,15 @@ To customize which element receives focus when the drawer panel expands, use the
|
|
|
143
144
|
```ts file="./DrawerFocusTrap.tsx"
|
|
144
145
|
|
|
145
146
|
```
|
|
147
|
+
|
|
148
|
+
### Pill
|
|
149
|
+
|
|
150
|
+
```ts file="./DrawerBasicPill.tsx"
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Pill inline
|
|
155
|
+
|
|
156
|
+
```ts file="./DrawerPillInline.tsx"
|
|
157
|
+
|
|
158
|
+
```
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Fragment, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Drawer,
|
|
4
|
+
DrawerPanelContent,
|
|
5
|
+
DrawerContent,
|
|
6
|
+
DrawerContentBody,
|
|
7
|
+
DrawerHead,
|
|
8
|
+
DrawerActions,
|
|
9
|
+
DrawerCloseButton,
|
|
10
|
+
Button
|
|
11
|
+
} from '@patternfly/react-core';
|
|
12
|
+
|
|
13
|
+
export const DrawerBasicPill: React.FunctionComponent = () => {
|
|
14
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
+
const drawerRef = useRef<HTMLDivElement>(undefined);
|
|
16
|
+
|
|
17
|
+
const onExpand = () => {
|
|
18
|
+
drawerRef.current && drawerRef.current.focus();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const onClick = () => {
|
|
22
|
+
setIsExpanded(!isExpanded);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const onCloseClick = () => {
|
|
26
|
+
setIsExpanded(false);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const panelContent = (
|
|
30
|
+
<DrawerPanelContent>
|
|
31
|
+
<DrawerHead>
|
|
32
|
+
<span tabIndex={isExpanded ? 0 : -1} ref={drawerRef}>
|
|
33
|
+
Drawer panel header
|
|
34
|
+
</span>
|
|
35
|
+
<DrawerActions>
|
|
36
|
+
<DrawerCloseButton onClick={onCloseClick} />
|
|
37
|
+
</DrawerActions>
|
|
38
|
+
</DrawerHead>
|
|
39
|
+
</DrawerPanelContent>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const drawerContent =
|
|
43
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.';
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Fragment>
|
|
47
|
+
<Button aria-expanded={isExpanded} onClick={onClick}>
|
|
48
|
+
Toggle drawer
|
|
49
|
+
</Button>
|
|
50
|
+
<Drawer isExpanded={isExpanded} isPill onExpand={onExpand}>
|
|
51
|
+
<DrawerContent panelContent={panelContent}>
|
|
52
|
+
<DrawerContentBody>{drawerContent}</DrawerContentBody>
|
|
53
|
+
</DrawerContent>
|
|
54
|
+
</Drawer>
|
|
55
|
+
</Fragment>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Fragment, useRef, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Drawer,
|
|
4
|
+
DrawerPanelContent,
|
|
5
|
+
DrawerContent,
|
|
6
|
+
DrawerContentBody,
|
|
7
|
+
DrawerHead,
|
|
8
|
+
DrawerActions,
|
|
9
|
+
DrawerCloseButton,
|
|
10
|
+
Button
|
|
11
|
+
} from '@patternfly/react-core';
|
|
12
|
+
|
|
13
|
+
export const DrawerBasicPill: React.FunctionComponent = () => {
|
|
14
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
+
const drawerRef = useRef<HTMLDivElement>(undefined);
|
|
16
|
+
|
|
17
|
+
const onExpand = () => {
|
|
18
|
+
drawerRef.current && drawerRef.current.focus();
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const onClick = () => {
|
|
22
|
+
setIsExpanded(!isExpanded);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const onCloseClick = () => {
|
|
26
|
+
setIsExpanded(false);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const panelContent = (
|
|
30
|
+
<DrawerPanelContent>
|
|
31
|
+
<DrawerHead>
|
|
32
|
+
<span tabIndex={isExpanded ? 0 : -1} ref={drawerRef}>
|
|
33
|
+
Drawer panel header
|
|
34
|
+
</span>
|
|
35
|
+
<DrawerActions>
|
|
36
|
+
<DrawerCloseButton onClick={onCloseClick} />
|
|
37
|
+
</DrawerActions>
|
|
38
|
+
</DrawerHead>
|
|
39
|
+
</DrawerPanelContent>
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
const drawerContent =
|
|
43
|
+
'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pretium est a porttitor vehicula. Quisque vel commodo urna. Morbi mattis rutrum ante, id vehicula ex accumsan ut. Morbi viverra, eros vel porttitor facilisis, eros purus aliquet erat,nec lobortis felis elit pulvinar sem. Vivamus vulputate, risus eget commodo eleifend, eros nibh porta quam, vitae lacinia leo libero at magna. Maecenas aliquam sagittis orci, et posuere nisi ultrices sit amet. Aliquam ex odio, malesuada sed posuere quis, pellentesque at mauris. Phasellus venenatis massa ex, eget pulvinar libero auctor pretium. Aliquam erat volutpat. Duis euismod justo in quam ullamcorper, in commodo massa vulputate.';
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Fragment>
|
|
47
|
+
<Button aria-expanded={isExpanded} onClick={onClick}>
|
|
48
|
+
Toggle drawer
|
|
49
|
+
</Button>
|
|
50
|
+
<Drawer isExpanded={isExpanded} isPill isInline onExpand={onExpand}>
|
|
51
|
+
<DrawerContent panelContent={panelContent}>
|
|
52
|
+
<DrawerContentBody>{drawerContent}</DrawerContentBody>
|
|
53
|
+
</DrawerContent>
|
|
54
|
+
</Drawer>
|
|
55
|
+
</Fragment>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
@@ -44,8 +44,10 @@ export interface ExpandableSectionProps extends Omit<React.HTMLProps<HTMLDivElem
|
|
|
44
44
|
* use the onToggle property of the expandable section toggle sub-component.
|
|
45
45
|
*/
|
|
46
46
|
onToggle?: (event: React.MouseEvent, isExpanded: boolean) => void;
|
|
47
|
-
/** React node that appears in the attached toggle in place of the toggleText property.
|
|
48
|
-
|
|
47
|
+
/** React node that appears in the attached toggle in place of the toggleText property.
|
|
48
|
+
* Can also be a function that receives the expanded state and returns a React node.
|
|
49
|
+
*/
|
|
50
|
+
toggleContent?: React.ReactNode | ((isExpanded: boolean) => React.ReactNode);
|
|
49
51
|
/** Text that appears in the attached toggle. */
|
|
50
52
|
toggleText?: string;
|
|
51
53
|
/** Text that appears in the attached toggle when collapsed (will override toggleText if
|
|
@@ -72,6 +74,11 @@ export interface ExpandableSectionProps extends Omit<React.HTMLProps<HTMLDivElem
|
|
|
72
74
|
* animation will not occur.
|
|
73
75
|
*/
|
|
74
76
|
direction?: 'up' | 'down';
|
|
77
|
+
/** The HTML element to use for the toggle wrapper. Can be 'div' (default) or any heading level.
|
|
78
|
+
* When using heading elements, the button will be rendered inside the heading for proper semantics.
|
|
79
|
+
* This is useful when the toggle text should function as a heading in the document structure.
|
|
80
|
+
*/
|
|
81
|
+
toggleWrapper?: 'div' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
75
82
|
}
|
|
76
83
|
|
|
77
84
|
interface ExpandableSectionState {
|
|
@@ -216,6 +223,7 @@ class ExpandableSection extends Component<ExpandableSectionProps, ExpandableSect
|
|
|
216
223
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
217
224
|
truncateMaxLines,
|
|
218
225
|
direction,
|
|
226
|
+
toggleWrapper = 'div',
|
|
219
227
|
...props
|
|
220
228
|
} = this.props;
|
|
221
229
|
|
|
@@ -246,8 +254,12 @@ class ExpandableSection extends Component<ExpandableSectionProps, ExpandableSect
|
|
|
246
254
|
propOrStateIsExpanded
|
|
247
255
|
);
|
|
248
256
|
|
|
257
|
+
const computedToggleContent =
|
|
258
|
+
typeof toggleContent === 'function' ? toggleContent(propOrStateIsExpanded) : toggleContent;
|
|
259
|
+
const ToggleWrapper = toggleWrapper as any;
|
|
260
|
+
|
|
249
261
|
const expandableToggle = !isDetached && (
|
|
250
|
-
<
|
|
262
|
+
<ToggleWrapper className={`${styles.expandableSection}__toggle`}>
|
|
251
263
|
<Button
|
|
252
264
|
variant="link"
|
|
253
265
|
{...(variant === ExpandableSectionVariant.truncate && { isInline: true })}
|
|
@@ -265,9 +277,9 @@ class ExpandableSection extends Component<ExpandableSectionProps, ExpandableSect
|
|
|
265
277
|
aria-label={toggleAriaLabel}
|
|
266
278
|
aria-labelledby={toggleAriaLabelledBy}
|
|
267
279
|
>
|
|
268
|
-
{
|
|
280
|
+
{computedToggleContent || computedToggleText}
|
|
269
281
|
</Button>
|
|
270
|
-
</
|
|
282
|
+
</ToggleWrapper>
|
|
271
283
|
);
|
|
272
284
|
|
|
273
285
|
return (
|