@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.
Files changed (151) hide show
  1. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
  2. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +130 -0
  3. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
  4. package/dist/StepNavigation/DefaultNavigation/Step/Step.d.ts +27 -0
  5. package/dist/StepNavigation/DefaultNavigation/Step/Step.js +189 -0
  6. package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
  7. package/dist/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
  8. package/dist/StepNavigation/DefaultNavigation/Step/index.js +16 -0
  9. package/dist/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
  10. package/dist/StepNavigation/DefaultNavigation/Step/styles.js +53 -0
  11. package/dist/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
  12. package/dist/StepNavigation/DefaultNavigation/index.d.ts +2 -0
  13. package/dist/StepNavigation/DefaultNavigation/index.js +16 -0
  14. package/dist/StepNavigation/DefaultNavigation/index.js.map +1 -0
  15. package/dist/StepNavigation/DefaultNavigation/styles.js +16 -0
  16. package/dist/StepNavigation/DefaultNavigation/styles.js.map +1 -0
  17. package/dist/StepNavigation/DefaultNavigation/utils.js +49 -0
  18. package/dist/StepNavigation/DefaultNavigation/utils.js.map +1 -0
  19. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
  20. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +163 -0
  21. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
  22. package/dist/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
  23. package/dist/StepNavigation/SimpleNavigation/Dot/index.js +16 -0
  24. package/dist/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
  25. package/dist/StepNavigation/SimpleNavigation/Dot/styles.js +28 -0
  26. package/dist/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
  27. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
  28. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +133 -0
  29. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
  30. package/dist/StepNavigation/SimpleNavigation/index.d.ts +2 -0
  31. package/dist/StepNavigation/SimpleNavigation/index.js +16 -0
  32. package/dist/StepNavigation/SimpleNavigation/index.js.map +1 -0
  33. package/dist/StepNavigation/SimpleNavigation/styles.js +16 -0
  34. package/dist/StepNavigation/SimpleNavigation/styles.js.map +1 -0
  35. package/dist/StepNavigation/SimpleNavigation/utils.js +31 -0
  36. package/dist/StepNavigation/SimpleNavigation/utils.js.map +1 -0
  37. package/dist/StepNavigation/StepNavigation.d.ts +42 -0
  38. package/dist/StepNavigation/StepNavigation.js +377 -0
  39. package/dist/StepNavigation/StepNavigation.js.map +1 -0
  40. package/dist/StepNavigation/index.d.ts +2 -0
  41. package/dist/StepNavigation/index.js +16 -0
  42. package/dist/StepNavigation/index.js.map +1 -0
  43. package/dist/StepNavigation/styles.js +41 -0
  44. package/dist/StepNavigation/styles.js.map +1 -0
  45. package/dist/StepNavigation/utils.js +15 -0
  46. package/dist/StepNavigation/utils.js.map +1 -0
  47. package/dist/Tag/Tag.d.ts +2 -21
  48. package/dist/index.d.ts +3 -0
  49. package/dist/index.js +10 -1
  50. package/dist/index.js.map +1 -1
  51. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
  52. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js +112 -0
  53. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
  54. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.d.ts +27 -0
  55. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +169 -0
  56. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
  57. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
  58. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js +2 -0
  59. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
  60. package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js +45 -0
  61. package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
  62. package/dist/legacy/StepNavigation/DefaultNavigation/index.d.ts +2 -0
  63. package/dist/legacy/StepNavigation/DefaultNavigation/index.js +2 -0
  64. package/dist/legacy/StepNavigation/DefaultNavigation/index.js.map +1 -0
  65. package/dist/legacy/StepNavigation/DefaultNavigation/styles.js +8 -0
  66. package/dist/legacy/StepNavigation/DefaultNavigation/styles.js.map +1 -0
  67. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js +41 -0
  68. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js.map +1 -0
  69. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
  70. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +122 -0
  71. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
  72. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
  73. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js +2 -0
  74. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
  75. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js +21 -0
  76. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
  77. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
  78. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js +113 -0
  79. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
  80. package/dist/legacy/StepNavigation/SimpleNavigation/index.d.ts +2 -0
  81. package/dist/legacy/StepNavigation/SimpleNavigation/index.js +2 -0
  82. package/dist/legacy/StepNavigation/SimpleNavigation/index.js.map +1 -0
  83. package/dist/legacy/StepNavigation/SimpleNavigation/styles.js +8 -0
  84. package/dist/legacy/StepNavigation/SimpleNavigation/styles.js.map +1 -0
  85. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js +22 -0
  86. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js.map +1 -0
  87. package/dist/legacy/StepNavigation/StepNavigation.d.ts +42 -0
  88. package/dist/legacy/StepNavigation/StepNavigation.js +341 -0
  89. package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -0
  90. package/dist/legacy/StepNavigation/index.d.ts +2 -0
  91. package/dist/legacy/StepNavigation/index.js +2 -0
  92. package/dist/legacy/StepNavigation/index.js.map +1 -0
  93. package/dist/legacy/StepNavigation/styles.js +33 -0
  94. package/dist/legacy/StepNavigation/styles.js.map +1 -0
  95. package/dist/legacy/StepNavigation/utils.js +6 -0
  96. package/dist/legacy/StepNavigation/utils.js.map +1 -0
  97. package/dist/legacy/Tag/Tag.d.ts +2 -21
  98. package/dist/legacy/index.d.ts +3 -0
  99. package/dist/legacy/index.js +1 -0
  100. package/dist/legacy/index.js.map +1 -1
  101. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
  102. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js +111 -0
  103. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
  104. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.d.ts +27 -0
  105. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +168 -0
  106. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
  107. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
  108. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js +2 -0
  109. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
  110. package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js +43 -0
  111. package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
  112. package/dist/modern/StepNavigation/DefaultNavigation/index.d.ts +2 -0
  113. package/dist/modern/StepNavigation/DefaultNavigation/index.js +2 -0
  114. package/dist/modern/StepNavigation/DefaultNavigation/index.js.map +1 -0
  115. package/dist/modern/StepNavigation/DefaultNavigation/styles.js +6 -0
  116. package/dist/modern/StepNavigation/DefaultNavigation/styles.js.map +1 -0
  117. package/dist/modern/StepNavigation/DefaultNavigation/utils.js +41 -0
  118. package/dist/modern/StepNavigation/DefaultNavigation/utils.js.map +1 -0
  119. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
  120. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +111 -0
  121. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
  122. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
  123. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js +2 -0
  124. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
  125. package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js +21 -0
  126. package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
  127. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
  128. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js +110 -0
  129. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
  130. package/dist/modern/StepNavigation/SimpleNavigation/index.d.ts +2 -0
  131. package/dist/modern/StepNavigation/SimpleNavigation/index.js +2 -0
  132. package/dist/modern/StepNavigation/SimpleNavigation/index.js.map +1 -0
  133. package/dist/modern/StepNavigation/SimpleNavigation/styles.js +6 -0
  134. package/dist/modern/StepNavigation/SimpleNavigation/styles.js.map +1 -0
  135. package/dist/modern/StepNavigation/SimpleNavigation/utils.js +22 -0
  136. package/dist/modern/StepNavigation/SimpleNavigation/utils.js.map +1 -0
  137. package/dist/modern/StepNavigation/StepNavigation.d.ts +42 -0
  138. package/dist/modern/StepNavigation/StepNavigation.js +324 -0
  139. package/dist/modern/StepNavigation/StepNavigation.js.map +1 -0
  140. package/dist/modern/StepNavigation/index.d.ts +2 -0
  141. package/dist/modern/StepNavigation/index.js +2 -0
  142. package/dist/modern/StepNavigation/index.js.map +1 -0
  143. package/dist/modern/StepNavigation/styles.js +31 -0
  144. package/dist/modern/StepNavigation/styles.js.map +1 -0
  145. package/dist/modern/StepNavigation/utils.js +6 -0
  146. package/dist/modern/StepNavigation/utils.js.map +1 -0
  147. package/dist/modern/Tag/Tag.d.ts +2 -21
  148. package/dist/modern/index.d.ts +3 -0
  149. package/dist/modern/index.js +1 -0
  150. package/dist/modern/index.js.map +1 -1
  151. package/package.json +3 -3
