@patternfly/react-core 4.192.3 → 4.192.7
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 +35 -0
- package/dist/esm/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/esm/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/esm/components/DatePicker/DatePicker.js +7 -3
- package/dist/esm/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/esm/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/esm/components/Masthead/Masthead.js +6 -2
- package/dist/esm/components/Masthead/Masthead.js.map +1 -1
- package/dist/esm/components/Menu/MenuContent.js +1 -1
- package/dist/esm/components/Menu/MenuContent.js.map +1 -1
- package/dist/esm/components/Nav/Nav.d.ts +4 -2
- package/dist/esm/components/Nav/Nav.d.ts.map +1 -1
- package/dist/esm/components/Nav/Nav.js +2 -1
- package/dist/esm/components/Nav/Nav.js.map +1 -1
- package/dist/esm/components/Nav/NavList.d.ts +2 -8
- package/dist/esm/components/Nav/NavList.d.ts.map +1 -1
- package/dist/esm/components/Nav/NavList.js +4 -7
- package/dist/esm/components/Nav/NavList.js.map +1 -1
- package/dist/esm/components/Page/Page.d.ts +14 -0
- package/dist/esm/components/Page/Page.d.ts.map +1 -1
- package/dist/esm/components/Page/Page.js +31 -16
- package/dist/esm/components/Page/Page.js.map +1 -1
- package/dist/esm/components/Page/PageHeaderToolsGroup.d.ts.map +1 -1
- package/dist/esm/components/Page/PageHeaderToolsGroup.js +3 -1
- package/dist/esm/components/Page/PageHeaderToolsGroup.js.map +1 -1
- package/dist/esm/components/Page/PageHeaderToolsItem.d.ts.map +1 -1
- package/dist/esm/components/Page/PageHeaderToolsItem.js +7 -1
- package/dist/esm/components/Page/PageHeaderToolsItem.js.map +1 -1
- package/dist/esm/components/Page/PageSidebar.d.ts +1 -0
- package/dist/esm/components/Page/PageSidebar.d.ts.map +1 -1
- package/dist/esm/components/Page/PageSidebar.js +3 -2
- package/dist/esm/components/Page/PageSidebar.js.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/Toolbar.js +3 -2
- package/dist/esm/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarContent.js +3 -2
- package/dist/esm/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.js +2 -1
- package/dist/esm/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarItem.js +3 -2
- package/dist/esm/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js +8 -5
- package/dist/esm/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/esm/helpers/util.d.ts +16 -8
- package/dist/esm/helpers/util.d.ts.map +1 -1
- package/dist/esm/helpers/util.js +53 -7
- package/dist/esm/helpers/util.js.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.d.ts +2 -0
- package/dist/js/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/js/components/DatePicker/DatePicker.js +7 -3
- package/dist/js/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/js/components/Masthead/Masthead.d.ts.map +1 -1
- package/dist/js/components/Masthead/Masthead.js +6 -2
- package/dist/js/components/Masthead/Masthead.js.map +1 -1
- package/dist/js/components/Menu/MenuContent.js +1 -1
- package/dist/js/components/Menu/MenuContent.js.map +1 -1
- package/dist/js/components/Nav/Nav.d.ts +4 -2
- package/dist/js/components/Nav/Nav.d.ts.map +1 -1
- package/dist/js/components/Nav/Nav.js +3 -2
- package/dist/js/components/Nav/Nav.js.map +1 -1
- package/dist/js/components/Nav/NavList.d.ts +2 -8
- package/dist/js/components/Nav/NavList.d.ts.map +1 -1
- package/dist/js/components/Nav/NavList.js +4 -7
- package/dist/js/components/Nav/NavList.js.map +1 -1
- package/dist/js/components/Page/Page.d.ts +14 -0
- package/dist/js/components/Page/Page.d.ts.map +1 -1
- package/dist/js/components/Page/Page.js +34 -19
- package/dist/js/components/Page/Page.js.map +1 -1
- package/dist/js/components/Page/PageHeaderToolsGroup.d.ts.map +1 -1
- package/dist/js/components/Page/PageHeaderToolsGroup.js +3 -1
- package/dist/js/components/Page/PageHeaderToolsGroup.js.map +1 -1
- package/dist/js/components/Page/PageHeaderToolsItem.d.ts.map +1 -1
- package/dist/js/components/Page/PageHeaderToolsItem.js +6 -1
- package/dist/js/components/Page/PageHeaderToolsItem.js.map +1 -1
- package/dist/js/components/Page/PageSidebar.d.ts +1 -0
- package/dist/js/components/Page/PageSidebar.d.ts.map +1 -1
- package/dist/js/components/Page/PageSidebar.js +4 -3
- package/dist/js/components/Page/PageSidebar.js.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.d.ts.map +1 -1
- package/dist/js/components/Toolbar/Toolbar.js +3 -2
- package/dist/js/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarContent.js +3 -2
- package/dist/js/components/Toolbar/ToolbarContent.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarGroup.js +2 -1
- package/dist/js/components/Toolbar/ToolbarGroup.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarItem.js +3 -2
- package/dist/js/components/Toolbar/ToolbarItem.js.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.d.ts.map +1 -1
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js +7 -4
- package/dist/js/components/Toolbar/ToolbarToggleGroup.js.map +1 -1
- package/dist/js/helpers/util.d.ts +16 -8
- package/dist/js/helpers/util.d.ts.map +1 -1
- package/dist/js/helpers/util.js +55 -8
- package/dist/js/helpers/util.js.map +1 -1
- package/dist/umd/react-core.js +428 -351
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +5 -5
- package/src/components/BackToTop/examples/BackToTop.md +0 -1
- package/src/components/DatePicker/DatePicker.tsx +10 -2
- package/src/components/DatePicker/examples/DatePicker.md +4 -1
- package/src/components/JumpLinks/examples/JumpLinks.md +0 -1
- package/src/components/Masthead/Masthead.tsx +23 -16
- package/src/components/Masthead/__tests__/__snapshots__/Masthead.test.tsx.snap +11 -11
- package/src/components/Menu/MenuContent.tsx +2 -2
- package/src/components/Menu/examples/Menu.md +7 -7
- package/src/components/Nav/Nav.tsx +4 -2
- package/src/components/Nav/NavList.tsx +4 -7
- package/src/components/Page/Page.tsx +49 -16
- package/src/components/Page/PageHeaderToolsGroup.tsx +16 -5
- package/src/components/Page/PageHeaderToolsItem.tsx +20 -14
- package/src/components/Page/PageSidebar.tsx +3 -3
- package/src/components/Page/__tests__/Generated/__snapshots__/Page.test.tsx.snap +2 -0
- package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +18 -9
- package/src/components/Toolbar/Toolbar.tsx +44 -39
- package/src/components/Toolbar/ToolbarContent.tsx +45 -40
- package/src/components/Toolbar/ToolbarGroup.tsx +19 -14
- package/src/components/Toolbar/ToolbarItem.tsx +30 -19
- package/src/components/Toolbar/ToolbarToggleGroup.tsx +60 -53
- package/src/components/Toolbar/__tests__/Generated/__snapshots__/Toolbar.test.tsx.snap +3 -43
- package/src/components/Toolbar/__tests__/Generated/__snapshots__/ToolbarContent.test.tsx.snap +3 -7
- package/src/components/Toolbar/__tests__/Generated/__snapshots__/ToolbarItem.test.tsx.snap +3 -8
- package/src/demos/ComposableMenu/ComposableMenu.md +88 -0
- package/src/demos/ComposableMenu/examples/ComposableActionsMenu.tsx +122 -0
- package/src/demos/ComposableMenu/examples/ComposableApplicationLauncher.tsx +282 -0
- package/src/demos/ComposableMenu/examples/ComposableContextSelector.tsx +202 -0
- package/src/demos/ComposableMenu/examples/ComposableDrilldownMenu.tsx +246 -0
- package/src/demos/ComposableMenu/examples/ComposableDropdwnVariants.tsx +235 -0
- package/src/demos/ComposableMenu/examples/ComposableFlyout.tsx +103 -0
- package/src/demos/ComposableMenu/examples/ComposableOptionsMenuVariants.tsx +94 -0
- package/src/demos/ComposableMenu/examples/ComposableSimpleDropdown.tsx +70 -0
- package/src/demos/ComposableMenu/examples/ComposableSimpleSelect.tsx +74 -0
- package/src/demos/ComposableMenu/examples/ComposableTreeViewMenu.tsx +240 -0
- package/src/demos/ComposableMenu/examples/avatarImg.svg +18 -0
- package/src/demos/ComposableMenu/examples/pf-logo-small.svg +23 -0
- package/src/demos/JumpLinks.md +0 -1
- package/src/demos/Page/Page.md +92 -43
- package/src/helpers/util.ts +61 -12
- package/src/demos/ComposableMenu.md +0 -1443
- package/src/demos/composable-menu.css +0 -3
package/dist/umd/react-core.js
CHANGED
|
@@ -1189,13 +1189,59 @@
|
|
|
1189
1189
|
* @param {object} mods The modifiers object
|
|
1190
1190
|
* @param {any} styles The appropriate styles object for the component
|
|
1191
1191
|
*/
|
|
1192
|
-
const formatBreakpointMods = (mods, styles, stylePrefix = '') =>
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1192
|
+
const formatBreakpointMods = (mods, styles, stylePrefix = '', breakpoint) => {
|
|
1193
|
+
if (!mods) {
|
|
1194
|
+
return '';
|
|
1195
|
+
}
|
|
1196
|
+
if (breakpoint) {
|
|
1197
|
+
if (breakpoint in mods) {
|
|
1198
|
+
return styles.modifiers[toCamel(`${stylePrefix}${mods[breakpoint]}`)];
|
|
1199
|
+
}
|
|
1200
|
+
// the current breakpoint is not specified in mods, so we try to find the next nearest
|
|
1201
|
+
const breakpointsOrder = ['2xl', 'xl', 'lg', 'md', 'sm', 'default'];
|
|
1202
|
+
const breakpointsIndex = breakpointsOrder.indexOf(breakpoint);
|
|
1203
|
+
for (let i = breakpointsIndex; i < breakpointsOrder.length; i++) {
|
|
1204
|
+
if (breakpointsOrder[i] in mods) {
|
|
1205
|
+
return styles.modifiers[toCamel(`${stylePrefix}${mods[breakpointsOrder[i]]}`)];
|
|
1206
|
+
}
|
|
1207
|
+
}
|
|
1208
|
+
return '';
|
|
1209
|
+
}
|
|
1210
|
+
return Object.entries(mods || {})
|
|
1211
|
+
.map(([breakpoint, mod]) => `${stylePrefix}${mod}${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}`)
|
|
1212
|
+
.map(toCamel)
|
|
1213
|
+
.map(mod => mod.replace(/-?(\dxl)/gi, (_res, group) => `_${group}`))
|
|
1214
|
+
.map(modifierKey => styles.modifiers[modifierKey])
|
|
1215
|
+
.filter(Boolean)
|
|
1216
|
+
.join(' ');
|
|
1217
|
+
};
|
|
1218
|
+
/**
|
|
1219
|
+
* Return the breakpoint for the given width
|
|
1220
|
+
*
|
|
1221
|
+
* @param {number | null} width The width to check
|
|
1222
|
+
* @returns {'default' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'} The breakpoint
|
|
1223
|
+
*/
|
|
1224
|
+
const getBreakpoint = (width) => {
|
|
1225
|
+
if (width === null) {
|
|
1226
|
+
return null;
|
|
1227
|
+
}
|
|
1228
|
+
if (width >= 1450) {
|
|
1229
|
+
return '2xl';
|
|
1230
|
+
}
|
|
1231
|
+
if (width >= 1200) {
|
|
1232
|
+
return 'xl';
|
|
1233
|
+
}
|
|
1234
|
+
if (width >= 992) {
|
|
1235
|
+
return 'lg';
|
|
1236
|
+
}
|
|
1237
|
+
if (width >= 768) {
|
|
1238
|
+
return 'md';
|
|
1239
|
+
}
|
|
1240
|
+
if (width >= 576) {
|
|
1241
|
+
return 'sm';
|
|
1242
|
+
}
|
|
1243
|
+
return 'default';
|
|
1244
|
+
};
|
|
1199
1245
|
const camelize = (s) => s
|
|
1200
1246
|
.toUpperCase()
|
|
1201
1247
|
.replace('-', '')
|
|
@@ -9244,7 +9290,7 @@
|
|
|
9244
9290
|
.toString()
|
|
9245
9291
|
.padStart(2, '0')}`;
|
|
9246
9292
|
const DatePickerBase = (_a, ref) => {
|
|
9247
|
-
var { className, locale = undefined, dateFormat = yyyyMMddFormat, dateParse = (val) => val.split('-').length === 3 && new Date(`${val}T00:00:00`), isDisabled = false, placeholder = 'YYYY-MM-DD', value: valueProp = '', 'aria-label': ariaLabel = 'Date picker', buttonAriaLabel = 'Toggle date picker', onChange = () => undefined, invalidFormatText = 'Invalid date', helperText, appendTo, popoverProps, monthFormat, weekdayFormat, longWeekdayFormat, dayFormat, weekStart, validators = [], rangeStart, style: styleProps = {}, inputProps = {} } = _a, props = __rest$1(_a, ["className", "locale", "dateFormat", "dateParse", "isDisabled", "placeholder", "value", 'aria-label', "buttonAriaLabel", "onChange", "invalidFormatText", "helperText", "appendTo", "popoverProps", "monthFormat", "weekdayFormat", "longWeekdayFormat", "dayFormat", "weekStart", "validators", "rangeStart", "style", "inputProps"]);
|
|
9293
|
+
var { className, locale = undefined, dateFormat = yyyyMMddFormat, dateParse = (val) => val.split('-').length === 3 && new Date(`${val}T00:00:00`), isDisabled = false, placeholder = 'YYYY-MM-DD', value: valueProp = '', 'aria-label': ariaLabel = 'Date picker', buttonAriaLabel = 'Toggle date picker', onChange = () => undefined, onBlur = () => undefined, invalidFormatText = 'Invalid date', helperText, appendTo, popoverProps, monthFormat, weekdayFormat, longWeekdayFormat, dayFormat, weekStart, validators = [], rangeStart, style: styleProps = {}, inputProps = {} } = _a, props = __rest$1(_a, ["className", "locale", "dateFormat", "dateParse", "isDisabled", "placeholder", "value", 'aria-label', "buttonAriaLabel", "onChange", "onBlur", "invalidFormatText", "helperText", "appendTo", "popoverProps", "monthFormat", "weekdayFormat", "longWeekdayFormat", "dayFormat", "weekStart", "validators", "rangeStart", "style", "inputProps"]);
|
|
9248
9294
|
const [value, setValue] = React__namespace.useState(valueProp);
|
|
9249
9295
|
const [valueDate, setValueDate] = React__namespace.useState(dateParse(value));
|
|
9250
9296
|
const [errorText, setErrorText] = React__namespace.useState('');
|
|
@@ -9258,9 +9304,11 @@
|
|
|
9258
9304
|
setValue(valueProp);
|
|
9259
9305
|
setValueDate(dateParse(valueProp));
|
|
9260
9306
|
}, [valueProp]);
|
|
9307
|
+
React__namespace.useEffect(() => {
|
|
9308
|
+
setPristine(!value);
|
|
9309
|
+
}, [value]);
|
|
9261
9310
|
const setError = (date) => setErrorText(validators.map(validator => validator(date)).join('\n') || '');
|
|
9262
9311
|
const onTextInput = (value) => {
|
|
9263
|
-
setPristine(false);
|
|
9264
9312
|
setValue(value);
|
|
9265
9313
|
setErrorText('');
|
|
9266
9314
|
const newValueDate = dateParse(value);
|
|
@@ -9278,9 +9326,11 @@
|
|
|
9278
9326
|
}
|
|
9279
9327
|
const newValueDate = dateParse(value);
|
|
9280
9328
|
if (isValidDate(newValueDate)) {
|
|
9329
|
+
onBlur(value, new Date(newValueDate));
|
|
9281
9330
|
setError(newValueDate);
|
|
9282
9331
|
}
|
|
9283
9332
|
else {
|
|
9333
|
+
onBlur(value);
|
|
9284
9334
|
setErrorText(invalidFormatText);
|
|
9285
9335
|
}
|
|
9286
9336
|
};
|
|
@@ -9331,7 +9381,7 @@
|
|
|
9331
9381
|
errorText.trim() && React__namespace.createElement("div", { className: css(_default$S.datePickerHelperText, _default$S.modifiers.error) }, errorText)));
|
|
9332
9382
|
};
|
|
9333
9383
|
const DatePicker = React__namespace.forwardRef(DatePickerBase);
|
|
9334
|
-
DatePicker.displayName = '
|
|
9384
|
+
DatePicker.displayName = 'DatePicker';
|
|
9335
9385
|
|
|
9336
9386
|
var _default$Q = {
|
|
9337
9387
|
"descriptionList": "pf-c-description-list",
|
|
@@ -13908,9 +13958,260 @@
|
|
|
13908
13958
|
"toolbarExpandableContent": "pf-c-toolbar__expandable-content"
|
|
13909
13959
|
};
|
|
13910
13960
|
|
|
13961
|
+
var _default$A = {
|
|
13962
|
+
"avatar": "pf-c-avatar",
|
|
13963
|
+
"brand": "pf-c-brand",
|
|
13964
|
+
"button": "pf-c-button",
|
|
13965
|
+
"card": "pf-c-card",
|
|
13966
|
+
"contextSelector": "pf-c-context-selector",
|
|
13967
|
+
"drawer": "pf-c-drawer",
|
|
13968
|
+
"masthead": "pf-c-masthead",
|
|
13969
|
+
"modifiers": {
|
|
13970
|
+
"light": "pf-m-light",
|
|
13971
|
+
"menu": "pf-m-menu",
|
|
13972
|
+
"hidden": "pf-m-hidden",
|
|
13973
|
+
"hiddenOnSm": "pf-m-hidden-on-sm",
|
|
13974
|
+
"visibleOnSm": "pf-m-visible-on-sm",
|
|
13975
|
+
"hiddenOnMd": "pf-m-hidden-on-md",
|
|
13976
|
+
"visibleOnMd": "pf-m-visible-on-md",
|
|
13977
|
+
"hiddenOnLg": "pf-m-hidden-on-lg",
|
|
13978
|
+
"visibleOnLg": "pf-m-visible-on-lg",
|
|
13979
|
+
"hiddenOnXl": "pf-m-hidden-on-xl",
|
|
13980
|
+
"visibleOnXl": "pf-m-visible-on-xl",
|
|
13981
|
+
"hiddenOn_2xl": "pf-m-hidden-on-2xl",
|
|
13982
|
+
"visibleOn_2xl": "pf-m-visible-on-2xl",
|
|
13983
|
+
"read": "pf-m-read",
|
|
13984
|
+
"selected": "pf-m-selected",
|
|
13985
|
+
"unread": "pf-m-unread",
|
|
13986
|
+
"attention": "pf-m-attention",
|
|
13987
|
+
"expanded": "pf-m-expanded",
|
|
13988
|
+
"collapsed": "pf-m-collapsed",
|
|
13989
|
+
"limitWidth": "pf-m-limit-width",
|
|
13990
|
+
"alignCenter": "pf-m-align-center",
|
|
13991
|
+
"stickyTop": "pf-m-sticky-top",
|
|
13992
|
+
"stickyBottom": "pf-m-sticky-bottom",
|
|
13993
|
+
"overflowScroll": "pf-m-overflow-scroll",
|
|
13994
|
+
"shadowBottom": "pf-m-shadow-bottom",
|
|
13995
|
+
"shadowTop": "pf-m-shadow-top",
|
|
13996
|
+
"fill": "pf-m-fill",
|
|
13997
|
+
"noFill": "pf-m-no-fill",
|
|
13998
|
+
"dark_100": "pf-m-dark-100",
|
|
13999
|
+
"dark_200": "pf-m-dark-200",
|
|
14000
|
+
"padding": "pf-m-padding",
|
|
14001
|
+
"noPadding": "pf-m-no-padding",
|
|
14002
|
+
"paddingOnSm": "pf-m-padding-on-sm",
|
|
14003
|
+
"noPaddingOnSm": "pf-m-no-padding-on-sm",
|
|
14004
|
+
"paddingOnMd": "pf-m-padding-on-md",
|
|
14005
|
+
"noPaddingOnMd": "pf-m-no-padding-on-md",
|
|
14006
|
+
"paddingOnLg": "pf-m-padding-on-lg",
|
|
14007
|
+
"noPaddingOnLg": "pf-m-no-padding-on-lg",
|
|
14008
|
+
"paddingOnXl": "pf-m-padding-on-xl",
|
|
14009
|
+
"noPaddingOnXl": "pf-m-no-padding-on-xl",
|
|
14010
|
+
"paddingOn_2xl": "pf-m-padding-on-2xl",
|
|
14011
|
+
"noPaddingOn_2xl": "pf-m-no-padding-on-2xl"
|
|
14012
|
+
},
|
|
14013
|
+
"nav": "pf-c-nav",
|
|
14014
|
+
"notificationBadge": "pf-c-notification-badge",
|
|
14015
|
+
"page": "pf-c-page",
|
|
14016
|
+
"pageDrawer": "pf-c-page__drawer",
|
|
14017
|
+
"pageHeader": "pf-c-page__header",
|
|
14018
|
+
"pageHeaderBrand": "pf-c-page__header-brand",
|
|
14019
|
+
"pageHeaderBrandLink": "pf-c-page__header-brand-link",
|
|
14020
|
+
"pageHeaderBrandToggle": "pf-c-page__header-brand-toggle",
|
|
14021
|
+
"pageHeaderNav": "pf-c-page__header-nav",
|
|
14022
|
+
"pageHeaderTools": "pf-c-page__header-tools",
|
|
14023
|
+
"pageHeaderToolsGroup": "pf-c-page__header-tools-group",
|
|
14024
|
+
"pageHeaderToolsItem": "pf-c-page__header-tools-item",
|
|
14025
|
+
"pageMain": "pf-c-page__main",
|
|
14026
|
+
"pageMainBody": "pf-c-page__main-body",
|
|
14027
|
+
"pageMainBreadcrumb": "pf-c-page__main-breadcrumb",
|
|
14028
|
+
"pageMainDrawer": "pf-c-page__main-drawer",
|
|
14029
|
+
"pageMainGroup": "pf-c-page__main-group",
|
|
14030
|
+
"pageMainNav": "pf-c-page__main-nav",
|
|
14031
|
+
"pageMainSection": "pf-c-page__main-section",
|
|
14032
|
+
"pageMainSubnav": "pf-c-page__main-subnav",
|
|
14033
|
+
"pageMainTabs": "pf-c-page__main-tabs",
|
|
14034
|
+
"pageMainWizard": "pf-c-page__main-wizard",
|
|
14035
|
+
"pageSidebar": "pf-c-page__sidebar",
|
|
14036
|
+
"pageSidebarBody": "pf-c-page__sidebar-body"
|
|
14037
|
+
};
|
|
14038
|
+
|
|
14039
|
+
const global_breakpoint_xl = {
|
|
14040
|
+
"name": "--pf-global--breakpoint--xl",
|
|
14041
|
+
"value": "1200px",
|
|
14042
|
+
"var": "var(--pf-global--breakpoint--xl)"
|
|
14043
|
+
};
|
|
14044
|
+
var globalBreakpointXl = global_breakpoint_xl;
|
|
14045
|
+
|
|
14046
|
+
const PageGroup = (_a) => {
|
|
14047
|
+
var { className = '', children, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
14048
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$A.pageMainGroup, sticky === 'top' && _default$A.modifiers.stickyTop, sticky === 'bottom' && _default$A.modifiers.stickyBottom, hasShadowTop && _default$A.modifiers.shadowTop, hasShadowBottom && _default$A.modifiers.shadowBottom, hasOverflowScroll && _default$A.modifiers.overflowScroll, className) }), children));
|
|
14049
|
+
};
|
|
14050
|
+
PageGroup.displayName = 'PageGroup';
|
|
14051
|
+
|
|
14052
|
+
exports.PageLayouts = void 0;
|
|
14053
|
+
(function (PageLayouts) {
|
|
14054
|
+
PageLayouts["vertical"] = "vertical";
|
|
14055
|
+
PageLayouts["horizontal"] = "horizontal";
|
|
14056
|
+
})(exports.PageLayouts || (exports.PageLayouts = {}));
|
|
14057
|
+
const pageContextDefaults = {
|
|
14058
|
+
isManagedSidebar: false,
|
|
14059
|
+
isNavOpen: false,
|
|
14060
|
+
onNavToggle: () => null,
|
|
14061
|
+
width: null,
|
|
14062
|
+
getBreakpoint
|
|
14063
|
+
};
|
|
14064
|
+
const PageContext = React__namespace.createContext(pageContextDefaults);
|
|
14065
|
+
const PageContextProvider = PageContext.Provider;
|
|
14066
|
+
const PageContextConsumer = PageContext.Consumer;
|
|
14067
|
+
class Page extends React__namespace.Component {
|
|
14068
|
+
constructor(props) {
|
|
14069
|
+
super(props);
|
|
14070
|
+
this.mainRef = React__namespace.createRef();
|
|
14071
|
+
this.pageRef = React__namespace.createRef();
|
|
14072
|
+
this.observer = () => { };
|
|
14073
|
+
this.getWindowWidth = () => {
|
|
14074
|
+
if (canUseDOM) {
|
|
14075
|
+
return this.pageRef.current ? this.pageRef.current.clientWidth : window.innerWidth;
|
|
14076
|
+
}
|
|
14077
|
+
else {
|
|
14078
|
+
return 1200;
|
|
14079
|
+
}
|
|
14080
|
+
};
|
|
14081
|
+
this.isMobile = () =>
|
|
14082
|
+
// eslint-disable-next-line radix
|
|
14083
|
+
this.getWindowWidth() < Number.parseInt(globalBreakpointXl.value, 10);
|
|
14084
|
+
this.resize = () => {
|
|
14085
|
+
const { onPageResize } = this.props;
|
|
14086
|
+
const mobileView = this.isMobile();
|
|
14087
|
+
if (onPageResize) {
|
|
14088
|
+
onPageResize({ mobileView, windowSize: this.getWindowWidth() });
|
|
14089
|
+
}
|
|
14090
|
+
if (mobileView !== this.state.mobileView) {
|
|
14091
|
+
this.setState({ mobileView });
|
|
14092
|
+
}
|
|
14093
|
+
this.pageRef.current && this.setState({ width: this.pageRef.current.clientWidth });
|
|
14094
|
+
};
|
|
14095
|
+
this.handleResize = debounce$1(this.resize, 250);
|
|
14096
|
+
this.handleMainClick = () => {
|
|
14097
|
+
if (this.isMobile() && this.state.mobileIsNavOpen && this.mainRef.current) {
|
|
14098
|
+
this.setState({ mobileIsNavOpen: false });
|
|
14099
|
+
}
|
|
14100
|
+
};
|
|
14101
|
+
this.onNavToggleMobile = () => {
|
|
14102
|
+
this.setState(prevState => ({
|
|
14103
|
+
mobileIsNavOpen: !prevState.mobileIsNavOpen
|
|
14104
|
+
}));
|
|
14105
|
+
};
|
|
14106
|
+
this.onNavToggleDesktop = () => {
|
|
14107
|
+
this.setState(prevState => ({
|
|
14108
|
+
desktopIsNavOpen: !prevState.desktopIsNavOpen
|
|
14109
|
+
}));
|
|
14110
|
+
};
|
|
14111
|
+
const { isManagedSidebar, defaultManagedSidebarIsOpen } = props;
|
|
14112
|
+
const managedSidebarOpen = !isManagedSidebar ? true : defaultManagedSidebarIsOpen;
|
|
14113
|
+
this.state = {
|
|
14114
|
+
desktopIsNavOpen: managedSidebarOpen,
|
|
14115
|
+
mobileIsNavOpen: false,
|
|
14116
|
+
mobileView: false,
|
|
14117
|
+
width: null
|
|
14118
|
+
};
|
|
14119
|
+
}
|
|
14120
|
+
componentDidMount() {
|
|
14121
|
+
const { isManagedSidebar, onPageResize } = this.props;
|
|
14122
|
+
if (isManagedSidebar || onPageResize) {
|
|
14123
|
+
this.observer = getResizeObserver(this.pageRef.current, this.handleResize);
|
|
14124
|
+
const currentRef = this.mainRef.current;
|
|
14125
|
+
if (currentRef) {
|
|
14126
|
+
currentRef.addEventListener('mousedown', this.handleMainClick);
|
|
14127
|
+
currentRef.addEventListener('touchstart', this.handleMainClick);
|
|
14128
|
+
}
|
|
14129
|
+
// Initial check if should be shown
|
|
14130
|
+
this.resize();
|
|
14131
|
+
}
|
|
14132
|
+
}
|
|
14133
|
+
componentWillUnmount() {
|
|
14134
|
+
const { isManagedSidebar, onPageResize } = this.props;
|
|
14135
|
+
if (isManagedSidebar || onPageResize) {
|
|
14136
|
+
this.observer();
|
|
14137
|
+
const currentRef = this.mainRef.current;
|
|
14138
|
+
if (currentRef) {
|
|
14139
|
+
currentRef.removeEventListener('mousedown', this.handleMainClick);
|
|
14140
|
+
currentRef.removeEventListener('touchstart', this.handleMainClick);
|
|
14141
|
+
}
|
|
14142
|
+
}
|
|
14143
|
+
}
|
|
14144
|
+
render() {
|
|
14145
|
+
const _a = this.props, { breadcrumb, isBreadcrumbWidthLimited, className, children, header, sidebar, notificationDrawer, isNotificationDrawerExpanded, onNotificationDrawerExpand, isTertiaryNavWidthLimited, skipToContent, role, mainContainerId, isManagedSidebar,
|
|
14146
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14147
|
+
defaultManagedSidebarIsOpen,
|
|
14148
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
14149
|
+
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"]);
|
|
14150
|
+
const { mobileView, mobileIsNavOpen, desktopIsNavOpen, width } = this.state;
|
|
14151
|
+
const context = {
|
|
14152
|
+
isManagedSidebar,
|
|
14153
|
+
onNavToggle: mobileView ? this.onNavToggleMobile : this.onNavToggleDesktop,
|
|
14154
|
+
isNavOpen: mobileView ? mobileIsNavOpen : desktopIsNavOpen,
|
|
14155
|
+
width,
|
|
14156
|
+
getBreakpoint
|
|
14157
|
+
};
|
|
14158
|
+
let nav = null;
|
|
14159
|
+
if (tertiaryNav && isTertiaryNavWidthLimited) {
|
|
14160
|
+
nav = (React__namespace.createElement("div", { className: css(_default$A.pageMainNav, _default$A.modifiers.limitWidth) },
|
|
14161
|
+
React__namespace.createElement("div", { className: css(_default$A.pageMainBody) }, tertiaryNav)));
|
|
14162
|
+
}
|
|
14163
|
+
else if (tertiaryNav) {
|
|
14164
|
+
nav = React__namespace.createElement("div", { className: css(_default$A.pageMainNav) }, tertiaryNav);
|
|
14165
|
+
}
|
|
14166
|
+
let crumb = null;
|
|
14167
|
+
if (breadcrumb && isBreadcrumbWidthLimited) {
|
|
14168
|
+
crumb = (React__namespace.createElement("section", { className: css(_default$A.pageMainBreadcrumb, _default$A.modifiers.limitWidth) },
|
|
14169
|
+
React__namespace.createElement("div", { className: css(_default$A.pageMainBody) }, breadcrumb)));
|
|
14170
|
+
}
|
|
14171
|
+
else if (breadcrumb) {
|
|
14172
|
+
crumb = React__namespace.createElement("section", { className: css(_default$A.pageMainBreadcrumb) }, breadcrumb);
|
|
14173
|
+
}
|
|
14174
|
+
const isGrouped = isTertiaryNavGrouped || isBreadcrumbGrouped || additionalGroupedContent;
|
|
14175
|
+
const group = isGrouped ? (React__namespace.createElement(PageGroup, Object.assign({}, groupProps),
|
|
14176
|
+
isTertiaryNavGrouped && nav,
|
|
14177
|
+
isBreadcrumbGrouped && crumb,
|
|
14178
|
+
additionalGroupedContent)) : null;
|
|
14179
|
+
const main = (React__namespace.createElement("main", { ref: this.mainRef, role: role, id: mainContainerId, className: css(_default$A.pageMain), tabIndex: mainTabIndex, "aria-label": mainAriaLabel },
|
|
14180
|
+
group,
|
|
14181
|
+
!isTertiaryNavGrouped && nav,
|
|
14182
|
+
!isBreadcrumbGrouped && crumb,
|
|
14183
|
+
children));
|
|
14184
|
+
const panelContent = React__namespace.createElement(DrawerPanelContent, null, notificationDrawer);
|
|
14185
|
+
return (React__namespace.createElement(PageContextProvider, { value: context },
|
|
14186
|
+
React__namespace.createElement("div", Object.assign({ ref: this.pageRef }, rest, { className: css(_default$A.page, width !== null && 'pf-m-resize-observer', width !== null && `pf-m-breakpoint-${getBreakpoint(width)}`, className) }),
|
|
14187
|
+
skipToContent,
|
|
14188
|
+
header,
|
|
14189
|
+
sidebar,
|
|
14190
|
+
notificationDrawer && (React__namespace.createElement("div", { className: css(_default$A.pageDrawer) },
|
|
14191
|
+
React__namespace.createElement(Drawer, { isExpanded: isNotificationDrawerExpanded, onExpand: onNotificationDrawerExpand },
|
|
14192
|
+
React__namespace.createElement(DrawerContent, { panelContent: panelContent },
|
|
14193
|
+
React__namespace.createElement(DrawerContentBody, null, main))))),
|
|
14194
|
+
!notificationDrawer && main)));
|
|
14195
|
+
}
|
|
14196
|
+
}
|
|
14197
|
+
Page.displayName = 'Page';
|
|
14198
|
+
Page.defaultProps = {
|
|
14199
|
+
isManagedSidebar: false,
|
|
14200
|
+
isBreadcrumbWidthLimited: false,
|
|
14201
|
+
defaultManagedSidebarIsOpen: true,
|
|
14202
|
+
onPageResize: () => null,
|
|
14203
|
+
mainTabIndex: -1,
|
|
14204
|
+
isNotificationDrawerExpanded: false,
|
|
14205
|
+
onNotificationDrawerExpand: () => null,
|
|
14206
|
+
getBreakpoint
|
|
14207
|
+
};
|
|
14208
|
+
|
|
13911
14209
|
const Masthead = (_a) => {
|
|
13912
|
-
var { children, className, backgroundColor = 'dark', display
|
|
13913
|
-
|
|
14210
|
+
var { children, className, backgroundColor = 'dark', display = {
|
|
14211
|
+
md: 'inline'
|
|
14212
|
+
}, inset } = _a, props = __rest$1(_a, ["children", "className", "backgroundColor", "display", "inset"]);
|
|
14213
|
+
const { width, getBreakpoint } = React__namespace.useContext(PageContext);
|
|
14214
|
+
return (React__namespace.createElement("header", Object.assign({ className: css(_default$B.masthead, formatBreakpointMods(display, _default$B, 'display-', getBreakpoint(width)), formatBreakpointMods(inset, _default$B, '', getBreakpoint(width)), backgroundColor === 'light' && _default$B.modifiers.light, backgroundColor === 'light200' && _default$B.modifiers.light_200, className) }, props), children));
|
|
13914
14215
|
};
|
|
13915
14216
|
Masthead.displayName = 'Masthead';
|
|
13916
14217
|
|
|
@@ -13939,7 +14240,7 @@
|
|
|
13939
14240
|
};
|
|
13940
14241
|
MastheadToggle.displayName = 'MastheadToggle';
|
|
13941
14242
|
|
|
13942
|
-
var _default$
|
|
14243
|
+
var _default$z = {
|
|
13943
14244
|
"breadcrumb": "pf-c-breadcrumb",
|
|
13944
14245
|
"divider": "pf-c-divider",
|
|
13945
14246
|
"menu": "pf-c-menu",
|
|
@@ -14146,7 +14447,7 @@
|
|
|
14146
14447
|
(document.activeElement.closest('ol') && document.activeElement.closest('ol').firstChild === element), getFocusableElement: (navigableElement) => navigableElement.firstChild, noHorizontalArrowHandling: document.activeElement &&
|
|
14147
14448
|
(document.activeElement.classList.contains('pf-c-breadcrumb__link') ||
|
|
14148
14449
|
document.activeElement.classList.contains('pf-c-dropdown__toggle')), noEnterHandling: true, noSpaceHandling: true })),
|
|
14149
|
-
React__namespace.createElement("div", Object.assign({ id: id, className: css(_default$
|
|
14450
|
+
React__namespace.createElement("div", Object.assign({ id: id, className: css(_default$z.menu, isPlain && _default$z.modifiers.plain, isScrollable && _default$z.modifiers.scrollable, containsFlyout && _default$z.modifiers.flyout, isNavFlyout && _default$z.modifiers.nav, containsDrilldown && _default$z.modifiers.drilldown, _isMenuDrilledIn && _default$z.modifiers.drilledIn, className), "aria-label": ariaLabel, ref: this.menuRef }, getOUIAProps(Menu.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props), children)));
|
|
14150
14451
|
}
|
|
14151
14452
|
}
|
|
14152
14453
|
MenuBase.displayName = 'Menu';
|
|
@@ -14166,27 +14467,27 @@
|
|
|
14166
14467
|
const refCallback = (el, menuId, onGetMenuHeight) => {
|
|
14167
14468
|
if (el) {
|
|
14168
14469
|
onGetMenuHeight && onGetMenuHeight(menuId, el.clientHeight);
|
|
14169
|
-
getHeight && getHeight(el.clientHeight);
|
|
14470
|
+
getHeight && getHeight(el.clientHeight.toString());
|
|
14170
14471
|
}
|
|
14171
14472
|
return ref || menuContentRef;
|
|
14172
14473
|
};
|
|
14173
|
-
return (React__namespace.createElement(MenuContext.Consumer, null, ({ menuId, onGetMenuHeight }) => (React__namespace.createElement("div", Object.assign({}, rest, { className: css(_default$
|
|
14474
|
+
return (React__namespace.createElement(MenuContext.Consumer, null, ({ menuId, onGetMenuHeight }) => (React__namespace.createElement("div", Object.assign({}, rest, { className: css(_default$z.menuContent, props.className), ref: el => refCallback(el, menuId, onGetMenuHeight), style: Object.assign(Object.assign({}, (menuHeight && { '--pf-c-menu__content--Height': menuHeight })), (maxMenuHeight && { '--pf-c-menu__content--MaxHeight': maxMenuHeight })) }), children))));
|
|
14174
14475
|
});
|
|
14175
14476
|
MenuContent.displayName = 'MenuContent';
|
|
14176
14477
|
|
|
14177
14478
|
const MenuFooter = (_a) => {
|
|
14178
14479
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
14179
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
14480
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$z.menuFooter, className) }), children));
|
|
14180
14481
|
};
|
|
14181
14482
|
MenuFooter.displayName = 'MenuFooter';
|
|
14182
14483
|
|
|
14183
|
-
const MenuInput = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
14484
|
+
const MenuInput = React__namespace.forwardRef((props, ref) => (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$z.menuSearch, props.className), ref: ref }))));
|
|
14184
14485
|
MenuInput.displayName = 'MenuInput';
|
|
14185
14486
|
|
|
14186
14487
|
const MenuGroupBase = (_a) => {
|
|
14187
14488
|
var { children, className = '', label = '', titleId = '', innerRef } = _a, props = __rest$1(_a, ["children", "className", "label", "titleId", "innerRef"]);
|
|
14188
14489
|
return (React__namespace.createElement("section", Object.assign({}, props, { className: css('pf-c-menu__group', className), ref: innerRef }),
|
|
14189
|
-
label && (React__namespace.createElement("h1", { className: css(_default$
|
|
14490
|
+
label && (React__namespace.createElement("h1", { className: css(_default$z.menuGroupTitle), id: titleId }, label)),
|
|
14190
14491
|
children));
|
|
14191
14492
|
};
|
|
14192
14493
|
const MenuGroup = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(MenuGroupBase, Object.assign({}, props, { innerRef: ref }))));
|
|
@@ -14222,8 +14523,8 @@
|
|
|
14222
14523
|
// event specified on the Menu
|
|
14223
14524
|
onActionClick && onActionClick(event, itemId, actionId);
|
|
14224
14525
|
};
|
|
14225
|
-
return (React__namespace.createElement("button", Object.assign({ className: css(_default$
|
|
14226
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
14526
|
+
return (React__namespace.createElement("button", Object.assign({ className: css(_default$z.menuItemAction, isFavorited !== null && _default$z.modifiers.favorite, isFavorited && _default$z.modifiers.favorited, className), "aria-label": ariaLabel, onClick: onClickButton }, ((isDisabled === true || isDisabledContext === true) && { disabled: true }), { ref: innerRef, tabIndex: -1 }, props),
|
|
14527
|
+
React__namespace.createElement("span", { className: css(_default$z.menuItemActionIcon) }, icon === 'favorites' || isFavorited !== null ? React__namespace.createElement(StarIcon$1, { "aria-hidden": true }) : icon)));
|
|
14227
14528
|
}))));
|
|
14228
14529
|
};
|
|
14229
14530
|
const MenuItemAction = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(MenuItemActionBase, Object.assign({}, props, { innerRef: ref }))));
|
|
@@ -14254,7 +14555,7 @@
|
|
|
14254
14555
|
useIsomorphicLayoutEffect(() => {
|
|
14255
14556
|
if (hasFlyout && ref.current && canUseDOM) {
|
|
14256
14557
|
const flyoutMenu = ref.current.lastElementChild;
|
|
14257
|
-
if (flyoutMenu && flyoutMenu.classList.contains(_default$
|
|
14558
|
+
if (flyoutMenu && flyoutMenu.classList.contains(_default$z.menu)) {
|
|
14258
14559
|
const origin = ref.current.getClientRects()[0];
|
|
14259
14560
|
const rect = flyoutMenu.getClientRects()[0];
|
|
14260
14561
|
if (origin && rect) {
|
|
@@ -14274,7 +14575,7 @@
|
|
|
14274
14575
|
xOffset = xDir === 'right' ? -spaceLeftRight : -spaceLeftLeft;
|
|
14275
14576
|
}
|
|
14276
14577
|
if (xDir === 'left') {
|
|
14277
|
-
flyoutMenu.classList.add(_default$
|
|
14578
|
+
flyoutMenu.classList.add(_default$z.modifiers.left);
|
|
14278
14579
|
flyoutMenu.style.setProperty(rightOffset.name, `-${xOffset}px`);
|
|
14279
14580
|
}
|
|
14280
14581
|
else {
|
|
@@ -14393,23 +14694,23 @@
|
|
|
14393
14694
|
setFlyoutRef(null);
|
|
14394
14695
|
}
|
|
14395
14696
|
};
|
|
14396
|
-
return (React__namespace.createElement("li", Object.assign({ role: "none", className: css(_default$
|
|
14697
|
+
return (React__namespace.createElement("li", Object.assign({ role: "none", className: css(_default$z.menuListItem, isDisabled && _default$z.modifiers.disabled, _isOnPath && _default$z.modifiers.currentPath, isLoadButton && _default$z.modifiers.load, isLoading && _default$z.modifiers.loading, className), onMouseOver: onMouseOver, tabIndex: -1 }, (flyoutMenu && { onKeyDown: handleFlyout }), { ref: ref }, props),
|
|
14397
14698
|
React__namespace.createElement(Component, Object.assign({ role: "menuitem", tabIndex: -1, onClick: (event) => {
|
|
14398
14699
|
onItemSelect(event, onSelect);
|
|
14399
14700
|
_drill && _drill();
|
|
14400
|
-
}, className: css(_default$
|
|
14401
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
14402
|
-
direction === 'up' && (React__namespace.createElement("span", { className: css(_default$
|
|
14701
|
+
}, className: css(_default$z.menuItem, getIsSelected() && _default$z.modifiers.selected, className), "aria-current": getAriaCurrent(), disabled: isDisabled }, additionalProps),
|
|
14702
|
+
React__namespace.createElement("span", { className: css(_default$z.menuItemMain) },
|
|
14703
|
+
direction === 'up' && (React__namespace.createElement("span", { className: css(_default$z.menuItemToggleIcon) },
|
|
14403
14704
|
React__namespace.createElement(AngleLeftIcon$1, { "aria-hidden": true }))),
|
|
14404
|
-
icon && React__namespace.createElement("span", { className: css(_default$
|
|
14405
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
14406
|
-
isExternalLink && (React__namespace.createElement("span", { className: css(_default$
|
|
14705
|
+
icon && React__namespace.createElement("span", { className: css(_default$z.menuItemIcon) }, icon),
|
|
14706
|
+
React__namespace.createElement("span", { className: css(_default$z.menuItemText) }, children),
|
|
14707
|
+
isExternalLink && (React__namespace.createElement("span", { className: css(_default$z.menuItemExternalIcon) },
|
|
14407
14708
|
React__namespace.createElement(ExternalLinkAltIcon$1, { "aria-hidden": true }))),
|
|
14408
|
-
(flyoutMenu || direction === 'down') && (React__namespace.createElement("span", { className: css(_default$
|
|
14709
|
+
(flyoutMenu || direction === 'down') && (React__namespace.createElement("span", { className: css(_default$z.menuItemToggleIcon) },
|
|
14409
14710
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true }))),
|
|
14410
|
-
getIsSelected() && (React__namespace.createElement("span", { className: css(_default$
|
|
14711
|
+
getIsSelected() && (React__namespace.createElement("span", { className: css(_default$z.menuItemSelectIcon) },
|
|
14411
14712
|
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))),
|
|
14412
|
-
description && direction !== 'up' && (React__namespace.createElement("span", { className: css(_default$
|
|
14713
|
+
description && direction !== 'up' && (React__namespace.createElement("span", { className: css(_default$z.menuItemDescription) },
|
|
14413
14714
|
React__namespace.createElement("span", null, description)))),
|
|
14414
14715
|
flyoutVisible && (React__namespace.createElement(MenuContext.Provider, { value: { disableHover } },
|
|
14415
14716
|
React__namespace.createElement(FlyoutContext.Provider, { value: { direction: flyoutXDirection } }, flyoutMenu))),
|
|
@@ -14422,7 +14723,7 @@
|
|
|
14422
14723
|
|
|
14423
14724
|
const MenuList = (_a) => {
|
|
14424
14725
|
var { children = null, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
14425
|
-
return (React__namespace.createElement("ul", Object.assign({ role: "menubar", className: css(_default$
|
|
14726
|
+
return (React__namespace.createElement("ul", Object.assign({ role: "menubar", className: css(_default$z.menuList, className) }, props), children));
|
|
14426
14727
|
};
|
|
14427
14728
|
MenuList.displayName = 'MenuList';
|
|
14428
14729
|
|
|
@@ -14443,11 +14744,11 @@
|
|
|
14443
14744
|
|
|
14444
14745
|
const MenuBreadcrumb = (_a) => {
|
|
14445
14746
|
var { children } = _a, props = __rest$1(_a, ["children"]);
|
|
14446
|
-
return (React__default["default"].createElement("div", Object.assign({ className: css(_default$
|
|
14747
|
+
return (React__default["default"].createElement("div", Object.assign({ className: css(_default$z.menuBreadcrumb) }, props), children));
|
|
14447
14748
|
};
|
|
14448
14749
|
MenuBreadcrumb.displayName = 'MenuBreadcrumb';
|
|
14449
14750
|
|
|
14450
|
-
var _default$
|
|
14751
|
+
var _default$y = {
|
|
14451
14752
|
"menuToggle": "pf-c-menu-toggle",
|
|
14452
14753
|
"menuToggleControls": "pf-c-menu-toggle__controls",
|
|
14453
14754
|
"menuToggleCount": "pf-c-menu-toggle__count",
|
|
@@ -14474,13 +14775,13 @@
|
|
|
14474
14775
|
const isPlain = variant === 'plain';
|
|
14475
14776
|
const isPlainText = variant === 'plainText';
|
|
14476
14777
|
const content = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
14477
|
-
icon && React__namespace.createElement("span", { className: css(_default$
|
|
14778
|
+
icon && React__namespace.createElement("span", { className: css(_default$y.menuToggleIcon) }, icon),
|
|
14478
14779
|
React__namespace.createElement("span", { className: "pf-c-menu-toggle__text" }, children),
|
|
14479
|
-
badge && React__namespace.createElement("span", { className: css(_default$
|
|
14480
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
14481
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
14780
|
+
badge && React__namespace.createElement("span", { className: css(_default$y.menuToggleCount) }, badge),
|
|
14781
|
+
React__namespace.createElement("span", { className: css(_default$y.menuToggleControls) },
|
|
14782
|
+
React__namespace.createElement("span", { className: css(_default$y.menuToggleToggleIcon) },
|
|
14482
14783
|
React__namespace.createElement(CaretDownIcon$1, { "aria-hidden": true })))));
|
|
14483
|
-
return (React__namespace.createElement("button", Object.assign({ className: css(_default$
|
|
14784
|
+
return (React__namespace.createElement("button", Object.assign({ className: css(_default$y.menuToggle, isExpanded && _default$y.modifiers.expanded, variant === 'primary' && _default$y.modifiers.primary, (isPlain || isPlainText) && _default$y.modifiers.plain, isPlainText && _default$y.modifiers.text, className), type: "button", "aria-expanded": false, ref: innerRef }, (isExpanded && { 'aria-expanded': true }), (isDisabled && { disabled: true }), props),
|
|
14484
14785
|
isPlain && children,
|
|
14485
14786
|
!isPlain && content));
|
|
14486
14787
|
}
|
|
@@ -14494,7 +14795,7 @@
|
|
|
14494
14795
|
const MenuToggle = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(MenuToggleBase, Object.assign({ innerRef: ref }, props))));
|
|
14495
14796
|
MenuToggle.displayName = 'MenuToggle';
|
|
14496
14797
|
|
|
14497
|
-
var _default$
|
|
14798
|
+
var _default$x = {
|
|
14498
14799
|
"button": "pf-c-button",
|
|
14499
14800
|
"modalBox": "pf-c-modal-box",
|
|
14500
14801
|
"modalBoxBody": "pf-c-modal-box__body",
|
|
@@ -14522,7 +14823,7 @@
|
|
|
14522
14823
|
|
|
14523
14824
|
const ModalBoxBody = (_a) => {
|
|
14524
14825
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
14525
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
14826
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$x.modalBoxBody, className) }), children));
|
|
14526
14827
|
};
|
|
14527
14828
|
ModalBoxBody.displayName = 'ModalBoxBody';
|
|
14528
14829
|
|
|
@@ -14546,27 +14847,27 @@
|
|
|
14546
14847
|
style = style || {};
|
|
14547
14848
|
style[topSpacer.name] = positionOffset;
|
|
14548
14849
|
}
|
|
14549
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { role: "dialog", "aria-label": ariaLabel || null, "aria-labelledby": ariaLabelledby || null, "aria-describedby": ariaDescribedby, "aria-modal": "true", className: css(_default$
|
|
14850
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { role: "dialog", "aria-label": ariaLabel || null, "aria-labelledby": ariaLabelledby || null, "aria-describedby": ariaDescribedby, "aria-modal": "true", className: css(_default$x.modalBox, className, position === 'top' && _default$x.modifiers.alignTop, variant === 'large' && _default$x.modifiers.lg, variant === 'small' && _default$x.modifiers.sm, variant === 'medium' && _default$x.modifiers.md), style: style }), children));
|
|
14550
14851
|
};
|
|
14551
14852
|
ModalBox.displayName = 'ModalBox';
|
|
14552
14853
|
|
|
14553
14854
|
const ModalBoxFooter = (_a) => {
|
|
14554
14855
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
14555
|
-
return (React__namespace.createElement("footer", Object.assign({}, props, { className: css(_default$
|
|
14856
|
+
return (React__namespace.createElement("footer", Object.assign({}, props, { className: css(_default$x.modalBoxFooter, className) }), children));
|
|
14556
14857
|
};
|
|
14557
14858
|
ModalBoxFooter.displayName = 'ModalBoxFooter';
|
|
14558
14859
|
|
|
14559
14860
|
const ModalBoxDescription = (_a) => {
|
|
14560
14861
|
var { children = null, className = '', id = '' } = _a, props = __rest$1(_a, ["children", "className", "id"]);
|
|
14561
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { id: id, className: css(_default$
|
|
14862
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { id: id, className: css(_default$x.modalBoxDescription, className) }), children));
|
|
14562
14863
|
};
|
|
14563
14864
|
ModalBoxDescription.displayName = 'ModalBoxDescription';
|
|
14564
14865
|
|
|
14565
14866
|
const ModalBoxHeader = (_a) => {
|
|
14566
14867
|
var { children = null, className = '', help = null } = _a, props = __rest$1(_a, ["children", "className", "help"]);
|
|
14567
|
-
return (React__namespace.createElement("header", Object.assign({ className: css(_default$
|
|
14868
|
+
return (React__namespace.createElement("header", Object.assign({ className: css(_default$x.modalBoxHeader, help && _default$x.modifiers.help, className) }, props),
|
|
14568
14869
|
help && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
14569
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
14870
|
+
React__namespace.createElement("div", { className: css(_default$x.modalBoxHeaderMain) }, children),
|
|
14570
14871
|
React__namespace.createElement("div", { className: "pf-c-modal-box__header-help" }, help))),
|
|
14571
14872
|
!help && children));
|
|
14572
14873
|
};
|
|
@@ -14589,10 +14890,10 @@
|
|
|
14589
14890
|
useIsomorphicLayoutEffect(() => {
|
|
14590
14891
|
setIsTooltipVisible(h1.current && h1.current.offsetWidth < h1.current.scrollWidth);
|
|
14591
14892
|
}, []);
|
|
14592
|
-
const content = (React__namespace.createElement("h1", Object.assign({ id: id, ref: h1, className: css(_default$
|
|
14593
|
-
titleIconVariant && (React__namespace.createElement("span", { className: css(_default$
|
|
14893
|
+
const content = (React__namespace.createElement("h1", Object.assign({ id: id, ref: h1, className: css(_default$x.modalBoxTitle, titleIconVariant && _default$x.modifiers.icon, className) }, props),
|
|
14894
|
+
titleIconVariant && (React__namespace.createElement("span", { className: css(_default$x.modalBoxTitleIcon) }, isVariantIcon(titleIconVariant) ? variantIcons[titleIconVariant] : React__namespace.createElement(CustomIcon, null))),
|
|
14594
14895
|
label && React__namespace.createElement("span", { className: css(_default$1g.screenReader) }, label),
|
|
14595
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
14896
|
+
React__namespace.createElement("span", { className: css(_default$x.modalBoxTitleText) }, title)));
|
|
14596
14897
|
return isTooltipVisible ? (React__namespace.createElement(Tooltip, { content: title, isVisible: true }, content)) : (content);
|
|
14597
14898
|
};
|
|
14598
14899
|
ModalBoxTitle.displayName = 'ModalBoxTitle';
|
|
@@ -14625,7 +14926,7 @@
|
|
|
14625
14926
|
return idRefList.join(' ');
|
|
14626
14927
|
};
|
|
14627
14928
|
const modalBox = (React__namespace.createElement(ModalBox, Object.assign({ id: boxId, style: boxStyle, className: css(className, isVariantIcon(titleIconVariant) &&
|
|
14628
|
-
_default$
|
|
14929
|
+
_default$x.modifiers[titleIconVariant]), variant: variant, position: position, positionOffset: positionOffset, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledbyFormatted(), "aria-describedby": ariaDescribedby || (hasNoBodyWrapper ? null : descriptorId) }, getOUIAProps(ModalContent.displayName, ouiaId, ouiaSafe)),
|
|
14629
14930
|
showClose && React__namespace.createElement(ModalBoxCloseButton, { onClose: onClose, ouiaId: ouiaId }),
|
|
14630
14931
|
modalBoxHeader,
|
|
14631
14932
|
modalBody,
|
|
@@ -14759,7 +15060,7 @@
|
|
|
14759
15060
|
ouiaSafe: true
|
|
14760
15061
|
};
|
|
14761
15062
|
|
|
14762
|
-
var _default$
|
|
15063
|
+
var _default$w = {
|
|
14763
15064
|
"divider": "pf-c-divider",
|
|
14764
15065
|
"menu": "pf-c-menu",
|
|
14765
15066
|
"menuContent": "pf-c-menu__content",
|
|
@@ -14794,7 +15095,8 @@
|
|
|
14794
15095
|
"navToggleIcon": "pf-c-nav__toggle-icon"
|
|
14795
15096
|
};
|
|
14796
15097
|
|
|
14797
|
-
const
|
|
15098
|
+
const navContextDefaults = {};
|
|
15099
|
+
const NavContext = React__namespace.createContext(navContextDefaults);
|
|
14798
15100
|
class Nav extends React__namespace.Component {
|
|
14799
15101
|
constructor() {
|
|
14800
15102
|
super(...arguments);
|
|
@@ -14837,7 +15139,7 @@
|
|
|
14837
15139
|
flyoutRef: this.state.flyoutRef,
|
|
14838
15140
|
setFlyoutRef: flyoutRef => this.setState({ flyoutRef })
|
|
14839
15141
|
} },
|
|
14840
|
-
React__namespace.createElement("nav", Object.assign({ className: css(_default$
|
|
15142
|
+
React__namespace.createElement("nav", Object.assign({ className: css(_default$w.nav, theme === 'light' && _default$w.modifiers.light, isHorizontal && _default$w.modifiers.horizontal, variant === 'tertiary' && _default$w.modifiers.tertiary, variant === 'horizontal-subnav' && _default$w.modifiers.horizontalSubnav, this.state.isScrollable && _default$w.modifiers.scrollable, className), "aria-label": ariaLabel || (variant === 'tertiary' ? 'Local' : 'Global') }, getOUIAProps(Nav.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props), children)));
|
|
14841
15143
|
}
|
|
14842
15144
|
}
|
|
14843
15145
|
Nav.displayName = 'Nav';
|
|
@@ -14848,250 +15150,16 @@
|
|
|
14848
15150
|
ouiaSafe: true
|
|
14849
15151
|
};
|
|
14850
15152
|
|
|
14851
|
-
|
|
14852
|
-
"avatar": "pf-c-avatar",
|
|
14853
|
-
"brand": "pf-c-brand",
|
|
14854
|
-
"button": "pf-c-button",
|
|
14855
|
-
"card": "pf-c-card",
|
|
14856
|
-
"contextSelector": "pf-c-context-selector",
|
|
14857
|
-
"drawer": "pf-c-drawer",
|
|
14858
|
-
"masthead": "pf-c-masthead",
|
|
14859
|
-
"modifiers": {
|
|
14860
|
-
"light": "pf-m-light",
|
|
14861
|
-
"menu": "pf-m-menu",
|
|
14862
|
-
"hidden": "pf-m-hidden",
|
|
14863
|
-
"hiddenOnSm": "pf-m-hidden-on-sm",
|
|
14864
|
-
"visibleOnSm": "pf-m-visible-on-sm",
|
|
14865
|
-
"hiddenOnMd": "pf-m-hidden-on-md",
|
|
14866
|
-
"visibleOnMd": "pf-m-visible-on-md",
|
|
14867
|
-
"hiddenOnLg": "pf-m-hidden-on-lg",
|
|
14868
|
-
"visibleOnLg": "pf-m-visible-on-lg",
|
|
14869
|
-
"hiddenOnXl": "pf-m-hidden-on-xl",
|
|
14870
|
-
"visibleOnXl": "pf-m-visible-on-xl",
|
|
14871
|
-
"hiddenOn_2xl": "pf-m-hidden-on-2xl",
|
|
14872
|
-
"visibleOn_2xl": "pf-m-visible-on-2xl",
|
|
14873
|
-
"read": "pf-m-read",
|
|
14874
|
-
"selected": "pf-m-selected",
|
|
14875
|
-
"unread": "pf-m-unread",
|
|
14876
|
-
"attention": "pf-m-attention",
|
|
14877
|
-
"expanded": "pf-m-expanded",
|
|
14878
|
-
"collapsed": "pf-m-collapsed",
|
|
14879
|
-
"limitWidth": "pf-m-limit-width",
|
|
14880
|
-
"alignCenter": "pf-m-align-center",
|
|
14881
|
-
"stickyTop": "pf-m-sticky-top",
|
|
14882
|
-
"stickyBottom": "pf-m-sticky-bottom",
|
|
14883
|
-
"overflowScroll": "pf-m-overflow-scroll",
|
|
14884
|
-
"shadowBottom": "pf-m-shadow-bottom",
|
|
14885
|
-
"shadowTop": "pf-m-shadow-top",
|
|
14886
|
-
"fill": "pf-m-fill",
|
|
14887
|
-
"noFill": "pf-m-no-fill",
|
|
14888
|
-
"dark_100": "pf-m-dark-100",
|
|
14889
|
-
"dark_200": "pf-m-dark-200",
|
|
14890
|
-
"padding": "pf-m-padding",
|
|
14891
|
-
"noPadding": "pf-m-no-padding",
|
|
14892
|
-
"paddingOnSm": "pf-m-padding-on-sm",
|
|
14893
|
-
"noPaddingOnSm": "pf-m-no-padding-on-sm",
|
|
14894
|
-
"paddingOnMd": "pf-m-padding-on-md",
|
|
14895
|
-
"noPaddingOnMd": "pf-m-no-padding-on-md",
|
|
14896
|
-
"paddingOnLg": "pf-m-padding-on-lg",
|
|
14897
|
-
"noPaddingOnLg": "pf-m-no-padding-on-lg",
|
|
14898
|
-
"paddingOnXl": "pf-m-padding-on-xl",
|
|
14899
|
-
"noPaddingOnXl": "pf-m-no-padding-on-xl",
|
|
14900
|
-
"paddingOn_2xl": "pf-m-padding-on-2xl",
|
|
14901
|
-
"noPaddingOn_2xl": "pf-m-no-padding-on-2xl"
|
|
14902
|
-
},
|
|
14903
|
-
"nav": "pf-c-nav",
|
|
14904
|
-
"notificationBadge": "pf-c-notification-badge",
|
|
14905
|
-
"page": "pf-c-page",
|
|
14906
|
-
"pageDrawer": "pf-c-page__drawer",
|
|
14907
|
-
"pageHeader": "pf-c-page__header",
|
|
14908
|
-
"pageHeaderBrand": "pf-c-page__header-brand",
|
|
14909
|
-
"pageHeaderBrandLink": "pf-c-page__header-brand-link",
|
|
14910
|
-
"pageHeaderBrandToggle": "pf-c-page__header-brand-toggle",
|
|
14911
|
-
"pageHeaderNav": "pf-c-page__header-nav",
|
|
14912
|
-
"pageHeaderTools": "pf-c-page__header-tools",
|
|
14913
|
-
"pageHeaderToolsGroup": "pf-c-page__header-tools-group",
|
|
14914
|
-
"pageHeaderToolsItem": "pf-c-page__header-tools-item",
|
|
14915
|
-
"pageMain": "pf-c-page__main",
|
|
14916
|
-
"pageMainBody": "pf-c-page__main-body",
|
|
14917
|
-
"pageMainBreadcrumb": "pf-c-page__main-breadcrumb",
|
|
14918
|
-
"pageMainDrawer": "pf-c-page__main-drawer",
|
|
14919
|
-
"pageMainGroup": "pf-c-page__main-group",
|
|
14920
|
-
"pageMainNav": "pf-c-page__main-nav",
|
|
14921
|
-
"pageMainSection": "pf-c-page__main-section",
|
|
14922
|
-
"pageMainSubnav": "pf-c-page__main-subnav",
|
|
14923
|
-
"pageMainTabs": "pf-c-page__main-tabs",
|
|
14924
|
-
"pageMainWizard": "pf-c-page__main-wizard",
|
|
14925
|
-
"pageSidebar": "pf-c-page__sidebar",
|
|
14926
|
-
"pageSidebarBody": "pf-c-page__sidebar-body"
|
|
14927
|
-
};
|
|
14928
|
-
|
|
14929
|
-
const global_breakpoint_xl = {
|
|
14930
|
-
"name": "--pf-global--breakpoint--xl",
|
|
14931
|
-
"value": "1200px",
|
|
14932
|
-
"var": "var(--pf-global--breakpoint--xl)"
|
|
14933
|
-
};
|
|
14934
|
-
var globalBreakpointXl = global_breakpoint_xl;
|
|
14935
|
-
|
|
14936
|
-
const PageGroup = (_a) => {
|
|
14937
|
-
var { className = '', children, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
14938
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$w.pageMainGroup, sticky === 'top' && _default$w.modifiers.stickyTop, sticky === 'bottom' && _default$w.modifiers.stickyBottom, hasShadowTop && _default$w.modifiers.shadowTop, hasShadowBottom && _default$w.modifiers.shadowBottom, hasOverflowScroll && _default$w.modifiers.overflowScroll, className) }), children));
|
|
14939
|
-
};
|
|
14940
|
-
PageGroup.displayName = 'PageGroup';
|
|
14941
|
-
|
|
14942
|
-
exports.PageLayouts = void 0;
|
|
14943
|
-
(function (PageLayouts) {
|
|
14944
|
-
PageLayouts["vertical"] = "vertical";
|
|
14945
|
-
PageLayouts["horizontal"] = "horizontal";
|
|
14946
|
-
})(exports.PageLayouts || (exports.PageLayouts = {}));
|
|
14947
|
-
const PageContext = React__namespace.createContext({
|
|
14948
|
-
isManagedSidebar: false,
|
|
14949
|
-
isNavOpen: false,
|
|
14950
|
-
onNavToggle: () => null
|
|
14951
|
-
});
|
|
14952
|
-
const PageContextProvider = PageContext.Provider;
|
|
14953
|
-
const PageContextConsumer = PageContext.Consumer;
|
|
14954
|
-
class Page extends React__namespace.Component {
|
|
14955
|
-
constructor(props) {
|
|
14956
|
-
super(props);
|
|
14957
|
-
this.mainRef = React__namespace.createRef();
|
|
14958
|
-
this.getWindowWidth = () => (canUseDOM ? window.innerWidth : 1200);
|
|
14959
|
-
this.isMobile = () =>
|
|
14960
|
-
// eslint-disable-next-line radix
|
|
14961
|
-
this.getWindowWidth() < Number.parseInt(globalBreakpointXl.value, 10);
|
|
14962
|
-
this.resize = () => {
|
|
14963
|
-
const { onPageResize } = this.props;
|
|
14964
|
-
const mobileView = this.isMobile();
|
|
14965
|
-
if (onPageResize) {
|
|
14966
|
-
onPageResize({ mobileView, windowSize: this.getWindowWidth() });
|
|
14967
|
-
}
|
|
14968
|
-
if (mobileView !== this.state.mobileView) {
|
|
14969
|
-
this.setState({ mobileView });
|
|
14970
|
-
}
|
|
14971
|
-
};
|
|
14972
|
-
this.handleResize = debounce$1(this.resize, 250);
|
|
14973
|
-
this.handleMainClick = () => {
|
|
14974
|
-
if (this.isMobile() && this.state.mobileIsNavOpen && this.mainRef.current) {
|
|
14975
|
-
this.setState({ mobileIsNavOpen: false });
|
|
14976
|
-
}
|
|
14977
|
-
};
|
|
14978
|
-
this.onNavToggleMobile = () => {
|
|
14979
|
-
this.setState(prevState => ({
|
|
14980
|
-
mobileIsNavOpen: !prevState.mobileIsNavOpen
|
|
14981
|
-
}));
|
|
14982
|
-
};
|
|
14983
|
-
this.onNavToggleDesktop = () => {
|
|
14984
|
-
this.setState(prevState => ({
|
|
14985
|
-
desktopIsNavOpen: !prevState.desktopIsNavOpen
|
|
14986
|
-
}));
|
|
14987
|
-
};
|
|
14988
|
-
const { isManagedSidebar, defaultManagedSidebarIsOpen } = props;
|
|
14989
|
-
const managedSidebarOpen = !isManagedSidebar ? true : defaultManagedSidebarIsOpen;
|
|
14990
|
-
this.state = {
|
|
14991
|
-
desktopIsNavOpen: managedSidebarOpen,
|
|
14992
|
-
mobileIsNavOpen: false,
|
|
14993
|
-
mobileView: false
|
|
14994
|
-
};
|
|
14995
|
-
}
|
|
14996
|
-
componentDidMount() {
|
|
14997
|
-
const { isManagedSidebar, onPageResize } = this.props;
|
|
14998
|
-
if (isManagedSidebar || onPageResize) {
|
|
14999
|
-
if (canUseDOM) {
|
|
15000
|
-
window.addEventListener('resize', this.handleResize);
|
|
15001
|
-
}
|
|
15002
|
-
const currentRef = this.mainRef.current;
|
|
15003
|
-
if (currentRef) {
|
|
15004
|
-
currentRef.addEventListener('mousedown', this.handleMainClick);
|
|
15005
|
-
currentRef.addEventListener('touchstart', this.handleMainClick);
|
|
15006
|
-
}
|
|
15007
|
-
// Initial check if should be shown
|
|
15008
|
-
this.resize();
|
|
15009
|
-
}
|
|
15010
|
-
}
|
|
15011
|
-
componentWillUnmount() {
|
|
15012
|
-
const { isManagedSidebar, onPageResize } = this.props;
|
|
15013
|
-
if (isManagedSidebar || onPageResize) {
|
|
15014
|
-
if (canUseDOM) {
|
|
15015
|
-
window.removeEventListener('resize', this.handleResize);
|
|
15016
|
-
}
|
|
15017
|
-
const currentRef = this.mainRef.current;
|
|
15018
|
-
if (currentRef) {
|
|
15019
|
-
currentRef.removeEventListener('mousedown', this.handleMainClick);
|
|
15020
|
-
currentRef.removeEventListener('touchstart', this.handleMainClick);
|
|
15021
|
-
}
|
|
15022
|
-
}
|
|
15023
|
-
}
|
|
15024
|
-
render() {
|
|
15025
|
-
const _a = this.props, { breadcrumb, isBreadcrumbWidthLimited, className, children, header, sidebar, notificationDrawer, isNotificationDrawerExpanded, onNotificationDrawerExpand, isTertiaryNavWidthLimited, skipToContent, role, mainContainerId, isManagedSidebar,
|
|
15026
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15027
|
-
defaultManagedSidebarIsOpen,
|
|
15028
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15029
|
-
onPageResize, 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", "mainAriaLabel", "mainTabIndex", "tertiaryNav", "isTertiaryNavGrouped", "isBreadcrumbGrouped", "additionalGroupedContent", "groupProps"]);
|
|
15030
|
-
const { mobileView, mobileIsNavOpen, desktopIsNavOpen } = this.state;
|
|
15031
|
-
const context = {
|
|
15032
|
-
isManagedSidebar,
|
|
15033
|
-
onNavToggle: mobileView ? this.onNavToggleMobile : this.onNavToggleDesktop,
|
|
15034
|
-
isNavOpen: mobileView ? mobileIsNavOpen : desktopIsNavOpen
|
|
15035
|
-
};
|
|
15036
|
-
let nav = null;
|
|
15037
|
-
if (tertiaryNav && isTertiaryNavWidthLimited) {
|
|
15038
|
-
nav = (React__namespace.createElement("div", { className: css(_default$w.pageMainNav, _default$w.modifiers.limitWidth) },
|
|
15039
|
-
React__namespace.createElement("div", { className: css(_default$w.pageMainBody) }, tertiaryNav)));
|
|
15040
|
-
}
|
|
15041
|
-
else if (tertiaryNav) {
|
|
15042
|
-
nav = React__namespace.createElement("div", { className: css(_default$w.pageMainNav) }, tertiaryNav);
|
|
15043
|
-
}
|
|
15044
|
-
let crumb = null;
|
|
15045
|
-
if (breadcrumb && isBreadcrumbWidthLimited) {
|
|
15046
|
-
crumb = (React__namespace.createElement("section", { className: css(_default$w.pageMainBreadcrumb, _default$w.modifiers.limitWidth) },
|
|
15047
|
-
React__namespace.createElement("div", { className: css(_default$w.pageMainBody) }, breadcrumb)));
|
|
15048
|
-
}
|
|
15049
|
-
else if (breadcrumb) {
|
|
15050
|
-
crumb = React__namespace.createElement("section", { className: css(_default$w.pageMainBreadcrumb) }, breadcrumb);
|
|
15051
|
-
}
|
|
15052
|
-
const isGrouped = isTertiaryNavGrouped || isBreadcrumbGrouped || additionalGroupedContent;
|
|
15053
|
-
const group = isGrouped ? (React__namespace.createElement(PageGroup, Object.assign({}, groupProps),
|
|
15054
|
-
isTertiaryNavGrouped && nav,
|
|
15055
|
-
isBreadcrumbGrouped && crumb,
|
|
15056
|
-
additionalGroupedContent)) : null;
|
|
15057
|
-
const main = (React__namespace.createElement("main", { ref: this.mainRef, role: role, id: mainContainerId, className: css(_default$w.pageMain), tabIndex: mainTabIndex, "aria-label": mainAriaLabel },
|
|
15058
|
-
group,
|
|
15059
|
-
!isTertiaryNavGrouped && nav,
|
|
15060
|
-
!isBreadcrumbGrouped && crumb,
|
|
15061
|
-
children));
|
|
15062
|
-
const panelContent = React__namespace.createElement(DrawerPanelContent, null, notificationDrawer);
|
|
15063
|
-
return (React__namespace.createElement(PageContextProvider, { value: context },
|
|
15064
|
-
React__namespace.createElement("div", Object.assign({}, rest, { className: css(_default$w.page, className) }),
|
|
15065
|
-
skipToContent,
|
|
15066
|
-
header,
|
|
15067
|
-
sidebar,
|
|
15068
|
-
notificationDrawer && (React__namespace.createElement("div", { className: css(_default$w.pageDrawer) },
|
|
15069
|
-
React__namespace.createElement(Drawer, { isExpanded: isNotificationDrawerExpanded, onExpand: onNotificationDrawerExpand },
|
|
15070
|
-
React__namespace.createElement(DrawerContent, { panelContent: panelContent },
|
|
15071
|
-
React__namespace.createElement(DrawerContentBody, null, main))))),
|
|
15072
|
-
!notificationDrawer && main)));
|
|
15073
|
-
}
|
|
15074
|
-
}
|
|
15075
|
-
Page.displayName = 'Page';
|
|
15076
|
-
Page.defaultProps = {
|
|
15077
|
-
isManagedSidebar: false,
|
|
15078
|
-
isBreadcrumbWidthLimited: false,
|
|
15079
|
-
defaultManagedSidebarIsOpen: true,
|
|
15080
|
-
onPageResize: () => null,
|
|
15081
|
-
mainTabIndex: -1,
|
|
15082
|
-
isNotificationDrawerExpanded: false,
|
|
15083
|
-
onNotificationDrawerExpand: () => null
|
|
15084
|
-
};
|
|
15085
|
-
|
|
15086
|
-
const PageSidebarContext = React__namespace.createContext({
|
|
15153
|
+
const pageSidebarContextDefaults = {
|
|
15087
15154
|
isNavOpen: true
|
|
15088
|
-
}
|
|
15155
|
+
};
|
|
15156
|
+
const PageSidebarContext = React__namespace.createContext(pageSidebarContextDefaults);
|
|
15089
15157
|
const PageSidebar = (_a) => {
|
|
15090
15158
|
var { className = '', nav, isNavOpen = true, theme = 'dark' } = _a, props = __rest$1(_a, ["className", "nav", "isNavOpen", "theme"]);
|
|
15091
15159
|
return (React__namespace.createElement(PageContextConsumer, null, ({ isManagedSidebar, isNavOpen: managedIsNavOpen }) => {
|
|
15092
15160
|
const navOpen = isManagedSidebar ? managedIsNavOpen : isNavOpen;
|
|
15093
|
-
return (React__namespace.createElement("div", Object.assign({ id: "page-sidebar", className: css(_default$
|
|
15094
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
15161
|
+
return (React__namespace.createElement("div", Object.assign({ id: "page-sidebar", className: css(_default$A.pageSidebar, theme === 'light' && _default$A.modifiers.light, navOpen && _default$A.modifiers.expanded, !navOpen && _default$A.modifiers.collapsed, className), "aria-hidden": !navOpen }, props),
|
|
15162
|
+
React__namespace.createElement("div", { className: css(_default$A.pageSidebarBody) },
|
|
15095
15163
|
React__namespace.createElement(PageSidebarContext.Provider, { value: { isNavOpen: navOpen } }, nav))));
|
|
15096
15164
|
}));
|
|
15097
15165
|
};
|
|
@@ -15105,6 +15173,7 @@
|
|
|
15105
15173
|
scrollViewAtEnd: false
|
|
15106
15174
|
};
|
|
15107
15175
|
this.navList = React__namespace.createRef();
|
|
15176
|
+
this.observer = () => { };
|
|
15108
15177
|
this.handleScrollButtons = () => {
|
|
15109
15178
|
const container = this.navList.current;
|
|
15110
15179
|
if (container) {
|
|
@@ -15158,24 +15227,20 @@
|
|
|
15158
15227
|
};
|
|
15159
15228
|
}
|
|
15160
15229
|
componentDidMount() {
|
|
15161
|
-
|
|
15162
|
-
window.addEventListener('resize', this.handleScrollButtons, false);
|
|
15163
|
-
}
|
|
15230
|
+
this.observer = getResizeObserver(this.navList.current, this.handleScrollButtons);
|
|
15164
15231
|
this.handleScrollButtons();
|
|
15165
15232
|
}
|
|
15166
15233
|
componentWillUnmount() {
|
|
15167
|
-
|
|
15168
|
-
window.removeEventListener('resize', this.handleScrollButtons, false);
|
|
15169
|
-
}
|
|
15234
|
+
this.observer();
|
|
15170
15235
|
}
|
|
15171
15236
|
render() {
|
|
15172
15237
|
const _a = this.props, { children, className, ariaLeftScroll, ariaRightScroll } = _a, props = __rest$1(_a, ["children", "className", "ariaLeftScroll", "ariaRightScroll"]);
|
|
15173
15238
|
const { scrollViewAtStart, scrollViewAtEnd } = this.state;
|
|
15174
15239
|
return (React__namespace.createElement(NavContext.Consumer, null, ({ isHorizontal }) => (React__namespace.createElement(PageSidebarContext.Consumer, null, ({ isNavOpen }) => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
15175
|
-
isHorizontal && (React__namespace.createElement("button", { className: css(_default$
|
|
15240
|
+
isHorizontal && (React__namespace.createElement("button", { className: css(_default$w.navScrollButton), "aria-label": ariaLeftScroll, onClick: this.scrollLeft, disabled: scrollViewAtStart, tabIndex: isNavOpen ? null : -1 },
|
|
15176
15241
|
React__namespace.createElement(AngleLeftIcon$1, null))),
|
|
15177
|
-
React__namespace.createElement("ul", Object.assign({ ref: this.navList, className: css(_default$
|
|
15178
|
-
isHorizontal && (React__namespace.createElement("button", { className: css(_default$
|
|
15242
|
+
React__namespace.createElement("ul", Object.assign({ ref: this.navList, className: css(_default$w.navList, className), onScroll: this.handleScrollButtons }, props), children),
|
|
15243
|
+
isHorizontal && (React__namespace.createElement("button", { className: css(_default$w.navScrollButton), "aria-label": ariaRightScroll, onClick: this.scrollRight, disabled: scrollViewAtEnd, tabIndex: isNavOpen ? null : -1 },
|
|
15179
15244
|
React__namespace.createElement(AngleRightIcon$1, null)))))))));
|
|
15180
15245
|
}
|
|
15181
15246
|
}
|
|
@@ -15188,9 +15253,9 @@
|
|
|
15188
15253
|
|
|
15189
15254
|
const NavGroup = (_a) => {
|
|
15190
15255
|
var { title, children = null, className = '', id = getUniqueId() } = _a, props = __rest$1(_a, ["title", "children", "className", "id"]);
|
|
15191
|
-
return (React__namespace.createElement("section", Object.assign({ className: css(_default$
|
|
15192
|
-
React__namespace.createElement("h2", { className: css(_default$
|
|
15193
|
-
React__namespace.createElement("ul", { className: css(_default$
|
|
15256
|
+
return (React__namespace.createElement("section", Object.assign({ className: css(_default$w.navSection, className), "aria-labelledby": id }, props),
|
|
15257
|
+
React__namespace.createElement("h2", { className: css(_default$w.navSectionTitle), id: id }, title),
|
|
15258
|
+
React__namespace.createElement("ul", { className: css(_default$w.navList, className) }, children)));
|
|
15194
15259
|
};
|
|
15195
15260
|
NavGroup.displayName = 'NavGroup';
|
|
15196
15261
|
|
|
@@ -15279,17 +15344,17 @@
|
|
|
15279
15344
|
}
|
|
15280
15345
|
}
|
|
15281
15346
|
}, [flyoutVisible, flyoutTarget]);
|
|
15282
|
-
const flyoutButton = (React__namespace.createElement("span", { className: css(_default$
|
|
15283
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
15347
|
+
const flyoutButton = (React__namespace.createElement("span", { className: css(_default$w.navToggle) },
|
|
15348
|
+
React__namespace.createElement("span", { className: css(_default$w.navToggleIcon) },
|
|
15284
15349
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true }))));
|
|
15285
15350
|
const renderDefaultLink = (context) => {
|
|
15286
15351
|
const preventLinkDefault = preventDefault || !to;
|
|
15287
|
-
return (React__namespace.createElement(Component, Object.assign({ href: to, onClick: (e) => context.onSelect(e, groupId, itemId, to, preventLinkDefault, onClick), className: css(_default$
|
|
15352
|
+
return (React__namespace.createElement(Component, Object.assign({ href: to, onClick: (e) => context.onSelect(e, groupId, itemId, to, preventLinkDefault, onClick), className: css(_default$w.navLink, isActive && _default$w.modifiers.current, isHovered && _default$w.modifiers.hover, className), "aria-current": isActive ? 'page' : null, tabIndex: isNavOpen ? null : '-1' }, props),
|
|
15288
15353
|
children,
|
|
15289
15354
|
flyout && flyoutButton));
|
|
15290
15355
|
};
|
|
15291
15356
|
const renderClonedChild = (context, child) => React__namespace.cloneElement(child, Object.assign(Object.assign({ onClick: (e) => context.onSelect(e, groupId, itemId, to, preventDefault, onClick), 'aria-current': isActive ? 'page' : null }, (styleChildren && {
|
|
15292
|
-
className: css(_default$
|
|
15357
|
+
className: css(_default$w.navLink, isActive && _default$w.modifiers.current, child.props && child.props.className)
|
|
15293
15358
|
})), { tabIndex: child.props.tabIndex || isNavOpen ? null : -1, children: hasFlyout ? (React__namespace.createElement(React__namespace.Fragment, null,
|
|
15294
15359
|
child.props.children,
|
|
15295
15360
|
flyoutButton)) : (child.props.children) }));
|
|
@@ -15302,7 +15367,7 @@
|
|
|
15302
15367
|
};
|
|
15303
15368
|
const flyoutPopper = (React__namespace.createElement(Popper, { reference: ref, popper: React__namespace.createElement("div", { ref: popperRef, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }, flyout), placement: "right-start", isVisible: flyoutVisible, onDocumentKeyDown: handleFlyout }));
|
|
15304
15369
|
const navItem = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
15305
|
-
React__namespace.createElement("li", Object.assign({ onMouseOver: onMouseOver, className: css(_default$
|
|
15370
|
+
React__namespace.createElement("li", Object.assign({ onMouseOver: onMouseOver, className: css(_default$w.navItem, hasFlyout && _default$w.modifiers.flyout, className), ref: ref }, ouiaProps),
|
|
15306
15371
|
React__namespace.createElement(NavContext.Consumer, null, context => React__namespace.isValidElement(children)
|
|
15307
15372
|
? renderClonedChild(context, children)
|
|
15308
15373
|
: renderDefaultLink(context))),
|
|
@@ -15356,15 +15421,15 @@
|
|
|
15356
15421
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
15357
15422
|
onExpand } = _a, props = __rest$1(_a, ["title", "srText", "children", "className", "isActive", "ouiaId", "groupId", "id", "isExpanded", "buttonProps", "onExpand"]);
|
|
15358
15423
|
const { expandedState, ouiaStateId } = this.state;
|
|
15359
|
-
return (React__namespace.createElement(NavContext.Consumer, null, context => (React__namespace.createElement("li", Object.assign({ className: css(_default$
|
|
15360
|
-
React__namespace.createElement(PageSidebarContext.Consumer, null, ({ isNavOpen }) => (React__namespace.createElement("button", Object.assign({ className: _default$
|
|
15424
|
+
return (React__namespace.createElement(NavContext.Consumer, null, context => (React__namespace.createElement("li", Object.assign({ className: css(_default$w.navItem, _default$w.modifiers.expandable, expandedState && _default$w.modifiers.expanded, isActive && _default$w.modifiers.current, className) }, getOUIAProps(NavExpandable.displayName, ouiaId !== undefined ? ouiaId : ouiaStateId), props),
|
|
15425
|
+
React__namespace.createElement(PageSidebarContext.Consumer, null, ({ isNavOpen }) => (React__namespace.createElement("button", Object.assign({ className: _default$w.navLink, id: srText ? null : this.id, onClick: e => this.onExpand(e, context.onToggle), "aria-expanded": expandedState, tabIndex: isNavOpen ? null : -1 }, buttonProps),
|
|
15361
15426
|
title,
|
|
15362
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
15363
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
15427
|
+
React__namespace.createElement("span", { className: css(_default$w.navToggle) },
|
|
15428
|
+
React__namespace.createElement("span", { className: css(_default$w.navToggleIcon) },
|
|
15364
15429
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": "true" })))))),
|
|
15365
|
-
React__namespace.createElement("section", { className: css(_default$
|
|
15430
|
+
React__namespace.createElement("section", { className: css(_default$w.navSubnav), "aria-labelledby": this.id, hidden: expandedState ? null : true },
|
|
15366
15431
|
srText && (React__namespace.createElement("h2", { className: css(_default$1g.screenReader), id: this.id }, srText)),
|
|
15367
|
-
React__namespace.createElement("ul", { className: css(_default$
|
|
15432
|
+
React__namespace.createElement("ul", { className: css(_default$w.navList) }, children))))));
|
|
15368
15433
|
}
|
|
15369
15434
|
}
|
|
15370
15435
|
NavExpandable.displayName = 'NavExpandable';
|
|
@@ -15918,8 +15983,8 @@
|
|
|
15918
15983
|
|
|
15919
15984
|
const PageBreadcrumb = (_a) => {
|
|
15920
15985
|
var { className = '', children, isWidthLimited, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "isWidthLimited", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
15921
|
-
return (React__namespace.createElement("section", Object.assign({ className: css(_default$
|
|
15922
|
-
isWidthLimited && React__namespace.createElement("div", { className: css(_default$
|
|
15986
|
+
return (React__namespace.createElement("section", Object.assign({ className: css(_default$A.pageMainBreadcrumb, isWidthLimited && _default$A.modifiers.limitWidth, sticky === 'top' && _default$A.modifiers.stickyTop, sticky === 'bottom' && _default$A.modifiers.stickyBottom, hasShadowTop && _default$A.modifiers.shadowTop, hasShadowBottom && _default$A.modifiers.shadowBottom, hasOverflowScroll && _default$A.modifiers.overflowScroll, className) }, props),
|
|
15987
|
+
isWidthLimited && React__namespace.createElement("div", { className: css(_default$A.pageMainBody) }, children),
|
|
15923
15988
|
!isWidthLimited && children));
|
|
15924
15989
|
};
|
|
15925
15990
|
PageBreadcrumb.displayName = 'PageBreadcrumb';
|
|
@@ -15946,13 +16011,13 @@
|
|
|
15946
16011
|
return (React__namespace.createElement(PageContextConsumer, null, ({ isManagedSidebar, onNavToggle: managedOnNavToggle, isNavOpen: managedIsNavOpen }) => {
|
|
15947
16012
|
const navToggle = isManagedSidebar ? managedOnNavToggle : onNavToggle;
|
|
15948
16013
|
const navOpen = isManagedSidebar ? managedIsNavOpen : isNavOpen;
|
|
15949
|
-
return (React__namespace.createElement("header", Object.assign({ role: role, className: css(_default$
|
|
15950
|
-
(showNavToggle || logo) && (React__namespace.createElement("div", { className: css(_default$
|
|
15951
|
-
showNavToggle && (React__namespace.createElement("div", { className: css(_default$
|
|
16014
|
+
return (React__namespace.createElement("header", Object.assign({ role: role, className: css(_default$A.pageHeader, className) }, props),
|
|
16015
|
+
(showNavToggle || logo) && (React__namespace.createElement("div", { className: css(_default$A.pageHeaderBrand) },
|
|
16016
|
+
showNavToggle && (React__namespace.createElement("div", { className: css(_default$A.pageHeaderBrandToggle) },
|
|
15952
16017
|
React__namespace.createElement(Button, { id: "nav-toggle", onClick: navToggle, "aria-label": ariaLabel, "aria-controls": ariaControls, "aria-expanded": navOpen ? 'true' : 'false', variant: exports.ButtonVariant.plain },
|
|
15953
16018
|
React__namespace.createElement(BarsIcon$1, null)))),
|
|
15954
|
-
logo && (React__namespace.createElement(LogoComponent, Object.assign({ className: css(_default$
|
|
15955
|
-
topNav && React__namespace.createElement("div", { className: css(_default$
|
|
16019
|
+
logo && (React__namespace.createElement(LogoComponent, Object.assign({ className: css(_default$A.pageHeaderBrandLink) }, logoProps), logo)))),
|
|
16020
|
+
topNav && React__namespace.createElement("div", { className: css(_default$A.pageHeaderNav) }, topNav),
|
|
15956
16021
|
headerTools));
|
|
15957
16022
|
}));
|
|
15958
16023
|
};
|
|
@@ -15975,46 +16040,51 @@
|
|
|
15975
16040
|
PageSectionTypes["wizard"] = "wizard";
|
|
15976
16041
|
})(exports.PageSectionTypes || (exports.PageSectionTypes = {}));
|
|
15977
16042
|
const variantType = {
|
|
15978
|
-
[exports.PageSectionTypes.default]: _default$
|
|
15979
|
-
[exports.PageSectionTypes.nav]: _default$
|
|
15980
|
-
[exports.PageSectionTypes.subNav]: _default$
|
|
15981
|
-
[exports.PageSectionTypes.breadcrumb]: _default$
|
|
15982
|
-
[exports.PageSectionTypes.tabs]: _default$
|
|
15983
|
-
[exports.PageSectionTypes.wizard]: _default$
|
|
16043
|
+
[exports.PageSectionTypes.default]: _default$A.pageMainSection,
|
|
16044
|
+
[exports.PageSectionTypes.nav]: _default$A.pageMainNav,
|
|
16045
|
+
[exports.PageSectionTypes.subNav]: _default$A.pageMainSubnav,
|
|
16046
|
+
[exports.PageSectionTypes.breadcrumb]: _default$A.pageMainBreadcrumb,
|
|
16047
|
+
[exports.PageSectionTypes.tabs]: _default$A.pageMainTabs,
|
|
16048
|
+
[exports.PageSectionTypes.wizard]: _default$A.pageMainWizard
|
|
15984
16049
|
};
|
|
15985
16050
|
const variantStyle$3 = {
|
|
15986
16051
|
[exports.PageSectionVariants.default]: '',
|
|
15987
|
-
[exports.PageSectionVariants.light]: _default$
|
|
15988
|
-
[exports.PageSectionVariants.dark]: _default$
|
|
15989
|
-
[exports.PageSectionVariants.darker]: _default$
|
|
16052
|
+
[exports.PageSectionVariants.light]: _default$A.modifiers.light,
|
|
16053
|
+
[exports.PageSectionVariants.dark]: _default$A.modifiers.dark_200,
|
|
16054
|
+
[exports.PageSectionVariants.darker]: _default$A.modifiers.dark_100
|
|
15990
16055
|
};
|
|
15991
16056
|
const PageSection = (_a) => {
|
|
15992
16057
|
var { className = '', children, variant = 'default', type = 'default', padding, isFilled, isWidthLimited = false, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "variant", "type", "padding", "isFilled", "isWidthLimited", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
15993
|
-
return (React__namespace.createElement("section", Object.assign({}, props, { className: css(variantType[type], formatBreakpointMods(padding, _default$
|
|
15994
|
-
isWidthLimited && React__namespace.createElement("div", { className: css(_default$
|
|
16058
|
+
return (React__namespace.createElement("section", Object.assign({}, props, { className: css(variantType[type], formatBreakpointMods(padding, _default$A), variantStyle$3[variant], isFilled === false && _default$A.modifiers.noFill, isFilled === true && _default$A.modifiers.fill, isWidthLimited && _default$A.modifiers.limitWidth, sticky === 'top' && _default$A.modifiers.stickyTop, sticky === 'bottom' && _default$A.modifiers.stickyBottom, hasShadowTop && _default$A.modifiers.shadowTop, hasShadowBottom && _default$A.modifiers.shadowBottom, hasOverflowScroll && _default$A.modifiers.overflowScroll, className) }),
|
|
16059
|
+
isWidthLimited && React__namespace.createElement("div", { className: css(_default$A.pageMainBody) }, children),
|
|
15995
16060
|
!isWidthLimited && children));
|
|
15996
16061
|
};
|
|
15997
16062
|
PageSection.displayName = 'PageSection';
|
|
15998
16063
|
|
|
15999
16064
|
const PageHeaderTools = (_a) => {
|
|
16000
16065
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
16001
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
16066
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$A.pageHeaderTools, className) }, props), children));
|
|
16002
16067
|
};
|
|
16003
16068
|
PageHeaderTools.displayName = 'PageHeaderTools';
|
|
16004
16069
|
|
|
16005
16070
|
const PageHeaderToolsGroup = (_a) => {
|
|
16006
16071
|
var { children, className, visibility } = _a, props = __rest$1(_a, ["children", "className", "visibility"]);
|
|
16007
|
-
|
|
16072
|
+
const { width, getBreakpoint } = React__namespace.useContext(PageContext);
|
|
16073
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$A.pageHeaderToolsGroup, formatBreakpointMods(visibility, _default$A, '', getBreakpoint(width)), className) }, props), children));
|
|
16008
16074
|
};
|
|
16009
16075
|
PageHeaderToolsGroup.displayName = 'PageHeaderToolsGroup';
|
|
16010
16076
|
|
|
16011
|
-
const PageHeaderToolsItem = (
|
|
16077
|
+
const PageHeaderToolsItem = (_a) => {
|
|
16078
|
+
var { children, id, className, visibility, isSelected } = _a, props = __rest$1(_a, ["children", "id", "className", "visibility", "isSelected"]);
|
|
16079
|
+
const { width, getBreakpoint } = React__namespace.useContext(PageContext);
|
|
16080
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$A.pageHeaderToolsItem, isSelected && _default$A.modifiers.selected, formatBreakpointMods(visibility, _default$A, '', getBreakpoint(width)), className), id: id }, props), children));
|
|
16081
|
+
};
|
|
16012
16082
|
PageHeaderToolsItem.displayName = 'PageHeaderToolsItem';
|
|
16013
16083
|
|
|
16014
16084
|
const PageNavigation = (_a) => {
|
|
16015
16085
|
var { className = '', children, isWidthLimited, sticky, hasShadowTop = false, hasShadowBottom = false, hasOverflowScroll = false } = _a, props = __rest$1(_a, ["className", "children", "isWidthLimited", "sticky", "hasShadowTop", "hasShadowBottom", "hasOverflowScroll"]);
|
|
16016
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
16017
|
-
isWidthLimited && React__namespace.createElement("div", { className: css(_default$
|
|
16086
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$A.pageMainNav, isWidthLimited && _default$A.modifiers.limitWidth, sticky === 'top' && _default$A.modifiers.stickyTop, sticky === 'bottom' && _default$A.modifiers.stickyBottom, hasShadowTop && _default$A.modifiers.shadowTop, hasShadowBottom && _default$A.modifiers.shadowBottom, hasOverflowScroll && _default$A.modifiers.overflowScroll, className) }, props),
|
|
16087
|
+
isWidthLimited && React__namespace.createElement("div", { className: css(_default$A.pageMainBody) }, children),
|
|
16018
16088
|
!isWidthLimited && children));
|
|
16019
16089
|
};
|
|
16020
16090
|
PageNavigation.displayName = 'PageNavigation';
|
|
@@ -18509,8 +18579,8 @@
|
|
|
18509
18579
|
if (widths) {
|
|
18510
18580
|
Object.entries(widths || {}).map(([breakpoint, value]) => (widthStyles[`--pf-c-toolbar__item--Width${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}`] = value));
|
|
18511
18581
|
}
|
|
18512
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarItem, variant &&
|
|
18513
|
-
_default$d.modifiers[toCamel(variant)], isAllExpanded && _default$d.modifiers.expanded, formatBreakpointMods(visibility || visiblity, _default$d), formatBreakpointMods(alignment, _default$d), formatBreakpointMods(spacer, _default$d), className) }, (variant === 'label' && { 'aria-hidden': true }), { id: id }, props, (widths && { style: Object.assign(Object.assign({}, widthStyles), props.style) })), children));
|
|
18582
|
+
return (React__namespace.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarItem, variant &&
|
|
18583
|
+
_default$d.modifiers[toCamel(variant)], isAllExpanded && _default$d.modifiers.expanded, formatBreakpointMods(visibility || visiblity, _default$d, '', getBreakpoint(width)), formatBreakpointMods(alignment, _default$d, '', getBreakpoint(width)), formatBreakpointMods(spacer, _default$d, '', getBreakpoint(width)), className) }, (variant === 'label' && { 'aria-hidden': true }), { id: id }, props, (widths && { style: Object.assign(Object.assign({}, widthStyles), props.style) })), children))));
|
|
18514
18584
|
};
|
|
18515
18585
|
ToolbarItem.displayName = 'ToolbarItem';
|
|
18516
18586
|
|
|
@@ -18528,7 +18598,7 @@
|
|
|
18528
18598
|
console.warn('The ToolbarGroup visiblity prop has been deprecated. ' +
|
|
18529
18599
|
'Please use the correctly spelled visibility prop instead.');
|
|
18530
18600
|
}
|
|
18531
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarGroup, variant && _default$d.modifiers[toCamel(variant)], formatBreakpointMods(visibility || visiblity, _default$d), formatBreakpointMods(alignment, _default$d), formatBreakpointMods(spacer, _default$d), formatBreakpointMods(spaceItems, _default$d), className) }, props, { ref: innerRef }), children));
|
|
18601
|
+
return (React__namespace.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarGroup, variant && _default$d.modifiers[toCamel(variant)], formatBreakpointMods(visibility || visiblity, _default$d, '', getBreakpoint(width)), formatBreakpointMods(alignment, _default$d, '', getBreakpoint(width)), formatBreakpointMods(spacer, _default$d, '', getBreakpoint(width)), formatBreakpointMods(spaceItems, _default$d, '', getBreakpoint(width)), className) }, props, { ref: innerRef }), children))));
|
|
18532
18602
|
}
|
|
18533
18603
|
}
|
|
18534
18604
|
const ToolbarGroup = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(ToolbarGroupWithRef, Object.assign({}, props, { innerRef: ref }))));
|
|
@@ -18603,7 +18673,7 @@
|
|
|
18603
18673
|
const isExpanded = isToggleManaged ? isManagedToggleExpanded : isExpandedProp;
|
|
18604
18674
|
const numberOfFilters = this.getNumberOfFilters();
|
|
18605
18675
|
const showClearFiltersButton = numberOfFilters > 0;
|
|
18606
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbar, isFullHeight && _default$d.modifiers.fullHeight, isStatic && _default$d.modifiers.static, usePageInsets && _default$d.modifiers.pageInsets, isSticky && _default$d.modifiers.sticky, formatBreakpointMods(inset, _default$d), className), id: randomId }, getOUIAProps(Toolbar.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
18676
|
+
return (React__namespace.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbar, isFullHeight && _default$d.modifiers.fullHeight, isStatic && _default$d.modifiers.static, usePageInsets && _default$d.modifiers.pageInsets, isSticky && _default$d.modifiers.sticky, formatBreakpointMods(inset, _default$d, '', getBreakpoint(width)), className), id: randomId }, getOUIAProps(Toolbar.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
18607
18677
|
React__namespace.createElement(ToolbarContext.Provider, { value: {
|
|
18608
18678
|
isExpanded,
|
|
18609
18679
|
toggleIsExpanded: isToggleManaged ? this.toggleIsExpanded : toggleIsExpanded,
|
|
@@ -18616,7 +18686,7 @@
|
|
|
18616
18686
|
toolbarId: randomId
|
|
18617
18687
|
} },
|
|
18618
18688
|
children,
|
|
18619
|
-
React__namespace.createElement(ToolbarChipGroupContent, { isExpanded: isExpanded, chipGroupContentRef: this.chipGroupContentRef, clearAllFilters: clearAllFilters, showClearFiltersButton: showClearFiltersButton, clearFiltersButtonText: clearFiltersButtonText, numberOfFilters: numberOfFilters, numberOfFiltersText: numberOfFiltersText, collapseListedFiltersBreakpoint: collapseListedFiltersBreakpoint }))));
|
|
18689
|
+
React__namespace.createElement(ToolbarChipGroupContent, { isExpanded: isExpanded, chipGroupContentRef: this.chipGroupContentRef, clearAllFilters: clearAllFilters, showClearFiltersButton: showClearFiltersButton, clearFiltersButtonText: clearFiltersButtonText, numberOfFilters: numberOfFilters, numberOfFiltersText: numberOfFiltersText, collapseListedFiltersBreakpoint: collapseListedFiltersBreakpoint }))))));
|
|
18620
18690
|
};
|
|
18621
18691
|
}
|
|
18622
18692
|
componentDidMount() {
|
|
@@ -18672,7 +18742,7 @@
|
|
|
18672
18742
|
console.warn('The ToolbarContent visiblity prop has been deprecated. ' +
|
|
18673
18743
|
'Please use the correctly spelled visibility prop instead.');
|
|
18674
18744
|
}
|
|
18675
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarContent, formatBreakpointMods(visibility || visiblity, _default$d), formatBreakpointMods(alignment, _default$d), className) }, props),
|
|
18745
|
+
return (React__namespace.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarContent, formatBreakpointMods(visibility || visiblity, _default$d, '', getBreakpoint(width)), formatBreakpointMods(alignment, _default$d, '', getBreakpoint(width)), className) }, props),
|
|
18676
18746
|
React__namespace.createElement(ToolbarContext.Consumer, null, ({ clearAllFilters: clearAllFiltersContext, clearFiltersButtonText: clearFiltersButtonContext, showClearFiltersButton: showClearFiltersButtonContext, toolbarId: toolbarIdContext }) => {
|
|
18677
18747
|
const expandableContentId = `${toolbarId ||
|
|
18678
18748
|
toolbarIdContext}-expandable-content-${ToolbarContent.currentId++}`;
|
|
@@ -18683,7 +18753,7 @@
|
|
|
18683
18753
|
} },
|
|
18684
18754
|
React__namespace.createElement("div", { className: css(_default$d.toolbarContentSection) }, children),
|
|
18685
18755
|
React__namespace.createElement(ToolbarExpandableContent, { id: expandableContentId, isExpanded: isExpanded, expandableContentRef: this.expandableContentRef, chipContainerRef: this.chipContainerRef, clearAllFilters: clearAllFilters || clearAllFiltersContext, showClearFiltersButton: showClearFiltersButton || showClearFiltersButtonContext, clearFiltersButtonText: clearFiltersButtonText || clearFiltersButtonContext })));
|
|
18686
|
-
})));
|
|
18756
|
+
})))));
|
|
18687
18757
|
}
|
|
18688
18758
|
}
|
|
18689
18759
|
ToolbarContent.displayName = 'ToolbarContent';
|
|
@@ -18764,7 +18834,7 @@
|
|
|
18764
18834
|
console.warn('The ToolbarToggleGroup visiblity prop has been deprecated. ' +
|
|
18765
18835
|
'Please use the correctly spelled visibility prop instead.');
|
|
18766
18836
|
}
|
|
18767
|
-
return (React__namespace.createElement(ToolbarContext.Consumer, null, ({ isExpanded, toggleIsExpanded }) => (React__namespace.createElement(ToolbarContentContext.Consumer, null, ({ expandableContentRef, expandableContentId }) => {
|
|
18837
|
+
return (React__namespace.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React__namespace.createElement(ToolbarContext.Consumer, null, ({ isExpanded, toggleIsExpanded }) => (React__namespace.createElement(ToolbarContentContext.Consumer, null, ({ expandableContentRef, expandableContentId }) => {
|
|
18768
18838
|
if (expandableContentRef.current && expandableContentRef.current.classList) {
|
|
18769
18839
|
if (isExpanded) {
|
|
18770
18840
|
expandableContentRef.current.classList.add(_default$d.modifiers.expanded);
|
|
@@ -18773,14 +18843,16 @@
|
|
|
18773
18843
|
expandableContentRef.current.classList.remove(_default$d.modifiers.expanded);
|
|
18774
18844
|
}
|
|
18775
18845
|
}
|
|
18776
|
-
|
|
18777
|
-
|
|
18846
|
+
const breakpointMod = {};
|
|
18847
|
+
breakpointMod[breakpoint] = 'show';
|
|
18848
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$d.toolbarGroup, _default$d.modifiers.toggleGroup, variant &&
|
|
18849
|
+
_default$d.modifiers[toCamel(variant)], formatBreakpointMods(breakpointMod, _default$d, '', getBreakpoint(width)), formatBreakpointMods(visibility || visiblity, _default$d, '', getBreakpoint(width)), formatBreakpointMods(alignment, _default$d, '', getBreakpoint(width)), formatBreakpointMods(spacer, _default$d, '', getBreakpoint(width)), formatBreakpointMods(spaceItems, _default$d, '', getBreakpoint(width)), className) }, props),
|
|
18778
18850
|
React__namespace.createElement("div", { className: css(_default$d.toolbarToggle) },
|
|
18779
18851
|
React__namespace.createElement(Button, Object.assign({ variant: "plain", onClick: toggleIsExpanded, "aria-label": "Show Filters" }, (isExpanded && { 'aria-expanded': true }), { "aria-haspopup": isExpanded && this.isContentPopup(), "aria-controls": expandableContentId }), toggleIcon)),
|
|
18780
18852
|
isExpanded
|
|
18781
18853
|
? ReactDOM__namespace.createPortal(children, expandableContentRef.current.firstElementChild)
|
|
18782
18854
|
: children));
|
|
18783
|
-
}))));
|
|
18855
|
+
}))))));
|
|
18784
18856
|
}
|
|
18785
18857
|
}
|
|
18786
18858
|
ToolbarToggleGroup.displayName = 'ToolbarToggleGroup';
|
|
@@ -21025,6 +21097,7 @@
|
|
|
21025
21097
|
exports.OverflowMenuItem = OverflowMenuItem;
|
|
21026
21098
|
exports.Page = Page;
|
|
21027
21099
|
exports.PageBreadcrumb = PageBreadcrumb;
|
|
21100
|
+
exports.PageContext = PageContext;
|
|
21028
21101
|
exports.PageContextConsumer = PageContextConsumer;
|
|
21029
21102
|
exports.PageContextProvider = PageContextProvider;
|
|
21030
21103
|
exports.PageGroup = PageGroup;
|
|
@@ -21132,6 +21205,7 @@
|
|
|
21132
21205
|
exports.debounce = debounce$1;
|
|
21133
21206
|
exports.fillTemplate = fillTemplate;
|
|
21134
21207
|
exports.formatBreakpointMods = formatBreakpointMods;
|
|
21208
|
+
exports.getBreakpoint = getBreakpoint;
|
|
21135
21209
|
exports.getDefaultOUIAId = getDefaultOUIAId;
|
|
21136
21210
|
exports.getNextIndex = getNextIndex;
|
|
21137
21211
|
exports.getOUIAProps = getOUIAProps;
|
|
@@ -21145,6 +21219,9 @@
|
|
|
21145
21219
|
exports.isElementInView = isElementInView;
|
|
21146
21220
|
exports.isValidDate = isValidDate;
|
|
21147
21221
|
exports.keyHandler = keyHandler;
|
|
21222
|
+
exports.navContextDefaults = navContextDefaults;
|
|
21223
|
+
exports.pageContextDefaults = pageContextDefaults;
|
|
21224
|
+
exports.pageSidebarContextDefaults = pageSidebarContextDefaults;
|
|
21148
21225
|
exports.pluralize = pluralize;
|
|
21149
21226
|
exports.preventedEvents = preventedEvents;
|
|
21150
21227
|
exports.setBreakpointCssVars = setBreakpointCssVars;
|