@patternfly/react-core 4.192.7 → 4.192.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/esm/components/Label/Label.d.ts.map +1 -1
- package/dist/esm/components/Label/Label.js +38 -25
- package/dist/esm/components/Label/Label.js.map +1 -1
- package/dist/esm/components/Select/Select.d.ts +5 -1
- package/dist/esm/components/Select/Select.d.ts.map +1 -1
- package/dist/esm/components/Select/Select.js +171 -28
- package/dist/esm/components/Select/Select.js.map +1 -1
- package/dist/esm/components/Select/SelectMenu.d.ts.map +1 -1
- package/dist/esm/components/Select/SelectMenu.js +2 -1
- package/dist/esm/components/Select/SelectMenu.js.map +1 -1
- package/dist/esm/components/Select/SelectOption.d.ts.map +1 -1
- package/dist/esm/components/Select/SelectOption.js +6 -1
- package/dist/esm/components/Select/SelectOption.js.map +1 -1
- package/dist/esm/components/Select/SelectToggle.d.ts +3 -2
- package/dist/esm/components/Select/SelectToggle.d.ts.map +1 -1
- package/dist/esm/components/Select/SelectToggle.js +26 -16
- package/dist/esm/components/Select/SelectToggle.js.map +1 -1
- package/dist/esm/components/Select/selectConstants.d.ts +1 -0
- package/dist/esm/components/Select/selectConstants.d.ts.map +1 -1
- package/dist/esm/components/Select/selectConstants.js +1 -0
- package/dist/esm/components/Select/selectConstants.js.map +1 -1
- package/dist/esm/components/Tabs/Tabs.d.ts +2 -5
- package/dist/esm/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/esm/components/Tabs/Tabs.js +3 -3
- package/dist/esm/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/components/TimePicker/TimePicker.d.ts +4 -6
- package/dist/esm/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/esm/components/TimePicker/TimePicker.js +74 -42
- package/dist/esm/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/esm/helpers/util.d.ts +6 -0
- package/dist/esm/helpers/util.d.ts.map +1 -1
- package/dist/esm/helpers/util.js +12 -0
- package/dist/esm/helpers/util.js.map +1 -1
- package/dist/js/components/Label/Label.d.ts.map +1 -1
- package/dist/js/components/Label/Label.js +38 -25
- package/dist/js/components/Label/Label.js.map +1 -1
- package/dist/js/components/Select/Select.d.ts +5 -1
- package/dist/js/components/Select/Select.d.ts.map +1 -1
- package/dist/js/components/Select/Select.js +170 -27
- package/dist/js/components/Select/Select.js.map +1 -1
- package/dist/js/components/Select/SelectMenu.d.ts.map +1 -1
- package/dist/js/components/Select/SelectMenu.js +2 -1
- package/dist/js/components/Select/SelectMenu.js.map +1 -1
- package/dist/js/components/Select/SelectOption.d.ts.map +1 -1
- package/dist/js/components/Select/SelectOption.js +6 -1
- package/dist/js/components/Select/SelectOption.js.map +1 -1
- package/dist/js/components/Select/SelectToggle.d.ts +3 -2
- package/dist/js/components/Select/SelectToggle.d.ts.map +1 -1
- package/dist/js/components/Select/SelectToggle.js +25 -15
- package/dist/js/components/Select/SelectToggle.js.map +1 -1
- package/dist/js/components/Select/selectConstants.d.ts +1 -0
- package/dist/js/components/Select/selectConstants.d.ts.map +1 -1
- package/dist/js/components/Select/selectConstants.js +2 -1
- package/dist/js/components/Select/selectConstants.js.map +1 -1
- package/dist/js/components/Tabs/Tabs.d.ts +2 -5
- package/dist/js/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/js/components/Tabs/Tabs.js +3 -3
- package/dist/js/components/Tabs/Tabs.js.map +1 -1
- package/dist/js/components/TimePicker/TimePicker.d.ts +4 -6
- package/dist/js/components/TimePicker/TimePicker.d.ts.map +1 -1
- package/dist/js/components/TimePicker/TimePicker.js +73 -41
- package/dist/js/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/js/helpers/util.d.ts +6 -0
- package/dist/js/helpers/util.d.ts.map +1 -1
- package/dist/js/helpers/util.js +14 -1
- package/dist/js/helpers/util.js.map +1 -1
- package/dist/umd/react-core.css +64 -110
- package/dist/umd/react-core.js +847 -653
- package/dist/umd/react-core.min.css +64 -110
- package/dist/umd/react-core.min.js +3 -3
- package/package.json +6 -6
- package/src/components/Alert/examples/AlertAsyncLiveRegion.tsx +1 -1
- package/src/components/ApplicationLauncher/examples/ApplicationLauncher.md +11 -577
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherAlignRight.tsx +32 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherAlignTop.tsx +31 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherBasic.tsx +23 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherCustomIcon.tsx +32 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherDisabled.tsx +25 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherDocumentBody.tsx +31 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherFavoritesAndSearch.tsx +105 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherRouterLink.tsx +50 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherSectionsAndIcons.tsx +47 -0
- package/src/components/ApplicationLauncher/examples/ApplicationLauncherTooltip.tsx +35 -0
- package/src/components/Label/Label.tsx +58 -39
- package/src/components/Label/__tests__/Label.test.tsx +19 -1
- package/src/components/Label/__tests__/__snapshots__/Label.test.tsx.snap +109 -0
- package/src/components/Label/examples/Label.md +1 -41
- package/src/components/Label/examples/LabelEditable.tsx +57 -0
- package/src/components/Select/Select.tsx +166 -26
- package/src/components/Select/SelectMenu.tsx +2 -1
- package/src/components/Select/SelectOption.tsx +5 -1
- package/src/components/Select/SelectToggle.tsx +38 -17
- package/src/components/Select/__tests__/__snapshots__/Select.test.tsx.snap +74 -24
- package/src/components/Select/examples/Select.md +5 -1
- package/src/components/Select/selectConstants.tsx +2 -0
- package/src/components/Tabs/Tabs.tsx +6 -9
- package/src/components/TimePicker/TimePicker.tsx +112 -124
- package/src/components/TimePicker/examples/TimePicker.md +16 -10
- package/src/helpers/util.ts +13 -0
package/dist/umd/react-core.js
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
return classes.join(' ');
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
var _default$
|
|
98
|
+
var _default$1p = {
|
|
99
99
|
"backdrop": "pf-c-backdrop",
|
|
100
100
|
"backdropOpen": "pf-c-backdrop__open"
|
|
101
101
|
};
|
|
@@ -1132,6 +1132,18 @@
|
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
1135
|
+
/** This function returns a list of tabbable items in a container
|
|
1136
|
+
*
|
|
1137
|
+
* @param {any} containerRef to the container
|
|
1138
|
+
* @param {string} tababbleSelectors CSS selector string of tabbable items
|
|
1139
|
+
*/
|
|
1140
|
+
function findTabbableElements(containerRef, tababbleSelectors) {
|
|
1141
|
+
const tabbable = containerRef.current.querySelectorAll(tababbleSelectors);
|
|
1142
|
+
const list = Array.prototype.filter.call(tabbable, function (item) {
|
|
1143
|
+
return item.tabIndex >= '0';
|
|
1144
|
+
});
|
|
1145
|
+
return list;
|
|
1146
|
+
}
|
|
1135
1147
|
/** This function is a helper for keyboard navigation through dropdowns.
|
|
1136
1148
|
*
|
|
1137
1149
|
* @param {number} index The index of the element you're on
|
|
@@ -3466,11 +3478,11 @@
|
|
|
3466
3478
|
};
|
|
3467
3479
|
};
|
|
3468
3480
|
|
|
3469
|
-
var _default$
|
|
3481
|
+
var _default$1o = {
|
|
3470
3482
|
"bullseye": "pf-l-bullseye"
|
|
3471
3483
|
};
|
|
3472
3484
|
|
|
3473
|
-
var _default$
|
|
3485
|
+
var _default$1n = {
|
|
3474
3486
|
"aboutModalBox": "pf-c-about-modal-box",
|
|
3475
3487
|
"aboutModalBoxBrand": "pf-c-about-modal-box__brand",
|
|
3476
3488
|
"aboutModalBoxBrandImage": "pf-c-about-modal-box__brand-image",
|
|
@@ -3486,7 +3498,7 @@
|
|
|
3486
3498
|
}
|
|
3487
3499
|
};
|
|
3488
3500
|
|
|
3489
|
-
var _default$
|
|
3501
|
+
var _default$1m = {
|
|
3490
3502
|
"content": "pf-c-content",
|
|
3491
3503
|
"modifiers": {
|
|
3492
3504
|
"visited": "pf-m-visited",
|
|
@@ -3496,13 +3508,13 @@
|
|
|
3496
3508
|
|
|
3497
3509
|
const AboutModalBoxContent = (_a) => {
|
|
3498
3510
|
var { children, className = '', trademark, id, noAboutModalBoxContentContainer = false } = _a, props = __rest$1(_a, ["children", "className", "trademark", "id", "noAboutModalBoxContentContainer"]);
|
|
3499
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
3500
|
-
React__namespace.createElement("div", { className: css('pf-c-about-modal-box__body') }, noAboutModalBoxContentContainer ? children : React__namespace.createElement("div", { className: css(_default$
|
|
3501
|
-
React__namespace.createElement("p", { className: css(_default$
|
|
3511
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1n.aboutModalBoxContent, className), id: id }, props),
|
|
3512
|
+
React__namespace.createElement("div", { className: css('pf-c-about-modal-box__body') }, noAboutModalBoxContentContainer ? children : React__namespace.createElement("div", { className: css(_default$1m.content) }, children)),
|
|
3513
|
+
React__namespace.createElement("p", { className: css(_default$1n.aboutModalBoxStrapline) }, trademark)));
|
|
3502
3514
|
};
|
|
3503
3515
|
AboutModalBoxContent.displayName = 'AboutModalBoxContent';
|
|
3504
3516
|
|
|
3505
|
-
var _default$
|
|
3517
|
+
var _default$1l = {
|
|
3506
3518
|
"modifiers": {
|
|
3507
3519
|
"4xl": "pf-m-4xl",
|
|
3508
3520
|
"3xl": "pf-m-3xl",
|
|
@@ -3536,13 +3548,13 @@
|
|
|
3536
3548
|
const Title = (_a) => {
|
|
3537
3549
|
var { className = '', children = '', headingLevel: HeadingLevel, size = headingLevelSizeMap[HeadingLevel], ouiaId, ouiaSafe = true } = _a, props = __rest$1(_a, ["className", "children", "headingLevel", "size", "ouiaId", "ouiaSafe"]);
|
|
3538
3550
|
const ouiaProps = useOUIAProps(Title.displayName, ouiaId, ouiaSafe);
|
|
3539
|
-
return (React__namespace.createElement(HeadingLevel, Object.assign({}, ouiaProps, props, { className: css(_default$
|
|
3551
|
+
return (React__namespace.createElement(HeadingLevel, Object.assign({}, ouiaProps, props, { className: css(_default$1l.title, size && _default$1l.modifiers[size], className) }), children));
|
|
3540
3552
|
};
|
|
3541
3553
|
Title.displayName = 'Title';
|
|
3542
3554
|
|
|
3543
3555
|
const AboutModalBoxHeader = (_a) => {
|
|
3544
3556
|
var { className = '', productName = '', id } = _a, props = __rest$1(_a, ["className", "productName", "id"]);
|
|
3545
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
3557
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1n.aboutModalBoxHeader, className) }, props),
|
|
3546
3558
|
React__namespace.createElement(Title, { headingLevel: "h1", size: "4xl", id: id }, productName)));
|
|
3547
3559
|
};
|
|
3548
3560
|
AboutModalBoxHeader.displayName = 'AboutModalBoxHeader';
|
|
@@ -3560,18 +3572,18 @@
|
|
|
3560
3572
|
/* eslint-disable camelcase */
|
|
3561
3573
|
backgroundImageSrc !== ''
|
|
3562
3574
|
? { [c_about_modal_box__hero_sm_BackgroundImage$1.name]: `url(${backgroundImageSrc})` }
|
|
3563
|
-
: {}, className: css(_default$
|
|
3575
|
+
: {}, className: css(_default$1n.aboutModalBoxHero, className) }, props)));
|
|
3564
3576
|
};
|
|
3565
3577
|
AboutModalBoxHero.displayName = 'AboutModalBoxHero';
|
|
3566
3578
|
|
|
3567
3579
|
const AboutModalBoxBrand = (_a) => {
|
|
3568
3580
|
var { className = '', src = '', alt } = _a, props = __rest$1(_a, ["className", "src", "alt"]);
|
|
3569
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
3570
|
-
React__namespace.createElement("img", { className: css(_default$
|
|
3581
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1n.aboutModalBoxBrand, className) }, props),
|
|
3582
|
+
React__namespace.createElement("img", { className: css(_default$1n.aboutModalBoxBrandImage), src: src, alt: alt })));
|
|
3571
3583
|
};
|
|
3572
3584
|
AboutModalBoxBrand.displayName = 'AboutModalBoxBrand';
|
|
3573
3585
|
|
|
3574
|
-
var _default$
|
|
3586
|
+
var _default$1k = {
|
|
3575
3587
|
"button": "pf-c-button",
|
|
3576
3588
|
"buttonIcon": "pf-c-button__icon",
|
|
3577
3589
|
"buttonProgress": "pf-c-button__progress",
|
|
@@ -3601,7 +3613,7 @@
|
|
|
3601
3613
|
"spinner": "pf-c-spinner"
|
|
3602
3614
|
};
|
|
3603
3615
|
|
|
3604
|
-
var _default$
|
|
3616
|
+
var _default$1j = {
|
|
3605
3617
|
"modifiers": {
|
|
3606
3618
|
"sm": "pf-m-sm",
|
|
3607
3619
|
"md": "pf-m-md",
|
|
@@ -3627,10 +3639,10 @@
|
|
|
3627
3639
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3628
3640
|
className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', isSVG = false, diameter } = _a, props = __rest$1(_a, ["className", "size", 'aria-valuetext', "isSVG", "diameter"]);
|
|
3629
3641
|
const Component = isSVG ? 'svg' : 'span';
|
|
3630
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
3631
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
3632
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
3633
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
3642
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$1j.spinner, _default$1j.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText }, (isSVG && { viewBox: '0 0 100 100' }), (diameter && { style: { '--pf-c-spinner--diameter': diameter } }), props), isSVG ? (React__namespace.createElement("circle", { className: _default$1j.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" })) : (React__namespace.createElement(React__namespace.Fragment, null,
|
|
3643
|
+
React__namespace.createElement("span", { className: css(_default$1j.spinnerClipper) }),
|
|
3644
|
+
React__namespace.createElement("span", { className: css(_default$1j.spinnerLeadBall) }),
|
|
3645
|
+
React__namespace.createElement("span", { className: css(_default$1j.spinnerTailBall) })))));
|
|
3634
3646
|
};
|
|
3635
3647
|
Spinner.displayName = 'Spinner';
|
|
3636
3648
|
|
|
@@ -3671,12 +3683,12 @@
|
|
|
3671
3683
|
return 0;
|
|
3672
3684
|
}
|
|
3673
3685
|
};
|
|
3674
|
-
return (React__namespace.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(_default$
|
|
3675
|
-
isLoading && (React__namespace.createElement("span", { className: css(_default$
|
|
3686
|
+
return (React__namespace.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(_default$1k.button, _default$1k.modifiers[variant], isBlock && _default$1k.modifiers.block, isDisabled && _default$1k.modifiers.disabled, isAriaDisabled && _default$1k.modifiers.ariaDisabled, isActive && _default$1k.modifiers.active, isInline && variant === exports.ButtonVariant.link && _default$1k.modifiers.inline, isDanger && (variant === exports.ButtonVariant.secondary || variant === exports.ButtonVariant.link) && _default$1k.modifiers.danger, isLoading !== null && _default$1k.modifiers.progress, isLoading && _default$1k.modifiers.inProgress, isSmall && _default$1k.modifiers.small, isLarge && _default$1k.modifiers.displayLg, className), disabled: isButtonElement ? isDisabled : null, tabIndex: tabIndex !== null ? tabIndex : getDefaultTabIdx(), type: isButtonElement || isInlineSpan ? type : null, role: isInlineSpan ? 'button' : null, ref: innerRef }, ouiaProps),
|
|
3687
|
+
isLoading && (React__namespace.createElement("span", { className: css(_default$1k.buttonProgress) },
|
|
3676
3688
|
React__namespace.createElement(Spinner, { size: exports.spinnerSize.md, "aria-valuetext": spinnerAriaValueText }))),
|
|
3677
|
-
variant !== exports.ButtonVariant.plain && icon && iconPosition === 'left' && (React__namespace.createElement("span", { className: css(_default$
|
|
3689
|
+
variant !== exports.ButtonVariant.plain && icon && iconPosition === 'left' && (React__namespace.createElement("span", { className: css(_default$1k.buttonIcon, _default$1k.modifiers.start) }, icon)),
|
|
3678
3690
|
children,
|
|
3679
|
-
variant !== exports.ButtonVariant.plain && icon && iconPosition === 'right' && (React__namespace.createElement("span", { className: css(_default$
|
|
3691
|
+
variant !== exports.ButtonVariant.plain && icon && iconPosition === 'right' && (React__namespace.createElement("span", { className: css(_default$1k.buttonIcon, _default$1k.modifiers.end) }, icon))));
|
|
3680
3692
|
};
|
|
3681
3693
|
const Button = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(ButtonBase, Object.assign({ innerRef: ref }, props))));
|
|
3682
3694
|
Button.displayName = 'Button';
|
|
@@ -3776,7 +3788,7 @@
|
|
|
3776
3788
|
|
|
3777
3789
|
const AboutModalBoxCloseButton = (_a) => {
|
|
3778
3790
|
var { className = '', onClose = () => undefined, 'aria-label': ariaLabel = 'Close Dialog' } = _a, props = __rest$1(_a, ["className", "onClose", 'aria-label']);
|
|
3779
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
3791
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1n.aboutModalBoxClose, className) }, props),
|
|
3780
3792
|
React__namespace.createElement(Button, { variant: "plain", onClick: onClose, "aria-label": ariaLabel },
|
|
3781
3793
|
React__namespace.createElement(TimesIcon$1, null))));
|
|
3782
3794
|
};
|
|
@@ -3784,13 +3796,13 @@
|
|
|
3784
3796
|
|
|
3785
3797
|
const AboutModalBox = (_a) => {
|
|
3786
3798
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
3787
|
-
return (React__namespace.createElement("div", Object.assign({ role: "dialog", "aria-modal": "true", className: css(_default$
|
|
3799
|
+
return (React__namespace.createElement("div", Object.assign({ role: "dialog", "aria-modal": "true", className: css(_default$1n.aboutModalBox, className) }, props), children));
|
|
3788
3800
|
};
|
|
3789
3801
|
AboutModalBox.displayName = 'AboutModalBox';
|
|
3790
3802
|
|
|
3791
3803
|
const Backdrop = (_a) => {
|
|
3792
3804
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
3793
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
3805
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$1p.backdrop, className) }), children));
|
|
3794
3806
|
};
|
|
3795
3807
|
Backdrop.displayName = 'Backdrop';
|
|
3796
3808
|
|
|
@@ -3800,7 +3812,7 @@
|
|
|
3800
3812
|
return null;
|
|
3801
3813
|
}
|
|
3802
3814
|
return (React__namespace.createElement(Backdrop, null,
|
|
3803
|
-
React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true }, className: css(_default$
|
|
3815
|
+
React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true }, className: css(_default$1o.bullseye) },
|
|
3804
3816
|
React__namespace.createElement(AboutModalBox, { className: className, "aria-labelledby": aboutModalBoxHeaderId, "aria-describedby": aboutModalBoxContentId },
|
|
3805
3817
|
React__namespace.createElement(AboutModalBoxBrand, { src: brandImageSrc, alt: brandImageAlt }),
|
|
3806
3818
|
React__namespace.createElement(AboutModalBoxCloseButton, { "aria-label": closeButtonAriaLabel, onClose: onClose }),
|
|
@@ -3852,20 +3864,20 @@
|
|
|
3852
3864
|
target.appendChild(container);
|
|
3853
3865
|
target.addEventListener('keydown', this.handleEscKeyClick, false);
|
|
3854
3866
|
if (this.props.isOpen) {
|
|
3855
|
-
target.classList.add(css(_default$
|
|
3867
|
+
target.classList.add(css(_default$1p.backdropOpen));
|
|
3856
3868
|
}
|
|
3857
3869
|
else {
|
|
3858
|
-
target.classList.remove(css(_default$
|
|
3870
|
+
target.classList.remove(css(_default$1p.backdropOpen));
|
|
3859
3871
|
}
|
|
3860
3872
|
}
|
|
3861
3873
|
componentDidUpdate() {
|
|
3862
3874
|
const target = this.getElement(this.props.appendTo);
|
|
3863
3875
|
if (this.props.isOpen) {
|
|
3864
|
-
target.classList.add(css(_default$
|
|
3876
|
+
target.classList.add(css(_default$1p.backdropOpen));
|
|
3865
3877
|
this.toggleSiblingsFromScreenReaders(true);
|
|
3866
3878
|
}
|
|
3867
3879
|
else {
|
|
3868
|
-
target.classList.remove(css(_default$
|
|
3880
|
+
target.classList.remove(css(_default$1p.backdropOpen));
|
|
3869
3881
|
this.toggleSiblingsFromScreenReaders(false);
|
|
3870
3882
|
}
|
|
3871
3883
|
}
|
|
@@ -3875,7 +3887,7 @@
|
|
|
3875
3887
|
target.removeChild(this.state.container);
|
|
3876
3888
|
}
|
|
3877
3889
|
target.removeEventListener('keydown', this.handleEscKeyClick, false);
|
|
3878
|
-
target.classList.remove(css(_default$
|
|
3890
|
+
target.classList.remove(css(_default$1p.backdropOpen));
|
|
3879
3891
|
}
|
|
3880
3892
|
render() {
|
|
3881
3893
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -3900,7 +3912,7 @@
|
|
|
3900
3912
|
appendTo: null
|
|
3901
3913
|
};
|
|
3902
3914
|
|
|
3903
|
-
var _default$
|
|
3915
|
+
var _default$1i = {
|
|
3904
3916
|
"accordion": "pf-c-accordion",
|
|
3905
3917
|
"accordionExpandedContent": "pf-c-accordion__expanded-content",
|
|
3906
3918
|
"accordionExpandedContentBody": "pf-c-accordion__expanded-content-body",
|
|
@@ -3920,7 +3932,7 @@
|
|
|
3920
3932
|
const Accordion = (_a) => {
|
|
3921
3933
|
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"]);
|
|
3922
3934
|
const AccordionList = asDefinitionList ? 'dl' : 'div';
|
|
3923
|
-
return (React__namespace.createElement(AccordionList, Object.assign({ className: css(_default$
|
|
3935
|
+
return (React__namespace.createElement(AccordionList, Object.assign({ className: css(_default$1i.accordion, isBordered && _default$1i.modifiers.bordered, displaySize === 'large' && _default$1i.modifiers.displayLg, className), "aria-label": ariaLabel }, props),
|
|
3924
3936
|
React__namespace.createElement(AccordionContext.Provider, { value: {
|
|
3925
3937
|
ContentContainer: asDefinitionList ? 'dd' : 'div',
|
|
3926
3938
|
ToggleContainer: asDefinitionList ? 'dt' : headingLevel
|
|
@@ -3928,14 +3940,14 @@
|
|
|
3928
3940
|
};
|
|
3929
3941
|
Accordion.displayName = 'Accordion';
|
|
3930
3942
|
|
|
3931
|
-
const AccordionExpandedContentBody = ({ children = null }) => React__namespace.createElement("div", { className: css(_default$
|
|
3943
|
+
const AccordionExpandedContentBody = ({ children = null }) => React__namespace.createElement("div", { className: css(_default$1i.accordionExpandedContentBody) }, children);
|
|
3932
3944
|
AccordionExpandedContentBody.displayName = 'AccordionExpandedContentBody';
|
|
3933
3945
|
|
|
3934
3946
|
const AccordionContent = (_a) => {
|
|
3935
3947
|
var { className = '', children = null, id = '', isHidden = false, isFixed = false, isCustomContent = false, 'aria-label': ariaLabel = '', component } = _a, props = __rest$1(_a, ["className", "children", "id", "isHidden", "isFixed", "isCustomContent", 'aria-label', "component"]);
|
|
3936
3948
|
return (React__namespace.createElement(AccordionContext.Consumer, null, ({ ContentContainer }) => {
|
|
3937
3949
|
const Container = component || ContentContainer;
|
|
3938
|
-
return (React__namespace.createElement(Container, Object.assign({ id: id, className: css(_default$
|
|
3950
|
+
return (React__namespace.createElement(Container, Object.assign({ id: id, className: css(_default$1i.accordionExpandedContent, isFixed && _default$1i.modifiers.fixed, !isHidden && _default$1i.modifiers.expanded, className), hidden: isHidden, "aria-label": ariaLabel }, props), isCustomContent ? children : React__namespace.createElement(AccordionExpandedContentBody, null, children)));
|
|
3939
3951
|
}));
|
|
3940
3952
|
};
|
|
3941
3953
|
AccordionContent.displayName = 'AccordionContent';
|
|
@@ -3961,15 +3973,15 @@
|
|
|
3961
3973
|
return (React__namespace.createElement(AccordionContext.Consumer, null, ({ ToggleContainer }) => {
|
|
3962
3974
|
const Container = component || ToggleContainer;
|
|
3963
3975
|
return (React__namespace.createElement(Container, null,
|
|
3964
|
-
React__namespace.createElement("button", Object.assign({ id: id, className: css(_default$
|
|
3965
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
3966
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
3976
|
+
React__namespace.createElement("button", Object.assign({ id: id, className: css(_default$1i.accordionToggle, isExpanded && _default$1i.modifiers.expanded, className), "aria-expanded": isExpanded, type: "button" }, props),
|
|
3977
|
+
React__namespace.createElement("span", { className: css(_default$1i.accordionToggleText) }, children),
|
|
3978
|
+
React__namespace.createElement("span", { className: css(_default$1i.accordionToggleIcon) },
|
|
3967
3979
|
React__namespace.createElement(AngleRightIcon$1, null)))));
|
|
3968
3980
|
}));
|
|
3969
3981
|
};
|
|
3970
3982
|
AccordionToggle.displayName = 'AccordionToggle';
|
|
3971
3983
|
|
|
3972
|
-
var _default$
|
|
3984
|
+
var _default$1h = {
|
|
3973
3985
|
"actionList": "pf-c-action-list",
|
|
3974
3986
|
"actionListGroup": "pf-c-action-list__group",
|
|
3975
3987
|
"modifiers": {
|
|
@@ -3979,13 +3991,13 @@
|
|
|
3979
3991
|
|
|
3980
3992
|
const ActionList = (_a) => {
|
|
3981
3993
|
var { children, isIconList, className = '' } = _a, props = __rest$1(_a, ["children", "isIconList", "className"]);
|
|
3982
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
3994
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1h.actionList, isIconList && _default$1h.modifiers.icons, className) }, props), children));
|
|
3983
3995
|
};
|
|
3984
3996
|
ActionList.displayName = 'ActionList';
|
|
3985
3997
|
|
|
3986
3998
|
const ActionListGroup = (_a) => {
|
|
3987
3999
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
3988
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
4000
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1h.actionListGroup, className) }, props), children));
|
|
3989
4001
|
};
|
|
3990
4002
|
ActionListGroup.displayName = 'ActionListGroup';
|
|
3991
4003
|
|
|
@@ -3995,7 +4007,7 @@
|
|
|
3995
4007
|
};
|
|
3996
4008
|
ActionListItem.displayName = 'ActionListItem';
|
|
3997
4009
|
|
|
3998
|
-
var _default$
|
|
4010
|
+
var _default$1g = {
|
|
3999
4011
|
"alert": "pf-c-alert",
|
|
4000
4012
|
"alertAction": "pf-c-alert__action",
|
|
4001
4013
|
"alertActionGroup": "pf-c-alert__action-group",
|
|
@@ -4019,7 +4031,7 @@
|
|
|
4019
4031
|
}
|
|
4020
4032
|
};
|
|
4021
4033
|
|
|
4022
|
-
var _default$
|
|
4034
|
+
var _default$1f = {
|
|
4023
4035
|
"hidden": "pf-u-hidden",
|
|
4024
4036
|
"hiddenOnLg": "pf-u-hidden-on-lg",
|
|
4025
4037
|
"hiddenOnMd": "pf-u-hidden-on-md",
|
|
@@ -4115,7 +4127,7 @@
|
|
|
4115
4127
|
const AlertIcon = (_a) => {
|
|
4116
4128
|
var { variant, customIcon, className = '' } = _a, props = __rest$1(_a, ["variant", "customIcon", "className"]);
|
|
4117
4129
|
const Icon = variantIcons$2[variant];
|
|
4118
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
4130
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$1g.alertIcon, className) }), customIcon || React__namespace.createElement(Icon, null)));
|
|
4119
4131
|
};
|
|
4120
4132
|
|
|
4121
4133
|
const AlertContext = React__namespace.createContext(null);
|
|
@@ -4127,7 +4139,7 @@
|
|
|
4127
4139
|
};
|
|
4128
4140
|
var maxLines$2 = c_alert__title_max_lines;
|
|
4129
4141
|
|
|
4130
|
-
var _default$
|
|
4142
|
+
var _default$1e = {
|
|
4131
4143
|
"modifiers": {
|
|
4132
4144
|
"top": "pf-m-top",
|
|
4133
4145
|
"topLeft": "pf-m-top-left",
|
|
@@ -4150,13 +4162,13 @@
|
|
|
4150
4162
|
|
|
4151
4163
|
const TooltipContent = (_a) => {
|
|
4152
4164
|
var { className, children, isLeftAligned } = _a, props = __rest$1(_a, ["className", "children", "isLeftAligned"]);
|
|
4153
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
4165
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$1e.tooltipContent, isLeftAligned && _default$1e.modifiers.textAlignLeft, className) }, props), children));
|
|
4154
4166
|
};
|
|
4155
4167
|
TooltipContent.displayName = 'TooltipContent';
|
|
4156
4168
|
|
|
4157
4169
|
const TooltipArrow = (_a) => {
|
|
4158
4170
|
var { className } = _a, props = __rest$1(_a, ["className"]);
|
|
4159
|
-
return React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
4171
|
+
return React__namespace.createElement("div", Object.assign({ className: css(_default$1e.tooltipArrow, className) }, props));
|
|
4160
4172
|
};
|
|
4161
4173
|
TooltipArrow.displayName = 'TooltipArrow';
|
|
4162
4174
|
|
|
@@ -4248,13 +4260,13 @@
|
|
|
4248
4260
|
}, exitDelay);
|
|
4249
4261
|
};
|
|
4250
4262
|
const positionModifiers = {
|
|
4251
|
-
top: _default$
|
|
4252
|
-
bottom: _default$
|
|
4253
|
-
left: _default$
|
|
4254
|
-
right: _default$
|
|
4263
|
+
top: _default$1e.modifiers.top,
|
|
4264
|
+
bottom: _default$1e.modifiers.bottom,
|
|
4265
|
+
left: _default$1e.modifiers.left,
|
|
4266
|
+
right: _default$1e.modifiers.right
|
|
4255
4267
|
};
|
|
4256
4268
|
const hasCustomMaxWidth = maxWidth !== tooltipMaxWidth.value;
|
|
4257
|
-
const content = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
4269
|
+
const content = (React__namespace.createElement("div", Object.assign({ className: css(_default$1e.tooltip, className), role: "tooltip", id: id, style: {
|
|
4258
4270
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
4259
4271
|
opacity,
|
|
4260
4272
|
transition: getOpacityTransition(animationDuration)
|
|
@@ -4291,7 +4303,7 @@
|
|
|
4291
4303
|
var { 'aria-label': ariaLabel, variantLabel, onToggleExpand, isExpanded } = _a, props = __rest$1(_a, ['aria-label', "variantLabel", "onToggleExpand", "isExpanded"]);
|
|
4292
4304
|
const { title, variantLabel: alertVariantLabel } = React__namespace.useContext(AlertContext);
|
|
4293
4305
|
return (React__namespace.createElement(Button, Object.assign({ variant: exports.ButtonVariant.plain, onClick: onToggleExpand, "aria-expanded": isExpanded, "aria-label": ariaLabel === '' ? `Toggle ${variantLabel || alertVariantLabel} alert: ${title}` : ariaLabel }, props),
|
|
4294
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
4306
|
+
React__namespace.createElement("span", { className: css(_default$1g.alertToggleIcon) },
|
|
4295
4307
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": "true" }))));
|
|
4296
4308
|
};
|
|
4297
4309
|
AlertToggleExpandButton.displayName = 'AlertToggleExpandButton';
|
|
@@ -4308,7 +4320,7 @@
|
|
|
4308
4320
|
var { variant = exports.AlertVariant.default, isInline = false, isPlain = false, isLiveRegion = false, variantLabel = `${capitalize(variant)} alert:`, 'aria-label': ariaLabel = `${capitalize(variant)} Alert`, actionClose, actionLinks, title, titleHeadingLevel: TitleHeadingLevel = 'h4', children = '', className = '', ouiaId, ouiaSafe = true, timeout = false, timeoutAnimation = 3000, onTimeout = () => { }, truncateTitle = 0, tooltipPosition, customIcon, isExpandable = false, toggleAriaLabel = `${capitalize(variant)} alert details`, onMouseEnter = () => { }, onMouseLeave = () => { } } = _a, props = __rest$1(_a, ["variant", "isInline", "isPlain", "isLiveRegion", "variantLabel", 'aria-label', "actionClose", "actionLinks", "title", "titleHeadingLevel", "children", "className", "ouiaId", "ouiaSafe", "timeout", "timeoutAnimation", "onTimeout", "truncateTitle", "tooltipPosition", "customIcon", "isExpandable", "toggleAriaLabel", "onMouseEnter", "onMouseLeave"]);
|
|
4309
4321
|
const ouiaProps = useOUIAProps(Alert.displayName, ouiaId, ouiaSafe, variant);
|
|
4310
4322
|
const getHeadingContent = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4311
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
4323
|
+
React__namespace.createElement("span", { className: css(_default$1f.screenReader) }, variantLabel),
|
|
4312
4324
|
title));
|
|
4313
4325
|
const titleRef = React__namespace.useRef(null);
|
|
4314
4326
|
const divRef = React__namespace.useRef();
|
|
@@ -4375,20 +4387,20 @@
|
|
|
4375
4387
|
if (dismissed) {
|
|
4376
4388
|
return null;
|
|
4377
4389
|
}
|
|
4378
|
-
const Title = (React__namespace.createElement(TitleHeadingLevel, Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css(_default$
|
|
4379
|
-
return (React__namespace.createElement("div", Object.assign({ ref: divRef, className: css(_default$
|
|
4390
|
+
const Title = (React__namespace.createElement(TitleHeadingLevel, Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css(_default$1g.alertTitle, truncateTitle && _default$1g.modifiers.truncate) }), getHeadingContent));
|
|
4391
|
+
return (React__namespace.createElement("div", Object.assign({ ref: divRef, className: css(_default$1g.alert, isInline && _default$1g.modifiers.inline, isPlain && _default$1g.modifiers.plain, isExpandable && _default$1g.modifiers.expandable, isExpanded && _default$1g.modifiers.expanded, _default$1g.modifiers[variant], className), "aria-label": ariaLabel }, ouiaProps, (isLiveRegion && {
|
|
4380
4392
|
'aria-live': 'polite',
|
|
4381
4393
|
'aria-atomic': 'false'
|
|
4382
4394
|
}), { onMouseEnter: myOnMouseEnter, onMouseLeave: myOnMouseLeave }, props),
|
|
4383
4395
|
isExpandable && (React__namespace.createElement(AlertContext.Provider, { value: { title, variantLabel } },
|
|
4384
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
4396
|
+
React__namespace.createElement("div", { className: css(_default$1g.alertToggle) },
|
|
4385
4397
|
React__namespace.createElement(AlertToggleExpandButton, { isExpanded: isExpanded, onToggleExpand: onToggleExpand, "aria-label": toggleAriaLabel })))),
|
|
4386
4398
|
React__namespace.createElement(AlertIcon, { variant: variant, customIcon: customIcon }),
|
|
4387
4399
|
isTooltipVisible ? (React__namespace.createElement(Tooltip, { content: getHeadingContent, position: tooltipPosition }, Title)) : (Title),
|
|
4388
4400
|
actionClose && (React__namespace.createElement(AlertContext.Provider, { value: { title, variantLabel } },
|
|
4389
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
4390
|
-
children && (!isExpandable || (isExpandable && isExpanded)) && (React__namespace.createElement("div", { className: css(_default$
|
|
4391
|
-
actionLinks && React__namespace.createElement("div", { className: css(_default$
|
|
4401
|
+
React__namespace.createElement("div", { className: css(_default$1g.alertAction) }, actionClose))),
|
|
4402
|
+
children && (!isExpandable || (isExpandable && isExpanded)) && (React__namespace.createElement("div", { className: css(_default$1g.alertDescription) }, children)),
|
|
4403
|
+
actionLinks && React__namespace.createElement("div", { className: css(_default$1g.alertActionGroup) }, actionLinks)));
|
|
4392
4404
|
};
|
|
4393
4405
|
Alert.displayName = 'Alert';
|
|
4394
4406
|
|
|
@@ -4407,7 +4419,7 @@
|
|
|
4407
4419
|
};
|
|
4408
4420
|
AlertActionLink.displayName = 'AlertActionLink';
|
|
4409
4421
|
|
|
4410
|
-
var _default$
|
|
4422
|
+
var _default$1d = {
|
|
4411
4423
|
"alertGroup": "pf-c-alert-group",
|
|
4412
4424
|
"modifiers": {
|
|
4413
4425
|
"toast": "pf-m-toast"
|
|
@@ -4416,7 +4428,7 @@
|
|
|
4416
4428
|
|
|
4417
4429
|
const AlertGroupInline = (_a) => {
|
|
4418
4430
|
var { className, children, isToast, isLiveRegion } = _a, rest = __rest$1(_a, ["className", "children", "isToast", "isLiveRegion"]);
|
|
4419
|
-
return (React__namespace.createElement("ul", Object.assign({ "aria-live": isLiveRegion ? 'polite' : null, "aria-atomic": isLiveRegion ? false : null, className: css(_default$
|
|
4431
|
+
return (React__namespace.createElement("ul", Object.assign({ "aria-live": isLiveRegion ? 'polite' : null, "aria-atomic": isLiveRegion ? false : null, className: css(_default$1d.alertGroup, className, isToast ? _default$1d.modifiers.toast : '') }, rest), React__namespace.Children.toArray(children).map((Alert, index) => (React__namespace.createElement("li", { key: index }, Alert)))));
|
|
4420
4432
|
};
|
|
4421
4433
|
AlertGroupInline.displayName = 'AlertGroupInline';
|
|
4422
4434
|
|
|
@@ -4461,7 +4473,7 @@
|
|
|
4461
4473
|
}
|
|
4462
4474
|
AlertGroup.displayName = 'AlertGroup';
|
|
4463
4475
|
|
|
4464
|
-
var _default$
|
|
4476
|
+
var _default$1c = {
|
|
4465
4477
|
"appLauncher": "pf-c-app-launcher",
|
|
4466
4478
|
"appLauncherGroup": "pf-c-app-launcher__group",
|
|
4467
4479
|
"appLauncherGroupTitle": "pf-c-app-launcher__group-title",
|
|
@@ -4487,7 +4499,7 @@
|
|
|
4487
4499
|
}
|
|
4488
4500
|
};
|
|
4489
4501
|
|
|
4490
|
-
var _default$
|
|
4502
|
+
var _default$1b = {
|
|
4491
4503
|
"formControl": "pf-c-form-control",
|
|
4492
4504
|
"modifiers": {
|
|
4493
4505
|
"success": "pf-m-success",
|
|
@@ -4516,7 +4528,7 @@
|
|
|
4516
4528
|
|
|
4517
4529
|
var ThIcon$1 = ThIcon;
|
|
4518
4530
|
|
|
4519
|
-
var _default$
|
|
4531
|
+
var _default$1a = {
|
|
4520
4532
|
"badge": "pf-c-badge",
|
|
4521
4533
|
"check": "pf-c-check",
|
|
4522
4534
|
"divider": "pf-c-divider",
|
|
@@ -4697,12 +4709,12 @@
|
|
|
4697
4709
|
return (React__namespace.createElement(DropdownArrowContext.Provider, { value: {
|
|
4698
4710
|
keyHandler: this.childKeyHandler,
|
|
4699
4711
|
sendRef: this.sendRef
|
|
4700
|
-
} }, component === 'div' ? (React__namespace.createElement(DropdownContext.Consumer, null, ({ onSelect, menuClass }) => (React__namespace.createElement("div", { className: css(menuClass, position === exports.DropdownPosition.right && _default$
|
|
4712
|
+
} }, component === 'div' ? (React__namespace.createElement(DropdownContext.Consumer, null, ({ onSelect, menuClass }) => (React__namespace.createElement("div", { className: css(menuClass, position === exports.DropdownPosition.right && _default$1a.modifiers.alignRight, formatBreakpointMods(alignments, _default$1a, 'align-'), className), hidden: !isOpen, onClick: event => onSelect && onSelect(event), ref: setMenuComponentRef }, children)))) : ((isGrouped && (React__namespace.createElement(DropdownContext.Consumer, null, ({ menuClass, menuComponent }) => {
|
|
4701
4713
|
const MenuComponent = (menuComponent || 'div');
|
|
4702
|
-
return (React__namespace.createElement(MenuComponent, Object.assign({}, props, { className: css(menuClass, position === exports.DropdownPosition.right && _default$
|
|
4714
|
+
return (React__namespace.createElement(MenuComponent, Object.assign({}, props, { className: css(menuClass, position === exports.DropdownPosition.right && _default$1a.modifiers.alignRight, formatBreakpointMods(alignments, _default$1a, 'align-'), className), hidden: !isOpen, role: "menu", ref: setMenuComponentRef }), this.extendChildren()));
|
|
4703
4715
|
}))) || (React__namespace.createElement(DropdownContext.Consumer, null, ({ menuClass, menuComponent }) => {
|
|
4704
4716
|
const MenuComponent = (menuComponent || component);
|
|
4705
|
-
return (React__namespace.createElement(MenuComponent, Object.assign({}, props, { className: css(menuClass, position === exports.DropdownPosition.right && _default$
|
|
4717
|
+
return (React__namespace.createElement(MenuComponent, Object.assign({}, props, { className: css(menuClass, position === exports.DropdownPosition.right && _default$1a.modifiers.alignRight, formatBreakpointMods(alignments, _default$1a, 'align-'), className), hidden: !isOpen, role: "menu", ref: setMenuComponentRef }), this.extendChildren()));
|
|
4706
4718
|
})))));
|
|
4707
4719
|
}
|
|
4708
4720
|
}
|
|
@@ -4717,7 +4729,7 @@
|
|
|
4717
4729
|
isGrouped: false,
|
|
4718
4730
|
setMenuComponentRef: null
|
|
4719
4731
|
};
|
|
4720
|
-
DropdownMenu.validToggleClasses = [_default$
|
|
4732
|
+
DropdownMenu.validToggleClasses = [_default$1a.dropdownToggle, _default$1a.dropdownToggleButton];
|
|
4721
4733
|
DropdownMenu.focusFirstRef = (refCollection) => {
|
|
4722
4734
|
if (refCollection && refCollection[0] && refCollection[0].focus) {
|
|
4723
4735
|
setTimeout(() => refCollection[0].focus());
|
|
@@ -4769,8 +4781,8 @@
|
|
|
4769
4781
|
return (React__namespace.createElement(DropdownContext.Consumer, null, ({ baseClass, baseComponent, id: contextId, ouiaId, ouiaComponentType, ouiaSafe, alignments }) => {
|
|
4770
4782
|
const BaseComponent = baseComponent;
|
|
4771
4783
|
const menuContainer = (React__namespace.createElement(DropdownMenu, { setMenuComponentRef: this.setMenuComponentRef, component: component, isOpen: isOpen, position: position, "aria-labelledby": contextId ? `${contextId}-toggle` : id, isGrouped: isGrouped, autoFocus: openedOnEnter && autoFocus, alignments: alignments }, renderedContent));
|
|
4772
|
-
const popperContainer = (React__namespace.createElement("div", { className: css(baseClass, direction === exports.DropdownDirection.up && _default$
|
|
4773
|
-
const mainContainer = (React__namespace.createElement(BaseComponent, Object.assign({}, props, { className: css(baseClass, direction === exports.DropdownDirection.up && _default$
|
|
4784
|
+
const popperContainer = (React__namespace.createElement("div", { className: css(baseClass, direction === exports.DropdownDirection.up && _default$1a.modifiers.top, position === exports.DropdownPosition.right && _default$1a.modifiers.alignRight, isOpen && _default$1a.modifiers.expanded, className) }, isOpen && menuContainer));
|
|
4785
|
+
const mainContainer = (React__namespace.createElement(BaseComponent, Object.assign({}, props, { className: css(baseClass, direction === exports.DropdownDirection.up && _default$1a.modifiers.top, position === exports.DropdownPosition.right && _default$1a.modifiers.alignRight, isOpen && _default$1a.modifiers.expanded, isFullHeight && _default$1a.modifiers.fullHeight, className), ref: this.baseComponentRef }, getOUIAProps(ouiaComponentType, ouiaId, ouiaSafe)),
|
|
4774
4786
|
React__namespace.Children.map(toggle, oneToggle => React__namespace.cloneElement(oneToggle, {
|
|
4775
4787
|
parentRef: this.baseComponentRef,
|
|
4776
4788
|
getMenuRef: this.getMenuComponentRef,
|
|
@@ -4817,7 +4829,7 @@
|
|
|
4817
4829
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4818
4830
|
ref, // Types of Ref are different for React.FC vs React.Component
|
|
4819
4831
|
ouiaId, ouiaSafe, alignments, contextProps } = _a, props = __rest$1(_a, ["onSelect", "ref", "ouiaId", "ouiaSafe", "alignments", "contextProps"]);
|
|
4820
|
-
return (React__namespace.createElement(DropdownContext.Provider, { value: Object.assign({ onSelect: event => onSelect && onSelect(event), toggleTextClass: _default$
|
|
4832
|
+
return (React__namespace.createElement(DropdownContext.Provider, { value: Object.assign({ onSelect: event => onSelect && onSelect(event), toggleTextClass: _default$1a.dropdownToggleText, toggleIconClass: _default$1a.dropdownToggleImage, toggleIndicatorClass: _default$1a.dropdownToggleIcon, menuClass: _default$1a.dropdownMenu, itemClass: _default$1a.dropdownMenuItem, toggleClass: _default$1a.dropdownToggle, baseClass: _default$1a.dropdown, baseComponent: 'div', sectionClass: _default$1a.dropdownGroup, sectionTitleClass: _default$1a.dropdownGroupTitle, sectionComponent: 'section', disabledClass: _default$1a.modifiers.disabled, plainTextClass: _default$1a.modifiers.text, ouiaId: useOUIAId(Dropdown.displayName, ouiaId), ouiaSafe, ouiaComponentType: Dropdown.displayName, alignments }, contextProps) },
|
|
4821
4833
|
React__namespace.createElement(DropdownWithContext, Object.assign({}, props))));
|
|
4822
4834
|
};
|
|
4823
4835
|
Dropdown.displayName = 'Dropdown';
|
|
@@ -4902,7 +4914,7 @@
|
|
|
4902
4914
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4903
4915
|
const _a = this.props, { className, children, isHovered, context, onClick, component, role, isDisabled, isAriaDisabled, isPlainText, index, href, tooltip, tooltipProps, id, componentID, listItemClassName, additionalChild, customChild, enterTriggersArrowDown, icon, autoFocus, styleChildren, description, inoperableEvents } = _a, additionalProps = __rest$1(_a, ["className", "children", "isHovered", "context", "onClick", "component", "role", "isDisabled", "isAriaDisabled", "isPlainText", "index", "href", "tooltip", "tooltipProps", "id", "componentID", "listItemClassName", "additionalChild", "customChild", "enterTriggersArrowDown", "icon", "autoFocus", "styleChildren", "description", "inoperableEvents"]);
|
|
4904
4916
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
4905
|
-
let classes = css(icon && _default$
|
|
4917
|
+
let classes = css(icon && _default$1a.modifiers.icon, isAriaDisabled && _default$1a.modifiers.ariaDisabled, className);
|
|
4906
4918
|
if (component === 'a') {
|
|
4907
4919
|
additionalProps['aria-disabled'] = isDisabled || isAriaDisabled;
|
|
4908
4920
|
}
|
|
@@ -4917,17 +4929,17 @@
|
|
|
4917
4929
|
const renderDefaultComponent = (tag) => {
|
|
4918
4930
|
const Component = tag;
|
|
4919
4931
|
const componentContent = description ? (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4920
|
-
React__namespace.createElement("div", { className: _default$
|
|
4921
|
-
icon && React__namespace.createElement("span", { className: css(_default$
|
|
4932
|
+
React__namespace.createElement("div", { className: _default$1a.dropdownMenuItemMain },
|
|
4933
|
+
icon && React__namespace.createElement("span", { className: css(_default$1a.dropdownMenuItemIcon) }, icon),
|
|
4922
4934
|
children),
|
|
4923
|
-
React__namespace.createElement("div", { className: _default$
|
|
4924
|
-
icon && React__namespace.createElement("span", { className: css(_default$
|
|
4935
|
+
React__namespace.createElement("div", { className: _default$1a.dropdownMenuItemDescription }, description))) : (React__namespace.createElement(React__namespace.Fragment, null,
|
|
4936
|
+
icon && React__namespace.createElement("span", { className: css(_default$1a.dropdownMenuItemIcon) }, icon),
|
|
4925
4937
|
children));
|
|
4926
4938
|
return (React__namespace.createElement(Component, Object.assign({}, additionalProps, (isDisabled || isAriaDisabled ? preventedEvents(inoperableEvents) : null), { href: href, ref: this.ref, className: classes, id: componentID }), componentContent));
|
|
4927
4939
|
};
|
|
4928
4940
|
return (React__namespace.createElement(DropdownContext.Consumer, null, ({ onSelect, itemClass, disabledClass, plainTextClass }) => {
|
|
4929
4941
|
if (this.props.role !== 'separator') {
|
|
4930
|
-
classes = css(classes, isDisabled && disabledClass, isPlainText && plainTextClass, itemClass, description && _default$
|
|
4942
|
+
classes = css(classes, isDisabled && disabledClass, isPlainText && plainTextClass, itemClass, description && _default$1a.modifiers.description);
|
|
4931
4943
|
}
|
|
4932
4944
|
if (customChild) {
|
|
4933
4945
|
return React__namespace.cloneElement(customChild, {
|
|
@@ -4981,7 +4993,7 @@
|
|
|
4981
4993
|
};
|
|
4982
4994
|
DropdownItem.displayName = 'DropdownItem';
|
|
4983
4995
|
|
|
4984
|
-
var _default$
|
|
4996
|
+
var _default$19 = {
|
|
4985
4997
|
"divider": "pf-c-divider",
|
|
4986
4998
|
"modifiers": {
|
|
4987
4999
|
"hidden": "pf-m-hidden",
|
|
@@ -5056,7 +5068,7 @@
|
|
|
5056
5068
|
const Divider = (_a) => {
|
|
5057
5069
|
var { className, component = exports.DividerVariant.hr, isVertical = false, inset } = _a, props = __rest$1(_a, ["className", "component", "isVertical", "inset"]);
|
|
5058
5070
|
const Component = component;
|
|
5059
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
5071
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$19.divider, isVertical && _default$19.modifiers.vertical, formatBreakpointMods(inset, _default$19), className) }, (component !== 'hr' && { role: 'separator' }), props)));
|
|
5060
5072
|
};
|
|
5061
5073
|
Divider.displayName = 'Divider';
|
|
5062
5074
|
|
|
@@ -5085,8 +5097,8 @@
|
|
|
5085
5097
|
|
|
5086
5098
|
const buttonVariantStyles = {
|
|
5087
5099
|
default: '',
|
|
5088
|
-
primary: _default$
|
|
5089
|
-
secondary: _default$
|
|
5100
|
+
primary: _default$1a.modifiers.primary,
|
|
5101
|
+
secondary: _default$1a.modifiers.secondary
|
|
5090
5102
|
};
|
|
5091
5103
|
class Toggle extends React__namespace.Component {
|
|
5092
5104
|
constructor() {
|
|
@@ -5151,7 +5163,7 @@
|
|
|
5151
5163
|
isActive, bubbleEvent, onEnter, parentRef, getMenuRef,
|
|
5152
5164
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5153
5165
|
id, type } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isDisabled", "isPlain", "isText", "isPrimary", "isSplitButton", "toggleVariant", "onToggle", 'aria-haspopup', "isActive", "bubbleEvent", "onEnter", "parentRef", "getMenuRef", "id", "type"]);
|
|
5154
|
-
return (React__namespace.createElement(DropdownContext.Consumer, null, ({ toggleClass }) => (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.buttonRef, className: css(isSplitButton ? _default$
|
|
5166
|
+
return (React__namespace.createElement(DropdownContext.Consumer, null, ({ toggleClass }) => (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.buttonRef, className: css(isSplitButton ? _default$1a.dropdownToggleButton : toggleClass || _default$1a.dropdownToggle, isActive && _default$1a.modifiers.active, isPlain && _default$1a.modifiers.plain, isText && _default$1a.modifiers.text, isPrimary && _default$1a.modifiers.primary, buttonVariantStyles[toggleVariant], className), type: type || 'button', onClick: event => onToggle(!isOpen, event), "aria-expanded": isOpen, "aria-haspopup": ariaHasPopup, onKeyDown: event => this.onKeyDown(event), disabled: isDisabled }), children))));
|
|
5155
5167
|
}
|
|
5156
5168
|
}
|
|
5157
5169
|
Toggle.displayName = 'Toggle';
|
|
@@ -5169,7 +5181,7 @@
|
|
|
5169
5181
|
bubbleEvent: false
|
|
5170
5182
|
};
|
|
5171
5183
|
|
|
5172
|
-
var _default$
|
|
5184
|
+
var _default$18 = {
|
|
5173
5185
|
"badge": "pf-c-badge",
|
|
5174
5186
|
"modifiers": {
|
|
5175
5187
|
"read": "pf-m-read",
|
|
@@ -5179,7 +5191,7 @@
|
|
|
5179
5191
|
|
|
5180
5192
|
const Badge = (_a) => {
|
|
5181
5193
|
var { isRead = false, className = '', children = '' } = _a, props = __rest$1(_a, ["isRead", "className", "children"]);
|
|
5182
|
-
return (React__namespace.createElement("span", Object.assign({}, props, { className: css(_default$
|
|
5194
|
+
return (React__namespace.createElement("span", Object.assign({}, props, { className: css(_default$18.badge, (isRead ? _default$18.modifiers.read : _default$18.modifiers.unread), className) }), children));
|
|
5183
5195
|
};
|
|
5184
5196
|
Badge.displayName = 'Badge';
|
|
5185
5197
|
|
|
@@ -5191,7 +5203,7 @@
|
|
|
5191
5203
|
return (React__namespace.createElement(Toggle, Object.assign({ id: id, className: className, isOpen: isOpen, "aria-label": ariaLabel, parentRef: parentRef, getMenuRef: getMenuRef, isActive: isActive, isPlain: isPlain || true, isDisabled: isDisabled, onToggle: onToggle, bubbleEvent: bubbleEvent }, props),
|
|
5192
5204
|
React__namespace.createElement(Badge, Object.assign({}, badgeProps),
|
|
5193
5205
|
children,
|
|
5194
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
5206
|
+
React__namespace.createElement("span", { className: css(_default$1a.dropdownToggleIcon) },
|
|
5195
5207
|
React__namespace.createElement(CaretDownIcon$1, null)))));
|
|
5196
5208
|
};
|
|
5197
5209
|
BadgeToggle.displayName = 'BadgeToggle';
|
|
@@ -5237,7 +5249,7 @@
|
|
|
5237
5249
|
ToggleIndicator && (React__namespace.createElement("span", { className: css(!splitButtonItems && toggleIndicatorClass) },
|
|
5238
5250
|
React__namespace.createElement(ToggleIndicator, null)))))));
|
|
5239
5251
|
if (splitButtonItems) {
|
|
5240
|
-
return (React__namespace.createElement("div", { className: css(_default$
|
|
5252
|
+
return (React__namespace.createElement("div", { className: css(_default$1a.dropdownToggle, _default$1a.modifiers.splitButton, splitButtonVariant === 'action' && _default$1a.modifiers.action, (toggleVariant === 'primary' || isPrimary) && splitButtonVariant === 'action' && _default$1a.modifiers.primary, isDisabled && _default$1a.modifiers.disabled) },
|
|
5241
5253
|
splitButtonItems,
|
|
5242
5254
|
toggle));
|
|
5243
5255
|
}
|
|
@@ -5272,8 +5284,8 @@
|
|
|
5272
5284
|
onChange, checked } = _a,
|
|
5273
5285
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
5274
5286
|
props = __rest$1(_a, ["className", "isValid", "isDisabled", "isChecked", "children", "ouiaId", "ouiaSafe", "onChange", "checked"]);
|
|
5275
|
-
const text = children && (React__namespace.createElement("span", { className: css(_default$
|
|
5276
|
-
return (React__namespace.createElement("label", { className: css(_default$
|
|
5287
|
+
const text = children && (React__namespace.createElement("span", { className: css(_default$1a.dropdownToggleText, className), "aria-hidden": "true", id: `${props.id}-text` }, children));
|
|
5288
|
+
return (React__namespace.createElement("label", { className: css(_default$1a.dropdownToggleCheck, className), htmlFor: props.id },
|
|
5277
5289
|
React__namespace.createElement("input", Object.assign({}, props, (this.calculateChecked() !== undefined && { onChange: this.handleChange }), { type: "checkbox", ref: elem => elem && (elem.indeterminate = isChecked === null), "aria-invalid": !isValid, disabled: isDisabled, checked: this.calculateChecked() }, getOUIAProps(DropdownToggleCheckbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))),
|
|
5278
5290
|
text));
|
|
5279
5291
|
}
|
|
@@ -5289,7 +5301,7 @@
|
|
|
5289
5301
|
class DropdownToggleAction extends React__namespace.Component {
|
|
5290
5302
|
render() {
|
|
5291
5303
|
const _a = this.props, { id, className, onClick, isDisabled, children } = _a, props = __rest$1(_a, ["id", "className", "onClick", "isDisabled", "children"]);
|
|
5292
|
-
return (React__namespace.createElement("button", Object.assign({ id: id, className: css(_default$
|
|
5304
|
+
return (React__namespace.createElement("button", Object.assign({ id: id, className: css(_default$1a.dropdownToggleButton, className), onClick: onClick }, (isDisabled && { disabled: true, 'aria-disabled': true }), props), children));
|
|
5293
5305
|
}
|
|
5294
5306
|
}
|
|
5295
5307
|
DropdownToggleAction.displayName = 'DropdownToggleAction';
|
|
@@ -5315,7 +5327,7 @@
|
|
|
5315
5327
|
var {
|
|
5316
5328
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5317
5329
|
className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
5318
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(_default$
|
|
5330
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(_default$1c.appLauncherMenuItemIcon) }, props), children));
|
|
5319
5331
|
};
|
|
5320
5332
|
ApplicationLauncherIcon.displayName = 'ApplicationLauncherIcon';
|
|
5321
5333
|
|
|
@@ -5344,9 +5356,9 @@
|
|
|
5344
5356
|
icon && React__namespace.createElement(ApplicationLauncherIcon, null, icon),
|
|
5345
5357
|
icon ? React__namespace.createElement(ApplicationLauncherText, null, children) : children,
|
|
5346
5358
|
isExternal && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
5347
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
5359
|
+
React__namespace.createElement("span", { className: css(_default$1c.appLauncherMenuItemExternalIcon) },
|
|
5348
5360
|
React__namespace.createElement(ExternalLinkAltIcon$1, null)),
|
|
5349
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
5361
|
+
React__namespace.createElement("span", { className: css(_default$1f.screenReader) }, "(opens new window)")))))));
|
|
5350
5362
|
ApplicationLauncherContent.displayName = 'ApplicationLauncherContent';
|
|
5351
5363
|
|
|
5352
5364
|
const ApplicationLauncherContext = React__namespace.createContext({
|
|
@@ -5370,8 +5382,8 @@
|
|
|
5370
5382
|
const ApplicationLauncherItem = (_a) => {
|
|
5371
5383
|
var { className = '', id, children, icon = null, isExternal = false, href, tooltip = null, tooltipProps = null, component = 'a', isFavorite = null, ariaIsFavoriteLabel = 'starred', ariaIsNotFavoriteLabel = 'not starred', customChild, enterTriggersArrowDown = false } = _a, props = __rest$1(_a, ["className", "id", "children", "icon", "isExternal", "href", "tooltip", "tooltipProps", "component", "isFavorite", "ariaIsFavoriteLabel", "ariaIsNotFavoriteLabel", "customChild", "enterTriggersArrowDown"]);
|
|
5372
5384
|
return (React__namespace.createElement(ApplicationLauncherItemContext.Provider, { value: { isExternal, icon } },
|
|
5373
|
-
React__namespace.createElement(ApplicationLauncherContext.Consumer, null, ({ onFavorite }) => (React__namespace.createElement(DropdownItem, Object.assign({ id: id, component: component, href: href || null, className: css(isExternal && _default$
|
|
5374
|
-
additionalChild: (React__namespace.createElement("button", { className: css(_default$
|
|
5385
|
+
React__namespace.createElement(ApplicationLauncherContext.Consumer, null, ({ onFavorite }) => (React__namespace.createElement(DropdownItem, Object.assign({ id: id, component: component, href: href || null, className: css(isExternal && _default$1c.modifiers.external, isFavorite !== null && _default$1c.modifiers.link, className), listItemClassName: css(onFavorite && _default$1c.appLauncherMenuWrapper, isFavorite && _default$1c.modifiers.favorite), tooltip: tooltip, tooltipProps: tooltipProps }, (enterTriggersArrowDown === true && { enterTriggersArrowDown }), (customChild && { customChild }), (isFavorite !== null && {
|
|
5386
|
+
additionalChild: (React__namespace.createElement("button", { className: css(_default$1c.appLauncherMenuItem, _default$1c.modifiers.action), "aria-label": isFavorite ? ariaIsFavoriteLabel : ariaIsNotFavoriteLabel, onClick: () => {
|
|
5375
5387
|
onFavorite((id || getUniqueId('app-launcher-option')).replace('favorite-', ''), isFavorite);
|
|
5376
5388
|
} },
|
|
5377
5389
|
React__namespace.createElement(StarIcon$1, null)))
|
|
@@ -5445,8 +5457,8 @@
|
|
|
5445
5457
|
super(...arguments);
|
|
5446
5458
|
this.createSearchBox = () => {
|
|
5447
5459
|
const { onSearch, searchPlaceholderText, searchProps } = this.props;
|
|
5448
|
-
return (React__namespace.createElement("div", { key: "search", className: css(_default$
|
|
5449
|
-
React__namespace.createElement(ApplicationLauncherItem, { customChild: React__namespace.createElement("input", Object.assign({ type: "search", className: css(_default$
|
|
5460
|
+
return (React__namespace.createElement("div", { key: "search", className: css(_default$1c.appLauncherMenuSearch) },
|
|
5461
|
+
React__namespace.createElement(ApplicationLauncherItem, { customChild: React__namespace.createElement("input", Object.assign({ type: "search", className: css(_default$1b.formControl), placeholder: searchPlaceholderText, onChange: e => onSearch(e.target.value) }, searchProps)) })));
|
|
5450
5462
|
};
|
|
5451
5463
|
}
|
|
5452
5464
|
render() {
|
|
@@ -5489,15 +5501,15 @@
|
|
|
5489
5501
|
return (React__namespace.createElement(ApplicationLauncherContext.Provider, { value: { onFavorite } },
|
|
5490
5502
|
React__namespace.createElement(DropdownContext.Provider, { value: {
|
|
5491
5503
|
onSelect,
|
|
5492
|
-
menuClass: _default$
|
|
5493
|
-
itemClass: _default$
|
|
5494
|
-
toggleClass: _default$
|
|
5495
|
-
baseClass: _default$
|
|
5504
|
+
menuClass: _default$1c.appLauncherMenu,
|
|
5505
|
+
itemClass: _default$1c.appLauncherMenuItem,
|
|
5506
|
+
toggleClass: _default$1c.appLauncherToggle,
|
|
5507
|
+
baseClass: _default$1c.appLauncher,
|
|
5496
5508
|
baseComponent: 'nav',
|
|
5497
|
-
sectionClass: _default$
|
|
5498
|
-
sectionTitleClass: _default$
|
|
5509
|
+
sectionClass: _default$1c.appLauncherGroup,
|
|
5510
|
+
sectionTitleClass: _default$1c.appLauncherGroupTitle,
|
|
5499
5511
|
sectionComponent: 'section',
|
|
5500
|
-
disabledClass: _default$
|
|
5512
|
+
disabledClass: _default$1c.modifiers.disabled,
|
|
5501
5513
|
ouiaComponentType: ApplicationLauncher.displayName
|
|
5502
5514
|
} },
|
|
5503
5515
|
React__namespace.createElement(DropdownWithContext, Object.assign({}, props, { dropdownItems: renderableItems, isOpen: isOpen, className: className, "aria-label": ariaLabel, menuAppendTo: menuAppendTo, toggle: React__namespace.createElement(DropdownToggle, { id: toggleId, toggleIndicator: null, isOpen: isOpen, onToggle: onToggle, isDisabled: isDisabled, "aria-label": ariaLabel }, toggleIcon), isGrouped: isGrouped })))));
|
|
@@ -5524,7 +5536,7 @@
|
|
|
5524
5536
|
menuAppendTo: 'inline'
|
|
5525
5537
|
};
|
|
5526
5538
|
|
|
5527
|
-
var _default$
|
|
5539
|
+
var _default$17 = {
|
|
5528
5540
|
"avatar": "pf-c-avatar",
|
|
5529
5541
|
"modifiers": {
|
|
5530
5542
|
"light": "pf-m-light",
|
|
@@ -5534,11 +5546,11 @@
|
|
|
5534
5546
|
|
|
5535
5547
|
const Avatar = (_a) => {
|
|
5536
5548
|
var { className = '', src = '', alt, border } = _a, props = __rest$1(_a, ["className", "src", "alt", "border"]);
|
|
5537
|
-
return (React__namespace.createElement("img", Object.assign({ src: src, alt: alt, className: css(_default$
|
|
5549
|
+
return (React__namespace.createElement("img", Object.assign({ src: src, alt: alt, className: css(_default$17.avatar, border === 'light' && _default$17.modifiers.light, border === 'dark' && _default$17.modifiers.dark, className) }, props)));
|
|
5538
5550
|
};
|
|
5539
5551
|
Avatar.displayName = 'Avatar';
|
|
5540
5552
|
|
|
5541
|
-
var _default$
|
|
5553
|
+
var _default$16 = {
|
|
5542
5554
|
"backToTop": "pf-c-back-to-top",
|
|
5543
5555
|
"button": "pf-c-button",
|
|
5544
5556
|
"modifiers": {
|
|
@@ -5605,7 +5617,7 @@
|
|
|
5605
5617
|
const handleClick = () => {
|
|
5606
5618
|
scrollElement.scrollTo({ top: 0, behavior: 'smooth' });
|
|
5607
5619
|
};
|
|
5608
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
5620
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$16.backToTop, !visible && _default$16.modifiers.hidden, className), ref: innerRef, onClick: handleClick }, props),
|
|
5609
5621
|
React__namespace.createElement(Button, { variant: "primary", icon: React__namespace.createElement(AngleUpIcon$1, { "aria-hidden": "true" }), iconPosition: "right" }, title)));
|
|
5610
5622
|
};
|
|
5611
5623
|
const BackToTop = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(BackToTopBase, Object.assign({ innerRef: ref }, props))));
|
|
@@ -5653,7 +5665,7 @@
|
|
|
5653
5665
|
};
|
|
5654
5666
|
var cssVarNameFilter = c_background_image_Filter;
|
|
5655
5667
|
|
|
5656
|
-
var _default$
|
|
5668
|
+
var _default$15 = {
|
|
5657
5669
|
"backgroundImage": "pf-c-background-image",
|
|
5658
5670
|
"backgroundImageFilter": "pf-c-background-image__filter"
|
|
5659
5671
|
};
|
|
@@ -5687,12 +5699,12 @@
|
|
|
5687
5699
|
[cssVarNameLg.name]: getUrlValue('lg'),
|
|
5688
5700
|
[cssVarNameFilter.name]: `url(#${filterId})`
|
|
5689
5701
|
};
|
|
5690
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
5702
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$15.backgroundImage, className), style: style }, props),
|
|
5691
5703
|
React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", className: "pf-c-background-image__filter", width: "0", height: "0" }, React__namespace.cloneElement(filter, { id: filterId }))));
|
|
5692
5704
|
};
|
|
5693
5705
|
BackgroundImage.displayName = 'BackgroundImage';
|
|
5694
5706
|
|
|
5695
|
-
var _default$
|
|
5707
|
+
var _default$14 = {
|
|
5696
5708
|
"banner": "pf-c-banner",
|
|
5697
5709
|
"button": "pf-c-button",
|
|
5698
5710
|
"card": "pf-c-card",
|
|
@@ -5709,7 +5721,7 @@
|
|
|
5709
5721
|
|
|
5710
5722
|
const Banner = (_a) => {
|
|
5711
5723
|
var { children, className, variant = 'default', isSticky = false } = _a, props = __rest$1(_a, ["children", "className", "variant", "isSticky"]);
|
|
5712
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
5724
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$14.banner, _default$14.modifiers[variant], isSticky && _default$14.modifiers.sticky, className) }, props), children));
|
|
5713
5725
|
};
|
|
5714
5726
|
Banner.displayName = 'Banner';
|
|
5715
5727
|
|
|
@@ -5721,7 +5733,7 @@
|
|
|
5721
5733
|
};
|
|
5722
5734
|
Brand.displayName = 'Brand';
|
|
5723
5735
|
|
|
5724
|
-
var _default$
|
|
5736
|
+
var _default$13 = {
|
|
5725
5737
|
"breadcrumb": "pf-c-breadcrumb",
|
|
5726
5738
|
"breadcrumbDropdown": "pf-c-breadcrumb__dropdown",
|
|
5727
5739
|
"breadcrumbHeading": "pf-c-breadcrumb__heading",
|
|
@@ -5739,8 +5751,8 @@
|
|
|
5739
5751
|
const Breadcrumb = (_a) => {
|
|
5740
5752
|
var { children = null, className = '', 'aria-label': ariaLabel = 'Breadcrumb', ouiaId, ouiaSafe = true } = _a, props = __rest$1(_a, ["children", "className", 'aria-label', "ouiaId", "ouiaSafe"]);
|
|
5741
5753
|
const ouiaProps = useOUIAProps(Breadcrumb.displayName, ouiaId, ouiaSafe);
|
|
5742
|
-
return (React__namespace.createElement("nav", Object.assign({}, props, { "aria-label": ariaLabel, className: css(_default$
|
|
5743
|
-
React__namespace.createElement("ol", { className: _default$
|
|
5754
|
+
return (React__namespace.createElement("nav", Object.assign({}, props, { "aria-label": ariaLabel, className: css(_default$13.breadcrumb, className) }, ouiaProps),
|
|
5755
|
+
React__namespace.createElement("ol", { className: _default$13.breadcrumbList }, React__namespace.Children.map(children, (child, index) => {
|
|
5744
5756
|
const showDivider = index > 0;
|
|
5745
5757
|
if (React__namespace.isValidElement(child)) {
|
|
5746
5758
|
return React__namespace.cloneElement(child, { showDivider });
|
|
@@ -5754,12 +5766,12 @@
|
|
|
5754
5766
|
var { children = null, className: classNameProp = '', to = undefined, isActive = false, isDropdown = false, showDivider, target = undefined, component = 'a', render = undefined } = _a, props = __rest$1(_a, ["children", "className", "to", "isActive", "isDropdown", "showDivider", "target", "component", "render"]);
|
|
5755
5767
|
const Component = component;
|
|
5756
5768
|
const ariaCurrent = isActive ? 'page' : undefined;
|
|
5757
|
-
const className = css(_default$
|
|
5758
|
-
return (React__namespace.createElement("li", Object.assign({}, props, { className: css(_default$
|
|
5759
|
-
showDivider && (React__namespace.createElement("span", { className: _default$
|
|
5769
|
+
const className = css(_default$13.breadcrumbLink, isActive && _default$13.modifiers.current);
|
|
5770
|
+
return (React__namespace.createElement("li", Object.assign({}, props, { className: css(_default$13.breadcrumbItem, classNameProp) }),
|
|
5771
|
+
showDivider && (React__namespace.createElement("span", { className: _default$13.breadcrumbItemDivider },
|
|
5760
5772
|
React__namespace.createElement(AngleRightIcon$1, null))),
|
|
5761
5773
|
component === 'button' && (React__namespace.createElement("button", { className: className, "aria-current": ariaCurrent, type: "button" }, children)),
|
|
5762
|
-
isDropdown && React__namespace.createElement("span", { className: css(_default$
|
|
5774
|
+
isDropdown && React__namespace.createElement("span", { className: css(_default$13.breadcrumbDropdown) }, children),
|
|
5763
5775
|
render && render({ className, ariaCurrent }),
|
|
5764
5776
|
to && !render && (React__namespace.createElement(Component, { href: to, target: target, className: className, "aria-current": ariaCurrent }, children)),
|
|
5765
5777
|
!to && component !== 'button' && !isDropdown && children));
|
|
@@ -5769,12 +5781,12 @@
|
|
|
5769
5781
|
const BreadcrumbHeading = (_a) => {
|
|
5770
5782
|
var { children = null, className = '', to = undefined, target = undefined, component = 'a', showDivider } = _a, props = __rest$1(_a, ["children", "className", "to", "target", "component", "showDivider"]);
|
|
5771
5783
|
const Component = component;
|
|
5772
|
-
return (React__namespace.createElement("li", Object.assign({}, props, { className: css(_default$
|
|
5773
|
-
showDivider && (React__namespace.createElement("span", { className: _default$
|
|
5784
|
+
return (React__namespace.createElement("li", Object.assign({}, props, { className: css(_default$13.breadcrumbItem, className) }),
|
|
5785
|
+
showDivider && (React__namespace.createElement("span", { className: _default$13.breadcrumbItemDivider },
|
|
5774
5786
|
React__namespace.createElement(AngleRightIcon$1, null))),
|
|
5775
|
-
React__namespace.createElement("h1", { className: _default$
|
|
5776
|
-
!to && component === 'button' && (React__namespace.createElement("button", { className: css(_default$
|
|
5777
|
-
to && (React__namespace.createElement(Component, { href: to, target: target, className: css(_default$
|
|
5787
|
+
React__namespace.createElement("h1", { className: _default$13.breadcrumbHeading },
|
|
5788
|
+
!to && component === 'button' && (React__namespace.createElement("button", { className: css(_default$13.breadcrumbLink, _default$13.modifiers.current), "aria-current": true, type: "button" }, children)),
|
|
5789
|
+
to && (React__namespace.createElement(Component, { href: to, target: target, className: css(_default$13.breadcrumbLink, _default$13.modifiers.current), "aria-current": "page" }, children)),
|
|
5778
5790
|
!to && component !== 'button' && React__namespace.createElement(React__namespace.Fragment, null, children))));
|
|
5779
5791
|
};
|
|
5780
5792
|
BreadcrumbHeading.displayName = 'BreadcrumbHeading';
|
|
@@ -5863,7 +5875,7 @@
|
|
|
5863
5875
|
if (customIconDimensions) {
|
|
5864
5876
|
customIconStyle.backgroundSize = customIconDimensions;
|
|
5865
5877
|
}
|
|
5866
|
-
return (React__namespace.createElement("input", Object.assign({}, props, { onFocus: this.onFocus, onBlur: this.onBlur, className: css(_default$
|
|
5878
|
+
return (React__namespace.createElement("input", Object.assign({}, props, { onFocus: this.onFocus, onBlur: this.onBlur, className: css(_default$1b.formControl, validated === exports.ValidatedOptions.success && _default$1b.modifiers.success, validated === exports.ValidatedOptions.warning && _default$1b.modifiers.warning, ((iconVariant && iconVariant !== 'search') || customIconUrl) && _default$1b.modifiers.icon, iconVariant && _default$1b.modifiers[iconVariant], className), onChange: this.handleChange, type: type, value: value, "aria-invalid": props['aria-invalid'] ? props['aria-invalid'] : validated === exports.ValidatedOptions.error, required: isRequired, disabled: isDisabled, readOnly: isReadOnly, ref: innerRef || this.inputRef }, ((customIconUrl || customIconDimensions) && { style: customIconStyle }), getOUIAProps(TextInput.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))));
|
|
5867
5879
|
}
|
|
5868
5880
|
}
|
|
5869
5881
|
TextInputBase.displayName = 'TextInputBase';
|
|
@@ -5882,7 +5894,7 @@
|
|
|
5882
5894
|
const TextInput = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(TextInputBase, Object.assign({}, props, { innerRef: ref }))));
|
|
5883
5895
|
TextInput.displayName = 'TextInput';
|
|
5884
5896
|
|
|
5885
|
-
var _default$
|
|
5897
|
+
var _default$12 = {
|
|
5886
5898
|
"check": "pf-c-check",
|
|
5887
5899
|
"checkLabel": "pf-c-check__label",
|
|
5888
5900
|
"chipGroup": "pf-c-chip-group",
|
|
@@ -5953,7 +5965,7 @@
|
|
|
5953
5965
|
|
|
5954
5966
|
var TimesCircleIcon$1 = TimesCircleIcon;
|
|
5955
5967
|
|
|
5956
|
-
var _default$
|
|
5968
|
+
var _default$11 = {
|
|
5957
5969
|
"form": "pf-c-form",
|
|
5958
5970
|
"formActions": "pf-c-form__actions",
|
|
5959
5971
|
"formFieldGroup": "pf-c-form__field-group",
|
|
@@ -6006,7 +6018,7 @@
|
|
|
6006
6018
|
}
|
|
6007
6019
|
};
|
|
6008
6020
|
|
|
6009
|
-
var _default$
|
|
6021
|
+
var _default$10 = {
|
|
6010
6022
|
"check": "pf-c-check",
|
|
6011
6023
|
"checkBody": "pf-c-check__body",
|
|
6012
6024
|
"checkDescription": "pf-c-check__description",
|
|
@@ -6061,6 +6073,7 @@
|
|
|
6061
6073
|
ArrowLeft: 'ArrowLeft',
|
|
6062
6074
|
ArrowRight: 'ArrowRight'
|
|
6063
6075
|
};
|
|
6076
|
+
const SelectFooterTabbableItems = 'input, button, select, textarea, a[href]';
|
|
6064
6077
|
|
|
6065
6078
|
class SelectOption extends React__namespace.Component {
|
|
6066
6079
|
constructor() {
|
|
@@ -6086,7 +6099,12 @@
|
|
|
6086
6099
|
event.stopPropagation();
|
|
6087
6100
|
}
|
|
6088
6101
|
else {
|
|
6089
|
-
|
|
6102
|
+
if (event.shiftKey) {
|
|
6103
|
+
keyHandler(index, innerIndex, 'up');
|
|
6104
|
+
}
|
|
6105
|
+
else {
|
|
6106
|
+
keyHandler(index, innerIndex, 'tab');
|
|
6107
|
+
}
|
|
6090
6108
|
}
|
|
6091
6109
|
}
|
|
6092
6110
|
event.preventDefault();
|
|
@@ -6130,16 +6148,16 @@
|
|
|
6130
6148
|
console.error('Please provide an id to use the favorites feature.');
|
|
6131
6149
|
}
|
|
6132
6150
|
const generatedId = id || getUniqueId('select-option');
|
|
6133
|
-
const favoriteButton = (onFavorite) => (React__namespace.createElement("button", { className: css(_default$
|
|
6151
|
+
const favoriteButton = (onFavorite) => (React__namespace.createElement("button", { className: css(_default$12.selectMenuItem, _default$12.modifiers.action, _default$12.modifiers.favoriteAction), "aria-label": isFavorite ? ariaIsFavoriteLabel : ariaIsNotFavoriteLabel, onClick: () => {
|
|
6134
6152
|
onFavorite(generatedId.replace('favorite-', ''), isFavorite);
|
|
6135
6153
|
}, onKeyDown: event => {
|
|
6136
6154
|
this.onKeyDown(event, 1, () => onFavorite(generatedId.replace('favorite-', '')));
|
|
6137
6155
|
}, ref: this.favoriteRef },
|
|
6138
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6156
|
+
React__namespace.createElement("span", { className: css(_default$12.selectMenuItemActionIcon) },
|
|
6139
6157
|
React__namespace.createElement(StarIcon$1, null))));
|
|
6140
|
-
const itemDisplay = itemCount ? (React__namespace.createElement("span", { className: css(_default$
|
|
6141
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6142
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6158
|
+
const itemDisplay = itemCount ? (React__namespace.createElement("span", { className: css(_default$12.selectMenuItemRow) },
|
|
6159
|
+
React__namespace.createElement("span", { className: css(_default$12.selectMenuItemText) }, children || (value && value.toString && value.toString())),
|
|
6160
|
+
React__namespace.createElement("span", { className: css(_default$12.selectMenuItemCount) }, itemCount))) : (children || value.toString());
|
|
6143
6161
|
const onViewMoreClick = (event) => {
|
|
6144
6162
|
// Set the index for the next item to focus after view more clicked, then call view more callback
|
|
6145
6163
|
setViewMoreNextIndex();
|
|
@@ -6147,24 +6165,24 @@
|
|
|
6147
6165
|
};
|
|
6148
6166
|
const renderOption = (onSelect, onClose, variant, inputIdPrefix, onFavorite) => {
|
|
6149
6167
|
if (variant !== exports.SelectVariant.checkbox && isLoading && isGrouped) {
|
|
6150
|
-
return (React__namespace.createElement("div", { role: "presentation", className: css(_default$
|
|
6168
|
+
return (React__namespace.createElement("div", { role: "presentation", className: css(_default$12.selectListItem, isLoading && _default$12.modifiers.loading, className) }, children));
|
|
6151
6169
|
}
|
|
6152
6170
|
else if (variant !== exports.SelectVariant.checkbox && isLoad && isGrouped) {
|
|
6153
6171
|
return (React__namespace.createElement("div", null,
|
|
6154
|
-
React__namespace.createElement("button", Object.assign({}, props, { role: "presentation", className: css(_default$
|
|
6172
|
+
React__namespace.createElement("button", Object.assign({}, props, { role: "presentation", className: css(_default$12.selectMenuItem, _default$12.modifiers.load, className), onClick: (event) => {
|
|
6155
6173
|
onViewMoreClick(event);
|
|
6156
6174
|
event.stopPropagation();
|
|
6157
6175
|
}, ref: this.ref, type: "button" }), children || value.toString())));
|
|
6158
6176
|
}
|
|
6159
6177
|
else if (variant !== exports.SelectVariant.checkbox) {
|
|
6160
|
-
return (React__namespace.createElement("li", { id: generatedId, role: "presentation", className: css(isLoading && _default$
|
|
6178
|
+
return (React__namespace.createElement("li", { id: generatedId, role: "presentation", className: css(isLoading && _default$12.selectListItem, !isLoad && !isLoading && _default$12.selectMenuWrapper, isFavorite && _default$12.modifiers.favorite, isFocused && _default$12.modifiers.focus, isLoading && _default$12.modifiers.loading), ref: this.liRef },
|
|
6161
6179
|
isLoading && children,
|
|
6162
|
-
isLoad && !isGrouped && (React__namespace.createElement("button", Object.assign({}, props, { className: css(_default$
|
|
6180
|
+
isLoad && !isGrouped && (React__namespace.createElement("button", Object.assign({}, props, { className: css(_default$12.selectMenuItem, _default$12.modifiers.load, className), onClick: (event) => {
|
|
6163
6181
|
onViewMoreClick(event);
|
|
6164
6182
|
event.stopPropagation();
|
|
6165
6183
|
}, ref: this.ref, type: "button" }), itemDisplay)),
|
|
6166
6184
|
!isLoading && !isLoad && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
6167
|
-
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$
|
|
6185
|
+
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$12.selectMenuItem, isLoad && _default$12.modifiers.load, isSelected && _default$12.modifiers.selected, isDisabled && _default$12.modifiers.disabled, description && _default$12.modifiers.description, isFavorite !== null && _default$12.modifiers.link, className), onClick: (event) => {
|
|
6168
6186
|
if (!isDisabled) {
|
|
6169
6187
|
onClick(event);
|
|
6170
6188
|
onSelect(event, value, isPlaceholder);
|
|
@@ -6174,19 +6192,19 @@
|
|
|
6174
6192
|
this.onKeyDown(event, 0);
|
|
6175
6193
|
}, type: "button" }),
|
|
6176
6194
|
description && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
6177
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6195
|
+
React__namespace.createElement("span", { className: css(_default$12.selectMenuItemMain) },
|
|
6178
6196
|
itemDisplay,
|
|
6179
|
-
isSelected && (React__namespace.createElement("span", { className: css(_default$
|
|
6197
|
+
isSelected && (React__namespace.createElement("span", { className: css(_default$12.selectMenuItemIcon) },
|
|
6180
6198
|
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))),
|
|
6181
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6199
|
+
React__namespace.createElement("span", { className: css(_default$12.selectMenuItemDescription) }, description))),
|
|
6182
6200
|
!description && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
6183
6201
|
itemDisplay,
|
|
6184
|
-
isSelected && (React__namespace.createElement("span", { className: css(_default$
|
|
6202
|
+
isSelected && (React__namespace.createElement("span", { className: css(_default$12.selectMenuItemIcon) },
|
|
6185
6203
|
React__namespace.createElement(CheckIcon$1, { "aria-hidden": true })))))),
|
|
6186
6204
|
isFavorite !== null && id && favoriteButton(onFavorite)))));
|
|
6187
6205
|
}
|
|
6188
6206
|
else if (variant === exports.SelectVariant.checkbox && isLoad) {
|
|
6189
|
-
return (React__namespace.createElement("button", { className: css(_default$
|
|
6207
|
+
return (React__namespace.createElement("button", { className: css(_default$12.selectMenuItem, _default$12.modifiers.load, isFocused && _default$12.modifiers.focus, className), onKeyDown: (event) => {
|
|
6190
6208
|
this.onKeyDown(event, 0, undefined, true);
|
|
6191
6209
|
}, onClick: (event) => {
|
|
6192
6210
|
onViewMoreClick(event);
|
|
@@ -6194,24 +6212,24 @@
|
|
|
6194
6212
|
}, ref: this.ref }, children || (value && value.toString && value.toString())));
|
|
6195
6213
|
}
|
|
6196
6214
|
else if (variant === exports.SelectVariant.checkbox && isLoading) {
|
|
6197
|
-
return (React__namespace.createElement("div", { className: css(_default$
|
|
6215
|
+
return (React__namespace.createElement("div", { className: css(_default$12.selectListItem, isLoading && _default$12.modifiers.loading, className) }, children));
|
|
6198
6216
|
}
|
|
6199
6217
|
else if (variant === exports.SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad) {
|
|
6200
|
-
return (React__namespace.createElement("label", Object.assign({}, props, { className: css(_default$
|
|
6218
|
+
return (React__namespace.createElement("label", Object.assign({}, props, { className: css(_default$10.check, _default$12.selectMenuItem, isDisabled && _default$12.modifiers.disabled, description && _default$12.modifiers.description, className), onKeyDown: (event) => {
|
|
6201
6219
|
this.onKeyDown(event, 0, undefined, true);
|
|
6202
6220
|
} }),
|
|
6203
|
-
React__namespace.createElement("input", { id: inputId || `${inputIdPrefix}-${value.toString()}`, className: css(_default$
|
|
6221
|
+
React__namespace.createElement("input", { id: inputId || `${inputIdPrefix}-${value.toString()}`, className: css(_default$10.checkInput), type: "checkbox", onChange: event => {
|
|
6204
6222
|
if (!isDisabled) {
|
|
6205
6223
|
onClick(event);
|
|
6206
6224
|
onSelect(event, value);
|
|
6207
6225
|
}
|
|
6208
6226
|
}, ref: this.ref, checked: isChecked || false, disabled: isDisabled }),
|
|
6209
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6210
|
-
description && React__namespace.createElement("div", { className: css(_default$
|
|
6227
|
+
React__namespace.createElement("span", { className: css(_default$10.checkLabel, isDisabled && _default$12.modifiers.disabled) }, itemDisplay),
|
|
6228
|
+
description && React__namespace.createElement("div", { className: css(_default$10.checkDescription) }, description)));
|
|
6211
6229
|
}
|
|
6212
6230
|
else if (variant === exports.SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad) {
|
|
6213
6231
|
return (React__namespace.createElement("div", null,
|
|
6214
|
-
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$
|
|
6232
|
+
React__namespace.createElement(Component, Object.assign({}, props, { className: css(_default$12.selectMenuItem, isSelected && _default$12.modifiers.selected, isDisabled && _default$12.modifiers.disabled, className), role: "option", "aria-selected": isSelected || null, ref: this.ref, onKeyDown: (event) => {
|
|
6215
6233
|
this.onKeyDown(event, 0, undefined, true);
|
|
6216
6234
|
}, type: "button" }), itemDisplay)));
|
|
6217
6235
|
}
|
|
@@ -6243,8 +6261,8 @@
|
|
|
6243
6261
|
|
|
6244
6262
|
const SelectGroup = (_a) => {
|
|
6245
6263
|
var { children = [], className = '', label = '', titleId = '' } = _a, props = __rest$1(_a, ["children", "className", "label", "titleId"]);
|
|
6246
|
-
return (React__namespace.createElement(SelectConsumer, null, ({ variant }) => (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
6247
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
6264
|
+
return (React__namespace.createElement(SelectConsumer, null, ({ variant }) => (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$12.selectMenuGroup, className) }),
|
|
6265
|
+
React__namespace.createElement("div", { className: css(_default$12.selectMenuGroupTitle), id: titleId, "aria-hidden": true }, label),
|
|
6248
6266
|
variant === exports.SelectVariant.checkbox ? children : React__namespace.createElement("ul", { role: "listbox" }, children)))));
|
|
6249
6267
|
};
|
|
6250
6268
|
SelectGroup.displayName = 'SelectGroup';
|
|
@@ -6317,13 +6335,14 @@
|
|
|
6317
6335
|
}
|
|
6318
6336
|
return React__namespace.cloneElement(group, {
|
|
6319
6337
|
titleId: group.props.label && group.props.label.replace(/\W/g, '-'),
|
|
6320
|
-
children: group.props.children ? (React__namespace.createElement("fieldset", { "aria-labelledby": group.props.label && group.props.label.replace(/\W/g, '-'), className: css(_default$
|
|
6338
|
+
children: group.props.children ? (React__namespace.createElement("fieldset", { "aria-labelledby": group.props.label && group.props.label.replace(/\W/g, '-'), className: css(_default$12.selectMenuFieldset) }, React__namespace.Children.map(group.props.children, (option) => option.type === Divider
|
|
6321
6339
|
? option
|
|
6322
6340
|
: React__namespace.cloneElement(option, {
|
|
6323
6341
|
isChecked: this.checkForValue(option.props.value, checked),
|
|
6324
6342
|
sendRef,
|
|
6325
6343
|
keyHandler,
|
|
6326
|
-
index: index
|
|
6344
|
+
index: index++,
|
|
6345
|
+
isLastOptionBeforeFooter
|
|
6327
6346
|
})))) : null
|
|
6328
6347
|
});
|
|
6329
6348
|
});
|
|
@@ -6343,7 +6362,7 @@
|
|
|
6343
6362
|
const _a = this.props, { children, isCustomContent, className, isExpanded, openedOnEnter, selected, checked, isGrouped, position, sendRef, keyHandler, maxHeight, noResultsFoundText, createText, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, hasInlineFilter, innerRef, footer, footerRef, isLastOptionBeforeFooter } = _a, props = __rest$1(_a, ["children", "isCustomContent", "className", "isExpanded", "openedOnEnter", "selected", "checked", "isGrouped", "position", "sendRef", "keyHandler", "maxHeight", "noResultsFoundText", "createText", 'aria-label', 'aria-labelledby', "hasInlineFilter", "innerRef", "footer", "footerRef", "isLastOptionBeforeFooter"]);
|
|
6344
6363
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6345
6364
|
let Component = 'div';
|
|
6346
|
-
const variantProps = Object.assign({ ref: innerRef, className: css(!footer ? _default$
|
|
6365
|
+
const variantProps = Object.assign({ ref: innerRef, className: css(!footer ? _default$12.selectMenu : 'pf-c-select__menu-list', position === exports.SelectPosition.right && _default$12.modifiers.alignRight, className) }, (maxHeight && { style: { maxHeight, overflow: 'auto' } }));
|
|
6347
6366
|
const extendedChildren = () => variant === exports.SelectVariant.checkbox
|
|
6348
6367
|
? this.extendCheckboxChildren(children)
|
|
6349
6368
|
: this.extendChildren(inputIdPrefix);
|
|
@@ -6352,10 +6371,10 @@
|
|
|
6352
6371
|
}
|
|
6353
6372
|
else if (hasInlineFilter) {
|
|
6354
6373
|
if (React__namespace.Children.count(children) === 0) {
|
|
6355
|
-
variantProps.children = React__namespace.createElement("fieldset", { className: css(_default$
|
|
6374
|
+
variantProps.children = React__namespace.createElement("fieldset", { className: css(_default$12.selectMenuFieldset) });
|
|
6356
6375
|
}
|
|
6357
6376
|
else {
|
|
6358
|
-
variantProps.children = (React__namespace.createElement("fieldset", { "aria-label": ariaLabel, "aria-labelledby": (!ariaLabel && ariaLabelledBy) || null, className: css(_default$
|
|
6377
|
+
variantProps.children = (React__namespace.createElement("fieldset", { "aria-label": ariaLabel, "aria-labelledby": (!ariaLabel && ariaLabelledBy) || null, className: css(_default$11.formFieldset) },
|
|
6359
6378
|
children.shift(),
|
|
6360
6379
|
extendedChildren()));
|
|
6361
6380
|
}
|
|
@@ -6371,7 +6390,7 @@
|
|
|
6371
6390
|
}
|
|
6372
6391
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
6373
6392
|
React__namespace.createElement(Component, Object.assign({}, variantProps, props)),
|
|
6374
|
-
footer && (React__namespace.createElement("div", { className: css(_default$
|
|
6393
|
+
footer && (React__namespace.createElement("div", { className: css(_default$12.selectMenuFooter), ref: footerRef }, footer))));
|
|
6375
6394
|
}
|
|
6376
6395
|
render() {
|
|
6377
6396
|
return React__namespace.createElement(SelectConsumer, null, context => this.renderSelectMenu(context));
|
|
@@ -6406,26 +6425,19 @@
|
|
|
6406
6425
|
onClose();
|
|
6407
6426
|
}
|
|
6408
6427
|
};
|
|
6409
|
-
this.findTabbableFooterElements = () => {
|
|
6410
|
-
const tabbable = this.props.footerRef.current.querySelectorAll('input, button, select, textarea, a[href]');
|
|
6411
|
-
const list = Array.prototype.filter.call(tabbable, function (item) {
|
|
6412
|
-
return item.tabIndex >= '0';
|
|
6413
|
-
});
|
|
6414
|
-
return list;
|
|
6415
|
-
};
|
|
6416
6428
|
this.handleGlobalKeys = (event) => {
|
|
6417
|
-
const { parentRef, menuRef, hasFooter, isOpen, variant, onToggle, onClose } = this.props;
|
|
6429
|
+
const { parentRef, menuRef, hasFooter, footerRef, isOpen, variant, onToggle, onClose, moveFocusToLastMenuItem } = this.props;
|
|
6418
6430
|
const escFromToggle = parentRef && parentRef.current && parentRef.current.contains(event.target);
|
|
6419
6431
|
const escFromWithinMenu = menuRef && menuRef.current && menuRef.current.contains && menuRef.current.contains(event.target);
|
|
6420
6432
|
if (isOpen &&
|
|
6421
6433
|
event.key === KeyTypes.Tab &&
|
|
6422
6434
|
(variant === exports.SelectVariant.typeahead || variant === exports.SelectVariant.typeaheadMulti)) {
|
|
6423
|
-
this.props.handleTypeaheadKeys('tab');
|
|
6435
|
+
this.props.handleTypeaheadKeys('tab', event.shiftKey);
|
|
6424
6436
|
event.preventDefault();
|
|
6425
6437
|
return;
|
|
6426
6438
|
}
|
|
6427
6439
|
if (isOpen && event.key === KeyTypes.Tab && hasFooter) {
|
|
6428
|
-
const tabbableItems =
|
|
6440
|
+
const tabbableItems = findTabbableElements(footerRef, SelectFooterTabbableItems);
|
|
6429
6441
|
// If no tabbable item in footer close select
|
|
6430
6442
|
if (tabbableItems.length <= 0) {
|
|
6431
6443
|
onToggle(false);
|
|
@@ -6434,14 +6446,30 @@
|
|
|
6434
6446
|
return;
|
|
6435
6447
|
}
|
|
6436
6448
|
else {
|
|
6437
|
-
// if current element is not in footer, tab to first tabbable element in footer
|
|
6438
|
-
const currentElementIndex = tabbableItems.findIndex(item => item === document.activeElement);
|
|
6449
|
+
// if current element is not in footer, tab to first tabbable element in footer, or close if shift clicked
|
|
6450
|
+
const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
|
|
6439
6451
|
if (currentElementIndex === -1) {
|
|
6440
|
-
|
|
6441
|
-
|
|
6452
|
+
if (event.shiftKey) {
|
|
6453
|
+
if (variant !== 'checkbox') {
|
|
6454
|
+
// only close non checkbox variation on shift clicked
|
|
6455
|
+
onToggle(false);
|
|
6456
|
+
onClose();
|
|
6457
|
+
this.toggle.current.focus();
|
|
6458
|
+
}
|
|
6459
|
+
}
|
|
6460
|
+
else {
|
|
6461
|
+
// tab to footer
|
|
6462
|
+
tabbableItems[0].focus();
|
|
6463
|
+
return;
|
|
6464
|
+
}
|
|
6442
6465
|
}
|
|
6443
6466
|
// Current element is in footer.
|
|
6444
6467
|
if (event.shiftKey) {
|
|
6468
|
+
// Move focus back to menuif current tab index is 0
|
|
6469
|
+
if (currentElementIndex === 0) {
|
|
6470
|
+
moveFocusToLastMenuItem();
|
|
6471
|
+
event.preventDefault();
|
|
6472
|
+
}
|
|
6445
6473
|
return;
|
|
6446
6474
|
}
|
|
6447
6475
|
// Tab to next element in footer or close if there are none
|
|
@@ -6515,7 +6543,7 @@
|
|
|
6515
6543
|
}
|
|
6516
6544
|
render() {
|
|
6517
6545
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
6518
|
-
const _a = this.props, { className, children, isOpen, isActive, isPlain, isDisabled, hasPlaceholderStyle, variant, onToggle, onEnter, onClose, onClickTypeaheadToggleButton, handleTypeaheadKeys, parentRef, menuRef, id, type, hasClearButton, 'aria-labelledby': ariaLabelledBy, 'aria-label': ariaLabel, hasFooter, footerRef } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isActive", "isPlain", "isDisabled", "hasPlaceholderStyle", "variant", "onToggle", "onEnter", "onClose", "onClickTypeaheadToggleButton", "handleTypeaheadKeys", "parentRef", "menuRef", "id", "type", "hasClearButton", 'aria-labelledby', 'aria-label', "hasFooter", "footerRef"]);
|
|
6546
|
+
const _a = this.props, { className, children, isOpen, isActive, isPlain, isDisabled, hasPlaceholderStyle, variant, onToggle, onEnter, onClose, onClickTypeaheadToggleButton, handleTypeaheadKeys, moveFocusToLastMenuItem, parentRef, menuRef, id, type, hasClearButton, 'aria-labelledby': ariaLabelledBy, 'aria-label': ariaLabel, hasFooter, footerRef } = _a, props = __rest$1(_a, ["className", "children", "isOpen", "isActive", "isPlain", "isDisabled", "hasPlaceholderStyle", "variant", "onToggle", "onEnter", "onClose", "onClickTypeaheadToggleButton", "handleTypeaheadKeys", "moveFocusToLastMenuItem", "parentRef", "menuRef", "id", "type", "hasClearButton", 'aria-labelledby', 'aria-label', "hasFooter", "footerRef"]);
|
|
6519
6547
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6520
6548
|
const isTypeahead = variant === exports.SelectVariant.typeahead || variant === exports.SelectVariant.typeaheadMulti || hasClearButton;
|
|
6521
6549
|
const toggleProps = {
|
|
@@ -6525,7 +6553,7 @@
|
|
|
6525
6553
|
'aria-haspopup': (variant !== exports.SelectVariant.checkbox && 'listbox') || null
|
|
6526
6554
|
};
|
|
6527
6555
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
6528
|
-
!isTypeahead && (React__namespace.createElement("button", Object.assign({}, props, toggleProps, { ref: this.toggle, type: type, className: css(_default$
|
|
6556
|
+
!isTypeahead && (React__namespace.createElement("button", Object.assign({}, props, toggleProps, { ref: this.toggle, type: type, className: css(_default$12.selectToggle, hasPlaceholderStyle && _default$12.modifiers.placeholder, isDisabled && _default$12.modifiers.disabled, isPlain && _default$12.modifiers.plain, isActive && _default$12.modifiers.active, className), "aria-label": ariaLabel,
|
|
6529
6557
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6530
6558
|
onClick: _event => {
|
|
6531
6559
|
onToggle(!isOpen);
|
|
@@ -6534,9 +6562,9 @@
|
|
|
6534
6562
|
}
|
|
6535
6563
|
}, onKeyDown: this.onKeyDown, disabled: isDisabled }),
|
|
6536
6564
|
children,
|
|
6537
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
6565
|
+
React__namespace.createElement("span", { className: css(_default$12.selectToggleArrow) },
|
|
6538
6566
|
React__namespace.createElement(CaretDownIcon$1, null)))),
|
|
6539
|
-
isTypeahead && (React__namespace.createElement("div", Object.assign({}, props, { ref: this.toggle, className: css(_default$
|
|
6567
|
+
isTypeahead && (React__namespace.createElement("div", Object.assign({}, props, { ref: this.toggle, className: css(_default$12.selectToggle, hasPlaceholderStyle && _default$12.modifiers.placeholder, isDisabled && _default$12.modifiers.disabled, isPlain && _default$12.modifiers.plain, isTypeahead && _default$12.modifiers.typeahead, className),
|
|
6540
6568
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6541
6569
|
onClick: _event => {
|
|
6542
6570
|
if (!isDisabled) {
|
|
@@ -6544,7 +6572,7 @@
|
|
|
6544
6572
|
}
|
|
6545
6573
|
}, onKeyDown: this.onKeyDown }),
|
|
6546
6574
|
children,
|
|
6547
|
-
React__namespace.createElement("button", Object.assign({}, toggleProps, { type: type, className: css(_default$
|
|
6575
|
+
React__namespace.createElement("button", Object.assign({}, toggleProps, { type: type, className: css(_default$1k.button, _default$12.selectToggleButton, _default$12.modifiers.plain), "aria-label": ariaLabel, onClick: _event => {
|
|
6548
6576
|
onToggle(!isOpen);
|
|
6549
6577
|
if (isOpen) {
|
|
6550
6578
|
onClose();
|
|
@@ -6553,7 +6581,7 @@
|
|
|
6553
6581
|
} }, ((variant === exports.SelectVariant.typeahead || variant === exports.SelectVariant.typeaheadMulti) && {
|
|
6554
6582
|
tabIndex: -1
|
|
6555
6583
|
}), { disabled: isDisabled }),
|
|
6556
|
-
React__namespace.createElement(CaretDownIcon$1, { className: css(_default$
|
|
6584
|
+
React__namespace.createElement(CaretDownIcon$1, { className: css(_default$12.selectToggleArrow) }))))));
|
|
6557
6585
|
}
|
|
6558
6586
|
}
|
|
6559
6587
|
SelectToggle.displayName = 'SelectToggle';
|
|
@@ -6576,7 +6604,7 @@
|
|
|
6576
6604
|
onClickTypeaheadToggleButton: () => { }
|
|
6577
6605
|
};
|
|
6578
6606
|
|
|
6579
|
-
var _default
|
|
6607
|
+
var _default$$ = {
|
|
6580
6608
|
"chipGroup": "pf-c-chip-group",
|
|
6581
6609
|
"chipGroupClose": "pf-c-chip-group__close",
|
|
6582
6610
|
"chipGroupLabel": "pf-c-chip-group__label",
|
|
@@ -6588,7 +6616,7 @@
|
|
|
6588
6616
|
}
|
|
6589
6617
|
};
|
|
6590
6618
|
|
|
6591
|
-
var _default
|
|
6619
|
+
var _default$_ = {
|
|
6592
6620
|
"badge": "pf-c-badge",
|
|
6593
6621
|
"button": "pf-c-button",
|
|
6594
6622
|
"chip": "pf-c-chip",
|
|
@@ -6607,8 +6635,8 @@
|
|
|
6607
6635
|
this.renderOverflowChip = () => {
|
|
6608
6636
|
const { children, className, onClick, ouiaId } = this.props;
|
|
6609
6637
|
const Component = this.props.component;
|
|
6610
|
-
return (React__namespace.createElement(Component, Object.assign({ onClick: onClick, className: css(_default
|
|
6611
|
-
React__namespace.createElement("span", { className: css(_default
|
|
6638
|
+
return (React__namespace.createElement(Component, Object.assign({ onClick: onClick, className: css(_default$_.chip, _default$_.modifiers.overflow, className) }, (this.props.component === 'button' ? { type: 'button' } : {}), getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
6639
|
+
React__namespace.createElement("span", { className: css(_default$_.chipText) }, children)));
|
|
6612
6640
|
};
|
|
6613
6641
|
this.renderChip = (randomId) => {
|
|
6614
6642
|
const { children, tooltipPosition } = this.props;
|
|
@@ -6630,8 +6658,8 @@
|
|
|
6630
6658
|
renderInnerChip(id) {
|
|
6631
6659
|
const { children, className, onClick, closeBtnAriaLabel, isReadOnly, component, ouiaId } = this.props;
|
|
6632
6660
|
const Component = component;
|
|
6633
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default
|
|
6634
|
-
React__namespace.createElement("span", { ref: this.span, className: css(_default
|
|
6661
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$_.chip, className) }, (this.state.isTooltipVisible && { tabIndex: 0 }), getOUIAProps(Chip.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
6662
|
+
React__namespace.createElement("span", { ref: this.span, className: css(_default$_.chipText), id: id }, children),
|
|
6635
6663
|
!isReadOnly && (React__namespace.createElement(Button, { onClick: onClick, variant: "plain", "aria-label": closeBtnAriaLabel, id: `remove_${id}`, "aria-labelledby": `remove_${id} ${id}`, ouiaId: ouiaId || closeBtnAriaLabel },
|
|
6636
6664
|
React__namespace.createElement(TimesIcon$1, { "aria-hidden": "true" })))));
|
|
6637
6665
|
}
|
|
@@ -6676,8 +6704,8 @@
|
|
|
6676
6704
|
const { categoryName, tooltipPosition } = this.props;
|
|
6677
6705
|
const { isTooltipVisible } = this.state;
|
|
6678
6706
|
return isTooltipVisible ? (React__namespace.createElement(Tooltip, { position: tooltipPosition, content: categoryName },
|
|
6679
|
-
React__namespace.createElement("span", { tabIndex: 0, ref: this.headingRef, className: css(_default
|
|
6680
|
-
React__namespace.createElement("span", { "aria-hidden": "true" }, categoryName)))) : (React__namespace.createElement("span", { ref: this.headingRef, className: css(_default
|
|
6707
|
+
React__namespace.createElement("span", { tabIndex: 0, ref: this.headingRef, className: css(_default$$.chipGroupLabel), id: id, "aria-label": categoryName },
|
|
6708
|
+
React__namespace.createElement("span", { "aria-hidden": "true" }, categoryName)))) : (React__namespace.createElement("span", { ref: this.headingRef, className: css(_default$$.chipGroupLabel), "aria-hidden": "true", id: id }, categoryName));
|
|
6681
6709
|
}
|
|
6682
6710
|
render() {
|
|
6683
6711
|
const _a = this.props, { categoryName, children, className, isClosable, closeBtnAriaLabel, 'aria-label': ariaLabel, onClick, onOverflowChipClick, numChips, expandedText, collapsedText, ouiaId,
|
|
@@ -6694,17 +6722,17 @@
|
|
|
6694
6722
|
const chipArray = !isOpen
|
|
6695
6723
|
? React__namespace.Children.toArray(children).slice(0, numChips)
|
|
6696
6724
|
: React__namespace.Children.toArray(children);
|
|
6697
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default
|
|
6698
|
-
React__namespace.createElement("div", { className: css(_default
|
|
6725
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$$.chipGroup, className, categoryName && _default$$.modifiers.category) }, getOUIAProps(ChipGroup.displayName, ouiaId)),
|
|
6726
|
+
React__namespace.createElement("div", { className: css(_default$$.chipGroupMain) },
|
|
6699
6727
|
categoryName && this.renderLabel(id),
|
|
6700
|
-
React__namespace.createElement("ul", Object.assign({ className: css(_default
|
|
6701
|
-
chipArray.map((child, i) => (React__namespace.createElement("li", { className: css(_default
|
|
6702
|
-
numChildren > numChips && (React__namespace.createElement("li", { className: css(_default
|
|
6728
|
+
React__namespace.createElement("ul", Object.assign({ className: css(_default$$.chipGroupList) }, (categoryName && { 'aria-labelledby': id }), (!categoryName && { 'aria-label': ariaLabel }), { role: "list" }, rest),
|
|
6729
|
+
chipArray.map((child, i) => (React__namespace.createElement("li", { className: css(_default$$.chipGroupListItem), key: i }, child))),
|
|
6730
|
+
numChildren > numChips && (React__namespace.createElement("li", { className: css(_default$$.chipGroupListItem) },
|
|
6703
6731
|
React__namespace.createElement(Chip, { isOverflowChip: true, onClick: event => {
|
|
6704
6732
|
this.toggleCollapse();
|
|
6705
6733
|
onOverflowChipClick(event);
|
|
6706
6734
|
}, component: "button" }, isOpen ? expandedText : collapsedTextResult))))),
|
|
6707
|
-
isClosable && (React__namespace.createElement("div", { className: css(_default
|
|
6735
|
+
isClosable && (React__namespace.createElement("div", { className: css(_default$$.chipGroupClose) },
|
|
6708
6736
|
React__namespace.createElement(Button, { variant: "plain", "aria-label": closeBtnAriaLabel, onClick: onClick, id: `remove_group_${id}`, "aria-labelledby": `remove_group_${id} ${id}`, ouiaId: ouiaId || closeBtnAriaLabel },
|
|
6709
6737
|
React__namespace.createElement(TimesCircleIcon$1, { "aria-hidden": "true" }))))));
|
|
6710
6738
|
};
|
|
@@ -6978,9 +7006,37 @@
|
|
|
6978
7006
|
typeaheadInputValue
|
|
6979
7007
|
}));
|
|
6980
7008
|
};
|
|
6981
|
-
this.
|
|
7009
|
+
this.switchFocusToFavoriteMenu = () => {
|
|
7010
|
+
const { typeaheadCurrIndex, typeaheadStoredIndex } = this.state;
|
|
7011
|
+
let indexForFocus = 0;
|
|
7012
|
+
if (typeaheadCurrIndex !== -1) {
|
|
7013
|
+
indexForFocus = typeaheadCurrIndex;
|
|
7014
|
+
}
|
|
7015
|
+
else if (typeaheadStoredIndex !== -1) {
|
|
7016
|
+
indexForFocus = typeaheadStoredIndex;
|
|
7017
|
+
}
|
|
7018
|
+
if (this.refCollection[indexForFocus] !== null && this.refCollection[indexForFocus][0] !== null) {
|
|
7019
|
+
this.refCollection[indexForFocus][0].focus();
|
|
7020
|
+
}
|
|
7021
|
+
else {
|
|
7022
|
+
this.clearRef.current.focus();
|
|
7023
|
+
}
|
|
7024
|
+
this.setState({
|
|
7025
|
+
tabbedIntoFavoritesMenu: true,
|
|
7026
|
+
typeaheadCurrIndex: -1
|
|
7027
|
+
});
|
|
7028
|
+
};
|
|
7029
|
+
this.moveFocusToLastMenuItem = () => {
|
|
7030
|
+
const refCollectionLen = this.refCollection.length;
|
|
7031
|
+
if (refCollectionLen > 0 &&
|
|
7032
|
+
this.refCollection[refCollectionLen - 1] !== null &&
|
|
7033
|
+
this.refCollection[refCollectionLen - 1][0] !== null) {
|
|
7034
|
+
this.refCollection[refCollectionLen - 1][0].focus();
|
|
7035
|
+
}
|
|
7036
|
+
};
|
|
7037
|
+
this.handleTypeaheadKeys = (position, shiftKey = false) => {
|
|
6982
7038
|
const { isOpen, onFavorite } = this.props;
|
|
6983
|
-
const { typeaheadCurrIndex, tabbedIntoFavoritesMenu
|
|
7039
|
+
const { typeaheadCurrIndex, tabbedIntoFavoritesMenu } = this.state;
|
|
6984
7040
|
const typeaheadActiveChild = this.getTypeaheadActiveChild(typeaheadCurrIndex);
|
|
6985
7041
|
if (isOpen) {
|
|
6986
7042
|
if (position === 'enter') {
|
|
@@ -6998,32 +7054,127 @@
|
|
|
6998
7054
|
}
|
|
6999
7055
|
else if (position === 'tab') {
|
|
7000
7056
|
if (onFavorite) {
|
|
7057
|
+
// if the input has focus, tab to the first item or the last item that was previously focused.
|
|
7001
7058
|
if (this.inputRef.current === document.activeElement) {
|
|
7002
|
-
|
|
7003
|
-
if (
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7010
|
-
this.refCollection[indexForFocus][0].focus();
|
|
7059
|
+
// If shift is also clicked and there is a footer, tab to the last item in tabbable footer
|
|
7060
|
+
if (this.props.footer && shiftKey) {
|
|
7061
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
7062
|
+
if (tabbableItems.length > 0) {
|
|
7063
|
+
if (tabbableItems[tabbableItems.length - 1]) {
|
|
7064
|
+
tabbableItems[tabbableItems.length - 1].focus();
|
|
7065
|
+
}
|
|
7066
|
+
}
|
|
7011
7067
|
}
|
|
7012
7068
|
else {
|
|
7013
|
-
this.
|
|
7069
|
+
this.switchFocusToFavoriteMenu();
|
|
7014
7070
|
}
|
|
7015
|
-
this.setState({
|
|
7016
|
-
tabbedIntoFavoritesMenu: true,
|
|
7017
|
-
typeaheadCurrIndex: -1
|
|
7018
|
-
});
|
|
7019
7071
|
}
|
|
7020
7072
|
else {
|
|
7021
|
-
|
|
7022
|
-
this.
|
|
7073
|
+
// focus is on menu or footer
|
|
7074
|
+
if (this.props.footer) {
|
|
7075
|
+
let tabbedIntoMenu = false;
|
|
7076
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
7077
|
+
if (tabbableItems.length > 0) {
|
|
7078
|
+
// if current element is not in footer, tab to first tabbable element in footer,
|
|
7079
|
+
// if shift was clicked, tab to input since focus is on menu
|
|
7080
|
+
const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
|
|
7081
|
+
if (currentElementIndex === -1) {
|
|
7082
|
+
if (shiftKey) {
|
|
7083
|
+
// currently in menu, shift back to input
|
|
7084
|
+
this.inputRef.current.focus();
|
|
7085
|
+
}
|
|
7086
|
+
else {
|
|
7087
|
+
// currently in menu, tab to first tabbable item in footer
|
|
7088
|
+
tabbableItems[0].focus();
|
|
7089
|
+
}
|
|
7090
|
+
}
|
|
7091
|
+
else {
|
|
7092
|
+
// already in footer
|
|
7093
|
+
if (shiftKey) {
|
|
7094
|
+
// shift to previous item
|
|
7095
|
+
if (currentElementIndex === 0) {
|
|
7096
|
+
// on first footer item, shift back to menu
|
|
7097
|
+
this.switchFocusToFavoriteMenu();
|
|
7098
|
+
tabbedIntoMenu = true;
|
|
7099
|
+
}
|
|
7100
|
+
else {
|
|
7101
|
+
// shift to previous footer item
|
|
7102
|
+
tabbableItems[currentElementIndex - 1].focus();
|
|
7103
|
+
}
|
|
7104
|
+
}
|
|
7105
|
+
else {
|
|
7106
|
+
// tab to next tabbable item in footer or to input.
|
|
7107
|
+
if (tabbableItems[currentElementIndex + 1]) {
|
|
7108
|
+
tabbableItems[currentElementIndex + 1].focus();
|
|
7109
|
+
}
|
|
7110
|
+
else {
|
|
7111
|
+
this.inputRef.current.focus();
|
|
7112
|
+
}
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7115
|
+
}
|
|
7116
|
+
else {
|
|
7117
|
+
// no tabbable items in footer, tab to input
|
|
7118
|
+
this.inputRef.current.focus();
|
|
7119
|
+
tabbedIntoMenu = false;
|
|
7120
|
+
}
|
|
7121
|
+
this.setState({ tabbedIntoFavoritesMenu: tabbedIntoMenu });
|
|
7122
|
+
}
|
|
7123
|
+
else {
|
|
7124
|
+
this.inputRef.current.focus();
|
|
7125
|
+
this.setState({ tabbedIntoFavoritesMenu: false });
|
|
7126
|
+
}
|
|
7023
7127
|
}
|
|
7024
7128
|
}
|
|
7025
7129
|
else {
|
|
7026
|
-
|
|
7130
|
+
// Close if there is no footer
|
|
7131
|
+
if (!this.props.footer) {
|
|
7132
|
+
this.onToggle(false);
|
|
7133
|
+
}
|
|
7134
|
+
else {
|
|
7135
|
+
// has footer
|
|
7136
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
7137
|
+
const currentElementIndex = tabbableItems.findIndex((item) => item === document.activeElement);
|
|
7138
|
+
if (this.inputRef.current === document.activeElement) {
|
|
7139
|
+
if (shiftKey) {
|
|
7140
|
+
// close toggle if shift key and tab on input
|
|
7141
|
+
this.onToggle(false);
|
|
7142
|
+
}
|
|
7143
|
+
else {
|
|
7144
|
+
// tab to first tabbable item in footer
|
|
7145
|
+
if (tabbableItems[0]) {
|
|
7146
|
+
tabbableItems[0].focus();
|
|
7147
|
+
}
|
|
7148
|
+
else {
|
|
7149
|
+
this.onToggle(false);
|
|
7150
|
+
}
|
|
7151
|
+
}
|
|
7152
|
+
}
|
|
7153
|
+
else {
|
|
7154
|
+
// focus is in footer
|
|
7155
|
+
if (shiftKey) {
|
|
7156
|
+
if (currentElementIndex === 0) {
|
|
7157
|
+
// shift tab back to input
|
|
7158
|
+
this.inputRef.current.focus();
|
|
7159
|
+
}
|
|
7160
|
+
else {
|
|
7161
|
+
// shift to previous footer item
|
|
7162
|
+
tabbableItems[currentElementIndex - 1].focus();
|
|
7163
|
+
}
|
|
7164
|
+
}
|
|
7165
|
+
else {
|
|
7166
|
+
// tab to next footer item or close tab if last item
|
|
7167
|
+
if (tabbableItems[currentElementIndex + 1]) {
|
|
7168
|
+
tabbableItems[currentElementIndex + 1].focus();
|
|
7169
|
+
}
|
|
7170
|
+
else {
|
|
7171
|
+
// no next item, close toggle
|
|
7172
|
+
this.onToggle(false);
|
|
7173
|
+
this.inputRef.current.focus();
|
|
7174
|
+
}
|
|
7175
|
+
}
|
|
7176
|
+
}
|
|
7177
|
+
}
|
|
7027
7178
|
}
|
|
7028
7179
|
}
|
|
7029
7180
|
else if (!tabbedIntoFavoritesMenu) {
|
|
@@ -7180,13 +7331,13 @@
|
|
|
7180
7331
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7181
7332
|
onFilter,
|
|
7182
7333
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7183
|
-
onTypeaheadInputChanged, onCreateOption, isCreatable, onToggle, createText, noResultsFoundText, customBadgeText, inputIdPrefix,
|
|
7334
|
+
onTypeaheadInputChanged, onCreateOption, isCreatable, onToggle, createText, noResultsFoundText, customBadgeText, inputIdPrefix, inputAutoComplete,
|
|
7184
7335
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7185
7336
|
isInputValuePersisted, isInputFilterPersisted,
|
|
7186
7337
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
7187
7338
|
menuAppendTo, favorites, onFavorite,
|
|
7188
7339
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
7189
|
-
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject"]);
|
|
7340
|
+
favoritesLabel, footer, loadingVariant, isCreateSelectOptionObject } = _a, props = __rest$1(_a, ["children", "chipGroupProps", "chipGroupComponent", "className", "customContent", "variant", "direction", "onSelect", "onClear", "toggleId", "isOpen", "isGrouped", "isPlain", "isDisabled", "hasPlaceholderStyle", "validated", "selections", "typeAheadAriaLabel", "clearSelectionsAriaLabel", "toggleAriaLabel", "removeSelectionAriaLabel", 'aria-label', 'aria-labelledby', 'aria-describedby', 'aria-invalid', "placeholderText", "width", "maxHeight", "toggleIcon", "ouiaId", "ouiaSafe", "hasInlineFilter", "isCheckboxSelectionBadgeHidden", "inlineFilterPlaceholderText", "onFilter", "onTypeaheadInputChanged", "onCreateOption", "isCreatable", "onToggle", "createText", "noResultsFoundText", "customBadgeText", "inputIdPrefix", "inputAutoComplete", "isInputValuePersisted", "isInputFilterPersisted", "menuAppendTo", "favorites", "onFavorite", "favoritesLabel", "footer", "loadingVariant", "isCreateSelectOptionObject"]);
|
|
7190
7341
|
const { focusFirstOption: openedOnEnter, typeaheadCurrIndex, typeaheadInputValue, typeaheadFilteredChildren, favoritesGroup } = this.state;
|
|
7191
7342
|
const selectToggleId = toggleId || `pf-select-toggle-id-${currentId$1++}`;
|
|
7192
7343
|
const selections = Array.isArray(selectionsProp) ? selectionsProp : [selectionsProp];
|
|
@@ -7224,16 +7375,16 @@
|
|
|
7224
7375
|
if (isOpen) {
|
|
7225
7376
|
if (renderableItems.find(item => { var _a; return ((_a = item) === null || _a === void 0 ? void 0 : _a.key) === 'loading'; }) === undefined) {
|
|
7226
7377
|
if (loadingVariant === 'spinner') {
|
|
7227
|
-
renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading"
|
|
7378
|
+
renderableItems.push(React__namespace.createElement(SelectOption, { isLoading: true, key: "loading", value: "loading" },
|
|
7228
7379
|
React__namespace.createElement(Spinner, { size: "lg" })));
|
|
7229
7380
|
}
|
|
7230
7381
|
else if (loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.text) {
|
|
7231
|
-
renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text,
|
|
7382
|
+
renderableItems.push(React__namespace.createElement(SelectOption, { isLoad: true, key: "loading", value: loadingVariant.text, setViewMoreNextIndex: this.setVieMoreNextIndex, onClick: loadingVariant === null || loadingVariant === void 0 ? void 0 : loadingVariant.onClick }));
|
|
7232
7383
|
}
|
|
7233
7384
|
}
|
|
7234
7385
|
}
|
|
7235
7386
|
const hasOnClear = onClear !== Select.defaultProps.onClear;
|
|
7236
|
-
const clearBtn = (React__namespace.createElement("button", { className: css(_default$
|
|
7387
|
+
const clearBtn = (React__namespace.createElement("button", { className: css(_default$1k.button, _default$1k.modifiers.plain, _default$12.selectToggleClear), onClick: e => {
|
|
7237
7388
|
this.clearSelection(e);
|
|
7238
7389
|
onClear(e);
|
|
7239
7390
|
}, "aria-label": clearSelectionsAriaLabel, type: "button", disabled: isDisabled, ref: this.clearRef, onKeyDown: event => {
|
|
@@ -7249,8 +7400,8 @@
|
|
|
7249
7400
|
}
|
|
7250
7401
|
if (hasInlineFilter) {
|
|
7251
7402
|
const filterBox = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7252
|
-
React__namespace.createElement("div", { key: "inline-filter", className: css(_default$
|
|
7253
|
-
React__namespace.createElement("input", { key: "inline-filter-input", type: "search", className: css(_default$
|
|
7403
|
+
React__namespace.createElement("div", { key: "inline-filter", className: css(_default$12.selectMenuSearch) },
|
|
7404
|
+
React__namespace.createElement("input", { key: "inline-filter-input", type: "search", className: css(_default$1b.formControl, _default$1b.modifiers.search), onChange: this.onChange, placeholder: inlineFilterPlaceholderText, onKeyDown: event => {
|
|
7254
7405
|
if (event.key === KeyTypes.ArrowUp) {
|
|
7255
7406
|
this.handleMenuKeys(0, 0, 'up');
|
|
7256
7407
|
event.preventDefault();
|
|
@@ -7267,6 +7418,23 @@
|
|
|
7267
7418
|
this.handleMenuKeys(0, 0, 'right');
|
|
7268
7419
|
event.preventDefault();
|
|
7269
7420
|
}
|
|
7421
|
+
else if (event.key === KeyTypes.Tab && variant !== exports.SelectVariant.checkbox && this.props.footer) {
|
|
7422
|
+
// tab to footer or close menu if shift key
|
|
7423
|
+
if (event.shiftKey) {
|
|
7424
|
+
this.onToggle(false);
|
|
7425
|
+
}
|
|
7426
|
+
else {
|
|
7427
|
+
const tabbableItems = findTabbableElements(this.footerRef, SelectFooterTabbableItems);
|
|
7428
|
+
if (tabbableItems.length > 0) {
|
|
7429
|
+
tabbableItems[0].focus();
|
|
7430
|
+
event.stopPropagation();
|
|
7431
|
+
event.preventDefault();
|
|
7432
|
+
}
|
|
7433
|
+
else {
|
|
7434
|
+
this.onToggle(false);
|
|
7435
|
+
}
|
|
7436
|
+
}
|
|
7437
|
+
}
|
|
7270
7438
|
else if (event.key === KeyTypes.Tab && variant === exports.SelectVariant.checkbox) {
|
|
7271
7439
|
// More modal-like experience for checkboxes
|
|
7272
7440
|
// Let SelectOption handle this
|
|
@@ -7279,7 +7447,7 @@
|
|
|
7279
7447
|
event.stopPropagation();
|
|
7280
7448
|
event.preventDefault();
|
|
7281
7449
|
}
|
|
7282
|
-
}, ref: this.filterRef, autoComplete:
|
|
7450
|
+
}, ref: this.filterRef, autoComplete: inputAutoComplete })),
|
|
7283
7451
|
React__namespace.createElement(Divider, { key: "inline-filter-divider" })));
|
|
7284
7452
|
renderableItems = [filterBox, ...typeaheadFilteredChildren].map((option, index) => React__namespace.cloneElement(option, { key: index }));
|
|
7285
7453
|
}
|
|
@@ -7335,46 +7503,46 @@
|
|
|
7335
7503
|
}
|
|
7336
7504
|
}
|
|
7337
7505
|
const innerMenu = (React__namespace.createElement(SelectMenu, Object.assign({}, props, { isGrouped: isGrouped, selected: selections }, variantProps, { openedOnEnter: openedOnEnter, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, sendRef: this.sendRef, keyHandler: this.handleMenuKeys, maxHeight: maxHeight, ref: this.menuComponentRef, footer: footer, footerRef: this.footerRef, isLastOptionBeforeFooter: this.isLastOptionBeforeFooter }), variantChildren));
|
|
7338
|
-
const menuContainer = footer ? React__namespace.createElement("div", { className: css(_default$
|
|
7506
|
+
const menuContainer = footer ? React__namespace.createElement("div", { className: css(_default$12.selectMenu) },
|
|
7339
7507
|
" ",
|
|
7340
7508
|
innerMenu,
|
|
7341
7509
|
" ") : innerMenu;
|
|
7342
|
-
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
7343
|
-
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
7344
|
-
React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
|
|
7345
|
-
customContent && (React__namespace.createElement("div", { className: css(_default$
|
|
7346
|
-
toggleIcon && React__namespace.createElement("span", { className: css(_default$
|
|
7347
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
7510
|
+
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$12.select, isOpen && _default$12.modifiers.expanded, validated === exports.ValidatedOptions.success && _default$12.modifiers.success, validated === exports.ValidatedOptions.warning && _default$12.modifiers.warning, validated === exports.ValidatedOptions.error && _default$12.modifiers.invalid, direction === exports.SelectDirection.up && _default$12.modifiers.top, className) }, (width && { style: { width } }), (validated !== exports.ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== exports.ValidatedOptions.default && { 'aria-invalid': ariaInvalid })), isOpen && menuContainer));
|
|
7511
|
+
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$12.select, isOpen && _default$12.modifiers.expanded, validated === exports.ValidatedOptions.success && _default$12.modifiers.success, validated === exports.ValidatedOptions.warning && _default$12.modifiers.warning, validated === exports.ValidatedOptions.error && _default$12.modifiers.invalid, direction === exports.SelectDirection.up && _default$12.modifiers.top, className), ref: this.parentRef }, getOUIAProps(Select.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), (width && { style: { width } }), (validated !== exports.ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== exports.ValidatedOptions.default && { 'aria-invalid': ariaInvalid })),
|
|
7512
|
+
React__namespace.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, hasPlaceholderStyle: hasPlaceholderStyle && (!selections.length || selections[0] === null || isSelectedPlaceholder), onToggle: this.onToggle, onEnter: this.onEnter, onClose: this.onClose, variant: variant, "aria-labelledby": `${ariaLabelledBy || ''} ${selectToggleId}`, "aria-label": toggleAriaLabel, handleTypeaheadKeys: this.handleTypeaheadKeys, moveFocusToLastMenuItem: this.moveFocusToLastMenuItem, isDisabled: isDisabled, hasClearButton: hasOnClear, hasFooter: footer !== undefined, onClickTypeaheadToggleButton: this.onClickTypeaheadToggleButton }),
|
|
7513
|
+
customContent && (React__namespace.createElement("div", { className: css(_default$12.selectToggleWrapper) },
|
|
7514
|
+
toggleIcon && React__namespace.createElement("span", { className: css(_default$12.selectToggleIcon) }, toggleIcon),
|
|
7515
|
+
React__namespace.createElement("span", { className: css(_default$12.selectToggleText) }, placeholderText))),
|
|
7348
7516
|
variant === exports.SelectVariant.single && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7349
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
7350
|
-
toggleIcon && React__namespace.createElement("span", { className: css(_default$
|
|
7351
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
7517
|
+
React__namespace.createElement("div", { className: css(_default$12.selectToggleWrapper) },
|
|
7518
|
+
toggleIcon && React__namespace.createElement("span", { className: css(_default$12.selectToggleIcon) }, toggleIcon),
|
|
7519
|
+
React__namespace.createElement("span", { className: css(_default$12.selectToggleText) }, this.getDisplay(selections[0], 'node') || placeholderText || childPlaceholderText)),
|
|
7352
7520
|
hasOnClear && hasAnySelections && clearBtn)),
|
|
7353
7521
|
variant === exports.SelectVariant.checkbox && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7354
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
7355
|
-
toggleIcon && React__namespace.createElement("span", { className: css(_default$
|
|
7356
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
7357
|
-
!isCheckboxSelectionBadgeHidden && hasAnySelections && (React__namespace.createElement("div", { className: css(_default$
|
|
7358
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
7522
|
+
React__namespace.createElement("div", { className: css(_default$12.selectToggleWrapper) },
|
|
7523
|
+
toggleIcon && React__namespace.createElement("span", { className: css(_default$12.selectToggleIcon) }, toggleIcon),
|
|
7524
|
+
React__namespace.createElement("span", { className: css(_default$12.selectToggleText) }, placeholderText),
|
|
7525
|
+
!isCheckboxSelectionBadgeHidden && hasAnySelections && (React__namespace.createElement("div", { className: css(_default$12.selectToggleBadge) },
|
|
7526
|
+
React__namespace.createElement("span", { className: css(_default$18.badge, _default$18.modifiers.read) }, this.generateSelectedBadge())))),
|
|
7359
7527
|
hasOnClear && hasAnySelections && clearBtn)),
|
|
7360
7528
|
variant === exports.SelectVariant.typeahead && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7361
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
7362
|
-
toggleIcon && React__namespace.createElement("span", { className: css(_default$
|
|
7363
|
-
React__namespace.createElement("input", { className: css(_default$
|
|
7529
|
+
React__namespace.createElement("div", { className: css(_default$12.selectToggleWrapper) },
|
|
7530
|
+
toggleIcon && React__namespace.createElement("span", { className: css(_default$12.selectToggleIcon) }, toggleIcon),
|
|
7531
|
+
React__namespace.createElement("input", { className: css(_default$1b.formControl, _default$12.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-typeahead`, "aria-label": typeAheadAriaLabel, placeholder: placeholderText, value: typeaheadInputValue !== null
|
|
7364
7532
|
? typeaheadInputValue
|
|
7365
|
-
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete:
|
|
7533
|
+
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
|
|
7366
7534
|
hasOnClear && (selections[0] || typeaheadInputValue) && clearBtn)),
|
|
7367
7535
|
variant === exports.SelectVariant.typeaheadMulti && !customContent && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7368
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
7369
|
-
toggleIcon && React__namespace.createElement("span", { className: css(_default$
|
|
7536
|
+
React__namespace.createElement("div", { className: css(_default$12.selectToggleWrapper) },
|
|
7537
|
+
toggleIcon && React__namespace.createElement("span", { className: css(_default$12.selectToggleIcon) }, toggleIcon),
|
|
7370
7538
|
selections && Array.isArray(selections) && selections.length > 0 && selectedChips,
|
|
7371
|
-
React__namespace.createElement("input", { className: css(_default$
|
|
7539
|
+
React__namespace.createElement("input", { className: css(_default$1b.formControl, _default$12.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === exports.ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: inputAutoComplete, disabled: isDisabled, ref: this.inputRef })),
|
|
7372
7540
|
hasOnClear && ((selections && selections.length > 0) || typeaheadInputValue) && clearBtn)),
|
|
7373
|
-
validated === exports.ValidatedOptions.success && (React__namespace.createElement("span", { className: css(_default$
|
|
7541
|
+
validated === exports.ValidatedOptions.success && (React__namespace.createElement("span", { className: css(_default$12.selectToggleStatusIcon) },
|
|
7374
7542
|
React__namespace.createElement(CheckCircleIcon$1, { "aria-hidden": "true" }))),
|
|
7375
|
-
validated === exports.ValidatedOptions.error && (React__namespace.createElement("span", { className: css(_default$
|
|
7543
|
+
validated === exports.ValidatedOptions.error && (React__namespace.createElement("span", { className: css(_default$12.selectToggleStatusIcon) },
|
|
7376
7544
|
React__namespace.createElement(ExclamationCircleIcon$1, { "aria-hidden": "true" }))),
|
|
7377
|
-
validated === exports.ValidatedOptions.warning && (React__namespace.createElement("span", { className: css(_default$
|
|
7545
|
+
validated === exports.ValidatedOptions.warning && (React__namespace.createElement("span", { className: css(_default$12.selectToggleStatusIcon) },
|
|
7378
7546
|
React__namespace.createElement(ExclamationTriangleIcon$1, { "aria-hidden": "true" })))),
|
|
7379
7547
|
isOpen && menuAppendTo === 'inline' && menuContainer));
|
|
7380
7548
|
const getParentElement = () => {
|
|
@@ -7424,6 +7592,7 @@
|
|
|
7424
7592
|
inlineFilterPlaceholderText: null,
|
|
7425
7593
|
customBadgeText: null,
|
|
7426
7594
|
inputIdPrefix: '',
|
|
7595
|
+
inputAutoComplete: navigator.userAgent.match('Chrome') ? getUniqueId('pf-no-autocomplete') : 'off',
|
|
7427
7596
|
menuAppendTo: 'inline',
|
|
7428
7597
|
favorites: [],
|
|
7429
7598
|
favoritesLabel: 'Favorites',
|
|
@@ -7460,7 +7629,7 @@
|
|
|
7460
7629
|
|
|
7461
7630
|
var ArrowRightIcon$1 = ArrowRightIcon;
|
|
7462
7631
|
|
|
7463
|
-
var _default$
|
|
7632
|
+
var _default$Z = {
|
|
7464
7633
|
"calendarMonth": "pf-c-calendar-month",
|
|
7465
7634
|
"calendarMonthCalendar": "pf-c-calendar-month__calendar",
|
|
7466
7635
|
"calendarMonthDate": "pf-c-calendar-month__date",
|
|
@@ -7611,12 +7780,12 @@
|
|
|
7611
7780
|
const isHoveredDateValid = isValidated(hoveredDate);
|
|
7612
7781
|
const monthFormatted = monthFormat(focusedDate);
|
|
7613
7782
|
const yearFormatted = yearFormat(focusedDate);
|
|
7614
|
-
return (React__default["default"].createElement("div", Object.assign({ className: css(_default$
|
|
7615
|
-
React__default["default"].createElement("div", { className: _default$
|
|
7616
|
-
React__default["default"].createElement("div", { className: css(_default$
|
|
7783
|
+
return (React__default["default"].createElement("div", Object.assign({ className: css(_default$Z.calendarMonth, className) }, props),
|
|
7784
|
+
React__default["default"].createElement("div", { className: _default$Z.calendarMonthHeader },
|
|
7785
|
+
React__default["default"].createElement("div", { className: css(_default$Z.calendarMonthHeaderNavControl, _default$Z.modifiers.prevMonth) },
|
|
7617
7786
|
React__default["default"].createElement(Button, { variant: "plain", "aria-label": prevMonthAriaLabel, onClick: () => onMonthClick(prevMonth) },
|
|
7618
7787
|
React__default["default"].createElement(ArrowLeftIcon$1, { "aria-hidden": true }))),
|
|
7619
|
-
React__default["default"].createElement("div", { className: _default$
|
|
7788
|
+
React__default["default"].createElement("div", { className: _default$Z.calendarMonthHeaderMonth },
|
|
7620
7789
|
React__default["default"].createElement("span", { id: hiddenMonthId, hidden: true }, "Month"),
|
|
7621
7790
|
React__default["default"].createElement(Select
|
|
7622
7791
|
// Max width with "September"
|
|
@@ -7638,7 +7807,7 @@
|
|
|
7638
7807
|
setShouldFocus(false);
|
|
7639
7808
|
}, 0);
|
|
7640
7809
|
}, variant: "single", selections: monthFormatted }, longMonths.map((longMonth, index) => (React__default["default"].createElement(SelectOption, { key: index, value: index, isSelected: longMonth === monthFormatted }, longMonth))))),
|
|
7641
|
-
React__default["default"].createElement("div", { className: _default$
|
|
7810
|
+
React__default["default"].createElement("div", { className: _default$Z.calendarMonthHeaderYear },
|
|
7642
7811
|
React__default["default"].createElement(TextInput, { "aria-label": yearInputAriaLabel, type: "number", value: yearFormatted, onChange: year => {
|
|
7643
7812
|
const newDate = new Date(focusedDate);
|
|
7644
7813
|
newDate.setFullYear(+year);
|
|
@@ -7646,15 +7815,15 @@
|
|
|
7646
7815
|
setHoveredDate(newDate);
|
|
7647
7816
|
setShouldFocus(false);
|
|
7648
7817
|
} })),
|
|
7649
|
-
React__default["default"].createElement("div", { className: css(_default$
|
|
7818
|
+
React__default["default"].createElement("div", { className: css(_default$Z.calendarMonthHeaderNavControl, _default$Z.modifiers.nextMonth) },
|
|
7650
7819
|
React__default["default"].createElement(Button, { variant: "plain", "aria-label": nextMonthAriaLabel, onClick: () => onMonthClick(nextMonth) },
|
|
7651
7820
|
React__default["default"].createElement(ArrowRightIcon$1, { "aria-hidden": true })))),
|
|
7652
|
-
React__default["default"].createElement("table", { className: _default$
|
|
7653
|
-
React__default["default"].createElement("thead", { className: _default$
|
|
7654
|
-
React__default["default"].createElement("tr", null, calendar[0].map(({ date }, index) => (React__default["default"].createElement("th", { key: index, className: _default$
|
|
7821
|
+
React__default["default"].createElement("table", { className: _default$Z.calendarMonthCalendar },
|
|
7822
|
+
React__default["default"].createElement("thead", { className: _default$Z.calendarMonthDays },
|
|
7823
|
+
React__default["default"].createElement("tr", null, calendar[0].map(({ date }, index) => (React__default["default"].createElement("th", { key: index, className: _default$Z.calendarMonthDay, scope: "col" },
|
|
7655
7824
|
React__default["default"].createElement("span", { className: "pf-screen-reader" }, longWeekdayFormat(date)),
|
|
7656
7825
|
React__default["default"].createElement("span", { "aria-hidden": true }, weekdayFormat(date))))))),
|
|
7657
|
-
React__default["default"].createElement("tbody", { onKeyDown: onKeyDown }, calendar.map((week, index) => (React__default["default"].createElement("tr", { key: index, className: _default$
|
|
7826
|
+
React__default["default"].createElement("tbody", { onKeyDown: onKeyDown }, calendar.map((week, index) => (React__default["default"].createElement("tr", { key: index, className: _default$Z.calendarMonthDatesRow }, week.map(({ date, isValid }, index) => {
|
|
7658
7827
|
const dayFormatted = dayFormat(date);
|
|
7659
7828
|
const isToday = isSameDate(date, today);
|
|
7660
7829
|
const isSelected = isValidDate(dateProp) && isSameDate(date, dateProp);
|
|
@@ -7672,12 +7841,12 @@
|
|
|
7672
7841
|
// Don't handle focused dates before start dates for now.
|
|
7673
7842
|
// Core would likely need new styles
|
|
7674
7843
|
}
|
|
7675
|
-
return (React__default["default"].createElement("td", { key: index, className: css(_default$
|
|
7676
|
-
React__default["default"].createElement("button", Object.assign({ className: css(_default$
|
|
7844
|
+
return (React__default["default"].createElement("td", { key: index, className: css(_default$Z.calendarMonthDatesCell, isAdjacentMonth && _default$Z.modifiers.adjacentMonth, isToday && _default$Z.modifiers.current, (isSelected || isRangeStart) && _default$Z.modifiers.selected, !isValid && _default$Z.modifiers.disabled, (isInRange || isRangeStart || isRangeEnd) && _default$Z.modifiers.inRange, isRangeStart && _default$Z.modifiers.startRange, isRangeEnd && _default$Z.modifiers.endRange) },
|
|
7845
|
+
React__default["default"].createElement("button", Object.assign({ className: css(_default$Z.calendarMonthDate, isRangeEnd && _default$Z.modifiers.hover, !isValid && _default$Z.modifiers.disabled), type: "button", onClick: () => onChange(date), onMouseOver: () => setHoveredDate(date), tabIndex: isFocused ? 0 : -1, disabled: !isValid, "aria-label": cellAriaLabel ? cellAriaLabel(date) : `${dayFormatted} ${monthFormatted} ${yearFormatted}` }, (isFocused && { ref: focusRef })), dayFormatted)));
|
|
7677
7846
|
}))))))));
|
|
7678
7847
|
};
|
|
7679
7848
|
|
|
7680
|
-
var _default$
|
|
7849
|
+
var _default$Y = {
|
|
7681
7850
|
"card": "pf-c-card",
|
|
7682
7851
|
"cardActions": "pf-c-card__actions",
|
|
7683
7852
|
"cardBody": "pf-c-card__body",
|
|
@@ -7725,13 +7894,13 @@
|
|
|
7725
7894
|
}
|
|
7726
7895
|
const getSelectableModifiers = () => {
|
|
7727
7896
|
if (isDisabledRaised) {
|
|
7728
|
-
return css(_default$
|
|
7897
|
+
return css(_default$Y.modifiers.nonSelectableRaised);
|
|
7729
7898
|
}
|
|
7730
7899
|
if (isSelectableRaised) {
|
|
7731
|
-
return css(_default$
|
|
7900
|
+
return css(_default$Y.modifiers.selectableRaised, isSelected && _default$Y.modifiers.selectedRaised);
|
|
7732
7901
|
}
|
|
7733
7902
|
if (isSelectable || isHoverable) {
|
|
7734
|
-
return css(_default$
|
|
7903
|
+
return css(_default$Y.modifiers.selectable, isSelected && _default$Y.modifiers.selected);
|
|
7735
7904
|
}
|
|
7736
7905
|
return '';
|
|
7737
7906
|
};
|
|
@@ -7739,53 +7908,53 @@
|
|
|
7739
7908
|
cardId: id,
|
|
7740
7909
|
isExpanded
|
|
7741
7910
|
} },
|
|
7742
|
-
React__namespace.createElement(Component, Object.assign({ id: id, className: css(_default$
|
|
7911
|
+
React__namespace.createElement(Component, Object.assign({ id: id, className: css(_default$Y.card, isCompact && _default$Y.modifiers.compact, isExpanded && _default$Y.modifiers.expanded, isFlat && _default$Y.modifiers.flat, isRounded && _default$Y.modifiers.rounded, isLarge && _default$Y.modifiers.displayLg, isFullHeight && _default$Y.modifiers.fullHeight, isPlain && _default$Y.modifiers.plain, getSelectableModifiers(), className), tabIndex: isSelectable || isSelectableRaised ? '0' : undefined }, props, ouiaProps), children)));
|
|
7743
7912
|
};
|
|
7744
7913
|
Card.displayName = 'Card';
|
|
7745
7914
|
|
|
7746
7915
|
const CardActions = (_a) => {
|
|
7747
7916
|
var { children = null, className = '', hasNoOffset = false } = _a, props = __rest$1(_a, ["children", "className", "hasNoOffset"]);
|
|
7748
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
7917
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Y.cardActions, hasNoOffset && _default$Y.modifiers.noOffset, className) }, props), children));
|
|
7749
7918
|
};
|
|
7750
7919
|
CardActions.displayName = 'CardActions';
|
|
7751
7920
|
|
|
7752
7921
|
const CardBody = (_a) => {
|
|
7753
7922
|
var { children = null, className = '', component = 'div', isFilled = true } = _a, props = __rest$1(_a, ["children", "className", "component", "isFilled"]);
|
|
7754
7923
|
const Component = component;
|
|
7755
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
7924
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$Y.cardBody, !isFilled && _default$Y.modifiers.noFill, className) }, props), children));
|
|
7756
7925
|
};
|
|
7757
7926
|
CardBody.displayName = 'CardBody';
|
|
7758
7927
|
|
|
7759
7928
|
const CardExpandableContent = (_a) => {
|
|
7760
7929
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
7761
|
-
return (React__namespace.createElement(CardContext.Consumer, null, ({ isExpanded }) => isExpanded ? (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
7930
|
+
return (React__namespace.createElement(CardContext.Consumer, null, ({ isExpanded }) => isExpanded ? (React__namespace.createElement("div", Object.assign({ className: css(_default$Y.cardExpandableContent, className) }, props), children)) : null));
|
|
7762
7931
|
};
|
|
7763
7932
|
CardExpandableContent.displayName = 'CardExpandableContent';
|
|
7764
7933
|
|
|
7765
7934
|
const CardFooter = (_a) => {
|
|
7766
7935
|
var { children = null, className = '', component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
7767
7936
|
const Component = component;
|
|
7768
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
7937
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$Y.cardFooter, className) }, props), children));
|
|
7769
7938
|
};
|
|
7770
7939
|
CardFooter.displayName = 'CardFooter';
|
|
7771
7940
|
|
|
7772
7941
|
const CardTitle = (_a) => {
|
|
7773
7942
|
var { children = null, className = '', component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
7774
7943
|
const Component = component;
|
|
7775
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
7944
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$Y.cardTitle, className) }, props), children));
|
|
7776
7945
|
};
|
|
7777
7946
|
CardTitle.displayName = 'CardTitle';
|
|
7778
7947
|
|
|
7779
7948
|
const CardHeader = (_a) => {
|
|
7780
7949
|
var { children = null, className = '', id, onExpand, toggleButtonProps, isToggleRightAligned } = _a, props = __rest$1(_a, ["children", "className", "id", "onExpand", "toggleButtonProps", "isToggleRightAligned"]);
|
|
7781
7950
|
return (React__namespace.createElement(CardContext.Consumer, null, ({ cardId }) => {
|
|
7782
|
-
const cardHeaderToggle = (React__namespace.createElement("div", { className: css(_default$
|
|
7951
|
+
const cardHeaderToggle = (React__namespace.createElement("div", { className: css(_default$Y.cardHeaderToggle) },
|
|
7783
7952
|
React__namespace.createElement(Button, Object.assign({ variant: "plain", type: "button", onClick: evt => {
|
|
7784
7953
|
onExpand(evt, cardId);
|
|
7785
7954
|
} }, toggleButtonProps),
|
|
7786
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
7955
|
+
React__namespace.createElement("span", { className: css(_default$Y.cardHeaderToggleIcon) },
|
|
7787
7956
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": "true" })))));
|
|
7788
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
7957
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Y.cardHeader, isToggleRightAligned && _default$Y.modifiers.toggleRight, className), id: id }, props),
|
|
7789
7958
|
onExpand && !isToggleRightAligned && cardHeaderToggle,
|
|
7790
7959
|
children,
|
|
7791
7960
|
onExpand && isToggleRightAligned && cardHeaderToggle));
|
|
@@ -7828,11 +7997,11 @@
|
|
|
7828
7997
|
checkedProps.defaultChecked = defaultChecked;
|
|
7829
7998
|
}
|
|
7830
7999
|
checkedProps.checked = checkedProps.checked === null ? false : checkedProps.checked;
|
|
7831
|
-
return (React__namespace.createElement("div", { className: css(_default$
|
|
7832
|
-
React__namespace.createElement("input", Object.assign({}, props, { className: css(_default$
|
|
7833
|
-
label && (React__namespace.createElement("label", { className: css(_default$
|
|
7834
|
-
description && React__namespace.createElement("span", { className: css(_default$
|
|
7835
|
-
body && React__namespace.createElement("span", { className: css(_default$
|
|
8000
|
+
return (React__namespace.createElement("div", { className: css(_default$10.check, !label && _default$10.modifiers.standalone, className) },
|
|
8001
|
+
React__namespace.createElement("input", Object.assign({}, props, { className: css(_default$10.checkInput), type: "checkbox", onChange: this.handleChange, "aria-invalid": !isValid, "aria-label": ariaLabel, disabled: isDisabled, ref: elem => elem && (elem.indeterminate = isChecked === null) }, checkedProps, getOUIAProps(Checkbox.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe))),
|
|
8002
|
+
label && (React__namespace.createElement("label", { className: css(_default$10.checkLabel, isDisabled && _default$10.modifiers.disabled), htmlFor: props.id }, label)),
|
|
8003
|
+
description && React__namespace.createElement("span", { className: css(_default$10.checkDescription) }, description),
|
|
8004
|
+
body && React__namespace.createElement("span", { className: css(_default$10.checkBody) }, body)));
|
|
7836
8005
|
}
|
|
7837
8006
|
}
|
|
7838
8007
|
Checkbox.displayName = 'Checkbox';
|
|
@@ -7845,7 +8014,7 @@
|
|
|
7845
8014
|
ouiaSafe: true
|
|
7846
8015
|
};
|
|
7847
8016
|
|
|
7848
|
-
var _default$
|
|
8017
|
+
var _default$X = {
|
|
7849
8018
|
"button": "pf-c-button",
|
|
7850
8019
|
"clipboardCopy": "pf-c-clipboard-copy",
|
|
7851
8020
|
"clipboardCopyActions": "pf-c-clipboard-copy__actions",
|
|
@@ -7908,7 +8077,7 @@
|
|
|
7908
8077
|
}
|
|
7909
8078
|
render() {
|
|
7910
8079
|
const _a = this.props, { className, children, onChange, isReadOnly, isCode } = _a, props = __rest$1(_a, ["className", "children", "onChange", "isReadOnly", "isCode"]);
|
|
7911
|
-
return (React__namespace.createElement("div", Object.assign({ suppressContentEditableWarning: true, className: css(_default$
|
|
8080
|
+
return (React__namespace.createElement("div", Object.assign({ suppressContentEditableWarning: true, className: css(_default$X.clipboardCopyExpandableContent, className), onInput: (e) => onChange(e.target.innerText, e), contentEditable: !isReadOnly }, props), isCode ? React__namespace.createElement("pre", null, children) : children));
|
|
7912
8081
|
}
|
|
7913
8082
|
}
|
|
7914
8083
|
ClipboardCopyExpanded.displayName = 'ClipboardCopyExpanded';
|
|
@@ -7968,12 +8137,12 @@
|
|
|
7968
8137
|
const textIdPrefix = 'text-input-';
|
|
7969
8138
|
const toggleIdPrefix = 'toggle-';
|
|
7970
8139
|
const contentIdPrefix = 'content-';
|
|
7971
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8140
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$X.clipboardCopy, variant === 'inline-compact' && _default$X.modifiers.inline, isBlock && _default$X.modifiers.block, this.state.expanded && _default$X.modifiers.expanded, className) }, divProps),
|
|
7972
8141
|
variant === 'inline-compact' && (React__namespace.createElement(GenerateId, { prefix: "" }, id => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7973
|
-
!isCode && (React__namespace.createElement("span", { className: css(_default$
|
|
7974
|
-
isCode && (React__namespace.createElement("code", { className: css(_default$
|
|
7975
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
7976
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
8142
|
+
!isCode && (React__namespace.createElement("span", { className: css(_default$X.clipboardCopyText), id: `${textIdPrefix}${id}` }, this.state.text)),
|
|
8143
|
+
isCode && (React__namespace.createElement("code", { className: css(_default$X.clipboardCopyText, _default$X.modifiers.code), id: `${textIdPrefix}${id}` }, this.state.text)),
|
|
8144
|
+
React__namespace.createElement("span", { className: css(_default$X.clipboardCopyActions) },
|
|
8145
|
+
React__namespace.createElement("span", { className: css(_default$X.clipboardCopyActionsItem) },
|
|
7977
8146
|
React__namespace.createElement(ClipboardCopyButton, { variant: "plain", exitDelay: exitDelay, entryDelay: entryDelay, maxWidth: maxWidth, position: position, id: `copy-button-${id}`, textId: `text-input-${id}`, "aria-label": hoverTip, onClick: (event) => {
|
|
7978
8147
|
if (this.timer) {
|
|
7979
8148
|
window.clearTimeout(this.timer);
|
|
@@ -7989,7 +8158,7 @@
|
|
|
7989
8158
|
} }, this.state.copied ? clickTip : hoverTip)),
|
|
7990
8159
|
additionalActions && additionalActions))))),
|
|
7991
8160
|
variant !== 'inline-compact' && (React__namespace.createElement(GenerateId, { prefix: "" }, id => (React__namespace.createElement(React__namespace.Fragment, null,
|
|
7992
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8161
|
+
React__namespace.createElement("div", { className: css(_default$X.clipboardCopyGroup) },
|
|
7993
8162
|
variant === 'expansion' && (React__namespace.createElement(ClipboardCopyToggle, { isExpanded: this.state.expanded, onClick: this.expandContent, id: `${toggleIdPrefix}${id}`, textId: `${textIdPrefix}${id}`, contentId: `${contentIdPrefix}${id}`, "aria-label": toggleAriaLabel })),
|
|
7994
8163
|
React__namespace.createElement(TextInput, { isReadOnly: isReadOnly || this.state.expanded, onChange: this.updateText, value: this.state.text, id: `text-input-${id}`, "aria-label": textAriaLabel }),
|
|
7995
8164
|
React__namespace.createElement(ClipboardCopyButton, { exitDelay: exitDelay, entryDelay: entryDelay, maxWidth: maxWidth, position: position, id: `copy-button-${id}`, textId: `text-input-${id}`, "aria-label": hoverTip, onClick: (event) => {
|
|
@@ -8036,11 +8205,11 @@
|
|
|
8036
8205
|
|
|
8037
8206
|
const ClipboardCopyAction = (_a) => {
|
|
8038
8207
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8039
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(_default$
|
|
8208
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(_default$X.clipboardCopyActionsItem, className) }, props), children));
|
|
8040
8209
|
};
|
|
8041
8210
|
ClipboardCopyAction.displayName = 'ClipboardCopyAction';
|
|
8042
8211
|
|
|
8043
|
-
var _default$
|
|
8212
|
+
var _default$W = {
|
|
8044
8213
|
"codeBlock": "pf-c-code-block",
|
|
8045
8214
|
"codeBlockActions": "pf-c-code-block__actions",
|
|
8046
8215
|
"codeBlockCode": "pf-c-code-block__code",
|
|
@@ -8051,17 +8220,17 @@
|
|
|
8051
8220
|
|
|
8052
8221
|
const CodeBlock = (_a) => {
|
|
8053
8222
|
var { children = null, className, actions = null } = _a, props = __rest$1(_a, ["children", "className", "actions"]);
|
|
8054
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8055
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8056
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8057
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8223
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$W.codeBlock, className) }, props),
|
|
8224
|
+
React__namespace.createElement("div", { className: css(_default$W.codeBlockHeader) },
|
|
8225
|
+
React__namespace.createElement("div", { className: css(_default$W.codeBlockActions) }, actions && actions)),
|
|
8226
|
+
React__namespace.createElement("div", { className: css(_default$W.codeBlockContent) }, children)));
|
|
8058
8227
|
};
|
|
8059
8228
|
CodeBlock.displayName = 'CodeBlock';
|
|
8060
8229
|
|
|
8061
8230
|
const CodeBlockCode = (_a) => {
|
|
8062
8231
|
var { children = null } = _a, props = __rest$1(_a, ["children"]);
|
|
8063
|
-
return (React__namespace.createElement("pre", Object.assign({ className: css(_default$
|
|
8064
|
-
React__namespace.createElement("code", { className: css(_default$
|
|
8232
|
+
return (React__namespace.createElement("pre", Object.assign({ className: css(_default$W.codeBlockPre) }, props),
|
|
8233
|
+
React__namespace.createElement("code", { className: css(_default$W.codeBlockCode) }, children)));
|
|
8065
8234
|
};
|
|
8066
8235
|
CodeBlockCode.displayName = 'CodeBlockCode';
|
|
8067
8236
|
|
|
@@ -8071,7 +8240,7 @@
|
|
|
8071
8240
|
};
|
|
8072
8241
|
CodeBlockAction.displayName = 'CodeBlockAction';
|
|
8073
8242
|
|
|
8074
|
-
var _default$
|
|
8243
|
+
var _default$V = {
|
|
8075
8244
|
"contextSelector": "pf-c-context-selector",
|
|
8076
8245
|
"contextSelectorMenu": "pf-c-context-selector__menu",
|
|
8077
8246
|
"contextSelectorMenuFooter": "pf-c-context-selector__menu-footer",
|
|
@@ -8157,9 +8326,9 @@
|
|
|
8157
8326
|
isActive, onEnter, parentRef } = _a,
|
|
8158
8327
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8159
8328
|
props = __rest$1(_a, ["className", "toggleText", "isOpen", "onToggle", "id", "isPlain", "isText", "isActive", "onEnter", "parentRef"]);
|
|
8160
|
-
return (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.toggle, className: css(_default$
|
|
8161
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
8162
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
8329
|
+
return (React__namespace.createElement("button", Object.assign({}, props, { id: id, ref: this.toggle, className: css(_default$V.contextSelectorToggle, isActive && _default$V.modifiers.active, isPlain && _default$V.modifiers.plain, isText && _default$V.modifiers.text, className), type: "button", onClick: event => onToggle(event, !isOpen), "aria-expanded": isOpen, onKeyDown: this.onKeyDown }),
|
|
8330
|
+
React__namespace.createElement("span", { className: css(_default$V.contextSelectorToggleText) }, toggleText),
|
|
8331
|
+
React__namespace.createElement("span", { className: css(_default$V.contextSelectorToggleIcon) },
|
|
8163
8332
|
React__namespace.createElement(CaretDownIcon$1, { "aria-hidden": true }))));
|
|
8164
8333
|
}
|
|
8165
8334
|
}
|
|
@@ -8185,7 +8354,7 @@
|
|
|
8185
8354
|
this.render = () => {
|
|
8186
8355
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8187
8356
|
const _a = this.props, { className, isOpen, children } = _a, props = __rest$1(_a, ["className", "isOpen", "children"]);
|
|
8188
|
-
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
8357
|
+
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$V.contextSelectorMenuList, className), hidden: !isOpen, role: "menu" }, props), this.extendChildren()));
|
|
8189
8358
|
};
|
|
8190
8359
|
}
|
|
8191
8360
|
extendChildren() {
|
|
@@ -8207,7 +8376,7 @@
|
|
|
8207
8376
|
onSelect: (event, value) => undefined
|
|
8208
8377
|
});
|
|
8209
8378
|
|
|
8210
|
-
var _default$
|
|
8379
|
+
var _default$U = {
|
|
8211
8380
|
"formControl": "pf-c-form-control",
|
|
8212
8381
|
"inputGroup": "pf-c-input-group",
|
|
8213
8382
|
"inputGroupText": "pf-c-input-group__text",
|
|
@@ -8235,7 +8404,7 @@
|
|
|
8235
8404
|
/* find selected option and get placeholder flag */
|
|
8236
8405
|
const selectedOption = React__namespace.Children.toArray(children).find((option) => option.props.value === value);
|
|
8237
8406
|
const isSelectedPlaceholder = selectedOption && selectedOption.props.isPlaceholder;
|
|
8238
|
-
return (React__namespace.createElement("select", Object.assign({}, props, { className: css(_default$
|
|
8407
|
+
return (React__namespace.createElement("select", Object.assign({}, props, { className: css(_default$1b.formControl, className, validated === exports.ValidatedOptions.success && _default$1b.modifiers.success, validated === exports.ValidatedOptions.warning && _default$1b.modifiers.warning, isSelectedPlaceholder && _default$1b.modifiers.placeholder), "aria-invalid": validated === exports.ValidatedOptions.error }, getOUIAProps(FormSelect.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { onChange: this.handleChange, disabled: isDisabled, required: isRequired, value: value }), children));
|
|
8239
8408
|
}
|
|
8240
8409
|
}
|
|
8241
8410
|
FormSelect.displayName = 'FormSelect';
|
|
@@ -8311,7 +8480,7 @@
|
|
|
8311
8480
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8312
8481
|
props = __rest$1(_a, ["className", "value", "validated", "isRequired", "isDisabled", "isReadOnly", "resizeOrientation", "innerRef", "readOnly", "disabled", "autoResize", "onChange"]);
|
|
8313
8482
|
const orientation = `resize${capitalize(resizeOrientation)}`;
|
|
8314
|
-
return (React__namespace.createElement("textarea", Object.assign({ className: css(_default$
|
|
8483
|
+
return (React__namespace.createElement("textarea", Object.assign({ className: css(_default$1b.formControl, className, resizeOrientation !== exports.TextAreResizeOrientation.both && _default$1b.modifiers[orientation], validated === exports.ValidatedOptions.success && _default$1b.modifiers.success, validated === exports.ValidatedOptions.warning && _default$1b.modifiers.warning), onChange: this.handleChange }, (typeof this.props.defaultValue !== 'string' && { value }), { "aria-invalid": validated === exports.ValidatedOptions.error, required: isRequired, disabled: isDisabled || disabled, readOnly: isReadOnly || readOnly, ref: innerRef }, props)));
|
|
8315
8484
|
}
|
|
8316
8485
|
}
|
|
8317
8486
|
TextAreaBase.displayName = 'TextArea';
|
|
@@ -8331,7 +8500,7 @@
|
|
|
8331
8500
|
var { className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
8332
8501
|
const formCtrls = [FormSelect, TextArea, TextInput].map(comp => comp.displayName);
|
|
8333
8502
|
const idItem = React__namespace.Children.toArray(children).find((child) => !formCtrls.includes(child.type.displayName) && child.props.id);
|
|
8334
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8503
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$U.inputGroup, className) }, props), idItem
|
|
8335
8504
|
? React__namespace.Children.map(children, (child) => formCtrls.includes(child.type.displayName)
|
|
8336
8505
|
? React__namespace.cloneElement(child, { 'aria-describedby': idItem.props.id })
|
|
8337
8506
|
: child)
|
|
@@ -8347,7 +8516,7 @@
|
|
|
8347
8516
|
const InputGroupText = (_a) => {
|
|
8348
8517
|
var { className = '', component = 'span', children, variant = exports.InputGroupTextVariant.default } = _a, props = __rest$1(_a, ["className", "component", "children", "variant"]);
|
|
8349
8518
|
const Component = component;
|
|
8350
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
8519
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$U.inputGroupText, variant === exports.InputGroupTextVariant.plain && _default$U.modifiers.plain, className) }, props), children));
|
|
8351
8520
|
};
|
|
8352
8521
|
InputGroupText.displayName = 'InputGroupText';
|
|
8353
8522
|
|
|
@@ -8372,8 +8541,8 @@
|
|
|
8372
8541
|
const screenReaderLabelId = `pf-context-selector-label-id-${newId}`;
|
|
8373
8542
|
const searchButtonId = `pf-context-selector-search-button-id-${newId}`;
|
|
8374
8543
|
const _a = this.props, { children, className, isOpen, isFullHeight, onToggle, onSelect, screenReaderLabel, toggleText, searchButtonAriaLabel, searchInputValue, onSearchInputChange, searchInputPlaceholder, onSearchButtonClick, menuAppendTo, ouiaId, ouiaSafe, isPlain, isText, footer, disableFocusTrap } = _a, props = __rest$1(_a, ["children", "className", "isOpen", "isFullHeight", "onToggle", "onSelect", "screenReaderLabel", "toggleText", "searchButtonAriaLabel", "searchInputValue", "onSearchInputChange", "searchInputPlaceholder", "onSearchButtonClick", "menuAppendTo", "ouiaId", "ouiaSafe", "isPlain", "isText", "footer", "disableFocusTrap"]);
|
|
8375
|
-
const menuContainer = (React__namespace.createElement("div", { className: css(_default$
|
|
8376
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
8544
|
+
const menuContainer = (React__namespace.createElement("div", { className: css(_default$V.contextSelectorMenu) }, isOpen && (React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true } },
|
|
8545
|
+
React__namespace.createElement("div", { className: css(_default$V.contextSelectorMenuSearch) },
|
|
8377
8546
|
React__namespace.createElement(InputGroup, null,
|
|
8378
8547
|
React__namespace.createElement(TextInput, { value: searchInputValue, type: "search", placeholder: searchInputPlaceholder, onChange: onSearchInputChange, onKeyPress: this.onEnterPressed, "aria-labelledby": searchButtonId }),
|
|
8379
8548
|
React__namespace.createElement(Button, { variant: exports.ButtonVariant.control, "aria-label": searchButtonAriaLabel, id: searchButtonId, onClick: onSearchButtonClick },
|
|
@@ -8381,8 +8550,8 @@
|
|
|
8381
8550
|
React__namespace.createElement(ContextSelectorContext.Provider, { value: { onSelect } },
|
|
8382
8551
|
React__namespace.createElement(ContextSelectorMenuList, { isOpen: isOpen }, children)),
|
|
8383
8552
|
footer))));
|
|
8384
|
-
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8385
|
-
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8553
|
+
const popperContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$V.contextSelector, isOpen && _default$V.modifiers.expanded, className), ref: this.parentRef }, props), isOpen && menuContainer));
|
|
8554
|
+
const mainContainer = (React__namespace.createElement("div", Object.assign({ className: css(_default$V.contextSelector, isOpen && _default$V.modifiers.expanded, isFullHeight && _default$V.modifiers.fullHeight, className), ref: this.parentRef }, getOUIAProps(ContextSelector.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), props),
|
|
8386
8555
|
screenReaderLabel && (React__namespace.createElement("span", { id: screenReaderLabelId, hidden: true }, screenReaderLabel)),
|
|
8387
8556
|
React__namespace.createElement(ContextSelectorToggle, { onToggle: onToggle, isOpen: isOpen, toggleText: toggleText, id: toggleId, parentRef: this.parentRef.current, "aria-labelledby": `${screenReaderLabelId} ${toggleId}`, isPlain: isPlain, isText: isText }),
|
|
8388
8557
|
isOpen && menuAppendTo === 'inline' && menuContainer));
|
|
@@ -8432,7 +8601,7 @@
|
|
|
8432
8601
|
const Component = href ? 'a' : 'button';
|
|
8433
8602
|
const isDisabledLink = href && isDisabled;
|
|
8434
8603
|
return (React__namespace.createElement(ContextSelectorContext.Consumer, null, ({ onSelect }) => (React__namespace.createElement("li", { role: "none" },
|
|
8435
|
-
React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
8604
|
+
React__namespace.createElement(Component, Object.assign({ className: css(_default$V.contextSelectorMenuListItem, isDisabledLink && _default$V.modifiers.disabled, className), ref: this.ref, onClick: event => {
|
|
8436
8605
|
if (!isDisabled) {
|
|
8437
8606
|
onClick(event);
|
|
8438
8607
|
onSelect(event, children);
|
|
@@ -8453,11 +8622,11 @@
|
|
|
8453
8622
|
|
|
8454
8623
|
const ContextSelectorFooter = (_a) => {
|
|
8455
8624
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8456
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
8625
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$V.contextSelectorMenuFooter, className) }), children));
|
|
8457
8626
|
};
|
|
8458
8627
|
ContextSelectorFooter.displayName = 'ContextSelectorFooter';
|
|
8459
8628
|
|
|
8460
|
-
var _default$
|
|
8629
|
+
var _default$T = {
|
|
8461
8630
|
"dataList": "pf-c-data-list",
|
|
8462
8631
|
"dataListAction": "pf-c-data-list__action",
|
|
8463
8632
|
"dataListCell": "pf-c-data-list__cell",
|
|
@@ -8513,7 +8682,7 @@
|
|
|
8513
8682
|
}
|
|
8514
8683
|
};
|
|
8515
8684
|
|
|
8516
|
-
var _default$
|
|
8685
|
+
var _default$S = {
|
|
8517
8686
|
"dataList": "pf-c-data-list",
|
|
8518
8687
|
"dataListCell": "pf-c-data-list__cell",
|
|
8519
8688
|
"dataListExpandableContent": "pf-c-data-list__expandable-content",
|
|
@@ -8536,13 +8705,13 @@
|
|
|
8536
8705
|
};
|
|
8537
8706
|
|
|
8538
8707
|
const gridBreakpointClasses = {
|
|
8539
|
-
none: _default$
|
|
8708
|
+
none: _default$S.modifiers.gridNone,
|
|
8540
8709
|
always: 'pf-m-grid',
|
|
8541
|
-
sm: _default$
|
|
8542
|
-
md: _default$
|
|
8543
|
-
lg: _default$
|
|
8544
|
-
xl: _default$
|
|
8545
|
-
'2xl': _default$
|
|
8710
|
+
sm: _default$S.modifiers.gridSm,
|
|
8711
|
+
md: _default$S.modifiers.gridMd,
|
|
8712
|
+
lg: _default$S.modifiers.gridLg,
|
|
8713
|
+
xl: _default$S.modifiers.gridXl,
|
|
8714
|
+
'2xl': _default$S.modifiers.grid_2xl
|
|
8546
8715
|
};
|
|
8547
8716
|
exports.DataListWrapModifier = void 0;
|
|
8548
8717
|
(function (DataListWrapModifier) {
|
|
@@ -8592,7 +8761,7 @@
|
|
|
8592
8761
|
this.dragStart0 = (el) => {
|
|
8593
8762
|
const { onDragStart } = this.props;
|
|
8594
8763
|
const draggedItemId = el.id;
|
|
8595
|
-
el.classList.add(_default$
|
|
8764
|
+
el.classList.add(_default$T.modifiers.ghostRow);
|
|
8596
8765
|
el.setAttribute('aria-pressed', 'true');
|
|
8597
8766
|
this.setState({
|
|
8598
8767
|
draggedItemId,
|
|
@@ -8608,8 +8777,8 @@
|
|
|
8608
8777
|
this.onDragCancel = () => {
|
|
8609
8778
|
this.move(this.props.itemOrder);
|
|
8610
8779
|
Array.from(this.ref.current.children).forEach(el => {
|
|
8611
|
-
el.classList.remove(_default$
|
|
8612
|
-
el.classList.remove(_default$
|
|
8780
|
+
el.classList.remove(_default$T.modifiers.ghostRow);
|
|
8781
|
+
el.classList.remove(_default$T.modifiers.dragOver);
|
|
8613
8782
|
el.setAttribute('aria-pressed', 'false');
|
|
8614
8783
|
});
|
|
8615
8784
|
this.setState({
|
|
@@ -8631,8 +8800,8 @@
|
|
|
8631
8800
|
}
|
|
8632
8801
|
};
|
|
8633
8802
|
this.dragEnd0 = (el) => {
|
|
8634
|
-
el.classList.remove(_default$
|
|
8635
|
-
el.classList.remove(_default$
|
|
8803
|
+
el.classList.remove(_default$T.modifiers.ghostRow);
|
|
8804
|
+
el.classList.remove(_default$T.modifiers.dragOver);
|
|
8636
8805
|
el.setAttribute('aria-pressed', 'false');
|
|
8637
8806
|
this.setState({
|
|
8638
8807
|
draggedItemId: null,
|
|
@@ -8711,14 +8880,14 @@
|
|
|
8711
8880
|
const nextSelection = dragItem.previousSibling;
|
|
8712
8881
|
if (nextSelection) {
|
|
8713
8882
|
this.dragOver0(nextSelection.id);
|
|
8714
|
-
dragItem.querySelector(`.${_default$
|
|
8883
|
+
dragItem.querySelector(`.${_default$T.dataListItemDraggableButton}`).focus();
|
|
8715
8884
|
}
|
|
8716
8885
|
}
|
|
8717
8886
|
else if (evt.key === 'ArrowDown') {
|
|
8718
8887
|
const nextSelection = dragItem.nextSibling;
|
|
8719
8888
|
if (nextSelection) {
|
|
8720
8889
|
this.dragOver0(nextSelection.id);
|
|
8721
|
-
dragItem.querySelector(`.${_default$
|
|
8890
|
+
dragItem.querySelector(`.${_default$T.dataListItemDraggableButton}`).focus();
|
|
8722
8891
|
}
|
|
8723
8892
|
}
|
|
8724
8893
|
}
|
|
@@ -8768,7 +8937,7 @@
|
|
|
8768
8937
|
drop: this.drop,
|
|
8769
8938
|
dragKeyHandler: this.handleDragButtonKeys
|
|
8770
8939
|
} },
|
|
8771
|
-
React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
8940
|
+
React__namespace.createElement("ul", Object.assign({ className: css(_default$T.dataList, isCompact && _default$T.modifiers.compact, gridBreakpointClasses[gridBreakpoint], wrapModifier && _default$T.modifiers[wrapModifier], dragging && _default$T.modifiers.dragOver, className), style: props.style }, props, dragProps, { ref: this.ref }), children)));
|
|
8772
8941
|
}
|
|
8773
8942
|
}
|
|
8774
8943
|
DataList.displayName = 'DataList';
|
|
@@ -8787,13 +8956,13 @@
|
|
|
8787
8956
|
id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, isPlainButtonAction } = _a,
|
|
8788
8957
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
8789
8958
|
props = __rest$1(_a, ["children", "className", "visibility", "id", 'aria-label', 'aria-labelledby', "isPlainButtonAction"]);
|
|
8790
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8959
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemAction, formatBreakpointMods(visibility, _default$T), className) }, props), isPlainButtonAction ? React__namespace.createElement("div", { className: css(_default$T.dataListAction) }, children) : children));
|
|
8791
8960
|
};
|
|
8792
8961
|
DataListAction.displayName = 'DataListAction';
|
|
8793
8962
|
|
|
8794
8963
|
const DataListCell = (_a) => {
|
|
8795
8964
|
var { children = null, className = '', width = 1, isFilled = true, alignRight = false, isIcon = false, wrapModifier = null } = _a, props = __rest$1(_a, ["children", "className", "width", "isFilled", "alignRight", "isIcon", "wrapModifier"]);
|
|
8796
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8965
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListCell, width > 1 && _default$T.modifiers[`flex_${width}`], !isFilled && _default$T.modifiers.noFill, alignRight && _default$T.modifiers.alignRight, isIcon && _default$T.modifiers.icon, className, wrapModifier && _default$T.modifiers[wrapModifier]) }, props), children));
|
|
8797
8966
|
};
|
|
8798
8967
|
DataListCell.displayName = 'DataListCell';
|
|
8799
8968
|
|
|
@@ -8801,17 +8970,17 @@
|
|
|
8801
8970
|
var { className = '',
|
|
8802
8971
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8803
8972
|
onChange = (checked, event) => { }, isValid = true, isDisabled = false, isChecked = null, checked = null, otherControls = false } = _a, props = __rest$1(_a, ["className", "onChange", "isValid", "isDisabled", "isChecked", "checked", "otherControls"]);
|
|
8804
|
-
const check = (React__namespace.createElement("div", { className: css(_default$
|
|
8973
|
+
const check = (React__namespace.createElement("div", { className: css(_default$T.dataListCheck) },
|
|
8805
8974
|
React__namespace.createElement("input", Object.assign({}, props, { type: "checkbox", onChange: event => onChange(event.currentTarget.checked, event), "aria-invalid": !isValid, disabled: isDisabled, checked: isChecked || checked }))));
|
|
8806
8975
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
8807
|
-
!otherControls && React__namespace.createElement("div", { className: css(_default$
|
|
8976
|
+
!otherControls && React__namespace.createElement("div", { className: css(_default$T.dataListItemControl, className) }, check),
|
|
8808
8977
|
otherControls && check));
|
|
8809
8978
|
};
|
|
8810
8979
|
DataListCheck.displayName = 'DataListCheck';
|
|
8811
8980
|
|
|
8812
8981
|
const DataListControl = (_a) => {
|
|
8813
8982
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
8814
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8983
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemControl, className) }, props), children));
|
|
8815
8984
|
};
|
|
8816
8985
|
DataListControl.displayName = 'DataListControl';
|
|
8817
8986
|
|
|
@@ -8830,8 +8999,8 @@
|
|
|
8830
8999
|
|
|
8831
9000
|
const DataListDragButton = (_a) => {
|
|
8832
9001
|
var { className = '', isDisabled = false } = _a, props = __rest$1(_a, ["className", "isDisabled"]);
|
|
8833
|
-
return (React__namespace.createElement(DataListContext.Consumer, null, ({ dragKeyHandler }) => (React__namespace.createElement("button", Object.assign({ className: css(_default$
|
|
8834
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
9002
|
+
return (React__namespace.createElement(DataListContext.Consumer, null, ({ dragKeyHandler }) => (React__namespace.createElement("button", Object.assign({ className: css(_default$T.dataListItemDraggableButton, isDisabled && _default$T.modifiers.disabled, className), onKeyDown: dragKeyHandler, type: "button", disabled: isDisabled }, props),
|
|
9003
|
+
React__namespace.createElement("span", { className: css(_default$T.dataListItemDraggableIcon) },
|
|
8835
9004
|
React__namespace.createElement(GripVerticalIcon$1, null))))));
|
|
8836
9005
|
};
|
|
8837
9006
|
DataListDragButton.displayName = 'DataListDragButton';
|
|
@@ -8861,8 +9030,8 @@
|
|
|
8861
9030
|
let target = event.target;
|
|
8862
9031
|
while (event.currentTarget !== target) {
|
|
8863
9032
|
if (('onclick' in target && target.onclick) ||
|
|
8864
|
-
target.parentNode.classList.contains(_default$
|
|
8865
|
-
target.parentNode.classList.contains(_default$
|
|
9033
|
+
target.parentNode.classList.contains(_default$T.dataListItemAction) ||
|
|
9034
|
+
target.parentNode.classList.contains(_default$T.dataListItemControl)) {
|
|
8866
9035
|
// check other event handlers are not present.
|
|
8867
9036
|
return;
|
|
8868
9037
|
}
|
|
@@ -8887,7 +9056,7 @@
|
|
|
8887
9056
|
onDragEnd: dragEnd,
|
|
8888
9057
|
onDragStart: dragStart
|
|
8889
9058
|
};
|
|
8890
|
-
return (React__namespace.createElement("li", Object.assign({ id: id, className: css(_default$
|
|
9059
|
+
return (React__namespace.createElement("li", Object.assign({ id: id, className: css(_default$T.dataListItem, isExpanded && _default$T.modifiers.expanded, isSelectable && _default$T.modifiers.selectable, selectedDataListItemId && selectedDataListItemId === id && _default$T.modifiers.selected, className), "aria-labelledby": ariaLabelledBy }, (isSelectable && { tabIndex: 0, onClick: selectDataListItem, onKeyDown }), (isSelectable && selectedDataListItemId === id && { 'aria-selected': true }), props, dragProps), React__namespace.Children.map(children, child => React__namespace.isValidElement(child) &&
|
|
8891
9060
|
React__namespace.cloneElement(child, {
|
|
8892
9061
|
rowid: ariaLabelledBy
|
|
8893
9062
|
}))));
|
|
@@ -8907,13 +9076,13 @@
|
|
|
8907
9076
|
var { className = '', dataListCells,
|
|
8908
9077
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8909
9078
|
rowid = '' } = _a, props = __rest$1(_a, ["className", "dataListCells", "rowid"]);
|
|
8910
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9079
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemContent, className) }, props), dataListCells));
|
|
8911
9080
|
};
|
|
8912
9081
|
DataListItemCells.displayName = 'DataListItemCells';
|
|
8913
9082
|
|
|
8914
9083
|
const DataListItemRow = (_a) => {
|
|
8915
9084
|
var { children, className = '', rowid = '', wrapModifier = null } = _a, props = __rest$1(_a, ["children", "className", "rowid", "wrapModifier"]);
|
|
8916
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9085
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemRow, className, wrapModifier && _default$T.modifiers[wrapModifier]) }, props), React__namespace.Children.map(children, child => React__namespace.isValidElement(child) &&
|
|
8917
9086
|
React__namespace.cloneElement(child, {
|
|
8918
9087
|
rowid
|
|
8919
9088
|
}))));
|
|
@@ -8922,10 +9091,10 @@
|
|
|
8922
9091
|
|
|
8923
9092
|
const DataListToggle = (_a) => {
|
|
8924
9093
|
var { className = '', isExpanded = false, 'aria-controls': ariaControls = '', 'aria-label': ariaLabel = 'Details', rowid = '', id } = _a, props = __rest$1(_a, ["className", "isExpanded", 'aria-controls', 'aria-label', "rowid", "id"]);
|
|
8925
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
8926
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9094
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$T.dataListItemControl, className) }, props),
|
|
9095
|
+
React__namespace.createElement("div", { className: css(_default$T.dataListToggle) },
|
|
8927
9096
|
React__namespace.createElement(Button, { id: id, variant: exports.ButtonVariant.plain, "aria-controls": ariaControls !== '' && ariaControls, "aria-label": ariaLabel, "aria-labelledby": ariaLabel !== 'Details' ? null : `${rowid} ${id}`, "aria-expanded": isExpanded },
|
|
8928
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9097
|
+
React__namespace.createElement("div", { className: css(_default$T.dataListToggleIcon) },
|
|
8929
9098
|
React__namespace.createElement(AngleRightIcon$1, null))))));
|
|
8930
9099
|
};
|
|
8931
9100
|
DataListToggle.displayName = 'DataListToggle';
|
|
@@ -8934,8 +9103,8 @@
|
|
|
8934
9103
|
var { className = '', children = null, id = '', isHidden = false, 'aria-label': ariaLabel, hasNoPadding = false,
|
|
8935
9104
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
8936
9105
|
rowid = '' } = _a, props = __rest$1(_a, ["className", "children", "id", "isHidden", 'aria-label', "hasNoPadding", "rowid"]);
|
|
8937
|
-
return (React__namespace.createElement("section", Object.assign({ id: id, className: css(_default$
|
|
8938
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9106
|
+
return (React__namespace.createElement("section", Object.assign({ id: id, className: css(_default$T.dataListExpandableContent, className), hidden: isHidden, "aria-label": ariaLabel }, props),
|
|
9107
|
+
React__namespace.createElement("div", { className: css(_default$T.dataListExpandableContentBody, hasNoPadding && _default$T.modifiers.noPadding) }, children)));
|
|
8939
9108
|
};
|
|
8940
9109
|
DataListContent.displayName = 'DataListContent';
|
|
8941
9110
|
|
|
@@ -8952,12 +9121,12 @@
|
|
|
8952
9121
|
}
|
|
8953
9122
|
onMouseEnterProp(event);
|
|
8954
9123
|
};
|
|
8955
|
-
const text = (React__namespace.createElement(Component, Object.assign({ onMouseEnter: onMouseEnter, className: css(className, wrapModifier && _default$
|
|
9124
|
+
const text = (React__namespace.createElement(Component, Object.assign({ onMouseEnter: onMouseEnter, className: css(className, wrapModifier && _default$T.modifiers[wrapModifier], _default$T.dataListText) }, props), children));
|
|
8956
9125
|
return tooltip !== '' ? (React__namespace.createElement(Tooltip, { content: tooltip, isVisible: true }, text)) : (text);
|
|
8957
9126
|
};
|
|
8958
9127
|
DataListText.displayName = 'DataListText';
|
|
8959
9128
|
|
|
8960
|
-
var _default$
|
|
9129
|
+
var _default$R = {
|
|
8961
9130
|
"datePicker": "pf-c-date-picker",
|
|
8962
9131
|
"datePickerCalendar": "pf-c-date-picker__calendar",
|
|
8963
9132
|
"datePickerHelperText": "pf-c-date-picker__helper-text",
|
|
@@ -8970,7 +9139,7 @@
|
|
|
8970
9139
|
}
|
|
8971
9140
|
};
|
|
8972
9141
|
|
|
8973
|
-
var _default$
|
|
9142
|
+
var _default$Q = {
|
|
8974
9143
|
"button": "pf-c-button",
|
|
8975
9144
|
"modifiers": {
|
|
8976
9145
|
"noPadding": "pf-m-no-padding",
|
|
@@ -9009,25 +9178,25 @@
|
|
|
9009
9178
|
|
|
9010
9179
|
const PopoverContent = (_a) => {
|
|
9011
9180
|
var { className = null, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
9012
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9181
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Q.popoverContent, className) }, props), children));
|
|
9013
9182
|
};
|
|
9014
9183
|
PopoverContent.displayName = 'PopoverContent';
|
|
9015
9184
|
|
|
9016
9185
|
const PopoverBody = (_a) => {
|
|
9017
9186
|
var { children, id, className } = _a, props = __rest$1(_a, ["children", "id", "className"]);
|
|
9018
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9187
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$Q.popoverBody, className), id: id }, props), children));
|
|
9019
9188
|
};
|
|
9020
9189
|
PopoverBody.displayName = 'PopoverBody';
|
|
9021
9190
|
|
|
9022
9191
|
const PopoverHeaderIcon = (_a) => {
|
|
9023
9192
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9024
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(_default$
|
|
9193
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(_default$Q.popoverTitleIcon, className) }, props), children));
|
|
9025
9194
|
};
|
|
9026
9195
|
PopoverHeaderIcon.displayName = 'PopoverHeaderIcon';
|
|
9027
9196
|
|
|
9028
9197
|
const PopoverHeaderText = (_a) => {
|
|
9029
9198
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9030
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(_default$
|
|
9199
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(_default$Q.popoverTitleText, className) }, props), children));
|
|
9031
9200
|
};
|
|
9032
9201
|
PopoverHeaderText.displayName = 'PopoverHeaderText';
|
|
9033
9202
|
|
|
@@ -9035,7 +9204,7 @@
|
|
|
9035
9204
|
var { children, icon, className, titleHeadingLevel = 'h6', alertSeverityVariant, id, alertSeverityScreenReaderText } = _a, props = __rest$1(_a, ["children", "icon", "className", "titleHeadingLevel", "alertSeverityVariant", "id", "alertSeverityScreenReaderText"]);
|
|
9036
9205
|
const HeadingLevel = titleHeadingLevel;
|
|
9037
9206
|
return icon || alertSeverityVariant ? (React__namespace.createElement("header", Object.assign({ className: css('pf-c-popover__header', className), id: id }, props),
|
|
9038
|
-
React__namespace.createElement(HeadingLevel, { className: css(_default$
|
|
9207
|
+
React__namespace.createElement(HeadingLevel, { className: css(_default$Q.popoverTitle, icon && _default$Q.modifiers.icon) },
|
|
9039
9208
|
icon && React__namespace.createElement(PopoverHeaderIcon, null, icon),
|
|
9040
9209
|
alertSeverityVariant && alertSeverityScreenReaderText && (React__namespace.createElement("span", { className: "pf-u-screen-reader" }, alertSeverityScreenReaderText)),
|
|
9041
9210
|
React__namespace.createElement(PopoverHeaderText, null, children)))) : (React__namespace.createElement(Title, Object.assign({ headingLevel: titleHeadingLevel, size: exports.TitleSizes.md, id: id, className: className }, props), children));
|
|
@@ -9044,7 +9213,7 @@
|
|
|
9044
9213
|
|
|
9045
9214
|
const PopoverFooter = (_a) => {
|
|
9046
9215
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9047
|
-
return (React__namespace.createElement("footer", Object.assign({ className: css(_default$
|
|
9216
|
+
return (React__namespace.createElement("footer", Object.assign({ className: css(_default$Q.popoverFooter, className) }, props), children));
|
|
9048
9217
|
};
|
|
9049
9218
|
PopoverFooter.displayName = 'PopoverFooter';
|
|
9050
9219
|
|
|
@@ -9065,7 +9234,7 @@
|
|
|
9065
9234
|
|
|
9066
9235
|
const PopoverArrow = (_a) => {
|
|
9067
9236
|
var { className = '' } = _a, props = __rest$1(_a, ["className"]);
|
|
9068
|
-
return React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9237
|
+
return React__namespace.createElement("div", Object.assign({ className: css(_default$Q.popoverArrow, className) }, props));
|
|
9069
9238
|
};
|
|
9070
9239
|
PopoverArrow.displayName = 'PopoverArrow';
|
|
9071
9240
|
|
|
@@ -9100,11 +9269,11 @@
|
|
|
9100
9269
|
PopoverPosition["rightEnd"] = "right-end";
|
|
9101
9270
|
})(exports.PopoverPosition || (exports.PopoverPosition = {}));
|
|
9102
9271
|
const alertStyle = {
|
|
9103
|
-
default: _default$
|
|
9104
|
-
info: _default$
|
|
9105
|
-
success: _default$
|
|
9106
|
-
warning: _default$
|
|
9107
|
-
danger: _default$
|
|
9272
|
+
default: _default$Q.modifiers.default,
|
|
9273
|
+
info: _default$Q.modifiers.info,
|
|
9274
|
+
success: _default$Q.modifiers.success,
|
|
9275
|
+
warning: _default$Q.modifiers.warning,
|
|
9276
|
+
danger: _default$Q.modifiers.danger
|
|
9108
9277
|
};
|
|
9109
9278
|
const Popover = (_a) => {
|
|
9110
9279
|
var { children, position = 'top', enableFlip = true, className = '', isVisible = null, shouldClose = () => null, shouldOpen = () => null, 'aria-label': ariaLabel = '', bodyContent, headerContent = null, headerComponent = 'h6', headerIcon = null, alertSeverityVariant, alertSeverityScreenReaderText, footerContent = null, appendTo = () => document.body, hideOnOutsideClick = true, onHide = () => null, onHidden = () => null, onShow = () => null, onShown = () => null, onMount = () => null, zIndex = 9999, minWidth = popoverMinWidth && popoverMinWidth.value, maxWidth = popoverMaxWidth && popoverMaxWidth.value, closeBtnAriaLabel = 'Close', showClose = true, distance = 25,
|
|
@@ -9168,18 +9337,18 @@
|
|
|
9168
9337
|
}, 0);
|
|
9169
9338
|
};
|
|
9170
9339
|
const positionModifiers = {
|
|
9171
|
-
top: _default$
|
|
9172
|
-
bottom: _default$
|
|
9173
|
-
left: _default$
|
|
9174
|
-
right: _default$
|
|
9175
|
-
'top-start': _default$
|
|
9176
|
-
'top-end': _default$
|
|
9177
|
-
'bottom-start': _default$
|
|
9178
|
-
'bottom-end': _default$
|
|
9179
|
-
'left-start': _default$
|
|
9180
|
-
'left-end': _default$
|
|
9181
|
-
'right-start': _default$
|
|
9182
|
-
'right-end': _default$
|
|
9340
|
+
top: _default$Q.modifiers.top,
|
|
9341
|
+
bottom: _default$Q.modifiers.bottom,
|
|
9342
|
+
left: _default$Q.modifiers.left,
|
|
9343
|
+
right: _default$Q.modifiers.right,
|
|
9344
|
+
'top-start': _default$Q.modifiers.topLeft,
|
|
9345
|
+
'top-end': _default$Q.modifiers.topRight,
|
|
9346
|
+
'bottom-start': _default$Q.modifiers.bottomLeft,
|
|
9347
|
+
'bottom-end': _default$Q.modifiers.bottomRight,
|
|
9348
|
+
'left-start': _default$Q.modifiers.leftTop,
|
|
9349
|
+
'left-end': _default$Q.modifiers.leftBottom,
|
|
9350
|
+
'right-start': _default$Q.modifiers.rightTop,
|
|
9351
|
+
'right-end': _default$Q.modifiers.rightBottom
|
|
9183
9352
|
};
|
|
9184
9353
|
const hasCustomMinWidth = minWidth !== popoverMinWidth.value;
|
|
9185
9354
|
const hasCustomMaxWidth = maxWidth !== popoverMaxWidth.value;
|
|
@@ -9255,7 +9424,7 @@
|
|
|
9255
9424
|
}
|
|
9256
9425
|
return node;
|
|
9257
9426
|
}
|
|
9258
|
-
}, preventScrollOnDeactivate: true, className: css(_default$
|
|
9427
|
+
}, preventScrollOnDeactivate: true, className: css(_default$Q.popover, alertSeverityVariant && alertStyle[alertSeverityVariant], hasNoPadding && _default$Q.modifiers.noPadding, hasAutoWidth && _default$Q.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: {
|
|
9259
9428
|
minWidth: hasCustomMinWidth ? minWidth : null,
|
|
9260
9429
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
9261
9430
|
opacity,
|
|
@@ -9356,7 +9525,7 @@
|
|
|
9356
9525
|
setCalendarOpen: (isOpen) => setPopoverOpen(isOpen),
|
|
9357
9526
|
toggleCalendar: () => setPopoverOpen(prev => !prev)
|
|
9358
9527
|
}), [setPopoverOpen]);
|
|
9359
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9528
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$R.datePicker, className), style: style }, props),
|
|
9360
9529
|
React__namespace.createElement(Popover, Object.assign({ position: "bottom", bodyContent: React__namespace.createElement(CalendarMonth, { date: valueDate, onChange: onDateClick, locale: locale,
|
|
9361
9530
|
// Use truthy values of strings
|
|
9362
9531
|
validators: validators.map(validator => (date) => !validator(date)), onSelectToggle: open => setSelectOpen(open), monthFormat: monthFormat, weekdayFormat: weekdayFormat, longWeekdayFormat: longWeekdayFormat, dayFormat: dayFormat, weekStart: weekStart, rangeStart: rangeStart }), showClose: false, isVisible: popoverOpen, shouldClose: (_1, _2, event) => {
|
|
@@ -9372,18 +9541,18 @@
|
|
|
9372
9541
|
setPopoverOpen(false);
|
|
9373
9542
|
return true;
|
|
9374
9543
|
}, withFocusTrap: true, hasNoPadding: true, hasAutoWidth: true, appendTo: appendTo }, popoverProps),
|
|
9375
|
-
React__namespace.createElement("div", { className: _default$
|
|
9544
|
+
React__namespace.createElement("div", { className: _default$R.datePickerInput },
|
|
9376
9545
|
React__namespace.createElement(InputGroup, null,
|
|
9377
9546
|
React__namespace.createElement(TextInput, Object.assign({ isDisabled: isDisabled, "aria-label": ariaLabel, placeholder: placeholder, validated: errorText ? 'error' : 'default', value: value, onChange: onTextInput, onBlur: onInputBlur, onKeyPress: onKeyPress }, inputProps)),
|
|
9378
|
-
React__namespace.createElement("button", { ref: buttonRef, className: css(_default$
|
|
9547
|
+
React__namespace.createElement("button", { ref: buttonRef, className: css(_default$1k.button, _default$1k.modifiers.control), "aria-label": buttonAriaLabel, type: "button", onClick: () => setPopoverOpen(!popoverOpen), disabled: isDisabled },
|
|
9379
9548
|
React__namespace.createElement(OutlinedCalendarAltIcon$1, null))))),
|
|
9380
|
-
helperText && React__namespace.createElement("div", { className: _default$
|
|
9381
|
-
errorText.trim() && React__namespace.createElement("div", { className: css(_default$
|
|
9549
|
+
helperText && React__namespace.createElement("div", { className: _default$R.datePickerHelperText }, helperText),
|
|
9550
|
+
errorText.trim() && React__namespace.createElement("div", { className: css(_default$R.datePickerHelperText, _default$R.modifiers.error) }, errorText)));
|
|
9382
9551
|
};
|
|
9383
9552
|
const DatePicker = React__namespace.forwardRef(DatePickerBase);
|
|
9384
9553
|
DatePicker.displayName = 'DatePicker';
|
|
9385
9554
|
|
|
9386
|
-
var _default$
|
|
9555
|
+
var _default$P = {
|
|
9387
9556
|
"descriptionList": "pf-c-description-list",
|
|
9388
9557
|
"descriptionListDescription": "pf-c-description-list__description",
|
|
9389
9558
|
"descriptionListGroup": "pf-c-description-list__group",
|
|
@@ -9438,44 +9607,44 @@
|
|
|
9438
9607
|
};
|
|
9439
9608
|
const DescriptionList = (_a) => {
|
|
9440
9609
|
var { className = '', children = null, isHorizontal = false, isAutoColumnWidths, isAutoFit, isInlineGrid, isCompact, isFluid, isFillColumns, columnModifier, autoFitMinModifier, orientation, style } = _a, props = __rest$1(_a, ["className", "children", "isHorizontal", "isAutoColumnWidths", "isAutoFit", "isInlineGrid", "isCompact", "isFluid", "isFillColumns", "columnModifier", "autoFitMinModifier", "orientation", "style"]);
|
|
9441
|
-
return (React__namespace.createElement("dl", Object.assign({ className: css(_default$
|
|
9610
|
+
return (React__namespace.createElement("dl", Object.assign({ className: css(_default$P.descriptionList, (isHorizontal || isFluid) && _default$P.modifiers.horizontal, isAutoColumnWidths && _default$P.modifiers.autoColumnWidths, isAutoFit && _default$P.modifiers.autoFit, formatBreakpointMods(columnModifier, _default$P), formatBreakpointMods(orientation, _default$P), isInlineGrid && _default$P.modifiers.inlineGrid, isCompact && _default$P.modifiers.compact, isFluid && _default$P.modifiers.fluid, isFillColumns && _default$P.modifiers.fillColumns, className), style: autoFitMinModifier || style
|
|
9442
9611
|
? Object.assign(Object.assign({}, (isAutoFit ? setAutoFitMinModifiers(autoFitMinModifier) : {})), style) : undefined }, props), children));
|
|
9443
9612
|
};
|
|
9444
9613
|
DescriptionList.displayName = 'DescriptionList';
|
|
9445
9614
|
|
|
9446
9615
|
const DescriptionListDescription = (_a) => {
|
|
9447
9616
|
var { children = null, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9448
|
-
return (React__namespace.createElement("dd", Object.assign({ className: css(_default$
|
|
9617
|
+
return (React__namespace.createElement("dd", Object.assign({ className: css(_default$P.descriptionListDescription, className) }, props),
|
|
9449
9618
|
React__namespace.createElement("div", { className: 'pf-c-description-list__text' }, children)));
|
|
9450
9619
|
};
|
|
9451
9620
|
DescriptionListDescription.displayName = 'DescriptionListDescription';
|
|
9452
9621
|
|
|
9453
9622
|
const DescriptionListGroup = (_a) => {
|
|
9454
9623
|
var { className, children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
9455
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9624
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$P.descriptionListGroup, className) }, props), children));
|
|
9456
9625
|
};
|
|
9457
9626
|
DescriptionListGroup.displayName = 'DescriptionListGroup';
|
|
9458
9627
|
|
|
9459
9628
|
const DescriptionListTerm = (_a) => {
|
|
9460
9629
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9461
|
-
return (React__namespace.createElement("dt", Object.assign({ className: css(_default$
|
|
9462
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
9630
|
+
return (React__namespace.createElement("dt", Object.assign({ className: css(_default$P.descriptionListTerm, className) }, props),
|
|
9631
|
+
React__namespace.createElement("span", { className: css(_default$P.descriptionListText) }, children)));
|
|
9463
9632
|
};
|
|
9464
9633
|
DescriptionListTerm.displayName = 'DescriptionListTerm';
|
|
9465
9634
|
|
|
9466
9635
|
const DescriptionListTermHelpText = (_a) => {
|
|
9467
9636
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9468
|
-
return (React__namespace.createElement("dt", Object.assign({ className: css(_default$
|
|
9637
|
+
return (React__namespace.createElement("dt", Object.assign({ className: css(_default$P.descriptionListTerm, className) }, props), children));
|
|
9469
9638
|
};
|
|
9470
9639
|
DescriptionListTermHelpText.displayName = 'DescriptionListTermHelpText';
|
|
9471
9640
|
|
|
9472
9641
|
const DescriptionListTermHelpTextButton = (_a) => {
|
|
9473
9642
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
9474
|
-
return (React__namespace.createElement("span", Object.assign({ className: css(className, _default$
|
|
9643
|
+
return (React__namespace.createElement("span", Object.assign({ className: css(className, _default$P.descriptionListText, _default$P.modifiers.helpText), role: "button", type: "button", tabIndex: 0 }, props), children));
|
|
9475
9644
|
};
|
|
9476
9645
|
DescriptionListTermHelpTextButton.displayName = 'DescriptionListTermHelpTextButton';
|
|
9477
9646
|
|
|
9478
|
-
var _default$
|
|
9647
|
+
var _default$O = {
|
|
9479
9648
|
"drawer": "pf-c-drawer",
|
|
9480
9649
|
"drawerActions": "pf-c-drawer__actions",
|
|
9481
9650
|
"drawerBody": "pf-c-drawer__body",
|
|
@@ -9552,7 +9721,7 @@
|
|
|
9552
9721
|
var { className = '', children, isExpanded = false, isInline = false, isStatic = false, position = 'right', onExpand = () => { } } = _a, props = __rest$1(_a, ["className", "children", "isExpanded", "isInline", "isStatic", "position", "onExpand"]);
|
|
9553
9722
|
const drawerRef = React__namespace.useRef();
|
|
9554
9723
|
return (React__namespace.createElement(DrawerContext.Provider, { value: { isExpanded, isStatic, onExpand, position, drawerRef } },
|
|
9555
|
-
React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9724
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawer, isExpanded && _default$O.modifiers.expanded, isInline && _default$O.modifiers.inline, isStatic && _default$O.modifiers.static, position === 'left' && _default$O.modifiers.panelLeft, position === 'bottom' && _default$O.modifiers.panelBottom, className), ref: drawerRef }, props), children)));
|
|
9556
9725
|
};
|
|
9557
9726
|
Drawer.displayName = 'Drawer';
|
|
9558
9727
|
|
|
@@ -9560,7 +9729,7 @@
|
|
|
9560
9729
|
var {
|
|
9561
9730
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9562
9731
|
className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
9563
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9732
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerActions, className) }, props), children));
|
|
9564
9733
|
};
|
|
9565
9734
|
DrawerActions.displayName = 'DrawerActions';
|
|
9566
9735
|
|
|
@@ -9568,7 +9737,7 @@
|
|
|
9568
9737
|
var {
|
|
9569
9738
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9570
9739
|
className = '', onClose = () => undefined, 'aria-label': ariaLabel = 'Close drawer panel' } = _a, props = __rest$1(_a, ["className", "onClose", 'aria-label']);
|
|
9571
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9740
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerClose, className) }, props),
|
|
9572
9741
|
React__namespace.createElement(Button, { variant: "plain", onClick: onClose, "aria-label": ariaLabel },
|
|
9573
9742
|
React__namespace.createElement(TimesIcon$1, null))));
|
|
9574
9743
|
};
|
|
@@ -9578,7 +9747,7 @@
|
|
|
9578
9747
|
var {
|
|
9579
9748
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9580
9749
|
className = '', children } = _a, props = __rest$1(_a, ["className", "children"]);
|
|
9581
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9750
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerMain, className) }, props), children));
|
|
9582
9751
|
};
|
|
9583
9752
|
DrawerMain.displayName = 'DrawerMain';
|
|
9584
9753
|
|
|
@@ -9587,7 +9756,7 @@
|
|
|
9587
9756
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9588
9757
|
className = '', children, panelContent, colorVariant = exports.DrawerColorVariant.default } = _a, props = __rest$1(_a, ["className", "children", "panelContent", "colorVariant"]);
|
|
9589
9758
|
return (React__namespace.createElement(DrawerMain, null,
|
|
9590
|
-
React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9759
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerContent, colorVariant === exports.DrawerColorVariant.light200 && _default$O.modifiers.light_200, className) }, props), children),
|
|
9591
9760
|
panelContent));
|
|
9592
9761
|
};
|
|
9593
9762
|
DrawerContent.displayName = 'DrawerContent';
|
|
@@ -9596,7 +9765,7 @@
|
|
|
9596
9765
|
var {
|
|
9597
9766
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9598
9767
|
className = '', children, hasPadding = false } = _a, props = __rest$1(_a, ["className", "children", "hasPadding"]);
|
|
9599
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9768
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerBody, hasPadding && _default$O.modifiers.padding, className) }, props), children));
|
|
9600
9769
|
};
|
|
9601
9770
|
DrawerContentBody.displayName = 'DrawerContentBody';
|
|
9602
9771
|
|
|
@@ -9604,7 +9773,7 @@
|
|
|
9604
9773
|
var {
|
|
9605
9774
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9606
9775
|
className = '', children, hasNoPadding = false } = _a, props = __rest$1(_a, ["className", "children", "hasNoPadding"]);
|
|
9607
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9776
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerBody, hasNoPadding && _default$O.modifiers.noPadding, className) }, props), children));
|
|
9608
9777
|
};
|
|
9609
9778
|
DrawerPanelBody.displayName = 'DrawerPanelBody';
|
|
9610
9779
|
|
|
@@ -9613,7 +9782,7 @@
|
|
|
9613
9782
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9614
9783
|
className = '', children, hasNoPadding = false } = _a, props = __rest$1(_a, ["className", "children", "hasNoPadding"]);
|
|
9615
9784
|
return (React__namespace.createElement(DrawerPanelBody, { hasNoPadding: hasNoPadding },
|
|
9616
|
-
React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9785
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerHead, className) }, props), children)));
|
|
9617
9786
|
};
|
|
9618
9787
|
DrawerHead.displayName = 'DrawerHead';
|
|
9619
9788
|
|
|
@@ -9647,7 +9816,7 @@
|
|
|
9647
9816
|
e.preventDefault();
|
|
9648
9817
|
document.addEventListener('mousemove', callbackMouseMove);
|
|
9649
9818
|
document.addEventListener('mouseup', callbackMouseUp);
|
|
9650
|
-
drawerRef.current.classList.add(css(_default$
|
|
9819
|
+
drawerRef.current.classList.add(css(_default$O.modifiers.resizing));
|
|
9651
9820
|
isResizing = true;
|
|
9652
9821
|
setInitialVals = true;
|
|
9653
9822
|
};
|
|
@@ -9694,7 +9863,7 @@
|
|
|
9694
9863
|
if (!isResizing) {
|
|
9695
9864
|
return;
|
|
9696
9865
|
}
|
|
9697
|
-
drawerRef.current.classList.remove(css(_default$
|
|
9866
|
+
drawerRef.current.classList.remove(css(_default$O.modifiers.resizing));
|
|
9698
9867
|
isResizing = false;
|
|
9699
9868
|
onResize && onResize(currWidth, id);
|
|
9700
9869
|
setInitialVals = true;
|
|
@@ -9773,7 +9942,7 @@
|
|
|
9773
9942
|
if (maxSize) {
|
|
9774
9943
|
boundaryCssVars['--pf-c-drawer__panel--md--FlexBasis--max'] = maxSize;
|
|
9775
9944
|
}
|
|
9776
|
-
return (React__namespace.createElement("div", Object.assign({ id: id, className: css(_default$
|
|
9945
|
+
return (React__namespace.createElement("div", Object.assign({ id: id, className: css(_default$O.drawerPanel, isResizable && _default$O.modifiers.resizable, hasNoBorder && _default$O.modifiers.noBorder, formatBreakpointMods(widths, _default$O), colorVariant === exports.DrawerColorVariant.light200 && _default$O.modifiers.light_200, className), ref: panel, onTransitionEnd: ev => {
|
|
9777
9946
|
if (!hidden && ev.nativeEvent.propertyName === 'transform') {
|
|
9778
9947
|
onExpand();
|
|
9779
9948
|
}
|
|
@@ -9782,9 +9951,9 @@
|
|
|
9782
9951
|
style: boundaryCssVars
|
|
9783
9952
|
}), props), isExpandedInternal && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
9784
9953
|
isResizable && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
9785
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9786
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9787
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9954
|
+
React__namespace.createElement("div", { className: css(_default$O.drawerSplitter, position !== 'bottom' && _default$O.modifiers.vertical), role: "separator", tabIndex: 0, "aria-orientation": position === 'bottom' ? 'horizontal' : 'vertical', "aria-label": resizeAriaLabel, "aria-describedby": resizeAriaDescribedBy, onMouseDown: handleMousedown, onKeyDown: handleKeys, onTouchStart: handleTouchStart },
|
|
9955
|
+
React__namespace.createElement("div", { className: css(_default$O.drawerSplitterHandle), "aria-hidden": true })),
|
|
9956
|
+
React__namespace.createElement("div", { className: css(_default$O.drawerPanelMain) }, children))),
|
|
9788
9957
|
!isResizable && children))));
|
|
9789
9958
|
};
|
|
9790
9959
|
DrawerPanelContent.displayName = 'DrawerPanelContent';
|
|
@@ -9793,11 +9962,11 @@
|
|
|
9793
9962
|
var {
|
|
9794
9963
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9795
9964
|
className = '', children, colorVariant = exports.DrawerColorVariant.default } = _a, props = __rest$1(_a, ["className", "children", "colorVariant"]);
|
|
9796
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
9965
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$O.drawerSection, colorVariant === exports.DrawerColorVariant.light200 && _default$O.modifiers.light_200, className) }, props), children));
|
|
9797
9966
|
};
|
|
9798
9967
|
DrawerSection.displayName = 'DrawerSection';
|
|
9799
9968
|
|
|
9800
|
-
var _default$
|
|
9969
|
+
var _default$N = {
|
|
9801
9970
|
"badge": "pf-c-badge",
|
|
9802
9971
|
"button": "pf-c-button",
|
|
9803
9972
|
"dualListSelector": "pf-c-dual-list-selector",
|
|
@@ -9957,16 +10126,16 @@
|
|
|
9957
10126
|
React__namespace.useEffect(() => {
|
|
9958
10127
|
setIsExpanded(defaultExpanded);
|
|
9959
10128
|
}, [defaultExpanded]);
|
|
9960
|
-
return (React__namespace.createElement("li", Object.assign({ className: css(_default$
|
|
9961
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
9962
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
10129
|
+
return (React__namespace.createElement("li", Object.assign({ className: css(_default$N.dualListSelectorListItem, className, children && _default$N.modifiers.expandable, isExpanded && _default$N.modifiers.expanded, isDisabled && _default$N.modifiers.disabled), id: id }, props, { "aria-selected": isChecked, role: "treeitem" }, (isExpanded && { 'aria-expanded': 'true' })),
|
|
10130
|
+
React__namespace.createElement("div", { className: css(_default$N.dualListSelectorListItemRow, isChecked && _default$N.modifiers.selected, _default$N.modifiers.check) },
|
|
10131
|
+
React__namespace.createElement("div", { className: css(_default$N.dualListSelectorItem), ref: ref, tabIndex: -1, onClick: isDisabled
|
|
9963
10132
|
? undefined
|
|
9964
10133
|
: evt => {
|
|
9965
10134
|
onOptionCheck && onOptionCheck(evt, !isChecked, itemData);
|
|
9966
10135
|
setFocusedOption(id);
|
|
9967
10136
|
} },
|
|
9968
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
9969
|
-
children && (React__namespace.createElement("div", { className: css(_default$
|
|
10137
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemMain) },
|
|
10138
|
+
children && (React__namespace.createElement("div", { className: css(_default$N.dualListSelectorItemToggle), onClick: e => {
|
|
9970
10139
|
if (children) {
|
|
9971
10140
|
setIsExpanded(!isExpanded);
|
|
9972
10141
|
}
|
|
@@ -9977,9 +10146,9 @@
|
|
|
9977
10146
|
e.preventDefault();
|
|
9978
10147
|
}
|
|
9979
10148
|
}, tabIndex: -1 },
|
|
9980
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10149
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemToggleIcon) },
|
|
9981
10150
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true })))),
|
|
9982
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10151
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemCheck) },
|
|
9983
10152
|
React__namespace.createElement("input", Object.assign({ type: "checkbox", onChange: (evt) => {
|
|
9984
10153
|
onOptionCheck && onOptionCheck(evt, !isChecked, itemData);
|
|
9985
10154
|
setFocusedOption(id);
|
|
@@ -9990,8 +10159,8 @@
|
|
|
9990
10159
|
e.preventDefault();
|
|
9991
10160
|
}
|
|
9992
10161
|
}, ref: elem => elem && (elem.indeterminate = isChecked === null), checked: isChecked || false, tabIndex: -1 }, checkProps))),
|
|
9993
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
9994
|
-
hasBadge && children && (React__namespace.createElement("span", { className: css(_default$
|
|
10162
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemText) }, text),
|
|
10163
|
+
hasBadge && children && (React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemCount) },
|
|
9995
10164
|
React__namespace.createElement(Badge, Object.assign({}, badgeProps), flattenTree(children.props.data).length)))))),
|
|
9996
10165
|
isExpanded && children));
|
|
9997
10166
|
};
|
|
@@ -10020,7 +10189,7 @@
|
|
|
10020
10189
|
const tree = dataToRender.map(item => (React__namespace.createElement(DualListSelectorTreeItem, Object.assign({ key: item.id, text: item.text, id: item.id, defaultExpanded: item.defaultExpanded !== undefined ? item.defaultExpanded : defaultAllExpanded, onOptionCheck: onOptionCheck, isChecked: item.isChecked, checkProps: item.checkProps, hasBadge: item.hasBadge !== undefined ? item.hasBadge : hasBadges, badgeProps: item.badgeProps, itemData: item, isDisabled: isDisabled, useMemo: true }, (item.children && {
|
|
10021
10190
|
children: (React__namespace.createElement(DualListSelectorTree, { isNested: true, data: item.children, hasBadges: hasBadges, defaultAllExpanded: defaultAllExpanded, onOptionCheck: onOptionCheck, isDisabled: isDisabled }))
|
|
10022
10191
|
})))));
|
|
10023
|
-
return isNested ? (React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
10192
|
+
return isNested ? (React__namespace.createElement("ul", Object.assign({ className: css(_default$N.dualListSelectorList), role: "group" }, props), tree)) : (React__namespace.createElement(React__namespace.Fragment, null, tree));
|
|
10024
10193
|
};
|
|
10025
10194
|
DualListSelectorTree.displayName = 'DualListSelectorTree';
|
|
10026
10195
|
|
|
@@ -10028,7 +10197,7 @@
|
|
|
10028
10197
|
var { onOptionSelect, orderIndex, children, className, id = getUniqueId('dual-list-selector-list-item'), isSelected, innerRef, isDraggable = false, draggableButtonAriaLabel = 'Reorder option', isDisabled } = _a, props = __rest$1(_a, ["onOptionSelect", "orderIndex", "children", "className", "id", "isSelected", "innerRef", "isDraggable", "draggableButtonAriaLabel", "isDisabled"]);
|
|
10029
10198
|
const ref = innerRef || React__namespace.useRef(null);
|
|
10030
10199
|
const { setFocusedOption } = React__namespace.useContext(DualListSelectorListContext);
|
|
10031
|
-
return (React__namespace.createElement("li", Object.assign({ className: css(_default$
|
|
10200
|
+
return (React__namespace.createElement("li", Object.assign({ className: css(_default$N.dualListSelectorListItem, className, isDisabled && _default$N.modifiers.disabled), key: orderIndex, onClick: isDisabled
|
|
10032
10201
|
? undefined
|
|
10033
10202
|
: (e) => {
|
|
10034
10203
|
setFocusedOption(id);
|
|
@@ -10039,13 +10208,13 @@
|
|
|
10039
10208
|
e.preventDefault();
|
|
10040
10209
|
}
|
|
10041
10210
|
}, "aria-selected": isSelected, id: id, ref: ref, role: "option", tabIndex: -1 }, props),
|
|
10042
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
10043
|
-
isDraggable && !isDisabled && (React__namespace.createElement("div", { className: css(_default$
|
|
10211
|
+
React__namespace.createElement("div", { className: css(_default$N.dualListSelectorListItemRow, isSelected && _default$N.modifiers.selected) },
|
|
10212
|
+
isDraggable && !isDisabled && (React__namespace.createElement("div", { className: css(_default$N.dualListSelectorDraggable) },
|
|
10044
10213
|
React__namespace.createElement(Button, { variant: exports.ButtonVariant.plain, "aria-label": draggableButtonAriaLabel, component: "span" },
|
|
10045
10214
|
React__namespace.createElement(GripVerticalIcon$1, { style: { verticalAlign: '-0.3em' } })))),
|
|
10046
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10047
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10048
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10215
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItem) },
|
|
10216
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemMain) },
|
|
10217
|
+
React__namespace.createElement("span", { className: css(_default$N.dualListSelectorItemText) }, children))))));
|
|
10049
10218
|
};
|
|
10050
10219
|
DualListSelectorListItemBase.displayName = 'DualListSelectorListItemBase';
|
|
10051
10220
|
const DualListSelectorListItem = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(DualListSelectorListItemBase, Object.assign({ innerRef: ref }, props))));
|
|
@@ -10059,7 +10228,7 @@
|
|
|
10059
10228
|
setFocusedOption(id);
|
|
10060
10229
|
onOptionSelect(e, index, id);
|
|
10061
10230
|
};
|
|
10062
|
-
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
10231
|
+
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$N.dualListSelectorList), role: isTree ? 'tree' : 'listbox', "aria-multiselectable": "true", "aria-labelledby": ariaLabelledBy, "aria-activedescendant": focusedOption, "aria-disabled": isDisabled ? 'true' : undefined }, props), options.length === 0
|
|
10063
10232
|
? children
|
|
10064
10233
|
: options.map((option, index) => {
|
|
10065
10234
|
if (displayOption(option)) {
|
|
@@ -10104,7 +10273,7 @@
|
|
|
10104
10273
|
window.removeEventListener('keydown', handleKeys);
|
|
10105
10274
|
};
|
|
10106
10275
|
}, [menuRef.current]);
|
|
10107
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10276
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$N.dualListSelectorMenu, className), ref: menuRef, tabIndex: 0 }, props),
|
|
10108
10277
|
React__namespace.createElement(DualListSelectorListContext.Provider, { value: {
|
|
10109
10278
|
setFocusedOption,
|
|
10110
10279
|
isTree,
|
|
@@ -10175,15 +10344,15 @@
|
|
|
10175
10344
|
.includes(input.toLowerCase());
|
|
10176
10345
|
}
|
|
10177
10346
|
};
|
|
10178
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10179
|
-
title && (React__namespace.createElement("div", { className: css(_default$
|
|
10347
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$N.dualListSelectorPane, isChosen ? _default$N.modifiers.chosen : 'pf-m-available', className) }, props),
|
|
10348
|
+
title && (React__namespace.createElement("div", { className: css(_default$N.dualListSelectorHeader) },
|
|
10180
10349
|
React__namespace.createElement("div", { className: "pf-c-dual-list-selector__title" },
|
|
10181
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
10182
|
-
(actions || searchInput || isSearchable) && (React__namespace.createElement("div", { className: css(_default$
|
|
10183
|
-
(isSearchable || searchInput) && (React__namespace.createElement("div", { className: css(_default$
|
|
10184
|
-
actions && React__namespace.createElement("div", { className: css(_default$
|
|
10185
|
-
status && (React__namespace.createElement("div", { className: css(_default$
|
|
10186
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
10350
|
+
React__namespace.createElement("div", { className: css(_default$N.dualListSelectorTitleText) }, title)))),
|
|
10351
|
+
(actions || searchInput || isSearchable) && (React__namespace.createElement("div", { className: css(_default$N.dualListSelectorTools) },
|
|
10352
|
+
(isSearchable || searchInput) && (React__namespace.createElement("div", { className: css(_default$N.dualListSelectorToolsFilter) }, searchInput ? (searchInput) : (React__namespace.createElement("input", { className: css(_default$1b.formControl, _default$1b.modifiers.search), type: "search", onChange: isDisabled ? undefined : onChange, "aria-label": searchInputAriaLabel, disabled: isDisabled })))),
|
|
10353
|
+
actions && React__namespace.createElement("div", { className: css(_default$N.dualListSelectorToolsActions) }, actions))),
|
|
10354
|
+
status && (React__namespace.createElement("div", { className: css(_default$N.dualListSelectorStatus) },
|
|
10355
|
+
React__namespace.createElement("div", { className: css(_default$N.dualListSelectorStatusText), id: `${id}-status` }, status))),
|
|
10187
10356
|
React__namespace.createElement(DualListSelectorPaneContext.Provider, { value: { isChosen } },
|
|
10188
10357
|
!isTree && (React__namespace.createElement(DualListSelectorListWrapper, { "aria-labelledby": `${id}-status`, options: options, selectedOptions: selectedOptions, onOptionSelect: (e, index, id) => onOptionSelect(e, index, isChosen, id), displayOption: displayOption, id: `${id}-list`, isDisabled: isDisabled }, children)),
|
|
10189
10358
|
isTree && (React__namespace.createElement(DualListSelectorListWrapper, { "aria-labelledby": `${id}-status`, id: `${id}-list` }, options.length > 0 ? (React__namespace.createElement(DualListSelectorList, null,
|
|
@@ -10217,7 +10386,7 @@
|
|
|
10217
10386
|
window.removeEventListener('keydown', handleKeys);
|
|
10218
10387
|
};
|
|
10219
10388
|
}, [wrapperRef.current]);
|
|
10220
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10389
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$N.dualListSelectorControls, className), tabIndex: 0, ref: wrapperRef, "aria-label": ariaLabel }, props), children));
|
|
10221
10390
|
};
|
|
10222
10391
|
DualListSelectorControlsWrapperBase.displayName = 'DualListSelectorControlsWrapperBase';
|
|
10223
10392
|
const DualListSelectorControlsWrapper = React__namespace.forwardRef((props, ref) => (React__namespace.createElement(DualListSelectorControlsWrapperBase, Object.assign({ innerRef: ref }, props))));
|
|
@@ -10616,7 +10785,7 @@
|
|
|
10616
10785
|
? chosenOptions.map(item => this.mapChecked(item, true))
|
|
10617
10786
|
: chosenOptions;
|
|
10618
10787
|
return (React__namespace.createElement(DualListSelectorContext.Provider, { value: { isTree } },
|
|
10619
|
-
React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10788
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$N.dualListSelector, className), id: id }, props), children === '' ? (React__namespace.createElement(React__namespace.Fragment, null,
|
|
10620
10789
|
React__namespace.createElement(DualListSelectorPane, { isSearchable: isSearchable, onFilterUpdate: this.onFilterUpdate, searchInputAriaLabel: availableOptionsSearchAriaLabel, filterOption: filterOption, onSearchInputChanged: onAvailableOptionsSearchInputChanged, status: availableOptionsStatusToDisplay, title: availableOptionsTitle, options: available, selectedOptions: isTree ? availableTreeOptionsChecked : availableOptionsSelected, onOptionSelect: this.onOptionSelect, onOptionCheck: (e, isChecked, itemData) => this.onTreeOptionCheck(e, isChecked, itemData, false), actions: availableOptionsActions, id: `${id}-available-pane`, isDisabled: isDisabled }),
|
|
10621
10790
|
React__namespace.createElement(DualListSelectorControlsWrapper, { "aria-label": controlsAriaLabel },
|
|
10622
10791
|
React__namespace.createElement(DualListSelectorControl, { isDisabled: (isTree ? availableTreeOptionsChecked.length === 0 : availableOptionsSelected.length === 0) ||
|
|
@@ -10650,7 +10819,7 @@
|
|
|
10650
10819
|
isDisabled: false
|
|
10651
10820
|
};
|
|
10652
10821
|
|
|
10653
|
-
var _default$
|
|
10822
|
+
var _default$M = {
|
|
10654
10823
|
"button": "pf-c-button",
|
|
10655
10824
|
"emptyState": "pf-c-empty-state",
|
|
10656
10825
|
"emptyStateBody": "pf-c-empty-state__body",
|
|
@@ -10680,20 +10849,20 @@
|
|
|
10680
10849
|
})(exports.EmptyStateVariant || (exports.EmptyStateVariant = {}));
|
|
10681
10850
|
const EmptyState = (_a) => {
|
|
10682
10851
|
var { children, className = '', variant = exports.EmptyStateVariant.full, isFullHeight } = _a, props = __rest$1(_a, ["children", "className", "variant", "isFullHeight"]);
|
|
10683
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10684
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
10852
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$M.emptyState, variant === 'xs' && _default$M.modifiers.xs, variant === 'small' && _default$M.modifiers.sm, variant === 'large' && _default$M.modifiers.lg, variant === 'xl' && _default$M.modifiers.xl, isFullHeight && _default$M.modifiers.fullHeight, className) }, props),
|
|
10853
|
+
React__namespace.createElement("div", { className: css(_default$M.emptyStateContent) }, children)));
|
|
10685
10854
|
};
|
|
10686
10855
|
EmptyState.displayName = 'EmptyState';
|
|
10687
10856
|
|
|
10688
10857
|
const EmptyStateBody = (_a) => {
|
|
10689
10858
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
10690
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10859
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$M.emptyStateBody, className) }, props), children));
|
|
10691
10860
|
};
|
|
10692
10861
|
EmptyStateBody.displayName = 'EmptyStateBody';
|
|
10693
10862
|
|
|
10694
10863
|
const EmptyStateIcon = (_a) => {
|
|
10695
10864
|
var { className = '', icon: IconComponent, component: AnyComponent, variant = 'icon' } = _a, props = __rest$1(_a, ["className", "icon", "component", "variant"]);
|
|
10696
|
-
const classNames = css(_default$
|
|
10865
|
+
const classNames = css(_default$M.emptyStateIcon, className);
|
|
10697
10866
|
return variant === 'icon' ? (React__namespace.createElement(IconComponent, Object.assign({ className: classNames }, props, { "aria-hidden": "true" }))) : (React__namespace.createElement("div", { className: classNames },
|
|
10698
10867
|
React__namespace.createElement(AnyComponent, null)));
|
|
10699
10868
|
};
|
|
@@ -10701,17 +10870,17 @@
|
|
|
10701
10870
|
|
|
10702
10871
|
const EmptyStateSecondaryActions = (_a) => {
|
|
10703
10872
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
10704
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10873
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$M.emptyStateSecondary, className) }, props), children));
|
|
10705
10874
|
};
|
|
10706
10875
|
EmptyStateSecondaryActions.displayName = 'EmptyStateSecondaryActions';
|
|
10707
10876
|
|
|
10708
10877
|
const EmptyStatePrimary = (_a) => {
|
|
10709
10878
|
var { children, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
10710
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10879
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$M.emptyStatePrimary, className) }, props), children));
|
|
10711
10880
|
};
|
|
10712
10881
|
EmptyStatePrimary.displayName = 'EmptyStatePrimary';
|
|
10713
10882
|
|
|
10714
|
-
var _default$
|
|
10883
|
+
var _default$L = {
|
|
10715
10884
|
"expandableSection": "pf-c-expandable-section",
|
|
10716
10885
|
"expandableSectionContent": "pf-c-expandable-section__content",
|
|
10717
10886
|
"expandableSectionToggle": "pf-c-expandable-section__toggle",
|
|
@@ -10759,12 +10928,12 @@
|
|
|
10759
10928
|
};
|
|
10760
10929
|
}
|
|
10761
10930
|
const computedToggleText = this.calculateToggleText(toggleText, toggleTextExpanded, toggleTextCollapsed, propOrStateIsExpanded);
|
|
10762
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
10763
|
-
!isDetached && (React__namespace.createElement("button", { className: css(_default$
|
|
10764
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10931
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$L.expandableSection, propOrStateIsExpanded && _default$L.modifiers.expanded, isActive && _default$L.modifiers.active, isDetached && _default$L.modifiers.detached, displaySize === 'large' && _default$L.modifiers.displayLg, isWidthLimited && _default$L.modifiers.limitWidth, isIndented && _default$L.modifiers.indented, className) }),
|
|
10932
|
+
!isDetached && (React__namespace.createElement("button", { className: css(_default$L.expandableSectionToggle), type: "button", "aria-expanded": propOrStateIsExpanded, onClick: () => onToggle(!propOrStateIsExpanded) },
|
|
10933
|
+
React__namespace.createElement("span", { className: css(_default$L.expandableSectionToggleIcon) },
|
|
10765
10934
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true })),
|
|
10766
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10767
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
10935
|
+
React__namespace.createElement("span", { className: css(_default$L.expandableSectionToggleText) }, computedToggleText))),
|
|
10936
|
+
React__namespace.createElement("div", { className: css(_default$L.expandableSectionContent), hidden: !propOrStateIsExpanded, id: contentId }, children)));
|
|
10768
10937
|
}
|
|
10769
10938
|
}
|
|
10770
10939
|
ExpandableSection.displayName = 'ExpandableSection';
|
|
@@ -10785,15 +10954,15 @@
|
|
|
10785
10954
|
|
|
10786
10955
|
const ExpandableSectionToggle = (_a) => {
|
|
10787
10956
|
var { children, className = '', isExpanded = false, onToggle, contentId, direction = 'down' } = _a, props = __rest$1(_a, ["children", "className", "isExpanded", "onToggle", "contentId", "direction"]);
|
|
10788
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
10789
|
-
React__namespace.createElement("button", { className: css(_default$
|
|
10790
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10957
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$L.expandableSection, isExpanded && _default$L.modifiers.expanded, _default$L.modifiers.detached, className) }),
|
|
10958
|
+
React__namespace.createElement("button", { className: css(_default$L.expandableSectionToggle), type: "button", "aria-expanded": isExpanded, "aria-controls": contentId, onClick: () => onToggle(!isExpanded) },
|
|
10959
|
+
React__namespace.createElement("span", { className: css(_default$L.expandableSectionToggleIcon, isExpanded && direction === 'up' && _default$L.modifiers.expandTop) },
|
|
10791
10960
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": true })),
|
|
10792
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
10961
|
+
React__namespace.createElement("span", { className: css(_default$L.expandableSectionToggleText) }, children))));
|
|
10793
10962
|
};
|
|
10794
10963
|
ExpandableSectionToggle.displayName = 'ExpandableSectionToggle';
|
|
10795
10964
|
|
|
10796
|
-
var _default$
|
|
10965
|
+
var _default$K = {
|
|
10797
10966
|
"button": "pf-c-button",
|
|
10798
10967
|
"fileUpload": "pf-c-file-upload",
|
|
10799
10968
|
"fileUploadFileDetails": "pf-c-file-upload__file-details",
|
|
@@ -10842,16 +11011,16 @@
|
|
|
10842
11011
|
onChange(newValue, filename, event);
|
|
10843
11012
|
onTextChange === null || onTextChange === void 0 ? void 0 : onTextChange(newValue);
|
|
10844
11013
|
};
|
|
10845
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
10846
|
-
React__namespace.createElement("div", { className: _default$
|
|
11014
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$K.fileUpload, isDragActive && _default$K.modifiers.dragHover, isLoading && _default$K.modifiers.loading, className), ref: containerRef }, props),
|
|
11015
|
+
React__namespace.createElement("div", { className: _default$K.fileUploadFileSelect },
|
|
10847
11016
|
React__namespace.createElement(InputGroup, null,
|
|
10848
11017
|
React__namespace.createElement(TextInput, { isReadOnly // Always read-only regardless of isReadOnly prop (which is just for the TextArea)
|
|
10849
11018
|
: true, isDisabled: isDisabled, id: `${id}-filename`, name: `${id}-filename`, "aria-label": filenameAriaLabel, placeholder: filenamePlaceholder, "aria-describedby": `${id}-browse-button`, value: filename }),
|
|
10850
11019
|
React__namespace.createElement(Button, { id: `${id}-browse-button`, variant: exports.ButtonVariant.control, onClick: onBrowseButtonClick, isDisabled: isDisabled }, browseButtonText),
|
|
10851
11020
|
React__namespace.createElement(Button, { variant: exports.ButtonVariant.control, isDisabled: isDisabled || isClearButtonDisabled, onClick: onClearButtonClick }, clearButtonText))),
|
|
10852
|
-
React__namespace.createElement("div", { className: _default$
|
|
11021
|
+
React__namespace.createElement("div", { className: _default$K.fileUploadFileDetails },
|
|
10853
11022
|
!hideDefaultPreview && type === fileReaderType.text && (React__namespace.createElement(TextArea, { readOnly: isReadOnly || (!!filename && !allowEditingUploadedText), disabled: isDisabled, isRequired: isRequired, resizeOrientation: exports.TextAreResizeOrientation.vertical, validated: validated, id: id, name: id, "aria-label": ariaLabel, value: value, onChange: onTextAreaChange, onClick: onTextAreaClick })),
|
|
10854
|
-
isLoading && (React__namespace.createElement("div", { className: _default$
|
|
11023
|
+
isLoading && (React__namespace.createElement("div", { className: _default$K.fileUploadFileDetailsSpinner },
|
|
10855
11024
|
React__namespace.createElement(Spinner, { size: exports.spinnerSize.lg, "aria-valuetext": spinnerAriaValueText })))),
|
|
10856
11025
|
children));
|
|
10857
11026
|
};
|
|
@@ -12940,16 +13109,16 @@
|
|
|
12940
13109
|
|
|
12941
13110
|
const ActionGroup = (_a) => {
|
|
12942
13111
|
var { children = null, className = '' } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
12943
|
-
const customClassName = css(_default$
|
|
12944
|
-
const formActionsComponent = React__namespace.createElement("div", { className: css(_default$
|
|
13112
|
+
const customClassName = css(_default$11.formGroup, _default$11.modifiers.action, className);
|
|
13113
|
+
const formActionsComponent = React__namespace.createElement("div", { className: css(_default$11.formActions) }, children);
|
|
12945
13114
|
return (React__namespace.createElement("div", Object.assign({}, props, { className: customClassName }),
|
|
12946
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13115
|
+
React__namespace.createElement("div", { className: css(_default$11.formGroupControl) }, formActionsComponent)));
|
|
12947
13116
|
};
|
|
12948
13117
|
ActionGroup.displayName = 'ActionGroup';
|
|
12949
13118
|
|
|
12950
13119
|
const Form = (_a) => {
|
|
12951
13120
|
var { children = null, className = '', isHorizontal = false, isWidthLimited = false } = _a, props = __rest$1(_a, ["children", "className", "isHorizontal", "isWidthLimited"]);
|
|
12952
|
-
return (React__namespace.createElement("form", Object.assign({ noValidate: true }, props, { className: css(_default$
|
|
13121
|
+
return (React__namespace.createElement("form", Object.assign({ noValidate: true }, props, { className: css(_default$11.form, isHorizontal && _default$11.modifiers.horizontal, isWidthLimited && _default$11.modifiers.limitWidth, className) }), children));
|
|
12953
13122
|
};
|
|
12954
13123
|
Form.displayName = 'Form';
|
|
12955
13124
|
|
|
@@ -12964,10 +13133,10 @@
|
|
|
12964
13133
|
|
|
12965
13134
|
const FormFieldGroupToggle = (_a) => {
|
|
12966
13135
|
var { className, onToggle, isExpanded, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledby, toggleId } = _a, props = __rest$1(_a, ["className", "onToggle", "isExpanded", 'aria-label', 'aria-labelledby', "toggleId"]);
|
|
12967
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
12968
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13136
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$11.formFieldGroupToggle, className) }, props),
|
|
13137
|
+
React__namespace.createElement("div", { className: css(_default$11.formFieldGroupToggleButton) },
|
|
12969
13138
|
React__namespace.createElement(Button, { variant: "plain", "aria-label": ariaLabel, onClick: onToggle, "aria-expanded": isExpanded, "aria-labelledby": ariaLabelledby, id: toggleId },
|
|
12970
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
13139
|
+
React__namespace.createElement("span", { className: css(_default$11.formFieldGroupToggleIcon) },
|
|
12971
13140
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": "true" }))))));
|
|
12972
13141
|
};
|
|
12973
13142
|
FormFieldGroupToggle.displayName = 'FormFieldGroupToggle';
|
|
@@ -12979,10 +13148,10 @@
|
|
|
12979
13148
|
// eslint-disable-next-line no-console
|
|
12980
13149
|
console.error('FormFieldGroupExpandable:', 'toggleAriaLabel or the titleText prop of FormFieldGroupHeader is required to make the toggle button accessible');
|
|
12981
13150
|
}
|
|
12982
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
13151
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$11.formFieldGroup, isExpanded && isExpandable && _default$11.modifiers.expanded, className) }, props),
|
|
12983
13152
|
isExpandable && (React__namespace.createElement(GenerateId, { prefix: "form-field-group-toggle" }, id => (React__namespace.createElement(FormFieldGroupToggle, Object.assign({ onToggle: onToggle, isExpanded: isExpanded, "aria-label": toggleAriaLabel, toggleId: id }, (headerTitleText && { 'aria-labelledby': `${header.props.titleText.id} ${id}` })))))),
|
|
12984
13153
|
header && header,
|
|
12985
|
-
(!isExpandable || (isExpandable && isExpanded)) && (React__namespace.createElement("div", { className: css(_default$
|
|
13154
|
+
(!isExpandable || (isExpandable && isExpanded)) && (React__namespace.createElement("div", { className: css(_default$11.formFieldGroupBody) }, children))));
|
|
12986
13155
|
};
|
|
12987
13156
|
InternalFormFieldGroup.displayName = 'InternalFormFieldGroup';
|
|
12988
13157
|
|
|
@@ -13001,40 +13170,40 @@
|
|
|
13001
13170
|
|
|
13002
13171
|
const FormFieldGroupHeader = (_a) => {
|
|
13003
13172
|
var { className, titleText, titleDescription, actions } = _a, props = __rest$1(_a, ["className", "titleText", "titleDescription", "actions"]);
|
|
13004
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
13005
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13006
|
-
titleText && (React__namespace.createElement("div", { className: css(_default$
|
|
13007
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13008
|
-
titleDescription && React__namespace.createElement("div", { className: css(_default$
|
|
13009
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13173
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$11.formFieldGroupHeader, className) }, props),
|
|
13174
|
+
React__namespace.createElement("div", { className: css(_default$11.formFieldGroupHeaderMain) },
|
|
13175
|
+
titleText && (React__namespace.createElement("div", { className: css(_default$11.formFieldGroupHeaderTitle) },
|
|
13176
|
+
React__namespace.createElement("div", { className: css(_default$11.formFieldGroupHeaderTitleText), id: titleText.id }, titleText.text))),
|
|
13177
|
+
titleDescription && React__namespace.createElement("div", { className: css(_default$11.formFieldGroupHeaderDescription) }, titleDescription)),
|
|
13178
|
+
React__namespace.createElement("div", { className: css(_default$11.formFieldGroupHeaderActions) }, actions && actions)));
|
|
13010
13179
|
};
|
|
13011
13180
|
FormFieldGroupHeader.displayName = 'FormFieldGroupHeader';
|
|
13012
13181
|
|
|
13013
13182
|
const FormGroup = (_a) => {
|
|
13014
13183
|
var { children = null, className = '', label, labelInfo, labelIcon, isRequired = false, validated = 'default', isInline = false, hasNoPaddingTop = false, isStack = false, helperText, isHelperTextBeforeField = false, helperTextInvalid, helperTextIcon, helperTextInvalidIcon, fieldId } = _a, props = __rest$1(_a, ["children", "className", "label", "labelInfo", "labelIcon", "isRequired", "validated", "isInline", "hasNoPaddingTop", "isStack", "helperText", "isHelperTextBeforeField", "helperTextInvalid", "helperTextIcon", "helperTextInvalidIcon", "fieldId"]);
|
|
13015
|
-
const validHelperText = typeof helperText !== 'string' ? (helperText) : (React__namespace.createElement("div", { className: css(_default$
|
|
13016
|
-
helperTextIcon && React__namespace.createElement("span", { className: css(_default$
|
|
13184
|
+
const validHelperText = typeof helperText !== 'string' ? (helperText) : (React__namespace.createElement("div", { className: css(_default$11.formHelperText, validated === exports.ValidatedOptions.success && _default$11.modifiers.success, validated === exports.ValidatedOptions.warning && _default$11.modifiers.warning), id: `${fieldId}-helper`, "aria-live": "polite" },
|
|
13185
|
+
helperTextIcon && React__namespace.createElement("span", { className: css(_default$11.formHelperTextIcon) }, helperTextIcon),
|
|
13017
13186
|
helperText));
|
|
13018
|
-
const inValidHelperText = typeof helperTextInvalid !== 'string' ? (helperTextInvalid) : (React__namespace.createElement("div", { className: css(_default$
|
|
13019
|
-
helperTextInvalidIcon && React__namespace.createElement("span", { className: css(_default$
|
|
13187
|
+
const inValidHelperText = typeof helperTextInvalid !== 'string' ? (helperTextInvalid) : (React__namespace.createElement("div", { className: css(_default$11.formHelperText, _default$11.modifiers.error), id: `${fieldId}-helper`, "aria-live": "polite" },
|
|
13188
|
+
helperTextInvalidIcon && React__namespace.createElement("span", { className: css(_default$11.formHelperTextIcon) }, helperTextInvalidIcon),
|
|
13020
13189
|
helperTextInvalid));
|
|
13021
13190
|
const showValidHelperTxt = (validationType) => validationType !== exports.ValidatedOptions.error && helperText ? validHelperText : '';
|
|
13022
13191
|
const helperTextToDisplay = validated === exports.ValidatedOptions.error && helperTextInvalid ? inValidHelperText : showValidHelperTxt(validated);
|
|
13023
13192
|
const labelContent = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13024
|
-
React__namespace.createElement("label", { className: css(_default$
|
|
13025
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
13026
|
-
isRequired && (React__namespace.createElement("span", { className: css(_default$
|
|
13193
|
+
React__namespace.createElement("label", { className: css(_default$11.formLabel), htmlFor: fieldId },
|
|
13194
|
+
React__namespace.createElement("span", { className: css(_default$11.formLabelText) }, label),
|
|
13195
|
+
isRequired && (React__namespace.createElement("span", { className: css(_default$11.formLabelRequired), "aria-hidden": "true" },
|
|
13027
13196
|
' ',
|
|
13028
13197
|
ASTERISK))),
|
|
13029
13198
|
' ',
|
|
13030
13199
|
React__namespace.isValidElement(labelIcon) && labelIcon));
|
|
13031
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
13032
|
-
label && (React__namespace.createElement("div", { className: css(_default$
|
|
13200
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$11.formGroup, className) }),
|
|
13201
|
+
label && (React__namespace.createElement("div", { className: css(_default$11.formGroupLabel, labelInfo && _default$11.modifiers.info, hasNoPaddingTop && _default$11.modifiers.noPaddingTop) },
|
|
13033
13202
|
labelInfo && (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13034
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13035
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13203
|
+
React__namespace.createElement("div", { className: css(_default$11.formGroupLabelMain) }, labelContent),
|
|
13204
|
+
React__namespace.createElement("div", { className: css(_default$11.formGroupLabelInfo) }, labelInfo))),
|
|
13036
13205
|
!labelInfo && labelContent)),
|
|
13037
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13206
|
+
React__namespace.createElement("div", { className: css(_default$11.formGroupControl, isInline && _default$11.modifiers.inline, isStack && _default$11.modifiers.stack) },
|
|
13038
13207
|
isHelperTextBeforeField && helperTextToDisplay,
|
|
13039
13208
|
children,
|
|
13040
13209
|
!isHelperTextBeforeField && helperTextToDisplay)));
|
|
@@ -13044,21 +13213,21 @@
|
|
|
13044
13213
|
const FormHelperText = (_a) => {
|
|
13045
13214
|
var { children = null, isError = false, isHidden = true, className = '', icon = null, component = 'p' } = _a, props = __rest$1(_a, ["children", "isError", "isHidden", "className", "icon", "component"]);
|
|
13046
13215
|
const Component = component;
|
|
13047
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
13048
|
-
icon && React__namespace.createElement("span", { className: css(_default$
|
|
13216
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$11.formHelperText, isError && _default$11.modifiers.error, isHidden && _default$11.modifiers.hidden, className) }, props),
|
|
13217
|
+
icon && React__namespace.createElement("span", { className: css(_default$11.formHelperTextIcon) }, icon),
|
|
13049
13218
|
children));
|
|
13050
13219
|
};
|
|
13051
13220
|
FormHelperText.displayName = 'FormHelperText';
|
|
13052
13221
|
|
|
13053
13222
|
const FormSection = (_a) => {
|
|
13054
13223
|
var { className = '', children, title = '', titleElement: TitleElement = 'div' } = _a, props = __rest$1(_a, ["className", "children", "title", "titleElement"]);
|
|
13055
|
-
return (React__namespace.createElement("section", Object.assign({}, props, { className: css(_default$
|
|
13056
|
-
title && React__namespace.createElement(TitleElement, { className: css(_default$
|
|
13224
|
+
return (React__namespace.createElement("section", Object.assign({}, props, { className: css(_default$11.formSection, className) }),
|
|
13225
|
+
title && React__namespace.createElement(TitleElement, { className: css(_default$11.formSectionTitle, className) }, title),
|
|
13057
13226
|
children));
|
|
13058
13227
|
};
|
|
13059
13228
|
FormSection.displayName = 'FormSection';
|
|
13060
13229
|
|
|
13061
|
-
var _default$
|
|
13230
|
+
var _default$J = {
|
|
13062
13231
|
"helperText": "pf-c-helper-text",
|
|
13063
13232
|
"helperTextItem": "pf-c-helper-text__item",
|
|
13064
13233
|
"helperTextItemIcon": "pf-c-helper-text__item-icon",
|
|
@@ -13075,7 +13244,7 @@
|
|
|
13075
13244
|
const HelperText = (_a) => {
|
|
13076
13245
|
var { children, className, component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
13077
13246
|
const Component = component;
|
|
13078
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
13247
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$J.helperText, className) }, props), children));
|
|
13079
13248
|
};
|
|
13080
13249
|
HelperText.displayName = 'HelperText';
|
|
13081
13250
|
|
|
@@ -13094,26 +13263,26 @@
|
|
|
13094
13263
|
|
|
13095
13264
|
const variantStyle$4 = {
|
|
13096
13265
|
default: '',
|
|
13097
|
-
indeterminate: _default$
|
|
13098
|
-
warning: _default$
|
|
13099
|
-
success: _default$
|
|
13100
|
-
error: _default$
|
|
13266
|
+
indeterminate: _default$J.modifiers.indeterminate,
|
|
13267
|
+
warning: _default$J.modifiers.warning,
|
|
13268
|
+
success: _default$J.modifiers.success,
|
|
13269
|
+
error: _default$J.modifiers.error
|
|
13101
13270
|
};
|
|
13102
13271
|
const HelperTextItem = (_a) => {
|
|
13103
13272
|
var { children, className, component = 'div', variant = 'default', icon, isDynamic = false, hasIcon = isDynamic } = _a, props = __rest$1(_a, ["children", "className", "component", "variant", "icon", "isDynamic", "hasIcon"]);
|
|
13104
13273
|
const Component = component;
|
|
13105
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
13106
|
-
icon && (React__namespace.createElement("span", { className: css(_default$
|
|
13107
|
-
hasIcon && !icon && (React__namespace.createElement("span", { className: css(_default$
|
|
13274
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$J.helperTextItem, variantStyle$4[variant], isDynamic && _default$J.modifiers.dynamic, className) }, props),
|
|
13275
|
+
icon && (React__namespace.createElement("span", { className: css(_default$J.helperTextItemIcon), "aria-hidden": true }, icon)),
|
|
13276
|
+
hasIcon && !icon && (React__namespace.createElement("span", { className: css(_default$J.helperTextItemIcon), "aria-hidden": true },
|
|
13108
13277
|
(variant === 'default' || variant === 'indeterminate') && React__namespace.createElement(MinusIcon$1, null),
|
|
13109
13278
|
variant === 'warning' && React__namespace.createElement(ExclamationTriangleIcon$1, null),
|
|
13110
13279
|
variant === 'success' && React__namespace.createElement(CheckCircleIcon$1, null),
|
|
13111
13280
|
variant === 'error' && React__namespace.createElement(ExclamationCircleIcon$1, null))),
|
|
13112
|
-
React__namespace.createElement("span", { className: css(_default$
|
|
13281
|
+
React__namespace.createElement("span", { className: css(_default$J.helperTextItemText) }, children)));
|
|
13113
13282
|
};
|
|
13114
13283
|
HelperTextItem.displayName = 'HelperTextItem';
|
|
13115
13284
|
|
|
13116
|
-
var _default$
|
|
13285
|
+
var _default$I = {
|
|
13117
13286
|
"button": "pf-c-button",
|
|
13118
13287
|
"dropdown": "pf-c-dropdown",
|
|
13119
13288
|
"dropdownToggle": "pf-c-dropdown__toggle",
|
|
@@ -13131,31 +13300,31 @@
|
|
|
13131
13300
|
|
|
13132
13301
|
const Hint = (_a) => {
|
|
13133
13302
|
var { children, className, actions } = _a, props = __rest$1(_a, ["children", "className", "actions"]);
|
|
13134
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
13135
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13303
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$I.hint, className) }, props),
|
|
13304
|
+
React__namespace.createElement("div", { className: css(_default$I.hintActions) }, actions),
|
|
13136
13305
|
children));
|
|
13137
13306
|
};
|
|
13138
13307
|
Hint.displayName = 'Hint';
|
|
13139
13308
|
|
|
13140
13309
|
const HintBody = (_a) => {
|
|
13141
13310
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
13142
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
13311
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$I.hintBody, className) }, props), children));
|
|
13143
13312
|
};
|
|
13144
13313
|
HintBody.displayName = 'HintBody';
|
|
13145
13314
|
|
|
13146
13315
|
const HintFooter = (_a) => {
|
|
13147
13316
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
13148
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
13317
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$I.hintFooter, className) }, props), children));
|
|
13149
13318
|
};
|
|
13150
13319
|
HintFooter.displayName = 'HintFooter';
|
|
13151
13320
|
|
|
13152
13321
|
const HintTitle = (_a) => {
|
|
13153
13322
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
13154
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
13323
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$I.hintTitle, className) }, props), children));
|
|
13155
13324
|
};
|
|
13156
13325
|
HintTitle.displayName = 'HintTitle';
|
|
13157
13326
|
|
|
13158
|
-
var _default$
|
|
13327
|
+
var _default$H = {
|
|
13159
13328
|
"button": "pf-c-button",
|
|
13160
13329
|
"jumpLinks": "pf-c-jump-links",
|
|
13161
13330
|
"jumpLinksItem": "pf-c-jump-links__item",
|
|
@@ -13187,7 +13356,7 @@
|
|
|
13187
13356
|
}
|
|
13188
13357
|
};
|
|
13189
13358
|
|
|
13190
|
-
var _default$
|
|
13359
|
+
var _default$G = {
|
|
13191
13360
|
"modifiers": {
|
|
13192
13361
|
"gutter": "pf-m-gutter",
|
|
13193
13362
|
"panelRight": "pf-m-panel-right",
|
|
@@ -13247,7 +13416,7 @@
|
|
|
13247
13416
|
|
|
13248
13417
|
const JumpLinksList = (_a) => {
|
|
13249
13418
|
var { children, className } = _a, props = __rest$1(_a, ["children", "className"]);
|
|
13250
|
-
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
13419
|
+
return (React__namespace.createElement("ul", Object.assign({ className: css(_default$H.jumpLinksList, className) }, props), children));
|
|
13251
13420
|
};
|
|
13252
13421
|
JumpLinksList.displayName = 'JumpLinksList';
|
|
13253
13422
|
|
|
@@ -13258,9 +13427,9 @@
|
|
|
13258
13427
|
const childrenArr = React__namespace.Children.toArray(children);
|
|
13259
13428
|
const sublists = childrenArr.filter(child => child.type === JumpLinksList);
|
|
13260
13429
|
children = childrenArr.filter(child => child.type !== JumpLinksList);
|
|
13261
|
-
return (React__namespace.createElement("li", Object.assign({ className: css(_default$
|
|
13262
|
-
React__namespace.createElement("a", { className: _default$
|
|
13263
|
-
React__namespace.createElement("span", { className: _default$
|
|
13430
|
+
return (React__namespace.createElement("li", Object.assign({ className: css(_default$H.jumpLinksItem, isActive && _default$H.modifiers.current, className) }, props),
|
|
13431
|
+
React__namespace.createElement("a", { className: _default$H.jumpLinksLink, href: href, onClick: onClick },
|
|
13432
|
+
React__namespace.createElement("span", { className: _default$H.jumpLinksLinkText }, children)),
|
|
13264
13433
|
sublists));
|
|
13265
13434
|
};
|
|
13266
13435
|
JumpLinksItem.displayName = 'JumpLinksItem';
|
|
@@ -13382,10 +13551,10 @@
|
|
|
13382
13551
|
if (isResponsive(navRef.current)) {
|
|
13383
13552
|
// Remove class immediately so we can get collapsed height
|
|
13384
13553
|
if (navRef.current) {
|
|
13385
|
-
navRef.current.classList.remove(_default$
|
|
13554
|
+
navRef.current.classList.remove(_default$H.modifiers.expanded);
|
|
13386
13555
|
}
|
|
13387
13556
|
let stickyParent = navRef.current && navRef.current.parentElement;
|
|
13388
|
-
while (stickyParent && !stickyParent.classList.contains(_default$
|
|
13557
|
+
while (stickyParent && !stickyParent.classList.contains(_default$G.modifiers.sticky)) {
|
|
13389
13558
|
stickyParent = stickyParent.parentElement;
|
|
13390
13559
|
}
|
|
13391
13560
|
setIsExpanded(false);
|
|
@@ -13415,23 +13584,23 @@
|
|
|
13415
13584
|
}
|
|
13416
13585
|
return child;
|
|
13417
13586
|
});
|
|
13418
|
-
return (React__namespace.createElement("nav", Object.assign({ className: css(_default$
|
|
13419
|
-
React__namespace.createElement("div", { className: _default$
|
|
13587
|
+
return (React__namespace.createElement("nav", Object.assign({ className: css(_default$H.jumpLinks, isCentered && _default$H.modifiers.center, isVertical && _default$H.modifiers.vertical, formatBreakpointMods(expandable, _default$H), isExpanded && _default$H.modifiers.expanded, className), "aria-label": ariaLabel, ref: navRef }, props),
|
|
13588
|
+
React__namespace.createElement("div", { className: _default$H.jumpLinksMain },
|
|
13420
13589
|
React__namespace.createElement("div", { className: css('pf-c-jump-links__header') },
|
|
13421
|
-
expandable && (React__namespace.createElement("div", { className: _default$
|
|
13590
|
+
expandable && (React__namespace.createElement("div", { className: _default$H.jumpLinksToggle },
|
|
13422
13591
|
React__namespace.createElement(Button, { variant: "plain", onClick: () => setIsExpanded(!isExpanded), "aria-label": toggleAriaLabel, "aria-expanded": isExpanded },
|
|
13423
|
-
React__namespace.createElement("span", { className: _default$
|
|
13592
|
+
React__namespace.createElement("span", { className: _default$H.jumpLinksToggleIcon },
|
|
13424
13593
|
React__namespace.createElement(AngleRightIcon$1, null)),
|
|
13425
|
-
label && React__namespace.createElement("span", { className: css(_default$
|
|
13594
|
+
label && React__namespace.createElement("span", { className: css(_default$H.jumpLinksToggleText) },
|
|
13426
13595
|
" ",
|
|
13427
13596
|
label,
|
|
13428
13597
|
" ")))),
|
|
13429
|
-
label && alwaysShowLabel && React__namespace.createElement("div", { className: css(_default$
|
|
13430
|
-
React__namespace.createElement("ul", { className: _default$
|
|
13598
|
+
label && alwaysShowLabel && React__namespace.createElement("div", { className: css(_default$H.jumpLinksLabel) }, label)),
|
|
13599
|
+
React__namespace.createElement("ul", { className: _default$H.jumpLinksList }, cloneChildren(children)))));
|
|
13431
13600
|
};
|
|
13432
13601
|
JumpLinks.displayName = 'JumpLinks';
|
|
13433
13602
|
|
|
13434
|
-
var _default$
|
|
13603
|
+
var _default$F = {
|
|
13435
13604
|
"button": "pf-c-button",
|
|
13436
13605
|
"label": "pf-c-label",
|
|
13437
13606
|
"labelContent": "pf-c-label__content",
|
|
@@ -13453,7 +13622,7 @@
|
|
|
13453
13622
|
}
|
|
13454
13623
|
};
|
|
13455
13624
|
|
|
13456
|
-
var _default$
|
|
13625
|
+
var _default$E = {
|
|
13457
13626
|
"button": "pf-c-button",
|
|
13458
13627
|
"labelGroup": "pf-c-label-group",
|
|
13459
13628
|
"labelGroupClose": "pf-c-label-group__close",
|
|
@@ -13470,42 +13639,21 @@
|
|
|
13470
13639
|
}
|
|
13471
13640
|
};
|
|
13472
13641
|
|
|
13473
|
-
var _default$E = {
|
|
13474
|
-
"button": "pf-c-button",
|
|
13475
|
-
"inlineEdit": "pf-c-inline-edit",
|
|
13476
|
-
"inlineEditAction": "pf-c-inline-edit__action",
|
|
13477
|
-
"inlineEditEditableText": "pf-c-inline-edit__editable-text",
|
|
13478
|
-
"inlineEditGroup": "pf-c-inline-edit__group",
|
|
13479
|
-
"inlineEditInput": "pf-c-inline-edit__input",
|
|
13480
|
-
"inlineEditLabel": "pf-c-inline-edit__label",
|
|
13481
|
-
"inlineEditValue": "pf-c-inline-edit__value",
|
|
13482
|
-
"modifiers": {
|
|
13483
|
-
"iconGroup": "pf-m-icon-group",
|
|
13484
|
-
"footer": "pf-m-footer",
|
|
13485
|
-
"column": "pf-m-column",
|
|
13486
|
-
"valid": "pf-m-valid",
|
|
13487
|
-
"plain": "pf-m-plain",
|
|
13488
|
-
"actionGroup": "pf-m-action-group",
|
|
13489
|
-
"enableEditable": "pf-m-enable-editable",
|
|
13490
|
-
"inlineEditable": "pf-m-inline-editable",
|
|
13491
|
-
"enable": "pf-m-enable",
|
|
13492
|
-
"bold": "pf-m-bold"
|
|
13493
|
-
}
|
|
13494
|
-
};
|
|
13495
|
-
|
|
13496
13642
|
const colorStyles = {
|
|
13497
|
-
blue: _default$
|
|
13498
|
-
cyan: _default$
|
|
13499
|
-
green: _default$
|
|
13500
|
-
orange: _default$
|
|
13501
|
-
purple: _default$
|
|
13502
|
-
red: _default$
|
|
13643
|
+
blue: _default$F.modifiers.blue,
|
|
13644
|
+
cyan: _default$F.modifiers.cyan,
|
|
13645
|
+
green: _default$F.modifiers.green,
|
|
13646
|
+
orange: _default$F.modifiers.orange,
|
|
13647
|
+
purple: _default$F.modifiers.purple,
|
|
13648
|
+
red: _default$F.modifiers.red,
|
|
13503
13649
|
grey: ''
|
|
13504
13650
|
};
|
|
13505
13651
|
const Label = (_a) => {
|
|
13506
13652
|
var { children, className = '', color = 'grey', variant = 'filled', isCompact = false, isEditable = false, editableProps, isTruncated = false, tooltipPosition, icon, onClose, onEditCancel, onEditComplete, closeBtn, closeBtnAriaLabel, closeBtnProps, href, isOverflowLabel, render } = _a, props = __rest$1(_a, ["children", "className", "color", "variant", "isCompact", "isEditable", "editableProps", "isTruncated", "tooltipPosition", "icon", "onClose", "onEditCancel", "onEditComplete", "closeBtn", "closeBtnAriaLabel", "closeBtnProps", "href", "isOverflowLabel", "render"]);
|
|
13507
13653
|
const [isEditableActive, setIsEditableActive] = React.useState(false);
|
|
13508
|
-
const
|
|
13654
|
+
const [currValue, setCurrValue] = React.useState(children);
|
|
13655
|
+
const editableButtonRef = React__namespace.useRef();
|
|
13656
|
+
const editableInputRef = React__namespace.useRef();
|
|
13509
13657
|
React__namespace.useEffect(() => {
|
|
13510
13658
|
document.addEventListener('click', onDocClick);
|
|
13511
13659
|
document.addEventListener('keydown', onKeyDown);
|
|
@@ -13516,30 +13664,41 @@
|
|
|
13516
13664
|
});
|
|
13517
13665
|
const onDocClick = (event) => {
|
|
13518
13666
|
if (isEditableActive &&
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
!
|
|
13522
|
-
|
|
13667
|
+
editableInputRef &&
|
|
13668
|
+
editableInputRef.current &&
|
|
13669
|
+
!editableInputRef.current.contains(event.target)) {
|
|
13670
|
+
if (editableInputRef.current.value) {
|
|
13671
|
+
onEditComplete && onEditComplete(editableInputRef.current.value);
|
|
13672
|
+
}
|
|
13523
13673
|
setIsEditableActive(false);
|
|
13524
13674
|
}
|
|
13525
13675
|
};
|
|
13526
13676
|
const onKeyDown = (event) => {
|
|
13527
13677
|
const key = event.key;
|
|
13528
|
-
if (!
|
|
13678
|
+
if ((!isEditableActive &&
|
|
13679
|
+
(!editableButtonRef ||
|
|
13680
|
+
!editableButtonRef.current ||
|
|
13681
|
+
!editableButtonRef.current.contains(event.target))) ||
|
|
13682
|
+
(isEditableActive &&
|
|
13683
|
+
(!editableInputRef || !editableInputRef.current || !editableInputRef.current.contains(event.target)))) {
|
|
13529
13684
|
return;
|
|
13530
13685
|
}
|
|
13531
13686
|
if (isEditableActive && (key === 'Enter' || key === 'Tab')) {
|
|
13532
13687
|
event.preventDefault();
|
|
13533
13688
|
event.stopImmediatePropagation();
|
|
13534
|
-
|
|
13689
|
+
if (editableInputRef.current.value) {
|
|
13690
|
+
onEditComplete && onEditComplete(editableInputRef.current.value);
|
|
13691
|
+
}
|
|
13535
13692
|
setIsEditableActive(false);
|
|
13536
13693
|
}
|
|
13537
13694
|
if (isEditableActive && key === 'Escape') {
|
|
13538
13695
|
event.preventDefault();
|
|
13539
13696
|
event.stopImmediatePropagation();
|
|
13540
13697
|
// Reset div text to initial children prop - pre-edit
|
|
13541
|
-
|
|
13542
|
-
|
|
13698
|
+
if (editableInputRef.current.value) {
|
|
13699
|
+
editableInputRef.current.value = children;
|
|
13700
|
+
onEditCancel && onEditCancel(children);
|
|
13701
|
+
}
|
|
13543
13702
|
setIsEditableActive(false);
|
|
13544
13703
|
}
|
|
13545
13704
|
if (!isEditableActive && key === 'Enter') {
|
|
@@ -13568,40 +13727,41 @@
|
|
|
13568
13727
|
setIsTooltipVisible(textRef.current && textRef.current.offsetWidth < textRef.current.scrollWidth);
|
|
13569
13728
|
}, []);
|
|
13570
13729
|
let content = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13571
|
-
icon && React__namespace.createElement("span", { className: css(_default$
|
|
13572
|
-
isTruncated && (React__namespace.createElement("span", { ref: textRef, className: css(_default$
|
|
13730
|
+
icon && React__namespace.createElement("span", { className: css(_default$F.labelIcon) }, icon),
|
|
13731
|
+
isTruncated && (React__namespace.createElement("span", { ref: textRef, className: css(_default$F.labelText) }, children)),
|
|
13573
13732
|
!isTruncated && children));
|
|
13733
|
+
React__namespace.useEffect(() => {
|
|
13734
|
+
if (isEditableActive && editableInputRef) {
|
|
13735
|
+
editableInputRef.current && editableInputRef.current.focus();
|
|
13736
|
+
}
|
|
13737
|
+
}, [editableInputRef, isEditableActive]);
|
|
13738
|
+
const updateVal = () => {
|
|
13739
|
+
setCurrValue(editableInputRef.current.value);
|
|
13740
|
+
};
|
|
13574
13741
|
if (isEditable) {
|
|
13575
|
-
content = (React__namespace.createElement(
|
|
13576
|
-
|
|
13577
|
-
|
|
13742
|
+
content = (React__namespace.createElement("button", Object.assign({ ref: editableButtonRef, className: css(_default$F.labelEditableText), onClick: e => {
|
|
13743
|
+
setIsEditableActive(true);
|
|
13744
|
+
e.stopPropagation();
|
|
13745
|
+
} }, editableProps), children));
|
|
13578
13746
|
}
|
|
13579
|
-
let labelComponentChild = (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
13747
|
+
let labelComponentChild = (React__namespace.createElement(Component, Object.assign({ className: css(_default$F.labelContent) }, (href && { href })), content));
|
|
13580
13748
|
if (render) {
|
|
13581
13749
|
labelComponentChild = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13582
13750
|
isTooltipVisible && React__namespace.createElement(Tooltip, { reference: componentRef, content: children, position: tooltipPosition }),
|
|
13583
13751
|
render({
|
|
13584
|
-
className: _default$
|
|
13752
|
+
className: _default$F.labelContent,
|
|
13585
13753
|
content,
|
|
13586
13754
|
componentRef
|
|
13587
13755
|
})));
|
|
13588
13756
|
}
|
|
13589
13757
|
else if (isTooltipVisible) {
|
|
13590
13758
|
labelComponentChild = (React__namespace.createElement(Tooltip, { content: children, position: tooltipPosition },
|
|
13591
|
-
React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
13759
|
+
React__namespace.createElement(Component, Object.assign({ className: css(_default$F.labelContent) }, (href && { href })), content)));
|
|
13592
13760
|
}
|
|
13593
|
-
return (React__namespace.createElement(LabelComponent, Object.assign({}, props, { className: css(_default$
|
|
13594
|
-
|
|
13595
|
-
|
|
13596
|
-
|
|
13597
|
-
return;
|
|
13598
|
-
}
|
|
13599
|
-
setIsEditableActive(true);
|
|
13600
|
-
editableDivRef.current.focus();
|
|
13601
|
-
}
|
|
13602
|
-
})),
|
|
13603
|
-
labelComponentChild,
|
|
13604
|
-
onClose && button));
|
|
13761
|
+
return (React__namespace.createElement(LabelComponent, Object.assign({}, props, { className: css(_default$F.label, colorStyles[color], variant === 'outline' && _default$F.modifiers.outline, isOverflowLabel && _default$F.modifiers.overflow, isCompact && _default$F.modifiers.compact, isEditable && _default$E.modifiers.editable, isEditableActive && _default$F.modifiers.editableActive, className) }),
|
|
13762
|
+
!isEditableActive && labelComponentChild,
|
|
13763
|
+
!isEditableActive && onClose && button,
|
|
13764
|
+
isEditableActive && (React__namespace.createElement("input", Object.assign({ className: css(_default$F.labelEditableText), type: "text", id: "editable-input", ref: editableInputRef, value: currValue, onChange: updateVal }, editableProps)))));
|
|
13605
13765
|
};
|
|
13606
13766
|
Label.displayName = 'Label';
|
|
13607
13767
|
|
|
@@ -13629,8 +13789,8 @@
|
|
|
13629
13789
|
const { categoryName, tooltipPosition } = this.props;
|
|
13630
13790
|
const { isTooltipVisible } = this.state;
|
|
13631
13791
|
return isTooltipVisible ? (React__namespace.createElement(Tooltip, { position: tooltipPosition, content: categoryName },
|
|
13632
|
-
React__namespace.createElement("span", { tabIndex: 0, ref: this.headingRef, className: css(_default$
|
|
13633
|
-
React__namespace.createElement("span", { "aria-hidden": "true" }, categoryName)))) : (React__namespace.createElement("span", { ref: this.headingRef, className: css(_default$
|
|
13792
|
+
React__namespace.createElement("span", { tabIndex: 0, ref: this.headingRef, className: css(_default$E.labelGroupLabel), id: id, "aria-label": categoryName },
|
|
13793
|
+
React__namespace.createElement("span", { "aria-hidden": "true" }, categoryName)))) : (React__namespace.createElement("span", { ref: this.headingRef, className: css(_default$E.labelGroupLabel), "aria-hidden": "true", id: id }, categoryName));
|
|
13634
13794
|
}
|
|
13635
13795
|
render() {
|
|
13636
13796
|
const _a = this.props, { categoryName, children, className, isClosable, isCompact, closeBtnAriaLabel, 'aria-label': ariaLabel, onClick, numLabels, expandedText, collapsedText,
|
|
@@ -13649,17 +13809,17 @@
|
|
|
13649
13809
|
: React__namespace.Children.toArray(children);
|
|
13650
13810
|
const content = (React__namespace.createElement(React__namespace.Fragment, null,
|
|
13651
13811
|
categoryName && this.renderLabel(id),
|
|
13652
|
-
React__namespace.createElement("ul", Object.assign({ className: css(_default$
|
|
13653
|
-
labelArray.map((child, i) => (React__namespace.createElement("li", { className: css(_default$
|
|
13654
|
-
numChildren > numLabels && (React__namespace.createElement("li", { className: css(_default$
|
|
13655
|
-
React__namespace.createElement(Label, { isOverflowLabel: true, onClick: this.toggleCollapse, className: css(isCompact && _default$
|
|
13656
|
-
isEditable && hasEditableTextArea && (React__namespace.createElement("li", { className: css(_default$
|
|
13657
|
-
React__namespace.createElement("textarea", Object.assign({ className: css(_default$
|
|
13658
|
-
const close = (React__namespace.createElement("div", { className: css(_default$
|
|
13812
|
+
React__namespace.createElement("ul", Object.assign({ className: css(_default$E.labelGroupList) }, (categoryName && { 'aria-labelledby': id }), (!categoryName && { 'aria-label': ariaLabel }), { role: "list" }, rest),
|
|
13813
|
+
labelArray.map((child, i) => (React__namespace.createElement("li", { className: css(_default$E.labelGroupListItem), key: i }, child))),
|
|
13814
|
+
numChildren > numLabels && (React__namespace.createElement("li", { className: css(_default$E.labelGroupListItem) },
|
|
13815
|
+
React__namespace.createElement(Label, { isOverflowLabel: true, onClick: this.toggleCollapse, className: css(isCompact && _default$F.modifiers.compact) }, isOpen ? expandedText : collapsedTextResult))),
|
|
13816
|
+
isEditable && hasEditableTextArea && (React__namespace.createElement("li", { className: css(_default$E.labelGroupListItem, _default$E.modifiers.textarea) },
|
|
13817
|
+
React__namespace.createElement("textarea", Object.assign({ className: css(_default$E.labelGroupTextarea), rows: 1, tabIndex: 0 }, editableTextAreaProps)))))));
|
|
13818
|
+
const close = (React__namespace.createElement("div", { className: css(_default$E.labelGroupClose) },
|
|
13659
13819
|
React__namespace.createElement(Button, { variant: "plain", "aria-label": closeBtnAriaLabel, onClick: onClick, id: `remove_group_${id}`, "aria-labelledby": `remove_group_${id} ${id}` },
|
|
13660
13820
|
React__namespace.createElement(TimesCircleIcon$1, { "aria-hidden": "true" }))));
|
|
13661
|
-
return (React__namespace.createElement("div", { className: css(_default$
|
|
13662
|
-
React__namespace.createElement("div", { className: css(_default$
|
|
13821
|
+
return (React__namespace.createElement("div", { className: css(_default$E.labelGroup, className, categoryName && _default$E.modifiers.category, isVertical && _default$E.modifiers.vertical, isEditable && _default$E.modifiers.editable) },
|
|
13822
|
+
React__namespace.createElement("div", { className: css(_default$E.labelGroupMain) }, content),
|
|
13663
13823
|
isClosable && close));
|
|
13664
13824
|
};
|
|
13665
13825
|
return numChildren === 0 ? null : (React__namespace.createElement(GenerateId, null, randomId => renderLabelGroup(this.props.id || randomId)));
|
|
@@ -14892,7 +15052,7 @@
|
|
|
14892
15052
|
}, []);
|
|
14893
15053
|
const content = (React__namespace.createElement("h1", Object.assign({ id: id, ref: h1, className: css(_default$x.modalBoxTitle, titleIconVariant && _default$x.modifiers.icon, className) }, props),
|
|
14894
15054
|
titleIconVariant && (React__namespace.createElement("span", { className: css(_default$x.modalBoxTitleIcon) }, isVariantIcon(titleIconVariant) ? variantIcons[titleIconVariant] : React__namespace.createElement(CustomIcon, null))),
|
|
14895
|
-
label && React__namespace.createElement("span", { className: css(_default$
|
|
15055
|
+
label && React__namespace.createElement("span", { className: css(_default$1f.screenReader) }, label),
|
|
14896
15056
|
React__namespace.createElement("span", { className: css(_default$x.modalBoxTitleText) }, title)));
|
|
14897
15057
|
return isTooltipVisible ? (React__namespace.createElement(Tooltip, { content: title, isVisible: true }, content)) : (content);
|
|
14898
15058
|
};
|
|
@@ -14932,7 +15092,7 @@
|
|
|
14932
15092
|
modalBody,
|
|
14933
15093
|
modalBoxFooter));
|
|
14934
15094
|
return (React__namespace.createElement(Backdrop, null,
|
|
14935
|
-
React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true }, className: css(_default$
|
|
15095
|
+
React__namespace.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true }, className: css(_default$1o.bullseye) }, modalBox)));
|
|
14936
15096
|
};
|
|
14937
15097
|
ModalContent.displayName = 'ModalContent';
|
|
14938
15098
|
|
|
@@ -14991,10 +15151,10 @@
|
|
|
14991
15151
|
target.appendChild(container);
|
|
14992
15152
|
target.addEventListener('keydown', this.handleEscKeyClick, false);
|
|
14993
15153
|
if (this.props.isOpen) {
|
|
14994
|
-
target.classList.add(css(_default$
|
|
15154
|
+
target.classList.add(css(_default$1p.backdropOpen));
|
|
14995
15155
|
}
|
|
14996
15156
|
else {
|
|
14997
|
-
target.classList.remove(css(_default$
|
|
15157
|
+
target.classList.remove(css(_default$1p.backdropOpen));
|
|
14998
15158
|
}
|
|
14999
15159
|
if (this.isEmpty(title) && this.isEmpty(ariaLabel) && this.isEmpty(ariaLabelledby)) {
|
|
15000
15160
|
// eslint-disable-next-line no-console
|
|
@@ -15009,11 +15169,11 @@
|
|
|
15009
15169
|
const { appendTo } = this.props;
|
|
15010
15170
|
const target = this.getElement(appendTo);
|
|
15011
15171
|
if (this.props.isOpen) {
|
|
15012
|
-
target.classList.add(css(_default$
|
|
15172
|
+
target.classList.add(css(_default$1p.backdropOpen));
|
|
15013
15173
|
this.toggleSiblingsFromScreenReaders(true);
|
|
15014
15174
|
}
|
|
15015
15175
|
else {
|
|
15016
|
-
target.classList.remove(css(_default$
|
|
15176
|
+
target.classList.remove(css(_default$1p.backdropOpen));
|
|
15017
15177
|
this.toggleSiblingsFromScreenReaders(false);
|
|
15018
15178
|
}
|
|
15019
15179
|
}
|
|
@@ -15024,7 +15184,7 @@
|
|
|
15024
15184
|
target.removeChild(this.state.container);
|
|
15025
15185
|
}
|
|
15026
15186
|
target.removeEventListener('keydown', this.handleEscKeyClick, false);
|
|
15027
|
-
target.classList.remove(css(_default$
|
|
15187
|
+
target.classList.remove(css(_default$1p.backdropOpen));
|
|
15028
15188
|
}
|
|
15029
15189
|
render() {
|
|
15030
15190
|
const _a = this.props, {
|
|
@@ -15428,7 +15588,7 @@
|
|
|
15428
15588
|
React__namespace.createElement("span", { className: css(_default$w.navToggleIcon) },
|
|
15429
15589
|
React__namespace.createElement(AngleRightIcon$1, { "aria-hidden": "true" })))))),
|
|
15430
15590
|
React__namespace.createElement("section", { className: css(_default$w.navSubnav), "aria-labelledby": this.id, hidden: expandedState ? null : true },
|
|
15431
|
-
srText && (React__namespace.createElement("h2", { className: css(_default$
|
|
15591
|
+
srText && (React__namespace.createElement("h2", { className: css(_default$1f.screenReader), id: this.id }, srText)),
|
|
15432
15592
|
React__namespace.createElement("ul", { className: css(_default$w.navList) }, children))))));
|
|
15433
15593
|
}
|
|
15434
15594
|
}
|
|
@@ -15585,7 +15745,7 @@
|
|
|
15585
15745
|
|
|
15586
15746
|
const TextContent = (_a) => {
|
|
15587
15747
|
var { children = null, className = '', isVisited = false } = _a, props = __rest$1(_a, ["children", "className", "isVisited"]);
|
|
15588
|
-
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
15748
|
+
return (React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$1m.content, isVisited && _default$1m.modifiers.visited, className) }), children));
|
|
15589
15749
|
};
|
|
15590
15750
|
TextContent.displayName = 'TextContent';
|
|
15591
15751
|
|
|
@@ -15607,7 +15767,7 @@
|
|
|
15607
15767
|
var { children = null, className = '', component = exports.TextVariants.p, isVisitedLink = false, ouiaId, ouiaSafe = true } = _a, props = __rest$1(_a, ["children", "className", "component", "isVisitedLink", "ouiaId", "ouiaSafe"]);
|
|
15608
15768
|
const Component = component;
|
|
15609
15769
|
const ouiaProps = useOUIAProps(Text.displayName, ouiaId, ouiaSafe);
|
|
15610
|
-
return (React__namespace.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(isVisitedLink && component === exports.TextVariants.a && _default$
|
|
15770
|
+
return (React__namespace.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(isVisitedLink && component === exports.TextVariants.a && _default$1m.modifiers.visited, className) }), children));
|
|
15611
15771
|
};
|
|
15612
15772
|
Text.displayName = 'Text';
|
|
15613
15773
|
|
|
@@ -15708,7 +15868,7 @@
|
|
|
15708
15868
|
}, [titleRef, truncateTitle, isTooltipVisible]);
|
|
15709
15869
|
const Icon = variantIcons$1[variant];
|
|
15710
15870
|
const Title = (React__namespace.createElement("h2", Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css(_default$u.notificationDrawerListItemHeaderTitle, truncateTitle && _default$u.modifiers.truncate) }),
|
|
15711
|
-
srTitle && React__namespace.createElement("span", { className: css(_default$
|
|
15871
|
+
srTitle && React__namespace.createElement("span", { className: css(_default$1f.screenReader) }, srTitle),
|
|
15712
15872
|
title));
|
|
15713
15873
|
return (React__namespace.createElement(React__namespace.Fragment, null,
|
|
15714
15874
|
React__namespace.createElement("div", Object.assign({}, props, { className: css(_default$u.notificationDrawerListItemHeader, className) }),
|
|
@@ -16984,20 +17144,20 @@
|
|
|
16984
17144
|
|
|
16985
17145
|
const Sidebar = (_a) => {
|
|
16986
17146
|
var { className, children, orientation, isPanelRight = false, hasGutter, hasNoBackground } = _a, props = __rest$1(_a, ["className", "children", "orientation", "isPanelRight", "hasGutter", "hasNoBackground"]);
|
|
16987
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
16988
|
-
React__namespace.createElement("div", { className: _default$
|
|
17147
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$G.sidebar, hasGutter && _default$G.modifiers.gutter, hasNoBackground && _default$G.modifiers.noBackground, isPanelRight && _default$G.modifiers.panelRight, _default$G.modifiers[orientation], className) }, props),
|
|
17148
|
+
React__namespace.createElement("div", { className: _default$G.sidebarMain }, children)));
|
|
16989
17149
|
};
|
|
16990
17150
|
Sidebar.displayName = 'Sidebar';
|
|
16991
17151
|
|
|
16992
17152
|
const SidebarContent = (_a) => {
|
|
16993
17153
|
var { className, children, hasNoBackground } = _a, props = __rest$1(_a, ["className", "children", "hasNoBackground"]);
|
|
16994
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
17154
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$G.sidebarContent, hasNoBackground && _default$G.modifiers.noBackground, className) }, props), children));
|
|
16995
17155
|
};
|
|
16996
17156
|
SidebarContent.displayName = 'SidebarContent';
|
|
16997
17157
|
|
|
16998
17158
|
const SidebarPanel = (_a) => {
|
|
16999
17159
|
var { className, children, variant = 'default', hasNoBackground, width } = _a, props = __rest$1(_a, ["className", "children", "variant", "hasNoBackground", "width"]);
|
|
17000
|
-
return (React__namespace.createElement("div", Object.assign({ className: css(_default$
|
|
17160
|
+
return (React__namespace.createElement("div", Object.assign({ className: css(_default$G.sidebarPanel, variant !== 'default' && _default$G.modifiers[variant], hasNoBackground && _default$G.modifiers.noBackground, formatBreakpointMods(width, _default$G), className) }, props), children));
|
|
17001
17161
|
};
|
|
17002
17162
|
SidebarPanel.displayName = 'SidebarPanel';
|
|
17003
17163
|
|
|
@@ -17158,7 +17318,7 @@
|
|
|
17158
17318
|
render() {
|
|
17159
17319
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
17160
17320
|
const _a = this.props, { children, className, href, show, type } = _a, rest = __rest$1(_a, ["children", "className", "href", "show", "type"]);
|
|
17161
|
-
return (React__namespace.createElement("a", Object.assign({}, rest, { className: css(_default$
|
|
17321
|
+
return (React__namespace.createElement("a", Object.assign({}, rest, { className: css(_default$1k.button, _default$1k.modifiers.primary, _default$k.skipToContent, className), ref: this.componentRef, href: href }), children));
|
|
17162
17322
|
}
|
|
17163
17323
|
}
|
|
17164
17324
|
SkipToContent.displayName = 'SkipToContent';
|
|
@@ -17735,8 +17895,8 @@
|
|
|
17735
17895
|
// process any tab content sections outside of the component
|
|
17736
17896
|
if (tabContentRef) {
|
|
17737
17897
|
React__namespace.Children.toArray(this.props.children)
|
|
17738
|
-
.
|
|
17739
|
-
.filter(
|
|
17898
|
+
.map(child => child)
|
|
17899
|
+
.filter(child => child.props && child.props.tabContentRef && child.props.tabContentRef.current)
|
|
17740
17900
|
.forEach(child => (child.props.tabContentRef.current.hidden = true));
|
|
17741
17901
|
// most recently selected tabContent
|
|
17742
17902
|
if (tabContentRef.current) {
|
|
@@ -17779,7 +17939,7 @@
|
|
|
17779
17939
|
const _a = this.props, { className, children, activeKey, defaultActiveKey, id, isFilled, isSecondary, isVertical, isBox, leftScrollAriaLabel, rightScrollAriaLabel, 'aria-label': ariaLabel, component, ouiaId, ouiaSafe, mountOnEnter, unmountOnExit, usePageInsets, inset, variant, expandable, isExpanded, defaultIsExpanded, toggleText, toggleAriaLabel, onToggle } = _a, props = __rest$1(_a, ["className", "children", "activeKey", "defaultActiveKey", "id", "isFilled", "isSecondary", "isVertical", "isBox", "leftScrollAriaLabel", "rightScrollAriaLabel", 'aria-label', "component", "ouiaId", "ouiaSafe", "mountOnEnter", "unmountOnExit", "usePageInsets", "inset", "variant", "expandable", "isExpanded", "defaultIsExpanded", "toggleText", "toggleAriaLabel", "onToggle"]);
|
|
17780
17940
|
const { showScrollButtons, disableLeftScrollButton, disableRightScrollButton, shownKeys, uncontrolledActiveKey, uncontrolledIsExpandedLocal } = this.state;
|
|
17781
17941
|
const filteredChildren = React__namespace.Children.toArray(children)
|
|
17782
|
-
.filter(
|
|
17942
|
+
.filter(Boolean)
|
|
17783
17943
|
.filter(child => !child.props.isHidden);
|
|
17784
17944
|
const uniqueId = id || getUniqueId();
|
|
17785
17945
|
const Component = component === exports.TabsComponent.nav ? 'nav' : 'div';
|
|
@@ -17809,10 +17969,10 @@
|
|
|
17809
17969
|
React__namespace.createElement("span", { className: css(_default$h.tabsToggleIcon) },
|
|
17810
17970
|
React__namespace.createElement(AngleRightIcon$1, { "arian-hidden": "true" })),
|
|
17811
17971
|
toggleText && (React__namespace.createElement("span", { className: css('pf-c-tabs__toggle-text'), id: `${randomId}-text` }, toggleText)))))))),
|
|
17812
|
-
React__namespace.createElement("button", { className: css(_default$h.tabsScrollButton, isSecondary && _default$
|
|
17972
|
+
React__namespace.createElement("button", { className: css(_default$h.tabsScrollButton, isSecondary && _default$1k.modifiers.secondary), "aria-label": leftScrollAriaLabel, onClick: this.scrollLeft, disabled: disableLeftScrollButton, "aria-hidden": disableLeftScrollButton },
|
|
17813
17973
|
React__namespace.createElement(AngleLeftIcon$1, null)),
|
|
17814
17974
|
React__namespace.createElement("ul", { className: css(_default$h.tabsList), ref: this.tabList, onScroll: this.handleScrollButtons }, filteredChildren),
|
|
17815
|
-
React__namespace.createElement("button", { className: css(_default$h.tabsScrollButton, isSecondary && _default$
|
|
17975
|
+
React__namespace.createElement("button", { className: css(_default$h.tabsScrollButton, isSecondary && _default$1k.modifiers.secondary), "aria-label": rightScrollAriaLabel, onClick: this.scrollRight, disabled: disableRightScrollButton, "aria-hidden": disableRightScrollButton },
|
|
17816
17976
|
React__namespace.createElement(AngleRightIcon$1, null))),
|
|
17817
17977
|
filteredChildren
|
|
17818
17978
|
.filter(child => child.props.children &&
|
|
@@ -17882,15 +18042,6 @@
|
|
|
17882
18042
|
};
|
|
17883
18043
|
Tile.displayName = 'Tile';
|
|
17884
18044
|
|
|
17885
|
-
const TimeOption = (_a) => {
|
|
17886
|
-
var { className = '', value = '', onSelect = () => { }, children, id, isFocused } = _a, props = __rest$1(_a, ["className", "value", "onSelect", "children", "id", "isFocused"]);
|
|
17887
|
-
return (React__namespace.createElement("li", Object.assign({ role: "presentation", className: css(_default$13.selectMenuWrapper, isFocused && _default$13.modifiers.focus, className) }, props),
|
|
17888
|
-
React__namespace.createElement("button", { className: css(_default$13.selectMenuItem), onClick: event => {
|
|
17889
|
-
onSelect(value, event);
|
|
17890
|
-
}, role: "option", type: "button", id: id }, children || value.toString())));
|
|
17891
|
-
};
|
|
17892
|
-
TimeOption.displayName = 'TimeOption';
|
|
17893
|
-
|
|
17894
18045
|
const amSuffix = ' AM';
|
|
17895
18046
|
const pmSuffix = ' PM';
|
|
17896
18047
|
const makeTimeOptions = (stepMinutes, hour12, delimiter, minTime, maxTime) => {
|
|
@@ -18048,53 +18199,61 @@
|
|
|
18048
18199
|
this.inputRef = React__namespace.createRef();
|
|
18049
18200
|
this.menuRef = React__namespace.createRef();
|
|
18050
18201
|
this.onDocClick = (event) => {
|
|
18051
|
-
|
|
18052
|
-
const
|
|
18053
|
-
|
|
18054
|
-
this.menuRef.current.contains &&
|
|
18055
|
-
this.menuRef.current.contains(event.target);
|
|
18202
|
+
var _a, _b, _c, _d;
|
|
18203
|
+
const clickedOnToggle = (_b = (_a = this.parentRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.contains(event.target);
|
|
18204
|
+
const clickedWithinMenu = (_d = (_c = this.menuRef) === null || _c === void 0 ? void 0 : _c.current) === null || _d === void 0 ? void 0 : _d.contains(event.target);
|
|
18056
18205
|
if (this.state.isOpen && !(clickedOnToggle || clickedWithinMenu)) {
|
|
18057
18206
|
this.onToggle(false);
|
|
18058
18207
|
}
|
|
18059
18208
|
};
|
|
18060
18209
|
this.handleGlobalKeys = (event) => {
|
|
18061
|
-
|
|
18210
|
+
var _a, _b, _c, _d;
|
|
18211
|
+
const { isOpen, focusedIndex, scrollIndex } = this.state;
|
|
18062
18212
|
// keyboard pressed while focus on toggle
|
|
18063
|
-
if (this.inputRef
|
|
18213
|
+
if ((_b = (_a = this.inputRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.contains(event.target)) {
|
|
18064
18214
|
if (!isOpen && event.key !== KeyTypes.Tab) {
|
|
18065
18215
|
this.onToggle(true);
|
|
18066
18216
|
}
|
|
18067
18217
|
else if (isOpen) {
|
|
18068
|
-
if (event.key === KeyTypes.Escape) {
|
|
18069
|
-
this.onToggle(false);
|
|
18070
|
-
}
|
|
18071
|
-
else if (event.key === KeyTypes.Tab) {
|
|
18218
|
+
if (event.key === KeyTypes.Escape || event.key === KeyTypes.Tab) {
|
|
18072
18219
|
this.onToggle(false);
|
|
18073
18220
|
}
|
|
18074
18221
|
else if (event.key === KeyTypes.Enter) {
|
|
18075
18222
|
if (focusedIndex !== null) {
|
|
18076
|
-
this.
|
|
18223
|
+
this.focusSelection(focusedIndex);
|
|
18077
18224
|
event.stopPropagation();
|
|
18078
18225
|
}
|
|
18079
18226
|
else {
|
|
18080
18227
|
this.onToggle(false);
|
|
18081
18228
|
}
|
|
18082
18229
|
}
|
|
18083
|
-
else if (event.key === KeyTypes.ArrowDown) {
|
|
18084
|
-
this.
|
|
18085
|
-
|
|
18086
|
-
}
|
|
18087
|
-
else if (event.key === KeyTypes.ArrowUp) {
|
|
18088
|
-
this.updateFocusedIndex(-1);
|
|
18230
|
+
else if (event.key === KeyTypes.ArrowDown || event.key === KeyTypes.ArrowUp) {
|
|
18231
|
+
this.focusSelection(scrollIndex);
|
|
18232
|
+
this.updateFocusedIndex(0);
|
|
18089
18233
|
event.preventDefault();
|
|
18090
18234
|
}
|
|
18091
18235
|
}
|
|
18236
|
+
// keyboard pressed while focus on menu item
|
|
18237
|
+
}
|
|
18238
|
+
else if ((_d = (_c = this.menuRef) === null || _c === void 0 ? void 0 : _c.current) === null || _d === void 0 ? void 0 : _d.contains(event.target)) {
|
|
18239
|
+
if (event.key === KeyTypes.ArrowDown) {
|
|
18240
|
+
this.updateFocusedIndex(1);
|
|
18241
|
+
event.preventDefault();
|
|
18242
|
+
}
|
|
18243
|
+
else if (event.key === KeyTypes.ArrowUp) {
|
|
18244
|
+
this.updateFocusedIndex(-1);
|
|
18245
|
+
event.preventDefault();
|
|
18246
|
+
}
|
|
18247
|
+
else if (event.key === KeyTypes.Escape || event.key === KeyTypes.Tab) {
|
|
18248
|
+
this.inputRef.current.focus();
|
|
18249
|
+
this.onToggle(false);
|
|
18250
|
+
}
|
|
18092
18251
|
}
|
|
18093
18252
|
};
|
|
18094
18253
|
this.updateFocusedIndex = (increment) => {
|
|
18095
18254
|
this.setState(prevState => {
|
|
18096
18255
|
const maxIndex = this.getOptions().length - 1;
|
|
18097
|
-
let nextIndex = prevState.focusedIndex !== null ? prevState.focusedIndex + increment : prevState.scrollIndex;
|
|
18256
|
+
let nextIndex = prevState.focusedIndex !== null ? prevState.focusedIndex + increment : prevState.scrollIndex + increment;
|
|
18098
18257
|
if (nextIndex < 0) {
|
|
18099
18258
|
nextIndex = maxIndex;
|
|
18100
18259
|
}
|
|
@@ -18107,8 +18266,22 @@
|
|
|
18107
18266
|
};
|
|
18108
18267
|
});
|
|
18109
18268
|
};
|
|
18269
|
+
// fixes issue where menutAppendTo="inline" results in the menu item that should be scrolled to being out of view; this will select the menu item that comes before the intended one, causing that before-item to be placed out of view instead
|
|
18270
|
+
this.getIndexToScroll = (index) => {
|
|
18271
|
+
if (this.props.menuAppendTo === 'inline') {
|
|
18272
|
+
return index > 0 ? index - 1 : 0;
|
|
18273
|
+
}
|
|
18274
|
+
return index;
|
|
18275
|
+
};
|
|
18110
18276
|
this.scrollToIndex = (index) => {
|
|
18111
|
-
this.getOptions()[index].
|
|
18277
|
+
this.getOptions()[index].closest(`.${_default$z.menuContent}`).scrollTop = this.getOptions()[this.getIndexToScroll(index)].offsetTop;
|
|
18278
|
+
};
|
|
18279
|
+
this.focusSelection = (index) => {
|
|
18280
|
+
var _a;
|
|
18281
|
+
const indexToFocus = index !== -1 ? index : 0;
|
|
18282
|
+
if ((_a = this.menuRef) === null || _a === void 0 ? void 0 : _a.current) {
|
|
18283
|
+
this.getOptions()[indexToFocus].querySelector(`.${_default$z.menuItem}`).focus();
|
|
18284
|
+
}
|
|
18112
18285
|
};
|
|
18113
18286
|
this.scrollToSelection = (time) => {
|
|
18114
18287
|
const { delimiter, is24Hour } = this.props;
|
|
@@ -18118,6 +18291,11 @@
|
|
|
18118
18291
|
if (splitTime.length < 2) {
|
|
18119
18292
|
time = `${time}${delimiter}00`;
|
|
18120
18293
|
splitTime = time.split(delimiter);
|
|
18294
|
+
// due to only the input including seconds when includeSeconds=true, we need to build a temporary time here without those seconds so that an exact or close match can be scrolled to within the menu (which does not include seconds in any of the options)
|
|
18295
|
+
}
|
|
18296
|
+
else if (splitTime.length > 2) {
|
|
18297
|
+
time = parseTime(time, this.state.timeRegex, delimiter, !is24Hour, false);
|
|
18298
|
+
splitTime = time.split(delimiter);
|
|
18121
18299
|
}
|
|
18122
18300
|
// for 12hr variant, autoscroll to pm if it's currently the afternoon, otherwise autoscroll to am
|
|
18123
18301
|
if (!is24Hour && splitTime.length > 1 && splitTime[1].length < 2) {
|
|
@@ -18167,7 +18345,12 @@
|
|
|
18167
18345
|
}
|
|
18168
18346
|
return new RegExp(`^${baseRegex}${is24Hour ? '' : '\\s*([AaPp][Mm])?'}\\s*$`);
|
|
18169
18347
|
};
|
|
18170
|
-
this.getOptions = () =>
|
|
18348
|
+
this.getOptions = () => {
|
|
18349
|
+
var _a;
|
|
18350
|
+
return (((_a = this.menuRef) === null || _a === void 0 ? void 0 : _a.current)
|
|
18351
|
+
? Array.from(this.menuRef.current.querySelectorAll(`.${_default$z.menuListItem}`))
|
|
18352
|
+
: []);
|
|
18353
|
+
};
|
|
18171
18354
|
this.isValidFormat = (time) => {
|
|
18172
18355
|
if (this.props.validateTime) {
|
|
18173
18356
|
return this.props.validateTime(time);
|
|
@@ -18194,13 +18377,14 @@
|
|
|
18194
18377
|
};
|
|
18195
18378
|
});
|
|
18196
18379
|
};
|
|
18197
|
-
this.onSelect = (
|
|
18380
|
+
this.onSelect = (e) => {
|
|
18198
18381
|
const { timeRegex, timeState } = this.state;
|
|
18199
18382
|
const { delimiter, is24Hour, includeSeconds } = this.props;
|
|
18200
|
-
const time = parseTime(
|
|
18383
|
+
const time = parseTime(e.target.textContent, timeRegex, delimiter, !is24Hour, includeSeconds);
|
|
18201
18384
|
if (time !== timeState) {
|
|
18202
18385
|
this.onInputChange(time);
|
|
18203
18386
|
}
|
|
18387
|
+
this.inputRef.current.focus();
|
|
18204
18388
|
this.setState({
|
|
18205
18389
|
isOpen: false
|
|
18206
18390
|
});
|
|
@@ -18281,26 +18465,27 @@
|
|
|
18281
18465
|
}
|
|
18282
18466
|
}
|
|
18283
18467
|
render() {
|
|
18284
|
-
const _a = this.props, { 'aria-label': ariaLabel, isDisabled, className, placeholder, id, menuAppendTo, is24Hour, invalidFormatErrorMessage, invalidMinMaxErrorMessage,
|
|
18468
|
+
const _a = this.props, { 'aria-label': ariaLabel, isDisabled, className, placeholder, id, menuAppendTo, is24Hour, invalidFormatErrorMessage, invalidMinMaxErrorMessage, stepMinutes, width, delimiter, inputProps,
|
|
18285
18469
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
18286
18470
|
onChange, time, validateTime, minTime, maxTime, includeSeconds } = _a,
|
|
18287
18471
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
18288
|
-
props = __rest$1(_a, ['aria-label', "isDisabled", "className", "placeholder", "id", "menuAppendTo", "is24Hour", "invalidFormatErrorMessage", "invalidMinMaxErrorMessage", "
|
|
18289
|
-
const { timeState, isOpen, isInvalid,
|
|
18472
|
+
props = __rest$1(_a, ['aria-label', "isDisabled", "className", "placeholder", "id", "menuAppendTo", "is24Hour", "invalidFormatErrorMessage", "invalidMinMaxErrorMessage", "stepMinutes", "width", "delimiter", "inputProps", "onChange", "time", "validateTime", "minTime", "maxTime", "includeSeconds"]);
|
|
18473
|
+
const { timeState, isOpen, isInvalid, minTimeState, maxTimeState } = this.state;
|
|
18290
18474
|
const style = { '--pf-c-date-picker__input--c-form-control--Width': width };
|
|
18291
18475
|
const options = makeTimeOptions(stepMinutes, !is24Hour, delimiter, minTimeState, maxTimeState);
|
|
18292
18476
|
const isValidFormat = this.isValidFormat(timeState);
|
|
18293
18477
|
const randomId = id || getUniqueId('time-picker');
|
|
18294
|
-
const menuContainer = (React__namespace.createElement(
|
|
18295
|
-
|
|
18296
|
-
|
|
18297
|
-
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18478
|
+
const menuContainer = (React__namespace.createElement(Menu, { ref: this.menuRef, isScrollable: true },
|
|
18479
|
+
React__namespace.createElement(MenuContent, { maxMenuHeight: "200px" },
|
|
18480
|
+
React__namespace.createElement(MenuList, { "aria-labelledby": `${randomId}-input` }, options.map((option, index) => (React__namespace.createElement(MenuItem, { onClick: this.onSelect, key: option, id: `${randomId}-option-${index}` }, option)))))));
|
|
18481
|
+
const textInput = (React__namespace.createElement(TextInput, Object.assign({ className: css(_default$1b.formControl), id: `${randomId}-input`, "aria-label": ariaLabel, validated: isInvalid ? 'error' : 'default', placeholder: placeholder, value: timeState || '', type: "text", iconVariant: "clock", onClick: this.onInputFocus, onFocus: this.onInputFocus, onChange: this.onInputChange, onBlur: this.onBlur, autoComplete: "off", isDisabled: isDisabled, ref: this.inputRef }, inputProps)));
|
|
18482
|
+
return (React__namespace.createElement("div", { className: css(_default$R.datePicker, className) },
|
|
18483
|
+
React__namespace.createElement("div", Object.assign({ className: css(_default$R.datePickerInput), style: style }, props),
|
|
18484
|
+
React__namespace.createElement(InputGroup, null,
|
|
18485
|
+
React__namespace.createElement("div", { id: randomId, ref: this.parentRef },
|
|
18486
|
+
React__namespace.createElement("div", { ref: this.toggleRef, style: { paddingLeft: '0' } }, menuAppendTo !== 'inline' ? (React__namespace.createElement(Popper, { appendTo: this.parentRef.current, trigger: textInput, popper: menuContainer, isVisible: isOpen })) : (textInput)),
|
|
18487
|
+
isOpen && menuAppendTo === 'inline' && menuContainer)),
|
|
18488
|
+
isInvalid && (React__namespace.createElement("div", { className: css(_default$R.datePickerHelperText, _default$R.modifiers.error) }, !isValidFormat ? invalidFormatErrorMessage : invalidMinMaxErrorMessage)))));
|
|
18304
18489
|
}
|
|
18305
18490
|
}
|
|
18306
18491
|
TimePicker.displayName = 'TimePicker';
|
|
@@ -18314,15 +18499,22 @@
|
|
|
18314
18499
|
placeholder: 'hh:mm',
|
|
18315
18500
|
delimiter: ':',
|
|
18316
18501
|
'aria-label': 'Time picker',
|
|
18317
|
-
|
|
18318
|
-
direction: 'down',
|
|
18319
|
-
width: 150,
|
|
18502
|
+
width: '150px',
|
|
18320
18503
|
stepMinutes: 30,
|
|
18321
18504
|
inputProps: {},
|
|
18322
18505
|
minTime: '',
|
|
18323
18506
|
maxTime: ''
|
|
18324
18507
|
};
|
|
18325
18508
|
|
|
18509
|
+
const TimeOption = (_a) => {
|
|
18510
|
+
var { className = '', value = '', onSelect = () => { }, children, id, isFocused } = _a, props = __rest$1(_a, ["className", "value", "onSelect", "children", "id", "isFocused"]);
|
|
18511
|
+
return (React__namespace.createElement("li", Object.assign({ role: "presentation", className: css(_default$12.selectMenuWrapper, isFocused && _default$12.modifiers.focus, className) }, props),
|
|
18512
|
+
React__namespace.createElement("button", { className: css(_default$12.selectMenuItem), onClick: event => {
|
|
18513
|
+
onSelect(value, event);
|
|
18514
|
+
}, role: "option", type: "button", id: id }, children || value.toString())));
|
|
18515
|
+
};
|
|
18516
|
+
TimeOption.displayName = 'TimeOption';
|
|
18517
|
+
|
|
18326
18518
|
var _default$e = {
|
|
18327
18519
|
"modifiers": {
|
|
18328
18520
|
"compact": "pf-m-compact",
|
|
@@ -19189,7 +19381,7 @@
|
|
|
19189
19381
|
const TreeViewSearch = (_a) => {
|
|
19190
19382
|
var { className, onSearch, id, name, 'aria-label': ariaLabel } = _a, props = __rest$1(_a, ["className", "onSearch", "id", "name", 'aria-label']);
|
|
19191
19383
|
return (React__namespace.createElement("div", { className: css(_default$b.treeViewSearch, className) },
|
|
19192
|
-
React__namespace.createElement("input", Object.assign({ className: css(_default$
|
|
19384
|
+
React__namespace.createElement("input", Object.assign({ className: css(_default$1b.formControl, _default$1b.modifiers.search), onChange: onSearch, id: id, name: name, "aria-label": ariaLabel, type: "search" }, props))));
|
|
19193
19385
|
};
|
|
19194
19386
|
TreeViewSearch.displayName = 'TreeViewSearch';
|
|
19195
19387
|
|
|
@@ -20009,7 +20201,7 @@
|
|
|
20009
20201
|
const Bullseye = (_a) => {
|
|
20010
20202
|
var { children = null, className = '', component = 'div' } = _a, props = __rest$1(_a, ["children", "className", "component"]);
|
|
20011
20203
|
const Component = component;
|
|
20012
|
-
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$
|
|
20204
|
+
return (React__namespace.createElement(Component, Object.assign({ className: css(_default$1o.bullseye, className) }, props), children));
|
|
20013
20205
|
};
|
|
20014
20206
|
Bullseye.displayName = 'Bullseye';
|
|
20015
20207
|
|
|
@@ -21129,6 +21321,7 @@
|
|
|
21129
21321
|
exports.Select = Select;
|
|
21130
21322
|
exports.SelectConsumer = SelectConsumer;
|
|
21131
21323
|
exports.SelectContext = SelectContext;
|
|
21324
|
+
exports.SelectFooterTabbableItems = SelectFooterTabbableItems;
|
|
21132
21325
|
exports.SelectGroup = SelectGroup;
|
|
21133
21326
|
exports.SelectOption = SelectOption;
|
|
21134
21327
|
exports.SelectProvider = SelectProvider;
|
|
@@ -21204,6 +21397,7 @@
|
|
|
21204
21397
|
exports.clipboardCopyFunc = clipboardCopyFunc;
|
|
21205
21398
|
exports.debounce = debounce$1;
|
|
21206
21399
|
exports.fillTemplate = fillTemplate;
|
|
21400
|
+
exports.findTabbableElements = findTabbableElements;
|
|
21207
21401
|
exports.formatBreakpointMods = formatBreakpointMods;
|
|
21208
21402
|
exports.getBreakpoint = getBreakpoint;
|
|
21209
21403
|
exports.getDefaultOUIAId = getDefaultOUIAId;
|