@hitachivantara/uikit-react-lab 3.56.1 → 3.57.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 (163) hide show
  1. package/dist/Wizard/Wizard.d.ts +63 -0
  2. package/dist/Wizard/Wizard.js +238 -0
  3. package/dist/Wizard/Wizard.js.map +1 -0
  4. package/dist/Wizard/WizardActions/WizardActions.d.ts +61 -0
  5. package/dist/Wizard/WizardActions/WizardActions.js +259 -0
  6. package/dist/Wizard/WizardActions/WizardActions.js.map +1 -0
  7. package/dist/Wizard/WizardActions/index.d.ts +2 -0
  8. package/dist/Wizard/WizardActions/index.js +16 -0
  9. package/dist/Wizard/WizardActions/index.js.map +1 -0
  10. package/dist/Wizard/WizardActions/styles.js +30 -0
  11. package/dist/Wizard/WizardActions/styles.js.map +1 -0
  12. package/dist/Wizard/WizardContainer/WizardContainer.d.ts +28 -0
  13. package/dist/Wizard/WizardContainer/WizardContainer.js +94 -0
  14. package/dist/Wizard/WizardContainer/WizardContainer.js.map +1 -0
  15. package/dist/Wizard/WizardContainer/index.d.ts +2 -0
  16. package/dist/Wizard/WizardContainer/index.js +16 -0
  17. package/dist/Wizard/WizardContainer/index.js.map +1 -0
  18. package/dist/Wizard/WizardContainer/styles.js +23 -0
  19. package/dist/Wizard/WizardContainer/styles.js.map +1 -0
  20. package/dist/Wizard/WizardContent/LoadingContainer.js +74 -0
  21. package/dist/Wizard/WizardContent/LoadingContainer.js.map +1 -0
  22. package/dist/Wizard/WizardContent/WizardContent.d.ts +28 -0
  23. package/dist/Wizard/WizardContent/WizardContent.js +163 -0
  24. package/dist/Wizard/WizardContent/WizardContent.js.map +1 -0
  25. package/dist/Wizard/WizardContent/index.d.ts +2 -0
  26. package/dist/Wizard/WizardContent/index.js +16 -0
  27. package/dist/Wizard/WizardContent/index.js.map +1 -0
  28. package/dist/Wizard/WizardContent/styles.js +24 -0
  29. package/dist/Wizard/WizardContent/styles.js.map +1 -0
  30. package/dist/Wizard/WizardContext/WizardContext.d.ts +12 -0
  31. package/dist/Wizard/WizardContext/WizardContext.js +21 -0
  32. package/dist/Wizard/WizardContext/WizardContext.js.map +1 -0
  33. package/dist/Wizard/WizardContext/WizardContextProvider.d.ts +28 -0
  34. package/dist/Wizard/WizardContext/WizardContextProvider.js +47 -0
  35. package/dist/Wizard/WizardContext/WizardContextProvider.js.map +1 -0
  36. package/dist/Wizard/WizardContext/index.d.ts +5 -0
  37. package/dist/Wizard/WizardContext/index.js +24 -0
  38. package/dist/Wizard/WizardContext/index.js.map +1 -0
  39. package/dist/Wizard/WizardTitle/WizardTitle.d.ts +40 -0
  40. package/dist/Wizard/WizardTitle/WizardTitle.js +221 -0
  41. package/dist/Wizard/WizardTitle/WizardTitle.js.map +1 -0
  42. package/dist/Wizard/WizardTitle/index.d.ts +2 -0
  43. package/dist/Wizard/WizardTitle/index.js +16 -0
  44. package/dist/Wizard/WizardTitle/index.js.map +1 -0
  45. package/dist/Wizard/WizardTitle/styles.js +41 -0
  46. package/dist/Wizard/WizardTitle/styles.js.map +1 -0
  47. package/dist/Wizard/index.d.ts +17 -0
  48. package/dist/Wizard/index.js +64 -0
  49. package/dist/Wizard/index.js.map +1 -0
  50. package/dist/Wizard/styles.js +16 -0
  51. package/dist/Wizard/styles.js.map +1 -0
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.js +22 -1
  54. package/dist/index.js.map +1 -1
  55. package/dist/legacy/Wizard/Wizard.d.ts +63 -0
  56. package/dist/legacy/Wizard/Wizard.js +211 -0
  57. package/dist/legacy/Wizard/Wizard.js.map +1 -0
  58. package/dist/legacy/Wizard/WizardActions/WizardActions.d.ts +61 -0
  59. package/dist/legacy/Wizard/WizardActions/WizardActions.js +226 -0
  60. package/dist/legacy/Wizard/WizardActions/WizardActions.js.map +1 -0
  61. package/dist/legacy/Wizard/WizardActions/index.d.ts +2 -0
  62. package/dist/legacy/Wizard/WizardActions/index.js +2 -0
  63. package/dist/legacy/Wizard/WizardActions/index.js.map +1 -0
  64. package/dist/legacy/Wizard/WizardActions/styles.js +22 -0
  65. package/dist/legacy/Wizard/WizardActions/styles.js.map +1 -0
  66. package/dist/legacy/Wizard/WizardContainer/WizardContainer.d.ts +28 -0
  67. package/dist/legacy/Wizard/WizardContainer/WizardContainer.js +75 -0
  68. package/dist/legacy/Wizard/WizardContainer/WizardContainer.js.map +1 -0
  69. package/dist/legacy/Wizard/WizardContainer/index.d.ts +2 -0
  70. package/dist/legacy/Wizard/WizardContainer/index.js +2 -0
  71. package/dist/legacy/Wizard/WizardContainer/index.js.map +1 -0
  72. package/dist/legacy/Wizard/WizardContainer/styles.js +15 -0
  73. package/dist/legacy/Wizard/WizardContainer/styles.js.map +1 -0
  74. package/dist/legacy/Wizard/WizardContent/LoadingContainer.js +58 -0
  75. package/dist/legacy/Wizard/WizardContent/LoadingContainer.js.map +1 -0
  76. package/dist/legacy/Wizard/WizardContent/WizardContent.d.ts +28 -0
  77. package/dist/legacy/Wizard/WizardContent/WizardContent.js +129 -0
  78. package/dist/legacy/Wizard/WizardContent/WizardContent.js.map +1 -0
  79. package/dist/legacy/Wizard/WizardContent/index.d.ts +2 -0
  80. package/dist/legacy/Wizard/WizardContent/index.js +2 -0
  81. package/dist/legacy/Wizard/WizardContent/index.js.map +1 -0
  82. package/dist/legacy/Wizard/WizardContent/styles.js +16 -0
  83. package/dist/legacy/Wizard/WizardContent/styles.js.map +1 -0
  84. package/dist/legacy/Wizard/WizardContext/WizardContext.d.ts +12 -0
  85. package/dist/legacy/Wizard/WizardContext/WizardContext.js +12 -0
  86. package/dist/legacy/Wizard/WizardContext/WizardContext.js.map +1 -0
  87. package/dist/legacy/Wizard/WizardContext/WizardContextProvider.d.ts +28 -0
  88. package/dist/legacy/Wizard/WizardContext/WizardContextProvider.js +35 -0
  89. package/dist/legacy/Wizard/WizardContext/WizardContextProvider.js.map +1 -0
  90. package/dist/legacy/Wizard/WizardContext/index.d.ts +5 -0
  91. package/dist/legacy/Wizard/WizardContext/index.js +3 -0
  92. package/dist/legacy/Wizard/WizardContext/index.js.map +1 -0
  93. package/dist/legacy/Wizard/WizardTitle/WizardTitle.d.ts +40 -0
  94. package/dist/legacy/Wizard/WizardTitle/WizardTitle.js +198 -0
  95. package/dist/legacy/Wizard/WizardTitle/WizardTitle.js.map +1 -0
  96. package/dist/legacy/Wizard/WizardTitle/index.d.ts +2 -0
  97. package/dist/legacy/Wizard/WizardTitle/index.js +2 -0
  98. package/dist/legacy/Wizard/WizardTitle/index.js.map +1 -0
  99. package/dist/legacy/Wizard/WizardTitle/styles.js +33 -0
  100. package/dist/legacy/Wizard/WizardTitle/styles.js.map +1 -0
  101. package/dist/legacy/Wizard/index.d.ts +17 -0
  102. package/dist/legacy/Wizard/index.js +8 -0
  103. package/dist/legacy/Wizard/index.js.map +1 -0
  104. package/dist/legacy/Wizard/styles.js +8 -0
  105. package/dist/legacy/Wizard/styles.js.map +1 -0
  106. package/dist/legacy/index.d.ts +3 -0
  107. package/dist/legacy/index.js +2 -0
  108. package/dist/legacy/index.js.map +1 -1
  109. package/dist/modern/Wizard/Wizard.d.ts +63 -0
  110. package/dist/modern/Wizard/Wizard.js +198 -0
  111. package/dist/modern/Wizard/Wizard.js.map +1 -0
  112. package/dist/modern/Wizard/WizardActions/WizardActions.d.ts +61 -0
  113. package/dist/modern/Wizard/WizardActions/WizardActions.js +186 -0
  114. package/dist/modern/Wizard/WizardActions/WizardActions.js.map +1 -0
  115. package/dist/modern/Wizard/WizardActions/index.d.ts +2 -0
  116. package/dist/modern/Wizard/WizardActions/index.js +2 -0
  117. package/dist/modern/Wizard/WizardActions/index.js.map +1 -0
  118. package/dist/modern/Wizard/WizardActions/styles.js +20 -0
  119. package/dist/modern/Wizard/WizardActions/styles.js.map +1 -0
  120. package/dist/modern/Wizard/WizardContainer/WizardContainer.d.ts +28 -0
  121. package/dist/modern/Wizard/WizardContainer/WizardContainer.js +77 -0
  122. package/dist/modern/Wizard/WizardContainer/WizardContainer.js.map +1 -0
  123. package/dist/modern/Wizard/WizardContainer/index.d.ts +2 -0
  124. package/dist/modern/Wizard/WizardContainer/index.js +2 -0
  125. package/dist/modern/Wizard/WizardContainer/index.js.map +1 -0
  126. package/dist/modern/Wizard/WizardContainer/styles.js +13 -0
  127. package/dist/modern/Wizard/WizardContainer/styles.js.map +1 -0
  128. package/dist/modern/Wizard/WizardContent/LoadingContainer.js +58 -0
  129. package/dist/modern/Wizard/WizardContent/LoadingContainer.js.map +1 -0
  130. package/dist/modern/Wizard/WizardContent/WizardContent.d.ts +28 -0
  131. package/dist/modern/Wizard/WizardContent/WizardContent.js +119 -0
  132. package/dist/modern/Wizard/WizardContent/WizardContent.js.map +1 -0
  133. package/dist/modern/Wizard/WizardContent/index.d.ts +2 -0
  134. package/dist/modern/Wizard/WizardContent/index.js +2 -0
  135. package/dist/modern/Wizard/WizardContent/index.js.map +1 -0
  136. package/dist/modern/Wizard/WizardContent/styles.js +14 -0
  137. package/dist/modern/Wizard/WizardContent/styles.js.map +1 -0
  138. package/dist/modern/Wizard/WizardContext/WizardContext.d.ts +12 -0
  139. package/dist/modern/Wizard/WizardContext/WizardContext.js +12 -0
  140. package/dist/modern/Wizard/WizardContext/WizardContext.js.map +1 -0
  141. package/dist/modern/Wizard/WizardContext/WizardContextProvider.d.ts +28 -0
  142. package/dist/modern/Wizard/WizardContext/WizardContextProvider.js +36 -0
  143. package/dist/modern/Wizard/WizardContext/WizardContextProvider.js.map +1 -0
  144. package/dist/modern/Wizard/WizardContext/index.d.ts +5 -0
  145. package/dist/modern/Wizard/WizardContext/index.js +3 -0
  146. package/dist/modern/Wizard/WizardContext/index.js.map +1 -0
  147. package/dist/modern/Wizard/WizardTitle/WizardTitle.d.ts +40 -0
  148. package/dist/modern/Wizard/WizardTitle/WizardTitle.js +182 -0
  149. package/dist/modern/Wizard/WizardTitle/WizardTitle.js.map +1 -0
  150. package/dist/modern/Wizard/WizardTitle/index.d.ts +2 -0
  151. package/dist/modern/Wizard/WizardTitle/index.js +2 -0
  152. package/dist/modern/Wizard/WizardTitle/index.js.map +1 -0
  153. package/dist/modern/Wizard/WizardTitle/styles.js +31 -0
  154. package/dist/modern/Wizard/WizardTitle/styles.js.map +1 -0
  155. package/dist/modern/Wizard/index.d.ts +17 -0
  156. package/dist/modern/Wizard/index.js +8 -0
  157. package/dist/modern/Wizard/index.js.map +1 -0
  158. package/dist/modern/Wizard/styles.js +6 -0
  159. package/dist/modern/Wizard/styles.js.map +1 -0
  160. package/dist/modern/index.d.ts +3 -0
  161. package/dist/modern/index.js +2 -0
  162. package/dist/modern/index.js.map +1 -1
  163. package/package.json +3 -3
