@patternfly/react-core 4.194.3 → 4.195.3
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 +38 -0
- package/dist/esm/components/Alert/Alert.d.ts +2 -1
- package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
- package/dist/esm/components/Alert/Alert.js.map +1 -1
- package/dist/esm/components/ChipGroup/Chip.d.ts +2 -1
- package/dist/esm/components/ChipGroup/Chip.d.ts.map +1 -1
- package/dist/esm/components/ChipGroup/Chip.js.map +1 -1
- package/dist/esm/components/ChipGroup/ChipGroup.d.ts +2 -1
- package/dist/esm/components/ChipGroup/ChipGroup.d.ts.map +1 -1
- package/dist/esm/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js +2 -2
- package/dist/esm/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.d.ts +2 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.d.ts.map +1 -1
- package/dist/esm/components/ClipboardCopy/ClipboardCopyButton.js.map +1 -1
- package/dist/esm/components/Label/Label.d.ts +2 -1
- package/dist/esm/components/Label/Label.d.ts.map +1 -1
- package/dist/esm/components/Label/Label.js +10 -9
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/LabelGroup/LabelGroup.d.ts +2 -1
- package/dist/esm/components/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/esm/components/LabelGroup/LabelGroup.js.map +1 -1
- package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.d.ts +2 -1
- package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.d.ts.map +1 -1
- package/dist/esm/components/NotificationDrawer/NotificationDrawerGroup.js.map +1 -1
- package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts +2 -1
- package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts.map +1 -1
- package/dist/esm/components/NotificationDrawer/NotificationDrawerListItemHeader.js.map +1 -1
- package/dist/esm/components/Popover/Popover.d.ts +1 -1
- package/dist/esm/components/Popover/Popover.d.ts.map +1 -1
- package/dist/esm/components/Popover/Popover.js.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.d.ts +2 -1
- package/dist/esm/components/Progress/ProgressContainer.d.ts.map +1 -1
- package/dist/esm/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +1 -0
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Select/SelectOption.js +1 -1
- package/dist/esm/components/Select/SelectOption.js.map +1 -1
- package/dist/esm/components/Select/SelectToggle.js +1 -1
- package/dist/esm/components/Select/SelectToggle.js.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts +2 -0
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js +2 -1
- package/dist/esm/components/TextInputGroup/TextInputGroupMain.js.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.d.ts +11 -3
- package/dist/esm/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.js +17 -1
- package/dist/esm/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/components/Truncate/Truncate.d.ts +2 -1
- package/dist/esm/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/esm/components/Truncate/Truncate.js.map +1 -1
- package/dist/js/components/Alert/Alert.d.ts +2 -1
- package/dist/js/components/Alert/Alert.d.ts.map +1 -1
- package/dist/js/components/Alert/Alert.js.map +1 -1
- package/dist/js/components/ChipGroup/Chip.d.ts +2 -1
- package/dist/js/components/ChipGroup/Chip.d.ts.map +1 -1
- package/dist/js/components/ChipGroup/Chip.js.map +1 -1
- package/dist/js/components/ChipGroup/ChipGroup.d.ts +2 -1
- package/dist/js/components/ChipGroup/ChipGroup.d.ts.map +1 -1
- package/dist/js/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js +2 -2
- package/dist/js/components/ClipboardCopy/ClipboardCopy.js.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.d.ts +2 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.d.ts.map +1 -1
- package/dist/js/components/ClipboardCopy/ClipboardCopyButton.js.map +1 -1
- package/dist/js/components/Label/Label.d.ts +2 -1
- package/dist/js/components/Label/Label.d.ts.map +1 -1
- package/dist/js/components/Label/Label.js +10 -9
- package/dist/js/components/Label/Label.js.map +1 -1
- package/dist/js/components/LabelGroup/LabelGroup.d.ts +2 -1
- package/dist/js/components/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/js/components/LabelGroup/LabelGroup.js.map +1 -1
- package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.d.ts +2 -1
- package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.d.ts.map +1 -1
- package/dist/js/components/NotificationDrawer/NotificationDrawerGroup.js.map +1 -1
- package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts +2 -1
- package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.d.ts.map +1 -1
- package/dist/js/components/NotificationDrawer/NotificationDrawerListItemHeader.js.map +1 -1
- package/dist/js/components/Popover/Popover.d.ts +1 -1
- package/dist/js/components/Popover/Popover.d.ts.map +1 -1
- package/dist/js/components/Popover/Popover.js.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.d.ts +2 -1
- package/dist/js/components/Progress/ProgressContainer.d.ts.map +1 -1
- package/dist/js/components/Progress/ProgressContainer.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +1 -0
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Select/SelectOption.js +1 -1
- package/dist/js/components/Select/SelectOption.js.map +1 -1
- package/dist/js/components/Select/SelectToggle.js +1 -1
- package/dist/js/components/Select/SelectToggle.js.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts +2 -0
- package/dist/js/components/TextInputGroup/TextInputGroupMain.d.ts.map +1 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js +2 -1
- package/dist/js/components/TextInputGroup/TextInputGroupMain.js.map +1 -1
- package/dist/js/components/Tooltip/Tooltip.d.ts +11 -3
- package/dist/js/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/js/components/Tooltip/Tooltip.js +17 -1
- package/dist/js/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/js/components/Truncate/Truncate.d.ts +2 -1
- package/dist/js/components/Truncate/Truncate.d.ts.map +1 -1
- package/dist/js/components/Truncate/Truncate.js.map +1 -1
- package/dist/umd/react-core.css +300 -24
- package/dist/umd/react-core.js +467 -442
- package/dist/umd/react-core.min.css +300 -24
- package/dist/umd/react-core.min.js +2 -2
- package/package.json +6 -6
- package/src/components/Alert/Alert.tsx +16 -2
- package/src/components/CalendarMonth/examples/CalendarMonth.md +2 -18
- package/src/components/CalendarMonth/examples/CalendarMonthDefault.tsx +4 -0
- package/src/components/CalendarMonth/examples/CalendarMonthSelectableDate.tsx +13 -0
- package/src/components/ChipGroup/Chip.tsx +16 -2
- package/src/components/ChipGroup/ChipGroup.tsx +16 -2
- package/src/components/ClipboardCopy/ClipboardCopy.tsx +16 -3
- package/src/components/ClipboardCopy/ClipboardCopyButton.tsx +2 -1
- package/src/components/Label/Label.tsx +33 -19
- package/src/components/Label/__tests__/Label.test.tsx +2 -2
- package/src/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +5 -9
- package/src/components/LabelGroup/LabelGroup.tsx +16 -2
- package/src/components/NotificationDrawer/NotificationDrawerGroup.tsx +16 -2
- package/src/components/NotificationDrawer/NotificationDrawerListItemHeader.tsx +16 -2
- package/src/components/Popover/Popover.tsx +1 -0
- package/src/components/Progress/ProgressContainer.tsx +16 -2
- package/src/components/Select/Select.tsx +1 -0
- package/src/components/Select/SelectOption.tsx +1 -1
- package/src/components/Select/SelectToggle.tsx +1 -1
- package/src/components/TextInputGroup/TextInputGroupMain.tsx +12 -0
- package/src/components/Tooltip/Tooltip.tsx +35 -3
- package/src/components/Tooltip/__tests__/Generated/__snapshots__/Tooltip.test.tsx.snap +8 -0
- package/src/components/Tooltip/__tests__/__snapshots__/Tooltip.test.tsx.snap +8 -0
- package/src/components/Tooltip/examples/Tooltip.md +8 -0
- package/src/components/Truncate/Truncate.tsx +16 -2
- package/src/demos/TextInputGroupDemo.md +2 -2
- package/src/demos/examples/TextInputGroup/AutoCompleteSearch.tsx +17 -0
package/dist/umd/react-core.js
CHANGED
|
@@ -4187,6 +4187,14 @@
|
|
|
4187
4187
|
TooltipPosition["bottom"] = "bottom";
|
|
4188
4188
|
TooltipPosition["left"] = "left";
|
|
4189
4189
|
TooltipPosition["right"] = "right";
|
|
4190
|
+
TooltipPosition["topStart"] = "top-start";
|
|
4191
|
+
TooltipPosition["topEnd"] = "top-end";
|
|
4192
|
+
TooltipPosition["bottomStart"] = "bottom-start";
|
|
4193
|
+
TooltipPosition["bottomEnd"] = "bottom-end";
|
|
4194
|
+
TooltipPosition["leftStart"] = "left-start";
|
|
4195
|
+
TooltipPosition["leftEnd"] = "left-end";
|
|
4196
|
+
TooltipPosition["rightStart"] = "right-start";
|
|
4197
|
+
TooltipPosition["rightEnd"] = "right-end";
|
|
4190
4198
|
})(exports.TooltipPosition || (exports.TooltipPosition = {}));
|
|
4191
4199
|
// id for associating trigger with the content aria-describedby or aria-labelledby
|
|
4192
4200
|
let pfTooltipIdCounter = 1;
|
|
@@ -4264,7 +4272,15 @@
|
|
|
4264
4272
|
top: _default$1e.modifiers.top,
|
|
4265
4273
|
bottom: _default$1e.modifiers.bottom,
|
|
4266
4274
|
left: _default$1e.modifiers.left,
|
|
4267
|
-
right: _default$1e.modifiers.right
|
|
4275
|
+
right: _default$1e.modifiers.right,
|
|
4276
|
+
'top-start': _default$1e.modifiers.topLeft,
|
|
4277
|
+
'top-end': _default$1e.modifiers.topRight,
|
|
4278
|
+
'bottom-start': _default$1e.modifiers.bottomLeft,
|
|
4279
|
+
'bottom-end': _default$1e.modifiers.bottomRight,
|
|
4280
|
+
'left-start': _default$1e.modifiers.leftTop,
|
|
4281
|
+
'left-end': _default$1e.modifiers.leftBottom,
|
|
4282
|
+
'right-start': _default$1e.modifiers.rightTop,
|
|
4283
|
+
'right-end': _default$1e.modifiers.rightBottom
|
|
4268
4284
|
};
|
|
4269
4285
|
const hasCustomMaxWidth = maxWidth !== tooltipMaxWidth.value;
|
|
4270
4286
|
const content = (React__namespace.createElement("div", Object.assign({ className: css(_default$1e.tooltip, className), role: "tooltip", id: id, style: {
|
|
@@ -5542,7 +5558,11 @@
|
|
|
5542
5558
|
"avatar": "pf-c-avatar",
|
|
5543
5559
|
"modifiers": {
|
|
5544
5560
|
"light": "pf-m-light",
|
|
5545
|
-
"dark": "pf-m-dark"
|
|
5561
|
+
"dark": "pf-m-dark",
|
|
5562
|
+
"sm": "pf-m-sm",
|
|
5563
|
+
"md": "pf-m-md",
|
|
5564
|
+
"lg": "pf-m-lg",
|
|
5565
|
+
"xl": "pf-m-xl"
|
|
5546
5566
|
}
|
|
5547
5567
|
};
|
|
5548
5568
|
|
|
@@ -6153,7 +6173,7 @@
|
|
|
6153
6173
|
const favoriteButton = (onFavorite) => (React__namespace.createElement("button", { className: css(_default$12.selectMenuItem, _default$12.modifiers.action, _default$12.modifiers.favoriteAction), "aria-label": isFavorite ? ariaIsFavoriteLabel : ariaIsNotFavoriteLabel, onClick: () => {
|
|
6154
6174
|
onFavorite(generatedId.replace('favorite-', ''), isFavorite);
|
|
6155
6175
|
}, onKeyDown: event => {
|
|
6156
|
-
this.onKeyDown(event, 1, () => onFavorite(generatedId.replace('favorite-', '')));
|
|
6176
|
+
this.onKeyDown(event, 1, () => onFavorite(generatedId.replace('favorite-', ''), isFavorite));
|
|
6157
6177
|
}, ref: this.favoriteRef },
|
|
6158
6178
|
React__namespace.createElement("span", { className: css(_default$12.selectMenuItemActionIcon) },
|
|
6159
6179
|
React__namespace.createElement(StarIcon$1, null))));
|
|
@@ -6534,7 +6554,7 @@
|
|
|
6534
6554
|
this.toggle = isTypeahead ? React__namespace.createRef() : React__namespace.createRef();
|
|
6535
6555
|
}
|
|
6536
6556
|
componentDidMount() {
|
|
6537
|
-
document.addEventListener('click', this.onDocClick);
|
|
6557
|
+
document.addEventListener('click', this.onDocClick, { capture: true });
|
|
6538
6558
|
document.addEventListener('touchstart', this.onDocClick);
|
|
6539
6559
|
document.addEventListener('keydown', this.handleGlobalKeys);
|
|
6540
6560
|
}
|
|
@@ -7389,6 +7409,7 @@
|
|
|
7389
7409
|
const clearBtn = (React__namespace.createElement("button", { className: css(_default$1k.button, _default$1k.modifiers.plain, _default$12.selectToggleClear), onClick: e => {
|
|
7390
7410
|
this.clearSelection(e);
|
|
7391
7411
|
onClear(e);
|
|
7412
|
+
e.stopPropagation();
|
|
7392
7413
|
}, "aria-label": clearSelectionsAriaLabel, type: "button", disabled: isDisabled, ref: this.clearRef, onKeyDown: event => {
|
|
7393
7414
|
if (event.key === KeyTypes.Enter) {
|
|
7394
7415
|
this.clearRef.current.click();
|
|
@@ -8033,6 +8054,308 @@
|
|
|
8033
8054
|
}
|
|
8034
8055
|
};
|
|
8035
8056
|
|
|
8057
|
+
var _default$W = {
|
|
8058
|
+
"button": "pf-c-button",
|
|
8059
|
+
"modifiers": {
|
|
8060
|
+
"noPadding": "pf-m-no-padding",
|
|
8061
|
+
"widthAuto": "pf-m-width-auto",
|
|
8062
|
+
"top": "pf-m-top",
|
|
8063
|
+
"topLeft": "pf-m-top-left",
|
|
8064
|
+
"topRight": "pf-m-top-right",
|
|
8065
|
+
"bottom": "pf-m-bottom",
|
|
8066
|
+
"bottomLeft": "pf-m-bottom-left",
|
|
8067
|
+
"bottomRight": "pf-m-bottom-right",
|
|
8068
|
+
"left": "pf-m-left",
|
|
8069
|
+
"leftTop": "pf-m-left-top",
|
|
8070
|
+
"leftBottom": "pf-m-left-bottom",
|
|
8071
|
+
"right": "pf-m-right",
|
|
8072
|
+
"rightTop": "pf-m-right-top",
|
|
8073
|
+
"rightBottom": "pf-m-right-bottom",
|
|
8074
|
+
"danger": "pf-m-danger",
|
|
8075
|
+
"warning": "pf-m-warning",
|
|
8076
|
+
"success": "pf-m-success",
|
|
8077
|
+
"default": "pf-m-default",
|
|
8078
|
+
"info": "pf-m-info",
|
|
8079
|
+
"icon": "pf-m-icon"
|
|
8080
|
+
},
|
|
8081
|
+
"popover": "pf-c-popover",
|
|
8082
|
+
"popoverArrow": "pf-c-popover__arrow",
|
|
8083
|
+
"popoverBody": "pf-c-popover__body",
|
|
8084
|
+
"popoverContent": "pf-c-popover__content",
|
|
8085
|
+
"popoverFooter": "pf-c-popover__footer",
|
|
8086
|
+
"popoverTitle": "pf-c-popover__title",
|
|
8087
|
+
"popoverTitleIcon": "pf-c-popover__title-icon",
|
|
8088
|
+
"popoverTitleText": "pf-c-popover__title-text",
|
|
8089
|
+
"title": "pf-c-title"
|
|
8090
|
+
};
|
|
8091
|
+
|
|
8092
|
+
const PopoverContext = React__namespace.createContext({});
|
|
8093
|
+
|
|
8094
|
+
const PopoverContent = (_a) => {
|
|
8095
|
+
var { className = null, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
8096
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$W.popoverContent, className) }, props), children));
|
|
8097
|
+
};
|
|
8098
|
+
PopoverContent.displayName = 'PopoverContent';
|
|
8099
|
+
|
|
8100
|
+
const PopoverBody = (_a) => {
|
|
8101
|
+
var { children, id, className } = _a, props = __rest$1(_a, ["children", "id", "className"]);
|
|
8102
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$W.popoverBody, className), id: id }, props), children));
|
|
8103
|
+
};
|
|
8104
|
+
PopoverBody.displayName = 'PopoverBody';
|
|
8105
|
+
|
|
8106
|
+
const PopoverHeaderIcon = (_a) => {
|
|
8107
|
+
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8108
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(_default$W.popoverTitleIcon, className) }, props), children));
|
|
8109
|
+
};
|
|
8110
|
+
PopoverHeaderIcon.displayName = 'PopoverHeaderIcon';
|
|
8111
|
+
|
|
8112
|
+
const PopoverHeaderText = (_a) => {
|
|
8113
|
+
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8114
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(_default$W.popoverTitleText, className) }, props), children));
|
|
8115
|
+
};
|
|
8116
|
+
PopoverHeaderText.displayName = 'PopoverHeaderText';
|
|
8117
|
+
|
|
8118
|
+
const PopoverHeader = (_a) => {
|
|
8119
|
+
var { children, icon, className, titleHeadingLevel = 'h6', alertSeverityVariant, id, alertSeverityScreenReaderText } = _a, props = __rest$1(_a, ["children", "icon", "className", "titleHeadingLevel", "alertSeverityVariant", "id", "alertSeverityScreenReaderText"]);
|
|
8120
|
+
const HeadingLevel = titleHeadingLevel;
|
|
8121
|
+
return icon || alertSeverityVariant ? (React__namespace.createElement("header", Object.assign({ className: css('pf-c-popover__header', className), id: id }, props),
|
|
8122
|
+
React__namespace.createElement(HeadingLevel, { className: css(_default$W.popoverTitle, icon && _default$W.modifiers.icon) },
|
|
8123
|
+
icon && React__namespace.createElement(PopoverHeaderIcon, null, icon),
|
|
8124
|
+
alertSeverityVariant && alertSeverityScreenReaderText && (React__namespace.createElement("span", { className: "pf-u-screen-reader" }, alertSeverityScreenReaderText)),
|
|
8125
|
+
React__namespace.createElement(PopoverHeaderText, null, children)))) : (React__namespace.createElement(Title, Object.assign({ headingLevel: titleHeadingLevel, size: exports.TitleSizes.md, id: id, className: className }, props), children));
|
|
8126
|
+
};
|
|
8127
|
+
PopoverHeader.displayName = 'PopoverHeader';
|
|
8128
|
+
|
|
8129
|
+
const PopoverFooter = (_a) => {
|
|
8130
|
+
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8131
|
+
return (React__namespace.createElement("footer", Object.assign({ className: css(_default$W.popoverFooter, className) }, props), children));
|
|
8132
|
+
};
|
|
8133
|
+
PopoverFooter.displayName = 'PopoverFooter';
|
|
8134
|
+
|
|
8135
|
+
const PopoverCloseButton = (_a) => {
|
|
8136
|
+
var { onClose = () => undefined } = _a, props = __rest$1(_a, ["onClose"]);
|
|
8137
|
+
const [closeButtonElement, setCloseButtonElement] = React__namespace.useState(null);
|
|
8138
|
+
React__namespace.useEffect(() => {
|
|
8139
|
+
closeButtonElement && closeButtonElement.addEventListener('click', onClose, false);
|
|
8140
|
+
return () => {
|
|
8141
|
+
closeButtonElement && closeButtonElement.removeEventListener('click', onClose, false);
|
|
8142
|
+
};
|
|
8143
|
+
}, [closeButtonElement]);
|
|
8144
|
+
return (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setCloseButtonElement(foundRef) },
|
|
8145
|
+
React__namespace.createElement(Button, Object.assign({ variant: "plain", "aria-label": true }, props, { style: { pointerEvents: 'auto' } }),
|
|
8146
|
+
React__namespace.createElement(TimesIcon$1, null))));
|
|
8147
|
+
};
|
|
8148
|
+
PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
8149
|
+
|
|
8150
|
+
const PopoverArrow = (_a) => {
|
|
8151
|
+
var { className = '' } = _a, props = __rest$1(_a, ["className"]);
|
|
8152
|
+
return React__namespace.createElement("div", Object.assign({ className: css(_default$W.popoverArrow, className) }, props));
|
|
8153
|
+
};
|
|
8154
|
+
PopoverArrow.displayName = 'PopoverArrow';
|
|
8155
|
+
|
|
8156
|
+
const c_popover_MaxWidth = {
|
|
8157
|
+
"name": "--pf-c-popover--MaxWidth",
|
|
8158
|
+
"value": "none",
|
|
8159
|
+
"var": "var(--pf-c-popover--MaxWidth)"
|
|
8160
|
+
};
|
|
8161
|
+
var popoverMaxWidth = c_popover_MaxWidth;
|
|
8162
|
+
|
|
8163
|
+
const c_popover_MinWidth = {
|
|
8164
|
+
"name": "--pf-c-popover--MinWidth",
|
|
8165
|
+
"value": "auto",
|
|
8166
|
+
"var": "var(--pf-c-popover--MinWidth)"
|
|
8167
|
+
};
|
|
8168
|
+
var popoverMinWidth = c_popover_MinWidth;
|
|
8169
|
+
|
|
8170
|
+
exports.PopoverPosition = void 0;
|
|
8171
|
+
(function (PopoverPosition) {
|
|
8172
|
+
PopoverPosition["auto"] = "auto";
|
|
8173
|
+
PopoverPosition["top"] = "top";
|
|
8174
|
+
PopoverPosition["bottom"] = "bottom";
|
|
8175
|
+
PopoverPosition["left"] = "left";
|
|
8176
|
+
PopoverPosition["right"] = "right";
|
|
8177
|
+
PopoverPosition["topStart"] = "top-start";
|
|
8178
|
+
PopoverPosition["topEnd"] = "top-end";
|
|
8179
|
+
PopoverPosition["bottomStart"] = "bottom-start";
|
|
8180
|
+
PopoverPosition["bottomEnd"] = "bottom-end";
|
|
8181
|
+
PopoverPosition["leftStart"] = "left-start";
|
|
8182
|
+
PopoverPosition["leftEnd"] = "left-end";
|
|
8183
|
+
PopoverPosition["rightStart"] = "right-start";
|
|
8184
|
+
PopoverPosition["rightEnd"] = "right-end";
|
|
8185
|
+
})(exports.PopoverPosition || (exports.PopoverPosition = {}));
|
|
8186
|
+
const alertStyle = {
|
|
8187
|
+
default: _default$W.modifiers.default,
|
|
8188
|
+
info: _default$W.modifiers.info,
|
|
8189
|
+
success: _default$W.modifiers.success,
|
|
8190
|
+
warning: _default$W.modifiers.warning,
|
|
8191
|
+
danger: _default$W.modifiers.danger
|
|
8192
|
+
};
|
|
8193
|
+
const Popover = (_a) => {
|
|
8194
|
+
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, headerComponent = 'h6', headerIcon = null, alertSeverityVariant, alertSeverityScreenReaderText, footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
8195
|
+
// For every initial starting position, there are 3 escape positions
|
|
8196
|
+
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], animationDuration = 300, id, withFocusTrap: propWithFocusTrap, boundary, tippyProps, reference, hasNoPadding = false, hasAutoWidth = false } = _a, rest = __rest$1(_a, ["children", "position", "enableFlip", "className", "isVisible", "shouldClose", "shouldOpen", 'aria-label', "bodyContent", "headerContent", "headerComponent", "headerIcon", "alertSeverityVariant", "alertSeverityScreenReaderText", "footerContent", "appendTo", "hideOnOutsideClick", "onHide", "onHidden", "onShow", "onShown", "onMount", "zIndex", "minWidth", "maxWidth", "closeBtnAriaLabel", "showClose", "distance", "flipBehavior", "animationDuration", "id", "withFocusTrap", "boundary", "tippyProps", "reference", "hasNoPadding", "hasAutoWidth"]);
|
|
8197
|
+
{
|
|
8198
|
+
boundary !== undefined &&
|
|
8199
|
+
console.warn('The Popover boundary prop has been deprecated. If you want to constrain the popper to a specific element use the appendTo prop instead.');
|
|
8200
|
+
tippyProps !== undefined && console.warn('The Popover tippyProps prop has been deprecated and is no longer used.');
|
|
8201
|
+
}
|
|
8202
|
+
// could make this a prop in the future (true | false | 'toggle')
|
|
8203
|
+
// const hideOnClick = true;
|
|
8204
|
+
const uniqueId = id || getUniqueId();
|
|
8205
|
+
const triggerManually = isVisible !== null;
|
|
8206
|
+
const [visible, setVisible] = React__namespace.useState(false);
|
|
8207
|
+
const [opacity, setOpacity] = React__namespace.useState(0);
|
|
8208
|
+
const [focusTrapActive, setFocusTrapActive] = React__namespace.useState(Boolean(propWithFocusTrap));
|
|
8209
|
+
const transitionTimerRef = React__namespace.useRef(null);
|
|
8210
|
+
const showTimerRef = React__namespace.useRef(null);
|
|
8211
|
+
const hideTimerRef = React__namespace.useRef(null);
|
|
8212
|
+
React__namespace.useEffect(() => {
|
|
8213
|
+
onMount();
|
|
8214
|
+
}, []);
|
|
8215
|
+
React__namespace.useEffect(() => {
|
|
8216
|
+
if (triggerManually) {
|
|
8217
|
+
if (isVisible) {
|
|
8218
|
+
show();
|
|
8219
|
+
}
|
|
8220
|
+
else {
|
|
8221
|
+
hide();
|
|
8222
|
+
}
|
|
8223
|
+
}
|
|
8224
|
+
}, [isVisible, triggerManually]);
|
|
8225
|
+
const show = (withFocusTrap) => {
|
|
8226
|
+
onShow();
|
|
8227
|
+
if (transitionTimerRef.current) {
|
|
8228
|
+
clearTimeout(transitionTimerRef.current);
|
|
8229
|
+
}
|
|
8230
|
+
if (hideTimerRef.current) {
|
|
8231
|
+
clearTimeout(hideTimerRef.current);
|
|
8232
|
+
}
|
|
8233
|
+
showTimerRef.current = setTimeout(() => {
|
|
8234
|
+
setVisible(true);
|
|
8235
|
+
setOpacity(1);
|
|
8236
|
+
propWithFocusTrap !== false && withFocusTrap && setFocusTrapActive(true);
|
|
8237
|
+
onShown();
|
|
8238
|
+
}, 0);
|
|
8239
|
+
};
|
|
8240
|
+
const hide = () => {
|
|
8241
|
+
onHide();
|
|
8242
|
+
if (showTimerRef.current) {
|
|
8243
|
+
clearTimeout(showTimerRef.current);
|
|
8244
|
+
}
|
|
8245
|
+
hideTimerRef.current = setTimeout(() => {
|
|
8246
|
+
setVisible(false);
|
|
8247
|
+
setOpacity(0);
|
|
8248
|
+
setFocusTrapActive(false);
|
|
8249
|
+
transitionTimerRef.current = setTimeout(() => {
|
|
8250
|
+
onHidden();
|
|
8251
|
+
}, animationDuration);
|
|
8252
|
+
}, 0);
|
|
8253
|
+
};
|
|
8254
|
+
const positionModifiers = {
|
|
8255
|
+
top: _default$W.modifiers.top,
|
|
8256
|
+
bottom: _default$W.modifiers.bottom,
|
|
8257
|
+
left: _default$W.modifiers.left,
|
|
8258
|
+
right: _default$W.modifiers.right,
|
|
8259
|
+
'top-start': _default$W.modifiers.topLeft,
|
|
8260
|
+
'top-end': _default$W.modifiers.topRight,
|
|
8261
|
+
'bottom-start': _default$W.modifiers.bottomLeft,
|
|
8262
|
+
'bottom-end': _default$W.modifiers.bottomRight,
|
|
8263
|
+
'left-start': _default$W.modifiers.leftTop,
|
|
8264
|
+
'left-end': _default$W.modifiers.leftBottom,
|
|
8265
|
+
'right-start': _default$W.modifiers.rightTop,
|
|
8266
|
+
'right-end': _default$W.modifiers.rightBottom
|
|
8267
|
+
};
|
|
8268
|
+
const hasCustomMinWidth = minWidth !== popoverMinWidth.value;
|
|
8269
|
+
const hasCustomMaxWidth = maxWidth !== popoverMaxWidth.value;
|
|
8270
|
+
const onDocumentKeyDown = (event) => {
|
|
8271
|
+
if (event.keyCode === KEY_CODES.ESCAPE_KEY && visible) {
|
|
8272
|
+
if (triggerManually) {
|
|
8273
|
+
shouldClose(null, hide, event);
|
|
8274
|
+
}
|
|
8275
|
+
else {
|
|
8276
|
+
hide();
|
|
8277
|
+
}
|
|
8278
|
+
}
|
|
8279
|
+
};
|
|
8280
|
+
const onDocumentClick = (event, triggerElement, popperElement) => {
|
|
8281
|
+
if (hideOnOutsideClick && visible) {
|
|
8282
|
+
// check if we clicked within the popper, if so don't do anything
|
|
8283
|
+
const isChild = popperElement && popperElement.contains(event.target);
|
|
8284
|
+
if (isChild) {
|
|
8285
|
+
// clicked within the popper
|
|
8286
|
+
return;
|
|
8287
|
+
}
|
|
8288
|
+
if (triggerManually) {
|
|
8289
|
+
shouldClose(null, hide, event);
|
|
8290
|
+
}
|
|
8291
|
+
else {
|
|
8292
|
+
hide();
|
|
8293
|
+
}
|
|
8294
|
+
}
|
|
8295
|
+
};
|
|
8296
|
+
const onTriggerClick = (event) => {
|
|
8297
|
+
if (triggerManually) {
|
|
8298
|
+
if (visible) {
|
|
8299
|
+
shouldClose(null, hide, event);
|
|
8300
|
+
}
|
|
8301
|
+
else {
|
|
8302
|
+
shouldOpen(show, event);
|
|
8303
|
+
}
|
|
8304
|
+
}
|
|
8305
|
+
else {
|
|
8306
|
+
if (visible) {
|
|
8307
|
+
hide();
|
|
8308
|
+
}
|
|
8309
|
+
else {
|
|
8310
|
+
show(true);
|
|
8311
|
+
}
|
|
8312
|
+
}
|
|
8313
|
+
};
|
|
8314
|
+
const onContentMouseDown = () => {
|
|
8315
|
+
if (focusTrapActive) {
|
|
8316
|
+
setFocusTrapActive(false);
|
|
8317
|
+
}
|
|
8318
|
+
};
|
|
8319
|
+
const closePopover = (event) => {
|
|
8320
|
+
event.stopPropagation();
|
|
8321
|
+
if (triggerManually) {
|
|
8322
|
+
shouldClose(null, hide, event);
|
|
8323
|
+
}
|
|
8324
|
+
else {
|
|
8325
|
+
hide();
|
|
8326
|
+
}
|
|
8327
|
+
};
|
|
8328
|
+
const content = (React__namespace.createElement(FocusTrap, Object.assign({ active: focusTrapActive, focusTrapOptions: {
|
|
8329
|
+
returnFocusOnDeactivate: true,
|
|
8330
|
+
clickOutsideDeactivates: true,
|
|
8331
|
+
fallbackFocus: () => {
|
|
8332
|
+
// If the popover's trigger is focused but scrolled out of view,
|
|
8333
|
+
// FocusTrap will throw an error when the Enter button is used on the trigger.
|
|
8334
|
+
// That is because the Popover is hidden when its trigger is out of view.
|
|
8335
|
+
// Provide a fallback in that case.
|
|
8336
|
+
let node = null;
|
|
8337
|
+
if (document && document.activeElement) {
|
|
8338
|
+
node = document.activeElement;
|
|
8339
|
+
}
|
|
8340
|
+
return node;
|
|
8341
|
+
}
|
|
8342
|
+
}, preventScrollOnDeactivate: true, className: css(_default$W.popover, alertSeverityVariant && alertStyle[alertSeverityVariant], hasNoPadding && _default$W.modifiers.noPadding, hasAutoWidth && _default$W.modifiers.widthAuto, className), role: "dialog", "aria-modal": "true", "aria-label": headerContent ? undefined : ariaLabel, "aria-labelledby": headerContent ? `popover-${uniqueId}-header` : undefined, "aria-describedby": `popover-${uniqueId}-body`, onMouseDown: onContentMouseDown, style: {
|
|
8343
|
+
minWidth: hasCustomMinWidth ? minWidth : null,
|
|
8344
|
+
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
8345
|
+
opacity,
|
|
8346
|
+
transition: getOpacityTransition(animationDuration)
|
|
8347
|
+
} }, rest),
|
|
8348
|
+
React__namespace.createElement(PopoverArrow, null),
|
|
8349
|
+
React__namespace.createElement(PopoverContent, null,
|
|
8350
|
+
showClose && React__namespace.createElement(PopoverCloseButton, { onClose: closePopover, "aria-label": closeBtnAriaLabel }),
|
|
8351
|
+
headerContent && (React__namespace.createElement(PopoverHeader, { id: `popover-${uniqueId}-header`, icon: headerIcon, alertSeverityVariant: alertSeverityVariant, alertSeverityScreenReaderText: alertSeverityScreenReaderText || `${alertSeverityVariant} alert:`, titleHeadingLevel: headerComponent }, typeof headerContent === 'function' ? headerContent(hide) : headerContent)),
|
|
8352
|
+
React__namespace.createElement(PopoverBody, { id: `popover-${uniqueId}-body` }, typeof bodyContent === 'function' ? bodyContent(hide) : bodyContent),
|
|
8353
|
+
footerContent && (React__namespace.createElement(PopoverFooter, { id: `popover-${uniqueId}-footer` }, typeof footerContent === 'function' ? footerContent(hide) : footerContent)))));
|
|
8354
|
+
return (React__namespace.createElement(PopoverContext.Provider, { value: { headerComponent } },
|
|
8355
|
+
React__namespace.createElement(Popper, { trigger: children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onTriggerClick: onTriggerClick, onDocumentClick: onDocumentClick, onDocumentKeyDown: onDocumentKeyDown, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior })));
|
|
8356
|
+
};
|
|
8357
|
+
Popover.displayName = 'Popover';
|
|
8358
|
+
|
|
8036
8359
|
const CopyIconConfig = {
|
|
8037
8360
|
name: 'CopyIcon',
|
|
8038
8361
|
height: 512,
|
|
@@ -8193,7 +8516,7 @@
|
|
|
8193
8516
|
isExpanded: false,
|
|
8194
8517
|
isCode: false,
|
|
8195
8518
|
variant: 'inline',
|
|
8196
|
-
position: exports.
|
|
8519
|
+
position: exports.PopoverPosition.top,
|
|
8197
8520
|
maxWidth: '150px',
|
|
8198
8521
|
exitDelay: 1600,
|
|
8199
8522
|
entryDelay: 300,
|
|
@@ -8211,7 +8534,7 @@
|
|
|
8211
8534
|
};
|
|
8212
8535
|
ClipboardCopyAction.displayName = 'ClipboardCopyAction';
|
|
8213
8536
|
|
|
8214
|
-
var _default$
|
|
8537
|
+
var _default$V = {
|
|
8215
8538
|
"codeBlock": "pf-c-code-block",
|
|
8216
8539
|
"codeBlockActions": "pf-c-code-block__actions",
|
|
8217
8540
|
"codeBlockCode": "pf-c-code-block__code",
|
|
@@ -8222,17 +8545,17 @@
|
|
|
8222
8545
|
|
|
8223
8546
|
const CodeBlock = (_a) => {
|
|
8224
8547
|
var { children = null, className, actions = null } = _a, props = __rest$1(_a, ["children", "className", "actions"]);
|
|
8225
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8226
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8227
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8228
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8548
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$V.codeBlock, className) }, props),
|
|
8549
|
+
React__namespace.createElement("div", { className: css(_default$V.codeBlockHeader) },
|
|
8550
|
+
React__namespace.createElement("div", { className: css(_default$V.codeBlockActions) }, actions && actions)),
|
|
8551
|
+
React__namespace.createElement("div", { className: css(_default$V.codeBlockContent) }, children)));
|
|
8229
8552
|
};
|
|
8230
8553
|
CodeBlock.displayName = 'CodeBlock';
|
|
8231
8554
|
|
|
8232
8555
|
const CodeBlockCode = (_a) => {
|
|
8233
8556
|
var { children = null } = _a, props = __rest$1(_a, ["children"]);
|
|
8234
|
-
return (React__namespace.createElement("pre", Object.assign({ className: css(_default$
|
|
8235
|
-
React__namespace.createElement("code", { className: css(_default$
|
|
8557
|
+
return (React__namespace.createElement("pre", Object.assign({ className: css(_default$V.codeBlockPre) }, props),
|
|
8558
|
+
React__namespace.createElement("code", { className: css(_default$V.codeBlockCode) }, children)));
|
|
8236
8559
|
};
|
|
8237
8560
|
CodeBlockCode.displayName = 'CodeBlockCode';
|
|
8238
8561
|
|
|
@@ -8242,7 +8565,7 @@
|
|
|
8242
8565
|
};
|
|
8243
8566
|
CodeBlockAction.displayName = 'CodeBlockAction';
|
|
8244
8567
|
|
|
8245
|
-
var _default$
|
|
8568
|
+
var _default$U = {
|
|
8246
8569
|
"contextSelector": "pf-c-context-selector",
|
|
8247
8570
|
"contextSelectorMenu": "pf-c-context-selector__menu",
|
|
8248
8571
|
"contextSelectorMenuFooter": "pf-c-context-selector__menu-footer",
|
|
@@ -8328,9 +8651,9 @@
|
|
|
8328
8651
|
isActive, onEnter, parentRef } = _a,
|
|
8329
8652
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8330
8653
|
props = __rest$1(_a, ["className", "toggleText", "isOpen", "onToggle", "id", "isPlain", "isText", "isActive", "onEnter", "parentRef"]);
|
|
8331
|
-
return (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.toggle, className: css(_default$
|
|
8332
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
8333
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
8654
|
+
return (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.toggle, className: css(_default$U.contextSelectorToggle, isActive && _default$U.modifiers.active, isPlain && _default$U.modifiers.plain, isText && _default$U.modifiers.text, className), type: "button", onClick: event => onToggle(event, !isOpen), "aria-expanded": isOpen, onKeyDown: this.onKeyDown }),
|
|
8655
|
+
React__namespace.createElement("span", { className: css(_default$U.contextSelectorToggleText) }, toggleText),
|
|
8656
|
+
React__namespace.createElement("span", { className: css(_default$U.contextSelectorToggleIcon) },
|
|
8334
8657
|
React__namespace.createElement(CaretDownIcon$1, { "aria-hidden": true }))));
|
|
8335
8658
|
}
|
|
8336
8659
|
}
|
|
@@ -8356,7 +8679,7 @@
|
|
|
8356
8679
|
this.render = () => {
|
|
8357
8680
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8358
8681
|
const _a = this.props, { className, isOpen, children } = _a, props = __rest$1(_a, ["className", "isOpen", "children"]);
|
|
8359
|
-
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
8682
|
+
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$U.contextSelectorMenuList, className), hidden: !isOpen, role: "menu" }, props), this.extendChildren()));
|
|
8360
8683
|
};
|
|
8361
8684
|
}
|
|
8362
8685
|
extendChildren() {
|
|
@@ -8378,7 +8701,7 @@
|
|
|
8378
8701
|
onSelect: (event, value) => undefined
|
|
8379
8702
|
});
|
|
8380
8703
|
|
|
8381
|
-
var _default$
|
|
8704
|
+
var _default$T = {
|
|
8382
8705
|
"formControl": "pf-c-form-control",
|
|
8383
8706
|
"inputGroup": "pf-c-input-group",
|
|
8384
8707
|
"inputGroupText": "pf-c-input-group__text",
|
|
@@ -8502,7 +8825,7 @@
|
|
|
8502
8825
|
var { className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
8503
8826
|
const formCtrls = [FormSelect, TextArea, TextInput].map(comp => comp.displayName);
|
|
8504
8827
|
const idItem = React__namespace.Children.toArray(children).find((child) => !formCtrls.includes(child.type.displayName) && child.props.id);
|
|
8505
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8828
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.inputGroup, className) }, props), idItem
|
|
8506
8829
|
? React__namespace.Children.map(children, (child) => formCtrls.includes(child.type.displayName)
|
|
8507
8830
|
? React__namespace.cloneElement(child, { 'aria-describedby': idItem.props.id })
|
|
8508
8831
|
: child)
|
|
@@ -8518,7 +8841,7 @@
|
|
|
8518
8841
|
const InputGroupText = (_a) => {
|
|
8519
8842
|
var { className = '', component = 'span', children, variant = exports.InputGroupTextVariant.default } = _a, props = __rest$1(_a, ["className", "component", "children", "variant"]);
|
|
8520
8843
|
const Component = component;
|
|
8521
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
8844
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$T.inputGroupText, variant === exports.InputGroupTextVariant.plain && _default$T.modifiers.plain, className) }, props), children));
|
|
8522
8845
|
};
|
|
8523
8846
|
InputGroupText.displayName = 'InputGroupText';
|
|
8524
8847
|
|
|
@@ -8543,8 +8866,8 @@
|
|
|
8543
8866
|
const screenReaderLabelId = `pf-context-selector-label-id-${newId}`;
|
|
8544
8867
|
const searchButtonId = `pf-context-selector-search-button-id-${newId}`;
|
|
8545
8868
|
const _a = this.props, { children, className, isOpen, isFullHeight, onToggle, onSelect, screenReaderLabel, toggleText, searchButtonAriaLabel, searchInputValue, onSearchInputChange, searchInputPlaceholder, onSearchButtonClick, menuAppendTo, ouiaId, ouiaSafe, isPlain, isText, footer, disableFocusTrap } = _a, props = __rest$1(_a, ["children", "className", "isOpen", "isFullHeight", "onToggle", "onSelect", "screenReaderLabel", "toggleText", "searchButtonAriaLabel", "searchInputValue", "onSearchInputChange", "searchInputPlaceholder", "onSearchButtonClick", "menuAppendTo", "ouiaId", "ouiaSafe", "isPlain", "isText", "footer", "disableFocusTrap"]);
|
|
8546
|
-
const menuContainer = (React__namespace.createElement("div", { className: css(_default$
|
|
8547
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8869
|
+
const menuContainer = (React__namespace.createElement("div", { className: css(_default$U.contextSelectorMenu) }, isOpen && (React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true } },
|
|
8870
|
+
React__namespace.createElement("div", { className: css(_default$U.contextSelectorMenuSearch) },
|
|
8548
8871
|
React__namespace.createElement(InputGroup, null,
|
|
8549
8872
|
React__namespace.createElement(TextInput, { value: searchInputValue, type: "search", placeholder: searchInputPlaceholder, onChange: onSearchInputChange, onKeyPress: this.onEnterPressed, "aria-labelledby": searchButtonId }),
|
|
8550
8873
|
React__namespace.createElement(Button, { variant: exports.ButtonVariant.control, "aria-label": searchButtonAriaLabel, id: searchButtonId, onClick: onSearchButtonClick },
|
|
@@ -8552,8 +8875,8 @@
|
|
|
8552
8875
|
React__namespace.createElement(ContextSelectorContext.Provider, { value: { onSelect } },
|
|
8553
8876
|
React__namespace.createElement(ContextSelectorMenuList, { isOpen: isOpen }, children)),
|
|
8554
8877
|
footer))));
|
|
8555
|
-
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8556
|
-
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8878
|
+
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$U.contextSelector, isOpen && _default$U.modifiers.expanded, className), ref: this.parentRef }, props), isOpen && menuContainer));
|
|
8879
|
+
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$U.contextSelector, isOpen && _default$U.modifiers.expanded, isFullHeight && _default$U.modifiers.fullHeight, className), ref: this.parentRef }, getOUIAProps(ContextSelector.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props),
|
|
8557
8880
|
screenReaderLabel && (React__namespace.createElement("span", { id: screenReaderLabelId, hidden: true }, screenReaderLabel)),
|
|
8558
8881
|
React__namespace.createElement(ContextSelectorToggle, { onToggle: onToggle, isOpen: isOpen, toggleText: toggleText, id: toggleId, parentRef: this.parentRef.current, "aria-labelledby": `${screenReaderLabelId} ${toggleId}`, isPlain: isPlain, isText: isText }),
|
|
8559
8882
|
isOpen && menuAppendTo === 'inline' && menuContainer));
|
|
@@ -8603,7 +8926,7 @@
|
|
|
8603
8926
|
const Component = href ? 'a' : 'button';
|
|
8604
8927
|
const isDisabledLink = href && isDisabled;
|
|
8605
8928
|
return (React__namespace.createElement(ContextSelectorContext.Consumer, null, ({ onSelect }) => (React__namespace.createElement("li", { role: "none" },
|
|
8606
|
-
React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
8929
|
+
React__namespace.createElement(Component, Object.assign({ className: css(_default$U.contextSelectorMenuListItem, isDisabledLink && _default$U.modifiers.disabled, className), ref: this.ref, onClick: event => {
|
|
8607
8930
|
if (!isDisabled) {
|
|
8608
8931
|
onClick(event);
|
|
8609
8932
|
onSelect(event, children);
|
|
@@ -8624,11 +8947,11 @@
|
|
|
8624
8947
|
|
|
8625
8948
|
const ContextSelectorFooter = (_a) => {
|
|
8626
8949
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8627
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
8950
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$U.contextSelectorMenuFooter, className) }), children));
|
|
8628
8951
|
};
|
|
8629
8952
|
ContextSelectorFooter.displayName = 'ContextSelectorFooter';
|
|
8630
8953
|
|
|
8631
|
-
var _default$
|
|
8954
|
+
var _default$S = {
|
|
8632
8955
|
"dataList": "pf-c-data-list",
|
|
8633
8956
|
"dataListAction": "pf-c-data-list__action",
|
|
8634
8957
|
"dataListCell": "pf-c-data-list__cell",
|
|
@@ -8684,7 +9007,7 @@
|
|
|
8684
9007
|
}
|
|
8685
9008
|
};
|
|
8686
9009
|
|
|
8687
|
-
var _default$
|
|
9010
|
+
var _default$R = {
|
|
8688
9011
|
"dataList": "pf-c-data-list",
|
|
8689
9012
|
"dataListCell": "pf-c-data-list__cell",
|
|
8690
9013
|
"dataListExpandableContent": "pf-c-data-list__expandable-content",
|
|
@@ -8707,13 +9030,13 @@
|
|
|
8707
9030
|
};
|
|
8708
9031
|
|
|
8709
9032
|
const gridBreakpointClasses = {
|
|
8710
|
-
none: _default$
|
|
9033
|
+
none: _default$R.modifiers.gridNone,
|
|
8711
9034
|
always: 'pf-m-grid',
|
|
8712
|
-
sm: _default$
|
|
8713
|
-
md: _default$
|
|
8714
|
-
lg: _default$
|
|
8715
|
-
xl: _default$
|
|
8716
|
-
'2xl': _default$
|
|
9035
|
+
sm: _default$R.modifiers.gridSm,
|
|
9036
|
+
md: _default$R.modifiers.gridMd,
|
|
9037
|
+
lg: _default$R.modifiers.gridLg,
|
|
9038
|
+
xl: _default$R.modifiers.gridXl,
|
|
9039
|
+
'2xl': _default$R.modifiers.grid_2xl
|
|
8717
9040
|
};
|
|
8718
9041
|
exports.DataListWrapModifier = void 0;
|
|
8719
9042
|
(function (DataListWrapModifier) {
|
|
@@ -8763,7 +9086,7 @@
|
|
|
8763
9086
|
this.dragStart0 = (el) => {
|
|
8764
9087
|
const { onDragStart } = this.props;
|
|
8765
9088
|
const draggedItemId = el.id;
|
|
8766
|
-
el.classList.add(_default$
|
|
9089
|
+
el.classList.add(_default$S.modifiers.ghostRow);
|
|
8767
9090
|
el.setAttribute('aria-pressed', 'true');
|
|
8768
9091
|
this.setState({
|
|
8769
9092
|
draggedItemId,
|
|
@@ -8779,8 +9102,8 @@
|
|
|
8779
9102
|
this.onDragCancel = () => {
|
|
8780
9103
|
this.move(this.props.itemOrder);
|
|
8781
9104
|
Array.from(this.ref.current.children).forEach(el => {
|
|
8782
|
-
el.classList.remove(_default$
|
|
8783
|
-
el.classList.remove(_default$
|
|
9105
|
+
el.classList.remove(_default$S.modifiers.ghostRow);
|
|
9106
|
+
el.classList.remove(_default$S.modifiers.dragOver);
|
|
8784
9107
|
el.setAttribute('aria-pressed', 'false');
|
|
8785
9108
|
});
|
|
8786
9109
|
this.setState({
|
|
@@ -8802,8 +9125,8 @@
|
|
|
8802
9125
|
}
|
|
8803
9126
|
};
|
|
8804
9127
|
this.dragEnd0 = (el) => {
|
|
8805
|
-
el.classList.remove(_default$
|
|
8806
|
-
el.classList.remove(_default$
|
|
9128
|
+
el.classList.remove(_default$S.modifiers.ghostRow);
|
|
9129
|
+
el.classList.remove(_default$S.modifiers.dragOver);
|
|
8807
9130
|
el.setAttribute('aria-pressed', 'false');
|
|
8808
9131
|
this.setState({
|
|
8809
9132
|
draggedItemId: null,
|
|
@@ -8882,14 +9205,14 @@
|
|
|
8882
9205
|
const nextSelection = dragItem.previousSibling;
|
|
8883
9206
|
if (nextSelection) {
|
|
8884
9207
|
this.dragOver0(nextSelection.id);
|
|
8885
|
-
dragItem.querySelector(`.${_default$
|
|
9208
|
+
dragItem.querySelector(`.${_default$S.dataListItemDraggableButton}`).focus();
|
|
8886
9209
|
}
|
|
8887
9210
|
}
|
|
8888
9211
|
else if (evt.key === 'ArrowDown') {
|
|
8889
9212
|
const nextSelection = dragItem.nextSibling;
|
|
8890
9213
|
if (nextSelection) {
|
|
8891
9214
|
this.dragOver0(nextSelection.id);
|
|
8892
|
-
dragItem.querySelector(`.${_default$
|
|
9215
|
+
dragItem.querySelector(`.${_default$S.dataListItemDraggableButton}`).focus();
|
|
8893
9216
|
}
|
|
8894
9217
|
}
|
|
8895
9218
|
}
|
|
@@ -8939,7 +9262,7 @@
|
|
|
8939
9262
|
drop: this.drop,
|
|
8940
9263
|
dragKeyHandler: this.handleDragButtonKeys
|
|
8941
9264
|
} },
|
|
8942
|
-
React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
9265
|
+
React__namespace.createElement("ul", Object.assign({ className: css(_default$S.dataList, isCompact && _default$S.modifiers.compact, gridBreakpointClasses[gridBreakpoint], wrapModifier && _default$S.modifiers[wrapModifier], dragging && _default$S.modifiers.dragOver, className), style: props.style }, props, dragProps, { ref: this.ref }), children)));
|
|
8943
9266
|
}
|
|
8944
9267
|
}
|
|
8945
9268
|
DataList.displayName = 'DataList';
|
|
@@ -8958,13 +9281,13 @@
|
|
|
8958
9281
|
id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, isPlainButtonAction } = _a,
|
|
8959
9282
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8960
9283
|
props = __rest$1(_a, ["children", "className", "visibility", "id", 'aria-label', 'aria-labelledby', "isPlainButtonAction"]);
|
|
8961
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9284
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$S.dataListItemAction, formatBreakpointMods(visibility, _default$S), className) }, props), isPlainButtonAction ? React__namespace.createElement("div", { className: css(_default$S.dataListAction) }, children) : children));
|
|
8962
9285
|
};
|
|
8963
9286
|
DataListAction.displayName = 'DataListAction';
|
|
8964
9287
|
|
|
8965
9288
|
const DataListCell = (_a) => {
|
|
8966
9289
|
var { children = null, className = '', width = 1, isFilled = true, alignRight = false, isIcon = false, wrapModifier = null } = _a, props = __rest$1(_a, ["children", "className", "width", "isFilled", "alignRight", "isIcon", "wrapModifier"]);
|
|
8967
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9290
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$S.dataListCell, width > 1 && _default$S.modifiers[`flex_${width}`], !isFilled && _default$S.modifiers.noFill, alignRight && _default$S.modifiers.alignRight, isIcon && _default$S.modifiers.icon, className, wrapModifier && _default$S.modifiers[wrapModifier]) }, props), children));
|
|
8968
9291
|
};
|
|
8969
9292
|
DataListCell.displayName = 'DataListCell';
|
|
8970
9293
|
|
|
@@ -8972,17 +9295,17 @@
|
|
|
8972
9295
|
var { className = '',
|
|
8973
9296
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8974
9297
|
onChange = (checked, event) => { }, isValid = true, isDisabled = false, isChecked = null, checked = null, otherControls = false } = _a, props = __rest$1(_a, ["className", "onChange", "isValid", "isDisabled", "isChecked", "checked", "otherControls"]);
|
|
8975
|
-
const check = (React__namespace.createElement("div", { className: css(_default$
|
|
9298
|
+
const check = (React__namespace.createElement("div", { className: css(_default$S.dataListCheck) },
|
|
8976
9299
|
React__namespace.createElement("input", Object.assign({}, props, { type: "checkbox", onChange: event => onChange(event.currentTarget.checked, event), "aria-invalid": !isValid, disabled: isDisabled, checked: isChecked || checked }))));
|
|
8977
9300
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
8978
|
-
!otherControls && React__namespace.createElement("div", { className: css(_default$
|
|
9301
|
+
!otherControls && React__namespace.createElement("div", { className: css(_default$S.dataListItemControl, className) }, check),
|
|
8979
9302
|
otherControls && check));
|
|
8980
9303
|
};
|
|
8981
9304
|
DataListCheck.displayName = 'DataListCheck';
|
|
8982
9305
|
|
|
8983
9306
|
const DataListControl = (_a) => {
|
|
8984
9307
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8985
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9308
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$S.dataListItemControl, className) }, props), children));
|
|
8986
9309
|
};
|
|
8987
9310
|
DataListControl.displayName = 'DataListControl';
|
|
8988
9311
|
|
|
@@ -9001,8 +9324,8 @@
|
|
|
9001
9324
|
|
|
9002
9325
|
const DataListDragButton = (_a) => {
|
|
9003
9326
|
var { className = '', isDisabled = false } = _a, props = __rest$1(_a, ["className", "isDisabled"]);
|
|
9004
|
-
return (React__namespace.createElement(DataListContext.Consumer, null, ({ dragKeyHandler }) => (React__namespace.createElement("button", Object.assign({ className: css(_default$
|
|
9005
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
9327
|
+
return (React__namespace.createElement(DataListContext.Consumer, null, ({ dragKeyHandler }) => (React__namespace.createElement("button", Object.assign({ className: css(_default$S.dataListItemDraggableButton, isDisabled && _default$S.modifiers.disabled, className), onKeyDown: dragKeyHandler, type: "button", disabled: isDisabled }, props),
|
|
9328
|
+
React__namespace.createElement("span", { className: css(_default$S.dataListItemDraggableIcon) },
|
|
9006
9329
|
React__namespace.createElement(GripVerticalIcon$1, null))))));
|
|
9007
9330
|
};
|
|
9008
9331
|
DataListDragButton.displayName = 'DataListDragButton';
|
|
@@ -9032,8 +9355,8 @@
|
|
|
9032
9355
|
let target = event.target;
|
|
9033
9356
|
while (event.currentTarget !== target) {
|
|
9034
9357
|
if (('onclick' in target && target.onclick) ||
|
|
9035
|
-
target.parentNode.classList.contains(_default$
|
|
9036
|
-
target.parentNode.classList.contains(_default$
|
|
9358
|
+
target.parentNode.classList.contains(_default$S.dataListItemAction) ||
|
|
9359
|
+
target.parentNode.classList.contains(_default$S.dataListItemControl)) {
|
|
9037
9360
|
// check other event handlers are not present.
|
|
9038
9361
|
return;
|
|
9039
9362
|
}
|
|
@@ -9055,393 +9378,91 @@
|
|
|
9055
9378
|
const dragProps = isDraggable && {
|
|
9056
9379
|
draggable: dragButton ? !dragButton.props.isDisabled : true,
|
|
9057
9380
|
onDrop: drop,
|
|
9058
|
-
onDragEnd: dragEnd,
|
|
9059
|
-
onDragStart: dragStart
|
|
9060
|
-
};
|
|
9061
|
-
return (React__namespace.createElement("li", Object.assign({ id: id, className: css(_default$
|
|
9062
|
-
React__namespace.cloneElement(child, {
|
|
9063
|
-
rowid: ariaLabelledBy
|
|
9064
|
-
}))));
|
|
9065
|
-
}));
|
|
9066
|
-
}
|
|
9067
|
-
}
|
|
9068
|
-
DataListItem.displayName = 'DataListItem';
|
|
9069
|
-
DataListItem.defaultProps = {
|
|
9070
|
-
isExpanded: false,
|
|
9071
|
-
className: '',
|
|
9072
|
-
id: '',
|
|
9073
|
-
children: null,
|
|
9074
|
-
'aria-labelledby': ''
|
|
9075
|
-
};
|
|
9076
|
-
|
|
9077
|
-
const DataListItemCells = (_a) => {
|
|
9078
|
-
var { className = '', dataListCells,
|
|
9079
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9080
|
-
rowid = '' } = _a, props = __rest$1(_a, ["className", "dataListCells", "rowid"]);
|
|
9081
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemContent, className) }, props), dataListCells));
|
|
9082
|
-
};
|
|
9083
|
-
DataListItemCells.displayName = 'DataListItemCells';
|
|
9084
|
-
|
|
9085
|
-
const DataListItemRow = (_a) => {
|
|
9086
|
-
var { children, className = '', rowid = '', wrapModifier = null } = _a, props = __rest$1(_a, ["children", "className", "rowid", "wrapModifier"]);
|
|
9087
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemRow, className, wrapModifier && _default$T.modifiers[wrapModifier]) }, props), React__namespace.Children.map(children, child => React__namespace.isValidElement(child) &&
|
|
9088
|
-
React__namespace.cloneElement(child, {
|
|
9089
|
-
rowid
|
|
9090
|
-
}))));
|
|
9091
|
-
};
|
|
9092
|
-
DataListItemRow.displayName = 'DataListItemRow';
|
|
9093
|
-
|
|
9094
|
-
const DataListToggle = (_a) => {
|
|
9095
|
-
var { className = '', isExpanded = false, 'aria-controls': ariaControls = '', 'aria-label': ariaLabel = 'Details', rowid = '', id } = _a, props = __rest$1(_a, ["className", "isExpanded", 'aria-controls', 'aria-label', "rowid", "id"]);
|
|
9096
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemControl, className) }, props),
|
|
9097
|
-
React__namespace.createElement("div", { className: css(_default$T.dataListToggle) },
|
|
9098
|
-
React__namespace.createElement(Button, { id: id, variant: exports.ButtonVariant.plain, "aria-controls": ariaControls !== '' && ariaControls, "aria-label": ariaLabel, "aria-labelledby": ariaLabel !== 'Details' ? null : `${rowid} ${id}`, "aria-expanded": isExpanded },
|
|
9099
|
-
React__namespace.createElement("div", { className: css(_default$T.dataListToggleIcon) },
|
|
9100
|
-
React__namespace.createElement(AngleRightIcon$1, null))))));
|
|
9101
|
-
};
|
|
9102
|
-
DataListToggle.displayName = 'DataListToggle';
|
|
9103
|
-
|
|
9104
|
-
const DataListContent = (_a) => {
|
|
9105
|
-
var { className = '', children = null, id = '', isHidden = false, 'aria-label': ariaLabel, hasNoPadding = false,
|
|
9106
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9107
|
-
rowid = '' } = _a, props = __rest$1(_a, ["className", "children", "id", "isHidden", 'aria-label', "hasNoPadding", "rowid"]);
|
|
9108
|
-
return (React__namespace.createElement("section", Object.assign({ id: id, className: css(_default$T.dataListExpandableContent, className), hidden: isHidden, "aria-label": ariaLabel }, props),
|
|
9109
|
-
React__namespace.createElement("div", { className: css(_default$T.dataListExpandableContentBody, hasNoPadding && _default$T.modifiers.noPadding) }, children)));
|
|
9110
|
-
};
|
|
9111
|
-
DataListContent.displayName = 'DataListContent';
|
|
9112
|
-
|
|
9113
|
-
const DataListText = (_a) => {
|
|
9114
|
-
var { children = null, className = '', component = 'span', wrapModifier = null, tooltip: tooltipProp = '', onMouseEnter: onMouseEnterProp = () => { } } = _a, props = __rest$1(_a, ["children", "className", "component", "wrapModifier", "tooltip", "onMouseEnter"]);
|
|
9115
|
-
const Component = component;
|
|
9116
|
-
const [tooltip, setTooltip] = React__namespace.useState('');
|
|
9117
|
-
const onMouseEnter = (event) => {
|
|
9118
|
-
if (event.target.offsetWidth < event.target.scrollWidth) {
|
|
9119
|
-
setTooltip(tooltipProp || event.target.innerHTML);
|
|
9120
|
-
}
|
|
9121
|
-
else {
|
|
9122
|
-
setTooltip('');
|
|
9123
|
-
}
|
|
9124
|
-
onMouseEnterProp(event);
|
|
9125
|
-
};
|
|
9126
|
-
const text = (React__namespace.createElement(Component, Object.assign({ onMouseEnter: onMouseEnter, className: css(className, wrapModifier && _default$T.modifiers[wrapModifier], _default$T.dataListText) }, props), children));
|
|
9127
|
-
return tooltip !== '' ? (React__namespace.createElement(Tooltip, { content: tooltip, isVisible: true }, text)) : (text);
|
|
9128
|
-
};
|
|
9129
|
-
DataListText.displayName = 'DataListText';
|
|
9130
|
-
|
|
9131
|
-
var _default$R = {
|
|
9132
|
-
"datePicker": "pf-c-date-picker",
|
|
9133
|
-
"datePickerCalendar": "pf-c-date-picker__calendar",
|
|
9134
|
-
"datePickerHelperText": "pf-c-date-picker__helper-text",
|
|
9135
|
-
"datePickerInput": "pf-c-date-picker__input",
|
|
9136
|
-
"formControl": "pf-c-form-control",
|
|
9137
|
-
"modifiers": {
|
|
9138
|
-
"error": "pf-m-error",
|
|
9139
|
-
"alignRight": "pf-m-align-right",
|
|
9140
|
-
"top": "pf-m-top"
|
|
9141
|
-
}
|
|
9142
|
-
};
|
|
9143
|
-
|
|
9144
|
-
var _default$Q = {
|
|
9145
|
-
"button": "pf-c-button",
|
|
9146
|
-
"modifiers": {
|
|
9147
|
-
"noPadding": "pf-m-no-padding",
|
|
9148
|
-
"widthAuto": "pf-m-width-auto",
|
|
9149
|
-
"top": "pf-m-top",
|
|
9150
|
-
"topLeft": "pf-m-top-left",
|
|
9151
|
-
"topRight": "pf-m-top-right",
|
|
9152
|
-
"bottom": "pf-m-bottom",
|
|
9153
|
-
"bottomLeft": "pf-m-bottom-left",
|
|
9154
|
-
"bottomRight": "pf-m-bottom-right",
|
|
9155
|
-
"left": "pf-m-left",
|
|
9156
|
-
"leftTop": "pf-m-left-top",
|
|
9157
|
-
"leftBottom": "pf-m-left-bottom",
|
|
9158
|
-
"right": "pf-m-right",
|
|
9159
|
-
"rightTop": "pf-m-right-top",
|
|
9160
|
-
"rightBottom": "pf-m-right-bottom",
|
|
9161
|
-
"danger": "pf-m-danger",
|
|
9162
|
-
"warning": "pf-m-warning",
|
|
9163
|
-
"success": "pf-m-success",
|
|
9164
|
-
"default": "pf-m-default",
|
|
9165
|
-
"info": "pf-m-info",
|
|
9166
|
-
"icon": "pf-m-icon"
|
|
9167
|
-
},
|
|
9168
|
-
"popover": "pf-c-popover",
|
|
9169
|
-
"popoverArrow": "pf-c-popover__arrow",
|
|
9170
|
-
"popoverBody": "pf-c-popover__body",
|
|
9171
|
-
"popoverContent": "pf-c-popover__content",
|
|
9172
|
-
"popoverFooter": "pf-c-popover__footer",
|
|
9173
|
-
"popoverTitle": "pf-c-popover__title",
|
|
9174
|
-
"popoverTitleIcon": "pf-c-popover__title-icon",
|
|
9175
|
-
"popoverTitleText": "pf-c-popover__title-text",
|
|
9176
|
-
"title": "pf-c-title"
|
|
9177
|
-
};
|
|
9178
|
-
|
|
9179
|
-
const PopoverContext = React__namespace.createContext({});
|
|
9180
|
-
|
|
9181
|
-
const PopoverContent = (_a) => {
|
|
9182
|
-
var { className = null, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
9183
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Q.popoverContent, className) }, props), children));
|
|
9184
|
-
};
|
|
9185
|
-
PopoverContent.displayName = 'PopoverContent';
|
|
9186
|
-
|
|
9187
|
-
const PopoverBody = (_a) => {
|
|
9188
|
-
var { children, id, className } = _a, props = __rest$1(_a, ["children", "id", "className"]);
|
|
9189
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Q.popoverBody, className), id: id }, props), children));
|
|
9190
|
-
};
|
|
9191
|
-
PopoverBody.displayName = 'PopoverBody';
|
|
9192
|
-
|
|
9193
|
-
const PopoverHeaderIcon = (_a) => {
|
|
9194
|
-
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9195
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(_default$Q.popoverTitleIcon, className) }, props), children));
|
|
9196
|
-
};
|
|
9197
|
-
PopoverHeaderIcon.displayName = 'PopoverHeaderIcon';
|
|
9198
|
-
|
|
9199
|
-
const PopoverHeaderText = (_a) => {
|
|
9200
|
-
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9201
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(_default$Q.popoverTitleText, className) }, props), children));
|
|
9202
|
-
};
|
|
9203
|
-
PopoverHeaderText.displayName = 'PopoverHeaderText';
|
|
9204
|
-
|
|
9205
|
-
const PopoverHeader = (_a) => {
|
|
9206
|
-
var { children, icon, className, titleHeadingLevel = 'h6', alertSeverityVariant, id, alertSeverityScreenReaderText } = _a, props = __rest$1(_a, ["children", "icon", "className", "titleHeadingLevel", "alertSeverityVariant", "id", "alertSeverityScreenReaderText"]);
|
|
9207
|
-
const HeadingLevel = titleHeadingLevel;
|
|
9208
|
-
return icon || alertSeverityVariant ? (React__namespace.createElement("header", Object.assign({ className: css('pf-c-popover__header', className), id: id }, props),
|
|
9209
|
-
React__namespace.createElement(HeadingLevel, { className: css(_default$Q.popoverTitle, icon && _default$Q.modifiers.icon) },
|
|
9210
|
-
icon && React__namespace.createElement(PopoverHeaderIcon, null, icon),
|
|
9211
|
-
alertSeverityVariant && alertSeverityScreenReaderText && (React__namespace.createElement("span", { className: "pf-u-screen-reader" }, alertSeverityScreenReaderText)),
|
|
9212
|
-
React__namespace.createElement(PopoverHeaderText, null, children)))) : (React__namespace.createElement(Title, Object.assign({ headingLevel: titleHeadingLevel, size: exports.TitleSizes.md, id: id, className: className }, props), children));
|
|
9213
|
-
};
|
|
9214
|
-
PopoverHeader.displayName = 'PopoverHeader';
|
|
9215
|
-
|
|
9216
|
-
const PopoverFooter = (_a) => {
|
|
9217
|
-
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9218
|
-
return (React__namespace.createElement("footer", Object.assign({ className: css(_default$Q.popoverFooter, className) }, props), children));
|
|
9381
|
+
onDragEnd: dragEnd,
|
|
9382
|
+
onDragStart: dragStart
|
|
9383
|
+
};
|
|
9384
|
+
return (React__namespace.createElement("li", Object.assign({ id: id, className: css(_default$S.dataListItem, isExpanded && _default$S.modifiers.expanded, isSelectable && _default$S.modifiers.selectable, selectedDataListItemId && selectedDataListItemId === id && _default$S.modifiers.selected, className), "aria-labelledby": ariaLabelledBy }, (isSelectable && { tabIndex: 0, onClick: selectDataListItem, onKeyDown }), (isSelectable && selectedDataListItemId === id && { 'aria-selected': true }), props, dragProps), React__namespace.Children.map(children, child => React__namespace.isValidElement(child) &&
|
|
9385
|
+
React__namespace.cloneElement(child, {
|
|
9386
|
+
rowid: ariaLabelledBy
|
|
9387
|
+
}))));
|
|
9388
|
+
}));
|
|
9389
|
+
}
|
|
9390
|
+
}
|
|
9391
|
+
DataListItem.displayName = 'DataListItem';
|
|
9392
|
+
DataListItem.defaultProps = {
|
|
9393
|
+
isExpanded: false,
|
|
9394
|
+
className: '',
|
|
9395
|
+
id: '',
|
|
9396
|
+
children: null,
|
|
9397
|
+
'aria-labelledby': ''
|
|
9219
9398
|
};
|
|
9220
|
-
PopoverFooter.displayName = 'PopoverFooter';
|
|
9221
9399
|
|
|
9222
|
-
const
|
|
9223
|
-
var {
|
|
9224
|
-
|
|
9225
|
-
|
|
9226
|
-
|
|
9227
|
-
return () => {
|
|
9228
|
-
closeButtonElement && closeButtonElement.removeEventListener('click', onClose, false);
|
|
9229
|
-
};
|
|
9230
|
-
}, [closeButtonElement]);
|
|
9231
|
-
return (React__namespace.createElement(FindRefWrapper, { onFoundRef: (foundRef) => setCloseButtonElement(foundRef) },
|
|
9232
|
-
React__namespace.createElement(Button, Object.assign({ variant: "plain", "aria-label": true }, props, { style: { pointerEvents: 'auto' } }),
|
|
9233
|
-
React__namespace.createElement(TimesIcon$1, null))));
|
|
9400
|
+
const DataListItemCells = (_a) => {
|
|
9401
|
+
var { className = '', dataListCells,
|
|
9402
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9403
|
+
rowid = '' } = _a, props = __rest$1(_a, ["className", "dataListCells", "rowid"]);
|
|
9404
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$S.dataListItemContent, className) }, props), dataListCells));
|
|
9234
9405
|
};
|
|
9235
|
-
|
|
9406
|
+
DataListItemCells.displayName = 'DataListItemCells';
|
|
9236
9407
|
|
|
9237
|
-
const
|
|
9238
|
-
var { className = '' } = _a, props = __rest$1(_a, ["className"]);
|
|
9239
|
-
return React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9408
|
+
const DataListItemRow = (_a) => {
|
|
9409
|
+
var { children, className = '', rowid = '', wrapModifier = null } = _a, props = __rest$1(_a, ["children", "className", "rowid", "wrapModifier"]);
|
|
9410
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$S.dataListItemRow, className, wrapModifier && _default$S.modifiers[wrapModifier]) }, props), React__namespace.Children.map(children, child => React__namespace.isValidElement(child) &&
|
|
9411
|
+
React__namespace.cloneElement(child, {
|
|
9412
|
+
rowid
|
|
9413
|
+
}))));
|
|
9240
9414
|
};
|
|
9241
|
-
|
|
9415
|
+
DataListItemRow.displayName = 'DataListItemRow';
|
|
9242
9416
|
|
|
9243
|
-
const
|
|
9244
|
-
|
|
9245
|
-
|
|
9246
|
-
|
|
9417
|
+
const DataListToggle = (_a) => {
|
|
9418
|
+
var { className = '', isExpanded = false, 'aria-controls': ariaControls = '', 'aria-label': ariaLabel = 'Details', rowid = '', id } = _a, props = __rest$1(_a, ["className", "isExpanded", 'aria-controls', 'aria-label', "rowid", "id"]);
|
|
9419
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$S.dataListItemControl, className) }, props),
|
|
9420
|
+
React__namespace.createElement("div", { className: css(_default$S.dataListToggle) },
|
|
9421
|
+
React__namespace.createElement(Button, { id: id, variant: exports.ButtonVariant.plain, "aria-controls": ariaControls !== '' && ariaControls, "aria-label": ariaLabel, "aria-labelledby": ariaLabel !== 'Details' ? null : `${rowid} ${id}`, "aria-expanded": isExpanded },
|
|
9422
|
+
React__namespace.createElement("div", { className: css(_default$S.dataListToggleIcon) },
|
|
9423
|
+
React__namespace.createElement(AngleRightIcon$1, null))))));
|
|
9247
9424
|
};
|
|
9248
|
-
|
|
9425
|
+
DataListToggle.displayName = 'DataListToggle';
|
|
9249
9426
|
|
|
9250
|
-
const
|
|
9251
|
-
|
|
9252
|
-
|
|
9253
|
-
|
|
9427
|
+
const DataListContent = (_a) => {
|
|
9428
|
+
var { className = '', children = null, id = '', isHidden = false, 'aria-label': ariaLabel, hasNoPadding = false,
|
|
9429
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9430
|
+
rowid = '' } = _a, props = __rest$1(_a, ["className", "children", "id", "isHidden", 'aria-label', "hasNoPadding", "rowid"]);
|
|
9431
|
+
return (React__namespace.createElement("section", Object.assign({ id: id, className: css(_default$S.dataListExpandableContent, className), hidden: isHidden, "aria-label": ariaLabel }, props),
|
|
9432
|
+
React__namespace.createElement("div", { className: css(_default$S.dataListExpandableContentBody, hasNoPadding && _default$S.modifiers.noPadding) }, children)));
|
|
9254
9433
|
};
|
|
9255
|
-
|
|
9434
|
+
DataListContent.displayName = 'DataListContent';
|
|
9256
9435
|
|
|
9257
|
-
|
|
9258
|
-
|
|
9259
|
-
|
|
9260
|
-
|
|
9261
|
-
|
|
9262
|
-
|
|
9263
|
-
|
|
9264
|
-
PopoverPosition["topStart"] = "top-start";
|
|
9265
|
-
PopoverPosition["topEnd"] = "top-end";
|
|
9266
|
-
PopoverPosition["bottomStart"] = "bottom-start";
|
|
9267
|
-
PopoverPosition["bottomEnd"] = "bottom-end";
|
|
9268
|
-
PopoverPosition["leftStart"] = "left-start";
|
|
9269
|
-
PopoverPosition["leftEnd"] = "left-end";
|
|
9270
|
-
PopoverPosition["rightStart"] = "right-start";
|
|
9271
|
-
PopoverPosition["rightEnd"] = "right-end";
|
|
9272
|
-
})(exports.PopoverPosition || (exports.PopoverPosition = {}));
|
|
9273
|
-
const alertStyle = {
|
|
9274
|
-
default: _default$Q.modifiers.default,
|
|
9275
|
-
info: _default$Q.modifiers.info,
|
|
9276
|
-
success: _default$Q.modifiers.success,
|
|
9277
|
-
warning: _default$Q.modifiers.warning,
|
|
9278
|
-
danger: _default$Q.modifiers.danger
|
|
9279
|
-
};
|
|
9280
|
-
const Popover = (_a) => {
|
|
9281
|
-
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, headerComponent = 'h6', headerIcon = null, alertSeverityVariant, alertSeverityScreenReaderText, footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
9282
|
-
// For every initial starting position, there are 3 escape positions
|
|
9283
|
-
flipBehavior = ['top', 'right', 'bottom', 'left', 'top', 'right', 'bottom'], animationDuration = 300, id, withFocusTrap: propWithFocusTrap, boundary, tippyProps, reference, hasNoPadding = false, hasAutoWidth = false } = _a, rest = __rest$1(_a, ["children", "position", "enableFlip", "className", "isVisible", "shouldClose", "shouldOpen", 'aria-label', "bodyContent", "headerContent", "headerComponent", "headerIcon", "alertSeverityVariant", "alertSeverityScreenReaderText", "footerContent", "appendTo", "hideOnOutsideClick", "onHide", "onHidden", "onShow", "onShown", "onMount", "zIndex", "minWidth", "maxWidth", "closeBtnAriaLabel", "showClose", "distance", "flipBehavior", "animationDuration", "id", "withFocusTrap", "boundary", "tippyProps", "reference", "hasNoPadding", "hasAutoWidth"]);
|
|
9284
|
-
{
|
|
9285
|
-
boundary !== undefined &&
|
|
9286
|
-
console.warn('The Popover boundary prop has been deprecated. If you want to constrain the popper to a specific element use the appendTo prop instead.');
|
|
9287
|
-
tippyProps !== undefined && console.warn('The Popover tippyProps prop has been deprecated and is no longer used.');
|
|
9288
|
-
}
|
|
9289
|
-
// could make this a prop in the future (true | false | 'toggle')
|
|
9290
|
-
// const hideOnClick = true;
|
|
9291
|
-
const uniqueId = id || getUniqueId();
|
|
9292
|
-
const triggerManually = isVisible !== null;
|
|
9293
|
-
const [visible, setVisible] = React__namespace.useState(false);
|
|
9294
|
-
const [opacity, setOpacity] = React__namespace.useState(0);
|
|
9295
|
-
const [focusTrapActive, setFocusTrapActive] = React__namespace.useState(Boolean(propWithFocusTrap));
|
|
9296
|
-
const transitionTimerRef = React__namespace.useRef(null);
|
|
9297
|
-
const showTimerRef = React__namespace.useRef(null);
|
|
9298
|
-
const hideTimerRef = React__namespace.useRef(null);
|
|
9299
|
-
React__namespace.useEffect(() => {
|
|
9300
|
-
onMount();
|
|
9301
|
-
}, []);
|
|
9302
|
-
React__namespace.useEffect(() => {
|
|
9303
|
-
if (triggerManually) {
|
|
9304
|
-
if (isVisible) {
|
|
9305
|
-
show();
|
|
9306
|
-
}
|
|
9307
|
-
else {
|
|
9308
|
-
hide();
|
|
9309
|
-
}
|
|
9310
|
-
}
|
|
9311
|
-
}, [isVisible, triggerManually]);
|
|
9312
|
-
const show = (withFocusTrap) => {
|
|
9313
|
-
onShow();
|
|
9314
|
-
if (transitionTimerRef.current) {
|
|
9315
|
-
clearTimeout(transitionTimerRef.current);
|
|
9316
|
-
}
|
|
9317
|
-
if (hideTimerRef.current) {
|
|
9318
|
-
clearTimeout(hideTimerRef.current);
|
|
9319
|
-
}
|
|
9320
|
-
showTimerRef.current = setTimeout(() => {
|
|
9321
|
-
setVisible(true);
|
|
9322
|
-
setOpacity(1);
|
|
9323
|
-
propWithFocusTrap !== false && withFocusTrap && setFocusTrapActive(true);
|
|
9324
|
-
onShown();
|
|
9325
|
-
}, 0);
|
|
9326
|
-
};
|
|
9327
|
-
const hide = () => {
|
|
9328
|
-
onHide();
|
|
9329
|
-
if (showTimerRef.current) {
|
|
9330
|
-
clearTimeout(showTimerRef.current);
|
|
9331
|
-
}
|
|
9332
|
-
hideTimerRef.current = setTimeout(() => {
|
|
9333
|
-
setVisible(false);
|
|
9334
|
-
setOpacity(0);
|
|
9335
|
-
setFocusTrapActive(false);
|
|
9336
|
-
transitionTimerRef.current = setTimeout(() => {
|
|
9337
|
-
onHidden();
|
|
9338
|
-
}, animationDuration);
|
|
9339
|
-
}, 0);
|
|
9340
|
-
};
|
|
9341
|
-
const positionModifiers = {
|
|
9342
|
-
top: _default$Q.modifiers.top,
|
|
9343
|
-
bottom: _default$Q.modifiers.bottom,
|
|
9344
|
-
left: _default$Q.modifiers.left,
|
|
9345
|
-
right: _default$Q.modifiers.right,
|
|
9346
|
-
'top-start': _default$Q.modifiers.topLeft,
|
|
9347
|
-
'top-end': _default$Q.modifiers.topRight,
|
|
9348
|
-
'bottom-start': _default$Q.modifiers.bottomLeft,
|
|
9349
|
-
'bottom-end': _default$Q.modifiers.bottomRight,
|
|
9350
|
-
'left-start': _default$Q.modifiers.leftTop,
|
|
9351
|
-
'left-end': _default$Q.modifiers.leftBottom,
|
|
9352
|
-
'right-start': _default$Q.modifiers.rightTop,
|
|
9353
|
-
'right-end': _default$Q.modifiers.rightBottom
|
|
9354
|
-
};
|
|
9355
|
-
const hasCustomMinWidth = minWidth !== popoverMinWidth.value;
|
|
9356
|
-
const hasCustomMaxWidth = maxWidth !== popoverMaxWidth.value;
|
|
9357
|
-
const onDocumentKeyDown = (event) => {
|
|
9358
|
-
if (event.keyCode === KEY_CODES.ESCAPE_KEY && visible) {
|
|
9359
|
-
if (triggerManually) {
|
|
9360
|
-
shouldClose(null, hide, event);
|
|
9361
|
-
}
|
|
9362
|
-
else {
|
|
9363
|
-
hide();
|
|
9364
|
-
}
|
|
9365
|
-
}
|
|
9366
|
-
};
|
|
9367
|
-
const onDocumentClick = (event, triggerElement, popperElement) => {
|
|
9368
|
-
if (hideOnOutsideClick && visible) {
|
|
9369
|
-
// check if we clicked within the popper, if so don't do anything
|
|
9370
|
-
const isChild = popperElement && popperElement.contains(event.target);
|
|
9371
|
-
if (isChild) {
|
|
9372
|
-
// clicked within the popper
|
|
9373
|
-
return;
|
|
9374
|
-
}
|
|
9375
|
-
if (triggerManually) {
|
|
9376
|
-
shouldClose(null, hide, event);
|
|
9377
|
-
}
|
|
9378
|
-
else {
|
|
9379
|
-
hide();
|
|
9380
|
-
}
|
|
9381
|
-
}
|
|
9382
|
-
};
|
|
9383
|
-
const onTriggerClick = (event) => {
|
|
9384
|
-
if (triggerManually) {
|
|
9385
|
-
if (visible) {
|
|
9386
|
-
shouldClose(null, hide, event);
|
|
9387
|
-
}
|
|
9388
|
-
else {
|
|
9389
|
-
shouldOpen(show, event);
|
|
9390
|
-
}
|
|
9391
|
-
}
|
|
9392
|
-
else {
|
|
9393
|
-
if (visible) {
|
|
9394
|
-
hide();
|
|
9395
|
-
}
|
|
9396
|
-
else {
|
|
9397
|
-
show(true);
|
|
9398
|
-
}
|
|
9399
|
-
}
|
|
9400
|
-
};
|
|
9401
|
-
const onContentMouseDown = () => {
|
|
9402
|
-
if (focusTrapActive) {
|
|
9403
|
-
setFocusTrapActive(false);
|
|
9404
|
-
}
|
|
9405
|
-
};
|
|
9406
|
-
const closePopover = (event) => {
|
|
9407
|
-
event.stopPropagation();
|
|
9408
|
-
if (triggerManually) {
|
|
9409
|
-
shouldClose(null, hide, event);
|
|
9436
|
+
const DataListText = (_a) => {
|
|
9437
|
+
var { children = null, className = '', component = 'span', wrapModifier = null, tooltip: tooltipProp = '', onMouseEnter: onMouseEnterProp = () => { } } = _a, props = __rest$1(_a, ["children", "className", "component", "wrapModifier", "tooltip", "onMouseEnter"]);
|
|
9438
|
+
const Component = component;
|
|
9439
|
+
const [tooltip, setTooltip] = React__namespace.useState('');
|
|
9440
|
+
const onMouseEnter = (event) => {
|
|
9441
|
+
if (event.target.offsetWidth < event.target.scrollWidth) {
|
|
9442
|
+
setTooltip(tooltipProp || event.target.innerHTML);
|
|
9410
9443
|
}
|
|
9411
9444
|
else {
|
|
9412
|
-
|
|
9445
|
+
setTooltip('');
|
|
9413
9446
|
}
|
|
9447
|
+
onMouseEnterProp(event);
|
|
9414
9448
|
};
|
|
9415
|
-
const
|
|
9416
|
-
|
|
9417
|
-
|
|
9418
|
-
|
|
9419
|
-
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9423
|
-
|
|
9424
|
-
|
|
9425
|
-
|
|
9426
|
-
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
9432
|
-
opacity,
|
|
9433
|
-
transition: getOpacityTransition(animationDuration)
|
|
9434
|
-
} }, rest),
|
|
9435
|
-
React__namespace.createElement(PopoverArrow, null),
|
|
9436
|
-
React__namespace.createElement(PopoverContent, null,
|
|
9437
|
-
showClose && React__namespace.createElement(PopoverCloseButton, { onClose: closePopover, "aria-label": closeBtnAriaLabel }),
|
|
9438
|
-
headerContent && (React__namespace.createElement(PopoverHeader, { id: `popover-${uniqueId}-header`, icon: headerIcon, alertSeverityVariant: alertSeverityVariant, alertSeverityScreenReaderText: alertSeverityScreenReaderText || `${alertSeverityVariant} alert:`, titleHeadingLevel: headerComponent }, typeof headerContent === 'function' ? headerContent(hide) : headerContent)),
|
|
9439
|
-
React__namespace.createElement(PopoverBody, { id: `popover-${uniqueId}-body` }, typeof bodyContent === 'function' ? bodyContent(hide) : bodyContent),
|
|
9440
|
-
footerContent && (React__namespace.createElement(PopoverFooter, { id: `popover-${uniqueId}-footer` }, typeof footerContent === 'function' ? footerContent(hide) : footerContent)))));
|
|
9441
|
-
return (React__namespace.createElement(PopoverContext.Provider, { value: { headerComponent } },
|
|
9442
|
-
React__namespace.createElement(Popper, { trigger: children, reference: reference, popper: content, popperMatchesTriggerWidth: false, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onTriggerClick: onTriggerClick, onDocumentClick: onDocumentClick, onDocumentKeyDown: onDocumentKeyDown, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior })));
|
|
9449
|
+
const text = (React__namespace.createElement(Component, Object.assign({ onMouseEnter: onMouseEnter, className: css(className, wrapModifier && _default$S.modifiers[wrapModifier], _default$S.dataListText) }, props), children));
|
|
9450
|
+
return tooltip !== '' ? (React__namespace.createElement(Tooltip, { content: tooltip, isVisible: true }, text)) : (text);
|
|
9451
|
+
};
|
|
9452
|
+
DataListText.displayName = 'DataListText';
|
|
9453
|
+
|
|
9454
|
+
var _default$Q = {
|
|
9455
|
+
"datePicker": "pf-c-date-picker",
|
|
9456
|
+
"datePickerCalendar": "pf-c-date-picker__calendar",
|
|
9457
|
+
"datePickerHelperText": "pf-c-date-picker__helper-text",
|
|
9458
|
+
"datePickerInput": "pf-c-date-picker__input",
|
|
9459
|
+
"formControl": "pf-c-form-control",
|
|
9460
|
+
"modifiers": {
|
|
9461
|
+
"error": "pf-m-error",
|
|
9462
|
+
"alignRight": "pf-m-align-right",
|
|
9463
|
+
"top": "pf-m-top"
|
|
9464
|
+
}
|
|
9443
9465
|
};
|
|
9444
|
-
Popover.displayName = 'Popover';
|
|
9445
9466
|
|
|
9446
9467
|
const OutlinedCalendarAltIconConfig = {
|
|
9447
9468
|
name: 'OutlinedCalendarAltIcon',
|
|
@@ -9527,7 +9548,7 @@
|
|
|
9527
9548
|
setCalendarOpen: (isOpen) => setPopoverOpen(isOpen),
|
|
9528
9549
|
toggleCalendar: () => setPopoverOpen(prev => !prev)
|
|
9529
9550
|
}), [setPopoverOpen]);
|
|
9530
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9551
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Q.datePicker, className), style: style }, props),
|
|
9531
9552
|
React__namespace.createElement(Popover, Object.assign({ position: "bottom", bodyContent: React__namespace.createElement(CalendarMonth, { date: valueDate, onChange: onDateClick, locale: locale,
|
|
9532
9553
|
// Use truthy values of strings
|
|
9533
9554
|
validators: validators.map(validator => (date) => !validator(date)), onSelectToggle: open => setSelectOpen(open), monthFormat: monthFormat, weekdayFormat: weekdayFormat, longWeekdayFormat: longWeekdayFormat, dayFormat: dayFormat, weekStart: weekStart, rangeStart: rangeStart }), showClose: false, isVisible: popoverOpen, shouldClose: (_1, _2, event) => {
|
|
@@ -9543,13 +9564,13 @@
|
|
|
9543
9564
|
setPopoverOpen(false);
|
|
9544
9565
|
return true;
|
|
9545
9566
|
}, withFocusTrap: true, hasNoPadding: true, hasAutoWidth: true, appendTo: appendTo }, popoverProps),
|
|
9546
|
-
React__namespace.createElement("div", { className: _default$
|
|
9567
|
+
React__namespace.createElement("div", { className: _default$Q.datePickerInput },
|
|
9547
9568
|
React__namespace.createElement(InputGroup, null,
|
|
9548
9569
|
React__namespace.createElement(TextInput, Object.assign({ isDisabled: isDisabled, "aria-label": ariaLabel, placeholder: placeholder, validated: errorText ? 'error' : 'default', value: value, onChange: onTextInput, onBlur: onInputBlur, onKeyPress: onKeyPress }, inputProps)),
|
|
9549
9570
|
React__namespace.createElement("button", { ref: buttonRef, className: css(_default$1k.button, _default$1k.modifiers.control), "aria-label": buttonAriaLabel, type: "button", onClick: () => setPopoverOpen(!popoverOpen), disabled: isDisabled },
|
|
9550
9571
|
React__namespace.createElement(OutlinedCalendarAltIcon$1, null))))),
|
|
9551
|
-
helperText && React__namespace.createElement("div", { className: _default$
|
|
9552
|
-
errorText.trim() && React__namespace.createElement("div", { className: css(_default$
|
|
9572
|
+
helperText && React__namespace.createElement("div", { className: _default$Q.datePickerHelperText }, helperText),
|
|
9573
|
+
errorText.trim() && React__namespace.createElement("div", { className: css(_default$Q.datePickerHelperText, _default$Q.modifiers.error) }, errorText)));
|
|
9553
9574
|
};
|
|
9554
9575
|
const DatePicker = React__namespace.forwardRef(DatePickerBase);
|
|
9555
9576
|
DatePicker.displayName = 'DatePicker';
|
|
@@ -13607,7 +13628,6 @@
|
|
|
13607
13628
|
"button": "pf-c-button",
|
|
13608
13629
|
"label": "pf-c-label",
|
|
13609
13630
|
"labelContent": "pf-c-label__content",
|
|
13610
|
-
"labelEditableText": "pf-c-label__editable-text",
|
|
13611
13631
|
"labelIcon": "pf-c-label__icon",
|
|
13612
13632
|
"labelText": "pf-c-label__text",
|
|
13613
13633
|
"modifiers": {
|
|
@@ -13719,7 +13739,6 @@
|
|
|
13719
13739
|
}
|
|
13720
13740
|
};
|
|
13721
13741
|
const LabelComponent = (isOverflowLabel ? 'button' : 'span');
|
|
13722
|
-
const Component = href ? 'a' : 'span';
|
|
13723
13742
|
const button = closeBtn ? (closeBtn) : (React__namespace.createElement(Button, Object.assign({ type: "button", variant: "plain", onClick: onClose, "aria-label": closeBtnAriaLabel || `Close ${children}` }, closeBtnProps),
|
|
13724
13743
|
React__namespace.createElement(TimesIcon$1, null)));
|
|
13725
13744
|
const textRef = React__namespace.createRef();
|
|
@@ -13729,7 +13748,7 @@
|
|
|
13729
13748
|
useIsomorphicLayoutEffect(() => {
|
|
13730
13749
|
setIsTooltipVisible(textRef.current && textRef.current.offsetWidth < textRef.current.scrollWidth);
|
|
13731
13750
|
}, []);
|
|
13732
|
-
|
|
13751
|
+
const content = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13733
13752
|
icon && React__namespace.createElement("span", { className: css(_default$F.labelIcon) }, icon),
|
|
13734
13753
|
isTruncated && (React__namespace.createElement("span", { ref: textRef, className: css(_default$F.labelText) }, children)),
|
|
13735
13754
|
!isTruncated && children));
|
|
@@ -13741,13 +13760,16 @@
|
|
|
13741
13760
|
const updateVal = () => {
|
|
13742
13761
|
setCurrValue(editableInputRef.current.value);
|
|
13743
13762
|
};
|
|
13744
|
-
|
|
13745
|
-
|
|
13763
|
+
let labelComponentChild = React__namespace.createElement("span", { className: css(_default$F.labelContent) }, content);
|
|
13764
|
+
if (href) {
|
|
13765
|
+
labelComponentChild = (React__namespace.createElement("a", { className: css(_default$F.labelContent), href: href }, content));
|
|
13766
|
+
}
|
|
13767
|
+
else if (isEditable) {
|
|
13768
|
+
labelComponentChild = (React__namespace.createElement("button", Object.assign({ ref: editableButtonRef, className: css(_default$F.labelContent), onClick: (e) => {
|
|
13746
13769
|
setIsEditableActive(true);
|
|
13747
13770
|
e.stopPropagation();
|
|
13748
|
-
} }, editableProps),
|
|
13771
|
+
} }, editableProps), content));
|
|
13749
13772
|
}
|
|
13750
|
-
let labelComponentChild = (React__namespace.createElement(Component, Object.assign({ className: css(_default$F.labelContent) }, (href && { href })), content));
|
|
13751
13773
|
if (render) {
|
|
13752
13774
|
labelComponentChild = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13753
13775
|
isTooltipVisible && React__namespace.createElement(Tooltip, { reference: componentRef, content: children, position: tooltipPosition }),
|
|
@@ -13758,13 +13780,12 @@
|
|
|
13758
13780
|
})));
|
|
13759
13781
|
}
|
|
13760
13782
|
else if (isTooltipVisible) {
|
|
13761
|
-
labelComponentChild = (React__namespace.createElement(Tooltip, { content: children, position: tooltipPosition },
|
|
13762
|
-
React__namespace.createElement(Component, Object.assign({ className: css(_default$F.labelContent) }, (href && { href })), content)));
|
|
13783
|
+
labelComponentChild = (React__namespace.createElement(Tooltip, { content: children, position: tooltipPosition }, labelComponentChild));
|
|
13763
13784
|
}
|
|
13764
13785
|
return (React__namespace.createElement(LabelComponent, Object.assign({}, props, { className: css(_default$F.label, colorStyles[color], variant === 'outline' && _default$F.modifiers.outline, isOverflowLabel && _default$F.modifiers.overflow, isCompact && _default$F.modifiers.compact, isEditable && _default$E.modifiers.editable, isEditableActive && _default$F.modifiers.editableActive, className) }),
|
|
13765
13786
|
!isEditableActive && labelComponentChild,
|
|
13766
13787
|
!isEditableActive && onClose && button,
|
|
13767
|
-
isEditableActive && (React__namespace.createElement("input", Object.assign({ className: css(_default$F.
|
|
13788
|
+
isEditableActive && (React__namespace.createElement("input", Object.assign({ className: css(_default$F.labelContent), type: "text", id: "editable-input", ref: editableInputRef, value: currValue, onChange: updateVal }, editableProps)))));
|
|
13768
13789
|
};
|
|
13769
13790
|
Label.displayName = 'Label';
|
|
13770
13791
|
|
|
@@ -15229,12 +15250,14 @@
|
|
|
15229
15250
|
"menu": "pf-c-menu",
|
|
15230
15251
|
"menuContent": "pf-c-menu__content",
|
|
15231
15252
|
"menuItem": "pf-c-menu__item",
|
|
15253
|
+
"menuItemToggleIcon": "pf-c-menu__item-toggle-icon",
|
|
15232
15254
|
"menuListItem": "pf-c-menu__list-item",
|
|
15233
15255
|
"modifiers": {
|
|
15234
15256
|
"flyout": "pf-m-flyout",
|
|
15235
15257
|
"top": "pf-m-top",
|
|
15236
15258
|
"left": "pf-m-left",
|
|
15237
15259
|
"current": "pf-m-current",
|
|
15260
|
+
"drillUp": "pf-m-drill-up",
|
|
15238
15261
|
"horizontal": "pf-m-horizontal",
|
|
15239
15262
|
"tertiary": "pf-m-tertiary",
|
|
15240
15263
|
"horizontalSubnav": "pf-m-horizontal-subnav",
|
|
@@ -15245,7 +15268,8 @@
|
|
|
15245
15268
|
"expanded": "pf-m-expanded",
|
|
15246
15269
|
"drilldown": "pf-m-drilldown",
|
|
15247
15270
|
"hover": "pf-m-hover",
|
|
15248
|
-
"start": "pf-m-start"
|
|
15271
|
+
"start": "pf-m-start",
|
|
15272
|
+
"noTitle": "pf-m-no-title"
|
|
15249
15273
|
},
|
|
15250
15274
|
"nav": "pf-c-nav",
|
|
15251
15275
|
"navItem": "pf-c-nav__item",
|
|
@@ -18483,13 +18507,13 @@
|
|
|
18483
18507
|
React__namespace.createElement(MenuContent, { maxMenuHeight: "200px" },
|
|
18484
18508
|
React__namespace.createElement(MenuList, { "aria-labelledby": `${randomId}-input` }, options.map((option, index) => (React__namespace.createElement(MenuItem, { onClick: this.onSelect, key: option, id: `${randomId}-option-${index}` }, option)))))));
|
|
18485
18509
|
const textInput = (React__namespace.createElement(TextInput, Object.assign({ className: css(_default$1b.formControl), id: `${randomId}-input`, "aria-label": ariaLabel, validated: isInvalid ? 'error' : 'default', placeholder: placeholder, value: timeState || '', type: "text", iconVariant: "clock", onClick: this.onInputFocus, onFocus: this.onInputFocus, onChange: this.onInputChange, onBlur: this.onBlur, autoComplete: "off", isDisabled: isDisabled, ref: this.inputRef }, inputProps)));
|
|
18486
|
-
return (React__namespace.createElement("div", { className: css(_default$
|
|
18487
|
-
React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
18510
|
+
return (React__namespace.createElement("div", { className: css(_default$Q.datePicker, className) },
|
|
18511
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$Q.datePickerInput), style: style }, props),
|
|
18488
18512
|
React__namespace.createElement(InputGroup, null,
|
|
18489
18513
|
React__namespace.createElement("div", { id: randomId, ref: this.parentRef },
|
|
18490
18514
|
React__namespace.createElement("div", { ref: this.toggleRef, style: { paddingLeft: '0' } }, menuAppendTo !== 'inline' ? (React__namespace.createElement(Popper, { appendTo: this.parentRef.current, trigger: textInput, popper: menuContainer, isVisible: isOpen })) : (textInput)),
|
|
18491
18515
|
isOpen && menuAppendTo === 'inline' && menuContainer)),
|
|
18492
|
-
isInvalid && (React__namespace.createElement("div", { className: css(_default$
|
|
18516
|
+
isInvalid && (React__namespace.createElement("div", { className: css(_default$Q.datePickerHelperText, _default$Q.modifiers.error) }, !isValidFormat ? invalidFormatErrorMessage : invalidMinMaxErrorMessage)))));
|
|
18493
18517
|
}
|
|
18494
18518
|
}
|
|
18495
18519
|
TimePicker.displayName = 'TimePicker';
|
|
@@ -20105,7 +20129,7 @@
|
|
|
20105
20129
|
TextInputGroup.displayName = 'TextInputGroup';
|
|
20106
20130
|
|
|
20107
20131
|
const TextInputGroupMain = (_a) => {
|
|
20108
|
-
var { children, className, icon, type = 'text', onChange = () => undefined, onFocus, onBlur, 'aria-label': ariaLabel = 'Type to filter', value: inputValue, placeholder: inputPlaceHolder } = _a, props = __rest$1(_a, ["children", "className", "icon", "type", "onChange", "onFocus", "onBlur", 'aria-label', "value", "placeholder"]);
|
|
20132
|
+
var { children, className, icon, type = 'text', hint, onChange = () => undefined, onFocus, onBlur, 'aria-label': ariaLabel = 'Type to filter', value: inputValue, placeholder: inputPlaceHolder } = _a, props = __rest$1(_a, ["children", "className", "icon", "type", "hint", "onChange", "onFocus", "onBlur", 'aria-label', "value", "placeholder"]);
|
|
20109
20133
|
const { isDisabled } = React__namespace.useContext(TextInputGroupContext);
|
|
20110
20134
|
const handleChange = (event) => {
|
|
20111
20135
|
onChange(event.currentTarget.value, event);
|
|
@@ -20113,6 +20137,7 @@
|
|
|
20113
20137
|
return (React__namespace.createElement("div", Object.assign({ className: css(_default$8.textInputGroupMain, icon && _default$8.modifiers.icon, className) }, props),
|
|
20114
20138
|
children,
|
|
20115
20139
|
React__namespace.createElement("span", { className: css(_default$8.textInputGroupText) },
|
|
20140
|
+
hint && (React__namespace.createElement("input", { className: css(_default$8.textInputGroupTextInput, _default$8.modifiers.hint), type: "text", disabled: true, "aria-hidden": "true", value: hint })),
|
|
20116
20141
|
icon && React__namespace.createElement("span", { className: css(_default$8.textInputGroupIcon) }, icon),
|
|
20117
20142
|
React__namespace.createElement("input", { type: type, className: css(_default$8.textInputGroupTextInput), "aria-label": ariaLabel, disabled: isDisabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, value: inputValue || '', placeholder: inputPlaceHolder }))));
|
|
20118
20143
|
};
|