@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,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,33 @@
1
+ var styles = function styles() {
2
+ return {
3
+ root: {
4
+ display: "flex",
5
+ flexDirection: "column"
6
+ },
7
+ titles: {
8
+ display: "flex"
9
+ },
10
+ ol: {
11
+ display: "flex",
12
+ alignItems: "center",
13
+ justifyContent: "center",
14
+ flexWrap: "wrap",
15
+ padding: 0,
16
+ listStyle: "none"
17
+ },
18
+ li: {
19
+ display: "flex",
20
+ alignItems: "center",
21
+ justifyContent: "center"
22
+ },
23
+ separator: {
24
+ userSelect: "none",
25
+ "& > div": {
26
+ display: "flex"
27
+ }
28
+ }
29
+ };
30
+ };
31
+
32
+ export default styles;
33
+ //# 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,IAAMA,MAAM,GAAG,SAATA,MAAS;EAAA,OAAO;IACpBC,IAAI,EAAE;MACJC,OAAO,EAAE,MADL;MAEJC,aAAa,EAAE;IAFX,CADc;IAKpBC,MAAM,EAAE;MACNF,OAAO,EAAE;IADH,CALY;IAQpBG,EAAE,EAAE;MACFH,OAAO,EAAE,MADP;MAEFI,UAAU,EAAE,QAFV;MAGFC,cAAc,EAAE,QAHd;MAIFC,QAAQ,EAAE,MAJR;MAKFC,OAAO,EAAE,CALP;MAMFC,SAAS,EAAE;IANT,CARgB;IAgBpBC,EAAE,EAAE;MACFT,OAAO,EAAE,MADP;MAEFI,UAAU,EAAE,QAFV;MAGFC,cAAc,EAAE;IAHd,CAhBgB;IAqBpBK,SAAS,EAAE;MACTC,UAAU,EAAE,MADH;MAET,WAAW;QACTX,OAAO,EAAE;MADA;IAFF;EArBS,CAAP;AAAA,CAAf;;AA6BA,eAAeF,MAAf"}
@@ -0,0 +1,6 @@
1
+ var TITLE_MARGIN = 20;
2
+ var TITLE_WIDTH = 215;
3
+ var STEP_MARGIN = 20;
4
+ var 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,IAAMA,YAAY,GAAG,EAArB;AACA,IAAMC,WAAW,GAAG,GAApB;AACA,IAAMC,WAAW,GAAG,EAApB;AACA,IAAMC,eAAe,GAAG,GAAxB;AAEA,SAASD,WAAT,EAAsBF,YAAtB,EAAoCC,WAApC,EAAiDE,eAAjD"}
@@ -15,3 +15,9 @@ export * from "./NotificationPanel";
15
15
 
16
16
  export { default as HvTimeAgo } from "./TimeAgo";
17
17
  export * from "./TimeAgo";
18
+
19
+ export { default as HvImageCarousel } from "./ImageCarousel";
20
+ export * from "./ImageCarousel";
21
+
22
+ export { default as HvStepNavigation } from "./StepNavigation";
23
+ export * from "./StepNavigation";
@@ -5,4 +5,6 @@ export { default as HvNavigationAnchors } from "./NavigationAnchors";
5
5
  export { default as HvNotificationPanel } from "./NotificationPanel";
6
6
  export { default as HvTimeAgo } from "./TimeAgo";
7
7
  export * from "./TimeAgo";
