@patternfly/react-core 4.234.3 → 4.235.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.
Files changed (147) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/esm/next/components/Wizard/Wizard.d.ts +40 -0
  3. package/dist/esm/next/components/Wizard/Wizard.d.ts.map +1 -0
  4. package/dist/esm/next/components/Wizard/Wizard.js +86 -0
  5. package/dist/esm/next/components/Wizard/Wizard.js.map +1 -0
  6. package/dist/esm/next/components/Wizard/WizardBody.d.ts +20 -0
  7. package/dist/esm/next/components/Wizard/WizardBody.d.ts.map +1 -0
  8. package/dist/esm/next/components/Wizard/WizardBody.js +7 -0
  9. package/dist/esm/next/components/Wizard/WizardBody.js.map +1 -0
  10. package/dist/esm/next/components/Wizard/WizardContext.d.ts +49 -0
  11. package/dist/esm/next/components/Wizard/WizardContext.d.ts.map +1 -0
  12. package/dist/esm/next/components/Wizard/WizardContext.js +34 -0
  13. package/dist/esm/next/components/Wizard/WizardContext.js.map +1 -0
  14. package/dist/esm/next/components/Wizard/WizardFooter.d.ts +28 -0
  15. package/dist/esm/next/components/Wizard/WizardFooter.d.ts.map +1 -0
  16. package/dist/esm/next/components/Wizard/WizardFooter.js +11 -0
  17. package/dist/esm/next/components/Wizard/WizardFooter.js.map +1 -0
  18. package/dist/esm/next/components/Wizard/WizardHeader.d.ts +21 -0
  19. package/dist/esm/next/components/Wizard/WizardHeader.d.ts.map +1 -0
  20. package/dist/esm/next/components/Wizard/WizardHeader.js +13 -0
  21. package/dist/esm/next/components/Wizard/WizardHeader.js.map +1 -0
  22. package/dist/esm/next/components/Wizard/WizardNav.d.ts +15 -0
  23. package/dist/esm/next/components/Wizard/WizardNav.d.ts.map +1 -0
  24. package/dist/esm/next/components/Wizard/WizardNav.js +13 -0
  25. package/dist/esm/next/components/Wizard/WizardNav.js.map +1 -0
  26. package/dist/esm/next/components/Wizard/WizardNavItem.d.ts +25 -0
  27. package/dist/esm/next/components/Wizard/WizardNavItem.d.ts.map +1 -0
  28. package/dist/esm/next/components/Wizard/WizardNavItem.js +33 -0
  29. package/dist/esm/next/components/Wizard/WizardNavItem.js.map +1 -0
  30. package/dist/esm/next/components/Wizard/WizardStep.d.ts +20 -0
  31. package/dist/esm/next/components/Wizard/WizardStep.d.ts.map +1 -0
  32. package/dist/esm/next/components/Wizard/WizardStep.js +5 -0
  33. package/dist/esm/next/components/Wizard/WizardStep.js.map +1 -0
  34. package/dist/esm/next/components/Wizard/WizardToggle.d.ts +26 -0
  35. package/dist/esm/next/components/Wizard/WizardToggle.d.ts.map +1 -0
  36. package/dist/esm/next/components/Wizard/WizardToggle.js +81 -0
  37. package/dist/esm/next/components/Wizard/WizardToggle.js.map +1 -0
  38. package/dist/esm/next/components/Wizard/hooks/index.d.ts +2 -0
  39. package/dist/esm/next/components/Wizard/hooks/index.d.ts.map +1 -0
  40. package/dist/esm/next/components/Wizard/hooks/index.js +2 -0
  41. package/dist/esm/next/components/Wizard/hooks/index.js.map +1 -0
  42. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.d.ts +8 -0
  43. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.d.ts.map +1 -0
  44. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.js +20 -0
  45. package/dist/esm/next/components/Wizard/hooks/useWizardFooter.js.map +1 -0
  46. package/dist/esm/next/components/Wizard/index.d.ts +12 -0
  47. package/dist/esm/next/components/Wizard/index.d.ts.map +1 -0
  48. package/dist/esm/next/components/Wizard/index.js +12 -0
  49. package/dist/esm/next/components/Wizard/index.js.map +1 -0
  50. package/dist/esm/next/components/Wizard/types.d.ts +69 -0
  51. package/dist/esm/next/components/Wizard/types.d.ts.map +1 -0
  52. package/dist/esm/next/components/Wizard/types.js +20 -0
  53. package/dist/esm/next/components/Wizard/types.js.map +1 -0
  54. package/dist/esm/next/components/Wizard/utils.d.ts +15 -0
  55. package/dist/esm/next/components/Wizard/utils.d.ts.map +1 -0
  56. package/dist/esm/next/components/Wizard/utils.js +35 -0
  57. package/dist/esm/next/components/Wizard/utils.js.map +1 -0
  58. package/dist/esm/next/components/index.d.ts +1 -1
  59. package/dist/esm/next/components/index.d.ts.map +1 -1
  60. package/dist/esm/next/components/index.js +1 -1
  61. package/dist/esm/next/components/index.js.map +1 -1
  62. package/dist/js/next/components/Wizard/Wizard.d.ts +40 -0
  63. package/dist/js/next/components/Wizard/Wizard.d.ts.map +1 -0
  64. package/dist/js/next/components/Wizard/Wizard.js +90 -0
  65. package/dist/js/next/components/Wizard/Wizard.js.map +1 -0
  66. package/dist/js/next/components/Wizard/WizardBody.d.ts +20 -0
  67. package/dist/js/next/components/Wizard/WizardBody.d.ts.map +1 -0
  68. package/dist/js/next/components/Wizard/WizardBody.js +12 -0
  69. package/dist/js/next/components/Wizard/WizardBody.js.map +1 -0
  70. package/dist/js/next/components/Wizard/WizardContext.d.ts +49 -0
  71. package/dist/js/next/components/Wizard/WizardContext.d.ts.map +1 -0
  72. package/dist/js/next/components/Wizard/WizardContext.js +40 -0
  73. package/dist/js/next/components/Wizard/WizardContext.js.map +1 -0
  74. package/dist/js/next/components/Wizard/WizardFooter.d.ts +28 -0
  75. package/dist/js/next/components/Wizard/WizardFooter.d.ts.map +1 -0
  76. package/dist/js/next/components/Wizard/WizardFooter.js +16 -0
  77. package/dist/js/next/components/Wizard/WizardFooter.js.map +1 -0
  78. package/dist/js/next/components/Wizard/WizardHeader.d.ts +21 -0
  79. package/dist/js/next/components/Wizard/WizardHeader.d.ts.map +1 -0
  80. package/dist/js/next/components/Wizard/WizardHeader.js +18 -0
  81. package/dist/js/next/components/Wizard/WizardHeader.js.map +1 -0
  82. package/dist/js/next/components/Wizard/WizardNav.d.ts +15 -0
  83. package/dist/js/next/components/Wizard/WizardNav.d.ts.map +1 -0
  84. package/dist/js/next/components/Wizard/WizardNav.js +18 -0
  85. package/dist/js/next/components/Wizard/WizardNav.js.map +1 -0
  86. package/dist/js/next/components/Wizard/WizardNavItem.d.ts +25 -0
  87. package/dist/js/next/components/Wizard/WizardNavItem.d.ts.map +1 -0
  88. package/dist/js/next/components/Wizard/WizardNavItem.js +37 -0
  89. package/dist/js/next/components/Wizard/WizardNavItem.js.map +1 -0
  90. package/dist/js/next/components/Wizard/WizardStep.d.ts +20 -0
  91. package/dist/js/next/components/Wizard/WizardStep.d.ts.map +1 -0
  92. package/dist/js/next/components/Wizard/WizardStep.js +10 -0
  93. package/dist/js/next/components/Wizard/WizardStep.js.map +1 -0
  94. package/dist/js/next/components/Wizard/WizardToggle.d.ts +26 -0
  95. package/dist/js/next/components/Wizard/WizardToggle.d.ts.map +1 -0
  96. package/dist/js/next/components/Wizard/WizardToggle.js +86 -0
  97. package/dist/js/next/components/Wizard/WizardToggle.js.map +1 -0
  98. package/dist/js/next/components/Wizard/hooks/index.d.ts +2 -0
  99. package/dist/js/next/components/Wizard/hooks/index.d.ts.map +1 -0
  100. package/dist/js/next/components/Wizard/hooks/index.js +6 -0
  101. package/dist/js/next/components/Wizard/hooks/index.js.map +1 -0
  102. package/dist/js/next/components/Wizard/hooks/useWizardFooter.d.ts +8 -0
  103. package/dist/js/next/components/Wizard/hooks/useWizardFooter.d.ts.map +1 -0
  104. package/dist/js/next/components/Wizard/hooks/useWizardFooter.js +25 -0
  105. package/dist/js/next/components/Wizard/hooks/useWizardFooter.js.map +1 -0
  106. package/dist/js/next/components/Wizard/index.d.ts +12 -0
  107. package/dist/js/next/components/Wizard/index.d.ts.map +1 -0
  108. package/dist/js/next/components/Wizard/index.js +17 -0
  109. package/dist/js/next/components/Wizard/index.js.map +1 -0
  110. package/dist/js/next/components/Wizard/types.d.ts +69 -0
  111. package/dist/js/next/components/Wizard/types.d.ts.map +1 -0
  112. package/dist/js/next/components/Wizard/types.js +29 -0
  113. package/dist/js/next/components/Wizard/types.js.map +1 -0
  114. package/dist/js/next/components/Wizard/utils.d.ts +15 -0
  115. package/dist/js/next/components/Wizard/utils.d.ts.map +1 -0
  116. package/dist/js/next/components/Wizard/utils.js +41 -0
  117. package/dist/js/next/components/Wizard/utils.js.map +1 -0
  118. package/dist/js/next/components/index.d.ts +1 -1
  119. package/dist/js/next/components/index.d.ts.map +1 -1
  120. package/dist/js/next/components/index.js +1 -1
  121. package/dist/js/next/components/index.js.map +1 -1
  122. package/dist/umd/react-core.css +230 -230
  123. package/dist/umd/react-core.min.css +734 -734
  124. package/package.json +5 -5
  125. package/src/components/Card/examples/Card.md +67 -38
  126. package/src/components/Wizard/examples/Wizard.md +21 -4
  127. package/src/demos/CardDemos.md +4 -0
  128. package/src/next/components/Wizard/Wizard.tsx +184 -0
  129. package/src/next/components/Wizard/WizardBody.tsx +34 -0
  130. package/src/next/components/Wizard/WizardContext.tsx +104 -0
  131. package/src/next/components/Wizard/WizardFooter.tsx +63 -0
  132. package/src/next/components/Wizard/WizardHeader.tsx +53 -0
  133. package/src/next/components/Wizard/WizardNav.tsx +41 -0
  134. package/src/next/components/Wizard/WizardNavItem.tsx +103 -0
  135. package/src/next/components/Wizard/WizardStep.tsx +23 -0
  136. package/src/next/components/Wizard/WizardToggle.tsx +209 -0
  137. package/src/next/components/Wizard/__tests__/Wizard.test.tsx +298 -0
  138. package/src/next/components/Wizard/examples/Wizard.md +125 -0
  139. package/src/next/components/Wizard/examples/WizardBasic.tsx +22 -0
  140. package/src/next/components/Wizard/examples/WizardCustomNav.tsx +46 -0
  141. package/src/next/components/Wizard/examples/WizardKitchenSink.tsx +170 -0
  142. package/src/next/components/Wizard/hooks/index.ts +1 -0
  143. package/src/next/components/Wizard/hooks/useWizardFooter.tsx +22 -0
  144. package/src/next/components/Wizard/index.ts +11 -0
  145. package/src/next/components/Wizard/types.tsx +101 -0
  146. package/src/next/components/Wizard/utils.ts +47 -0
  147. package/src/next/components/index.ts +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContext.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,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K,CAAC,YAAY,CAAC,CAAC;IACzF,MAAM,IAAI,IAAI,CAAC;IACf,MAAM,IAAI,IAAI,CAAC;IACf,OAAO,IAAI,IAAI,CAAC;IAChB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACxC,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC;AAGD,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,iBAAiB,CAAC,0BAA0B,CAiDrF,CAAC;AAEF,eAAO,MAAM,gBAAgB,0BAAwC,CAAC"}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useWizardContext = exports.WizardContextProvider = exports.WizardContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const utils_1 = require("./utils");
