@patternfly/react-core 6.4.1-prerelease.8 → 6.5.0-prerelease.1
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 +12 -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/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/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/Tabs/Tabs.d.ts +2 -0
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +3 -2
- package/dist/esm/components/Tabs/Tabs.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/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/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/Tabs/Tabs.d.ts +2 -0
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +3 -2
- package/dist/js/components/Tabs/Tabs.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 +51 -0
- package/dist/styles/base.css +51 -0
- package/dist/umd/assets/{output-CyRsIwqr.css → output-COsUhzfR.css} +17583 -17291
- package/dist/umd/react-core.min.js +2 -2
- 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/Alert/examples/Alert.md +26 -275
- package/src/components/Alert/examples/AlertCustomIcons.tsx +17 -0
- package/src/components/Alert/examples/AlertExpandable.tsx +36 -0
- package/src/components/Alert/examples/AlertInlineVariants.tsx +12 -0
- package/src/components/Alert/examples/AlertInlineVariations.tsx +45 -0
- package/src/components/Alert/examples/AlertPlainInlineVariants.tsx +12 -0
- package/src/components/Alert/examples/AlertPlainInlineVariations.tsx +7 -0
- package/src/components/Alert/examples/AlertStaticLiveRegion.tsx +29 -0
- package/src/components/Alert/examples/AlertTimeout.tsx +45 -0
- package/src/components/Alert/examples/AlertTruncated.tsx +28 -0
- package/src/components/Alert/examples/AlertVariants.tsx +12 -0
- package/src/components/Alert/examples/AlertVariations.tsx +43 -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/Compass/Compass.tsx +107 -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 +104 -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 +38 -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/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/Tabs/Tabs.tsx +5 -0
- package/src/components/index.ts +1 -0
package/helpers/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@patternfly/react-core-helpers","main":"../dist/js/helpers/index.js","module":"../dist/esm/helpers/index.js","typings":"../dist/esm/helpers/index.d.ts","version":"6.
|
|
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.0","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.0","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.0","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.1",
|
|
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.1",
|
|
50
|
+
"@patternfly/react-styles": "^6.5.0-prerelease.1",
|
|
51
|
+
"@patternfly/react-tokens": "^6.5.0-prerelease.1",
|
|
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.11",
|
|
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": "2409ed1f743731adde61263237e3613d75d50518"
|
|
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
|
+
);
|
|
@@ -33,17 +33,8 @@ PatternFly supports several alert variants for different scenarios. Each variant
|
|
|
33
33
|
| Warning | Use to indicate that a non-critical error has occurred |
|
|
34
34
|
| Danger | Use to indicate that a critical or blocking error has occurred |
|
|
35
35
|
|
|
36
|
-
```ts
|
|
37
|
-
|
|
38
|
-
import { Alert } from '@patternfly/react-core';
|
|
39
|
-
|
|
40
|
-
<Fragment>
|
|
41
|
-
<Alert title="Custom alert title" ouiaId="CustomAlert" />
|
|
42
|
-
<Alert variant="info" title="Info alert title" ouiaId="InfoAlert" />
|
|
43
|
-
<Alert variant="success" title="Success alert title" ouiaId="SuccessAlert" />
|
|
44
|
-
<Alert variant="warning" title="Warning alert title" ouiaId="WarningAlert" />
|
|
45
|
-
<Alert variant="danger" title="Danger alert title" ouiaId="DangerAlert" />
|
|
46
|
-
</Fragment>;
|
|
36
|
+
```ts file = "AlertVariants.tsx"
|
|
37
|
+
|
|
47
38
|
```
|
|
48
39
|
|
|
49
40
|
### Alert variations
|
|
@@ -60,99 +51,16 @@ PatternFly supports several properties and variations that can be used to add ex
|
|
|
60
51
|
- If there is not a description passed via `children` prop, then the `component` prop should be set to a non-heading element such as a `span` or `div`.
|
|
61
52
|
- If there is a description passed via `children` prop, then the `component` prop should be a heading element. Headings should be ordered by their level and heading levels should not be skipped. For example, a heading of an `h2` level should not be followed directly by an `h4`.
|
|
62
53
|
|
|
63
|
-
```ts
|
|
64
|
-
|
|
65
|
-
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
66
|
-
|
|
67
|
-
<Fragment>
|
|
68
|
-
<Alert
|
|
69
|
-
variant="success"
|
|
70
|
-
title="Success alert title"
|
|
71
|
-
actionLinks={
|
|
72
|
-
<Fragment>
|
|
73
|
-
<AlertActionLink component="a" href="#">
|
|
74
|
-
View details
|
|
75
|
-
</AlertActionLink>
|
|
76
|
-
<AlertActionLink // eslint-disable-next-line no-console
|
|
77
|
-
onClick={() => console.log('Clicked on Ignore')}
|
|
78
|
-
>
|
|
79
|
-
Ignore
|
|
80
|
-
</AlertActionLink>
|
|
81
|
-
</Fragment>
|
|
82
|
-
}
|
|
83
|
-
>
|
|
84
|
-
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
85
|
-
</Alert>
|
|
86
|
-
<Alert variant="success" title="Success alert title">
|
|
87
|
-
<p>
|
|
88
|
-
Success alert description. This should tell the user more information about the alert.{' '}
|
|
89
|
-
<a href="#">This is a link.</a>
|
|
90
|
-
</p>
|
|
91
|
-
</Alert>
|
|
92
|
-
<Alert
|
|
93
|
-
variant="success"
|
|
94
|
-
title="Success alert title"
|
|
95
|
-
// eslint-disable-next-line no-console
|
|
96
|
-
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
97
|
-
>
|
|
98
|
-
<p>Short alert description.</p>
|
|
99
|
-
</Alert>
|
|
100
|
-
<Alert variant="success" title="div success alert title" component="div" />
|
|
101
|
-
<Alert variant="success" title="h6 Success alert title" component="h6">
|
|
102
|
-
<p>Short alert description.</p>
|
|
103
|
-
</Alert>
|
|
104
|
-
</Fragment>;
|
|
54
|
+
```ts file = "AlertVariations.tsx"
|
|
55
|
+
|
|
105
56
|
```
|
|
106
57
|
|
|
107
58
|
### Alert timeout
|
|
108
59
|
|
|
109
60
|
Use the `timeout` property to automatically dismiss an alert after a period of time. If set to `true`, the `timeout` will be 8000 milliseconds. Provide a specific value to dismiss the alert after a different number of milliseconds.
|
|
110
61
|
|
|
111
|
-
```ts
|
|
112
|
-
|
|
113
|
-
import { Alert, AlertActionLink, AlertGroup, Button } from '@patternfly/react-core';
|
|
114
|
-
|
|
115
|
-
const AlertTimeout: React.FunctionComponent = () => {
|
|
116
|
-
const [alerts, setAlerts] = useState<React.ReactNode[]>([]);
|
|
117
|
-
const [newAlertKey, setNewAlertKey] = useState<number>(0);
|
|
118
|
-
|
|
119
|
-
const onClick = () => {
|
|
120
|
-
const timeout = 8000;
|
|
121
|
-
setNewAlertKey((key) => key + 1);
|
|
122
|
-
setAlerts((prevAlerts) => {
|
|
123
|
-
return [
|
|
124
|
-
<Alert
|
|
125
|
-
title="Default timeout Alert"
|
|
126
|
-
timeout={timeout}
|
|
127
|
-
actionLinks={
|
|
128
|
-
<Fragment>
|
|
129
|
-
<AlertActionLink component="a" href="#">
|
|
130
|
-
View details
|
|
131
|
-
</AlertActionLink>
|
|
132
|
-
<AlertActionLink // eslint-disable-next-line no-console
|
|
133
|
-
onClick={() => console.log('Clicked on Ignore')}
|
|
134
|
-
>
|
|
135
|
-
Ignore
|
|
136
|
-
</AlertActionLink>
|
|
137
|
-
</Fragment>
|
|
138
|
-
}
|
|
139
|
-
key={newAlertKey}
|
|
140
|
-
>
|
|
141
|
-
This alert will dismiss after {`${timeout / 1000} seconds`}
|
|
142
|
-
</Alert>, ...prevAlerts
|
|
143
|
-
];
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
return (
|
|
148
|
-
<Fragment>
|
|
149
|
-
<Button variant="secondary" onClick={onClick}>
|
|
150
|
-
Add alert
|
|
151
|
-
</Button>
|
|
152
|
-
<AlertGroup hasAnimations isLiveRegion>{alerts}</AlertGroup>
|
|
153
|
-
</Fragment>
|
|
154
|
-
);
|
|
155
|
-
};
|
|
62
|
+
```ts file = "AlertTimeout.tsx"
|
|
63
|
+
|
|
156
64
|
```
|
|
157
65
|
|
|
158
66
|
### Expandable alerts
|
|
@@ -163,188 +71,56 @@ It is not recommended to use an expandable alert with a `timeout` in a [toast al
|
|
|
163
71
|
|
|
164
72
|
See the [toast alert considerations](/components/alert/accessibility#toast-alerts) section of the alert accessibility documentation to understand the accessibility risks associated with using toast alerts.
|
|
165
73
|
|
|
166
|
-
```ts
|
|
167
|
-
|
|
168
|
-
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
169
|
-
|
|
170
|
-
<Fragment>
|
|
171
|
-
<Alert
|
|
172
|
-
isExpandable
|
|
173
|
-
variant="success"
|
|
174
|
-
title="Success alert title"
|
|
175
|
-
// eslint-disable-next-line no-console
|
|
176
|
-
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
177
|
-
>
|
|
178
|
-
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
179
|
-
</Alert>
|
|
180
|
-
<Alert
|
|
181
|
-
isExpandable
|
|
182
|
-
isInline
|
|
183
|
-
variant="success"
|
|
184
|
-
title="Success alert title"
|
|
185
|
-
actionLinks={
|
|
186
|
-
<Fragment>
|
|
187
|
-
<AlertActionLink component="a" href="#">
|
|
188
|
-
View details
|
|
189
|
-
</AlertActionLink>
|
|
190
|
-
<AlertActionLink // eslint-disable-next-line no-console
|
|
191
|
-
onClick={() => console.log('Clicked on Ignore')}
|
|
192
|
-
>
|
|
193
|
-
Ignore
|
|
194
|
-
</AlertActionLink>
|
|
195
|
-
</Fragment>
|
|
196
|
-
}
|
|
197
|
-
>
|
|
198
|
-
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
199
|
-
</Alert>
|
|
200
|
-
</Fragment>;
|
|
74
|
+
```ts file = "AlertExpandable.tsx"
|
|
75
|
+
|
|
201
76
|
```
|
|
202
77
|
|
|
203
78
|
### Truncated alerts
|
|
204
79
|
|
|
205
80
|
Use the `truncateTitle` property to shorten a long `title`. Set `truncateTitle` equal to a number (passed in as `{n}`) to reduce the number of lines of text in the alert's `title`. Users may hover over or tab to a truncated `title` to see the full message in a tooltip.
|
|
206
81
|
|
|
207
|
-
```ts
|
|
208
|
-
|
|
209
|
-
import { Alert } from '@patternfly/react-core';
|
|
210
|
-
|
|
211
|
-
<Fragment>
|
|
212
|
-
<Alert
|
|
213
|
-
variant="info"
|
|
214
|
-
truncateTitle={1}
|
|
215
|
-
title={`
|
|
216
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.
|
|
217
|
-
`}
|
|
218
|
-
/>
|
|
219
|
-
<Alert
|
|
220
|
-
variant="warning"
|
|
221
|
-
truncateTitle={2}
|
|
222
|
-
title={`
|
|
223
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.
|
|
224
|
-
`}
|
|
225
|
-
/>
|
|
226
|
-
<Alert
|
|
227
|
-
variant="danger"
|
|
228
|
-
truncateTitle={3}
|
|
229
|
-
title={`
|
|
230
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur pellentesque neque cursus enim fringilla tincidunt. Proin lobortis aliquam dictum. Nam vel ullamcorper nulla, nec blandit dolor. Vivamus pellentesque neque justo, nec accumsan nulla rhoncus id. Suspendisse mollis, tortor quis faucibus volutpat, sem leo fringilla turpis, ac lacinia augue metus in nulla. Cras vestibulum lacinia orci. Pellentesque sodales consequat interdum. Sed porttitor tincidunt metus nec iaculis. Pellentesque non commodo justo. Morbi feugiat rhoncus neque, vitae facilisis diam aliquam nec. Sed dapibus vitae quam at tristique. Nunc vel commodo mi. Mauris et rhoncus leo.
|
|
231
|
-
`}
|
|
232
|
-
/>
|
|
233
|
-
</Fragment>;
|
|
82
|
+
```ts file = "AlertTruncated.tsx"
|
|
83
|
+
|
|
234
84
|
```
|
|
235
85
|
|
|
236
86
|
### Custom icons
|
|
237
87
|
|
|
238
88
|
Use the `customIcon` property to replace a default alert icon with a custom icon.
|
|
239
89
|
|
|
240
|
-
```ts
|
|
241
|
-
import { Fragment } from 'react';
|
|
242
|
-
import { Alert } from '@patternfly/react-core';
|
|
243
|
-
import UsersIcon from '@patternfly/react-icons/dist/esm/icons/users-icon';
|
|
244
|
-
import BoxIcon from '@patternfly/react-icons/dist/esm/icons/box-icon';
|
|
245
|
-
import DatabaseIcon from '@patternfly/react-icons/dist/esm/icons/database-icon';
|
|
246
|
-
import ServerIcon from '@patternfly/react-icons/dist/esm/icons/server-icon';
|
|
247
|
-
import LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon';
|
|
90
|
+
```ts file = "AlertCustomIcons.tsx"
|
|
248
91
|
|
|
249
|
-
<Fragment>
|
|
250
|
-
<Alert customIcon={<UsersIcon />} title="Default alert title" />
|
|
251
|
-
<Alert customIcon={<BoxIcon />} variant="info" title="Info alert title" />
|
|
252
|
-
<Alert customIcon={<DatabaseIcon />} variant="success" title="Success alert title" />
|
|
253
|
-
<Alert customIcon={<ServerIcon />} variant="warning" title="Warning alert title" />
|
|
254
|
-
<Alert customIcon={<LaptopIcon />} variant="danger" title="Danger alert title" />
|
|
255
|
-
</Fragment>;
|
|
256
92
|
```
|
|
257
93
|
|
|
258
94
|
### Inline alerts variants
|
|
259
95
|
|
|
260
96
|
Use inline alerts to display an alert inline with content. All alert variants may use the `isInline` property to position alerts in content-heavy areas, such as within forms, wizards, or drawers.
|
|
261
97
|
|
|
262
|
-
```ts
|
|
263
|
-
|
|
264
|
-
import { Alert } from '@patternfly/react-core';
|
|
265
|
-
<Fragment>
|
|
266
|
-
<Alert variant="custom" isInline title="Custom inline alert title" />
|
|
267
|
-
<Alert variant="info" isInline title="Info inline alert title" />
|
|
268
|
-
<Alert variant="success" isInline title="Success inline alert title" />
|
|
269
|
-
<Alert variant="warning" isInline title="Warning inline alert title" />
|
|
270
|
-
<Alert variant="danger" isInline title="Danger inline alert title" />
|
|
271
|
-
</Fragment>;
|
|
98
|
+
```ts file = "AlertInlineVariants.tsx"
|
|
99
|
+
|
|
272
100
|
```
|
|
273
101
|
|
|
274
102
|
### Inline alert variations
|
|
275
103
|
|
|
276
104
|
All general alert variations can use the `isInline` property to apply inline styling.
|
|
277
105
|
|
|
278
|
-
```ts
|
|
279
|
-
|
|
280
|
-
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
281
|
-
<Fragment>
|
|
282
|
-
<Alert
|
|
283
|
-
isInline
|
|
284
|
-
variant="success"
|
|
285
|
-
title="Success alert title"
|
|
286
|
-
actionLinks={
|
|
287
|
-
<Fragment>
|
|
288
|
-
<AlertActionLink component="a" href="#">
|
|
289
|
-
View details
|
|
290
|
-
</AlertActionLink>
|
|
291
|
-
<AlertActionLink // eslint-disable-next-line no-console
|
|
292
|
-
onClick={() => console.log('Clicked on Ignore')}
|
|
293
|
-
>
|
|
294
|
-
Ignore
|
|
295
|
-
</AlertActionLink>
|
|
296
|
-
</Fragment>
|
|
297
|
-
}
|
|
298
|
-
>
|
|
299
|
-
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
300
|
-
</Alert>
|
|
301
|
-
<Alert isInline variant="success" title="Success alert title">
|
|
302
|
-
<p>
|
|
303
|
-
Success alert description. This should tell the user more information about the alert.{' '}
|
|
304
|
-
<a href="#">This is a link.</a>
|
|
305
|
-
</p>
|
|
306
|
-
</Alert>
|
|
307
|
-
<Alert
|
|
308
|
-
isInline
|
|
309
|
-
variant="success"
|
|
310
|
-
title="Success alert title"
|
|
311
|
-
// eslint-disable-next-line no-console
|
|
312
|
-
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
313
|
-
>
|
|
314
|
-
<p>Short alert description.</p>
|
|
315
|
-
</Alert>
|
|
316
|
-
<Alert isInline variant="success" title="div success alert title" component="div" />
|
|
317
|
-
<Alert isInline variant="success" title="h6 Success alert title" component="h6">
|
|
318
|
-
<p>Short alert description.</p>
|
|
319
|
-
</Alert>
|
|
320
|
-
</Fragment>;
|
|
106
|
+
```ts file = "AlertInlineVariations.tsx"
|
|
107
|
+
|
|
321
108
|
```
|
|
322
109
|
|
|
323
110
|
### Plain inline alert variants
|
|
324
111
|
|
|
325
112
|
Use the `isPlain` property to make any inline alert plain. Plain styling removes the colored background but keeps colored text and icons.
|
|
326
113
|
|
|
327
|
-
```ts
|
|
328
|
-
|
|
329
|
-
import { Alert } from '@patternfly/react-core';
|
|
330
|
-
<Fragment>
|
|
331
|
-
<Alert variant="custom" isInline isPlain title="Custom inline alert title" />
|
|
332
|
-
<Alert variant="info" isInline isPlain title="Info inline alert title" />
|
|
333
|
-
<Alert variant="success" isInline isPlain title="Success inline alert title" />
|
|
334
|
-
<Alert variant="warning" isInline isPlain title="Warning inline alert title" />
|
|
335
|
-
<Alert variant="danger" isInline isPlain title="Danger inline alert title" />
|
|
336
|
-
</Fragment>;
|
|
114
|
+
```ts file = "AlertPlainInlineVariants.tsx"
|
|
115
|
+
|
|
337
116
|
```
|
|
338
117
|
|
|
339
118
|
### Plain inline alert variations
|
|
340
119
|
|
|
341
120
|
It is not recommended to use a plain inline alert with `actionClose` nor `actionLinks` because these alerts are non-dismissible and should persist until the error or action related to the alert is resolved.
|
|
342
121
|
|
|
343
|
-
```ts
|
|
344
|
-
|
|
345
|
-
<Alert isInline isPlain variant="success" title="Success alert title">
|
|
346
|
-
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
347
|
-
</Alert>;
|
|
122
|
+
```ts file = "AlertPlainInlineVariations.tsx"
|
|
123
|
+
|
|
348
124
|
```
|
|
349
125
|
|
|
350
126
|
### Static live region alerts
|
|
@@ -353,33 +129,8 @@ Live region alerts allow you to expose dynamic content changes in a way that can
|
|
|
353
129
|
|
|
354
130
|
By default, `isLiveRegion`alerts are static.
|
|
355
131
|
|
|
356
|
-
```ts
|
|
357
|
-
|
|
358
|
-
import { Alert, AlertActionCloseButton } from '@patternfly/react-core';
|
|
359
|
-
|
|
360
|
-
<Fragment>
|
|
361
|
-
<Alert
|
|
362
|
-
isLiveRegion
|
|
363
|
-
variant="info"
|
|
364
|
-
title="Default live region configuration"
|
|
365
|
-
// eslint-disable-next-line no-console
|
|
366
|
-
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
367
|
-
>
|
|
368
|
-
This alert uses the recommended <code>isLiveRegion</code> prop to automatically set ARIA attributes and CSS classes.
|
|
369
|
-
</Alert>
|
|
370
|
-
<Alert
|
|
371
|
-
aria-live="assertive"
|
|
372
|
-
aria-relevant="additions text"
|
|
373
|
-
aria-atomic="true"
|
|
374
|
-
variant="info"
|
|
375
|
-
title="Customized live region"
|
|
376
|
-
// eslint-disable-next-line no-console
|
|
377
|
-
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
378
|
-
>
|
|
379
|
-
You can alternatively omit the <code>isLiveRegion</code> prop to specify ARIA attributes and CSS manually on the
|
|
380
|
-
containing element.
|
|
381
|
-
</Alert>
|
|
382
|
-
</Fragment>;
|
|
132
|
+
```ts file = "AlertStaticLiveRegion.tsx"
|
|
133
|
+
|
|
383
134
|
```
|
|
384
135
|
|
|
385
136
|
### Dynamic live region alerts
|
|
@@ -418,7 +169,7 @@ Dynamic alerts that are generated after the page initially loads must be appende
|
|
|
418
169
|
|
|
419
170
|
All alert group variants may combine multiple [alert variants](/components/alert) For example, the following static inline alert group includes one "success" alert and one "info" alert.
|
|
420
171
|
|
|
421
|
-
```ts file="
|
|
172
|
+
```ts file="AlertGroupStatic.tsx"
|
|
422
173
|
|
|
423
174
|
```
|
|
424
175
|
|
|
@@ -428,7 +179,7 @@ Toast alert groups are created by passing in the `isToast` and `isLiveRegion` pr
|
|
|
428
179
|
|
|
429
180
|
Click the buttons in the example below to add alerts to a toast group.
|
|
430
181
|
|
|
431
|
-
```ts file="
|
|
182
|
+
```ts file="AlertGroupToast.tsx"
|
|
432
183
|
|
|
433
184
|
```
|
|
434
185
|
|
|
@@ -452,7 +203,7 @@ The following example shows how alerts can be triggered by an asynchronous event
|
|
|
452
203
|
|
|
453
204
|
See the [alert accessibility tab](/components/alert/accessibility) for more information on customizing this behavior.
|
|
454
205
|
|
|
455
|
-
```ts file="
|
|
206
|
+
```ts file="AlertGroupAsync.tsx"
|
|
456
207
|
|
|
457
208
|
```
|
|
458
209
|
|
|
@@ -460,7 +211,7 @@ See the [alert accessibility tab](/components/alert/accessibility) for more info
|
|
|
460
211
|
|
|
461
212
|
Click the buttons in the example below to add dynamic alerts to a group.
|
|
462
213
|
|
|
463
|
-
```ts file="
|
|
214
|
+
```ts file="AlertGroupSingularDynamic.tsx"
|
|
464
215
|
|
|
465
216
|
```
|
|
466
217
|
|
|
@@ -476,6 +227,6 @@ In the following example, there can be a maximum of 4 alerts shown at once.
|
|
|
476
227
|
|
|
477
228
|
You may add multiple alerts to an alert group at once. Click the "add alert collection" button in the example below to add a batch of 3 toast alerts to a group.
|
|
478
229
|
|
|
479
|
-
```ts file="
|
|
230
|
+
```ts file="AlertGroupMultipleDynamic.tsx"
|
|
480
231
|
|
|
481
232
|
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Alert } from '@patternfly/react-core';
|
|
3
|
+
import UsersIcon from '@patternfly/react-icons/dist/esm/icons/users-icon';
|
|
4
|
+
import BoxIcon from '@patternfly/react-icons/dist/esm/icons/box-icon';
|
|
5
|
+
import DatabaseIcon from '@patternfly/react-icons/dist/esm/icons/database-icon';
|
|
6
|
+
import ServerIcon from '@patternfly/react-icons/dist/esm/icons/server-icon';
|
|
7
|
+
import LaptopIcon from '@patternfly/react-icons/dist/esm/icons/laptop-icon';
|
|
8
|
+
|
|
9
|
+
export const AlertCustomIcons: React.FunctionComponent = () => (
|
|
10
|
+
<Fragment>
|
|
11
|
+
<Alert customIcon={<UsersIcon />} title="Default alert title" />
|
|
12
|
+
<Alert customIcon={<BoxIcon />} variant="info" title="Info alert title" />
|
|
13
|
+
<Alert customIcon={<DatabaseIcon />} variant="success" title="Success alert title" />
|
|
14
|
+
<Alert customIcon={<ServerIcon />} variant="warning" title="Warning alert title" />
|
|
15
|
+
<Alert customIcon={<LaptopIcon />} variant="danger" title="Danger alert title" />
|
|
16
|
+
</Fragment>
|
|
17
|
+
);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Alert, AlertActionCloseButton, AlertActionLink } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const AlertExpandable: React.FunctionComponent = () => (
|
|
5
|
+
<Fragment>
|
|
6
|
+
<Alert
|
|
7
|
+
isExpandable
|
|
8
|
+
variant="success"
|
|
9
|
+
title="Success alert title"
|
|
10
|
+
// eslint-disable-next-line no-console
|
|
11
|
+
actionClose={<AlertActionCloseButton onClose={() => console.log('Clicked the close button')} />}
|
|
12
|
+
>
|
|
13
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
14
|
+
</Alert>
|
|
15
|
+
<Alert
|
|
16
|
+
isExpandable
|
|
17
|
+
isInline
|
|
18
|
+
variant="success"
|
|
19
|
+
title="Success alert title"
|
|
20
|
+
actionLinks={
|
|
21
|
+
<Fragment>
|
|
22
|
+
<AlertActionLink component="a" href="#">
|
|
23
|
+
View details
|
|
24
|
+
</AlertActionLink>
|
|
25
|
+
<AlertActionLink // eslint-disable-next-line no-console
|
|
26
|
+
onClick={() => console.log('Clicked on Ignore')}
|
|
27
|
+
>
|
|
28
|
+
Ignore
|
|
29
|
+
</AlertActionLink>
|
|
30
|
+
</Fragment>
|
|
31
|
+
}
|
|
32
|
+
>
|
|
33
|
+
<p>Success alert description. This should tell the user more information about the alert.</p>
|
|
34
|
+
</Alert>
|
|
35
|
+
</Fragment>
|
|
36
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Alert } from '@patternfly/react-core';
|
|
3
|
+
|
|
4
|
+
export const AlertInlineVariants: React.FunctionComponent = () => (
|
|
5
|
+
<Fragment>
|
|
6
|
+
<Alert variant="custom" isInline title="Custom inline alert title" />
|
|
7
|
+
<Alert variant="info" isInline title="Info inline alert title" />
|
|
8
|
+
<Alert variant="success" isInline title="Success inline alert title" />
|
|
9
|
+
<Alert variant="warning" isInline title="Warning inline alert title" />
|
|
10
|
+
<Alert variant="danger" isInline title="Danger inline alert title" />
|
|
11
|
+
</Fragment>
|
|
12
|
+
);
|