@patternfly/quickstarts 2.3.1 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const _default: (props: any) => JSX.Element;
3
2
  export default _default;
package/dist/index.es.js CHANGED
@@ -10,6 +10,7 @@ import { renderToStaticMarkup } from 'react-dom/server';
10
10
  import CopyIcon from '@patternfly/react-icons/dist/js/icons/copy-icon';
11
11
  import LightbulbIcon from '@patternfly/react-icons/dist/js/icons/lightbulb-icon';
12
12
  import FireIcon from '@patternfly/react-icons/dist/js/icons/fire-icon';
13
+ import { Converter } from 'showdown';
13
14
  import SyncAltIcon from '@patternfly/react-icons/dist/js/icons/sync-alt-icon';
14
15
  import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
15
16
  import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
@@ -17,7 +18,6 @@ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-ic
17
18
  import '@patternfly/react-tokens/dist/js/global_danger_color_100';
18
19
  import '@patternfly/react-tokens/dist/js/global_palette_blue_300';
19
20
  import { global_palette_green_500 } from '@patternfly/react-tokens/dist/js/global_palette_green_500';
20
- import { Converter } from 'showdown';
21
21
  import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
22
22
  import OutlinedClockIcon from '@patternfly/react-icons/dist/js/icons/outlined-clock-icon';
23
23
  import ArrowRightIcon from '@patternfly/react-icons/dist/js/icons/arrow-right-icon';
@@ -572,7 +572,7 @@ const QuickStartContextDefaults = {
572
572
  activeQuickStartState: {},
573
573
  setAllQuickStarts: () => { },
574
574
  resourceBundle: en,
575
- getResource: () => '',
575
+ getResource: (resource) => resource,
576
576
  language: 'en',
577
577
  useQueryParams: true,
578
578
  filter: {
@@ -598,7 +598,7 @@ const getResource = (resource, options, resourceBundle, lng) => {
598
598
  return resourceBundle[`${resource}_${suffix}`];
599
599
  }
600
600
  }
601
- return (resourceBundle && resourceBundle[resource]) || '';
601
+ return (resourceBundle && resourceBundle[resource]) || resource;
602
602
  };
