@patternfly/react-core 6.5.0-prerelease.1 → 6.5.0-prerelease.11
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 +71 -0
- package/components/package.json +1 -1
- package/deprecated/package.json +1 -1
- package/dist/dynamic/components/AboutModal/package.json +1 -1
- package/dist/dynamic/components/Accordion/package.json +1 -1
- package/dist/dynamic/components/ActionList/package.json +1 -1
- package/dist/dynamic/components/Alert/package.json +1 -1
- package/dist/dynamic/components/Avatar/package.json +1 -1
- package/dist/dynamic/components/BackToTop/package.json +1 -1
- package/dist/dynamic/components/Backdrop/package.json +1 -1
- package/dist/dynamic/components/BackgroundImage/package.json +1 -1
- package/dist/dynamic/components/Badge/package.json +1 -1
- package/dist/dynamic/components/Banner/package.json +1 -1
- package/dist/dynamic/components/Brand/package.json +1 -1
- package/dist/dynamic/components/Breadcrumb/package.json +1 -1
- package/dist/dynamic/components/Button/package.json +1 -1
- package/dist/dynamic/components/CalendarMonth/package.json +1 -1
- package/dist/dynamic/components/Card/package.json +1 -1
- package/dist/dynamic/components/Checkbox/package.json +1 -1
- package/dist/dynamic/components/ClipboardCopy/package.json +1 -1
- package/dist/dynamic/components/CodeBlock/package.json +1 -1
- package/dist/dynamic/components/Compass/package.json +1 -1
- package/dist/dynamic/components/Content/package.json +1 -1
- package/dist/dynamic/components/DataList/package.json +1 -1
- package/dist/dynamic/components/DatePicker/package.json +1 -1
- package/dist/dynamic/components/DescriptionList/package.json +1 -1
- package/dist/dynamic/components/Divider/package.json +1 -1
- package/dist/dynamic/components/Drawer/package.json +1 -1
- package/dist/dynamic/components/Dropdown/package.json +1 -1
- package/dist/dynamic/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/components/EmptyState/package.json +1 -1
- package/dist/dynamic/components/ExpandableSection/package.json +1 -1
- package/dist/dynamic/components/FileUpload/package.json +1 -1
- package/dist/dynamic/components/Form/package.json +1 -1
- package/dist/dynamic/components/FormSelect/package.json +1 -1
- package/dist/dynamic/components/HelperText/package.json +1 -1
- package/dist/dynamic/components/Hint/package.json +1 -1
- package/dist/dynamic/components/Icon/package.json +1 -1
- package/dist/dynamic/components/InputGroup/package.json +1 -1
- package/dist/dynamic/components/JumpLinks/package.json +1 -1
- package/dist/dynamic/components/Label/package.json +1 -1
- package/dist/dynamic/components/List/package.json +1 -1
- package/dist/dynamic/components/LoginPage/package.json +1 -1
- package/dist/dynamic/components/Masthead/package.json +1 -1
- package/dist/dynamic/components/Menu/package.json +1 -1
- package/dist/dynamic/components/MenuToggle/package.json +1 -1
- package/dist/dynamic/components/Modal/package.json +1 -1
- package/dist/dynamic/components/MultipleFileUpload/package.json +1 -1
- package/dist/dynamic/components/Nav/package.json +1 -1
- package/dist/dynamic/components/NotificationBadge/package.json +1 -1
- package/dist/dynamic/components/NotificationDrawer/package.json +1 -1
- package/dist/dynamic/components/NumberInput/package.json +1 -1
- package/dist/dynamic/components/OverflowMenu/package.json +1 -1
- package/dist/dynamic/components/Page/package.json +1 -1
- package/dist/dynamic/components/Pagination/package.json +1 -1
- package/dist/dynamic/components/Panel/package.json +1 -1
- package/dist/dynamic/components/Popover/package.json +1 -1
- package/dist/dynamic/components/Progress/package.json +1 -1
- package/dist/dynamic/components/ProgressStepper/package.json +1 -1
- package/dist/dynamic/components/Radio/package.json +1 -1
- package/dist/dynamic/components/SearchInput/package.json +1 -1
- package/dist/dynamic/components/Select/package.json +1 -1
- package/dist/dynamic/components/Sidebar/package.json +1 -1
- package/dist/dynamic/components/SimpleList/package.json +1 -1
- package/dist/dynamic/components/Skeleton/package.json +1 -1
- package/dist/dynamic/components/SkipToContent/package.json +1 -1
- package/dist/dynamic/components/Slider/package.json +1 -1
- package/dist/dynamic/components/Spinner/package.json +1 -1
- package/dist/dynamic/components/Switch/package.json +1 -1
- package/dist/dynamic/components/Tabs/package.json +1 -1
- package/dist/dynamic/components/TextArea/package.json +1 -1
- package/dist/dynamic/components/TextInput/package.json +1 -1
- package/dist/dynamic/components/TextInputGroup/package.json +1 -1
- package/dist/dynamic/components/TimePicker/package.json +1 -1
- package/dist/dynamic/components/Timestamp/package.json +1 -1
- package/dist/dynamic/components/Title/package.json +1 -1
- package/dist/dynamic/components/ToggleGroup/package.json +1 -1
- package/dist/dynamic/components/Toolbar/package.json +1 -1
- package/dist/dynamic/components/Tooltip/package.json +1 -1
- package/dist/dynamic/components/TreeView/package.json +1 -1
- package/dist/dynamic/components/Truncate/package.json +1 -1
- package/dist/dynamic/components/Wizard/hooks/package.json +1 -1
- package/dist/dynamic/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/Chip/package.json +1 -1
- package/dist/dynamic/deprecated/components/DragDrop/package.json +1 -1
- package/dist/dynamic/deprecated/components/DualListSelector/package.json +1 -1
- package/dist/dynamic/deprecated/components/Modal/package.json +1 -1
- package/dist/dynamic/deprecated/components/Tile/package.json +1 -1
- package/dist/dynamic/deprecated/components/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/AnimationsProvider/package.json +1 -1
- package/dist/dynamic/helpers/FocusTrap/FocusTrap/package.json +1 -1
- package/dist/dynamic/helpers/GenerateId/GenerateId/package.json +1 -1
- package/dist/dynamic/helpers/KeyboardHandler/package.json +1 -1
- package/dist/dynamic/helpers/OUIA/ouia/package.json +1 -1
- package/dist/dynamic/helpers/Popper/Popper/package.json +1 -1
- package/dist/dynamic/helpers/constants/package.json +1 -1
- package/dist/dynamic/helpers/datetimeUtils/package.json +1 -1
- package/dist/dynamic/helpers/fileUtils/package.json +1 -1
- package/dist/dynamic/helpers/htmlConstants/package.json +1 -1
- package/dist/dynamic/helpers/package.json +1 -1
- package/dist/dynamic/helpers/resizeObserver/package.json +1 -1
- package/dist/dynamic/helpers/typeUtils/package.json +1 -1
- package/dist/dynamic/helpers/useInterval/package.json +1 -1
- package/dist/dynamic/helpers/useIsomorphicLayout/package.json +1 -1
- package/dist/dynamic/helpers/useUnmountEffect/package.json +1 -1
- package/dist/dynamic/helpers/util/package.json +1 -1
- package/dist/dynamic/layouts/Bullseye/package.json +1 -1
- package/dist/dynamic/layouts/Flex/package.json +1 -1
- package/dist/dynamic/layouts/Gallery/package.json +1 -1
- package/dist/dynamic/layouts/Grid/package.json +1 -1
- package/dist/dynamic/layouts/Level/package.json +1 -1
- package/dist/dynamic/layouts/Split/package.json +1 -1
- package/dist/dynamic/layouts/Stack/package.json +1 -1
- package/dist/dynamic/styles/package.json +1 -1
- package/dist/esm/components/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.map +1 -1
- package/dist/esm/components/Compass/Compass.js +2 -2
- package/dist/esm/components/Compass/Compass.js.map +1 -1
- 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/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.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +2 -2
- 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/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.map +1 -1
- package/dist/js/components/Compass/Compass.js +1 -1
- package/dist/js/components/Compass/Compass.js.map +1 -1
- 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/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.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +2 -2
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/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/styles/base-no-reset.css +46 -0
- package/dist/styles/base.css +53 -0
- package/dist/umd/assets/{output-COsUhzfR.css → output-CSQR1P9A.css} +20397 -20354
- 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/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 +4 -2
- package/src/components/Compass/__tests__/__snapshots__/Compass.test.tsx.snap +32 -28
- package/src/components/Compass/examples/Compass.md +12 -2
- package/src/components/Compass/examples/CompassDemo.tsx +6 -6
- 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/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 +2 -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/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.5.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.5.0-prerelease.10","private":true}
|
package/layouts/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.5.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-layouts","main":"../dist/js/layouts/index.js","module":"../dist/esm/layouts/index.js","typings":"../dist/esm/layouts/index.d.ts","version":"6.5.0-prerelease.10","private":true}
|
package/next/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.5.0-prerelease.
|
|
1
|
+
{"name":"@patternfly/react-core-next","main":"../dist/js/next/index.js","module":"../dist/esm/next/index.js","typings":"../dist/esm/next/index.d.ts","version":"6.5.0-prerelease.10","private":true}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@patternfly/react-core",
|
|
3
|
-
"version": "6.5.0-prerelease.
|
|
3
|
+
"version": "6.5.0-prerelease.11",
|
|
4
4
|
"description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
|
|
5
5
|
"main": "dist/js/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -46,15 +46,15 @@
|
|
|
46
46
|
"subpaths": "node ../../scripts/exportSubpaths.mjs --config subpaths.config.json"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@patternfly/react-icons": "^6.5.0-prerelease.
|
|
50
|
-
"@patternfly/react-styles": "^6.5.0-prerelease.
|
|
51
|
-
"@patternfly/react-tokens": "^6.5.0-prerelease.
|
|
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.5.0-prerelease.
|
|
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": "7d5d45ce7ff4f022dcce69b3f96d38d283d13242"
|
|
67
67
|
}
|
|
@@ -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
|
+
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Drawer, DrawerContent, DrawerProps } from '../Drawer';
|
|
1
|
+
import { Drawer, DrawerContent, DrawerContentBody, DrawerProps } from '../Drawer';
|
|
2
2
|
import styles from '@patternfly/react-styles/css/components/Compass/compass';
|
|
3
3
|
import { css } from '@patternfly/react-styles';
|
|
4
4
|
|
|
@@ -96,7 +96,9 @@ export const Compass: React.FunctionComponent<CompassProps> = ({
|
|
|
96
96
|
if (hasDrawer) {
|
|
97
97
|
return (
|
|
98
98
|
<Drawer {...drawerProps}>
|
|
99
|
-
<DrawerContent panelContent={drawerContent}>
|
|
99
|
+
<DrawerContent panelContent={drawerContent}>
|
|
100
|
+
<DrawerContentBody>{compassContent}</DrawerContentBody>
|
|
101
|
+
</DrawerContent>
|
|
100
102
|
</Drawer>
|
|
101
103
|
);
|
|
102
104
|
}
|
|
@@ -56,41 +56,45 @@ exports[`Matches the snapshot with drawer 1`] = `
|
|
|
56
56
|
class="pf-v6-c-drawer__content"
|
|
57
57
|
>
|
|
58
58
|
<div
|
|
59
|
-
class="pf-v6-c-
|
|
59
|
+
class="pf-v6-c-drawer__body"
|
|
60
60
|
>
|
|
61
61
|
<div
|
|
62
|
-
class="pf-v6-c-
|
|
62
|
+
class="pf-v6-c-compass"
|
|
63
63
|
>
|
|
64
|
-
<div
|
|
65
|
-
|
|
64
|
+
<div
|
|
65
|
+
class="pf-v6-c-compass__header pf-m-expanded"
|
|
66
|
+
>
|
|
67
|
+
<div>
|
|
68
|
+
Header
|
|
69
|
+
</div>
|
|
66
70
|
</div>
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
<div
|
|
72
|
+
class="pf-v6-c-compass__sidebar pf-m-start pf-m-expanded"
|
|
73
|
+
>
|
|
74
|
+
<div>
|
|
75
|
+
Sidebar start
|
|
76
|
+
</div>
|
|
73
77
|
</div>
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
<div
|
|
79
|
+
class="pf-v6-c-compass__main"
|
|
80
|
+
>
|
|
81
|
+
<div>
|
|
82
|
+
Main content
|
|
83
|
+
</div>
|
|
80
84
|
</div>
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
<div
|
|
86
|
+
class="pf-v6-c-compass__sidebar pf-m-end pf-m-expanded"
|
|
87
|
+
>
|
|
88
|
+
<div>
|
|
89
|
+
Sidebar end
|
|
90
|
+
</div>
|
|
87
91
|
</div>
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
<div
|
|
93
|
+
class="pf-v6-c-compass__footer pf-m-expanded"
|
|
94
|
+
>
|
|
95
|
+
<div>
|
|
96
|
+
Footer
|
|
97
|
+
</div>
|
|
94
98
|
</div>
|
|
95
99
|
</div>
|
|
96
100
|
</div>
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: Compass
|
|
3
3
|
cssPrefix: pf-v6-c-compass
|
|
4
|
-
section:
|
|
4
|
+
section: PatternFly-AI
|
|
5
|
+
subsection: Generative UIs
|
|
5
6
|
beta: true
|
|
6
|
-
propComponents:
|
|
7
|
+
propComponents:
|
|
8
|
+
[
|
|
9
|
+
'Compass',
|
|
10
|
+
'CompassHeader',
|
|
11
|
+
'CompassContent',
|
|
12
|
+
'CompassHero',
|
|
13
|
+
'CompassMainHeader',
|
|
14
|
+
'CompassPanel',
|
|
15
|
+
'CompassMessageBar'
|
|
16
|
+
]
|
|
7
17
|
---
|
|
8
18
|
|
|
9
19
|
import './compass.css';
|
|
@@ -81,33 +81,33 @@ export const CompassBasic: React.FunctionComponent = () => {
|
|
|
81
81
|
|
|
82
82
|
const sidebarContent = (
|
|
83
83
|
<CompassPanel isPill>
|
|
84
|
-
<ActionList isIconList
|
|
84
|
+
<ActionList isIconList isVertical>
|
|
85
85
|
<ActionListGroup>
|
|
86
86
|
<ActionListItem>
|
|
87
87
|
<Tooltip content="Play">
|
|
88
|
-
<Button variant="plain" icon={<PlayIcon />} aria-label="Play" />
|
|
88
|
+
<Button isCircle variant="plain" icon={<PlayIcon />} aria-label="Play" />
|
|
89
89
|
</Tooltip>
|
|
90
90
|
</ActionListItem>
|
|
91
91
|
<ActionListItem>
|
|
92
92
|
<Tooltip content="Add">
|
|
93
|
-
<Button variant="plain" icon={<OutlinedPlusSquare />} aria-label="Add" />
|
|
93
|
+
<Button isCircle variant="plain" icon={<OutlinedPlusSquare />} aria-label="Add" />
|
|
94
94
|
</Tooltip>
|
|
95
95
|
</ActionListItem>
|
|
96
96
|
</ActionListGroup>
|
|
97
97
|
<ActionListItem>
|
|
98
98
|
<Tooltip content="Copy">
|
|
99
|
-
<Button variant="plain" icon={<OutlinedCopy />} aria-label="Copy" />
|
|
99
|
+
<Button isCircle variant="plain" icon={<OutlinedCopy />} aria-label="Copy" />
|
|
100
100
|
</Tooltip>
|
|
101
101
|
</ActionListItem>
|
|
102
102
|
<ActionListGroup>
|
|
103
103
|
<ActionListItem>
|
|
104
104
|
<Tooltip content="Help">
|
|
105
|
-
<Button variant="plain" icon={<OutlinedQuestionCircleIcon />} aria-label="Help" />
|
|
105
|
+
<Button isCircle variant="plain" icon={<OutlinedQuestionCircleIcon />} aria-label="Help" />
|
|
106
106
|
</Tooltip>
|
|
107
107
|
</ActionListItem>
|
|
108
108
|
<ActionListItem>
|
|
109
109
|
<Tooltip content="Second copy">
|
|
110
|
-
<Button variant="plain" icon={<OutlinedCopy />} aria-label="Copy2" />
|
|
110
|
+
<Button isCircle variant="plain" icon={<OutlinedCopy />} aria-label="Copy2" />
|
|
111
111
|
</Tooltip>
|
|
112
112
|
</ActionListItem>
|
|
113
113
|
</ActionListGroup>
|
|
@@ -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={() => {}}>
|