@hitachivantara/uikit-react-lab 4.0.1-next.0 → 4.0.1-next.3

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 (202) hide show
  1. package/dist/ImageCarousel/ImageCarousel.d.ts +11 -0
  2. package/dist/ImageCarousel/ImageCarousel.js +666 -0
  3. package/dist/ImageCarousel/ImageCarousel.js.map +1 -0
  4. package/dist/ImageCarousel/index.d.ts +2 -0
  5. package/dist/ImageCarousel/index.js +16 -0
  6. package/dist/ImageCarousel/index.js.map +1 -0
  7. package/dist/ImageCarousel/stories/resources/Ahsoka.jpg +0 -0
  8. package/dist/ImageCarousel/stories/resources/AnakinSkywalker.jpg +0 -0
  9. package/dist/ImageCarousel/stories/resources/BobaFett.jpg +0 -0
  10. package/dist/ImageCarousel/stories/resources/DarthVader.jpg +0 -0
  11. package/dist/ImageCarousel/stories/resources/MaceWindu.jpg +0 -0
  12. package/dist/ImageCarousel/stories/resources/ObiWan.png +0 -0
  13. package/dist/ImageCarousel/stories/resources/Panoramic.jpg +0 -0
  14. package/dist/ImageCarousel/stories/resources/Revan.jpg +0 -0
  15. package/dist/ImageCarousel/stories/resources/TheMandalorian.jpg +0 -0
  16. package/dist/ImageCarousel/stories/resources/Yoda.jpg +0 -0
  17. package/dist/ImageCarousel/styles.js +238 -0
  18. package/dist/ImageCarousel/styles.js.map +1 -0
  19. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
  20. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +156 -0
  21. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
  22. package/dist/StepNavigation/DefaultNavigation/Step/Step.d.ts +32 -0
  23. package/dist/StepNavigation/DefaultNavigation/Step/Step.js +201 -0
  24. package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
  25. package/dist/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
  26. package/dist/StepNavigation/DefaultNavigation/Step/index.js +16 -0
  27. package/dist/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
  28. package/dist/StepNavigation/DefaultNavigation/Step/styles.js +53 -0
  29. package/dist/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
  30. package/dist/StepNavigation/DefaultNavigation/index.d.ts +2 -0
  31. package/dist/StepNavigation/DefaultNavigation/index.js +16 -0
  32. package/dist/StepNavigation/DefaultNavigation/index.js.map +1 -0
  33. package/dist/StepNavigation/DefaultNavigation/styles.js +16 -0
  34. package/dist/StepNavigation/DefaultNavigation/styles.js.map +1 -0
  35. package/dist/StepNavigation/DefaultNavigation/utils.js +49 -0
  36. package/dist/StepNavigation/DefaultNavigation/utils.js.map +1 -0
  37. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
  38. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +176 -0
  39. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
  40. package/dist/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
  41. package/dist/StepNavigation/SimpleNavigation/Dot/index.js +16 -0
  42. package/dist/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
  43. package/dist/StepNavigation/SimpleNavigation/Dot/styles.js +25 -0
  44. package/dist/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
  45. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
  46. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +159 -0
  47. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
  48. package/dist/StepNavigation/SimpleNavigation/index.d.ts +2 -0
  49. package/dist/StepNavigation/SimpleNavigation/index.js +16 -0
  50. package/dist/StepNavigation/SimpleNavigation/index.js.map +1 -0
  51. package/dist/StepNavigation/SimpleNavigation/styles.js +16 -0
  52. package/dist/StepNavigation/SimpleNavigation/styles.js.map +1 -0
  53. package/dist/StepNavigation/SimpleNavigation/utils.js +31 -0
  54. package/dist/StepNavigation/SimpleNavigation/utils.js.map +1 -0
  55. package/dist/StepNavigation/StepNavigation.d.ts +43 -0
  56. package/dist/StepNavigation/StepNavigation.js +400 -0
  57. package/dist/StepNavigation/StepNavigation.js.map +1 -0
  58. package/dist/StepNavigation/index.d.ts +2 -0
  59. package/dist/StepNavigation/index.js +16 -0
  60. package/dist/StepNavigation/index.js.map +1 -0
  61. package/dist/StepNavigation/styles.js +41 -0
  62. package/dist/StepNavigation/styles.js.map +1 -0
  63. package/dist/StepNavigation/utils.js +15 -0
  64. package/dist/StepNavigation/utils.js.map +1 -0
  65. package/dist/index.d.ts +6 -0
  66. package/dist/index.js +19 -1
  67. package/dist/index.js.map +1 -1
  68. package/dist/legacy/ImageCarousel/ImageCarousel.d.ts +11 -0
  69. package/dist/legacy/ImageCarousel/ImageCarousel.js +624 -0
  70. package/dist/legacy/ImageCarousel/ImageCarousel.js.map +1 -0
  71. package/dist/legacy/ImageCarousel/index.d.ts +2 -0
  72. package/dist/legacy/ImageCarousel/index.js +2 -0
  73. package/dist/legacy/ImageCarousel/index.js.map +1 -0
  74. package/dist/legacy/ImageCarousel/stories/resources/Ahsoka.jpg +0 -0
  75. package/dist/legacy/ImageCarousel/stories/resources/AnakinSkywalker.jpg +0 -0
  76. package/dist/legacy/ImageCarousel/stories/resources/BobaFett.jpg +0 -0
  77. package/dist/legacy/ImageCarousel/stories/resources/DarthVader.jpg +0 -0
  78. package/dist/legacy/ImageCarousel/stories/resources/MaceWindu.jpg +0 -0
  79. package/dist/legacy/ImageCarousel/stories/resources/ObiWan.png +0 -0
  80. package/dist/legacy/ImageCarousel/stories/resources/Panoramic.jpg +0 -0
  81. package/dist/legacy/ImageCarousel/stories/resources/Revan.jpg +0 -0
  82. package/dist/legacy/ImageCarousel/stories/resources/TheMandalorian.jpg +0 -0
  83. package/dist/legacy/ImageCarousel/stories/resources/Yoda.jpg +0 -0
  84. package/dist/legacy/ImageCarousel/styles.js +228 -0
  85. package/dist/legacy/ImageCarousel/styles.js.map +1 -0
  86. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
  87. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js +131 -0
  88. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
  89. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.d.ts +32 -0
  90. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +181 -0
  91. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
  92. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
  93. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js +2 -0
  94. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
  95. package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js +45 -0
  96. package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
  97. package/dist/legacy/StepNavigation/DefaultNavigation/index.d.ts +2 -0
  98. package/dist/legacy/StepNavigation/DefaultNavigation/index.js +2 -0
  99. package/dist/legacy/StepNavigation/DefaultNavigation/index.js.map +1 -0
  100. package/dist/legacy/StepNavigation/DefaultNavigation/styles.js +8 -0
  101. package/dist/legacy/StepNavigation/DefaultNavigation/styles.js.map +1 -0
  102. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js +41 -0
  103. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js.map +1 -0
  104. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
  105. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +135 -0
  106. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
  107. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
  108. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js +2 -0
  109. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
  110. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js +18 -0
  111. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
  112. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
  113. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js +132 -0
  114. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
  115. package/dist/legacy/StepNavigation/SimpleNavigation/index.d.ts +2 -0
  116. package/dist/legacy/StepNavigation/SimpleNavigation/index.js +2 -0
  117. package/dist/legacy/StepNavigation/SimpleNavigation/index.js.map +1 -0
  118. package/dist/legacy/StepNavigation/SimpleNavigation/styles.js +8 -0
  119. package/dist/legacy/StepNavigation/SimpleNavigation/styles.js.map +1 -0
  120. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js +22 -0
  121. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js.map +1 -0
  122. package/dist/legacy/StepNavigation/StepNavigation.d.ts +43 -0
  123. package/dist/legacy/StepNavigation/StepNavigation.js +364 -0
  124. package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -0
  125. package/dist/legacy/StepNavigation/index.d.ts +2 -0
  126. package/dist/legacy/StepNavigation/index.js +2 -0
  127. package/dist/legacy/StepNavigation/index.js.map +1 -0
  128. package/dist/legacy/StepNavigation/styles.js +33 -0
  129. package/dist/legacy/StepNavigation/styles.js.map +1 -0
  130. package/dist/legacy/StepNavigation/utils.js +6 -0
  131. package/dist/legacy/StepNavigation/utils.js.map +1 -0
  132. package/dist/legacy/index.d.ts +6 -0
  133. package/dist/legacy/index.js +2 -0
  134. package/dist/legacy/index.js.map +1 -1
  135. package/dist/modern/ImageCarousel/ImageCarousel.d.ts +11 -0
  136. package/dist/modern/ImageCarousel/ImageCarousel.js +542 -0
  137. package/dist/modern/ImageCarousel/ImageCarousel.js.map +1 -0
  138. package/dist/modern/ImageCarousel/index.d.ts +2 -0
  139. package/dist/modern/ImageCarousel/index.js +2 -0
  140. package/dist/modern/ImageCarousel/index.js.map +1 -0
  141. package/dist/modern/ImageCarousel/stories/resources/Ahsoka.jpg +0 -0
  142. package/dist/modern/ImageCarousel/stories/resources/AnakinSkywalker.jpg +0 -0
  143. package/dist/modern/ImageCarousel/stories/resources/BobaFett.jpg +0 -0
  144. package/dist/modern/ImageCarousel/stories/resources/DarthVader.jpg +0 -0
  145. package/dist/modern/ImageCarousel/stories/resources/MaceWindu.jpg +0 -0
  146. package/dist/modern/ImageCarousel/stories/resources/ObiWan.png +0 -0
  147. package/dist/modern/ImageCarousel/stories/resources/Panoramic.jpg +0 -0
  148. package/dist/modern/ImageCarousel/stories/resources/Revan.jpg +0 -0
  149. package/dist/modern/ImageCarousel/stories/resources/TheMandalorian.jpg +0 -0
  150. package/dist/modern/ImageCarousel/stories/resources/Yoda.jpg +0 -0
  151. package/dist/modern/ImageCarousel/styles.js +241 -0
  152. package/dist/modern/ImageCarousel/styles.js.map +1 -0
  153. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.d.ts +58 -0
  154. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js +123 -0
  155. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -0
  156. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.d.ts +32 -0
  157. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +179 -0
  158. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -0
  159. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.d.ts +2 -0
  160. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js +2 -0
  161. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js.map +1 -0
  162. package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js +43 -0
  163. package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -0
  164. package/dist/modern/StepNavigation/DefaultNavigation/index.d.ts +2 -0
  165. package/dist/modern/StepNavigation/DefaultNavigation/index.js +2 -0
  166. package/dist/modern/StepNavigation/DefaultNavigation/index.js.map +1 -0
  167. package/dist/modern/StepNavigation/DefaultNavigation/styles.js +6 -0
  168. package/dist/modern/StepNavigation/DefaultNavigation/styles.js.map +1 -0
  169. package/dist/modern/StepNavigation/DefaultNavigation/utils.js +41 -0
  170. package/dist/modern/StepNavigation/DefaultNavigation/utils.js.map +1 -0
  171. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.d.ts +10 -0
  172. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +123 -0
  173. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -0
  174. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.d.ts +2 -0
  175. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js +2 -0
  176. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -0
  177. package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js +18 -0
  178. package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -0
  179. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.d.ts +58 -0
  180. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js +121 -0
  181. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -0
  182. package/dist/modern/StepNavigation/SimpleNavigation/index.d.ts +2 -0
  183. package/dist/modern/StepNavigation/SimpleNavigation/index.js +2 -0
  184. package/dist/modern/StepNavigation/SimpleNavigation/index.js.map +1 -0
  185. package/dist/modern/StepNavigation/SimpleNavigation/styles.js +6 -0
  186. package/dist/modern/StepNavigation/SimpleNavigation/styles.js.map +1 -0
  187. package/dist/modern/StepNavigation/SimpleNavigation/utils.js +22 -0
  188. package/dist/modern/StepNavigation/SimpleNavigation/utils.js.map +1 -0
  189. package/dist/modern/StepNavigation/StepNavigation.d.ts +43 -0
  190. package/dist/modern/StepNavigation/StepNavigation.js +346 -0
  191. package/dist/modern/StepNavigation/StepNavigation.js.map +1 -0
  192. package/dist/modern/StepNavigation/index.d.ts +2 -0
  193. package/dist/modern/StepNavigation/index.js +2 -0
  194. package/dist/modern/StepNavigation/index.js.map +1 -0
  195. package/dist/modern/StepNavigation/styles.js +31 -0
  196. package/dist/modern/StepNavigation/styles.js.map +1 -0
  197. package/dist/modern/StepNavigation/utils.js +6 -0
  198. package/dist/modern/StepNavigation/utils.js.map +1 -0
  199. package/dist/modern/index.d.ts +6 -0
  200. package/dist/modern/index.js +2 -0
  201. package/dist/modern/index.js.map +1 -1
  202. package/package.json +6 -4