603
603
  const useValuesForQuickStartContext = (value = {}) => {
604
604
  var _a, _b;
@@ -872,7 +872,7 @@ class CatalogTile extends React.Component {
872
872
  const _a = this.props, { id, className, featured, onClick, href, icon, iconImg, iconAlt, iconClass, badges, title, vendor, description, footer,
873
873
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
874
874
  ref, children } = _a, props = __rest(_a, ["id", "className", "featured", "onClick", "href", "icon", "iconImg", "iconAlt", "iconClass", "badges", "title", "vendor", "description", "footer", "ref", "children"]);
875
- return (React.createElement(Card, Object.assign({ component: href || onClick ? 'a' : 'div', id: id, href: href || '#', className: css('catalog-tile-pf', { featured }, className), onClick: e => this.handleClick(e), isHoverable: true }, props),
875
+ return (React.createElement(Card, Object.assign({ component: href || onClick ? 'a' : 'div', id: id, href: href || '#', className: css('catalog-tile-pf', { featured }, className), onClick: e => this.handleClick(e), isSelectable: true }, props),
876
876
  (badges.length > 0 || iconImg || iconClass || icon) && (React.createElement(CardHeader, null,
877
877
  iconImg && React.createElement("img", { className: "catalog-tile-pf-icon", src: iconImg, alt: iconAlt }),
878
878
  !iconImg && (iconClass || icon) && React.createElement("span", { className: `catalog-tile-pf-icon ${iconClass}` }, icon),
@@ -1283,118 +1283,6 @@ const useMultilineCopyClipboardShowdownExtension = () => {
1283
1283
  }), [getResource]);
1284
1284
  };
1285
1285
 
1286
- var AdmonitionType;
1287
- (function (AdmonitionType) {
1288
- AdmonitionType["TIP"] = "TIP";
1289
- AdmonitionType["NOTE"] = "NOTE";
1290
- AdmonitionType["IMPORTANT"] = "IMPORTANT";
1291
- AdmonitionType["WARNING"] = "WARNING";
1292
- AdmonitionType["CAUTION"] = "CAUTION";
1293
- })(AdmonitionType || (AdmonitionType = {}));
1294
- const admonitionToAlertVariantMap = {
1295
- [AdmonitionType.NOTE]: { variant: 'info' },
1296
- [AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
1297
- [AdmonitionType.IMPORTANT]: { variant: 'danger' },
1298
- [AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
1299
- [AdmonitionType.WARNING]: { variant: 'warning' },
1300
- };
1301
- const useAdmonitionShowdownExtension = () => {
1302
- // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
1303
- return React.useMemo(() => ({
1304
- type: 'lang',
1305
- regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
1306
- replace: (text, content, admonitionLabel, admonitionType, groupId) => {
1307
- if (!content || !admonitionLabel || !admonitionType || !groupId) {
1308
- return text;
1309
- }
1310
- admonitionType = admonitionType.toUpperCase();
1311
- const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
1312
- const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
1313
- const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, content));
1314
- return removeTemplateWhitespace(renderToStaticMarkup(pfAlert));
1315
- },
1316
- }), []);
1317
- };
1318
-
1319
- const useCodeShowdownExtension = () => {
1320
- return React.useMemo(() => ({
1321
- type: 'output',
1322
- regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
1323
- replace: (text, content) => {
1324
- if (!content) {
1325
- return text;
1326
- }
1327
- const pfCodeBlock = React.createElement(CodeBlock, null, content);
1328
- return removeTemplateWhitespace(renderToStaticMarkup(pfCodeBlock));
1329
- },
1330
- }), []);
1331
- };
1332
-
1333
- const FallbackImg = ({ src, alt, className, fallback }) => {
1334
- const [isSrcValid, setIsSrcValid] = React.useState(true);
1335
- if (src && isSrcValid) {
1336
- return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
1337
- }
1338
- return React.createElement(React.Fragment, null, fallback);
1339
- };
1340
-
1341
- const DASH = '-';
1342
-
1343
- const PopoverStatus = ({ hideHeader, children, isVisible = null, shouldClose = null, statusBody, title, onHide, onShow, }) => {
1344
- return (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible, shouldClose: shouldClose },
1345
- React.createElement(Button, { variant: "link", isInline: true }, statusBody)));
1346
- };
1347
-
1348
- const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
1349
- if (!title) {
1350
- return React.createElement(React.Fragment, null, DASH);
1351
- }
1352
- return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
1353
- icon &&
1354
- React.cloneElement(icon, {
1355
- className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
1356
- }),
1357
- !iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
1358
- };
1359
-
1360
- const GenericStatus = (props) => {
1361
- const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
1362
- const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
1363
- const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
1364
- return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
1365
- };
1366
-
1367
- // import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
1368
- const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(CheckCircleIcon, { "data-test": "success-icon", size: size, color: global_palette_green_500.value, className: className, title: title }));
1369
-
1370
- // export const PendingStatus: React.FC<StatusComponentProps> = (props) => (
1371
- // <GenericStatus {...props} Icon={HourglassHalfIcon} title={props.title || 'Pending'} />
1372
- // );
1373
- // PendingStatus.displayName = 'PendingStatus';
1374
- // export const ProgressStatus: React.FC<StatusComponentProps> = (props) => (
1375
- // <GenericStatus {...props} Icon={InProgressIcon} title={props.title || 'In progress'} />
1376
- // );
1377
- // ProgressStatus.displayName = 'ProgressStatus';
1378
- const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
1379
- SuccessStatus.displayName = 'SuccessStatus';
1380
- // export const WarningStatus: React.FC<StatusComponentProps> = (props) => (
1381
- // <GenericStatus {...props} Icon={YellowExclamationTriangleIcon} title={props.title || 'Warning'} />
1382
- // );
1383
- // WarningStatus.displayName = 'WarningStatus';
1384
-
1385
- const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
1386
- const statusProps = { title: title || status, iconOnly, noTooltip, className };
1387
- switch (status) {
1388
- case 'In Progress':
1389
- return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
1390
- case 'Complete':
1391
- return React.createElement(SuccessStatus, Object.assign({}, statusProps));
1392
- default:
1393
- return React.createElement(React.Fragment, null, status || DASH);
1394
- }
1395
- };
1396
- const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
1397
-
1398
1286
  // eslint-disable-next-line @typescript-eslint/no-require-imports
1399
1287
  const DOMPurify = require('dompurify');
1400
1288
  const markdownConvert = (markdown, extensions) => {
@@ -1603,6 +1491,119 @@ const QuickStartMarkdownView = ({ content, exactHeight, className, }) => {
1603
1491
  markdown.renderExtension(docContext, rootSelector))), className: className }));
1604
1492
  };
1605
1493
 
