@hitachivantara/uikit-react-lab 4.0.1-next.1 → 4.0.1-next.2

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 +3 -3
@@ -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,666 @@
1
+ "use strict";
2
+
3
+ require("core-js/modules/es.object.keys.js");
4
+
5
+ require("core-js/modules/es.symbol.js");
6
+
7
+ require("core-js/modules/es.array.filter.js");
8
+
9
+ require("core-js/modules/es.object.to-string.js");
10
+
11
+ require("core-js/modules/es.object.get-own-property-descriptor.js");
12
+
13
+ require("core-js/modules/web.dom-collections.for-each.js");
14
+
15
+ require("core-js/modules/es.object.get-own-property-descriptors.js");
16
+
17
+ require("core-js/modules/es.array.iterator.js");
18
+
19
+ require("core-js/modules/es.string.iterator.js");
20
+
21
+ require("core-js/modules/es.weak-map.js");
22
+
23
+ require("core-js/modules/web.dom-collections.iterator.js");
24
+
25
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
26
+
27
+ var _typeof = require("@babel/runtime/helpers/typeof");
28
+
29
+ Object.defineProperty(exports, "__esModule", {
30
+ value: true
31
+ });
32
+ exports.default = void 0;
33
+
34
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
35
+
36
+ require("core-js/modules/es.array.map.js");
37
+
38
+ require("core-js/modules/es.array.slice.js");
39
+
40
+ require("core-js/modules/es.array.concat.js");
41
+
42
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
43
+
44
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
45
+
46
+ var _react = _interopRequireWildcard(require("react"));
47
+
48
+ var _propTypes = _interopRequireDefault(require("prop-types"));
49
+
50
+ var _clsx = _interopRequireDefault(require("clsx"));
51
+
52
+ var _uikitReactCore = require("@hitachivantara/uikit-react-core");
53
+
54
+ var _material = require("@mui/material");
55
+
56
+ var _styles = require("@mui/styles");
57
+
58
+ var _uikitReactIcons = require("@hitachivantara/uikit-react-icons");
59
+
60
+ var _styles2 = _interopRequireDefault(require("./styles"));
61
+
62
+ var _jsxRuntime = require("react/jsx-runtime");
63
+
64
+ var _Close, _Fullscreen, _Backwards, _Forwards, _Backwards2, _Forwards2;
65
+
66
+ var _excluded = ["className", "classes", "documents", "title", "id", "fullscreen", "thumbnails", "lowCardinality", "infiniteCarousel", "xs", "onChange", "counter", "currentStep", "setCurrentStep", "visibleArrows", "variant"];
67
+
68
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
69
+
70
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
71
+
72
+ 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; }
73
+
74
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
75
+
76
+ /**
77
+ * ImageCarousel description/documentation paragraph
78
+ */
79
+ var HvImageCarousel = function HvImageCarousel(props) {
80
+ var className = props.className,
81
+ classes = props.classes,
82
+ documents = props.documents,
83
+ title = props.title,
84
+ id = props.id,
85
+ _props$fullscreen = props.fullscreen,
86
+ fullscreenProp = _props$fullscreen === void 0 ? false : _props$fullscreen,
87
+ _props$thumbnails = props.thumbnails,
88
+ thumbnails = _props$thumbnails === void 0 ? false : _props$thumbnails,
89
+ _props$lowCardinality = props.lowCardinality,
90
+ lowCardinality = _props$lowCardinality === void 0 ? false : _props$lowCardinality,
91
+ _props$infiniteCarous = props.infiniteCarousel,
92
+ infiniteCarousel = _props$infiniteCarous === void 0 ? false : _props$infiniteCarous,
93
+ _props$xs = props.xs,
94
+ xs = _props$xs === void 0 ? false : _props$xs,
95
+ onChange = props.onChange,
96
+ _props$counter = props.counter,
97
+ counter = _props$counter === void 0 ? false : _props$counter,
98
+ _props$currentStep = props.currentStep,
99
+ currentStep = _props$currentStep === void 0 ? 0 : _props$currentStep,
100
+ setCurrentStep = props.setCurrentStep,
101
+ _props$visibleArrows = props.visibleArrows,
102
+ visibleArrows = _props$visibleArrows === void 0 ? false : _props$visibleArrows,
103
+ _props$variant = props.variant,
104
+ variant = _props$variant === void 0 ? "contain" : _props$variant,
105
+ others = (0, _objectWithoutProperties2.default)(props, _excluded);
106
+ var elementId = (0, _uikitReactCore.useUniqueId)(id, "hvcarousel");
107
+
108
+ var _useState = (0, _react.useState)(false),
109
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
110
+ fullscreen = _useState2[0],
111
+ setFullscreen = _useState2[1];
112
+
113
+ var options = documents.map(function (element) {
114
+ return {
115
+ src: element.src,
116
+ value: (0, _uikitReactCore.setId)(elementId, element.value)
117
+ };
118
+ });
119
+
120
+ var _useState3 = (0, _react.useState)(0),
121
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
122
+ sliceStart = _useState4[0],
123
+ setSliceStart = _useState4[1];
124
+
125
+ var _useState5 = (0, _react.useState)(currentStep),
126
+ _useState6 = (0, _slicedToArray2.default)(_useState5, 2),
127
+ selImage = _useState6[0],
128
+ setImage = _useState6[1];
129
+
130
+ var _useState7 = (0, _react.useState)(0),
131
+ _useState8 = (0, _slicedToArray2.default)(_useState7, 2),
132
+ offset = _useState8[0],
133
+ setOffset = _useState8[1];
134
+
135
+ var _useState9 = (0, _react.useState)(false),
136
+ _useState10 = (0, _slicedToArray2.default)(_useState9, 2),
137
+ imageHover = _useState10[0],
138
+ setImageHover = _useState10[1];
139
+
140
+ var direction = "next";
141
+ var useStyles = (0, _styles.makeStyles)(function (theme) {
142
+ return {
143
+ button: {
144
+ backgroundColor: theme.hv.palette.atmosphere.atmo3
145
+ },
146
+ imageBox: {
147
+ minWidth: "100%",
148
+ display: "flex",
149
+ justifyContent: "center"
150
+ },
151
+ allImages: {
152
+ width: "max-content",
153
+ display: "flex"
154
+ }
155
+ };
156
+ });
157
+ var style = useStyles();
158
+
159
+ var _useScrollTo = (0, _uikitReactCore.useScrollTo)(0, (0, _uikitReactCore.setId)(elementId, "panel"), false, 100, documents, onChange, "row"),
160
+ _useScrollTo2 = (0, _slicedToArray2.default)(_useScrollTo, 2),
161
+ selectedIndex = _useScrollTo2[0],
162
+ setScrollTo = _useScrollTo2[1];
163
+
164
+ var _useScrollTo3 = (0, _uikitReactCore.useScrollTo)(0, (0, _uikitReactCore.setId)(elementId, "bigPanel"), false, 0, options, onChange, "row"),
165
+ _useScrollTo4 = (0, _slicedToArray2.default)(_useScrollTo3, 2),
166
+ selectedBigIndex = _useScrollTo4[0],
167
+ setBigScrollTo = _useScrollTo4[1];
168
+
169
+ var refBackwards = (0, _react.useRef)(null);
170
+ var refForwards = (0, _react.useRef)(null);
171
+ var typeCircle = "circle";
172
+ var handleSelection = (0, _react.useCallback)(function (event, value, index) {
173
+ var wrappedOnChange = function wrappedOnChange() {
174
+ onChange === null || onChange === void 0 ? void 0 : onChange(event, index);
175
+ };
176
+
177
+ setScrollTo(event, value, index, wrappedOnChange);
178
+ }, [onChange, setScrollTo]);
179
+
180
+ var handleFocus = function handleFocus(focus) {
181
+ if (focus === refBackwards.current || focus === refForwards.current) focus.focus();
182
+ };
183
+
184
+ var handleBigSelection = (0, _react.useCallback)(function (event, value, index) {
185
+ var wrappedOnChange = function wrappedOnChange() {
186
+ onChange === null || onChange === void 0 ? void 0 : onChange(event, index);
187
+ };
188
+
189
+ setBigScrollTo(event, value, index, wrappedOnChange);
190
+ }, [onChange, setBigScrollTo]);
191
+ var handleVisibility = (0, _react.useCallback)(function (event, value, index) {
192
+ var image = document.getElementById(value);
193
+ var panel = document.getElementById((0, _uikitReactCore.setId)(elementId, "panel"));
194
+ var container = document.getElementById((0, _uikitReactCore.setId)(elementId, "container"));
195
+ var containerWidth = container.offsetWidth;
196
+ var offsetPanel = panel.offsetLeft;
197
+ var offsetImage = image.offsetLeft;
198
+ var imageWidth = image.offsetWidth;
199
+ var scroll = panel.scrollLeft;
200
+ var focus = document.activeElement;
201
+
202
+ if (offsetPanel + offsetImage + offset + imageWidth - scroll > containerWidth || offsetImage - scroll < 0) {
203
+ handleSelection(event, value, index);
204
+ handleFocus(focus);
205
+ }
206
+ }, [elementId, handleSelection, offset]);
207
+ (0, _react.useEffect)(function () {
208
+ setCurrentStep === null || setCurrentStep === void 0 ? void 0 : setCurrentStep(selImage);
209
+ }, [selImage, setCurrentStep]);
210
+ (0, _react.useEffect)(function () {
211
+ if (fullscreen) setOffset(150);else setOffset(0);
212
+
213
+ if (thumbnails) {
214
+ handleVisibility(undefined, documents[selImage].value, selImage, selectedIndex);
215
+ }
216
+
217
+ handleBigSelection(undefined, options[selImage].value, selImage, selectedBigIndex);
218
+ }, [documents, fullscreen, handleBigSelection, handleVisibility, options, selImage, selectedBigIndex, selectedIndex, thumbnails]);
219
+
220
+ var changeSlice = function changeSlice() {
221
+ if (direction === "next") {
222
+ if (infiniteCarousel && selImage === documents.length - 1) setSliceStart(0);else if (selImage > sliceStart + 2 && selImage !== documents.length - 2) setSliceStart(sliceStart + 1);
223
+ }
224
+
225
+ if (direction === "prev") {
226
+ if (infiniteCarousel && selImage === 0) setSliceStart(documents.length > 5 ? documents.length - 5 : 0);else if (selImage < sliceStart + 2 && selImage !== 1) setSliceStart(sliceStart - 1);
227
+ }
228
+ };
229
+
230
+ var nextImage = function nextImage() {
231
+ var next;
232
+ if (selImage !== documents.length - 1) next = selImage + 1;else if (infiniteCarousel) next = 0;
233
+ setImage(next);
234
+
235
+ if (xs) {
236
+ direction = "next";
237
+ changeSlice();
238
+ }
239
+ };
240
+
241
+ var previousImage = function previousImage() {
242
+ var previous;
243
+ if (selImage !== 0) previous = selImage - 1;else if (infiniteCarousel) previous = documents.length - 1;
244
+ setImage(previous);
245
+
246
+ if (xs) {
247
+ direction = "prev";
248
+ changeSlice();
249
+ }
250
+ };
251
+
252
+ var styleThumbnail = function styleThumbnail(index) {
253
+ if (index !== selImage) return classes.img;
254
+ return classes.thumbnailSelected;
255
+ };
256
+
257
+ var circleType = function circleType(index) {
258
+ if (index === selImage) {
259
+ typeCircle = "BigCircle";
260
+ if (xs) return classes.xsSelectedCircle;
261
+ return classes.selectedCircle;
262
+ }
263
+
264
+ typeCircle = "Circle";
265
+ return classes.miniCircle;
266
+ };
267
+
268
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_uikitReactCore.HvContainer, _objectSpread(_objectSpread({
269
+ id: (0, _uikitReactCore.setId)(elementId, "container"),
270
+ className: (0, _clsx.default)(className, classes.root, xs ? "xs" : "nxs", fullscreen && classes.fullscreenStyle)
271
+ }, others), {}, {
272
+ children: [!xs && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
273
+ className: classes.title,
274
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
275
+ children: title
276
+ }), fullscreenProp && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
277
+ children: fullscreen ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
278
+ className: classes.closeButton,
279
+ icon: true,
280
+ "aria-label": "Close",
281
+ onClick: function onClick() {
282
+ return setFullscreen(!fullscreen);
283
+ },
284
+ children: _Close || (_Close = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Close, {}))
285
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
286
+ icon: true,
287
+ "aria-label": "Fullscreen",
288
+ onClick: function onClick() {
289
+ return setFullscreen(true);
290
+ },
291
+ children: _Fullscreen || (_Fullscreen = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Fullscreen, {}))
292
+ })
293
+ })]
294
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_uikitReactCore.HvContainer, {
295
+ className: (0, _clsx.default)(classes.imageContainer, fullscreen ? "fullscreen" : "notFullscreen", !xs && "nxs"),
296
+ onFocus: function onFocus() {
297
+ return setImageHover(true);
298
+ },
299
+ onMouseOver: function onMouseOver() {
300
+ return setImageHover(true);
301
+ },
302
+ onBlur: function onBlur() {
303
+ return setImageHover(false);
304
+ },
305
+ onMouseOut: function onMouseOut() {
306
+ return setImageHover(false);
307
+ },
308
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvPanel, {
309
+ className: (0, _clsx.default)(classes.stack, xs ? "xs" : "nxs"),
310
+ id: (0, _uikitReactCore.setId)(elementId, "bigPanel"),
311
+ children: options.map(function (element, index) {
312
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
313
+ className: style.imageBox,
314
+ id: element.value,
315
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Fade, {
316
+ in: selImage === index || xs,
317
+ timeout: {
318
+ appear: 500,
319
+ enter: 1200,
320
+ exit: 200
321
+ },
322
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
323
+ className: (0, _clsx.default)(classes.selectedImage, xs ? "xs" : "nxs", fullscreen ? "fullscreen" : "notFullscreen", variant),
324
+ src: element.src,
325
+ alt: element.value
326
+ }, "image ".concat(element.value))
327
+ })
328
+ }, "div ".concat(element.value));
329
+ })
330
+ }), (xs || lowCardinality) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
331
+ className: (0, _clsx.default)(classes.lowButtons, !xs && "nxs"),
332
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
333
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Fade, {
334
+ in: imageHover || visibleArrows,
335
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
336
+ ref: refBackwards,
337
+ className: classes.button,
338
+ icon: true,
339
+ "aria-label": "Backwards",
340
+ onClick: function onClick(event) {
341
+ return previousImage(event);
342
+ },
343
+ children: _Backwards || (_Backwards = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Backwards, {}))
344
+ })
345
+ })
346
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
347
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Fade, {
348
+ in: imageHover || visibleArrows,
349
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
350
+ ref: refForwards,
351
+ className: classes.button,
352
+ icon: true,
353
+ "aria-label": "Forwards",
354
+ onClick: function onClick(event) {
355
+ return nextImage(event);
356
+ },
357
+ children: _Forwards || (_Forwards = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Forwards, {}))
358
+ })
359
+ })
360
+ })]
361
+ }), xs && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
362
+ className: classes.xsCircles,
363
+ children: documents.map(function (element, index) {
364
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
365
+ className: circleType(index),
366
+ title: typeCircle
367
+ }, "Circle ".concat(element.value));
368
+ }).slice(sliceStart, sliceStart + 5)
369
+ }), counter && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
370
+ className: (0, _clsx.default)(classes.divCounter, !xs && "nxs"),
371
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
372
+ className: classes.counter,
373
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvTypography, {
374
+ variant: "normalText",
375
+ style: {
376
+ color: "white"
377
+ },
378
+ children: "".concat(selImage + 1, "/").concat(documents.length)
379
+ })
380
+ })
381
+ })]
382
+ }), !xs && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
383
+ children: [lowCardinality ? /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
384
+ className: classes.circles,
385
+ children: documents.map(function (element, index) {
386
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
387
+ className: circleType(index),
388
+ title: "".concat(typeCircle, " ").concat(index)
389
+ }, "Circle ".concat(element.value));
390
+ })
391
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_uikitReactCore.HvGrid, {
392
+ className: (0, _clsx.default)(classes.normalButtons),
393
+ container: true,
394
+ justifyContent: "space-between",
395
+ alignItems: "center",
396
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvGrid, {
397
+ item: true,
398
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
399
+ className: infiniteCarousel || selImage !== 0 ? "" : classes.hidden,
400
+ ref: refBackwards,
401
+ icon: true,
402
+ "aria-label": "Backwards",
403
+ onClick: function onClick(event) {
404
+ return previousImage(event);
405
+ },
406
+ children: _Backwards2 || (_Backwards2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Backwards, {}))
407
+ })
408
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_uikitReactCore.HvGrid, {
409
+ item: true,
410
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvTypography, {
411
+ variant: "highlightText",
412
+ component: "a",
413
+ children: selImage + 1
414
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvTypography, {
415
+ variant: "normalText",
416
+ component: "a",
417
+ children: " / ".concat(documents.length)
418
+ })]
419
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvGrid, {
420
+ item: true,
421
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvButton, {
422
+ className: infiniteCarousel || selImage !== documents.length - 1 ? "" : classes.hidden,
423
+ ref: refForwards,
424
+ icon: true,
425
+ "aria-label": "Forwards",
426
+ onClick: function onClick(event) {
427
+ return nextImage(event);
428
+ },
429
+ children: _Forwards2 || (_Forwards2 = /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactIcons.Forwards, {}))
430
+ })
431
+ })]
432
+ }), thumbnails && /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvPanel, {
433
+ className: classes.panel,
434
+ id: (0, _uikitReactCore.setId)(elementId, "panel"),
435
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_uikitReactCore.HvStack, {
436
+ direction: "row",
437
+ spacing: "xs",
438
+ withNavigation: true,
439
+ children: documents.map(function (element, i) {
440
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
441
+ id: element.value,
442
+ className: classes.thumbnailButton,
443
+ onClick: function onClick() {
444
+ return setImage(i);
445
+ },
446
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("img", {
447
+ className: styleThumbnail(i),
448
+ src: element.src,
449
+ alt: element.value
450
+ }, "Thumbnail ".concat(element.value))
451
+ }, "Button ".concat(element.value));
452
+ })
453
+ }, "Thumbnails")
454
+ })]
455
+ })]
456
+ }));
457
+ };
458
+
459
+ process.env.NODE_ENV !== "production" ? HvImageCarousel.propTypes = {
460
+ /**
461
+ * Class names to be applied.
462
+ */
463
+ className: _propTypes.default.string,
464
+
465
+ /**
466
+ * A Jss Object used to override or extend the styles applied.
467
+ */
468
+ classes: _propTypes.default.shape({
469
+ /**
470
+ * Styles applied to the component root class.
471
+ */
472
+ root: _propTypes.default.string,
473
+
474
+ /**
475
+ * Styles applied to the component SelectedImage.
476
+ */
477
+ selectedImage: _propTypes.default.string,
478
+
479
+ /**
480
+ * Styles applied to xs mode
481
+ */
482
+ xsMode: _propTypes.default.string,
483
+
484
+ /**
485
+ * Styles applied to image in xsMode
486
+ */
487
+ xsImage: _propTypes.default.string,
488
+
489
+ /**
490
+ * Styles applied to panel with low cardinality circles
491
+ */
492
+ circles: _propTypes.default.string,
493
+
494
+ /**
495
+ * Styles applied to xs mode circles
496
+ */
497
+ xsCircles: _propTypes.default.string,
498
+
499
+ /**
500
+ * Styles applied to unavailable button
501
+ */
502
+ hidden: _propTypes.default.string,
503
+
504
+ /**
505
+ * Styles applied to the carousel title
506
+ */
507
+ title: _propTypes.default.string,
508
+
509
+ /**
510
+ * Styles applied to the counter
511
+ */
512
+ counter: _propTypes.default.string,
513
+
514
+ /**
515
+ * Styles applied to the div with the counter
516
+ */
517
+ divCounter: _propTypes.default.string,
518
+
519
+ /**
520
+ * Styles applied to the thumbnails
521
+ */
522
+ img: _propTypes.default.string,
523
+
524
+ /**
525
+ * Styles applied to the selected thumbnail
526
+ */
527
+ thumbnailSelected: _propTypes.default.string,
528
+
529
+ /**
530
+ * Styles applied to the thumbnail button
531
+ */
532
+ thumbnailButton: _propTypes.default.string,
533
+
534
+ /**
535
+ * Styles applied to the low cardinality circles
536
+ */
537
+ miniCircle: _propTypes.default.string,
538
+
539
+ /**
540
+ * Styles applied to the circle of the selected image
541
+ */
542
+ selectedCircle: _propTypes.default.string,
543
+
544
+ /**
545
+ * Styles applied to the circle of the selected image in xsmode
546
+ */
547
+ xsSelectedCircle: _propTypes.default.string,
548
+
549
+ /**
550
+ * Styles applied to the panel with low cardinality buttons
551
+ */
552
+ lowButtons: _propTypes.default.string,
553
+
554
+ /**
555
+ * Styles applied to the container of the selected image
556
+ */
557
+ imageContainer: _propTypes.default.string,
558
+
559
+ /**
560
+ * Styles applied to the panel with the thumbnails
561
+ */
562
+ stack: _propTypes.default.string,
563
+
564
+ /**
565
+ * Styles applied to the panel that contains the buttons and counter in default mode
566
+ */
567
+ normalButtons: _propTypes.default.string,
568
+
569
+ /**
570
+ * Styles applied to fullscreen mode.
571
+ */
572
+ fullscreenStyle: _propTypes.default.string,
573
+
574
+ /**
575
+ * Styles applied to close button in fullscreen mode.
576
+ */
577
+ closeButton: _propTypes.default.string,
578
+
579
+ /**
580
+ * Styles applied to change image buttons.
581
+ */
582
+ button: _propTypes.default.string,
583
+
584
+ /**
585
+ * Styles applied to thumbnails panel.
586
+ */
587
+ panel: _propTypes.default.string
588
+ }).isRequired,
589
+
590
+ /**
591
+ * Documents to be displayed.
592
+ */
593
+ documents: _propTypes.default.array.isRequired,
594
+
595
+ /**
596
+ * Title of the image carousel
597
+ */
598
+ title: _propTypes.default.node,
599
+
600
+ /**
601
+ * A function called each time the selected image changes.
602
+ */
603
+ onChange: _propTypes.default.func,
604
+
605
+ /**
606
+ * Id to be applied to the root node.
607
+ */
608
+ id: _propTypes.default.string,
609
+
610
+ /**
611
+ * A flag that activates the thumbnails.
612
+ */
613
+ thumbnails: _propTypes.default.bool,
614
+
615
+ /**
616
+ * A flag that switches to low cardinality mode
617
+ */
618
+ lowCardinality: _propTypes.default.bool,
619
+
620
+ /**
621
+ * A flag that activates the infinite carousel behavior
622
+ */
623
+ infiniteCarousel: _propTypes.default.bool,
624
+
625
+ /**
626
+ * A flag that activates a counter on the top right corner of the selected image
627
+ */
628
+ counter: _propTypes.default.bool,
629
+
630
+ /**
631
+ * Set Image Carousel to fullscreen mode
632
+ */
633
+ fullscreen: _propTypes.default.bool,
634
+
635
+ /**
636
+ * Set selected image to a particular image in documents
637
+ */
638
+ currentStep: _propTypes.default.number,
639
+
640
+ /**
641
+ * Function that changes the selected image
642
+ */
643
+ setCurrentStep: _propTypes.default.func,
644
+
645
+ /**
646
+ * Image Carousel set to xs mode
647
+ */
648
+ xs: _propTypes.default.bool,
649
+
650
+ /**
651
+ * Arrows always displayed in low cardinality or xs mode
652
+ */
653
+ visibleArrows: _propTypes.default.bool,
654
+
655
+ /**
656
+ * Selected image fit variant
657
+ */
658
+ variant: _propTypes.default.string
659
+ } : void 0;
660
+
661
+ var _default = (0, _styles.withStyles)(_styles2.default, {
662
+ name: "HvImageCarousel"
663
+ })(HvImageCarousel);
664
+
665
+ exports.default = _default;
666
+ //# sourceMappingURL=ImageCarousel.js.map