@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
|
@@ -5,7 +5,11 @@ exports[`page breadcrumb Verify basic render 1`] = `
|
|
|
5
5
|
<section
|
|
6
6
|
class="pf-v6-c-page__main-breadcrumb"
|
|
7
7
|
>
|
|
8
|
-
|
|
8
|
+
<div
|
|
9
|
+
class="pf-v6-c-page__main-body"
|
|
10
|
+
>
|
|
11
|
+
test
|
|
12
|
+
</div>
|
|
9
13
|
</section>
|
|
10
14
|
</DocumentFragment>
|
|
11
15
|
`;
|
|
@@ -15,7 +19,11 @@ exports[`page breadcrumb Verify bottom shadow 1`] = `
|
|
|
15
19
|
<section
|
|
16
20
|
class="pf-v6-c-page__main-breadcrumb pf-m-shadow-bottom"
|
|
17
21
|
>
|
|
18
|
-
|
|
22
|
+
<div
|
|
23
|
+
class="pf-v6-c-page__main-body"
|
|
24
|
+
>
|
|
25
|
+
test
|
|
26
|
+
</div>
|
|
19
27
|
</section>
|
|
20
28
|
</DocumentFragment>
|
|
21
29
|
`;
|
|
@@ -25,7 +33,11 @@ exports[`page breadcrumb Verify bottom sticky 1`] = `
|
|
|
25
33
|
<section
|
|
26
34
|
class="pf-v6-c-page__main-breadcrumb pf-m-sticky-bottom"
|
|
27
35
|
>
|
|
28
|
-
|
|
36
|
+
<div
|
|
37
|
+
class="pf-v6-c-page__main-body"
|
|
38
|
+
>
|
|
39
|
+
test
|
|
40
|
+
</div>
|
|
29
41
|
</section>
|
|
30
42
|
</DocumentFragment>
|
|
31
43
|
`;
|
|
@@ -50,7 +62,11 @@ exports[`page breadcrumb Verify overflow scroll 1`] = `
|
|
|
50
62
|
class="pf-v6-c-page__main-breadcrumb pf-m-overflow-scroll"
|
|
51
63
|
tabindex="0"
|
|
52
64
|
>
|
|
53
|
-
|
|
65
|
+
<div
|
|
66
|
+
class="pf-v6-c-page__main-body"
|
|
67
|
+
>
|
|
68
|
+
test
|
|
69
|
+
</div>
|
|
54
70
|
</section>
|
|
55
71
|
</DocumentFragment>
|
|
56
72
|
`;
|
|
@@ -60,7 +76,11 @@ exports[`page breadcrumb Verify top shadow 1`] = `
|
|
|
60
76
|
<section
|
|
61
77
|
class="pf-v6-c-page__main-breadcrumb pf-m-shadow-top"
|
|
62
78
|
>
|
|
63
|
-
|
|
79
|
+
<div
|
|
80
|
+
class="pf-v6-c-page__main-body"
|
|
81
|
+
>
|
|
82
|
+
test
|
|
83
|
+
</div>
|
|
64
84
|
</section>
|
|
65
85
|
</DocumentFragment>
|
|
66
86
|
`;
|
|
@@ -70,7 +90,11 @@ exports[`page breadcrumb Verify top sticky 1`] = `
|
|
|
70
90
|
<section
|
|
71
91
|
class="pf-v6-c-page__main-breadcrumb pf-m-sticky-top"
|
|
72
92
|
>
|
|
73
|
-
|
|
93
|
+
<div
|
|
94
|
+
class="pf-v6-c-page__main-body"
|
|
95
|
+
>
|
|
96
|
+
test
|
|
97
|
+
</div>
|
|
74
98
|
</section>
|
|
75
99
|
</DocumentFragment>
|
|
76
100
|
`;
|
|
@@ -4,15 +4,23 @@ exports[`Check page main breadcrumb section against snapshot 1`] = `
|
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<section
|
|
6
6
|
class="pf-v6-c-page__main-breadcrumb"
|
|
7
|
-
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="pf-v6-c-page__main-body"
|
|
10
|
+
/>
|
|
11
|
+
</section>
|
|
8
12
|
</DocumentFragment>
|
|
9
13
|
`;
|
|
10
14
|
|
|
11
15
|
exports[`Check page main nav section against snapshot 1`] = `
|
|
12
16
|
<DocumentFragment>
|
|
13
17
|
<section
|
|
14
|
-
class="pf-v6-c-page__main-
|
|
15
|
-
|
|
18
|
+
class="pf-v6-c-page__main-section"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="pf-v6-c-page__main-body"
|
|
22
|
+
/>
|
|
23
|
+
</section>
|
|
16
24
|
</DocumentFragment>
|
|
17
25
|
`;
|
|
18
26
|
|
|
@@ -20,7 +28,11 @@ exports[`Check page main subnav section against snapshot 1`] = `
|
|
|
20
28
|
<DocumentFragment>
|
|
21
29
|
<section
|
|
22
30
|
class="pf-v6-c-page__main-subnav"
|
|
23
|
-
|
|
31
|
+
>
|
|
32
|
+
<div
|
|
33
|
+
class="pf-v6-c-page__main-body"
|
|
34
|
+
/>
|
|
35
|
+
</section>
|
|
24
36
|
</DocumentFragment>
|
|
25
37
|
`;
|
|
26
38
|
|
|
@@ -28,7 +40,11 @@ exports[`Check page main tabs section against snapshot 1`] = `
|
|
|
28
40
|
<DocumentFragment>
|
|
29
41
|
<section
|
|
30
42
|
class="pf-v6-c-page__main-tabs"
|
|
31
|
-
|
|
43
|
+
>
|
|
44
|
+
<div
|
|
45
|
+
class="pf-v6-c-page__main-body"
|
|
46
|
+
/>
|
|
47
|
+
</section>
|
|
32
48
|
</DocumentFragment>
|
|
33
49
|
`;
|
|
34
50
|
|
|
@@ -48,7 +64,11 @@ exports[`Check page section with fill and no padding example against snapshot 1`
|
|
|
48
64
|
<DocumentFragment>
|
|
49
65
|
<section
|
|
50
66
|
class="pf-v6-c-page__main-section pf-m-no-padding pf-m-fill"
|
|
51
|
-
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
class="pf-v6-c-page__main-body"
|
|
70
|
+
/>
|
|
71
|
+
</section>
|
|
52
72
|
</DocumentFragment>
|
|
53
73
|
`;
|
|
54
74
|
|
|
@@ -56,7 +76,11 @@ exports[`Check page section with fill example against snapshot 1`] = `
|
|
|
56
76
|
<DocumentFragment>
|
|
57
77
|
<section
|
|
58
78
|
class="pf-v6-c-page__main-section pf-m-fill"
|
|
59
|
-
|
|
79
|
+
>
|
|
80
|
+
<div
|
|
81
|
+
class="pf-v6-c-page__main-body"
|
|
82
|
+
/>
|
|
83
|
+
</section>
|
|
60
84
|
</DocumentFragment>
|
|
61
85
|
`;
|
|
62
86
|
|
|
@@ -76,7 +100,11 @@ exports[`Check page section with no fill example against snapshot 1`] = `
|
|
|
76
100
|
<DocumentFragment>
|
|
77
101
|
<section
|
|
78
102
|
class="pf-v6-c-page__main-section pf-m-no-fill"
|
|
79
|
-
|
|
103
|
+
>
|
|
104
|
+
<div
|
|
105
|
+
class="pf-v6-c-page__main-body"
|
|
106
|
+
/>
|
|
107
|
+
</section>
|
|
80
108
|
</DocumentFragment>
|
|
81
109
|
`;
|
|
82
110
|
|
|
@@ -84,7 +112,11 @@ exports[`Check page section with no padding example against snapshot 1`] = `
|
|
|
84
112
|
<DocumentFragment>
|
|
85
113
|
<section
|
|
86
114
|
class="pf-v6-c-page__main-section pf-m-no-padding"
|
|
87
|
-
|
|
115
|
+
>
|
|
116
|
+
<div
|
|
117
|
+
class="pf-v6-c-page__main-body"
|
|
118
|
+
/>
|
|
119
|
+
</section>
|
|
88
120
|
</DocumentFragment>
|
|
89
121
|
`;
|
|
90
122
|
|
|
@@ -93,7 +125,11 @@ exports[`Verify page section bottom shadow 1`] = `
|
|
|
93
125
|
<section
|
|
94
126
|
class="pf-v6-c-page__main-section pf-m-shadow-bottom"
|
|
95
127
|
>
|
|
96
|
-
|
|
128
|
+
<div
|
|
129
|
+
class="pf-v6-c-page__main-body"
|
|
130
|
+
>
|
|
131
|
+
test
|
|
132
|
+
</div>
|
|
97
133
|
</section>
|
|
98
134
|
</DocumentFragment>
|
|
99
135
|
`;
|
|
@@ -103,7 +139,11 @@ exports[`Verify page section bottom sticky 1`] = `
|
|
|
103
139
|
<section
|
|
104
140
|
class="pf-v6-c-page__main-section pf-m-sticky-bottom"
|
|
105
141
|
>
|
|
106
|
-
|
|
142
|
+
<div
|
|
143
|
+
class="pf-v6-c-page__main-body"
|
|
144
|
+
>
|
|
145
|
+
test
|
|
146
|
+
</div>
|
|
107
147
|
</section>
|
|
108
148
|
</DocumentFragment>
|
|
109
149
|
`;
|
|
@@ -114,7 +154,11 @@ exports[`Verify page section overflow scroll 1`] = `
|
|
|
114
154
|
class="pf-v6-c-page__main-section pf-m-overflow-scroll"
|
|
115
155
|
tabindex="0"
|
|
116
156
|
>
|
|
117
|
-
|
|
157
|
+
<div
|
|
158
|
+
class="pf-v6-c-page__main-body"
|
|
159
|
+
>
|
|
160
|
+
test
|
|
161
|
+
</div>
|
|
118
162
|
</section>
|
|
119
163
|
</DocumentFragment>
|
|
120
164
|
`;
|
|
@@ -124,7 +168,11 @@ exports[`Verify page section top shadow 1`] = `
|
|
|
124
168
|
<section
|
|
125
169
|
class="pf-v6-c-page__main-section pf-m-shadow-top"
|
|
126
170
|
>
|
|
127
|
-
|
|
171
|
+
<div
|
|
172
|
+
class="pf-v6-c-page__main-body"
|
|
173
|
+
>
|
|
174
|
+
test
|
|
175
|
+
</div>
|
|
128
176
|
</section>
|
|
129
177
|
</DocumentFragment>
|
|
130
178
|
`;
|
|
@@ -134,7 +182,11 @@ exports[`Verify page section top sticky 1`] = `
|
|
|
134
182
|
<section
|
|
135
183
|
class="pf-v6-c-page__main-section pf-m-sticky-top"
|
|
136
184
|
>
|
|
137
|
-
|
|
185
|
+
<div
|
|
186
|
+
class="pf-v6-c-page__main-body"
|
|
187
|
+
>
|
|
188
|
+
test
|
|
189
|
+
</div>
|
|
138
190
|
</section>
|
|
139
191
|
</DocumentFragment>
|
|
140
192
|
`;
|
|
@@ -3,16 +3,7 @@ id: Page
|
|
|
3
3
|
section: components
|
|
4
4
|
cssPrefix: pf-v5-c-page
|
|
5
5
|
propComponents:
|
|
6
|
-
[
|
|
7
|
-
'Page',
|
|
8
|
-
'PageSidebar',
|
|
9
|
-
'PageSidebarBody',
|
|
10
|
-
'PageSection',
|
|
11
|
-
'PageGroup',
|
|
12
|
-
'PageBreadcrumb',
|
|
13
|
-
'PageNavigation',
|
|
14
|
-
'PageToggleButton'
|
|
15
|
-
]
|
|
6
|
+
['Page', 'PageSidebar', 'PageSidebarBody', 'PageSection', 'PageGroup', 'PageBreadcrumb', 'PageToggleButton']
|
|
16
7
|
---
|
|
17
8
|
|
|
18
9
|
import BarsIcon from '@patternfly/react-icons/dist/js/icons/bars-icon';
|
|
@@ -107,7 +98,7 @@ This example shows all types of page sections.
|
|
|
107
98
|
|
|
108
99
|
To group page content sections, add 1 or more `<PageGroup>` components to a `<Page>`.
|
|
109
100
|
|
|
110
|
-
The following example adds a group containing `<
|
|
101
|
+
The following example adds a group containing `<PageBreadcrumb>` and `<PageSection>` components.
|
|
111
102
|
|
|
112
103
|
To add additional components and information to a group, you may use the following properties:
|
|
113
104
|
|
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
PageSection,
|
|
12
12
|
PageGroup,
|
|
13
13
|
PageBreadcrumb,
|
|
14
|
-
PageNavigation,
|
|
15
14
|
PageToggleButton,
|
|
16
15
|
Breadcrumb,
|
|
17
16
|
BreadcrumbItem,
|
|
@@ -70,27 +69,25 @@ export const PageGroupSection: React.FunctionComponent = () => {
|
|
|
70
69
|
return (
|
|
71
70
|
<Page masthead={masthead} sidebar={sidebar}>
|
|
72
71
|
<PageGroup>
|
|
73
|
-
<
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</Nav>
|
|
93
|
-
</PageNavigation>
|
|
72
|
+
<Nav aria-label="Group section navigation" variant="horizontal-subnav">
|
|
73
|
+
<NavList>
|
|
74
|
+
<NavItem href="#" itemId={0} isActive>
|
|
75
|
+
System panel
|
|
76
|
+
</NavItem>
|
|
77
|
+
<NavItem href="#" itemId={1}>
|
|
78
|
+
Policy
|
|
79
|
+
</NavItem>
|
|
80
|
+
<NavItem href="#" itemId={2}>
|
|
81
|
+
Authentication
|
|
82
|
+
</NavItem>
|
|
83
|
+
<NavItem href="#" itemId={3}>
|
|
84
|
+
Network services
|
|
85
|
+
</NavItem>
|
|
86
|
+
<NavItem href="#" itemId={4}>
|
|
87
|
+
Server
|
|
88
|
+
</NavItem>
|
|
89
|
+
</NavList>
|
|
90
|
+
</Nav>
|
|
94
91
|
<PageBreadcrumb>
|
|
95
92
|
<Breadcrumb>
|
|
96
93
|
<BreadcrumbItem>Section home</BreadcrumbItem>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export * from './Page';
|
|
2
|
+
export * from './PageBody';
|
|
2
3
|
export * from './PageBreadcrumb';
|
|
3
4
|
export * from './PageGroup';
|
|
4
5
|
export * from './PageSidebar';
|
|
5
6
|
export * from './PageSidebarBody';
|
|
6
7
|
export * from './PageSection';
|
|
7
|
-
export * from './PageNavigation';
|
|
8
8
|
export * from './PageToggleButton';
|
|
9
9
|
export * from './PageContext';
|
|
@@ -38,8 +38,6 @@ export interface ToolbarProps extends React.HTMLProps<HTMLDivElement>, OUIAProps
|
|
|
38
38
|
isFullHeight?: boolean;
|
|
39
39
|
/** Flag indicating the toolbar is static */
|
|
40
40
|
isStatic?: boolean;
|
|
41
|
-
/** Flag indicating the toolbar should use the Page insets */
|
|
42
|
-
usePageInsets?: boolean;
|
|
43
41
|
/** Flag indicating the toolbar should stick to the top of its container */
|
|
44
42
|
isSticky?: boolean;
|
|
45
43
|
/** Insets at various breakpoints. */
|
|
@@ -140,7 +138,6 @@ class Toolbar extends React.Component<ToolbarProps, ToolbarState> {
|
|
|
140
138
|
isFullHeight,
|
|
141
139
|
isStatic,
|
|
142
140
|
inset,
|
|
143
|
-
usePageInsets,
|
|
144
141
|
isSticky,
|
|
145
142
|
ouiaId,
|
|
146
143
|
numberOfFiltersText,
|
|
@@ -164,7 +161,6 @@ class Toolbar extends React.Component<ToolbarProps, ToolbarState> {
|
|
|
164
161
|
styles.toolbar,
|
|
165
162
|
isFullHeight && styles.modifiers.fullHeight,
|
|
166
163
|
isStatic && styles.modifiers.static,
|
|
167
|
-
usePageInsets && styles.modifiers.pageInsets,
|
|
168
164
|
isSticky && styles.modifiers.sticky,
|
|
169
165
|
formatBreakpointMods(inset, styles, '', getBreakpoint(width)),
|
|
170
166
|
colorVariant === 'primary' && styles.modifiers.primary,
|
|
@@ -16,8 +16,6 @@ export interface ToolbarContentProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
16
16
|
xl?: 'hidden' | 'visible';
|
|
17
17
|
'2xl'?: 'hidden' | 'visible';
|
|
18
18
|
};
|
|
19
|
-
/** Vertical alignment. */
|
|
20
|
-
alignSelf?: 'start' | 'center' | 'baseline' | 'default';
|
|
21
19
|
/** Vertical alignment of children */
|
|
22
20
|
alignItems?: 'start' | 'center' | 'baseline' | 'default';
|
|
23
21
|
/** Content to be rendered as children of the content row */
|
|
@@ -56,7 +54,6 @@ class ToolbarContent extends React.Component<ToolbarContentProps> {
|
|
|
56
54
|
clearAllFilters,
|
|
57
55
|
showClearFiltersButton,
|
|
58
56
|
clearFiltersButtonText,
|
|
59
|
-
alignSelf,
|
|
60
57
|
...props
|
|
61
58
|
} = this.props;
|
|
62
59
|
|
|
@@ -100,10 +97,7 @@ class ToolbarContent extends React.Component<ToolbarContentProps> {
|
|
|
100
97
|
styles.toolbarContentSection,
|
|
101
98
|
alignItems === 'center' && styles.modifiers.alignItemsCenter,
|
|
102
99
|
alignItems === 'start' && styles.modifiers.alignItemsStart,
|
|
103
|
-
alignItems === 'baseline' && styles.modifiers.alignItemsBaseline
|
|
104
|
-
alignSelf === 'center' && styles.modifiers.alignSelfCenter,
|
|
105
|
-
alignSelf === 'start' && styles.modifiers.alignSelfStart,
|
|
106
|
-
alignSelf === 'baseline' && styles.modifiers.alignSelfBaseline
|
|
100
|
+
alignItems === 'baseline' && styles.modifiers.alignItemsBaseline
|
|
107
101
|
)}
|
|
108
102
|
>
|
|
109
103
|
{children}
|
|
@@ -6,14 +6,23 @@ import { PageContext } from '../Page/PageContext';
|
|
|
6
6
|
|
|
7
7
|
export enum ToolbarGroupVariant {
|
|
8
8
|
'filter-group' = 'filter-group',
|
|
9
|
-
'
|
|
9
|
+
'action-group' = 'action-group',
|
|
10
|
+
'action-group-inline' = 'action-group-inline',
|
|
11
|
+
'action-group-plain' = 'action-group-plain',
|
|
12
|
+
'label-group' = 'label-group'
|
|
10
13
|
}
|
|
11
14
|
|
|
12
15
|
export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>, 'ref'> {
|
|
13
16
|
/** Classes applied to root element of the data toolbar group */
|
|
14
17
|
className?: string;
|
|
15
18
|
/** A type modifier which modifies spacing specifically depending on the type of group */
|
|
16
|
-
variant?:
|
|
19
|
+
variant?:
|
|
20
|
+
| ToolbarGroupVariant
|
|
21
|
+
| 'filter-group'
|
|
22
|
+
| 'action-group'
|
|
23
|
+
| 'action-group-inline'
|
|
24
|
+
| 'action-group-plain'
|
|
25
|
+
| 'label-group';
|
|
17
26
|
/** Visibility at various breakpoints. */
|
|
18
27
|
visibility?: {
|
|
19
28
|
default?: 'hidden' | 'visible';
|
|
@@ -24,16 +33,16 @@ export interface ToolbarGroupProps extends Omit<React.HTMLProps<HTMLDivElement>,
|
|
|
24
33
|
};
|
|
25
34
|
/** Applies to a child of a flex layout, and aligns that child (and any adjacent children on the other side of it) to one side of the main axis */
|
|
26
35
|
align?: {
|
|
27
|
-
default?: 'alignEnd' | 'alignStart';
|
|
28
|
-
md?: 'alignEnd' | 'alignStart';
|
|
29
|
-
lg?: 'alignEnd' | 'alignStart';
|
|
30
|
-
xl?: 'alignEnd' | 'alignStart';
|
|
31
|
-
'2xl'?: 'alignEnd' | 'alignStart';
|
|
36
|
+
default?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
37
|
+
md?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
38
|
+
lg?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
39
|
+
xl?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
40
|
+
'2xl'?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
32
41
|
};
|
|
33
42
|
/** Vertical alignment of children */
|
|
34
|
-
alignItems?: 'start' | 'center' | 'baseline' | 'default';
|
|
43
|
+
alignItems?: 'start' | 'center' | 'baseline' | 'default' | 'end' | 'stretch';
|
|
35
44
|
/** Vertical alignment */
|
|
36
|
-
alignSelf?: 'start' | 'center' | 'baseline' | 'default';
|
|
45
|
+
alignSelf?: 'start' | 'center' | 'baseline' | 'default' | 'end' | 'stretch';
|
|
37
46
|
/** Sets both the column and row gap at various breakpoints. */
|
|
38
47
|
gap?: {
|
|
39
48
|
default?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
|
|
@@ -180,7 +189,15 @@ class ToolbarGroupWithRef extends React.Component<ToolbarGroupProps> {
|
|
|
180
189
|
<div
|
|
181
190
|
className={css(
|
|
182
191
|
styles.toolbarGroup,
|
|
183
|
-
variant &&
|
|
192
|
+
variant &&
|
|
193
|
+
styles.modifiers[
|
|
194
|
+
toCamel(variant) as
|
|
195
|
+
| 'filterGroup'
|
|
196
|
+
| 'actionGroup'
|
|
197
|
+
| 'actionGroupInline'
|
|
198
|
+
| 'actionGroupPlain'
|
|
199
|
+
| 'labelGroup'
|
|
200
|
+
],
|
|
184
201
|
formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
|
|
185
202
|
formatBreakpointMods(align, styles, '', getBreakpoint(width)),
|
|
186
203
|
formatBreakpointMods(gap, styles, '', getBreakpoint(width)),
|
|
@@ -28,16 +28,16 @@ export interface ToolbarItemProps extends React.HTMLProps<HTMLDivElement> {
|
|
|
28
28
|
};
|
|
29
29
|
/** Applies to a child of a flex layout, and aligns that child (and any adjacent children on the other side of it) to one side of the main axis */
|
|
30
30
|
align?: {
|
|
31
|
-
default?: 'alignEnd' | 'alignStart';
|
|
32
|
-
md?: 'alignEnd' | 'alignStart';
|
|
33
|
-
lg?: 'alignEnd' | 'alignStart';
|
|
34
|
-
xl?: 'alignEnd' | 'alignStart';
|
|
35
|
-
'2xl'?: 'alignEnd' | 'alignStart';
|
|
31
|
+
default?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
32
|
+
md?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
33
|
+
lg?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
34
|
+
xl?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
35
|
+
'2xl'?: 'alignEnd' | 'alignStart' | 'alignCenter';
|
|
36
36
|
};
|
|
37
37
|
/** Vertical alignment of children */
|
|
38
|
-
alignItems?: 'start' | 'center' | 'baseline' | 'default';
|
|
38
|
+
alignItems?: 'start' | 'center' | 'baseline' | 'default' | 'end' | 'stretch';
|
|
39
39
|
/** Vertical alignment */
|
|
40
|
-
alignSelf?: 'start' | 'center' | 'baseline' | 'default';
|
|
40
|
+
alignSelf?: 'start' | 'center' | 'baseline' | 'default' | 'end' | 'stretch';
|
|
41
41
|
/** Sets both the column and row gap at various breakpoints. */
|
|
42
42
|
gap?: {
|
|
43
43
|
default?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
|
|
@@ -69,6 +69,8 @@ class ToolbarLabelGroupContent extends React.Component<ToolbarLabelGroupContentP
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
const isHidden = numberOfFilters === 0 || isExpanded;
|
|
72
|
+
const showNumberOfFilters = collapseListedFilters && numberOfFilters > 0 && !isExpanded;
|
|
73
|
+
const showDefaultClearFilter = showClearFiltersButton && !isExpanded && !customLabelGroupContent;
|
|
72
74
|
|
|
73
75
|
return (
|
|
74
76
|
<div
|
|
@@ -82,19 +84,19 @@ class ToolbarLabelGroupContent extends React.Component<ToolbarLabelGroupContentP
|
|
|
82
84
|
{...(collapseListedFilters && { hidden: true })}
|
|
83
85
|
{...(collapseListedFilters && { 'aria-hidden': true })}
|
|
84
86
|
/>
|
|
85
|
-
{
|
|
86
|
-
<ToolbarGroup>
|
|
87
|
-
<ToolbarItem>{numberOfFiltersText(numberOfFilters)}</ToolbarItem>
|
|
87
|
+
{(showNumberOfFilters || showDefaultClearFilter || customLabelGroupContent) && (
|
|
88
|
+
<ToolbarGroup variant="action-group-inline">
|
|
89
|
+
{showNumberOfFilters && <ToolbarItem>{numberOfFiltersText(numberOfFilters)}</ToolbarItem>}
|
|
90
|
+
{showDefaultClearFilter && (
|
|
91
|
+
<ToolbarItem>
|
|
92
|
+
<Button variant="link" onClick={clearLabelGroups} isInline>
|
|
93
|
+
{clearFiltersButtonText}
|
|
94
|
+
</Button>
|
|
95
|
+
</ToolbarItem>
|
|
96
|
+
)}
|
|
97
|
+
{customLabelGroupContent && customLabelGroupContent}
|
|
88
98
|
</ToolbarGroup>
|
|
89
99
|
)}
|
|
90
|
-
{showClearFiltersButton && !isExpanded && !customLabelGroupContent && (
|
|
91
|
-
<ToolbarItem>
|
|
92
|
-
<Button variant="link" onClick={clearLabelGroups} isInline>
|
|
93
|
-
{clearFiltersButtonText}
|
|
94
|
-
</Button>
|
|
95
|
-
</ToolbarItem>
|
|
96
|
-
)}
|
|
97
|
-
{customLabelGroupContent && customLabelGroupContent}
|
|
98
100
|
</div>
|
|
99
101
|
);
|
|
100
102
|
}
|
|
@@ -27,14 +27,6 @@ export interface ToolbarToggleGroupProps extends ToolbarGroupProps {
|
|
|
27
27
|
xl?: 'hidden' | 'visible';
|
|
28
28
|
'2xl'?: 'hidden' | 'visible';
|
|
29
29
|
};
|
|
30
|
-
/** Alignment at various breakpoints. */
|
|
31
|
-
alignment?: {
|
|
32
|
-
default?: 'alignEnd' | 'alignStart';
|
|
33
|
-
md?: 'alignEnd' | 'alignStart';
|
|
34
|
-
lg?: 'alignEnd' | 'alignStart';
|
|
35
|
-
xl?: 'alignEnd' | 'alignStart';
|
|
36
|
-
'2xl'?: 'alignEnd' | 'alignStart';
|
|
37
|
-
};
|
|
38
30
|
/** Sets both the column and row gap at various breakpoints. */
|
|
39
31
|
gap?: {
|
|
40
32
|
default?: 'gapNone' | 'gapXs' | 'gapSm' | 'gapMd' | 'gapLg' | 'gapXl' | 'gap_2xl' | 'gap_3xl' | 'gap_4xl';
|
|
@@ -176,7 +168,6 @@ class ToolbarToggleGroup extends React.Component<ToolbarToggleGroupProps> {
|
|
|
176
168
|
variant,
|
|
177
169
|
visibility,
|
|
178
170
|
breakpoint,
|
|
179
|
-
alignment,
|
|
180
171
|
gap,
|
|
181
172
|
columnGap,
|
|
182
173
|
rowGap,
|
|
@@ -260,10 +251,17 @@ class ToolbarToggleGroup extends React.Component<ToolbarToggleGroupProps> {
|
|
|
260
251
|
className={css(
|
|
261
252
|
styles.toolbarGroup,
|
|
262
253
|
styles.modifiers.toggleGroup,
|
|
263
|
-
variant &&
|
|
254
|
+
variant &&
|
|
255
|
+
styles.modifiers[
|
|
256
|
+
toCamel(variant) as
|
|
257
|
+
| 'filterGroup'
|
|
258
|
+
| 'actionGroup'
|
|
259
|
+
| 'actionGroupInline'
|
|
260
|
+
| 'actionGroupPlain'
|
|
261
|
+
| 'labelGroup'
|
|
262
|
+
],
|
|
264
263
|
formatBreakpointMods(breakpointMod, styles, '', getBreakpoint(width)),
|
|
265
264
|
formatBreakpointMods(visibility, styles, '', getBreakpoint(width)),
|
|
266
|
-
formatBreakpointMods(alignment, styles, '', getBreakpoint(width)),
|
|
267
265
|
formatBreakpointMods(gap, styles, '', getBreakpoint(width)),
|
|
268
266
|
formatBreakpointMods(columnGap, styles, '', getBreakpoint(width)),
|
|
269
267
|
formatBreakpointMods(rowGap, styles, '', getBreakpoint(width)),
|
|
@@ -45,8 +45,8 @@ export const ToolbarContentContext = React.createContext<ToolbarContentContextPr
|
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
export const globalBreakpoints = {
|
|
48
|
-
md: parseInt(globalBreakpointMd.value),
|
|
49
|
-
lg: parseInt(globalBreakpointLg.value),
|
|
50
|
-
xl: parseInt(globalBreakpointXl.value),
|
|
51
|
-
'2xl': parseInt(globalBreakpoint2xl.value)
|
|
48
|
+
md: parseInt(globalBreakpointMd.value) * 16,
|
|
49
|
+
lg: parseInt(globalBreakpointLg.value) * 16,
|
|
50
|
+
xl: parseInt(globalBreakpointXl.value) * 16,
|
|
51
|
+
'2xl': parseInt(globalBreakpoint2xl.value) * 16
|
|
52
52
|
};
|
|
@@ -43,25 +43,6 @@ describe('Toolbar', () => {
|
|
|
43
43
|
expect(asFragment()).toMatchSnapshot();
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
it('should render with page inset flag', () => {
|
|
47
|
-
const items = (
|
|
48
|
-
<React.Fragment>
|
|
49
|
-
<ToolbarItem>Test</ToolbarItem>
|
|
50
|
-
<ToolbarItem>Test 2</ToolbarItem>
|
|
51
|
-
<ToolbarItem variant="separator" />
|
|
52
|
-
<ToolbarItem>Test 3 </ToolbarItem>
|
|
53
|
-
</React.Fragment>
|
|
54
|
-
);
|
|
55
|
-
|
|
56
|
-
const { asFragment } = render(
|
|
57
|
-
<Toolbar id="toolbar" usePageInsets>
|
|
58
|
-
<ToolbarContent>{items}</ToolbarContent>
|
|
59
|
-
</Toolbar>
|
|
60
|
-
);
|
|
61
|
-
|
|
62
|
-
expect(asFragment()).toMatchSnapshot();
|
|
63
|
-
});
|
|
64
|
-
|
|
65
46
|
it('should render with custom label content', () => {
|
|
66
47
|
const items = (
|
|
67
48
|
<React.Fragment>
|