1494
+ var AdmonitionType;
1495
+ (function (AdmonitionType) {
1496
+ AdmonitionType["TIP"] = "TIP";
1497
+ AdmonitionType["NOTE"] = "NOTE";
1498
+ AdmonitionType["IMPORTANT"] = "IMPORTANT";
1499
+ AdmonitionType["WARNING"] = "WARNING";
1500
+ AdmonitionType["CAUTION"] = "CAUTION";
1501
+ })(AdmonitionType || (AdmonitionType = {}));
1502
+ const admonitionToAlertVariantMap = {
1503
+ [AdmonitionType.NOTE]: { variant: 'info' },
1504
+ [AdmonitionType.TIP]: { variant: 'default', customIcon: React.createElement(LightbulbIcon, null) },
1505
+ [AdmonitionType.IMPORTANT]: { variant: 'danger' },
1506
+ [AdmonitionType.CAUTION]: { variant: 'warning', customIcon: React.createElement(FireIcon, null) },
1507
+ [AdmonitionType.WARNING]: { variant: 'warning' },
1508
+ };
1509
+ const useAdmonitionShowdownExtension = () => {
1510
+ // const { getResource } = React.useContext<QuickStartContextValues>(QuickStartContext);
1511
+ return React.useMemo(() => ({
1512
+ type: 'lang',
1513
+ regex: /\[(.+)]{{(admonition) ([\w-]+)}}/g,
1514
+ replace: (text, content, admonitionLabel, admonitionType, groupId) => {
1515
+ if (!content || !admonitionLabel || !admonitionType || !groupId) {
1516
+ return text;
1517
+ }
1518
+ admonitionType = admonitionType.toUpperCase();
1519
+ const { variant, customIcon } = admonitionToAlertVariantMap[admonitionType];
1520
+ const style = admonitionType === AdmonitionType.CAUTION ? { backgroundColor: '#ec7a0915' } : {};
1521
+ const mdContent = React.createElement(QuickStartMarkdownView, { content: content });
1522
+ const pfAlert = (React.createElement(Alert, { variant: variant, customIcon: customIcon && customIcon, isInline: true, title: admonitionType, className: "pfext-markdown-admonition", style: style }, mdContent));
1523
+ return removeTemplateWhitespace(renderToStaticMarkup(pfAlert));
1524
+ },
1525
+ }), []);
1526
+ };
1527
+
1528
+ const useCodeShowdownExtension = () => {
1529
+ return React.useMemo(() => ({
1530
+ type: 'output',
1531
+ regex: /<pre><code>(.*?)\n?<\/code><\/pre>/g,
1532
+ replace: (text, content) => {
1533
+ if (!content) {
1534
+ return text;
1535
+ }
1536
+ const pfCodeBlock = React.createElement(CodeBlock, null, content);
1537
+ return removeTemplateWhitespace(renderToStaticMarkup(pfCodeBlock));
1538
+ },
1539
+ }), []);
1540
+ };
1541
+
1542
+ const FallbackImg = ({ src, alt, className, fallback }) => {
1543
+ const [isSrcValid, setIsSrcValid] = React.useState(true);
1544
+ if (src && isSrcValid) {
1545
+ return React.createElement("img", { className: className, src: src, alt: alt, onError: () => setIsSrcValid(false) });
1546
+ }
1547
+ return React.createElement(React.Fragment, null, fallback);
1548
+ };
1549
+
1550
+ const DASH = '-';
1551
+
1552
+ const PopoverStatus = ({ hideHeader, children, isVisible = null, shouldClose = null, statusBody, title, onHide, onShow, }) => {
1553
+ return (React.createElement(Popover, { position: PopoverPosition.right, headerContent: hideHeader ? null : title, bodyContent: children, "aria-label": title, onHide: onHide, onShow: onShow, isVisible: isVisible, shouldClose: shouldClose },
1554
+ React.createElement(Button, { variant: "link", isInline: true }, statusBody)));
1555
+ };
1556
+
1557
+ const StatusIconAndText = ({ icon, title, spin, iconOnly, noTooltip, className, }) => {
1558
+ if (!title) {
1559
+ return React.createElement(React.Fragment, null, DASH);
1560
+ }
1561
+ return (React.createElement("span", { className: css('pfext-icon-and-text', className), title: iconOnly && !noTooltip ? title : undefined },
1562
+ icon &&
1563
+ React.cloneElement(icon, {
1564
+ className: css(spin && 'fa-spin', icon.props.className, !iconOnly && 'pfext-icon-and-text__icon pfext-icon-flex-child'),
1565
+ }),
1566
+ !iconOnly && React.createElement(CamelCaseWrap, { value: title, dataTest: "status-text" })));
1567
+ };
1568
+
1569
+ const GenericStatus = (props) => {
1570
+ const { Icon, children, popoverTitle, title, noTooltip, iconOnly } = props, restProps = __rest(props, ["Icon", "children", "popoverTitle", "title", "noTooltip", "iconOnly"]);
1571
+ const renderIcon = iconOnly && !noTooltip ? React.createElement(Icon, { title: title }) : React.createElement(Icon, null);
1572
+ const statusBody = (React.createElement(StatusIconAndText, Object.assign({}, restProps, { noTooltip: noTooltip, title: title, iconOnly: iconOnly, icon: renderIcon })));
1573
+ return React.Children.toArray(children).length ? (React.createElement(PopoverStatus, Object.assign({ title: popoverTitle || title }, restProps, { statusBody: statusBody }), children)) : (statusBody);
1574
+ };
1575
+
1576
+ // import { global_warning_color_100 as warningColor } from '@patternfly/react-tokens/dist/js/global_warning_color_100';
1577
+ const GreenCheckCircleIcon = ({ className, title, size }) => (React.createElement(CheckCircleIcon, { "data-test": "success-icon", size: size, color: global_palette_green_500.value, className: className, title: title }));
1578
+
1579
+ // export const PendingStatus: React.FC<StatusComponentProps> = (props) => (
1580
+ // <GenericStatus {...props} Icon={HourglassHalfIcon} title={props.title || 'Pending'} />
1581
+ // );
1582
+ // PendingStatus.displayName = 'PendingStatus';
1583
+ // export const ProgressStatus: React.FC<StatusComponentProps> = (props) => (
1584
+ // <GenericStatus {...props} Icon={InProgressIcon} title={props.title || 'In progress'} />
1585
+ // );
1586
+ // ProgressStatus.displayName = 'ProgressStatus';
1587
+ const SuccessStatus = (props) => (React.createElement(GenericStatus, Object.assign({}, props, { Icon: GreenCheckCircleIcon, title: props.title || 'Healthy' })));
1588
+ SuccessStatus.displayName = 'SuccessStatus';
1589
+ // export const WarningStatus: React.FC<StatusComponentProps> = (props) => (
1590
+ // <GenericStatus {...props} Icon={YellowExclamationTriangleIcon} title={props.title || 'Warning'} />
1591
+ // );
1592
+ // WarningStatus.displayName = 'WarningStatus';
1593
+
1594
+ const Status = ({ status, title, iconOnly, noTooltip, className, }) => {
1595
+ const statusProps = { title: title || status, iconOnly, noTooltip, className };
1596
+ switch (status) {
1597
+ case 'In Progress':
1598
+ return React.createElement(StatusIconAndText, Object.assign({}, statusProps, { icon: React.createElement(SyncAltIcon, null) }));
1599
+ case 'Complete':
1600
+ return React.createElement(SuccessStatus, Object.assign({}, statusProps));
1601
+ default:
1602
+ return React.createElement(React.Fragment, null, status || DASH);
1603
+ }
1604
+ };
1605
+ const StatusIcon = ({ status }) => (React.createElement(Status, { status: status, iconOnly: true }));
1606
+
1606
1607
  const QuickStartTileDescription = ({ description, prerequisites, }) => {
1607
1608
  const { getResource } = React.useContext(QuickStartContext);
1608
1609
  const prereqs = prerequisites === null || prerequisites === void 0 ? void 0 : prerequisites.filter((p) => p);
@@ -1668,7 +1669,8 @@ const QuickStartTileHeader = ({ status, duration, name, type, quickStartId, }) =
1668
1669
  [QuickStartStatus.NOT_STARTED]: getResource('Not started'),
1669
1670
  };
