@patternfly/quickstarts 5.3.0-prerelease.1 → 5.4.0-prerelease.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -583,6 +583,7 @@ const QuickStartContextDefaults = {
583
583
  markdown: null,
584
584
  loading: false,
585
585
  alwaysShowTaskReview: true,
586
+ focusOnQuickStart: true,
586
587
  };
587
588
  const QuickStartContext = createContext(QuickStartContextDefaults);
588
589
  const getResource = (resource, options, resourceBundle, lng) => {
@@ -1984,12 +1985,13 @@ const TaskIcon = ({ taskIndex, taskStatus }) => {
1984
1985
  };
1985
1986
  const QuickStartTaskHeader = ({ title, taskIndex, subtitle, taskStatus, size, isActiveTask, onTaskSelect, children, }) => {
1986
1987
  const titleRef = React.useRef(null);
1988
+ const { focusOnQuickStart } = React.useContext(QuickStartContext);
1987
1989
  React.useEffect(() => {
1988
- if (isActiveTask) {
1990
+ if (focusOnQuickStart && isActiveTask) {
1989
1991
  // Focus the WizardNavItem button element that contains the title
1990
1992
  titleRef.current.parentNode.focus();
1991
1993
  }
1992
- }, [isActiveTask]);
1994
+ }, [focusOnQuickStart, isActiveTask]);
1993
1995
  const classNames = css('pfext-quick-start-task-header__title', {
1994
1996
  'pfext-quick-start-task-header__title-success': taskStatus === QuickStartTaskStatus.SUCCESS,
1995
1997
  'pfext-quick-start-task-header__title-failed': taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
@@ -2200,7 +2202,7 @@ const useScrollTopOnTaskNumberChange = (node, taskNumber) => {
2200
2202
  const QuickStartPanelContent = (_a) => {
2201
2203
  var { quickStarts = [], handleClose, activeQuickStartID, appendTo, isResizable = true, showClose = true, headerVariant = '' } = _a, props = __rest(_a, ["quickStarts", "handleClose", "activeQuickStartID", "appendTo", "isResizable", "showClose", "headerVariant"]);
2202
2204
  const titleRef = React.useRef(null);
2203
- const { getResource, activeQuickStartState } = React.useContext(QuickStartContext);
2205
+ const { getResource, activeQuickStartState, focusOnQuickStart } = React.useContext(QuickStartContext);
2204
2206
  const [contentRef, setContentRef] = React.useState();
2205
2207
  const shadows = useScrollShadows(contentRef);
2206
2208
  const quickStart = quickStarts.find((qs) => qs.metadata.name === activeQuickStartID);
@@ -2225,10 +2227,10 @@ const QuickStartPanelContent = (_a) => {
2225
2227
  return Number.parseInt(taskNumber) + 1;
2226
2228
  };
2227
2229
  React.useEffect(() => {
2228
- if (quickStart) {
2230
+ if (focusOnQuickStart && quickStart) {
2229
2231
  titleRef.current.focus();
2230
2232
  }
2231
- }, [quickStart]);
2233
+ }, [focusOnQuickStart, quickStart]);
2232
2234
  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),
2233
2235
  React.createElement("div", { className: headerClasses },
2234
2236
  React.createElement(DrawerHead, null,