8
+ export { default as HvImageCarousel } from "./ImageCarousel";
9
+ export { default as HvStepNavigation } from "./StepNavigation";
8
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvTimeAgo"],"sources":["../../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\n\nexport { default as HvDrawer } from \"./Drawer\";\n\nexport { default as HvInlineEditor } from \"./InlineEditor\";\n\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\n\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\n\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAApB,QAAyC,eAAzC;AAEA,SAASD,OAAO,IAAIE,QAApB,QAAoC,UAApC;AAEA,SAASF,OAAO,IAAIG,cAApB,QAA0C,gBAA1C;AAEA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AAEA,SAASJ,OAAO,IAAIK,mBAApB,QAA+C,qBAA/C;AAEA,SAASL,OAAO,IAAIM,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd"}
1
+ {"version":3,"file":"index.js","names":["default","HvColorPicker","HvDrawer","HvInlineEditor","HvNavigationAnchors","HvNotificationPanel","HvTimeAgo","HvImageCarousel","HvStepNavigation"],"sources":["../../src/index.js"],"sourcesContent":["export { default as HvColorPicker } from \"./ColorPicker\";\n\nexport { default as HvDrawer } from \"./Drawer\";\n\nexport { default as HvInlineEditor } from \"./InlineEditor\";\n\nexport { default as HvNavigationAnchors } from \"./NavigationAnchors\";\n\nexport { default as HvNotificationPanel } from \"./NotificationPanel\";\n\nexport { default as HvTimeAgo } from \"./TimeAgo\";\nexport * from \"./TimeAgo\";\n\nexport { default as HvImageCarousel } from \"./ImageCarousel\";\n\nexport { default as HvStepNavigation } from \"./StepNavigation\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAApB,QAAyC,eAAzC;AAEA,SAASD,OAAO,IAAIE,QAApB,QAAoC,UAApC;AAEA,SAASF,OAAO,IAAIG,cAApB,QAA0C,gBAA1C;AAEA,SAASH,OAAO,IAAII,mBAApB,QAA+C,qBAA/C;AAEA,SAASJ,OAAO,IAAIK,mBAApB,QAA+C,qBAA/C;AAEA,SAASL,OAAO,IAAIM,SAApB,QAAqC,WAArC;AACA,cAAc,WAAd;AAEA,SAASN,OAAO,IAAIO,eAApB,QAA2C,iBAA3C;AAEA,SAASP,OAAO,IAAIQ,gBAApB,QAA4C,kBAA5C"}
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { StandardProps } from "@mui/material";
3
+
4
+ export type HvImageCarouselClassKey = "root";
5
+
6
+ export type HvImageCarouselProps = StandardProps<
7
+ React.HTMLAttributes<HTMLDivElement>,
8
+ HvImageCarouselClassKey
9
+ >;
10
+
11
+ export default function HvImageCarousel(props: HvImageCarouselProps): JSX.Element | null;
@@ -0,0 +1,542 @@
1
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
+
4
+ var _Close, _Fullscreen, _Backwards, _Forwards, _Backwards2, _Forwards2;
5
+
6
+ const _excluded = ["className", "classes", "documents", "title", "id", "fullscreen", "thumbnails", "lowCardinality", "infiniteCarousel", "xs", "onChange", "counter", "currentStep", "setCurrentStep", "visibleArrows", "variant"];
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/web.dom-collections.iterator.js";
13
+ import React, { useState, useRef, useEffect, useCallback } from "react";
14
+ import PropTypes from "prop-types";
15
+ import clsx from "clsx";
16
+ import { setId, useUniqueId, HvButton, HvContainer, HvTypography, HvGrid, HvStack, HvPanel, useScrollTo } from "@hitachivantara/uikit-react-core";
17
+ import { Button, Fade } from "@mui/material";
18
+ import { withStyles, makeStyles } from "@mui/styles";
19
+ import { Backwards, Forwards, Close, Fullscreen } from "@hitachivantara/uikit-react-icons";
20
+ import styles from "./styles";
21
+ /**
22
+ * ImageCarousel description/documentation paragraph
23
+ */
24
+
25
+ import { jsx as _jsx } from "react/jsx-runtime";
26
+ import { jsxs as _jsxs } from "react/jsx-runtime";
27
+ import { Fragment as _Fragment } from "react/jsx-runtime";
28
+
29
+ const HvImageCarousel = props => {
30
+ const {
31
+ className,
32
+ classes,
33
+ documents,
34
+ title,
35
+ id,
36
+ fullscreen: fullscreenProp = false,
37
+ thumbnails = false,
38
+ lowCardinality = false,
39
+ infiniteCarousel = false,
40
+ xs = false,
41
+ onChange,
42
+ counter = false,
43
+ currentStep = 0,
44
+ setCurrentStep,
45
+ visibleArrows = false,
46
+ variant = "contain"
47
+ } = props,
48
+ others = _objectWithoutProperties(props, _excluded);
49
+
50
+ const elementId = useUniqueId(id, "hvcarousel");
51
+ const [fullscreen, setFullscreen] = useState(false);
52
+ const options = documents.map(element => ({
53
+ src: element.src,
54
+ value: setId(elementId, element.value)
55
+ }));
56
+ const [sliceStart, setSliceStart] = useState(0);
57
+ const [selImage, setImage] = useState(currentStep);
58
+ const [offset, setOffset] = useState(0);
59
+ const [imageHover, setImageHover] = useState(false);
60
+ let direction = "next";
61
+ const useStyles = makeStyles(theme => ({
62
+ button: {
63
+ backgroundColor: theme.hv.palette.atmosphere.atmo3
64
+ },
65
+ imageBox: {
66
+ minWidth: "100%",
67
+ display: "flex",
68
+ justifyContent: "center"
69
+ },
70
+ allImages: {
71
+ width: "max-content",
72
+ display: "flex"
73
+ }
74
+ }));
75
+ const style = useStyles();
76
+ const [selectedIndex, setScrollTo] = useScrollTo(0, setId(elementId, "panel"), false, 100, documents, onChange, "row");
77
+ const [selectedBigIndex, setBigScrollTo] = useScrollTo(0, setId(elementId, "bigPanel"), false, 0, options, onChange, "row");
78
+ const refBackwards = useRef(null);
79
+ const refForwards = useRef(null);
80
+ let typeCircle = "circle";
81
+ const handleSelection = useCallback((event, value, index) => {
82
+ const wrappedOnChange = () => {
83
+ onChange === null || onChange === void 0 ? void 0 : onChange(event, index);
84
+ };
85
+
86
+ setScrollTo(event, value, index, wrappedOnChange);
87
+ }, [onChange, setScrollTo]);
88
+
89
+ const handleFocus = focus => {
90
+ if (focus === refBackwards.current || focus === refForwards.current) focus.focus();
91
+ };
92
+
93
+ const handleBigSelection = useCallback((event, value, index) => {
94
+ const wrappedOnChange = () => {
95
+ onChange === null || onChange === void 0 ? void 0 : onChange(event, index);
96
+ };
97
+
98
+ setBigScrollTo(event, value, index, wrappedOnChange);
99
+ }, [onChange, setBigScrollTo]);
100
+ const handleVisibility = useCallback((event, value, index) => {
101
+ const image = document.getElementById(value);
102
+ const panel = document.getElementById(setId(elementId, "panel"));
103
+ const container = document.getElementById(setId(elementId, "container"));
104
+ const containerWidth = container.offsetWidth;
105
+ const offsetPanel = panel.offsetLeft;
106
+ const offsetImage = image.offsetLeft;
107
+ const imageWidth = image.offsetWidth;
108
+ const scroll = panel.scrollLeft;
109
+ const focus = document.activeElement;
110
+
111
+ if (offsetPanel + offsetImage + offset + imageWidth - scroll > containerWidth || offsetImage - scroll < 0) {
112
+ handleSelection(event, value, index);
113
+ handleFocus(focus);
114
+ }
115
+ }, [elementId, handleSelection, offset]);
116
+ useEffect(() => {
117
+ setCurrentStep === null || setCurrentStep === void 0 ? void 0 : setCurrentStep(selImage);
118
+ }, [selImage, setCurrentStep]);
119
+ useEffect(() => {
120
+ if (fullscreen) setOffset(150);else setOffset(0);
121
+
122
+ if (thumbnails) {
123
+ handleVisibility(undefined, documents[selImage].value, selImage, selectedIndex);
124
+ }
125
+
126
+ handleBigSelection(undefined, options[selImage].value, selImage, selectedBigIndex);
127
+ }, [documents, fullscreen, handleBigSelection, handleVisibility, options, selImage, selectedBigIndex, selectedIndex, thumbnails]);
128
+
129
+ const changeSlice = () => {
130
+ if (direction === "next") {
131
+ if (infiniteCarousel && selImage === documents.length - 1) setSliceStart(0);else if (selImage > sliceStart + 2 && selImage !== documents.length - 2) setSliceStart(sliceStart + 1);
132
+ }
133
+
134
+ if (direction === "prev") {
135
+ if (infiniteCarousel && selImage === 0) setSliceStart(documents.length > 5 ? documents.length - 5 : 0);else if (selImage < sliceStart + 2 && selImage !== 1) setSliceStart(sliceStart - 1);
136
+ }
137
+ };
138
+
139
+ const nextImage = () => {
140
+ let next;
141
+ if (selImage !== documents.length - 1) next = selImage + 1;else if (infiniteCarousel) next = 0;
142
+ setImage(next);
143
+
144
+ if (xs) {
145
+ direction = "next";
146
+ changeSlice();
147
+ }
148
+ };
149
+
150
+ const previousImage = () => {
151
+ let previous;
152
+ if (selImage !== 0) previous = selImage - 1;else if (infiniteCarousel) previous = documents.length - 1;
153
+ setImage(previous);
154
+
155
+ if (xs) {
156
+ direction = "prev";
157
+ changeSlice();
158
+ }
159
+ };
160
+
161
+ const styleThumbnail = index => {
162
+ if (index !== selImage) return classes.img;
163
+ return classes.thumbnailSelected;
164
+ };
165
+
166
+ const circleType = index => {
167
+ if (index === selImage) {
168
+ typeCircle = "BigCircle";
169
+ if (xs) return classes.xsSelectedCircle;
170
+ return classes.selectedCircle;
171
+ }
172
+
173
+ typeCircle = "Circle";
174
+ return classes.miniCircle;
175
+ };
176
+
177
+ return /*#__PURE__*/_jsxs(HvContainer, _objectSpread(_objectSpread({
178
+ id: setId(elementId, "container"),
179
+ className: clsx(className, classes.root, xs ? "xs" : "nxs", fullscreen && classes.fullscreenStyle)
180
+ }, others), {}, {
181
+ children: [!xs && /*#__PURE__*/_jsxs("div", {
182
+ className: classes.title,
183
+ children: [/*#__PURE__*/_jsx("div", {
184
+ children: title
185
+ }), fullscreenProp && /*#__PURE__*/_jsx("div", {
186
+ children: fullscreen ? /*#__PURE__*/_jsx(HvButton, {
187
+ className: classes.closeButton,
188
+ icon: true,
189
+ "aria-label": "Close",
190
+ onClick: () => setFullscreen(!fullscreen),
191
+ children: _Close || (_Close = /*#__PURE__*/_jsx(Close, {}))
192
+ }) : /*#__PURE__*/_jsx(HvButton, {
193
+ icon: true,
194
+ "aria-label": "Fullscreen",
195
+ onClick: () => setFullscreen(true),
196
+ children: _Fullscreen || (_Fullscreen = /*#__PURE__*/_jsx(Fullscreen, {}))
197
+ })
198
+ })]
199
+ }), /*#__PURE__*/_jsxs(HvContainer, {
200
+ className: clsx(classes.imageContainer, fullscreen ? "fullscreen" : "notFullscreen", !xs && "nxs"),
201
+ onFocus: () => setImageHover(true),
202
+ onMouseOver: () => setImageHover(true),
203
+ onBlur: () => setImageHover(false),
204
+ onMouseOut: () => setImageHover(false),
205
+ children: [/*#__PURE__*/_jsx(HvPanel, {
206
+ className: clsx(classes.stack, xs ? "xs" : "nxs"),
207
+ id: setId(elementId, "bigPanel"),
208
+ children: options.map((element, index) => /*#__PURE__*/_jsx("div", {
209
+ className: style.imageBox,
210
+ id: element.value,
211
+ children: /*#__PURE__*/_jsx(Fade, {
212
+ in: selImage === index || xs,
213
+ timeout: {
214
+ appear: 500,
215
+ enter: 1200,
216
+ exit: 200
217
+ },
218
+ children: /*#__PURE__*/_jsx("img", {
219
+ className: clsx(classes.selectedImage, xs ? "xs" : "nxs", fullscreen ? "fullscreen" : "notFullscreen", variant),
220
+ src: element.src,
221
+ alt: element.value
222
+ }, `image ${element.value}`)
223
+ })
224
+ }, `div ${element.value}`))
225
+ }), (xs || lowCardinality) && /*#__PURE__*/_jsxs("div", {
226
+ className: clsx(classes.lowButtons, !xs && "nxs"),
227
+ children: [/*#__PURE__*/_jsx("div", {
228
+ children: /*#__PURE__*/_jsx(Fade, {
229
+ in: imageHover || visibleArrows,
230
+ children: /*#__PURE__*/_jsx(HvButton, {
231
+ ref: refBackwards,
232
+ className: classes.button,
233
+ icon: true,
234
+ "aria-label": "Backwards",
235
+ onClick: event => previousImage(event),
236
+ children: _Backwards || (_Backwards = /*#__PURE__*/_jsx(Backwards, {}))
237
+ })
238
+ })
239
+ }), /*#__PURE__*/_jsx("div", {
240
+ children: /*#__PURE__*/_jsx(Fade, {
241
+ in: imageHover || visibleArrows,
242
+ children: /*#__PURE__*/_jsx(HvButton, {
243
+ ref: refForwards,
244
+ className: classes.button,
245
+ icon: true,
246
+ "aria-label": "Forwards",
247
+ onClick: event => nextImage(event),
248
+ children: _Forwards || (_Forwards = /*#__PURE__*/_jsx(Forwards, {}))
249
+ })
250
+ })
251
+ })]
252
+ }), xs && /*#__PURE__*/_jsx("div", {
253
+ className: classes.xsCircles,
254
+ children: documents.map((element, index) => /*#__PURE__*/_jsx("span", {
255
+ className: circleType(index),
256
+ title: typeCircle
257
+ }, `Circle ${element.value}`)).slice(sliceStart, sliceStart + 5)
258
+ }), counter && /*#__PURE__*/_jsx("div", {
259
+ className: clsx(classes.divCounter, !xs && "nxs"),
260
+ children: /*#__PURE__*/_jsx("span", {
261
+ className: classes.counter,
262
+ children: /*#__PURE__*/_jsx(HvTypography, {
263
+ variant: "normalText",
264
+ style: {
265
+ color: "white"
266
+ },
267
+ children: `${selImage + 1}/${documents.length}`
268
+ })
269
+ })
270
+ })]
271
+ }), !xs && /*#__PURE__*/_jsxs(_Fragment, {
272
+ children: [lowCardinality ? /*#__PURE__*/_jsx("div", {
273
+ className: classes.circles,
274
+ children: documents.map((element, index) => /*#__PURE__*/_jsx("span", {
275
+ className: circleType(index),
276
+ title: `${typeCircle} ${index}`
277
+ }, `Circle ${element.value}`))
278
+ }) : /*#__PURE__*/_jsxs(HvGrid, {
279
+ className: clsx(classes.normalButtons),
280
+ container: true,
281
+ justifyContent: "space-between",
282
+ alignItems: "center",
283
+ children: [/*#__PURE__*/_jsx(HvGrid, {
284
+ item: true,
285
+ children: /*#__PURE__*/_jsx(HvButton, {
286
+ className: infiniteCarousel || selImage !== 0 ? "" : classes.hidden,
287
+ ref: refBackwards,
288
+ icon: true,
289
+ "aria-label": "Backwards",
290
+ onClick: event => previousImage(event),
291
+ children: _Backwards2 || (_Backwards2 = /*#__PURE__*/_jsx(Backwards, {}))
292
+ })
293
+ }), /*#__PURE__*/_jsxs(HvGrid, {
294
+ item: true,
295
+ children: [/*#__PURE__*/_jsx(HvTypography, {
296
+ variant: "highlightText",
297
+ component: "a",
298
+ children: selImage + 1
299
+ }), /*#__PURE__*/_jsx(HvTypography, {
300
+ variant: "normalText",
301
+ component: "a",
302
+ children: ` / ${documents.length}`
303
+ })]
304
+ }), /*#__PURE__*/_jsx(HvGrid, {
305
+ item: true,
306
+ children: /*#__PURE__*/_jsx(HvButton, {
307
+ className: infiniteCarousel || selImage !== documents.length - 1 ? "" : classes.hidden,
308
+ ref: refForwards,
309
+ icon: true,
310
+ "aria-label": "Forwards",
311
+ onClick: event => nextImage(event),
312
+ children: _Forwards2 || (_Forwards2 = /*#__PURE__*/_jsx(Forwards, {}))
313
+ })
314
+ })]
315
+ }), thumbnails && /*#__PURE__*/_jsx(HvPanel, {
316
+ className: classes.panel,
317
+ id: setId(elementId, "panel"),
318
+ children: /*#__PURE__*/_jsx(HvStack, {
319
+ direction: "row",
320
+ spacing: "xs",
321
+ withNavigation: true,
322
+ children: documents.map((element, i) => /*#__PURE__*/_jsx(Button, {
323
+ id: element.value,
324
+ className: classes.thumbnailButton,
325
+ onClick: () => setImage(i),
326
+ children: /*#__PURE__*/_jsx("img", {
327
+ className: styleThumbnail(i),
328
+ src: element.src,
329
+ alt: element.value
330
+ }, `Thumbnail ${element.value}`)
331
+ }, `Button ${element.value}`))
332
+ }, "Thumbnails")
333
+ })]
334
+ })]
335
+ }));
336
+ };
337
+
338
+ process.env.NODE_ENV !== "production" ? HvImageCarousel.propTypes = {
339
+ /**
340
+ * Class names to be applied.
341
+ */
342
+ className: PropTypes.string,
343
+
344
+ /**
345
+ * A Jss Object used to override or extend the styles applied.
346
+ */
347
+ classes: PropTypes.shape({
348
+ /**
349
+ * Styles applied to the component root class.
350
+ */
351
+ root: PropTypes.string,
352
+
353
+ /**
354
+ * Styles applied to the component SelectedImage.
355
+ */
356
+ selectedImage: PropTypes.string,
357
+
358
+ /**
359
+ * Styles applied to xs mode
360
+ */
361
+ xsMode: PropTypes.string,
362
+
363
+ /**
364
+ * Styles applied to image in xsMode
365
+ */
366
+ xsImage: PropTypes.string,
367
+
368
+ /**
369
+ * Styles applied to panel with low cardinality circles
370
+ */
371
+ circles: PropTypes.string,
372
+
373
+ /**
374
+ * Styles applied to xs mode circles
375
+ */
376
+ xsCircles: PropTypes.string,
377
+
378
+ /**
379
+ * Styles applied to unavailable button
380
+ */
381
+ hidden: PropTypes.string,
382
+
383
+ /**
384
+ * Styles applied to the carousel title
385
+ */
386
+ title: PropTypes.string,
387
+
388
+ /**
389
+ * Styles applied to the counter
390
+ */
391
+ counter: PropTypes.string,
392
+
393
+ /**
394
+ * Styles applied to the div with the counter
395
+ */
396
+ divCounter: PropTypes.string,
397
+
398
+ /**
399
+ * Styles applied to the thumbnails
400
+ */
401
+ img: PropTypes.string,
402
+
403
+ /**
404
+ * Styles applied to the selected thumbnail
405
+ */
406
+ thumbnailSelected: PropTypes.string,
407
+
408
+ /**
409
+ * Styles applied to the thumbnail button
410
+ */
411
+ thumbnailButton: PropTypes.string,
412
+
413
+ /**
414
+ * Styles applied to the low cardinality circles
415
+ */
416
+ miniCircle: PropTypes.string,
417
+
418
+ /**
419
+ * Styles applied to the circle of the selected image
420
+ */
421
+ selectedCircle: PropTypes.string,
422
+
423
+ /**
424
+ * Styles applied to the circle of the selected image in xsmode
425
+ */
426
+ xsSelectedCircle: PropTypes.string,
427
+
428
+ /**
429
+ * Styles applied to the panel with low cardinality buttons
430
+ */
431
+ lowButtons: PropTypes.string,
432
+
433
+ /**
434
+ * Styles applied to the container of the selected image
435
+ */
436
+ imageContainer: PropTypes.string,
437
+
438
+ /**
439
+ * Styles applied to the panel with the thumbnails
440
+ */
441
+ stack: PropTypes.string,
442
+
443
+ /**
444
+ * Styles applied to the panel that contains the buttons and counter in default mode
445
+ */
446
+ normalButtons: PropTypes.string,
447
+
448
+ /**
449
+ * Styles applied to fullscreen mode.
450
+ */
451
+ fullscreenStyle: PropTypes.string,
452
+
453
+ /**
454
+ * Styles applied to close button in fullscreen mode.
455
+ */
456
+ closeButton: PropTypes.string,
457
+
458
+ /**
459
+ * Styles applied to change image buttons.
460
+ */
461
+ button: PropTypes.string,
462
+
463
+ /**
464
+ * Styles applied to thumbnails panel.
465
+ */
466
+ panel: PropTypes.string
467
+ }).isRequired,
468
+
469
+ /**
470
+ * Documents to be displayed.
471
+ */
472
+ documents: PropTypes.array.isRequired,
473
+
474
+ /**
475
+ * Title of the image carousel
476
+ */
477
+ title: PropTypes.node,
478
+
479
+ /**
480
+ * A function called each time the selected image changes.
481
+ */
482
+ onChange: PropTypes.func,
483
+
484
+ /**
485
+ * Id to be applied to the root node.
486
+ */
487
+ id: PropTypes.string,
488
+
489
+ /**
490
+ * A flag that activates the thumbnails.
491
+ */
492
+ thumbnails: PropTypes.bool,
493
+
494
+ /**
495
+ * A flag that switches to low cardinality mode
496
+ */
497
+ lowCardinality: PropTypes.bool,
498
+
499
+ /**
500
+ * A flag that activates the infinite carousel behavior
501
+ */
502
+ infiniteCarousel: PropTypes.bool,
503
+
504
+ /**
505
+ * A flag that activates a counter on the top right corner of the selected image
506
+ */
507
+ counter: PropTypes.bool,
508
+
509
+ /**
510
+ * Set Image Carousel to fullscreen mode
511
+ */
512
+ fullscreen: PropTypes.bool,
513
+
514
+ /**
515
+ * Set selected image to a particular image in documents
516
+ */
517
+ currentStep: PropTypes.number,
518
+
519
+ /**
520
+ * Function that changes the selected image
521
+ */
522
+ setCurrentStep: PropTypes.func,
523
+
524
+ /**
525
+ * Image Carousel set to xs mode
526
+ */
527
+ xs: PropTypes.bool,
528
+
529
+ /**
530
+ * Arrows always displayed in low cardinality or xs mode
531
+ */
532
+ visibleArrows: PropTypes.bool,
533
+
534
+ /**
535
+ * Selected image fit variant
536
+ */
537
+ variant: PropTypes.string
538
+ } : void 0;
539
+ export default withStyles(styles, {
540
+ name: "HvImageCarousel"
541
+ })(HvImageCarousel);
542
+ //# sourceMappingURL=ImageCarousel.js.map