7
+ exports.WizardContext = react_1.default.createContext({});
8
+ // eslint-disable-next-line patternfly-react/no-anonymous-functions
9
+ const WizardContextProvider = ({ steps: initialSteps, footer: initialFooter, currentStepIndex, children, onNext, onBack, onClose, goToStepById, goToStepByName, goToStepByIndex }) => {
10
+ const [steps, setSteps] = react_1.default.useState(initialSteps);
11
+ const [footer, setFooter] = react_1.default.useState(initialFooter);
12
+ const activeStep = utils_1.getActiveStep(steps, currentStepIndex);
13
+ // When the active step changes and the newly active step isn't visited, set the visited flag to true.
14
+ react_1.default.useEffect(() => {
15
+ if (activeStep && !(activeStep === null || activeStep === void 0 ? void 0 : activeStep.visited)) {
16
+ setSteps(prevSteps => prevSteps.map(step => {
17
+ if (step.id === activeStep.id) {
18
+ return Object.assign(Object.assign({}, step), { visited: true });
19
+ }
20
+ return step;
21
+ }));
22
+ }
23
+ }, [activeStep]);
24
+ return (react_1.default.createElement(exports.WizardContext.Provider, { value: {
25
+ steps,
26
+ activeStep,
27
+ footer,
28
+ onNext,
29
+ onBack,
30
+ onClose,
31
+ goToStepById,
32
+ goToStepByName,
33
+ goToStepByIndex,
34
+ setFooter
35
+ } }, typeof children === 'function' ? children({ activeStep, steps, footer, onNext, onBack, onClose }) : children));
36
+ };
37
+ exports.WizardContextProvider = WizardContextProvider;
38
+ const useWizardContext = () => react_1.default.useContext(exports.WizardContext);
39
+ exports.useWizardContext = useWizardContext;
40
+ //# sourceMappingURL=WizardContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContext.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardContext.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,mCAAwC;AAyB3B,QAAA,aAAa,GAAG,eAAK,CAAC,aAAa,CAAC,EAAwB,CAAC,CAAC;AAwB3E,mEAAmE;AAC5D,MAAM,qBAAqB,GAAwD,CAAC,EACzF,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,aAAa,EACrB,gBAAgB,EAChB,QAAQ,EACR,MAAM,EACN,MAAM,EACN,OAAO,EACP,YAAY,EACZ,cAAc,EACd,eAAe,EAChB,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IACvD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1D,MAAM,UAAU,GAAG,qBAAa,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;IAE1D,sGAAsG;IACtG,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,UAAU,IAAI,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAA,EAAE;YACtC,QAAQ,CAAC,SAAS,CAAC,EAAE,CACnB,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACnB,IAAI,IAAI,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,EAAE;oBAC7B,uCAAY,IAAI,KAAE,OAAO,EAAE,IAAI,IAAG;iBACnC;gBAED,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CACH,CAAC;SACH;IACH,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEjB,OAAO,CACL,8BAAC,qBAAa,CAAC,QAAQ,IACrB,KAAK,EAAE;YACL,KAAK;YACL,UAAU;YACV,MAAM;YACN,MAAM;YACN,MAAM;YACN,OAAO;YACP,YAAY;YACZ,cAAc;YACd,eAAe;YACf,SAAS;SACV,IAEA,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,CACtF,CAC1B,CAAC;AACJ,CAAC,CAAC;AAjDW,QAAA,qBAAqB,yBAiDhC;AAEK,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC,eAAK,CAAC,UAAU,CAAC,qBAAa,CAAC,CAAC;AAAzD,QAAA,gBAAgB,oBAAyC"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { WizardControlStep, WizardNavStepFunction } from './types';
3
+ /**
4
+ * Hosts the standard structure of a footer with ties to the active step so that text for buttons can vary from step to step.
5
+ */
6
+ export interface WizardFooterProps {
7
+ /** The currently active WizardStep */
8
+ activeStep: WizardControlStep;
9
+ /** Next button callback */
10
+ onNext: () => WizardNavStepFunction | void;
11
+ /** Back button callback */
12
+ onBack: () => WizardNavStepFunction | void;
13
+ /** Cancel link callback */
14
+ onClose: () => void;
15
+ /** Custom text for the Next button. The activeStep's nextButtonText takes precedence. */
16
+ nextButtonText?: React.ReactNode;
17
+ /** Custom text for the Back button */
18
+ backButtonText?: React.ReactNode;
19
+ /** Custom text for the Cancel link */
20
+ cancelButtonText?: React.ReactNode;
21
+ /** Optional flag to disable the first step's back button */
22
+ disableBackButton?: boolean;
23
+ }
24
+ export declare const WizardFooter: {
25
+ ({ onNext, onBack, onClose, activeStep, disableBackButton, nextButtonText, backButtonText, cancelButtonText }: WizardFooterProps): JSX.Element;
26
+ displayName: string;
27
+ };
28
+ //# sourceMappingURL=WizardFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardFooter.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAEnE;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,sCAAsC;IACtC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,2BAA2B;IAC3B,MAAM,EAAE,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAC3C,2BAA2B;IAC3B,MAAM,EAAE,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAC3C,2BAA2B;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,yFAAyF;IACzF,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,sCAAsC;IACtC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACjC,sCAAsC;IACtC,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,YAAY;mHAStB,iBAAiB;;CAoBnB,CAAC"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardFooter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const react_styles_1 = require("@patternfly/react-styles");
7
+ const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Wizard/wizard"));
8
+ const Button_1 = require("../../../components/Button");
9
+ const WizardFooter = ({ onNext, onBack, onClose, activeStep, disableBackButton, nextButtonText = 'Next', backButtonText = 'Back', cancelButtonText = 'Cancel' }) => (react_1.default.createElement("footer", { className: react_styles_1.css(wizard_1.default.wizardFooter) },
10
+ react_1.default.createElement(Button_1.Button, { variant: Button_1.ButtonVariant.primary, type: "submit", onClick: onNext, isDisabled: activeStep === null || activeStep === void 0 ? void 0 : activeStep.disableNext }, (activeStep === null || activeStep === void 0 ? void 0 : activeStep.nextButtonText) || nextButtonText),
11
+ !(activeStep === null || activeStep === void 0 ? void 0 : activeStep.hideBackButton) && (react_1.default.createElement(Button_1.Button, { variant: Button_1.ButtonVariant.secondary, onClick: onBack, isDisabled: disableBackButton }, backButtonText)),
12
+ !(activeStep === null || activeStep === void 0 ? void 0 : activeStep.hideCancelButton) && (react_1.default.createElement("div", { className: wizard_1.default.wizardFooterCancel },
13
+ react_1.default.createElement(Button_1.Button, { variant: Button_1.ButtonVariant.link, onClick: onClose }, cancelButtonText)))));
14
+ exports.WizardFooter = WizardFooter;
15
+ exports.WizardFooter.displayName = 'WizardFooter';
16
+ //# sourceMappingURL=WizardFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardFooter.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardFooter.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,2DAA+C;AAC/C,2GAA2E;AAE3E,uDAAmE;AA0B5D,MAAM,YAAY,GAAG,CAAC,EAC3B,MAAM,EACN,MAAM,EACN,OAAO,EACP,UAAU,EACV,iBAAiB,EACjB,cAAc,GAAG,MAAM,EACvB,cAAc,GAAG,MAAM,EACvB,gBAAgB,GAAG,QAAQ,EACT,EAAE,EAAE,CAAC,CACvB,0CAAQ,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,YAAY,CAAC;IACzC,8BAAC,eAAM,IAAC,OAAO,EAAE,sBAAa,CAAC,OAAO,EAAE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,WAAW,IACvG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,cAAc,KAAI,cAAc,CACtC;IAER,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,cAAc,CAAA,IAAI,CAC9B,8BAAC,eAAM,IAAC,OAAO,EAAE,sBAAa,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,iBAAiB,IACrF,cAAc,CACR,CACV;IAEA,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,gBAAgB,CAAA,IAAI,CAChC,uCAAK,SAAS,EAAE,gBAAM,CAAC,kBAAkB;QACvC,8BAAC,eAAM,IAAC,OAAO,EAAE,sBAAa,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,IAClD,gBAAgB,CACV,CACL,CACP,CACM,CACV,CAAC;AA7BW,QAAA,YAAY,gBA6BvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ export interface WizardHeaderProps {
3
+ /** Callback function called when the X (Close) button is clicked */
4
+ onClose?: () => void;
5
+ /** Title of the wizard */
6
+ title: string;
7
+ /** Description of the wizard */
8
+ description?: React.ReactNode;
9
+ /** Component type of the description */
10
+ descriptionComponent?: 'div' | 'p';
11
+ /** Flag indicating whether the close button should be in the header */
12
+ hideClose?: boolean;
13
+ /** Aria-label applied to the X (Close) button */
14
+ closeButtonAriaLabel?: string;
15
+ /** id for the title */
16
+ titleId?: string;
17
+ /** id for the description */
18
+ descriptionId?: string;
19
+ }
20
+ export declare const WizardHeader: React.FunctionComponent<WizardHeaderProps>;
21
+ //# sourceMappingURL=WizardHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardHeader.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,MAAM,WAAW,iBAAiB;IAChC,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,wCAAwC;IACxC,oBAAoB,CAAC,EAAE,KAAK,GAAG,GAAG,CAAC;IACnC,uEAAuE;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iDAAiD;IACjD,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6BAA6B;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAyBnE,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardHeader = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Wizard/wizard"));
7
+ const react_styles_1 = require("@patternfly/react-styles");
8
+ const Button_1 = require("../../../components/Button");
9
+ const Title_1 = require("../../../components/Title");
10
+ const times_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/times-icon'));
11
+ const WizardHeader = ({ onClose = () => undefined, title, description, hideClose, closeButtonAriaLabel, titleId, descriptionComponent: Component = 'p', descriptionId }) => (React.createElement("div", { className: react_styles_1.css(wizard_1.default.wizardHeader) },
12
+ !hideClose && (React.createElement(Button_1.Button, { variant: "plain", className: react_styles_1.css(wizard_1.default.wizardClose), "aria-label": closeButtonAriaLabel, onClick: onClose },
13
+ React.createElement(times_icon_1.default, { "aria-hidden": "true" }))),
14
+ React.createElement(Title_1.Title, { headingLevel: "h2", size: "3xl", className: react_styles_1.css(wizard_1.default.wizardTitle), "aria-label": title, id: titleId }, title || React.createElement(React.Fragment, null, "\u00A0")),
15
+ description && (React.createElement(Component, { className: react_styles_1.css(wizard_1.default.wizardDescription), id: descriptionId }, description))));
16
+ exports.WizardHeader = WizardHeader;
17
+ exports.WizardHeader.displayName = 'WizardHeader';
18
+ //# sourceMappingURL=WizardHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardHeader.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardHeader.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2GAA2E;AAC3E,2DAA+C;AAC/C,uDAAoD;AACpD,qDAAkD;AAClD,0GAA0E;AAqBnE,MAAM,YAAY,GAA+C,CAAC,EACvE,OAAO,GAAG,GAAG,EAAE,CAAC,SAAS,EACzB,KAAK,EACL,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,OAAO,EACP,oBAAoB,EAAE,SAAS,GAAG,GAAG,EACrC,aAAa,EACK,EAAE,EAAE,CAAC,CACvB,6BAAK,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,YAAY,CAAC;IACrC,CAAC,SAAS,IAAI,CACb,oBAAC,eAAM,IAAC,OAAO,EAAC,OAAO,EAAC,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,WAAW,CAAC,gBAAc,oBAAoB,EAAE,OAAO,EAAE,OAAO;QAC5G,oBAAC,oBAAS,mBAAa,MAAM,GAAG,CACzB,CACV;IACD,oBAAC,aAAK,IAAC,YAAY,EAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,WAAW,CAAC,gBAAc,KAAK,EAAE,EAAE,EAAE,OAAO,IACnG,KAAK,IAAI,mDAAW,CACf;IACP,WAAW,IAAI,CACd,oBAAC,SAAS,IAAC,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,iBAAiB,CAAC,EAAE,EAAE,EAAE,aAAa,IACnE,WAAW,CACF,CACb,CACG,CACP,CAAC;AAzBW,QAAA,YAAY,gBAyBvB;AACF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ export interface WizardNavProps {
3
+ /** children should be WizardNavItem components */
4
+ children?: any;
5
+ /** Aria-label applied to the nav element */
6
+ 'aria-label'?: string;
7
+ /** Sets the aria-labelledby attribute on the nav element */
8
+ 'aria-labelledby'?: string;
9
+ /** Whether the nav is expanded */
10
+ isOpen?: boolean;
11
+ /** True to return the inner list without the wrapping nav element */
12
+ returnList?: boolean;
13
+ }
14
+ export declare const WizardNav: React.FunctionComponent<WizardNavProps>;
15
+ //# sourceMappingURL=WizardNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardNav.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardNav.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,4CAA4C;IAC5C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kCAAkC;IAClC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,cAAc,CAsB7D,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardNav = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Wizard/wizard"));
7
+ const react_styles_1 = require("@patternfly/react-styles");
8
+ const WizardNav = ({ children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, isOpen = false, returnList = false }) => {
9
+ const innerList = React.createElement("ol", { className: react_styles_1.css(wizard_1.default.wizardNavList) }, children);
10
+ if (returnList) {
11
+ return innerList;
12
+ }
13
+ return (React.createElement("nav", { className: react_styles_1.css(wizard_1.default.wizardNav, isOpen && wizard_1.default.modifiers.expanded), "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy },
14
+ React.createElement("ol", { className: react_styles_1.css(wizard_1.default.wizardNavList) }, children)));
15
+ };
16
+ exports.WizardNav = WizardNav;
17
+ exports.WizardNav.displayName = 'WizardNav';
18
+ //# sourceMappingURL=WizardNav.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardNav.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardNav.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2GAA2E;AAC3E,2DAA+C;AAexC,MAAM,SAAS,GAA4C,CAAC,EACjE,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,MAAM,GAAG,KAAK,EACd,UAAU,GAAG,KAAK,EACH,EAAE,EAAE;IACnB,MAAM,SAAS,GAAG,4BAAI,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,aAAa,CAAC,IAAG,QAAQ,CAAM,CAAC;IAE5E,IAAI,UAAU,EAAE;QACd,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,CACL,6BACE,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,SAAS,EAAE,MAAM,IAAI,gBAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,gBACzD,SAAS,qBACJ,cAAc;QAE/B,4BAAI,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,aAAa,CAAC,IAAG,QAAQ,CAAM,CACrD,CACP,CAAC;AACJ,CAAC,CAAC;AAtBW,QAAA,SAAS,aAsBpB;AACF,iBAAS,CAAC,WAAW,GAAG,WAAW,CAAC"}
@@ -0,0 +1,25 @@
1
+ import * as React from 'react';
2
+ export interface WizardNavItemProps {
3
+ /** Can nest a WizardNav component for substeps */
4
+ children?: React.ReactNode;
5
+ /** The content to display in the nav item */
6
+ content?: React.ReactNode;
7
+ /** Whether the nav item is the currently active item */
8
+ isCurrent?: boolean;
9
+ /** Whether the nav item is disabled */
10
+ isDisabled?: boolean;
11
+ /** The step passed into the onNavItemClick callback */
12
+ step: number;
13
+ /** Callback for when the nav item is clicked */
14
+ onNavItemClick?: (step: number) => any;
15
+ /** Component used to render WizardNavItem */
16
+ navItemComponent?: 'button' | 'a';
17
+ /** An optional url to use for when using an anchor component */
18
+ href?: string;
19
+ /** Flag indicating that this NavItem has child steps and is expandable */
20
+ isExpandable?: boolean;
21
+ /** The id for the nav item */
22
+ id?: string | number;
23
+ }
24
+ export declare const WizardNavItem: React.FunctionComponent<WizardNavItemProps>;
25
+ //# sourceMappingURL=WizardNavItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardNavItem.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardNavItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,MAAM,WAAW,kBAAkB;IACjC,kDAAkD;IAClD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,6CAA6C;IAC7C,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uCAAuC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;IACb,gDAAgD;IAChD,cAAc,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,CAAC;IACvC,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAC;IAClC,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8BAA8B;IAC9B,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,kBAAkB,CAyErE,CAAC"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardNavItem = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const React = tslib_1.__importStar(require("react"));
6
+ const react_styles_1 = require("@patternfly/react-styles");
7
+ const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Wizard/wizard"));
8
+ const angle_right_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/angle-right-icon'));
9
+ const WizardNavItem = (_a) => {
10
+ var { children = null, content = '', isCurrent = false, isDisabled = false, step, onNavItemClick = () => undefined, navItemComponent = 'button', href = null, isExpandable = false, id } = _a, rest = tslib_1.__rest(_a, ["children", "content", "isCurrent", "isDisabled", "step", "onNavItemClick", "navItemComponent", "href", "isExpandable", "id"]);
11
+ const NavItemComponent = navItemComponent;
12
+ const [isExpanded, setIsExpanded] = React.useState(false);
13
+ React.useEffect(() => {
14
+ setIsExpanded(isCurrent);
15
+ }, [isCurrent]);
16
+ if (navItemComponent === 'a' && !href && process.env.NODE_ENV !== 'production') {
17
+ // eslint-disable-next-line no-console
18
+ console.error('WizardNavItem: When using an anchor, please provide an href');
19
+ }
20
+ const btnProps = {
21
+ disabled: isDisabled
22
+ };
23
+ const linkProps = {
24
+ tabIndex: isDisabled ? -1 : undefined,
25
+ href
26
+ };
27
+ return (React.createElement("li", { className: react_styles_1.css(wizard_1.default.wizardNavItem, isExpandable && wizard_1.default.modifiers.expandable, isExpandable && isExpanded && wizard_1.default.modifiers.expanded) },
28
+ React.createElement(NavItemComponent, Object.assign({}, rest, (navItemComponent === 'a' ? Object.assign({}, linkProps) : Object.assign({}, btnProps)), (id && { id: id.toString() }), { onClick: () => (isExpandable ? setIsExpanded(!isExpanded || isCurrent) : onNavItemClick(step)), className: react_styles_1.css(wizard_1.default.wizardNavLink, isCurrent && wizard_1.default.modifiers.current, isDisabled && wizard_1.default.modifiers.disabled), "aria-disabled": isDisabled ? true : null, "aria-current": isCurrent && !children ? 'step' : false }, (isExpandable && { 'aria-expanded': isExpanded })), isExpandable ? (React.createElement(React.Fragment, null,
29
+ React.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardNavLinkText) }, content),
30
+ React.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardNavLinkToggle) },
31
+ React.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardNavLinkToggleIcon) },
32
+ React.createElement(angle_right_icon_1.default, null))))) : (content)),
33
+ children));
34
+ };
35
+ exports.WizardNavItem = WizardNavItem;
36
+ exports.WizardNavItem.displayName = 'WizardNavItem';
37
+ //# sourceMappingURL=WizardNavItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardNavItem.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardNavItem.tsx"],"names":[],"mappings":";;;;AAAA,qDAA+B;AAC/B,2DAA+C;AAC/C,2GAA2E;AAC3E,sHAAqF;AAyB9E,MAAM,aAAa,GAAgD,CAAC,EAYtD,EAAE,EAAE;QAZkD,EACzE,QAAQ,GAAG,IAAI,EACf,OAAO,GAAG,EAAE,EACZ,SAAS,GAAG,KAAK,EACjB,UAAU,GAAG,KAAK,EAClB,IAAI,EACJ,cAAc,GAAG,GAAG,EAAE,CAAC,SAAS,EAChC,gBAAgB,GAAG,QAAQ,EAC3B,IAAI,GAAG,IAAI,EACX,YAAY,GAAG,KAAK,EACpB,EAAE,OAEiB,EADhB,IAAI,sBAXkE,8HAY1E,CADQ;IAEP,MAAM,gBAAgB,GAAG,gBAAgB,CAAC;IAE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OAAO,EACrC,UAAU,IAAI,gBAAM,CAAC,SAAS,CAAC,QAAQ,CACxC,mBACc,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,kBACzB,SAAS,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,IACjD,CAAC,YAAY,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC,GAEpD,YAAY,CAAC,CAAC,CAAC,CACd;YACE,8BAAM,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,iBAAiB,CAAC,IAAG,OAAO,CAAQ;YAChE,8BAAM,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,mBAAmB,CAAC;gBAC9C,8BAAM,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,uBAAuB,CAAC;oBAClD,oBAAC,0BAAc,OAAG,CACb,CACF,CACN,CACJ,CAAC,CAAC,CAAC,CACF,OAAO,CACR,CACgB;QAClB,QAAQ,CACN,CACN,CAAC;AACJ,CAAC,CAAC;AAzEW,QAAA,aAAa,iBAyExB;AACF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { WizardControlStep } from './types';
3
+ import { WizardBodyProps } from './WizardBody';
4
+ /**
5
+ * Used as a passthrough of step properties for Wizard and all supporting child components.
6
+ * Also acts as a wrapper for content, with an optional inclusion of WizardBody.
7
+ */
8
+ export interface WizardStepProps extends Omit<WizardControlStep, 'parentId' | 'subStepIds' | 'visited'> {
9
+ /** Optional for when the step is used as a parent to sub-steps */
10
+ children?: React.ReactNode;
11
+ /** Props for WizardBody that wraps content by default. Can be set to null for exclusion of WizardBody. */
12
+ body?: WizardBodyProps | null;
13
+ /** Optional list of sub-steps */
14
+ steps?: React.ReactElement<WizardStepProps>[];
15
+ }
16
+ export declare const WizardStep: {
17
+ ({ body, children }: WizardStepProps): JSX.Element;
18
+ displayName: string;
19
+ };
20
+ //# sourceMappingURL=WizardStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardStep.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAc,eAAe,EAAE,MAAM,cAAc,CAAC;AAE3D;;;GAGG;AAEH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC;IACrG,kEAAkE;IAClE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,0GAA0G;IAC1G,IAAI,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAC9B,iCAAiC;IACjC,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,CAAC;CAC/C;AAED,eAAO,MAAM,UAAU;yBAAwB,eAAe;;CACwB,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardStep = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const WizardBody_1 = require("./WizardBody");
7
+ const WizardStep = ({ body, children }) => body === undefined ? react_1.default.createElement(WizardBody_1.WizardBody, Object.assign({}, body), children) : react_1.default.createElement(react_1.default.Fragment, null, children);
8
+ exports.WizardStep = WizardStep;
9
+ exports.WizardStep.displayName = 'WizardStep';
10
+ //# sourceMappingURL=WizardStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardStep.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardStep.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAG1B,6CAA2D;AAgBpD,MAAM,UAAU,GAAG,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAmB,EAAE,EAAE,CAChE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,8BAAC,uBAAU,oBAAK,IAAI,GAAG,QAAQ,CAAc,CAAC,CAAC,CAAC,8DAAG,QAAQ,CAAI,CAAC;AAD1E,QAAA,UAAU,cACgE;AAEvF,kBAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import { WizardControlStep, CustomWizardNavFunction, DefaultWizardNavProps } from './types';
3
+ /**
4
+ * Used to toggle between step content, including the body and footer. This is also where the nav and its expandability is controlled.
5
+ */
6
+ export interface WizardToggleProps {
7
+ /** List of steps and/or sub-steps */
8
+ steps: WizardControlStep[];
9
+ /** The currently active WizardStep */
10
+ activeStep: WizardControlStep;
11
+ /** The WizardFooter */
12
+ footer: React.ReactElement;
13
+ /** Custom WizardNav or callback used to create a default WizardNav */
14
+ nav: DefaultWizardNavProps | CustomWizardNavFunction;
15
+ /** Navigate using the step index */
16
+ goToStepByIndex: (index: number) => void;
17
+ /** The button's aria-label */
18
+ 'aria-label'?: string;
19
+ /** Flag to unmount inactive steps instead of hiding. Defaults to true */
20
+ unmountInactiveSteps?: boolean;
21
+ }
22
+ export declare const WizardToggle: {
23
+ ({ steps, activeStep, footer, nav, goToStepByIndex, unmountInactiveSteps, "aria-label": ariaLabel }: WizardToggleProps): JSX.Element;
24
+ displayName: string;
25
+ };
26
+ //# sourceMappingURL=WizardToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardToggle.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardToggle.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,EACL,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EAKtB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AAEH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,sCAAsC;IACtC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,uBAAuB;IACvB,MAAM,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B,sEAAsE;IACtE,GAAG,EAAE,qBAAqB,GAAG,uBAAuB,CAAC;IACrD,oCAAoC;IACpC,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,eAAO,MAAM,YAAY;yGAQtB,iBAAiB;;CA8JnB,CAAC"}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WizardToggle = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const react_styles_1 = require("@patternfly/react-styles");
7
+ const wizard_1 = tslib_1.__importDefault(require("@patternfly/react-styles/css/components/Wizard/wizard"));
8
+ const angle_right_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/angle-right-icon'));
9
+ const caret_down_icon_1 = tslib_1.__importDefault(require('@patternfly/react-icons/dist/js/icons/caret-down-icon'));
10
+ const constants_1 = require("../../../helpers/constants");
11
+ const Wizard_1 = require("../Wizard");
12
+ const types_1 = require("./types");
13
+ const WizardToggle = ({ steps, activeStep, footer, nav, goToStepByIndex, unmountInactiveSteps = true, 'aria-label': ariaLabel = 'Wizard toggle' }) => {
14
+ const [isNavOpen, setIsNavOpen] = react_1.default.useState(false);
15
+ const isActiveSubStep = types_1.isWizardSubStep(activeStep);
16
+ const handleKeyClicks = react_1.default.useCallback((event) => {
17
+ if (isNavOpen && event.key === constants_1.KeyTypes.Escape) {
18
+ setIsNavOpen(!isNavOpen);
19
+ }
20
+ }, [isNavOpen]);
21
+ // Open/close collapsable nav on keydown event
22
+ react_1.default.useEffect(() => {
23
+ const target = typeof document !== 'undefined' ? document.body : null;
24
+ target === null || target === void 0 ? void 0 : target.addEventListener('keydown', handleKeyClicks, false);
25
+ return () => {
26
+ target === null || target === void 0 ? void 0 : target.removeEventListener('keydown', handleKeyClicks, false);
27
+ };
28
+ }, [handleKeyClicks]);
29
+ // Only render the active step when unmountInactiveSteps is true
30
+ const bodyContent = unmountInactiveSteps
31
+ ? activeStep === null || activeStep === void 0 ? void 0 : activeStep.component
32
+ : steps.map(step => {
33
+ if ((activeStep === null || activeStep === void 0 ? void 0 : activeStep.name) === step.name) {
34
+ return step.component;
35
+ }
36
+ return (react_1.default.createElement("div", { key: step.id, style: { display: 'none' } }, step.component));
37
+ });
38
+ const wizardNav = types_1.isCustomWizardNav(nav)
39
+ ? nav(isNavOpen, steps, activeStep, goToStepByIndex)
40
+ : react_1.default.useMemo(() => {
41
+ const props = Object.assign({ isOpen: isNavOpen, 'aria-label': (nav === null || nav === void 0 ? void 0 : nav.ariaLabel) || 'Wizard nav' }, ((nav === null || nav === void 0 ? void 0 : nav.ariaLabelledBy) && { 'aria-labelledby': nav === null || nav === void 0 ? void 0 : nav.ariaLabelledBy }));
42
+ return (react_1.default.createElement(Wizard_1.WizardNav, Object.assign({}, props), steps.map((step, index) => {
43
+ var _a;
44
+ const stepIndex = index + 1;
45
+ const stepNavItem = step.navItem && react_1.default.createElement(react_1.default.Fragment, { key: step.id }, step.navItem);
46
+ if (types_1.isWizardParentStep(step)) {
47
+ let firstSubStepIndex;
48
+ let hasActiveChild = false;
49
+ const subNavItems = (_a = step.subStepIds) === null || _a === void 0 ? void 0 : _a.map((subStepId, index) => {
50
+ const subStep = steps.find(step => step.id === subStepId);
51
+ const subStepIndex = steps.indexOf(subStep) + 1;
52
+ if (index === 0) {
53
+ firstSubStepIndex = subStepIndex;
54
+ }
55
+ if ((activeStep === null || activeStep === void 0 ? void 0 : activeStep.id) === subStep.id) {
56
+ hasActiveChild = true;
57
+ }
58
+ return subStep.navItem ? (react_1.default.createElement(react_1.default.Fragment, { key: subStep.id }, subStep.navItem)) : (react_1.default.createElement(Wizard_1.WizardNavItem, { key: subStep.id, id: subStep.id, content: subStep.name, isCurrent: (activeStep === null || activeStep === void 0 ? void 0 : activeStep.id) === subStep.id, isDisabled: subStep.isDisabled || ((nav === null || nav === void 0 ? void 0 : nav.forceStepVisit) && !subStep.visited), step: subStepIndex, onNavItemClick: goToStepByIndex }));
59
+ });
60
+ const hasEnabledChildren = react_1.default.Children.toArray(subNavItems).some(child => react_1.default.isValidElement(child) && !child.props.isDisabled);
61
+ return (stepNavItem || (react_1.default.createElement(Wizard_1.WizardNavItem, { key: step.id, id: step.id, content: step.name, isExpandable: nav === null || nav === void 0 ? void 0 : nav.isExpandable, isCurrent: hasActiveChild, isDisabled: !hasEnabledChildren, step: firstSubStepIndex, onNavItemClick: goToStepByIndex },
62
+ react_1.default.createElement(Wizard_1.WizardNav, Object.assign({}, props, { returnList: true }), subNavItems))));
63
+ }
64
+ if (types_1.isWizardBasicStep(step)) {
65
+ return (stepNavItem || (react_1.default.createElement(Wizard_1.WizardNavItem, { key: step.id, id: step.id, content: step.name, isCurrent: (activeStep === null || activeStep === void 0 ? void 0 : activeStep.id) === step.id, isDisabled: step.isDisabled || ((nav === null || nav === void 0 ? void 0 : nav.forceStepVisit) && !step.visited), step: stepIndex, onNavItemClick: goToStepByIndex })));
66
+ }
67
+ })));
68
+ }, [activeStep === null || activeStep === void 0 ? void 0 : activeStep.id, goToStepByIndex, isNavOpen, nav, steps]);
69
+ return (react_1.default.createElement(react_1.default.Fragment, null,
70
+ react_1.default.createElement("button", { onClick: () => setIsNavOpen(prevIsOpen => !prevIsOpen), className: react_styles_1.css(wizard_1.default.wizardToggle, isNavOpen && 'pf-m-expanded'), "aria-label": ariaLabel, "aria-expanded": isNavOpen },
71
+ react_1.default.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardToggleList) },
72
+ react_1.default.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardToggleListItem) }, activeStep === null || activeStep === void 0 ? void 0 :
73
+ activeStep.name,
74
+ isActiveSubStep && react_1.default.createElement(angle_right_icon_1.default, { className: react_styles_1.css(wizard_1.default.wizardToggleSeparator), "aria-hidden": "true" })),
75
+ isActiveSubStep && react_1.default.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardToggleListItem) }, activeStep === null || activeStep === void 0 ? void 0 : activeStep.name)),
76
+ react_1.default.createElement("span", { className: react_styles_1.css(wizard_1.default.wizardToggleIcon) },
77
+ react_1.default.createElement(caret_down_icon_1.default, { "aria-hidden": "true" }))),
78
+ react_1.default.createElement("div", { className: react_styles_1.css(wizard_1.default.wizardOuterWrap) },
79
+ react_1.default.createElement("div", { className: react_styles_1.css(wizard_1.default.wizardInnerWrap) },
80
+ wizardNav,
81
+ bodyContent),
82
+ footer)));
83
+ };
84
+ exports.WizardToggle = WizardToggle;
85
+ exports.WizardToggle.displayName = 'WizardToggle';
86
+ //# sourceMappingURL=WizardToggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardToggle.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardToggle.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAE1B,2DAA+C;AAC/C,2GAA2E;AAC3E,sHAAqF;AACrF,oHAAmF;AAEnF,0DAAsD;AACtD,sCAAqD;AACrD,mCAQiB;AAuBV,MAAM,YAAY,GAAG,CAAC,EAC3B,KAAK,EACL,UAAU,EACV,MAAM,EACN,GAAG,EACH,eAAe,EACf,oBAAoB,GAAG,IAAI,EAC3B,YAAY,EAAE,SAAS,GAAG,eAAe,EACvB,EAAE,EAAE;IACtB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,eAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,eAAe,GAAG,uBAAe,CAAC,UAAU,CAAC,CAAC;IAEpD,MAAM,eAAe,GAAG,eAAK,CAAC,WAAW,CACvC,CAAC,KAAoB,EAAQ,EAAE;QAC7B,IAAI,SAAS,IAAI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AI,wCAAM,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,oBAAoB,CAAC,IAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAQ,CAC3F;YAEP,wCAAM,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,gBAAgB,CAAC;gBAC3C,8BAAC,yBAAa,mBAAa,MAAM,GAAG,CAC/B,CACA;QACT,uCAAK,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,eAAe,CAAC;YACzC,uCAAK,SAAS,EAAE,kBAAG,CAAC,gBAAM,CAAC,eAAe,CAAC;gBACxC,SAAS;gBACT,WAAW,CACR;YAEL,MAAM,CACH,CACL,CACJ,CAAC;AACJ,CAAC,CAAC;AAtKW,QAAA,YAAY,gBAsKvB;AAEF,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { useWizardFooter } from './useWizardFooter';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/next/components/Wizard/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useWizardFooter = void 0;
4
+ var useWizardFooter_1 = require("./useWizardFooter");
5
+ Object.defineProperty(exports, "useWizardFooter", { enumerable: true, get: function () { return useWizardFooter_1.useWizardFooter; } });
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/next/components/Wizard/hooks/index.ts"],"names":[],"mappings":";;;AAAA,qDAAoD;AAA3C,kHAAA,eAAe,OAAA"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ /**
3
+ * Set a unique footer for the wizard. stepId is only required if inactive steps are hidden instead of unmounted.
4
+ * @param footer
5
+ * @param stepId
6
+ */
7
+ export declare const useWizardFooter: (footer: React.ReactElement, stepId?: string | number) => void;
8
+ //# sourceMappingURL=useWizardFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWizardFooter.d.ts","sourceRoot":"","sources":["../../../../../../src/next/components/Wizard/hooks/useWizardFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;GAIG;AACH,eAAO,MAAM,eAAe,WAAY,MAAM,YAAY,WAAW,MAAM,GAAG,MAAM,SAanF,CAAC"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useWizardFooter = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const react_1 = tslib_1.__importDefault(require("react"));
6
+ const WizardContext_1 = require("../WizardContext");
7
+ /**
8
+ * Set a unique footer for the wizard. stepId is only required if inactive steps are hidden instead of unmounted.
9
+ * @param footer
10
+ * @param stepId
11
+ */
12
+ const useWizardFooter = (footer, stepId) => {
13
+ const { activeStep, setFooter } = WizardContext_1.useWizardContext();
14
+ react_1.default.useEffect(() => {
15
+ if (!stepId || activeStep.id === stepId) {
16
+ setFooter(footer);
17
+ // Reset the footer on unmount.
18
+ return () => {
19
+ setFooter(null);
20
+ };
21
+ }
22
+ }, [activeStep, footer, setFooter, stepId]);
23
+ };
24
+ exports.useWizardFooter = useWizardFooter;
25
+ //# sourceMappingURL=useWizardFooter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWizardFooter.js","sourceRoot":"","sources":["../../../../../../src/next/components/Wizard/hooks/useWizardFooter.tsx"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,oDAAoD;AAEpD;;;;GAIG;AACI,MAAM,eAAe,GAAG,CAAC,MAA0B,EAAE,MAAwB,EAAE,EAAE;IACtF,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,gCAAgB,EAAE,CAAC;IAErD,eAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,MAAM,IAAI,UAAU,CAAC,EAAE,KAAK,MAAM,EAAE;YACvC,SAAS,CAAC,MAAM,CAAC,CAAC;YAElB,+BAA+B;YAC/B,OAAO,GAAG,EAAE;gBACV,SAAS,CAAC,IAAI,CAAC,CAAC;YAClB,CAAC,CAAC;SACH;IACH,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;AAC9C,CAAC,CAAC;AAbW,QAAA,eAAe,mBAa1B"}
@@ -0,0 +1,12 @@
1
+ export * from './Wizard';
2
+ export * from './WizardBody';
3
+ export * from './WizardFooter';
4
+ export * from './WizardToggle';
5
+ export * from './WizardStep';
6
+ export * from './WizardNav';
7
+ export * from './WizardNavItem';
8
+ export * from './WizardHeader';
9
+ export * from './hooks';
10
+ export * from './types';
11
+ export { useWizardContext } from './WizardContext';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useWizardContext = void 0;
4
+ const tslib_1 = require("tslib");
5
+ tslib_1.__exportStar(require("./Wizard"), exports);
6
+ tslib_1.__exportStar(require("./WizardBody"), exports);
7
+ tslib_1.__exportStar(require("./WizardFooter"), exports);
8
+ tslib_1.__exportStar(require("./WizardToggle"), exports);
9
+ tslib_1.__exportStar(require("./WizardStep"), exports);
10
+ tslib_1.__exportStar(require("./WizardNav"), exports);
11
+ tslib_1.__exportStar(require("./WizardNavItem"), exports);
12
+ tslib_1.__exportStar(require("./WizardHeader"), exports);
13
+ tslib_1.__exportStar(require("./hooks"), exports);
14
+ tslib_1.__exportStar(require("./types"), exports);
15
+ var WizardContext_1 = require("./WizardContext");
16
+ Object.defineProperty(exports, "useWizardContext", { enumerable: true, get: function () { return WizardContext_1.useWizardContext; } });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/index.ts"],"names":[],"mappings":";;;;AAAA,mDAAyB;AACzB,uDAA6B;AAC7B,yDAA+B;AAC/B,yDAA+B;AAC/B,uDAA6B;AAC7B,sDAA4B;AAC5B,0DAAgC;AAChC,yDAA+B;AAC/B,kDAAwB;AACxB,kDAAwB;AACxB,iDAAmD;AAA1C,iHAAA,gBAAgB,OAAA"}