@hitachivantara/uikit-react-lab 4.0.3 → 4.0.4

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 (420) hide show
  1. package/dist/ColorPicker/ColorPicker.js +25 -78
  2. package/dist/ColorPicker/ColorPicker.js.map +1 -1
  3. package/dist/ColorPicker/Fields/Fields.js +15 -47
  4. package/dist/ColorPicker/Fields/Fields.js.map +1 -1
  5. package/dist/ColorPicker/Fields/index.js +0 -2
  6. package/dist/ColorPicker/Fields/index.js.map +1 -1
  7. package/dist/ColorPicker/Fields/styles.js +0 -2
  8. package/dist/ColorPicker/Fields/styles.js.map +1 -1
  9. package/dist/ColorPicker/Picker/Picker.js +5 -23
  10. package/dist/ColorPicker/Picker/Picker.js.map +1 -1
  11. package/dist/ColorPicker/Picker/index.js +0 -2
  12. package/dist/ColorPicker/Picker/index.js.map +1 -1
  13. package/dist/ColorPicker/Picker/styles.js +0 -2
  14. package/dist/ColorPicker/Picker/styles.js.map +1 -1
  15. package/dist/ColorPicker/PresetColors/PresetColors.js +2 -24
  16. package/dist/ColorPicker/PresetColors/PresetColors.js.map +1 -1
  17. package/dist/ColorPicker/PresetColors/index.js +0 -2
  18. package/dist/ColorPicker/PresetColors/index.js.map +1 -1
  19. package/dist/ColorPicker/PresetColors/styles.js +0 -2
  20. package/dist/ColorPicker/PresetColors/styles.js.map +1 -1
  21. package/dist/ColorPicker/index.js +0 -2
  22. package/dist/ColorPicker/index.js.map +1 -1
  23. package/dist/ColorPicker/styles.js +0 -2
  24. package/dist/ColorPicker/styles.js.map +1 -1
  25. package/dist/Drawer/Drawer.js +10 -50
  26. package/dist/Drawer/Drawer.js.map +1 -1
  27. package/dist/Drawer/index.js +0 -2
  28. package/dist/Drawer/index.js.map +1 -1
  29. package/dist/Drawer/styles.js +0 -3
  30. package/dist/Drawer/styles.js.map +1 -1
  31. package/dist/ImageCarousel/ImageCarousel.js +46 -149
  32. package/dist/ImageCarousel/ImageCarousel.js.map +1 -1
  33. package/dist/ImageCarousel/index.js +0 -2
  34. package/dist/ImageCarousel/index.js.map +1 -1
  35. package/dist/ImageCarousel/styles.js +0 -5
  36. package/dist/ImageCarousel/styles.js.map +1 -1
  37. package/dist/InlineEditor/InlineEditor.js +25 -82
  38. package/dist/InlineEditor/InlineEditor.js.map +1 -1
  39. package/dist/InlineEditor/index.js +0 -2
  40. package/dist/InlineEditor/index.js.map +1 -1
  41. package/dist/InlineEditor/styles.js +0 -14
  42. package/dist/InlineEditor/styles.js.map +1 -1
  43. package/dist/NavigationAnchors/NavigationAnchors.js +44 -116
  44. package/dist/NavigationAnchors/NavigationAnchors.js.map +1 -1
  45. package/dist/NavigationAnchors/NavigationOption.js +0 -10
  46. package/dist/NavigationAnchors/NavigationOption.js.map +1 -1
  47. package/dist/NavigationAnchors/index.js +0 -2
  48. package/dist/NavigationAnchors/index.js.map +1 -1
  49. package/dist/NavigationAnchors/styles.js +0 -2
  50. package/dist/NavigationAnchors/styles.js.map +1 -1
  51. package/dist/NotificationPanel/EmptyStatePanel/EmptyStatePanel.js +5 -26
  52. package/dist/NotificationPanel/EmptyStatePanel/EmptyStatePanel.js.map +1 -1
  53. package/dist/NotificationPanel/EmptyStatePanel/index.js +0 -2
  54. package/dist/NotificationPanel/EmptyStatePanel/index.js.map +1 -1
  55. package/dist/NotificationPanel/EmptyStatePanel/styles.js +0 -2
  56. package/dist/NotificationPanel/EmptyStatePanel/styles.js.map +1 -1
  57. package/dist/NotificationPanel/Notification/Notification.js +12 -57
  58. package/dist/NotificationPanel/Notification/Notification.js.map +1 -1
  59. package/dist/NotificationPanel/Notification/index.js +0 -2
  60. package/dist/NotificationPanel/Notification/index.js.map +1 -1
  61. package/dist/NotificationPanel/Notification/styles.js +0 -14
  62. package/dist/NotificationPanel/Notification/styles.js.map +1 -1
  63. package/dist/NotificationPanel/NotificationPanel.js +23 -92
  64. package/dist/NotificationPanel/NotificationPanel.js.map +1 -1
  65. package/dist/NotificationPanel/NotificationsIndicator/NotificationsIndicator.js +4 -35
  66. package/dist/NotificationPanel/NotificationsIndicator/NotificationsIndicator.js.map +1 -1
  67. package/dist/NotificationPanel/NotificationsIndicator/index.js +0 -2
  68. package/dist/NotificationPanel/NotificationsIndicator/index.js.map +1 -1
  69. package/dist/NotificationPanel/NotificationsIndicator/styles.js +0 -2
  70. package/dist/NotificationPanel/NotificationsIndicator/styles.js.map +1 -1
  71. package/dist/NotificationPanel/index.js +0 -2
  72. package/dist/NotificationPanel/index.js.map +1 -1
  73. package/dist/NotificationPanel/styles.js +0 -2
  74. package/dist/NotificationPanel/styles.js.map +1 -1
  75. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js +15 -44
  76. package/dist/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
  77. package/dist/StepNavigation/DefaultNavigation/Step/Step.js +9 -41
  78. package/dist/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
  79. package/dist/StepNavigation/DefaultNavigation/Step/index.js +0 -2
  80. package/dist/StepNavigation/DefaultNavigation/Step/index.js.map +1 -1
  81. package/dist/StepNavigation/DefaultNavigation/Step/styles.js +0 -2
  82. package/dist/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -1
  83. package/dist/StepNavigation/DefaultNavigation/index.js +0 -2
  84. package/dist/StepNavigation/DefaultNavigation/index.js.map +1 -1
  85. package/dist/StepNavigation/DefaultNavigation/styles.js +0 -2
  86. package/dist/StepNavigation/DefaultNavigation/styles.js.map +1 -1
  87. package/dist/StepNavigation/DefaultNavigation/utils.js +0 -3
  88. package/dist/StepNavigation/DefaultNavigation/utils.js.map +1 -1
  89. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js +6 -47
  90. package/dist/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
  91. package/dist/StepNavigation/SimpleNavigation/Dot/index.js +0 -2
  92. package/dist/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -1
  93. package/dist/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -1
  94. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js +14 -44
  95. package/dist/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
  96. package/dist/StepNavigation/SimpleNavigation/index.js +0 -2
  97. package/dist/StepNavigation/SimpleNavigation/index.js.map +1 -1
  98. package/dist/StepNavigation/SimpleNavigation/styles.js +0 -2
  99. package/dist/StepNavigation/SimpleNavigation/styles.js.map +1 -1
  100. package/dist/StepNavigation/SimpleNavigation/utils.js +0 -6
  101. package/dist/StepNavigation/SimpleNavigation/utils.js.map +1 -1
  102. package/dist/StepNavigation/StepNavigation.js +39 -106
  103. package/dist/StepNavigation/StepNavigation.js.map +1 -1
  104. package/dist/StepNavigation/index.js +0 -2
  105. package/dist/StepNavigation/index.js.map +1 -1
  106. package/dist/StepNavigation/styles.js +0 -2
  107. package/dist/StepNavigation/styles.js.map +1 -1
  108. package/dist/StepNavigation/utils.js.map +1 -1
  109. package/dist/TimeAgo/TimeAgo.js +13 -44
  110. package/dist/TimeAgo/TimeAgo.js.map +1 -1
  111. package/dist/TimeAgo/formatUtils.js +15 -35
  112. package/dist/TimeAgo/formatUtils.js.map +1 -1
  113. package/dist/TimeAgo/index.js +0 -3
  114. package/dist/TimeAgo/index.js.map +1 -1
  115. package/dist/TimeAgo/styles.js.map +1 -1
  116. package/dist/TimeAgo/useTimeAgo.js +7 -16
  117. package/dist/TimeAgo/useTimeAgo.js.map +1 -1
  118. package/dist/TimeAgo/useTimeout.js +0 -2
  119. package/dist/TimeAgo/useTimeout.js.map +1 -1
  120. package/dist/Wizard/Wizard.js +30 -82
  121. package/dist/Wizard/Wizard.js.map +1 -1
  122. package/dist/Wizard/WizardActions/WizardActions.js +26 -81
  123. package/dist/Wizard/WizardActions/WizardActions.js.map +1 -1
  124. package/dist/Wizard/WizardActions/index.js +0 -2
  125. package/dist/Wizard/WizardActions/index.js.map +1 -1
  126. package/dist/Wizard/WizardActions/styles.js +0 -2
  127. package/dist/Wizard/WizardActions/styles.js.map +1 -1
  128. package/dist/Wizard/WizardContainer/WizardContainer.js +5 -35
  129. package/dist/Wizard/WizardContainer/WizardContainer.js.map +1 -1
  130. package/dist/Wizard/WizardContainer/index.js +0 -2
  131. package/dist/Wizard/WizardContainer/index.js.map +1 -1
  132. package/dist/Wizard/WizardContainer/styles.js +0 -2
  133. package/dist/Wizard/WizardContainer/styles.js.map +1 -1
  134. package/dist/Wizard/WizardContent/LoadingContainer.js +2 -25
  135. package/dist/Wizard/WizardContent/LoadingContainer.js.map +1 -1
  136. package/dist/Wizard/WizardContent/WizardContent.js +10 -53
  137. package/dist/Wizard/WizardContent/WizardContent.js.map +1 -1
  138. package/dist/Wizard/WizardContent/index.js +0 -2
  139. package/dist/Wizard/WizardContent/index.js.map +1 -1
  140. package/dist/Wizard/WizardContent/styles.js +0 -2
  141. package/dist/Wizard/WizardContent/styles.js.map +1 -1
  142. package/dist/Wizard/WizardContext/WizardContext.js +0 -4
  143. package/dist/Wizard/WizardContext/WizardContext.js.map +1 -1
  144. package/dist/Wizard/WizardContext/WizardContextProvider.js +1 -10
  145. package/dist/Wizard/WizardContext/WizardContextProvider.js.map +1 -1
  146. package/dist/Wizard/WizardContext/index.js +0 -3
  147. package/dist/Wizard/WizardContext/index.js.map +1 -1
  148. package/dist/Wizard/WizardTitle/WizardTitle.js +16 -57
  149. package/dist/Wizard/WizardTitle/WizardTitle.js.map +1 -1
  150. package/dist/Wizard/WizardTitle/index.js +0 -2
  151. package/dist/Wizard/WizardTitle/index.js.map +1 -1
  152. package/dist/Wizard/WizardTitle/styles.js +0 -2
  153. package/dist/Wizard/WizardTitle/styles.js.map +1 -1
  154. package/dist/Wizard/index.js +0 -8
  155. package/dist/Wizard/index.js.map +1 -1
  156. package/dist/Wizard/styles.js +0 -2
  157. package/dist/Wizard/styles.js.map +1 -1
  158. package/dist/index.js +0 -23
  159. package/dist/index.js.map +1 -1
  160. package/dist/legacy/ColorPicker/ColorPicker.js +26 -51
  161. package/dist/legacy/ColorPicker/ColorPicker.js.map +1 -1
  162. package/dist/legacy/ColorPicker/Fields/Fields.js +17 -27
  163. package/dist/legacy/ColorPicker/Fields/Fields.js.map +1 -1
  164. package/dist/legacy/ColorPicker/Fields/index.js.map +1 -1
  165. package/dist/legacy/ColorPicker/Fields/styles.js.map +1 -1
  166. package/dist/legacy/ColorPicker/Picker/Picker.js +7 -7
  167. package/dist/legacy/ColorPicker/Picker/Picker.js.map +1 -1
  168. package/dist/legacy/ColorPicker/Picker/index.js.map +1 -1
  169. package/dist/legacy/ColorPicker/Picker/styles.js.map +1 -1
  170. package/dist/legacy/ColorPicker/PresetColors/PresetColors.js +2 -7
  171. package/dist/legacy/ColorPicker/PresetColors/PresetColors.js.map +1 -1
  172. package/dist/legacy/ColorPicker/PresetColors/index.js.map +1 -1
  173. package/dist/legacy/ColorPicker/PresetColors/styles.js.map +1 -1
  174. package/dist/legacy/ColorPicker/index.js.map +1 -1
  175. package/dist/legacy/ColorPicker/styles.js +0 -1
  176. package/dist/legacy/ColorPicker/styles.js.map +1 -1
  177. package/dist/legacy/Drawer/Drawer.js +11 -30
  178. package/dist/legacy/Drawer/Drawer.js.map +1 -1
  179. package/dist/legacy/Drawer/index.js.map +1 -1
  180. package/dist/legacy/Drawer/styles.js +0 -2
  181. package/dist/legacy/Drawer/styles.js.map +1 -1
  182. package/dist/legacy/ImageCarousel/ImageCarousel.js +46 -120
  183. package/dist/legacy/ImageCarousel/ImageCarousel.js.map +1 -1
  184. package/dist/legacy/ImageCarousel/index.js.map +1 -1
  185. package/dist/legacy/ImageCarousel/styles.js +0 -3
  186. package/dist/legacy/ImageCarousel/styles.js.map +1 -1
  187. package/dist/legacy/InlineEditor/InlineEditor.js +26 -55
  188. package/dist/legacy/InlineEditor/InlineEditor.js.map +1 -1
  189. package/dist/legacy/InlineEditor/index.js.map +1 -1
  190. package/dist/legacy/InlineEditor/styles.js +0 -5
  191. package/dist/legacy/InlineEditor/styles.js.map +1 -1
  192. package/dist/legacy/NavigationAnchors/NavigationAnchors.js +44 -82
  193. package/dist/legacy/NavigationAnchors/NavigationAnchors.js.map +1 -1
  194. package/dist/legacy/NavigationAnchors/NavigationOption.js +0 -5
  195. package/dist/legacy/NavigationAnchors/NavigationOption.js.map +1 -1
  196. package/dist/legacy/NavigationAnchors/index.js.map +1 -1
  197. package/dist/legacy/NavigationAnchors/styles.js +0 -1
  198. package/dist/legacy/NavigationAnchors/styles.js.map +1 -1
  199. package/dist/legacy/NotificationPanel/EmptyStatePanel/EmptyStatePanel.js +5 -16
  200. package/dist/legacy/NotificationPanel/EmptyStatePanel/EmptyStatePanel.js.map +1 -1
  201. package/dist/legacy/NotificationPanel/EmptyStatePanel/index.js.map +1 -1
  202. package/dist/legacy/NotificationPanel/EmptyStatePanel/styles.js +0 -1
  203. package/dist/legacy/NotificationPanel/EmptyStatePanel/styles.js.map +1 -1
  204. package/dist/legacy/NotificationPanel/Notification/Notification.js +12 -44
  205. package/dist/legacy/NotificationPanel/Notification/Notification.js.map +1 -1
  206. package/dist/legacy/NotificationPanel/Notification/index.js.map +1 -1
  207. package/dist/legacy/NotificationPanel/Notification/styles.js +0 -5
  208. package/dist/legacy/NotificationPanel/Notification/styles.js.map +1 -1
  209. package/dist/legacy/NotificationPanel/NotificationPanel.js +23 -61
  210. package/dist/legacy/NotificationPanel/NotificationPanel.js.map +1 -1
  211. package/dist/legacy/NotificationPanel/NotificationsIndicator/NotificationsIndicator.js +4 -17
  212. package/dist/legacy/NotificationPanel/NotificationsIndicator/NotificationsIndicator.js.map +1 -1
  213. package/dist/legacy/NotificationPanel/NotificationsIndicator/index.js.map +1 -1
  214. package/dist/legacy/NotificationPanel/NotificationsIndicator/styles.js +0 -1
  215. package/dist/legacy/NotificationPanel/NotificationsIndicator/styles.js.map +1 -1
  216. package/dist/legacy/NotificationPanel/index.js.map +1 -1
  217. package/dist/legacy/NotificationPanel/styles.js +0 -1
  218. package/dist/legacy/NotificationPanel/styles.js.map +1 -1
  219. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js +16 -27
  220. package/dist/legacy/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
  221. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js +10 -29
  222. package/dist/legacy/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
  223. package/dist/legacy/StepNavigation/DefaultNavigation/Step/index.js.map +1 -1
  224. package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js +0 -1
  225. package/dist/legacy/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -1
  226. package/dist/legacy/StepNavigation/DefaultNavigation/index.js.map +1 -1
  227. package/dist/legacy/StepNavigation/DefaultNavigation/styles.js +0 -1
  228. package/dist/legacy/StepNavigation/DefaultNavigation/styles.js.map +1 -1
  229. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js +0 -2
  230. package/dist/legacy/StepNavigation/DefaultNavigation/utils.js.map +1 -1
  231. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js +7 -21
  232. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
  233. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -1
  234. package/dist/legacy/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -1
  235. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js +15 -26
  236. package/dist/legacy/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
  237. package/dist/legacy/StepNavigation/SimpleNavigation/index.js.map +1 -1
  238. package/dist/legacy/StepNavigation/SimpleNavigation/styles.js +0 -1
  239. package/dist/legacy/StepNavigation/SimpleNavigation/styles.js.map +1 -1
  240. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js +0 -6
  241. package/dist/legacy/StepNavigation/SimpleNavigation/utils.js.map +1 -1
  242. package/dist/legacy/StepNavigation/StepNavigation.js +40 -78
  243. package/dist/legacy/StepNavigation/StepNavigation.js.map +1 -1
  244. package/dist/legacy/StepNavigation/index.js.map +1 -1
  245. package/dist/legacy/StepNavigation/styles.js +0 -1
  246. package/dist/legacy/StepNavigation/styles.js.map +1 -1
  247. package/dist/legacy/StepNavigation/utils.js.map +1 -1
  248. package/dist/legacy/TimeAgo/TimeAgo.js +14 -27
  249. package/dist/legacy/TimeAgo/TimeAgo.js.map +1 -1
  250. package/dist/legacy/TimeAgo/formatUtils.js +16 -18
  251. package/dist/legacy/TimeAgo/formatUtils.js.map +1 -1
  252. package/dist/legacy/TimeAgo/index.js.map +1 -1
  253. package/dist/legacy/TimeAgo/styles.js.map +1 -1
  254. package/dist/legacy/TimeAgo/useTimeAgo.js +8 -11
  255. package/dist/legacy/TimeAgo/useTimeAgo.js.map +1 -1
  256. package/dist/legacy/TimeAgo/useTimeout.js.map +1 -1
  257. package/dist/legacy/Wizard/Wizard.js +30 -56
  258. package/dist/legacy/Wizard/Wizard.js.map +1 -1
  259. package/dist/legacy/Wizard/WizardActions/WizardActions.js +26 -55
  260. package/dist/legacy/Wizard/WizardActions/WizardActions.js.map +1 -1
  261. package/dist/legacy/Wizard/WizardActions/index.js.map +1 -1
  262. package/dist/legacy/Wizard/WizardActions/styles.js +0 -1
  263. package/dist/legacy/Wizard/WizardActions/styles.js.map +1 -1
  264. package/dist/legacy/Wizard/WizardContainer/WizardContainer.js +5 -17
  265. package/dist/legacy/Wizard/WizardContainer/WizardContainer.js.map +1 -1
  266. package/dist/legacy/Wizard/WizardContainer/index.js.map +1 -1
  267. package/dist/legacy/Wizard/WizardContainer/styles.js +0 -1
  268. package/dist/legacy/Wizard/WizardContainer/styles.js.map +1 -1
  269. package/dist/legacy/Wizard/WizardContent/LoadingContainer.js +2 -8
  270. package/dist/legacy/Wizard/WizardContent/LoadingContainer.js.map +1 -1
  271. package/dist/legacy/Wizard/WizardContent/WizardContent.js +10 -26
  272. package/dist/legacy/Wizard/WizardContent/WizardContent.js.map +1 -1
  273. package/dist/legacy/Wizard/WizardContent/index.js.map +1 -1
  274. package/dist/legacy/Wizard/WizardContent/styles.js +0 -1
  275. package/dist/legacy/Wizard/WizardContent/styles.js.map +1 -1
  276. package/dist/legacy/Wizard/WizardContext/WizardContext.js +0 -2
  277. package/dist/legacy/Wizard/WizardContext/WizardContext.js.map +1 -1
  278. package/dist/legacy/Wizard/WizardContext/WizardContextProvider.js +1 -5
  279. package/dist/legacy/Wizard/WizardContext/WizardContextProvider.js.map +1 -1
  280. package/dist/legacy/Wizard/WizardContext/index.js.map +1 -1
  281. package/dist/legacy/Wizard/WizardTitle/WizardTitle.js +16 -41
  282. package/dist/legacy/Wizard/WizardTitle/WizardTitle.js.map +1 -1
  283. package/dist/legacy/Wizard/WizardTitle/index.js.map +1 -1
  284. package/dist/legacy/Wizard/WizardTitle/styles.js +0 -1
  285. package/dist/legacy/Wizard/WizardTitle/styles.js.map +1 -1
  286. package/dist/legacy/Wizard/index.js.map +1 -1
  287. package/dist/legacy/Wizard/styles.js +0 -1
  288. package/dist/legacy/Wizard/styles.js.map +1 -1
  289. package/dist/legacy/index.js.map +1 -1
  290. package/dist/modern/ColorPicker/ColorPicker.js +1 -25
  291. package/dist/modern/ColorPicker/ColorPicker.js.map +1 -1
  292. package/dist/modern/ColorPicker/Fields/Fields.js +3 -10
  293. package/dist/modern/ColorPicker/Fields/Fields.js.map +1 -1
  294. package/dist/modern/ColorPicker/Fields/index.js.map +1 -1
  295. package/dist/modern/ColorPicker/Fields/styles.js.map +1 -1
  296. package/dist/modern/ColorPicker/Picker/Picker.js +3 -3
  297. package/dist/modern/ColorPicker/Picker/Picker.js.map +1 -1
  298. package/dist/modern/ColorPicker/Picker/index.js.map +1 -1
  299. package/dist/modern/ColorPicker/Picker/styles.js.map +1 -1
  300. package/dist/modern/ColorPicker/PresetColors/PresetColors.js +0 -5
  301. package/dist/modern/ColorPicker/PresetColors/PresetColors.js.map +1 -1
  302. package/dist/modern/ColorPicker/PresetColors/index.js.map +1 -1
  303. package/dist/modern/ColorPicker/PresetColors/styles.js.map +1 -1
  304. package/dist/modern/ColorPicker/index.js.map +1 -1
  305. package/dist/modern/ColorPicker/styles.js +0 -1
  306. package/dist/modern/ColorPicker/styles.js.map +1 -1
  307. package/dist/modern/Drawer/Drawer.js +11 -30
  308. package/dist/modern/Drawer/Drawer.js.map +1 -1
  309. package/dist/modern/Drawer/index.js.map +1 -1
  310. package/dist/modern/Drawer/styles.js +0 -2
  311. package/dist/modern/Drawer/styles.js.map +1 -1
  312. package/dist/modern/ImageCarousel/ImageCarousel.js +18 -83
  313. package/dist/modern/ImageCarousel/ImageCarousel.js.map +1 -1
  314. package/dist/modern/ImageCarousel/index.js.map +1 -1
  315. package/dist/modern/ImageCarousel/styles.js +0 -1
  316. package/dist/modern/ImageCarousel/styles.js.map +1 -1
  317. package/dist/modern/InlineEditor/InlineEditor.js +16 -43
  318. package/dist/modern/InlineEditor/InlineEditor.js.map +1 -1
  319. package/dist/modern/InlineEditor/index.js.map +1 -1
  320. package/dist/modern/InlineEditor/styles.js +0 -5
  321. package/dist/modern/InlineEditor/styles.js.map +1 -1
  322. package/dist/modern/NavigationAnchors/NavigationAnchors.js +40 -74
  323. package/dist/modern/NavigationAnchors/NavigationAnchors.js.map +1 -1
  324. package/dist/modern/NavigationAnchors/NavigationOption.js +0 -6
  325. package/dist/modern/NavigationAnchors/NavigationOption.js.map +1 -1
  326. package/dist/modern/NavigationAnchors/index.js.map +1 -1
  327. package/dist/modern/NavigationAnchors/styles.js +0 -1
  328. package/dist/modern/NavigationAnchors/styles.js.map +1 -1
  329. package/dist/modern/NotificationPanel/EmptyStatePanel/EmptyStatePanel.js +0 -11
  330. package/dist/modern/NotificationPanel/EmptyStatePanel/EmptyStatePanel.js.map +1 -1
  331. package/dist/modern/NotificationPanel/EmptyStatePanel/index.js.map +1 -1
  332. package/dist/modern/NotificationPanel/EmptyStatePanel/styles.js +0 -1
  333. package/dist/modern/NotificationPanel/EmptyStatePanel/styles.js.map +1 -1
  334. package/dist/modern/NotificationPanel/Notification/Notification.js +2 -33
  335. package/dist/modern/NotificationPanel/Notification/Notification.js.map +1 -1
  336. package/dist/modern/NotificationPanel/Notification/index.js.map +1 -1
  337. package/dist/modern/NotificationPanel/Notification/styles.js +0 -5
  338. package/dist/modern/NotificationPanel/Notification/styles.js.map +1 -1
  339. package/dist/modern/NotificationPanel/NotificationPanel.js +16 -50
  340. package/dist/modern/NotificationPanel/NotificationPanel.js.map +1 -1
  341. package/dist/modern/NotificationPanel/NotificationsIndicator/NotificationsIndicator.js +6 -19
  342. package/dist/modern/NotificationPanel/NotificationsIndicator/NotificationsIndicator.js.map +1 -1
  343. package/dist/modern/NotificationPanel/NotificationsIndicator/index.js.map +1 -1
  344. package/dist/modern/NotificationPanel/NotificationsIndicator/styles.js +0 -1
  345. package/dist/modern/NotificationPanel/NotificationsIndicator/styles.js.map +1 -1
  346. package/dist/modern/NotificationPanel/index.js.map +1 -1
  347. package/dist/modern/NotificationPanel/styles.js +0 -1
  348. package/dist/modern/NotificationPanel/styles.js.map +1 -1
  349. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js +14 -23
  350. package/dist/modern/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
  351. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js +1 -20
  352. package/dist/modern/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
  353. package/dist/modern/StepNavigation/DefaultNavigation/Step/index.js.map +1 -1
  354. package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js +0 -1
  355. package/dist/modern/StepNavigation/DefaultNavigation/Step/styles.js.map +1 -1
  356. package/dist/modern/StepNavigation/DefaultNavigation/index.js.map +1 -1
  357. package/dist/modern/StepNavigation/DefaultNavigation/styles.js +0 -1
  358. package/dist/modern/StepNavigation/DefaultNavigation/styles.js.map +1 -1
  359. package/dist/modern/StepNavigation/DefaultNavigation/utils.js +0 -2
  360. package/dist/modern/StepNavigation/DefaultNavigation/utils.js.map +1 -1
  361. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js +1 -15
  362. package/dist/modern/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
  363. package/dist/modern/StepNavigation/SimpleNavigation/Dot/index.js.map +1 -1
  364. package/dist/modern/StepNavigation/SimpleNavigation/Dot/styles.js.map +1 -1
  365. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js +14 -23
  366. package/dist/modern/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
  367. package/dist/modern/StepNavigation/SimpleNavigation/index.js.map +1 -1
  368. package/dist/modern/StepNavigation/SimpleNavigation/styles.js +0 -1
  369. package/dist/modern/StepNavigation/SimpleNavigation/styles.js.map +1 -1
  370. package/dist/modern/StepNavigation/SimpleNavigation/utils.js +0 -6
  371. package/dist/modern/StepNavigation/SimpleNavigation/utils.js.map +1 -1
  372. package/dist/modern/StepNavigation/StepNavigation.js +25 -62
  373. package/dist/modern/StepNavigation/StepNavigation.js.map +1 -1
  374. package/dist/modern/StepNavigation/index.js.map +1 -1
  375. package/dist/modern/StepNavigation/styles.js +0 -1
  376. package/dist/modern/StepNavigation/styles.js.map +1 -1
  377. package/dist/modern/StepNavigation/utils.js.map +1 -1
  378. package/dist/modern/TimeAgo/TimeAgo.js +11 -24
  379. package/dist/modern/TimeAgo/TimeAgo.js.map +1 -1
  380. package/dist/modern/TimeAgo/formatUtils.js +16 -18
  381. package/dist/modern/TimeAgo/formatUtils.js.map +1 -1
  382. package/dist/modern/TimeAgo/index.js.map +1 -1
  383. package/dist/modern/TimeAgo/styles.js.map +1 -1
  384. package/dist/modern/TimeAgo/useTimeAgo.js +1 -3
  385. package/dist/modern/TimeAgo/useTimeAgo.js.map +1 -1
  386. package/dist/modern/TimeAgo/useTimeout.js.map +1 -1
  387. package/dist/modern/Wizard/Wizard.js +21 -46
  388. package/dist/modern/Wizard/Wizard.js.map +1 -1
  389. package/dist/modern/Wizard/WizardActions/WizardActions.js +0 -24
  390. package/dist/modern/Wizard/WizardActions/WizardActions.js.map +1 -1
  391. package/dist/modern/Wizard/WizardActions/index.js.map +1 -1
  392. package/dist/modern/Wizard/WizardActions/styles.js +0 -1
  393. package/dist/modern/Wizard/WizardActions/styles.js.map +1 -1
  394. package/dist/modern/Wizard/WizardContainer/WizardContainer.js +7 -19
  395. package/dist/modern/Wizard/WizardContainer/WizardContainer.js.map +1 -1
  396. package/dist/modern/Wizard/WizardContainer/index.js.map +1 -1
  397. package/dist/modern/Wizard/WizardContainer/styles.js +0 -1
  398. package/dist/modern/Wizard/WizardContainer/styles.js.map +1 -1
  399. package/dist/modern/Wizard/WizardContent/LoadingContainer.js +4 -10
  400. package/dist/modern/Wizard/WizardContent/LoadingContainer.js.map +1 -1
  401. package/dist/modern/Wizard/WizardContent/WizardContent.js +0 -14
  402. package/dist/modern/Wizard/WizardContent/WizardContent.js.map +1 -1
  403. package/dist/modern/Wizard/WizardContent/index.js.map +1 -1
  404. package/dist/modern/Wizard/WizardContent/styles.js +0 -1
  405. package/dist/modern/Wizard/WizardContent/styles.js.map +1 -1
  406. package/dist/modern/Wizard/WizardContext/WizardContext.js +0 -2
  407. package/dist/modern/Wizard/WizardContext/WizardContext.js.map +1 -1
  408. package/dist/modern/Wizard/WizardContext/WizardContextProvider.js +0 -4
  409. package/dist/modern/Wizard/WizardContext/WizardContextProvider.js.map +1 -1
  410. package/dist/modern/Wizard/WizardContext/index.js.map +1 -1
  411. package/dist/modern/Wizard/WizardTitle/WizardTitle.js +2 -23
  412. package/dist/modern/Wizard/WizardTitle/WizardTitle.js.map +1 -1
  413. package/dist/modern/Wizard/WizardTitle/index.js.map +1 -1
  414. package/dist/modern/Wizard/WizardTitle/styles.js +0 -1
  415. package/dist/modern/Wizard/WizardTitle/styles.js.map +1 -1
  416. package/dist/modern/Wizard/index.js.map +1 -1
  417. package/dist/modern/Wizard/styles.js +0 -1
  418. package/dist/modern/Wizard/styles.js.map +1 -1
  419. package/dist/modern/index.js.map +1 -1
  420. package/package.json +4 -4