@@ -0,0 +1,324 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
+ const _excluded = ["className", "classes", "width", "steps", "stepSize", "showTitles", "type"],
5
+ _excluded2 = ["state", "title", "separatorClassName"],
6
+ _excluded3 = ["stepsWidth", "navWidth"];
7
+
8
+ 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; }
9
+
10
+ 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; }
11
+
12
+ import "core-js/modules/es.array.includes.js";
13
+ import "core-js/modules/web.dom-collections.iterator.js";
14
+ import React from "react";
15
+ import PropTypes from "prop-types";
16
+ import clsx from "clsx";
17
+ import { withStyles, Typography, styled, useTheme } from "@material-ui/core";
18
+ import { HvTooltip, HvTypography, useWidth } from "@hitachivantara/uikit-react-core";
19
+ import HvDefaultNavigation from "./DefaultNavigation";
20
+ import HvSimpleNavigation from "./SimpleNavigation";
21
+ import { SEPARATOR_WIDTH, TITLE_MARGIN, TITLE_WIDTH } from "./utils";
22
+ import styles from "./styles";
23
+ /**
24
+ * Navigation page with steps.
25
+ *
26
+ * You need to define the <b>steps<b/> displayed on the component so that itself can be drawn on the UI.
27
+ * On each step, you need to define a <b>state</b> - 'Pending', 'Failed', 'Completed', 'Current', 'Disabled' -
28
+ * and a <b>title</b> to be shown as a tooltip or a text above of the step. You can also:
29
+ * * Define a <b>className</b> on each step element;
30
+ * * Define a <b>separatorClassName</b> to specify a className for the separator element. The default height
31
+ * values of the separator element are 2px/3px on 'Simple'/'Default' layouts respectively;
32
+ * * Define a <b>titleClassName</b> to specify a className for the title above each step element.
33
+ *
34
+ * For the root element, you can:
35
+ * * Define a <b>className</b>;
36
+ * * Choose a <b>type</b> of layout: 'Simple' or 'Default';
37
+ * * Choose the <b>stepSize</b> of the step component: "XS", "SM", "MD", "LG", "XL". The default size will be
38
+ * correspondent to the current media breakpoint;
39
+ * * Choose either you want to <b>showTitles</b> near to each step component or a tootlip on hover;
40
+ * * Define a <b>width</b> of the component. If you don't define any value and the step component has no title
41
+ * displayed above, the width of the separator element;
42
+ * will be 100px. If the step component has titles, each one will have 215px of width by default.
43
+ */
44
+
45
+ const HvStepNavigation = _ref => {
46
+ let {
47
+ className,
48
+ classes,
49
+ width,
50
+ steps,
51
+ stepSize,
52
+ showTitles,
53
+ type = "Default"
54
+ } = _ref,
55
+ others = _objectWithoutProperties(_ref, _excluded);
56
+
57
+ const theme = useTheme(); // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'
58
+
59
+ const breakpoint = useWidth(); // step configurations
60
+
61
+ const stepSizeKey = stepSize !== null && stepSize !== void 0 ? stepSize : ["xs", "sm"].includes(breakpoint) ? "SM" : "MD";
62
+ const hasTitles = showTitles !== null && showTitles !== void 0 ? showTitles : !["xs", "sm"].includes(breakpoint);
63
+
64
+ const styledLi = containerSize => styled("li")({
65
+ width: containerSize,
66
+ height: containerSize
67
+ });
68
+
69
+ const styledDiv = containerSize => styled("div")({
70
+ width: containerSize,
71
+ height: containerSize
72
+ });
73
+
74
+ const styledSeparatorElement = (title, separatorClassName, separatorHeight, separatorWidth, backgroundColor) => {
75
+ const Separator = withStyles({
76
+ separatorElement: {
77
+ height: separatorHeight,
78
+ width: separatorWidth,
79
+ backgroundColor
80
+ }
81
+ })(({
82
+ classes: {
83
+ separatorElement
84
+ }
85
+ }) => /*#__PURE__*/React.createElement("div", {
86
+ "aria-label": `separator-${title}`,
87
+ className: clsx(separatorElement, separatorClassName)
88
+ }));
89
+ return /*#__PURE__*/React.createElement("li", {
90
+ "aria-hidden": true,
91
+ key: `separator-${title}`,
92
+ className: classes.separator
93
+ }, /*#__PURE__*/React.createElement(Separator, null));
94
+ };
95
+
96
+ const drawItems = ({
97
+ separatorValues: {
98
+ minWidth,
99
+ maxWidth,
100
+ getColor,
101
+ height
102
+ },
103
+ stepValues: {
104
+ minSize,
105
+ maxSize,
106
+ StepComponent
107
+ }
108
+ }) => {
109
+ const items = steps.reduce((acc, _ref2, index) => {
110
+ let {
111
+ state,
112
+ title,
113
+ separatorClassName
114
+ } = _ref2,
115
+ props = _objectWithoutProperties(_ref2, _excluded2);
116
+
117
+ const containerSize = state === "Current" ? maxSize : minSize;
118
+ const StepContainer = styledLi(containerSize);
119
+ const Step = styledDiv(Math.max(containerSize, 30), Math.max(containerSize, 30));
120
+
121
+ const stepProps = _objectSpread({}, _objectSpread({
122
+ size: stepSizeKey,
123
+ state,
124
+ title,
125
+ number: index + 1
126
+ }, props));
127
+
128
+ const stepElement = /*#__PURE__*/React.createElement(StepContainer, {
129
+ key: `step-${title}`,
130
+ className: classes.li
131
+ }, hasTitles ? /*#__PURE__*/React.createElement(StepComponent, _extends({
132
+ "aria-label": `step-${title}`
133
+ }, stepProps)) : /*#__PURE__*/React.createElement(HvTooltip, {
134
+ placement: "bottom",
135
+ title: /*#__PURE__*/React.createElement(HvTypography, null, `${index + 1}. ${title}`)
136
+ }, /*#__PURE__*/React.createElement("div", {
137
+ "aria-label": `step-container-${title}`
138
+ }, /*#__PURE__*/React.createElement(Step, {
139
+ className: classes.li
140
+ }, /*#__PURE__*/React.createElement(StepComponent, _extends({
141
+ "aria-label": `step-${title}`
142
+ }, stepProps))))));
143
+
144
+ if (index < steps.length - 1) {
145
+ const separatorElement = styledSeparatorElement(title, separatorClassName, height, [steps[index + 1].state, state].includes("Current") ? minWidth : maxWidth, getColor(state));
146
+ return [...acc, stepElement, separatorElement];
147
+ }
148
+
149
+ return [...acc, stepElement];
150
+ }, []);
151
+ return /*#__PURE__*/React.createElement("ol", {
152
+ className: classes.ol
153
+ }, items);
154
+ };
155
+
156
+ const getDynamicValues = stepsWidth => {
157
+ var _theme$breakpoints$va, _theme$breakpoints$va2;
158
+
159
+ const maxWidth = width !== null && width !== void 0 ? width : Math.max(Number(hasTitles) * (TITLE_WIDTH + TITLE_MARGIN) * steps.length - TITLE_MARGIN, SEPARATOR_WIDTH * (steps.length - 1) + stepsWidth);
160
+ const next = theme.breakpoints.keys.find((_, index, self) => index - 1 >= 0 ? self[index - 1] === breakpoint : false);
161
+ const navWidth = Math.min(maxWidth, (_theme$breakpoints$va = (_theme$breakpoints$va2 = theme.breakpoints.values) === null || _theme$breakpoints$va2 === void 0 ? void 0 : _theme$breakpoints$va2[next]) !== null && _theme$breakpoints$va !== void 0 ? _theme$breakpoints$va : maxWidth);
162
+ const titleWidth = Number(hasTitles) * Math.ceil((navWidth + TITLE_MARGIN) / steps.length);
163
+ const separatorWidth = Number(!hasTitles) * Math.ceil((navWidth - stepsWidth) / (steps.length - 1));
164
+ return {
165
+ width: navWidth,
166
+ titleWidth,
167
+ separatorWidth
168
+ };
169
+ };
170
+
171
+ const styledTitle = (titleClassName, variant, title, titleWidth) => withStyles({
172
+ stepTitle: {
173
+ textAlign: "center",
174
+ width: titleWidth - TITLE_MARGIN,
175
+ marginRight: TITLE_MARGIN
176
+ }
177
+ })(({
178
+ classes: {
179
+ stepTitle
180
+ }
181
+ }) => title ? /*#__PURE__*/React.createElement(HvTypography, {
182
+ variant: variant,
183
+ className: clsx(stepTitle, titleClassName)
184
+ }, title) : null);
185
+
186
+ const getTitles = getTitleProps => hasTitles ? /*#__PURE__*/React.createElement("div", {
187
+ className: classes.titles
188
+ }, steps.map(({
189
+ title: rawTitle,
190
+ state,
191
+ titleClassName
192
+ }, index) => {
193
+ const {
194
+ variant = "highlightText",
195
+ title = rawTitle,
196
+ titleWidth = 0
197
+ } = getTitleProps({
198
+ state,
199
+ rawTitle,
200
+ number: index + 1
201
+ });
202
+ const Title = styledTitle(titleClassName, variant, title, titleWidth);
203
+ return /*#__PURE__*/React.createElement(Title, {
204
+ key: `step-title-${rawTitle}`
205
+ });
206
+ })) : null;
207
+
208
+ const StepNavigation = {
209
+ Default: HvDefaultNavigation,
210
+ Simple: HvSimpleNavigation
211
+ }[type];
212
+ return /*#__PURE__*/React.createElement(StepNavigation, _objectSpread({
213
+ stepSize: stepSizeKey,
214
+ numSteps: steps.length,
215
+ getTitles,
216
+ getDynamicValues,
217
+ className: clsx(className, classes.root)
218
+ }, others), _ref3 => {
219
+ let {
220
+ stepsWidth,
221
+ navWidth
222
+ } = _ref3,
223
+ itemsProps = _objectWithoutProperties(_ref3, _excluded3);
224
+
225
+ return /*#__PURE__*/React.createElement(Typography, {
226
+ component: "nav",
227
+ style: {
228
+ width: `${navWidth}px`,
229
+ margin: 0
230
+ }
231
+ }, drawItems(itemsProps));
232
+ });
233
+ };
234
+
235
+ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
236
+ /**
237
+ * Class names to be applied.
238
+ */
239
+ className: PropTypes.string,
240
+
241
+ /**
242
+ * A Jss Object used to override or extend the styles applied.
243
+ */
244
+ classes: PropTypes.shape({
245
+ /**
246
+ * Styles applied to the component root class.
247
+ */
248
+ root: PropTypes.string,
249
+
250
+ /**
251
+ * Styles applied to the li element.
252
+ */
253
+ li: PropTypes.string,
254
+
255
+ /**
256
+ * Styles applied to the ol element.
257
+ */
258
+ ol: PropTypes.string,
259
+
260
+ /**
261
+ * Styles applied to the separator element.
262
+ */
263
+ separator: PropTypes.string,
264
+
265
+ /**
266
+ * Styles applied to the titles container element.
267
+ */
268
+ titles: PropTypes.string
269
+ }).isRequired,
270
+
271
+ /**
272
+ * Type of step navigation. Values = {"Simple", "Default"}.
273
+ */
274
+ type: PropTypes.oneOf(["Simple", "Default"]),
275
+
276
+ /**
277
+ * Steps to show on the component.
278
+ */
279
+ steps: PropTypes.arrayOf(PropTypes.shape({
280
+ /**
281
+ * Class names to override styles on the step component.
282
+ */
283
+ className: PropTypes.string,
284
+
285
+ /**
286
+ * Class names to override styles on the separator component after the step.
287
+ */
288
+ separatorClassName: PropTypes.string,
289
+
290
+ /**
291
+ * Class names to override styles on the title component above the step.
292
+ */
293
+ titleClassName: PropTypes.string,
294
+
295
+ /**
296
+ * Title of the step.
297
+ */
298
+ title: PropTypes.string.isRequired,
299
+
300
+ /**
301
+ * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}.
302
+ */
303
+ state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired
304
+ })).isRequired,
305
+
306
+ /**
307
+ * Sets one of the standard sizes of the steps. Values = {"XS", "SM", "MD", "LG", "XL"}
308
+ */
309
+ stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
310
+
311
+ /**
312
+ * Width of the component.
313
+ */
314
+ width: PropTypes.number,
315
+
316
+ /**
317
+ * Defines either show a title or only a tooltip on each step component
318
+ */
319
+ showTitles: PropTypes.bool
320
+ } : void 0;
321
+ export default withStyles(styles, {
322
+ name: "HvStepNavigation"
323
+ })(HvStepNavigation);
324
+ //# sourceMappingURL=StepNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StepNavigation.js","names":["React","PropTypes","clsx","withStyles","Typography","styled","useTheme","HvTooltip","HvTypography","useWidth","HvDefaultNavigation","HvSimpleNavigation","SEPARATOR_WIDTH","TITLE_MARGIN","TITLE_WIDTH","styles","HvStepNavigation","className","classes","width","steps","stepSize","showTitles","type","others","theme","breakpoint","stepSizeKey","includes","hasTitles","styledLi","containerSize","height","styledDiv","styledSeparatorElement","title","separatorClassName","separatorHeight","separatorWidth","backgroundColor","Separator","separatorElement","separator","drawItems","separatorValues","minWidth","maxWidth","getColor","stepValues","minSize","maxSize","StepComponent","items","reduce","acc","index","state","props","StepContainer","Step","Math","max","stepProps","size","number","stepElement","li","length","ol","getDynamicValues","stepsWidth","Number","next","breakpoints","keys","find","_","self","navWidth","min","values","titleWidth","ceil","styledTitle","titleClassName","variant","stepTitle","textAlign","marginRight","getTitles","getTitleProps","titles","map","rawTitle","Title","StepNavigation","Default","Simple","numSteps","root","itemsProps","margin","propTypes","string","shape","isRequired","oneOf","arrayOf","bool","name"],"sources":["../../../src/StepNavigation/StepNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles, Typography, styled, useTheme } from \"@material-ui/core\";\nimport { HvTooltip, HvTypography, useWidth } from \"@hitachivantara/uikit-react-core\";\n\nimport HvDefaultNavigation from \"./DefaultNavigation\";\nimport HvSimpleNavigation from \"./SimpleNavigation\";\nimport { SEPARATOR_WIDTH, TITLE_MARGIN, TITLE_WIDTH } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Navigation page with steps.\n *\n * You need to define the <b>steps<b/> displayed on the component so that itself can be drawn on the UI.\n * On each step, you need to define a <b>state</b> - 'Pending', 'Failed', 'Completed', 'Current', 'Disabled' -\n * and a <b>title</b> to be shown as a tooltip or a text above of the step. You can also:\n * * Define a <b>className</b> on each step element;\n * * Define a <b>separatorClassName</b> to specify a className for the separator element. The default height\n * values of the separator element are 2px/3px on 'Simple'/'Default' layouts respectively;\n * * Define a <b>titleClassName</b> to specify a className for the title above each step element.\n *\n * For the root element, you can:\n * * Define a <b>className</b>;\n * * Choose a <b>type</b> of layout: 'Simple' or 'Default';\n * * Choose the <b>stepSize</b> of the step component: \"XS\", \"SM\", \"MD\", \"LG\", \"XL\". The default size will be\n * correspondent to the current media breakpoint;\n * * Choose either you want to <b>showTitles</b> near to each step component or a tootlip on hover;\n * * Define a <b>width</b> of the component. If you don't define any value and the step component has no title\n * displayed above, the width of the separator element;\n * will be 100px. If the step component has titles, each one will have 215px of width by default.\n */\nconst HvStepNavigation = ({\n className,\n classes,\n width,\n steps,\n stepSize,\n showTitles,\n type = \"Default\",\n ...others\n}) => {\n const theme = useTheme();\n // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n const breakpoint = useWidth();\n // step configurations\n const stepSizeKey = stepSize ?? ([\"xs\", \"sm\"].includes(breakpoint) ? \"SM\" : \"MD\");\n const hasTitles = showTitles ?? ![\"xs\", \"sm\"].includes(breakpoint);\n\n const styledLi = (containerSize) =>\n styled(\"li\")({\n width: containerSize,\n height: containerSize,\n });\n\n const styledDiv = (containerSize) =>\n styled(\"div\")({\n width: containerSize,\n height: containerSize,\n });\n\n const styledSeparatorElement = (\n title,\n separatorClassName,\n separatorHeight,\n separatorWidth,\n backgroundColor\n ) => {\n const Separator = withStyles({\n separatorElement: {\n height: separatorHeight,\n width: separatorWidth,\n backgroundColor,\n },\n })(({ classes: { separatorElement } }) => (\n <div\n aria-label={`separator-${title}`}\n className={clsx(separatorElement, separatorClassName)}\n />\n ));\n return (\n <li aria-hidden key={`separator-${title}`} className={classes.separator}>\n <Separator />\n </li>\n );\n };\n\n const drawItems = ({\n separatorValues: { minWidth, maxWidth, getColor, height },\n stepValues: { minSize, maxSize, StepComponent },\n }) => {\n const items = steps.reduce((acc, { state, title, separatorClassName, ...props }, index) => {\n const containerSize = state === \"Current\" ? maxSize : minSize;\n const StepContainer = styledLi(containerSize);\n const Step = styledDiv(Math.max(containerSize, 30), Math.max(containerSize, 30));\n const stepProps = {\n ...{\n size: stepSizeKey,\n state,\n title,\n number: index + 1,\n ...props,\n },\n };\n const stepElement = (\n <StepContainer key={`step-${title}`} className={classes.li}>\n {hasTitles ? (\n <StepComponent aria-label={`step-${title}`} {...stepProps} />\n ) : (\n <HvTooltip\n placement=\"bottom\"\n title={<HvTypography>{`${index + 1}. ${title}`}</HvTypography>}\n >\n <div aria-label={`step-container-${title}`}>\n <Step className={classes.li}>\n <StepComponent aria-label={`step-${title}`} {...stepProps} />\n </Step>\n </div>\n </HvTooltip>\n )}\n </StepContainer>\n );\n if (index < steps.length - 1) {\n const separatorElement = styledSeparatorElement(\n title,\n separatorClassName,\n height,\n [steps[index + 1].state, state].includes(\"Current\") ? minWidth : maxWidth,\n getColor(state)\n );\n return [...acc, stepElement, separatorElement];\n }\n return [...acc, stepElement];\n }, []);\n\n return <ol className={classes.ol}>{items}</ol>;\n };\n\n const getDynamicValues = (stepsWidth) => {\n const maxWidth =\n width ??\n Math.max(\n Number(hasTitles) * (TITLE_WIDTH + TITLE_MARGIN) * steps.length - TITLE_MARGIN,\n SEPARATOR_WIDTH * (steps.length - 1) + stepsWidth\n );\n const next = theme.breakpoints.keys.find((_, index, self) =>\n index - 1 >= 0 ? self[index - 1] === breakpoint : false\n );\n const navWidth = Math.min(maxWidth, theme.breakpoints.values?.[next] ?? maxWidth);\n const titleWidth = Number(hasTitles) * Math.ceil((navWidth + TITLE_MARGIN) / steps.length);\n const separatorWidth =\n Number(!hasTitles) * Math.ceil((navWidth - stepsWidth) / (steps.length - 1));\n return { width: navWidth, titleWidth, separatorWidth };\n };\n\n const styledTitle = (titleClassName, variant, title, titleWidth) =>\n withStyles({\n stepTitle: {\n textAlign: \"center\",\n width: titleWidth - TITLE_MARGIN,\n marginRight: TITLE_MARGIN,\n },\n })(({ classes: { stepTitle } }) =>\n title ? (\n <HvTypography variant={variant} className={clsx(stepTitle, titleClassName)}>\n {title}\n </HvTypography>\n ) : null\n );\n\n const getTitles = (getTitleProps) =>\n hasTitles ? (\n <div className={classes.titles}>\n {steps.map(({ title: rawTitle, state, titleClassName }, index) => {\n const {\n variant = \"highlightText\",\n title = rawTitle,\n titleWidth = 0,\n } = getTitleProps({\n state,\n rawTitle,\n number: index + 1,\n });\n const Title = styledTitle(titleClassName, variant, title, titleWidth);\n return <Title key={`step-title-${rawTitle}`} />;\n })}\n </div>\n ) : null;\n\n const StepNavigation = {\n Default: HvDefaultNavigation,\n Simple: HvSimpleNavigation,\n }[type];\n\n return (\n <StepNavigation\n {...{\n stepSize: stepSizeKey,\n numSteps: steps.length,\n getTitles,\n getDynamicValues,\n className: clsx(className, classes.root),\n ...others,\n }}\n >\n {({ stepsWidth, navWidth, ...itemsProps }) => (\n <Typography\n component=\"nav\"\n style={{\n width: `${navWidth}px`,\n margin: 0,\n }}\n >\n {drawItems(itemsProps)}\n </Typography>\n )}\n </StepNavigation>\n );\n};\n\nHvStepNavigation.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 li element.\n */\n li: PropTypes.string,\n /**\n * Styles applied to the ol element.\n */\n ol: PropTypes.string,\n /**\n * Styles applied to the separator element.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the titles container element.\n */\n titles: PropTypes.string,\n }).isRequired,\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Steps to show on the component.\n */\n steps: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Class names to override styles on the step component.\n */\n className: PropTypes.string,\n /**\n * Class names to override styles on the separator component after the step.\n */\n separatorClassName: PropTypes.string,\n /**\n * Class names to override styles on the title component above the step.\n */\n titleClassName: PropTypes.string,\n /**\n * Title of the step.\n */\n title: PropTypes.string.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 ).isRequired,\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.\n */\n width: PropTypes.number,\n /**\n * Defines either show a title or only a tooltip on each step component\n */\n showTitles: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvStepNavigation\" })(HvStepNavigation);\n"],"mappings":";;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,EAAqBC,UAArB,EAAiCC,MAAjC,EAAyCC,QAAzC,QAAyD,mBAAzD;AACA,SAASC,SAAT,EAAoBC,YAApB,EAAkCC,QAAlC,QAAkD,kCAAlD;AAEA,OAAOC,mBAAP,MAAgC,qBAAhC;AACA,OAAOC,kBAAP,MAA+B,oBAA/B;AACA,SAASC,eAAT,EAA0BC,YAA1B,EAAwCC,WAAxC,QAA2D,SAA3D;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMC,gBAAgB,GAAG,QASnB;EAAA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IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,CAhEiB;;EAiE3B;AACF;AACA;EACEvF,KAAK,EAAElB,SAAS,CAAC+D,MApEU;;EAqE3B;AACF;AACA;EACE1C,UAAU,EAAErB,SAAS,CAAC2G;AAxEK,CAA7B;AA2EA,eAAezG,UAAU,CAACY,MAAD,EAAS;EAAE8F,IAAI,EAAE;AAAR,CAAT,CAAV,CAAiD7F,gBAAjD,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./StepNavigation";
2
+ export * from "./StepNavigation";
@@ -0,0 +1,2 @@
1
+ export { default } from "./StepNavigation";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../src/StepNavigation/index.js"],"sourcesContent":["export { default } from \"./StepNavigation\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,kBAAxB"}
@@ -0,0 +1,31 @@
1
+ const styles = () => ({
2
+ root: {
3
+ display: "flex",
4
+ flexDirection: "column"
5
+ },
6
+ titles: {
7
+ display: "flex"
8
+ },
9
+ ol: {
10
+ display: "flex",
11
+ alignItems: "center",
12
+ justifyContent: "center",
13
+ flexWrap: "wrap",
14
+ padding: 0,
15
+ listStyle: "none"
16
+ },
17
+ li: {
18
+ display: "flex",
19
+ alignItems: "center",
20
+ justifyContent: "center"
21
+ },
22
+ separator: {
23
+ userSelect: "none",
24
+ "& > div": {
25
+ display: "flex"
26
+ }
27
+ }
28
+ });
29
+
30
+ export default styles;
31
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","root","display","flexDirection","titles","ol","alignItems","justifyContent","flexWrap","padding","listStyle","li","separator","userSelect"],"sources":["../../../src/StepNavigation/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n titles: {\n display: \"flex\",\n },\n ol: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexWrap: \"wrap\",\n padding: 0,\n listStyle: \"none\",\n },\n li: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n separator: {\n userSelect: \"none\",\n \"& > div\": {\n display: \"flex\",\n },\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;EACpBC,IAAI,EAAE;IACJC,OAAO,EAAE,MADL;IAEJC,aAAa,EAAE;EAFX,CADc;EAKpBC,MAAM,EAAE;IACNF,OAAO,EAAE;EADH,CALY;EAQpBG,EAAE,EAAE;IACFH,OAAO,EAAE,MADP;IAEFI,UAAU,EAAE,QAFV;IAGFC,cAAc,EAAE,QAHd;IAIFC,QAAQ,EAAE,MAJR;IAKFC,OAAO,EAAE,CALP;IAMFC,SAAS,EAAE;EANT,CARgB;EAgBpBC,EAAE,EAAE;IACFT,OAAO,EAAE,MADP;IAEFI,UAAU,EAAE,QAFV;IAGFC,cAAc,EAAE;EAHd,CAhBgB;EAqBpBK,SAAS,EAAE;IACTC,UAAU,EAAE,MADH;IAET,WAAW;MACTX,OAAO,EAAE;IADA;EAFF;AArBS,CAAP,CAAf;;AA6BA,eAAeF,MAAf"}
@@ -0,0 +1,6 @@
1
+ const TITLE_MARGIN = 20;
2
+ const TITLE_WIDTH = 215;
3
+ const STEP_MARGIN = 20;
4
+ const SEPARATOR_WIDTH = 100;
5
+ export { STEP_MARGIN, TITLE_MARGIN, TITLE_WIDTH, SEPARATOR_WIDTH };
6
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["TITLE_MARGIN","TITLE_WIDTH","STEP_MARGIN","SEPARATOR_WIDTH"],"sources":["../../../src/StepNavigation/utils.js"],"sourcesContent":["const TITLE_MARGIN = 20;\nconst TITLE_WIDTH = 215;\nconst STEP_MARGIN = 20;\nconst SEPARATOR_WIDTH = 100;\n\nexport { STEP_MARGIN, TITLE_MARGIN, TITLE_WIDTH, SEPARATOR_WIDTH };\n"],"mappings":"AAAA,MAAMA,YAAY,GAAG,EAArB;AACA,MAAMC,WAAW,GAAG,GAApB;AACA,MAAMC,WAAW,GAAG,EAApB;AACA,MAAMC,eAAe,GAAG,GAAxB;AAEA,SAASD,WAAT,EAAsBF,YAAtB,EAAoCC,WAApC,EAAiDE,eAAjD"}
@@ -1,27 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { StandardProps } from "@material-ui/core";
3
+ import { HvSemanticColorKeys } from "@hitachivantara/uikit-react-core";
3
4
 