1670
1671
  return (React.createElement("div", { className: "pfext-quick-start-tile-header" },
1671
- React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId }, name),
1672
+ React.createElement(Title, { headingLevel: "h3", "data-test": "title", id: quickStartId },
1673
+ React.createElement(QuickStartMarkdownView, { content: name })),
1672
1674
  React.createElement("div", { className: "pfext-quick-start-tile-header__status" },
1673
1675
  type && (React.createElement(Label, { className: "pfext-quick-start-tile-header--margin", color: type.color }, type.text)),
1674
1676
  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))),
@@ -1706,9 +1708,14 @@ const QuickStartTile = ({ quickStart, status, isActive, onClick = () => { }, })
1706
1708
  // @ts-ignore
1707
1709
  component: "div", style: {
1708
1710
  cursor: 'pointer',
1709
- }, 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,
1711
+ }, 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) => {
1712
+ if (event.key === 'Enter' || event.key === ' ') {
1713
+ setActiveQuickStart(id, tasks === null || tasks === void 0 ? void 0 : tasks.length);
1714
+ onClick();
1715
+ }
1716
+ },
1710
1717
  // https://github.com/patternfly/patternfly-react/issues/7039
1711
- href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent })));
1718
+ href: "#", "data-test": `tile ${id}`, description: React.createElement(QuickStartTileDescription, { description: description, prerequisites: prerequisites }), footer: footerComponent, tabIndex: 0 })));
1712
1719
  };