@@ -1,14 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["className", "classes", "width", "steps", "stepSize", "showTitles", "type"],
4
- _excluded2 = ["state", "title", "separatorClassName"],
5
- _excluded3 = ["stepsWidth", "navWidth"];
6
- import "core-js/modules/web.dom-collections.iterator.js";
7
-
4
+ _excluded2 = ["state", "title", "separatorClassName"],
5
+ _excluded3 = ["stepsWidth", "navWidth"];
8
6
  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
7
  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
8
  import React from "react";
13
9
  import PropTypes from "prop-types";
14
10
  import clsx from "clsx";
@@ -19,6 +15,7 @@ import HvDefaultNavigation from "./DefaultNavigation";
19
15
  import HvSimpleNavigation from "./SimpleNavigation";
20
16
  import { SEPARATOR_WIDTH, TITLE_MARGIN, TITLE_WIDTH } from "./utils";
21
17
  import styles from "./styles";
18
+
22
19
  /**
23
20
  * Navigation page with steps.
24
21
  *
@@ -40,38 +37,32 @@ import styles from "./styles";
40
37
  * displayed above, the width of the separator element will be 100px.
41
38
  * If the step component has titles, each one will have 215px of width by default.
42
39
  */
43
-
44
40
  import { jsx as _jsx } from "react/jsx-runtime";
