@patternfly/react-core 6.5.0-prerelease.21 → 6.5.0-prerelease.24
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 +17 -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/Hero/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/Compass/Compass.d.ts +5 -3
- package/dist/esm/components/Compass/Compass.d.ts.map +1 -1
- package/dist/esm/components/Compass/Compass.js +3 -3
- package/dist/esm/components/Compass/Compass.js.map +1 -1
- package/dist/esm/components/Compass/CompassContent.d.ts +1 -1
- package/dist/esm/components/Compass/CompassContent.js +1 -1
- package/dist/esm/components/Compass/CompassContent.js.map +1 -1
- package/dist/esm/components/Compass/CompassMainHeader.d.ts +4 -4
- package/dist/esm/components/Compass/CompassMainHeaderContent.d.ts +2 -2
- package/dist/esm/components/Compass/CompassMainHeaderTitle.d.ts +2 -2
- package/dist/esm/components/Compass/CompassMainHeaderToolbar.d.ts +2 -2
- package/dist/esm/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js +7 -1
- package/dist/esm/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/esm/components/Form/FormGroup.d.ts.map +1 -1
- package/dist/esm/components/Form/FormGroup.js +1 -1
- package/dist/esm/components/Form/FormGroup.js.map +1 -1
- package/dist/esm/components/Masthead/Masthead.d.ts +2 -0
- package/dist/esm/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/esm/components/Masthead/Masthead.js +2 -2
- package/dist/esm/components/Masthead/Masthead.js.map +1 -1
- package/dist/esm/components/Nav/Nav.d.ts +2 -2
- package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
- package/dist/esm/components/Nav/Nav.js +1 -1
- package/dist/esm/components/Nav/Nav.js.map +1 -1
- package/dist/esm/components/Nav/NavItem.d.ts +5 -1
- package/dist/esm/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavItem.js +8 -6
- package/dist/esm/components/Nav/NavItem.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts +2 -0
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +3 -3
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +2 -2
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Wizard/WizardNavInternal.js +3 -3
- package/dist/esm/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/js/components/Compass/Compass.d.ts +5 -3
- package/dist/js/components/Compass/Compass.d.ts.map +1 -1
- package/dist/js/components/Compass/Compass.js +3 -3
- package/dist/js/components/Compass/Compass.js.map +1 -1
- package/dist/js/components/Compass/CompassContent.d.ts +1 -1
- package/dist/js/components/Compass/CompassContent.js +1 -1
- package/dist/js/components/Compass/CompassContent.js.map +1 -1
- package/dist/js/components/Compass/CompassMainHeader.d.ts +4 -4
- package/dist/js/components/Compass/CompassMainHeaderContent.d.ts +2 -2
- package/dist/js/components/Compass/CompassMainHeaderTitle.d.ts +2 -2
- package/dist/js/components/Compass/CompassMainHeaderToolbar.d.ts +2 -2
- package/dist/js/components/Drawer/DrawerPanelContent.d.ts.map +1 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js +7 -1
- package/dist/js/components/Drawer/DrawerPanelContent.js.map +1 -1
- package/dist/js/components/Form/FormGroup.d.ts.map +1 -1
- package/dist/js/components/Form/FormGroup.js +1 -1
- package/dist/js/components/Form/FormGroup.js.map +1 -1
- package/dist/js/components/Masthead/Masthead.d.ts +2 -0
- package/dist/js/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/js/components/Masthead/Masthead.js +2 -2
- package/dist/js/components/Masthead/Masthead.js.map +1 -1
- package/dist/js/components/Nav/Nav.d.ts +2 -2
- package/dist/js/components/Nav/Nav.d.ts.map +1 -1
- package/dist/js/components/Nav/Nav.js +1 -1
- package/dist/js/components/Nav/Nav.js.map +1 -1
- package/dist/js/components/Nav/NavItem.d.ts +5 -1
- package/dist/js/components/Nav/NavItem.d.ts.map +1 -1
- package/dist/js/components/Nav/NavItem.js +7 -6
- package/dist/js/components/Nav/NavItem.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +2 -0
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +3 -3
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts +2 -0
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +2 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Wizard/WizardNavInternal.js +3 -3
- package/dist/js/components/Wizard/WizardNavInternal.js.map +1 -1
- package/dist/umd/assets/{output-Bhl00hr4.css → output-BbsSnXfK.css} +15864 -15641
- package/dist/umd/react-core.min.js +5 -5
- package/helpers/package.json +1 -1
- package/layouts/package.json +1 -1
- package/next/package.json +1 -1
- package/package.json +7 -7
- package/src/components/Compass/Compass.tsx +46 -30
- package/src/components/Compass/CompassContent.tsx +2 -2
- package/src/components/Compass/CompassMainHeader.tsx +4 -4
- package/src/components/Compass/CompassMainHeaderContent.tsx +2 -2
- package/src/components/Compass/CompassMainHeaderTitle.tsx +2 -2
- package/src/components/Compass/CompassMainHeaderToolbar.tsx +2 -2
- package/src/components/Compass/__tests__/Compass.test.tsx +10 -0
- package/src/components/Compass/__tests__/__snapshots__/Compass.test.tsx.snap +1 -1
- package/src/components/Compass/__tests__/__snapshots__/CompassContent.test.tsx.snap +1 -1
- package/src/components/Compass/examples/Compass.md +16 -15
- package/src/components/Compass/examples/CompassDockLayout.tsx +25 -0
- package/src/components/Compass/examples/compass.css +16 -4
- package/src/components/Drawer/DrawerPanelContent.tsx +7 -0
- package/src/components/Drawer/__tests__/DrawerPanelContent.test.tsx +20 -0
- package/src/components/Drawer/__tests__/Generated/__snapshots__/DrawerPanelContent.test.tsx.snap +1 -0
- package/src/components/Drawer/__tests__/__snapshots__/Drawer.test.tsx.snap +2 -0
- package/src/components/Drawer/examples/Drawer.md +1 -1
- package/src/components/Drawer/examples/DrawerAdditionalSectionAboveContent.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBasic.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBasicInline.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBasicPill.tsx +1 -1
- package/src/components/Drawer/examples/DrawerBreakpoint.tsx +1 -1
- package/src/components/Drawer/examples/DrawerInlinePanelEnd.tsx +1 -1
- package/src/components/Drawer/examples/DrawerInlinePanelStart.tsx +1 -1
- package/src/components/Drawer/examples/DrawerModifiedContentPadding.tsx +1 -1
- package/src/components/Drawer/examples/DrawerModifiedPanelPadding.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPanelBottom.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPanelEnd.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPanelStart.tsx +1 -1
- package/src/components/Drawer/examples/DrawerPillInline.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableAtEnd.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableAtStart.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableOnBottom.tsx +1 -1
- package/src/components/Drawer/examples/DrawerResizableOnInline.tsx +1 -1
- package/src/components/Drawer/examples/DrawerStatic.tsx +1 -1
- package/src/components/Form/FormGroup.tsx +1 -2
- package/src/components/Form/__tests__/__snapshots__/FormGroup.test.tsx.snap +1 -1
- package/src/components/LoginPage/__tests__/__snapshots__/LoginForm.test.tsx.snap +6 -6
- package/src/components/Masthead/Masthead.tsx +4 -0
- package/src/components/Masthead/__tests__/Masthead.test.tsx +25 -1
- package/src/components/Nav/Nav.tsx +3 -2
- package/src/components/Nav/NavItem.tsx +27 -3
- package/src/components/Nav/__tests__/Nav.test.tsx +15 -0
- package/src/components/Page/Page.tsx +5 -1
- package/src/components/Page/__tests__/Page.test.tsx +17 -0
- package/src/components/Toolbar/Toolbar.tsx +4 -0
- package/src/components/Toolbar/__tests__/Toolbar.test.tsx +34 -1
- package/src/components/Wizard/WizardNavInternal.tsx +3 -3
- package/src/components/Wizard/__tests__/Wizard.test.tsx +39 -0
- package/src/demos/Compass/Compass.md +40 -0
- package/src/demos/Compass/examples/CompassDockDemo.tsx +215 -0
- package/src/demos/Page.md +12 -1
- package/src/demos/assets/PF-IconLogo-color.svg +17 -0
- package/src/demos/examples/Page/PageDockedNav.tsx +259 -0
- package/src/layouts/Bullseye/examples/bullseye.css +2 -2
- package/src/layouts/Flex/examples/flex.css +3 -3
- package/src/layouts/Gallery/examples/gallery.css +2 -2
- package/src/layouts/Grid/examples/grid.css +2 -2
- package/src/layouts/Level/examples/level.css +4 -4
- package/src/layouts/Split/examples/split.css +2 -2
- package/src/layouts/Stack/examples/stack.css +4 -4
- /package/src/{components → demos}/Compass/examples/CompassDemo.tsx +0 -0
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerPanelStart: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerBasicPill: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerResizableAtEnd: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerResizableAtStart: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerResizableOnBottom: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
|
|
13
13
|
export const DrawerResizableOnInline: React.FunctionComponent = () => {
|
|
14
14
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
15
|
-
const drawerRef = useRef<
|
|
15
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
16
16
|
|
|
17
17
|
const onExpand = () => {
|
|
18
18
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -13,7 +13,7 @@ import accessibility from '@patternfly/react-styles/css/utilities/Accessibility/
|
|
|
13
13
|
|
|
14
14
|
export const DrawerStatic: React.FunctionComponent = () => {
|
|
15
15
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
16
|
-
const drawerRef = useRef<
|
|
16
|
+
const drawerRef = useRef<HTMLSpanElement>(null);
|
|
17
17
|
|
|
18
18
|
const onExpand = () => {
|
|
19
19
|
drawerRef.current && drawerRef.current.focus();
|
|
@@ -56,8 +56,7 @@ export const FormGroup: React.FunctionComponent<FormGroupProps> = ({
|
|
|
56
56
|
<span className={css(styles.formLabelText)}>{label}</span>
|
|
57
57
|
{isRequired && (
|
|
58
58
|
<span className={css(styles.formLabelRequired)} aria-hidden="true">
|
|
59
|
-
{
|
|
60
|
-
{ASTERISK}
|
|
59
|
+
{ASTERISK}
|
|
61
60
|
</span>
|
|
62
61
|
)}
|
|
63
62
|
</LabelComponent>
|
|
@@ -25,7 +25,7 @@ exports[`LoginForm LoginForm with rememberMeLabel 1`] = `
|
|
|
25
25
|
aria-hidden="true"
|
|
26
26
|
class="pf-v6-c-form__label-required"
|
|
27
27
|
>
|
|
28
|
-
|
|
28
|
+
*
|
|
29
29
|
</span>
|
|
30
30
|
</label>
|
|
31
31
|
|
|
@@ -69,7 +69,7 @@ exports[`LoginForm LoginForm with rememberMeLabel 1`] = `
|
|
|
69
69
|
aria-hidden="true"
|
|
70
70
|
class="pf-v6-c-form__label-required"
|
|
71
71
|
>
|
|
72
|
-
|
|
72
|
+
*
|
|
73
73
|
</span>
|
|
74
74
|
</label>
|
|
75
75
|
|
|
@@ -175,7 +175,7 @@ exports[`LoginForm LoginForm with show password 1`] = `
|
|
|
175
175
|
aria-hidden="true"
|
|
176
176
|
class="pf-v6-c-form__label-required"
|
|
177
177
|
>
|
|
178
|
-
|
|
178
|
+
*
|
|
179
179
|
</span>
|
|
180
180
|
</label>
|
|
181
181
|
|
|
@@ -219,7 +219,7 @@ exports[`LoginForm LoginForm with show password 1`] = `
|
|
|
219
219
|
aria-hidden="true"
|
|
220
220
|
class="pf-v6-c-form__label-required"
|
|
221
221
|
>
|
|
222
|
-
|
|
222
|
+
*
|
|
223
223
|
</span>
|
|
224
224
|
</label>
|
|
225
225
|
|
|
@@ -336,7 +336,7 @@ exports[`LoginForm should render Login form 1`] = `
|
|
|
336
336
|
aria-hidden="true"
|
|
337
337
|
class="pf-v6-c-form__label-required"
|
|
338
338
|
>
|
|
339
|
-
|
|
339
|
+
*
|
|
340
340
|
</span>
|
|
341
341
|
</label>
|
|
342
342
|
|
|
@@ -380,7 +380,7 @@ exports[`LoginForm should render Login form 1`] = `
|
|
|
380
380
|
aria-hidden="true"
|
|
381
381
|
class="pf-v6-c-form__label-required"
|
|
382
382
|
>
|
|
383
|
-
|
|
383
|
+
*
|
|
384
384
|
</span>
|
|
385
385
|
</label>
|
|
386
386
|
|
|
@@ -27,6 +27,8 @@ export interface MastheadProps extends React.DetailedHTMLProps<React.HTMLProps<H
|
|
|
27
27
|
xl?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';
|
|
28
28
|
'2xl'?: 'insetNone' | 'insetXs' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl' | 'inset3xl';
|
|
29
29
|
};
|
|
30
|
+
/** @beta Indicates the variant of the masthead */
|
|
31
|
+
variant?: 'default' | 'docked';
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export const Masthead: React.FunctionComponent<MastheadProps> = ({
|
|
@@ -36,6 +38,7 @@ export const Masthead: React.FunctionComponent<MastheadProps> = ({
|
|
|
36
38
|
md: 'inline'
|
|
37
39
|
},
|
|
38
40
|
inset,
|
|
41
|
+
variant = 'default',
|
|
39
42
|
...props
|
|
40
43
|
}: MastheadProps) => {
|
|
41
44
|
const { width, getBreakpoint } = useContext(PageContext);
|
|
@@ -43,6 +46,7 @@ export const Masthead: React.FunctionComponent<MastheadProps> = ({
|
|
|
43
46
|
<header
|
|
44
47
|
className={css(
|
|
45
48
|
styles.masthead,
|
|
49
|
+
variant === 'docked' && styles.modifiers.docked,
|
|
46
50
|
formatBreakpointMods(display, styles, 'display-', getBreakpoint(width)),
|
|
47
51
|
formatBreakpointMods(inset, styles, '', getBreakpoint(width)),
|
|
48
52
|
className
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { render } from '@testing-library/react';
|
|
1
|
+
import { render, screen } from '@testing-library/react';
|
|
2
2
|
import { Masthead, MastheadMain, MastheadLogo, MastheadContent, MastheadBrand, MastheadToggle } from '../index';
|
|
3
|
+
import styles from '@patternfly/react-styles/css/components/Masthead/masthead';
|
|
3
4
|
|
|
4
5
|
describe('Masthead', () => {
|
|
5
6
|
test('verify basic', () => {
|
|
@@ -71,6 +72,29 @@ describe('Masthead', () => {
|
|
|
71
72
|
expect(asFragment()).toMatchSnapshot();
|
|
72
73
|
});
|
|
73
74
|
});
|
|
75
|
+
|
|
76
|
+
test(`Renders with ${styles.modifiers.docked} class when variant is docked`, () => {
|
|
77
|
+
render(
|
|
78
|
+
<Masthead variant="docked" data-testid="masthead">
|
|
79
|
+
test
|
|
80
|
+
</Masthead>
|
|
81
|
+
);
|
|
82
|
+
expect(screen.getByTestId('masthead')).toHaveClass(styles.modifiers.docked);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test(`Does not render with ${styles.modifiers.docked} class when variant is default`, () => {
|
|
86
|
+
render(
|
|
87
|
+
<Masthead variant="default" data-testid="masthead">
|
|
88
|
+
test
|
|
89
|
+
</Masthead>
|
|
90
|
+
);
|
|
91
|
+
expect(screen.getByTestId('masthead')).not.toHaveClass(styles.modifiers.docked);
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
test(`Does not render with ${styles.modifiers.docked} class when variant is not passed`, () => {
|
|
95
|
+
render(<Masthead data-testid="masthead">test</Masthead>);
|
|
96
|
+
expect(screen.getByTestId('masthead')).not.toHaveClass(styles.modifiers.docked);
|
|
97
|
+
});
|
|
74
98
|
});
|
|
75
99
|
|
|
76
100
|
describe('MastheadLogo', () => {
|
|
@@ -35,8 +35,8 @@ export interface NavProps
|
|
|
35
35
|
) => void;
|
|
36
36
|
/** Accessible label for the nav when there are multiple navs on the page */
|
|
37
37
|
'aria-label'?: string;
|
|
38
|
-
/**
|
|
39
|
-
variant?: 'default' | 'horizontal' | 'horizontal-subnav';
|
|
38
|
+
/** The nav variant to use. Docked is in beta. */
|
|
39
|
+
variant?: 'default' | 'horizontal' | 'horizontal-subnav' | 'docked';
|
|
40
40
|
/** Value to overwrite the randomly generated data-ouia-component-id.*/
|
|
41
41
|
ouiaId?: number | string;
|
|
42
42
|
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
@@ -154,6 +154,7 @@ class Nav extends Component<
|
|
|
154
154
|
className={css(
|
|
155
155
|
styles.nav,
|
|
156
156
|
isHorizontal && styles.modifiers.horizontal,
|
|
157
|
+
variant === 'docked' && styles.modifiers.docked,
|
|
157
158
|
variant === 'horizontal-subnav' && styles.modifiers.subnav,
|
|
158
159
|
this.state.isScrollable && styles.modifiers.scrollable,
|
|
159
160
|
className
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
cloneElement,
|
|
3
|
+
Fragment,
|
|
4
|
+
isValidElement,
|
|
5
|
+
useContext,
|
|
6
|
+
useEffect,
|
|
7
|
+
useRef,
|
|
8
|
+
useState,
|
|
9
|
+
forwardRef,
|
|
10
|
+
MutableRefObject
|
|
11
|
+
} from 'react';
|
|
2
12
|
import styles from '@patternfly/react-styles/css/components/Nav/nav';
|
|
3
13
|
import menuStyles from '@patternfly/react-styles/css/components/Menu/menu';
|
|
4
14
|
import dividerStyles from '@patternfly/react-styles/css/components/Divider/divider';
|
|
@@ -42,9 +52,13 @@ export interface NavItemProps extends Omit<React.HTMLProps<HTMLAnchorElement>, '
|
|
|
42
52
|
ouiaId?: number | string;
|
|
43
53
|
/** Set the value of data-ouia-safe. Only set to true when the component is in a static state, i.e. no animations are occurring. At all other times, this value must be false. */
|
|
44
54
|
ouiaSafe?: boolean;
|
|
55
|
+
/** React ref for the anchor element within the nav item. */
|
|
56
|
+
anchorRef?: React.Ref<HTMLAnchorElement>;
|
|
57
|
+
/** @hide Forwarded ref */
|
|
58
|
+
innerRef?: React.Ref<HTMLLIElement>;
|
|
45
59
|
}
|
|
46
60
|
|
|
47
|
-
|
|
61
|
+
const NavItemBase: React.FunctionComponent<NavItemProps> = ({
|
|
48
62
|
children,
|
|
49
63
|
styleChildren = true,
|
|
50
64
|
className,
|
|
@@ -61,13 +75,16 @@ export const NavItem: React.FunctionComponent<NavItemProps> = ({
|
|
|
61
75
|
ouiaSafe,
|
|
62
76
|
zIndex = 9999,
|
|
63
77
|
icon,
|
|
78
|
+
innerRef,
|
|
79
|
+
anchorRef,
|
|
64
80
|
...props
|
|
65
81
|
}: NavItemProps) => {
|
|
66
82
|
const { flyoutRef, setFlyoutRef, navRef } = useContext(NavContext);
|
|
67
83
|
const { isSidebarOpen } = useContext(PageSidebarContext);
|
|
68
84
|
const [flyoutTarget, setFlyoutTarget] = useState(null);
|
|
69
85
|
const [isHovered, setIsHovered] = useState(false);
|
|
70
|
-
const
|
|
86
|
+
const _ref = useRef<HTMLLIElement>(undefined);
|
|
87
|
+
const ref = (innerRef as MutableRefObject<HTMLLIElement>) || _ref;
|
|
71
88
|
const flyoutVisible = ref === flyoutRef;
|
|
72
89
|
const popperRef = useRef<HTMLDivElement>(undefined);
|
|
73
90
|
const hasFlyout = flyout !== undefined;
|
|
@@ -180,6 +197,7 @@ export const NavItem: React.FunctionComponent<NavItemProps> = ({
|
|
|
180
197
|
const preventLinkDefault = preventDefault || !to;
|
|
181
198
|
return (
|
|
182
199
|
<Component
|
|
200
|
+
ref={anchorRef}
|
|
183
201
|
href={to}
|
|
184
202
|
onClick={(e: any) => context.onSelect(e, groupId, itemId, to, preventLinkDefault, onClick)}
|
|
185
203
|
className={css(
|
|
@@ -208,6 +226,7 @@ export const NavItem: React.FunctionComponent<NavItemProps> = ({
|
|
|
208
226
|
className: css(styles.navLink, isActive && styles.modifiers.current, child.props && child.props.className)
|
|
209
227
|
}),
|
|
210
228
|
tabIndex: child.props.tabIndex || tabIndex,
|
|
229
|
+
ref: anchorRef,
|
|
211
230
|
children: hasFlyout ? (
|
|
212
231
|
<Fragment>
|
|
213
232
|
{child.props.children}
|
|
@@ -267,4 +286,9 @@ export const NavItem: React.FunctionComponent<NavItemProps> = ({
|
|
|
267
286
|
|
|
268
287
|
return navItem;
|
|
269
288
|
};
|
|
289
|
+
|
|
290
|
+
export const NavItem = forwardRef<HTMLLIElement, NavItemProps>((props, ref) => (
|
|
291
|
+
<NavItemBase {...props} innerRef={ref} />
|
|
292
|
+
));
|
|
293
|
+
|
|
270
294
|
NavItem.displayName = 'NavItem';
|
|
@@ -259,4 +259,19 @@ describe('Nav', () => {
|
|
|
259
259
|
);
|
|
260
260
|
expect(screen.getAllByText('this is an icon')[0].parentElement).toHaveClass(styles.navLinkIcon);
|
|
261
261
|
});
|
|
262
|
+
|
|
263
|
+
test(`Renders with ${styles.modifiers.docked} class when variant is docked`, () => {
|
|
264
|
+
renderNav(
|
|
265
|
+
<Nav variant="docked" data-testid="docked-nav">
|
|
266
|
+
<NavList>
|
|
267
|
+
{props.items.map((item) => (
|
|
268
|
+
<NavItem to={item.to} key={item.to}>
|
|
269
|
+
{item.label}
|
|
270
|
+
</NavItem>
|
|
271
|
+
))}
|
|
272
|
+
</NavList>
|
|
273
|
+
</Nav>
|
|
274
|
+
);
|
|
275
|
+
expect(screen.getByTestId('docked-nav')).toHaveClass(styles.modifiers.docked);
|
|
276
|
+
});
|
|
262
277
|
});
|
|
@@ -20,6 +20,8 @@ export interface PageProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
20
20
|
children?: React.ReactNode;
|
|
21
21
|
/** Additional classes added to the page layout */
|
|
22
22
|
className?: string;
|
|
23
|
+
/** @beta Indicates the layout variant */
|
|
24
|
+
variant?: 'default' | 'docked';
|
|
23
25
|
/** Masthead component (e.g. <Masthead />) */
|
|
24
26
|
masthead?: React.ReactNode;
|
|
25
27
|
/** Sidebar component for a side nav, recommended to be a PageSidebar. If set to null, the page grid layout
|
|
@@ -229,6 +231,7 @@ class Page extends Component<PageProps, PageState> {
|
|
|
229
231
|
isBreadcrumbWidthLimited,
|
|
230
232
|
className,
|
|
231
233
|
children,
|
|
234
|
+
variant,
|
|
232
235
|
masthead,
|
|
233
236
|
sidebar,
|
|
234
237
|
notificationDrawer,
|
|
@@ -336,6 +339,7 @@ class Page extends Component<PageProps, PageState> {
|
|
|
336
339
|
{...rest}
|
|
337
340
|
className={css(
|
|
338
341
|
styles.page,
|
|
342
|
+
variant === 'docked' && styles.modifiers.dock,
|
|
339
343
|
width !== null && height !== null && 'pf-m-resize-observer',
|
|
340
344
|
width !== null && `pf-m-breakpoint-${getBreakpoint(width)}`,
|
|
341
345
|
height !== null && `pf-m-height-breakpoint-${getVerticalBreakpoint(height)}`,
|
|
@@ -344,7 +348,7 @@ class Page extends Component<PageProps, PageState> {
|
|
|
344
348
|
)}
|
|
345
349
|
>
|
|
346
350
|
{skipToContent}
|
|
347
|
-
{masthead}
|
|
351
|
+
{variant === 'docked' ? <div className={css(styles.pageDock)}>{masthead}</div> : masthead}
|
|
348
352
|
{sidebar}
|
|
349
353
|
{notificationDrawer && (
|
|
350
354
|
<div className={css(styles.pageDrawer)}>
|
|
@@ -389,4 +389,21 @@ describe('Page', () => {
|
|
|
389
389
|
|
|
390
390
|
expect(screen.getByRole('main').parentElement).not.toHaveClass(styles.modifiers.noFill);
|
|
391
391
|
});
|
|
392
|
+
|
|
393
|
+
test(`Renders with ${styles.modifiers.dock} class when variant is docked`, () => {
|
|
394
|
+
render(<Page {...props} variant="docked" data-testid="page"></Page>);
|
|
395
|
+
|
|
396
|
+
expect(screen.getByTestId('page')).toHaveClass(styles.modifiers.dock);
|
|
397
|
+
});
|
|
398
|
+
|
|
399
|
+
test(`Does not render with ${styles.modifiers.dock} class when variant is default`, () => {
|
|
400
|
+
render(<Page {...props} variant="default" data-testid="page"></Page>);
|
|
401
|
+
|
|
402
|
+
expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.dock);
|
|
403
|
+
});
|
|
404
|
+
|
|
405
|
+
test(`Does not render with ${styles.modifiers.dock} class when variant is not passed`, () => {
|
|
406
|
+
render(<Page data-testid="page"></Page>);
|
|
407
|
+
expect(screen.getByTestId('page')).not.toHaveClass(styles.modifiers.dock);
|
|
408
|
+
});
|
|
392
409
|
});
|
|
@@ -40,6 +40,8 @@ export interface ToolbarProps extends React.HTMLProps<HTMLDivElement>, OUIAProps
|
|
|
40
40
|
isStatic?: boolean;
|
|
41
41
|
/** Flag indicating the toolbar should stick to the top of its container */
|
|
42
42
|
isSticky?: boolean;
|
|
43
|
+
/** @beta Flag indicating the toolbar has a vertical orientation */
|
|
44
|
+
isVertical?: boolean;
|
|
43
45
|
/** Insets at various breakpoints. */
|
|
44
46
|
inset?: {
|
|
45
47
|
default?: 'insetNone' | 'insetSm' | 'insetMd' | 'insetLg' | 'insetXl' | 'inset2xl';
|
|
@@ -143,6 +145,7 @@ class Toolbar extends Component<ToolbarProps, ToolbarState> {
|
|
|
143
145
|
isStatic,
|
|
144
146
|
inset,
|
|
145
147
|
isSticky,
|
|
148
|
+
isVertical,
|
|
146
149
|
ouiaId,
|
|
147
150
|
numberOfFiltersText,
|
|
148
151
|
customLabelGroupContent,
|
|
@@ -167,6 +170,7 @@ class Toolbar extends Component<ToolbarProps, ToolbarState> {
|
|
|
167
170
|
isFullHeight && styles.modifiers.fullHeight,
|
|
168
171
|
isStatic && styles.modifiers.static,
|
|
169
172
|
isSticky && styles.modifiers.sticky,
|
|
173
|
+
isVertical && styles.modifiers.vertical,
|
|
170
174
|
formatBreakpointMods(inset, styles, '', getBreakpoint(width)),
|
|
171
175
|
colorVariant === 'primary' && styles.modifiers.primary,
|
|
172
176
|
colorVariant === 'secondary' && styles.modifiers.secondary,
|
|
@@ -54,7 +54,7 @@ describe('Toolbar', () => {
|
|
|
54
54
|
</ToolbarContent>
|
|
55
55
|
</Toolbar>
|
|
56
56
|
);
|
|
57
|
-
expect(screen.getByTestId('toolbar')).not.toHaveClass(
|
|
57
|
+
expect(screen.getByTestId('toolbar')).not.toHaveClass(styles.modifiers.noPadding);
|
|
58
58
|
});
|
|
59
59
|
|
|
60
60
|
it(`should render toolbar with ${styles.modifiers.noPadding} class when hasNoPadding is true`, () => {
|
|
@@ -205,4 +205,37 @@ describe('Toolbar', () => {
|
|
|
205
205
|
});
|
|
206
206
|
});
|
|
207
207
|
});
|
|
208
|
+
|
|
209
|
+
it(`Renders toolbar without ${styles.modifiers.vertical} by default`, () => {
|
|
210
|
+
render(
|
|
211
|
+
<Toolbar data-testid="Toolbar-test-is-not-vertical">
|
|
212
|
+
<ToolbarContent>
|
|
213
|
+
<ToolbarItem>Test</ToolbarItem>
|
|
214
|
+
<ToolbarItem>Test 2</ToolbarItem>
|
|
215
|
+
<ToolbarItem variant="separator" />
|
|
216
|
+
<ToolbarItem>Test 3 </ToolbarItem>
|
|
217
|
+
</ToolbarContent>
|
|
218
|
+
</Toolbar>
|
|
219
|
+
);
|
|
220
|
+
expect(screen.getByTestId('Toolbar-test-is-not-vertical')).not.toHaveClass(styles.modifiers.vertical);
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
it('Renders with class ${styles.modifiers.vertical} when isVertical is true', () => {
|
|
224
|
+
const items = (
|
|
225
|
+
<Fragment>
|
|
226
|
+
<ToolbarItem>Test</ToolbarItem>
|
|
227
|
+
<ToolbarItem>Test 2</ToolbarItem>
|
|
228
|
+
<ToolbarItem variant="separator" />
|
|
229
|
+
<ToolbarItem>Test 3 </ToolbarItem>
|
|
230
|
+
</Fragment>
|
|
231
|
+
);
|
|
232
|
+
|
|
233
|
+
render(
|
|
234
|
+
<Toolbar id="toolbar" isVertical data-testid="Toolbar-test-is-vertical">
|
|
235
|
+
<ToolbarContent>{items}</ToolbarContent>
|
|
236
|
+
</Toolbar>
|
|
237
|
+
);
|
|
238
|
+
|
|
239
|
+
expect(screen.getByTestId('Toolbar-test-is-vertical')).toHaveClass(styles.modifiers.vertical);
|
|
240
|
+
});
|
|
208
241
|
});
|
|
@@ -48,7 +48,7 @@ export const WizardNavInternal = ({
|
|
|
48
48
|
let firstSubStepIndex: number;
|
|
49
49
|
let hasActiveChild = false;
|
|
50
50
|
|
|
51
|
-
const subNavItems = step.subStepIds?.map((subStepId,
|
|
51
|
+
const subNavItems = step.subStepIds?.map((subStepId, _subStepIndex) => {
|
|
52
52
|
const subStep = steps.find((step) => step.id === subStepId);
|
|
53
53
|
const hasVisitedNextStep = steps.some((step) => step.index > subStep.index && step.isVisited);
|
|
54
54
|
const isSubStepDisabled =
|
|
@@ -66,8 +66,8 @@ export const WizardNavInternal = ({
|
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
// Store the first sub-step index so that when its parent is clicked, the first sub-step is focused
|
|
70
|
-
if (
|
|
69
|
+
// Store the first visible sub-step index so that when its parent is clicked, the first sub-step is focused
|
|
70
|
+
if (firstSubStepIndex === undefined) {
|
|
71
71
|
firstSubStepIndex = subStep.index;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -627,3 +627,42 @@ test('onStepChange skips over disabled or hidden steps and substeps', async () =
|
|
|
627
627
|
WizardStepChangeScope.Back
|
|
628
628
|
);
|
|
629
629
|
});
|
|
630
|
+
|
|
631
|
+
test('clicking parent step navigates to first visible sub-step when first sub-step is hidden', async () => {
|
|
632
|
+
const user = userEvent.setup();
|
|
633
|
+
const onStepChange = jest.fn();
|
|
634
|
+
|
|
635
|
+
render(
|
|
636
|
+
<Wizard onStepChange={onStepChange}>
|
|
637
|
+
<WizardStep id="step-1" name="Test step 1" />
|
|
638
|
+
<WizardStep
|
|
639
|
+
id="step-2"
|
|
640
|
+
name="Test step 2"
|
|
641
|
+
steps={[
|
|
642
|
+
<WizardStep id="step2-sub1" name="Hidden sub step" isHidden />,
|
|
643
|
+
<WizardStep id="step2-sub2" name="Visible sub step 1" />,
|
|
644
|
+
<WizardStep id="step2-sub3" name="Visible sub step 2" />
|
|
645
|
+
]}
|
|
646
|
+
/>
|
|
647
|
+
<WizardStep id="step-3" name="Test step 3" />
|
|
648
|
+
</Wizard>
|
|
649
|
+
);
|
|
650
|
+
|
|
651
|
+
// Navigate to step 3 first
|
|
652
|
+
await user.click(screen.getByRole('button', { name: 'Test step 3' }));
|
|
653
|
+
expect(onStepChange).toHaveBeenCalledWith(
|
|
654
|
+
null,
|
|
655
|
+
expect.objectContaining({ id: 'step-3' }),
|
|
656
|
+
expect.objectContaining({ id: 'step-1' }),
|
|
657
|
+
WizardStepChangeScope.Nav
|
|
658
|
+
);
|
|
659
|
+
|
|
660
|
+
// Click on parent step 2 - should navigate to the first VISIBLE sub-step (step2-sub2), not crash
|
|
661
|
+
await user.click(screen.getByRole('button', { name: 'Test step 2' }));
|
|
662
|
+
expect(onStepChange).toHaveBeenCalledWith(
|
|
663
|
+
null,
|
|
664
|
+
expect.objectContaining({ id: 'step2-sub2' }),
|
|
665
|
+
expect.objectContaining({ id: 'step-3' }),
|
|
666
|
+
WizardStepChangeScope.Nav
|
|
667
|
+
);
|
|
668
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: Compass
|
|
3
|
+
section: AI
|
|
4
|
+
subsection: Generative UIs
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
import { useRef, useState } from 'react';
|
|
8
|
+
import PlayIcon from '@patternfly/react-icons/dist/esm/icons/play-icon';
|
|
9
|
+
import OutlinedPlusSquare from '@patternfly/react-icons/dist/esm/icons/outlined-plus-square-icon';
|
|
10
|
+
import OutlinedCopy from '@patternfly/react-icons/dist/esm/icons/outlined-copy-icon';
|
|
11
|
+
import OutlinedQuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/outlined-question-circle-icon';
|
|
12
|
+
import CubeIcon from '@patternfly/react-icons/dist/esm/icons/cube-icon';
|
|
13
|
+
import FolderIcon from '@patternfly/react-icons/dist/esm/icons/folder-icon';
|
|
14
|
+
import QuestionCircleIcon from '@patternfly/react-icons/dist/esm/icons/question-circle-icon';
|
|
15
|
+
import CloudIcon from '@patternfly/react-icons/dist/esm/icons/cloud-icon';
|
|
16
|
+
import CodeIcon from '@patternfly/react-icons/dist/esm/icons/code-icon';
|
|
17
|
+
import imgAvatar from '../assets/avatarImg.svg';
|
|
18
|
+
import pfLogo from '../assets/PF-IconLogo-color.svg';
|
|
19
|
+
|
|
20
|
+
## Demos
|
|
21
|
+
|
|
22
|
+
### Compass layout
|
|
23
|
+
|
|
24
|
+
This demo showcases an implementation of the following Compass features:
|
|
25
|
+
|
|
26
|
+
- Middle navigation in the `header`, featuring top-level primary tabs and a secondary container for sub-tabs.
|
|
27
|
+
- Vertical sidebars utilizing `<ActionList>` groups with buttons that use the `isCircle` prop.
|
|
28
|
+
- A custom gradient background in the `<Hero>`, visible in dark mode.
|
|
29
|
+
- Background images that automatically adapt to both light and dark modes.
|
|
30
|
+
- A `footer` section containing the `<CompassMessageBar>`, that could be used for AI text input.
|
|
31
|
+
|
|
32
|
+
```ts isFullscreen file="./examples/CompassDemo.tsx"
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Docked nav demo
|
|
37
|
+
|
|
38
|
+
```ts isFullscreen file="./examples/CompassDockDemo.tsx"
|
|
39
|
+
|
|
40
|
+
```
|