4
- export type Semantic =
5
- | "sema1"
6
- | "sema2"
7
- | "sema3"
8
- | "sema4"
9
- | "sema5"
10
- | "sema6"
11
- | "sema7"
12
- | "sema8"
13
- | "sema9"
14
- | "sema10"
15
- | "sema11"
16
- | "sema12"
17
- | "sema13"
18
- | "sema14"
19
- | "sema15"
20
- | "sema16"
21
- | "sema17"
22
- | "sema18"
23
- | "sema19"
24
- | "sema20";
5
+ export type Semantic = HvSemanticColorKeys;
25
6
 
26
7
  export type HvTagClassKey =
27
8
  | "label"
@@ -45,3 +45,6 @@ export * from "./DotPagination";
45
45
 
46
46
  export { default as HvControls } from "./Controls";
47
47
  export * from "./Controls";
48
+
49
+ export { default as HvStepNavigation } from "./StepNavigation";
50
+ export * from "./StepNavigation";
@@ -20,4 +20,5 @@ export * from "./QueryBuilder";
20
20
  export { default as HvInlineEditor } from "./InlineEditor";
21
21
  export { default as HvProgressBar } from "./ProgressBar";
22
22
  export { default as HvDotPagination } from "./DotPagination";
23
+ export { default as HvStepNavigation } from "./StepNavigation";
23
24
  //# 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"],"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\";\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"}
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"],"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\";\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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-lab",
3
- "version": "3.52.1",
3
+ "version": "3.53.0",
4
4
  "description": "A collection of contributed React components for the Hitachi Vantara's Design System.",
5
5
  "homepage": "https://github.com/lumada-design/hv-uikit-react",
6
6
  "license": "Apache-2.0",
@@ -41,7 +41,7 @@
41
41
  "react-dom": "^16.13.1 || ^17.0.2"
42
42
  },
43
43
  "dependencies": {
44
- "@hitachivantara/uikit-react-core": "^3.72.0",
44
+ "@hitachivantara/uikit-react-core": "^3.73.1",
45
45
  "@hitachivantara/uikit-react-icons": "^3.9.6",
46
46
  "@types/react-table": "^7.7.12",
47
47
  "clsx": "^1.2.1",
@@ -62,5 +62,5 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
- "gitHead": "684f2a696d99a90295f8905bad512cd1a39a82f8"
65
+ "gitHead": "f8a061de68b72ecbfcd65da3501291f62d3f35cc"
66
66
  }