@patternfly/react-core 6.0.0-alpha.81 → 6.0.0-alpha.83
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/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/Tile/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/Wizard/package.json +1 -1
- package/dist/dynamic/deprecated/components/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 +2 -2
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +9 -9
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageBody.d.ts +9 -0
- package/dist/esm/components/Page/PageBody.d.ts.map +1 -0
- package/dist/esm/components/Page/PageBody.js +10 -0
- package/dist/esm/components/Page/PageBody.js.map +1 -0
- package/dist/esm/components/Page/PageBreadcrumb.d.ts +5 -1
- package/dist/esm/components/Page/PageBreadcrumb.d.ts.map +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.js +3 -4
- package/dist/esm/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/esm/components/Page/PageSection.d.ts +5 -2
- package/dist/esm/components/Page/PageSection.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSection.js +3 -6
- package/dist/esm/components/Page/PageSection.js.map +1 -1
- package/dist/esm/components/Page/index.d.ts +1 -1
- package/dist/esm/components/Page/index.d.ts.map +1 -1
- package/dist/esm/components/Page/index.js +1 -1
- package/dist/esm/components/Page/index.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts +0 -2
- 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/Toolbar/ToolbarContent.d.ts +0 -2
- package/dist/esm/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts +12 -9
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.js +6 -2
- package/dist/esm/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts +7 -7
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.js +7 -5
- package/dist/esm/components/Toolbar/ToolbarLabelGroupContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts +0 -8
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js +3 -2
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarUtils.js +4 -4
- package/dist/esm/components/Toolbar/ToolbarUtils.js.map +1 -1
- package/dist/esm/demos/DashboardHeader.js +2 -2
- package/dist/esm/demos/DashboardHeader.js.map +1 -1
- package/dist/esm/helpers/constants.js +10 -10
- package/dist/esm/helpers/constants.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +8 -8
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageBody.d.ts +9 -0
- package/dist/js/components/Page/PageBody.d.ts.map +1 -0
- package/dist/js/components/Page/PageBody.js +14 -0
- package/dist/js/components/Page/PageBody.js.map +1 -0
- package/dist/js/components/Page/PageBreadcrumb.d.ts +5 -1
- package/dist/js/components/Page/PageBreadcrumb.d.ts.map +1 -1
- package/dist/js/components/Page/PageBreadcrumb.js +3 -4
- package/dist/js/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/js/components/Page/PageSection.d.ts +5 -2
- package/dist/js/components/Page/PageSection.d.ts.map +1 -1
- package/dist/js/components/Page/PageSection.js +3 -6
- package/dist/js/components/Page/PageSection.js.map +1 -1
- package/dist/js/components/Page/index.d.ts +1 -1
- package/dist/js/components/Page/index.d.ts.map +1 -1
- package/dist/js/components/Page/index.js +1 -1
- package/dist/js/components/Page/index.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts +0 -2
- 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/Toolbar/ToolbarContent.d.ts +0 -2
- package/dist/js/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.js +2 -2
- package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts +12 -9
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.js +6 -2
- package/dist/js/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.d.ts +7 -7
- package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarLabelGroupContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarLabelGroupContent.js +7 -5
- package/dist/js/components/Toolbar/ToolbarLabelGroupContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts +0 -8
- package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js +3 -2
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarUtils.js +4 -4
- package/dist/js/components/Toolbar/ToolbarUtils.js.map +1 -1
- package/dist/js/demos/DashboardHeader.js +2 -2
- package/dist/js/demos/DashboardHeader.js.map +1 -1
- package/dist/js/helpers/constants.js +10 -10
- package/dist/js/helpers/constants.js.map +1 -1
- package/dist/styles/base-no-reset.css +62 -58
- package/dist/styles/base.css +62 -58
- package/dist/umd/assets/{output-Bz-Tlpbu.css → output-ZK-DtcVp.css} +910 -1090
- 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/Page/Page.tsx +12 -22
- package/src/components/Page/PageBody.tsx +18 -0
- package/src/components/Page/PageBreadcrumb.tsx +7 -2
- package/src/components/Page/PageSection.tsx +8 -5
- package/src/components/Page/__tests__/Page.test.tsx +11 -41
- package/src/components/Page/__tests__/PageBody.test.tsx +34 -0
- package/src/components/Page/__tests__/PageBreadcrumb.test.tsx +14 -1
- package/src/components/Page/__tests__/PageSection.test.tsx +15 -2
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +950 -973
- package/src/components/Page/__tests__/__snapshots__/PageBody.test.tsx.snap +11 -0
- package/src/components/Page/__tests__/__snapshots__/PageBreadcrumb.test.tsx.snap +30 -6
- package/src/components/Page/__tests__/__snapshots__/PageSection.test.tsx.snap +66 -14
- package/src/components/Page/examples/Page.md +2 -11
- package/src/components/Page/examples/PageGroupSection.tsx +19 -22
- package/src/components/Page/index.ts +1 -1
- package/src/components/Toolbar/Toolbar.tsx +0 -4
- package/src/components/Toolbar/ToolbarContent.tsx +1 -7
- package/src/components/Toolbar/ToolbarGroup.tsx +27 -10
- package/src/components/Toolbar/ToolbarItem.tsx +7 -7
- package/src/components/Toolbar/ToolbarLabelGroupContent.tsx +13 -11
- package/src/components/Toolbar/ToolbarToggleGroup.tsx +9 -11
- package/src/components/Toolbar/ToolbarUtils.tsx +4 -4
- package/src/components/Toolbar/__tests__/Toolbar.test.tsx +0 -19
- package/src/components/Toolbar/__tests__/__snapshots__/Toolbar.test.tsx.snap +30 -77
- package/src/components/Toolbar/examples/ToolbarCustomLabelGroupContent.tsx +1 -1
- package/src/components/Toolbar/examples/ToolbarGroups.tsx +2 -2
- package/src/components/Toolbar/examples/ToolbarInsets.tsx +23 -19
- package/src/components/Toolbar/examples/ToolbarSpacers.tsx +23 -19
- package/src/components/Toolbar/examples/ToolbarStacked.tsx +2 -2
- package/src/components/Toolbar/examples/ToolbarSticky.tsx +1 -1
- package/src/components/Toolbar/examples/ToolbarWithFilters.tsx +1 -1
- package/src/demos/DashboardHeader.tsx +2 -2
- package/src/demos/NotificationDrawer/examples/NotificationDrawerBasic.tsx +2 -2
- package/src/demos/NotificationDrawer/examples/NotificationDrawerGrouped.tsx +2 -2
- package/src/demos/RTL/examples/PaginatedTable.jsx +2 -2
- package/src/demos/RTL/examples/PaginatedTable.tsx +2 -2
- package/src/demos/examples/Masthead/MastheadWithHorizontalNav.tsx +2 -2
- package/src/demos/examples/Masthead/MastheadWithUtilitiesAndUserDropdownMenu.tsx +2 -2
- package/src/demos/examples/Nav/NavFlyout.tsx +2 -2
- package/src/demos/examples/Nav/NavHorizontal.tsx +2 -2
- package/src/demos/examples/Nav/NavHorizontalWithSubnav.tsx +2 -2
- package/src/demos/examples/Nav/NavManual.tsx +2 -2
- package/src/demos/examples/Page/PageContextSelector.tsx +2 -2
- package/src/demos/examples/Page/PageStickySectionBreadcrumb.tsx +2 -2
- package/src/demos/examples/Page/PageStickySectionGroup.tsx +2 -2
- package/src/demos/examples/Page/PageStickySectionGroupAlternate.tsx +2 -2
- package/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx +1 -1
- package/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx +1 -1
- package/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx +1 -1
- package/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx +1 -1
- package/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx +1 -1
- package/src/demos/examples/Tabs/TabsAndTable.tsx +1 -1
- package/src/helpers/constants.ts +10 -10
- package/dist/esm/components/Page/PageNavigation.d.ts +0 -31
- package/dist/esm/components/Page/PageNavigation.d.ts.map +0 -1
- package/dist/esm/components/Page/PageNavigation.js +0 -21
- package/dist/esm/components/Page/PageNavigation.js.map +0 -1
- package/dist/js/components/Page/PageNavigation.d.ts +0 -31
- package/dist/js/components/Page/PageNavigation.d.ts.map +0 -1
- package/dist/js/components/Page/PageNavigation.js +0 -25
- package/dist/js/components/Page/PageNavigation.js.map +0 -1
- package/src/components/Page/PageNavigation.tsx +0 -72
- package/src/components/Page/__tests__/PageNavigation.test.tsx +0 -78
- package/src/components/Page/__tests__/__snapshots__/PageNavigation.test.tsx.snap +0 -77
package/src/helpers/constants.ts
CHANGED
|
@@ -39,19 +39,19 @@ export const KeyTypes = {
|
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
export const globalWidthBreakpoints = {
|
|
42
|
-
sm: parseInt(globalBreakpointSm.value),
|
|
43
|
-
md: parseInt(globalBreakpointMd.value),
|
|
44
|
-
lg: parseInt(globalBreakpointLg.value),
|
|
45
|
-
xl: parseInt(globalBreakpointXl.value),
|
|
46
|
-
'2xl': parseInt(globalBreakpoint2xl.value)
|
|
42
|
+
sm: parseInt(globalBreakpointSm.value) * 16,
|
|
43
|
+
md: parseInt(globalBreakpointMd.value) * 16,
|
|
44
|
+
lg: parseInt(globalBreakpointLg.value) * 16,
|
|
45
|
+
xl: parseInt(globalBreakpointXl.value) * 16,
|
|
46
|
+
'2xl': parseInt(globalBreakpoint2xl.value) * 16
|
|
47
47
|
};
|
|
48
48
|
|
|
49
49
|
export const globalHeightBreakpoints = {
|
|
50
|
-
sm: parseInt(globalHeightBreakpointSm.value),
|
|
51
|
-
md: parseInt(globalHeightBreakpointMd.value),
|
|
52
|
-
lg: parseInt(globalHeightBreakpointLg.value),
|
|
53
|
-
xl: parseInt(globalHeightBreakpointXl.value),
|
|
54
|
-
'2xl': parseInt(globalHeightBreakpoint2xl.value)
|
|
50
|
+
sm: parseInt(globalHeightBreakpointSm.value) * 16,
|
|
51
|
+
md: parseInt(globalHeightBreakpointMd.value) * 16,
|
|
52
|
+
lg: parseInt(globalHeightBreakpointLg.value) * 16,
|
|
53
|
+
xl: parseInt(globalHeightBreakpointXl.value) * 16,
|
|
54
|
+
'2xl': parseInt(globalHeightBreakpoint2xl.value) * 16
|
|
55
55
|
};
|
|
56
56
|
|
|
57
57
|
export const statusIcons = {
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface PageNavigationProps extends React.HTMLProps<HTMLDivElement> {
|
|
3
|
-
/** Additional classes to apply to the PageNavigation */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** Content rendered inside of the PageNavigation */
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
/** Limits the width of the PageNavigation */
|
|
8
|
-
isWidthLimited?: boolean;
|
|
9
|
-
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
|
|
10
|
-
stickyOnBreakpoint?: {
|
|
11
|
-
default?: 'top' | 'bottom';
|
|
12
|
-
sm?: 'top' | 'bottom';
|
|
13
|
-
md?: 'top' | 'bottom';
|
|
14
|
-
lg?: 'top' | 'bottom';
|
|
15
|
-
xl?: 'top' | 'bottom';
|
|
16
|
-
'2xl'?: 'top' | 'bottom';
|
|
17
|
-
};
|
|
18
|
-
/** Flag indicating if PageNavigation should have a shadow at the top */
|
|
19
|
-
hasShadowTop?: boolean;
|
|
20
|
-
/** Flag indicating if PageNavigation should have a shadow at the bottom */
|
|
21
|
-
hasShadowBottom?: boolean;
|
|
22
|
-
/** Flag indicating if the PageNavigation has a scrolling overflow */
|
|
23
|
-
hasOverflowScroll?: boolean;
|
|
24
|
-
/** Adds an accessible name to the page navigation when the hasOverflowScroll prop is set to true. */
|
|
25
|
-
'aria-label'?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare const PageNavigation: {
|
|
28
|
-
({ className, children, isWidthLimited, stickyOnBreakpoint, hasShadowTop, hasShadowBottom, hasOverflowScroll, "aria-label": ariaLabel, ...props }: PageNavigationProps): React.JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=PageNavigation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/Page/PageNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC1E,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sGAAsG;IACtG,kBAAkB,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QAC3B,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;KAC1B,CAAC;IACF,wEAAwE;IACxE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qGAAqG;IACrG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,cAAc;uJAUxB,mBAAmB;;CA4BrB,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { css } from '@patternfly/react-styles';
|
|
4
|
-
import styles from '@patternfly/react-styles/css/components/Page/page.mjs';
|
|
5
|
-
import { formatBreakpointMods } from '../../helpers/util';
|
|
6
|
-
import { PageContext } from './PageContext';
|
|
7
|
-
export const PageNavigation = (_a) => {
|
|
8
|
-
var { className = '', children, isWidthLimited, stickyOnBreakpoint, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false, 'aria-label': ariaLabel } = _a, props = __rest(_a, ["className", "children", "isWidthLimited", "stickyOnBreakpoint", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll", 'aria-label']);
|
|
9
|
-
const { height, getVerticalBreakpoint } = React.useContext(PageContext);
|
|
10
|
-
React.useEffect(() => {
|
|
11
|
-
if (hasOverflowScroll && !ariaLabel) {
|
|
12
|
-
/* eslint-disable no-console */
|
|
13
|
-
console.warn('PageNavigation: An accessible aria-label is required when hasOverflowScroll is set to true.');
|
|
14
|
-
}
|
|
15
|
-
}, [hasOverflowScroll, ariaLabel]);
|
|
16
|
-
return (React.createElement("div", Object.assign({ className: css(styles.pageMainNav, formatBreakpointMods(stickyOnBreakpoint, styles, 'sticky-', getVerticalBreakpoint(height), true), isWidthLimited && styles.modifiers.limitWidth, hasShadowTop && styles.modifiers.shadowTop, hasShadowBottom && styles.modifiers.shadowBottom, hasOverflowScroll && styles.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0, role: 'region', 'aria-label': ariaLabel }), props),
|
|
17
|
-
isWidthLimited && React.createElement("div", { className: css(styles.pageMainBody) }, children),
|
|
18
|
-
!isWidthLimited && children));
|
|
19
|
-
};
|
|
20
|
-
PageNavigation.displayName = 'PageNavigation';
|
|
21
|
-
//# sourceMappingURL=PageNavigation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageNavigation.js","sourceRoot":"","sources":["../../../../src/components/Page/PageNavigation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,MAAM,8DAA0D;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AA4B5C,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAUT,EAAE,EAAE;QAVK,EAC7B,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,YAAY,GAAG,KAAK,EACpB,eAAe,GAAG,KAAK,EACvB,iBAAiB,GAAG,KAAK,EACzB,YAAY,EAAE,SAAS,OAEH,EADjB,KAAK,cATqB,uIAU9B,CADS;IAER,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAExE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,iBAAiB,IAAI,CAAC,SAAS,EAAE,CAAC;YACpC,+BAA+B;YAC/B,OAAO,CAAC,IAAI,CAAC,6FAA6F,CAAC,CAAC;QAC9G,CAAC;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnC,OAAO,CACL,2CACE,SAAS,EAAE,GAAG,CACZ,MAAM,CAAC,WAAW,EAClB,oBAAoB,CAAC,kBAAkB,EAAE,MAAM,EAAE,SAAS,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAChG,cAAc,IAAI,MAAM,CAAC,SAAS,CAAC,UAAU,EAC7C,YAAY,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,EAC1C,eAAe,IAAI,MAAM,CAAC,SAAS,CAAC,YAAY,EAChD,iBAAiB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,EACpD,SAAS,CACV,IACG,CAAC,iBAAiB,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,EAC/E,KAAK;QAER,cAAc,IAAI,6BAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,YAAY,CAAC,IAAG,QAAQ,CAAO;QAC5E,CAAC,cAAc,IAAI,QAAQ,CACxB,CACP,CAAC;AACJ,CAAC,CAAC;AACF,cAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface PageNavigationProps extends React.HTMLProps<HTMLDivElement> {
|
|
3
|
-
/** Additional classes to apply to the PageNavigation */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** Content rendered inside of the PageNavigation */
|
|
6
|
-
children?: React.ReactNode;
|
|
7
|
-
/** Limits the width of the PageNavigation */
|
|
8
|
-
isWidthLimited?: boolean;
|
|
9
|
-
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
|
|
10
|
-
stickyOnBreakpoint?: {
|
|
11
|
-
default?: 'top' | 'bottom';
|
|
12
|
-
sm?: 'top' | 'bottom';
|
|
13
|
-
md?: 'top' | 'bottom';
|
|
14
|
-
lg?: 'top' | 'bottom';
|
|
15
|
-
xl?: 'top' | 'bottom';
|
|
16
|
-
'2xl'?: 'top' | 'bottom';
|
|
17
|
-
};
|
|
18
|
-
/** Flag indicating if PageNavigation should have a shadow at the top */
|
|
19
|
-
hasShadowTop?: boolean;
|
|
20
|
-
/** Flag indicating if PageNavigation should have a shadow at the bottom */
|
|
21
|
-
hasShadowBottom?: boolean;
|
|
22
|
-
/** Flag indicating if the PageNavigation has a scrolling overflow */
|
|
23
|
-
hasOverflowScroll?: boolean;
|
|
24
|
-
/** Adds an accessible name to the page navigation when the hasOverflowScroll prop is set to true. */
|
|
25
|
-
'aria-label'?: string;
|
|
26
|
-
}
|
|
27
|
-
export declare const PageNavigation: {
|
|
28
|
-
({ className, children, isWidthLimited, stickyOnBreakpoint, hasShadowTop, hasShadowBottom, hasOverflowScroll, "aria-label": ariaLabel, ...props }: PageNavigationProps): React.JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
31
|
-
//# sourceMappingURL=PageNavigation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/Page/PageNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,WAAW,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC;IAC1E,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sGAAsG;IACtG,kBAAkB,CAAC,EAAE;QACnB,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QAC3B,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,EAAE,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;QACtB,KAAK,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;KAC1B,CAAC;IACF,wEAAwE;IACxE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,qEAAqE;IACrE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qGAAqG;IACrG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,cAAc;uJAUxB,mBAAmB;;CA4BrB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PageNavigation = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const React = tslib_1.__importStar(require("react"));
|
|
6
|
-
const react_styles_1 = require("@patternfly/react-styles");
|
|
7
|
-
const page_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Page/page"));
|
|
8
|
-
const util_1 = require("../../helpers/util");
|
|
9
|
-
const PageContext_1 = require("./PageContext");
|
|
10
|
-
const PageNavigation = (_a) => {
|
|
11
|
-
var { className = '', children, isWidthLimited, stickyOnBreakpoint, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false, 'aria-label': ariaLabel } = _a, props = tslib_1.__rest(_a, ["className", "children", "isWidthLimited", "stickyOnBreakpoint", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll", 'aria-label']);
|
|
12
|
-
const { height, getVerticalBreakpoint } = React.useContext(PageContext_1.PageContext);
|
|
13
|
-
React.useEffect(() => {
|
|
14
|
-
if (hasOverflowScroll && !ariaLabel) {
|
|
15
|
-
/* eslint-disable no-console */
|
|
16
|
-
console.warn('PageNavigation: An accessible aria-label is required when hasOverflowScroll is set to true.');
|
|
17
|
-
}
|
|
18
|
-
}, [hasOverflowScroll, ariaLabel]);
|
|
19
|
-
return (React.createElement("div", Object.assign({ className: (0, react_styles_1.css)(page_1.default.pageMainNav, (0, util_1.formatBreakpointMods)(stickyOnBreakpoint, page_1.default, 'sticky-', getVerticalBreakpoint(height), true), isWidthLimited && page_1.default.modifiers.limitWidth, hasShadowTop && page_1.default.modifiers.shadowTop, hasShadowBottom && page_1.default.modifiers.shadowBottom, hasOverflowScroll && page_1.default.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0, role: 'region', 'aria-label': ariaLabel }), props),
|
|
20
|
-
isWidthLimited && React.createElement("div", { className: (0, react_styles_1.css)(page_1.default.pageMainBody) }, children),
|
|
21
|
-
!isWidthLimited && children));
|
|
22
|
-
};
|
|
23
|
-
exports.PageNavigation = PageNavigation;
|
|
24
|
-
exports.PageNavigation.displayName = 'PageNavigation';
|
|
25
|
-
//# sourceMappingURL=PageNavigation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PageNavigation.js","sourceRoot":"","sources":["../../../../src/components/Page/PageNavigation.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,qGAAuE;AACvE,6CAA0D;AAC1D,+CAA4C;AA4BrC,MAAM,cAAc,GAAG,CAAC,EAUT,EAAE,EAAE;QAVK,EAC7B,SAAS,GAAG,EAAE,EACd,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,YAAY,GAAG,KAAK,EACpB,eAAe,GAAG,KAAK,EACvB,iBAAiB,GAAG,KAAK,EACzB,YAAY,EAAE,SAAS,OAEH,EADjB,KAAK,sBATqB,uIAU9B,CADS;IAER,MAAM,EAAE,MAAM,EAAE,qBAAqB,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,yBAAW,CAAC,CAAC;IAExE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,iBAAiB,IAAI,CAAC,SAAS,EAAE,CAAC;YACpC,+BAA+B;YAC/B,OAAO,CAAC,IAAI,CAAC,6FAA6F,CAAC,CAAC;QAC9G,CAAC;IACH,CAAC,EAAE,CAAC,iBAAiB,EAAE,SAAS,CAAC,CAAC,CAAC;IAEnC,OAAO,CACL,2CACE,SAAS,EAAE,IAAA,kBAAG,EACZ,cAAM,CAAC,WAAW,EAClB,IAAA,2BAAoB,EAAC,kBAAkB,EAAE,cAAM,EAAE,SAAS,EAAE,qBAAqB,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,EAChG,cAAc,IAAI,cAAM,CAAC,SAAS,CAAC,UAAU,EAC7C,YAAY,IAAI,cAAM,CAAC,SAAS,CAAC,SAAS,EAC1C,eAAe,IAAI,cAAM,CAAC,SAAS,CAAC,YAAY,EAChD,iBAAiB,IAAI,cAAM,CAAC,SAAS,CAAC,cAAc,EACpD,SAAS,CACV,IACG,CAAC,iBAAiB,IAAI,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC,EAC/E,KAAK;QAER,cAAc,IAAI,6BAAK,SAAS,EAAE,IAAA,kBAAG,EAAC,cAAM,CAAC,YAAY,CAAC,IAAG,QAAQ,CAAO;QAC5E,CAAC,cAAc,IAAI,QAAQ,CACxB,CACP,CAAC;AACJ,CAAC,CAAC;AAtCW,QAAA,cAAc,kBAsCzB;AACF,sBAAc,CAAC,WAAW,GAAG,gBAAgB,CAAC"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { css } from '@patternfly/react-styles';
|
|
3
|
-
import styles from '@patternfly/react-styles/css/components/Page/page';
|
|
4
|
-
import { formatBreakpointMods } from '../../helpers/util';
|
|
5
|
-
import { PageContext } from './PageContext';
|
|
6
|
-
|
|
7
|
-
export interface PageNavigationProps extends React.HTMLProps<HTMLDivElement> {
|
|
8
|
-
/** Additional classes to apply to the PageNavigation */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** Content rendered inside of the PageNavigation */
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
/** Limits the width of the PageNavigation */
|
|
13
|
-
isWidthLimited?: boolean;
|
|
14
|
-
/** Modifier indicating if the PageBreadcrumb is sticky to the top or bottom at various breakpoints */
|
|
15
|
-
stickyOnBreakpoint?: {
|
|
16
|
-
default?: 'top' | 'bottom';
|
|
17
|
-
sm?: 'top' | 'bottom';
|
|
18
|
-
md?: 'top' | 'bottom';
|
|
19
|
-
lg?: 'top' | 'bottom';
|
|
20
|
-
xl?: 'top' | 'bottom';
|
|
21
|
-
'2xl'?: 'top' | 'bottom';
|
|
22
|
-
};
|
|
23
|
-
/** Flag indicating if PageNavigation should have a shadow at the top */
|
|
24
|
-
hasShadowTop?: boolean;
|
|
25
|
-
/** Flag indicating if PageNavigation should have a shadow at the bottom */
|
|
26
|
-
hasShadowBottom?: boolean;
|
|
27
|
-
/** Flag indicating if the PageNavigation has a scrolling overflow */
|
|
28
|
-
hasOverflowScroll?: boolean;
|
|
29
|
-
/** Adds an accessible name to the page navigation when the hasOverflowScroll prop is set to true. */
|
|
30
|
-
'aria-label'?: string;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export const PageNavigation = ({
|
|
34
|
-
className = '',
|
|
35
|
-
children,
|
|
36
|
-
isWidthLimited,
|
|
37
|
-
stickyOnBreakpoint,
|
|
38
|
-
hasShadowTop = false,
|
|
39
|
-
hasShadowBottom = false,
|
|
40
|
-
hasOverflowScroll = false,
|
|
41
|
-
'aria-label': ariaLabel,
|
|
42
|
-
...props
|
|
43
|
-
}: PageNavigationProps) => {
|
|
44
|
-
const { height, getVerticalBreakpoint } = React.useContext(PageContext);
|
|
45
|
-
|
|
46
|
-
React.useEffect(() => {
|
|
47
|
-
if (hasOverflowScroll && !ariaLabel) {
|
|
48
|
-
/* eslint-disable no-console */
|
|
49
|
-
console.warn('PageNavigation: An accessible aria-label is required when hasOverflowScroll is set to true.');
|
|
50
|
-
}
|
|
51
|
-
}, [hasOverflowScroll, ariaLabel]);
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<div
|
|
55
|
-
className={css(
|
|
56
|
-
styles.pageMainNav,
|
|
57
|
-
formatBreakpointMods(stickyOnBreakpoint, styles, 'sticky-', getVerticalBreakpoint(height), true),
|
|
58
|
-
isWidthLimited && styles.modifiers.limitWidth,
|
|
59
|
-
hasShadowTop && styles.modifiers.shadowTop,
|
|
60
|
-
hasShadowBottom && styles.modifiers.shadowBottom,
|
|
61
|
-
hasOverflowScroll && styles.modifiers.overflowScroll,
|
|
62
|
-
className
|
|
63
|
-
)}
|
|
64
|
-
{...(hasOverflowScroll && { tabIndex: 0, role: 'region', 'aria-label': ariaLabel })}
|
|
65
|
-
{...props}
|
|
66
|
-
>
|
|
67
|
-
{isWidthLimited && <div className={css(styles.pageMainBody)}>{children}</div>}
|
|
68
|
-
{!isWidthLimited && children}
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
};
|
|
72
|
-
PageNavigation.displayName = 'PageNavigation';
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { render, screen } from '@testing-library/react';
|
|
3
|
-
import { PageNavigation } from '../PageNavigation';
|
|
4
|
-
|
|
5
|
-
describe('page navigation', () => {
|
|
6
|
-
test('Verify basic render', () => {
|
|
7
|
-
const { asFragment } = render(<PageNavigation>test</PageNavigation>);
|
|
8
|
-
expect(asFragment()).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
test('Verify limited width', () => {
|
|
11
|
-
const { asFragment } = render(<PageNavigation isWidthLimited>test</PageNavigation>);
|
|
12
|
-
expect(asFragment()).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
test('Verify top sticky', () => {
|
|
15
|
-
const { asFragment } = render(<PageNavigation stickyOnBreakpoint={{ default: 'top' }}>test</PageNavigation>);
|
|
16
|
-
expect(asFragment()).toMatchSnapshot();
|
|
17
|
-
});
|
|
18
|
-
test('Verify bottom sticky', () => {
|
|
19
|
-
const { asFragment } = render(<PageNavigation stickyOnBreakpoint={{ default: 'bottom' }}>test</PageNavigation>);
|
|
20
|
-
expect(asFragment()).toMatchSnapshot();
|
|
21
|
-
});
|
|
22
|
-
test('Verify top shadow', () => {
|
|
23
|
-
const { asFragment } = render(<PageNavigation hasShadowTop>test</PageNavigation>);
|
|
24
|
-
expect(asFragment()).toMatchSnapshot();
|
|
25
|
-
});
|
|
26
|
-
test('Verify bottom shadow', () => {
|
|
27
|
-
const { asFragment } = render(<PageNavigation hasShadowBottom>test</PageNavigation>);
|
|
28
|
-
expect(asFragment()).toMatchSnapshot();
|
|
29
|
-
});
|
|
30
|
-
test('Verify overflow scroll', () => {
|
|
31
|
-
const { asFragment } = render(<PageNavigation hasOverflowScroll>test</PageNavigation>);
|
|
32
|
-
expect(asFragment()).toMatchSnapshot();
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
test('Renders without an aria-label by default', () => {
|
|
36
|
-
render(<PageNavigation>test</PageNavigation>);
|
|
37
|
-
|
|
38
|
-
expect(screen.getByText('test')).not.toHaveAccessibleName('Test label');
|
|
39
|
-
});
|
|
40
|
-
|
|
41
|
-
test('Renders with the passed aria-label applied', () => {
|
|
42
|
-
render(
|
|
43
|
-
<PageNavigation aria-label="Test label" hasOverflowScroll>
|
|
44
|
-
test
|
|
45
|
-
</PageNavigation>
|
|
46
|
-
);
|
|
47
|
-
|
|
48
|
-
expect(screen.getByText('test')).toHaveAccessibleName('Test label');
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
test('Does not log a warning in the console by default', () => {
|
|
52
|
-
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();
|
|
53
|
-
|
|
54
|
-
render(<PageNavigation>test</PageNavigation>);
|
|
55
|
-
|
|
56
|
-
expect(consoleWarning).not.toHaveBeenCalled();
|
|
57
|
-
});
|
|
58
|
-
|
|
59
|
-
test('Does not log a warning in the console when an aria-label is included with hasOverflowScroll', () => {
|
|
60
|
-
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();
|
|
61
|
-
|
|
62
|
-
render(
|
|
63
|
-
<PageNavigation hasOverflowScroll aria-label="Test label">
|
|
64
|
-
test
|
|
65
|
-
</PageNavigation>
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
expect(consoleWarning).not.toHaveBeenCalled();
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
test('Logs a warning in the console when an aria-label is not included with hasOverflowScroll', () => {
|
|
72
|
-
const consoleWarning = jest.spyOn(console, 'warn').mockImplementation();
|
|
73
|
-
|
|
74
|
-
render(<PageNavigation hasOverflowScroll>test</PageNavigation>);
|
|
75
|
-
|
|
76
|
-
expect(consoleWarning).toHaveBeenCalled();
|
|
77
|
-
});
|
|
78
|
-
});
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`page navigation Verify basic render 1`] = `
|
|
4
|
-
<DocumentFragment>
|
|
5
|
-
<div
|
|
6
|
-
class="pf-v6-c-page__main-nav"
|
|
7
|
-
>
|
|
8
|
-
test
|
|
9
|
-
</div>
|
|
10
|
-
</DocumentFragment>
|
|
11
|
-
`;
|
|
12
|
-
|
|
13
|
-
exports[`page navigation Verify bottom shadow 1`] = `
|
|
14
|
-
<DocumentFragment>
|
|
15
|
-
<div
|
|
16
|
-
class="pf-v6-c-page__main-nav pf-m-shadow-bottom"
|
|
17
|
-
>
|
|
18
|
-
test
|
|
19
|
-
</div>
|
|
20
|
-
</DocumentFragment>
|
|
21
|
-
`;
|
|
22
|
-
|
|
23
|
-
exports[`page navigation Verify bottom sticky 1`] = `
|
|
24
|
-
<DocumentFragment>
|
|
25
|
-
<div
|
|
26
|
-
class="pf-v6-c-page__main-nav pf-m-sticky-bottom"
|
|
27
|
-
>
|
|
28
|
-
test
|
|
29
|
-
</div>
|
|
30
|
-
</DocumentFragment>
|
|
31
|
-
`;
|
|
32
|
-
|
|
33
|
-
exports[`page navigation Verify limited width 1`] = `
|
|
34
|
-
<DocumentFragment>
|
|
35
|
-
<div
|
|
36
|
-
class="pf-v6-c-page__main-nav pf-m-limit-width"
|
|
37
|
-
>
|
|
38
|
-
<div
|
|
39
|
-
class="pf-v6-c-page__main-body"
|
|
40
|
-
>
|
|
41
|
-
test
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
</DocumentFragment>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
exports[`page navigation Verify overflow scroll 1`] = `
|
|
48
|
-
<DocumentFragment>
|
|
49
|
-
<div
|
|
50
|
-
class="pf-v6-c-page__main-nav pf-m-overflow-scroll"
|
|
51
|
-
role="region"
|
|
52
|
-
tabindex="0"
|
|
53
|
-
>
|
|
54
|
-
test
|
|
55
|
-
</div>
|
|
56
|
-
</DocumentFragment>
|
|
57
|
-
`;
|
|
58
|
-
|
|
59
|
-
exports[`page navigation Verify top shadow 1`] = `
|
|
60
|
-
<DocumentFragment>
|
|
61
|
-
<div
|
|
62
|
-
class="pf-v6-c-page__main-nav pf-m-shadow-top"
|
|
63
|
-
>
|
|
64
|
-
test
|
|
65
|
-
</div>
|
|
66
|
-
</DocumentFragment>
|
|
67
|
-
`;
|
|
68
|
-
|
|
69
|
-
exports[`page navigation Verify top sticky 1`] = `
|
|
70
|
-
<DocumentFragment>
|
|
71
|
-
<div
|
|
72
|
-
class="pf-v6-c-page__main-nav pf-m-sticky-top"
|
|
73
|
-
>
|
|
74
|
-
test
|
|
75
|
-
</div>
|
|
76
|
-
</DocumentFragment>
|
|
77
|
-
`;
|