45
-
46
41
  const HvStepNavigation = _ref => {
47
42
  let {
48
- className,
49
- classes,
50
- width,
51
- steps,
52
- stepSize,
53
- showTitles,
54
- type = "Default"
55
- } = _ref,
56
- others = _objectWithoutProperties(_ref, _excluded);
57
-
58
- const theme = useTheme(); // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'
59
-
60
- const breakpoint = useWidth(); // step configurations
61
-
43
+ className,
44
+ classes,
45
+ width,
46
+ steps,
47
+ stepSize,
48
+ showTitles,
49
+ type = "Default"
50
+ } = _ref,
51
+ others = _objectWithoutProperties(_ref, _excluded);
52
+ const theme = useTheme();
53
+ // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'
54
+ const breakpoint = useWidth();
55
+ // step configurations
62
56
  const stepSizeKey = stepSize !== null && stepSize !== void 0 ? stepSize : ["xs", "sm"].includes(breakpoint) ? "SM" : "MD";
63
57
  const hasTitles = showTitles !== null && showTitles !== void 0 ? showTitles : !["xs", "sm"].includes(breakpoint);
64
-
65
58
  const styledLi = containerSize => styled("li")({
66
59
  width: containerSize,
67
60
  height: containerSize
68
61
  });
69
-
70
62
  const styledDiv = containerSize => styled("div")({
71
63
  width: containerSize,
72
64
  height: containerSize
73
65
  });