@@ -0,0 +1,181 @@
1
+ import "core-js/modules/es.array.includes.js";
2
+ import React from "react";
3
+ import PropTypes from "prop-types";
4
+ import clsx from "clsx";
5
+ import { withStyles } from "@mui/styles";
6
+ import { Level0Good, Level3Bad, HourGlass } from "@hitachivantara/uikit-react-icons";
7
+ import { HvAvatar, HvButton } from "@hitachivantara/uikit-react-core";
8
+ import { getColor } from "../utils";
9
+ import styles from "./styles";
10
+ /**
11
+ * Step element of "Default" Step Navigation root component
12
+ */
13
+
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+
16
+ var HvStep = function HvStep(_ref) {
17
+ var className = _ref.className,
18
+ classes = _ref.classes,
19
+ state = _ref.state,
20
+ title = _ref.title,
21
+ onClick = _ref.onClick,
22
+ disabled = _ref.disabled,
23
+ _ref$size = _ref.size,
24
+ size = _ref$size === void 0 ? "SM" : _ref$size,
25
+ _ref$number = _ref.number,
26
+ number = _ref$number === void 0 ? 1 : _ref$number;
27
+ var iconSize = {
28
+ XS: "XS",
29
+ SM: "XS",
30
+ MD: "S",
31
+ LG: "M",
32
+ XL: "M"
33
+ }[size];
34
+ var squareL = {
35
+ Pending: 16,
36
+ Failed: 24,
37
+ Completed: 24
38
+ }[state];
39
+ var svgSize = {
40
+ XS: squareL - 8,
41
+ SM: squareL,
42
+ MD: squareL + 8,
43
+ LG: squareL + 16,
44
+ XL: squareL + 24
45
+ }[size];
46
+ var backgroundColor = getColor(state);
47
+ var color = state === "Pending" ? "atmo2" : undefined;
48
+ var semantic = state !== "Pending" ? backgroundColor : undefined;
49
+ var status = state === "Current" ? "atmo5" : undefined;
50
+ var IconComponent = {
51
+ Pending: HourGlass,
52
+ Failed: Level3Bad,
53
+ Completed: Level0Good
54
+ }[state];
55
+ return /*#__PURE__*/_jsx("div", {
56
+ className: clsx(className, classes.root, state !== "Current" && classes["not-current"]),
57
+ children: /*#__PURE__*/_jsx(HvButton, {
58
+ className: clsx(classes.ghost, state === "Current" && classes.ghostDisabled),
59
+ "aria-label": "step-".concat(title),
60
+ icon: true,
61
+ overrideIconColors: false,
62
+ disabled: disabled !== null && disabled !== void 0 ? disabled : ["Current", "Disabled"].includes(state),
63
+ onClick: onClick,
64
+ children: /*#__PURE__*/_jsx(HvAvatar, {
65
+ className: clsx(classes.avatar, classes[size]),
66
+ backgroundColor: backgroundColor,
67
+ status: status,
68
+ size: size,
69
+ children: IconComponent ? /*#__PURE__*/_jsx(IconComponent, {
70
+ color: color,
71
+ semantic: semantic,
72
+ width: svgSize,
73
+ height: svgSize,
74
+ iconSize: iconSize
75
+ }) : number
76
+ })
77
+ })
78
+ });
79
+ };
80
+
81
+ process.env.NODE_ENV !== "production" ? HvStep.propTypes = {
82
+ /**
83
+ * Class names to be applied.
84
+ */
85
+ className: PropTypes.string,
86
+
87
+ /**
88
+ * A Jss Object used to override or extend the styles applied.
89
+ */
90
+ classes: PropTypes.shape({
91
+ /**
92
+ * Styles applied to the component root class.
93
+ */
94
+ root: PropTypes.string,
95
+
96
+ /**
97
+ * Styles applied to the ghost class.
98
+ */
99
+ ghost: PropTypes.string,
100
+
101
+ /**
102
+ * Styles applied to the ghostDisabled class.
103
+ */
104
+ ghostDisabled: PropTypes.string,
105
+
106
+ /**
107
+ * Styles applied to the root element when step is not in "current" state.
108
+ */
109
+ "not-current": PropTypes.string,
110
+
111
+ /**
112
+ * Styles applied to the root element when size is XS.
113
+ */
114
+ XS: PropTypes.string,
115
+
116
+ /**
117
+ * Styles applied to the root element when size is SM.
118
+ */
119
+ SM: PropTypes.string,
120
+
121
+ /**
122
+ * Styles applied to the root element when size is MD.
123
+ */
124
+ MD: PropTypes.string,
125
+
126
+ /**
127
+ * Styles applied to the root element when size is LG.
128
+ */
129
+ LG: PropTypes.string,
130
+
131
+ /**
132
+ * Styles applied to the root element when size is XL.
133
+ */
134
+ XL: PropTypes.string,
135
+
136
+ /**
137
+ * Styles applied to the avatar element.
138
+ */
139
+ avatar: PropTypes.string,
140
+
141
+ /**
142
+ * Styles applied to the title of a step element.
143
+ */
144
+ stepTitle: PropTypes.string
145
+ }).isRequired,
146
+
147
+ /**
148
+ * Sets one of the standard sizes of the step
149
+ */
150
+ size: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
151
+
152
+ /**
153
+ * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}
154
+ */
155
+ state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired,
156
+
157
+ /**
158
+ * Title of the step.
159
+ */
160
+ title: PropTypes.string.isRequired,
161
+
162
+ /**
163
+ * Number of the step.
164
+ */
165
+ number: PropTypes.number,
166
+
167
+ /**
168
+ * Event onClick of the step.
169
+ */
170
+ onClick: PropTypes.func,
171
+
172
+ /**
173
+ * Define if a step is disabled/enabled.
174
+ * If this property is not defined and the step is on state "Disabled", the step component will be disabled
175
+ */
176
+ disabled: PropTypes.bool
177
+ } : void 0;
178
+ export default withStyles(styles, {
179
+ name: "HvStep"
180
+ })(HvStep);
181
+ //# sourceMappingURL=Step.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Step.js","names":["React","PropTypes","clsx","withStyles","Level0Good","Level3Bad","HourGlass","HvAvatar","HvButton","getColor","styles","HvStep","className","classes","state","title","onClick","disabled","size","number","iconSize","XS","SM","MD","LG","XL","squareL","Pending","Failed","Completed","svgSize","backgroundColor","color","undefined","semantic","status","IconComponent","root","ghost","ghostDisabled","includes","avatar","propTypes","string","shape","stepTitle","isRequired","oneOf","func","bool","name"],"sources":["../../../../../src/StepNavigation/DefaultNavigation/Step/Step.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { withStyles } from \"@mui/styles\";\n\nimport { Level0Good, Level3Bad, HourGlass } from \"@hitachivantara/uikit-react-icons\";\nimport { HvAvatar, HvButton } from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor } from \"../utils\";\nimport styles from \"./styles\";\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nconst HvStep = ({\n className,\n classes,\n state,\n title,\n onClick,\n disabled,\n size = \"SM\",\n number = 1,\n}) => {\n const iconSize = {\n XS: \"XS\",\n SM: \"XS\",\n MD: \"S\",\n LG: \"M\",\n XL: \"M\",\n }[size];\n\n const squareL = {\n Pending: 16,\n Failed: 24,\n Completed: 24,\n }[state];\n\n const svgSize = {\n XS: squareL - 8,\n SM: squareL,\n MD: squareL + 8,\n LG: squareL + 16,\n XL: squareL + 24,\n }[size];\n\n const backgroundColor = getColor(state);\n\n const color = state === \"Pending\" ? \"atmo2\" : undefined;\n\n const semantic = state !== \"Pending\" ? backgroundColor : undefined;\n\n const status = state === \"Current\" ? \"atmo5\" : undefined;\n\n const IconComponent = {\n Pending: HourGlass,\n Failed: Level3Bad,\n Completed: Level0Good,\n }[state];\n\n return (\n <div\n className={clsx(className, classes.root, { [classes[\"not-current\"]]: state !== \"Current\" })}\n >\n <HvButton\n className={clsx(classes.ghost, { [classes.ghostDisabled]: state === \"Current\" })}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n <HvAvatar\n className={clsx(classes.avatar, classes[size])}\n backgroundColor={backgroundColor}\n status={status}\n size={size}\n >\n {IconComponent ? (\n <IconComponent\n color={color}\n semantic={semantic}\n width={svgSize}\n height={svgSize}\n iconSize={iconSize}\n />\n ) : (\n number\n )}\n </HvAvatar>\n </HvButton>\n </div>\n );\n};\n\nHvStep.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 ghost class.\n */\n ghost: PropTypes.string,\n /**\n * Styles applied to the ghostDisabled class.\n */\n ghostDisabled: PropTypes.string,\n /**\n * Styles applied to the root element when step is not in \"current\" state.\n */\n \"not-current\": PropTypes.string,\n /**\n * Styles applied to the root element when size is XS.\n */\n XS: PropTypes.string,\n /**\n * Styles applied to the root element when size is SM.\n */\n SM: PropTypes.string,\n /**\n * Styles applied to the root element when size is MD.\n */\n MD: PropTypes.string,\n /**\n * Styles applied to the root element when size is LG.\n */\n LG: PropTypes.string,\n /**\n * Styles applied to the root element when size is XL.\n */\n XL: PropTypes.string,\n /**\n * Styles applied to the avatar element.\n */\n avatar: PropTypes.string,\n /**\n * Styles applied to the title of a step element.\n */\n stepTitle: PropTypes.string,\n }).isRequired,\n /**\n * Sets one of the standard sizes of the step\n */\n size: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\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 * Number of the step.\n */\n number: PropTypes.number,\n /**\n * Event onClick of the step.\n */\n onClick: PropTypes.func,\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvStep\" })(HvStep);\n"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,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AAElB,SAAS,CAACkB,MArED;;EAsEjB;AACF;AACA;EACEH,OAAO,EAAEf,SAAS,CAAC+C,IAzEF;;EA0EjB;AACF;AACA;AACA;EACE/B,QAAQ,EAAEhB,SAAS,CAACgD;AA9EH,CAAnB;AAiFA,eAAe9C,UAAU,CAACO,MAAD,EAAS;EAAEwC,IAAI,EAAE;AAAR,CAAT,CAAV,CAAuCvC,MAAvC,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./Step";
2
+ export * from "./Step";
@@ -0,0 +1,2 @@
1
+ export { default } from "./Step";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../../src/StepNavigation/DefaultNavigation/Step/index.js"],"sourcesContent":["export { default } from \"./Step\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,QAAxB"}
@@ -0,0 +1,45 @@
1
+ var styles = function styles() {
2
+ return {
3
+ root: {},
4
+ ghostDisabled: {},
5
+ ghost: {
6
+ "&:hover": {
7
+ backgroundColor: "transparent"
8
+ },
9
+ "&$ghostDisabled": {
10
+ cursor: "default"
11
+ },
12
+ "&$ghostDisabled&:hover": {
13
+ cursor: "default"
14
+ }
15
+ },
16
+ "not-current": {
17
+ margin: "-8px"
18
+ },
19
+ XS: {},
20
+ SM: {},
21
+ MD: {},
22
+ LG: {},
23
+ XL: {},
24
+ avatar: {
25
+ "&$XS": {
26
+ fontSize: "0.625rem"
27
+ },
28
+ "&$SM": {
29
+ fontSize: "1rem"
30
+ },
31
+ "&$MD": {
32
+ fontSize: "1.5rem"
33
+ },
34
+ "&$LG": {
35
+ fontSize: "2rem"
36
+ },
37
+ "&$XL": {
38
+ fontSize: "2.5rem"
39
+ }
40
+ }
41
+ };
42
+ };
43
+
44
+ export default styles;
45
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","root","ghostDisabled","ghost","backgroundColor","cursor","margin","XS","SM","MD","LG","XL","avatar","fontSize"],"sources":["../../../../../src/StepNavigation/DefaultNavigation/Step/styles.js"],"sourcesContent":["const styles = () => ({\n root: {},\n ghostDisabled: {},\n ghost: {\n \"&:hover\": {\n backgroundColor: \"transparent\",\n },\n \"&$ghostDisabled\": {\n cursor: \"default\",\n },\n \"&$ghostDisabled&:hover\": {\n cursor: \"default\",\n },\n },\n \"not-current\": {\n margin: \"-8px\",\n },\n XS: {},\n SM: {},\n MD: {},\n LG: {},\n XL: {},\n avatar: {\n \"&$XS\": {\n fontSize: \"0.625rem\",\n },\n \"&$SM\": {\n fontSize: \"1rem\",\n },\n \"&$MD\": {\n fontSize: \"1.5rem\",\n },\n \"&$LG\": {\n fontSize: \"2rem\",\n },\n \"&$XL\": {\n fontSize: \"2.5rem\",\n },\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE,EADc;IAEpBC,aAAa,EAAE,EAFK;IAGpBC,KAAK,EAAE;MACL,WAAW;QACTC,eAAe,EAAE;MADR,CADN;MAIL,mBAAmB;QACjBC,MAAM,EAAE;MADS,CAJd;MAOL,0BAA0B;QACxBA,MAAM,EAAE;MADgB;IAPrB,CAHa;IAcpB,eAAe;MACbC,MAAM,EAAE;IADK,CAdK;IAiBpBC,EAAE,EAAE,EAjBgB;IAkBpBC,EAAE,EAAE,EAlBgB;IAmBpBC,EAAE,EAAE,EAnBgB;IAoBpBC,EAAE,EAAE,EApBgB;IAqBpBC,EAAE,EAAE,EArBgB;IAsBpBC,MAAM,EAAE;MACN,QAAQ;QACNC,QAAQ,EAAE;MADJ,CADF;MAIN,QAAQ;QACNA,QAAQ,EAAE;MADJ,CAJF;MAON,QAAQ;QACNA,QAAQ,EAAE;MADJ,CAPF;MAUN,QAAQ;QACNA,QAAQ,EAAE;MADJ,CAVF;MAaN,QAAQ;QACNA,QAAQ,EAAE;MADJ;IAbF;EAtBY,CAAP;AAAA,CAAf;;AAyCA,eAAeb,MAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./DefaultNavigation";
2
+ export * from "./DefaultNavigation";
@@ -0,0 +1,2 @@
1
+ export { default } from "./DefaultNavigation";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../src/StepNavigation/DefaultNavigation/index.js"],"sourcesContent":["export { default } from \"./DefaultNavigation\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,qBAAxB"}
@@ -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/DefaultNavigation/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,41 @@
1
+ var getColor = function getColor(state, theme) {
2
+ var _theme$hv$palette$sem, _theme$hv, _theme$hv$palette, _theme$hv$palette$sem2, _theme$hv$palette$sem3, _theme$hv2, _theme$hv2$palette, _theme$hv2$palette$se, _theme$hv$palette$sem4, _theme$hv3, _theme$hv3$palette, _theme$hv3$palette$se, _theme$hv$palette$acc, _theme$hv4, _theme$hv4$palette, _theme$hv4$palette$ac, _theme$hv$palette$atm, _theme$hv5, _theme$hv5$palette, _theme$hv5$palette$at;
3
+
4
+ return {
5
+ Pending: (_theme$hv$palette$sem = 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$sem2 = _theme$hv$palette.semantic) === null || _theme$hv$palette$sem2 === void 0 ? void 0 : _theme$hv$palette$sem2.sema3) !== null && _theme$hv$palette$sem !== void 0 ? _theme$hv$palette$sem : "sema3",
6
+ Failed: (_theme$hv$palette$sem3 = 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$se = _theme$hv2$palette.semantic) === null || _theme$hv2$palette$se === void 0 ? void 0 : _theme$hv2$palette$se.sema4) !== null && _theme$hv$palette$sem3 !== void 0 ? _theme$hv$palette$sem3 : "sema4",
7
+ Completed: (_theme$hv$palette$sem4 = theme === null || theme === void 0 ? void 0 : (_theme$hv3 = theme.hv) === null || _theme$hv3 === void 0 ? void 0 : (_theme$hv3$palette = _theme$hv3.palette) === null || _theme$hv3$palette === void 0 ? void 0 : (_theme$hv3$palette$se = _theme$hv3$palette.semantic) === null || _theme$hv3$palette$se === void 0 ? void 0 : _theme$hv3$palette$se.sema1) !== null && _theme$hv$palette$sem4 !== void 0 ? _theme$hv$palette$sem4 : "sema1",
8
+ Current: (_theme$hv$palette$acc = theme === null || theme === void 0 ? void 0 : (_theme$hv4 = theme.hv) === null || _theme$hv4 === void 0 ? void 0 : (_theme$hv4$palette = _theme$hv4.palette) === null || _theme$hv4$palette === void 0 ? void 0 : (_theme$hv4$palette$ac = _theme$hv4$palette.accent) === null || _theme$hv4$palette$ac === void 0 ? void 0 : _theme$hv4$palette$ac.acce1) !== null && _theme$hv$palette$acc !== void 0 ? _theme$hv$palette$acc : "acce1",
9
+ Disabled: (_theme$hv$palette$atm = theme === null || theme === void 0 ? void 0 : (_theme$hv5 = theme.hv) === null || _theme$hv5 === void 0 ? void 0 : (_theme$hv5$palette = _theme$hv5.palette) === null || _theme$hv5$palette === void 0 ? void 0 : (_theme$hv5$palette$at = _theme$hv5$palette.atmosphere) === null || _theme$hv5$palette$at === void 0 ? void 0 : _theme$hv5$palette$at.atmo5) !== null && _theme$hv$palette$atm !== void 0 ? _theme$hv$palette$atm : "atmo5"
10
+ }[state];
11
+ };
12
+
13
+ var EXTRA_SMALL = {
14
+ container: 32,
15
+ avatar: 24
16
+ };
17
+ var SMALL = {
18
+ container: 40,
19
+ avatar: 32
20
+ };
21
+ var MEDIUM = {
22
+ container: 48,
23
+ avatar: 40
24
+ };
25
+ var LARGE = {
26
+ container: 60,
27
+ avatar: 52
28
+ };
29
+ var EXTRA_LARGE = {
30
+ container: 96,
31
+ avatar: 88
32
+ };
33
+ var stepSizes = {
34
+ XS: EXTRA_SMALL,
35
+ SM: SMALL,
36
+ MD: MEDIUM,
37
+ LG: LARGE,
38
+ XL: EXTRA_LARGE
39
+ };
40
+ export { getColor, stepSizes };
41
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","names":["getColor","state","theme","Pending","hv","palette","semantic","sema3","Failed","sema4","Completed","sema1","Current","accent","acce1","Disabled","atmosphere","atmo5","EXTRA_SMALL","container","avatar","SMALL","MEDIUM","LARGE","EXTRA_LARGE","stepSizes","XS","SM","MD","LG","XL"],"sources":["../../../../src/StepNavigation/DefaultNavigation/utils.js"],"sourcesContent":["const getColor = (state, theme) =>\n ({\n Pending: theme?.hv?.palette?.semantic?.sema3 ?? \"sema3\",\n Failed: theme?.hv?.palette?.semantic?.sema4 ?? \"sema4\",\n Completed: theme?.hv?.palette?.semantic?.sema1 ?? \"sema1\",\n Current: theme?.hv?.palette?.accent?.acce1 ?? \"acce1\",\n Disabled: theme?.hv?.palette?.atmosphere?.atmo5 ?? \"atmo5\",\n }[state]);\n\nconst EXTRA_SMALL = { container: 32, avatar: 24 };\nconst SMALL = { container: 40, avatar: 32 };\nconst MEDIUM = { container: 48, avatar: 40 };\nconst LARGE = { container: 60, avatar: 52 };\nconst EXTRA_LARGE = { container: 96, avatar: 88 };\n\nconst stepSizes = {\n XS: EXTRA_SMALL,\n SM: SMALL,\n MD: MEDIUM,\n L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AAb;EAAiBC,MAAM,EAAE;AAAzB,CAAd;AACA,IAAMI,WAAW,GAAG;EAAEL,SAAS,EAAE,EAAb;EAAiBC,MAAM,EAAE;AAAzB,CAApB;AAEA,IAAMK,SAAS,GAAG;EAChBC,EAAE,EAAER,WADY;EAEhBS,EAAE,EAAEN,KAFY;EAGhBO,EAAE,EAAEN,MAHY;EAIhBO,EAAE,EAAEN,KAJY;EAKhBO,EAAE,EAAEN;AALY,CAAlB;AAQA,SAASxB,QAAT,EAAmByB,SAAnB"}
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@mui/material";
3
+ import { HvStepProps } from "../../DefaultNavigation/Step";
4
+
5
+ export type HvDotClassKey = "root";
6
+
7
+ export type HvDotProps = StandardProps<React.HTMLAttributes<HTMLDivElement>, HvDotClassKey> &
8
+ Pick<HvStepProps, "size" | "title" | "state" | "onClick" | "disabled">;
9
+
10
+ export default function HvDot(props: HvDotProps): JSX.Element | null;
@@ -0,0 +1,135 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.symbol.js";
3
+ import "core-js/modules/es.array.filter.js";
4
+ import "core-js/modules/es.object.to-string.js";
5
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
6
+ import "core-js/modules/web.dom-collections.for-each.js";
7
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
8
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
+ import "core-js/modules/es.string.includes.js";
10
+ import "core-js/modules/es.array.includes.js";
11
+
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
+
14
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
+
16
+ import React, { useCallback, useMemo } from "react";
17
+ import PropTypes from "prop-types";
18
+ import clsx from "clsx";
19
+ import { HvButton } from "@hitachivantara/uikit-react-core";
20
+ import { withStyles, makeStyles } from "@mui/styles";
21
+ import { defaultColor, disabledColor, dotSizes } from "../utils";
22
+ import styles from "./styles";
23
+ /**
24
+ * Step element of "Simple" Step Navigation root component
25
+ */
26
+
27
+ import { jsx as _jsx } from "react/jsx-runtime";
28
+
29
+ var HvDot = function HvDot(_ref) {
30
+ var classes = _ref.classes,
31
+ className = _ref.className,
32
+ state = _ref.state,
33
+ title = _ref.title,
34
+ size = _ref.size,
35
+ onClick = _ref.onClick,
36
+ disabled = _ref.disabled;
37
+ var dotSize = dotSizes[size] * (state === "Current" ? 1.5 : 1);
38
+ var getBackgroundColor = useCallback(function (theme) {
39
+ return state === "Disabled" ? disabledColor(theme) : defaultColor(theme);
40
+ }, [state]);
41
+ var customClasses = useMemo(function () {
42
+ return makeStyles(function (theme) {
43
+ var backgroundColor = getBackgroundColor(theme);
44
+ return {
45
+ ghostDisabled: {},
46
+ active: {},
47
+ ghost: _objectSpread(_objectSpread({}, styles.ghost), {}, {
48
+ width: dotSize,
49
+ height: dotSize,
50
+ backgroundColor: backgroundColor,
51
+ "&:hover": {
52
+ backgroundColor: backgroundColor
53
+ },
54
+ "&$ghostDisabled": _objectSpread(_objectSpread({}, styles.ghost["&$ghostDisabled"]), {}, {
55
+ backgroundColor: backgroundColor
56
+ }),
57
+ "&$ghostDisabled&:hover": _objectSpread(_objectSpread({}, styles.ghost["&$ghostDisabled&:hover"]), {}, {
58
+ backgroundColor: backgroundColor
59
+ })
60
+ })
61
+ };
62
+ });
63
+ }, [dotSize, getBackgroundColor])();
64
+ return /*#__PURE__*/_jsx(HvButton, {
65
+ className: clsx(classes.root, customClasses.ghost, (disabled !== null && disabled !== void 0 ? disabled : "Current Disabled".includes(state)) && customClasses.ghostDisabled, className, state === "Current" && customClasses.active),
66
+ "aria-label": "step-".concat(title),
67
+ icon: true,
68
+ overrideIconColors: false,
69
+ disabled: disabled !== null && disabled !== void 0 ? disabled : ["Current", "Disabled"].includes(state),
70
+ onClick: onClick,
71
+ children: []
72
+ });
73
+ };
74
+
75
+ process.env.NODE_ENV !== "production" ? HvDot.propTypes = {
76
+ /**
77
+ * Class names to be applied.
78
+ */
79
+ className: PropTypes.string,
80
+
81
+ /**
82
+ * A Jss Object used to override or extend the styles applied.
83
+ */
84
+ classes: PropTypes.shape({
85
+ /**
86
+ * Styles applied to the component root class.
87
+ */
88
+ root: PropTypes.string,
89
+
90
+ /**
91
+ * Styles applied to the active class.
92
+ */
93
+ active: PropTypes.string,
94
+
95
+ /**
96
+ * Styles applied to the ghost class.
97
+ */
98
+ ghost: PropTypes.string,
99
+
100
+ /**
101
+ * Styles applied to the ghostDisabled class.
102
+ */
103
+ ghostDisabled: PropTypes.string
104
+ }).isRequired,
105
+
106
+ /**
107
+ * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled"}
108
+ */
109
+ state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled"]).isRequired,
110
+
111
+ /**
112
+ * Title of the step.
113
+ */
114
+ title: PropTypes.string.isRequired,
115
+
116
+ /**
117
+ * Sets one of the standard sizes of the steps
118
+ */
119
+ size: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]).isRequired,
120
+
121
+ /**
122
+ * Event onClick of the step.
123
+ */
124
+ onClick: PropTypes.func,
125
+
126
+ /**
127
+ * Define if a step is disabled/enabled.
128
+ * If this property is not defined and the step is on state "Disabled", the step component will be disabled
129
+ */
130
+ disabled: PropTypes.bool
131
+ } : void 0;
132
+ export default withStyles(styles, {
133
+ name: "HvDot"
134
+ })(HvDot);
135
+ //# sourceMappingURL=Dot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dot.js","names":["React","useCallback","useMemo","PropTypes","clsx","HvButton","withStyles","makeStyles","defaultColor","disabledColor","dotSizes","styles","HvDot","classes","className","state","title","size","onClick","disabled","dotSize","getBackgroundColor","theme","customClasses","backgroundColor","ghostDisabled","active","ghost","width","height","root","includes","propTypes","string","shape","isRequired","oneOf","func","bool","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 { withStyles, makeStyles } from \"@mui/styles\";\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, disabled }) => {\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 \"&:hover\": {\n backgroundColor,\n },\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]: disabled ?? [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`step-${title}`}\n icon\n overrideIconColors={false}\n disabled={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 * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvDot\" })(HvDot);\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,QAA4C,OAA5C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,QAAT,QAAyB,kCAAzB;AACA,SAASC,UAAT,EAAqBC,UAArB,QAAuC,aAAvC;AAEA,SAASC,YAAT,EAAuBC,aAAvB,EAAsCC,QAAtC,QAAsD,UAAtD;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;;;;AACA,IAAMC,KAAK,GAAG,SAARA,KAAQ,OAAmE;EAAA,IAAhEC,OAAg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P,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,EAAgDD,UArCtC;;EAsChB;AACF;AACA;EACEjB,OAAO,EAAEf,SAAS,CAACkC,IAzCH;;EA0ChB;AACF;AACA;AACA;EACElB,QAAQ,EAAEhB,SAAS,CAACmC;AA9CJ,CAAlB;AAiDA,eAAehC,UAAU,CAACK,MAAD,EAAS;EAAE4B,IAAI,EAAE;AAAR,CAAT,CAAV,CAAsC3B,KAAtC,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./Dot";
2
+ export * from "./Dot";
@@ -0,0 +1,2 @@
1
+ export { default } from "./Dot";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../../../src/StepNavigation/SimpleNavigation/Dot/index.js"],"sourcesContent":["export { default } from \"./Dot\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB"}
@@ -0,0 +1,18 @@
1
+ var styles = {
2
+ root: {
3
+ borderRadius: "50%",
4
+ zIndex: 1
5
+ },
6
+ ghostDisabled: {},
7
+ active: {},
8
+ ghost: {
9
+ "&$active": {
10
+ cursor: "default"
11
+ },
12
+ "&$active&:hover": {
13
+ cursor: "default"
14
+ }
15
+ }
16
+ };
17
+ export default styles;
18
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","root","borderRadius","zIndex","ghostDisabled","active","ghost","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 \"&$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,YAAY;MACVC,MAAM,EAAE;IADE,CADP;IAIL,mBAAmB;MACjBA,MAAM,EAAE;IADS;EAJd;AAPM,CAAf;AAiBA,eAAeP,MAAf"}
@@ -0,0 +1,58 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@mui/material";
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;