@hitachivantara/uikit-react-lab 4.0.1-next.4 → 4.0.1-next.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +3 -1
- package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +2 -9
- package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
- package/dist/StepNavigation/DefaultNavigation/Step/Step.d.ts +2 -2
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js +2 -2
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/StepNavigation/DefaultNavigation/utils.js +3 -2
- package/dist/StepNavigation/DefaultNavigation/utils.js.map +1 -1
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +2 -5
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +3 -1
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +2 -11
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
- package/dist/StepNavigation/SimpleNavigation/utils.js +10 -8
- package/dist/StepNavigation/SimpleNavigation/utils.js.map +1 -1
- package/dist/StepNavigation/StepNavigation.js +5 -5
- package/dist/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/Wizard/Wizard.d.ts +63 -0
- package/dist/Wizard/Wizard.js +262 -0
- package/dist/Wizard/Wizard.js.map +1 -0
- package/dist/Wizard/WizardActions/WizardActions.d.ts +61 -0
- package/dist/Wizard/WizardActions/WizardActions.js +270 -0
- package/dist/Wizard/WizardActions/WizardActions.js.map +1 -0
- package/dist/Wizard/WizardActions/index.d.ts +2 -0
- package/dist/Wizard/WizardActions/index.js +16 -0
- package/dist/Wizard/WizardActions/index.js.map +1 -0
- package/dist/Wizard/WizardActions/styles.js +30 -0
- package/dist/Wizard/WizardActions/styles.js.map +1 -0
- package/dist/Wizard/WizardContainer/WizardContainer.d.ts +28 -0
- package/dist/Wizard/WizardContainer/WizardContainer.js +116 -0
- package/dist/Wizard/WizardContainer/WizardContainer.js.map +1 -0
- package/dist/Wizard/WizardContainer/index.d.ts +2 -0
- package/dist/Wizard/WizardContainer/index.js +16 -0
- package/dist/Wizard/WizardContainer/index.js.map +1 -0
- package/dist/Wizard/WizardContainer/styles.js +23 -0
- package/dist/Wizard/WizardContainer/styles.js.map +1 -0
- package/dist/Wizard/WizardContent/LoadingContainer.js +101 -0
- package/dist/Wizard/WizardContent/LoadingContainer.js.map +1 -0
- package/dist/Wizard/WizardContent/WizardContent.d.ts +28 -0
- package/dist/Wizard/WizardContent/WizardContent.js +167 -0
- package/dist/Wizard/WizardContent/WizardContent.js.map +1 -0
- package/dist/Wizard/WizardContent/index.d.ts +2 -0
- package/dist/Wizard/WizardContent/index.js +16 -0
- package/dist/Wizard/WizardContent/index.js.map +1 -0
- package/dist/Wizard/WizardContent/styles.js +24 -0
- package/dist/Wizard/WizardContent/styles.js.map +1 -0
- package/dist/Wizard/WizardContext/WizardContext.js +21 -0
- package/dist/Wizard/WizardContext/WizardContext.js.map +1 -0
- package/dist/Wizard/WizardContext/index.js +16 -0
- package/dist/Wizard/WizardContext/index.js.map +1 -0
- package/dist/Wizard/WizardTitle/WizardTitle.d.ts +42 -0
- package/dist/Wizard/WizardTitle/WizardTitle.js +227 -0
- package/dist/Wizard/WizardTitle/WizardTitle.js.map +1 -0
- package/dist/Wizard/WizardTitle/index.d.ts +2 -0
- package/dist/Wizard/WizardTitle/index.js +16 -0
- package/dist/Wizard/WizardTitle/index.js.map +1 -0
- package/dist/Wizard/WizardTitle/styles.js +41 -0
- package/dist/Wizard/WizardTitle/styles.js.map +1 -0
- package/dist/Wizard/index.d.ts +2 -0
- package/dist/Wizard/index.js +56 -0
- package/dist/Wizard/index.js.map +1 -0
- package/dist/Wizard/styles.js +16 -0
- package/dist/Wizard/styles.js.map +1 -0
- package/dist/index.d.ts +8 -5
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +3 -1
- package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js +2 -8
- package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.d.ts +2 -2
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +2 -2
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/legacy/StepNavigation/DefaultNavigation/utils.js +3 -2
- package/dist/legacy/StepNavigation/DefaultNavigation/utils.js.map +1 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +4 -7
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +3 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js +2 -9
- package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
- package/dist/legacy/StepNavigation/SimpleNavigation/utils.js +9 -5
- package/dist/legacy/StepNavigation/SimpleNavigation/utils.js.map +1 -1
- package/dist/legacy/StepNavigation/StepNavigation.js +5 -5
- package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/legacy/Wizard/Wizard.d.ts +63 -0
- package/dist/legacy/Wizard/Wizard.js +229 -0
- package/dist/legacy/Wizard/Wizard.js.map +1 -0
- package/dist/legacy/Wizard/WizardActions/WizardActions.d.ts +61 -0
- package/dist/legacy/Wizard/WizardActions/WizardActions.js +237 -0
- package/dist/legacy/Wizard/WizardActions/WizardActions.js.map +1 -0
- package/dist/legacy/Wizard/WizardActions/index.d.ts +2 -0
- package/dist/legacy/Wizard/WizardActions/index.js +2 -0
- package/dist/legacy/Wizard/WizardActions/index.js.map +1 -0
- package/dist/legacy/Wizard/WizardActions/styles.js +22 -0
- package/dist/legacy/Wizard/WizardActions/styles.js.map +1 -0
- package/dist/legacy/Wizard/WizardContainer/WizardContainer.d.ts +28 -0
- package/dist/legacy/Wizard/WizardContainer/WizardContainer.js +90 -0
- package/dist/legacy/Wizard/WizardContainer/WizardContainer.js.map +1 -0
- package/dist/legacy/Wizard/WizardContainer/index.d.ts +2 -0
- package/dist/legacy/Wizard/WizardContainer/index.js +2 -0
- package/dist/legacy/Wizard/WizardContainer/index.js.map +1 -0
- package/dist/legacy/Wizard/WizardContainer/styles.js +15 -0
- package/dist/legacy/Wizard/WizardContainer/styles.js.map +1 -0
- package/dist/legacy/Wizard/WizardContent/LoadingContainer.js +78 -0
- package/dist/legacy/Wizard/WizardContent/LoadingContainer.js.map +1 -0
- package/dist/legacy/Wizard/WizardContent/WizardContent.d.ts +28 -0
- package/dist/legacy/Wizard/WizardContent/WizardContent.js +132 -0
- package/dist/legacy/Wizard/WizardContent/WizardContent.js.map +1 -0
- package/dist/legacy/Wizard/WizardContent/index.d.ts +2 -0
- package/dist/legacy/Wizard/WizardContent/index.js +2 -0
- package/dist/legacy/Wizard/WizardContent/index.js.map +1 -0
- package/dist/legacy/Wizard/WizardContent/styles.js +16 -0
- package/dist/legacy/Wizard/WizardContent/styles.js.map +1 -0
- package/dist/legacy/Wizard/WizardContext/WizardContext.js +12 -0
- package/dist/legacy/Wizard/WizardContext/WizardContext.js.map +1 -0
- package/dist/legacy/Wizard/WizardContext/index.js +2 -0
- package/dist/legacy/Wizard/WizardContext/index.js.map +1 -0
- package/dist/legacy/Wizard/WizardTitle/WizardTitle.d.ts +42 -0
- package/dist/legacy/Wizard/WizardTitle/WizardTitle.js +204 -0
- package/dist/legacy/Wizard/WizardTitle/WizardTitle.js.map +1 -0
- package/dist/legacy/Wizard/WizardTitle/index.d.ts +2 -0
- package/dist/legacy/Wizard/WizardTitle/index.js +2 -0
- package/dist/legacy/Wizard/WizardTitle/index.js.map +1 -0
- package/dist/legacy/Wizard/WizardTitle/styles.js +33 -0
- package/dist/legacy/Wizard/WizardTitle/styles.js.map +1 -0
- package/dist/legacy/Wizard/index.d.ts +2 -0
- package/dist/legacy/Wizard/index.js +7 -0
- package/dist/legacy/Wizard/index.js.map +1 -0
- package/dist/legacy/Wizard/styles.js +8 -0
- package/dist/legacy/Wizard/styles.js.map +1 -0
- package/dist/legacy/index.d.ts +8 -5
- package/dist/legacy/index.js +3 -2
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +3 -1
- package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js +2 -6
- package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.d.ts +2 -2
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +2 -2
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/modern/StepNavigation/DefaultNavigation/utils.js +3 -2
- package/dist/modern/StepNavigation/DefaultNavigation/utils.js.map +1 -1
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +4 -5
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +3 -1
- package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js +2 -6
- package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
- package/dist/modern/StepNavigation/SimpleNavigation/utils.js +7 -5
- package/dist/modern/StepNavigation/SimpleNavigation/utils.js.map +1 -1
- package/dist/modern/StepNavigation/StepNavigation.js +5 -5
- package/dist/modern/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/modern/Wizard/Wizard.d.ts +63 -0
- package/dist/modern/Wizard/Wizard.js +209 -0
- package/dist/modern/Wizard/Wizard.js.map +1 -0
- package/dist/modern/Wizard/WizardActions/WizardActions.d.ts +61 -0
- package/dist/modern/Wizard/WizardActions/WizardActions.js +197 -0
- package/dist/modern/Wizard/WizardActions/WizardActions.js.map +1 -0
- package/dist/modern/Wizard/WizardActions/index.d.ts +2 -0
- package/dist/modern/Wizard/WizardActions/index.js +2 -0
- package/dist/modern/Wizard/WizardActions/index.js.map +1 -0
- package/dist/modern/Wizard/WizardActions/styles.js +20 -0
- package/dist/modern/Wizard/WizardActions/styles.js.map +1 -0
- package/dist/modern/Wizard/WizardContainer/WizardContainer.d.ts +28 -0
- package/dist/modern/Wizard/WizardContainer/WizardContainer.js +85 -0
- package/dist/modern/Wizard/WizardContainer/WizardContainer.js.map +1 -0
- package/dist/modern/Wizard/WizardContainer/index.d.ts +2 -0
- package/dist/modern/Wizard/WizardContainer/index.js +2 -0
- package/dist/modern/Wizard/WizardContainer/index.js.map +1 -0
- package/dist/modern/Wizard/WizardContainer/styles.js +13 -0
- package/dist/modern/Wizard/WizardContainer/styles.js.map +1 -0
- package/dist/modern/Wizard/WizardContent/LoadingContainer.js +71 -0
- package/dist/modern/Wizard/WizardContent/LoadingContainer.js.map +1 -0
- package/dist/modern/Wizard/WizardContent/WizardContent.d.ts +28 -0
- package/dist/modern/Wizard/WizardContent/WizardContent.js +122 -0
- package/dist/modern/Wizard/WizardContent/WizardContent.js.map +1 -0
- package/dist/modern/Wizard/WizardContent/index.d.ts +2 -0
- package/dist/modern/Wizard/WizardContent/index.js +2 -0
- package/dist/modern/Wizard/WizardContent/index.js.map +1 -0
- package/dist/modern/Wizard/WizardContent/styles.js +14 -0
- package/dist/modern/Wizard/WizardContent/styles.js.map +1 -0
- package/dist/modern/Wizard/WizardContext/WizardContext.js +12 -0
- package/dist/modern/Wizard/WizardContext/WizardContext.js.map +1 -0
- package/dist/modern/Wizard/WizardContext/index.js +2 -0
- package/dist/modern/Wizard/WizardContext/index.js.map +1 -0
- package/dist/modern/Wizard/WizardTitle/WizardTitle.d.ts +42 -0
- package/dist/modern/Wizard/WizardTitle/WizardTitle.js +188 -0
- package/dist/modern/Wizard/WizardTitle/WizardTitle.js.map +1 -0
- package/dist/modern/Wizard/WizardTitle/index.d.ts +2 -0
- package/dist/modern/Wizard/WizardTitle/index.js +2 -0
- package/dist/modern/Wizard/WizardTitle/index.js.map +1 -0
- package/dist/modern/Wizard/WizardTitle/styles.js +31 -0
- package/dist/modern/Wizard/WizardTitle/styles.js.map +1 -0
- package/dist/modern/Wizard/index.d.ts +2 -0
- package/dist/modern/Wizard/index.js +7 -0
- package/dist/modern/Wizard/index.js.map +1 -0
- package/dist/modern/Wizard/styles.js +6 -0
- package/dist/modern/Wizard/styles.js.map +1 -0
- package/dist/modern/index.d.ts +8 -5
- package/dist/modern/index.js +3 -2
- package/dist/modern/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,90 @@
|
|
|
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.to-string.js";
|
|
5
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
6
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
7
|
+
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
10
|
+
var _excluded = ["classes", "className", "children", "handleClose", "open"];
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
import React from "react";
|
|
17
|
+
import PropTypes from "prop-types";
|
|
18
|
+
import clsx from "clsx";
|
|
19
|
+
import { withStyles } from "@mui/styles";
|
|
20
|
+
import { HvDialog } from "@hitachivantara/uikit-react-core";
|
|
21
|
+
import styles from "./styles";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
|
|
24
|
+
var HvWizardContainer = function HvWizardContainer(_ref) {
|
|
25
|
+
var classes = _ref.classes,
|
|
26
|
+
className = _ref.className,
|
|
27
|
+
children = _ref.children,
|
|
28
|
+
handleClose = _ref.handleClose,
|
|
29
|
+
open = _ref.open,
|
|
30
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
31
|
+
|
|
32
|
+
return /*#__PURE__*/_jsx(HvDialog, _objectSpread(_objectSpread({
|
|
33
|
+
classes: {
|
|
34
|
+
closeButton: classes.closeButton,
|
|
35
|
+
paper: classes.paper
|
|
36
|
+
} // overrides css
|
|
37
|
+
,
|
|
38
|
+
className: clsx(className, classes.root),
|
|
39
|
+
open: open,
|
|
40
|
+
onClose: handleClose
|
|
41
|
+
}, others), {}, {
|
|
42
|
+
children: children
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
process.env.NODE_ENV !== "production" ? HvWizardContainer.propTypes = {
|
|
47
|
+
/**
|
|
48
|
+
* Class names to be applied.
|
|
49
|
+
*/
|
|
50
|
+
className: PropTypes.string,
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* A Jss Object used to override or extend the styles applied.
|
|
54
|
+
*/
|
|
55
|
+
classes: PropTypes.shape({
|
|
56
|
+
/**
|
|
57
|
+
* Styles applied to the component root class.
|
|
58
|
+
*/
|
|
59
|
+
root: PropTypes.string,
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Style applied to the component (root).
|
|
63
|
+
*/
|
|
64
|
+
paper: PropTypes.string,
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Style applied to the close button.
|
|
68
|
+
*/
|
|
69
|
+
closeButton: PropTypes.string
|
|
70
|
+
}).isRequired,
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Components of the Wizard.
|
|
74
|
+
*/
|
|
75
|
+
children: PropTypes.node.isRequired,
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Current state of the Wizard.
|
|
79
|
+
*/
|
|
80
|
+
open: PropTypes.bool.isRequired,
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Function executed on close.
|
|
84
|
+
*/
|
|
85
|
+
handleClose: PropTypes.func.isRequired
|
|
86
|
+
} : void 0;
|
|
87
|
+
export default withStyles(styles, {
|
|
88
|
+
name: "HvWizardContainer"
|
|
89
|
+
})(HvWizardContainer);
|
|
90
|
+
//# 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 \"@mui/styles\";\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,aAA3B;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,KAAC,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;IAAA,UAOGH;EAPH,GADF;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 @@
|
|
|
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 @@
|
|
|
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,78 @@
|
|
|
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.to-string.js";
|
|
5
|
+
import "core-js/modules/es.object.get-own-property-descriptor.js";
|
|
6
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
|
7
|
+
import "core-js/modules/es.object.get-own-property-descriptors.js";
|
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
9
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
10
|
+
var _excluded = ["children", "hidden"];
|
|
11
|
+
|
|
12
|
+
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; }
|
|
13
|
+
|
|
14
|
+
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; }
|
|
15
|
+
|
|
16
|
+
import React from "react";
|
|
17
|
+
import PropTypes from "prop-types";
|
|
18
|
+
import clsx from "clsx";
|
|
19
|
+
import { HvLoading } from "@hitachivantara/uikit-react-core";
|
|
20
|
+
import { alpha, hexToRgb } from "@mui/material";
|
|
21
|
+
import { makeStyles } from "@mui/styles";
|
|
22
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
24
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
25
|
+
var useStyles = makeStyles(function (theme) {
|
|
26
|
+
return {
|
|
27
|
+
loading: {
|
|
28
|
+
width: "100%",
|
|
29
|
+
height: "100%"
|
|
30
|
+
},
|
|
31
|
+
overlay: {
|
|
32
|
+
position: "absolute",
|
|
33
|
+
transition: "background-Color .2s ease",
|
|
34
|
+
zIndex: -1
|
|
35
|
+
},
|
|
36
|
+
blur: {
|
|
37
|
+
backgroundColor: alpha(hexToRgb(theme.hv.palette.atmosphere.atmo2), 0.8),
|
|
38
|
+
zIndex: theme.zIndex.drawer
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
var LoadingContainer = function LoadingContainer(_ref) {
|
|
44
|
+
var children = _ref.children,
|
|
45
|
+
hidden = _ref.hidden,
|
|
46
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
47
|
+
|
|
48
|
+
var classes = useStyles();
|
|
49
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
50
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
51
|
+
style: {
|
|
52
|
+
top: 0,
|
|
53
|
+
left: 0,
|
|
54
|
+
height: "100%",
|
|
55
|
+
width: "100%"
|
|
56
|
+
},
|
|
57
|
+
className: clsx(classes.overlay, !hidden && classes.blur),
|
|
58
|
+
children: /*#__PURE__*/_jsx(HvLoading, _objectSpread({
|
|
59
|
+
classes: {
|
|
60
|
+
root: classes.loading
|
|
61
|
+
},
|
|
62
|
+
hidden: hidden
|
|
63
|
+
}, others))
|
|
64
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
65
|
+
style: {
|
|
66
|
+
display: "flow-root"
|
|
67
|
+
},
|
|
68
|
+
children: children
|
|
69
|
+
})]
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
process.env.NODE_ENV !== "production" ? LoadingContainer.propTypes = {
|
|
74
|
+
children: PropTypes.node,
|
|
75
|
+
hidden: PropTypes.bool
|
|
76
|
+
} : void 0;
|
|
77
|
+
export default LoadingContainer;
|
|
78
|
+
//# sourceMappingURL=LoadingContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoadingContainer.js","names":["React","PropTypes","clsx","HvLoading","alpha","hexToRgb","makeStyles","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 { alpha, hexToRgb } from \"@mui/material\";\nimport { makeStyles } from \"@mui/styles\";\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,OAAO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EK,OAAO,EAAE;MAAX,CAAZ;MAAA,UAAuCP;IAAvC,EAZF;EAAA,EADF;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 "@mui/material";
|
|
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,132 @@
|
|
|
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 "@mui/styles";
|
|
21
|
+
import clsx from "clsx";
|
|
22
|
+
import { HvDialogContent } from "@hitachivantara/uikit-react-core";
|
|
23
|
+
import { HvWizardContext } from "..";
|
|
24
|
+
import LoadingContainer from "./LoadingContainer";
|
|
25
|
+
import styles from "./styles";
|
|
26
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
27
|
+
|
|
28
|
+
var HvWizardContent = function HvWizardContent(_ref) {
|
|
29
|
+
var classes = _ref.classes,
|
|
30
|
+
_ref$fixedHeight = _ref.fixedHeight,
|
|
31
|
+
fixedHeight = _ref$fixedHeight === void 0 ? false : _ref$fixedHeight,
|
|
32
|
+
_ref$loading = _ref.loading,
|
|
33
|
+
loading = _ref$loading === void 0 ? false : _ref$loading,
|
|
34
|
+
children = _ref.children,
|
|
35
|
+
tab = _ref.tab;
|
|
36
|
+
var arrayChildren = React.Children.toArray(children);
|
|
37
|
+
var initialContext = arrayChildren.reduce(function (acc, child, index) {
|
|
38
|
+
var invalid = child.props.mustValidate === true ? false : null;
|
|
39
|
+
var valid = invalid !== null && invalid !== void 0 ? invalid : index === 0 || null;
|
|
40
|
+
return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, index, _objectSpread(_objectSpread({}, child.props), {}, {
|
|
41
|
+
form: {},
|
|
42
|
+
valid: valid,
|
|
43
|
+
touched: index === 0
|
|
44
|
+
})));
|
|
45
|
+
}, {});
|
|
46
|
+
|
|
47
|
+
var _React$useContext = React.useContext(HvWizardContext),
|
|
48
|
+
context = _React$useContext.context,
|
|
49
|
+
setContext = _React$useContext.setContext;
|
|
50
|
+
|
|
51
|
+
React.useEffect(function () {
|
|
52
|
+
setContext(initialContext);
|
|
53
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
54
|
+
|
|
55
|
+
React.useEffect(function () {
|
|
56
|
+
var _context$tab;
|
|
57
|
+
|
|
58
|
+
if (tab && !((_context$tab = context[tab]) !== null && _context$tab !== void 0 && _context$tab.touched)) {
|
|
59
|
+
var updatedContext = Object.entries(context).reduce(function (acc, _ref2) {
|
|
60
|
+
var _childState$valid;
|
|
61
|
+
|
|
62
|
+
var _ref3 = _slicedToArray(_ref2, 2),
|
|
63
|
+
key = _ref3[0],
|
|
64
|
+
childState = _ref3[1];
|
|
65
|
+
|
|
66
|
+
return _objectSpread(_objectSpread({}, acc), +key <= tab ? _defineProperty({}, key, _objectSpread(_objectSpread({}, childState), {}, {
|
|
67
|
+
touched: true,
|
|
68
|
+
valid: (_childState$valid = childState.valid) !== null && _childState$valid !== void 0 ? _childState$valid : true
|
|
69
|
+
})) : _defineProperty({}, key, childState));
|
|
70
|
+
}, {});
|
|
71
|
+
setContext(updatedContext);
|
|
72
|
+
}
|
|
73
|
+
}, [tab]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
74
|
+
|
|
75
|
+
return /*#__PURE__*/_jsx(HvDialogContent, {
|
|
76
|
+
className: clsx(classes.contentContainer, fixedHeight && classes.fixedHeight),
|
|
77
|
+
indentContent: true,
|
|
78
|
+
children: /*#__PURE__*/_jsx(LoadingContainer, {
|
|
79
|
+
hidden: !loading,
|
|
80
|
+
children: React.Children.map(arrayChildren, function (child, index) {
|
|
81
|
+
if (index === tab) {
|
|
82
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
83
|
+
tab: tab
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return null;
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
process.env.NODE_ENV !== "production" ? HvWizardContent.propTypes = {
|
|
94
|
+
/**
|
|
95
|
+
* Current tab to show.
|
|
96
|
+
*/
|
|
97
|
+
tab: PropTypes.number.isRequired,
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Tabs to show on the Wizard.
|
|
101
|
+
*/
|
|
102
|
+
children: PropTypes.node.isRequired,
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A Jss Object used to override or extend the styles applied.
|
|
106
|
+
*/
|
|
107
|
+
classes: PropTypes.shape({
|
|
108
|
+
/**
|
|
109
|
+
* Style applied to the Wizard content container
|
|
110
|
+
*/
|
|
111
|
+
contentContainer: PropTypes.string,
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Style applied to the Wizard to fix its height.
|
|
115
|
+
*/
|
|
116
|
+
fixedHeight: PropTypes.string
|
|
117
|
+
}).isRequired,
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Forces minimum height to the component.
|
|
121
|
+
*/
|
|
122
|
+
fixedHeight: PropTypes.bool,
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Whether the loading animation is shown.
|
|
126
|
+
*/
|
|
127
|
+
loading: PropTypes.bool
|
|
128
|
+
} : void 0;
|
|
129
|
+
export default withStyles(styles, {
|
|
130
|
+
name: "HvWizardContent"
|
|
131
|
+
})(HvWizardContent);
|
|
132
|
+
//# 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 \"@mui/styles\";\nimport clsx from \"clsx\";\nimport { HvDialogContent } from \"@hitachivantara/uikit-react-core\";\nimport { HvWizardContext } from \"..\";\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,aAA3B;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,SAASC,eAAT,QAAgC,kCAAhC;AACA,SAASC,eAAT,QAAgC,IAAhC;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,QAAv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@@ -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 { 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 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/Wizard/WizardContext/index.js"],"sourcesContent":["export { default } from \"./WizardContext\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,iBAAxB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@mui/material";
|
|
3
|
+
import { HvStepNavigationProps } from "../../StepNavigation";
|
|
4
|
+
|
|
5
|
+
export type HvWizardTitleClassKey = "root";
|
|
6
|
+
|
|
7
|
+
export type HvWizardTitleProps = StandardProps<
|
|
8
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
9
|
+
HvWizardTitleClassKey
|
|
10
|
+
> & {
|
|
11
|
+
/**
|
|
12
|
+
* Title for the wizard.
|
|
13
|
+
*/
|
|
14
|
+
title: string;
|
|
15
|
+
/**
|
|
16
|
+
* Shows the summary button.
|
|
17
|
+
*/
|
|
18
|
+
hasSummary: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* An object containing all the labels for the wizard header.
|
|
21
|
+
*/
|
|
22
|
+
labels: {
|
|
23
|
+
/**
|
|
24
|
+
* Summary button label.
|
|
25
|
+
*/
|
|
26
|
+
summary: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Current tab to check if it's last page or first to disable previous button and swap between next and submit button.
|
|
30
|
+
*/
|
|
31
|
+
tab: number;
|
|
32
|
+
/**
|
|
33
|
+
* Function to change the tab when pressing previous and next buttons.
|
|
34
|
+
*/
|
|
35
|
+
changeTab: any;
|
|
36
|
+
/**
|
|
37
|
+
* Custom object to define type, size and width of the StepNavigation component
|
|
38
|
+
*/
|
|
39
|
+
customStep?: Pick<HvStepNavigationProps, "type" | "stepSize" | "width">
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default function HvWizardTitle(props: HvWizardTitleProps): JSX.Element | null;
|