74
-
75
66
  const styledSeparatorElement = (title, separatorClassName, separatorHeight, separatorWidth, backgroundColor) => {
76
67
  const Separator = withStyles({
77
68
  separatorElement: {
@@ -93,7 +84,6 @@ const HvStepNavigation = _ref => {
93
84
  children: /*#__PURE__*/_jsx(Separator, {})
94
85
  }, `separator-${title}`);
95
86
  };
96
-
97
87
  const drawItems = ({
98
88
  separatorValues: {
99
89
  minWidth,
@@ -109,23 +99,20 @@ const HvStepNavigation = _ref => {
109
99
  }) => {
110
100
  const items = steps.reduce((acc, _ref2, index) => {
111
101
  let {
112
- state,
113
- title,
114
- separatorClassName
115
- } = _ref2,
116
- props = _objectWithoutProperties(_ref2, _excluded2);
117
-
102
+ state,
103
+ title,
104
+ separatorClassName
105
+ } = _ref2,
106
+ props = _objectWithoutProperties(_ref2, _excluded2);
118
107
  const containerSize = state === "Current" ? maxSize : minSize;
119
108
  const StepContainer = styledLi(containerSize);
120
109
  const Step = styledDiv(Math.max(containerSize, 30), Math.max(containerSize, 30));
121
-
122
110
  const stepProps = _objectSpread({}, _objectSpread({
123
111
  size: stepSizeKey,
124
112
  state,
125
113
  title,
126
114
  number: index + 1
127
115
  }, props));
128
-
129
116
  const stepElement = /*#__PURE__*/_jsx(StepContainer, {
130
117
  className: classes.li,
131
118
  children: hasTitles ? /*#__PURE__*/_jsx(StepComponent, _objectSpread({
@@ -146,12 +133,10 @@ const HvStepNavigation = _ref => {
146
133
  })
147
134
  })
148
135
  }, `step-${title}`);
149
-
150
136
  if (index < steps.length - 1) {
151
137
  const separatorElement = styledSeparatorElement(title, separatorClassName, height, [steps[index + 1].state, state].includes("Current") ? minWidth : maxWidth, getColor(steps[index + 1].state === "Disabled" ? "Disabled" : state, theme));
152
138
  return [...acc, stepElement, separatorElement];
153
139
  }
154
-
155
140
  return [...acc, stepElement];
156
141
  }, []);
157
142
  return /*#__PURE__*/_jsx("ol", {
@@ -159,10 +144,8 @@ const HvStepNavigation = _ref => {
159
144
  children: items
160
145
  });
161
146
  };
162
-
163
147
  const getDynamicValues = stepsWidth => {
164
148
  var _width$breakpoint, _theme$breakpoints$va, _theme$breakpoints$va2;
165
-
166
149
  const maxWidth = (_width$breakpoint = width === null || width === void 0 ? void 0 : width[breakpoint]) !== null && _width$breakpoint !== void 0 ? _width$breakpoint : Math.max(Number(hasTitles) * (TITLE_WIDTH + TITLE_MARGIN) * steps.length - TITLE_MARGIN, SEPARATOR_WIDTH * (steps.length - 1) + stepsWidth);
167
150
  const next = theme.breakpoints.keys.find((_, index, self) => index - 1 >= 0 ? self[index - 1] === breakpoint : false);
168
151
  const navWidth = Math.min(maxWidth, (_theme$breakpoints$va = (_theme$breakpoints$va2 = theme.breakpoints.values) === null || _theme$breakpoints$va2 === void 0 ? void 0 : _theme$breakpoints$va2[next]) !== null && _theme$breakpoints$va !== void 0 ? _theme$breakpoints$va : maxWidth);
@@ -174,7 +157,6 @@ const HvStepNavigation = _ref => {
174
157
  separatorWidth
175
158
  };
176
159
  };
177
-
178
160
  const styledTitle = (titleClassName, variant, title, titleWidth) => withStyles({
179
161
  stepTitle: {
180
162
  textAlign: "center",
@@ -190,7 +172,6 @@ const HvStepNavigation = _ref => {
190
172
  className: clsx(stepTitle, titleClassName),
191
173
  children: title
192
174
  }) : null);
193
-
194
175
  const getTitles = getTitleProps => hasTitles ? /*#__PURE__*/_jsx("div", {
195
176
  className: classes.titles,
196
177
  children: steps.map(({
@@ -211,7 +192,6 @@ const HvStepNavigation = _ref => {
211
192
  return /*#__PURE__*/_jsx(Title, {}, `step-title-${rawTitle}`);
212
193
  })
213
194
  }) : null;
214
-
215
195
  const StepNavigation = {
216
196
  Default: HvDefaultNavigation,
217
197
  Simple: HvSimpleNavigation
@@ -225,11 +205,10 @@ const HvStepNavigation = _ref => {
225
205
  }, others)), {}, {
226
206
  children: _ref3 => {
227
207
  let {
228
- stepsWidth,
229
- navWidth
230
- } = _ref3,
231
- itemsProps = _objectWithoutProperties(_ref3, _excluded3);
232
-
208
+ stepsWidth,
209
+ navWidth
210
+ } = _ref3,
211
+ itemsProps = _objectWithoutProperties(_ref3, _excluded3);
233
212
  return /*#__PURE__*/_jsx(Typography, {
234
213
  component: "nav",
235
214
  style: {
@@ -241,13 +220,11 @@ const HvStepNavigation = _ref => {
241
220
  }
242
221
  }));
243
222
  };
244
-
245
223
  process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
246
224
  /**
247
225
  * Class names to be applied.
248
226
  */
249
227
  className: PropTypes.string,
250
-
251
228
  /**
252
229
  * A Jss Object used to override or extend the styles applied.
253
230
  */
@@ -256,33 +233,27 @@ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
256
233
  * Styles applied to the component root class.
257
234
  */
258
235
  root: PropTypes.string,
259
-
260
236
  /**
261
237
  * Styles applied to the li element.
262
238
  */
263
239
  li: PropTypes.string,
264
-
265
240
  /**
266
241
  * Styles applied to the ol element.
267
242
  */
268
243
  ol: PropTypes.string,
269
-
270
244
  /**
271
245
  * Styles applied to the separator element.
272
246
  */
273
247
  separator: PropTypes.string,
274
-
275
248
  /**
276
249
  * Styles applied to the titles container element.
277
250
  */
278
251
  titles: PropTypes.string
279
252
  }).isRequired,
280
-
281
253
  /**
282
254
  * Type of step navigation. Values = {"Simple", "Default"}.
283
255
  */
284
256
  type: PropTypes.oneOf(["Simple", "Default"]),
285
-
286
257
  /**
287
258
  * Steps to show on the component.
288
259
  */
@@ -291,39 +262,32 @@ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
291
262
  * Class names to override styles on the step component.
292
263
  */
293
264
  className: PropTypes.string,
294
-
295
265
  /**
296
266
  * Class names to override styles on the separator component after the step.
297
267
  */
298
268
  separatorClassName: PropTypes.string,
299
-
300
269
  /**
301
270
  * Class names to override styles on the title component above the step.
302
271
  */
303
272
  titleClassName: PropTypes.string,
304
-
305
273
  /**
306
274
  * Title of the step.
307
275
  */
308
276
  title: PropTypes.string.isRequired,
309
-
310
277
  /**
311
278
  * State of the step. Values = {"Pending", "Failed", "Completed", "Current", "Disabled", "Enabled"}.
312
279
  */
313
280
  state: PropTypes.oneOf(["Pending", "Failed", "Completed", "Current", "Disabled", "Enabled"]).isRequired,
314
-
315
281
  /**
316
282
  * Define if a step is disabled/enabled.
317
283
  * If this property is not defined and the step is on state "Disabled", the step component will be disabled
318
284
  */
319
285
  disabled: PropTypes.bool
320
286
  })).isRequired,
321
-
322
287
  /**
323
288
  * Sets one of the standard sizes of the steps. Values = {"XS", "SM", "MD", "LG", "XL"}
324
289
  */
325
290
  stepSize: PropTypes.oneOf(["XS", "SM", "MD", "LG", "XL"]),
326
-
327
291
  /**
328
292
  * Width of the component element on each breakpoint screen resolution.
329
293
  */
@@ -334,7 +298,6 @@ process.env.NODE_ENV !== "production" ? HvStepNavigation.propTypes = {
334
298
  lg: PropTypes.number,
335
299
  xl: PropTypes.number
336
300
  }),
337
-
338
301
  /**
339
302
  * Defines either show a title or only a tooltip on each step component
340
303
  */