@@ -0,0 +1,75 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["classes", "className", "children", "handleClose", "open"];
4
+ import React from "react";
5
+ import PropTypes from "prop-types";
6
+ import clsx from "clsx";
7
+ import { withStyles } from "@material-ui/core";
8
+ import { HvDialog } from "@hitachivantara/uikit-react-core";
9
+ import styles from "./styles";
10
+
11
+ var HvWizardContainer = function HvWizardContainer(_ref) {
12
+ var classes = _ref.classes,
13
+ className = _ref.className,
14
+ children = _ref.children,
15
+ handleClose = _ref.handleClose,
16
+ open = _ref.open,
17
+ others = _objectWithoutProperties(_ref, _excluded);
18
+
19
+ return /*#__PURE__*/React.createElement(HvDialog, _extends({
20
+ classes: {
21
+ closeButton: classes.closeButton,
22
+ paper: classes.paper
23
+ } // overrides css
24
+ ,
25
+ className: clsx(className, classes.root),
26
+ open: open,
27
+ onClose: handleClose
28
+ }, others), children);
29
+ };
30
+
31
+ process.env.NODE_ENV !== "production" ? HvWizardContainer.propTypes = {
32
+ /**
33
+ * Class names to be applied.
34
+ */
35
+ className: PropTypes.string,
36
+
37
+ /**
38
+ * A Jss Object used to override or extend the styles applied.
39
+ */
40
+ classes: PropTypes.shape({
41
+ /**
42
+ * Styles applied to the component root class.
43
+ */
44
+ root: PropTypes.string,
45
+
46
+ /**
47
+ * Style applied to the component (root).
48
+ */
49
+ paper: PropTypes.string,
50
+
51
+ /**
52
+ * Style applied to the close button.
53
+ */
54
+ closeButton: PropTypes.string
55
+ }).isRequired,
56
+
57
+ /**
58
+ * Components of the Wizard.
59
+ */
60
+ children: PropTypes.node.isRequired,
61
+
62
+ /**
63
+ * Current state of the Wizard.
64
+ */
65
+ open: PropTypes.bool.isRequired,
66
+
67
+ /**
68
+ * Function executed on close.
69
+ */
70
+ handleClose: PropTypes.func.isRequired
71
+ } : void 0;
72
+ export default withStyles(styles, {
73
+ name: "HvWizardContainer"
74
+ })(HvWizardContainer);
75
+ //# sourceMappingURL=WizardContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContainer.js","names":["React","PropTypes","clsx","withStyles","HvDialog","styles","HvWizardContainer","classes","className","children","handleClose","open","others","closeButton","paper","root","propTypes","string","shape","isRequired","node","bool","func","name"],"sources":["../../../../src/Wizard/WizardContainer/WizardContainer.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvDialog } from \"@hitachivantara/uikit-react-core\";\n\nimport styles from \"./styles\";\n\nconst HvWizardContainer = ({ classes, className, children, handleClose, open, ...others }) => {\n return (\n <HvDialog\n classes={{ closeButton: classes.closeButton, paper: classes.paper }} // overrides css\n className={clsx(className, classes.root)}\n open={open}\n onClose={handleClose}\n {...others}\n >\n {children}\n </HvDialog>\n );\n};\n\nHvWizardContainer.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Style applied to the component (root).\n */\n paper: PropTypes.string,\n /**\n * Style applied to the close button.\n */\n closeButton: PropTypes.string,\n }).isRequired,\n /**\n * Components of the Wizard.\n */\n children: PropTypes.node.isRequired,\n /**\n * Current state of the Wizard.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n handleClose: PropTypes.func.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvWizardContainer\" })(HvWizardContainer);\n"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,QAAT,QAAyB,kCAAzB;AAEA,OAAOC,MAAP,MAAmB,UAAnB;;AAEA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,OAAoE;EAAA,IAAjEC,OAAiE,QAAjEA,OAAiE;EAAA,IAAxDC,SAAwD,QAAxDA,SAAwD;EAAA,IAA7CC,QAA6C,QAA7CA,QAA6C;EAAA,IAAnCC,WAAmC,QAAnCA,WAAmC;EAAA,IAAtBC,IAAsB,QAAtBA,IAAsB;EAAA,IAAbC,MAAa;;EAC5F,oBACE,oBAAC,QAAD;IACE,OAAO,EAAE;MAAEC,WAAW,EAAEN,OAAO,CAACM,WAAvB;MAAoCC,KAAK,EAAEP,OAAO,CAACO;IAAnD,CADX,CACuE;IADvE;IAEE,SAAS,EAAEZ,IAAI,CAACM,SAAD,EAAYD,OAAO,CAACQ,IAApB,CAFjB;IAGE,IAAI,EAAEJ,IAHR;IAIE,OAAO,EAAED;EAJX,GAKME,MALN,GAOGH,QAPH,CADF;AAWD,CAZD;;AAcA,wCAAAH,iBAAiB,CAACU,SAAlB,GAA8B;EAC5B;AACF;AACA;EACER,SAAS,EAAEP,SAAS,CAACgB,MAJO;;EAK5B;AACF;AACA;EACEV,OAAO,EAAEN,SAAS,CAACiB,KAAV,CAAgB;IACvB;AACJ;AACA;IACIH,IAAI,EAAEd,SAAS,CAACgB,MAJO;;IAKvB;AACJ;AACA;IACIH,KAAK,EAAEb,SAAS,CAACgB,MARM;;IASvB;AACJ;AACA;IACIJ,WAAW,EAAEZ,SAAS,CAACgB;EAZA,CAAhB,EAaNE,UArByB;;EAsB5B;AACF;AACA;EACEV,QAAQ,EAAER,SAAS,CAACmB,IAAV,CAAeD,UAzBG;;EA0B5B;AACF;AACA;EACER,IAAI,EAAEV,SAAS,CAACoB,IAAV,CAAeF,UA7BO;;EA8B5B;AACF;AACA;EACET,WAAW,EAAET,SAAS,CAACqB,IAAV,CAAeH;AAjCA,CAA9B;AAoCA,eAAehB,UAAU,CAACE,MAAD,EAAS;EAAEkB,IAAI,EAAE;AAAR,CAAT,CAAV,CAAkDjB,iBAAlD,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./WizardContainer";
2
+ export * from "./WizardContainer";
@@ -0,0 +1,2 @@
1
+ export { default } from "./WizardContainer";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Wizard/WizardContainer/index.js"],"sourcesContent":["export { default } from \"./WizardContainer\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,mBAAxB"}
@@ -0,0 +1,15 @@
1
+ var styles = function styles() {
2
+ return {
3
+ root: {},
4
+ paper: {
5
+ width: "80%",
6
+ maxWidth: "80%"
7
+ },
8
+ closeButton: {
9
+ display: "none"
10
+ }
11
+ };
12
+ };
13
+
14
+ export default styles;
15
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","root","paper","width","maxWidth","closeButton","display"],"sources":["../../../../src/Wizard/WizardContainer/styles.js"],"sourcesContent":["const styles = () => ({\n root: {},\n paper: {\n width: \"80%\",\n maxWidth: \"80%\",\n },\n closeButton: {\n display: \"none\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE,EADc;IAEpBC,KAAK,EAAE;MACLC,KAAK,EAAE,KADF;MAELC,QAAQ,EAAE;IAFL,CAFa;IAMpBC,WAAW,EAAE;MACXC,OAAO,EAAE;IADE;EANO,CAAP;AAAA,CAAf;;AAWA,eAAeN,MAAf"}
@@ -0,0 +1,58 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ var _excluded = ["children", "hidden"];
4
+ import React from "react";
5
+ import PropTypes from "prop-types";
6
+ import clsx from "clsx";
7
+ import { HvLoading } from "@hitachivantara/uikit-react-core";
8
+ import { makeStyles, alpha, hexToRgb } from "@material-ui/core";
9
+ var useStyles = makeStyles(function (theme) {
10
+ return {
11
+ loading: {
12
+ width: "100%",
13
+ height: "100%"
14
+ },
15
+ overlay: {
16
+ position: "absolute",
17
+ transition: "background-Color .2s ease",
18
+ zIndex: -1
19
+ },
20
+ blur: {
21
+ backgroundColor: alpha(hexToRgb(theme.hv.palette.atmosphere.atmo2), 0.8),
22
+ zIndex: theme.zIndex.drawer
23
+ }
24
+ };
25
+ });
26
+
27
+ var LoadingContainer = function LoadingContainer(_ref) {
28
+ var children = _ref.children,
29
+ hidden = _ref.hidden,
30
+ others = _objectWithoutProperties(_ref, _excluded);
31
+
32
+ var classes = useStyles();
33
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
34
+ style: {
35
+ top: 0,
36
+ left: 0,
37
+ height: "100%",
38
+ width: "100%"
39
+ },
40
+ className: clsx(classes.overlay, !hidden && classes.blur)
41
+ }, /*#__PURE__*/React.createElement(HvLoading, _extends({
42
+ classes: {
43
+ root: classes.loading
44
+ },
45
+ hidden: hidden
46
+ }, others))), /*#__PURE__*/React.createElement("div", {
47
+ style: {
48
+ display: "flow-root"
49
+ }
50
+ }, children));
51
+ };
52
+
53
+ process.env.NODE_ENV !== "production" ? LoadingContainer.propTypes = {
54
+ children: PropTypes.node,
55
+ hidden: PropTypes.bool
56
+ } : void 0;
57
+ export default LoadingContainer;
58
+ //# sourceMappingURL=LoadingContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingContainer.js","names":["React","PropTypes","clsx","HvLoading","makeStyles","alpha","hexToRgb","useStyles","theme","loading","width","height","overlay","position","transition","zIndex","blur","backgroundColor","hv","palette","atmosphere","atmo2","drawer","LoadingContainer","children","hidden","others","classes","top","left","root","display","propTypes","node","bool"],"sources":["../../../../src/Wizard/WizardContent/LoadingContainer.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { HvLoading } from \"@hitachivantara/uikit-react-core\";\nimport { makeStyles, alpha, hexToRgb } from \"@material-ui/core\";\n\nconst useStyles = makeStyles((theme) => ({\n loading: {\n width: \"100%\",\n height: \"100%\",\n },\n overlay: {\n position: \"absolute\",\n transition: \"background-Color .2s ease\",\n zIndex: -1,\n },\n blur: {\n backgroundColor: alpha(hexToRgb(theme.hv.palette.atmosphere.atmo2), 0.8),\n zIndex: theme.zIndex.drawer,\n },\n}));\n\nconst LoadingContainer = ({ children, hidden, ...others }) => {\n const classes = useStyles();\n\n return (\n <>\n <div\n style={{\n top: 0,\n left: 0,\n height: \"100%\",\n width: \"100%\",\n }}\n className={clsx(classes.overlay, { [classes.blur]: !hidden })}\n >\n <HvLoading classes={{ root: classes.loading }} hidden={hidden} {...others} />\n </div>\n <div style={{ display: \"flow-root\" }}>{children}</div>\n </>\n );\n};\n\nLoadingContainer.propTypes = {\n children: PropTypes.node,\n hidden: PropTypes.bool,\n};\n\nexport default LoadingContainer;\n"],"mappings":";;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,SAAT,QAA0B,kCAA1B;AACA,SAASC,UAAT,EAAqBC,KAArB,EAA4BC,QAA5B,QAA4C,mBAA5C;AAEA,IAAMC,SAAS,GAAGH,UAAU,CAAC,UAACI,KAAD;EAAA,OAAY;IACvCC,OAAO,EAAE;MACPC,KAAK,EAAE,MADA;MAEPC,MAAM,EAAE;IAFD,CAD8B;IAKvCC,OAAO,EAAE;MACPC,QAAQ,EAAE,UADH;MAEPC,UAAU,EAAE,2BAFL;MAGPC,MAAM,EAAE,CAAC;IAHF,CAL8B;IAUvCC,IAAI,EAAE;MACJC,eAAe,EAAEZ,KAAK,CAACC,QAAQ,CAACE,KAAK,CAACU,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAA7B,CAAT,EAA8C,GAA9C,CADlB;MAEJN,MAAM,EAAEP,KAAK,CAACO,MAAN,CAAaO;IAFjB;EAViC,CAAZ;AAAA,CAAD,CAA5B;;AAgBA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB,OAAqC;EAAA,IAAlCC,QAAkC,QAAlCA,QAAkC;EAAA,IAAxBC,MAAwB,QAAxBA,MAAwB;EAAA,IAAbC,MAAa;;EAC5D,IAAMC,OAAO,GAAGpB,SAAS,EAAzB;EAEA,oBACE,uDACE;IACE,KAAK,EAAE;MACLqB,GAAG,EAAE,CADA;MAELC,IAAI,EAAE,CAFD;MAGLlB,MAAM,EAAE,MAHH;MAILD,KAAK,EAAE;IAJF,CADT;IAOE,SAAS,EAAER,IAAI,CAACyB,OAAO,CAACf,OAAT,EAAoC,CAACa,MAArC,IAAqBE,OAAO,CAACX,IAA7B;EAPjB,gBASE,oBAAC,SAAD;IAAW,OAAO,EAAE;MAAEc,IAAI,EAAEH,OAAO,CAAClB;IAAhB,CAApB;IAA+C,MAAM,EAAEgB;EAAvD,GAAmEC,MAAnE,EATF,CADF,eAYE;IAAK,KAAK,EAAE;MAAEK,OAAO,EAAE;IAAX;EAAZ,GAAuCP,QAAvC,CAZF,CADF;AAgBD,CAnBD;;AAqBA,wCAAAD,gBAAgB,CAACS,SAAjB,GAA6B;EAC3BR,QAAQ,EAAEvB,SAAS,CAACgC,IADO;EAE3BR,MAAM,EAAExB,SAAS,CAACiC;AAFS,CAA7B;AAKA,eAAeX,gBAAf"}
@@ -0,0 +1,28 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@material-ui/core";
3
+
4
+ export type HvWizardContentClassKey = "root";
5
+
6
+ export type HvWizardContentProps = StandardProps<
7
+ React.HTMLAttributes<HTMLDivElement>,
8
+ HvWizardContentClassKey
9
+ > & {
10
+ /**
11
+ * Tabs to show on the Wizard.
12
+ */
13
+ children?: React.ReactNode;
14
+ /**
15
+ * Current tab to show.
16
+ */
17
+ tab: number;
18
+ /**
19
+ * Forces minimum height to the component.
20
+ */
21
+ fixedHeight?: boolean;
22
+ /**
23
+ * Whether the loading animation is shown.
24
+ */
25
+ loading?: boolean;
26
+ };
27
+
28
+ export default function HvWizardContent(props: HvWizardContentProps): JSX.Element | null;
@@ -0,0 +1,129 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.symbol.js";
3
+ import "core-js/modules/es.array.filter.js";
4
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
5
+ import "core-js/modules/web.dom-collections.for-each.js";
6
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
7
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
8
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
+
10
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
11
+
12
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
13
+
14
+ import "core-js/modules/es.object.to-string.js";
15
+ import "core-js/modules/es.promise.js";
16
+ import "core-js/modules/es.object.entries.js";
17
+ import "core-js/modules/es.array.map.js";
18
+ import React from "react";
19
+ import PropTypes from "prop-types";
20
+ import { withStyles } from "@material-ui/core";
21
+ import clsx from "clsx";
22
+ import { HvDialogContent } from "@hitachivantara/uikit-react-core";
23
+ import HvWizardContext from "../WizardContext";
24
+ import LoadingContainer from "./LoadingContainer";
25
+ import styles from "./styles";
26
+
27
+ var HvWizardContent = function HvWizardContent(_ref) {
28
+ var classes = _ref.classes,
29
+ _ref$fixedHeight = _ref.fixedHeight,
30
+ fixedHeight = _ref$fixedHeight === void 0 ? false : _ref$fixedHeight,
31
+ _ref$loading = _ref.loading,
32
+ loading = _ref$loading === void 0 ? false : _ref$loading,
33
+ children = _ref.children,
34
+ tab = _ref.tab;
35
+ var arrayChildren = React.Children.toArray(children);
36
+ var initialContext = arrayChildren.reduce(function (acc, child, index) {
37
+ var invalid = child.props.mustValidate === true ? false : null;
38
+ var valid = invalid !== null && invalid !== void 0 ? invalid : index === 0 || null;
39
+ return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, index, _objectSpread(_objectSpread({}, child.props), {}, {
40
+ form: {},
41
+ valid: valid,
42
+ touched: index === 0
43
+ })));
44
+ }, {});
45
+
46
+ var _React$useContext = React.useContext(HvWizardContext),
47
+ context = _React$useContext.context,
48
+ setContext = _React$useContext.setContext;
49
+
50
+ React.useEffect(function () {
51
+ setContext(initialContext);
52
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
53
+
54
+ React.useEffect(function () {
55
+ var _context$tab;
56
+
57
+ if (tab && !((_context$tab = context[tab]) !== null && _context$tab !== void 0 && _context$tab.touched)) {
58
+ var updatedContext = Object.entries(context).reduce(function (acc, _ref2) {
59
+ var _childState$valid;
60
+
61
+ var _ref3 = _slicedToArray(_ref2, 2),
62
+ key = _ref3[0],
63
+ childState = _ref3[1];
64
+
65
+ return _objectSpread(_objectSpread({}, acc), +key <= tab ? _defineProperty({}, key, _objectSpread(_objectSpread({}, childState), {}, {
66
+ touched: true,
67
+ valid: (_childState$valid = childState.valid) !== null && _childState$valid !== void 0 ? _childState$valid : true
68
+ })) : _defineProperty({}, key, childState));
69
+ }, {});
70
+ setContext(updatedContext);
71
+ }
72
+ }, [tab]); // eslint-disable-line react-hooks/exhaustive-deps
73
+
74
+ return /*#__PURE__*/React.createElement(HvDialogContent, {
75
+ className: clsx(classes.contentContainer, fixedHeight && classes.fixedHeight),
76
+ indentContent: true
77
+ }, /*#__PURE__*/React.createElement(LoadingContainer, {
78
+ hidden: !loading
79
+ }, React.Children.map(arrayChildren, function (child, index) {
80
+ if (index === tab) {
81
+ return /*#__PURE__*/React.cloneElement(child, {
82
+ tab: tab
83
+ });
84
+ }
85
+
86
+ return null;
87
+ })));
88
+ };
89
+
90
+ process.env.NODE_ENV !== "production" ? HvWizardContent.propTypes = {
91
+ /**
92
+ * Current tab to show.
93
+ */
94
+ tab: PropTypes.number.isRequired,
95
+
96
+ /**
97
+ * Tabs to show on the Wizard.
98
+ */
99
+ children: PropTypes.node.isRequired,
100
+
101
+ /**
102
+ * A Jss Object used to override or extend the styles applied.
103
+ */
104
+ classes: PropTypes.shape({
105
+ /**
106
+ * Style applied to the Wizard content container
107
+ */
108
+ contentContainer: PropTypes.string,
109
+
110
+ /**
111
+ * Style applied to the Wizard to fix its height.
112
+ */
113
+ fixedHeight: PropTypes.string
114
+ }).isRequired,
115
+
116
+ /**
117
+ * Forces minimum height to the component.
118
+ */
119
+ fixedHeight: PropTypes.bool,
120
+
121
+ /**
122
+ * Whether the loading animation is shown.
123
+ */
124
+ loading: PropTypes.bool
125
+ } : void 0;
126
+ export default withStyles(styles, {
127
+ name: "HvWizardContent"
128
+ })(HvWizardContent);
129
+ //# sourceMappingURL=WizardContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContent.js","names":["React","PropTypes","withStyles","clsx","HvDialogContent","HvWizardContext","LoadingContainer","styles","HvWizardContent","classes","fixedHeight","loading","children","tab","arrayChildren","Children","toArray","initialContext","reduce","acc","child","index","invalid","props","mustValidate","valid","form","touched","useContext","context","setContext","useEffect","updatedContext","Object","entries","key","childState","contentContainer","map","cloneElement","propTypes","number","isRequired","node","shape","string","bool","name"],"sources":["../../../../src/Wizard/WizardContent/WizardContent.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport clsx from \"clsx\";\nimport { HvDialogContent } from \"@hitachivantara/uikit-react-core\";\nimport HvWizardContext from \"../WizardContext\";\nimport LoadingContainer from \"./LoadingContainer\";\n\nimport styles from \"./styles\";\n\nconst HvWizardContent = ({ classes, fixedHeight = false, loading = false, children, tab }) => {\n const arrayChildren = React.Children.toArray(children);\n const initialContext = arrayChildren.reduce((acc, child, index) => {\n const invalid = child.props.mustValidate === true ? false : null;\n const valid = invalid ?? (index === 0 || null);\n return {\n ...acc,\n [index]: { ...child.props, form: {}, valid, touched: index === 0 },\n };\n }, {});\n\n const { context, setContext } = React.useContext(HvWizardContext);\n\n React.useEffect(() => {\n setContext(initialContext);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useEffect(() => {\n if (tab && !context[tab]?.touched) {\n const updatedContext = Object.entries(context).reduce(\n (acc, [key, childState]) => ({\n ...acc,\n ...(+key <= tab\n ? { [key]: { ...childState, touched: true, valid: childState.valid ?? true } }\n : { [key]: childState }),\n }),\n {}\n );\n\n setContext(updatedContext);\n }\n }, [tab]); // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <HvDialogContent\n className={clsx(classes.contentContainer, {\n [classes.fixedHeight]: fixedHeight,\n })}\n indentContent\n >\n <LoadingContainer hidden={!loading}>\n {React.Children.map(arrayChildren, (child, index) => {\n if (index === tab) {\n return React.cloneElement(child, { tab });\n }\n return null;\n })}\n </LoadingContainer>\n </HvDialogContent>\n );\n};\n\nHvWizardContent.propTypes = {\n /**\n * Current tab to show.\n */\n tab: PropTypes.number.isRequired,\n /**\n * Tabs to show on the Wizard.\n */\n children: PropTypes.node.isRequired,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Style applied to the Wizard content container\n */\n contentContainer: PropTypes.string,\n /**\n * Style applied to the Wizard to fix its height.\n */\n fixedHeight: PropTypes.string,\n }).isRequired,\n /**\n * Forces minimum height to the component.\n */\n fixedHeight: PropTypes.bool,\n /**\n * Whether the loading animation is shown.\n */\n loading: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvWizardContent\" })(HvWizardContent);\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,eAAT,QAAgC,kCAAhC;AACA,OAAOC,eAAP,MAA4B,kBAA5B;AACA,OAAOC,gBAAP,MAA6B,oBAA7B;AAEA,OAAOC,MAAP,MAAmB,UAAnB;;AAEA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB,OAAsE;EAAA,IAAnEC,OAAmE,QAAnEA,OAAmE;EAAA,4BAA1DC,WAA0D;EAAA,IAA1DA,WAA0D,iCAA5C,KAA4C;EAAA,wBAArCC,OAAqC;EAAA,IAArCA,OAAqC,6BAA3B,KAA2B;EAAA,IAApBC,QAAoB,QAApBA,QAAoB;EAAA,IAAVC,GAAU,QAAVA,GAAU;EAC5F,IAAMC,aAAa,GAAGd,KAAK,CAACe,QAAN,CAAeC,OAAf,CAAuBJ,QAAvB,CAAtB;EACA,IAAMK,cAAc,GAAGH,aAAa,CAACI,MAAd,CAAqB,UAACC,GAAD,EAAMC,KAAN,EAAaC,KAAb,EAAuB;IACjE,IAAMC,OAAO,GAAGF,KAAK,CAACG,KAAN,CAAYC,YAAZ,KAA6B,IAA7B,GAAoC,KAApC,GAA4C,IAA5D;IACA,IAAMC,KAAK,GAAGH,OAAH,aAAGA,OAAH,cAAGA,OAAH,GAAeD,KAAK,KAAK,CAAV,IAAe,IAAzC;IACA,uCACKF,GADL,2BAEGE,KAFH,kCAEgBD,KAAK,CAACG,KAFtB;MAE6BG,IAAI,EAAE,EAFnC;MAEuCD,KAAK,EAALA,KAFvC;MAE8CE,OAAO,EAAEN,KAAK,KAAK;IAFjE;EAID,CAPsB,EAOpB,EAPoB,CAAvB;;EASA,wBAAgCrB,KAAK,CAAC4B,UAAN,CAAiBvB,eAAjB,CAAhC;EAAA,IAAQwB,OAAR,qBAAQA,OAAR;EAAA,IAAiBC,UAAjB,qBAAiBA,UAAjB;;EAEA9B,KAAK,CAAC+B,SAAN,CAAgB,YAAM;IACpBD,UAAU,CAACb,cAAD,CAAV;EACD,CAFD,EAEG,EAFH,EAb4F,CAepF;;EAERjB,KAAK,CAAC+B,SAAN,CAAgB,YAAM;IAAA;;IACpB,IAAIlB,GAAG,IAAI,kBAACgB,OAAO,CAAChB,GAAD,CAAR,yCAAC,aAAcc,OAAf,CAAX,EAAmC;MACjC,IAAMK,cAAc,GAAGC,MAAM,CAACC,OAAP,CAAeL,OAAf,EAAwBX,MAAxB,CACrB,UAACC,GAAD;QAAA;;QAAA;QAAA,IAAOgB,GAAP;QAAA,IAAYC,UAAZ;;QAAA,uCACKjB,GADL,GAEM,CAACgB,GAAD,IAAQtB,GAAR,uBACGsB,GADH,kCACcC,UADd;UAC0BT,OAAO,EAAE,IADnC;UACyCF,KAAK,uBAAEW,UAAU,CAACX,KAAb,iEAAsB;QADpE,0BAEGU,GAFH,EAESC,UAFT,CAFN;MAAA,CADqB,EAOrB,EAPqB,CAAvB;MAUAN,UAAU,CAACE,cAAD,CAAV;IACD;EACF,CAdD,EAcG,CAACnB,GAAD,CAdH,EAjB4F,CA+BjF;;EAEX,oBACE,oBAAC,eAAD;IACE,SAAS,EAAEV,IAAI,CAACM,OAAO,CAAC4B,gBAAT,EACU3B,WADV,IACZD,OAAO,CAACC,WADI,CADjB;IAIE,aAAa;EAJf,gBAME,oBAAC,gBAAD;IAAkB,MAAM,EAAE,CAACC;EAA3B,GACGX,KAAK,CAACe,QAAN,CAAeuB,GAAf,CAAmBxB,aAAnB,EAAkC,UAACM,KAAD,EAAQC,KAAR,EAAkB;IACnD,IAAIA,KAAK,KAAKR,GAAd,EAAmB;MACjB,oBAAOb,KAAK,CAACuC,YAAN,CAAmBnB,KAAnB,EAA0B;QAAEP,GAAG,EAAHA;MAAF,CAA1B,CAAP;IACD;;IACD,OAAO,IAAP;EACD,CALA,CADH,CANF,CADF;AAiBD,CAlDD;;AAoDA,wCAAAL,eAAe,CAACgC,SAAhB,GAA4B;EAC1B;AACF;AACA;EACE3B,GAAG,EAAEZ,SAAS,CAACwC,MAAV,CAAiBC,UAJI;;EAK1B;AACF;AACA;EACE9B,QAAQ,EAAEX,SAAS,CAAC0C,IAAV,CAAeD,UARC;;EAS1B;AACF;AACA;EACEjC,OAAO,EAAER,SAAS,CAAC2C,KAAV,CAAgB;IACvB;AACJ;AACA;IACIP,gBAAgB,EAAEpC,SAAS,CAAC4C,MAJL;;IAKvB;AACJ;AACA;IACInC,WAAW,EAAET,SAAS,CAAC4C;EARA,CAAhB,EASNH,UArBuB;;EAsB1B;AACF;AACA;EACEhC,WAAW,EAAET,SAAS,CAAC6C,IAzBG;;EA0B1B;AACF;AACA;EACEnC,OAAO,EAAEV,SAAS,CAAC6C;AA7BO,CAA5B;AAgCA,eAAe5C,UAAU,CAACK,MAAD,EAAS;EAAEwC,IAAI,EAAE;AAAR,CAAT,CAAV,CAAgDvC,eAAhD,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./WizardContent";
2
+ export * from "./WizardContent";
@@ -0,0 +1,2 @@
1
+ export { default } from "./WizardContent";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Wizard/WizardContent/index.js"],"sourcesContent":["export { default } from \"./WizardContent\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB"}
@@ -0,0 +1,16 @@
1
+ var styles = function styles() {
2
+ return {
3
+ contentContainer: {
4
+ position: "relative",
5
+ padding: 20,
6
+ marginLeft: 0,
7
+ minHeight: 400
8
+ },
9
+ fixedHeight: {
10
+ minHeight: "calc(100vh - 387px)"
11
+ }
12
+ };
13
+ };
14
+
15
+ export default styles;
16
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","contentContainer","position","padding","marginLeft","minHeight","fixedHeight"],"sources":["../../../../src/Wizard/WizardContent/styles.js"],"sourcesContent":["const styles = () => ({\n contentContainer: {\n position: \"relative\",\n padding: 20,\n marginLeft: 0,\n minHeight: 400,\n },\n fixedHeight: {\n minHeight: \"calc(100vh - 387px)\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,gBAAgB,EAAE;MAChBC,QAAQ,EAAE,UADM;MAEhBC,OAAO,EAAE,EAFO;MAGhBC,UAAU,EAAE,CAHI;MAIhBC,SAAS,EAAE;IAJK,CADE;IAOpBC,WAAW,EAAE;MACXD,SAAS,EAAE;IADA;EAPO,CAAP;AAAA,CAAf;;AAYA,eAAeL,MAAf"}
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+
3
+ export type HvWizardContextClassKey = "root";
4
+
5
+ export type HvWizardContextProps = {
6
+ context: any;
7
+ setContext: () => void;
8
+ };
9
+
10
+ export default function HvWizardContext(
11
+ props: HvWizardContextProps
12
+ ): React.Context<HvWizardContextProps>;
@@ -0,0 +1,12 @@
1
+ import { createContext } from "react";
2
+ var WizardContext = /*#__PURE__*/createContext({
3
+ context: {},
4
+ setContext: function setContext() {}
5
+ });
6
+
7
+ if (process.env.NODE_ENV !== "production") {
8
+ WizardContext.displayName = "WizardContext";
9
+ }
10
+
11
+ export default WizardContext;
12
+ //# sourceMappingURL=WizardContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContext.js","names":["createContext","WizardContext","context","setContext","process","env","NODE_ENV","displayName"],"sources":["../../../../src/Wizard/WizardContext/WizardContext.js"],"sourcesContent":["import { createContext } from \"react\";\n\nconst WizardContext = createContext({\n context: {},\n setContext: () => {},\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n WizardContext.displayName = \"WizardContext\";\n}\n\nexport default WizardContext;\n"],"mappings":"AAAA,SAASA,aAAT,QAA8B,OAA9B;AAEA,IAAMC,aAAa,gBAAGD,aAAa,CAAC;EAClCE,OAAO,EAAE,EADyB;EAElCC,UAAU,EAAE,sBAAM,CAAE;AAFc,CAAD,CAAnC;;AAKA,IAAIC,OAAO,CAACC,GAAR,CAAYC,QAAZ,KAAyB,YAA7B,EAA2C;EACzCL,aAAa,CAACM,WAAd,GAA4B,eAA5B;AACD;;AAED,eAAeN,aAAf"}
@@ -0,0 +1,28 @@
1
+ import { StandardProps } from "@material-ui/core";
2
+
3
+ export type HvWizardContextProviderClassKey = "root";
4
+
5
+ export interface HvWizardContextProviderProps
6
+ extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvWizardContextProviderClassKey> {
7
+ /**
8
+ * Initial context value
9
+ */
10
+ value?: {
11
+ /**
12
+ * Initial context object
13
+ */
14
+ context: any;
15
+ /**
16
+ * Function to modify the context
17
+ */
18
+ setContext: React.Dispatch<React.SetStateAction<Record<string, unknown>>>;
19
+ };
20
+ /**
21
+ * Child components for the Wizard
22
+ */
23
+ children?: React.ReactNode;
24
+ }
25
+
26
+ export default function HvWizardContextProvider(
27
+ props: HvWizardContextProviderProps
28
+ ): JSX.Element | null;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ import HvWizardContext from "./WizardContext";
4
+
5
+ var WizardContextProvider = function WizardContextProvider(_ref) {
6
+ var value = _ref.value,
7
+ children = _ref.children;
8
+ return /*#__PURE__*/React.createElement(HvWizardContext.Provider, {
9
+ value: value
10
+ }, children);
11
+ };
12
+
13
+ process.env.NODE_ENV !== "production" ? WizardContextProvider.propTypes = {
14
+ /**
15
+ * Initial context value
16
+ */
17
+ value: PropTypes.shape({
18
+ /**
19
+ * Initial context object
20
+ */
21
+ context: PropTypes.shape({}),
22
+
23
+ /**
24
+ * Function to modify the context
25
+ */
26
+ setContext: PropTypes.func
27
+ }),
28
+
29
+ /**
30
+ * Child components for the Wizard
31
+ */
32
+ children: PropTypes.node.isRequired
33
+ } : void 0;
34
+ export default WizardContextProvider;
35
+ //# sourceMappingURL=WizardContextProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardContextProvider.js","names":["React","PropTypes","HvWizardContext","WizardContextProvider","value","children","propTypes","shape","context","setContext","func","node","isRequired"],"sources":["../../../../src/Wizard/WizardContext/WizardContextProvider.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport HvWizardContext from \"./WizardContext\";\n\nconst WizardContextProvider = ({ value, children }) => {\n return <HvWizardContext.Provider value={value}>{children}</HvWizardContext.Provider>;\n};\n\nWizardContextProvider.propTypes = {\n /**\n * Initial context value\n */\n value: PropTypes.shape({\n /**\n * Initial context object\n */\n context: PropTypes.shape({}),\n /**\n * Function to modify the context\n */\n setContext: PropTypes.func,\n }),\n /**\n * Child components for the Wizard\n */\n children: PropTypes.node.isRequired,\n};\n\nexport default WizardContextProvider;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,eAAP,MAA4B,iBAA5B;;AAEA,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAwB,OAAyB;EAAA,IAAtBC,KAAsB,QAAtBA,KAAsB;EAAA,IAAfC,QAAe,QAAfA,QAAe;EACrD,oBAAO,oBAAC,eAAD,CAAiB,QAAjB;IAA0B,KAAK,EAAED;EAAjC,GAAyCC,QAAzC,CAAP;AACD,CAFD;;AAIA,wCAAAF,qBAAqB,CAACG,SAAtB,GAAkC;EAChC;AACF;AACA;EACEF,KAAK,EAAEH,SAAS,CAACM,KAAV,CAAgB;IACrB;AACJ;AACA;IACIC,OAAO,EAAEP,SAAS,CAACM,KAAV,CAAgB,EAAhB,CAJY;;IAKrB;AACJ;AACA;IACIE,UAAU,EAAER,SAAS,CAACS;EARD,CAAhB,CAJyB;;EAchC;AACF;AACA;EACEL,QAAQ,EAAEJ,SAAS,CAACU,IAAV,CAAeC;AAjBO,CAAlC;AAoBA,eAAeT,qBAAf"}
@@ -0,0 +1,5 @@
1
+ export { default } from "./WizardContext";
2
+ export * from "./WizardContext";
3
+
4
+ export { default as HvWizardContextProvider } from "./WizardContextProvider";
5
+ export * from "./WizardContextProvider";
@@ -0,0 +1,3 @@
1
+ export { default } from "./WizardContext";
2
+ export { default as HvWizardContextProvider } from "./WizardContextProvider";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default","HvWizardContextProvider"],"sources":["../../../../src/Wizard/WizardContext/index.js"],"sourcesContent":["export { default } from \"./WizardContext\";\nexport { default as HvWizardContextProvider } from \"./WizardContextProvider\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB;AACA,SAASA,OAAO,IAAIC,uBAApB,QAAmD,yBAAnD"}
@@ -0,0 +1,40 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@material-ui/core";
3
+ import { HvStepNavigationProps } from "../../StepNavigation";
4
+
5
+ export type HvWizardTitleClassKey = "root";
6
+
7
+ export interface HvWizardTitleProps
8
+ extends StandardProps<React.HTMLAttributes<HTMLDivElement>, HvWizardTitleClassKey> {
9
+ /**
10
+ * Title for the wizard.
11
+ */
12
+ title?: string;
13
+ /**
14
+ * Shows the summary button.
15
+ */
16
+ hasSummary?: boolean;
17
+ /**
18
+ * An object containing all the labels for the wizard header.
19
+ */
20
+ labels?: {
21
+ /**
22
+ * Summary button label.
23
+ */
24
+ summary: string;
25
+ };
26
+ /**
27
+ * Current tab to check if it's last page or first to disable previous button and swap between next and submit button.
28
+ */
29
+ tab: number;
30
+ /**
31
+ * Function to change the tab when pressing previous and next buttons.
32
+ */
33
+ changeTab: any;
34
+ /**
35
+ * Custom object to define type, size and width of the StepNavigation component
36
+ */
37
+ customStep?: Pick<HvStepNavigationProps, "type" | "stepSize" | "width">;
38
+ }
39
+
40
+ export default function HvWizardTitle(props: HvWizardTitleProps): JSX.Element | null;