@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
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.5.0-prerelease.9","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.5.0-prerelease.9","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.5.0-prerelease.9","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.5.0-prerelease.10",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@patternfly/react-icons": "^6.
|
|
50
|
-
"@patternfly/react-styles": "^6.
|
|
51
|
-
"@patternfly/react-tokens": "^6.
|
|
49
|
+
"@patternfly/react-icons": "^6.5.0-prerelease.4",
|
|
50
|
+
"@patternfly/react-styles": "^6.5.0-prerelease.4",
|
|
51
|
+
"@patternfly/react-tokens": "^6.5.0-prerelease.4",
|
|
52
52
|
"focus-trap": "7.6.4",
|
|
53
53
|
"react-dropzone": "^14.3.5",
|
|
54
54
|
"tslib": "^2.8.1"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
|
-
"@patternfly/patternfly": "6.
|
|
57
|
+
"@patternfly/patternfly": "6.5.0-prerelease.19",
|
|
58
58
|
"case-anything": "^3.1.2",
|
|
59
59
|
"css": "^3.0.0",
|
|
60
60
|
"fs-extra": "^11.3.0"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react": "^17 || ^18 || ^19",
|
|
64
64
|
"react-dom": "^17 || ^18 || ^19"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "69e66e97b0df4a7987c3f207347383f492b565a7"
|
|
67
67
|
}
|
|
@@ -8,15 +8,26 @@ export interface ActionListProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
8
8
|
isIconList?: boolean;
|
|
9
9
|
/** Additional classes added to the action list */
|
|
10
10
|
className?: string;
|
|
11
|
+
/** @beta Whether the layout of children is vertical or horizontal. */
|
|
12
|
+
isVertical?: boolean;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
export const ActionList: React.FunctionComponent<ActionListProps> = ({
|
|
14
16
|
children,
|
|
15
17
|
isIconList,
|
|
16
18
|
className,
|
|
19
|
+
isVertical = false,
|
|
17
20
|
...props
|
|
18
21
|
}: ActionListProps) => (
|
|
19
|
-
<div
|
|
22
|
+
<div
|
|
23
|
+
className={css(
|
|
24
|
+
styles.actionList,
|
|
25
|
+
isIconList && styles.modifiers.icons,
|
|
26
|
+
isVertical && styles.modifiers.vertical,
|
|
27
|
+
className
|
|
28
|
+
)}
|
|
29
|
+
{...props}
|
|
30
|
+
>
|
|
20
31
|
{children}
|
|
21
32
|
</div>
|
|
22
33
|
);
|
|
@@ -37,6 +37,18 @@ test(`Renders with class ${styles.modifiers.icons} when isIconList is true`, ()
|
|
|
37
37
|
expect(screen.getByText('Test')).toHaveClass(styles.modifiers.icons);
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
+
test(`Does not render with class ${styles.modifiers.vertical} by default`, () => {
|
|
41
|
+
render(<ActionList>Test</ActionList>);
|
|
42
|
+
|
|
43
|
+
expect(screen.getByText('Test')).not.toHaveClass(styles.modifiers.vertical);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
test(`Renders with class ${styles.modifiers.vertical} when isVertical is true`, () => {
|
|
47
|
+
render(<ActionList isVertical={true}>Test</ActionList>);
|
|
48
|
+
|
|
49
|
+
expect(screen.getByText('Test')).toHaveClass(styles.modifiers.vertical);
|
|
50
|
+
});
|
|
51
|
+
|
|
40
52
|
test('Renders with inherited element props spread to the component', () => {
|
|
41
53
|
render(<ActionList aria-label="Test label">Test</ActionList>);
|
|
42
54
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ActionList, ActionListGroup, ActionListItem, Button } from '@patternfly/react-core';
|
|
2
|
+
import CheckIcon from '@patternfly/react-icons/dist/esm/icons/check-icon';
|
|
3
|
+
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
4
|
+
|
|
5
|
+
export const ActionListVertical: React.FunctionComponent = () => (
|
|
6
|
+
<>
|
|
7
|
+
<h4>Multiple groups</h4>
|
|
8
|
+
<ActionList isVertical>
|
|
9
|
+
<ActionListGroup>
|
|
10
|
+
<ActionListItem>
|
|
11
|
+
<Button>Next</Button>
|
|
12
|
+
</ActionListItem>
|
|
13
|
+
<ActionListItem>
|
|
14
|
+
<Button variant="secondary">Back</Button>
|
|
15
|
+
</ActionListItem>
|
|
16
|
+
</ActionListGroup>
|
|
17
|
+
<ActionListGroup>
|
|
18
|
+
<ActionListItem>
|
|
19
|
+
<Button>Submit</Button>
|
|
20
|
+
</ActionListItem>
|
|
21
|
+
<ActionListItem>
|
|
22
|
+
<Button variant="link">Cancel</Button>
|
|
23
|
+
</ActionListItem>
|
|
24
|
+
</ActionListGroup>
|
|
25
|
+
</ActionList>
|
|
26
|
+
<h4>Icons, in two groups</h4>
|
|
27
|
+
<ActionList isVertical>
|
|
28
|
+
<ActionListGroup>
|
|
29
|
+
<ActionListItem>
|
|
30
|
+
<Button aria-label="Close vertical action list group 1" variant="plain" icon={<TimesIcon />} />
|
|
31
|
+
</ActionListItem>
|
|
32
|
+
<ActionListItem>
|
|
33
|
+
<Button aria-label="Toggle vertical action list example group 1" variant="plain" icon={<CheckIcon />} />
|
|
34
|
+
</ActionListItem>
|
|
35
|
+
</ActionListGroup>
|
|
36
|
+
<ActionListGroup>
|
|
37
|
+
<ActionListItem>
|
|
38
|
+
<Button aria-label="Close vertical action list group 2" variant="plain" icon={<TimesIcon />} />
|
|
39
|
+
</ActionListItem>
|
|
40
|
+
<ActionListItem>
|
|
41
|
+
<Button aria-label="Toggle vertical action list example group 2" variant="plain" icon={<CheckIcon />} />
|
|
42
|
+
</ActionListItem>
|
|
43
|
+
</ActionListGroup>
|
|
44
|
+
</ActionList>
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
@@ -107,6 +107,8 @@ export interface ButtonProps extends Omit<React.HTMLProps<HTMLButtonElement>, 'r
|
|
|
107
107
|
isHamburger?: boolean;
|
|
108
108
|
/** Adjusts and animates the hamburger icon to indicate what will happen upon clicking the button. */
|
|
109
109
|
hamburgerVariant?: 'expand' | 'collapse';
|
|
110
|
+
/** @beta Flag indicating the button is a circle button. Intended for buttons that only contain an icon.. */
|
|
111
|
+
isCircle?: boolean;
|
|
110
112
|
/** @hide Forwarded ref */
|
|
111
113
|
innerRef?: React.Ref<any>;
|
|
112
114
|
/** Adds count number to button */
|
|
@@ -131,6 +133,7 @@ const ButtonBase: React.FunctionComponent<ButtonProps> = ({
|
|
|
131
133
|
isSettings,
|
|
132
134
|
isHamburger,
|
|
133
135
|
hamburgerVariant,
|
|
136
|
+
isCircle,
|
|
134
137
|
spinnerAriaValueText,
|
|
135
138
|
spinnerAriaLabelledBy,
|
|
136
139
|
spinnerAriaLabel,
|
|
@@ -261,6 +264,7 @@ const ButtonBase: React.FunctionComponent<ButtonProps> = ({
|
|
|
261
264
|
variant === ButtonVariant.stateful && styles.modifiers[state],
|
|
262
265
|
size === ButtonSize.sm && styles.modifiers.small,
|
|
263
266
|
size === ButtonSize.lg && styles.modifiers.displayLg,
|
|
267
|
+
isCircle && styles.modifiers.circle,
|
|
264
268
|
className
|
|
265
269
|
)}
|
|
266
270
|
disabled={isButtonElement ? isDisabled : null}
|
|
@@ -214,6 +214,11 @@ test(`Renders without class ${styles.modifiers.progress} when isLoading = false
|
|
|
214
214
|
expect(screen.getByRole('button')).not.toHaveClass(styles.modifiers.progress);
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
+
test(`Renders with class ${styles.modifiers.circle} when isCircle is true`, () => {
|
|
218
|
+
render(<Button isCircle>Circle Button</Button>);
|
|
219
|
+
expect(screen.getByRole('button')).toHaveClass(styles.modifiers.circle);
|
|
220
|
+
});
|
|
221
|
+
|
|
217
222
|
test(`Renders custom icon with class ${styles.modifiers.inProgress} when isLoading = true and icon is present`, () => {
|
|
218
223
|
render(
|
|
219
224
|
<Button variant="plain" isLoading aria-label="Upload" spinnerAriaValueText="Loading" icon={<div>ICON</div>} />
|
|
@@ -5,7 +5,7 @@ exports[`Renders basic button 1`] = `
|
|
|
5
5
|
<button
|
|
6
6
|
aria-label="basic button"
|
|
7
7
|
class="pf-v6-c-button pf-m-primary"
|
|
8
|
-
data-ouia-component-id="OUIA-Generated-Button-primary-
|
|
8
|
+
data-ouia-component-id="OUIA-Generated-Button-primary-67"
|
|
9
9
|
data-ouia-component-type="PF6/Button"
|
|
10
10
|
data-ouia-safe="true"
|
|
11
11
|
type="button"
|
|
@@ -138,6 +138,14 @@ Stateful buttons are ideal for displaying the state of notifications. Use `varia
|
|
|
138
138
|
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
+
### Circle buttons
|
|
142
|
+
|
|
143
|
+
Pass `isCircle` to a button to modify its styling from simply rounded corners to complete circles. Circle buttons are intended for buttons that only contain an icon and adequate accessible naming.
|
|
144
|
+
|
|
145
|
+
```ts file="./ButtonCircle.tsx"
|
|
146
|
+
|
|
147
|
+
```
|
|
148
|
+
|
|
141
149
|
## Animated examples
|
|
142
150
|
|
|
143
151
|
The following `<Button>` implementations have animations built into them. When using one of the following implementations, the `icon` property will be overridden due to the animations needing specific icons internally.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Button, Flex } from '@patternfly/react-core';
|
|
2
|
+
import TimesIcon from '@patternfly/react-icons/dist/esm/icons/times-icon';
|
|
3
|
+
import PlusCircleIcon from '@patternfly/react-icons/dist/esm/icons/plus-circle-icon';
|
|
4
|
+
import CopyIcon from '@patternfly/react-icons/dist/esm/icons/copy-icon';
|
|
5
|
+
import BellIcon from '@patternfly/react-icons/dist/esm/icons/bell-icon';
|
|
6
|
+
import UploadIcon from '@patternfly/react-icons/dist/esm/icons/upload-icon';
|
|
7
|
+
|
|
8
|
+
interface LoadingPropsType {
|
|
9
|
+
spinnerAriaValueText: string;
|
|
10
|
+
spinnerAriaLabelledBy?: string;
|
|
11
|
+
spinnerAriaLabel?: string;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const ButtonCircle: React.FunctionComponent = () => {
|
|
16
|
+
const [isUploading, setIsUploading] = useState<boolean>(false);
|
|
17
|
+
|
|
18
|
+
const uploadingProps = {} as LoadingPropsType;
|
|
19
|
+
uploadingProps.spinnerAriaValueText = 'Loading circle variant example';
|
|
20
|
+
uploadingProps.spinnerAriaLabel = 'Uploading circle variant example data';
|
|
21
|
+
uploadingProps.isLoading = isUploading;
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Flex columnGap={{ default: 'columnGapSm' }}>
|
|
25
|
+
<Button isCircle icon={<PlusCircleIcon />} aria-label="Add primary circle variant example" />
|
|
26
|
+
<Button
|
|
27
|
+
variant="secondary"
|
|
28
|
+
isCircle
|
|
29
|
+
icon={<PlusCircleIcon />}
|
|
30
|
+
aria-label="Add secondary circle variant example"
|
|
31
|
+
/>
|
|
32
|
+
<Button variant="tertiary" isCircle icon={<PlusCircleIcon />} aria-label="Add tertiary circle variant example" />
|
|
33
|
+
<Button variant="danger" isCircle icon={<PlusCircleIcon />} aria-label="Add danger circle variant example" />
|
|
34
|
+
<Button variant="warning" isCircle icon={<PlusCircleIcon />} aria-label="Add warning circle variant example" />
|
|
35
|
+
<Button variant="link" isCircle icon={<PlusCircleIcon />} aria-label="Add link circle variant example" />
|
|
36
|
+
<Button variant="control" isCircle icon={<CopyIcon />} aria-label="Copy control circle variant example" />
|
|
37
|
+
<Button variant="plain" isCircle icon={<TimesIcon />} aria-label="Remove plain circle variant example" />
|
|
38
|
+
<Button variant="stateful" isCircle icon={<BellIcon />} aria-label="Stateful unread circle variant example" />
|
|
39
|
+
<Button
|
|
40
|
+
variant="stateful"
|
|
41
|
+
state="read"
|
|
42
|
+
isCircle
|
|
43
|
+
icon={<BellIcon />}
|
|
44
|
+
aria-label="Stateful read circle variant example"
|
|
45
|
+
/>
|
|
46
|
+
<Button
|
|
47
|
+
variant="stateful"
|
|
48
|
+
state="attention"
|
|
49
|
+
isCircle
|
|
50
|
+
icon={<BellIcon />}
|
|
51
|
+
aria-label="Stateful attention circle variant example"
|
|
52
|
+
/>
|
|
53
|
+
<Button
|
|
54
|
+
variant="plain"
|
|
55
|
+
isCircle
|
|
56
|
+
{...(!isUploading && { 'aria-label': 'Upload circle variant example' })}
|
|
57
|
+
onClick={() => setIsUploading(!isUploading)}
|
|
58
|
+
icon={<UploadIcon />}
|
|
59
|
+
{...uploadingProps}
|
|
60
|
+
/>
|
|
61
|
+
</Flex>
|
|
62
|
+
);
|
|
63
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { css } from '@patternfly/react-styles';
|
|
2
|
+
import styles from '@patternfly/react-styles/css/components/Card/card';
|
|
3
|
+
|
|
4
|
+
export interface CardSubtitleProps {
|
|
5
|
+
/** Content rendered inside the description. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** Id of the description. */
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const CardSubtitle: React.FunctionComponent<CardSubtitleProps> = ({
|
|
12
|
+
children = null,
|
|
13
|
+
id = '',
|
|
14
|
+
...props
|
|
15
|
+
}: CardSubtitleProps) => (
|
|
16
|
+
<div {...props} id={id} className={css(styles.cardSubtitle)}>
|
|
17
|
+
{children}
|
|
18
|
+
</div>
|
|
19
|
+
);
|
|
20
|
+
CardSubtitle.displayName = 'CardSubtitle';
|
|
@@ -2,6 +2,7 @@ import { useContext } from 'react';
|
|
|
2
2
|
import { css } from '@patternfly/react-styles';
|
|
3
3
|
import styles from '@patternfly/react-styles/css/components/Card/card';
|
|
4
4
|
import { CardContext } from './Card';
|
|
5
|
+
import { CardSubtitle } from './CardSubtitle';
|
|
5
6
|
|
|
6
7
|
export interface CardTitleProps extends React.HTMLProps<HTMLDivElement> {
|
|
7
8
|
/** Content rendered inside the CardTitle */
|
|
@@ -10,23 +11,28 @@ export interface CardTitleProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
10
11
|
className?: string;
|
|
11
12
|
/** Sets the base component to render. defaults to div */
|
|
12
13
|
component?: keyof React.JSX.IntrinsicElements;
|
|
14
|
+
/** @beta Subtitle of the card title */
|
|
15
|
+
subtitle?: React.ReactNode;
|
|
13
16
|
}
|
|
14
17
|
|
|
15
18
|
export const CardTitle: React.FunctionComponent<CardTitleProps> = ({
|
|
16
19
|
children,
|
|
17
20
|
className,
|
|
18
21
|
component = 'div',
|
|
22
|
+
subtitle,
|
|
19
23
|
...props
|
|
20
24
|
}: CardTitleProps) => {
|
|
21
25
|
const { cardId } = useContext(CardContext);
|
|
22
26
|
const Component = component as any;
|
|
23
27
|
const titleId = cardId ? `${cardId}-title` : '';
|
|
28
|
+
const subtitleId = cardId ? `${cardId}-subtitle` : '';
|
|
24
29
|
|
|
25
30
|
return (
|
|
26
31
|
<div className={css(styles.cardTitle)}>
|
|
27
32
|
<Component className={css(styles.cardTitleText, className)} id={titleId || undefined} {...props}>
|
|
28
33
|
{children}
|
|
29
34
|
</Component>
|
|
35
|
+
{subtitle && <CardSubtitle id={subtitleId}>{subtitle}</CardSubtitle>}
|
|
30
36
|
</div>
|
|
31
37
|
);
|
|
32
38
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import { CardSubtitle } from '../CardSubtitle';
|
|
3
|
+
import styles from '@patternfly/react-styles/css/components/Card/card';
|
|
4
|
+
|
|
5
|
+
test('Renders without children', () => {
|
|
6
|
+
render(
|
|
7
|
+
<div data-testid="container">
|
|
8
|
+
<CardSubtitle />
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
expect(screen.getByTestId('container').firstChild).toBeVisible();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('Renders with children', () => {
|
|
16
|
+
render(<CardSubtitle>Subtitle content</CardSubtitle>);
|
|
17
|
+
|
|
18
|
+
expect(screen.getByText('Subtitle content')).toBeInTheDocument();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test(`Renders with class ${styles.cardSubtitle} by default`, () => {
|
|
22
|
+
render(<CardSubtitle>Subtitle content</CardSubtitle>);
|
|
23
|
+
|
|
24
|
+
expect(screen.getByText('Subtitle content')).toHaveClass(styles.cardSubtitle, { exact: true });
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
test('Renders with id when passed', () => {
|
|
28
|
+
render(<CardSubtitle id="subtitle-id">Subtitle content</CardSubtitle>);
|
|
29
|
+
|
|
30
|
+
expect(screen.getByText('Subtitle content')).toHaveAttribute('id', 'subtitle-id');
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
test('extra props are spread to the root element', () => {
|
|
34
|
+
const testId = 'card-subtitle';
|
|
35
|
+
|
|
36
|
+
render(<CardSubtitle data-testid={testId} />);
|
|
37
|
+
expect(screen.getByTestId(testId)).toBeInTheDocument();
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
test('Matches snapshot without children', () => {
|
|
41
|
+
const { asFragment } = render(<CardSubtitle />);
|
|
42
|
+
expect(asFragment()).toMatchSnapshot();
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
test('Matches snapshot with children', () => {
|
|
46
|
+
const { asFragment } = render(<CardSubtitle>Subtitle content</CardSubtitle>);
|
|
47
|
+
expect(asFragment()).toMatchSnapshot();
|
|
48
|
+
});
|
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
import { render, screen } from '@testing-library/react';
|
|
2
2
|
import { CardTitle } from '../CardTitle';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
test('Renders with custom class when passed', () => {
|
|
5
|
+
render(<CardTitle className="extra-class">text</CardTitle>);
|
|
6
|
+
expect(screen.getByText('text')).toHaveClass('extra-class');
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
test('Does not render with card subtitle by default', () => {
|
|
10
|
+
render(<CardTitle>text</CardTitle>);
|
|
11
|
+
|
|
12
|
+
expect(screen.queryByText('text')?.nextElementSibling).not.toBeInTheDocument();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
test('Renders with card subtitle when subtitle is passed', () => {
|
|
16
|
+
render(<CardTitle subtitle="subtitle content">text</CardTitle>);
|
|
17
|
+
|
|
18
|
+
expect(screen.getByText('subtitle content')).toBeInTheDocument();
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
test('extra props are spread to the root element', () => {
|
|
22
|
+
const testId = 'card-header';
|
|
23
|
+
|
|
24
|
+
render(<CardTitle data-testid={testId} />);
|
|
25
|
+
expect(screen.getByTestId(testId)).toBeInTheDocument();
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
test('Matches snapshot', () => {
|
|
29
|
+
const { asFragment } = render(<CardTitle>text</CardTitle>);
|
|
30
|
+
expect(asFragment()).toMatchSnapshot();
|
|
21
31
|
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Matches snapshot with children 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="pf-v6-c-card__subtitle"
|
|
7
|
+
id=""
|
|
8
|
+
>
|
|
9
|
+
Subtitle content
|
|
10
|
+
</div>
|
|
11
|
+
</DocumentFragment>
|
|
12
|
+
`;
|
|
13
|
+
|
|
14
|
+
exports[`Matches snapshot without children 1`] = `
|
|
15
|
+
<DocumentFragment>
|
|
16
|
+
<div
|
|
17
|
+
class="pf-v6-c-card__subtitle"
|
|
18
|
+
id=""
|
|
19
|
+
/>
|
|
20
|
+
</DocumentFragment>
|
|
21
|
+
`;
|
|
@@ -28,7 +28,20 @@ import PlusIcon from '@patternfly/react-icons/dist/esm/icons/plus-icon';
|
|
|
28
28
|
|
|
29
29
|
Basic cards typically have a `<CardTitle>`, `<CardBody>` and `<CardFooter>`. You may omit these components as needed, but it is recommended to at least include a `<CardBody>` to provide details about the card item.
|
|
30
30
|
|
|
31
|
-
```ts file='./CardBasic.tsx'
|
|
31
|
+
```ts file='./CardBasic.tsx'
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
### Card with subtitle
|
|
35
|
+
|
|
36
|
+
A basic card that also has a subtitle
|
|
37
|
+
|
|
38
|
+
```ts file='./CardSubtitle.tsx' isBeta
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
### Card with subtitle and Actions
|
|
42
|
+
This card demonstrates having an image, action, and subtitle in a single card.
|
|
43
|
+
|
|
44
|
+
```ts file='./CardSubtitleActions.tsx' isBeta
|
|
32
45
|
|
|
33
46
|
```
|
|
34
47
|
|
|
@@ -71,6 +84,8 @@ Select the "actions hasNoOffset" checkbox in the example below to illustrate thi
|
|
|
71
84
|
|
|
72
85
|
```
|
|
73
86
|
|
|
87
|
+
|
|
88
|
+
|
|
74
89
|
### Title inline with images and actions
|
|
75
90
|
|
|
76
91
|
Moving `<CardTitle>` within the `<CardHeader>` will style it inline with any images or actions.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Card, CardTitle, CardBody, CardFooter } from '@patternfly/react-core';
|
|
2
|
+
|
|
3
|
+
export const CardSubtitle: React.FunctionComponent = () => (
|
|
4
|
+
<Card ouiaId="CardSubtitle">
|
|
5
|
+
<CardTitle subtitle="Subtitle">Title</CardTitle>
|
|
6
|
+
<CardBody>Body</CardBody>
|
|
7
|
+
<CardFooter>Footer</CardFooter>
|
|
8
|
+
</Card>
|
|
9
|
+
);
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
Brand,
|
|
4
|
+
Card,
|
|
5
|
+
CardHeader,
|
|
6
|
+
CardTitle,
|
|
7
|
+
CardBody,
|
|
8
|
+
CardFooter,
|
|
9
|
+
Checkbox,
|
|
10
|
+
Dropdown,
|
|
11
|
+
DropdownList,
|
|
12
|
+
DropdownItem,
|
|
13
|
+
MenuToggle,
|
|
14
|
+
MenuToggleElement,
|
|
15
|
+
Divider
|
|
16
|
+
} from '@patternfly/react-core';
|
|
17
|
+
import EllipsisVIcon from '@patternfly/react-icons/dist/esm/icons/ellipsis-v-icon';
|
|
18
|
+
import pfLogo from '../../assets/PF-HorizontalLogo-Color.svg';
|
|
19
|
+
|
|
20
|
+
export const CardWithImageAndActions: React.FunctionComponent = () => {
|
|
21
|
+
const [isOpen, setIsOpen] = useState<boolean>(false);
|
|
22
|
+
const [isChecked, setIsChecked] = useState<boolean>(false);
|
|
23
|
+
const [hasNoOffset, setHasNoOffset] = useState<boolean>(false);
|
|
24
|
+
|
|
25
|
+
const onSelect = () => {
|
|
26
|
+
setIsOpen(!isOpen);
|
|
27
|
+
};
|
|
28
|
+
const onClick = (checked: boolean) => {
|
|
29
|
+
setIsChecked(checked);
|
|
30
|
+
};
|
|
31
|
+
const toggleOffset = (checked: boolean) => {
|
|
32
|
+
setHasNoOffset(checked);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const dropdownItems = (
|
|
36
|
+
<>
|
|
37
|
+
<DropdownItem key="action">Action</DropdownItem>
|
|
38
|
+
{/* Prevent default onClick functionality for example purposes */}
|
|
39
|
+
<DropdownItem key="link" to="#" onClick={(event: any) => event.preventDefault()}>
|
|
40
|
+
Link
|
|
41
|
+
</DropdownItem>
|
|
42
|
+
<DropdownItem key="disabled action" isDisabled>
|
|
43
|
+
Disabled Action
|
|
44
|
+
</DropdownItem>
|
|
45
|
+
<DropdownItem key="disabled link" isDisabled to="#" onClick={(event: any) => event.preventDefault()}>
|
|
46
|
+
Disabled Link
|
|
47
|
+
</DropdownItem>
|
|
48
|
+
<Divider component="li" key="separator" />
|
|
49
|
+
<DropdownItem key="separated action">Separated Action</DropdownItem>
|
|
50
|
+
<DropdownItem key="separated link" to="#" onClick={(event: any) => event.preventDefault()}>
|
|
51
|
+
Separated Link
|
|
52
|
+
</DropdownItem>
|
|
53
|
+
</>
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const headerActions = (
|
|
57
|
+
<>
|
|
58
|
+
<Dropdown
|
|
59
|
+
onSelect={onSelect}
|
|
60
|
+
toggle={(toggleRef: React.Ref<MenuToggleElement>) => (
|
|
61
|
+
<MenuToggle
|
|
62
|
+
ref={toggleRef}
|
|
63
|
+
isExpanded={isOpen}
|
|
64
|
+
onClick={() => setIsOpen(!isOpen)}
|
|
65
|
+
variant="plain"
|
|
66
|
+
aria-label="Card header images and actions example kebab toggle"
|
|
67
|
+
icon={<EllipsisVIcon />}
|
|
68
|
+
/>
|
|
69
|
+
)}
|
|
70
|
+
isOpen={isOpen}
|
|
71
|
+
onOpenChange={(isOpen: boolean) => setIsOpen(isOpen)}
|
|
72
|
+
>
|
|
73
|
+
<DropdownList>{dropdownItems}</DropdownList>
|
|
74
|
+
</Dropdown>
|
|
75
|
+
<Checkbox
|
|
76
|
+
isChecked={isChecked}
|
|
77
|
+
onChange={(_event, checked) => onClick(checked)}
|
|
78
|
+
aria-label="card checkbox example"
|
|
79
|
+
id="check-1"
|
|
80
|
+
name="check1"
|
|
81
|
+
/>
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<>
|
|
87
|
+
<Checkbox
|
|
88
|
+
label="actions hasNoOffset"
|
|
89
|
+
isChecked={hasNoOffset}
|
|
90
|
+
onChange={(_event, checked) => toggleOffset(checked)}
|
|
91
|
+
aria-label="remove actions offset"
|
|
92
|
+
id="toggle-actions-offset"
|
|
93
|
+
name="toggle-actions-offset"
|
|
94
|
+
/>
|
|
95
|
+
<div style={{ marginTop: '15px' }}>
|
|
96
|
+
<Card>
|
|
97
|
+
<CardHeader actions={{ actions: headerActions, hasNoOffset }}>
|
|
98
|
+
<Brand src={pfLogo} alt="PatternFly logo" style={{ width: '300px' }} />
|
|
99
|
+
</CardHeader>
|
|
100
|
+
<CardTitle subtitle="Subtitle">Title</CardTitle>
|
|
101
|
+
<CardBody>Body</CardBody>
|
|
102
|
+
<CardFooter>Footer</CardFooter>
|
|
103
|
+
</Card>
|
|
104
|
+
</div>
|
|
105
|
+
</>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
|
+
import userEvent from '@testing-library/user-event';
|
|
3
|
+
import { ClipboardCopy, ClipboardCopyVariant } from '../ClipboardCopy';
|
|
4
|
+
|
|
5
|
+
// This test file uses the real Truncate component for integration testing, instead of a mock
|
|
6
|
+
|
|
7
|
+
test('Tooltip appears on keyboard focus when using inline-compact variant with truncation', async () => {
|
|
8
|
+
const user = userEvent.setup();
|
|
9
|
+
const longText = 'This is a very long piece of content that should be truncated when the container is too small';
|
|
10
|
+
|
|
11
|
+
render(
|
|
12
|
+
<ClipboardCopy
|
|
13
|
+
variant={ClipboardCopyVariant.inlineCompact}
|
|
14
|
+
truncation={{ maxCharsDisplayed: 20 }}
|
|
15
|
+
data-testid="clipboard-copy"
|
|
16
|
+
>
|
|
17
|
+
{longText}
|
|
18
|
+
</ClipboardCopy>
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
expect(screen.queryByText(longText)).not.toBeInTheDocument();
|
|
22
|
+
expect(screen.queryByRole('tooltip')).not.toBeInTheDocument();
|
|
23
|
+
|
|
24
|
+
await user.tab();
|
|
25
|
+
|
|
26
|
+
const clipboardCopy = screen.getByTestId('clipboard-copy');
|
|
27
|
+
expect(clipboardCopy).toHaveFocus();
|
|
28
|
+
|
|
29
|
+
const tooltip = screen.getByRole('tooltip');
|
|
30
|
+
expect(tooltip).toBeInTheDocument();
|
|
31
|
+
expect(tooltip).toHaveTextContent(longText);
|
|
32
|
+
});
|