@@ -1 +1 @@
1
- {"version":3,"file":"StepNavigation.js","names":["React","PropTypes","clsx","Typography","styled","useTheme","withStyles","HvTooltip","HvTypography","useWidth","HvDefaultNavigation","HvSimpleNavigation","SEPARATOR_WIDTH","TITLE_MARGIN","TITLE_WIDTH","styles","HvStepNavigation","className","classes","width","steps","stepSize","showTitles","type","others","theme","breakpoint","stepSizeKey","includes","hasTitles","styledLi","containerSize","height","styledDiv","styledSeparatorElement","title","separatorClassName","separatorHeight","separatorWidth","backgroundColor","Separator","separatorElement","separator","drawItems","separatorValues","minWidth","maxWidth","getColor","stepValues","minSize","maxSize","StepComponent","items","reduce","acc","index","state","props","StepContainer","Step","Math","max","stepProps","size","number","stepElement","li","length","ol","getDynamicValues","stepsWidth","Number","next","breakpoints","keys","find","_","self","navWidth","min","values","titleWidth","ceil","styledTitle","titleClassName","variant","stepTitle","textAlign","marginRight","getTitles","getTitleProps","titles","map","rawTitle","Title","StepNavigation","Default","Simple","numSteps","root","itemsProps","margin","propTypes","string","shape","isRequired","oneOf","arrayOf","disabled","bool","xs","sm","md","lg","xl","name"],"sources":["../../../src/StepNavigation/StepNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { Typography, styled, useTheme } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport { HvTooltip, HvTypography, useWidth } from \"@hitachivantara/uikit-react-core\";\n\nimport HvDefaultNavigation from \"./DefaultNavigation\";\nimport HvSimpleNavigation from \"./SimpleNavigation\";\nimport { SEPARATOR_WIDTH, TITLE_MARGIN, TITLE_WIDTH } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Navigation page with steps.\n *\n * You need to define the <b>steps<b/> displayed on the component so that itself can be drawn on the UI.\n * On each step, you need to define a <b>state</b> - 'Pending', 'Failed', 'Completed', 'Current', 'Disabled' -\n * and a <b>title</b> to be shown as a tooltip or a text above of the step. You can also:\n * * Define a <b>className</b> on each step element;\n * * Define a <b>separatorClassName</b> to specify a className for the separator element. The default height\n * values of the separator element are 2px/3px on 'Simple'/'Default' layouts respectively;\n * * Define a <b>titleClassName</b> to specify a className for the title above each step element.\n *\n * For the root element, you can:\n * * Define a <b>className</b>;\n * * Choose a <b>type</b> of layout: 'Simple' or 'Default';\n * * Choose the <b>stepSize</b> of the step component: \"XS\", \"SM\", \"MD\", \"LG\", \"XL\". The default size will be\n * correspondent to the current media breakpoint;\n * * Choose either you want to <b>showTitles</b> near to each step component or a tootlip on hover;\n * * Define a <b>width</b> of the component. If you don't define any value and the step component has no title\n * displayed above, the width of the separator element will be 100px.\n * If the step component has titles, each one will have 215px of width by default.\n */\nconst HvStepNavigation = ({\n className,\n classes,\n width,\n steps,\n stepSize,\n showTitles,\n type = \"Default\",\n ...others\n}) => {\n const theme = useTheme();\n // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n const breakpoint = useWidth();\n // step configurations\n const stepSizeKey = stepSize ?? ([\"xs\", \"sm\"].includes(breakpoint) ? \"SM\" : \"MD\");\n const hasTitles = showTitles ?? ![\"xs\", \"sm\"].includes(breakpoint);\n\n const styledLi = (containerSize) =>\n styled(\"li\")({\n width: containerSize,\n height: containerSize,\n });\n\n const styledDiv = (containerSize) =>\n styled(\"div\")({\n width: containerSize,\n height: containerSize,\n });\n\n const styledSeparatorElement = (\n title,\n separatorClassName,\n separatorHeight,\n separatorWidth,\n backgroundColor\n ) => {\n const Separator = withStyles({\n separatorElement: {\n height: separatorHeight,\n width: separatorWidth,\n backgroundColor,\n },\n })(({ classes: { separatorElement } }) => (\n <div\n aria-label={`separator-${title}`}\n className={clsx(separatorElement, separatorClassName)}\n />\n ));\n return (\n <li aria-hidden key={`separator-${title}`} className={classes.separator}>\n <Separator />\n </li>\n );\n };\n\n const drawItems = ({\n separatorValues: { minWidth, maxWidth, getColor, height },\n stepValues: { minSize, maxSize, StepComponent },\n }) => {\n const items = steps.reduce((acc, { state, title, separatorClassName, ...props }, index) => {\n const containerSize = state === \"Current\" ? maxSize : minSize;\n const StepContainer = styledLi(containerSize);\n const Step = styledDiv(Math.max(containerSize, 30), Math.max(containerSize, 30));\n const stepProps = {\n ...{\n size: stepSizeKey,\n state,\n title,\n number: index + 1,\n ...props,\n },\n };\n const stepElement = (\n <StepContainer key={`step-${title}`} className={classes.li}>\n {hasTitles ? (\n <StepComponent aria-label={`step-${title}`} {...stepProps} />\n ) : (\n <HvTooltip\n placement=\"bottom\"\n title={<HvTypography>{`${index + 1}. ${title}`}</HvTypography>}\n >\n <div aria-label={`step-container-${title}`}>\n <Step className={classes.li}>\n <StepComponent aria-label={`step-${title}`} {...stepProps} />\n </Step>\n </div>\n </HvTooltip>\n )}\n </StepContainer>\n );\n if (index < steps.length - 1) {\n const separatorElement = styledSeparatorElement(\n title,\n separatorClassName,\n height,\n [steps[index + 1].state, state].includes(\"Current\") ? minWidth : maxWidth,\n getColor(steps[index + 1].state === \"Disabled\" ? \"Disabled\" : state, theme)\n );\n return [...acc, stepElement, separatorElement];\n }\n return [...acc, stepElement];\n }, []);\n\n return <ol className={classes.ol}>{items}</ol>;\n };\n\n const getDynamicValues = (stepsWidth) => {\n const maxWidth =\n width?.[breakpoint] ??\n Math.max(\n Number(hasTitles) * (TITLE_WIDTH + TITLE_MARGIN) * steps.length - TITLE_MARGIN,\n SEPARATOR_WIDTH * (steps.length - 1) + stepsWidth\n );\n const next = theme.breakpoints.keys.find((_, index, self) =>\n index - 1 >= 0 ? self[index - 1] === breakpoint : false\n );\n const navWidth = Math.min(maxWidth, theme.breakpoints.values?.[next] ?? maxWidth);\n const titleWidth = Number(hasTitles) * Math.ceil((navWidth + TITLE_MARGIN) / steps.length);\n const separatorWidth =\n Number(!hasTitles) * Math.ceil((navWidth - stepsWidth) / (steps.length - 1));\n return { width: navWidth, titleWidth, separatorWidth };\n };\n\n const styledTitle = (titleClassName, variant, title, titleWidth) =>\n withStyles({\n stepTitle: {\n textAlign: \"center\",\n width: titleWidth - TITLE_MARGIN,\n marginRight: TITLE_MARGIN,\n },\n })(({ classes: { stepTitle } }) =>\n title ? (\n <HvTypography variant={variant} className={clsx(stepTitle, titleClassName)}>\n {title}\n </HvTypography>\n ) : null\n );\n\n const getTitles = (getTitleProps) =>\n hasTitles ? (\n <div className={classes.titles}>\n {steps.map(({ title: rawTitle, state, titleClassName }, index) => {\n const {\n variant = \"highlightText\",\n title = rawTitle,\n titleWidth = 0,\n } = getTitleProps({\n state,\n rawTitle,\n number: index + 1,\n });\n const Title = styledTitle(titleClassName, variant, title, titleWidth);\n return <Title key={`step-title-${rawTitle}`} />;\n })}\n </div>\n ) : null;\n\n const StepNavigation = {\n Default: HvDefaultNavigation,\n Simple: HvSimpleNavigation,\n }[type];\n\n return (\n <StepNavigation\n {...{\n stepSize: stepSizeKey,\n numSteps: steps.length,\n getTitles,\n getDynamicValues,\n className: clsx(className, classes.root),\n ...others,\n }}\n >\n {({ stepsWidth, navWidth, ...itemsProps }) => (\n <Typography\n component=\"nav\"\n style={{\n width: `${navWidth}px`,\n margin: 0,\n }}\n >\n {drawItems(itemsProps)}\n </Typography>\n )}\n </StepNavigation>\n );\n};\n\nHvStepNavigation.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the li element.\n */\n li: PropTypes.string,\n /**\n * Styles applied to the ol element.\n */\n ol: PropTypes.string,\n /**\n * Styles applied to the separator element.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the titles container element.\n */\n titles: PropTypes.string,\n }).isRequired,\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Steps to show on the component.\n */\n steps: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Class names to override styles on the step component.\n */\n className: PropTypes.string,\n /**\n * Class names to override styles on the separator component after the step.\n */\n separatorClassName: PropTypes.string,\n /**\n * Class names to override styles on the title component above the step.\n */\n titleClassName: PropTypes.string,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"}.\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"])\n .isRequired,\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 ).isRequired,\n /**\n * Sets one of the standard sizes of the steps. Values = {\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"}\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * Width of the component element on each breakpoint screen resolution.\n */\n width: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n /**\n * Defines either show a title or only a tooltip on each step component\n */\n showTitles: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvStepNavigation\" })(HvStepNavigation);\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AAEA,SAASC,UAAT,EAAqBC,MAArB,EAA6BC,QAA7B,QAA6C,eAA7C;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,SAAT,EAAoBC,YAApB,EAAkCC,QAAlC,QAAkD,kCAAlD;AAEA,OAAOC,mBAAP,MAAgC,qBAAhC;AACA,OAAOC,kBAAP,MAA+B,oBAA/B;AACA,SAASC,eAAT,EAA0BC,YAA1B,EAAwCC,WAAxC,QAA2D,SAA3D;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;AACA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AhBV;;IAiBd;AACN;AACA;IACMjD,KAAK,EAAEvD,SAAS,CAACyG,KAAV,CAAgB,CAAC,SAAD,EAAY,QAAZ,EAAsB,WAAtB,EAAmC,SAAnC,EAA8C,UAA9C,EAA0D,SAA1D,CAAhB,EACJD,UArBW;;IAsBd;AACN;AACA;AACA;IACMG,QAAQ,EAAE3G,SAAS,CAAC4G;EA1BN,CAAhB,CADK,EA6BLJ,UAlEyB;;EAmE3B;AACF;AACA;EACEpF,QAAQ,EAAEpB,SAAS,CAACyG,KAAV,CAAgB,CAAC,IAAD,EAAO,IAAP,EAAa,IAAb,EAAmB,IAAnB,EAAyB,IAAzB,CAAhB,CAtEiB;;EAuE3B;AACF;AACA;EACEvF,KAAK,EAAElB,SAAS,CAACuG,KAAV,CAAgB;IACrBM,EAAE,EAAE7G,SAAS,CAAC+D,MADO;IAErB+C,EAAE,EAAE9G,SAAS,CAAC+D,MAFO;IAGrBgD,EAAE,EAAE/G,SAAS,CAAC+D,MAHO;IAIrBiD,EAAE,EAAEhH,SAAS,CAAC+D,MAJO;IAKrBkD,EAAE,EAAEjH,SAAS,CAAC+D;EALO,CAAhB,CA1EoB;;EAiF3B;AACF;AACA;EACE1C,UAAU,EAAErB,SAAS,CAAC4G;AApFK,CAA7B;AAuFA,eAAevG,UAAU,CAACS,MAAD,EAAS;EAAEoG,IAAI,EAAE;AAAR,CAAT,CAAV,CAAiDnG,gBAAjD,CAAf"}
1
+ {"version":3,"file":"StepNavigation.js","names":["React","PropTypes","clsx","Typography","styled","useTheme","withStyles","HvTooltip","HvTypography","useWidth","HvDefaultNavigation","HvSimpleNavigation","SEPARATOR_WIDTH","TITLE_MARGIN","TITLE_WIDTH","styles","HvStepNavigation","className","classes","width","steps","stepSize","showTitles","type","others","theme","breakpoint","stepSizeKey","includes","hasTitles","styledLi","containerSize","height","styledDiv","styledSeparatorElement","title","separatorClassName","separatorHeight","separatorWidth","backgroundColor","Separator","separatorElement","separator","drawItems","separatorValues","minWidth","maxWidth","getColor","stepValues","minSize","maxSize","StepComponent","items","reduce","acc","index","state","props","StepContainer","Step","Math","max","stepProps","size","number","stepElement","li","length","ol","getDynamicValues","stepsWidth","Number","next","breakpoints","keys","find","_","self","navWidth","min","values","titleWidth","ceil","styledTitle","titleClassName","variant","stepTitle","textAlign","marginRight","getTitles","getTitleProps","titles","map","rawTitle","Title","StepNavigation","Default","Simple","numSteps","root","itemsProps","margin","propTypes","string","shape","isRequired","oneOf","arrayOf","disabled","bool","xs","sm","md","lg","xl","name"],"sources":["../../../src/StepNavigation/StepNavigation.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\n\nimport { Typography, styled, useTheme } from \"@mui/material\";\nimport { withStyles } from \"@mui/styles\";\nimport { HvTooltip, HvTypography, useWidth } from \"@hitachivantara/uikit-react-core\";\n\nimport HvDefaultNavigation from \"./DefaultNavigation\";\nimport HvSimpleNavigation from \"./SimpleNavigation\";\nimport { SEPARATOR_WIDTH, TITLE_MARGIN, TITLE_WIDTH } from \"./utils\";\nimport styles from \"./styles\";\n\n/**\n * Navigation page with steps.\n *\n * You need to define the <b>steps<b/> displayed on the component so that itself can be drawn on the UI.\n * On each step, you need to define a <b>state</b> - 'Pending', 'Failed', 'Completed', 'Current', 'Disabled' -\n * and a <b>title</b> to be shown as a tooltip or a text above of the step. You can also:\n * * Define a <b>className</b> on each step element;\n * * Define a <b>separatorClassName</b> to specify a className for the separator element. The default height\n * values of the separator element are 2px/3px on 'Simple'/'Default' layouts respectively;\n * * Define a <b>titleClassName</b> to specify a className for the title above each step element.\n *\n * For the root element, you can:\n * * Define a <b>className</b>;\n * * Choose a <b>type</b> of layout: 'Simple' or 'Default';\n * * Choose the <b>stepSize</b> of the step component: \"XS\", \"SM\", \"MD\", \"LG\", \"XL\". The default size will be\n * correspondent to the current media breakpoint;\n * * Choose either you want to <b>showTitles</b> near to each step component or a tootlip on hover;\n * * Define a <b>width</b> of the component. If you don't define any value and the step component has no title\n * displayed above, the width of the separator element will be 100px.\n * If the step component has titles, each one will have 215px of width by default.\n */\nconst HvStepNavigation = ({\n className,\n classes,\n width,\n steps,\n stepSize,\n showTitles,\n type = \"Default\",\n ...others\n}) => {\n const theme = useTheme();\n // current breakpoint 'xs' | 'sm' | 'md' | 'lg' | 'xl'\n const breakpoint = useWidth();\n // step configurations\n const stepSizeKey = stepSize ?? ([\"xs\", \"sm\"].includes(breakpoint) ? \"SM\" : \"MD\");\n const hasTitles = showTitles ?? ![\"xs\", \"sm\"].includes(breakpoint);\n\n const styledLi = (containerSize) =>\n styled(\"li\")({\n width: containerSize,\n height: containerSize,\n });\n\n const styledDiv = (containerSize) =>\n styled(\"div\")({\n width: containerSize,\n height: containerSize,\n });\n\n const styledSeparatorElement = (\n title,\n separatorClassName,\n separatorHeight,\n separatorWidth,\n backgroundColor\n ) => {\n const Separator = withStyles({\n separatorElement: {\n height: separatorHeight,\n width: separatorWidth,\n backgroundColor,\n },\n })(({ classes: { separatorElement } }) => (\n <div\n aria-label={`separator-${title}`}\n className={clsx(separatorElement, separatorClassName)}\n />\n ));\n return (\n <li aria-hidden key={`separator-${title}`} className={classes.separator}>\n <Separator />\n </li>\n );\n };\n\n const drawItems = ({\n separatorValues: { minWidth, maxWidth, getColor, height },\n stepValues: { minSize, maxSize, StepComponent },\n }) => {\n const items = steps.reduce((acc, { state, title, separatorClassName, ...props }, index) => {\n const containerSize = state === \"Current\" ? maxSize : minSize;\n const StepContainer = styledLi(containerSize);\n const Step = styledDiv(Math.max(containerSize, 30), Math.max(containerSize, 30));\n const stepProps = {\n ...{\n size: stepSizeKey,\n state,\n title,\n number: index + 1,\n ...props,\n },\n };\n const stepElement = (\n <StepContainer key={`step-${title}`} className={classes.li}>\n {hasTitles ? (\n <StepComponent aria-label={`step-${title}`} {...stepProps} />\n ) : (\n <HvTooltip\n placement=\"bottom\"\n title={<HvTypography>{`${index + 1}. ${title}`}</HvTypography>}\n >\n <div aria-label={`step-container-${title}`}>\n <Step className={classes.li}>\n <StepComponent aria-label={`step-${title}`} {...stepProps} />\n </Step>\n </div>\n </HvTooltip>\n )}\n </StepContainer>\n );\n if (index < steps.length - 1) {\n const separatorElement = styledSeparatorElement(\n title,\n separatorClassName,\n height,\n [steps[index + 1].state, state].includes(\"Current\") ? minWidth : maxWidth,\n getColor(steps[index + 1].state === \"Disabled\" ? \"Disabled\" : state, theme)\n );\n return [...acc, stepElement, separatorElement];\n }\n return [...acc, stepElement];\n }, []);\n\n return <ol className={classes.ol}>{items}</ol>;\n };\n\n const getDynamicValues = (stepsWidth) => {\n const maxWidth =\n width?.[breakpoint] ??\n Math.max(\n Number(hasTitles) * (TITLE_WIDTH + TITLE_MARGIN) * steps.length - TITLE_MARGIN,\n SEPARATOR_WIDTH * (steps.length - 1) + stepsWidth\n );\n const next = theme.breakpoints.keys.find((_, index, self) =>\n index - 1 >= 0 ? self[index - 1] === breakpoint : false\n );\n const navWidth = Math.min(maxWidth, theme.breakpoints.values?.[next] ?? maxWidth);\n const titleWidth = Number(hasTitles) * Math.ceil((navWidth + TITLE_MARGIN) / steps.length);\n const separatorWidth =\n Number(!hasTitles) * Math.ceil((navWidth - stepsWidth) / (steps.length - 1));\n return { width: navWidth, titleWidth, separatorWidth };\n };\n\n const styledTitle = (titleClassName, variant, title, titleWidth) =>\n withStyles({\n stepTitle: {\n textAlign: \"center\",\n width: titleWidth - TITLE_MARGIN,\n marginRight: TITLE_MARGIN,\n },\n })(({ classes: { stepTitle } }) =>\n title ? (\n <HvTypography variant={variant} className={clsx(stepTitle, titleClassName)}>\n {title}\n </HvTypography>\n ) : null\n );\n\n const getTitles = (getTitleProps) =>\n hasTitles ? (\n <div className={classes.titles}>\n {steps.map(({ title: rawTitle, state, titleClassName }, index) => {\n const {\n variant = \"highlightText\",\n title = rawTitle,\n titleWidth = 0,\n } = getTitleProps({\n state,\n rawTitle,\n number: index + 1,\n });\n const Title = styledTitle(titleClassName, variant, title, titleWidth);\n return <Title key={`step-title-${rawTitle}`} />;\n })}\n </div>\n ) : null;\n\n const StepNavigation = {\n Default: HvDefaultNavigation,\n Simple: HvSimpleNavigation,\n }[type];\n\n return (\n <StepNavigation\n {...{\n stepSize: stepSizeKey,\n numSteps: steps.length,\n getTitles,\n getDynamicValues,\n className: clsx(className, classes.root),\n ...others,\n }}\n >\n {({ stepsWidth, navWidth, ...itemsProps }) => (\n <Typography\n component=\"nav\"\n style={{\n width: `${navWidth}px`,\n margin: 0,\n }}\n >\n {drawItems(itemsProps)}\n </Typography>\n )}\n </StepNavigation>\n );\n};\n\nHvStepNavigation.propTypes = {\n /**\n * Class names to be applied.\n */\n className: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.shape({\n /**\n * Styles applied to the component root class.\n */\n root: PropTypes.string,\n /**\n * Styles applied to the li element.\n */\n li: PropTypes.string,\n /**\n * Styles applied to the ol element.\n */\n ol: PropTypes.string,\n /**\n * Styles applied to the separator element.\n */\n separator: PropTypes.string,\n /**\n * Styles applied to the titles container element.\n */\n titles: PropTypes.string,\n }).isRequired,\n /**\n * Type of step navigation. Values = {\"Simple\", \"Default\"}.\n */\n type: PropTypes.oneOf([\"Simple\", \"Default\"]),\n /**\n * Steps to show on the component.\n */\n steps: PropTypes.arrayOf(\n PropTypes.shape({\n /**\n * Class names to override styles on the step component.\n */\n className: PropTypes.string,\n /**\n * Class names to override styles on the separator component after the step.\n */\n separatorClassName: PropTypes.string,\n /**\n * Class names to override styles on the title component above the step.\n */\n titleClassName: PropTypes.string,\n /**\n * Title of the step.\n */\n title: PropTypes.string.isRequired,\n /**\n * State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"}.\n */\n state: PropTypes.oneOf([\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"])\n .isRequired,\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 ).isRequired,\n /**\n * Sets one of the standard sizes of the steps. Values = {\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"}\n */\n stepSize: PropTypes.oneOf([\"XS\", \"SM\", \"MD\", \"LG\", \"XL\"]),\n /**\n * Width of the component element on each breakpoint screen resolution.\n */\n width: PropTypes.shape({\n xs: PropTypes.number,\n sm: PropTypes.number,\n md: PropTypes.number,\n lg: PropTypes.number,\n xl: PropTypes.number,\n }),\n /**\n * Defines either show a title or only a tooltip on each step component\n */\n showTitles: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvStepNavigation\" })(HvStepNavigation);\n"],"mappings":";;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,IAAI,MAAM,MAAM;AAEvB,SAASC,UAAU,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,eAAe;AAC5D,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,SAAS,EAAEC,YAAY,EAAEC,QAAQ,QAAQ,kCAAkC;AAEpF,OAAOC,mBAAmB,MAAM,qBAAqB;AACrD,OAAOC,kBAAkB,MAAM,oBAAoB;AACnD,SAASC,eAAe,EAAEC,YAAY,EAAEC,WAAW,QAAQ,SAAS;AACpE,OAAOC,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AApBA;AAqBA,MAAMC,gBAAgB,GAAG,QASnB;EAAA,IAToB;MACxBC,SAAS;MACTC,OAAO;MACPC,KAAK;MACLC,KAAK;MACLC,QAAQ;MACRC,UAAU;MACVC,IAAI,GAAG;IAET,CAAC;IADIC,MAAM;EAET,MAAMC,KAAK,GAAGpB,QAAQ,EAAE;EACxB;EACA,MAAMqB,UAAU,GAAGjB,QAAQ,EAAE;EAC7B;EACA,MAAMkB,WAAW,GAAGN,QAAQ,aAARA,QAAQ,cAARA,QAAQ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EAAEjH,SAAS,CAAC+D;EAChB,CAAC,CAAC;EACF;AACF;AACA;EACE1C,UAAU,EAAErB,SAAS,CAAC4G;AACxB,CAAC;AAED,eAAevG,UAAU,CAACS,MAAM,EAAE;EAAEoG,IAAI,EAAE;AAAmB,CAAC,CAAC,CAACnG,gBAAgB,CAAC"}
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../src/StepNavigation/index.js"],"sourcesContent":["export { default } from \"./StepNavigation\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,kBAAkB"}
@@ -26,6 +26,5 @@ const styles = () => ({
26
26
  }
27
27
  }
28
28
  });
