@patternfly/quickstarts 5.0.0-prerelease.1 → 5.0.0
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/dist/index.es.js +10 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/patternfly-nested.css +66 -508
- package/dist/quickstarts-base.css +35 -35
- package/dist/quickstarts-full.es.js +266 -295
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +1 -1
- package/dist/quickstarts-standalone.min.css +2 -2
- package/dist/quickstarts.css +35 -35
- package/dist/quickstarts.min.css +1 -1
- package/package.json +10 -10
- package/src/styles/_dark-custom-override.scss +1 -1
|
@@ -35,7 +35,7 @@ function __rest$1(s, e) {
|
|
|
35
35
|
*
|
|
36
36
|
* @param {any} args list of objects, string, or arrays to reduce
|
|
37
37
|
*/
|
|
38
|
-
function css
|
|
38
|
+
function css(...args) {
|
|
39
39
|
// Adapted from https://github.com/JedWatson/classnames/blob/master/index.js
|
|
40
40
|
const classes = [];
|
|
41
41
|
const hasOwn = {}.hasOwnProperty;
|
|
@@ -45,7 +45,7 @@ function css$1(...args) {
|
|
|
45
45
|
classes.push(arg);
|
|
46
46
|
}
|
|
47
47
|
else if (Array.isArray(arg) && arg.length) {
|
|
48
|
-
const inner = css
|
|
48
|
+
const inner = css(...arg);
|
|
49
49
|
if (inner) {
|
|
50
50
|
classes.push(inner);
|
|
51
51
|
}
|
|
@@ -3733,7 +3733,7 @@ const Popper = ({ trigger, popper, direction = 'down', position = 'left', placem
|
|
|
3733
3733
|
}
|
|
3734
3734
|
return positionModifiers.top;
|
|
3735
3735
|
};
|
|
3736
|
-
const options = Object.assign({ className: css
|
|
3736
|
+
const options = Object.assign({ className: css(popper.props && popper.props.className, positionModifiers && modifierFromPopperPosition()), style: Object.assign(Object.assign(Object.assign({}, ((popper.props && popper.props.style) || {})), popperStyles.popper), { zIndex }) }, attributes.popper);
|
|
3737
3737
|
const getMenuWithPopper = () => {
|
|
3738
3738
|
const localPopper = React.cloneElement(popper, options);
|
|
3739
3739
|
return popperRef ? (localPopper) : (React.createElement("div", { style: { display: 'contents' }, ref: (node) => setPopperElement(node === null || node === void 0 ? void 0 : node.firstElementChild) }, localPopper));
|
|
@@ -4055,7 +4055,7 @@ var headingLevelSizeMap;
|
|
|
4055
4055
|
const Title = (_a) => {
|
|
4056
4056
|
var { className = '', children = '', headingLevel: HeadingLevel, size = headingLevelSizeMap[HeadingLevel], ouiaId, ouiaSafe = true } = _a, props = __rest$1(_a, ["className", "children", "headingLevel", "size", "ouiaId", "ouiaSafe"]);
|
|
4057
4057
|
const ouiaProps = useOUIAProps(Title.displayName, ouiaId, ouiaSafe);
|
|
4058
|
-
return (React.createElement(HeadingLevel, Object.assign({}, ouiaProps, props, { className: css
|
|
4058
|
+
return (React.createElement(HeadingLevel, Object.assign({}, ouiaProps, props, { className: css(styles$s.title, size && styles$s.modifiers[size], className) }), children));
|
|
4059
4059
|
};
|
|
4060
4060
|
Title.displayName = 'Title';
|
|
4061
4061
|
|
|
@@ -4115,7 +4115,7 @@ const Spinner = (_a) => {
|
|
|
4115
4115
|
var {
|
|
4116
4116
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4117
4117
|
className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', diameter, isInline = false, 'aria-label': ariaLabel, 'aria-labelledBy': ariaLabelledBy } = _a, props = __rest$1(_a, ["className", "size", 'aria-valuetext', "diameter", "isInline", 'aria-label', 'aria-labelledBy']);
|
|
4118
|
-
return (React.createElement("svg", Object.assign({ className: css
|
|
4118
|
+
return (React.createElement("svg", Object.assign({ className: css(styles$r.spinner, isInline ? styles$r.modifiers.inline : styles$r.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText, viewBox: "0 0 100 100" }, (diameter && { style: { ['--pf-v5-c-spinner--diameter']: diameter } }), (ariaLabel && { 'aria-label': ariaLabel }), (ariaLabelledBy && { 'aria-labelledBy': ariaLabelledBy }), (!ariaLabel && !ariaLabelledBy && { 'aria-label': 'Contents' }), props),
|
|
4119
4119
|
React.createElement("circle", { className: styles$r.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" })));
|
|
4120
4120
|
};
|
|
4121
4121
|
Spinner.displayName = 'Spinner';
|
|
@@ -4131,7 +4131,7 @@ var styles$q = {
|
|
|
4131
4131
|
|
|
4132
4132
|
const Badge = (_a) => {
|
|
4133
4133
|
var { isRead = false, className = '', children = '', screenReaderText } = _a, props = __rest$1(_a, ["isRead", "className", "children", "screenReaderText"]);
|
|
4134
|
-
return (React.createElement("span", Object.assign({}, props, { className: css
|
|
4134
|
+
return (React.createElement("span", Object.assign({}, props, { className: css(styles$q.badge, (isRead ? styles$q.modifiers.read : styles$q.modifiers.unread), className) }),
|
|
4135
4135
|
children,
|
|
4136
4136
|
screenReaderText && React.createElement("span", { className: "pf-v5-screen-reader" }, screenReaderText)));
|
|
4137
4137
|
};
|
|
@@ -4180,14 +4180,14 @@ const ButtonBase = (_a) => {
|
|
|
4180
4180
|
return 0;
|
|
4181
4181
|
}
|
|
4182
4182
|
};
|
|
4183
|
-
return (React.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css
|
|
4184
|
-
isLoading && (React.createElement("span", { className: css
|
|
4183
|
+
return (React.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(buttonStyles.button, buttonStyles.modifiers[variant], isBlock && buttonStyles.modifiers.block, isDisabled && buttonStyles.modifiers.disabled, isAriaDisabled && buttonStyles.modifiers.ariaDisabled, isActive && buttonStyles.modifiers.active, isInline && variant === ButtonVariant.link && buttonStyles.modifiers.inline, isDanger && (variant === ButtonVariant.secondary || variant === ButtonVariant.link) && buttonStyles.modifiers.danger, isLoading !== null && children !== null && buttonStyles.modifiers.progress, isLoading && buttonStyles.modifiers.inProgress, size === ButtonSize.sm && buttonStyles.modifiers.small, size === ButtonSize.lg && buttonStyles.modifiers.displayLg, className), disabled: isButtonElement ? isDisabled : null, tabIndex: tabIndex !== null ? tabIndex : getDefaultTabIdx(), type: isButtonElement || isInlineSpan ? type : null, role: isInlineSpan ? 'button' : null, ref: innerRef }, ouiaProps),
|
|
4184
|
+
isLoading && (React.createElement("span", { className: css(buttonStyles.buttonProgress) },
|
|
4185
4185
|
React.createElement(Spinner, { size: spinnerSize.md, isInline: isInline, "aria-valuetext": spinnerAriaValueText, "aria-label": spinnerAriaLabel, "aria-labelledby": spinnerAriaLabelledBy }))),
|
|
4186
4186
|
variant === ButtonVariant.plain && children === null && icon ? icon : null,
|
|
4187
|
-
variant !== ButtonVariant.plain && icon && iconPosition === 'left' && (React.createElement("span", { className: css
|
|
4187
|
+
variant !== ButtonVariant.plain && icon && iconPosition === 'left' && (React.createElement("span", { className: css(buttonStyles.buttonIcon, buttonStyles.modifiers.start) }, icon)),
|
|
4188
4188
|
children,
|
|
4189
|
-
variant !== ButtonVariant.plain && icon && iconPosition === 'right' && (React.createElement("span", { className: css
|
|
4190
|
-
countOptions && (React.createElement("span", { className: css
|
|
4189
|
+
variant !== ButtonVariant.plain && icon && iconPosition === 'right' && (React.createElement("span", { className: css(buttonStyles.buttonIcon, buttonStyles.modifiers.end) }, icon)),
|
|
4190
|
+
countOptions && (React.createElement("span", { className: css(buttonStyles.buttonCount, countOptions.className) },
|
|
4191
4191
|
React.createElement(Badge, { isRead: countOptions.isRead }, countOptions.count)))));
|
|
4192
4192
|
};
|
|
4193
4193
|
const Button = React.forwardRef((props, ref) => (React.createElement(ButtonBase, Object.assign({ innerRef: ref }, props))));
|
|
@@ -4535,19 +4535,19 @@ var styles$o = {
|
|
|
4535
4535
|
|
|
4536
4536
|
const Backdrop = (_a) => {
|
|
4537
4537
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
4538
|
-
return (React.createElement("div", Object.assign({}, props, { className: css
|
|
4538
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(styles$p.backdrop, className) }), children));
|
|
4539
4539
|
};
|
|
4540
4540
|
Backdrop.displayName = 'Backdrop';
|
|
4541
4541
|
|
|
4542
4542
|
const ModalBoxBody = (_a) => {
|
|
4543
4543
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
4544
|
-
return (React.createElement("div", Object.assign({}, props, { className: css
|
|
4544
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(modalStyles.modalBoxBody, className) }), children));
|
|
4545
4545
|
};
|
|
4546
4546
|
ModalBoxBody.displayName = 'ModalBoxBody';
|
|
4547
4547
|
|
|
4548
4548
|
const ModalBoxCloseButton = (_a) => {
|
|
4549
4549
|
var { className, onClose = () => undefined, ouiaId } = _a, props = __rest$1(_a, ["className", "onClose", "ouiaId"]);
|
|
4550
|
-
return (React.createElement("div", { className: css
|
|
4550
|
+
return (React.createElement("div", { className: css(modalStyles.modalBoxClose, className) },
|
|
4551
4551
|
React.createElement(Button, Object.assign({ variant: "plain", onClick: (event) => onClose(event), "aria-label": "Close" }, (ouiaId && { ouiaId: `${ouiaId}-${ModalBoxCloseButton.displayName}` }), props),
|
|
4552
4552
|
React.createElement(TimesIcon, null))));
|
|
4553
4553
|
};
|
|
@@ -4565,27 +4565,27 @@ const ModalBox = (_a) => {
|
|
|
4565
4565
|
style = style || {};
|
|
4566
4566
|
style[c_modal_box_m_align_top_spacer.name] = positionOffset;
|
|
4567
4567
|
}
|
|
4568
|
-
return (React.createElement("div", Object.assign({}, props, { role: "dialog", "aria-label": ariaLabel || null, "aria-labelledby": ariaLabelledby || null, "aria-describedby": ariaDescribedby, "aria-modal": "true", className: css
|
|
4568
|
+
return (React.createElement("div", Object.assign({}, props, { role: "dialog", "aria-label": ariaLabel || null, "aria-labelledby": ariaLabelledby || null, "aria-describedby": ariaDescribedby, "aria-modal": "true", className: css(modalStyles.modalBox, className, position === 'top' && modalStyles.modifiers.alignTop, variant === 'large' && modalStyles.modifiers.lg, variant === 'small' && modalStyles.modifiers.sm, variant === 'medium' && modalStyles.modifiers.md), style: style }), children));
|
|
4569
4569
|
};
|
|
4570
4570
|
ModalBox.displayName = 'ModalBox';
|
|
4571
4571
|
|
|
4572
4572
|
const ModalBoxFooter = (_a) => {
|
|
4573
4573
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
4574
|
-
return (React.createElement("footer", Object.assign({}, props, { className: css
|
|
4574
|
+
return (React.createElement("footer", Object.assign({}, props, { className: css(modalStyles.modalBoxFooter, className) }), children));
|
|
4575
4575
|
};
|
|
4576
4576
|
ModalBoxFooter.displayName = 'ModalBoxFooter';
|
|
4577
4577
|
|
|
4578
4578
|
const ModalBoxDescription = (_a) => {
|
|
4579
4579
|
var { children = null, className = '', id = '' } = _a, props = __rest$1(_a, ["children", "className", "id"]);
|
|
4580
|
-
return (React.createElement("div", Object.assign({}, props, { id: id, className: css
|
|
4580
|
+
return (React.createElement("div", Object.assign({}, props, { id: id, className: css(modalStyles.modalBoxDescription, className) }), children));
|
|
4581
4581
|
};
|
|
4582
4582
|
ModalBoxDescription.displayName = 'ModalBoxDescription';
|
|
4583
4583
|
|
|
4584
4584
|
const ModalBoxHeader = (_a) => {
|
|
4585
4585
|
var { children = null, className = '', help = null } = _a, props = __rest$1(_a, ["children", "className", "help"]);
|
|
4586
|
-
return (React.createElement("header", Object.assign({ className: css
|
|
4586
|
+
return (React.createElement("header", Object.assign({ className: css(modalStyles.modalBoxHeader, help && modalStyles.modifiers.help, className) }, props),
|
|
4587
4587
|
help && (React.createElement(React.Fragment, null,
|
|
4588
|
-
React.createElement("div", { className: css
|
|
4588
|
+
React.createElement("div", { className: css(modalStyles.modalBoxHeaderMain) }, children),
|
|
4589
4589
|
React.createElement("div", { className: "pf-v5-c-modal-box__header-help" }, help))),
|
|
4590
4590
|
!help && children));
|
|
4591
4591
|
};
|
|
@@ -4636,13 +4636,13 @@ var styles$n = {
|
|
|
4636
4636
|
|
|
4637
4637
|
const TooltipContent = (_a) => {
|
|
4638
4638
|
var { className, children, isLeftAligned } = _a, props = __rest$1(_a, ["className", "children", "isLeftAligned"]);
|
|
4639
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
4639
|
+
return (React.createElement("div", Object.assign({ className: css(styles$n.tooltipContent, isLeftAligned && styles$n.modifiers.textAlignLeft, className) }, props), children));
|
|
4640
4640
|
};
|
|
4641
4641
|
TooltipContent.displayName = 'TooltipContent';
|
|
4642
4642
|
|
|
4643
4643
|
const TooltipArrow = (_a) => {
|
|
4644
4644
|
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
4645
|
-
return React.createElement("div", Object.assign({ className: css
|
|
4645
|
+
return React.createElement("div", Object.assign({ className: css(styles$n.tooltipArrow, className) }, props));
|
|
4646
4646
|
};
|
|
4647
4647
|
TooltipArrow.displayName = 'TooltipArrow';
|
|
4648
4648
|
|
|
@@ -4766,7 +4766,7 @@ const Tooltip = (_a) => {
|
|
|
4766
4766
|
'right-end': styles$n.modifiers.rightBottom
|
|
4767
4767
|
};
|
|
4768
4768
|
const hasCustomMaxWidth = maxWidth !== c_tooltip_MaxWidth.value;
|
|
4769
|
-
const content = (React.createElement("div", Object.assign({ "aria-live": ariaLive, className: css
|
|
4769
|
+
const content = (React.createElement("div", Object.assign({ "aria-live": ariaLive, className: css(styles$n.tooltip, className), role: "tooltip", id: id, style: {
|
|
4770
4770
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
4771
4771
|
opacity,
|
|
4772
4772
|
transition: getOpacityTransition(animationDuration)
|
|
@@ -4871,10 +4871,10 @@ const ModalBoxTitle = (_a) => {
|
|
|
4871
4871
|
useIsomorphicLayoutEffect(() => {
|
|
4872
4872
|
setHasTooltip(h1.current && h1.current.offsetWidth < h1.current.scrollWidth);
|
|
4873
4873
|
}, []);
|
|
4874
|
-
const content = (React.createElement("h1", Object.assign({ id: id, ref: h1, className: css
|
|
4875
|
-
titleIconVariant && (React.createElement("span", { className: css
|
|
4876
|
-
label && React.createElement("span", { className: css
|
|
4877
|
-
React.createElement("span", { className: css
|
|
4874
|
+
const content = (React.createElement("h1", Object.assign({ id: id, ref: h1, className: css(modalStyles.modalBoxTitle, titleIconVariant && modalStyles.modifiers.icon, className) }, props),
|
|
4875
|
+
titleIconVariant && (React.createElement("span", { className: css(modalStyles.modalBoxTitleIcon) }, isVariantIcon(titleIconVariant) ? variantIcons[titleIconVariant] : React.createElement(CustomIcon, null))),
|
|
4876
|
+
label && React.createElement("span", { className: css(a11yStyles.screenReader) }, label),
|
|
4877
|
+
React.createElement("span", { className: css(modalStyles.modalBoxTitleText) }, title)));
|
|
4878
4878
|
return hasTooltip ? React.createElement(Tooltip, { content: title }, content) : content;
|
|
4879
4879
|
};
|
|
4880
4880
|
ModalBoxTitle.displayName = 'ModalBoxTitle';
|
|
@@ -4907,13 +4907,13 @@ const ModalContent = (_a) => {
|
|
|
4907
4907
|
}
|
|
4908
4908
|
return idRefList.join(' ');
|
|
4909
4909
|
};
|
|
4910
|
-
const modalBox = (React.createElement(ModalBox, Object.assign({ id: boxId, style: boxStyle, className: css
|
|
4910
|
+
const modalBox = (React.createElement(ModalBox, Object.assign({ id: boxId, style: boxStyle, className: css(className, isVariantIcon(titleIconVariant) && modalStyles.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)),
|
|
4911
4911
|
showClose && React.createElement(ModalBoxCloseButton, { onClose: (event) => onClose(event), ouiaId: ouiaId }),
|
|
4912
4912
|
modalBoxHeader,
|
|
4913
4913
|
modalBody,
|
|
4914
4914
|
modalBoxFooter));
|
|
4915
4915
|
return (React.createElement(Backdrop, null,
|
|
4916
|
-
React.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true, tabbableOptions: { displayCheck: 'none' } }, className: css
|
|
4916
|
+
React.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true, tabbableOptions: { displayCheck: 'none' } }, className: css(styles$o.bullseye) }, modalBox)));
|
|
4917
4917
|
};
|
|
4918
4918
|
ModalContent.displayName = 'ModalContent';
|
|
4919
4919
|
|
|
@@ -4973,10 +4973,10 @@ class Modal$1 extends React.Component {
|
|
|
4973
4973
|
target.appendChild(container);
|
|
4974
4974
|
target.addEventListener('keydown', this.handleEscKeyClick, false);
|
|
4975
4975
|
if (this.props.isOpen) {
|
|
4976
|
-
target.classList.add(css
|
|
4976
|
+
target.classList.add(css(styles$p.backdropOpen));
|
|
4977
4977
|
}
|
|
4978
4978
|
else {
|
|
4979
|
-
target.classList.remove(css
|
|
4979
|
+
target.classList.remove(css(styles$p.backdropOpen));
|
|
4980
4980
|
}
|
|
4981
4981
|
if (this.isEmpty(title) && this.isEmpty(ariaLabel) && this.isEmpty(ariaLabelledby)) {
|
|
4982
4982
|
// eslint-disable-next-line no-console
|
|
@@ -4991,11 +4991,11 @@ class Modal$1 extends React.Component {
|
|
|
4991
4991
|
const { appendTo } = this.props;
|
|
4992
4992
|
const target = this.getElement(appendTo);
|
|
4993
4993
|
if (this.props.isOpen) {
|
|
4994
|
-
target.classList.add(css
|
|
4994
|
+
target.classList.add(css(styles$p.backdropOpen));
|
|
4995
4995
|
this.toggleSiblingsFromScreenReaders(true);
|
|
4996
4996
|
}
|
|
4997
4997
|
else {
|
|
4998
|
-
target.classList.remove(css
|
|
4998
|
+
target.classList.remove(css(styles$p.backdropOpen));
|
|
4999
4999
|
this.toggleSiblingsFromScreenReaders(false);
|
|
5000
5000
|
}
|
|
5001
5001
|
}
|
|
@@ -5006,7 +5006,7 @@ class Modal$1 extends React.Component {
|
|
|
5006
5006
|
target.removeChild(this.state.container);
|
|
5007
5007
|
}
|
|
5008
5008
|
target.removeEventListener('keydown', this.handleEscKeyClick, false);
|
|
5009
|
-
target.classList.remove(css
|
|
5009
|
+
target.classList.remove(css(styles$p.backdropOpen));
|
|
5010
5010
|
}
|
|
5011
5011
|
render() {
|
|
5012
5012
|
const _a = this.props, {
|
|
@@ -5064,7 +5064,7 @@ const AccordionContext = React.createContext({});
|
|
|
5064
5064
|
const Accordion = (_a) => {
|
|
5065
5065
|
var { children = null, className = '', 'aria-label': ariaLabel, headingLevel = 'h3', asDefinitionList = true, isBordered = false, displaySize = 'default' } = _a, props = __rest$1(_a, ["children", "className", 'aria-label', "headingLevel", "asDefinitionList", "isBordered", "displaySize"]);
|
|
5066
5066
|
const AccordionList = asDefinitionList ? 'dl' : 'div';
|
|
5067
|
-
return (React.createElement(AccordionList, Object.assign({ className: css
|
|
5067
|
+
return (React.createElement(AccordionList, Object.assign({ className: css(styles$m.accordion, isBordered && styles$m.modifiers.bordered, displaySize === 'lg' && styles$m.modifiers.displayLg, className), "aria-label": ariaLabel }, (!asDefinitionList && ariaLabel && { role: 'region' }), props),
|
|
5068
5068
|
React.createElement(AccordionContext.Provider, { value: {
|
|
5069
5069
|
ContentContainer: asDefinitionList ? 'dd' : 'div',
|
|
5070
5070
|
ToggleContainer: asDefinitionList ? 'dt' : headingLevel
|
|
@@ -5072,7 +5072,7 @@ const Accordion = (_a) => {
|
|
|
5072
5072
|
};
|
|
5073
5073
|
Accordion.displayName = 'Accordion';
|
|
5074
5074
|
|
|
5075
|
-
const AccordionExpandableContentBody = ({ children = null }) => React.createElement("div", { className: css
|
|
5075
|
+
const AccordionExpandableContentBody = ({ children = null }) => React.createElement("div", { className: css(styles$m.accordionExpandableContentBody) }, children);
|
|
5076
5076
|
AccordionExpandableContentBody.displayName = 'AccordionExpandableContentBody';
|
|
5077
5077
|
|
|
5078
5078
|
const AccordionContent = (_a) => {
|
|
@@ -5090,7 +5090,7 @@ const AccordionContent = (_a) => {
|
|
|
5090
5090
|
}, [containerRef, isFixed, isHidden]);
|
|
5091
5091
|
return (React.createElement(AccordionContext.Consumer, null, ({ ContentContainer }) => {
|
|
5092
5092
|
const Container = component || ContentContainer;
|
|
5093
|
-
return (React.createElement(Container, Object.assign({ ref: containerRef, id: id, className: css
|
|
5093
|
+
return (React.createElement(Container, Object.assign({ ref: containerRef, id: id, className: css(styles$m.accordionExpandableContent, isFixed && styles$m.modifiers.fixed, !isHidden && styles$m.modifiers.expanded, className), hidden: isHidden }, (ariaLabel && { 'aria-label': ariaLabel }), (ariaLabelledby && { 'aria-labelledby': ariaLabelledby }), (hasScrollbar && { tabIndex: 0 }), (hasScrollbar && Container === 'div' && { role: 'region' }), props), isCustomContent ? children : React.createElement(AccordionExpandableContentBody, null, children)));
|
|
5094
5094
|
}));
|
|
5095
5095
|
};
|
|
5096
5096
|
AccordionContent.displayName = 'AccordionContent';
|
|
@@ -5114,9 +5114,9 @@ const AccordionToggle = (_a) => {
|
|
|
5114
5114
|
return (React.createElement(AccordionContext.Consumer, null, ({ ToggleContainer }) => {
|
|
5115
5115
|
const Container = component || ToggleContainer;
|
|
5116
5116
|
return (React.createElement(Container, null,
|
|
5117
|
-
React.createElement("button", Object.assign({ id: id, className: css
|
|
5118
|
-
React.createElement("span", { className: css
|
|
5119
|
-
React.createElement("span", { className: css
|
|
5117
|
+
React.createElement("button", Object.assign({ id: id, className: css(styles$m.accordionToggle, isExpanded && styles$m.modifiers.expanded, className), "aria-expanded": isExpanded, type: "button" }, props),
|
|
5118
|
+
React.createElement("span", { className: css(styles$m.accordionToggleText) }, children),
|
|
5119
|
+
React.createElement("span", { className: css(styles$m.accordionToggleIcon) },
|
|
5120
5120
|
React.createElement(AngleRightIcon, null)))));
|
|
5121
5121
|
}));
|
|
5122
5122
|
};
|
|
@@ -5157,7 +5157,7 @@ const variantIcons = {
|
|
|
5157
5157
|
const AlertIcon = (_a) => {
|
|
5158
5158
|
var { variant, customIcon, className = '' } = _a, props = __rest$1(_a, ["variant", "customIcon", "className"]);
|
|
5159
5159
|
const Icon = variantIcons[variant];
|
|
5160
|
-
return Icon ? (React.createElement("div", Object.assign({}, props, { className: css
|
|
5160
|
+
return Icon ? (React.createElement("div", Object.assign({}, props, { className: css(styles$l.alertIcon, className) }), customIcon || React.createElement(Icon, null))) : null;
|
|
5161
5161
|
};
|
|
5162
5162
|
|
|
5163
5163
|
const AlertContext = React.createContext(null);
|
|
@@ -5172,7 +5172,7 @@ const AlertToggleExpandButton = (_a) => {
|
|
|
5172
5172
|
var { 'aria-label': ariaLabel = '', variantLabel, onToggleExpand, isExpanded = false } = _a, props = __rest$1(_a, ['aria-label', "variantLabel", "onToggleExpand", "isExpanded"]);
|
|
5173
5173
|
const { title, variantLabel: alertVariantLabel } = React.useContext(AlertContext);
|
|
5174
5174
|
return (React.createElement(Button, Object.assign({ variant: ButtonVariant.plain, onClick: onToggleExpand, "aria-expanded": isExpanded, "aria-label": ariaLabel === '' ? `Toggle ${variantLabel || alertVariantLabel} alert: ${title}` : ariaLabel }, props),
|
|
5175
|
-
React.createElement("span", { className: css
|
|
5175
|
+
React.createElement("span", { className: css(styles$l.alertToggleIcon) },
|
|
5176
5176
|
React.createElement(AngleRightIcon, { "aria-hidden": "true" }))));
|
|
5177
5177
|
};
|
|
5178
5178
|
AlertToggleExpandButton.displayName = 'AlertToggleExpandButton';
|
|
@@ -5189,7 +5189,7 @@ const Alert = (_a) => {
|
|
|
5189
5189
|
var { variant = AlertVariant.custom, isInline = false, isPlain = false, isLiveRegion = false, variantLabel = `${capitalize(variant)} alert:`, actionClose, actionLinks, title, component = 'h4', children = '', className = '', ouiaId, ouiaSafe = true, timeout = false, timeoutAnimation = 3000, onTimeout = () => { }, truncateTitle = 0, tooltipPosition, customIcon, isExpandable = false, toggleAriaLabel = `${capitalize(variant)} alert details`, onMouseEnter = () => { }, onMouseLeave = () => { }, id } = _a, props = __rest$1(_a, ["variant", "isInline", "isPlain", "isLiveRegion", "variantLabel", "actionClose", "actionLinks", "title", "component", "children", "className", "ouiaId", "ouiaSafe", "timeout", "timeoutAnimation", "onTimeout", "truncateTitle", "tooltipPosition", "customIcon", "isExpandable", "toggleAriaLabel", "onMouseEnter", "onMouseLeave", "id"]);
|
|
5190
5190
|
const ouiaProps = useOUIAProps(Alert.displayName, ouiaId, ouiaSafe, variant);
|
|
5191
5191
|
const getHeadingContent = (React.createElement(React.Fragment, null,
|
|
5192
|
-
React.createElement("span", { className: css
|
|
5192
|
+
React.createElement("span", { className: css(a11yStyles.screenReader) }, variantLabel),
|
|
5193
5193
|
title));
|
|
5194
5194
|
const titleRef = React.useRef(null);
|
|
5195
5195
|
const TitleComponent = component;
|
|
@@ -5257,20 +5257,20 @@ const Alert = (_a) => {
|
|
|
5257
5257
|
if (dismissed) {
|
|
5258
5258
|
return null;
|
|
5259
5259
|
}
|
|
5260
|
-
const Title = (React.createElement(TitleComponent, Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css
|
|
5261
|
-
return (React.createElement("div", Object.assign({ ref: divRef, className: css
|
|
5260
|
+
const Title = (React.createElement(TitleComponent, Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css(styles$l.alertTitle, truncateTitle && styles$l.modifiers.truncate) }), getHeadingContent));
|
|
5261
|
+
return (React.createElement("div", Object.assign({ ref: divRef, className: css(styles$l.alert, isInline && styles$l.modifiers.inline, isPlain && styles$l.modifiers.plain, isExpandable && styles$l.modifiers.expandable, isExpanded && styles$l.modifiers.expanded, styles$l.modifiers[variant], className) }, ouiaProps, (isLiveRegion && {
|
|
5262
5262
|
'aria-live': 'polite',
|
|
5263
5263
|
'aria-atomic': 'false'
|
|
5264
5264
|
}), { onMouseEnter: myOnMouseEnter, onMouseLeave: myOnMouseLeave, id: id }, props),
|
|
5265
5265
|
isExpandable && (React.createElement(AlertContext.Provider, { value: { title, variantLabel } },
|
|
5266
|
-
React.createElement("div", { className: css
|
|
5266
|
+
React.createElement("div", { className: css(styles$l.alertToggle) },
|
|
5267
5267
|
React.createElement(AlertToggleExpandButton, { isExpanded: isExpanded, onToggleExpand: onToggleExpand, "aria-label": toggleAriaLabel })))),
|
|
5268
5268
|
React.createElement(AlertIcon, { variant: variant, customIcon: customIcon }),
|
|
5269
5269
|
isTooltipVisible ? (React.createElement(Tooltip, { content: getHeadingContent, position: tooltipPosition }, Title)) : (Title),
|
|
5270
5270
|
actionClose && (React.createElement(AlertContext.Provider, { value: { title, variantLabel } },
|
|
5271
|
-
React.createElement("div", { className: css
|
|
5272
|
-
children && (!isExpandable || (isExpandable && isExpanded)) && (React.createElement("div", { className: css
|
|
5273
|
-
actionLinks && React.createElement("div", { className: css
|
|
5271
|
+
React.createElement("div", { className: css(styles$l.alertAction) }, actionClose))),
|
|
5272
|
+
children && (!isExpandable || (isExpandable && isExpanded)) && (React.createElement("div", { className: css(styles$l.alertDescription) }, children)),
|
|
5273
|
+
actionLinks && React.createElement("div", { className: css(styles$l.alertActionGroup) }, actionLinks)));
|
|
5274
5274
|
};
|
|
5275
5275
|
Alert.displayName = 'Alert';
|
|
5276
5276
|
|
|
@@ -5316,7 +5316,7 @@ const statusIcons = {
|
|
|
5316
5316
|
const FormControlIcon = (_a) => {
|
|
5317
5317
|
var { status, customIcon, className } = _a, props = __rest$1(_a, ["status", "customIcon", "className"]);
|
|
5318
5318
|
const StatusIcon = status && statusIcons[status];
|
|
5319
|
-
return (React.createElement("
|
|
5319
|
+
return (React.createElement("span", Object.assign({ className: css(formStyles$1.formControlIcon, status && formStyles$1.modifiers.status, className) }, props), customIcon || React.createElement(StatusIcon, null)));
|
|
5320
5320
|
};
|
|
5321
5321
|
|
|
5322
5322
|
var TextInputTypes;
|
|
@@ -5401,9 +5401,9 @@ class TextInputBase extends React.Component {
|
|
|
5401
5401
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
5402
5402
|
onChange, onFocus, onBlur, isLeftTruncated, isExpanded, readOnly, readOnlyVariant, isRequired, isDisabled, customIcon, ouiaId, ouiaSafe } = _a, props = __rest$1(_a, ["innerRef", "className", "type", "value", "placeholder", "validated", "onChange", "onFocus", "onBlur", "isLeftTruncated", "isExpanded", "readOnly", "readOnlyVariant", "isRequired", "isDisabled", "customIcon", "ouiaId", "ouiaSafe"]);
|
|
5403
5403
|
const hasStatusIcon = ['success', 'error', 'warning'].includes(validated);
|
|
5404
|
-
return (React.createElement("
|
|
5404
|
+
return (React.createElement("span", { className: css(formStyles$1.formControl, readOnlyVariant && formStyles$1.modifiers.readonly, readOnlyVariant === 'plain' && formStyles$1.modifiers.plain, isDisabled && formStyles$1.modifiers.disabled, isExpanded && formStyles$1.modifiers.expanded, customIcon && formStyles$1.modifiers.icon, hasStatusIcon && formStyles$1.modifiers[validated], className) },
|
|
5405
5405
|
React.createElement("input", Object.assign({}, props, { onFocus: this.onFocus, onBlur: this.onBlur, onChange: this.handleChange, type: type, value: this.sanitizeInputValue(value), "aria-invalid": props['aria-invalid'] ? props['aria-invalid'] : validated === ValidatedOptions.error, required: isRequired, disabled: isDisabled, readOnly: !!readOnlyVariant || readOnly, ref: innerRef || this.inputRef, placeholder: placeholder }, getOUIAProps(TextInput.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))),
|
|
5406
|
-
(customIcon || hasStatusIcon) && (React.createElement("
|
|
5406
|
+
(customIcon || hasStatusIcon) && (React.createElement("span", { className: css(formStyles$1.formControlUtilities) },
|
|
5407
5407
|
customIcon && React.createElement(FormControlIcon, { customIcon: customIcon }),
|
|
5408
5408
|
hasStatusIcon && React.createElement(FormControlIcon, { status: validated })))));
|
|
5409
5409
|
}
|
|
@@ -5471,6 +5471,7 @@ var menuStyles = {
|
|
|
5471
5471
|
"nav": "pf-m-nav",
|
|
5472
5472
|
"focus": "pf-m-focus",
|
|
5473
5473
|
"disabled": "pf-m-disabled",
|
|
5474
|
+
"ariaDisabled": "pf-m-aria-disabled",
|
|
5474
5475
|
"load": "pf-m-load",
|
|
5475
5476
|
"loading": "pf-m-loading",
|
|
5476
5477
|
"danger": "pf-m-danger",
|
|
@@ -5651,15 +5652,17 @@ class MenuBase extends React.Component {
|
|
|
5651
5652
|
document.activeElement.parentElement === element ||
|
|
5652
5653
|
document.activeElement.closest(`.${menuStyles.menuSearch}`) === element || // if element is a MenuSearch
|
|
5653
5654
|
(document.activeElement.closest('ol') && document.activeElement.closest('ol').firstChild === element), getFocusableElement: (navigableElement) => {
|
|
5654
|
-
var _a;
|
|
5655
|
+
var _a, _b;
|
|
5655
5656
|
return ((navigableElement === null || navigableElement === void 0 ? void 0 : navigableElement.tagName) === 'DIV' && navigableElement.querySelector('input')) || // for MenuSearchInput
|
|
5656
5657
|
(((_a = navigableElement.firstChild) === null || _a === void 0 ? void 0 : _a.tagName) === 'LABEL' &&
|
|
5657
5658
|
navigableElement.querySelector('input')) || // for MenuItem checkboxes
|
|
5659
|
+
(((_b = navigableElement.firstChild) === null || _b === void 0 ? void 0 : _b.tagName) === 'DIV' &&
|
|
5660
|
+
navigableElement.querySelector('a, button, input')) || // For aria-disabled element that is rendered inside a div with "display: contents" styling
|
|
5658
5661
|
navigableElement.firstChild;
|
|
5659
5662
|
}, noHorizontalArrowHandling: document.activeElement &&
|
|
5660
5663
|
(document.activeElement.classList.contains('pf-v5-c-breadcrumb__link') ||
|
|
5661
5664
|
document.activeElement.classList.contains('pf-v5-c-dropdown__toggle')), noEnterHandling: true, noSpaceHandling: true })),
|
|
5662
|
-
React.createElement("div", Object.assign({ id: id, className: css
|
|
5665
|
+
React.createElement("div", Object.assign({ id: id, className: css(menuStyles.menu, isPlain && menuStyles.modifiers.plain, isScrollable && menuStyles.modifiers.scrollable, containsFlyout && menuStyles.modifiers.flyout, isNavFlyout && menuStyles.modifiers.nav, containsDrilldown && menuStyles.modifiers.drilldown, _isMenuDrilledIn && menuStyles.modifiers.drilledIn, className), ref: this.menuRef }, getOUIAProps(Menu.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props), children)));
|
|
5663
5666
|
}
|
|
5664
5667
|
}
|
|
5665
5668
|
MenuBase.displayName = 'Menu';
|
|
@@ -5701,29 +5704,10 @@ const MenuContent = React.forwardRef((props, ref) => {
|
|
|
5701
5704
|
}
|
|
5702
5705
|
return ref || menuContentRef;
|
|
5703
5706
|
};
|
|
5704
|
-
return (React.createElement(MenuContext.Consumer, null, ({ menuId, onGetMenuHeight }) => (React.createElement("div", Object.assign({}, rest, { className: css
|
|
5707
|
+
return (React.createElement(MenuContext.Consumer, null, ({ menuId, onGetMenuHeight }) => (React.createElement("div", Object.assign({}, rest, { className: css(menuStyles.menuContent, props.className), ref: (el) => refCallback(el, menuId, onGetMenuHeight), style: Object.assign(Object.assign({}, (menuHeight && { '--pf-v5-c-menu__content--Height': menuHeight })), (maxMenuHeight && { '--pf-v5-c-menu__content--MaxHeight': maxMenuHeight })) }), children))));
|
|
5705
5708
|
});
|
|
5706
5709
|
MenuContent.displayName = 'MenuContent';
|
|
5707
5710
|
|
|
5708
|
-
const MenuSearch = React.forwardRef((props, ref) => (React.createElement("div", Object.assign({}, props, { className: css$1(menuStyles.menuSearch, props.className), ref: ref }))));
|
|
5709
|
-
MenuSearch.displayName = 'MenuSearch';
|
|
5710
|
-
|
|
5711
|
-
const MenuSearchInput = React.forwardRef((props, ref) => (
|
|
5712
|
-
// Update to use the styles object when core adds the class
|
|
5713
|
-
React.createElement("div", Object.assign({}, props, { className: css$1('pf-v5-c-menu__search-input', props.className), ref: ref }))));
|
|
5714
|
-
MenuSearchInput.displayName = 'MenuSearchInput';
|
|
5715
|
-
|
|
5716
|
-
const MenuGroupBase = (_a) => {
|
|
5717
|
-
var { children, className = '', label = '', titleId, innerRef, labelHeadingLevel: HeadingLevel = 'h1' } = _a, props = __rest$1(_a, ["children", "className", "label", "titleId", "innerRef", "labelHeadingLevel"]);
|
|
5718
|
-
const Wrapper = typeof label === 'function' ? label : HeadingLevel;
|
|
5719
|
-
return (React.createElement("section", Object.assign({}, props, { className: css$1(menuStyles.menuGroup, className), ref: innerRef }),
|
|
5720
|
-
React.createElement(React.Fragment, null,
|
|
5721
|
-
['function', 'string'].includes(typeof label) ? (React.createElement(Wrapper, { className: css$1(menuStyles.menuGroupTitle), id: titleId }, label)) : (label),
|
|
5722
|
-
children)));
|
|
5723
|
-
};
|
|
5724
|
-
const MenuGroup = React.forwardRef((props, ref) => (React.createElement(MenuGroupBase, Object.assign({}, props, { innerRef: ref }))));
|
|
5725
|
-
MenuGroup.displayName = 'MenuGroup';
|
|
5726
|
-
|
|
5727
5711
|
const c_menu_m_flyout__menu_top_offset = {
|
|
5728
5712
|
"name": "--pf-v5-c-menu--m-flyout__menu--top-offset",
|
|
5729
5713
|
"value": "0px",
|
|
@@ -5817,13 +5801,13 @@ class Checkbox extends React.Component {
|
|
|
5817
5801
|
checkedProps.defaultChecked = defaultChecked;
|
|
5818
5802
|
}
|
|
5819
5803
|
checkedProps.checked = checkedProps.checked === null ? false : checkedProps.checked;
|
|
5820
|
-
return (React.createElement(Component, { className: css
|
|
5821
|
-
React.createElement("input", Object.assign({}, props, { className: css
|
|
5822
|
-
label && (React.createElement("label", { className: css
|
|
5804
|
+
return (React.createElement(Component, { className: css(styles$k.check, !label && styles$k.modifiers.standalone, className) },
|
|
5805
|
+
React.createElement("input", Object.assign({}, props, { className: css(styles$k.checkInput, inputClassName), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, required: isRequired, ref: (elem) => elem && (elem.indeterminate = isChecked === null) }, checkedProps, getOUIAProps(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))),
|
|
5806
|
+
label && (React.createElement("label", { className: css(styles$k.checkLabel, isDisabled && styles$k.modifiers.disabled), htmlFor: props.id },
|
|
5823
5807
|
label,
|
|
5824
|
-
isRequired && (React.createElement("span", { className: css
|
|
5825
|
-
description && React.createElement("span", { className: css
|
|
5826
|
-
body && React.createElement("span", { className: css
|
|
5808
|
+
isRequired && (React.createElement("span", { className: css(styles$k.checkLabelRequired), "aria-hidden": "true" }, ASTERISK)))),
|
|
5809
|
+
description && React.createElement("span", { className: css(styles$k.checkDescription) }, description),
|
|
5810
|
+
body && React.createElement("span", { className: css(styles$k.checkBody) }, body)));
|
|
5827
5811
|
}
|
|
5828
5812
|
}
|
|
5829
5813
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -5858,8 +5842,8 @@ const MenuItemActionBase = (_a) => {
|
|
|
5858
5842
|
// event specified on the Menu
|
|
5859
5843
|
onActionClick && onActionClick(event, itemId, actionId);
|
|
5860
5844
|
};
|
|
5861
|
-
return (React.createElement("button", Object.assign({ className: css
|
|
5862
|
-
React.createElement("span", { className: css
|
|
5845
|
+
return (React.createElement("button", Object.assign({ className: css(menuStyles.menuItemAction, isFavorited !== null && menuStyles.modifiers.favorite, isFavorited && menuStyles.modifiers.favorited, className), "aria-label": ariaLabel, onClick: onClickButton }, ((isDisabled === true || isDisabledContext === true) && { disabled: true }), { ref: innerRef, tabIndex: -1 }, props),
|
|
5846
|
+
React.createElement("span", { className: css(menuStyles.menuItemActionIcon) }, icon === 'favorites' || isFavorited !== null ? React.createElement(StarIcon, { "aria-hidden": true }) : icon)));
|
|
5863
5847
|
}))));
|
|
5864
5848
|
};
|
|
5865
5849
|
const MenuItemAction = React.forwardRef((props, ref) => (React.createElement(MenuItemActionBase, Object.assign({}, props, { innerRef: ref }))));
|
|
@@ -5869,7 +5853,7 @@ const FlyoutContext = React.createContext({
|
|
|
5869
5853
|
direction: 'right'
|
|
5870
5854
|
});
|
|
5871
5855
|
const MenuItemBase = (_a) => {
|
|
5872
|
-
var { children, className, itemId = null, to, hasCheckbox = false, isActive = null, isFavorited = null, isLoadButton = false, isLoading = false, flyoutMenu, direction, description = null, onClick = () => { }, component = 'button', isDisabled = false, isExternalLink = false, isSelected = null, isFocused, isDanger = false, icon, actions, onShowFlyout, drilldownMenu, isOnPath, innerRef, id, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["children", "className", "itemId", "to", "hasCheckbox", "isActive", "isFavorited", "isLoadButton", "isLoading", "flyoutMenu", "direction", "description", "onClick", "component", "isDisabled", "isExternalLink", "isSelected", "isFocused", "isDanger", "icon", "actions", "onShowFlyout", "drilldownMenu", "isOnPath", "innerRef", "id", 'aria-label']);
|
|
5856
|
+
var { children, className, itemId = null, to, hasCheckbox = false, isActive = null, isFavorited = null, isLoadButton = false, isLoading = false, flyoutMenu, direction, description = null, onClick = () => { }, component = 'button', isDisabled = false, isAriaDisabled = false, isExternalLink = false, isSelected = null, isFocused, isDanger = false, icon, actions, onShowFlyout, drilldownMenu, isOnPath, innerRef, id, 'aria-label': ariaLabel, tooltipProps } = _a, props = __rest$1(_a, ["children", "className", "itemId", "to", "hasCheckbox", "isActive", "isFavorited", "isLoadButton", "isLoading", "flyoutMenu", "direction", "description", "onClick", "component", "isDisabled", "isAriaDisabled", "isExternalLink", "isSelected", "isFocused", "isDanger", "icon", "actions", "onShowFlyout", "drilldownMenu", "isOnPath", "innerRef", "id", 'aria-label', "tooltipProps"]);
|
|
5873
5857
|
const { menuId, parentMenu, onSelect, onActionClick, activeItemId, selected, drilldownItemPath, onDrillIn, onDrillOut, flyoutRef, setFlyoutRef, disableHover, role: menuRole } = React.useContext(MenuContext);
|
|
5874
5858
|
let Component = (to ? 'a' : component);
|
|
5875
5859
|
if (hasCheckbox && !to) {
|
|
@@ -5964,10 +5948,12 @@ const MenuItemBase = (_a) => {
|
|
|
5964
5948
|
}
|
|
5965
5949
|
};
|
|
5966
5950
|
const onItemSelect = (event, onSelect) => {
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5951
|
+
if (!isAriaDisabled) {
|
|
5952
|
+
// Trigger callback for Menu onSelect
|
|
5953
|
+
onSelect && onSelect(event, itemId);
|
|
5954
|
+
// Trigger callback for item onClick
|
|
5955
|
+
onClick && onClick(event);
|
|
5956
|
+
}
|
|
5971
5957
|
};
|
|
5972
5958
|
const _isOnPath = (isOnPath && isOnPath) || (drilldownItemPath && drilldownItemPath.includes(itemId)) || false;
|
|
5973
5959
|
let drill;
|
|
@@ -5986,7 +5972,7 @@ const MenuItemBase = (_a) => {
|
|
|
5986
5972
|
if (Component === 'a') {
|
|
5987
5973
|
additionalProps = {
|
|
5988
5974
|
href: to,
|
|
5989
|
-
'aria-disabled': isDisabled ? true : null,
|
|
5975
|
+
'aria-disabled': isDisabled || isAriaDisabled ? true : null,
|
|
5990
5976
|
// prevent invalid 'disabled' attribute on <a> tags
|
|
5991
5977
|
disabled: null,
|
|
5992
5978
|
target: isExternalLink ? '_blank' : null
|
|
@@ -5994,7 +5980,8 @@ const MenuItemBase = (_a) => {
|
|
|
5994
5980
|
}
|
|
5995
5981
|
else if (Component === 'button') {
|
|
5996
5982
|
additionalProps = {
|
|
5997
|
-
type: 'button'
|
|
5983
|
+
type: 'button',
|
|
5984
|
+
'aria-disabled': isAriaDisabled ? true : null
|
|
5998
5985
|
};
|
|
5999
5986
|
}
|
|
6000
5987
|
if (isOnPath) {
|
|
@@ -6039,28 +6026,33 @@ const MenuItemBase = (_a) => {
|
|
|
6039
6026
|
}
|
|
6040
6027
|
};
|
|
6041
6028
|
const isSelectMenu = menuRole === 'listbox';
|
|
6042
|
-
|
|
6043
|
-
React.createElement(GenerateId, null, (randomId) => (React.createElement(Component, Object.assign({ id: id, tabIndex: -1, className: css
|
|
6029
|
+
const renderItem = (React.createElement(React.Fragment, null,
|
|
6030
|
+
React.createElement(GenerateId, null, (randomId) => (React.createElement(Component, Object.assign({ id: id, tabIndex: -1, className: css(menuStyles.menuItem, getIsSelected() && !hasCheckbox && menuStyles.modifiers.selected, className), "aria-current": getAriaCurrent() }, (!hasCheckbox && { disabled: isDisabled, 'aria-label': ariaLabel }), (!hasCheckbox && !flyoutMenu && { role: isSelectMenu ? 'option' : 'menuitem' }), (!hasCheckbox && !flyoutMenu && isSelectMenu && { 'aria-selected': getIsSelected() }), { ref: innerRef }, (!hasCheckbox && {
|
|
6044
6031
|
onClick: (event) => {
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6032
|
+
if (!isAriaDisabled) {
|
|
6033
|
+
onItemSelect(event, onSelect);
|
|
6034
|
+
drill && drill(event);
|
|
6035
|
+
flyoutMenu && handleFlyout(event);
|
|
6036
|
+
}
|
|
6037
|
+
else {
|
|
6038
|
+
event.preventDefault();
|
|
6039
|
+
}
|
|
6048
6040
|
}
|
|
6049
6041
|
}), (hasCheckbox && { htmlFor: randomId }), additionalProps),
|
|
6050
|
-
React.createElement("span", { className: css
|
|
6051
|
-
direction === 'up' && (React.createElement("span", { className: css
|
|
6042
|
+
React.createElement("span", { className: css(menuStyles.menuItemMain) },
|
|
6043
|
+
direction === 'up' && (React.createElement("span", { className: css(menuStyles.menuItemToggleIcon) },
|
|
6052
6044
|
React.createElement(AngleLeftIcon, { "aria-hidden": true }))),
|
|
6053
|
-
icon && React.createElement("span", { className: css
|
|
6054
|
-
hasCheckbox && (React.createElement("span", { className: css
|
|
6055
|
-
React.createElement(Checkbox, { id: randomId, component: "span", isChecked: isSelected || false, onChange: (event) => onItemSelect(event, onSelect), isDisabled: isDisabled }))),
|
|
6056
|
-
React.createElement("span", { className: css
|
|
6057
|
-
isExternalLink && (React.createElement("span", { className: css
|
|
6045
|
+
icon && React.createElement("span", { className: css(menuStyles.menuItemIcon) }, icon),
|
|
6046
|
+
hasCheckbox && (React.createElement("span", { className: css(menuStyles.menuItemCheck) },
|
|
6047
|
+
React.createElement(Checkbox, { id: randomId, component: "span", isChecked: isSelected || false, onChange: (event) => onItemSelect(event, onSelect), isDisabled: isDisabled, "aria-disabled": isAriaDisabled }))),
|
|
6048
|
+
React.createElement("span", { className: css(menuStyles.menuItemText) }, children),
|
|
6049
|
+
isExternalLink && (React.createElement("span", { className: css(menuStyles.menuItemExternalIcon) },
|
|
6058
6050
|
React.createElement(ExternalLinkAltIcon$1, { "aria-hidden": true }))),
|
|
6059
|
-
(flyoutMenu || direction === 'down') && (React.createElement("span", { className: css
|
|
6051
|
+
(flyoutMenu || direction === 'down') && (React.createElement("span", { className: css(menuStyles.menuItemToggleIcon) },
|
|
6060
6052
|
React.createElement(AngleRightIcon, { "aria-hidden": true }))),
|
|
6061
|
-
getIsSelected() && (React.createElement("span", { className: css
|
|
6053
|
+
getIsSelected() && (React.createElement("span", { className: css(menuStyles.menuItemSelectIcon) },
|
|
6062
6054
|
React.createElement(CheckIcon, { "aria-hidden": true })))),
|
|
6063
|
-
description && direction !== 'up' && (React.createElement("span", { className: css
|
|
6055
|
+
description && direction !== 'up' && (React.createElement("span", { className: css(menuStyles.menuItemDescription) },
|
|
6064
6056
|
React.createElement("span", null, description)))))),
|
|
6065
6057
|
flyoutVisible && (React.createElement(MenuContext.Provider, { value: { disableHover } },
|
|
6066
6058
|
React.createElement(FlyoutContext.Provider, { value: { direction: flyoutXDirection } }, flyoutMenu))),
|
|
@@ -6068,6 +6060,11 @@ const MenuItemBase = (_a) => {
|
|
|
6068
6060
|
React.createElement(MenuItemContext.Provider, { value: { itemId, isDisabled } },
|
|
6069
6061
|
actions,
|
|
6070
6062
|
isFavorited !== null && (React.createElement(MenuItemAction, { icon: "favorites", isFavorited: isFavorited, "aria-label": isFavorited ? 'starred' : 'not starred', onClick: (event) => onActionClick(event, itemId), tabIndex: -1, actionId: "fav" })))));
|
|
6063
|
+
return (React.createElement("li", Object.assign({ className: css(menuStyles.menuListItem, isDisabled && menuStyles.modifiers.disabled, isAriaDisabled && menuStyles.modifiers.ariaDisabled, _isOnPath && menuStyles.modifiers.currentPath, isLoadButton && menuStyles.modifiers.load, isLoading && menuStyles.modifiers.loading, isFocused && menuStyles.modifiers.focus, isDanger && menuStyles.modifiers.danger, className), onMouseOver: () => {
|
|
6064
|
+
if (!isAriaDisabled) {
|
|
6065
|
+
onMouseOver();
|
|
6066
|
+
}
|
|
6067
|
+
} }, (flyoutMenu && !isAriaDisabled && { onKeyDown: handleFlyout }), { ref: ref, role: !hasCheckbox ? 'none' : 'menuitem' }, (hasCheckbox && { 'aria-label': ariaLabel }), props), tooltipProps ? (React.createElement(Tooltip, Object.assign({}, tooltipProps), renderItem)) : (renderItem)));
|
|
6071
6068
|
};
|
|
6072
6069
|
const MenuItem = React.forwardRef((props, ref) => (React.createElement(MenuItemBase, Object.assign({}, props, { innerRef: ref }))));
|
|
6073
6070
|
MenuItem.displayName = 'MenuItem';
|
|
@@ -6075,7 +6072,7 @@ MenuItem.displayName = 'MenuItem';
|
|
|
6075
6072
|
const MenuList = (_a) => {
|
|
6076
6073
|
var { children = null, className, isAriaMultiselectable = false, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["children", "className", "isAriaMultiselectable", 'aria-label']);
|
|
6077
6074
|
const { role } = React.useContext(MenuContext);
|
|
6078
|
-
return (React.createElement("ul", Object.assign({ role: role }, (role === 'listbox' && { 'aria-multiselectable': isAriaMultiselectable }), { className: css
|
|
6075
|
+
return (React.createElement("ul", Object.assign({ role: role }, (role === 'listbox' && { 'aria-multiselectable': isAriaMultiselectable }), { className: css(menuStyles.menuList, className), "aria-label": ariaLabel }, props), children));
|
|
6079
6076
|
};
|
|
6080
6077
|
MenuList.displayName = 'MenuList';
|
|
6081
6078
|
|
|
@@ -6125,7 +6122,7 @@ const SelectBase = (_a) => {
|
|
|
6125
6122
|
window.removeEventListener('click', handleClick);
|
|
6126
6123
|
};
|
|
6127
6124
|
}, [isOpen, menuRef, toggleRef, onOpenChange, onOpenChangeKeys]);
|
|
6128
|
-
const menu = (React__default.createElement(Menu, Object.assign({ role: role, className: css
|
|
6125
|
+
const menu = (React__default.createElement(Menu, Object.assign({ role: role, className: css(className), ref: menuRef, onSelect: (event, value) => {
|
|
6129
6126
|
onSelect && onSelect(event, value);
|
|
6130
6127
|
shouldFocusToggleOnSelect && toggleRef.current.focus();
|
|
6131
6128
|
}, isPlain: isPlain, selected: selected }, getOUIAProps(Select.displayName, props.ouiaId !== undefined ? props.ouiaId : getDefaultOUIAId(Select.displayName), props.ouiaSafe !== undefined ? props.ouiaSafe : true), props),
|
|
@@ -6137,19 +6134,20 @@ Select.displayName = 'Select';
|
|
|
6137
6134
|
|
|
6138
6135
|
const SelectList = (_a) => {
|
|
6139
6136
|
var { children, className, isAriaMultiselectable = false } = _a, props = __rest$1(_a, ["children", "className", "isAriaMultiselectable"]);
|
|
6140
|
-
return (React__default.createElement(MenuList, Object.assign({ isAriaMultiselectable: isAriaMultiselectable, className: css
|
|
6137
|
+
return (React__default.createElement(MenuList, Object.assign({ isAriaMultiselectable: isAriaMultiselectable, className: css(className) }, props), children));
|
|
6141
6138
|
};
|
|
6142
6139
|
SelectList.displayName = 'SelectList';
|
|
6143
6140
|
|
|
6144
6141
|
const SelectOptionBase = (_a) => {
|
|
6145
6142
|
var { children, className, innerRef, value } = _a, props = __rest$1(_a, ["children", "className", "innerRef", "value"]);
|
|
6146
|
-
return (React__default.createElement(MenuItem, Object.assign({ itemId: value, ref: innerRef, className: css
|
|
6143
|
+
return (React__default.createElement(MenuItem, Object.assign({ itemId: value, ref: innerRef, className: css(className) }, props), children));
|
|
6147
6144
|
};
|
|
6148
6145
|
const SelectOption = React__default.forwardRef((props, ref) => (React__default.createElement(SelectOptionBase, Object.assign({}, props, { innerRef: ref }))));
|
|
6149
6146
|
SelectOption.displayName = 'SelectOption';
|
|
6150
6147
|
|
|
6151
6148
|
var styles$j = {
|
|
6152
6149
|
"check": "pf-v5-c-check",
|
|
6150
|
+
"checkInput": "pf-v5-c-check__input",
|
|
6153
6151
|
"menuToggle": "pf-v5-c-menu-toggle",
|
|
6154
6152
|
"menuToggleButton": "pf-v5-c-menu-toggle__button",
|
|
6155
6153
|
"menuToggleControls": "pf-v5-c-menu-toggle__controls",
|
|
@@ -6196,25 +6194,25 @@ class MenuToggleBase extends React.Component {
|
|
|
6196
6194
|
const isPlain = variant === 'plain';
|
|
6197
6195
|
const isPlainText = variant === 'plainText';
|
|
6198
6196
|
const isTypeahead = variant === 'typeahead';
|
|
6199
|
-
const toggleControls = (React.createElement("span", { className: css
|
|
6200
|
-
React.createElement("span", { className: css
|
|
6197
|
+
const toggleControls = (React.createElement("span", { className: css(styles$j.menuToggleControls) },
|
|
6198
|
+
React.createElement("span", { className: css(styles$j.menuToggleToggleIcon) },
|
|
6201
6199
|
React.createElement(CaretDownIcon, { "aria-hidden": true }))));
|
|
6202
6200
|
const content = (React.createElement(React.Fragment, null,
|
|
6203
|
-
icon && React.createElement("span", { className: css
|
|
6204
|
-
isTypeahead ? children : React.createElement("span", { className: css
|
|
6205
|
-
React.isValidElement(badge) && React.createElement("span", { className: css
|
|
6206
|
-
isTypeahead ? (React.createElement("button", { type: "button", className: css
|
|
6207
|
-
const commonStyles = css
|
|
6201
|
+
icon && React.createElement("span", { className: css(styles$j.menuToggleIcon) }, icon),
|
|
6202
|
+
isTypeahead ? children : React.createElement("span", { className: css(styles$j.menuToggleText) }, children),
|
|
6203
|
+
React.isValidElement(badge) && React.createElement("span", { className: css(styles$j.menuToggleCount) }, badge),
|
|
6204
|
+
isTypeahead ? (React.createElement("button", { type: "button", className: css(styles$j.menuToggleButton), "aria-expanded": isExpanded, onClick: onClick, "aria-label": "Menu toggle" }, toggleControls)) : (toggleControls)));
|
|
6205
|
+
const commonStyles = css(styles$j.menuToggle, isExpanded && styles$j.modifiers.expanded, variant === 'primary' && styles$j.modifiers.primary, variant === 'secondary' && styles$j.modifiers.secondary, (isPlain || isPlainText) && styles$j.modifiers.plain, isPlainText && styles$j.modifiers.text, isFullHeight && styles$j.modifiers.fullHeight, isFullWidth && styles$j.modifiers.fullWidth, isDisabled && styles$j.modifiers.disabled, className);
|
|
6208
6206
|
const componentProps = Object.assign(Object.assign({ children: isPlain ? children : content }, (isDisabled && { disabled: true })), otherProps);
|
|
6209
6207
|
if (isTypeahead) {
|
|
6210
|
-
return (React.createElement("div", Object.assign({ ref: innerRef, className: css
|
|
6208
|
+
return (React.createElement("div", Object.assign({ ref: innerRef, className: css(commonStyles, styles$j.modifiers.typeahead) }, componentProps)));
|
|
6211
6209
|
}
|
|
6212
6210
|
if (splitButtonOptions) {
|
|
6213
|
-
return (React.createElement("div", { ref: innerRef, className: css
|
|
6211
|
+
return (React.createElement("div", { ref: innerRef, className: css(commonStyles, styles$j.modifiers.splitButton, (splitButtonOptions === null || splitButtonOptions === void 0 ? void 0 : splitButtonOptions.variant) === 'action' && styles$j.modifiers.action) }, splitButtonOptions === null || splitButtonOptions === void 0 ? void 0 :
|
|
6214
6212
|
splitButtonOptions.items,
|
|
6215
|
-
React.createElement("button", Object.assign({ className: css
|
|
6213
|
+
React.createElement("button", Object.assign({ className: css(styles$j.menuToggleButton), type: "button", "aria-expanded": isExpanded, "aria-label": ariaLabel, disabled: isDisabled, onClick: onClick }, otherProps), toggleControls)));
|
|
6216
6214
|
}
|
|
6217
|
-
return (React.createElement("button", Object.assign({ className: css
|
|
6215
|
+
return (React.createElement("button", Object.assign({ className: css(commonStyles), type: "button", "aria-label": ariaLabel, "aria-expanded": isExpanded, ref: innerRef, disabled: isDisabled, onClick: onClick }, componentProps)));
|
|
6218
6216
|
}
|
|
6219
6217
|
}
|
|
6220
6218
|
MenuToggleBase.defaultProps = {
|
|
@@ -6260,11 +6258,11 @@ class FormSelect extends React.Component {
|
|
|
6260
6258
|
const selectedOption = React.Children.toArray(children).find((option) => option.props.value === value);
|
|
6261
6259
|
const isSelectedPlaceholder = selectedOption && selectedOption.props.isPlaceholder;
|
|
6262
6260
|
const hasStatusIcon = ['success', 'error', 'warning'].includes(validated);
|
|
6263
|
-
return (React.createElement("
|
|
6261
|
+
return (React.createElement("span", { className: css(formStyles$1.formControl, isDisabled && formStyles$1.modifiers.disabled, isSelectedPlaceholder && formStyles$1.modifiers.placeholder, hasStatusIcon && formStyles$1.modifiers[validated], className) },
|
|
6264
6262
|
React.createElement("select", Object.assign({}, props, { "aria-invalid": validated === ValidatedOptions.error }, getOUIAProps(FormSelect.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { onChange: this.handleChange, disabled: isDisabled, required: isRequired, value: value }), children),
|
|
6265
|
-
React.createElement("
|
|
6263
|
+
React.createElement("span", { className: css(formStyles$1.formControlUtilities) },
|
|
6266
6264
|
hasStatusIcon && React.createElement(FormControlIcon, { status: validated }),
|
|
6267
|
-
React.createElement("
|
|
6265
|
+
React.createElement("span", { className: css(formStyles$1.formControlToggleIcon) },
|
|
6268
6266
|
React.createElement(CaretDownIcon, null)))));
|
|
6269
6267
|
}
|
|
6270
6268
|
}
|
|
@@ -6338,9 +6336,9 @@ class TextAreaBase extends React.Component {
|
|
|
6338
6336
|
props = __rest$1(_a, ["className", "value", "validated", "isRequired", "isDisabled", "readOnlyVariant", "resizeOrientation", "innerRef", "disabled", "autoResize", "onChange"]);
|
|
6339
6337
|
const orientation = `resize${capitalize(resizeOrientation)}`;
|
|
6340
6338
|
const hasStatusIcon = ['success', 'error', 'warning'].includes(validated);
|
|
6341
|
-
return (React.createElement("
|
|
6339
|
+
return (React.createElement("span", { className: css(formStyles$1.formControl, readOnlyVariant && formStyles$1.modifiers.readonly, readOnlyVariant === 'plain' && formStyles$1.modifiers.plain, resizeOrientation && formStyles$1.modifiers[orientation], isDisabled && formStyles$1.modifiers.disabled, hasStatusIcon && formStyles$1.modifiers[validated], className) },
|
|
6342
6340
|
React.createElement("textarea", Object.assign({ onChange: this.handleChange }, (typeof this.props.defaultValue !== 'string' && { value }), { "aria-invalid": validated === ValidatedOptions.error, required: isRequired, disabled: isDisabled || disabled, readOnly: !!readOnlyVariant, ref: innerRef || this.inputRef }, props)),
|
|
6343
|
-
hasStatusIcon && (React.createElement("
|
|
6341
|
+
hasStatusIcon && (React.createElement("span", { className: css(formStyles$1.formControlUtilities) },
|
|
6344
6342
|
React.createElement(FormControlIcon, { status: validated })))));
|
|
6345
6343
|
}
|
|
6346
6344
|
}
|
|
@@ -6408,14 +6406,14 @@ const InputGroupBase = (_a) => {
|
|
|
6408
6406
|
'aria-describedby': child.props['aria-describedby'] === '' ? undefined : (_a = idItem === null || idItem === void 0 ? void 0 : idItem.props) === null || _a === void 0 ? void 0 : _a.id
|
|
6409
6407
|
});
|
|
6410
6408
|
});
|
|
6411
|
-
return (React.createElement("div", Object.assign({ ref: inputGroupRef, className: css
|
|
6409
|
+
return (React.createElement("div", Object.assign({ ref: inputGroupRef, className: css(styles$i.inputGroup, className) }, props), idItem ? childrenWithId : children));
|
|
6412
6410
|
};
|
|
6413
6411
|
const InputGroup = React.forwardRef((props, ref) => (React.createElement(InputGroupBase, Object.assign({ innerRef: ref }, props))));
|
|
6414
6412
|
InputGroup.displayName = 'InputGroup';
|
|
6415
6413
|
|
|
6416
6414
|
const InputGroupItem = (_a) => {
|
|
6417
6415
|
var { className, children, isFill = false, isBox = false, isPlain, isDisabled } = _a, props = __rest$1(_a, ["className", "children", "isFill", "isBox", "isPlain", "isDisabled"]);
|
|
6418
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6416
|
+
return (React.createElement("div", Object.assign({ className: css(styles$i.inputGroupItem, isFill && styles$i.modifiers.fill, isBox && styles$i.modifiers.box, isPlain && styles$i.modifiers.plain, isDisabled && styles$i.modifiers.disabled, className) }, props), children));
|
|
6419
6417
|
};
|
|
6420
6418
|
InputGroupItem.displayName = 'InputGroupItem';
|
|
6421
6419
|
|
|
@@ -6483,19 +6481,19 @@ const Card = (_a) => {
|
|
|
6483
6481
|
}
|
|
6484
6482
|
const getSelectableModifiers = () => {
|
|
6485
6483
|
if (isDisabledRaised) {
|
|
6486
|
-
return css
|
|
6484
|
+
return css(styles$h.modifiers.nonSelectableRaised);
|
|
6487
6485
|
}
|
|
6488
6486
|
if (isSelectableRaised) {
|
|
6489
|
-
return css
|
|
6487
|
+
return css(styles$h.modifiers.selectableRaised, isSelected && styles$h.modifiers.selectedRaised);
|
|
6490
6488
|
}
|
|
6491
6489
|
if (isSelectable && isClickable) {
|
|
6492
|
-
return css
|
|
6490
|
+
return css(styles$h.modifiers.selectable, styles$h.modifiers.clickable, isSelected && styles$h.modifiers.current);
|
|
6493
6491
|
}
|
|
6494
6492
|
if (isSelectable) {
|
|
6495
|
-
return css
|
|
6493
|
+
return css(styles$h.modifiers.selectable, isSelected && styles$h.modifiers.selected);
|
|
6496
6494
|
}
|
|
6497
6495
|
if (isClickable) {
|
|
6498
|
-
return css
|
|
6496
|
+
return css(styles$h.modifiers.clickable, isSelected && styles$h.modifiers.selected);
|
|
6499
6497
|
}
|
|
6500
6498
|
return '';
|
|
6501
6499
|
};
|
|
@@ -6526,21 +6524,21 @@ const Card = (_a) => {
|
|
|
6526
6524
|
isDisabled
|
|
6527
6525
|
} },
|
|
6528
6526
|
hasSelectableInput && (React.createElement("input", Object.assign({ className: "pf-v5-screen-reader", id: `${id}-input` }, ariaProps, { type: "checkbox", checked: isSelected, onChange: (event) => onSelectableInputChange(event, id), disabled: isDisabledRaised, tabIndex: -1 }))),
|
|
6529
|
-
React.createElement(Component, Object.assign({ id: id, className: css
|
|
6527
|
+
React.createElement(Component, Object.assign({ id: id, className: css(styles$h.card, isCompact && styles$h.modifiers.compact, isExpanded && styles$h.modifiers.expanded, isFlat && styles$h.modifiers.flat, isRounded && styles$h.modifiers.rounded, isLarge && styles$h.modifiers.displayLg, isFullHeight && styles$h.modifiers.fullHeight, isPlain && styles$h.modifiers.plain, getSelectableModifiers(), isDisabled && styles$h.modifiers.disabled, className), tabIndex: isSelectableRaised ? '0' : undefined }, props, ouiaProps), children)));
|
|
6530
6528
|
};
|
|
6531
6529
|
Card.displayName = 'Card';
|
|
6532
6530
|
|
|
6533
6531
|
const CardBody = (_a) => {
|
|
6534
6532
|
var { children, className, component = 'div', isFilled = true } = _a, props = __rest$1(_a, ["children", "className", "component", "isFilled"]);
|
|
6535
6533
|
const Component = component;
|
|
6536
|
-
return (React.createElement(Component, Object.assign({ className: css
|
|
6534
|
+
return (React.createElement(Component, Object.assign({ className: css(styles$h.cardBody, !isFilled && styles$h.modifiers.noFill, className) }, props), children));
|
|
6537
6535
|
};
|
|
6538
6536
|
CardBody.displayName = 'CardBody';
|
|
6539
6537
|
|
|
6540
6538
|
const CardFooter = (_a) => {
|
|
6541
6539
|
var { children, className, component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
6542
6540
|
const Component = component;
|
|
6543
|
-
return (React.createElement(Component, Object.assign({ className: css
|
|
6541
|
+
return (React.createElement(Component, Object.assign({ className: css(styles$h.cardFooter, className) }, props), children));
|
|
6544
6542
|
};
|
|
6545
6543
|
CardFooter.displayName = 'CardFooter';
|
|
6546
6544
|
|
|
@@ -6553,26 +6551,26 @@ const CardTitle = (_a) => {
|
|
|
6553
6551
|
registerTitleId(titleId);
|
|
6554
6552
|
return () => registerTitleId('');
|
|
6555
6553
|
}, [registerTitleId, titleId]);
|
|
6556
|
-
return (React.createElement("div", { className: css
|
|
6557
|
-
React.createElement(Component, Object.assign({ className: css
|
|
6554
|
+
return (React.createElement("div", { className: css(styles$h.cardTitle) },
|
|
6555
|
+
React.createElement(Component, Object.assign({ className: css(styles$h.cardTitleText, className), id: titleId || undefined }, props), children)));
|
|
6558
6556
|
};
|
|
6559
6557
|
CardTitle.displayName = 'CardTitle';
|
|
6560
6558
|
|
|
6561
6559
|
const CardHeaderMain = (_a) => {
|
|
6562
6560
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
6563
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6561
|
+
return (React.createElement("div", Object.assign({ className: css(styles$h.cardHeaderMain, className) }, props), children));
|
|
6564
6562
|
};
|
|
6565
6563
|
CardHeaderMain.displayName = 'CardHeaderMain';
|
|
6566
6564
|
|
|
6567
6565
|
const CardActions = (_a) => {
|
|
6568
6566
|
var { children, className, hasNoOffset = false } = _a, props = __rest$1(_a, ["children", "className", "hasNoOffset"]);
|
|
6569
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6567
|
+
return (React.createElement("div", Object.assign({ className: css(styles$h.cardActions, hasNoOffset && styles$h.modifiers.noOffset, className) }, props), children));
|
|
6570
6568
|
};
|
|
6571
6569
|
CardActions.displayName = 'CardActions';
|
|
6572
6570
|
|
|
6573
6571
|
const CardSelectableActions = (_a) => {
|
|
6574
6572
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
6575
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6573
|
+
return (React.createElement("div", Object.assign({ className: css(styles$h.cardSelectableActions, className) }, props), children));
|
|
6576
6574
|
};
|
|
6577
6575
|
CardSelectableActions.displayName = 'CardSelectableActions';
|
|
6578
6576
|
|
|
@@ -6610,16 +6608,16 @@ class Radio extends React.Component {
|
|
|
6610
6608
|
// eslint-disable-next-line no-console
|
|
6611
6609
|
console.error('Radio:', 'id is required to make input accessible');
|
|
6612
6610
|
}
|
|
6613
|
-
const inputRendered = (React.createElement("input", Object.assign({}, props, { className: css
|
|
6611
|
+
const inputRendered = (React.createElement("input", Object.assign({}, props, { className: css(styles$g.radioInput, inputClassName), type: "radio", onChange: this.handleChange, "aria-invalid": !isValid, disabled: isDisabled, checked: checked || isChecked }, (checked === undefined && { defaultChecked }), (!label && { 'aria-label': ariaLabel }), getOUIAProps(Radio.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))));
|
|
6614
6612
|
let labelRendered = null;
|
|
6615
6613
|
if (label && isLabelWrapped) {
|
|
6616
|
-
labelRendered = React.createElement("span", { className: css
|
|
6614
|
+
labelRendered = React.createElement("span", { className: css(styles$g.radioLabel, isDisabled && styles$g.modifiers.disabled) }, label);
|
|
6617
6615
|
}
|
|
6618
6616
|
else if (label) {
|
|
6619
|
-
labelRendered = (React.createElement("label", { className: css
|
|
6617
|
+
labelRendered = (React.createElement("label", { className: css(styles$g.radioLabel, isDisabled && styles$g.modifiers.disabled), htmlFor: props.id }, label));
|
|
6620
6618
|
}
|
|
6621
|
-
const descRender = description ? React.createElement("span", { className: css
|
|
6622
|
-
const bodyRender = body ? React.createElement("span", { className: css
|
|
6619
|
+
const descRender = description ? React.createElement("span", { className: css(styles$g.radioDescription) }, description) : null;
|
|
6620
|
+
const bodyRender = body ? React.createElement("span", { className: css(styles$g.radioBody) }, body) : null;
|
|
6623
6621
|
const childrenRendered = isLabelBeforeButton ? (React.createElement(React.Fragment, null,
|
|
6624
6622
|
labelRendered,
|
|
6625
6623
|
inputRendered,
|
|
@@ -6629,7 +6627,7 @@ class Radio extends React.Component {
|
|
|
6629
6627
|
labelRendered,
|
|
6630
6628
|
descRender,
|
|
6631
6629
|
bodyRender));
|
|
6632
|
-
return isLabelWrapped ? (React.createElement("label", { className: css
|
|
6630
|
+
return isLabelWrapped ? (React.createElement("label", { className: css(styles$g.radio, className), htmlFor: props.id }, childrenRendered)) : (React.createElement("div", { className: css(styles$g.radio, !label && styles$g.modifiers.standalone, className) }, childrenRendered));
|
|
6633
6631
|
}
|
|
6634
6632
|
}
|
|
6635
6633
|
Radio.displayName = 'Radio';
|
|
@@ -6643,11 +6641,11 @@ Radio.defaultProps = {
|
|
|
6643
6641
|
const CardHeader = (_a) => {
|
|
6644
6642
|
var { children, className, actions, selectableActions, id, onExpand, toggleButtonProps, isToggleRightAligned } = _a, props = __rest$1(_a, ["children", "className", "actions", "selectableActions", "id", "onExpand", "toggleButtonProps", "isToggleRightAligned"]);
|
|
6645
6643
|
return (React.createElement(CardContext.Consumer, null, ({ cardId, isClickable, isSelectable, isDisabled: isCardDisabled }) => {
|
|
6646
|
-
const cardHeaderToggle = (React.createElement("div", { className: css
|
|
6644
|
+
const cardHeaderToggle = (React.createElement("div", { className: css(styles$h.cardHeaderToggle) },
|
|
6647
6645
|
React.createElement(Button, Object.assign({ variant: "plain", type: "button", onClick: (evt) => {
|
|
6648
6646
|
onExpand(evt, cardId);
|
|
6649
6647
|
} }, toggleButtonProps),
|
|
6650
|
-
React.createElement("span", { className: css
|
|
6648
|
+
React.createElement("span", { className: css(styles$h.cardHeaderToggleIcon) },
|
|
6651
6649
|
React.createElement(AngleRightIcon, { "aria-hidden": "true" })))));
|
|
6652
6650
|
if ((actions === null || actions === void 0 ? void 0 : actions.actions) && !(isClickable && isSelectable)) {
|
|
6653
6651
|
// eslint-disable-next-line no-console
|
|
@@ -6682,7 +6680,7 @@ const CardHeader = (_a) => {
|
|
|
6682
6680
|
}
|
|
6683
6681
|
return baseProps;
|
|
6684
6682
|
};
|
|
6685
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6683
|
+
return (React.createElement("div", Object.assign({ className: css(styles$h.cardHeader, isToggleRightAligned && styles$h.modifiers.toggleRight, className), id: id }, props),
|
|
6686
6684
|
onExpand && !isToggleRightAligned && cardHeaderToggle,
|
|
6687
6685
|
(actions || (selectableActions && (isClickable || isSelectable))) && (React.createElement(CardActions, { className: actions === null || actions === void 0 ? void 0 : actions.className, hasNoOffset: (actions === null || actions === void 0 ? void 0 : actions.hasNoOffset) || (selectableActions === null || selectableActions === void 0 ? void 0 : selectableActions.hasNoOffset) }, actions === null || actions === void 0 ? void 0 :
|
|
6688
6686
|
actions.actions,
|
|
@@ -6715,10 +6713,10 @@ var styles$f = {
|
|
|
6715
6713
|
|
|
6716
6714
|
const CodeBlock = (_a) => {
|
|
6717
6715
|
var { children = null, className, actions = null } = _a, props = __rest$1(_a, ["children", "className", "actions"]);
|
|
6718
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6719
|
-
actions && (React.createElement("div", { className: css
|
|
6720
|
-
React.createElement("div", { className: css
|
|
6721
|
-
React.createElement("div", { className: css
|
|
6716
|
+
return (React.createElement("div", Object.assign({ className: css(styles$f.codeBlock, className) }, props),
|
|
6717
|
+
actions && (React.createElement("div", { className: css(styles$f.codeBlockHeader) },
|
|
6718
|
+
React.createElement("div", { className: css(styles$f.codeBlockActions) }, actions))),
|
|
6719
|
+
React.createElement("div", { className: css(styles$f.codeBlockContent) }, children)));
|
|
6722
6720
|
};
|
|
6723
6721
|
CodeBlock.displayName = 'CodeBlock';
|
|
6724
6722
|
|
|
@@ -6761,33 +6759,33 @@ const PopoverContext = React.createContext({});
|
|
|
6761
6759
|
|
|
6762
6760
|
const PopoverContent = (_a) => {
|
|
6763
6761
|
var { className = null, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
6764
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6762
|
+
return (React.createElement("div", Object.assign({ className: css(styles$e.popoverContent, className) }, props), children));
|
|
6765
6763
|
};
|
|
6766
6764
|
PopoverContent.displayName = 'PopoverContent';
|
|
6767
6765
|
|
|
6768
6766
|
const PopoverBody = (_a) => {
|
|
6769
6767
|
var { children, id, className } = _a, props = __rest$1(_a, ["children", "id", "className"]);
|
|
6770
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
6768
|
+
return (React.createElement("div", Object.assign({ className: css(styles$e.popoverBody, className), id: id }, props), children));
|
|
6771
6769
|
};
|
|
6772
6770
|
PopoverBody.displayName = 'PopoverBody';
|
|
6773
6771
|
|
|
6774
6772
|
const PopoverHeaderIcon = (_a) => {
|
|
6775
6773
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
6776
|
-
return (React.createElement("span", Object.assign({ className: css
|
|
6774
|
+
return (React.createElement("span", Object.assign({ className: css(styles$e.popoverTitleIcon, className) }, props), children));
|
|
6777
6775
|
};
|
|
6778
6776
|
PopoverHeaderIcon.displayName = 'PopoverHeaderIcon';
|
|
6779
6777
|
|
|
6780
6778
|
const PopoverHeaderText = (_a) => {
|
|
6781
6779
|
var { children, className, headingLevel } = _a, props = __rest$1(_a, ["children", "className", "headingLevel"]);
|
|
6782
6780
|
const HeadingLevel = headingLevel;
|
|
6783
|
-
return (React.createElement(HeadingLevel, Object.assign({ className: css
|
|
6781
|
+
return (React.createElement(HeadingLevel, Object.assign({ className: css(styles$e.popoverTitleText, className) }, props), children));
|
|
6784
6782
|
};
|
|
6785
6783
|
PopoverHeaderText.displayName = 'PopoverHeaderText';
|
|
6786
6784
|
|
|
6787
6785
|
const PopoverHeader = (_a) => {
|
|
6788
6786
|
var { children, icon, className, titleHeadingLevel = 'h6', alertSeverityVariant, id, alertSeverityScreenReaderText } = _a, props = __rest$1(_a, ["children", "icon", "className", "titleHeadingLevel", "alertSeverityVariant", "id", "alertSeverityScreenReaderText"]);
|
|
6789
|
-
return (React.createElement("header", Object.assign({ className: css
|
|
6790
|
-
React.createElement("div", { className: css
|
|
6787
|
+
return (React.createElement("header", Object.assign({ className: css(styles$e.popoverHeader, className) }, props),
|
|
6788
|
+
React.createElement("div", { className: css(styles$e.popoverTitle), id: id },
|
|
6791
6789
|
icon && React.createElement(PopoverHeaderIcon, null, icon),
|
|
6792
6790
|
React.createElement(PopoverHeaderText, { headingLevel: titleHeadingLevel },
|
|
6793
6791
|
alertSeverityVariant && alertSeverityScreenReaderText && (React.createElement("span", { className: "pf-v5-u-screen-reader" }, alertSeverityScreenReaderText)),
|
|
@@ -6797,13 +6795,13 @@ PopoverHeader.displayName = 'PopoverHeader';
|
|
|
6797
6795
|
|
|
6798
6796
|
const PopoverFooter = (_a) => {
|
|
6799
6797
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
6800
|
-
return (React.createElement("footer", Object.assign({ className: css
|
|
6798
|
+
return (React.createElement("footer", Object.assign({ className: css(styles$e.popoverFooter, className) }, props), children));
|
|
6801
6799
|
};
|
|
6802
6800
|
PopoverFooter.displayName = 'PopoverFooter';
|
|
6803
6801
|
|
|
6804
6802
|
const PopoverCloseButton = (_a) => {
|
|
6805
6803
|
var { onClose = () => undefined } = _a, props = __rest$1(_a, ["onClose"]);
|
|
6806
|
-
return (React.createElement("div", { className: css
|
|
6804
|
+
return (React.createElement("div", { className: css(styles$e.popoverClose) },
|
|
6807
6805
|
React.createElement(Button, Object.assign({ onClick: onClose, variant: "plain", "aria-label": true }, props, { style: { pointerEvents: 'auto' } }),
|
|
6808
6806
|
React.createElement(TimesIcon, null))));
|
|
6809
6807
|
};
|
|
@@ -6811,7 +6809,7 @@ PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
|
6811
6809
|
|
|
6812
6810
|
const PopoverArrow = (_a) => {
|
|
6813
6811
|
var { className = '' } = _a, props = __rest$1(_a, ["className"]);
|
|
6814
|
-
return React.createElement("div", Object.assign({ className: css
|
|
6812
|
+
return React.createElement("div", Object.assign({ className: css(styles$e.popoverArrow, className) }, props));
|
|
6815
6813
|
};
|
|
6816
6814
|
PopoverArrow.displayName = 'PopoverArrow';
|
|
6817
6815
|
|
|
@@ -7007,7 +7005,7 @@ const Popover = (_a) => {
|
|
|
7007
7005
|
}
|
|
7008
7006
|
return node;
|
|
7009
7007
|
}
|
|
7010
|
-
}, preventScrollOnDeactivate: true, className: css
|
|
7008
|
+
}, preventScrollOnDeactivate: true, className: css(styles$e.popover, alertSeverityVariant && alertStyle[alertSeverityVariant], hasNoPadding && styles$e.modifiers.noPadding, hasAutoWidth && styles$e.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: {
|
|
7011
7009
|
minWidth: hasCustomMinWidth ? minWidth : null,
|
|
7012
7010
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
7013
7011
|
opacity,
|
|
@@ -7020,7 +7018,7 @@ const Popover = (_a) => {
|
|
|
7020
7018
|
React.createElement(PopoverBody, { id: `popover-${uniqueId}-body` }, typeof bodyContent === 'function' ? bodyContent(hide) : bodyContent),
|
|
7021
7019
|
footerContent && (React.createElement(PopoverFooter, { id: `popover-${uniqueId}-footer` }, typeof footerContent === 'function' ? footerContent(hide) : footerContent)))));
|
|
7022
7020
|
return (React.createElement(PopoverContext.Provider, { value: { headerComponent } },
|
|
7023
|
-
React.createElement(Popper, { trigger: children, triggerRef: triggerRef, popper: content, popperRef: popoverRef, minWidth:
|
|
7021
|
+
React.createElement(Popper, { trigger: children, triggerRef: triggerRef, popper: content, popperRef: popoverRef, minWidth: minWidth, appendTo: appendTo, isVisible: visible, positionModifiers: positionModifiers, distance: distance, placement: position, onTriggerClick: onTriggerClick, onDocumentClick: onDocumentClick, onDocumentKeyDown: onDocumentKeyDown, enableFlip: enableFlip, zIndex: zIndex, flipBehavior: flipBehavior })));
|
|
7024
7022
|
};
|
|
7025
7023
|
Popover.displayName = 'Popover';
|
|
7026
7024
|
|
|
@@ -7109,7 +7107,7 @@ var DividerVariant;
|
|
|
7109
7107
|
const Divider = (_a) => {
|
|
7110
7108
|
var { className, component = DividerVariant.hr, inset, orientation } = _a, props = __rest$1(_a, ["className", "component", "inset", "orientation"]);
|
|
7111
7109
|
const Component = component;
|
|
7112
|
-
return (React.createElement(Component, Object.assign({ className: css
|
|
7110
|
+
return (React.createElement(Component, Object.assign({ className: css(styles$d.divider, formatBreakpointMods(inset, styles$d), formatBreakpointMods(orientation, styles$d), className) }, (component !== 'hr' && { role: 'separator' }), props)));
|
|
7113
7111
|
};
|
|
7114
7112
|
Divider.displayName = 'Divider';
|
|
7115
7113
|
|
|
@@ -7194,7 +7192,7 @@ const Drawer = (_a) => {
|
|
|
7194
7192
|
const drawerRef = React.useRef();
|
|
7195
7193
|
const drawerContentRef = React.useRef();
|
|
7196
7194
|
return (React.createElement(DrawerContext.Provider, { value: { isExpanded, isStatic, onExpand, position, drawerRef, drawerContentRef, isInline } },
|
|
7197
|
-
React.createElement("div", Object.assign({ className: css
|
|
7195
|
+
React.createElement("div", Object.assign({ className: css(styles$c.drawer, isExpanded && styles$c.modifiers.expanded, isInline && styles$c.modifiers.inline, isStatic && styles$c.modifiers.static, position === 'left' && styles$c.modifiers.panelLeft, position === 'bottom' && styles$c.modifiers.panelBottom, className), ref: drawerRef }, props), children)));
|
|
7198
7196
|
};
|
|
7199
7197
|
Drawer.displayName = 'Drawer';
|
|
7200
7198
|
|
|
@@ -7202,7 +7200,7 @@ const DrawerActions = (_a) => {
|
|
|
7202
7200
|
var {
|
|
7203
7201
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7204
7202
|
className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
7205
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7203
|
+
return (React.createElement("div", Object.assign({ className: css(styles$c.drawerActions, className) }, props), children));
|
|
7206
7204
|
};
|
|
7207
7205
|
DrawerActions.displayName = 'DrawerActions';
|
|
7208
7206
|
|
|
@@ -7210,7 +7208,7 @@ const DrawerCloseButton = (_a) => {
|
|
|
7210
7208
|
var {
|
|
7211
7209
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7212
7210
|
className = '', onClose = () => undefined, 'aria-label': ariaLabel = 'Close drawer panel' } = _a, props = __rest$1(_a, ["className", "onClose", 'aria-label']);
|
|
7213
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7211
|
+
return (React.createElement("div", Object.assign({ className: css(styles$c.drawerClose, className) }, props),
|
|
7214
7212
|
React.createElement(Button, { variant: "plain", onClick: onClose, "aria-label": ariaLabel },
|
|
7215
7213
|
React.createElement(TimesIcon, null))));
|
|
7216
7214
|
};
|
|
@@ -7220,7 +7218,7 @@ const DrawerMain = (_a) => {
|
|
|
7220
7218
|
var {
|
|
7221
7219
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7222
7220
|
className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
7223
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7221
|
+
return (React.createElement("div", Object.assign({ className: css(styles$c.drawerMain, className) }, props), children));
|
|
7224
7222
|
};
|
|
7225
7223
|
DrawerMain.displayName = 'DrawerMain';
|
|
7226
7224
|
|
|
@@ -7230,7 +7228,7 @@ const DrawerContent = (_a) => {
|
|
|
7230
7228
|
className = '', children, panelContent, colorVariant = DrawerColorVariant.default } = _a, props = __rest$1(_a, ["className", "children", "panelContent", "colorVariant"]);
|
|
7231
7229
|
const { drawerContentRef } = React.useContext(DrawerContext);
|
|
7232
7230
|
return (React.createElement(DrawerMain, null,
|
|
7233
|
-
React.createElement("div", Object.assign({ className: css
|
|
7231
|
+
React.createElement("div", Object.assign({ className: css(styles$c.drawerContent, colorVariant === DrawerColorVariant.light200 && styles$c.modifiers.light_200, className), ref: drawerContentRef }, props), children),
|
|
7234
7232
|
panelContent));
|
|
7235
7233
|
};
|
|
7236
7234
|
DrawerContent.displayName = 'DrawerContent';
|
|
@@ -7239,7 +7237,7 @@ const DrawerContentBody = (_a) => {
|
|
|
7239
7237
|
var {
|
|
7240
7238
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7241
7239
|
className = '', children, hasPadding = false } = _a, props = __rest$1(_a, ["className", "children", "hasPadding"]);
|
|
7242
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7240
|
+
return (React.createElement("div", Object.assign({ className: css(styles$c.drawerBody, hasPadding && styles$c.modifiers.padding, className) }, props), children));
|
|
7243
7241
|
};
|
|
7244
7242
|
DrawerContentBody.displayName = 'DrawerContentBody';
|
|
7245
7243
|
|
|
@@ -7247,7 +7245,7 @@ const DrawerPanelBody = (_a) => {
|
|
|
7247
7245
|
var {
|
|
7248
7246
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7249
7247
|
className = '', children, hasNoPadding = false } = _a, props = __rest$1(_a, ["className", "children", "hasNoPadding"]);
|
|
7250
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7248
|
+
return (React.createElement("div", Object.assign({ className: css(styles$c.drawerBody, hasNoPadding && styles$c.modifiers.noPadding, className) }, props), children));
|
|
7251
7249
|
};
|
|
7252
7250
|
DrawerPanelBody.displayName = 'DrawerPanelBody';
|
|
7253
7251
|
|
|
@@ -7256,7 +7254,7 @@ const DrawerHead = (_a) => {
|
|
|
7256
7254
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
7257
7255
|
className = '', children, hasNoPadding = false } = _a, props = __rest$1(_a, ["className", "children", "hasNoPadding"]);
|
|
7258
7256
|
return (React.createElement(DrawerPanelBody, { hasNoPadding: hasNoPadding },
|
|
7259
|
-
React.createElement("div", Object.assign({ className: css
|
|
7257
|
+
React.createElement("div", Object.assign({ className: css(styles$c.drawerHead, className) }, props), children)));
|
|
7260
7258
|
};
|
|
7261
7259
|
DrawerHead.displayName = 'DrawerHead';
|
|
7262
7260
|
|
|
@@ -7324,7 +7322,7 @@ const DrawerPanelContent = (_a) => {
|
|
|
7324
7322
|
e.preventDefault();
|
|
7325
7323
|
document.addEventListener('mousemove', callbackMouseMove);
|
|
7326
7324
|
document.addEventListener('mouseup', callbackMouseUp);
|
|
7327
|
-
drawerRef.current.classList.add(css
|
|
7325
|
+
drawerRef.current.classList.add(css(styles$c.modifiers.resizing));
|
|
7328
7326
|
isResizing = true;
|
|
7329
7327
|
setInitialVals = true;
|
|
7330
7328
|
};
|
|
@@ -7372,7 +7370,7 @@ const DrawerPanelContent = (_a) => {
|
|
|
7372
7370
|
if (!isResizing) {
|
|
7373
7371
|
return;
|
|
7374
7372
|
}
|
|
7375
|
-
drawerRef.current.classList.remove(css
|
|
7373
|
+
drawerRef.current.classList.remove(css(styles$c.modifiers.resizing));
|
|
7376
7374
|
isResizing = false;
|
|
7377
7375
|
onResize && onResize(e, currWidth, id);
|
|
7378
7376
|
setInitialVals = true;
|
|
@@ -7443,7 +7441,7 @@ const DrawerPanelContent = (_a) => {
|
|
|
7443
7441
|
if (maxSize) {
|
|
7444
7442
|
boundaryCssVars['--pf-v5-c-drawer__panel--md--FlexBasis--max'] = maxSize;
|
|
7445
7443
|
}
|
|
7446
|
-
return (React.createElement(GenerateId, { prefix: "pf-drawer-panel-" }, (panelId) => (React.createElement("div", Object.assign({ id: id || panelId, className: css
|
|
7444
|
+
return (React.createElement(GenerateId, { prefix: "pf-drawer-panel-" }, (panelId) => (React.createElement("div", Object.assign({ id: id || panelId, className: css(styles$c.drawerPanel, isResizable && styles$c.modifiers.resizable, hasNoBorder && styles$c.modifiers.noBorder, formatBreakpointMods(widths, styles$c), colorVariant === DrawerColorVariant.light200 && styles$c.modifiers.light_200, className), ref: panel, onTransitionEnd: (ev) => {
|
|
7447
7445
|
if (ev.target === panel.current) {
|
|
7448
7446
|
if (!hidden && ev.nativeEvent.propertyName === 'transform') {
|
|
7449
7447
|
onExpand(ev);
|
|
@@ -7454,9 +7452,9 @@ const DrawerPanelContent = (_a) => {
|
|
|
7454
7452
|
style: boundaryCssVars
|
|
7455
7453
|
}), props), isExpandedInternal && (React.createElement(React.Fragment, null,
|
|
7456
7454
|
isResizable && (React.createElement(React.Fragment, null,
|
|
7457
|
-
React.createElement("div", { className: css
|
|
7458
|
-
React.createElement("div", { className: css
|
|
7459
|
-
React.createElement("div", { className: css
|
|
7455
|
+
React.createElement("div", { className: css(styles$c.drawerSplitter, position !== 'bottom' && styles$c.modifiers.vertical), role: "separator", tabIndex: 0, "aria-orientation": position === 'bottom' ? 'horizontal' : 'vertical', "aria-label": resizeAriaLabel, "aria-valuenow": separatorValue, "aria-valuemin": 0, "aria-valuemax": 100, "aria-controls": id || panelId, onMouseDown: handleMousedown, onKeyDown: handleKeys, onTouchStart: handleTouchStart, ref: splitterRef },
|
|
7456
|
+
React.createElement("div", { className: css(styles$c.drawerSplitterHandle), "aria-hidden": true })),
|
|
7457
|
+
React.createElement("div", { className: css(styles$c.drawerPanelMain) }, children))),
|
|
7460
7458
|
!isResizable && children))))));
|
|
7461
7459
|
};
|
|
7462
7460
|
DrawerPanelContent.displayName = 'DrawerPanelContent';
|
|
@@ -7539,10 +7537,10 @@ var formStyles = {
|
|
|
7539
7537
|
|
|
7540
7538
|
const ActionGroup = (_a) => {
|
|
7541
7539
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
7542
|
-
const customClassName = css
|
|
7543
|
-
const formActionsComponent = React.createElement("div", { className: css
|
|
7540
|
+
const customClassName = css(formStyles.formGroup, formStyles.modifiers.action, className);
|
|
7541
|
+
const formActionsComponent = React.createElement("div", { className: css(formStyles.formActions) }, children);
|
|
7544
7542
|
return (React.createElement("div", Object.assign({}, props, { className: customClassName }),
|
|
7545
|
-
React.createElement("div", { className: css
|
|
7543
|
+
React.createElement("div", { className: css(formStyles.formGroupControl) }, formActionsComponent)));
|
|
7546
7544
|
};
|
|
7547
7545
|
ActionGroup.displayName = 'ActionGroup';
|
|
7548
7546
|
|
|
@@ -7550,7 +7548,7 @@ const FormBase = (_a) => {
|
|
|
7550
7548
|
var { children = null, className = '', isHorizontal = false, isWidthLimited = false, maxWidth = '', innerRef } = _a, props = __rest$1(_a, ["children", "className", "isHorizontal", "isWidthLimited", "maxWidth", "innerRef"]);
|
|
7551
7549
|
return (React.createElement("form", Object.assign({ noValidate: true }, (maxWidth && {
|
|
7552
7550
|
style: Object.assign({ '--pf-v5-c-form--m-limit-width--MaxWidth': maxWidth }, props.style)
|
|
7553
|
-
}), props, { className: css
|
|
7551
|
+
}), props, { className: css(formStyles.form, isHorizontal && formStyles.modifiers.horizontal, (isWidthLimited || maxWidth) && formStyles.modifiers.limitWidth, className), ref: innerRef }), children));
|
|
7554
7552
|
};
|
|
7555
7553
|
const Form = React.forwardRef((props, ref) => React.createElement(FormBase, Object.assign({ innerRef: ref }, props)));
|
|
7556
7554
|
Form.displayName = 'Form';
|
|
@@ -7560,26 +7558,23 @@ const FormGroup = (_a) => {
|
|
|
7560
7558
|
const isGroupOrRadioGroup = role === 'group' || role === 'radiogroup';
|
|
7561
7559
|
const LabelComponent = isGroupOrRadioGroup ? 'span' : 'label';
|
|
7562
7560
|
const labelContent = (React.createElement(React.Fragment, null,
|
|
7563
|
-
React.createElement(LabelComponent, Object.assign({ className: css
|
|
7564
|
-
React.createElement("span", { className: css
|
|
7565
|
-
isRequired && (React.createElement("span", { className: css
|
|
7561
|
+
React.createElement(LabelComponent, Object.assign({ className: css(formStyles.formLabel) }, (!isGroupOrRadioGroup && { htmlFor: fieldId })),
|
|
7562
|
+
React.createElement("span", { className: css(formStyles.formLabelText) }, label),
|
|
7563
|
+
isRequired && (React.createElement("span", { className: css(formStyles.formLabelRequired), "aria-hidden": "true" },
|
|
7566
7564
|
' ',
|
|
7567
7565
|
ASTERISK))),
|
|
7568
7566
|
' ',
|
|
7569
7567
|
React.isValidElement(labelIcon) && labelIcon));
|
|
7570
|
-
return (React.createElement(GenerateId, null, (randomId) => (React.createElement("div", Object.assign({ className: css
|
|
7571
|
-
label && (React.createElement("div", Object.assign({ className: css
|
|
7568
|
+
return (React.createElement(GenerateId, null, (randomId) => (React.createElement("div", Object.assign({ className: css(formStyles.formGroup, className) }, (role && { role }), (isGroupOrRadioGroup && { 'aria-labelledby': `${fieldId || randomId}-legend` }), props),
|
|
7569
|
+
label && (React.createElement("div", Object.assign({ className: css(formStyles.formGroupLabel, labelInfo && formStyles.modifiers.info, hasNoPaddingTop && formStyles.modifiers.noPaddingTop) }, (isGroupOrRadioGroup && { id: `${fieldId || randomId}-legend` })),
|
|
7572
7570
|
labelInfo && (React.createElement(React.Fragment, null,
|
|
7573
|
-
React.createElement("div", { className: css
|
|
7574
|
-
React.createElement("div", { className: css
|
|
7571
|
+
React.createElement("div", { className: css(formStyles.formGroupLabelMain) }, labelContent),
|
|
7572
|
+
React.createElement("div", { className: css(formStyles.formGroupLabelInfo) }, labelInfo))),
|
|
7575
7573
|
!labelInfo && labelContent)),
|
|
7576
|
-
React.createElement("div", { className: css
|
|
7574
|
+
React.createElement("div", { className: css(formStyles.formGroupControl, isInline && formStyles.modifiers.inline, isStack && formStyles.modifiers.stack) }, children)))));
|
|
7577
7575
|
};
|
|
7578
7576
|
FormGroup.displayName = 'FormGroup';
|
|
7579
7577
|
|
|
7580
|
-
const FormContext = React__default.createContext({});
|
|
7581
|
-
FormContext.Consumer;
|
|
7582
|
-
|
|
7583
7578
|
var styles$b = {
|
|
7584
7579
|
"modifiers": {
|
|
7585
7580
|
"bordered": "pf-m-bordered",
|
|
@@ -7596,20 +7591,20 @@ var styles$b = {
|
|
|
7596
7591
|
|
|
7597
7592
|
const PanelBase = (_a) => {
|
|
7598
7593
|
var { className, children, variant, isScrollable, innerRef } = _a, props = __rest$1(_a, ["className", "children", "variant", "isScrollable", "innerRef"]);
|
|
7599
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7594
|
+
return (React.createElement("div", Object.assign({ className: css(styles$b.panel, variant === 'raised' && styles$b.modifiers.raised, variant === 'bordered' && styles$b.modifiers.bordered, isScrollable && styles$b.modifiers.scrollable, className), ref: innerRef }, props), children));
|
|
7600
7595
|
};
|
|
7601
7596
|
const Panel = React.forwardRef((props, ref) => (React.createElement(PanelBase, Object.assign({ innerRef: ref }, props))));
|
|
7602
7597
|
Panel.displayName = 'Panel';
|
|
7603
7598
|
|
|
7604
7599
|
const PanelMain = (_a) => {
|
|
7605
7600
|
var { className, children, maxHeight } = _a, props = __rest$1(_a, ["className", "children", "maxHeight"]);
|
|
7606
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7601
|
+
return (React.createElement("div", Object.assign({ className: css(styles$b.panelMain, className), style: { '--pf-v5-c-panel__main--MaxHeight': maxHeight } }, props), children));
|
|
7607
7602
|
};
|
|
7608
7603
|
PanelMain.displayName = 'PanelMain';
|
|
7609
7604
|
|
|
7610
7605
|
const PanelMainBody = (_a) => {
|
|
7611
7606
|
var { className, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
7612
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7607
|
+
return (React.createElement("div", Object.assign({ className: css(styles$b.panelMainBody, className) }, props), children));
|
|
7613
7608
|
};
|
|
7614
7609
|
PanelMainBody.displayName = 'PanelMainBody';
|
|
7615
7610
|
|
|
@@ -7709,7 +7704,7 @@ const AdvancedSearchMenu = ({ className, parentRef, parentInputRef, value = '',
|
|
|
7709
7704
|
React.createElement(TextInput, { type: "text", id: randomId, value: getValue('haswords'), onChange: (evt, value) => handleValueChange('haswords', value, evt) })))));
|
|
7710
7705
|
return formGroups;
|
|
7711
7706
|
};
|
|
7712
|
-
return isSearchMenuOpen ? (React.createElement(Panel, { variant: "raised", className: css
|
|
7707
|
+
return isSearchMenuOpen ? (React.createElement(Panel, { variant: "raised", className: css(className) },
|
|
7713
7708
|
React.createElement(PanelMain, null,
|
|
7714
7709
|
React.createElement(PanelMainBody, null,
|
|
7715
7710
|
React.createElement(Form, null,
|
|
@@ -7748,7 +7743,7 @@ const TextInputGroup = (_a) => {
|
|
|
7748
7743
|
const ref = React.useRef(null);
|
|
7749
7744
|
const textInputGroupRef = innerRef || ref;
|
|
7750
7745
|
return (React.createElement(TextInputGroupContext.Provider, { value: { isDisabled } },
|
|
7751
|
-
React.createElement("div", Object.assign({ ref: textInputGroupRef, className: css
|
|
7746
|
+
React.createElement("div", Object.assign({ ref: textInputGroupRef, className: css(styles$a.textInputGroup, isDisabled && styles$a.modifiers.disabled, isPlain && styles$a.modifiers.plain, className) }, props), children)));
|
|
7752
7747
|
};
|
|
7753
7748
|
TextInputGroup.displayName = 'TextInputGroup';
|
|
7754
7749
|
|
|
@@ -7760,19 +7755,19 @@ const TextInputGroupMainBase = (_a) => {
|
|
|
7760
7755
|
const handleChange = (event) => {
|
|
7761
7756
|
onChange(event, event.currentTarget.value);
|
|
7762
7757
|
};
|
|
7763
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7758
|
+
return (React.createElement("div", Object.assign({ className: css(styles$a.textInputGroupMain, icon && styles$a.modifiers.icon, className) }, props),
|
|
7764
7759
|
children,
|
|
7765
|
-
React.createElement("span", { className: css
|
|
7766
|
-
hint && (React.createElement("input", { className: css
|
|
7767
|
-
icon && React.createElement("span", { className: css
|
|
7768
|
-
React.createElement("input", Object.assign({ ref: textInputGroupInputInputRef, type: type, className: css
|
|
7760
|
+
React.createElement("span", { className: css(styles$a.textInputGroupText) },
|
|
7761
|
+
hint && (React.createElement("input", { className: css(styles$a.textInputGroupTextInput, styles$a.modifiers.hint), type: "text", disabled: true, "aria-hidden": "true", value: hint })),
|
|
7762
|
+
icon && React.createElement("span", { className: css(styles$a.textInputGroupIcon) }, icon),
|
|
7763
|
+
React.createElement("input", Object.assign({ ref: textInputGroupInputInputRef, type: type, className: css(styles$a.textInputGroupTextInput), "aria-label": ariaLabel, disabled: isDisabled, onChange: handleChange, onFocus: onFocus, onBlur: onBlur, value: inputValue || '', placeholder: inputPlaceHolder, name: name, "aria-activedescendant": ariaActivedescendant }, (role && { role }), (isExpanded !== undefined && { 'aria-expanded': isExpanded }), (ariaControls && { 'aria-controls': ariaControls }))))));
|
|
7769
7764
|
};
|
|
7770
7765
|
const TextInputGroupMain = React.forwardRef((props, ref) => (React.createElement(TextInputGroupMainBase, Object.assign({ innerRef: ref }, props))));
|
|
7771
7766
|
TextInputGroupMain.displayName = 'TextInputGroupMain';
|
|
7772
7767
|
|
|
7773
7768
|
const TextInputGroupUtilities = (_a) => {
|
|
7774
7769
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
7775
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7770
|
+
return (React.createElement("div", Object.assign({ className: css(styles$a.textInputGroupUtilities, className) }, props), children));
|
|
7776
7771
|
};
|
|
7777
7772
|
TextInputGroupUtilities.displayName = 'TextInputGroupUtilities';
|
|
7778
7773
|
|
|
@@ -7932,7 +7927,7 @@ const SearchInputBase = (_a) => {
|
|
|
7932
7927
|
React.createElement(ArrowRightIcon$1, null)))),
|
|
7933
7928
|
expandableInput && React.createElement(InputGroupItem, null, expandableToggle)));
|
|
7934
7929
|
};
|
|
7935
|
-
const searchInputProps = Object.assign(Object.assign({}, props), { className: className && css
|
|
7930
|
+
const searchInputProps = Object.assign(Object.assign({}, props), { className: className && css(className), innerRef: searchInputRef });
|
|
7936
7931
|
if (!!expandableInput && !isExpanded) {
|
|
7937
7932
|
return React.createElement(InputGroup, Object.assign({}, searchInputProps),
|
|
7938
7933
|
React.createElement(InputGroupItem, null, expandableToggle));
|
|
@@ -7941,9 +7936,9 @@ const SearchInputBase = (_a) => {
|
|
|
7941
7936
|
if (attributes.length > 0) {
|
|
7942
7937
|
const AdvancedSearch = (React.createElement("div", { ref: popperRef },
|
|
7943
7938
|
React.createElement(AdvancedSearchMenu, { value: value, parentRef: searchInputRef, parentInputRef: searchInputInputRef, onSearch: onSearch, onClear: onClear, onChange: onChange, onToggleAdvancedMenu: onToggle, resetButtonLabel: resetButtonLabel, submitSearchButtonLabel: submitSearchButtonLabel, attributes: attributes, formAdditionalItems: formAdditionalItems, hasWordsAttrLabel: hasWordsAttrLabel, advancedSearchDelimiter: advancedSearchDelimiter, getAttrValueMap: getAttrValueMap, isSearchMenuOpen: isSearchMenuOpen })));
|
|
7944
|
-
const AdvancedSearchWithPopper = (React.createElement("div", Object.assign({ className: css
|
|
7939
|
+
const AdvancedSearchWithPopper = (React.createElement("div", Object.assign({ className: css(className), ref: searchInputRef }, props),
|
|
7945
7940
|
React.createElement(Popper, { trigger: buildSearchTextInputGroupWithExtraButtons(), triggerRef: triggerRef, popper: AdvancedSearch, popperRef: popperRef, isVisible: isSearchMenuOpen, enableFlip: true, appendTo: () => appendTo || searchInputRef.current, zIndex: zIndex })));
|
|
7946
|
-
const AdvancedSearchInline = (React.createElement("div", Object.assign({ className: css
|
|
7941
|
+
const AdvancedSearchInline = (React.createElement("div", Object.assign({ className: css(className), ref: searchInputRef }, props),
|
|
7947
7942
|
buildSearchTextInputGroupWithExtraButtons(),
|
|
7948
7943
|
AdvancedSearch));
|
|
7949
7944
|
return appendTo !== 'inline' ? AdvancedSearchWithPopper : AdvancedSearchInline;
|
|
@@ -7983,17 +7978,17 @@ var EmptyStateVariant;
|
|
|
7983
7978
|
})(EmptyStateVariant || (EmptyStateVariant = {}));
|
|
7984
7979
|
const EmptyState = (_a) => {
|
|
7985
7980
|
var { children, className, variant = EmptyStateVariant.full, isFullHeight } = _a, props = __rest$1(_a, ["children", "className", "variant", "isFullHeight"]);
|
|
7986
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7987
|
-
React.createElement("div", { className: css
|
|
7981
|
+
return (React.createElement("div", Object.assign({ className: css(styles$9.emptyState, variant === 'xs' && styles$9.modifiers.xs, variant === 'sm' && styles$9.modifiers.sm, variant === 'lg' && styles$9.modifiers.lg, variant === 'xl' && styles$9.modifiers.xl, isFullHeight && styles$9.modifiers.fullHeight, className) }, props),
|
|
7982
|
+
React.createElement("div", { className: css(styles$9.emptyStateContent) }, children)));
|
|
7988
7983
|
};
|
|
7989
7984
|
EmptyState.displayName = 'EmptyState';
|
|
7990
7985
|
|
|
7991
7986
|
const EmptyStateHeader = (_a) => {
|
|
7992
7987
|
var { children, className, titleClassName, titleText, headingLevel: HeadingLevel = 'h1', icon } = _a, props = __rest$1(_a, ["children", "className", "titleClassName", "titleText", "headingLevel", "icon"]);
|
|
7993
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
7988
|
+
return (React.createElement("div", Object.assign({ className: css('pf-v5-c-empty-state__header', className) }, props),
|
|
7994
7989
|
icon,
|
|
7995
|
-
(titleText || children) && (React.createElement("div", { className: css
|
|
7996
|
-
titleText && (React.createElement(HeadingLevel, { className: css
|
|
7990
|
+
(titleText || children) && (React.createElement("div", { className: css('pf-v5-c-empty-state__title') },
|
|
7991
|
+
titleText && (React.createElement(HeadingLevel, { className: css(styles$9.emptyStateTitleText, titleClassName) }, titleText)),
|
|
7997
7992
|
children))));
|
|
7998
7993
|
};
|
|
7999
7994
|
EmptyStateHeader.displayName = 'EmptyStateHeader';
|
|
@@ -8002,7 +7997,7 @@ const isSpinner = (icon) => icon.type === Spinner;
|
|
|
8002
7997
|
const EmptyStateIcon = (_a) => {
|
|
8003
7998
|
var { className, icon: IconComponent, color } = _a, props = __rest$1(_a, ["className", "icon", "color"]);
|
|
8004
7999
|
const iconIsSpinner = isSpinner(React.createElement(IconComponent, null));
|
|
8005
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
8000
|
+
return (React.createElement("div", Object.assign({ className: css(styles$9.emptyStateIcon) }, (color &&
|
|
8006
8001
|
!iconIsSpinner && { style: { ['--pf-v5-c-empty-state__icon--Color']: color } })),
|
|
8007
8002
|
React.createElement(IconComponent, Object.assign({ className: className, "aria-hidden": !iconIsSpinner }, props))));
|
|
8008
8003
|
};
|
|
@@ -8010,19 +8005,19 @@ EmptyStateIcon.displayName = 'EmptyStateIcon';
|
|
|
8010
8005
|
|
|
8011
8006
|
const EmptyStateBody = (_a) => {
|
|
8012
8007
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8013
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
8008
|
+
return (React.createElement("div", Object.assign({ className: css(styles$9.emptyStateBody, className) }, props), children));
|
|
8014
8009
|
};
|
|
8015
8010
|
EmptyStateBody.displayName = 'EmptyStateBody';
|
|
8016
8011
|
|
|
8017
8012
|
const EmptyStateFooter = (_a) => {
|
|
8018
8013
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8019
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
8014
|
+
return (React.createElement("div", Object.assign({ className: css(styles$9.emptyStateFooter, className) }, props), children));
|
|
8020
8015
|
};
|
|
8021
8016
|
EmptyStateFooter.displayName = 'EmptyStateFooter';
|
|
8022
8017
|
|
|
8023
8018
|
const EmptyStateActions = (_a) => {
|
|
8024
8019
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8025
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
8020
|
+
return (React.createElement("div", Object.assign({ className: css(styles$9.emptyStateActions, className) }, props), children));
|
|
8026
8021
|
};
|
|
8027
8022
|
EmptyStateActions.displayName = 'EmptyStateActions';
|
|
8028
8023
|
|
|
@@ -8140,13 +8135,13 @@ class ExpandableSection extends React.Component {
|
|
|
8140
8135
|
};
|
|
8141
8136
|
}
|
|
8142
8137
|
const computedToggleText = this.calculateToggleText(toggleText, toggleTextExpanded, toggleTextCollapsed, propOrStateIsExpanded);
|
|
8143
|
-
const expandableToggle = !isDetached && (React.createElement("button", { className: css
|
|
8144
|
-
variant !== ExpandableSectionVariant.truncate && (React.createElement("span", { className: css
|
|
8138
|
+
const expandableToggle = !isDetached && (React.createElement("button", { className: css(styles$8.expandableSectionToggle), type: "button", "aria-expanded": propOrStateIsExpanded, onClick: (event) => onToggle(event, !propOrStateIsExpanded) },
|
|
8139
|
+
variant !== ExpandableSectionVariant.truncate && (React.createElement("span", { className: css(styles$8.expandableSectionToggleIcon) },
|
|
8145
8140
|
React.createElement(AngleRightIcon, { "aria-hidden": true }))),
|
|
8146
|
-
React.createElement("span", { className: css
|
|
8147
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
8141
|
+
React.createElement("span", { className: css(styles$8.expandableSectionToggleText) }, toggleContent || computedToggleText)));
|
|
8142
|
+
return (React.createElement("div", Object.assign({ className: css(styles$8.expandableSection, propOrStateIsExpanded && styles$8.modifiers.expanded, isActive && styles$8.modifiers.active, isDetached && styles$8.modifiers.detached, displaySize === 'lg' && styles$8.modifiers.displayLg, isWidthLimited && styles$8.modifiers.limitWidth, isIndented && styles$8.modifiers.indented, variant === ExpandableSectionVariant.truncate && styles$8.modifiers.truncate, className) }, props),
|
|
8148
8143
|
variant === ExpandableSectionVariant.default && expandableToggle,
|
|
8149
|
-
React.createElement("div", { ref: this.expandableContentRef, className: css
|
|
8144
|
+
React.createElement("div", { ref: this.expandableContentRef, className: css(styles$8.expandableSectionContent), hidden: variant !== ExpandableSectionVariant.truncate && !propOrStateIsExpanded, id: contentId }, children),
|
|
8150
8145
|
variant === ExpandableSectionVariant.truncate && this.state.hasToggle && expandableToggle));
|
|
8151
8146
|
}
|
|
8152
8147
|
}
|
|
@@ -8216,9 +8211,9 @@ var styles$7 = {
|
|
|
8216
8211
|
const Icon = (_a) => {
|
|
8217
8212
|
var { children, className, progressIcon, size, iconSize, progressIconSize, status, isInline = false, isInProgress = false, defaultProgressArialabel = 'Loading...' } = _a, props = __rest$1(_a, ["children", "className", "progressIcon", "size", "iconSize", "progressIconSize", "status", "isInline", "isInProgress", "defaultProgressArialabel"]);
|
|
8218
8213
|
const _progressIcon = progressIcon !== null && progressIcon !== void 0 ? progressIcon : React.createElement(Spinner, { diameter: "1em", "aria-label": defaultProgressArialabel });
|
|
8219
|
-
return (React.createElement("span", Object.assign({ className: css
|
|
8220
|
-
React.createElement("span", { className: css
|
|
8221
|
-
isInProgress && (React.createElement("span", { className: css
|
|
8214
|
+
return (React.createElement("span", Object.assign({ className: css(styles$7.icon, isInline && styles$7.modifiers.inline, isInProgress && styles$7.modifiers.inProgress, styles$7.modifiers[size], className) }, props),
|
|
8215
|
+
React.createElement("span", { className: css(styles$7.iconContent, styles$7.modifiers[iconSize], styles$7.modifiers[status]) }, children),
|
|
8216
|
+
isInProgress && (React.createElement("span", { className: css(styles$7.iconProgress, styles$7.modifiers[progressIconSize], className) }, _progressIcon))));
|
|
8222
8217
|
};
|
|
8223
8218
|
Icon.displayName = 'Icon';
|
|
8224
8219
|
|
|
@@ -8347,7 +8342,7 @@ const Label = (_a) => {
|
|
|
8347
8342
|
const LabelComponent = (isOverflowLabel ? 'button' : 'span');
|
|
8348
8343
|
const defaultButton = (React.createElement(Button, Object.assign({ type: "button", variant: "plain", onClick: onClose, "aria-label": closeBtnAriaLabel || `Close ${children}` }, closeBtnProps),
|
|
8349
8344
|
React.createElement(TimesIcon, null)));
|
|
8350
|
-
const button = React.createElement("span", { className: css
|
|
8345
|
+
const button = React.createElement("span", { className: css(labelStyles.labelActions) }, closeBtn || defaultButton);
|
|
8351
8346
|
const textRef = React.createRef();
|
|
8352
8347
|
// ref to apply tooltip when rendered is used
|
|
8353
8348
|
const componentRef = React.useRef();
|
|
@@ -8359,8 +8354,8 @@ const Label = (_a) => {
|
|
|
8359
8354
|
}
|
|
8360
8355
|
}, [isEditableActive]);
|
|
8361
8356
|
const content = (React.createElement(React.Fragment, null,
|
|
8362
|
-
icon && React.createElement("span", { className: css
|
|
8363
|
-
React.createElement("span", Object.assign({ ref: textRef, className: css
|
|
8357
|
+
icon && React.createElement("span", { className: css(labelStyles.labelIcon) }, icon),
|
|
8358
|
+
React.createElement("span", Object.assign({ ref: textRef, className: css(labelStyles.labelText) }, (textMaxWidth && {
|
|
8364
8359
|
style: {
|
|
8365
8360
|
'--pf-v5-c-label__text--MaxWidth': textMaxWidth
|
|
8366
8361
|
}
|
|
@@ -8380,7 +8375,7 @@ const Label = (_a) => {
|
|
|
8380
8375
|
else if (isEditable) {
|
|
8381
8376
|
LabelComponentChildElement = 'button';
|
|
8382
8377
|
}
|
|
8383
|
-
const labelComponentChildProps = Object.assign(Object.assign(Object.assign({ className: css
|
|
8378
|
+
const labelComponentChildProps = Object.assign(Object.assign(Object.assign({ className: css(labelStyles.labelContent) }, (isTooltipVisible && { tabIndex: 0 })), (href && { href })), (isEditable && Object.assign({ ref: editableButtonRef, onClick: (e) => {
|
|
8384
8379
|
setIsEditableActive(true);
|
|
8385
8380
|
e.stopPropagation();
|
|
8386
8381
|
} }, editableProps)));
|
|
@@ -8397,10 +8392,10 @@ const Label = (_a) => {
|
|
|
8397
8392
|
else if (isTooltipVisible) {
|
|
8398
8393
|
labelComponentChild = (React.createElement(Tooltip, { content: children, position: tooltipPosition }, labelComponentChild));
|
|
8399
8394
|
}
|
|
8400
|
-
return (React.createElement(LabelComponent, Object.assign({}, props, { className: css
|
|
8395
|
+
return (React.createElement(LabelComponent, Object.assign({}, props, { className: css(labelStyles.label, colorStyles[color], variant === 'outline' && labelStyles.modifiers.outline, isOverflowLabel && labelStyles.modifiers.overflow, isCompact && labelStyles.modifiers.compact, isEditable && styles$6.modifiers.editable, isEditableActive && labelStyles.modifiers.editableActive, className) }),
|
|
8401
8396
|
!isEditableActive && labelComponentChild,
|
|
8402
8397
|
!isEditableActive && onClose && button,
|
|
8403
|
-
isEditableActive && (React.createElement("input", Object.assign({ className: css
|
|
8398
|
+
isEditableActive && (React.createElement("input", Object.assign({ className: css(labelStyles.labelContent), type: "text", id: "editable-input", ref: editableInputRef, value: currValue, onChange: updateVal }, editableProps)))));
|
|
8404
8399
|
};
|
|
8405
8400
|
Label.displayName = 'Label';
|
|
8406
8401
|
|
|
@@ -8435,14 +8430,14 @@ var ListComponent;
|
|
|
8435
8430
|
})(ListComponent || (ListComponent = {}));
|
|
8436
8431
|
const List = (_a) => {
|
|
8437
8432
|
var { className = '', children = null, variant = null, isBordered = false, isPlain = false, iconSize = 'default', type = OrderType.number, ref = null, component = ListComponent.ul } = _a, props = __rest$1(_a, ["className", "children", "variant", "isBordered", "isPlain", "iconSize", "type", "ref", "component"]);
|
|
8438
|
-
return component === ListComponent.ol ? (React.createElement("ol", Object.assign({ ref: ref, type: type }, (isPlain && { role: 'list' }), props, { className: css
|
|
8433
|
+
return component === ListComponent.ol ? (React.createElement("ol", Object.assign({ ref: ref, type: type }, (isPlain && { role: 'list' }), props, { className: css(styles$5.list, variant && styles$5.modifiers[variant], isBordered && styles$5.modifiers.bordered, isPlain && styles$5.modifiers.plain, iconSize && iconSize === 'large' && styles$5.modifiers.iconLg, className) }), children)) : (React.createElement("ul", Object.assign({ ref: ref }, (isPlain && { role: 'list' }), props, { className: css(styles$5.list, variant && styles$5.modifiers[variant], isBordered && styles$5.modifiers.bordered, isPlain && styles$5.modifiers.plain, iconSize && iconSize === 'large' && styles$5.modifiers.iconLg, className) }), children));
|
|
8439
8434
|
};
|
|
8440
8435
|
List.displayName = 'List';
|
|
8441
8436
|
|
|
8442
8437
|
const ListItem = (_a) => {
|
|
8443
8438
|
var { icon = null, children = null } = _a, props = __rest$1(_a, ["icon", "children"]);
|
|
8444
|
-
return (React.createElement("li", Object.assign({ className: css
|
|
8445
|
-
icon && React.createElement("span", { className: css
|
|
8439
|
+
return (React.createElement("li", Object.assign({ className: css(icon && styles$5.listItem) }, props),
|
|
8440
|
+
icon && React.createElement("span", { className: css(styles$5.listItemIcon) }, icon),
|
|
8446
8441
|
children));
|
|
8447
8442
|
};
|
|
8448
8443
|
ListItem.displayName = 'ListItem';
|
|
@@ -8478,7 +8473,7 @@ const Text = (_a) => {
|
|
|
8478
8473
|
var { children = null, className = '', component = TextVariants.p, isVisitedLink = false, ouiaId, ouiaSafe = true } = _a, props = __rest$1(_a, ["children", "className", "component", "isVisitedLink", "ouiaId", "ouiaSafe"]);
|
|
8479
8474
|
const Component = component;
|
|
8480
8475
|
const ouiaProps = useOUIAProps(Text.displayName, ouiaId, ouiaSafe);
|
|
8481
|
-
return (React.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css
|
|
8476
|
+
return (React.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(isVisitedLink && component === TextVariants.a && styles$t.modifiers.visited, className) }), children));
|
|
8482
8477
|
};
|
|
8483
8478
|
Text.displayName = 'Text';
|
|
8484
8479
|
|
|
@@ -8491,7 +8486,7 @@ var TextListVariants;
|
|
|
8491
8486
|
const TextList = (_a) => {
|
|
8492
8487
|
var { children = null, className = '', component = TextListVariants.ul, isPlain = false } = _a, props = __rest$1(_a, ["children", "className", "component", "isPlain"]);
|
|
8493
8488
|
const Component = component;
|
|
8494
|
-
return (React.createElement(Component, Object.assign({}, props, { className: css
|
|
8489
|
+
return (React.createElement(Component, Object.assign({}, props, { className: css(isPlain && styles$t.modifiers.plain, className) }), children));
|
|
8495
8490
|
};
|
|
8496
8491
|
TextList.displayName = 'TextList';
|
|
8497
8492
|
|
|
@@ -8504,7 +8499,7 @@ var TextListItemVariants;
|
|
|
8504
8499
|
const TextListItem = (_a) => {
|
|
8505
8500
|
var { children = null, className = '', component = TextListItemVariants.li } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
8506
8501
|
const Component = component;
|
|
8507
|
-
return (React.createElement(Component, Object.assign({}, props, { className: css
|
|
8502
|
+
return (React.createElement(Component, Object.assign({}, props, { className: css(className) }), children));
|
|
8508
8503
|
};
|
|
8509
8504
|
TextListItem.displayName = 'TextListItem';
|
|
8510
8505
|
|
|
@@ -8708,16 +8703,16 @@ var ToolbarItemVariant;
|
|
|
8708
8703
|
ToolbarItemVariant["expand-all"] = "expand-all";
|
|
8709
8704
|
})(ToolbarItemVariant || (ToolbarItemVariant = {}));
|
|
8710
8705
|
const ToolbarItem = (_a) => {
|
|
8711
|
-
var { className, variant, visibility, spacer, widths, align, alignSelf, id, children, isAllExpanded, isOverflowContainer } = _a, props = __rest$1(_a, ["className", "variant", "visibility", "spacer", "widths", "align", "alignSelf", "id", "children", "isAllExpanded", "isOverflowContainer"]);
|
|
8706
|
+
var { className, variant, visibility, spacer, widths, align, alignSelf, alignItems, id, children, isAllExpanded, isOverflowContainer } = _a, props = __rest$1(_a, ["className", "variant", "visibility", "spacer", "widths", "align", "alignSelf", "alignItems", "id", "children", "isAllExpanded", "isOverflowContainer"]);
|
|
8712
8707
|
if (variant === ToolbarItemVariant.separator) {
|
|
8713
|
-
return React.createElement(Divider, Object.assign({ className: css
|
|
8708
|
+
return React.createElement(Divider, Object.assign({ className: css(styles$4.modifiers.vertical, className) }, props));
|
|
8714
8709
|
}
|
|
8715
8710
|
const widthStyles = {};
|
|
8716
8711
|
if (widths) {
|
|
8717
8712
|
Object.entries(widths || {}).map(([breakpoint, value]) => (widthStyles[`--pf-v5-c-toolbar__item--Width${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}`] = value));
|
|
8718
8713
|
}
|
|
8719
|
-
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css
|
|
8720
|
-
styles$4.modifiers[toCamel(variant)], isAllExpanded && styles$4.modifiers.expanded, isOverflowContainer && styles$4.modifiers.overflowContainer, formatBreakpointMods(visibility, styles$4, '', getBreakpoint(width)), formatBreakpointMods(align, styles$4, '', getBreakpoint(width)), formatBreakpointMods(spacer, styles$4, '', getBreakpoint(width)), alignSelf === 'center' && styles$4.modifiers.alignSelfCenter, alignSelf === 'baseline' && styles$4.modifiers.alignSelfBaseline, className) }, (variant === 'label' && { 'aria-hidden': true }), { id: id }, props, (widths && { style: Object.assign(Object.assign({}, widthStyles), props.style) })), children))));
|
|
8714
|
+
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css(styles$4.toolbarItem, variant &&
|
|
8715
|
+
styles$4.modifiers[toCamel(variant)], isAllExpanded && styles$4.modifiers.expanded, isOverflowContainer && styles$4.modifiers.overflowContainer, formatBreakpointMods(visibility, styles$4, '', getBreakpoint(width)), formatBreakpointMods(align, styles$4, '', getBreakpoint(width)), formatBreakpointMods(spacer, styles$4, '', getBreakpoint(width)), alignItems === 'start' && styles$4.modifiers.alignItemsStart, alignItems === 'center' && styles$4.modifiers.alignItemsCenter, alignItems === 'baseline' && styles$4.modifiers.alignItemsBaseline, alignSelf === 'start' && styles$4.modifiers.alignSelfStart, alignSelf === 'center' && styles$4.modifiers.alignSelfCenter, alignSelf === 'baseline' && styles$4.modifiers.alignSelfBaseline, className) }, (variant === 'label' && { 'aria-hidden': true }), { id: id }, props, (widths && { style: Object.assign(Object.assign({}, widthStyles), props.style) })), children))));
|
|
8721
8716
|
};
|
|
8722
8717
|
ToolbarItem.displayName = 'ToolbarItem';
|
|
8723
8718
|
|
|
@@ -8730,7 +8725,7 @@ var ToolbarGroupVariant;
|
|
|
8730
8725
|
class ToolbarGroupWithRef extends React.Component {
|
|
8731
8726
|
render() {
|
|
8732
8727
|
const _a = this.props, { visibility, align, alignItems, alignSelf, spacer, spaceItems, className, variant, children, isOverflowContainer, innerRef } = _a, props = __rest$1(_a, ["visibility", "align", "alignItems", "alignSelf", "spacer", "spaceItems", "className", "variant", "children", "isOverflowContainer", "innerRef"]);
|
|
8733
|
-
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css
|
|
8728
|
+
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css(styles$4.toolbarGroup, variant && styles$4.modifiers[toCamel(variant)], formatBreakpointMods(visibility, styles$4, '', getBreakpoint(width)), formatBreakpointMods(align, styles$4, '', getBreakpoint(width)), formatBreakpointMods(spacer, styles$4, '', getBreakpoint(width)), formatBreakpointMods(spaceItems, styles$4, '', getBreakpoint(width)), alignItems === 'start' && styles$4.modifiers.alignItemsStart, alignItems === 'center' && styles$4.modifiers.alignItemsCenter, alignItems === 'baseline' && styles$4.modifiers.alignItemsBaseline, alignSelf === 'start' && styles$4.modifiers.alignSelfStart, alignSelf === 'center' && styles$4.modifiers.alignSelfCenter, alignSelf === 'baseline' && styles$4.modifiers.alignSelfBaseline, isOverflowContainer && styles$4.modifiers.overflowContainer, className) }, props, { ref: innerRef }), children))));
|
|
8734
8729
|
}
|
|
8735
8730
|
}
|
|
8736
8731
|
const ToolbarGroup = React.forwardRef((props, ref) => (React.createElement(ToolbarGroupWithRef, Object.assign({}, props, { innerRef: ref }))));
|
|
@@ -8749,8 +8744,9 @@ class ToolbarChipGroupContent extends React.Component {
|
|
|
8749
8744
|
collapseListedFilters =
|
|
8750
8745
|
(canUseDOM ? window.innerWidth : 1200) < globalBreakpoints[collapseListedFiltersBreakpoint];
|
|
8751
8746
|
}
|
|
8752
|
-
|
|
8753
|
-
|
|
8747
|
+
const isHidden = numberOfFilters === 0 || isExpanded;
|
|
8748
|
+
return (React.createElement("div", Object.assign({ className: css(styles$4.toolbarContent, !isHidden && !collapseListedFilters && styles$4.modifiers.chipContainer, isHidden && styles$4.modifiers.hidden, className) }, ((numberOfFilters === 0 || isExpanded) && { hidden: true }), { ref: chipGroupContentRef }, props),
|
|
8749
|
+
React.createElement(ToolbarGroup, Object.assign({ className: css(collapseListedFilters && styles$4.modifiers.hidden) }, (collapseListedFilters && { hidden: true }), (collapseListedFilters && { 'aria-hidden': true }))),
|
|
8754
8750
|
collapseListedFilters && numberOfFilters > 0 && !isExpanded && (React.createElement(ToolbarGroup, null,
|
|
8755
8751
|
React.createElement(ToolbarItem, null, numberOfFiltersText(numberOfFilters)))),
|
|
8756
8752
|
showClearFiltersButton && !isExpanded && !customChipGroupContent && (React.createElement(ToolbarItem, null,
|
|
@@ -8806,7 +8802,7 @@ class Toolbar extends React.Component {
|
|
|
8806
8802
|
const isExpanded = isToggleManaged ? isManagedToggleExpanded : isExpandedProp;
|
|
8807
8803
|
const numberOfFilters = this.getNumberOfFilters();
|
|
8808
8804
|
const showClearFiltersButton = numberOfFilters > 0;
|
|
8809
|
-
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css
|
|
8805
|
+
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css(styles$4.toolbar, isFullHeight && styles$4.modifiers.fullHeight, isStatic && styles$4.modifiers.static, usePageInsets && styles$4.modifiers.pageInsets, isSticky && styles$4.modifiers.sticky, formatBreakpointMods(inset, styles$4, '', getBreakpoint(width)), className), id: randomId }, getOUIAProps(Toolbar.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId), props),
|
|
8810
8806
|
React.createElement(ToolbarContext.Provider, { value: {
|
|
8811
8807
|
isExpanded,
|
|
8812
8808
|
toggleIsExpanded: isToggleManaged ? this.toggleIsExpanded : toggleIsExpanded,
|
|
@@ -8848,7 +8844,7 @@ class ToolbarExpandableContent extends React.Component {
|
|
|
8848
8844
|
const clearChipGroups = () => {
|
|
8849
8845
|
clearAllFilters();
|
|
8850
8846
|
};
|
|
8851
|
-
return (React.createElement("div", Object.assign({ className: css
|
|
8847
|
+
return (React.createElement("div", Object.assign({ className: css(styles$4.toolbarExpandableContent, className), ref: expandableContentRef }, props),
|
|
8852
8848
|
React.createElement(ToolbarGroup, null),
|
|
8853
8849
|
numberOfFilters > 0 && (React.createElement(ToolbarGroup, { className: styles$4.modifiers.chipContainer },
|
|
8854
8850
|
React.createElement(ToolbarGroup, { ref: chipContainerRef }),
|
|
@@ -8871,17 +8867,16 @@ class ToolbarContent extends React.Component {
|
|
|
8871
8867
|
this.chipContainerRef = React.createRef();
|
|
8872
8868
|
}
|
|
8873
8869
|
render() {
|
|
8874
|
-
const _a = this.props, { className, children, isExpanded, toolbarId, visibility, alignItems, clearAllFilters, showClearFiltersButton, clearFiltersButtonText } = _a, props = __rest$1(_a, ["className", "children", "isExpanded", "toolbarId", "visibility", "alignItems", "clearAllFilters", "showClearFiltersButton", "clearFiltersButtonText"]);
|
|
8875
|
-
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css
|
|
8870
|
+
const _a = this.props, { className, children, isExpanded, toolbarId, visibility, alignItems, clearAllFilters, showClearFiltersButton, clearFiltersButtonText, alignSelf } = _a, props = __rest$1(_a, ["className", "children", "isExpanded", "toolbarId", "visibility", "alignItems", "clearAllFilters", "showClearFiltersButton", "clearFiltersButtonText", "alignSelf"]);
|
|
8871
|
+
return (React.createElement(PageContext.Consumer, null, ({ width, getBreakpoint }) => (React.createElement("div", Object.assign({ className: css(styles$4.toolbarContent, formatBreakpointMods(visibility, styles$4, '', getBreakpoint(width)), className) }, props),
|
|
8876
8872
|
React.createElement(ToolbarContext.Consumer, null, ({ clearAllFilters: clearAllFiltersContext, clearFiltersButtonText: clearFiltersButtonContext, showClearFiltersButton: showClearFiltersButtonContext, toolbarId: toolbarIdContext }) => {
|
|
8877
|
-
const expandableContentId = `${toolbarId ||
|
|
8878
|
-
toolbarIdContext}-expandable-content-${ToolbarContent.currentId++}`;
|
|
8873
|
+
const expandableContentId = `${toolbarId || toolbarIdContext}-expandable-content-${ToolbarContent.currentId++}`;
|
|
8879
8874
|
return (React.createElement(ToolbarContentContext.Provider, { value: {
|
|
8880
8875
|
expandableContentRef: this.expandableContentRef,
|
|
8881
8876
|
expandableContentId,
|
|
8882
8877
|
chipContainerRef: this.chipContainerRef
|
|
8883
8878
|
} },
|
|
8884
|
-
React.createElement("div", { className: css
|
|
8879
|
+
React.createElement("div", { className: css(styles$4.toolbarContentSection, alignItems === 'center' && styles$4.modifiers.alignItemsCenter, alignItems === 'start' && styles$4.modifiers.alignItemsStart, alignItems === 'baseline' && styles$4.modifiers.alignItemsBaseline, alignSelf === 'center' && styles$4.modifiers.alignSelfCenter, alignSelf === 'start' && styles$4.modifiers.alignSelfStart, alignSelf === 'baseline' && styles$4.modifiers.alignSelfBaseline) }, children),
|
|
8885
8880
|
React.createElement(ToolbarExpandableContent, { id: expandableContentId, isExpanded: isExpanded, expandableContentRef: this.expandableContentRef, chipContainerRef: this.chipContainerRef, clearAllFilters: clearAllFilters || clearAllFiltersContext, showClearFiltersButton: showClearFiltersButton || showClearFiltersButtonContext, clearFiltersButtonText: clearFiltersButtonText || clearFiltersButtonContext })));
|
|
8886
8881
|
})))));
|
|
8887
8882
|
}
|
|
@@ -8894,6 +8889,7 @@ ToolbarContent.defaultProps = {
|
|
|
8894
8889
|
};
|
|
8895
8890
|
|
|
8896
8891
|
var styles$3 = {
|
|
8892
|
+
"button": "pf-v5-c-button",
|
|
8897
8893
|
"drawer": "pf-v5-c-drawer",
|
|
8898
8894
|
"modalBox": "pf-v5-c-modal-box",
|
|
8899
8895
|
"modifiers": {
|
|
@@ -8968,16 +8964,16 @@ const WizardNavItem = ({ children = null, content = '', isCurrent = false, isDis
|
|
|
8968
8964
|
return label;
|
|
8969
8965
|
}
|
|
8970
8966
|
}, [content, isCurrent, isVisited, status]);
|
|
8971
|
-
return (React.createElement("li", { className: css
|
|
8967
|
+
return (React.createElement("li", { className: css(styles$3.wizardNavItem, isExpandable && styles$3.modifiers.expandable, isExpandable && isExpanded && styles$3.modifiers.expanded) },
|
|
8972
8968
|
React.createElement(NavItemComponent, Object.assign({}, (NavItemComponent === 'a'
|
|
8973
8969
|
? { tabIndex: isDisabled ? -1 : undefined, href, target }
|
|
8974
8970
|
: { disabled: isDisabled }), (id && { id: id.toString() }), { onClick: (e) => {
|
|
8975
8971
|
e.stopPropagation();
|
|
8976
8972
|
isExpandable ? setIsExpanded(!isExpanded || isCurrent) : onClick === null || onClick === void 0 ? void 0 : onClick(e, stepIndex);
|
|
8977
|
-
}, className: css
|
|
8978
|
-
React.createElement("span", { className: css
|
|
8979
|
-
React.createElement("span", { className: css
|
|
8980
|
-
React.createElement("span", { className: css
|
|
8973
|
+
}, className: css(styles$3.wizardNavLink, isCurrent && styles$3.modifiers.current, isDisabled && styles$3.modifiers.disabled), "aria-disabled": isDisabled ? true : null, "aria-current": isCurrent && !children ? 'step' : false }, (isExpandable && { 'aria-expanded': isExpanded }), (ariaLabel && { 'aria-label': ariaLabel }), ouiaProps), isExpandable ? (React.createElement(React.Fragment, null,
|
|
8974
|
+
React.createElement("span", { className: css(styles$3.wizardNavLinkText) }, content),
|
|
8975
|
+
React.createElement("span", { className: css(styles$3.wizardNavLinkToggle) },
|
|
8976
|
+
React.createElement("span", { className: css(styles$3.wizardNavLinkToggleIcon) },
|
|
8981
8977
|
React.createElement(AngleRightIcon, { "aria-label": `${isCurrent ? 'Collapse' : 'Expand'} step icon` }))))) : (React.createElement(React.Fragment, null,
|
|
8982
8978
|
content,
|
|
8983
8979
|
status === WizardNavItemStatus.Error && (React.createElement("span", { style: { marginLeft: 'var(--pf-v5-global--spacer--sm)' } },
|
|
@@ -9541,14 +9537,14 @@ const l_flex_item_Order = {
|
|
|
9541
9537
|
const Flex = (_a) => {
|
|
9542
9538
|
var { children = null, className = '', component = 'div', spacer, spaceItems, gap, rowGap, columnGap, grow, shrink, flex, direction, alignItems, alignContent, alignSelf, align, justifyContent, display, fullWidth, flexWrap, order, style } = _a, props = __rest$1(_a, ["children", "className", "component", "spacer", "spaceItems", "gap", "rowGap", "columnGap", "grow", "shrink", "flex", "direction", "alignItems", "alignContent", "alignSelf", "align", "justifyContent", "display", "fullWidth", "flexWrap", "order", "style"]);
|
|
9543
9539
|
const Component = component;
|
|
9544
|
-
return (React.createElement(Component, Object.assign({ className: css
|
|
9540
|
+
return (React.createElement(Component, Object.assign({ className: css(styles$2.flex, formatBreakpointMods(spacer, styles$2), formatBreakpointMods(spaceItems, styles$2), formatBreakpointMods(grow, styles$2), formatBreakpointMods(shrink, styles$2), formatBreakpointMods(flex, styles$2), formatBreakpointMods(direction, styles$2), formatBreakpointMods(alignItems, styles$2), formatBreakpointMods(alignContent, styles$2), formatBreakpointMods(alignSelf, styles$2), formatBreakpointMods(align, styles$2), formatBreakpointMods(justifyContent, styles$2), formatBreakpointMods(display, styles$2), formatBreakpointMods(fullWidth, styles$2), formatBreakpointMods(flexWrap, styles$2), formatBreakpointMods(gap, styles$2), formatBreakpointMods(rowGap, styles$2), formatBreakpointMods(columnGap, styles$2), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, l_flex_item_Order.name)) : undefined }, props), children));
|
|
9545
9541
|
};
|
|
9546
9542
|
Flex.displayName = 'Flex';
|
|
9547
9543
|
|
|
9548
9544
|
const FlexItem = (_a) => {
|
|
9549
9545
|
var { children = null, className = '', component = 'div', spacer, grow, shrink, flex, alignSelf, align, fullWidth, order, style } = _a, props = __rest$1(_a, ["children", "className", "component", "spacer", "grow", "shrink", "flex", "alignSelf", "align", "fullWidth", "order", "style"]);
|
|
9550
9546
|
const Component = component;
|
|
9551
|
-
return (React.createElement(Component, Object.assign({}, props, { className: css
|
|
9547
|
+
return (React.createElement(Component, Object.assign({}, props, { className: css(formatBreakpointMods(spacer, styles$2), formatBreakpointMods(grow, styles$2), formatBreakpointMods(shrink, styles$2), formatBreakpointMods(flex, styles$2), formatBreakpointMods(alignSelf, styles$2), formatBreakpointMods(align, styles$2), formatBreakpointMods(fullWidth, styles$2), className), style: style || order ? Object.assign(Object.assign({}, style), setBreakpointCssVars(order, l_flex_item_Order.name)) : undefined }), children));
|
|
9552
9548
|
};
|
|
9553
9549
|
FlexItem.displayName = 'FlexItem';
|
|
9554
9550
|
|
|
@@ -9571,7 +9567,7 @@ const Gallery = (_a) => {
|
|
|
9571
9567
|
Object.entries(maxWidths || {}).map(([breakpoint, value]) => (maxWidthStyles[`--pf-v5-l-gallery--GridTemplateColumns--max${breakpoint !== 'default' ? `-on-${breakpoint}` : ''}`] = value));
|
|
9572
9568
|
}
|
|
9573
9569
|
const widthStyles = Object.assign(Object.assign({}, minWidthStyles), maxWidthStyles);
|
|
9574
|
-
return (React.createElement(Component, Object.assign({ className: css
|
|
9570
|
+
return (React.createElement(Component, Object.assign({ className: css(styles$1.gallery, hasGutter && styles$1.modifiers.gutter, className) }, props, ((minWidths || maxWidths) && { style: Object.assign(Object.assign({}, widthStyles), props.style) })), children));
|
|
9575
9571
|
};
|
|
9576
9572
|
Gallery.displayName = 'Gallery';
|
|
9577
9573
|
|
|
@@ -9594,13 +9590,13 @@ var styles = {
|
|
|
9594
9590
|
const Stack = (_a) => {
|
|
9595
9591
|
var { hasGutter = false, className = '', children = null, component = 'div' } = _a, props = __rest$1(_a, ["hasGutter", "className", "children", "component"]);
|
|
9596
9592
|
const Component = component;
|
|
9597
|
-
return (React.createElement(Component, Object.assign({}, props, { className: css
|
|
9593
|
+
return (React.createElement(Component, Object.assign({}, props, { className: css(styles.stack, hasGutter && styles.modifiers.gutter, className) }), children));
|
|
9598
9594
|
};
|
|
9599
9595
|
Stack.displayName = 'Stack';
|
|
9600
9596
|
|
|
9601
9597
|
const StackItem = (_a) => {
|
|
9602
9598
|
var { isFilled = false, className = '', children = null } = _a, props = __rest$1(_a, ["isFilled", "className", "children"]);
|
|
9603
|
-
return (React.createElement("div", Object.assign({}, props, { className: css
|
|
9599
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(styles.stackItem, isFilled && styles.modifiers.fill, className) }), children));
|
|
9604
9600
|
};
|
|
9605
9601
|
StackItem.displayName = 'StackItem';
|
|
9606
9602
|
|
|
@@ -9655,36 +9651,6 @@ exports["default"] = exports.SearchIcon;
|
|
|
9655
9651
|
|
|
9656
9652
|
var SearchIcon = /*@__PURE__*/getDefaultExportFromCjs(searchIcon);
|
|
9657
9653
|
|
|
9658
|
-
/** Joins args into a className string
|
|
9659
|
-
*
|
|
9660
|
-
* @param {any} args list of objects, string, or arrays to reduce
|
|
9661
|
-
*/
|
|
9662
|
-
function css(...args) {
|
|
9663
|
-
// Adapted from https://github.com/JedWatson/classnames/blob/master/index.js
|
|
9664
|
-
const classes = [];
|
|
9665
|
-
const hasOwn = {}.hasOwnProperty;
|
|
9666
|
-
args.filter(Boolean).forEach((arg) => {
|
|
9667
|
-
const argType = typeof arg;
|
|
9668
|
-
if (argType === 'string' || argType === 'number') {
|
|
9669
|
-
classes.push(arg);
|
|
9670
|
-
}
|
|
9671
|
-
else if (Array.isArray(arg) && arg.length) {
|
|
9672
|
-
const inner = css(...arg);
|
|
9673
|
-
if (inner) {
|
|
9674
|
-
classes.push(inner);
|
|
9675
|
-
}
|
|
9676
|
-
}
|
|
9677
|
-
else if (argType === 'object') {
|
|
9678
|
-
for (const key in arg) {
|
|
9679
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
9680
|
-
classes.push(key);
|
|
9681
|
-
}
|
|
9682
|
-
}
|
|
9683
|
-
}
|
|
9684
|
-
});
|
|
9685
|
-
return classes.join(' ');
|
|
9686
|
-
}
|
|
9687
|
-
|
|
9688
9654
|
function _extends() {
|
|
9689
9655
|
_extends = Object.assign || function (target) {
|
|
9690
9656
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -10501,8 +10467,8 @@ const CamelCaseWrap = ({ value, dataTest }) => {
|
|
|
10501
10467
|
};
|
|
10502
10468
|
|
|
10503
10469
|
class CatalogTile extends React.Component {
|
|
10504
|
-
constructor() {
|
|
10505
|
-
super(
|
|
10470
|
+
constructor(props) {
|
|
10471
|
+
super(props);
|
|
10506
10472
|
this.handleClick = (e) => {
|
|
10507
10473
|
const { onClick, href } = this.props;
|
|
10508
10474
|
if (!href) {
|
|
@@ -10518,13 +10484,18 @@ class CatalogTile extends React.Component {
|
|
|
10518
10484
|
}
|
|
10519
10485
|
return (React.createElement("div", { className: "catalog-tile-pf-badge-container" }, badges.map((badge, index) => (React.createElement("span", { key: `badge-${index}` }, badge)))));
|
|
10520
10486
|
};
|
|
10487
|
+
this.generatedId = getUniqueId('pf-catalog-tile');
|
|
10521
10488
|
}
|
|
10522
10489
|
render() {
|
|
10523
10490
|
const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
|
|
10524
10491
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10525
10492
|
ref, children } = _a, props = __rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
|
|
10526
|
-
return (React.createElement(Card, Object.assign({ component: href ? 'a' : 'div', id: id, href: href || '#', className: css
|
|
10527
|
-
(badges.length > 0 || iconImg || iconClass || icon || onClick) && (React.createElement(CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && {
|
|
10493
|
+
return (React.createElement(Card, Object.assign({ component: href ? 'a' : 'div', id: id || this.generatedId, href: href || '#', className: css('catalog-tile-pf', { featured }, className), isClickable: !!onClick }, props),
|
|
10494
|
+
(badges.length > 0 || iconImg || iconClass || icon || onClick) && (React.createElement(CardHeader, { actions: { actions: badges.length > 0 && this.renderBadges(badges) }, selectableActions: onClick && {
|
|
10495
|
+
selectableActionId: id + '-input',
|
|
10496
|
+
onClickAction: (e) => this.handleClick(e),
|
|
10497
|
+
selectableActionAriaLabelledby: id
|
|
10498
|
+
} },
|
|
10528
10499
|
iconImg && React.createElement("img", { className: "catalog-tile-pf-icon", src: iconImg, alt: iconAlt }),
|
|
10529
10500
|
!iconImg && (iconClass || icon) && React.createElement("span", { className: `catalog-tile-pf-icon ${iconClass}` }, icon))),
|
|
10530
10501
|
React.createElement(CardTitle, { className: "catalog-tile-pf-header" },
|
|
@@ -10532,14 +10503,14 @@ class CatalogTile extends React.Component {
|
|
|
10532
10503
|
vendor && React.createElement("div", { className: "catalog-tile-pf-subtitle" }, vendor)),
|
|
10533
10504
|
(description || children) && (React.createElement(CardBody, { className: "catalog-tile-pf-body" },
|
|
10534
10505
|
description && (React.createElement("div", { className: "catalog-tile-pf-description" },
|
|
10535
|
-
React.createElement("span", { className: css
|
|
10506
|
+
React.createElement("span", { className: css({ 'has-footer': footer }) }, description))),
|
|
10536
10507
|
children)),
|
|
10537
10508
|
footer && React.createElement(CardFooter, { className: "catalog-tile-pf-footer" }, footer)));
|
|
10538
10509
|
}
|
|
10539
10510
|
}
|
|
10540
10511
|
CatalogTile.displayName = 'CatalogTile';
|
|
10541
10512
|
CatalogTile.defaultProps = {
|
|
10542
|
-
id:
|
|
10513
|
+
id: null,
|
|
10543
10514
|
className: '',
|
|
10544
10515
|
featured: false,
|
|
10545
10516
|
onClick: null,
|