@patternfly/react-core 4.228.1 → 4.230.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -0
- package/dist/esm/components/ContextSelector/ContextSelector.d.ts +4 -2
- package/dist/esm/components/ContextSelector/ContextSelector.d.ts.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelectorToggle.d.ts +4 -2
- package/dist/esm/components/ContextSelector/ContextSelectorToggle.d.ts.map +1 -1
- package/dist/esm/components/ContextSelector/ContextSelectorToggle.js.map +1 -1
- package/dist/esm/components/DescriptionList/DescriptionList.d.ts +4 -0
- package/dist/esm/components/DescriptionList/DescriptionList.d.ts.map +1 -1
- package/dist/esm/components/DescriptionList/DescriptionList.js +5 -2
- package/dist/esm/components/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/esm/components/DescriptionList/DescriptionListGroup.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts +13 -0
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +18 -19
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.d.ts +11 -2
- package/dist/esm/components/Page/PageBreadcrumb.d.ts.map +1 -1
- package/dist/esm/components/Page/PageBreadcrumb.js +5 -2
- package/dist/esm/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/esm/components/Page/PageGroup.d.ts +11 -2
- package/dist/esm/components/Page/PageGroup.d.ts.map +1 -1
- package/dist/esm/components/Page/PageGroup.js +5 -2
- package/dist/esm/components/Page/PageGroup.js.map +1 -1
- package/dist/esm/components/Page/PageNavigation.d.ts +11 -2
- package/dist/esm/components/Page/PageNavigation.d.ts.map +1 -1
- package/dist/esm/components/Page/PageNavigation.js +5 -2
- package/dist/esm/components/Page/PageNavigation.js.map +1 -1
- package/dist/esm/components/Page/PageSection.d.ts +10 -1
- package/dist/esm/components/Page/PageSection.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSection.js +4 -2
- package/dist/esm/components/Page/PageSection.js.map +1 -1
- package/dist/esm/helpers/constants.d.ts +14 -0
- package/dist/esm/helpers/constants.d.ts.map +1 -1
- package/dist/esm/helpers/constants.js +24 -0
- package/dist/esm/helpers/constants.js.map +1 -1
- package/dist/esm/helpers/util.d.ts +8 -1
- package/dist/esm/helpers/util.d.ts.map +1 -1
- package/dist/esm/helpers/util.js +36 -9
- package/dist/esm/helpers/util.js.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelector.d.ts +4 -2
- package/dist/js/components/ContextSelector/ContextSelector.d.ts.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelectorToggle.d.ts +4 -2
- package/dist/js/components/ContextSelector/ContextSelectorToggle.d.ts.map +1 -1
- package/dist/js/components/ContextSelector/ContextSelectorToggle.js.map +1 -1
- package/dist/js/components/DescriptionList/DescriptionList.d.ts +4 -0
- package/dist/js/components/DescriptionList/DescriptionList.d.ts.map +1 -1
- package/dist/js/components/DescriptionList/DescriptionList.js +5 -2
- package/dist/js/components/DescriptionList/DescriptionList.js.map +1 -1
- package/dist/js/components/DescriptionList/DescriptionListGroup.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +13 -0
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +17 -18
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageBreadcrumb.d.ts +11 -2
- package/dist/js/components/Page/PageBreadcrumb.d.ts.map +1 -1
- package/dist/js/components/Page/PageBreadcrumb.js +5 -2
- package/dist/js/components/Page/PageBreadcrumb.js.map +1 -1
- package/dist/js/components/Page/PageGroup.d.ts +11 -2
- package/dist/js/components/Page/PageGroup.d.ts.map +1 -1
- package/dist/js/components/Page/PageGroup.js +5 -2
- package/dist/js/components/Page/PageGroup.js.map +1 -1
- package/dist/js/components/Page/PageNavigation.d.ts +11 -2
- package/dist/js/components/Page/PageNavigation.d.ts.map +1 -1
- package/dist/js/components/Page/PageNavigation.js +5 -2
- package/dist/js/components/Page/PageNavigation.js.map +1 -1
- package/dist/js/components/Page/PageSection.d.ts +10 -1
- package/dist/js/components/Page/PageSection.d.ts.map +1 -1
- package/dist/js/components/Page/PageSection.js +4 -2
- package/dist/js/components/Page/PageSection.js.map +1 -1
- package/dist/js/helpers/constants.d.ts +14 -0
- package/dist/js/helpers/constants.d.ts.map +1 -1
- package/dist/js/helpers/constants.js +26 -1
- package/dist/js/helpers/constants.js.map +1 -1
- package/dist/js/helpers/util.d.ts +8 -1
- package/dist/js/helpers/util.d.ts.map +1 -1
- package/dist/js/helpers/util.js +37 -9
- package/dist/js/helpers/util.js.map +1 -1
- package/dist/umd/react-core.css +119 -69
- package/dist/umd/react-core.js +160 -67
- package/dist/umd/react-core.min.css +438 -388
- package/dist/umd/react-core.min.js +6 -5
- package/package.json +6 -6
- package/src/components/ContextSelector/ContextSelector.tsx +4 -2
- package/src/components/ContextSelector/ContextSelectorToggle.tsx +4 -2
- package/src/components/DescriptionList/DescriptionList.tsx +14 -0
- package/src/components/DescriptionList/DescriptionListGroup.tsx +1 -0
- package/src/components/DescriptionList/examples/DescriptionList.md +31 -1
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCard.tsx +63 -0
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardHorizontalTermWidth.tsx +34 -0
- package/src/components/DescriptionList/examples/DescriptionListDisplaySizeAndCardThreeColumn.tsx +34 -0
- package/src/components/DescriptionList/examples/DescriptionListWithCard.tsx +62 -0
- package/src/components/DescriptionList/examples/DescriptionListWithDisplaySize.tsx +63 -0
- package/src/components/Page/Page.tsx +58 -21
- package/src/components/Page/PageBreadcrumb.tsx +37 -20
- package/src/components/Page/PageGroup.tsx +35 -19
- package/src/components/Page/PageNavigation.tsx +37 -20
- package/src/components/Page/PageSection.tsx +41 -25
- package/src/components/Page/__tests__/Page.test.tsx +126 -2
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +683 -14
- package/src/demos/Page/Page.md +356 -3
- package/src/helpers/constants.ts +28 -0
- package/src/helpers/util.ts +44 -9
package/dist/umd/react-core.js
CHANGED
|
@@ -101,6 +101,76 @@
|
|
|
101
101
|
"backdropOpen": "pf-c-backdrop__open"
|
|
102
102
|
};
|
|
103
103
|
|
|
104
|
+
const global_breakpoint_sm = {
|
|
105
|
+
"name": "--pf-global--breakpoint--sm",
|
|
106
|
+
"value": "576px",
|
|
107
|
+
"var": "var(--pf-global--breakpoint--sm)"
|
|
108
|
+
};
|
|
109
|
+
var globalBreakpointSm = global_breakpoint_sm;
|
|
110
|
+
|
|
111
|
+
const global_breakpoint_md = {
|
|
112
|
+
"name": "--pf-global--breakpoint--md",
|
|
113
|
+
"value": "768px",
|
|
114
|
+
"var": "var(--pf-global--breakpoint--md)"
|
|
115
|
+
};
|
|
116
|
+
var globalBreakpointMd = global_breakpoint_md;
|
|
117
|
+
|
|
118
|
+
const global_breakpoint_lg = {
|
|
119
|
+
"name": "--pf-global--breakpoint--lg",
|
|
120
|
+
"value": "992px",
|
|
121
|
+
"var": "var(--pf-global--breakpoint--lg)"
|
|
122
|
+
};
|
|
123
|
+
var globalBreakpointLg = global_breakpoint_lg;
|
|
124
|
+
|
|
125
|
+
const global_breakpoint_xl = {
|
|
126
|
+
"name": "--pf-global--breakpoint--xl",
|
|
127
|
+
"value": "1200px",
|
|
128
|
+
"var": "var(--pf-global--breakpoint--xl)"
|
|
129
|
+
};
|
|
130
|
+
var globalBreakpointXl = global_breakpoint_xl;
|
|
131
|
+
|
|
132
|
+
const global_breakpoint_2xl = {
|
|
133
|
+
"name": "--pf-global--breakpoint--2xl",
|
|
134
|
+
"value": "1450px",
|
|
135
|
+
"var": "var(--pf-global--breakpoint--2xl)"
|
|
136
|
+
};
|
|
137
|
+
var globalBreakpoint2xl = global_breakpoint_2xl;
|
|
138
|
+
|
|
139
|
+
const global_height_breakpoint_sm = {
|
|
140
|
+
"name": "--pf-global--height-breakpoint--sm",
|
|
141
|
+
"value": "0",
|
|
142
|
+
"var": "var(--pf-global--height-breakpoint--sm)"
|
|
143
|
+
};
|
|
144
|
+
var globalHeightBreakpointSm = global_height_breakpoint_sm;
|
|
145
|
+
|
|
146
|
+
const global_height_breakpoint_md = {
|
|
147
|
+
"name": "--pf-global--height-breakpoint--md",
|
|
148
|
+
"value": "40rem",
|
|
149
|
+
"var": "var(--pf-global--height-breakpoint--md)"
|
|
150
|
+
};
|
|
151
|
+
var globalHeightBreakpointMd = global_height_breakpoint_md;
|
|
152
|
+
|
|
153
|
+
const global_height_breakpoint_lg = {
|
|
154
|
+
"name": "--pf-global--height-breakpoint--lg",
|
|
155
|
+
"value": "48rem",
|
|
156
|
+
"var": "var(--pf-global--height-breakpoint--lg)"
|
|
157
|
+
};
|
|
158
|
+
var globalHeightBreakpointLg = global_height_breakpoint_lg;
|
|
159
|
+
|
|
160
|
+
const global_height_breakpoint_xl = {
|
|
161
|
+
"name": "--pf-global--height-breakpoint--xl",
|
|
162
|
+
"value": "60rem",
|
|
163
|
+
"var": "var(--pf-global--height-breakpoint--xl)"
|
|
164
|
+
};
|
|
165
|
+
var globalHeightBreakpointXl = global_height_breakpoint_xl;
|
|
166
|
+
|
|
167
|
+
const global_height_breakpoint_2xl = {
|
|
168
|
+
"name": "--pf-global--height-breakpoint--2xl",
|
|
169
|
+
"value": "80rem",
|
|
170
|
+
"var": "var(--pf-global--height-breakpoint--2xl)"
|
|
171
|
+
};
|
|
172
|
+
var globalHeightBreakpoint2xl = global_height_breakpoint_2xl;
|
|
173
|
+
|
|
104
174
|
const KEY_CODES = { ARROW_UP: 38, ARROW_DOWN: 40, ESCAPE_KEY: 27, TAB: 9, ENTER: 13, SPACE: 32 };
|
|
105
175
|
const SIDE = { RIGHT: 'right', LEFT: 'left', BOTH: 'both', NONE: 'none' };
|
|
106
176
|
const KEYHANDLER_DIRECTION = { UP: 'up', DOWN: 'down', RIGHT: 'right', LEFT: 'left' };
|
|
@@ -121,6 +191,20 @@
|
|
|
121
191
|
ArrowLeft: 'ArrowLeft',
|
|
122
192
|
ArrowRight: 'ArrowRight'
|
|
123
193
|
};
|
|
194
|
+
const globalWidthBreakpoints = {
|
|
195
|
+
sm: parseInt(globalBreakpointSm.value),
|
|
196
|
+
md: parseInt(globalBreakpointMd.value),
|
|
197
|
+
lg: parseInt(globalBreakpointLg.value),
|
|
198
|
+
xl: parseInt(globalBreakpointXl.value),
|
|
199
|
+
'2xl': parseInt(globalBreakpoint2xl.value)
|
|
200
|
+
};
|
|
201
|
+
const globalHeightBreakpoints = {
|
|
202
|
+
sm: parseInt(globalHeightBreakpointSm.value),
|
|
203
|
+
md: parseInt(globalHeightBreakpointMd.value),
|
|
204
|
+
lg: parseInt(globalHeightBreakpointLg.value),
|
|
205
|
+
xl: parseInt(globalHeightBreakpointXl.value),
|
|
206
|
+
'2xl': parseInt(globalHeightBreakpoint2xl.value)
|
|
207
|
+
};
|
|
124
208
|
|
|
125
209
|
/*!
|
|
126
210
|
* tabbable 5.3.3
|
|
@@ -1790,11 +1874,11 @@
|
|
|
1790
1874
|
* @param {object} mods The modifiers object
|
|
1791
1875
|
* @param {any} styles The appropriate styles object for the component
|
|
1792
1876
|
*/
|
|
1793
|
-
const formatBreakpointMods = (mods, styles, stylePrefix = '', breakpoint) => {
|
|
1877
|
+
const formatBreakpointMods = (mods, styles, stylePrefix = '', breakpoint, vertical) => {
|
|
1794
1878
|
if (!mods) {
|
|
1795
1879
|
return '';
|
|
1796
1880
|
}
|
|
1797
|
-
if (breakpoint) {
|
|
1881
|
+
if (breakpoint && !vertical) {
|
|
1798
1882
|
if (breakpoint in mods) {
|
|
1799
1883
|
return styles.modifiers[toCamel(`${stylePrefix}${mods[breakpoint]}`)];
|
|
1800
1884
|
}
|
|
@@ -1809,13 +1893,40 @@
|
|
|
1809
1893
|
return '';
|
|
1810
1894
|
}
|
|
1811
1895
|
return Object.entries(mods || {})
|
|
1812
|
-
.map(([breakpoint, mod]) => `${stylePrefix}${mod}${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}`)
|
|
1896
|
+
.map(([breakpoint, mod]) => `${stylePrefix}${mod}${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}${vertical && breakpoint !== 'default' ? '-height' : ''}`)
|
|
1813
1897
|
.map(toCamel)
|
|
1814
1898
|
.map(mod => mod.replace(/-?(\dxl)/gi, (_res, group) => `_${group}`))
|
|
1815
1899
|
.map(modifierKey => styles.modifiers[modifierKey])
|
|
1816
1900
|
.filter(Boolean)
|
|
1817
1901
|
.join(' ');
|
|
1818
1902
|
};
|
|
1903
|
+
/**
|
|
1904
|
+
* Return the breakpoint for the given height
|
|
1905
|
+
*
|
|
1906
|
+
* @param {number | null} height The height to check
|
|
1907
|
+
* @returns {'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'} The breakpoint
|
|
1908
|
+
*/
|
|
1909
|
+
const getVerticalBreakpoint = (height) => {
|
|
1910
|
+
if (height === null) {
|
|
1911
|
+
return null;
|
|
1912
|
+
}
|
|
1913
|
+
if (height >= globalHeightBreakpoints['2xl']) {
|
|
1914
|
+
return '2xl';
|
|
1915
|
+
}
|
|
1916
|
+
if (height >= globalHeightBreakpoints.xl) {
|
|
1917
|
+
return 'xl';
|
|
1918
|
+
}
|
|
1919
|
+
if (height >= globalHeightBreakpoints.lg) {
|
|
1920
|
+
return 'lg';
|
|
1921
|
+
}
|
|
1922
|
+
if (height >= globalHeightBreakpoints.md) {
|
|
1923
|
+
return 'md';
|
|
1924
|
+
}
|
|
1925
|
+
if (height >= globalHeightBreakpoints.sm) {
|
|
1926
|
+
return 'sm';
|
|
1927
|
+
}
|
|
1928
|
+
return 'default';
|
|
1929
|
+
};
|
|
1819
1930
|
/**
|
|
1820
1931
|
* Return the breakpoint for the given width
|
|
1821
1932
|
*
|
|
@@ -1826,19 +1937,19 @@
|
|
|
1826
1937
|
if (width === null) {
|
|
1827
1938
|
return null;
|
|
1828
1939
|
}
|
|
1829
|
-
if (width >=
|
|
1940
|
+
if (width >= globalWidthBreakpoints['2xl']) {
|
|
1830
1941
|
return '2xl';
|
|
1831
1942
|
}
|
|
1832
|
-
if (width >=
|
|
1943
|
+
if (width >= globalWidthBreakpoints.xl) {
|
|
1833
1944
|
return 'xl';
|
|
1834
1945
|
}
|
|
1835
|
-
if (width >=
|
|
1946
|
+
if (width >= globalWidthBreakpoints.lg) {
|
|
1836
1947
|
return 'lg';
|
|
1837
1948
|
}
|
|
1838
|
-
if (width >=
|
|
1949
|
+
if (width >= globalWidthBreakpoints.md) {
|
|
1839
1950
|
return 'md';
|
|
1840
1951
|
}
|
|
1841
|
-
if (width >=
|
|
1952
|
+
if (width >= globalWidthBreakpoints.sm) {
|
|
1842
1953
|
return 'sm';
|
|
1843
1954
|
}
|
|
1844
1955
|
return 'default';
|
|
@@ -10472,14 +10583,17 @@
|
|
|
10472
10583
|
return Object.keys(mods || {}).reduce((acc, curr) => curr === 'default' ? Object.assign(Object.assign({}, acc), { [prefix]: mods[curr] }) : Object.assign(Object.assign({}, acc), { [`${prefix}-on-${curr}`]: mods[curr] }), {});
|
|
10473
10584
|
};
|
|
10474
10585
|
const DescriptionList = (_a) => {
|
|
10475
|
-
var { className = '', children = null, isHorizontal = false, isAutoColumnWidths, isAutoFit, isInlineGrid, isCompact, isFluid, isFillColumns, columnModifier, autoFitMinModifier, horizontalTermWidthModifier, orientation, style } = _a, props = __rest$1(_a, ["className", "children", "isHorizontal", "isAutoColumnWidths", "isAutoFit", "isInlineGrid", "isCompact", "isFluid", "isFillColumns", "columnModifier", "autoFitMinModifier", "horizontalTermWidthModifier", "orientation", "style"]);
|
|
10586
|
+
var { className = '', children = null, isHorizontal = false, isAutoColumnWidths, isAutoFit, isInlineGrid, isCompact, isFluid, isFillColumns, displaySize, columnModifier, autoFitMinModifier, termWidth, horizontalTermWidthModifier, orientation, style } = _a, props = __rest$1(_a, ["className", "children", "isHorizontal", "isAutoColumnWidths", "isAutoFit", "isInlineGrid", "isCompact", "isFluid", "isFillColumns", "displaySize", "columnModifier", "autoFitMinModifier", "termWidth", "horizontalTermWidthModifier", "orientation", "style"]);
|
|
10476
10587
|
if (isAutoFit && autoFitMinModifier) {
|
|
10477
10588
|
style = Object.assign(Object.assign({}, style), setBreakpointModifiers('--pf-c-description-list--GridTemplateColumns--min', autoFitMinModifier));
|
|
10478
10589
|
}
|
|
10590
|
+
if (termWidth) {
|
|
10591
|
+
style = Object.assign(Object.assign({}, style), { '--pf-c-description-list__term--width': termWidth });
|
|
10592
|
+
}
|
|
10479
10593
|
if (isHorizontal && horizontalTermWidthModifier) {
|
|
10480
10594
|
style = Object.assign(Object.assign({}, style), setBreakpointModifiers('--pf-c-description-list--m-horizontal__term--width', horizontalTermWidthModifier));
|
|
10481
10595
|
}
|
|
10482
|
-
return (React__namespace.createElement("dl", Object.assign({ className: css(styles$M.descriptionList, (isHorizontal || isFluid) && styles$M.modifiers.horizontal, isAutoColumnWidths && styles$M.modifiers.autoColumnWidths, isAutoFit && styles$M.modifiers.autoFit, formatBreakpointMods(columnModifier, styles$M), formatBreakpointMods(orientation, styles$M), isInlineGrid && styles$M.modifiers.inlineGrid, isCompact && styles$M.modifiers.compact, isFluid && styles$M.modifiers.fluid, isFillColumns && styles$M.modifiers.fillColumns, className), style: style }, props), children));
|
|
10596
|
+
return (React__namespace.createElement("dl", Object.assign({ className: css(styles$M.descriptionList, (isHorizontal || isFluid) && styles$M.modifiers.horizontal, isAutoColumnWidths && styles$M.modifiers.autoColumnWidths, isAutoFit && styles$M.modifiers.autoFit, formatBreakpointMods(columnModifier, styles$M), formatBreakpointMods(orientation, styles$M), isInlineGrid && styles$M.modifiers.inlineGrid, isCompact && styles$M.modifiers.compact, isFluid && styles$M.modifiers.fluid, isFillColumns && styles$M.modifiers.fillColumns, displaySize === 'lg' && styles$M.modifiers.displayLg, displaySize === '2xl' && styles$M.modifiers.display_2xl, className), style: style }, props), children));
|
|
10483
10597
|
};
|
|
10484
10598
|
DescriptionList.displayName = 'DescriptionList';
|
|
10485
10599
|
|
|
@@ -15156,19 +15270,6 @@
|
|
|
15156
15270
|
"themeDark": "pf-theme-dark"
|
|
15157
15271
|
};
|
|
15158
15272
|
|
|
15159
|
-
const global_breakpoint_xl = {
|
|
15160
|
-
"name": "--pf-global--breakpoint--xl",
|
|
15161
|
-
"value": "1200px",
|
|
15162
|
-
"var": "var(--pf-global--breakpoint--xl)"
|
|
15163
|
-
};
|
|
15164
|
-
var globalBreakpointXl = global_breakpoint_xl;
|
|
15165
|
-
|
|
15166
|
-
const PageGroup = (_a) => {
|
|
15167
|
-
var { className = '', children, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
15168
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(styles$y.pageMainGroup, sticky === 'top' && styles$y.modifiers.stickyTop, sticky === 'bottom' && styles$y.modifiers.stickyBottom, hasShadowTop && styles$y.modifiers.shadowTop, hasShadowBottom && styles$y.modifiers.shadowBottom, hasOverflowScroll && styles$y.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0 })), children));
|
|
15169
|
-
};
|
|
15170
|
-
PageGroup.displayName = 'PageGroup';
|
|
15171
|
-
|
|
15172
15273
|
exports.PageLayouts = void 0;
|
|
15173
15274
|
(function (PageLayouts) {
|
|
15174
15275
|
PageLayouts["vertical"] = "vertical";
|
|
@@ -15179,7 +15280,9 @@
|
|
|
15179
15280
|
isNavOpen: false,
|
|
15180
15281
|
onNavToggle: () => null,
|
|
15181
15282
|
width: null,
|
|
15182
|
-
|
|
15283
|
+
height: null,
|
|
15284
|
+
getBreakpoint,
|
|
15285
|
+
getVerticalBreakpoint
|
|
15183
15286
|
};
|
|
15184
15287
|
const PageContext = React__namespace.createContext(pageContextDefaults);
|
|
15185
15288
|
const PageContextProvider = PageContext.Provider;
|
|
@@ -15210,7 +15313,8 @@
|
|
|
15210
15313
|
if (mobileView !== this.state.mobileView) {
|
|
15211
15314
|
this.setState({ mobileView });
|
|
15212
15315
|
}
|
|
15213
|
-
this.pageRef.current &&
|
|
15316
|
+
this.pageRef.current &&
|
|
15317
|
+
this.setState({ width: this.pageRef.current.clientWidth, height: this.pageRef.current.clientHeight });
|
|
15214
15318
|
};
|
|
15215
15319
|
this.handleResize = debounce$1(this.resize, 250);
|
|
15216
15320
|
this.handleMainClick = () => {
|
|
@@ -15234,7 +15338,8 @@
|
|
|
15234
15338
|
desktopIsNavOpen: managedSidebarOpen,
|
|
15235
15339
|
mobileIsNavOpen: false,
|
|
15236
15340
|
mobileView: false,
|
|
15237
|
-
width: null
|
|
15341
|
+
width: null,
|
|
15342
|
+
height: null
|
|
15238
15343
|
};
|
|
15239
15344
|
}
|
|
15240
15345
|
componentDidMount() {
|
|
@@ -15266,14 +15371,16 @@
|
|
|
15266
15371
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15267
15372
|
defaultManagedSidebarIsOpen,
|
|
15268
15373
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15269
|
-
onPageResize, getBreakpoint, mainAriaLabel, mainTabIndex, tertiaryNav, isTertiaryNavGrouped, isBreadcrumbGrouped, additionalGroupedContent, groupProps } = _a, rest = __rest$1(_a, ["breadcrumb", "isBreadcrumbWidthLimited", "className", "children", "header", "sidebar", "notificationDrawer", "isNotificationDrawerExpanded", "onNotificationDrawerExpand", "isTertiaryNavWidthLimited", "skipToContent", "role", "mainContainerId", "isManagedSidebar", "defaultManagedSidebarIsOpen", "onPageResize", "getBreakpoint", "mainAriaLabel", "mainTabIndex", "tertiaryNav", "isTertiaryNavGrouped", "isBreadcrumbGrouped", "additionalGroupedContent", "groupProps"]);
|
|
15270
|
-
const { mobileView, mobileIsNavOpen, desktopIsNavOpen, width } = this.state;
|
|
15374
|
+
onPageResize, getBreakpoint, getVerticalBreakpoint, mainAriaLabel, mainTabIndex, tertiaryNav, isTertiaryNavGrouped, isBreadcrumbGrouped, additionalGroupedContent, groupProps, breadcrumbProps } = _a, rest = __rest$1(_a, ["breadcrumb", "isBreadcrumbWidthLimited", "className", "children", "header", "sidebar", "notificationDrawer", "isNotificationDrawerExpanded", "onNotificationDrawerExpand", "isTertiaryNavWidthLimited", "skipToContent", "role", "mainContainerId", "isManagedSidebar", "defaultManagedSidebarIsOpen", "onPageResize", "getBreakpoint", "getVerticalBreakpoint", "mainAriaLabel", "mainTabIndex", "tertiaryNav", "isTertiaryNavGrouped", "isBreadcrumbGrouped", "additionalGroupedContent", "groupProps", "breadcrumbProps"]);
|
|
15375
|
+
const { mobileView, mobileIsNavOpen, desktopIsNavOpen, width, height } = this.state;
|
|
15271
15376
|
const context = {
|
|
15272
15377
|
isManagedSidebar,
|
|
15273
15378
|
onNavToggle: mobileView ? this.onNavToggleMobile : this.onNavToggleDesktop,
|
|
15274
15379
|
isNavOpen: mobileView ? mobileIsNavOpen : desktopIsNavOpen,
|
|
15275
15380
|
width,
|
|
15276
|
-
|
|
15381
|
+
height,
|
|
15382
|
+
getBreakpoint,
|
|
15383
|
+
getVerticalBreakpoint
|
|
15277
15384
|
};
|
|
15278
15385
|
let nav = null;
|
|
15279
15386
|
if (tertiaryNav && isTertiaryNavWidthLimited) {
|
|
@@ -15283,16 +15390,9 @@
|
|
|
15283
15390
|
else if (tertiaryNav) {
|
|
15284
15391
|
nav = React__namespace.createElement("div", { className: css(styles$y.pageMainNav) }, tertiaryNav);
|
|
15285
15392
|
}
|
|
15286
|
-
|
|
15287
|
-
if (breadcrumb && isBreadcrumbWidthLimited) {
|
|
15288
|
-
crumb = (React__namespace.createElement("section", { className: css(styles$y.pageMainBreadcrumb, styles$y.modifiers.limitWidth) },
|
|
15289
|
-
React__namespace.createElement("div", { className: css(styles$y.pageMainBody) }, breadcrumb)));
|
|
15290
|
-
}
|
|
15291
|
-
else if (breadcrumb) {
|
|
15292
|
-
crumb = React__namespace.createElement("section", { className: css(styles$y.pageMainBreadcrumb) }, breadcrumb);
|
|
15293
|
-
}
|
|
15393
|
+
const crumb = breadcrumb ? (React__namespace.createElement("section", { className: css(styles$y.pageMainBreadcrumb, isBreadcrumbWidthLimited && styles$y.modifiers.limitWidth, formatBreakpointMods(breadcrumbProps === null || breadcrumbProps === void 0 ? void 0 : breadcrumbProps.stickyOnBreakpoint, styles$y, 'sticky-', getVerticalBreakpoint(height), true)) }, isBreadcrumbWidthLimited ? React__namespace.createElement("div", { className: css(styles$y.pageMainBody) }, breadcrumb) : breadcrumb)) : null;
|
|
15294
15394
|
const isGrouped = isTertiaryNavGrouped || isBreadcrumbGrouped || additionalGroupedContent;
|
|
15295
|
-
const group = isGrouped ? (React__namespace.createElement(
|
|
15395
|
+
const group = isGrouped ? (React__namespace.createElement("div", Object.assign({ className: css(styles$y.pageMainGroup, formatBreakpointMods(groupProps === null || groupProps === void 0 ? void 0 : groupProps.stickyOnBreakpoint, styles$y, 'sticky-', getVerticalBreakpoint(height), true)) }, groupProps),
|
|
15296
15396
|
isTertiaryNavGrouped && nav,
|
|
15297
15397
|
isBreadcrumbGrouped && crumb,
|
|
15298
15398
|
additionalGroupedContent)) : null;
|
|
@@ -15303,7 +15403,7 @@
|
|
|
15303
15403
|
children));
|
|
15304
15404
|
const panelContent = React__namespace.createElement(DrawerPanelContent, null, notificationDrawer);
|
|
15305
15405
|
return (React__namespace.createElement(PageContextProvider, { value: context },
|
|
15306
|
-
React__namespace.createElement("div", Object.assign({ ref: this.pageRef }, rest, { className: css(styles$y.page, width !== null && 'pf-m-resize-observer', width !== null && `pf-m-breakpoint-${getBreakpoint(width)}`, className) }),
|
|
15406
|
+
React__namespace.createElement("div", Object.assign({ ref: this.pageRef }, rest, { className: css(styles$y.page, width !== null && height !== null && 'pf-m-resize-observer', width !== null && `pf-m-breakpoint-${getBreakpoint(width)}`, height !== null && `pf-m-height-breakpoint-${getVerticalBreakpoint(height)}`, className) }),
|
|
15307
15407
|
skipToContent,
|
|
15308
15408
|
header,
|
|
15309
15409
|
sidebar,
|
|
@@ -15323,7 +15423,8 @@
|
|
|
15323
15423
|
mainTabIndex: -1,
|
|
15324
15424
|
isNotificationDrawerExpanded: false,
|
|
15325
15425
|
onNotificationDrawerExpand: () => null,
|
|
15326
|
-
getBreakpoint
|
|
15426
|
+
getBreakpoint,
|
|
15427
|
+
getVerticalBreakpoint
|
|
15327
15428
|
};
|
|
15328
15429
|
|
|
15329
15430
|
const Masthead = (_a) => {
|
|
@@ -17440,27 +17541,6 @@
|
|
|
17440
17541
|
isBelowBreakpoint: false
|
|
17441
17542
|
});
|
|
17442
17543
|
|
|
17443
|
-
const global_breakpoint_md = {
|
|
17444
|
-
"name": "--pf-global--breakpoint--md",
|
|
17445
|
-
"value": "768px",
|
|
17446
|
-
"var": "var(--pf-global--breakpoint--md)"
|
|
17447
|
-
};
|
|
17448
|
-
var globalBreakpointMd = global_breakpoint_md;
|
|
17449
|
-
|
|
17450
|
-
const global_breakpoint_lg = {
|
|
17451
|
-
"name": "--pf-global--breakpoint--lg",
|
|
17452
|
-
"value": "992px",
|
|
17453
|
-
"var": "var(--pf-global--breakpoint--lg)"
|
|
17454
|
-
};
|
|
17455
|
-
var globalBreakpointLg = global_breakpoint_lg;
|
|
17456
|
-
|
|
17457
|
-
const global_breakpoint_2xl = {
|
|
17458
|
-
"name": "--pf-global--breakpoint--2xl",
|
|
17459
|
-
"value": "1450px",
|
|
17460
|
-
"var": "var(--pf-global--breakpoint--2xl)"
|
|
17461
|
-
};
|
|
17462
|
-
var globalBreakpoint2xl = global_breakpoint_2xl;
|
|
17463
|
-
|
|
17464
17544
|
const breakpoints = {
|
|
17465
17545
|
md: globalBreakpointMd,
|
|
17466
17546
|
lg: globalBreakpointLg,
|
|
@@ -17537,13 +17617,21 @@
|
|
|
17537
17617
|
OverflowMenuDropdownItem.displayName = 'OverflowMenuDropdownItem';
|
|
17538
17618
|
|
|
17539
17619
|
const PageBreadcrumb = (_a) => {
|
|
17540
|
-
var { className = '', children, isWidthLimited, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "isWidthLimited", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17541
|
-
|
|
17620
|
+
var { className = '', children, isWidthLimited, sticky, stickyOnBreakpoint, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "isWidthLimited", "sticky", "stickyOnBreakpoint", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17621
|
+
const { height, getVerticalBreakpoint } = React__namespace.useContext(PageContext);
|
|
17622
|
+
return (React__namespace.createElement("section", Object.assign({ className: css(styles$y.pageMainBreadcrumb, formatBreakpointMods(stickyOnBreakpoint, styles$y, 'sticky-', getVerticalBreakpoint(height), true), isWidthLimited && styles$y.modifiers.limitWidth, sticky === 'top' && styles$y.modifiers.stickyTop, sticky === 'bottom' && styles$y.modifiers.stickyBottom, hasShadowTop && styles$y.modifiers.shadowTop, hasShadowBottom && styles$y.modifiers.shadowBottom, hasOverflowScroll && styles$y.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0 }), props),
|
|
17542
17623
|
isWidthLimited && React__namespace.createElement("div", { className: css(styles$y.pageMainBody) }, children),
|
|
17543
17624
|
!isWidthLimited && children));
|
|
17544
17625
|
};
|
|
17545
17626
|
PageBreadcrumb.displayName = 'PageBreadcrumb';
|
|
17546
17627
|
|
|
17628
|
+
const PageGroup = (_a) => {
|
|
17629
|
+
var { className = '', children, sticky, stickyOnBreakpoint, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "sticky", "stickyOnBreakpoint", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17630
|
+
const { height, getVerticalBreakpoint } = React__namespace.useContext(PageContext);
|
|
17631
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(styles$y.pageMainGroup, formatBreakpointMods(stickyOnBreakpoint, styles$y, 'sticky-', getVerticalBreakpoint(height), true), sticky === 'top' && styles$y.modifiers.stickyTop, sticky === 'bottom' && styles$y.modifiers.stickyBottom, hasShadowTop && styles$y.modifiers.shadowTop, hasShadowBottom && styles$y.modifiers.shadowBottom, hasOverflowScroll && styles$y.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0 })), children));
|
|
17632
|
+
};
|
|
17633
|
+
PageGroup.displayName = 'PageGroup';
|
|
17634
|
+
|
|
17547
17635
|
const BarsIconConfig = {
|
|
17548
17636
|
name: 'BarsIcon',
|
|
17549
17637
|
height: 512,
|
|
@@ -17609,8 +17697,9 @@
|
|
|
17609
17697
|
[exports.PageSectionVariants.darker]: styles$y.modifiers.dark_100
|
|
17610
17698
|
};
|
|
17611
17699
|
const PageSection = (_a) => {
|
|
17612
|
-
var { className = '', children, variant = 'default', type = 'default', padding, isFilled, isWidthLimited = false, isCenterAligned = false, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "variant", "type", "padding", "isFilled", "isWidthLimited", "isCenterAligned", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17613
|
-
|
|
17700
|
+
var { className = '', children, variant = 'default', type = 'default', padding, isFilled, isWidthLimited = false, isCenterAligned = false, sticky, stickyOnBreakpoint, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "variant", "type", "padding", "isFilled", "isWidthLimited", "isCenterAligned", "sticky", "stickyOnBreakpoint", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17701
|
+
const { height, getVerticalBreakpoint } = React__namespace.useContext(PageContext);
|
|
17702
|
+
return (React__namespace.createElement("section", Object.assign({}, props, { className: css(variantType[type], formatBreakpointMods(padding, styles$y), formatBreakpointMods(stickyOnBreakpoint, styles$y, 'sticky-', getVerticalBreakpoint(height), true), variantStyle$3[variant], isFilled === false && styles$y.modifiers.noFill, isFilled === true && styles$y.modifiers.fill, isWidthLimited && styles$y.modifiers.limitWidth, isWidthLimited && isCenterAligned && type !== exports.PageSectionTypes.subNav && styles$y.modifiers.alignCenter, sticky === 'top' && styles$y.modifiers.stickyTop, sticky === 'bottom' && styles$y.modifiers.stickyBottom, hasShadowTop && styles$y.modifiers.shadowTop, hasShadowBottom && styles$y.modifiers.shadowBottom, hasOverflowScroll && styles$y.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0 })),
|
|
17614
17703
|
isWidthLimited && React__namespace.createElement("div", { className: css(styles$y.pageMainBody) }, children),
|
|
17615
17704
|
!isWidthLimited && children));
|
|
17616
17705
|
};
|
|
@@ -17637,8 +17726,9 @@
|
|
|
17637
17726
|
PageHeaderToolsItem.displayName = 'PageHeaderToolsItem';
|
|
17638
17727
|
|
|
17639
17728
|
const PageNavigation = (_a) => {
|
|
17640
|
-
var { className = '', children, isWidthLimited, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "isWidthLimited", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17641
|
-
|
|
17729
|
+
var { className = '', children, isWidthLimited, sticky, stickyOnBreakpoint, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "isWidthLimited", "sticky", "stickyOnBreakpoint", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
17730
|
+
const { height, getVerticalBreakpoint } = React__namespace.useContext(PageContext);
|
|
17731
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(styles$y.pageMainNav, formatBreakpointMods(stickyOnBreakpoint, styles$y, 'sticky-', getVerticalBreakpoint(height), true), isWidthLimited && styles$y.modifiers.limitWidth, sticky === 'top' && styles$y.modifiers.stickyTop, sticky === 'bottom' && styles$y.modifiers.stickyBottom, hasShadowTop && styles$y.modifiers.shadowTop, hasShadowBottom && styles$y.modifiers.shadowBottom, hasOverflowScroll && styles$y.modifiers.overflowScroll, className) }, (hasOverflowScroll && { tabIndex: 0 }), props),
|
|
17642
17732
|
isWidthLimited && React__namespace.createElement("div", { className: css(styles$y.pageMainBody) }, children),
|
|
17643
17733
|
!isWidthLimited && children));
|
|
17644
17734
|
};
|
|
@@ -23304,7 +23394,10 @@
|
|
|
23304
23394
|
exports.getResizeObserver = getResizeObserver;
|
|
23305
23395
|
exports.getTextWidth = getTextWidth;
|
|
23306
23396
|
exports.getUniqueId = getUniqueId;
|
|
23397
|
+
exports.getVerticalBreakpoint = getVerticalBreakpoint;
|
|
23307
23398
|
exports.globalBreakpoints = globalBreakpoints;
|
|
23399
|
+
exports.globalHeightBreakpoints = globalHeightBreakpoints;
|
|
23400
|
+
exports.globalWidthBreakpoints = globalWidthBreakpoints;
|
|
23308
23401
|
exports.handleArrows = handleArrows;
|
|
23309
23402
|
exports.innerDimensions = innerDimensions;
|
|
23310
23403
|
exports.isElementInView = isElementInView;
|