29
-
30
29
  export default styles;
31
30
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","names":["styles","root","display","flexDirection","titles","ol","alignItems","justifyContent","flexWrap","padding","listStyle","li","separator","userSelect"],"sources":["../../../src/StepNavigation/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n titles: {\n display: \"flex\",\n },\n ol: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexWrap: \"wrap\",\n padding: 0,\n listStyle: \"none\",\n },\n li: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n separator: {\n userSelect: \"none\",\n \"& > div\": {\n display: \"flex\",\n },\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;EACpBC,IAAI,EAAE;IACJC,OAAO,EAAE,MADL;IAEJC,aAAa,EAAE;EAFX,CADc;EAKpBC,MAAM,EAAE;IACNF,OAAO,EAAE;EADH,CALY;EAQpBG,EAAE,EAAE;IACFH,OAAO,EAAE,MADP;IAEFI,UAAU,EAAE,QAFV;IAGFC,cAAc,EAAE,QAHd;IAIFC,QAAQ,EAAE,MAJR;IAKFC,OAAO,EAAE,CALP;IAMFC,SAAS,EAAE;EANT,CARgB;EAgBpBC,EAAE,EAAE;IACFT,OAAO,EAAE,MADP;IAEFI,UAAU,EAAE,QAFV;IAGFC,cAAc,EAAE;EAHd,CAhBgB;EAqBpBK,SAAS,EAAE;IACTC,UAAU,EAAE,MADH;IAET,WAAW;MACTX,OAAO,EAAE;IADA;EAFF;AArBS,CAAP,CAAf;;AA6BA,eAAeF,MAAf"}
1
+ {"version":3,"file":"styles.js","names":["styles","root","display","flexDirection","titles","ol","alignItems","justifyContent","flexWrap","padding","listStyle","li","separator","userSelect"],"sources":["../../../src/StepNavigation/styles.js"],"sourcesContent":["const styles = () => ({\n root: {\n display: \"flex\",\n flexDirection: \"column\",\n },\n titles: {\n display: \"flex\",\n },\n ol: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexWrap: \"wrap\",\n padding: 0,\n listStyle: \"none\",\n },\n li: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n separator: {\n userSelect: \"none\",\n \"& > div\": {\n display: \"flex\",\n },\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,OAAO;EACpBC,IAAI,EAAE;IACJC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE;EACjB,CAAC;EACDC,MAAM,EAAE;IACNF,OAAO,EAAE;EACX,CAAC;EACDG,EAAE,EAAE;IACFH,OAAO,EAAE,MAAM;IACfI,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,MAAM;IAChBC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE;EACb,CAAC;EACDC,EAAE,EAAE;IACFT,OAAO,EAAE,MAAM;IACfI,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDK,SAAS,EAAE;IACTC,UAAU,EAAE,MAAM;IAClB,SAAS,EAAE;MACTX,OAAO,EAAE;IACX;EACF;AACF,CAAC,CAAC;AAEF,eAAeF,MAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["TITLE_MARGIN","TITLE_WIDTH","STEP_MARGIN","SEPARATOR_WIDTH"],"sources":["../../../src/StepNavigation/utils.js"],"sourcesContent":["const TITLE_MARGIN = 20;\nconst TITLE_WIDTH = 215;\nconst STEP_MARGIN = 20;\nconst SEPARATOR_WIDTH = 100;\n\nexport { STEP_MARGIN, TITLE_MARGIN, TITLE_WIDTH, SEPARATOR_WIDTH };\n"],"mappings":"AAAA,MAAMA,YAAY,GAAG,EAArB;AACA,MAAMC,WAAW,GAAG,GAApB;AACA,MAAMC,WAAW,GAAG,EAApB;AACA,MAAMC,eAAe,GAAG,GAAxB;AAEA,SAASD,WAAT,EAAsBF,YAAtB,EAAoCC,WAApC,EAAiDE,eAAjD"}
1
+ {"version":3,"file":"utils.js","names":["TITLE_MARGIN","TITLE_WIDTH","STEP_MARGIN","SEPARATOR_WIDTH"],"sources":["../../../src/StepNavigation/utils.js"],"sourcesContent":["const TITLE_MARGIN = 20;\nconst TITLE_WIDTH = 215;\nconst STEP_MARGIN = 20;\nconst SEPARATOR_WIDTH = 100;\n\nexport { STEP_MARGIN, TITLE_MARGIN, TITLE_WIDTH, SEPARATOR_WIDTH };\n"],"mappings":"AAAA,MAAMA,YAAY,GAAG,EAAE;AACvB,MAAMC,WAAW,GAAG,GAAG;AACvB,MAAMC,WAAW,GAAG,EAAE;AACtB,MAAMC,eAAe,GAAG,GAAG;AAE3B,SAASD,WAAW,EAAEF,YAAY,EAAEC,WAAW,EAAEE,eAAe"}
@@ -1,36 +1,31 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
3
  const _excluded = ["classes", "timestamp", "locale", "component", "emptyElement", "disableRefresh", "showSeconds", "justText"];
4
-
5
4
  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; }
6
-
7
5
  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; }