1713
1720
 
1714
1721
  const QuickStartCatalog = ({ quickStarts }) => {
@@ -1951,6 +1958,13 @@ const TaskIcon = ({ taskIndex, taskStatus }) => {
1951
1958
  return React.createElement("span", { className: classNames }, content);
1952
1959
  };
1953
1960
  const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
1961
+ const titleRef = React.useRef(null);
1962
+ React.useEffect(() => {
1963
+ if (isActiveTask) {
1964
+ // Focus the WizardNavItem button element that contains the title
1965
+ titleRef.current.parentNode.focus();
1966
+ }
1967
+ }, [isActiveTask]);
1954
1968
  const classNames = css('pfext-quick-start-task-header__title', {
1955
1969
  'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
1956
1970
  'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
@@ -1963,7 +1977,7 @@ const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, is
1963
1977
  const tryAgain = failedReview && (React.createElement(React.Fragment, null,
1964
1978
  React.createElement("div", null),
1965
1979
  React.createElement("div", { className: "pfext-quick-start-task-header__tryagain" }, "Try the steps again.")));
1966
- const content = (React.createElement("div", { className: "pfext-quick-start-task-header" },
1980
+ const content = (React.createElement("div", { className: "pfext-quick-start-task-header", ref: titleRef },
1967
1981
  React.createElement(TaskIcon, { taskIndex: taskIndex, taskStatus: taskStatus }),
1968
1982
  React.createElement(Title, { headingLevel: "h3", size: size, className: classNames },
1969
1983
  React.createElement("span", { dangerouslySetInnerHTML: { __html: removeParagraphWrap(markdownConvert(title)) } }),
@@ -2170,6 +2184,7 @@ const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
2170
2184
  };
2171
2185
  const QuickStartPanelContent = (_a) => {
2172
2186
  var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true, headerVariant = '' } = _a, props = __rest(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose", "headerVariant"]);
2187
+ const titleRef = React.useRef(null);
2173
2188
  const { getResource, activeQuickStartState } = React.useContext(QuickStartContext);
2174
2189
  const [contentRef, setContentRef] = React.useState();
2175
2190
  const shadows = useScrollShadows(contentRef);
@@ -2194,12 +2209,19 @@ const QuickStartPanelContent = (_a) => {
2194
2209
  }
2195
2210
  return Number.parseInt(taskNumber, 10) + 1;
2196
2211
  };
2212
+ React.useEffect(() => {
2213
+ if (quickStart) {
2214
+ titleRef.current.focus();
2215
+ }
2216
+ }, [quickStart]);
2197
2217
  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),
2198
2218
  React.createElement("div", { className: headerClasses },
2199
2219
  React.createElement(DrawerHead, null,
2200
- React.createElement("div", { className: "pfext-quick-start-panel-content__title" },
2201
- 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 :
2202
- quickStart.spec.displayName,
2220
+ React.createElement("div", { className: "pfext-quick-start-panel-content__title", tabIndex: -1, ref: titleRef },
2221
+ React.createElement(Title, { headingLevel: "h1", size: "xl", className: "pfext-quick-start-panel-content__name", style: { marginRight: 'var(--pf-global--spacer--md)' } },
2222
+ React.createElement("span", { dangerouslySetInnerHTML: {
2223
+ __html: removeParagraphWrap(markdownConvert(quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.displayName)),
2224
+ } }),
2203
2225
  ' ',
2204
2226
  React.createElement("small", { className: "pfext-quick-start-panel-content__duration" }, (quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes) ? getResource('{{type}} • {{duration, number}} minutes', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)
2205
2227
  .replace('{{duration, number}}', quickStart === null || quickStart === void 0 ? void 0 : quickStart.spec.durationMinutes)