@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,198 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
+
3
+ var _Report;
4
+
5
+ import "core-js/modules/es.object.entries.js";
6
+ import "core-js/modules/es.array.map.js";
7
+ import "core-js/modules/es.function.name.js";
8
+ import React from "react";
9
+ import PropTypes from "prop-types";
10
+ import { withStyles } from "@material-ui/core";
11
+ import { HvButton, HvDialogTitle, HvGrid, HvTypography } from "@hitachivantara/uikit-react-core";
12
+ import { Report } from "@hitachivantara/uikit-react-icons";
13
+ import { HvStepNavigation } from "@hitachivantara/uikit-react-lab";
14
+ import HvWizardContext from "../WizardContext";
15
+ import styles from "./styles";
16
+
17
+ var switchTabState = function switchTabState(state, currentTab, index) {
18
+ if (index === currentTab) return "Current";
19
+ if (state.valid) return "Completed";
20
+ if (state.valid === null) return "Enabled";
21
+ if (state.touched && state.valid === false) return "Failed"; // "Disabled"
22
+ // "Pending"
23
+
24
+ return "Enabled";
25
+ };
26
+
27
+ var HvWizardTitle = function HvWizardTitle(_ref) {
28
+ var _customStep$type, _customStep$stepSize, _customStep$width, _labels$summary;
29
+
30
+ var title = _ref.title,
31
+ _ref$hasSummary = _ref.hasSummary,
32
+ hasSummary = _ref$hasSummary === void 0 ? false : _ref$hasSummary,
33
+ _ref$labels = _ref.labels,
34
+ labels = _ref$labels === void 0 ? {} : _ref$labels,
35
+ tab = _ref.tab,
36
+ classes = _ref.classes,
37
+ changeTab = _ref.changeTab,
38
+ _ref$customStep = _ref.customStep,
39
+ customStep = _ref$customStep === void 0 ? {} : _ref$customStep;
40
+
41
+ var _React$useContext = React.useContext(HvWizardContext),
42
+ context = _React$useContext.context;
43
+
44
+ var _React$useState = React.useState([]),
45
+ _React$useState2 = _slicedToArray(_React$useState, 2),
46
+ steps = _React$useState2[0],
47
+ setSteps = _React$useState2[1];
48
+
49
+ React.useEffect(function () {
50
+ var contextArray = Object.entries(context);
51
+
52
+ if (contextArray.length) {
53
+ var updatedSteps = contextArray.map(function (_ref2, index) {
54
+ var _childState$name;
55
+
56
+ var _ref3 = _slicedToArray(_ref2, 2),
57
+ childState = _ref3[1];
58
+
59
+ return {
60
+ title: (_childState$name = childState.name) !== null && _childState$name !== void 0 ? _childState$name : "".concat(index + 1),
61
+ state: switchTabState(childState, tab, index),
62
+ onClick: function onClick() {
63
+ return changeTab(index);
64
+ }
65
+ };
66
+ });
67
+ setSteps(updatedSteps);
68
+ }
69
+ }, [context, tab, changeTab]);
70
+ return /*#__PURE__*/React.createElement(HvDialogTitle, {
71
+ className: classes.headerContainer,
72
+ classes: {
73
+ messageContainer: classes.messageContainer
74
+ }
75
+ }, /*#__PURE__*/React.createElement(HvGrid, {
76
+ container: true,
77
+ justifyContent: "space-between",
78
+ alignItems: "center",
79
+ className: classes.titleContainer
80
+ }, title && /*#__PURE__*/React.createElement(HvTypography, {
81
+ variant: "xsTitle",
82
+ component: "h3"
83
+ }, title), !!steps.length && /*#__PURE__*/React.createElement(HvStepNavigation, {
84
+ className: classes.stepContainer,
85
+ steps: steps,
86
+ type: (_customStep$type = customStep === null || customStep === void 0 ? void 0 : customStep.type) !== null && _customStep$type !== void 0 ? _customStep$type : "Default",
87
+ stepSize: (_customStep$stepSize = customStep === null || customStep === void 0 ? void 0 : customStep.stepSize) !== null && _customStep$stepSize !== void 0 ? _customStep$stepSize : "XS",
88
+ width: (_customStep$width = customStep === null || customStep === void 0 ? void 0 : customStep.width) !== null && _customStep$width !== void 0 ? _customStep$width : {
89
+ xs: 200,
90
+ sm: 350,
91
+ md: 600,
92
+ lg: 800
93
+ }
94
+ }), hasSummary && /*#__PURE__*/React.createElement(HvButton, {
95
+ category: "secondary",
96
+ className: classes.buttonWidth,
97
+ classes: {
98
+ root: classes.rootSummaryButton
99
+ }
100
+ }, _Report || (_Report = /*#__PURE__*/React.createElement(Report, null)), " ", "".concat((_labels$summary = labels.summary) !== null && _labels$summary !== void 0 ? _labels$summary : "Summary"))));
101
+ };
102
+
103
+ process.env.NODE_ENV !== "production" ? HvWizardTitle.propTypes = {
104
+ /**
105
+ * A Jss Object used to override or extend the styles applied.
106
+ */
107
+ classes: PropTypes.shape({
108
+ /**
109
+ * Styles applied to the header container.
110
+ */
111
+ headerContainer: PropTypes.string,
112
+
113
+ /**
114
+ * Styles applied to override the Dialog Title styles.
115
+ */
116
+ messageContainer: PropTypes.string,
117
+
118
+ /**
119
+ * Styles applied to the header content container.
120
+ */
121
+ titleContainer: PropTypes.string,
122
+
123
+ /**
124
+ * Styles applied to the Button component to override its width.
125
+ */
126
+ buttonWidth: PropTypes.string,
127
+
128
+ /**
129
+ * Styles applied to the Button component to override its right padding.
130
+ */
131
+ rootSummaryButton: PropTypes.string,
132
+
133
+ /**
134
+ *
135
+ */
136
+ stepContainer: PropTypes.string
137
+ }),
138
+
139
+ /**
140
+ * Title for the wizard.
141
+ */
142
+ title: PropTypes.string,
143
+
144
+ /**
145
+ * Shows the summary button.
146
+ */
147
+ hasSummary: PropTypes.bool,
148
+
149
+ /**
150
+ * An object containing all the labels for the wizard header.
151
+ */
152
+ labels: PropTypes.shape({
153
+ /**
154
+ * Summary button label.
155
+ */
156
+ summary: PropTypes.string
157
+ }),
158
+
159
+ /**
160
+ * Current tab to check if it's last page or first to disable previous button and swap between next and submit button.
161
+ */
162
+ tab: PropTypes.number.isRequired,
163
+
164
+ /**
165
+ * Function to change the tab when pressing previous and next buttons.
166
+ */
167
+ changeTab: PropTypes.func.isRequired,
168
+
169
+ /**
170
+ * Custom object to define type, size and width of the StepNavigation component
171
+ */
172
+ customStep: PropTypes.shape({
173
+ /**
174
+ * Type of step navigation. Values = {"Simple", "Default"}.
175
+ */
176
+ type: PropTypes.oneOf(["Simple", "Default"]),
177
+
178
+ /**
179
+ * Sets one of the standard sizes of the steps. Values = {"XS", "SM", "MD", "LG", "XL"}
180
+ */
181
+ stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
182
+
183
+ /**
184
+ * Width of the component element on each breakpoint screen resolution.
185
+ */
186
+ width: PropTypes.shape({
187
+ xs: PropTypes.number,
188
+ sm: PropTypes.number,
189
+ md: PropTypes.number,
190
+ lg: PropTypes.number,
191
+ xl: PropTypes.number
192
+ })
193
+ })
194
+ } : void 0;
195
+ export default withStyles(styles, {
196
+ name: "HvWizardTitle"
197
+ })(HvWizardTitle);
198
+ //# sourceMappingURL=WizardTitle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WizardTitle.js","names":["React","PropTypes","withStyles","HvButton","HvDialogTitle","HvGrid","HvTypography","Report","HvStepNavigation","HvWizardContext","styles","switchTabState","state","currentTab","index","valid","touched","HvWizardTitle","title","hasSummary","labels","tab","classes","changeTab","customStep","useContext","context","useState","steps","setSteps","useEffect","contextArray","Object","entries","length","updatedSteps","map","childState","name","onClick","headerContainer","messageContainer","titleContainer","stepContainer","type","stepSize","width","xs","sm","md","lg","buttonWidth","root","rootSummaryButton","summary","propTypes","shape","string","bool","number","isRequired","func","oneOf","xl"],"sources":["../../../../src/Wizard/WizardTitle/WizardTitle.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport { HvButton, HvDialogTitle, HvGrid, HvTypography } from \"@hitachivantara/uikit-react-core\";\nimport { Report } from \"@hitachivantara/uikit-react-icons\";\nimport { HvStepNavigation } from \"@hitachivantara/uikit-react-lab\";\nimport HvWizardContext from \"../WizardContext\";\n\nimport styles from \"./styles\";\n\nconst switchTabState = (state, currentTab, index) => {\n if (index === currentTab) return \"Current\";\n if (state.valid) return \"Completed\";\n if (state.valid === null) return \"Enabled\";\n if (state.touched && state.valid === false) return \"Failed\";\n // \"Disabled\"\n // \"Pending\"\n return \"Enabled\";\n};\n\nconst HvWizardTitle = ({\n title,\n hasSummary = false,\n labels = {},\n tab,\n classes,\n changeTab,\n customStep = {},\n}) => {\n const { context } = React.useContext(HvWizardContext);\n const [steps, setSteps] = React.useState([]);\n\n React.useEffect(() => {\n const contextArray = Object.entries(context);\n if (contextArray.length) {\n const updatedSteps = contextArray.map(([, childState], index) => ({\n title: childState.name ?? `${index + 1}`,\n state: switchTabState(childState, tab, index),\n onClick: () => changeTab(index),\n }));\n\n setSteps(updatedSteps);\n }\n }, [context, tab, changeTab]);\n\n return (\n <HvDialogTitle\n className={classes.headerContainer}\n classes={{ messageContainer: classes.messageContainer }}\n >\n <HvGrid\n container\n justifyContent=\"space-between\"\n alignItems=\"center\"\n className={classes.titleContainer}\n >\n {title && (\n <HvTypography variant=\"xsTitle\" component=\"h3\">\n {title}\n </HvTypography>\n )}\n {!!steps.length && (\n <HvStepNavigation\n className={classes.stepContainer}\n steps={steps}\n type={customStep?.type ?? \"Default\"}\n stepSize={customStep?.stepSize ?? \"XS\"}\n width={customStep?.width ?? { xs: 200, sm: 350, md: 600, lg: 800 }}\n />\n )}\n {hasSummary && (\n <HvButton\n category=\"secondary\"\n className={classes.buttonWidth}\n classes={{ root: classes.rootSummaryButton }}\n >\n <Report /> {`${labels.summary ?? \"Summary\"}`}\n </HvButton>\n )}\n </HvGrid>\n </HvDialogTitle>\n );\n};\n\nHvWizardTitle.propTypes = {\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the header container.\n */\n headerContainer: PropTypes.string,\n /**\n * Styles applied to override the Dialog Title styles.\n */\n messageContainer: PropTypes.string,\n /**\n * Styles applied to the header content container.\n */\n titleContainer: PropTypes.string,\n /**\n * Styles applied to the Button component to override its width.\n */\n buttonWidth: PropTypes.string,\n /**\n * Styles applied to the Button component to override its right padding.\n */\n rootSummaryButton: PropTypes.string,\n /**\n *\n */\n stepContainer: PropTypes.string,\n }),\n /**\n * Title for the wizard.\n */\n title: PropTypes.string,\n /**\n * Shows the summary button.\n */\n hasSummary: PropTypes.bool,\n /**\n * An object containing all the labels for the wizard header.\n */\n labels: PropTypes.shape({\n /**\n * Summary button label.\n */\n summary: PropTypes.string,\n }),\n /**\n * Current tab to check if it's last page or first to disable previous button and swap between next and submit button.\n */\n tab: PropTypes.number.isRequired,\n /**\n * Function to change the tab when pressing previous and next buttons.\n */\n changeTab: PropTypes.func.isRequired,\n /**\n * Custom object to define type, size and width of the StepNavigation component\n */\n customStep: PropTypes.shape({\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Sets one of the standard sizes of the steps. Values = {\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"}\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * Width of the component element on each breakpoint screen resolution.\n */\n width: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n }),\n};\n\nexport default withStyles(styles, { name: \"HvWizardTitle\" })(HvWizardTitle);\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,SAASC,QAAT,EAAmBC,aAAnB,EAAkCC,MAAlC,EAA0CC,YAA1C,QAA8D,kCAA9D;AACA,SAASC,MAAT,QAAuB,mCAAvB;AACA,SAASC,gBAAT,QAAiC,iCAAjC;AACA,OAAOC,eAAP,MAA4B,kBAA5B;AAEA,OAAOC,MA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B,CAAC,QAAD,EAAW,SAAX,CAAhB,CAJoB;;IAK1B;AACJ;AACA;IACIjB,QAAQ,EAAE5C,SAAS,CAAC6D,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,CARgB;;IAS1B;AACJ;AACA;IACIhB,KAAK,EAAE7C,SAAS,CAACuD,KAAV,CAAgB;MACrBT,EAAE,EAAE9C,SAAS,CAAC0D,MADO;MAErBX,EAAE,EAAE/C,SAAS,CAAC0D,MAFO;MAGrBV,EAAE,EAAEhD,SAAS,CAAC0D,MAHO;MAIrBT,EAAE,EAAEjD,SAAS,CAAC0D,MAJO;MAKrBI,EAAE,EAAE9D,SAAS,CAAC0D;IALO,CAAhB;EAZmB,CAAhB;AA1DY,CAA1B;AAgFA,eAAezD,UAAU,CAACQ,MAAD,EAAS;EAAE4B,IAAI,EAAE;AAAR,CAAT,CAAV,CAA8CrB,aAA9C,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./WizardTitle";
2
+ export * from "./WizardTitle";
@@ -0,0 +1,2 @@
1
+ export { default } from "./WizardTitle";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Wizard/WizardTitle/index.js"],"sourcesContent":["export { default } from \"./WizardTitle\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,eAAxB"}
@@ -0,0 +1,33 @@
1
+ var styles = function styles(theme) {
2
+ return {
3
+ messageContainer: {
4
+ "& > div": {
5
+ width: "100%"
6
+ }
7
+ },
8
+ titleContainer: {
9
+ margin: 0,
10
+ width: "100%"
11
+ },
12
+ buttonWidth: {
13
+ width: 120
14
+ },
15
+ rootSummaryButton: {
16
+ paddingRight: 18
17
+ },
18
+ headerContainer: {
19
+ backgroundColor: theme.hv.palette.atmosphere.atmo2,
20
+ "& h6": {
21
+ fontSize: "16px",
22
+ fontWeight: "bold",
23
+ letterSpacing: 0
24
+ }
25
+ },
26
+ stepContainer: {
27
+ margin: "auto"
28
+ }
29
+ };
30
+ };
31
+
32
+ export default styles;
33
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","theme","messageContainer","width","titleContainer","margin","buttonWidth","rootSummaryButton","paddingRight","headerContainer","backgroundColor","hv","palette","atmosphere","atmo2","fontSize","fontWeight","letterSpacing","stepContainer"],"sources":["../../../../src/Wizard/WizardTitle/styles.js"],"sourcesContent":["const styles = (theme) => ({\n messageContainer: {\n \"& > div\": {\n width: \"100%\",\n },\n },\n titleContainer: {\n margin: 0,\n width: \"100%\",\n },\n buttonWidth: {\n width: 120,\n },\n rootSummaryButton: {\n paddingRight: 18,\n },\n headerContainer: {\n backgroundColor: theme.hv.palette.atmosphere.atmo2,\n \"& h6\": {\n fontSize: \"16px\",\n fontWeight: \"bold\",\n letterSpacing: 0,\n },\n },\n stepContainer: {\n margin: \"auto\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,gBAAgB,EAAE;MAChB,WAAW;QACTC,KAAK,EAAE;MADE;IADK,CADO;IAMzBC,cAAc,EAAE;MACdC,MAAM,EAAE,CADM;MAEdF,KAAK,EAAE;IAFO,CANS;IAUzBG,WAAW,EAAE;MACXH,KAAK,EAAE;IADI,CAVY;IAazBI,iBAAiB,EAAE;MACjBC,YAAY,EAAE;IADG,CAbM;IAgBzBC,eAAe,EAAE;MACfC,eAAe,EAAET,KAAK,CAACU,EAAN,CAASC,OAAT,CAAiBC,UAAjB,CAA4BC,KAD9B;MAEf,QAAQ;QACNC,QAAQ,EAAE,MADJ;QAENC,UAAU,EAAE,MAFN;QAGNC,aAAa,EAAE;MAHT;IAFO,CAhBQ;IAwBzBC,aAAa,EAAE;MACbb,MAAM,EAAE;IADK;EAxBU,CAAZ;AAAA,CAAf;;AA6BA,eAAeL,MAAf"}
@@ -0,0 +1,17 @@
1
+ export { default } from "./Wizard";
2
+ export * from "./Wizard";
3
+
4
+ export { default as HvWizardContainer } from "./WizardContainer";
5
+ export * from "./WizardContainer";
6
+
7
+ export { default as HvWizardTitle } from "./WizardTitle";
8
+ export * from "./WizardTitle";
9
+
10
+ export { default as HvWizardContent } from "./WizardContent";
11
+ export * from "./WizardContent";
12
+
13
+ export { default as HvWizardActions } from "./WizardActions";
14
+ export * from "./WizardActions";
15
+
16
+ export { default as HvWizardContext } from "./WizardContext";
17
+ export * from "./WizardContext";
@@ -0,0 +1,8 @@
1
+ export { default } from "./Wizard";
2
+ export { default as HvWizardContainer } from "./WizardContainer";
3
+ export { default as HvWizardTitle } from "./WizardTitle";
4
+ export { default as HvWizardContent } from "./WizardContent";
5
+ export { default as HvWizardActions } from "./WizardActions";
6
+ export { default as HvWizardContext } from "./WizardContext";
7
+ export { default as HvWizardContextProvider } from "./WizardContext/WizardContextProvider";
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default","HvWizardContainer","HvWizardTitle","HvWizardContent","HvWizardActions","HvWizardContext","HvWizardContextProvider"],"sources":["../../../src/Wizard/index.js"],"sourcesContent":["export { default } from \"./Wizard\";\nexport { default as HvWizardContainer } from \"./WizardContainer\";\nexport { default as HvWizardTitle } from \"./WizardTitle\";\nexport { default as HvWizardContent } from \"./WizardContent\";\nexport { default as HvWizardActions } from \"./WizardActions\";\nexport { default as HvWizardContext } from \"./WizardContext\";\nexport { default as HvWizardContextProvider } from \"./WizardContext/WizardContextProvider\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,UAAxB;AACA,SAASA,OAAO,IAAIC,iBAApB,QAA6C,mBAA7C;AACA,SAASD,OAAO,IAAIE,aAApB,QAAyC,eAAzC;AACA,SAASF,OAAO,IAAIG,eAApB,QAA2C,iBAA3C;AACA,SAASH,OAAO,IAAII,eAApB,QAA2C,iBAA3C;AACA,SAASJ,OAAO,IAAIK,eAApB,QAA2C,iBAA3C;AACA,SAASL,OAAO,IAAIM,uBAApB,QAAmD,uCAAnD"}
@@ -0,0 +1,8 @@
1
+ var styles = function styles() {
2
+ return {
3
+ root: {}
4
+ };
5
+ };
6
+
7
+ export default styles;
8
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","root"],"sources":["../../../src/Wizard/styles.js"],"sourcesContent":["const styles = () => ({\n root: {},\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE;EADc,CAAP;AAAA,CAAf;;AAIA,eAAeD,MAAf"}
@@ -51,3 +51,6 @@ export * from "./StepNavigation";
51
51
 
52
52
  export { default as HvImageCarousel } from "./ImageCarousel";
53
53
  export * from "./ImageCarousel";
54
+
55
+ export { default as HvWizard } from "./Wizard";
56
+ export * from "./Wizard";
@@ -22,4 +22,6 @@ export { default as HvProgressBar } from "./ProgressBar";
22
22
  export { default as HvDotPagination } from "./DotPagination";
23
23
  export { default as HvStepNavigation } from "./StepNavigation";
24
24
  export { default as HvImageCarousel } from "./ImageCarousel";
25
+ export { default as HvWizard } from "./Wizard";
26
+ export * from "./Wizard";
25
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvControls","HvInlineEditor","HvProgressBar","HvDotPagination","HvStepNavigation","HvImageCarousel"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvControls } from \"./Controls\";\nexport * from \"./Controls\";\nexport * from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd;AACA,cAAc,gBAAd;AACA,SAASb,OAAO,IAAIc,cAApB,QAA0C,gBAA1C;AACA,SAASd,OAAO,IAAIe,aAApB,QAAyC,eAAzC;AACA,SAASf,OAAO,IAAIgB,eAApB,QAA2C,iBAA3C;AACA,SAAShB,OAAO,IAAIiB,gBAApB,QAA4C,kBAA5C;AACA,SAASjB,OAAO,IAAIkB,eAApB,QAA2C,iBAA3C"}
1
+ {"version":3,"file":"index.js","names":["default","HvAppSwitcherPanel","HvFormComposer","HvNavigationAnchors","HvNotificationPanel","HvSlider","HvTable","HvTimeAgo","HvTimePicker","HvTag","HvDrawer","HvColorPicker","HvQueryBuilder","HvControls","HvInlineEditor","HvProgressBar","HvDotPagination","HvStepNavigation","HvImageCarousel","HvWizard"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvAppSwitcherPanel } from \"./AppSwitcherPanel\";\nexport * from \"./AppSwitcherPanel\";\nexport { default as HvFormComposer } from \"./FormComposer\";\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\nexport { default as HvSlider } from \"./Slider\";\nexport { default as HvTable } from \"./Table\";\nexport * from \"./Table\";\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\nexport { default as HvTimePicker } from \"./TimePicker\";\nexport { default as HvTag } from \"./Tag\";\nexport { default as HvDrawer } from \"./Drawer\";\nexport { default as HvColorPicker } from \"./ColorPicker\";\nexport { default as HvQueryBuilder } from \"./QueryBuilder\";\nexport { default as HvControls } from \"./Controls\";\nexport * from \"./Controls\";\nexport * from \"./QueryBuilder\";\nexport { default as HvInlineEditor } from \"./InlineEditor\";\nexport { default as HvProgressBar } from \"./ProgressBar\";\nexport { default as HvDotPagination } from \"./DotPagination\";\nexport { default as HvStepNavigation } from \"./StepNavigation\";\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\nexport { default as HvWizard } from \"./Wizard\";\nexport * from \"./Wizard\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,kBAApB,QAA8C,oBAA9C;AACA,cAAc,oBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,gBAA1C;AACA,SAASF,OAAO,IAAIG,mBAApB,QAA+C,qBAA/C;AACA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AACA,SAASJ,OAAO,IAAIK,QAApB,QAAoC,UAApC;AACA,SAASL,OAAO,IAAIM,OAApB,QAAmC,SAAnC;AACA,cAAc,SAAd;AACA,SAASN,OAAO,IAAIO,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AACA,SAASP,OAAO,IAAIQ,YAApB,QAAwC,cAAxC;AACA,SAASR,OAAO,IAAIS,KAApB,QAAiC,OAAjC;AACA,SAAST,OAAO,IAAIU,QAApB,QAAoC,UAApC;AACA,SAASV,OAAO,IAAIW,aAApB,QAAyC,eAAzC;AACA,SAASX,OAAO,IAAIY,cAApB,QAA0C,gBAA1C;AACA,SAASZ,OAAO,IAAIa,UAApB,QAAsC,YAAtC;AACA,cAAc,YAAd;AACA,cAAc,gBAAd;AACA,SAASb,OAAO,IAAIc,cAApB,QAA0C,gBAA1C;AACA,SAASd,OAAO,IAAIe,aAApB,QAAyC,eAAzC;AACA,SAASf,OAAO,IAAIgB,eAApB,QAA2C,iBAA3C;AACA,SAAShB,OAAO,IAAIiB,gBAApB,QAA4C,kBAA5C;AACA,SAASjB,OAAO,IAAIkB,eAApB,QAA2C,iBAA3C;AACA,SAASlB,OAAO,IAAImB,QAApB,QAAoC,UAApC;AACA,cAAc,UAAd"}
@@ -0,0 +1,63 @@
1
+ import * as React from "react";
2
+ import { StandardProps, ModalProps } from "@material-ui/core";
3
+ import { HvWizardActionsProps } from "./WizardActions";
4
+ import { HvWizardTitleProps } from "./WizardTitle";
5
+ import { HvStepNavigationProps } from "../StepNavigation";
6
+
7
+ export type HvWizardClassKey = "root";
8
+
9
+ export type HvWizardProps = StandardProps<
10
+ React.HTMLAttributes<HTMLDivElement>,
11
+ HvWizardClassKey
12
+ > & {
13
+ /**
14
+ * Class names to be applied.
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Current state of the Wizard.
19
+ */
20
+ open: boolean;
21
+ /**
22
+ * Function executed on close.
23
+ */
24
+ onClose: ModalProps["onClose"];
25
+ /**
26
+ * Function executed on submit.
27
+ */
28
+ handleSubmit: any;
29
+ /**
30
+ * Title for the wizard.
31
+ */
32
+ title?: string;
33
+ /**
34
+ * The content of the component.
35
+ */
36
+ children?: React.ReactNode;
37
+ /**
38
+ * An object containing all the labels for the wizard.
39
+ */
40
+ labels?: HvWizardActionsProps["labels"] & HvWizardTitleProps["labels"];
41
+ /**
42
+ * Shows the summary button.
43
+ */
44
+ hasSummary?: boolean;
45
+ /**
46
+ * Enables the skip button.
47
+ */
48
+ skippable?: boolean;
49
+ /**
50
+ * Forces minimum height to the component.
51
+ */
52
+ fixedHeight?: boolean;
53
+ /**
54
+ * Whether the loading animation is shown.
55
+ */
56
+ loading?: boolean;
57
+ /**
58
+ * Custom object to define type, size and width of the StepNavigation component
59
+ */
60
+ customStep?: Pick<HvStepNavigationProps, "type" | "stepSize" | "width">
61
+ };
62
+
63
+ export default function HvWizard(props: HvWizardProps): JSX.Element | null;
@@ -0,0 +1,198 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+ const _excluded = ["className", "children", "onClose", "handleSubmit", "title", "open", "skippable", "loading", "hasSummary", "labels", "fixedHeight", "customStep"];
4
+ import "core-js/modules/web.dom-collections.iterator.js";
5
+ import React from "react";
6
+ import PropTypes from "prop-types";
7
+ import { withStyles } from "@material-ui/core";
8
+ import WizardContext from "./WizardContext";
9
+ import WizardContainer from "./WizardContainer";
10
+ import WizardTitle from "./WizardTitle";
11
+ import WizardContent from "./WizardContent";
12
+ import WizardActions from "./WizardActions";
13
+ import styles from "./styles";
14
+
15
+ const HvWizard = _ref => {
16
+ let {
17
+ className,
18
+ children,
19
+ onClose,
20
+ handleSubmit,
21
+ title,
22
+ open,
23
+ skippable = true,
24
+ loading = false,
25
+ hasSummary = false,
26
+ labels = {
27
+ cancel: "Cancel",
28
+ next: "Next",
29
+ previous: "Previous",
30
+ skip: "Skip",
31
+ submit: "Submit",
32
+ summary: "Summary"
33
+ },
34
+ fixedHeight = false,
35
+ customStep
36
+ } = _ref,
37
+ others = _objectWithoutProperties(_ref, _excluded);
38
+
39
+ const [context, setContext] = React.useState({});
40
+ const [tab, setTab] = React.useState(0);
41
+ const contextValue = React.useMemo(() => ({
42
+ context,
43
+ setContext
44
+ }), [context, setContext]);
45
+ React.useEffect(() => {
46
+ if (!open) {
47
+ setTab(0);
48
+ }
49
+ }, [open]);
50
+ const handleClose = React.useCallback((evt, reason) => {
51
+ if (reason !== "backdropClick") {
52
+ onClose(evt, reason);
53
+ }
54
+ }, [onClose]);
55
+ return /*#__PURE__*/React.createElement(WizardContext.Provider, {
56
+ value: contextValue
57
+ }, /*#__PURE__*/React.createElement(WizardContainer, _extends({
58
+ className: className,
59
+ handleClose: handleClose,
60
+ open: open
61
+ }, others), /*#__PURE__*/React.createElement(WizardTitle, {
62
+ title: title,
63
+ hasSummary: hasSummary,
64
+ labels: labels,
65
+ tab: tab,
66
+ changeTab: setTab,
67
+ customStep: customStep
68
+ }), /*#__PURE__*/React.createElement(WizardContent, {
69
+ loading: loading,
70
+ fixedHeight: fixedHeight,
71
+ tab: tab
72
+ }, children), /*#__PURE__*/React.createElement(WizardActions, {
73
+ loading: loading,
74
+ skippable: skippable,
75
+ labels: labels,
76
+ tab: tab,
77
+ changeTab: setTab,
78
+ handleClose: handleClose,
79
+ handleSubmit: handleSubmit
80
+ })));
81
+ };
82
+
83
+ process.env.NODE_ENV !== "production" ? HvWizard.propTypes = {
84
+ /**
85
+ * Class names to be applied.
86
+ */
87
+ className: PropTypes.string,
88
+
89
+ /**
90
+ * Current state of the Wizard.
91
+ */
92
+ open: PropTypes.bool.isRequired,
93
+
94
+ /**
95
+ * Function executed on close.
96
+ */
97
+ onClose: PropTypes.func.isRequired,
98
+
99
+ /**
100
+ * Function executed on submit.
101
+ */
102
+ handleSubmit: PropTypes.func.isRequired,
103
+
104
+ /**
105
+ * Enables the skip button.
106
+ */
107
+ skippable: PropTypes.bool,
108
+
109
+ /**
110
+ * Title for the wizard.
111
+ */
112
+ title: PropTypes.string,
113
+
114
+ /**
115
+ * Shows the summary button.
116
+ */
117
+ hasSummary: PropTypes.bool,
118
+
119
+ /**
120
+ * The content of the component.
121
+ */
122
+ children: PropTypes.node,
123
+
124
+ /**
125
+ * An object containing all the labels for the wizard.
126
+ */
127
+ labels: PropTypes.shape({
128
+ /**
129
+ * Cancel button label.
130
+ */
131
+ cancel: PropTypes.string,
132
+
133
+ /**
134
+ * Skip button label.
135
+ */
136
+ skip: PropTypes.string,
137
+
138
+ /**
139
+ * Previous button label.
140
+ */
141
+ previous: PropTypes.string,
142
+
143
+ /**
144
+ * Next button label.
145
+ */
146
+ next: PropTypes.string,
147
+
148
+ /**
149
+ * Submit button label.
150
+ */
151
+ submit: PropTypes.string,
152
+
153
+ /**
154
+ * Summary button label.
155
+ */
156
+ summary: PropTypes.string
157
+ }),
158
+
159
+ /**
160
+ * Forces minimum height to the component.
161
+ */
162
+ fixedHeight: PropTypes.bool,
163
+
164
+ /**
165
+ * Whether the loading animation is shown.
166
+ */
167
+ loading: PropTypes.bool,
168
+
169
+ /**
170
+ * Custom object to define type, size and width of the StepNavigation component
171
+ */
172
+ customStep: PropTypes.shape({
173
+ /**
174
+ * Type of step navigation. Values = {"Simple", "Default"}.
175
+ */
176
+ type: PropTypes.oneOf(["Simple", "Default"]),
177
+
178
+ /**
179
+ * Sets one of the standard sizes of the steps. Values = {"XS", "SM", "MD", "LG", "XL"}
180
+ */
181
+ stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
182
+
183
+ /**
184
+ * Width of the component element on each breakpoint screen resolution.
185
+ */
186
+ width: PropTypes.shape({
187
+ xs: PropTypes.number,
188
+ sm: PropTypes.number,
189
+ md: PropTypes.number,
190
+ lg: PropTypes.number,
191
+ xl: PropTypes.number
192
+ })
193
+ })
194
+ } : void 0;
195
+ export default withStyles(styles, {
196
+ name: "HvWizard"
197
+ })(HvWizard);
198
+ //# sourceMappingURL=Wizard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Wizard.js","names":["React","PropTypes","withStyles","WizardContext","WizardContainer","WizardTitle","WizardContent","WizardActions","styles","HvWizard","className","children","onClose","handleSubmit","title","open","skippable","loading","hasSummary","labels","cancel","next","previous","skip","submit","summary","fixedHeight","customStep","others","context","setContext","useState","tab","setTab","contextValue","useMemo","useEffect","handleClose","useCallback","evt","reason","propTypes","string","bool","isRequired","func","node","shape","type","oneOf","stepSize","width","xs","number","sm","md","lg","xl","name"],"sources":["../../../src/Wizard/Wizard.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@material-ui/core\";\nimport WizardContext from \"./WizardContext\";\nimport WizardContainer from \"./WizardContainer\";\nimport WizardTitle from \"./WizardTitle\";\nimport WizardContent from \"./WizardContent\";\nimport WizardActions from \"./WizardActions\";\n\nimport styles from \"./styles\";\n\nconst HvWizard = ({\n className,\n children,\n onClose,\n handleSubmit,\n title,\n open,\n skippable = true,\n loading = false,\n hasSummary = false,\n labels = {\n cancel: \"Cancel\",\n next: \"Next\",\n previous: \"Previous\",\n skip: \"Skip\",\n submit: \"Submit\",\n summary: \"Summary\",\n },\n fixedHeight = false,\n customStep,\n ...others\n}) => {\n const [context, setContext] = React.useState({});\n const [tab, setTab] = React.useState(0);\n\n const contextValue = React.useMemo(\n () => ({\n context,\n setContext,\n }),\n [context, setContext]\n );\n\n React.useEffect(() => {\n if (!open) {\n setTab(0);\n }\n }, [open]);\n\n const handleClose = React.useCallback(\n (evt, reason) => {\n if (reason !== \"backdropClick\") {\n onClose(evt, reason);\n }\n },\n [onClose]\n );\n\n return (\n <WizardContext.Provider value={contextValue}>\n <WizardContainer className={className} handleClose={handleClose} open={open} {...others}>\n <WizardTitle\n title={title}\n hasSummary={hasSummary}\n labels={labels}\n tab={tab}\n changeTab={setTab}\n customStep={customStep}\n />\n <WizardContent loading={loading} fixedHeight={fixedHeight} tab={tab}>\n {children}\n </WizardContent>\n <WizardActions\n loading={loading}\n skippable={skippable}\n labels={labels}\n tab={tab}\n changeTab={setTab}\n handleClose={handleClose}\n handleSubmit={handleSubmit}\n />\n </WizardContainer>\n </WizardContext.Provider>\n );\n};\n\nHvWizard.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * Current state of the Wizard.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Function executed on close.\n */\n onClose: PropTypes.func.isRequired,\n /**\n * Function executed on submit.\n */\n handleSubmit: PropTypes.func.isRequired,\n /**\n * Enables the skip button.\n */\n skippable: PropTypes.bool,\n /**\n * Title for the wizard.\n */\n title: PropTypes.string,\n /**\n * Shows the summary button.\n */\n hasSummary: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * An object containing all the labels for the wizard.\n */\n labels: PropTypes.shape({\n /**\n * Cancel button label.\n */\n cancel: PropTypes.string,\n /**\n * Skip button label.\n */\n skip: PropTypes.string,\n /**\n * Previous button label.\n */\n previous: PropTypes.string,\n /**\n * Next button label.\n */\n next: PropTypes.string,\n /**\n * Submit button label.\n */\n submit: PropTypes.string,\n /**\n * Summary button label.\n */\n summary: PropTypes.string,\n }),\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 * Custom object to define type, size and width of the StepNavigation component\n */\n customStep: PropTypes.shape({\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Sets one of the standard sizes of the steps. Values = {\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"}\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * Width of the component element on each breakpoint screen resolution.\n */\n width: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n }),\n};\n\nexport default withStyles(styles, { name: \"HvWizard\" })(HvWizard);\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,mBAA3B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,eAAP,MAA4B,mBAA5B;AACA,OAAOC,WAAP,MAAwB,eAAxB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AAEA,OAAOC,MAAP,MAAmB,UAAnB;;AAEA,MAAMC,QAAQ,GAAG,QAqBX;EAAA,IArBY;IAChBC,SADgB;IAEhBC,QAFgB;IAGhBC,OAHgB;IAIhBC,YAJgB;IAKhBC,KALgB;IAMhBC,IANgB;IAOhBC,SAAS,GAAG,IAPI;IAQhBC,OAAO,GAAG,KARM;IAShBC,UAAU,GAAG,KATG;IAUhBC,MAAM,GAAG;MACPC,MAAM,EAAE,QADD;MAEPC,IAAI,EAAE,MAFC;MAGPC,QAAQ,EAAE,UAHH;MAIPC,IAAI,EAAE,MAJC;MAKPC,MAAM,EAAE,QALD;MAMPC,OAAO,EAAE;IANF,CAVO;IAkBhBC,WAAW,GAAG,KAlBE;IAmBhBC;EAnBgB,CAqBZ;EAAA,IADDC,MACC;;EACJ,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB9B,KAAK,CAAC+B,QAAN,CAAe,EAAf,CAA9B;EACA,MAAM,CAACC,GAAD,EAAMC,MAAN,IAAgBjC,KAAK,CAAC+B,QAAN,CAAe,CAAf,CAAtB;EAEA,MAAMG,YAAY,GAAGlC,KAAK,CAACmC,OAAN,CACnB,OAAO;IACLN,OADK;IAELC;EAFK,CAA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