8
-
9
6
  import React from "react";
10
7
  import PropTypes from "prop-types";
11
8
  import { withStyles } from "@mui/styles";
12
9
  import { HvTypography, useLocale } from "@hitachivantara/uikit-react-core";
13
10
  import useTimeAgo from "./useTimeAgo";
14
11
  import styles from "./styles";
12
+
15
13
  /**
16
14
  * The HvTimeAgo component implements the Design System relative time format guidelines.
17
15
  */
18
-
19
16
  import { jsx as _jsx } from "react/jsx-runtime";
20
-
21
17
  const HvTimeAgo = _ref => {
22
18
  let {
23
- classes,
24
- timestamp,
25
- locale: localeProp,
26
- component: Component = HvTypography,
27
- emptyElement = "—",
28
- disableRefresh = false,
29
- showSeconds = false,
30
- justText = false
31
- } = _ref,
32
- others = _objectWithoutProperties(_ref, _excluded);
33
-
19
+ classes,
20
+ timestamp,
21
+ locale: localeProp,
22
+ component: Component = HvTypography,
23
+ emptyElement = "—",
24
+ disableRefresh = false,
25
+ showSeconds = false,
26
+ justText = false
27
+ } = _ref,
28
+ others = _objectWithoutProperties(_ref, _excluded);
34
29
  const contextLocale = useLocale();
35
30
  const locale = localeProp || contextLocale;
36
31
  const timeAgo = useTimeAgo(timestamp, {
@@ -45,7 +40,6 @@ const HvTimeAgo = _ref => {
45
40
  children: !timestamp ? emptyElement : timeAgo
46
41
  }));
47
42
  };
48
-
49
43
  process.env.NODE_ENV !== "production" ? HvTimeAgo.propTypes = {
50
44
  /**
51
45
  * A Jss Object used to override or extend the styles applied.
@@ -56,40 +50,33 @@ process.env.NODE_ENV !== "production" ? HvTimeAgo.propTypes = {
56
50
  */
57
51
  root: PropTypes.string
58
52
  }),
59
-
60
53
  /**
61
54
  * The timestamp to format, in seconds
62
55
  */
63
56
  timestamp: PropTypes.number,
64
-
65
57
  /**
66
58
  * The locale to be used. Should be on of the dayjs supported locales
67
59
  * @see https://day.js.org/docs/en/i18n/i18n
68
60
  */
69
61
  locale: PropTypes.string,
70
-
71
62
  /**
72
63
  * The component used for the root node. Either a string to use a HTML element or a component.
73
64
  * Defaults to `div`.
74
65
  */
75
66
  component: PropTypes.elementType,
76
-
77
67
  /**
78
68
  * The element to render when the timestamp is null or 0
79
69
  * Defaults to `—` (Em Dash)
80
70
  */
81
71
  emptyElement: PropTypes.node,
82
-
83
72
  /**
84
73
  * Disables periodic date refreshes
85
74
  */
86
75
  disableRefresh: PropTypes.bool,
87
-
88
76
  /**
89
77
  * Whether to show seconds in the rendered time
90
78
  */
91
79
  showSeconds: PropTypes.bool,
