@patternfly/quickstarts 2.3.0 → 2.3.2

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.
@@ -9675,7 +9675,7 @@ const QuickStartContextDefaults = {
9675
9675
  activeQuickStartState: {},
9676
9676
  setAllQuickStarts: () => { },
9677
9677
  resourceBundle: en,
9678
- getResource: () => '',
9678
+ getResource: (resource) => resource,
9679
9679
  language: 'en',
9680
9680
  useQueryParams: true,
9681
9681
  filter: {
@@ -9701,7 +9701,7 @@ const getResource = (resource, options, resourceBundle, lng) => {
9701
9701
  return resourceBundle[`${resource}_${suffix}`];
9702
9702
  }
9703
9703
  }
9704
- return (resourceBundle && resourceBundle[resource]) || '';
9704
+ return (resourceBundle && resourceBundle[resource]) || resource;
9705
9705
  };
9706
9706
  const useValuesForQuickStartContext = (value = {}) => {
9707
9707
  var _a, _b;
@@ -10532,12 +10532,13 @@ const CopyClipboard = ({ element, rootSelector, docContext, }) => {
10532
10532
  const { getResource } = React.useContext(QuickStartContext);
10533
10533
  const [showSuccessContent, setShowSuccessContent] = React.useState(false);
10534
10534
  const textToCopy = React.useMemo(() => {
10535
+ var _a;
10535
10536
  const copyTextId = element.getAttribute(MARKDOWN_COPY_BUTTON_ID);
10536
- return docContext.querySelector(`${rootSelector} [${MARKDOWN_SNIPPET_ID}="${copyTextId}"]`).innerText;
10537
+ return (_a = docContext.querySelector(`${rootSelector} [${MARKDOWN_SNIPPET_ID}="${copyTextId}"]`)) === null || _a === void 0 ? void 0 : _a.innerText;
10537
10538
  }, [element, docContext, rootSelector]);
10538
10539
  useEventListener(element, 'click', React.useCallback(() => {
10539
10540
  navigator.clipboard
10540
- .writeText(textToCopy)
10541
+ .writeText(textToCopy.trim())
10541
10542
  .then(() => {
10542
10543
  setShowSuccessContent(true);
10543
10544
  })
@@ -14718,16 +14719,16 @@ const useInlineCopyClipboardShowdownExtension = () => {
14718
14719
  const { getResource } = React.useContext(QuickStartContext);
14719
14720
  return React.useMemo(() => ({
14720
14721
  type: 'lang',
14721
- regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
14722
- replace: (text, group, subGroup, groupType, groupId) => {
14723
- if (!group || !subGroup || !groupType || !groupId) {
14722
+ regex: /`([^`](.*?)[^`])`{{copy}}/g,
14723
+ replace: (text, group, _, groupId) => {
14724
+ if (!group || isNaN(groupId)) {
14724
14725
  return text;
14725
14726
  }
14726
14727
  return removeTemplateWhitespace(`<span class="pf-c-clipboard-copy pf-m-inline">
14727
- <span class="pf-c-clipboard-copy__text" ${MARKDOWN_SNIPPET_ID}="${groupType}">${group}</span>
14728
+ <span class="pf-c-clipboard-copy__text" ${MARKDOWN_SNIPPET_ID}="${groupId}">${group}</span>
14728
14729
  <span class="pf-c-clipboard-copy__actions">
14729
14730
  <span class="pf-c-clipboard-copy__actions-item">
14730
- <button class="pf-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupType}">
14731
+ <button class="pf-c-button pf-m-plain" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
14731
14732
  ${server.renderToStaticMarkup(React.createElement(CopyIcon, null))}
14732
14733
  </button>
14733
14734
  </span>
@@ -14741,16 +14742,16 @@ const useMultilineCopyClipboardShowdownExtension = () => {
14741
14742
  const { getResource } = React.useContext(QuickStartContext);
14742
14743
  return React.useMemo(() => ({
14743
14744
  type: 'lang',
14744
- regex: /```[\n]((.*?\n)+)```{{copy}}/g,
14745
- replace: (text, group, subgroup, groupType, groupId) => {
14746
- if (!group || !subgroup || !groupType || !groupId) {
14745
+ regex: /```[\n]\s*((((?!```).)*?\n)+)\s*```{{copy}}/g,
14746
+ replace: (text, group, _1, _2, groupId) => {
14747
+ if (!group || isNaN(groupId)) {
14747
14748
  return text;
14748
14749
  }
14749
14750
  return `<div class="pf-c-code-block">
14750
14751
  <div class="pf-c-code-block__header">
14751
14752
  <div class="pf-c-code-block__actions">
14752
14753
  <div class="pf-c-code-block__actions-item">
14753
- <button class="pf-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupType}">
14754
+ <button class="pf-c-button pf-m-plain" type="button" aria-label="${getResource('Copy to clipboard')}" ${MARKDOWN_COPY_BUTTON_ID}="${groupId}">
14754
14755
  ${server.renderToStaticMarkup(React.createElement(CopyIcon, null))}
14755
14756
  </button>
14756
14757
  </div>
@@ -14759,7 +14760,7 @@ const useMultilineCopyClipboardShowdownExtension = () => {
14759
14760
  <div class="pf-c-code-block__content">
14760
14761
  <pre class="pf-c-code-block__pre pfext-code-block__pre">
14761
14762
  <code class="pf-c-code-block__code"
14762
- ${MARKDOWN_SNIPPET_ID}="${groupType}">${group}</code>
14763
+ ${MARKDOWN_SNIPPET_ID}="${groupId}">${group.trim()}</code>
14763
14764
  </pre>
14764
14765
  </div>
14765
14766
  </div>`;
@@ -14799,192 +14800,6 @@ exports["default"] = exports.FireIcon;
14799
14800
 
14800
14801
  var FireIcon = /*@__PURE__*/getDefaultExportFromCjs(fireIcon);
14801
14802
 
14802
- var AdmonitionType;
14803
- (function (AdmonitionType) {
14804
- AdmonitionType["TIP"] = "TIP";
14805
- AdmonitionType["NOTE"] = "NOTE";
14806
- AdmonitionType["IMPORTANT"] = "IMPORTANT";
14807
- AdmonitionType["WARNING"] = "WARNING";
14808
- AdmonitionType["CAUTION"] = "CAUTION";
14809
- })(AdmonitionType || (AdmonitionType = {}));
14810
- const admonitionToAlertVariantMap = {
14811
- [AdmonitionType.NOTE]: { variant: 'info' },
14812
- [AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
14813
- [AdmonitionType.IMPORTANT]: { variant: 'danger' },
14814
- [AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
14815
- [AdmonitionType.WARNING]: { variant: 'warning' },
14816
- };
14817
- const useAdmonitionShowdownExtension = () => {
14818
- // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
14819
- return React.useMemo(() => ({
14820
- type: 'lang',
14821
- regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
14822
- replace: (text, content, admonitionLabel, admonitionType, groupId) => {
14823
- if (!content || !admonitionLabel || !admonitionType || !groupId) {
14824
- return text;
14825
- }
14826
- admonitionType = admonitionType.toUpperCase();
14827
- const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
14828
- const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
14829
- const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, content));
14830
- return removeTemplateWhitespace(server.renderToStaticMarkup(pfAlert));
14831
- },
14832
- }), []);
14833
- };
14834
-
14835
- const useCodeShowdownExtension = () => {
14836
- return React.useMemo(() => ({
14837
- type: 'output',
14838
- regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
14839
- replace: (text, content) => {
14840
- if (!content) {
14841
- return text;
14842
- }
14843
- const pfCodeBlock = React.createElement(CodeBlock, null, content);
14844
- return removeTemplateWhitespace(server.renderToStaticMarkup(pfCodeBlock));
14845
- },
14846
- }), []);
14847
- };
14848
-
14849
- const FallbackImg = ({ src, alt, className, fallback }) => {
14850
- const [isSrcValid, setIsSrcValid] = React.useState(true);
14851
- if (src && isSrcValid) {
14852
- return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
14853
- }
14854
- return React.createElement(React.Fragment, null, fallback);
14855
- };
14856
-
14857
- var syncAltIcon = createCommonjsModule(function (module, exports) {
14858
- exports.__esModule = true;
14859
- exports.SyncAltIconConfig = {
14860
- name: 'SyncAltIcon',
14861
- height: 512,
14862
- width: 512,
14863
- svgPath: 'M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z',
14864
- yOffset: 0,
14865
- xOffset: 0,
14866
- };
14867
- exports.SyncAltIcon = createIcon_1.createIcon(exports.SyncAltIconConfig);
14868
- exports["default"] = exports.SyncAltIcon;
14869
- });
14870
-
14871
- var SyncAltIcon = /*@__PURE__*/getDefaultExportFromCjs(syncAltIcon);
14872
-
14873
- const DASH = '-';
14874
-
14875
- const PopoverStatus = ({ hideHeader, children, isVisible = null, shouldClose = null, statusBody, title, onHide, onShow, }) => {
14876
- return (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible, shouldClose: shouldClose },
14877
- React.createElement(Button$1, { variant: "link", isInline: true }, statusBody)));
14878
- };
14879
-
14880
- const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
14881
- if (!title) {
14882
- return React.createElement(React.Fragment, null, DASH);
14883
- }
14884
- return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
14885
- icon &&
14886
- React.cloneElement(icon, {
14887
- className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
14888
- }),
14889
- !iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
14890
- };
14891
-
14892
- const GenericStatus = (props) => {
14893
- const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest$1(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
14894
- const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
14895
- const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
14896
- return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
14897
- };
14898
-
14899
- var checkCircleIcon = createCommonjsModule(function (module, exports) {
14900
- exports.__esModule = true;
14901
- exports.CheckCircleIconConfig = {
14902
- name: 'CheckCircleIcon',
14903
- height: 512,
14904
- width: 512,
14905
- svgPath: 'M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z',
14906
- yOffset: 0,
14907
- xOffset: 0,
14908
- };
14909
- exports.CheckCircleIcon = createIcon_1.createIcon(exports.CheckCircleIconConfig);
14910
- exports["default"] = exports.CheckCircleIcon;
14911
- });
14912
-
14913
- var CheckCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(checkCircleIcon);
14914
-
14915
- var exclamationCircleIcon = createCommonjsModule(function (module, exports) {
14916
- exports.__esModule = true;
14917
- exports.ExclamationCircleIconConfig = {
14918
- name: 'ExclamationCircleIcon',
14919
- height: 512,
14920
- width: 512,
14921
- svgPath: 'M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z',
14922
- yOffset: 0,
14923
- xOffset: 0,
14924
- };
14925
- exports.ExclamationCircleIcon = createIcon_1.createIcon(exports.ExclamationCircleIconConfig);
14926
- exports["default"] = exports.ExclamationCircleIcon;
14927
- });
14928
-
14929
- var ExclamationCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(exclamationCircleIcon);
14930
-
14931
- var infoCircleIcon = createCommonjsModule(function (module, exports) {
14932
- exports.__esModule = true;
14933
- exports.InfoCircleIconConfig = {
14934
- name: 'InfoCircleIcon',
14935
- height: 512,
14936
- width: 512,
14937
- svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
14938
- yOffset: 0,
14939
- xOffset: 0,
14940
- };
14941
- exports.InfoCircleIcon = createIcon_1.createIcon(exports.InfoCircleIconConfig);
14942
- exports["default"] = exports.InfoCircleIcon;
14943
- });
14944
-
14945
- var InfoCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(infoCircleIcon);
14946
-
14947
- var global_palette_green_500 = createCommonjsModule(function (module, exports) {
14948
- exports.__esModule = true;
14949
- exports.global_palette_green_500 = {
14950
- "name": "--pf-global--palette--green-500",
14951
- "value": "#3e8635",
14952
- "var": "var(--pf-global--palette--green-500)"
14953
- };
14954
- exports["default"] = exports.global_palette_green_500;
14955
- });
14956
-
14957
- // import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
14958
- const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(CheckCircleIcon, { "data-test": "success-icon", size: size, color: global_palette_green_500.global_palette_green_500.value, className: className, title: title }));
14959
-
14960
- // export const PendingStatus: React.FC<StatusComponentProps> = (props) => (
14961
- // <GenericStatus {...props} Icon={HourglassHalfIcon} title={props.title || 'Pending'} />
14962
- // );
14963
- // PendingStatus.displayName = 'PendingStatus';
14964
- // export const ProgressStatus: React.FC<StatusComponentProps> = (props) => (
14965
- // <GenericStatus {...props} Icon={InProgressIcon} title={props.title || 'In progress'} />
14966
- // );
14967
- // ProgressStatus.displayName = 'ProgressStatus';
14968
- const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
14969
- SuccessStatus.displayName = 'SuccessStatus';
14970
- // export const WarningStatus: React.FC<StatusComponentProps> = (props) => (
14971
- // <GenericStatus {...props} Icon={YellowExclamationTriangleIcon} title={props.title || 'Warning'} />
14972
- // );
14973
- // WarningStatus.displayName = 'WarningStatus';
14974
-
14975
- const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
14976
- const statusProps = { title: title || status, iconOnly, noTooltip, className };
14977
- switch (status) {
14978
- case 'In Progress':
14979
- return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
14980
- case 'Complete':
14981
- return React.createElement(SuccessStatus, Object.assign({}, statusProps));
14982
- default:
14983
- return React.createElement(React.Fragment, null, status || DASH);
14984
- }
14985
- };
14986
- const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
14987
-
14988
14803
  var showdown = createCommonjsModule(function (module) {
14989
14804
  (function(){
14990
14805
  /**
@@ -19615,6 +19430,193 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
19615
19430
  markdown.renderExtension(docContext, rootSelector))), className: className }));
19616
19431
  };
19617
19432
 
19433
+ var AdmonitionType;
19434
+ (function (AdmonitionType) {
19435
+ AdmonitionType["TIP"] = "TIP";
19436
+ AdmonitionType["NOTE"] = "NOTE";
19437
+ AdmonitionType["IMPORTANT"] = "IMPORTANT";
19438
+ AdmonitionType["WARNING"] = "WARNING";
19439
+ AdmonitionType["CAUTION"] = "CAUTION";
19440
+ })(AdmonitionType || (AdmonitionType = {}));
19441
+ const admonitionToAlertVariantMap = {
19442
+ [AdmonitionType.NOTE]: { variant: 'info' },
19443
+ [AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
19444
+ [AdmonitionType.IMPORTANT]: { variant: 'danger' },
19445
+ [AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
19446
+ [AdmonitionType.WARNING]: { variant: 'warning' },
19447
+ };
19448
+ const useAdmonitionShowdownExtension = () => {
19449
+ // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
19450
+ return React.useMemo(() => ({
19451
+ type: 'lang',
19452
+ regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
19453
+ replace: (text, content, admonitionLabel, admonitionType, groupId) => {
19454
+ if (!content || !admonitionLabel || !admonitionType || !groupId) {
19455
+ return text;
19456
+ }
19457
+ admonitionType = admonitionType.toUpperCase();
19458
+ const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
19459
+ const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
19460
+ const mdContent = React.createElement(QuickStartMarkdownView, { content: content });
19461
+ const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, mdContent));
19462
+ return removeTemplateWhitespace(server.renderToStaticMarkup(pfAlert));
19463
+ },
19464
+ }), []);
19465
+ };
19466
+
19467
+ const useCodeShowdownExtension = () => {
19468
+ return React.useMemo(() => ({
19469
+ type: 'output',
19470
+ regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
19471
+ replace: (text, content) => {
19472
+ if (!content) {
19473
+ return text;
19474
+ }
19475
+ const pfCodeBlock = React.createElement(CodeBlock, null, content);
19476
+ return removeTemplateWhitespace(server.renderToStaticMarkup(pfCodeBlock));
19477
+ },
19478
+ }), []);
19479
+ };
19480
+
19481
+ const FallbackImg = ({ src, alt, className, fallback }) => {
19482
+ const [isSrcValid, setIsSrcValid] = React.useState(true);
19483
+ if (src && isSrcValid) {
19484
+ return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
19485
+ }
19486
+ return React.createElement(React.Fragment, null, fallback);
19487
+ };
19488
+
19489
+ var syncAltIcon = createCommonjsModule(function (module, exports) {
19490
+ exports.__esModule = true;
19491
+ exports.SyncAltIconConfig = {
19492
+ name: 'SyncAltIcon',
19493
+ height: 512,
19494
+ width: 512,
19495
+ svgPath: 'M370.72 133.28C339.458 104.008 298.888 87.962 255.848 88c-77.458.068-144.328 53.178-162.791 126.85-1.344 5.363-6.122 9.15-11.651 9.15H24.103c-7.498 0-13.194-6.807-11.807-14.176C33.933 94.924 134.813 8 256 8c66.448 0 126.791 26.136 171.315 68.685L463.03 40.97C478.149 25.851 504 36.559 504 57.941V192c0 13.255-10.745 24-24 24H345.941c-21.382 0-32.09-25.851-16.971-40.971l41.75-41.749zM32 296h134.059c21.382 0 32.09 25.851 16.971 40.971l-41.75 41.75c31.262 29.273 71.835 45.319 114.876 45.28 77.418-.07 144.315-53.144 162.787-126.849 1.344-5.363 6.122-9.15 11.651-9.15h57.304c7.498 0 13.194 6.807 11.807 14.176C478.067 417.076 377.187 504 256 504c-66.448 0-126.791-26.136-171.315-68.685L48.97 471.03C33.851 486.149 8 475.441 8 454.059V320c0-13.255 10.745-24 24-24z',
19496
+ yOffset: 0,
19497
+ xOffset: 0,
19498
+ };
19499
+ exports.SyncAltIcon = createIcon_1.createIcon(exports.SyncAltIconConfig);
19500
+ exports["default"] = exports.SyncAltIcon;
19501
+ });
19502
+
19503
+ var SyncAltIcon = /*@__PURE__*/getDefaultExportFromCjs(syncAltIcon);
19504
+
19505
+ const DASH = '-';
19506
+
19507
+ const PopoverStatus = ({ hideHeader, children, isVisible = null, shouldClose = null, statusBody, title, onHide, onShow, }) => {
19508
+ return (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible, shouldClose: shouldClose },
19509
+ React.createElement(Button$1, { variant: "link", isInline: true }, statusBody)));
19510
+ };
19511
+
19512
+ const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
19513
+ if (!title) {
19514
+ return React.createElement(React.Fragment, null, DASH);
19515
+ }
19516
+ return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
19517
+ icon &&
19518
+ React.cloneElement(icon, {
19519
+ className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
19520
+ }),
19521
+ !iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
19522
+ };
19523
+
19524
+ const GenericStatus = (props) => {
19525
+ const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest$1(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
19526
+ const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
19527
+ const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
19528
+ return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
19529
+ };
19530
+
19531
+ var checkCircleIcon = createCommonjsModule(function (module, exports) {
19532
+ exports.__esModule = true;
19533
+ exports.CheckCircleIconConfig = {
19534
+ name: 'CheckCircleIcon',
19535
+ height: 512,
19536
+ width: 512,
19537
+ svgPath: 'M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z',
19538
+ yOffset: 0,
19539
+ xOffset: 0,
19540
+ };
19541
+ exports.CheckCircleIcon = createIcon_1.createIcon(exports.CheckCircleIconConfig);
19542
+ exports["default"] = exports.CheckCircleIcon;
19543
+ });
19544
+
19545
+ var CheckCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(checkCircleIcon);
19546
+
19547
+ var exclamationCircleIcon = createCommonjsModule(function (module, exports) {
19548
+ exports.__esModule = true;
19549
+ exports.ExclamationCircleIconConfig = {
19550
+ name: 'ExclamationCircleIcon',
19551
+ height: 512,
19552
+ width: 512,
19553
+ svgPath: 'M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z',
19554
+ yOffset: 0,
19555
+ xOffset: 0,
19556
+ };
19557
+ exports.ExclamationCircleIcon = createIcon_1.createIcon(exports.ExclamationCircleIconConfig);
19558
+ exports["default"] = exports.ExclamationCircleIcon;
19559
+ });
19560
+
19561
+ var ExclamationCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(exclamationCircleIcon);
19562
+
19563
+ var infoCircleIcon = createCommonjsModule(function (module, exports) {
19564
+ exports.__esModule = true;
19565
+ exports.InfoCircleIconConfig = {
19566
+ name: 'InfoCircleIcon',
19567
+ height: 512,
19568
+ width: 512,
19569
+ svgPath: 'M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z',
19570
+ yOffset: 0,
19571
+ xOffset: 0,
19572
+ };
19573
+ exports.InfoCircleIcon = createIcon_1.createIcon(exports.InfoCircleIconConfig);
19574
+ exports["default"] = exports.InfoCircleIcon;
19575
+ });
19576
+
19577
+ var InfoCircleIcon = /*@__PURE__*/getDefaultExportFromCjs(infoCircleIcon);
19578
+
19579
+ var global_palette_green_500 = createCommonjsModule(function (module, exports) {
19580
+ exports.__esModule = true;
19581
+ exports.global_palette_green_500 = {
19582
+ "name": "--pf-global--palette--green-500",
19583
+ "value": "#3e8635",
19584
+ "var": "var(--pf-global--palette--green-500)"
19585
+ };
19586
+ exports["default"] = exports.global_palette_green_500;
19587
+ });
19588
+
19589
+ // import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
19590
+ const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(CheckCircleIcon, { "data-test": "success-icon", size: size, color: global_palette_green_500.global_palette_green_500.value, className: className, title: title }));
19591
+
19592
+ // export const PendingStatus: React.FC<StatusComponentProps> = (props) => (
19593
+ // <GenericStatus {...props} Icon={HourglassHalfIcon} title={props.title || 'Pending'} />
19594
+ // );
19595
+ // PendingStatus.displayName = 'PendingStatus';
19596
+ // export const ProgressStatus: React.FC<StatusComponentProps> = (props) => (
19597
+ // <GenericStatus {...props} Icon={InProgressIcon} title={props.title || 'In progress'} />
19598
+ // );
19599
+ // ProgressStatus.displayName = 'ProgressStatus';
19600
+ const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
19601
+ SuccessStatus.displayName = 'SuccessStatus';
19602
+ // export const WarningStatus: React.FC<StatusComponentProps> = (props) => (
19603
+ // <GenericStatus {...props} Icon={YellowExclamationTriangleIcon} title={props.title || 'Warning'} />
19604
+ // );
19605
+ // WarningStatus.displayName = 'WarningStatus';
19606
+
19607
+ const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
19608
+ const statusProps = { title: title || status, iconOnly, noTooltip, className };
19609
+ switch (status) {
19610
+ case 'In Progress':
19611
+ return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
19612
+ case 'Complete':
19613
+ return React.createElement(SuccessStatus, Object.assign({}, statusProps));
19614
+ default:
19615
+ return React.createElement(React.Fragment, null, status || DASH);
19616
+ }
19617
+ };
19618
+ const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
19619
+
19618
19620
  const QuickStartTileDescription = ({ description, prerequisites, }) => {
19619
19621
  const { getResource } = React.useContext(QuickStartContext);
19620
19622
  const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
@@ -19750,9 +19752,14 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
19750
19752
  // @ts-ignore
19751
19753
  component: "div", style: {
19752
19754
  cursor: 'pointer',
19753
- }, 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,
19755
+ }, 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, onKeyDown: (event) => {
19756
+ if (event.key === 'Enter' || event.key === ' ') {
19757
+ setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
19758
+ onClick();
19759
+ }
19760
+ },
19754
19761
  // https://github.com/patternfly/patternfly-react/issues/7039
19755
- href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
19762
+ href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0 })));
19756
19763
  };
19757
19764
 
19758
19765
  const QuickStartCatalog = ({ quickStarts }) => {
@@ -20011,6 +20018,13 @@ const TaskIcon = ({ taskIndex, taskStatus }) => {
20011
20018
  return React.createElement("span", { className: classNames }, content);
20012
20019
  };
20013
20020
  const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
20021
+ const titleRef = React.useRef(null);
20022
+ React.useEffect(() => {
20023
+ if (isActiveTask) {
20024
+ // Focus the WizardNavItem button element that contains the title
20025
+ titleRef.current.parentNode.focus();
20026
+ }
20027
+ }, [isActiveTask]);
20014
20028
  const classNames = css('pfext-quick-start-task-header__title', {
20015
20029
  'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
20016
20030
  'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
@@ -20023,7 +20037,7 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
20023
20037
  const tryAgain = failedReview && (React.createElement(React.Fragment, null,
20024
20038
  React.createElement("div", null),
20025
20039
  React.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
20026
- const content = (React.createElement("div", { className: "pfext-quick-start-task-header" },
20040
+ const content = (React.createElement("div", { className: "pfext-quick-start-task-header", ref: titleRef },
20027
20041
  React.createElement(TaskIcon, { taskIndex: taskIndex, taskStatus: taskStatus }),
20028
20042
  React.createElement(Title, { headingLevel: "h3", size: size, className: classNames },
20029
20043
  React.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
@@ -20230,6 +20244,7 @@ const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
20230
20244
  };
20231
20245
  const QuickStartPanelContent = (_a) => {
20232
20246
  var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true, headerVariant = '' } = _a, props = __rest$1(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose", "headerVariant"]);
20247
+ const titleRef = React.useRef(null);
20233
20248
  const { getResource, activeQuickStartState } = React.useContext(QuickStartContext);
20234
20249
  const [contentRef, setContentRef] = React.useState();
20235
20250
  const shadows = useScrollShadows(contentRef);
@@ -20254,10 +20269,15 @@ const QuickStartPanelContent = (_a) => {
20254
20269
  }
20255
20270
  return Number.parseInt(taskNumber, 10) + 1;
20256
20271
  };
20272
+ React.useEffect(() => {
20273
+ if (quickStart) {
20274
+ titleRef.current.focus();
20275
+ }
20276
+ }, [quickStart]);
20257
20277
  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),
20258
20278
  React.createElement("div", { className: headerClasses },
20259
20279
  React.createElement(DrawerHead, null,
20260
- React.createElement("div", { className: "pfext-quick-start-panel-content__title" },
20280
+ React.createElement("div", { className: "pfext-quick-start-panel-content__title", tabIndex: -1, ref: titleRef },
20261
20281
  React.createElement(Title, { headingLevel: "h1", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-global--spacer--md)' } }, quickStart === null || quickStart === void 0 ? void 0 :
20262
20282
  quickStart.spec.displayName,
20263
20283
  ' ',