@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,21 @@
1
+ var styles = {
2
+ root: {
3
+ borderRadius: "50%",
4
+ zIndex: 1
5
+ },
6
+ ghostDisabled: {},
7
+ active: {},
8
+ ghost: {
9
+ "&:hover": {
10
+ backgroundColor: "transparent"
11
+ },
12
+ "&$active": {
13
+ cursor: "default"
14
+ },
15
+ "&$active&:hover": {
16
+ cursor: "default"
17
+ }
18
+ }
19
+ };
20
+ export default styles;
21
+ //# 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;AAoBA,eAAeR,MAAf"}
@@ -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,113 @@
1
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
2
+ var _excluded = ["numSteps", "stepSize", "getTitles", "getDynamicValues", "children"];
3
+ import "core-js/modules/es.array.includes.js";
4
+ import "core-js/modules/es.array.concat.js";
5
+ import React from "react";
6
+ import PropTypes from "prop-types";
7
+ import { useTheme, withStyles } from "@material-ui/core";
8
+ import HvDot from "./Dot";
9
+ import { defaultColor, disabledColor, dotSizes } from "./utils";
10
+ import styles from "./styles";
11
+ /**
12
+ * Simple Navigation
13
+ */
14
+
15
+ var HvSimpleNavigation = function HvSimpleNavigation(_ref) {
16
+ var numSteps = _ref.numSteps,
17
+ stepSize = _ref.stepSize,
18
+ getTitles = _ref.getTitles,
19
+ getDynamicValues = _ref.getDynamicValues,
20
+ children = _ref.children,
21
+ other = _objectWithoutProperties(_ref, _excluded);
22
+
23
+ var theme = useTheme(); // step values
24
+
25
+ var dotSize = dotSizes[stepSize];
26
+ var StepComponent = HvDot; //
27
+
28
+ var stepsWidth = (numSteps + 0.5) * dotSize;
29
+
30
+ var _getDynamicValues = getDynamicValues(stepsWidth),
31
+ width = _getDynamicValues.width,
32
+ titleWidth = _getDynamicValues.titleWidth,
33
+ separatorWidth = _getDynamicValues.separatorWidth; // separator values
34
+
35
+
36
+ var getColor = function getColor(state) {
37
+ return ["Current", "Disabled"].includes(state) ? disabledColor(theme) : defaultColor(theme);
38
+ };
39
+
40
+ var maxWidth = Math.max(titleWidth - dotSize, separatorWidth);
41
+ var minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth); //
42
+
43
+ var Steps = children;
44
+ var titles = getTitles(function (_ref2) {
45
+ var rawTitle = _ref2.rawTitle,
46
+ number = _ref2.number;
47
+ return {
48
+ title: "".concat(number, ". ").concat(rawTitle),
49
+ titleWidth: titleWidth
50
+ };
51
+ });
52
+ return /*#__PURE__*/React.createElement("div", other, titles, /*#__PURE__*/React.createElement(Steps, {
53
+ stepsWidth: stepsWidth,
54
+ navWidth: width,
55
+ separatorValues: {
56
+ minWidth: minWidth,
57
+ maxWidth: maxWidth,
58
+ getColor: getColor,
59
+ height: 2
60
+ },
61
+ stepValues: {
62
+ minSize: dotSize,
63
+ maxSize: 1.5 * dotSize,
64
+ StepComponent: StepComponent
65
+ }
66
+ }));
67
+ };
68
+
69
+ process.env.NODE_ENV !== "production" ? HvSimpleNavigation.propTypes = {
70
+ /**
71
+ * Class names to be applied.
72
+ */
73
+ className: PropTypes.string,
74
+
75
+ /**
76
+ * A Jss Object used to override or extend the styles applied.
77
+ */
78
+ classes: PropTypes.shape({
79
+ /**
80
+ * Styles applied to the component root class.
81
+ */
82
+ root: PropTypes.string
83
+ }).isRequired,
84
+
85
+ /**
86
+ * Number of steps to show on the component.
87
+ */
88
+ numSteps: PropTypes.number.isRequired,
89
+
90
+ /**
91
+ * Sets one of the standard sizes of the steps
92
+ */
93
+ stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]).isRequired,
94
+
95
+ /**
96
+ * Returns dynamic width values of the component (width, titleWidth, separatorWidth).
97
+ */
98
+ getDynamicValues: PropTypes.func.isRequired,
99
+
100
+ /**
101
+ * Returns a JSX.element of the titles container.
102
+ */
103
+ getTitles: PropTypes.func.isRequired,
104
+
105
+ /**
106
+ * Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth}
107
+ */
108
+ children: PropTypes.elementType.isRequired
109
+ } : void 0;
110
+ export default withStyles(styles, {
111
+ name: "HvSimpleNavigation"
112
+ })(HvSimpleNavigation);
113
+ //# sourceMappingURL=SimpleNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SimpleNavigation.js","names":["React","PropTypes","useTheme","withStyles","HvDot","defaultColor","disabledColor","dotSizes","styles","HvSimpleNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","other","theme","dotSize","StepComponent","stepsWidth","width","titleWidth","separatorWidth","getColor","state","includes","maxWidth","Math","max","minWidth","Steps","titles","rawTitle","number","title","navWidth","separatorValues","height","stepValues","minSize","maxSize","propTypes","className","string","classes","shape","root","isRequired","oneOf","func","elementType","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":"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"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./SimpleNavigation";
2
+ export * from "./SimpleNavigation";
@@ -0,0 +1,2 @@
1
+ export { default } from "./SimpleNavigation";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/StepNavigation/SimpleNavigation/index.js"],"sourcesContent":["export { default } from \"./SimpleNavigation\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,oBAAxB"}
@@ -0,0 +1,8 @@
1
+ var styles = function styles() {
2
+ return {
3
+ root: {}
4
+ };
5
+ };
6
+
7
+ export default styles;
8
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","root"],"sources":["../../../../src/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;;AAIA,eAAeD,MAAf"}
@@ -0,0 +1,22 @@
1
+ var dotSizes = {
2
+ XS: 8,
3
+ SM: 10,
4
+ MD: 12,
5
+ LG: 14,
6
+ XL: 16
7
+ };
8
+
9
+ var defaultColor = function defaultColor(theme) {
10
+ var _theme$hv, _theme$hv$palette, _theme$hv$palette$acc;
11
+
12
+ 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;
13
+ };
14
+
15
+ var disabledColor = function disabledColor(theme) {
16
+ var _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$at;
17
+
18
+ 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;
19
+ };
20
+
21
+ export { dotSizes, defaultColor, disabledColor };
22
+ //# 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;;AAEA,SAASd,QAAT,EAAmBM,YAAnB,EAAiCM,aAAjC"}
@@ -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;
@@ -0,0 +1,341 @@
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 _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
8
+ import _extends from "@babel/runtime/helpers/esm/extends";
9
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
11
+ var _excluded = ["className", "classes", "width", "steps", "stepSize", "showTitles", "type"],
12
+ _excluded2 = ["state", "title", "separatorClassName"],
13
+ _excluded3 = ["stepsWidth", "navWidth"];
14
+
15
+ 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; }
16
+
17
+ 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; }
18
+
19
+ import "core-js/modules/es.array.includes.js";
20
+ import "core-js/modules/es.object.to-string.js";
21
+ import "core-js/modules/es.array.concat.js";
22
+ import "core-js/modules/es.string.includes.js";
23
+ import "core-js/modules/es.number.constructor.js";
24
+ import "core-js/modules/es.array.find.js";
25
+ import "core-js/modules/es.array.iterator.js";
26
+ import "core-js/modules/web.dom-collections.iterator.js";
27
+ import "core-js/modules/es.array.map.js";
28
+ import React from "react";
29
+ import PropTypes from "prop-types";
30
+ import clsx from "clsx";
31
+ import { withStyles, Typography, styled, useTheme } from "@material-ui/core";
32
+ import { HvTooltip, HvTypography, useWidth } from "@hitachivantara/uikit-react-core";
33
+ import HvDefaultNavigation from "./DefaultNavigation";
34
+ import HvSimpleNavigation from "./SimpleNavigation";
35
+ import { SEPARATOR_WIDTH, TITLE_MARGIN, TITLE_WIDTH } from "./utils";
36
+ import styles from "./styles";
37
+ /**
38
+ * Navigation page with steps.
39
+ *
40
+ * You need to define the <b>steps<b/> displayed on the component so that itself can be drawn on the UI.
41
+ * On each step, you need to define a <b>state</b> - 'Pending', 'Failed', 'Completed', 'Current', 'Disabled' -
42
+ * and a <b>title</b> to be shown as a tooltip or a text above of the step. You can also:
43
+ * * Define a <b>className</b> on each step element;
44
+ * * Define a <b>separatorClassName</b> to specify a className for the separator element. The default height
45
+ * values of the separator element are 2px/3px on 'Simple'/'Default' layouts respectively;
46
+ * * Define a <b>titleClassName</b> to specify a className for the title above each step element.
47
+ *
48
+ * For the root element, you can:
49
+ * * Define a <b>className</b>;
50
+ * * Choose a <b>type</b> of layout: 'Simple' or 'Default';
51
+ * * Choose the <b>stepSize</b> of the step component: "XS", "SM", "MD", "LG", "XL". The default size will be
52
+ * correspondent to the current media breakpoint;
53
+ * * Choose either you want to <b>showTitles</b> near to each step component or a tootlip on hover;
54
+ * * Define a <b>width</b> of the component. If you don't define any value and the step component has no title
55
+ * displayed above, the width of the separator element;
56
+ * will be 100px. If the step component has titles, each one will have 215px of width by default.
57
+ */
58
+
59
+ var HvStepNavigation = function HvStepNavigation(_ref) {
60
+ var className = _ref.className,
61
+ classes = _ref.classes,
62
+ width = _ref.width,
63
+ steps = _ref.steps,
64
+ stepSize = _ref.stepSize,
65
+ showTitles = _ref.showTitles,
66
+ _ref$type = _ref.type,
67
+ type = _ref$type === void 0 ? "Default" : _ref$type,
68
+ others = _objectWithoutProperties(_ref, _excluded);
69
+
70
+ var theme = useTheme(); // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'
71
+
72
+ var breakpoint = useWidth(); // step configurations
73
+
74
+ var stepSizeKey = stepSize !== null && stepSize !== void 0 ? stepSize : ["xs", "sm"].includes(breakpoint) ? "SM" : "MD";
75
+ var hasTitles = showTitles !== null && showTitles !== void 0 ? showTitles : !["xs", "sm"].includes(breakpoint);
76
+
77
+ var styledLi = function styledLi(containerSize) {
78
+ return styled("li")({
79
+ width: containerSize,
80
+ height: containerSize
81
+ });
82
+ };
83
+
84
+ var styledDiv = function styledDiv(containerSize) {
85
+ return styled("div")({
86
+ width: containerSize,
87
+ height: containerSize
88
+ });
89
+ };
90
+
91
+ var styledSeparatorElement = function styledSeparatorElement(title, separatorClassName, separatorHeight, separatorWidth, backgroundColor) {
92
+ var Separator = withStyles({
93
+ separatorElement: {
94
+ height: separatorHeight,
95
+ width: separatorWidth,
96
+ backgroundColor: backgroundColor
97
+ }
98
+ })(function (_ref2) {
99
+ var separatorElement = _ref2.classes.separatorElement;
100
+ return /*#__PURE__*/React.createElement("div", {
101
+ "aria-label": "separator-".concat(title),
102
+ className: clsx(separatorElement, separatorClassName)
103
+ });
104
+ });
105
+ return /*#__PURE__*/React.createElement("li", {
106
+ "aria-hidden": true,
107
+ key: "separator-".concat(title),
108
+ className: classes.separator
109
+ }, /*#__PURE__*/React.createElement(Separator, null));
110
+ };
111
+
112
+ var drawItems = function drawItems(_ref3) {
113
+ var _ref3$separatorValues = _ref3.separatorValues,
114
+ minWidth = _ref3$separatorValues.minWidth,
115
+ maxWidth = _ref3$separatorValues.maxWidth,
116
+ getColor = _ref3$separatorValues.getColor,
117
+ height = _ref3$separatorValues.height,
118
+ _ref3$stepValues = _ref3.stepValues,
119
+ minSize = _ref3$stepValues.minSize,
120
+ maxSize = _ref3$stepValues.maxSize,
121
+ StepComponent = _ref3$stepValues.StepComponent;
122
+ var items = steps.reduce(function (acc, _ref4, index) {
123
+ var state = _ref4.state,
124
+ title = _ref4.title,
125
+ separatorClassName = _ref4.separatorClassName,
126
+ props = _objectWithoutProperties(_ref4, _excluded2);
127
+
128
+ var containerSize = state === "Current" ? maxSize : minSize;
129
+ var StepContainer = styledLi(containerSize);
130
+ var Step = styledDiv(Math.max(containerSize, 30), Math.max(containerSize, 30));
131
+
132
+ var stepProps = _objectSpread({}, _objectSpread({
133
+ size: stepSizeKey,
134
+ state: state,
135
+ title: title,
136
+ number: index + 1
137
+ }, props));
138
+
139
+ var stepElement = /*#__PURE__*/React.createElement(StepContainer, {
140
+ key: "step-".concat(title),
141
+ className: classes.li
142
+ }, hasTitles ? /*#__PURE__*/React.createElement(StepComponent, _extends({
143
+ "aria-label": "step-".concat(title)
144
+ }, stepProps)) : /*#__PURE__*/React.createElement(HvTooltip, {
145
+ placement: "bottom",
146
+ title: /*#__PURE__*/React.createElement(HvTypography, null, "".concat(index + 1, ". ").concat(title))
147
+ }, /*#__PURE__*/React.createElement("div", {
148
+ "aria-label": "step-container-".concat(title)
149
+ }, /*#__PURE__*/React.createElement(Step, {
150
+ className: classes.li
151
+ }, /*#__PURE__*/React.createElement(StepComponent, _extends({
152
+ "aria-label": "step-".concat(title)
153
+ }, stepProps))))));
154
+
155
+ if (index < steps.length - 1) {
156
+ var separatorElement = styledSeparatorElement(title, separatorClassName, height, [steps[index + 1].state, state].includes("Current") ? minWidth : maxWidth, getColor(state));
157
+ return [].concat(_toConsumableArray(acc), [stepElement, separatorElement]);
158
+ }
159
+
160
+ return [].concat(_toConsumableArray(acc), [stepElement]);
161
+ }, []);
162
+ return /*#__PURE__*/React.createElement("ol", {
163
+ className: classes.ol
164
+ }, items);
165
+ };
166
+
167
+ var getDynamicValues = function getDynamicValues(stepsWidth) {
168
+ var _theme$breakpoints$va, _theme$breakpoints$va2;
169
+
170
+ var 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);
171
+ var next = theme.breakpoints.keys.find(function (_, index, self) {
172
+ return index - 1 >= 0 ? self[index - 1] === breakpoint : false;
173
+ });
174
+ var 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);
175
+ var titleWidth = Number(hasTitles) * Math.ceil((navWidth + TITLE_MARGIN) / steps.length);
176
+ var separatorWidth = Number(!hasTitles) * Math.ceil((navWidth - stepsWidth) / (steps.length - 1));
177
+ return {
178
+ width: navWidth,
179
+ titleWidth: titleWidth,
180
+ separatorWidth: separatorWidth
181
+ };
182
+ };
183
+
184
+ var styledTitle = function styledTitle(titleClassName, variant, title, titleWidth) {
185
+ return withStyles({
186
+ stepTitle: {
187
+ textAlign: "center",
188
+ width: titleWidth - TITLE_MARGIN,
189
+ marginRight: TITLE_MARGIN
190
+ }
191
+ })(function (_ref5) {
192
+ var stepTitle = _ref5.classes.stepTitle;
193
+ return title ? /*#__PURE__*/React.createElement(HvTypography, {
194
+ variant: variant,
195
+ className: clsx(stepTitle, titleClassName)
196
+ }, title) : null;
197
+ });
198
+ };
199
+
200
+ var getTitles = function getTitles(getTitleProps) {
201
+ return hasTitles ? /*#__PURE__*/React.createElement("div", {
202
+ className: classes.titles
203
+ }, steps.map(function (_ref6, index) {
204
+ var rawTitle = _ref6.title,
205
+ state = _ref6.state,
206
+ titleClassName = _ref6.titleClassName;
207
+
208
+ var _getTitleProps = getTitleProps({
209
+ state: state,
210
+ rawTitle: rawTitle,
211
+ number: index + 1
212
+ }),
213
+ _getTitleProps$varian = _getTitleProps.variant,
214
+ variant = _getTitleProps$varian === void 0 ? "highlightText" : _getTitleProps$varian,
215
+ _getTitleProps$title = _getTitleProps.title,
216
+ title = _getTitleProps$title === void 0 ? rawTitle : _getTitleProps$title,
217
+ _getTitleProps$titleW = _getTitleProps.titleWidth,
218
+ titleWidth = _getTitleProps$titleW === void 0 ? 0 : _getTitleProps$titleW;
219
+
220
+ var Title = styledTitle(titleClassName, variant, title, titleWidth);
221
+ return /*#__PURE__*/React.createElement(Title, {
222
+ key: "step-title-".concat(rawTitle)
223
+ });
224
+ })) : null;
225
+ };
226
+
227
+ var StepNavigation = {
228
+ Default: HvDefaultNavigation,
229
+ Simple: HvSimpleNavigation
230
+ }[type];
231
+ return /*#__PURE__*/React.createElement(StepNavigation, _objectSpread({
232
+ stepSize: stepSizeKey,
233
+ numSteps: steps.length,
234
+ getTitles: getTitles,
235
+ getDynamicValues: getDynamicValues,
236
+ className: clsx(className, classes.root)
237
+ }, others), function (_ref7) {
238
+ var stepsWidth = _ref7.stepsWidth,
239
+ navWidth = _ref7.navWidth,
240
+ itemsProps = _objectWithoutProperties(_ref7, _excluded3);
241
+
242
+ return /*#__PURE__*/React.createElement(Typography, {
243
+ component: "nav",
244
+ style: {
245
+ width: "".concat(navWidth, "px"),
246
+ margin: 0
247
+ }
248
+ }, drawItems(itemsProps));
249
+ });
250
+ };
251
+
252
+ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
253
+ /**
254
+ * Class names to be applied.
255
+ */
256
+ className: PropTypes.string,
257
+
258
+ /**
259
+ * A Jss Object used to override or extend the styles applied.
260
+ */
261
+ classes: PropTypes.shape({
262
+ /**
263
+ * Styles applied to the component root class.
264
+ */
265
+ root: PropTypes.string,
266
+
267
+ /**
268
+ * Styles applied to the li element.
269
+ */
270
+ li: PropTypes.string,
271
+
272
+ /**
273
+ * Styles applied to the ol element.
274
+ */
275
+ ol: PropTypes.string,
276
+
277
+ /**
278
+ * Styles applied to the separator element.
279
+ */
280
+ separator: PropTypes.string,
281
+
282
+ /**
283
+ * Styles applied to the titles container element.
284
+ */
285
+ titles: PropTypes.string
286
+ }).isRequired,
287
+
288
+ /**
289
+ * Type of step navigation. Values = {"Simple", "Default"}.
290
+ */
291
+ type: PropTypes.oneOf(["Simple", "Default"]),
292
+
293
+ /**
294
+ * Steps to show on the component.
295
+ */
296
+ steps: PropTypes.arrayOf(PropTypes.shape({
297
+ /**
298
+ * Class names to override styles on the step component.
299
+ */
300
+ className: PropTypes.string,
301
+
302
+ /**
303
+ * Class names to override styles on the separator component after the step.
304
+ */
305
+ separatorClassName: PropTypes.string,
306
+
307
+ /**
308
+ * Class names to override styles on the title component above the step.
309
+ */
310
+ titleClassName: PropTypes.string,
311
+
312
+ /**
313
+ * Title of the step.
314
+ */
315
+ title: PropTypes.string.isRequired,
316
+
317
+ /**
318
+ * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}.
319
+ */
320
+ state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired
321
+ })).isRequired,
322
+
323
+ /**
324
+ * Sets one of the standard sizes of the steps. Values = {"XS", "SM", "MD", "LG", "XL"}
325
+ */
326
+ stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
327
+
328
+ /**
329
+ * Width of the component.
330
+ */
331
+ width: PropTypes.number,
332
+
333
+ /**
334
+ * Defines either show a title or only a tooltip on each step component
335
+ */
336
+ showTitles: PropTypes.bool
337
+ } : void 0;
338
+ export default withStyles(styles, {
339
+ name: "HvStepNavigation"
340
+ })(HvStepNavigation);
341
+ //# sourceMappingURL=StepNavigation.js.map