@hitachivantara/uikit-react-lab 3.52.1 → 3.53.0
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 +58 -0
- package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +130 -0
- package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/Step/Step.d.ts +27 -0
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js +189 -0
- package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
- package/dist/StepNavigation/DefaultNavigation/Step/index.js +16 -0
- package/dist/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/Step/styles.js +53 -0
- package/dist/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/index.d.ts +2 -0
- package/dist/StepNavigation/DefaultNavigation/index.js +16 -0
- package/dist/StepNavigation/DefaultNavigation/index.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/styles.js +16 -0
- package/dist/StepNavigation/DefaultNavigation/styles.js.map +1 -0
- package/dist/StepNavigation/DefaultNavigation/utils.js +49 -0
- package/dist/StepNavigation/DefaultNavigation/utils.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +163 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/index.js +16 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/styles.js +28 -0
- package/dist/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +133 -0
- package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/index.d.ts +2 -0
- package/dist/StepNavigation/SimpleNavigation/index.js +16 -0
- package/dist/StepNavigation/SimpleNavigation/index.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/styles.js +16 -0
- package/dist/StepNavigation/SimpleNavigation/styles.js.map +1 -0
- package/dist/StepNavigation/SimpleNavigation/utils.js +31 -0
- package/dist/StepNavigation/SimpleNavigation/utils.js.map +1 -0
- package/dist/StepNavigation/StepNavigation.d.ts +42 -0
- package/dist/StepNavigation/StepNavigation.js +377 -0
- package/dist/StepNavigation/StepNavigation.js.map +1 -0
- package/dist/StepNavigation/index.d.ts +2 -0
- package/dist/StepNavigation/index.js +16 -0
- package/dist/StepNavigation/index.js.map +1 -0
- package/dist/StepNavigation/styles.js +41 -0
- package/dist/StepNavigation/styles.js.map +1 -0
- package/dist/StepNavigation/utils.js +15 -0
- package/dist/StepNavigation/utils.js.map +1 -0
- package/dist/Tag/Tag.d.ts +2 -21
- package/dist/index.d.ts +3 -0
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js +112 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.d.ts +27 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +169 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js +2 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js +45 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/index.d.ts +2 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/index.js +2 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/index.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/styles.js +8 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/styles.js.map +1 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/utils.js +41 -0
- package/dist/legacy/StepNavigation/DefaultNavigation/utils.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +122 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js +2 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js +21 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js +113 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/index.d.ts +2 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/index.js +2 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/index.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/styles.js +8 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/styles.js.map +1 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/utils.js +22 -0
- package/dist/legacy/StepNavigation/SimpleNavigation/utils.js.map +1 -0
- package/dist/legacy/StepNavigation/StepNavigation.d.ts +42 -0
- package/dist/legacy/StepNavigation/StepNavigation.js +341 -0
- package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -0
- package/dist/legacy/StepNavigation/index.d.ts +2 -0
- package/dist/legacy/StepNavigation/index.js +2 -0
- package/dist/legacy/StepNavigation/index.js.map +1 -0
- package/dist/legacy/StepNavigation/styles.js +33 -0
- package/dist/legacy/StepNavigation/styles.js.map +1 -0
- package/dist/legacy/StepNavigation/utils.js +6 -0
- package/dist/legacy/StepNavigation/utils.js.map +1 -0
- package/dist/legacy/Tag/Tag.d.ts +2 -21
- package/dist/legacy/index.d.ts +3 -0
- package/dist/legacy/index.js +1 -0
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
- package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js +111 -0
- package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.d.ts +27 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +168 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js +2 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js +43 -0
- package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/index.d.ts +2 -0
- package/dist/modern/StepNavigation/DefaultNavigation/index.js +2 -0
- package/dist/modern/StepNavigation/DefaultNavigation/index.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/styles.js +6 -0
- package/dist/modern/StepNavigation/DefaultNavigation/styles.js.map +1 -0
- package/dist/modern/StepNavigation/DefaultNavigation/utils.js +41 -0
- package/dist/modern/StepNavigation/DefaultNavigation/utils.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +111 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js +2 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js +21 -0
- package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
- package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js +110 -0
- package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/index.d.ts +2 -0
- package/dist/modern/StepNavigation/SimpleNavigation/index.js +2 -0
- package/dist/modern/StepNavigation/SimpleNavigation/index.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/styles.js +6 -0
- package/dist/modern/StepNavigation/SimpleNavigation/styles.js.map +1 -0
- package/dist/modern/StepNavigation/SimpleNavigation/utils.js +22 -0
- package/dist/modern/StepNavigation/SimpleNavigation/utils.js.map +1 -0
- package/dist/modern/StepNavigation/StepNavigation.d.ts +42 -0
- package/dist/modern/StepNavigation/StepNavigation.js +324 -0
- package/dist/modern/StepNavigation/StepNavigation.js.map +1 -0
- package/dist/modern/StepNavigation/index.d.ts +2 -0
- package/dist/modern/StepNavigation/index.js +2 -0
- package/dist/modern/StepNavigation/index.js.map +1 -0
- package/dist/modern/StepNavigation/styles.js +31 -0
- package/dist/modern/StepNavigation/styles.js.map +1 -0
- package/dist/modern/StepNavigation/utils.js +6 -0
- package/dist/modern/StepNavigation/utils.js.map +1 -0
- package/dist/modern/Tag/Tag.d.ts +2 -21
- package/dist/modern/index.d.ts +3 -0
- package/dist/modern/index.js +1 -0
- package/dist/modern/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
require("core-js/modules/es.object.keys.js");
|
|
4
|
+
|
|
5
|
+
require("core-js/modules/es.symbol.js");
|
|
6
|
+
|
|
7
|
+
require("core-js/modules/es.array.filter.js");
|
|
8
|
+
|
|
9
|
+
require("core-js/modules/es.object.to-string.js");
|
|
10
|
+
|
|
11
|
+
require("core-js/modules/es.object.get-own-property-descriptor.js");
|
|
12
|
+
|
|
13
|
+
require("core-js/modules/web.dom-collections.for-each.js");
|
|
14
|
+
|
|
15
|
+
require("core-js/modules/es.object.get-own-property-descriptors.js");
|
|
16
|
+
|
|
17
|
+
require("core-js/modules/es.array.iterator.js");
|
|
18
|
+
|
|
19
|
+
require("core-js/modules/es.string.iterator.js");
|
|
20
|
+
|
|
21
|
+
require("core-js/modules/es.weak-map.js");
|
|
22
|
+
|
|
23
|
+
require("core-js/modules/web.dom-collections.iterator.js");
|
|
24
|
+
|
|
25
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
26
|
+
|
|
27
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
28
|
+
|
|
29
|
+
Object.defineProperty(exports, "__esModule", {
|
|
30
|
+
value: true
|
|
31
|
+
});
|
|
32
|
+
exports.default = void 0;
|
|
33
|
+
|
|
34
|
+
require("core-js/modules/es.string.includes.js");
|
|
35
|
+
|
|
36
|
+
require("core-js/modules/es.array.includes.js");
|
|
37
|
+
|
|
38
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
39
|
+
|
|
40
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
41
|
+
|
|
42
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
43
|
+
|
|
44
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
45
|
+
|
|
46
|
+
var _uikitReactCore = require("@hitachivantara/uikit-react-core");
|
|
47
|
+
|
|
48
|
+
var _core = require("@material-ui/core");
|
|
49
|
+
|
|
50
|
+
var _utils = require("../utils");
|
|
51
|
+
|
|
52
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
53
|
+
|
|
54
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
55
|
+
|
|
56
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
57
|
+
|
|
58
|
+
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; }
|
|
59
|
+
|
|
60
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Step element of "Simple" Step Navigation root component
|
|
64
|
+
*/
|
|
65
|
+
var HvDot = function HvDot(_ref) {
|
|
66
|
+
var classes = _ref.classes,
|
|
67
|
+
className = _ref.className,
|
|
68
|
+
state = _ref.state,
|
|
69
|
+
title = _ref.title,
|
|
70
|
+
size = _ref.size,
|
|
71
|
+
onClick = _ref.onClick;
|
|
72
|
+
var dotSize = _utils.dotSizes[size] * (state === "Current" ? 1.5 : 1);
|
|
73
|
+
var getBackgroundColor = (0, _react.useCallback)(function (theme) {
|
|
74
|
+
return state === "Disabled" ? (0, _utils.disabledColor)(theme) : (0, _utils.defaultColor)(theme);
|
|
75
|
+
}, [state]);
|
|
76
|
+
var customClasses = (0, _react.useMemo)(function () {
|
|
77
|
+
return (0, _core.makeStyles)(function (theme) {
|
|
78
|
+
var backgroundColor = getBackgroundColor(theme);
|
|
79
|
+
return {
|
|
80
|
+
ghostDisabled: {},
|
|
81
|
+
active: {},
|
|
82
|
+
ghost: _objectSpread(_objectSpread({}, _styles.default.ghost), {}, {
|
|
83
|
+
width: dotSize,
|
|
84
|
+
height: dotSize,
|
|
85
|
+
backgroundColor: backgroundColor,
|
|
86
|
+
"&$ghostDisabled": _objectSpread(_objectSpread({}, _styles.default.ghost["&$ghostDisabled"]), {}, {
|
|
87
|
+
backgroundColor: backgroundColor
|
|
88
|
+
}),
|
|
89
|
+
"&$ghostDisabled&:hover": _objectSpread(_objectSpread({}, _styles.default.ghost["&$ghostDisabled&:hover"]), {}, {
|
|
90
|
+
backgroundColor: backgroundColor
|
|
91
|
+
})
|
|
92
|
+
})
|
|
93
|
+
};
|
|
94
|
+
});
|
|
95
|
+
}, [dotSize, getBackgroundColor])();
|
|
96
|
+
return /*#__PURE__*/_react.default.createElement(_uikitReactCore.HvButton, {
|
|
97
|
+
className: (0, _clsx.default)(classes.root, customClasses.ghost, className, "Current Disabled".includes(state) && customClasses.ghostDisabled, state === "Current" && customClasses.active),
|
|
98
|
+
"aria-label": "step-".concat(title),
|
|
99
|
+
icon: true,
|
|
100
|
+
overrideIconColors: false,
|
|
101
|
+
disabled: ["Current", "Disabled"].includes(state),
|
|
102
|
+
onClick: onClick
|
|
103
|
+
}, []);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
process.env.NODE_ENV !== "production" ? HvDot.propTypes = {
|
|
107
|
+
/**
|
|
108
|
+
* Class names to be applied.
|
|
109
|
+
*/
|
|
110
|
+
className: _propTypes.default.string,
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* A Jss Object used to override or extend the styles applied.
|
|
114
|
+
*/
|
|
115
|
+
classes: _propTypes.default.shape({
|
|
116
|
+
/**
|
|
117
|
+
* Styles applied to the component root class.
|
|
118
|
+
*/
|
|
119
|
+
root: _propTypes.default.string,
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Styles applied to the active class.
|
|
123
|
+
*/
|
|
124
|
+
active: _propTypes.default.string,
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Styles applied to the ghost class.
|
|
128
|
+
*/
|
|
129
|
+
ghost: _propTypes.default.string,
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Styles applied to the ghostDisabled class.
|
|
133
|
+
*/
|
|
134
|
+
ghostDisabled: _propTypes.default.string
|
|
135
|
+
}).isRequired,
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}
|
|
139
|
+
*/
|
|
140
|
+
state: _propTypes.default.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired,
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Title of the step.
|
|
144
|
+
*/
|
|
145
|
+
title: _propTypes.default.string.isRequired,
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Sets one of the standard sizes of the steps
|
|
149
|
+
*/
|
|
150
|
+
size: _propTypes.default.oneOf(["XS", "SM", "MD", "LG", "XL"]).isRequired,
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Event onClick of the step.
|
|
154
|
+
*/
|
|
155
|
+
onClick: _propTypes.default.func
|
|
156
|
+
} : void 0;
|
|
157
|
+
|
|
158
|
+
var _default = (0, _core.withStyles)(_styles.default, {
|
|
159
|
+
name: "HvDot"
|
|
160
|
+
})(HvDot);
|
|
161
|
+
|
|
162
|
+
exports.default = _default;
|
|
163
|
+
//# sourceMappingURL=Dot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dot.js","names":["HvDot","classes","className","state","title","size","onClick","dotSize","dotSizes","getBackgroundColor","useCallback","theme","disabledColor","defaultColor","customClasses","useMemo","makeStyles","backgroundColor","ghostDisabled","active","ghost","styles","width","height","clsx","root","includes","propTypes","PropTypes","string","shape","isRequired","oneOf","func","withStyles","name"],"sources":["../../../../src/StepNavigation/SimpleNavigation/Dot/Dot.js"],"sourcesContent":["import React, { useCallback, useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { HvButton } from \"@hitachivantara/uikit-react-core\";\nimport { makeStyles, withStyles } from \"@material-ui/core\";\n\nimport { defaultColor, disabledColor, dotSizes } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Simple\" Step Navigation root component\n */\nconst HvDot = ({ classes, className, state, title, size, onClick }) => {\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n const getBackgroundColor = useCallback(\n (theme) => (state === \"Disabled\" ? disabledColor(theme) : defaultColor(theme)),\n [state]\n );\n const customClasses = useMemo(\n () =>\n makeStyles((theme) => {\n const backgroundColor = getBackgroundColor(theme);\n return {\n ghostDisabled: {},\n active: {},\n ghost: {\n ...styles.ghost,\n width: dotSize,\n height: dotSize,\n backgroundColor,\n \"&$ghostDisabled\": {\n ...styles.ghost[\"&$ghostDisabled\"],\n backgroundColor,\n },\n \"&$ghostDisabled&:hover\": {\n ...styles.ghost[\"&$ghostDisabled&:hover\"],\n backgroundColor,\n },\n },\n };\n }),\n [dotSize, getBackgroundColor]\n )();\n return (\n <HvButton\n className={clsx(\n classes.root,\n customClasses.ghost,\n {\n [customClasses.active]: state === \"Current\",\n [customClasses.ghostDisabled]: [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={[\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n\nHvDot.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 * Styles applied to the active class.\n */\n active: PropTypes.string,\n /**\n * Styles applied to the ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n }).isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"}\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\"]).isRequired,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n};\n\nexport default withStyles(styles, { name: \"HvDot\" })(HvDot);\n"],"mappings":";;;;;;;;;;;;;;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AAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDD,UArCtC;;EAsChB;AACF;AACA;EACEzB,OAAO,EAAEsB,kBAAA,CAAUK;AAzCH,CAAlB;;eA4Ce,IAAAC,gBAAA,EAAWb,eAAX,EAAmB;EAAEc,IAAI,EAAE;AAAR,CAAnB,EAAsCnC,KAAtC,C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _Dot.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
var _Dot = _interopRequireDefault(require("./Dot"));
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/StepNavigation/SimpleNavigation/Dot/index.js"],"sourcesContent":["export { default } from \"./Dot\";\n"],"mappings":";;;;;;;;;;;;;;AAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var styles = {
|
|
8
|
+
root: {
|
|
9
|
+
borderRadius: "50%",
|
|
10
|
+
zIndex: 1
|
|
11
|
+
},
|
|
12
|
+
ghostDisabled: {},
|
|
13
|
+
active: {},
|
|
14
|
+
ghost: {
|
|
15
|
+
"&:hover": {
|
|
16
|
+
backgroundColor: "transparent"
|
|
17
|
+
},
|
|
18
|
+
"&$active": {
|
|
19
|
+
cursor: "default"
|
|
20
|
+
},
|
|
21
|
+
"&$active&:hover": {
|
|
22
|
+
cursor: "default"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
var _default = styles;
|
|
27
|
+
exports.default = _default;
|
|
28
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","root","borderRadius","zIndex","ghostDisabled","active","ghost","backgroundColor","cursor"],"sources":["../../../../src/StepNavigation/SimpleNavigation/Dot/styles.js"],"sourcesContent":["const styles = {\n root: {\n borderRadius: \"50%\",\n zIndex: 1,\n },\n ghostDisabled: {},\n active: {},\n ghost: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n \"&$active\": {\n cursor: \"default\",\n },\n \"&$active&:hover\": {\n cursor: \"default\",\n },\n },\n};\n\nexport default styles;\n"],"mappings":";;;;;;AAAA,IAAMA,MAAM,GAAG;EACbC,IAAI,EAAE;IACJC,YAAY,EAAE,KADV;IAEJC,MAAM,EAAE;EAFJ,CADO;EAKbC,aAAa,EAAE,EALF;EAMbC,MAAM,EAAE,EANK;EAObC,KAAK,EAAE;IACL,WAAW;MACTC,eAAe,EAAE;IADR,CADN;IAIL,YAAY;MACVC,MAAM,EAAE;IADE,CAJP;IAOL,mBAAmB;MACjBA,MAAM,EAAE;IADS;EAPd;AAPM,CAAf;eAoBeR,M"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
|
|
4
|
+
import { HvStepNavigationProps } from "../StepNavigation";
|
|
5
|
+
import { HvDotProps } from "./Dot";
|
|
6
|
+
|
|
7
|
+
export type HvSimpleNavigationClassKey = "root";
|
|
8
|
+
|
|
9
|
+
export type ComponentChildProps = {
|
|
10
|
+
stepsWidth: number;
|
|
11
|
+
navWidth: number;
|
|
12
|
+
separatorValues: {
|
|
13
|
+
minWidth: number;
|
|
14
|
+
maxWidth: number;
|
|
15
|
+
getColor: (state: HvDotProps["state"]) => any;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
18
|
+
stepValues: {
|
|
19
|
+
minSize: number;
|
|
20
|
+
maxSize: number;
|
|
21
|
+
StepComponent: React.ComponentType<HvDotProps>;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export type HvSimpleNavigationProps = StandardProps<
|
|
26
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
27
|
+
HvSimpleNavigationClassKey
|
|
28
|
+
> &
|
|
29
|
+
Pick<HvStepNavigationProps, "stepSize"> & {
|
|
30
|
+
/**
|
|
31
|
+
* Number of steps to show on the component.
|
|
32
|
+
*/
|
|
33
|
+
numSteps: number;
|
|
34
|
+
/**
|
|
35
|
+
* Returns a JSX.element of the titles container.
|
|
36
|
+
*/
|
|
37
|
+
getTitles: (
|
|
38
|
+
getTitleProps?: (params: {
|
|
39
|
+
state: HvDotProps["state"];
|
|
40
|
+
rawTitle: string;
|
|
41
|
+
number: number;
|
|
42
|
+
}) => { variant: string; title: string }
|
|
43
|
+
) => JSX.Element | null;
|
|
44
|
+
/**
|
|
45
|
+
* Returns dynamic width values of the component (width, titleWidth, separatorWidth).
|
|
46
|
+
*/
|
|
47
|
+
getDynamicValues: (stepsWidth: number) => {
|
|
48
|
+
width: number;
|
|
49
|
+
titleWidth: number;
|
|
50
|
+
separatorWidth: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}
|
|
54
|
+
*/
|
|
55
|
+
children: React.FunctionComponent<ComponentChildProps>;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default function HvSimpleNavigation(props: HvSimpleNavigationProps): JSX.Element | null;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
require("core-js/modules/es.array.includes.js");
|
|
11
|
+
|
|
12
|
+
require("core-js/modules/es.array.concat.js");
|
|
13
|
+
|
|
14
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
+
|
|
16
|
+
var _react = _interopRequireDefault(require("react"));
|
|
17
|
+
|
|
18
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
19
|
+
|
|
20
|
+
var _core = require("@material-ui/core");
|
|
21
|
+
|
|
22
|
+
var _Dot = _interopRequireDefault(require("./Dot"));
|
|
23
|
+
|
|
24
|
+
var _utils = require("./utils");
|
|
25
|
+
|
|
26
|
+
var _styles = _interopRequireDefault(require("./styles"));
|
|
27
|
+
|
|
28
|
+
var _excluded = ["numSteps", "stepSize", "getTitles", "getDynamicValues", "children"];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Simple Navigation
|
|
32
|
+
*/
|
|
33
|
+
var HvSimpleNavigation = function HvSimpleNavigation(_ref) {
|
|
34
|
+
var numSteps = _ref.numSteps,
|
|
35
|
+
stepSize = _ref.stepSize,
|
|
36
|
+
getTitles = _ref.getTitles,
|
|
37
|
+
getDynamicValues = _ref.getDynamicValues,
|
|
38
|
+
children = _ref.children,
|
|
39
|
+
other = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
40
|
+
var theme = (0, _core.useTheme)(); // step values
|
|
41
|
+
|
|
42
|
+
var dotSize = _utils.dotSizes[stepSize];
|
|
43
|
+
var StepComponent = _Dot.default; //
|
|
44
|
+
|
|
45
|
+
var stepsWidth = (numSteps + 0.5) * dotSize;
|
|
46
|
+
|
|
47
|
+
var _getDynamicValues = getDynamicValues(stepsWidth),
|
|
48
|
+
width = _getDynamicValues.width,
|
|
49
|
+
titleWidth = _getDynamicValues.titleWidth,
|
|
50
|
+
separatorWidth = _getDynamicValues.separatorWidth; // separator values
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
var getColor = function getColor(state) {
|
|
54
|
+
return ["Current", "Disabled"].includes(state) ? (0, _utils.disabledColor)(theme) : (0, _utils.defaultColor)(theme);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
var maxWidth = Math.max(titleWidth - dotSize, separatorWidth);
|
|
58
|
+
var minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth); //
|
|
59
|
+
|
|
60
|
+
var Steps = children;
|
|
61
|
+
var titles = getTitles(function (_ref2) {
|
|
62
|
+
var rawTitle = _ref2.rawTitle,
|
|
63
|
+
number = _ref2.number;
|
|
64
|
+
return {
|
|
65
|
+
title: "".concat(number, ". ").concat(rawTitle),
|
|
66
|
+
titleWidth: titleWidth
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
return /*#__PURE__*/_react.default.createElement("div", other, titles, /*#__PURE__*/_react.default.createElement(Steps, {
|
|
70
|
+
stepsWidth: stepsWidth,
|
|
71
|
+
navWidth: width,
|
|
72
|
+
separatorValues: {
|
|
73
|
+
minWidth: minWidth,
|
|
74
|
+
maxWidth: maxWidth,
|
|
75
|
+
getColor: getColor,
|
|
76
|
+
height: 2
|
|
77
|
+
},
|
|
78
|
+
stepValues: {
|
|
79
|
+
minSize: dotSize,
|
|
80
|
+
maxSize: 1.5 * dotSize,
|
|
81
|
+
StepComponent: StepComponent
|
|
82
|
+
}
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
process.env.NODE_ENV !== "production" ? HvSimpleNavigation.propTypes = {
|
|
87
|
+
/**
|
|
88
|
+
* Class names to be applied.
|
|
89
|
+
*/
|
|
90
|
+
className: _propTypes.default.string,
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* A Jss Object used to override or extend the styles applied.
|
|
94
|
+
*/
|
|
95
|
+
classes: _propTypes.default.shape({
|
|
96
|
+
/**
|
|
97
|
+
* Styles applied to the component root class.
|
|
98
|
+
*/
|
|
99
|
+
root: _propTypes.default.string
|
|
100
|
+
}).isRequired,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Number of steps to show on the component.
|
|
104
|
+
*/
|
|
105
|
+
numSteps: _propTypes.default.number.isRequired,
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Sets one of the standard sizes of the steps
|
|
109
|
+
*/
|
|
110
|
+
stepSize: _propTypes.default.oneOf(["XS", "SM", "MD", "LG", "XL"]).isRequired,
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Returns dynamic width values of the component (width, titleWidth, separatorWidth).
|
|
114
|
+
*/
|
|
115
|
+
getDynamicValues: _propTypes.default.func.isRequired,
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns a JSX.element of the titles container.
|
|
119
|
+
*/
|
|
120
|
+
getTitles: _propTypes.default.func.isRequired,
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}
|
|
124
|
+
*/
|
|
125
|
+
children: _propTypes.default.elementType.isRequired
|
|
126
|
+
} : void 0;
|
|
127
|
+
|
|
128
|
+
var _default = (0, _core.withStyles)(_styles.default, {
|
|
129
|
+
name: "HvSimpleNavigation"
|
|
130
|
+
})(HvSimpleNavigation);
|
|
131
|
+
|
|
132
|
+
exports.default = _default;
|
|
133
|
+
//# sourceMappingURL=SimpleNavigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SimpleNavigation.js","names":["HvSimpleNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","other","theme","useTheme","dotSize","dotSizes","StepComponent","HvDot","stepsWidth","width","titleWidth","separatorWidth","getColor","state","includes","disabledColor","defaultColor","maxWidth","Math","max","minWidth","Steps","titles","rawTitle","number","title","navWidth","separatorValues","height","stepValues","minSize","maxSize","propTypes","className","PropTypes","string","classes","shape","root","isRequired","oneOf","func","elementType","withStyles","styles","name"],"sources":["../../../src/StepNavigation/SimpleNavigation/SimpleNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\n\nimport { useTheme, withStyles } from \"@material-ui/core\";\n\nimport HvDot from \"./Dot\";\nimport { defaultColor, disabledColor, dotSizes } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Simple Navigation\n */\nconst HvSimpleNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n children,\n ...other\n}) => {\n const theme = useTheme();\n\n // step values\n const dotSize = dotSizes[stepSize];\n const StepComponent = HvDot;\n //\n\n const stepsWidth = (numSteps + 0.5) * dotSize;\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const getColor = (state) =>\n [\"Current\", \"Disabled\"].includes(state) ? disabledColor(theme) : defaultColor(theme);\n const maxWidth = Math.max(titleWidth - dotSize, separatorWidth);\n const minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ rawTitle, number }) => ({\n title: `${number}. ${rawTitle}`,\n titleWidth,\n }));\n\n return (\n <div {...other}>\n {titles}\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: 2,\n },\n stepValues: {\n minSize: dotSize,\n maxSize: 1.5 * dotSize,\n StepComponent,\n },\n }}\n />\n </div>\n );\n};\n\nHvSimpleNavigation.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 }).isRequired,\n /**\n * Number of steps to show on the component.\n */\n numSteps: PropTypes.number.isRequired,\n /**\n * Sets one of the standard sizes of the steps\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]).isRequired,\n /**\n * Returns dynamic width values of the component (width, titleWidth, separatorWidth).\n */\n getDynamicValues: PropTypes.func.isRequired,\n /**\n * Returns a JSX.element of the titles container.\n */\n getTitles: PropTypes.func.isRequired,\n /**\n * Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}\n */\n children: PropTypes.elementType.isRequired,\n};\n\nexport default withStyles(styles, { name: \"HvSimpleNavigation\" })(HvSimpleNavigation);\n"],"mappings":";;;;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAEA;;AACA;;AACA;;;;AAEA;AACA;AACA;AACA,IAAMA,kBAAkB,GAAG,SAArBA,kBAAqB,OAOrB;EAAA,IANJC,QAMI,QANJA,QAMI;EAAA,IALJC,QAKI,QALJA,QAKI;EAAA,IAJJC,SAII,QAJJA,SAII;EAAA,IAHJC,gBAGI,QAHJA,gBAGI;EAAA,IAFJC,QAEI,QAFJA,QAEI;EAAA,IADDC,KACC;EACJ,IAAMC,KAAK,GAAG,IAAAC,cAAA,GAAd,CADI,CAGJ;;EACA,IAAMC,OAAO,GAAGC,eAAA,CAASR,QAAT,CAAhB;EACA,IAAMS,aAAa,GAAGC,YAAtB,CALI,CAMJ;;EAEA,IAAMC,UAAU,GAAG,CAACZ,QAAQ,GAAG,GAAZ,IAAmBQ,OAAtC;;EACA,wBAA8CL,gBAAgB,CAACS,UAAD,CAA9D;EAAA,IAAQC,KAAR,qBAAQA,KAAR;EAAA,IAAeC,UAAf,qBAAeA,UAAf;EAAA,IAA2BC,cAA3B,qBAA2BA,cAA3B,CATI,CAWJ;;;EACA,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD;IAAA,OACf,CAAC,SAAD,EAAY,UAAZ,EAAwBC,QAAxB,CAAiCD,KAAjC,IAA0C,IAAAE,oBAAA,EAAcb,KAAd,CAA1C,GAAiE,IAAAc,mBAAA,EAAad,KAAb,CADlD;EAAA,CAAjB;;EAEA,IAAMe,QAAQ,GAAGC,IAAI,CAACC,GAAL,CAAST,UAAU,GAAGN,OAA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B,EAAyB,IAAzB,CAAhB,EAAgDD,UArB7B;;EAsB7B;AACF;AACA;EACExC,gBAAgB,EAAEmC,kBAAA,CAAUO,IAAV,CAAeF,UAzBJ;;EA0B7B;AACF;AACA;EACEzC,SAAS,EAAEoC,kBAAA,CAAUO,IAAV,CAAeF,UA7BG;;EA8B7B;AACF;AACA;EACEvC,QAAQ,EAAEkC,kBAAA,CAAUQ,WAAV,CAAsBH;AAjCH,CAA/B;;eAoCe,IAAAI,gBAAA,EAAWC,eAAX,EAAmB;EAAEC,IAAI,EAAE;AAAR,CAAnB,EAAmDlD,kBAAnD,C"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _SimpleNavigation.default;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
var _SimpleNavigation = _interopRequireDefault(require("./SimpleNavigation"));
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/StepNavigation/SimpleNavigation/index.js"],"sourcesContent":["export { default } from \"./SimpleNavigation\";\n"],"mappings":";;;;;;;;;;;;;;AAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var styles = function styles() {
|
|
9
|
+
return {
|
|
10
|
+
root: {}
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
var _default = styles;
|
|
15
|
+
exports.default = _default;
|
|
16
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","root"],"sources":["../../../src/StepNavigation/SimpleNavigation/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;;eAIeD,M"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.dotSizes = exports.disabledColor = exports.defaultColor = void 0;
|
|
7
|
+
var dotSizes = {
|
|
8
|
+
XS: 8,
|
|
9
|
+
SM: 10,
|
|
10
|
+
MD: 12,
|
|
11
|
+
LG: 14,
|
|
12
|
+
XL: 16
|
|
13
|
+
};
|
|
14
|
+
exports.dotSizes = dotSizes;
|
|
15
|
+
|
|
16
|
+
var defaultColor = function defaultColor(theme) {
|
|
17
|
+
var _theme$hv, _theme$hv$palette, _theme$hv$palette$acc;
|
|
18
|
+
|
|
19
|
+
return theme === null || theme === void 0 ? void 0 : (_theme$hv = theme.hv) === null || _theme$hv === void 0 ? void 0 : (_theme$hv$palette = _theme$hv.palette) === null || _theme$hv$palette === void 0 ? void 0 : (_theme$hv$palette$acc = _theme$hv$palette.accent) === null || _theme$hv$palette$acc === void 0 ? void 0 : _theme$hv$palette$acc.acce1;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
exports.defaultColor = defaultColor;
|
|
23
|
+
|
|
24
|
+
var disabledColor = function disabledColor(theme) {
|
|
25
|
+
var _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$at;
|
|
26
|
+
|
|
27
|
+
return theme === null || theme === void 0 ? void 0 : (_theme$hv2 = theme.hv) === null || _theme$hv2 === void 0 ? void 0 : (_theme$hv2$palette = _theme$hv2.palette) === null || _theme$hv2$palette === void 0 ? void 0 : (_theme$hv2$palette$at = _theme$hv2$palette.atmosphere) === null || _theme$hv2$palette$at === void 0 ? void 0 : _theme$hv2$palette$at.atmo5;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
exports.disabledColor = disabledColor;
|
|
31
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":["dotSizes","XS","SM","MD","LG","XL","defaultColor","theme","hv","palette","accent","acce1","disabledColor","atmosphere","atmo5"],"sources":["../../../src/StepNavigation/SimpleNavigation/utils.js"],"sourcesContent":["const dotSizes = {\n XS: 8,\n SM: 10,\n MD: 12,\n LG: 14,\n XL: 16,\n};\n\nconst defaultColor = (theme) => theme?.hv?.palette?.accent?.acce1;\nconst disabledColor = (theme) => theme?.hv?.palette?.atmosphere?.atmo5;\n\nexport { dotSizes, defaultColor, disabledColor };\n"],"mappings":";;;;;;AAAA,IAAMA,QAAQ,GAAG;EACfC,EAAE,EAAE,CADW;EAEfC,EAAE,EAAE,EAFW;EAGfC,EAAE,EAAE,EAHW;EAIfC,EAAE,EAAE,EAJW;EAKfC,EAAE,EAAE;AALW,CAAjB;;;AAQA,IAAMC,YAAY,GAAG,SAAfA,YAAe,CAACC,KAAD;EAAA;;EAAA,OAAWA,KAAX,aAAWA,KAAX,oCAAWA,KAAK,CAAEC,EAAlB,mEAAW,UAAWC,OAAtB,+EAAW,kBAAoBC,MAA/B,0DAAW,sBAA4BC,KAAvC;AAAA,CAArB;;;;AACA,IAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACL,KAAD;EAAA;;EAAA,OAAWA,KAAX,aAAWA,KAAX,qCAAWA,KAAK,CAAEC,EAAlB,qEAAW,WAAWC,OAAtB,gFAAW,mBAAoBI,UAA/B,0DAAW,sBAAgCC,KAA3C;AAAA,CAAtB"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { StandardProps } from "@material-ui/core";
|
|
3
|
+
import { HvStepProps } from "./DefaultNavigation/Step/Step";
|
|
4
|
+
|
|
5
|
+
export type HvStepNavigationClassKey = "root";
|
|
6
|
+
|
|
7
|
+
export type HvStepNavigationProps = StandardProps<
|
|
8
|
+
React.HTMLAttributes<HTMLDivElement>,
|
|
9
|
+
HvStepNavigationClassKey
|
|
10
|
+
> & {
|
|
11
|
+
/**
|
|
12
|
+
* Type of step navigation. Values = {"Simple", "Default"}
|
|
13
|
+
*/
|
|
14
|
+
type: "Simple" | "Default";
|
|
15
|
+
/**
|
|
16
|
+
* Steps to show on the component.
|
|
17
|
+
*/
|
|
18
|
+
steps: Array<Pick<HvStepProps, "state" | "title" | "onClick" | "className">> & {
|
|
19
|
+
/**
|
|
20
|
+
* Class names to override styles on the separator component after the step.
|
|
21
|
+
*/
|
|
22
|
+
separatorClassName: string;
|
|
23
|
+
/**
|
|
24
|
+
* Class names to override styles on the title component above the step.
|
|
25
|
+
*/
|
|
26
|
+
titleClassName: string;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Sets one of the standard sizes of the steps
|
|
30
|
+
*/
|
|
31
|
+
stepSize?: "XS" | "SM" | "MD" | "LG" | "XL";
|
|
32
|
+
/**
|
|
33
|
+
* Width of the component element.
|
|
34
|
+
*/
|
|
35
|
+
width?: number;
|
|
36
|
+
/**
|
|
37
|
+
* Defines either show a title or only a tooltip on each step component
|
|
38
|
+
*/
|
|
39
|
+
showTitles?: boolean;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export default function HvStepNavigation(props: HvStepNavigationProps): JSX.Element | null;
|