@patternfly/quickstarts 1.2.1 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -1
- package/dist/QuickStartDrawer.d.ts +1 -0
- package/dist/catalog/QuickStartTileFooterExternal.d.ts +1 -0
- package/dist/catalog/QuickStartTileHeader.d.ts +1 -0
- package/dist/controller/QuickStartConclusion.d.ts +1 -1
- package/dist/controller/QuickStartIntroduction.d.ts +2 -0
- package/dist/index.es.js +114 -65
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +113 -64
- package/dist/index.js.map +1 -1
- package/dist/patternfly-global.css +1189 -0
- package/dist/patternfly-nested.css +7233 -0
- package/dist/quickstarts-base.css +142 -21
- package/dist/quickstarts-full.es.js +384 -259
- package/dist/quickstarts-full.es.js.map +1 -1
- package/dist/quickstarts-standalone.css +622 -0
- package/dist/quickstarts-standalone.min.css +4 -0
- package/dist/quickstarts.css +142 -21
- package/dist/quickstarts.min.css +1 -1
- package/dist/styles/patternfly-global-entry.d.ts +1 -0
- package/dist/styles/patternfly-nested-entry.d.ts +1 -0
- package/dist/styles/quickstarts-standalone-entry.d.ts +1 -0
- package/dist/utils/quick-start-context.d.ts +3 -0
- package/dist/utils/quick-start-types.d.ts +2 -1
- package/package.json +6 -4
|
@@ -86,7 +86,7 @@ function createCommonjsModule(fn) {
|
|
|
86
86
|
return fn(module, module.exports), module.exports;
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
-
var _default$
|
|
89
|
+
var _default$w = {
|
|
90
90
|
"backdrop": "pf-c-backdrop",
|
|
91
91
|
"backdropOpen": "pf-c-backdrop__open"
|
|
92
92
|
};
|
|
@@ -3084,11 +3084,11 @@ const Popper = ({ trigger, popper, popperMatchesTriggerWidth = true, direction =
|
|
|
3084
3084
|
};
|
|
3085
3085
|
Popper.displayName = 'Popper';
|
|
3086
3086
|
|
|
3087
|
-
var _default$
|
|
3087
|
+
var _default$v = {
|
|
3088
3088
|
"bullseye": "pf-l-bullseye"
|
|
3089
3089
|
};
|
|
3090
3090
|
|
|
3091
|
-
var _default$
|
|
3091
|
+
var _default$u = {
|
|
3092
3092
|
"content": "pf-c-content",
|
|
3093
3093
|
"modifiers": {
|
|
3094
3094
|
"visited": "pf-m-visited",
|
|
@@ -3096,7 +3096,7 @@ var _default$t = {
|
|
|
3096
3096
|
}
|
|
3097
3097
|
};
|
|
3098
3098
|
|
|
3099
|
-
var _default$
|
|
3099
|
+
var _default$t = {
|
|
3100
3100
|
"modifiers": {
|
|
3101
3101
|
"4xl": "pf-m-4xl",
|
|
3102
3102
|
"3xl": "pf-m-3xl",
|
|
@@ -3130,11 +3130,11 @@ var headingLevelSizeMap;
|
|
|
3130
3130
|
const Title = (_a) => {
|
|
3131
3131
|
var { className = '', children = '', headingLevel: HeadingLevel, size = headingLevelSizeMap[HeadingLevel], ouiaId, ouiaSafe = true } = _a, props = __rest$2(_a, ["className", "children", "headingLevel", "size", "ouiaId", "ouiaSafe"]);
|
|
3132
3132
|
const ouiaProps = useOUIAProps$1(Title.displayName, ouiaId, ouiaSafe);
|
|
3133
|
-
return (React.createElement(HeadingLevel, Object.assign({}, ouiaProps, props, { className: css(_default$
|
|
3133
|
+
return (React.createElement(HeadingLevel, Object.assign({}, ouiaProps, props, { className: css(_default$t.title, size && _default$t.modifiers[size], className) }), children));
|
|
3134
3134
|
};
|
|
3135
3135
|
Title.displayName = 'Title';
|
|
3136
3136
|
|
|
3137
|
-
var _default$
|
|
3137
|
+
var _default$s = {
|
|
3138
3138
|
"button": "pf-c-button",
|
|
3139
3139
|
"buttonIcon": "pf-c-button__icon",
|
|
3140
3140
|
"buttonProgress": "pf-c-button__progress",
|
|
@@ -3164,7 +3164,7 @@ var _default$r = {
|
|
|
3164
3164
|
"spinner": "pf-c-spinner"
|
|
3165
3165
|
};
|
|
3166
3166
|
|
|
3167
|
-
var _default$
|
|
3167
|
+
var _default$r = {
|
|
3168
3168
|
"modifiers": {
|
|
3169
3169
|
"sm": "pf-m-sm",
|
|
3170
3170
|
"md": "pf-m-md",
|
|
@@ -3190,10 +3190,10 @@ const Spinner$1 = (_a) => {
|
|
|
3190
3190
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
3191
3191
|
className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', isSVG = false, diameter } = _a, props = __rest$2(_a, ["className", "size", 'aria-valuetext', "isSVG", "diameter"]);
|
|
3192
3192
|
const Component = isSVG ? 'svg' : 'span';
|
|
3193
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
3194
|
-
React.createElement("span", { className: css(_default$
|
|
3195
|
-
React.createElement("span", { className: css(_default$
|
|
3196
|
-
React.createElement("span", { className: css(_default$
|
|
3193
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$r.spinner, _default$r.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText }, (isSVG && { viewBox: '0 0 100 100' }), (diameter && { style: { '--pf-c-spinner--diameter': diameter } }), props), isSVG ? (React.createElement("circle", { className: _default$r.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" })) : (React.createElement(React.Fragment, null,
|
|
3194
|
+
React.createElement("span", { className: css(_default$r.spinnerClipper) }),
|
|
3195
|
+
React.createElement("span", { className: css(_default$r.spinnerLeadBall) }),
|
|
3196
|
+
React.createElement("span", { className: css(_default$r.spinnerTailBall) })))));
|
|
3197
3197
|
};
|
|
3198
3198
|
Spinner$1.displayName = 'Spinner';
|
|
3199
3199
|
|
|
@@ -3234,12 +3234,12 @@ const ButtonBase$1 = (_a) => {
|
|
|
3234
3234
|
return 0;
|
|
3235
3235
|
}
|
|
3236
3236
|
};
|
|
3237
|
-
return (React.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(_default$
|
|
3238
|
-
isLoading && (React.createElement("span", { className: css(_default$
|
|
3237
|
+
return (React.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(_default$s.button, _default$s.modifiers[variant], isBlock && _default$s.modifiers.block, isDisabled && _default$s.modifiers.disabled, isAriaDisabled && _default$s.modifiers.ariaDisabled, isActive && _default$s.modifiers.active, isInline && variant === ButtonVariant$1.link && _default$s.modifiers.inline, isDanger && (variant === ButtonVariant$1.secondary || variant === ButtonVariant$1.link) && _default$s.modifiers.danger, isLoading !== null && _default$s.modifiers.progress, isLoading && _default$s.modifiers.inProgress, isSmall && _default$s.modifiers.small, isLarge && _default$s.modifiers.displayLg, className), disabled: isButtonElement ? isDisabled : null, tabIndex: tabIndex !== null ? tabIndex : getDefaultTabIdx(), type: isButtonElement || isInlineSpan ? type : null, role: isInlineSpan ? 'button' : null, ref: innerRef }, ouiaProps),
|
|
3238
|
+
isLoading && (React.createElement("span", { className: css(_default$s.buttonProgress) },
|
|
3239
3239
|
React.createElement(Spinner$1, { size: spinnerSize$1.md, "aria-valuetext": spinnerAriaValueText }))),
|
|
3240
|
-
variant !== ButtonVariant$1.plain && icon && iconPosition === 'left' && (React.createElement("span", { className: css(_default$
|
|
3240
|
+
variant !== ButtonVariant$1.plain && icon && iconPosition === 'left' && (React.createElement("span", { className: css(_default$s.buttonIcon, _default$s.modifiers.start) }, icon)),
|
|
3241
3241
|
children,
|
|
3242
|
-
variant !== ButtonVariant$1.plain && icon && iconPosition === 'right' && (React.createElement("span", { className: css(_default$
|
|
3242
|
+
variant !== ButtonVariant$1.plain && icon && iconPosition === 'right' && (React.createElement("span", { className: css(_default$s.buttonIcon, _default$s.modifiers.end) }, icon))));
|
|
3243
3243
|
};
|
|
3244
3244
|
const Button$1 = React.forwardRef((props, ref) => (React.createElement(ButtonBase$1, Object.assign({ innerRef: ref }, props))));
|
|
3245
3245
|
Button$1.displayName = 'Button';
|
|
@@ -3577,7 +3577,7 @@ const TimesIcon = createIcon(TimesIconConfig);
|
|
|
3577
3577
|
|
|
3578
3578
|
const Backdrop = (_a) => {
|
|
3579
3579
|
var { children = null, className = '' } = _a, props = __rest$2(_a, ["children", "className"]);
|
|
3580
|
-
return (React.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
3580
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(_default$w.backdrop, className) }), children));
|
|
3581
3581
|
};
|
|
3582
3582
|
Backdrop.displayName = 'Backdrop';
|
|
3583
3583
|
|
|
@@ -3592,7 +3592,7 @@ const AngleRightIconConfig = {
|
|
|
3592
3592
|
|
|
3593
3593
|
const AngleRightIcon = createIcon(AngleRightIconConfig);
|
|
3594
3594
|
|
|
3595
|
-
var _default$
|
|
3595
|
+
var _default$q = {
|
|
3596
3596
|
"alert": "pf-c-alert",
|
|
3597
3597
|
"alertAction": "pf-c-alert__action",
|
|
3598
3598
|
"alertActionGroup": "pf-c-alert__action-group",
|
|
@@ -3611,7 +3611,7 @@ var _default$p = {
|
|
|
3611
3611
|
}
|
|
3612
3612
|
};
|
|
3613
3613
|
|
|
3614
|
-
var _default$
|
|
3614
|
+
var _default$p = {
|
|
3615
3615
|
"hidden": "pf-u-hidden",
|
|
3616
3616
|
"hiddenOnLg": "pf-u-hidden-on-lg",
|
|
3617
3617
|
"hiddenOnMd": "pf-u-hidden-on-md",
|
|
@@ -3697,7 +3697,7 @@ const variantIcons = {
|
|
|
3697
3697
|
const AlertIcon = (_a) => {
|
|
3698
3698
|
var { variant, customIcon, className = '' } = _a, props = __rest$2(_a, ["variant", "customIcon", "className"]);
|
|
3699
3699
|
const Icon = variantIcons[variant];
|
|
3700
|
-
return (React.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
3700
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(_default$q.alertIcon, className) }), customIcon || React.createElement(Icon, null)));
|
|
3701
3701
|
};
|
|
3702
3702
|
|
|
3703
3703
|
const AlertContext = React.createContext(null);
|
|
@@ -3708,7 +3708,7 @@ const c_alert__title_max_lines = {
|
|
|
3708
3708
|
"var": "var(--pf-c-alert__title--max-lines)"
|
|
3709
3709
|
};
|
|
3710
3710
|
|
|
3711
|
-
var _default$
|
|
3711
|
+
var _default$o = {
|
|
3712
3712
|
"modifiers": {
|
|
3713
3713
|
"top": "pf-m-top",
|
|
3714
3714
|
"bottom": "pf-m-bottom",
|
|
@@ -3723,13 +3723,13 @@ var _default$n = {
|
|
|
3723
3723
|
|
|
3724
3724
|
const TooltipContent = (_a) => {
|
|
3725
3725
|
var { className, children, isLeftAligned } = _a, props = __rest$2(_a, ["className", "children", "isLeftAligned"]);
|
|
3726
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
3726
|
+
return (React.createElement("div", Object.assign({ className: css(_default$o.tooltipContent, isLeftAligned && _default$o.modifiers.textAlignLeft, className) }, props), children));
|
|
3727
3727
|
};
|
|
3728
3728
|
TooltipContent.displayName = 'TooltipContent';
|
|
3729
3729
|
|
|
3730
3730
|
const TooltipArrow = (_a) => {
|
|
3731
3731
|
var { className } = _a, props = __rest$2(_a, ["className"]);
|
|
3732
|
-
return React.createElement("div", Object.assign({ className: css(_default$
|
|
3732
|
+
return React.createElement("div", Object.assign({ className: css(_default$o.tooltipArrow, className) }, props));
|
|
3733
3733
|
};
|
|
3734
3734
|
TooltipArrow.displayName = 'TooltipArrow';
|
|
3735
3735
|
|
|
@@ -3820,13 +3820,13 @@ const Tooltip = (_a) => {
|
|
|
3820
3820
|
}, exitDelay);
|
|
3821
3821
|
};
|
|
3822
3822
|
const positionModifiers = {
|
|
3823
|
-
top: _default$
|
|
3824
|
-
bottom: _default$
|
|
3825
|
-
left: _default$
|
|
3826
|
-
right: _default$
|
|
3823
|
+
top: _default$o.modifiers.top,
|
|
3824
|
+
bottom: _default$o.modifiers.bottom,
|
|
3825
|
+
left: _default$o.modifiers.left,
|
|
3826
|
+
right: _default$o.modifiers.right
|
|
3827
3827
|
};
|
|
3828
3828
|
const hasCustomMaxWidth = maxWidth !== c_tooltip_MaxWidth.value;
|
|
3829
|
-
const content = (React.createElement("div", Object.assign({ className: css(_default$
|
|
3829
|
+
const content = (React.createElement("div", Object.assign({ className: css(_default$o.tooltip, className), role: "tooltip", id: id, style: {
|
|
3830
3830
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
3831
3831
|
opacity,
|
|
3832
3832
|
transition: getOpacityTransition(animationDuration)
|
|
@@ -3871,7 +3871,7 @@ const Alert = (_a) => {
|
|
|
3871
3871
|
var { variant = AlertVariant.default, isInline = false, isLiveRegion = false, variantLabel = `${capitalize(variant)} alert:`, 'aria-label': ariaLabel = `${capitalize(variant)} Alert`, actionClose, actionLinks, title, children = '', className = '', ouiaId, ouiaSafe = true, timeout = false, timeoutAnimation = 3000, onTimeout = () => { }, truncateTitle = 0, tooltipPosition, customIcon, onMouseEnter = () => { }, onMouseLeave = () => { } } = _a, props = __rest$2(_a, ["variant", "isInline", "isLiveRegion", "variantLabel", 'aria-label', "actionClose", "actionLinks", "title", "children", "className", "ouiaId", "ouiaSafe", "timeout", "timeoutAnimation", "onTimeout", "truncateTitle", "tooltipPosition", "customIcon", "onMouseEnter", "onMouseLeave"]);
|
|
3872
3872
|
const ouiaProps = useOUIAProps$1(Alert.displayName, ouiaId, ouiaSafe, variant);
|
|
3873
3873
|
const getHeadingContent = (React.createElement(React.Fragment, null,
|
|
3874
|
-
React.createElement("span", { className: css(_default$
|
|
3874
|
+
React.createElement("span", { className: css(_default$p.screenReader) }, variantLabel),
|
|
3875
3875
|
title));
|
|
3876
3876
|
const titleRef = React.useRef(null);
|
|
3877
3877
|
const divRef = React.useRef();
|
|
@@ -3934,21 +3934,21 @@ const Alert = (_a) => {
|
|
|
3934
3934
|
if (dismissed) {
|
|
3935
3935
|
return null;
|
|
3936
3936
|
}
|
|
3937
|
-
const Title = (React.createElement("h4", Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css(_default$
|
|
3938
|
-
return (React.createElement("div", Object.assign({ ref: divRef, className: css(_default$
|
|
3937
|
+
const Title = (React.createElement("h4", Object.assign({}, (isTooltipVisible && { tabIndex: 0 }), { ref: titleRef, className: css(_default$q.alertTitle, truncateTitle && _default$q.modifiers.truncate) }), getHeadingContent));
|
|
3938
|
+
return (React.createElement("div", Object.assign({ ref: divRef, className: css(_default$q.alert, isInline && _default$q.modifiers.inline, _default$q.modifiers[variant], className), "aria-label": ariaLabel }, ouiaProps, (isLiveRegion && {
|
|
3939
3939
|
'aria-live': 'polite',
|
|
3940
3940
|
'aria-atomic': 'false'
|
|
3941
3941
|
}), { onMouseEnter: myOnMouseEnter, onMouseLeave: myOnMouseLeave }, props),
|
|
3942
3942
|
React.createElement(AlertIcon, { variant: variant, customIcon: customIcon }),
|
|
3943
3943
|
isTooltipVisible ? (React.createElement(Tooltip, { content: getHeadingContent, position: tooltipPosition }, Title)) : (Title),
|
|
3944
3944
|
actionClose && (React.createElement(AlertContext.Provider, { value: { title, variantLabel } },
|
|
3945
|
-
React.createElement("div", { className: css(_default$
|
|
3946
|
-
children && React.createElement("div", { className: css(_default$
|
|
3947
|
-
actionLinks && React.createElement("div", { className: css(_default$
|
|
3945
|
+
React.createElement("div", { className: css(_default$q.alertAction) }, actionClose))),
|
|
3946
|
+
children && React.createElement("div", { className: css(_default$q.alertDescription) }, children),
|
|
3947
|
+
actionLinks && React.createElement("div", { className: css(_default$q.alertActionGroup) }, actionLinks)));
|
|
3948
3948
|
};
|
|
3949
3949
|
Alert.displayName = 'Alert';
|
|
3950
3950
|
|
|
3951
|
-
var _default$
|
|
3951
|
+
var _default$n = {
|
|
3952
3952
|
"formControl": "pf-c-form-control",
|
|
3953
3953
|
"modifiers": {
|
|
3954
3954
|
"success": "pf-m-success",
|
|
@@ -3964,7 +3964,7 @@ var _default$m = {
|
|
|
3964
3964
|
}
|
|
3965
3965
|
};
|
|
3966
3966
|
|
|
3967
|
-
var _default$
|
|
3967
|
+
var _default$m = {
|
|
3968
3968
|
"badge": "pf-c-badge",
|
|
3969
3969
|
"check": "pf-c-check",
|
|
3970
3970
|
"divider": "pf-c-divider",
|
|
@@ -4111,7 +4111,7 @@ class InternalDropdownItem extends React.Component {
|
|
|
4111
4111
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4112
4112
|
const _a = this.props, { className, children, isHovered, context, onClick, component, role, isDisabled, isPlainText, index, href, tooltip, tooltipProps, id, componentID, listItemClassName, additionalChild, customChild, enterTriggersArrowDown, icon, autoFocus, styleChildren, description, inoperableEvents } = _a, additionalProps = __rest$2(_a, ["className", "children", "isHovered", "context", "onClick", "component", "role", "isDisabled", "isPlainText", "index", "href", "tooltip", "tooltipProps", "id", "componentID", "listItemClassName", "additionalChild", "customChild", "enterTriggersArrowDown", "icon", "autoFocus", "styleChildren", "description", "inoperableEvents"]);
|
|
4113
4113
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
4114
|
-
let classes = css(icon && _default$
|
|
4114
|
+
let classes = css(icon && _default$m.modifiers.icon, className);
|
|
4115
4115
|
if (component === 'a') {
|
|
4116
4116
|
additionalProps['aria-disabled'] = isDisabled;
|
|
4117
4117
|
}
|
|
@@ -4126,17 +4126,17 @@ class InternalDropdownItem extends React.Component {
|
|
|
4126
4126
|
const renderDefaultComponent = (tag) => {
|
|
4127
4127
|
const Component = tag;
|
|
4128
4128
|
const componentContent = description ? (React.createElement(React.Fragment, null,
|
|
4129
|
-
React.createElement("div", { className: _default$
|
|
4130
|
-
icon && React.createElement("span", { className: css(_default$
|
|
4129
|
+
React.createElement("div", { className: _default$m.dropdownMenuItemMain },
|
|
4130
|
+
icon && React.createElement("span", { className: css(_default$m.dropdownMenuItemIcon) }, icon),
|
|
4131
4131
|
children),
|
|
4132
|
-
React.createElement("div", { className: _default$
|
|
4133
|
-
icon && React.createElement("span", { className: css(_default$
|
|
4132
|
+
React.createElement("div", { className: _default$m.dropdownMenuItemDescription }, description))) : (React.createElement(React.Fragment, null,
|
|
4133
|
+
icon && React.createElement("span", { className: css(_default$m.dropdownMenuItemIcon) }, icon),
|
|
4134
4134
|
children));
|
|
4135
4135
|
return (React.createElement(Component, Object.assign({}, additionalProps, (isDisabled ? preventedEvents(inoperableEvents) : null), { href: href, ref: this.ref, className: classes, id: componentID }), componentContent));
|
|
4136
4136
|
};
|
|
4137
4137
|
return (React.createElement(DropdownContext.Consumer, null, ({ onSelect, itemClass, disabledClass, plainTextClass }) => {
|
|
4138
4138
|
if (this.props.role !== 'separator') {
|
|
4139
|
-
classes = css(classes, isDisabled && disabledClass, isPlainText && plainTextClass, itemClass, description && _default$
|
|
4139
|
+
classes = css(classes, isDisabled && disabledClass, isPlainText && plainTextClass, itemClass, description && _default$m.modifiers.description);
|
|
4140
4140
|
}
|
|
4141
4141
|
if (customChild) {
|
|
4142
4142
|
return React.cloneElement(customChild, {
|
|
@@ -4180,7 +4180,7 @@ InternalDropdownItem.defaultProps = {
|
|
|
4180
4180
|
inoperableEvents: ['onClick', 'onKeyPress']
|
|
4181
4181
|
};
|
|
4182
4182
|
|
|
4183
|
-
var _default$
|
|
4183
|
+
var _default$l = {
|
|
4184
4184
|
"divider": "pf-c-divider",
|
|
4185
4185
|
"modifiers": {
|
|
4186
4186
|
"vertical": "pf-m-vertical",
|
|
@@ -4244,7 +4244,7 @@ var DividerVariant;
|
|
|
4244
4244
|
const Divider = (_a) => {
|
|
4245
4245
|
var { className, component = DividerVariant.hr, isVertical = false, inset } = _a, props = __rest$2(_a, ["className", "component", "isVertical", "inset"]);
|
|
4246
4246
|
const Component = component;
|
|
4247
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
4247
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$l.divider, isVertical && _default$l.modifiers.vertical, formatBreakpointMods(inset, _default$l), className) }, (component !== 'hr' && { role: 'separator' }), props)));
|
|
4248
4248
|
};
|
|
4249
4249
|
Divider.displayName = 'Divider';
|
|
4250
4250
|
|
|
@@ -4269,7 +4269,7 @@ const CaretDownIconConfig = {
|
|
|
4269
4269
|
|
|
4270
4270
|
const CaretDownIcon = createIcon(CaretDownIconConfig);
|
|
4271
4271
|
|
|
4272
|
-
var _default$
|
|
4272
|
+
var _default$k = {
|
|
4273
4273
|
"badge": "pf-c-badge",
|
|
4274
4274
|
"modifiers": {
|
|
4275
4275
|
"read": "pf-m-read",
|
|
@@ -4279,7 +4279,7 @@ var _default$j = {
|
|
|
4279
4279
|
|
|
4280
4280
|
const Badge = (_a) => {
|
|
4281
4281
|
var { isRead = false, className = '', children = '' } = _a, props = __rest$2(_a, ["isRead", "className", "children"]);
|
|
4282
|
-
return (React.createElement("span", Object.assign({}, props, { className: css(_default$
|
|
4282
|
+
return (React.createElement("span", Object.assign({}, props, { className: css(_default$k.badge, (isRead ? _default$k.modifiers.read : _default$k.modifiers.unread), className) }), children));
|
|
4283
4283
|
};
|
|
4284
4284
|
Badge.displayName = 'Badge';
|
|
4285
4285
|
|
|
@@ -4444,7 +4444,7 @@ class TextInputBase extends React.Component {
|
|
|
4444
4444
|
if (customIconDimensions) {
|
|
4445
4445
|
customIconStyle.backgroundSize = customIconDimensions;
|
|
4446
4446
|
}
|
|
4447
|
-
return (React.createElement("input", Object.assign({}, props, { onFocus: this.onFocus, onBlur: this.onBlur, className: css(_default$
|
|
4447
|
+
return (React.createElement("input", Object.assign({}, props, { onFocus: this.onFocus, onBlur: this.onBlur, className: css(_default$n.formControl, validated === ValidatedOptions.success && _default$n.modifiers.success, validated === ValidatedOptions.warning && _default$n.modifiers.warning, ((iconVariant && iconVariant !== 'search') || customIconUrl) && _default$n.modifiers.icon, iconVariant && _default$n.modifiers[iconVariant], className), onChange: this.handleChange, type: type, value: value, "aria-invalid": validated === ValidatedOptions.error, required: isRequired, disabled: isDisabled, readOnly: isReadOnly, ref: innerRef || this.inputRef }, ((customIconUrl || customIconDimensions) && { style: customIconStyle }))));
|
|
4448
4448
|
}
|
|
4449
4449
|
}
|
|
4450
4450
|
TextInputBase.displayName = 'TextInputBase';
|
|
@@ -4462,7 +4462,7 @@ TextInputBase.defaultProps = {
|
|
|
4462
4462
|
const TextInput = React.forwardRef((props, ref) => (React.createElement(TextInputBase, Object.assign({}, props, { innerRef: ref }))));
|
|
4463
4463
|
TextInput.displayName = 'TextInput';
|
|
4464
4464
|
|
|
4465
|
-
var _default$
|
|
4465
|
+
var _default$j = {
|
|
4466
4466
|
"check": "pf-c-check",
|
|
4467
4467
|
"checkLabel": "pf-c-check__label",
|
|
4468
4468
|
"chipGroup": "pf-c-chip-group",
|
|
@@ -4530,7 +4530,7 @@ const TimesCircleIconConfig = {
|
|
|
4530
4530
|
|
|
4531
4531
|
const TimesCircleIcon = createIcon(TimesCircleIconConfig);
|
|
4532
4532
|
|
|
4533
|
-
var _default$
|
|
4533
|
+
var _default$i = {
|
|
4534
4534
|
"form": "pf-c-form",
|
|
4535
4535
|
"formActions": "pf-c-form__actions",
|
|
4536
4536
|
"formFieldGroup": "pf-c-form__field-group",
|
|
@@ -4577,7 +4577,7 @@ var _default$h = {
|
|
|
4577
4577
|
}
|
|
4578
4578
|
};
|
|
4579
4579
|
|
|
4580
|
-
var _default$
|
|
4580
|
+
var _default$h = {
|
|
4581
4581
|
"check": "pf-c-check",
|
|
4582
4582
|
"checkBody": "pf-c-check__body",
|
|
4583
4583
|
"checkDescription": "pf-c-check__description",
|
|
@@ -4688,21 +4688,21 @@ class SelectOption extends React.Component {
|
|
|
4688
4688
|
console.error('Please provide an id to use the favorites feature.');
|
|
4689
4689
|
}
|
|
4690
4690
|
const generatedId = id || getUniqueId('select-option');
|
|
4691
|
-
const favoriteButton = (onFavorite) => (React.createElement("button", { className: css(_default$
|
|
4691
|
+
const favoriteButton = (onFavorite) => (React.createElement("button", { className: css(_default$j.selectMenuItem, _default$j.modifiers.action, _default$j.modifiers.favoriteAction), "aria-label": isFavorite ? ariaIsFavoriteLabel : ariaIsNotFavoriteLabel, onClick: () => {
|
|
4692
4692
|
onFavorite(generatedId.replace('favorite-', ''), isFavorite);
|
|
4693
4693
|
}, onKeyDown: event => {
|
|
4694
4694
|
this.onKeyDown(event, 1, () => onFavorite(generatedId.replace('favorite-', '')));
|
|
4695
4695
|
}, ref: this.favoriteRef },
|
|
4696
|
-
React.createElement("span", { className: css(_default$
|
|
4696
|
+
React.createElement("span", { className: css(_default$j.selectMenuItemActionIcon) },
|
|
4697
4697
|
React.createElement(StarIcon, null))));
|
|
4698
|
-
const itemDisplay = itemCount ? (React.createElement("span", { className: css(_default$
|
|
4699
|
-
React.createElement("span", { className: css(_default$
|
|
4700
|
-
React.createElement("span", { className: css(_default$
|
|
4698
|
+
const itemDisplay = itemCount ? (React.createElement("span", { className: css(_default$j.selectMenuItemRow) },
|
|
4699
|
+
React.createElement("span", { className: css(_default$j.selectMenuItemText) }, children || (value && value.toString && value.toString())),
|
|
4700
|
+
React.createElement("span", { className: css(_default$j.selectMenuItemCount) }, itemCount))) : (children || value.toString());
|
|
4701
4701
|
return (React.createElement(SelectConsumer, null, ({ onSelect, onClose, variant, inputIdPrefix, onFavorite }) => (React.createElement(React.Fragment, null,
|
|
4702
|
-
variant !== SelectVariant.checkbox && (React.createElement("li", { id: generatedId, role: "presentation", className: css(isLoading && _default$
|
|
4702
|
+
variant !== SelectVariant.checkbox && (React.createElement("li", { id: generatedId, role: "presentation", className: css(isLoading && _default$j.selectListItem, !isLoad && !isLoading && _default$j.selectMenuWrapper, isFavorite && _default$j.modifiers.favorite, isFocused && _default$j.modifiers.focus, isLoading && _default$j.modifiers.loading), ref: this.liRef },
|
|
4703
4703
|
isLoading && children,
|
|
4704
4704
|
!isLoading && (React.createElement(React.Fragment, null,
|
|
4705
|
-
React.createElement(Component, Object.assign({}, props, { className: css(_default$
|
|
4705
|
+
React.createElement(Component, Object.assign({}, props, { className: css(_default$j.selectMenuItem, isLoad && _default$j.modifiers.load, isSelected && _default$j.modifiers.selected, isDisabled && _default$j.modifiers.disabled, description && _default$j.modifiers.description, isFavorite !== null && _default$j.modifiers.link, className), onClick: (event) => {
|
|
4706
4706
|
if (isLoad) {
|
|
4707
4707
|
onClick(event);
|
|
4708
4708
|
event.stopPropagation();
|
|
@@ -4716,36 +4716,36 @@ class SelectOption extends React.Component {
|
|
|
4716
4716
|
this.onKeyDown(event, 0);
|
|
4717
4717
|
}, type: "button" }),
|
|
4718
4718
|
description && (React.createElement(React.Fragment, null,
|
|
4719
|
-
React.createElement("span", { className: css(_default$
|
|
4719
|
+
React.createElement("span", { className: css(_default$j.selectMenuItemMain) },
|
|
4720
4720
|
itemDisplay,
|
|
4721
|
-
isSelected && (React.createElement("span", { className: css(_default$
|
|
4721
|
+
isSelected && (React.createElement("span", { className: css(_default$j.selectMenuItemIcon) },
|
|
4722
4722
|
React.createElement(CheckIcon, { "aria-hidden": true })))),
|
|
4723
|
-
React.createElement("span", { className: css(_default$
|
|
4723
|
+
React.createElement("span", { className: css(_default$j.selectMenuItemDescription) }, description))),
|
|
4724
4724
|
!description && (React.createElement(React.Fragment, null,
|
|
4725
4725
|
itemDisplay,
|
|
4726
|
-
isSelected && (React.createElement("span", { className: css(_default$
|
|
4726
|
+
isSelected && (React.createElement("span", { className: css(_default$j.selectMenuItemIcon) },
|
|
4727
4727
|
React.createElement(CheckIcon, { "aria-hidden": true })))))),
|
|
4728
4728
|
isFavorite !== null && id && favoriteButton(onFavorite))))),
|
|
4729
|
-
variant === SelectVariant.checkbox && isLoad && (React.createElement("button", { className: css(_default$
|
|
4729
|
+
variant === SelectVariant.checkbox && isLoad && (React.createElement("button", { className: css(_default$j.selectMenuItem, _default$j.modifiers.load, isFocused && _default$j.modifiers.focus, className), onKeyDown: (event) => {
|
|
4730
4730
|
this.onKeyDown(event, 0, undefined, true);
|
|
4731
4731
|
}, onClick: (event) => {
|
|
4732
4732
|
onClick(event);
|
|
4733
4733
|
event.stopPropagation();
|
|
4734
4734
|
}, ref: this.ref }, children || (value && value.toString && value.toString()))),
|
|
4735
|
-
variant === SelectVariant.checkbox && isLoading && (React.createElement("div", { className: css(_default$
|
|
4736
|
-
variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad && (React.createElement("label", Object.assign({}, props, { className: css(_default$
|
|
4735
|
+
variant === SelectVariant.checkbox && isLoading && (React.createElement("div", { className: css(_default$j.selectListItem, isLoading && _default$j.modifiers.loading, className) }, children)),
|
|
4736
|
+
variant === SelectVariant.checkbox && !isNoResultsOption && !isLoading && !isLoad && (React.createElement("label", Object.assign({}, props, { className: css(_default$h.check, _default$j.selectMenuItem, isDisabled && _default$j.modifiers.disabled, description && _default$j.modifiers.description, className), onKeyDown: (event) => {
|
|
4737
4737
|
this.onKeyDown(event, 0, undefined, true);
|
|
4738
4738
|
} }),
|
|
4739
|
-
React.createElement("input", { id: inputId || `${inputIdPrefix}-${value.toString()}`, className: css(_default$
|
|
4739
|
+
React.createElement("input", { id: inputId || `${inputIdPrefix}-${value.toString()}`, className: css(_default$h.checkInput), type: "checkbox", onChange: event => {
|
|
4740
4740
|
if (!isDisabled) {
|
|
4741
4741
|
onClick(event);
|
|
4742
4742
|
onSelect(event, value);
|
|
4743
4743
|
}
|
|
4744
4744
|
}, ref: this.ref, checked: isChecked || false, disabled: isDisabled }),
|
|
4745
|
-
React.createElement("span", { className: css(_default$
|
|
4746
|
-
description && React.createElement("div", { className: css(_default$
|
|
4745
|
+
React.createElement("span", { className: css(_default$h.checkLabel, isDisabled && _default$j.modifiers.disabled) }, itemDisplay),
|
|
4746
|
+
description && React.createElement("div", { className: css(_default$h.checkDescription) }, description))),
|
|
4747
4747
|
variant === SelectVariant.checkbox && isNoResultsOption && !isLoading && !isLoad && (React.createElement("div", null,
|
|
4748
|
-
React.createElement(Component, Object.assign({}, props, { className: css(_default$
|
|
4748
|
+
React.createElement(Component, Object.assign({}, props, { className: css(_default$j.selectMenuItem, isSelected && _default$j.modifiers.selected, isDisabled && _default$j.modifiers.disabled, className), role: "option", "aria-selected": isSelected || null, ref: this.ref, onKeyDown: (event) => {
|
|
4749
4749
|
this.onKeyDown(event, 0, undefined, true);
|
|
4750
4750
|
}, type: "button" }), itemDisplay)))))));
|
|
4751
4751
|
}
|
|
@@ -4772,8 +4772,8 @@ SelectOption.defaultProps = {
|
|
|
4772
4772
|
|
|
4773
4773
|
const SelectGroup = (_a) => {
|
|
4774
4774
|
var { children = [], className = '', label = '', titleId = '' } = _a, props = __rest$2(_a, ["children", "className", "label", "titleId"]);
|
|
4775
|
-
return (React.createElement(SelectConsumer, null, ({ variant }) => (React.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
4776
|
-
React.createElement("div", { className: css(_default$
|
|
4775
|
+
return (React.createElement(SelectConsumer, null, ({ variant }) => (React.createElement("div", Object.assign({}, props, { className: css(_default$j.selectMenuGroup, className) }),
|
|
4776
|
+
React.createElement("div", { className: css(_default$j.selectMenuGroupTitle), id: titleId, "aria-hidden": true }, label),
|
|
4777
4777
|
variant === SelectVariant.checkbox ? children : React.createElement("ul", { role: "listbox" }, children)))));
|
|
4778
4778
|
};
|
|
4779
4779
|
SelectGroup.displayName = 'SelectGroup';
|
|
@@ -4846,7 +4846,7 @@ class SelectMenuWithRef extends React.Component {
|
|
|
4846
4846
|
}
|
|
4847
4847
|
return React.cloneElement(group, {
|
|
4848
4848
|
titleId: group.props.label && group.props.label.replace(/\W/g, '-'),
|
|
4849
|
-
children: group.props.children ? (React.createElement("fieldset", { "aria-labelledby": group.props.label && group.props.label.replace(/\W/g, '-'), className: css(_default$
|
|
4849
|
+
children: group.props.children ? (React.createElement("fieldset", { "aria-labelledby": group.props.label && group.props.label.replace(/\W/g, '-'), className: css(_default$j.selectMenuFieldset) }, React.Children.map(group.props.children, (option) => option.type === Divider
|
|
4850
4850
|
? option
|
|
4851
4851
|
: React.cloneElement(option, {
|
|
4852
4852
|
isChecked: this.checkForValue(option.props.value, checked),
|
|
@@ -4871,7 +4871,7 @@ class SelectMenuWithRef extends React.Component {
|
|
|
4871
4871
|
const _a = this.props, { children, isCustomContent, className, isExpanded, openedOnEnter, selected, checked, isGrouped, sendRef, keyHandler, maxHeight, noResultsFoundText, createText, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, hasInlineFilter, innerRef, footer, footerRef } = _a, props = __rest$2(_a, ["children", "isCustomContent", "className", "isExpanded", "openedOnEnter", "selected", "checked", "isGrouped", "sendRef", "keyHandler", "maxHeight", "noResultsFoundText", "createText", 'aria-label', 'aria-labelledby', "hasInlineFilter", "innerRef", "footer", "footerRef"]);
|
|
4872
4872
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
4873
4873
|
let Component = 'div';
|
|
4874
|
-
const variantProps = Object.assign({ ref: innerRef, className: css(!footer ? _default$
|
|
4874
|
+
const variantProps = Object.assign({ ref: innerRef, className: css(!footer ? _default$j.selectMenu : 'pf-c-select__menu-list', className) }, (maxHeight && { style: { maxHeight, overflow: 'auto' } }));
|
|
4875
4875
|
const extendedChildren = () => variant === SelectVariant.checkbox
|
|
4876
4876
|
? this.extendCheckboxChildren(children)
|
|
4877
4877
|
: this.extendChildren(inputIdPrefix);
|
|
@@ -4880,10 +4880,10 @@ class SelectMenuWithRef extends React.Component {
|
|
|
4880
4880
|
}
|
|
4881
4881
|
else if (hasInlineFilter) {
|
|
4882
4882
|
if (React.Children.count(children) === 0) {
|
|
4883
|
-
variantProps.children = React.createElement("fieldset", { className: css(_default$
|
|
4883
|
+
variantProps.children = React.createElement("fieldset", { className: css(_default$j.selectMenuFieldset) });
|
|
4884
4884
|
}
|
|
4885
4885
|
else {
|
|
4886
|
-
variantProps.children = (React.createElement("fieldset", { "aria-label": ariaLabel, "aria-labelledby": (!ariaLabel && ariaLabelledBy) || null, className: css(_default$
|
|
4886
|
+
variantProps.children = (React.createElement("fieldset", { "aria-label": ariaLabel, "aria-labelledby": (!ariaLabel && ariaLabelledBy) || null, className: css(_default$i.formFieldset) },
|
|
4887
4887
|
children.shift(),
|
|
4888
4888
|
extendedChildren()));
|
|
4889
4889
|
}
|
|
@@ -4899,7 +4899,7 @@ class SelectMenuWithRef extends React.Component {
|
|
|
4899
4899
|
}
|
|
4900
4900
|
return (React.createElement(React.Fragment, null,
|
|
4901
4901
|
React.createElement(Component, Object.assign({}, variantProps, props)),
|
|
4902
|
-
footer && (React.createElement("div", { className: css(_default$
|
|
4902
|
+
footer && (React.createElement("div", { className: css(_default$j.selectMenuFooter), ref: footerRef }, footer))));
|
|
4903
4903
|
}
|
|
4904
4904
|
render() {
|
|
4905
4905
|
return React.createElement(SelectConsumer, null, context => this.renderSelectMenu(context));
|
|
@@ -5051,7 +5051,7 @@ class SelectToggle extends React.Component {
|
|
|
5051
5051
|
'aria-haspopup': (variant !== SelectVariant.checkbox && 'listbox') || null
|
|
5052
5052
|
};
|
|
5053
5053
|
return (React.createElement(React.Fragment, null,
|
|
5054
|
-
!isTypeahead && (React.createElement("button", Object.assign({}, props, toggleProps, { ref: this.toggle, type: type, className: css(_default$
|
|
5054
|
+
!isTypeahead && (React.createElement("button", Object.assign({}, props, toggleProps, { ref: this.toggle, type: type, className: css(_default$j.selectToggle, isDisabled && _default$j.modifiers.disabled, isPlain && _default$j.modifiers.plain, isActive && _default$j.modifiers.active, className),
|
|
5055
5055
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5056
5056
|
onClick: _event => {
|
|
5057
5057
|
onToggle(!isOpen);
|
|
@@ -5060,9 +5060,9 @@ class SelectToggle extends React.Component {
|
|
|
5060
5060
|
}
|
|
5061
5061
|
}, onKeyDown: this.onKeyDown, disabled: isDisabled }),
|
|
5062
5062
|
children,
|
|
5063
|
-
React.createElement("span", { className: css(_default$
|
|
5063
|
+
React.createElement("span", { className: css(_default$j.selectToggleArrow) },
|
|
5064
5064
|
React.createElement(CaretDownIcon, null)))),
|
|
5065
|
-
isTypeahead && (React.createElement("div", Object.assign({}, props, { ref: this.toggle, className: css(_default$
|
|
5065
|
+
isTypeahead && (React.createElement("div", Object.assign({}, props, { ref: this.toggle, className: css(_default$j.selectToggle, isDisabled && _default$j.modifiers.disabled, isPlain && _default$j.modifiers.plain, isTypeahead && _default$j.modifiers.typeahead, className),
|
|
5066
5066
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5067
5067
|
onClick: _event => {
|
|
5068
5068
|
if (!isDisabled) {
|
|
@@ -5070,7 +5070,7 @@ class SelectToggle extends React.Component {
|
|
|
5070
5070
|
}
|
|
5071
5071
|
}, onKeyDown: this.onKeyDown }),
|
|
5072
5072
|
children,
|
|
5073
|
-
React.createElement("button", Object.assign({}, toggleProps, { type: type, className: css(_default$
|
|
5073
|
+
React.createElement("button", Object.assign({}, toggleProps, { type: type, className: css(_default$s.button, _default$j.selectToggleButton, _default$j.modifiers.plain), "aria-label": ariaLabel, onClick: _event => {
|
|
5074
5074
|
onToggle(!isOpen);
|
|
5075
5075
|
if (isOpen) {
|
|
5076
5076
|
onClose();
|
|
@@ -5079,7 +5079,7 @@ class SelectToggle extends React.Component {
|
|
|
5079
5079
|
} }, ((variant === SelectVariant.typeahead || variant === SelectVariant.typeaheadMulti) && {
|
|
5080
5080
|
tabIndex: -1
|
|
5081
5081
|
}), { disabled: isDisabled }),
|
|
5082
|
-
React.createElement(CaretDownIcon, { className: css(_default$
|
|
5082
|
+
React.createElement(CaretDownIcon, { className: css(_default$j.selectToggleArrow) }))))));
|
|
5083
5083
|
}
|
|
5084
5084
|
}
|
|
5085
5085
|
SelectToggle.displayName = 'SelectToggle';
|
|
@@ -5101,7 +5101,7 @@ SelectToggle.defaultProps = {
|
|
|
5101
5101
|
onClickTypeaheadToggleButton: () => { }
|
|
5102
5102
|
};
|
|
5103
5103
|
|
|
5104
|
-
var _default$
|
|
5104
|
+
var _default$g = {
|
|
5105
5105
|
"chipGroup": "pf-c-chip-group",
|
|
5106
5106
|
"chipGroupClose": "pf-c-chip-group__close",
|
|
5107
5107
|
"chipGroupLabel": "pf-c-chip-group__label",
|
|
@@ -5113,7 +5113,7 @@ var _default$f = {
|
|
|
5113
5113
|
}
|
|
5114
5114
|
};
|
|
5115
5115
|
|
|
5116
|
-
var _default$
|
|
5116
|
+
var _default$f = {
|
|
5117
5117
|
"badge": "pf-c-badge",
|
|
5118
5118
|
"button": "pf-c-button",
|
|
5119
5119
|
"chip": "pf-c-chip",
|
|
@@ -5132,8 +5132,8 @@ class Chip extends React.Component {
|
|
|
5132
5132
|
this.renderOverflowChip = () => {
|
|
5133
5133
|
const { children, className, onClick, ouiaId } = this.props;
|
|
5134
5134
|
const Component = this.props.component;
|
|
5135
|
-
return (React.createElement(Component, Object.assign({ onClick: onClick, className: css(_default$
|
|
5136
|
-
React.createElement("span", { className: css(_default$
|
|
5135
|
+
return (React.createElement(Component, Object.assign({ onClick: onClick, className: css(_default$f.chip, _default$f.modifiers.overflow, className) }, (this.props.component === 'button' ? { type: 'button' } : {}), getOUIAProps('OverflowChip', ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
5136
|
+
React.createElement("span", { className: css(_default$f.chipText) }, children)));
|
|
5137
5137
|
};
|
|
5138
5138
|
this.renderChip = (randomId) => {
|
|
5139
5139
|
const { children, tooltipPosition } = this.props;
|
|
@@ -5155,8 +5155,8 @@ class Chip extends React.Component {
|
|
|
5155
5155
|
renderInnerChip(id) {
|
|
5156
5156
|
const { children, className, onClick, closeBtnAriaLabel, isReadOnly, component, ouiaId } = this.props;
|
|
5157
5157
|
const Component = component;
|
|
5158
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
5159
|
-
React.createElement("span", { ref: this.span, className: css(_default$
|
|
5158
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$f.chip, className) }, (this.state.isTooltipVisible && { tabIndex: 0 }), getOUIAProps(Chip.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId)),
|
|
5159
|
+
React.createElement("span", { ref: this.span, className: css(_default$f.chipText), id: id }, children),
|
|
5160
5160
|
!isReadOnly && (React.createElement(Button$1, { onClick: onClick, variant: "plain", "aria-label": closeBtnAriaLabel, id: `remove_${id}`, "aria-labelledby": `remove_${id} ${id}`, ouiaId: ouiaId || closeBtnAriaLabel },
|
|
5161
5161
|
React.createElement(TimesIcon, { "aria-hidden": "true" })))));
|
|
5162
5162
|
}
|
|
@@ -5201,8 +5201,8 @@ class ChipGroup extends React.Component {
|
|
|
5201
5201
|
const { categoryName, tooltipPosition } = this.props;
|
|
5202
5202
|
const { isTooltipVisible } = this.state;
|
|
5203
5203
|
return isTooltipVisible ? (React.createElement(Tooltip, { position: tooltipPosition, content: categoryName },
|
|
5204
|
-
React.createElement("span", { tabIndex: 0, ref: this.headingRef, className: css(_default$
|
|
5205
|
-
React.createElement("span", { "aria-hidden": "true" }, categoryName)))) : (React.createElement("span", { ref: this.headingRef, className: css(_default$
|
|
5204
|
+
React.createElement("span", { tabIndex: 0, ref: this.headingRef, className: css(_default$g.chipGroupLabel), id: id, "aria-label": categoryName },
|
|
5205
|
+
React.createElement("span", { "aria-hidden": "true" }, categoryName)))) : (React.createElement("span", { ref: this.headingRef, className: css(_default$g.chipGroupLabel), "aria-hidden": "true", id: id }, categoryName));
|
|
5206
5206
|
}
|
|
5207
5207
|
render() {
|
|
5208
5208
|
const _a = this.props, { categoryName, children, className, isClosable, closeBtnAriaLabel, 'aria-label': ariaLabel, onClick, onOverflowChipClick, numChips, expandedText, collapsedText, ouiaId,
|
|
@@ -5219,17 +5219,17 @@ class ChipGroup extends React.Component {
|
|
|
5219
5219
|
const chipArray = !isOpen
|
|
5220
5220
|
? React.Children.toArray(children).slice(0, numChips)
|
|
5221
5221
|
: React.Children.toArray(children);
|
|
5222
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
5223
|
-
React.createElement("div", { className: css(_default$
|
|
5222
|
+
return (React.createElement("div", Object.assign({ className: css(_default$g.chipGroup, className, categoryName && _default$g.modifiers.category) }, getOUIAProps(ChipGroup.displayName, ouiaId)),
|
|
5223
|
+
React.createElement("div", { className: css(_default$g.chipGroupMain) },
|
|
5224
5224
|
categoryName && this.renderLabel(id),
|
|
5225
|
-
React.createElement("ul", Object.assign({ className: css(_default$
|
|
5226
|
-
chipArray.map((child, i) => (React.createElement("li", { className: css(_default$
|
|
5227
|
-
numChildren > numChips && (React.createElement("li", { className: css(_default$
|
|
5225
|
+
React.createElement("ul", Object.assign({ className: css(_default$g.chipGroupList) }, (categoryName && { 'aria-labelledby': id }), (!categoryName && { 'aria-label': ariaLabel }), { role: "list" }, rest),
|
|
5226
|
+
chipArray.map((child, i) => (React.createElement("li", { className: css(_default$g.chipGroupListItem), key: i }, child))),
|
|
5227
|
+
numChildren > numChips && (React.createElement("li", { className: css(_default$g.chipGroupListItem) },
|
|
5228
5228
|
React.createElement(Chip, { isOverflowChip: true, onClick: event => {
|
|
5229
5229
|
this.toggleCollapse();
|
|
5230
5230
|
onOverflowChipClick(event);
|
|
5231
5231
|
}, component: "button" }, isOpen ? expandedText : collapsedTextResult))))),
|
|
5232
|
-
isClosable && (React.createElement("div", { className: css(_default$
|
|
5232
|
+
isClosable && (React.createElement("div", { className: css(_default$g.chipGroupClose) },
|
|
5233
5233
|
React.createElement(Button$1, { variant: "plain", "aria-label": closeBtnAriaLabel, onClick: onClick, id: `remove_group_${id}`, "aria-labelledby": `remove_group_${id} ${id}`, ouiaId: ouiaId || closeBtnAriaLabel },
|
|
5234
5234
|
React.createElement(TimesCircleIcon, { "aria-hidden": "true" }))))));
|
|
5235
5235
|
};
|
|
@@ -5718,7 +5718,7 @@ class Select extends React.Component {
|
|
|
5718
5718
|
}
|
|
5719
5719
|
}
|
|
5720
5720
|
const hasOnClear = onClear !== Select.defaultProps.onClear;
|
|
5721
|
-
const clearBtn = (React.createElement("button", { className: css(_default$
|
|
5721
|
+
const clearBtn = (React.createElement("button", { className: css(_default$s.button, _default$s.modifiers.plain, _default$j.selectToggleClear), onClick: e => {
|
|
5722
5722
|
this.clearSelection(e);
|
|
5723
5723
|
onClear(e);
|
|
5724
5724
|
}, "aria-label": clearSelectionsAriaLabel, type: "button", disabled: isDisabled, ref: this.clearRef, onKeyDown: event => {
|
|
@@ -5734,8 +5734,8 @@ class Select extends React.Component {
|
|
|
5734
5734
|
}
|
|
5735
5735
|
if (hasInlineFilter) {
|
|
5736
5736
|
const filterBox = (React.createElement(React.Fragment, null,
|
|
5737
|
-
React.createElement("div", { key: "inline-filter", className: css(_default$
|
|
5738
|
-
React.createElement("input", { key: "inline-filter-input", type: "search", className: css(_default$
|
|
5737
|
+
React.createElement("div", { key: "inline-filter", className: css(_default$j.selectMenuSearch) },
|
|
5738
|
+
React.createElement("input", { key: "inline-filter-input", type: "search", className: css(_default$n.formControl, _default$n.modifiers.search), onChange: this.onChange, placeholder: inlineFilterPlaceholderText, onKeyDown: event => {
|
|
5739
5739
|
if (event.key === KeyTypes.ArrowUp) {
|
|
5740
5740
|
this.handleMenuKeys(0, 0, 'up');
|
|
5741
5741
|
event.preventDefault();
|
|
@@ -5820,46 +5820,46 @@ class Select extends React.Component {
|
|
|
5820
5820
|
}
|
|
5821
5821
|
}
|
|
5822
5822
|
const innerMenu = (React.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 }), variantChildren));
|
|
5823
|
-
const menuContainer = footer ? React.createElement("div", { className: css(_default$
|
|
5823
|
+
const menuContainer = footer ? React.createElement("div", { className: css(_default$j.selectMenu) },
|
|
5824
5824
|
" ",
|
|
5825
5825
|
innerMenu,
|
|
5826
5826
|
" ") : innerMenu;
|
|
5827
|
-
const popperContainer = (React.createElement("div", Object.assign({ className: css(_default$
|
|
5828
|
-
const mainContainer = (React.createElement("div", Object.assign({ className: css(_default$
|
|
5827
|
+
const popperContainer = (React.createElement("div", Object.assign({ className: css(_default$j.select, isOpen && _default$j.modifiers.expanded, validated === ValidatedOptions.success && _default$j.modifiers.success, validated === ValidatedOptions.warning && _default$j.modifiers.warning, validated === ValidatedOptions.error && _default$j.modifiers.invalid, direction === SelectDirection.up && _default$j.modifiers.top, className) }, (width && { style: { width } }), (validated !== ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== ValidatedOptions.default && { 'aria-invalid': ariaInvalid })), isOpen && menuContainer));
|
|
5828
|
+
const mainContainer = (React.createElement("div", Object.assign({ className: css(_default$j.select, isOpen && _default$j.modifiers.expanded, validated === ValidatedOptions.success && _default$j.modifiers.success, validated === ValidatedOptions.warning && _default$j.modifiers.warning, validated === ValidatedOptions.error && _default$j.modifiers.invalid, direction === SelectDirection.up && _default$j.modifiers.top, className), ref: this.parentRef }, getOUIAProps(Select.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), (width && { style: { width } }), (validated !== ValidatedOptions.default && { 'aria-describedby': ariaDescribedby }), (validated !== ValidatedOptions.default && { 'aria-invalid': ariaInvalid })),
|
|
5829
5829
|
React.createElement(SelectToggle, Object.assign({ id: selectToggleId, parentRef: this.parentRef, menuRef: this.menuComponentRef }, (footer && { footerRef: this.footerRef }), { isOpen: isOpen, isPlain: isPlain, 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 }),
|
|
5830
|
-
customContent && (React.createElement("div", { className: css(_default$
|
|
5831
|
-
toggleIcon && React.createElement("span", { className: css(_default$
|
|
5832
|
-
React.createElement("span", { className: css(_default$
|
|
5830
|
+
customContent && (React.createElement("div", { className: css(_default$j.selectToggleWrapper) },
|
|
5831
|
+
toggleIcon && React.createElement("span", { className: css(_default$j.selectToggleIcon) }, toggleIcon),
|
|
5832
|
+
React.createElement("span", { className: css(_default$j.selectToggleText) }, placeholderText))),
|
|
5833
5833
|
variant === SelectVariant.single && !customContent && (React.createElement(React.Fragment, null,
|
|
5834
|
-
React.createElement("div", { className: css(_default$
|
|
5835
|
-
toggleIcon && React.createElement("span", { className: css(_default$
|
|
5836
|
-
React.createElement("span", { className: css(_default$
|
|
5834
|
+
React.createElement("div", { className: css(_default$j.selectToggleWrapper) },
|
|
5835
|
+
toggleIcon && React.createElement("span", { className: css(_default$j.selectToggleIcon) }, toggleIcon),
|
|
5836
|
+
React.createElement("span", { className: css(_default$j.selectToggleText) }, this.getDisplay(selections[0], 'node') || placeholderText || childPlaceholderText)),
|
|
5837
5837
|
hasOnClear && hasAnySelections && clearBtn)),
|
|
5838
5838
|
variant === SelectVariant.checkbox && !customContent && (React.createElement(React.Fragment, null,
|
|
5839
|
-
React.createElement("div", { className: css(_default$
|
|
5840
|
-
toggleIcon && React.createElement("span", { className: css(_default$
|
|
5841
|
-
React.createElement("span", { className: css(_default$
|
|
5842
|
-
!isCheckboxSelectionBadgeHidden && hasAnySelections && (React.createElement("div", { className: css(_default$
|
|
5843
|
-
React.createElement("span", { className: css(_default$
|
|
5839
|
+
React.createElement("div", { className: css(_default$j.selectToggleWrapper) },
|
|
5840
|
+
toggleIcon && React.createElement("span", { className: css(_default$j.selectToggleIcon) }, toggleIcon),
|
|
5841
|
+
React.createElement("span", { className: css(_default$j.selectToggleText) }, placeholderText),
|
|
5842
|
+
!isCheckboxSelectionBadgeHidden && hasAnySelections && (React.createElement("div", { className: css(_default$j.selectToggleBadge) },
|
|
5843
|
+
React.createElement("span", { className: css(_default$k.badge, _default$k.modifiers.read) }, this.generateSelectedBadge())))),
|
|
5844
5844
|
hasOnClear && hasAnySelections && clearBtn)),
|
|
5845
5845
|
variant === SelectVariant.typeahead && !customContent && (React.createElement(React.Fragment, null,
|
|
5846
|
-
React.createElement("div", { className: css(_default$
|
|
5847
|
-
toggleIcon && React.createElement("span", { className: css(_default$
|
|
5848
|
-
React.createElement("input", { className: css(_default$
|
|
5846
|
+
React.createElement("div", { className: css(_default$j.selectToggleWrapper) },
|
|
5847
|
+
toggleIcon && React.createElement("span", { className: css(_default$j.selectToggleIcon) }, toggleIcon),
|
|
5848
|
+
React.createElement("input", { className: css(_default$n.formControl, _default$j.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-typeahead`, "aria-label": typeAheadAriaLabel, placeholder: placeholderText, value: typeaheadInputValue !== null
|
|
5849
5849
|
? typeaheadInputValue
|
|
5850
5850
|
: this.getDisplay(selections[0], 'text') || '', type: "text", onClick: this.onClick, onChange: this.onChange, autoComplete: "off", disabled: isDisabled, ref: this.inputRef })),
|
|
5851
5851
|
hasOnClear && (selections[0] || typeaheadInputValue) && clearBtn)),
|
|
5852
5852
|
variant === SelectVariant.typeaheadMulti && !customContent && (React.createElement(React.Fragment, null,
|
|
5853
|
-
React.createElement("div", { className: css(_default$
|
|
5854
|
-
toggleIcon && React.createElement("span", { className: css(_default$
|
|
5853
|
+
React.createElement("div", { className: css(_default$j.selectToggleWrapper) },
|
|
5854
|
+
toggleIcon && React.createElement("span", { className: css(_default$j.selectToggleIcon) }, toggleIcon),
|
|
5855
5855
|
selections && Array.isArray(selections) && selections.length > 0 && selectedChips,
|
|
5856
|
-
React.createElement("input", { className: css(_default$
|
|
5856
|
+
React.createElement("input", { className: css(_default$n.formControl, _default$j.selectToggleTypeahead), "aria-activedescendant": typeaheadActiveChild && typeaheadActiveChild.id, id: `${selectToggleId}-select-multi-typeahead-typeahead`, "aria-label": typeAheadAriaLabel, "aria-invalid": validated === ValidatedOptions.error, placeholder: placeholderText, value: typeaheadInputValue !== null ? typeaheadInputValue : '', type: "text", onChange: this.onChange, onClick: this.onClick, autoComplete: "off", disabled: isDisabled, ref: this.inputRef })),
|
|
5857
5857
|
hasOnClear && ((selections && selections.length > 0) || typeaheadInputValue) && clearBtn)),
|
|
5858
|
-
validated === ValidatedOptions.success && (React.createElement("span", { className: css(_default$
|
|
5858
|
+
validated === ValidatedOptions.success && (React.createElement("span", { className: css(_default$j.selectToggleStatusIcon) },
|
|
5859
5859
|
React.createElement(CheckCircleIcon$1, { "aria-hidden": "true" }))),
|
|
5860
|
-
validated === ValidatedOptions.error && (React.createElement("span", { className: css(_default$
|
|
5860
|
+
validated === ValidatedOptions.error && (React.createElement("span", { className: css(_default$j.selectToggleStatusIcon) },
|
|
5861
5861
|
React.createElement(ExclamationCircleIcon$1, { "aria-hidden": "true" }))),
|
|
5862
|
-
validated === ValidatedOptions.warning && (React.createElement("span", { className: css(_default$
|
|
5862
|
+
validated === ValidatedOptions.warning && (React.createElement("span", { className: css(_default$j.selectToggleStatusIcon) },
|
|
5863
5863
|
React.createElement(ExclamationTriangleIcon, { "aria-hidden": "true" })))),
|
|
5864
5864
|
isOpen && menuAppendTo === 'inline' && menuContainer));
|
|
5865
5865
|
const getParentElement = () => {
|
|
@@ -5926,7 +5926,7 @@ const ArrowRightIconConfig = {
|
|
|
5926
5926
|
|
|
5927
5927
|
const ArrowRightIcon$1 = createIcon(ArrowRightIconConfig);
|
|
5928
5928
|
|
|
5929
|
-
var _default$
|
|
5929
|
+
var _default$e = {
|
|
5930
5930
|
"card": "pf-c-card",
|
|
5931
5931
|
"cardActions": "pf-c-card__actions",
|
|
5932
5932
|
"cardBody": "pf-c-card__body",
|
|
@@ -5977,7 +5977,7 @@ const SearchIconConfig = {
|
|
|
5977
5977
|
|
|
5978
5978
|
const SearchIcon$1 = createIcon(SearchIconConfig);
|
|
5979
5979
|
|
|
5980
|
-
var _default$
|
|
5980
|
+
var _default$d = {
|
|
5981
5981
|
"formControl": "pf-c-form-control",
|
|
5982
5982
|
"inputGroup": "pf-c-input-group",
|
|
5983
5983
|
"inputGroupText": "pf-c-input-group__text",
|
|
@@ -6005,7 +6005,7 @@ class FormSelect extends React.Component {
|
|
|
6005
6005
|
/* find selected option and get placeholder flag */
|
|
6006
6006
|
const selectedOption = React.Children.toArray(children).find((option) => option.props.value === value);
|
|
6007
6007
|
const isSelectedPlaceholder = selectedOption && selectedOption.props.isPlaceholder;
|
|
6008
|
-
return (React.createElement("select", Object.assign({}, props, { className: css(_default$
|
|
6008
|
+
return (React.createElement("select", Object.assign({}, props, { className: css(_default$n.formControl, className, validated === ValidatedOptions.success && _default$n.modifiers.success, validated === ValidatedOptions.warning && _default$n.modifiers.warning, isSelectedPlaceholder && _default$n.modifiers.placeholder), "aria-invalid": validated === ValidatedOptions.error }, getOUIAProps(FormSelect.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe), { onChange: this.handleChange, disabled: isDisabled, required: isRequired, value: value }), children));
|
|
6009
6009
|
}
|
|
6010
6010
|
}
|
|
6011
6011
|
FormSelect.displayName = 'FormSelect';
|
|
@@ -6066,7 +6066,7 @@ class TextAreaBase extends React.Component {
|
|
|
6066
6066
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
6067
6067
|
props = __rest$2(_a, ["className", "value", "validated", "isRequired", "isDisabled", "isReadOnly", "resizeOrientation", "innerRef", "readOnly", "disabled", "autoResize", "onChange"]);
|
|
6068
6068
|
const orientation = `resize${capitalize(resizeOrientation)}`;
|
|
6069
|
-
return (React.createElement("textarea", Object.assign({ className: css(_default$
|
|
6069
|
+
return (React.createElement("textarea", Object.assign({ className: css(_default$n.formControl, className, resizeOrientation !== TextAreResizeOrientation.both && _default$n.modifiers[orientation], validated === ValidatedOptions.success && _default$n.modifiers.success, validated === ValidatedOptions.warning && _default$n.modifiers.warning), onChange: this.handleChange }, (typeof this.props.defaultValue !== 'string' && { value }), { "aria-invalid": validated === ValidatedOptions.error, required: isRequired, disabled: isDisabled || disabled, readOnly: isReadOnly || readOnly, ref: innerRef }, props)));
|
|
6070
6070
|
}
|
|
6071
6071
|
}
|
|
6072
6072
|
TextAreaBase.displayName = 'TextArea';
|
|
@@ -6086,7 +6086,7 @@ const InputGroup = (_a) => {
|
|
|
6086
6086
|
var { className = '', children } = _a, props = __rest$2(_a, ["className", "children"]);
|
|
6087
6087
|
const formCtrls = [FormSelect, TextArea, TextInput].map(comp => comp.displayName);
|
|
6088
6088
|
const idItem = React.Children.toArray(children).find((child) => !formCtrls.includes(child.type.displayName) && child.props.id);
|
|
6089
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6089
|
+
return (React.createElement("div", Object.assign({ className: css(_default$d.inputGroup, className) }, props), idItem
|
|
6090
6090
|
? React.Children.map(children, (child) => formCtrls.includes(child.type.displayName)
|
|
6091
6091
|
? React.cloneElement(child, { 'aria-describedby': idItem.props.id })
|
|
6092
6092
|
: child)
|
|
@@ -6094,7 +6094,7 @@ const InputGroup = (_a) => {
|
|
|
6094
6094
|
};
|
|
6095
6095
|
InputGroup.displayName = 'InputGroup';
|
|
6096
6096
|
|
|
6097
|
-
var _default$
|
|
6097
|
+
var _default$c = {
|
|
6098
6098
|
"button": "pf-c-button",
|
|
6099
6099
|
"modifiers": {
|
|
6100
6100
|
"noPadding": "pf-m-no-padding",
|
|
@@ -6114,13 +6114,13 @@ var _default$b = {
|
|
|
6114
6114
|
|
|
6115
6115
|
const PopoverContent = (_a) => {
|
|
6116
6116
|
var { className = null, children } = _a, props = __rest$2(_a, ["className", "children"]);
|
|
6117
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6117
|
+
return (React.createElement("div", Object.assign({ className: css(_default$c.popoverContent, className) }, props), children));
|
|
6118
6118
|
};
|
|
6119
6119
|
PopoverContent.displayName = 'PopoverContent';
|
|
6120
6120
|
|
|
6121
6121
|
const PopoverBody = (_a) => {
|
|
6122
6122
|
var { children, id } = _a, props = __rest$2(_a, ["children", "id"]);
|
|
6123
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6123
|
+
return (React.createElement("div", Object.assign({ className: css(_default$c.popoverBody), id: id }, props), children));
|
|
6124
6124
|
};
|
|
6125
6125
|
PopoverBody.displayName = 'PopoverBody';
|
|
6126
6126
|
|
|
@@ -6132,7 +6132,7 @@ PopoverHeader.displayName = 'PopoverHeader';
|
|
|
6132
6132
|
|
|
6133
6133
|
const PopoverFooter = (_a) => {
|
|
6134
6134
|
var { children, className = '' } = _a, props = __rest$2(_a, ["children", "className"]);
|
|
6135
|
-
return (React.createElement("footer", Object.assign({ className: css(_default$
|
|
6135
|
+
return (React.createElement("footer", Object.assign({ className: css(_default$c.popoverFooter, className) }, props), children));
|
|
6136
6136
|
};
|
|
6137
6137
|
PopoverFooter.displayName = 'PopoverFooter';
|
|
6138
6138
|
|
|
@@ -6153,7 +6153,7 @@ PopoverCloseButton.displayName = 'PopoverCloseButton';
|
|
|
6153
6153
|
|
|
6154
6154
|
const PopoverArrow = (_a) => {
|
|
6155
6155
|
var { className = '' } = _a, props = __rest$2(_a, ["className"]);
|
|
6156
|
-
return React.createElement("div", Object.assign({ className: css(_default$
|
|
6156
|
+
return React.createElement("div", Object.assign({ className: css(_default$c.popoverArrow, className) }, props));
|
|
6157
6157
|
};
|
|
6158
6158
|
PopoverArrow.displayName = 'PopoverArrow';
|
|
6159
6159
|
|
|
@@ -6239,10 +6239,10 @@ const Popover = (_a) => {
|
|
|
6239
6239
|
}, 0);
|
|
6240
6240
|
};
|
|
6241
6241
|
const positionModifiers = {
|
|
6242
|
-
top: _default$
|
|
6243
|
-
bottom: _default$
|
|
6244
|
-
left: _default$
|
|
6245
|
-
right: _default$
|
|
6242
|
+
top: _default$c.modifiers.top,
|
|
6243
|
+
bottom: _default$c.modifiers.bottom,
|
|
6244
|
+
left: _default$c.modifiers.left,
|
|
6245
|
+
right: _default$c.modifiers.right
|
|
6246
6246
|
};
|
|
6247
6247
|
const hasCustomMinWidth = minWidth !== c_popover_MinWidth.value;
|
|
6248
6248
|
const hasCustomMaxWidth = maxWidth !== c_popover_MaxWidth.value;
|
|
@@ -6338,7 +6338,7 @@ const Popover = (_a) => {
|
|
|
6338
6338
|
}
|
|
6339
6339
|
return node;
|
|
6340
6340
|
}
|
|
6341
|
-
}, preventScrollOnDeactivate: true, className: css(_default$
|
|
6341
|
+
}, preventScrollOnDeactivate: true, className: css(_default$c.popover, hasNoPadding && _default$c.modifiers.noPadding, hasAutoWidth && _default$c.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: {
|
|
6342
6342
|
minWidth: hasCustomMinWidth ? minWidth : null,
|
|
6343
6343
|
maxWidth: hasCustomMaxWidth ? maxWidth : null,
|
|
6344
6344
|
opacity,
|
|
@@ -6354,7 +6354,7 @@ const Popover = (_a) => {
|
|
|
6354
6354
|
};
|
|
6355
6355
|
Popover.displayName = 'Popover';
|
|
6356
6356
|
|
|
6357
|
-
var _default$
|
|
6357
|
+
var _default$b = {
|
|
6358
6358
|
"drawer": "pf-c-drawer",
|
|
6359
6359
|
"drawerActions": "pf-c-drawer__actions",
|
|
6360
6360
|
"drawerBody": "pf-c-drawer__body",
|
|
@@ -6431,7 +6431,7 @@ const Drawer = (_a) => {
|
|
|
6431
6431
|
var { className = '', children, isExpanded = false, isInline = false, isStatic = false, position = 'right', onExpand = () => { } } = _a, props = __rest$2(_a, ["className", "children", "isExpanded", "isInline", "isStatic", "position", "onExpand"]);
|
|
6432
6432
|
const drawerRef = React.useRef();
|
|
6433
6433
|
return (React.createElement(DrawerContext.Provider, { value: { isExpanded, isStatic, onExpand, position, drawerRef } },
|
|
6434
|
-
React.createElement("div", Object.assign({ className: css(_default$
|
|
6434
|
+
React.createElement("div", Object.assign({ className: css(_default$b.drawer, isExpanded && _default$b.modifiers.expanded, isInline && _default$b.modifiers.inline, isStatic && _default$b.modifiers.static, position === 'left' && _default$b.modifiers.panelLeft, position === 'bottom' && _default$b.modifiers.panelBottom, className), ref: drawerRef }, props), children)));
|
|
6435
6435
|
};
|
|
6436
6436
|
Drawer.displayName = 'Drawer';
|
|
6437
6437
|
|
|
@@ -6439,7 +6439,7 @@ const DrawerActions = (_a) => {
|
|
|
6439
6439
|
var {
|
|
6440
6440
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6441
6441
|
className = '', children } = _a, props = __rest$2(_a, ["className", "children"]);
|
|
6442
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6442
|
+
return (React.createElement("div", Object.assign({ className: css(_default$b.drawerActions, className) }, props), children));
|
|
6443
6443
|
};
|
|
6444
6444
|
DrawerActions.displayName = 'DrawerActions';
|
|
6445
6445
|
|
|
@@ -6447,7 +6447,7 @@ const DrawerCloseButton = (_a) => {
|
|
|
6447
6447
|
var {
|
|
6448
6448
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6449
6449
|
className = '', onClose = () => undefined, 'aria-label': ariaLabel = 'Close drawer panel' } = _a, props = __rest$2(_a, ["className", "onClose", 'aria-label']);
|
|
6450
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6450
|
+
return (React.createElement("div", Object.assign({ className: css(_default$b.drawerClose, className) }, props),
|
|
6451
6451
|
React.createElement(Button$1, { variant: "plain", onClick: onClose, "aria-label": ariaLabel },
|
|
6452
6452
|
React.createElement(TimesIcon, null))));
|
|
6453
6453
|
};
|
|
@@ -6457,7 +6457,7 @@ const DrawerMain = (_a) => {
|
|
|
6457
6457
|
var {
|
|
6458
6458
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6459
6459
|
className = '', children } = _a, props = __rest$2(_a, ["className", "children"]);
|
|
6460
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6460
|
+
return (React.createElement("div", Object.assign({ className: css(_default$b.drawerMain, className) }, props), children));
|
|
6461
6461
|
};
|
|
6462
6462
|
DrawerMain.displayName = 'DrawerMain';
|
|
6463
6463
|
|
|
@@ -6466,7 +6466,7 @@ const DrawerContent = (_a) => {
|
|
|
6466
6466
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6467
6467
|
className = '', children, panelContent, colorVariant = DrawerColorVariant.default } = _a, props = __rest$2(_a, ["className", "children", "panelContent", "colorVariant"]);
|
|
6468
6468
|
return (React.createElement(DrawerMain, null,
|
|
6469
|
-
React.createElement("div", Object.assign({ className: css(_default$
|
|
6469
|
+
React.createElement("div", Object.assign({ className: css(_default$b.drawerContent, colorVariant === DrawerColorVariant.light200 && _default$b.modifiers.light_200, className) }, props), children),
|
|
6470
6470
|
panelContent));
|
|
6471
6471
|
};
|
|
6472
6472
|
DrawerContent.displayName = 'DrawerContent';
|
|
@@ -6475,7 +6475,7 @@ const DrawerContentBody = (_a) => {
|
|
|
6475
6475
|
var {
|
|
6476
6476
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6477
6477
|
className = '', children, hasPadding = false } = _a, props = __rest$2(_a, ["className", "children", "hasPadding"]);
|
|
6478
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6478
|
+
return (React.createElement("div", Object.assign({ className: css(_default$b.drawerBody, hasPadding && _default$b.modifiers.padding, className) }, props), children));
|
|
6479
6479
|
};
|
|
6480
6480
|
DrawerContentBody.displayName = 'DrawerContentBody';
|
|
6481
6481
|
|
|
@@ -6483,7 +6483,7 @@ const DrawerPanelBody = (_a) => {
|
|
|
6483
6483
|
var {
|
|
6484
6484
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6485
6485
|
className = '', children, hasNoPadding = false } = _a, props = __rest$2(_a, ["className", "children", "hasNoPadding"]);
|
|
6486
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6486
|
+
return (React.createElement("div", Object.assign({ className: css(_default$b.drawerBody, hasNoPadding && _default$b.modifiers.noPadding, className) }, props), children));
|
|
6487
6487
|
};
|
|
6488
6488
|
DrawerPanelBody.displayName = 'DrawerPanelBody';
|
|
6489
6489
|
|
|
@@ -6492,7 +6492,7 @@ const DrawerHead = (_a) => {
|
|
|
6492
6492
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6493
6493
|
className = '', children, hasNoPadding = false } = _a, props = __rest$2(_a, ["className", "children", "hasNoPadding"]);
|
|
6494
6494
|
return (React.createElement(DrawerPanelBody, { hasNoPadding: hasNoPadding },
|
|
6495
|
-
React.createElement("div", Object.assign({ className: css(_default$
|
|
6495
|
+
React.createElement("div", Object.assign({ className: css(_default$b.drawerHead, className) }, props), children)));
|
|
6496
6496
|
};
|
|
6497
6497
|
DrawerHead.displayName = 'DrawerHead';
|
|
6498
6498
|
|
|
@@ -6526,7 +6526,7 @@ const DrawerPanelContent = (_a) => {
|
|
|
6526
6526
|
e.preventDefault();
|
|
6527
6527
|
document.addEventListener('mousemove', callbackMouseMove);
|
|
6528
6528
|
document.addEventListener('mouseup', callbackMouseUp);
|
|
6529
|
-
drawerRef.current.classList.add(css(_default$
|
|
6529
|
+
drawerRef.current.classList.add(css(_default$b.modifiers.resizing));
|
|
6530
6530
|
isResizing = true;
|
|
6531
6531
|
setInitialVals = true;
|
|
6532
6532
|
};
|
|
@@ -6573,7 +6573,7 @@ const DrawerPanelContent = (_a) => {
|
|
|
6573
6573
|
if (!isResizing) {
|
|
6574
6574
|
return;
|
|
6575
6575
|
}
|
|
6576
|
-
drawerRef.current.classList.remove(css(_default$
|
|
6576
|
+
drawerRef.current.classList.remove(css(_default$b.modifiers.resizing));
|
|
6577
6577
|
isResizing = false;
|
|
6578
6578
|
onResize && onResize(currWidth, id);
|
|
6579
6579
|
setInitialVals = true;
|
|
@@ -6652,7 +6652,7 @@ const DrawerPanelContent = (_a) => {
|
|
|
6652
6652
|
if (maxSize) {
|
|
6653
6653
|
boundaryCssVars['--pf-c-drawer__panel--md--FlexBasis--max'] = maxSize;
|
|
6654
6654
|
}
|
|
6655
|
-
return (React.createElement("div", Object.assign({ id: id, className: css(_default$
|
|
6655
|
+
return (React.createElement("div", Object.assign({ id: id, className: css(_default$b.drawerPanel, isResizable && _default$b.modifiers.resizable, hasNoBorder && _default$b.modifiers.noBorder, formatBreakpointMods(widths, _default$b), colorVariant === DrawerColorVariant.light200 && _default$b.modifiers.light_200, className), ref: panel, onTransitionEnd: ev => {
|
|
6656
6656
|
if (!hidden && ev.nativeEvent.propertyName === 'transform') {
|
|
6657
6657
|
onExpand();
|
|
6658
6658
|
}
|
|
@@ -6661,14 +6661,14 @@ const DrawerPanelContent = (_a) => {
|
|
|
6661
6661
|
style: boundaryCssVars
|
|
6662
6662
|
}), props), isExpandedInternal && (React.createElement(React.Fragment, null,
|
|
6663
6663
|
isResizable && (React.createElement(React.Fragment, null,
|
|
6664
|
-
React.createElement("div", { className: css(_default$
|
|
6665
|
-
React.createElement("div", { className: css(_default$
|
|
6666
|
-
React.createElement("div", { className: css(_default$
|
|
6664
|
+
React.createElement("div", { className: css(_default$b.drawerSplitter, position !== 'bottom' && _default$b.modifiers.vertical), role: "separator", tabIndex: 0, "aria-orientation": position === 'bottom' ? 'horizontal' : 'vertical', "aria-label": resizeAriaLabel, "aria-describedby": resizeAriaDescribedBy, onMouseDown: handleMousedown, onKeyDown: handleKeys, onTouchStart: handleTouchStart },
|
|
6665
|
+
React.createElement("div", { className: css(_default$b.drawerSplitterHandle), "aria-hidden": true })),
|
|
6666
|
+
React.createElement("div", { className: css(_default$b.drawerPanelMain) }, children))),
|
|
6667
6667
|
!isResizable && children))));
|
|
6668
6668
|
};
|
|
6669
6669
|
DrawerPanelContent.displayName = 'DrawerPanelContent';
|
|
6670
6670
|
|
|
6671
|
-
var _default$
|
|
6671
|
+
var _default$a = {
|
|
6672
6672
|
"button": "pf-c-button",
|
|
6673
6673
|
"emptyState": "pf-c-empty-state",
|
|
6674
6674
|
"emptyStateBody": "pf-c-empty-state__body",
|
|
@@ -6698,20 +6698,20 @@ var EmptyStateVariant;
|
|
|
6698
6698
|
})(EmptyStateVariant || (EmptyStateVariant = {}));
|
|
6699
6699
|
const EmptyState = (_a) => {
|
|
6700
6700
|
var { children, className = '', variant = EmptyStateVariant.full, isFullHeight } = _a, props = __rest$2(_a, ["children", "className", "variant", "isFullHeight"]);
|
|
6701
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6702
|
-
React.createElement("div", { className: css(_default$
|
|
6701
|
+
return (React.createElement("div", Object.assign({ className: css(_default$a.emptyState, variant === 'xs' && _default$a.modifiers.xs, variant === 'small' && _default$a.modifiers.sm, variant === 'large' && _default$a.modifiers.lg, variant === 'xl' && _default$a.modifiers.xl, isFullHeight && _default$a.modifiers.fullHeight, className) }, props),
|
|
6702
|
+
React.createElement("div", { className: css(_default$a.emptyStateContent) }, children)));
|
|
6703
6703
|
};
|
|
6704
6704
|
EmptyState.displayName = 'EmptyState';
|
|
6705
6705
|
|
|
6706
6706
|
const EmptyStateBody = (_a) => {
|
|
6707
6707
|
var { children, className = '' } = _a, props = __rest$2(_a, ["children", "className"]);
|
|
6708
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6708
|
+
return (React.createElement("div", Object.assign({ className: css(_default$a.emptyStateBody, className) }, props), children));
|
|
6709
6709
|
};
|
|
6710
6710
|
EmptyStateBody.displayName = 'EmptyStateBody';
|
|
6711
6711
|
|
|
6712
6712
|
const EmptyStateIcon = (_a) => {
|
|
6713
6713
|
var { className = '', icon: IconComponent, component: AnyComponent, variant = 'icon' } = _a, props = __rest$2(_a, ["className", "icon", "component", "variant"]);
|
|
6714
|
-
const classNames = css(_default$
|
|
6714
|
+
const classNames = css(_default$a.emptyStateIcon, className);
|
|
6715
6715
|
return variant === 'icon' ? (React.createElement(IconComponent, Object.assign({ className: classNames }, props, { "aria-hidden": "true" }))) : (React.createElement("div", { className: classNames },
|
|
6716
6716
|
React.createElement(AnyComponent, null)));
|
|
6717
6717
|
};
|
|
@@ -6719,10 +6719,78 @@ EmptyStateIcon.displayName = 'EmptyStateIcon';
|
|
|
6719
6719
|
|
|
6720
6720
|
const EmptyStatePrimary = (_a) => {
|
|
6721
6721
|
var { children, className = '' } = _a, props = __rest$2(_a, ["children", "className"]);
|
|
6722
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
6722
|
+
return (React.createElement("div", Object.assign({ className: css(_default$a.emptyStatePrimary, className) }, props), children));
|
|
6723
6723
|
};
|
|
6724
6724
|
EmptyStatePrimary.displayName = 'EmptyStatePrimary';
|
|
6725
6725
|
|
|
6726
|
+
var _default$9 = {
|
|
6727
|
+
"expandableSection": "pf-c-expandable-section",
|
|
6728
|
+
"expandableSectionContent": "pf-c-expandable-section__content",
|
|
6729
|
+
"expandableSectionToggle": "pf-c-expandable-section__toggle",
|
|
6730
|
+
"expandableSectionToggleIcon": "pf-c-expandable-section__toggle-icon",
|
|
6731
|
+
"expandableSectionToggleText": "pf-c-expandable-section__toggle-text",
|
|
6732
|
+
"modifiers": {
|
|
6733
|
+
"expanded": "pf-m-expanded",
|
|
6734
|
+
"detached": "pf-m-detached",
|
|
6735
|
+
"limitWidth": "pf-m-limit-width",
|
|
6736
|
+
"displayLg": "pf-m-display-lg",
|
|
6737
|
+
"active": "pf-m-active",
|
|
6738
|
+
"expandTop": "pf-m-expand-top",
|
|
6739
|
+
"overpassFont": "pf-m-overpass-font"
|
|
6740
|
+
}
|
|
6741
|
+
};
|
|
6742
|
+
|
|
6743
|
+
class ExpandableSection extends React.Component {
|
|
6744
|
+
constructor(props) {
|
|
6745
|
+
super(props);
|
|
6746
|
+
this.state = {
|
|
6747
|
+
isExpanded: props.isExpanded
|
|
6748
|
+
};
|
|
6749
|
+
}
|
|
6750
|
+
calculateToggleText(toggleText, toggleTextExpanded, toggleTextCollapsed, propOrStateIsExpanded) {
|
|
6751
|
+
if (propOrStateIsExpanded && toggleTextExpanded !== '') {
|
|
6752
|
+
return toggleTextExpanded;
|
|
6753
|
+
}
|
|
6754
|
+
if (!propOrStateIsExpanded && toggleTextCollapsed !== '') {
|
|
6755
|
+
return toggleTextCollapsed;
|
|
6756
|
+
}
|
|
6757
|
+
return toggleText;
|
|
6758
|
+
}
|
|
6759
|
+
render() {
|
|
6760
|
+
const _a = this.props, { onToggle: onToggleProp,
|
|
6761
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6762
|
+
isActive, className, toggleText, toggleTextExpanded, toggleTextCollapsed, children, isExpanded, isDetached, contentId } = _a, props = __rest$2(_a, ["onToggle", "isActive", "className", "toggleText", "toggleTextExpanded", "toggleTextCollapsed", "children", "isExpanded", "isDetached", "contentId"]);
|
|
6763
|
+
let onToggle = onToggleProp;
|
|
6764
|
+
let propOrStateIsExpanded = isExpanded;
|
|
6765
|
+
// uncontrolled
|
|
6766
|
+
if (isExpanded === undefined) {
|
|
6767
|
+
propOrStateIsExpanded = this.state.isExpanded;
|
|
6768
|
+
onToggle = isOpen => {
|
|
6769
|
+
this.setState({ isExpanded: isOpen }, () => onToggleProp(this.state.isExpanded));
|
|
6770
|
+
};
|
|
6771
|
+
}
|
|
6772
|
+
const computedToggleText = this.calculateToggleText(toggleText, toggleTextExpanded, toggleTextCollapsed, propOrStateIsExpanded);
|
|
6773
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(_default$9.expandableSection, propOrStateIsExpanded && _default$9.modifiers.expanded, isActive && _default$9.modifiers.active, isDetached && _default$9.modifiers.detached, className) }),
|
|
6774
|
+
!isDetached && (React.createElement("button", { className: css(_default$9.expandableSectionToggle), type: "button", "aria-expanded": propOrStateIsExpanded, onClick: () => onToggle(!propOrStateIsExpanded) },
|
|
6775
|
+
React.createElement("span", { className: css(_default$9.expandableSectionToggleIcon) },
|
|
6776
|
+
React.createElement(AngleRightIcon, { "aria-hidden": true })),
|
|
6777
|
+
React.createElement("span", { className: css(_default$9.expandableSectionToggleText) }, computedToggleText))),
|
|
6778
|
+
React.createElement("div", { className: css(_default$9.expandableSectionContent), hidden: !propOrStateIsExpanded, id: contentId }, children)));
|
|
6779
|
+
}
|
|
6780
|
+
}
|
|
6781
|
+
ExpandableSection.displayName = 'ExpandableSection';
|
|
6782
|
+
ExpandableSection.defaultProps = {
|
|
6783
|
+
className: '',
|
|
6784
|
+
toggleText: '',
|
|
6785
|
+
toggleTextExpanded: '',
|
|
6786
|
+
toggleTextCollapsed: '',
|
|
6787
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6788
|
+
onToggle: (isExpanded) => undefined,
|
|
6789
|
+
isActive: false,
|
|
6790
|
+
isDetached: false,
|
|
6791
|
+
contentId: ''
|
|
6792
|
+
};
|
|
6793
|
+
|
|
6726
6794
|
/*
|
|
6727
6795
|
object-assign
|
|
6728
6796
|
(c) Sindre Sorhus
|
|
@@ -6926,39 +6994,39 @@ var checkPropTypes_1 = checkPropTypes;
|
|
|
6926
6994
|
|
|
6927
6995
|
const ActionGroup = (_a) => {
|
|
6928
6996
|
var { children = null, className = '' } = _a, props = __rest$2(_a, ["children", "className"]);
|
|
6929
|
-
const customClassName = css(_default$
|
|
6930
|
-
const formActionsComponent = React.createElement("div", { className: css(_default$
|
|
6997
|
+
const customClassName = css(_default$i.formGroup, _default$i.modifiers.action, className);
|
|
6998
|
+
const formActionsComponent = React.createElement("div", { className: css(_default$i.formActions) }, children);
|
|
6931
6999
|
return (React.createElement("div", Object.assign({}, props, { className: customClassName }),
|
|
6932
|
-
React.createElement("div", { className: css(_default$
|
|
7000
|
+
React.createElement("div", { className: css(_default$i.formGroupControl) }, formActionsComponent)));
|
|
6933
7001
|
};
|
|
6934
7002
|
ActionGroup.displayName = 'ActionGroup';
|
|
6935
7003
|
|
|
6936
7004
|
const Form = (_a) => {
|
|
6937
7005
|
var { children = null, className = '', isHorizontal = false, isWidthLimited = false } = _a, props = __rest$2(_a, ["children", "className", "isHorizontal", "isWidthLimited"]);
|
|
6938
|
-
return (React.createElement("form", Object.assign({ noValidate: true }, props, { className: css(_default$
|
|
7006
|
+
return (React.createElement("form", Object.assign({ noValidate: true }, props, { className: css(_default$i.form, isHorizontal && _default$i.modifiers.horizontal, isWidthLimited && _default$i.modifiers.limitWidth, className) }), children));
|
|
6939
7007
|
};
|
|
6940
7008
|
Form.displayName = 'Form';
|
|
6941
7009
|
|
|
6942
7010
|
const FormGroup = (_a) => {
|
|
6943
7011
|
var { children = null, className = '', label, labelIcon, isRequired = false, validated = 'default', isInline = false, hasNoPaddingTop = false, isStack = false, helperText, isHelperTextBeforeField = false, helperTextInvalid, helperTextIcon, helperTextInvalidIcon, fieldId } = _a, props = __rest$2(_a, ["children", "className", "label", "labelIcon", "isRequired", "validated", "isInline", "hasNoPaddingTop", "isStack", "helperText", "isHelperTextBeforeField", "helperTextInvalid", "helperTextIcon", "helperTextInvalidIcon", "fieldId"]);
|
|
6944
|
-
const validHelperText = typeof helperText !== 'string' ? (helperText) : (React.createElement("div", { className: css(_default$
|
|
6945
|
-
helperTextIcon && React.createElement("span", { className: css(_default$
|
|
7012
|
+
const validHelperText = typeof helperText !== 'string' ? (helperText) : (React.createElement("div", { className: css(_default$i.formHelperText, validated === ValidatedOptions.success && _default$i.modifiers.success, validated === ValidatedOptions.warning && _default$i.modifiers.warning), id: `${fieldId}-helper`, "aria-live": "polite" },
|
|
7013
|
+
helperTextIcon && React.createElement("span", { className: css(_default$i.formHelperTextIcon) }, helperTextIcon),
|
|
6946
7014
|
helperText));
|
|
6947
|
-
const inValidHelperText = typeof helperTextInvalid !== 'string' ? (helperTextInvalid) : (React.createElement("div", { className: css(_default$
|
|
6948
|
-
helperTextInvalidIcon && React.createElement("span", { className: css(_default$
|
|
7015
|
+
const inValidHelperText = typeof helperTextInvalid !== 'string' ? (helperTextInvalid) : (React.createElement("div", { className: css(_default$i.formHelperText, _default$i.modifiers.error), id: `${fieldId}-helper`, "aria-live": "polite" },
|
|
7016
|
+
helperTextInvalidIcon && React.createElement("span", { className: css(_default$i.formHelperTextIcon) }, helperTextInvalidIcon),
|
|
6949
7017
|
helperTextInvalid));
|
|
6950
7018
|
const showValidHelperTxt = (validationType) => validationType !== ValidatedOptions.error && helperText ? validHelperText : '';
|
|
6951
7019
|
const helperTextToDisplay = validated === ValidatedOptions.error && helperTextInvalid ? inValidHelperText : showValidHelperTxt(validated);
|
|
6952
|
-
return (React.createElement("div", Object.assign({}, props, { className: css(_default$
|
|
6953
|
-
label && (React.createElement("div", { className: css(_default$
|
|
6954
|
-
React.createElement("label", { className: css(_default$
|
|
6955
|
-
React.createElement("span", { className: css(_default$
|
|
6956
|
-
isRequired && (React.createElement("span", { className: css(_default$
|
|
7020
|
+
return (React.createElement("div", Object.assign({}, props, { className: css(_default$i.formGroup, className) }),
|
|
7021
|
+
label && (React.createElement("div", { className: css(_default$i.formGroupLabel, hasNoPaddingTop && _default$i.modifiers.noPaddingTop) },
|
|
7022
|
+
React.createElement("label", { className: css(_default$i.formLabel), htmlFor: fieldId },
|
|
7023
|
+
React.createElement("span", { className: css(_default$i.formLabelText) }, label),
|
|
7024
|
+
isRequired && (React.createElement("span", { className: css(_default$i.formLabelRequired), "aria-hidden": "true" },
|
|
6957
7025
|
' ',
|
|
6958
7026
|
ASTERISK))),
|
|
6959
7027
|
' ',
|
|
6960
7028
|
React.isValidElement(labelIcon) && labelIcon)),
|
|
6961
|
-
React.createElement("div", { className: css(_default$
|
|
7029
|
+
React.createElement("div", { className: css(_default$i.formGroupControl, isInline && _default$i.modifiers.inline, isStack && _default$i.modifiers.stack) },
|
|
6962
7030
|
isHelperTextBeforeField && helperTextToDisplay,
|
|
6963
7031
|
children,
|
|
6964
7032
|
!isHelperTextBeforeField && helperTextToDisplay)));
|
|
@@ -7065,6 +7133,14 @@ const List = (_a) => {
|
|
|
7065
7133
|
};
|
|
7066
7134
|
List.displayName = 'List';
|
|
7067
7135
|
|
|
7136
|
+
const ListItem = (_a) => {
|
|
7137
|
+
var { icon = null, children = null } = _a, props = __rest$2(_a, ["icon", "children"]);
|
|
7138
|
+
return (React.createElement("li", Object.assign({ className: css(icon && _default$7.listItem) }, props),
|
|
7139
|
+
icon && React.createElement("span", { className: css(_default$7.listItemIcon) }, icon),
|
|
7140
|
+
children));
|
|
7141
|
+
};
|
|
7142
|
+
ListItem.displayName = 'ListItem';
|
|
7143
|
+
|
|
7068
7144
|
var _default$6 = {
|
|
7069
7145
|
"button": "pf-c-button",
|
|
7070
7146
|
"modalBox": "pf-c-modal-box",
|
|
@@ -7161,7 +7237,7 @@ const ModalBoxTitle = (_a) => {
|
|
|
7161
7237
|
}, []);
|
|
7162
7238
|
const content = (React.createElement("h1", Object.assign({ id: id, ref: h1, className: css(_default$6.modalBoxTitle, titleIconVariant && _default$6.modifiers.icon, className) }, props),
|
|
7163
7239
|
titleIconVariant && (React.createElement("span", { className: css(_default$6.modalBoxTitleIcon) }, isVariantIcon(titleIconVariant) ? variantIcons[titleIconVariant] : React.createElement(CustomIcon, null))),
|
|
7164
|
-
label && React.createElement("span", { className: css(_default$
|
|
7240
|
+
label && React.createElement("span", { className: css(_default$p.screenReader) }, label),
|
|
7165
7241
|
React.createElement("span", { className: css(_default$6.modalBoxTitleText) }, title)));
|
|
7166
7242
|
return isTooltipVisible ? (React.createElement(Tooltip, { content: title, isVisible: true }, content)) : (content);
|
|
7167
7243
|
};
|
|
@@ -7201,7 +7277,7 @@ const ModalContent = (_a) => {
|
|
|
7201
7277
|
modalBody,
|
|
7202
7278
|
modalBoxFooter));
|
|
7203
7279
|
return (React.createElement(Backdrop, null,
|
|
7204
|
-
React.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true }, className: css(_default$
|
|
7280
|
+
React.createElement(FocusTrap, { active: !disableFocusTrap, focusTrapOptions: { clickOutsideDeactivates: true }, className: css(_default$v.bullseye) }, modalBox)));
|
|
7205
7281
|
};
|
|
7206
7282
|
ModalContent.displayName = 'ModalContent';
|
|
7207
7283
|
|
|
@@ -7260,10 +7336,10 @@ class Modal$1 extends React.Component {
|
|
|
7260
7336
|
target.appendChild(container);
|
|
7261
7337
|
target.addEventListener('keydown', this.handleEscKeyClick, false);
|
|
7262
7338
|
if (this.props.isOpen) {
|
|
7263
|
-
target.classList.add(css(_default$
|
|
7339
|
+
target.classList.add(css(_default$w.backdropOpen));
|
|
7264
7340
|
}
|
|
7265
7341
|
else {
|
|
7266
|
-
target.classList.remove(css(_default$
|
|
7342
|
+
target.classList.remove(css(_default$w.backdropOpen));
|
|
7267
7343
|
}
|
|
7268
7344
|
if (this.isEmpty(title) && this.isEmpty(ariaLabel) && this.isEmpty(ariaLabelledby)) {
|
|
7269
7345
|
// eslint-disable-next-line no-console
|
|
@@ -7278,11 +7354,11 @@ class Modal$1 extends React.Component {
|
|
|
7278
7354
|
const { appendTo } = this.props;
|
|
7279
7355
|
const target = this.getElement(appendTo);
|
|
7280
7356
|
if (this.props.isOpen) {
|
|
7281
|
-
target.classList.add(css(_default$
|
|
7357
|
+
target.classList.add(css(_default$w.backdropOpen));
|
|
7282
7358
|
this.toggleSiblingsFromScreenReaders(true);
|
|
7283
7359
|
}
|
|
7284
7360
|
else {
|
|
7285
|
-
target.classList.remove(css(_default$
|
|
7361
|
+
target.classList.remove(css(_default$w.backdropOpen));
|
|
7286
7362
|
this.toggleSiblingsFromScreenReaders(false);
|
|
7287
7363
|
}
|
|
7288
7364
|
}
|
|
@@ -7293,7 +7369,7 @@ class Modal$1 extends React.Component {
|
|
|
7293
7369
|
target.removeChild(this.state.container);
|
|
7294
7370
|
}
|
|
7295
7371
|
target.removeEventListener('keydown', this.handleEscKeyClick, false);
|
|
7296
|
-
target.classList.remove(css(_default$
|
|
7372
|
+
target.classList.remove(css(_default$w.backdropOpen));
|
|
7297
7373
|
}
|
|
7298
7374
|
render() {
|
|
7299
7375
|
const _a = this.props, {
|
|
@@ -7353,7 +7429,7 @@ const Text = (_a) => {
|
|
|
7353
7429
|
var { children = null, className = '', component = TextVariants.p, isVisitedLink = false, ouiaId, ouiaSafe = true } = _a, props = __rest$2(_a, ["children", "className", "component", "isVisitedLink", "ouiaId", "ouiaSafe"]);
|
|
7354
7430
|
const Component = component;
|
|
7355
7431
|
const ouiaProps = useOUIAProps$1(Text.displayName, ouiaId, ouiaSafe);
|
|
7356
|
-
return (React.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(isVisitedLink && component === TextVariants.a && _default$
|
|
7432
|
+
return (React.createElement(Component, Object.assign({}, ouiaProps, props, { "data-pf-content": true, className: css(isVisitedLink && component === TextVariants.a && _default$u.modifiers.visited, className) }), children));
|
|
7357
7433
|
};
|
|
7358
7434
|
Text.displayName = 'Text';
|
|
7359
7435
|
|
|
@@ -8730,6 +8806,7 @@ var en = {
|
|
|
8730
8806
|
"{{count, number}} item": "{{count, number}} item",
|
|
8731
8807
|
"{{count, number}} item_plural": "{{count, number}} items",
|
|
8732
8808
|
"Prerequisites ({{totalPrereqs}})": "Prerequisites ({{totalPrereqs}})",
|
|
8809
|
+
"View Prerequisites ({{totalPrereqs}})": "View Prerequisites ({{totalPrereqs}})",
|
|
8733
8810
|
Prerequisites: Prerequisites,
|
|
8734
8811
|
"Show prerequisites": "Show prerequisites",
|
|
8735
8812
|
Complete: Complete,
|
|
@@ -9169,6 +9246,7 @@ const QuickStartContextDefaults = {
|
|
|
9169
9246
|
footer: null,
|
|
9170
9247
|
markdown: null,
|
|
9171
9248
|
loading: false,
|
|
9249
|
+
alwaysShowTaskReview: false,
|
|
9172
9250
|
};
|
|
9173
9251
|
const QuickStartContext = createContext(QuickStartContextDefaults);
|
|
9174
9252
|
const getResource = (resource, options, resourceBundle, lng) => {
|
|
@@ -9196,6 +9274,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9196
9274
|
return getResource(resource, count !== undefined ? { count } : null, resourceBundle, language);
|
|
9197
9275
|
}, [resourceBundle, language]);
|
|
9198
9276
|
const [loading, setLoading] = React__default.useState(combinedValue.loading);
|
|
9277
|
+
const [alwaysShowTaskReview, setAlwaysShowTaskReview] = React__default.useState(combinedValue.alwaysShowTaskReview);
|
|
9199
9278
|
const initialSearchParams = new URLSearchParams(window.location.search);
|
|
9200
9279
|
const initialSearchQuery = initialSearchParams.get(QUICKSTART_SEARCH_FILTER_KEY) || '';
|
|
9201
9280
|
const initialStatusFilters = ((_a = initialSearchParams.get(QUICKSTART_STATUS_FILTER_KEY)) === null || _a === void 0 ? void 0 : _a.split(',')) || [];
|
|
@@ -9266,6 +9345,10 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9266
9345
|
});
|
|
9267
9346
|
setAllQuickStartStates((qs) => (Object.assign(Object.assign({}, qs), { [quickStartId]: getDefaultQuickStartState(totalTasks, QuickStartStatus.IN_PROGRESS) })));
|
|
9268
9347
|
}, [setActiveQuickStartID, setAllQuickStartStates, useQueryParams]);
|
|
9348
|
+
// When alwaysShowTaskReview preference is enabled, skip visited step and go directly to review
|
|
9349
|
+
const stepAfterInitial = alwaysShowTaskReview
|
|
9350
|
+
? QuickStartTaskStatus.REVIEW
|
|
9351
|
+
: QuickStartTaskStatus.VISITED;
|
|
9269
9352
|
const nextStep = useCallback((totalTasks) => {
|
|
9270
9353
|
if (!activeQuickStartID) {
|
|
9271
9354
|
return;
|
|
@@ -9292,19 +9375,19 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9292
9375
|
if (taskNumber < totalTasks && !updatedTaskStatus) {
|
|
9293
9376
|
updatedTaskNumber = taskNumber + 1;
|
|
9294
9377
|
}
|
|
9295
|
-
const
|
|
9378
|
+
const markInitialStepVisitedOrReview = updatedTaskNumber > -1 &&
|
|
9296
9379
|
quickStart[getTaskStatusKey(updatedTaskNumber)] === QuickStartTaskStatus.INIT
|
|
9297
|
-
?
|
|
9380
|
+
? stepAfterInitial
|
|
9298
9381
|
: quickStart[getTaskStatusKey(updatedTaskNumber)];
|
|
9299
9382
|
const newState = Object.assign(Object.assign({}, qs), { [activeQuickStartID]: Object.assign(Object.assign(Object.assign(Object.assign({}, quickStart), (updatedStatus ? { status: updatedStatus } : {})), (updatedTaskNumber > -1
|
|
9300
9383
|
? {
|
|
9301
9384
|
taskNumber: updatedTaskNumber,
|
|
9302
|
-
[getTaskStatusKey(updatedTaskNumber)]:
|
|
9385
|
+
[getTaskStatusKey(updatedTaskNumber)]: markInitialStepVisitedOrReview,
|
|
9303
9386
|
}
|
|
9304
9387
|
: {})), (updatedTaskStatus ? { [getTaskStatusKey(taskNumber)]: updatedTaskStatus } : {})) });
|
|
9305
9388
|
return newState;
|
|
9306
9389
|
});
|
|
9307
|
-
}, [activeQuickStartID, setAllQuickStartStates]);
|
|
9390
|
+
}, [activeQuickStartID, setAllQuickStartStates, stepAfterInitial]);
|
|
9308
9391
|
const previousStep = useCallback(() => {
|
|
9309
9392
|
setAllQuickStartStates((qs) => {
|
|
9310
9393
|
const quickStart = qs[activeQuickStartID];
|
|
@@ -9326,7 +9409,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9326
9409
|
let updatedTaskStatus = {};
|
|
9327
9410
|
for (let taskIndex = 0; taskIndex <= taskNumber; taskIndex++) {
|
|
9328
9411
|
const taskStatus = quickStart[getTaskStatusKey(taskIndex)];
|
|
9329
|
-
const newTaskStatus = taskStatus === QuickStartTaskStatus.INIT ?
|
|
9412
|
+
const newTaskStatus = taskStatus === QuickStartTaskStatus.INIT ? stepAfterInitial : undefined;
|
|
9330
9413
|
if (newTaskStatus) {
|
|
9331
9414
|
updatedTaskStatus = Object.assign(Object.assign({}, updatedTaskStatus), { [getTaskStatusKey(taskIndex)]: newTaskStatus });
|
|
9332
9415
|
}
|
|
@@ -9334,7 +9417,7 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9334
9417
|
const updatedQuickStart = Object.assign(Object.assign(Object.assign(Object.assign({}, quickStart), (updatedStatus ? { status: updatedStatus } : {})), { taskNumber }), updatedTaskStatus);
|
|
9335
9418
|
return Object.assign(Object.assign({}, qs), { [quickStartId]: updatedQuickStart });
|
|
9336
9419
|
});
|
|
9337
|
-
}, [setAllQuickStartStates]);
|
|
9420
|
+
}, [setAllQuickStartStates, stepAfterInitial]);
|
|
9338
9421
|
const setQuickStartTaskStatus = useCallback((taskStatus) => {
|
|
9339
9422
|
const quickStart = allQuickStartStates[activeQuickStartID];
|
|
9340
9423
|
const { taskNumber } = quickStart;
|
|
@@ -9380,6 +9463,8 @@ const useValuesForQuickStartContext = (value = {}) => {
|
|
|
9380
9463
|
setFilter,
|
|
9381
9464
|
loading,
|
|
9382
9465
|
setLoading,
|
|
9466
|
+
alwaysShowTaskReview,
|
|
9467
|
+
setAlwaysShowTaskReview,
|
|
9383
9468
|
};
|
|
9384
9469
|
};
|
|
9385
9470
|
const QuickStartContextProvider = ({ children, value }) => {
|
|
@@ -9515,10 +9600,10 @@ const Spinner = (_a) => {
|
|
|
9515
9600
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
9516
9601
|
className = '', size = 'xl', 'aria-valuetext': ariaValueText = 'Loading...', isSVG = false, diameter } = _a, props = __rest(_a, ["className", "size", 'aria-valuetext', "isSVG", "diameter"]);
|
|
9517
9602
|
const Component = isSVG ? 'svg' : 'span';
|
|
9518
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
9519
|
-
React.createElement("span", { className: css(_default$
|
|
9520
|
-
React.createElement("span", { className: css(_default$
|
|
9521
|
-
React.createElement("span", { className: css(_default$
|
|
9603
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$r.spinner, _default$r.modifiers[size], className), role: "progressbar", "aria-valuetext": ariaValueText }, (isSVG && { viewBox: '0 0 100 100' }), (diameter && { style: { '--pf-c-spinner--diameter': diameter } }), props), isSVG ? (React.createElement("circle", { className: _default$r.spinnerPath, cx: "50", cy: "50", r: "45", fill: "none" })) : (React.createElement(React.Fragment, null,
|
|
9604
|
+
React.createElement("span", { className: css(_default$r.spinnerClipper) }),
|
|
9605
|
+
React.createElement("span", { className: css(_default$r.spinnerLeadBall) }),
|
|
9606
|
+
React.createElement("span", { className: css(_default$r.spinnerTailBall) })))));
|
|
9522
9607
|
};
|
|
9523
9608
|
Spinner.displayName = 'Spinner';
|
|
9524
9609
|
|
|
@@ -9559,12 +9644,12 @@ const ButtonBase = (_a) => {
|
|
|
9559
9644
|
return 0;
|
|
9560
9645
|
}
|
|
9561
9646
|
};
|
|
9562
|
-
return (React.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(_default$
|
|
9563
|
-
isLoading && (React.createElement("span", { className: css(_default$
|
|
9647
|
+
return (React.createElement(Component, Object.assign({}, props, (isAriaDisabled ? preventedEvents : null), { "aria-disabled": isDisabled || isAriaDisabled, "aria-label": ariaLabel, className: css(_default$s.button, _default$s.modifiers[variant], isBlock && _default$s.modifiers.block, isDisabled && _default$s.modifiers.disabled, isAriaDisabled && _default$s.modifiers.ariaDisabled, isActive && _default$s.modifiers.active, isInline && variant === ButtonVariant.link && _default$s.modifiers.inline, isDanger && (variant === ButtonVariant.secondary || variant === ButtonVariant.link) && _default$s.modifiers.danger, isLoading !== null && _default$s.modifiers.progress, isLoading && _default$s.modifiers.inProgress, isSmall && _default$s.modifiers.small, isLarge && _default$s.modifiers.displayLg, className), disabled: isButtonElement ? isDisabled : null, tabIndex: tabIndex !== null ? tabIndex : getDefaultTabIdx(), type: isButtonElement || isInlineSpan ? type : null, role: isInlineSpan ? 'button' : null, ref: innerRef }, ouiaProps),
|
|
9648
|
+
isLoading && (React.createElement("span", { className: css(_default$s.buttonProgress) },
|
|
9564
9649
|
React.createElement(Spinner, { size: spinnerSize.md, "aria-valuetext": spinnerAriaValueText }))),
|
|
9565
|
-
variant !== ButtonVariant.plain && icon && iconPosition === 'left' && (React.createElement("span", { className: css(_default$
|
|
9650
|
+
variant !== ButtonVariant.plain && icon && iconPosition === 'left' && (React.createElement("span", { className: css(_default$s.buttonIcon, _default$s.modifiers.start) }, icon)),
|
|
9566
9651
|
children,
|
|
9567
|
-
variant !== ButtonVariant.plain && icon && iconPosition === 'right' && (React.createElement("span", { className: css(_default$
|
|
9652
|
+
variant !== ButtonVariant.plain && icon && iconPosition === 'right' && (React.createElement("span", { className: css(_default$s.buttonIcon, _default$s.modifiers.end) }, icon))));
|
|
9568
9653
|
};
|
|
9569
9654
|
const Button = React.forwardRef((props, ref) => (React.createElement(ButtonBase, Object.assign({ innerRef: ref }, props))));
|
|
9570
9655
|
Button.displayName = 'Button';
|
|
@@ -9586,47 +9671,47 @@ const Card = (_a) => {
|
|
|
9586
9671
|
cardId: id,
|
|
9587
9672
|
isExpanded
|
|
9588
9673
|
} },
|
|
9589
|
-
React.createElement(Component, Object.assign({ id: id, className: css(_default$
|
|
9674
|
+
React.createElement(Component, Object.assign({ id: id, className: css(_default$e.card, isHoverable && _default$e.modifiers.hoverable, isCompact && _default$e.modifiers.compact, isSelectable && _default$e.modifiers.selectable, isSelected && isSelectable && _default$e.modifiers.selected, isExpanded && _default$e.modifiers.expanded, isFlat && _default$e.modifiers.flat, isRounded && _default$e.modifiers.rounded, isLarge && _default$e.modifiers.displayLg, isFullHeight && _default$e.modifiers.fullHeight, isPlain && _default$e.modifiers.plain, className), tabIndex: isSelectable ? '0' : undefined }, props, ouiaProps), children)));
|
|
9590
9675
|
};
|
|
9591
9676
|
Card.displayName = 'Card';
|
|
9592
9677
|
|
|
9593
9678
|
const CardActions = (_a) => {
|
|
9594
9679
|
var { children = null, className = '', hasNoOffset = false } = _a, props = __rest(_a, ["children", "className", "hasNoOffset"]);
|
|
9595
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
9680
|
+
return (React.createElement("div", Object.assign({ className: css(_default$e.cardActions, hasNoOffset && _default$e.modifiers.noOffset, className) }, props), children));
|
|
9596
9681
|
};
|
|
9597
9682
|
CardActions.displayName = 'CardActions';
|
|
9598
9683
|
|
|
9599
9684
|
const CardBody = (_a) => {
|
|
9600
9685
|
var { children = null, className = '', component = 'div', isFilled = true } = _a, props = __rest(_a, ["children", "className", "component", "isFilled"]);
|
|
9601
9686
|
const Component = component;
|
|
9602
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
9687
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$e.cardBody, !isFilled && _default$e.modifiers.noFill, className) }, props), children));
|
|
9603
9688
|
};
|
|
9604
9689
|
CardBody.displayName = 'CardBody';
|
|
9605
9690
|
|
|
9606
9691
|
const CardFooter = (_a) => {
|
|
9607
9692
|
var { children = null, className = '', component = 'div' } = _a, props = __rest(_a, ["children", "className", "component"]);
|
|
9608
9693
|
const Component = component;
|
|
9609
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
9694
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$e.cardFooter, className) }, props), children));
|
|
9610
9695
|
};
|
|
9611
9696
|
CardFooter.displayName = 'CardFooter';
|
|
9612
9697
|
|
|
9613
9698
|
const CardTitle = (_a) => {
|
|
9614
9699
|
var { children = null, className = '', component = 'div' } = _a, props = __rest(_a, ["children", "className", "component"]);
|
|
9615
9700
|
const Component = component;
|
|
9616
|
-
return (React.createElement(Component, Object.assign({ className: css(_default$
|
|
9701
|
+
return (React.createElement(Component, Object.assign({ className: css(_default$e.cardTitle, className) }, props), children));
|
|
9617
9702
|
};
|
|
9618
9703
|
CardTitle.displayName = 'CardTitle';
|
|
9619
9704
|
|
|
9620
9705
|
const CardHeader = (_a) => {
|
|
9621
9706
|
var { children = null, className = '', id, onExpand, toggleButtonProps, isToggleRightAligned } = _a, props = __rest(_a, ["children", "className", "id", "onExpand", "toggleButtonProps", "isToggleRightAligned"]);
|
|
9622
9707
|
return (React.createElement(CardContext.Consumer, null, ({ cardId }) => {
|
|
9623
|
-
const cardHeaderToggle = (React.createElement("div", { className: css(_default$
|
|
9708
|
+
const cardHeaderToggle = (React.createElement("div", { className: css(_default$e.cardHeaderToggle) },
|
|
9624
9709
|
React.createElement(Button, Object.assign({ variant: "plain", type: "button", onClick: evt => {
|
|
9625
9710
|
onExpand(evt, cardId);
|
|
9626
9711
|
} }, toggleButtonProps),
|
|
9627
|
-
React.createElement("span", { className: css(_default$
|
|
9712
|
+
React.createElement("span", { className: css(_default$e.cardHeaderToggleIcon) },
|
|
9628
9713
|
React.createElement(AngleRightIcon, { "aria-hidden": "true" })))));
|
|
9629
|
-
return (React.createElement("div", Object.assign({ className: css(_default$
|
|
9714
|
+
return (React.createElement("div", Object.assign({ className: css(_default$e.cardHeader, isToggleRightAligned && _default$e.modifiers.toggleRight, className), id: id }, props),
|
|
9630
9715
|
onExpand && !isToggleRightAligned && cardHeaderToggle,
|
|
9631
9716
|
children,
|
|
9632
9717
|
onExpand && isToggleRightAligned && cardHeaderToggle));
|
|
@@ -9773,7 +9858,7 @@ const SimplePopper = ({ children }) => {
|
|
|
9773
9858
|
}
|
|
9774
9859
|
}, [destroy, isOpen]);
|
|
9775
9860
|
return isOpen ? (React.createElement(Portal, null,
|
|
9776
|
-
React.createElement("div", { ref: nodeRefCallback, style: { zIndex: 9999, position: 'absolute', top: 0, left: 0 } }, children))) : null;
|
|
9861
|
+
React.createElement("div", { ref: nodeRefCallback, style: { zIndex: 9999, position: 'absolute', top: 0, left: 0 }, className: "pfext-quick-start__base" }, children))) : null;
|
|
9777
9862
|
};
|
|
9778
9863
|
|
|
9779
9864
|
const isInViewport = (elementToCheck) => {
|
|
@@ -10016,7 +10101,7 @@ const CopyClipboard = ({ element, rootSelector, docContext, }) => {
|
|
|
10016
10101
|
useEventListener(element, 'mouseleave', React.useCallback(() => {
|
|
10017
10102
|
setShowSuccessContent(false);
|
|
10018
10103
|
}, []));
|
|
10019
|
-
return showSuccessContent ? (React.createElement(Tooltip, { key: "after-copy", isVisible: true, reference: () => element, content: getResource('Successfully copied to clipboard!') })) : (React.createElement(Tooltip, { key: "before-copy", reference: () => element, content: getResource('Copy to clipboard') }));
|
|
10104
|
+
return showSuccessContent ? (React.createElement(Tooltip, { key: "after-copy", isVisible: true, reference: () => element, content: getResource('Successfully copied to clipboard!'), className: "pfext-quick-start__base" })) : (React.createElement(Tooltip, { key: "before-copy", reference: () => element, content: getResource('Copy to clipboard'), className: "pfext-quick-start__base" }));
|
|
10020
10105
|
};
|
|
10021
10106
|
const MarkdownCopyClipboard = ({ docContext, rootSelector, }) => {
|
|
10022
10107
|
const elements = docContext.querySelectorAll(`${rootSelector} [${MARKDOWN_COPY_BUTTON_ID}]`);
|
|
@@ -18991,10 +19076,11 @@ const QuickStartTileDescription = ({ description, prerequisites, }) => {
|
|
|
18991
19076
|
React.createElement(Text, { component: TextVariants.h5, className: "pfext-quick-start-tile-prerequisites__text" },
|
|
18992
19077
|
getResource('Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length),
|
|
18993
19078
|
' '),
|
|
18994
|
-
React.createElement(Popover, { "aria-label": getResource('Prerequisites'), headerContent: getResource('Prerequisites'), className: "pfext-
|
|
18995
|
-
|
|
18996
|
-
|
|
18997
|
-
React.createElement(
|
|
19079
|
+
React.createElement(Popover, { "aria-label": getResource('Prerequisites'), headerContent: getResource('Prerequisites'), className: "pfext-quick-start__base", bodyContent: React.createElement("div", { className: "pfext-popover__base" },
|
|
19080
|
+
React.createElement(TextList, { "aria-label": getResource('Prerequisites'), className: "pfext-quick-start-tile-prerequisites-list" }, prereqs.map((prerequisite, index) => (
|
|
19081
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
19082
|
+
React.createElement(TextListItem, { key: index },
|
|
19083
|
+
React.createElement(QuickStartMarkdownView, { content: prerequisite })))))) },
|
|
18998
19084
|
React.createElement(Button$1, { variant: "link", isInline: true, className: "pfext-quick-start-tile-prerequisites__icon", "data-testid": "qs-card-prereqs", onClick: (e) => {
|
|
18999
19085
|
e.preventDefault();
|
|
19000
19086
|
e.stopPropagation();
|
|
@@ -19017,13 +19103,13 @@ const QuickStartTileFooter = ({ quickStartId, status, totalTasks, }) => {
|
|
|
19017
19103
|
}, [quickStartId, restartQuickStart, totalTasks]);
|
|
19018
19104
|
return (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
19019
19105
|
status === QuickStartStatus.NOT_STARTED && (React.createElement(FlexItem, null,
|
|
19020
|
-
React.createElement(Button$1, { onClick: start, variant: "link", isInline: true, "data-testid": "qs-card-notStarted-start" }, getResource('Start')))),
|
|
19106
|
+
React.createElement(Button$1, { onClick: start, variant: "link", isInline: true, "data-testid": "qs-card-notStarted-start", id: `${quickStartId}-start`, "aria-labelledby": `${quickStartId}-start ${quickStartId}` }, getResource('Start')))),
|
|
19021
19107
|
status === QuickStartStatus.IN_PROGRESS && activeQuickStartID !== quickStartId && (React.createElement(FlexItem, null,
|
|
19022
|
-
React.createElement(Button$1, { variant: "link", isInline: true, "data-testid": "qs-card-inProgress-resume" }, getResource('Continue')))),
|
|
19108
|
+
React.createElement(Button$1, { variant: "link", isInline: true, "data-testid": "qs-card-inProgress-resume", id: `${quickStartId}-continue`, "aria-labelledby": `${quickStartId}-continue ${quickStartId}` }, getResource('Continue')))),
|
|
19023
19109
|
status === QuickStartStatus.COMPLETE && (React.createElement(FlexItem, null,
|
|
19024
|
-
React.createElement(Button$1, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-complete-restart" }, getResource('
|
|
19110
|
+
React.createElement(Button$1, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-complete-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, getResource('Restart')))),
|
|
19025
19111
|
status === QuickStartStatus.IN_PROGRESS && (React.createElement(FlexItem, null,
|
|
19026
|
-
React.createElement(Button$1, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-inProgress-restart" }, getResource('Restart'))))));
|
|
19112
|
+
React.createElement(Button$1, { onClick: restart, variant: "link", isInline: true, "data-testid": "qs-card-inProgress-restart", id: `${quickStartId}-restart`, "aria-labelledby": `${quickStartId}-restart ${quickStartId}` }, getResource('Restart'))))));
|
|
19027
19113
|
};
|
|
19028
19114
|
|
|
19029
19115
|
var externalLinkAltIcon = createCommonjsModule(function (module, exports) {
|
|
@@ -19042,11 +19128,11 @@ exports["default"] = exports.ExternalLinkAltIcon;
|
|
|
19042
19128
|
|
|
19043
19129
|
var ExternalLinkAltIcon = /*@__PURE__*/getDefaultExportFromCjs(externalLinkAltIcon);
|
|
19044
19130
|
|
|
19045
|
-
const QuickStartTileFooterExternal = ({ link }) => {
|
|
19131
|
+
const QuickStartTileFooterExternal = ({ link, quickStartId, }) => {
|
|
19046
19132
|
const { href, text } = link;
|
|
19047
19133
|
return (React.createElement(Flex, { justifyContent: { default: 'justifyContentSpaceBetween' } },
|
|
19048
19134
|
React.createElement(FlexItem, null,
|
|
19049
|
-
React.createElement(Button$1, { component: "a", href: href, target: "_blank", rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: React.createElement(ExternalLinkAltIcon, null), iconPosition: "right" }, text || href))));
|
|
19135
|
+
React.createElement(Button$1, { component: "a", href: href, target: "_blank", rel: "noopener noreferrer", variant: "link", "aria-label": `Open documentation in new window`, isInline: true, icon: React.createElement(ExternalLinkAltIcon, null), iconPosition: "right", id: quickStartId, "aria-labelledby": `${quickStartId}-external ${quickStartId}` }, text || href))));
|
|
19050
19136
|
};
|
|
19051
19137
|
|
|
19052
19138
|
var outlinedClockIcon = createCommonjsModule(function (module, exports) {
|
|
@@ -19070,7 +19156,7 @@ const statusColorMap = {
|
|
|
19070
19156
|
[QuickStartStatus.IN_PROGRESS]: 'purple',
|
|
19071
19157
|
[QuickStartStatus.NOT_STARTED]: 'grey',
|
|
19072
19158
|
};
|
|
19073
|
-
const QuickStartTileHeader = ({ status, duration, name, type, }) => {
|
|
19159
|
+
const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) => {
|
|
19074
19160
|
const { getResource } = React.useContext(QuickStartContext);
|
|
19075
19161
|
const statusLocaleMap = {
|
|
19076
19162
|
[QuickStartStatus.COMPLETE]: getResource('Complete'),
|
|
@@ -19078,7 +19164,7 @@ const QuickStartTileHeader = ({ status, duration, name, type, }) => {
|
|
|
19078
19164
|
[QuickStartStatus.NOT_STARTED]: getResource('Not started'),
|
|
19079
19165
|
};
|
|
19080
19166
|
return (React.createElement("div", { className: "pfext-quick-start-tile-header" },
|
|
19081
|
-
React.createElement(Title, { headingLevel: "h3", "data-test": "title" }, name),
|
|
19167
|
+
React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId }, name),
|
|
19082
19168
|
React.createElement("div", { className: "pfext-quick-start-tile-header__status" },
|
|
19083
19169
|
type && (React.createElement(Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
|
|
19084
19170
|
duration && (React.createElement(Label, { variant: "outline", "data-test": "duration", icon: React.createElement(OutlinedClockIcon, null), className: "pfext-quick-start-tile-header--margin" }, getResource('{{duration, number}} minutes', duration).replace('{{duration, number}}', duration))),
|
|
@@ -19089,8 +19175,14 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
19089
19175
|
const { metadata: { name: id }, spec: { icon, tasks, displayName, description, durationMinutes, prerequisites, link, type }, } = quickStart;
|
|
19090
19176
|
const { setActiveQuickStart, footer } = React.useContext(QuickStartContext);
|
|
19091
19177
|
const ref = React.useRef(null);
|
|
19092
|
-
|
|
19093
|
-
|
|
19178
|
+
let quickStartIcon;
|
|
19179
|
+
if (typeof icon === 'object') {
|
|
19180
|
+
quickStartIcon = icon;
|
|
19181
|
+
}
|
|
19182
|
+
else {
|
|
19183
|
+
quickStartIcon = (React.createElement(FallbackImg, { className: "pfext-catalog-item-icon__img--large", src: icon, alt: "", fallback: React.createElement(RocketIcon, null) }));
|
|
19184
|
+
}
|
|
19185
|
+
const footerComponent = footer && footer.show === false ? null : link ? (React.createElement(QuickStartTileFooterExternal, { link: link, quickStartId: id })) : (React.createElement(QuickStartTileFooter, { quickStartId: id, status: status, totalTasks: tasks === null || tasks === void 0 ? void 0 : tasks.length }));
|
|
19094
19186
|
const handleClick = (e) => {
|
|
19095
19187
|
var _a;
|
|
19096
19188
|
if ((_a = ref.current) === null || _a === void 0 ? void 0 : _a.contains(e.target)) {
|
|
@@ -19110,7 +19202,7 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
|
|
|
19110
19202
|
// @ts-ignore
|
|
19111
19203
|
component: "div", style: {
|
|
19112
19204
|
cursor: 'pointer',
|
|
19113
|
-
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type }), onClick: handleClick, "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
|
|
19205
|
+
}, icon: quickStartIcon, className: "pfext-quick-start-tile", "data-testid": `qs-card-${camelize(displayName)}`, featured: isActive, title: React.createElement(QuickStartTileHeader, { name: displayName, status: status, duration: durationMinutes, type: type, quickStartId: id }), onClick: handleClick, "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
|
|
19114
19206
|
};
|
|
19115
19207
|
|
|
19116
19208
|
const QuickStartCatalog = ({ quickStarts }) => {
|
|
@@ -19303,7 +19395,7 @@ const QuickStartCatalogPage = ({ quickStarts, showFilter, sortFnc = (q1, q2) =>
|
|
|
19303
19395
|
if (!allQuickStarts || allQuickStarts.length === 0) {
|
|
19304
19396
|
return React.createElement(EmptyBox, { label: getResource('Quick Starts') });
|
|
19305
19397
|
}
|
|
19306
|
-
return (React.createElement(
|
|
19398
|
+
return (React.createElement("div", { className: "pfext-quick-start__base" },
|
|
19307
19399
|
showTitle && (React.createElement("div", { className: "pfext-page-layout__header" },
|
|
19308
19400
|
React.createElement(Text, { component: "h1", className: "pfext-page-layout__title", "data-test": "page-title" }, title || getResource('Quick Starts')),
|
|
19309
19401
|
hint && React.createElement("div", { className: "pfext-page-layout__hint" }, hint))),
|
|
@@ -19324,7 +19416,7 @@ const QuickStartCatalogToolbar = ({ children }) => (React.createElement(Toolbar,
|
|
|
19324
19416
|
|
|
19325
19417
|
const QuickStartCloseModal = ({ isOpen, onConfirm, onCancel, }) => {
|
|
19326
19418
|
const { getResource } = React.useContext(QuickStartContext);
|
|
19327
|
-
return (React.createElement(Modal, { className: "pfext-quick-start-drawer__modal", isOpen: isOpen, variant: ModalVariant.small, showClose: false, "data-test": "leave-quickstart", title: getResource('Leave quick start?'), footer: React.createElement(Flex, null,
|
|
19419
|
+
return (React.createElement(Modal, { className: "pfext-quick-start-drawer__modal pfext-quick-start__base", isOpen: isOpen, variant: ModalVariant.small, showClose: false, "data-test": "leave-quickstart", title: getResource('Leave quick start?'), footer: React.createElement(Flex, null,
|
|
19328
19420
|
React.createElement(FlexItem, { align: { default: 'alignRight' } },
|
|
19329
19421
|
React.createElement(Button$1, { variant: "secondary", "data-test": "cancel button", onClick: onCancel }, getResource('Cancel'))),
|
|
19330
19422
|
React.createElement(FlexItem, null,
|
|
@@ -19347,58 +19439,82 @@ exports["default"] = exports.ArrowRightIcon;
|
|
|
19347
19439
|
|
|
19348
19440
|
var ArrowRightIcon = /*@__PURE__*/getDefaultExportFromCjs(arrowRightIcon);
|
|
19349
19441
|
|
|
19350
|
-
const TaskIcon = ({ taskIndex, taskStatus
|
|
19442
|
+
const TaskIcon = ({ taskIndex, taskStatus }) => {
|
|
19351
19443
|
const { getResource } = React.useContext(QuickStartContext);
|
|
19352
|
-
|
|
19353
|
-
|
|
19354
|
-
|
|
19355
|
-
|
|
19356
|
-
|
|
19357
|
-
|
|
19358
|
-
|
|
19359
|
-
|
|
19360
|
-
|
|
19444
|
+
const success = taskStatus === QuickStartTaskStatus.SUCCESS;
|
|
19445
|
+
const failed = taskStatus === QuickStartTaskStatus.FAILED;
|
|
19446
|
+
const classNames = css('pfext-icon-and-text__icon', {
|
|
19447
|
+
'pfext-quick-start-task-header__task-icon-init': !failed && !success,
|
|
19448
|
+
});
|
|
19449
|
+
let content;
|
|
19450
|
+
if (success) {
|
|
19451
|
+
content = (React.createElement(CheckCircleIcon, { size: "md", className: "pfext-quick-start-task-header__task-icon-success" }));
|
|
19452
|
+
}
|
|
19453
|
+
else if (failed) {
|
|
19454
|
+
content = (React.createElement(ExclamationCircleIcon, { size: "md", className: "pfext-quick-start-task-header__task-icon-failed" }));
|
|
19361
19455
|
}
|
|
19456
|
+
else {
|
|
19457
|
+
content = getResource('{{taskIndex, number}}', taskIndex).replace('{{taskIndex, number}}', taskIndex);
|
|
19458
|
+
}
|
|
19459
|
+
return React.createElement("span", { className: classNames }, content);
|
|
19362
19460
|
};
|
|
19363
19461
|
const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, }) => {
|
|
19364
19462
|
const classNames = css('pfext-quick-start-task-header__title', {
|
|
19365
19463
|
'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
|
|
19366
|
-
'pfext-quick-start-task-header__title-failed': taskStatus === QuickStartTaskStatus.FAILED,
|
|
19464
|
+
'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
|
|
19367
19465
|
});
|
|
19368
|
-
const
|
|
19369
|
-
|
|
19370
|
-
|
|
19371
|
-
|
|
19372
|
-
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19466
|
+
const notCompleted = taskStatus === QuickStartTaskStatus.VISITED;
|
|
19467
|
+
const skippedReviewOrFailed = taskStatus === QuickStartTaskStatus.REVIEW || taskStatus === QuickStartTaskStatus.FAILED;
|
|
19468
|
+
const tryAgain = !isActiveTask && (skippedReviewOrFailed || notCompleted) && (React.createElement(FlexItem, null,
|
|
19469
|
+
React.createElement(Title, { headingLevel: "h4", className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
|
|
19470
|
+
const content = (React.createElement(Flex, { className: "pfext-quick-start-task-header", direction: { default: 'column' }, spaceItems: { default: 'spaceItemsXs' } },
|
|
19471
|
+
React.createElement(FlexItem, null,
|
|
19472
|
+
React.createElement(Title, { headingLevel: "h3", size: size, className: classNames },
|
|
19473
|
+
React.createElement(TaskIcon, { taskIndex: taskIndex, taskStatus: taskStatus }),
|
|
19474
|
+
React.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
|
|
19475
|
+
isActiveTask && subtitle && (React.createElement(React.Fragment, null,
|
|
19476
|
+
' ',
|
|
19477
|
+
React.createElement("span", { className: "pfext-quick-start-task-header__subtitle", "data-test-id": "quick-start-task-subtitle" }, subtitle))))),
|
|
19478
|
+
tryAgain));
|
|
19479
|
+
return (React.createElement(WizardNavItem, { content: content, step: taskIndex, onNavItemClick: () => onTaskSelect(taskIndex - 1), navItemComponent: "button", isCurrent: isActiveTask }));
|
|
19376
19480
|
};
|
|
19377
19481
|
|
|
19378
19482
|
const QuickStartTaskHeaderList = ({ tasks, allTaskStatuses, onTaskSelect, }) => {
|
|
19379
19483
|
return tasks.length > 0 ? (React.createElement(List, { className: "pfext-quick-start-task-header__list" }, tasks.map((task, index) => (React.createElement(QuickStartTaskHeader, { key: task.title, title: task.title, taskIndex: index + 1, size: "md", taskStatus: allTaskStatuses[index], onTaskSelect: onTaskSelect }))))) : null;
|
|
19380
19484
|
};
|
|
19381
19485
|
|
|
19382
|
-
const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses,
|
|
19383
|
-
var _a;
|
|
19486
|
+
const QuickStartConclusion = ({ tasks, conclusion, allTaskStatuses, nextQuickStarts, onQuickStartChange, onTaskSelect, }) => {
|
|
19384
19487
|
const hasFailedTask = allTaskStatuses.includes(QuickStartTaskStatus.FAILED);
|
|
19385
|
-
const nextQSDisplayName = (_a = nextQuickStart === null || nextQuickStart === void 0 ? void 0 : nextQuickStart.spec) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
19386
19488
|
const { getResource } = React.useContext(QuickStartContext);
|
|
19387
19489
|
return (React.createElement(React.Fragment, null,
|
|
19388
19490
|
React.createElement(QuickStartTaskHeaderList, { tasks: tasks, allTaskStatuses: allTaskStatuses, onTaskSelect: onTaskSelect }),
|
|
19389
19491
|
React.createElement(QuickStartMarkdownView, { content: hasFailedTask
|
|
19390
19492
|
? getResource('One or more verifications did not pass during this quick start. Revisit the tasks or the help links, and then try again.')
|
|
19391
19493
|
: conclusion }),
|
|
19392
|
-
|
|
19393
|
-
|
|
19394
|
-
|
|
19395
|
-
|
|
19396
|
-
|
|
19397
|
-
|
|
19398
|
-
|
|
19494
|
+
!hasFailedTask &&
|
|
19495
|
+
nextQuickStarts &&
|
|
19496
|
+
nextQuickStarts.length > 0 &&
|
|
19497
|
+
nextQuickStarts.map((nextQuickStart, index) => {
|
|
19498
|
+
var _a;
|
|
19499
|
+
return (React.createElement(Button$1, { variant: "link", onClick: () => onQuickStartChange(nextQuickStart.metadata.name), isInline: true, isBlock: true, key: index },
|
|
19500
|
+
getResource('Start {{nextQSDisplayName}} quick start').replace('{{nextQSDisplayName}}', (_a = nextQuickStart === null || nextQuickStart === void 0 ? void 0 : nextQuickStart.spec) === null || _a === void 0 ? void 0 : _a.displayName),
|
|
19501
|
+
' ',
|
|
19502
|
+
React.createElement(ArrowRightIcon, { style: { marginLeft: 'var(--pf-global--spacer--xs)', verticalAlign: 'middle' } })));
|
|
19503
|
+
})));
|
|
19504
|
+
};
|
|
19505
|
+
|
|
19506
|
+
const QuickStartIntroduction = ({ tasks, introduction, allTaskStatuses, prerequisites, onTaskSelect, }) => {
|
|
19399
19507
|
const { getResource } = React.useContext(QuickStartContext);
|
|
19508
|
+
const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
|
|
19509
|
+
const [isPrereqsExpanded, setIsPrereqsExpanded] = React.useState(false);
|
|
19510
|
+
const prereqList = (prereqs === null || prereqs === void 0 ? void 0 : prereqs.length) > 0 && (React.createElement(ExpandableSection, { toggleText: getResource('View Prerequisites ({{totalPrereqs}})').replace('{{totalPrereqs}}', prereqs.length), onToggle: () => setIsPrereqsExpanded(!isPrereqsExpanded), className: "pfext-quick-start-intro__prereq" },
|
|
19511
|
+
React.createElement(List, { className: "pfext-quick-start-intro__prereq-list" }, prereqs.map((pr) => {
|
|
19512
|
+
return (React.createElement(ListItem, { key: pr, className: "pfext-quick-start-intro__prereq-list__item" },
|
|
19513
|
+
React.createElement("span", { className: "pfext-quick-start-intro__prereq-list__item-content" }, pr)));
|
|
19514
|
+
}))));
|
|
19400
19515
|
return (React.createElement(React.Fragment, null,
|
|
19401
19516
|
React.createElement(QuickStartMarkdownView, { content: introduction }),
|
|
19517
|
+
prereqList,
|
|
19402
19518
|
React.createElement("p", { style: { marginBottom: 'var(--pf-global--spacer--md)' } },
|
|
19403
19519
|
getResource('In this quick start, you will complete {{count, number}} task', tasks.length).replace('{{count, number}}', tasks.length),
|
|
19404
19520
|
":"),
|
|
@@ -19423,7 +19539,7 @@ const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
|
|
|
19423
19539
|
'pfext-quick-start-task-review--failed': taskStatus === QuickStartTaskStatus.FAILED,
|
|
19424
19540
|
});
|
|
19425
19541
|
const title = React.createElement("span", { className: alertClassNames }, getResource('Check your work'));
|
|
19426
|
-
return (React.createElement(Alert, { variant: getAlertVariant(taskStatus), title: title, isInline: true },
|
|
19542
|
+
return (React.createElement(Alert, { className: "pfext-quick-start-task-review-alert", variant: getAlertVariant(taskStatus), title: title, isInline: true },
|
|
19427
19543
|
React.createElement(QuickStartMarkdownView, { content: instructions }),
|
|
19428
19544
|
React.createElement("span", { className: "pfext-quick-start-task-review__actions" },
|
|
19429
19545
|
React.createElement(Radio, { id: "review-success", name: "review-success", "data-testid": "qs-drawer-check-yes", label: getResource('Yes'), className: "pfext-quick-start-task-review__radio", isChecked: taskStatus === QuickStartTaskStatus.SUCCESS, onChange: () => onTaskReview(QuickStartTaskStatus.SUCCESS) }),
|
|
@@ -19432,31 +19548,32 @@ const QuickStartTaskReview = ({ review, taskStatus, onTaskReview, }) => {
|
|
|
19432
19548
|
};
|
|
19433
19549
|
|
|
19434
19550
|
const QuickStartTasks = ({ tasks, taskNumber, allTaskStatuses, onTaskReview, onTaskSelect, }) => {
|
|
19435
|
-
const { getResource } = React.useContext(QuickStartContext);
|
|
19551
|
+
const { getResource, alwaysShowTaskReview } = React.useContext(QuickStartContext);
|
|
19436
19552
|
return (React.createElement("div", { className: "pfext-quick-start-tasks__list" }, tasks
|
|
19437
19553
|
.filter((_, index) => allTaskStatuses[index] !== QuickStartTaskStatus.INIT)
|
|
19438
19554
|
.map((task, index) => {
|
|
19439
19555
|
const { title, description, review } = task;
|
|
19440
19556
|
const isActiveTask = index === taskNumber;
|
|
19441
19557
|
const taskStatus = allTaskStatuses[index];
|
|
19558
|
+
const shouldShowTaskReview = (!QUICKSTART_TASKS_INITIAL_STATES.includes(taskStatus) || alwaysShowTaskReview) &&
|
|
19559
|
+
review;
|
|
19442
19560
|
return (React.createElement(React.Fragment, { key: title },
|
|
19443
19561
|
React.createElement(QuickStartTaskHeader, { taskIndex: index + 1, title: title, size: "md", subtitle: getResource('{{index, number}} of {{tasks, number}}')
|
|
19444
19562
|
.replace('{{index, number}}', index + 1)
|
|
19445
19563
|
.replace('{{tasks, number}}', tasks.length), taskStatus: taskStatus, isActiveTask: isActiveTask, onTaskSelect: onTaskSelect }),
|
|
19446
19564
|
isActiveTask && (React.createElement("div", { style: { marginBottom: 'var(--pf-global--spacer--md)' } },
|
|
19447
19565
|
React.createElement(QuickStartMarkdownView, { content: description }),
|
|
19448
|
-
|
|
19566
|
+
shouldShowTaskReview && (React.createElement(QuickStartTaskReview, { review: review, taskStatus: taskStatus, onTaskReview: onTaskReview }))))));
|
|
19449
19567
|
})));
|
|
19450
19568
|
};
|
|
19451
19569
|
|
|
19452
19570
|
const QuickStartContent = React.forwardRef(({ quickStart, nextQuickStarts = [], taskNumber, allTaskStatuses, onTaskSelect, onTaskReview, onQuickStartChange, }, ref) => {
|
|
19453
|
-
const { spec: { introduction, tasks, conclusion }, } = quickStart;
|
|
19571
|
+
const { spec: { introduction, tasks, conclusion, prerequisites }, } = quickStart;
|
|
19454
19572
|
const totalTasks = tasks.length;
|
|
19455
|
-
const nextQS = nextQuickStarts.length > 0 && nextQuickStarts[0];
|
|
19456
19573
|
return (React.createElement("div", { className: "pfext-quick-start-content", ref: ref },
|
|
19457
|
-
taskNumber === -1 && (React.createElement(QuickStartIntroduction, { tasks: tasks, allTaskStatuses: allTaskStatuses, introduction: introduction, onTaskSelect: onTaskSelect })),
|
|
19574
|
+
taskNumber === -1 && (React.createElement(QuickStartIntroduction, { tasks: tasks, allTaskStatuses: allTaskStatuses, introduction: introduction, prerequisites: prerequisites, onTaskSelect: onTaskSelect })),
|
|
19458
19575
|
taskNumber > -1 && taskNumber < totalTasks && (React.createElement(QuickStartTasks, { tasks: tasks, taskNumber: taskNumber, allTaskStatuses: allTaskStatuses, onTaskReview: onTaskReview, onTaskSelect: onTaskSelect })),
|
|
19459
|
-
taskNumber === totalTasks && (React.createElement(QuickStartConclusion, { tasks: tasks, conclusion: conclusion, allTaskStatuses: allTaskStatuses,
|
|
19576
|
+
taskNumber === totalTasks && (React.createElement(QuickStartConclusion, { tasks: tasks, conclusion: conclusion, allTaskStatuses: allTaskStatuses, nextQuickStarts: nextQuickStarts, onQuickStartChange: onQuickStartChange, onTaskSelect: onTaskSelect }))));
|
|
19460
19577
|
});
|
|
19461
19578
|
|
|
19462
19579
|
const QuickStartFooter = ({ status, taskNumber, totalTasks, onNext, onBack, footerClass, quickStartId, }) => {
|
|
@@ -19494,8 +19611,7 @@ const QuickStartFooter = ({ status, taskNumber, totalTasks, onNext, onBack, foot
|
|
|
19494
19611
|
}, [taskNumber, totalTasks, PrimaryButtonText, status]);
|
|
19495
19612
|
const getPrimaryButton = React.useMemo(() => (React.createElement(Button$1, { variant: "primary", className: "pfext-quick-start-footer__actionbtn", onClick: onNext, "data-testid": `qs-drawer-${camelize(getPrimaryButtonText)}`, "data-test": `${getPrimaryButtonText} button` }, getPrimaryButtonText)), [getPrimaryButtonText, onNext]);
|
|
19496
19613
|
const getSecondaryButton = React.useMemo(() => taskNumber === -1 && status !== QuickStartStatus.NOT_STARTED ? (React.createElement(Button$1, { variant: "secondary", onClick: onRestart, "data-testid": "qs-drawer-restart" }, SecondaryButtonText.RESTART)) : (taskNumber > -1 && (React.createElement(Button$1, { variant: "secondary", onClick: onBack, "data-testid": "qs-drawer-back" }, SecondaryButtonText.BACK))), [onRestart, onBack, SecondaryButtonText, status, taskNumber]);
|
|
19497
|
-
const getSideNoteAction = React.useMemo(() =>
|
|
19498
|
-
taskNumber === totalTasks && (React.createElement(Button$1, { variant: "link", className: "pfext-quick-start-footer__restartbtn", onClick: onRestart, "data-testid": "qs-drawer-side-note-action" }, SecondaryButtonText.RESTART)), [status, SecondaryButtonText, onRestart, taskNumber, totalTasks]);
|
|
19614
|
+
const getSideNoteAction = React.useMemo(() => taskNumber !== -1 && (React.createElement(Button$1, { variant: "link", className: "pfext-quick-start-footer__restartbtn", onClick: onRestart, "data-testid": "qs-drawer-side-note-action" }, SecondaryButtonText.RESTART)), [taskNumber, onRestart, SecondaryButtonText.RESTART]);
|
|
19499
19615
|
return (React.createElement("div", { className: `pfext-quick-start-footer ${footerClass}` },
|
|
19500
19616
|
getPrimaryButton,
|
|
19501
19617
|
getSecondaryButton,
|
|
@@ -19549,6 +19665,13 @@ const getElement = (appendTo) => {
|
|
|
19549
19665
|
}
|
|
19550
19666
|
return appendTo;
|
|
19551
19667
|
};
|
|
19668
|
+
const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
|
|
19669
|
+
React.useEffect(() => {
|
|
19670
|
+
if (node) {
|
|
19671
|
+
node.scrollTo({ top: 0, behavior: 'smooth' });
|
|
19672
|
+
}
|
|
19673
|
+
}, [taskNumber, node]);
|
|
19674
|
+
};
|
|
19552
19675
|
const QuickStartPanelContent = (_a) => {
|
|
19553
19676
|
var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true } = _a, props = __rest$1(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose"]);
|
|
19554
19677
|
const { getResource } = React.useContext(QuickStartContext);
|
|
@@ -19557,6 +19680,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
19557
19680
|
const quickStart = quickStarts.find((qs) => qs.metadata.name === activeQuickStartID);
|
|
19558
19681
|
const { activeQuickStartState } = React.useContext(QuickStartContext);
|
|
19559
19682
|
const taskNumber = activeQuickStartState === null || activeQuickStartState === void 0 ? void 0 : activeQuickStartState.taskNumber;
|
|
19683
|
+
useScrollTopOnTaskNumberChange(contentRef, taskNumber);
|
|
19560
19684
|
const nextQuickStarts = quickStarts.filter((qs) => { var _a; return (_a = quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.nextQuickStart) === null || _a === void 0 ? void 0 : _a.includes(qs.metadata.name); });
|
|
19561
19685
|
const headerClasses = css('pfext-quick-start-panel-content__header', {
|
|
19562
19686
|
'pfext-quick-start-panel-content__header__shadow': shadows === Shadows.top || shadows === Shadows.both,
|
|
@@ -19574,7 +19698,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
19574
19698
|
}
|
|
19575
19699
|
return Number.parseInt(taskNumber, 10) + 1;
|
|
19576
19700
|
};
|
|
19577
|
-
const content = quickStart ? (React.createElement(DrawerPanelContent, Object.assign({ isResizable: isResizable, className: "pfext-quick-
|
|
19701
|
+
const content = quickStart ? (React.createElement(DrawerPanelContent, Object.assign({ isResizable: isResizable, className: "pfext-quick-start__base", "data-testid": `qs-drawer-${camelize(quickStart.spec.displayName)}`, "data-qs": `qs-step-${getStep()}`, "data-test": "quickstart drawer" }, props),
|
|
19578
19702
|
React.createElement("div", { className: headerClasses },
|
|
19579
19703
|
React.createElement(DrawerHead, null,
|
|
19580
19704
|
React.createElement("div", { className: "pfext-quick-start-panel-content__title" },
|
|
@@ -19593,7 +19717,7 @@ const QuickStartPanelContent = (_a) => {
|
|
|
19593
19717
|
};
|
|
19594
19718
|
|
|
19595
19719
|
const QuickStartContainer = (_a) => {
|
|
19596
|
-
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, language, loading = false, useQueryParams = true, markdown, contextProps } = _a, props = __rest$1(_a, ["quickStarts", "children", "activeQuickStartID", "allQuickStartStates", "setActiveQuickStartID", "setAllQuickStartStates", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress", "resourceBundle", "showCardFooters", "language", "loading", "useQueryParams", "markdown", "contextProps"]);
|
|
19720
|
+
var { quickStarts, children, activeQuickStartID, allQuickStartStates, setActiveQuickStartID, setAllQuickStartStates, appendTo, fullWidth, onCloseInProgress, onCloseNotInProgress, resourceBundle, showCardFooters, language, loading = false, useQueryParams = true, markdown, contextProps, alwaysShowTaskReview = false } = _a, props = __rest$1(_a, ["quickStarts", "children", "activeQuickStartID", "allQuickStartStates", "setActiveQuickStartID", "setAllQuickStartStates", "appendTo", "fullWidth", "onCloseInProgress", "onCloseNotInProgress", "resourceBundle", "showCardFooters", "language", "loading", "useQueryParams", "markdown", "contextProps", "alwaysShowTaskReview"]);
|
|
19597
19721
|
const valuesForQuickstartContext = useValuesForQuickStartContext(Object.assign({ allQuickStarts: quickStarts, activeQuickStartID,
|
|
19598
19722
|
setActiveQuickStartID,
|
|
19599
19723
|
allQuickStartStates,
|
|
@@ -19601,7 +19725,8 @@ const QuickStartContainer = (_a) => {
|
|
|
19601
19725
|
show: showCardFooters,
|
|
19602
19726
|
}, language, resourceBundle: Object.assign({}, resourceBundle), loading,
|
|
19603
19727
|
useQueryParams,
|
|
19604
|
-
markdown
|
|
19728
|
+
markdown,
|
|
19729
|
+
alwaysShowTaskReview }, contextProps));
|
|
19605
19730
|
React.useEffect(() => {
|
|
19606
19731
|
if (quickStarts &&
|
|
19607
19732
|
JSON.stringify(quickStarts) !== JSON.stringify(valuesForQuickstartContext.allQuickStarts)) {
|