92
-
93
80
  /**
94
81
  * Whether the component should render just the string
95
82
  * Consider using `useTimeAgo` instead
@@ -1 +1 @@
1
- {"version":3,"file":"TimeAgo.js","names":["React","PropTypes","withStyles","HvTypography","useLocale","useTimeAgo","styles","HvTimeAgo","classes","timestamp","locale","localeProp","component","Component","emptyElement","disableRefresh","showSeconds","justText","others","contextLocale","timeAgo","root","propTypes","shape","string","number","elementType","node","bool","name"],"sources":["../../../src/TimeAgo/TimeAgo.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { HvTypography, useLocale } from \"@hitachivantara/uikit-react-core\";\nimport useTimeAgo from \"./useTimeAgo\";\nimport styles from \"./styles\";\n\n/**\n * The HvTimeAgo component implements the Design System relative time format guidelines.\n */\nconst HvTimeAgo = ({\n classes,\n timestamp,\n locale: localeProp,\n component: Component = HvTypography,\n emptyElement = \"—\",\n disableRefresh = false,\n showSeconds = false,\n justText = false,\n ...others\n}) => {\n const contextLocale = useLocale();\n const locale = localeProp || contextLocale;\n const timeAgo = useTimeAgo(timestamp, { locale, disableRefresh, showSeconds });\n\n if (justText && timestamp) return timeAgo;\n\n return (\n <Component className={classes.root} {...others}>\n {!timestamp ? emptyElement : timeAgo}\n </Component>\n );\n};\n\nHvTimeAgo.propTypes = {\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 /**\n * The timestamp to format, in seconds\n */\n timestamp: PropTypes.number,\n /**\n * The locale to be used. Should be on of the dayjs supported locales\n * @see https://day.js.org/docs/en/i18n/i18n\n */\n locale: PropTypes.string,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `div`.\n */\n component: PropTypes.elementType,\n /**\n * The element to render when the timestamp is null or 0\n * Defaults to `—` (Em Dash)\n */\n emptyElement: PropTypes.node,\n /**\n * Disables periodic date refreshes\n */\n disableRefresh: PropTypes.bool,\n /**\n * Whether to show seconds in the rendered time\n */\n showSeconds: PropTypes.bool,\n /**\n * Whether the component should render just the string\n * Consider using `useTimeAgo` instead\n */\n justText: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvTimeAgo\" })(HvTimeAgo);\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAASC,UAAT,QAA2B,aAA3B;AACA,SAASC,YAAT,EAAuBC,SAAvB,QAAwC,kCAAxC;AACA,OAAOC,UAAP,MAAuB,cAAvB;AACA,OAAOC,MAAP,MAAmB,UAAnB;AAEA;AACA;AACA;;;;AACA,MAAMC,SAAS,GAAG,QAUZ;EAAA,IAVa;IACjBC,OADiB;IAEjBC,SAFiB;IAGjBC,MAAM,EAAE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;EAAEuB,IAAI,EAAE;AAAR,CAAT,CAAV,CAA0CtB,SAA1C,CAAf"}
1
+ {"version":3,"file":"TimeAgo.js","names":["React","PropTypes","withStyles","HvTypography","useLocale","useTimeAgo","styles","HvTimeAgo","classes","timestamp","locale","localeProp","component","Component","emptyElement","disableRefresh","showSeconds","justText","others","contextLocale","timeAgo","root","propTypes","shape","string","number","elementType","node","bool","name"],"sources":["../../../src/TimeAgo/TimeAgo.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport { HvTypography, useLocale } from \"@hitachivantara/uikit-react-core\";\nimport useTimeAgo from \"./useTimeAgo\";\nimport styles from \"./styles\";\n\n/**\n * The HvTimeAgo component implements the Design System relative time format guidelines.\n */\nconst HvTimeAgo = ({\n classes,\n timestamp,\n locale: localeProp,\n component: Component = HvTypography,\n emptyElement = \"—\",\n disableRefresh = false,\n showSeconds = false,\n justText = false,\n ...others\n}) => {\n const contextLocale = useLocale();\n const locale = localeProp || contextLocale;\n const timeAgo = useTimeAgo(timestamp, { locale, disableRefresh, showSeconds });\n\n if (justText && timestamp) return timeAgo;\n\n return (\n <Component className={classes.root} {...others}>\n {!timestamp ? emptyElement : timeAgo}\n </Component>\n );\n};\n\nHvTimeAgo.propTypes = {\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 /**\n * The timestamp to format, in seconds\n */\n timestamp: PropTypes.number,\n /**\n * The locale to be used. Should be on of the dayjs supported locales\n * @see https://day.js.org/docs/en/i18n/i18n\n */\n locale: PropTypes.string,\n /**\n * The component used for the root node. Either a string to use a HTML element or a component.\n * Defaults to `div`.\n */\n component: PropTypes.elementType,\n /**\n * The element to render when the timestamp is null or 0\n * Defaults to `—` (Em Dash)\n */\n emptyElement: PropTypes.node,\n /**\n * Disables periodic date refreshes\n */\n disableRefresh: PropTypes.bool,\n /**\n * Whether to show seconds in the rendered time\n */\n showSeconds: PropTypes.bool,\n /**\n * Whether the component should render just the string\n * Consider using `useTimeAgo` instead\n */\n justText: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvTimeAgo\" })(HvTimeAgo);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,YAAY,EAAEC,SAAS,QAAQ,kCAAkC;AAC1E,OAAOC,UAAU,MAAM,cAAc;AACrC,OAAOC,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AAFA;AAGA,MAAMC,SAAS,GAAG,QAUZ;EAAA,IAVa;MACjBC,OAAO;MACPC,SAAS;MACTC,MAAM,EAAEC,UAAU;MAClBC,SAAS,EAAEC,SAAS,GAAGV,YAAY;MACnCW,YAAY,GAAG,GAAG;MAClBC,cAAc,GAAG,KAAK;MACtBC,WAAW,GAAG,KAAK;MACnBC,QAAQ,GAAG;IAEb,CAAC;IADIC,MAAM;EAET,MAAMC,aAAa,GAAGf,SAAS,EAAE;EACjC,MAAMM,MAAM,GAAGC,UAAU,IAAIQ,aAAa;EAC1C,MAAMC,OAAO,GAAGf,UAAU,CAACI,SAAS,EAAE;IAAEC,MAAM;IAAEK,cAAc;IAAEC;EAAY,CAAC,CAAC;EAE9E,IAAIC,QAAQ,IAAIR,SAAS,EAAE,OAAOW,OAAO;EAEzC,oBACE,KAAC,SAAS;IAAC,SAAS,EAAEZ,OAAO,CAACa;EAAK,GAAKH,MAAM;IAAA,UAC3C,CAACT,SAAS,GAAGK,YAAY,GAAGM;EAAO,GAC1B;AAEhB,CAAC;AAED,wCAAAb,SAAS,CAACe,SAAS,GAAG;EACpB;AACF;AACA;EACEd,OAAO,EAAEP,SAAS,CAACsB,KAAK,CAAC;IACvB;AACJ;AACA;IACIF,IAAI,EAAEpB,SAAS,CAACuB;EAClB,CAAC,CAAC;EACF;AACF;AACA;EACEf,SAAS,EAAER,SAAS,CAACwB,MAAM;EAC3B;AACF;AACA;AACA;EACEf,MAAM,EAAET,SAAS,CAACuB,MAAM;EACxB;AACF;AACA;AACA;EACEZ,SAAS,EAAEX,SAAS,CAACyB,WAAW;EAChC;AACF;AACA;AACA;EACEZ,YAAY,EAAEb,SAAS,CAAC0B,IAAI;EAC5B;AACF;AACA;EACEZ,cAAc,EAAEd,SAAS,CAAC2B,IAAI;EAC9B;AACF;AACA;EACEZ,WAAW,EAAEf,SAAS,CAAC2B,IAAI;EAC3B;AACF;AACA;AACA;EACEX,QAAQ,EAAEhB,SAAS,CAAC2B;AACtB,CAAC;AAED,eAAe1B,UAAU,CAACI,MAAM,EAAE;EAAEuB,IAAI,EAAE;AAAY,CAAC,CAAC,CAACtB,SAAS,CAAC"}
@@ -5,13 +5,13 @@ import localeData from "dayjs/plugin/localeData";
5
5
  import localizedFormat from "dayjs/plugin/localizedFormat";
6
6
  import relativeTime from "dayjs/plugin/relativeTime";
7
7
  import updateLocale from "dayjs/plugin/updateLocale";
8
+
8
9
  /**
9
10
  * Relative time thresholds defined by
10
11
  * {@link https://xd.adobe.com/view/1b7df235-5cf8-4b51-a2f0-0be1bb591c55-4e2e/ Design System}
11
12
  *
12
13
  * Implementation using day.js {@link https://day.js.org/docs/en/customization/relative-time relativeTime}
13
14
  */
14
-
15
15
  const thresholds = [{
16
16
  l: "s",
17
17
  r: 119,
@@ -68,7 +68,6 @@ export const secondsUntilNextDay = (date = new Date()) => {
68
68
  midnight.setMilliseconds(0);
69
69
  return (midnight.getTime() - date.getTime()) / 1000;
70
70
  };
71
-
72
71
  const secondsUntilNextWeek = (date = new Date()) => {
73
72
  const firstMonthDayOfWeek = date.getDate() - date.getDay();
74
73
  const firstMonthDayOfNextWeek = firstMonthDayOfWeek + 7; // auto roll over to next month if needed
@@ -81,6 +80,7 @@ const secondsUntilNextWeek = (date = new Date()) => {
81
80
  firstDayNextWeek.setMilliseconds(0);
82
81
  return (firstDayNextWeek.getTime() - date.getTime()) / 1000;
83
82
  };
83
+
84
84
  /**
85
85
  * @typedef {Object} TimeAgo
86
86
  * @property {string} timeAgo - the formatted date using the "time ago format"
@@ -97,64 +97,62 @@ const secondsUntilNextWeek = (date = new Date()) => {
97
97
  *
98
98
  * @return {TimeAgo} the formatted date using the "time ago format" and the time until it needs to be updated
99
99
  */
100
-
101
-
102
100
  export const formatTimeAgo = (date, locale, showSeconds = false, referenceDate = new Date()) => {
103
101
  const dayReferenceDate = dayjs(referenceDate);
104
102
  const dayDate = dayjs(date).locale(locale);
105
103
  const dayDiffSeconds = dayReferenceDate.diff(dayDate, "second");
106
- const formatUseSeconds = showSeconds ? "LTS" : "LT"; // check if the date is after the reference date
104
+ const formatUseSeconds = showSeconds ? "LTS" : "LT";
107
105
 
106
+ // check if the date is after the reference date
108
107
  if (date.getTime() > referenceDate.getTime()) {
109
108
  return {
110
109
  timeAgo: dayDate.format(`L ${formatUseSeconds}`),
111
110
  delay: (date.getTime() - referenceDate.getTime()) / 1000
112
111
  };
113
- } // just now, until the 2 minutes
114
-
112
+ }
115
113
 
114
+ // just now, until the 2 minutes
116
115
  if (dayDiffSeconds < 120) {
117
116
  return {
118
117
  timeAgo: dayjs.duration(dayDiffSeconds, "second").locale(locale).humanize(),
119
118
  delay: 120 - dayDiffSeconds
120
119
  };
121
- } // ago in minutes, until the 1 hour mark
122
-
120
+ }
123
121
 
122
+ // ago in minutes, until the 1 hour mark
124
123
  const dayDiffMinutes = dayReferenceDate.diff(dayDate, "minute");
125
-
126
124
  if (dayDiffMinutes < 60) {
127
125
  return {
128
126
  timeAgo: dayjs.duration(-dayDiffMinutes, "minute").locale(locale).humanize(true),
129
127
  delay: 60 * (dayDiffMinutes + 1) - dayDiffSeconds
130
128
  };
131
- } // formatted date with text description for today
132
-
129
+ }
133
130
 
131
+ // formatted date with text description for today
134
132
  if (dayReferenceDate.isSame(dayDate, "day")) {
135
133
  return {
136
134
  timeAgo: `${dayDate.calendar(dayReferenceDate)}`,
137
135
  delay: secondsUntilNextDay(referenceDate)
138
136
  };
139
- } // formatted date with text description for yesterday
140
-
137
+ }
141
138
 
139
+ // formatted date with text description for yesterday
142
140
  if (dayReferenceDate.subtract(1, "day").isSame(dayDate, "day")) {
143
141
  return {
144
142
  timeAgo: `${dayDate.calendar(dayReferenceDate)}`,
145
143
  delay: secondsUntilNextDay(referenceDate)
146
144
  };
147
- } // formatted date with week during the current week
148
-
145
+ }
149
146
 
147
+ // formatted date with week during the current week
150
148
  if (dayDate.isSame(dayReferenceDate, "week")) {
151
149
  return {
152
150
  timeAgo: dayDate.format(`ddd, ${formatUseSeconds}`),
153
151
  delay: secondsUntilNextWeek(date)
154
152
  };
155
- } // formatted without special gimmicks
156
-
153
+ }
157
154
 
155
+ // formatted without special gimmicks
158
156
  return {
159
157
  timeAgo: dayDate.format(`L ${formatUseSeconds}`),
160
158
  delay: 0