@hitachivantara/uikit-react-lab 2.6.18

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 (388) hide show
  1. package/CHANGELOG.md +2334 -0
  2. package/LICENSE.txt +201 -0
  3. package/README.md +11 -0
  4. package/dist/AppSwitcherPanel/Action/Action.d.ts +67 -0
  5. package/dist/AppSwitcherPanel/Action/Action.js +255 -0
  6. package/dist/AppSwitcherPanel/Action/Action.js.map +1 -0
  7. package/dist/AppSwitcherPanel/Action/index.d.ts +2 -0
  8. package/dist/AppSwitcherPanel/Action/index.js +21 -0
  9. package/dist/AppSwitcherPanel/Action/index.js.map +1 -0
  10. package/dist/AppSwitcherPanel/Action/styles.js +91 -0
  11. package/dist/AppSwitcherPanel/Action/styles.js.map +1 -0
  12. package/dist/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
  13. package/dist/AppSwitcherPanel/AppSwitcherPanel.js +230 -0
  14. package/dist/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
  15. package/dist/AppSwitcherPanel/index.d.ts +2 -0
  16. package/dist/AppSwitcherPanel/index.js +21 -0
  17. package/dist/AppSwitcherPanel/index.js.map +1 -0
  18. package/dist/AppSwitcherPanel/styles.js +83 -0
  19. package/dist/AppSwitcherPanel/styles.js.map +1 -0
  20. package/dist/CodeEditor/CodeEditor.d.ts +14 -0
  21. package/dist/CodeEditor/CodeEditor.js +144 -0
  22. package/dist/CodeEditor/CodeEditor.js.map +1 -0
  23. package/dist/CodeEditor/index.d.ts +2 -0
  24. package/dist/CodeEditor/index.js +16 -0
  25. package/dist/CodeEditor/index.js.map +1 -0
  26. package/dist/CodeEditor/styles.js +53 -0
  27. package/dist/CodeEditor/styles.js.map +1 -0
  28. package/dist/Footer/Footer.d.ts +12 -0
  29. package/dist/Footer/Footer.js +67 -0
  30. package/dist/Footer/Footer.js.map +1 -0
  31. package/dist/Footer/index.d.ts +2 -0
  32. package/dist/Footer/index.js +16 -0
  33. package/dist/Footer/index.js.map +1 -0
  34. package/dist/Footer/styles.js +54 -0
  35. package/dist/Footer/styles.js.map +1 -0
  36. package/dist/FormComposer/FormComposer.d.ts +41 -0
  37. package/dist/FormComposer/FormComposer.js +258 -0
  38. package/dist/FormComposer/FormComposer.js.map +1 -0
  39. package/dist/FormComposer/index.d.ts +2 -0
  40. package/dist/FormComposer/index.js +16 -0
  41. package/dist/FormComposer/index.js.map +1 -0
  42. package/dist/FormComposer/styles.js +39 -0
  43. package/dist/FormComposer/styles.js.map +1 -0
  44. package/dist/Loading/Loading.d.ts +32 -0
  45. package/dist/Loading/Loading.js +89 -0
  46. package/dist/Loading/Loading.js.map +1 -0
  47. package/dist/Loading/LoadingWithDelay.d.ts +12 -0
  48. package/dist/Loading/LoadingWithDelay.js +135 -0
  49. package/dist/Loading/LoadingWithDelay.js.map +1 -0
  50. package/dist/Loading/index.d.ts +2 -0
  51. package/dist/Loading/index.js +16 -0
  52. package/dist/Loading/index.js.map +1 -0
  53. package/dist/Loading/styles.js +85 -0
  54. package/dist/Loading/styles.js.map +1 -0
  55. package/dist/NavigationAnchors/NavigationAnchors.d.ts +46 -0
  56. package/dist/NavigationAnchors/NavigationAnchors.js +297 -0
  57. package/dist/NavigationAnchors/NavigationAnchors.js.map +1 -0
  58. package/dist/NavigationAnchors/index.d.ts +2 -0
  59. package/dist/NavigationAnchors/index.js +16 -0
  60. package/dist/NavigationAnchors/index.js.map +1 -0
  61. package/dist/NavigationAnchors/styles.js +87 -0
  62. package/dist/NavigationAnchors/styles.js.map +1 -0
  63. package/dist/NotificationPanel/Notification/Notification.js +153 -0
  64. package/dist/NotificationPanel/Notification/Notification.js.map +1 -0
  65. package/dist/NotificationPanel/Notification/index.js +21 -0
  66. package/dist/NotificationPanel/Notification/index.js.map +1 -0
  67. package/dist/NotificationPanel/Notification/styles.js +73 -0
  68. package/dist/NotificationPanel/Notification/styles.js.map +1 -0
  69. package/dist/NotificationPanel/NotificationPanel.d.ts +49 -0
  70. package/dist/NotificationPanel/NotificationPanel.js +219 -0
  71. package/dist/NotificationPanel/NotificationPanel.js.map +1 -0
  72. package/dist/NotificationPanel/Panel/Panel.js +202 -0
  73. package/dist/NotificationPanel/Panel/Panel.js.map +1 -0
  74. package/dist/NotificationPanel/Panel/index.js +21 -0
  75. package/dist/NotificationPanel/Panel/index.js.map +1 -0
  76. package/dist/NotificationPanel/Panel/styles.js +84 -0
  77. package/dist/NotificationPanel/Panel/styles.js.map +1 -0
  78. package/dist/NotificationPanel/index.d.ts +2 -0
  79. package/dist/NotificationPanel/index.js +16 -0
  80. package/dist/NotificationPanel/index.js.map +1 -0
  81. package/dist/NotificationPanel/styles.js +16 -0
  82. package/dist/NotificationPanel/styles.js.map +1 -0
  83. package/dist/Slider/KnobRing/KnobRing.js +26 -0
  84. package/dist/Slider/KnobRing/KnobRing.js.map +1 -0
  85. package/dist/Slider/KnobRing/index.js +19 -0
  86. package/dist/Slider/KnobRing/index.js.map +1 -0
  87. package/dist/Slider/KnobRing/styles.js +40 -0
  88. package/dist/Slider/KnobRing/styles.js.map +1 -0
  89. package/dist/Slider/Slider.d.ts +133 -0
  90. package/dist/Slider/Slider.js +607 -0
  91. package/dist/Slider/Slider.js.map +1 -0
  92. package/dist/Slider/index.d.ts +2 -0
  93. package/dist/Slider/index.js +16 -0
  94. package/dist/Slider/index.js.map +1 -0
  95. package/dist/Slider/styles.js +125 -0
  96. package/dist/Slider/styles.js.map +1 -0
  97. package/dist/TimePicker/PeriodPicker/PeriodPicker.js +128 -0
  98. package/dist/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
  99. package/dist/TimePicker/PeriodPicker/index.js +21 -0
  100. package/dist/TimePicker/PeriodPicker/index.js.map +1 -0
  101. package/dist/TimePicker/PeriodPicker/styles.js +63 -0
  102. package/dist/TimePicker/PeriodPicker/styles.js.map +1 -0
  103. package/dist/TimePicker/TimePicker.d.ts +77 -0
  104. package/dist/TimePicker/TimePicker.js +425 -0
  105. package/dist/TimePicker/TimePicker.js.map +1 -0
  106. package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js +225 -0
  107. package/dist/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
  108. package/dist/TimePicker/UnitTimePicker/index.js +21 -0
  109. package/dist/TimePicker/UnitTimePicker/index.js.map +1 -0
  110. package/dist/TimePicker/UnitTimePicker/styles.js +80 -0
  111. package/dist/TimePicker/UnitTimePicker/styles.js.map +1 -0
  112. package/dist/TimePicker/enums.js +40 -0
  113. package/dist/TimePicker/enums.js.map +1 -0
  114. package/dist/TimePicker/index.d.ts +2 -0
  115. package/dist/TimePicker/index.js +16 -0
  116. package/dist/TimePicker/index.js.map +1 -0
  117. package/dist/TimePicker/styles.js +113 -0
  118. package/dist/TimePicker/styles.js.map +1 -0
  119. package/dist/TimePicker/timePickerConverter.js +90 -0
  120. package/dist/TimePicker/timePickerConverter.js.map +1 -0
  121. package/dist/TimePicker/timePickerFormatter.js +77 -0
  122. package/dist/TimePicker/timePickerFormatter.js.map +1 -0
  123. package/dist/TimePicker/timePickerUtils.js +36 -0
  124. package/dist/TimePicker/timePickerUtils.js.map +1 -0
  125. package/dist/index.d.ts +26 -0
  126. package/dist/index.js +80 -0
  127. package/dist/index.js.map +1 -0
  128. package/dist/legacy/AppSwitcherPanel/Action/Action.d.ts +67 -0
  129. package/dist/legacy/AppSwitcherPanel/Action/Action.js +214 -0
  130. package/dist/legacy/AppSwitcherPanel/Action/Action.js.map +1 -0
  131. package/dist/legacy/AppSwitcherPanel/Action/index.d.ts +2 -0
  132. package/dist/legacy/AppSwitcherPanel/Action/index.js +7 -0
  133. package/dist/legacy/AppSwitcherPanel/Action/index.js.map +1 -0
  134. package/dist/legacy/AppSwitcherPanel/Action/styles.js +83 -0
  135. package/dist/legacy/AppSwitcherPanel/Action/styles.js.map +1 -0
  136. package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
  137. package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.js +195 -0
  138. package/dist/legacy/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
  139. package/dist/legacy/AppSwitcherPanel/index.d.ts +2 -0
  140. package/dist/legacy/AppSwitcherPanel/index.js +7 -0
  141. package/dist/legacy/AppSwitcherPanel/index.js.map +1 -0
  142. package/dist/legacy/AppSwitcherPanel/styles.js +65 -0
  143. package/dist/legacy/AppSwitcherPanel/styles.js.map +1 -0
  144. package/dist/legacy/CodeEditor/CodeEditor.d.ts +14 -0
  145. package/dist/legacy/CodeEditor/CodeEditor.js +114 -0
  146. package/dist/legacy/CodeEditor/CodeEditor.js.map +1 -0
  147. package/dist/legacy/CodeEditor/index.d.ts +2 -0
  148. package/dist/legacy/CodeEditor/index.js +2 -0
  149. package/dist/legacy/CodeEditor/index.js.map +1 -0
  150. package/dist/legacy/CodeEditor/styles.js +45 -0
  151. package/dist/legacy/CodeEditor/styles.js.map +1 -0
  152. package/dist/legacy/Footer/Footer.d.ts +12 -0
  153. package/dist/legacy/Footer/Footer.js +51 -0
  154. package/dist/legacy/Footer/Footer.js.map +1 -0
  155. package/dist/legacy/Footer/index.d.ts +2 -0
  156. package/dist/legacy/Footer/index.js +2 -0
  157. package/dist/legacy/Footer/index.js.map +1 -0
  158. package/dist/legacy/Footer/styles.js +44 -0
  159. package/dist/legacy/Footer/styles.js.map +1 -0
  160. package/dist/legacy/FormComposer/FormComposer.d.ts +41 -0
  161. package/dist/legacy/FormComposer/FormComposer.js +218 -0
  162. package/dist/legacy/FormComposer/FormComposer.js.map +1 -0
  163. package/dist/legacy/FormComposer/index.d.ts +2 -0
  164. package/dist/legacy/FormComposer/index.js +2 -0
  165. package/dist/legacy/FormComposer/index.js.map +1 -0
  166. package/dist/legacy/FormComposer/styles.js +31 -0
  167. package/dist/legacy/FormComposer/styles.js.map +1 -0
  168. package/dist/legacy/Loading/Loading.d.ts +32 -0
  169. package/dist/legacy/Loading/Loading.js +71 -0
  170. package/dist/legacy/Loading/Loading.js.map +1 -0
  171. package/dist/legacy/Loading/LoadingWithDelay.d.ts +12 -0
  172. package/dist/legacy/Loading/LoadingWithDelay.js +97 -0
  173. package/dist/legacy/Loading/LoadingWithDelay.js.map +1 -0
  174. package/dist/legacy/Loading/index.d.ts +2 -0
  175. package/dist/legacy/Loading/index.js +2 -0
  176. package/dist/legacy/Loading/index.js.map +1 -0
  177. package/dist/legacy/Loading/styles.js +78 -0
  178. package/dist/legacy/Loading/styles.js.map +1 -0
  179. package/dist/legacy/NavigationAnchors/NavigationAnchors.d.ts +46 -0
  180. package/dist/legacy/NavigationAnchors/NavigationAnchors.js +275 -0
  181. package/dist/legacy/NavigationAnchors/NavigationAnchors.js.map +1 -0
  182. package/dist/legacy/NavigationAnchors/index.d.ts +2 -0
  183. package/dist/legacy/NavigationAnchors/index.js +2 -0
  184. package/dist/legacy/NavigationAnchors/index.js.map +1 -0
  185. package/dist/legacy/NavigationAnchors/styles.js +70 -0
  186. package/dist/legacy/NavigationAnchors/styles.js.map +1 -0
  187. package/dist/legacy/NotificationPanel/Notification/Notification.js +119 -0
  188. package/dist/legacy/NotificationPanel/Notification/Notification.js.map +1 -0
  189. package/dist/legacy/NotificationPanel/Notification/index.js +7 -0
  190. package/dist/legacy/NotificationPanel/Notification/index.js.map +1 -0
  191. package/dist/legacy/NotificationPanel/Notification/styles.js +56 -0
  192. package/dist/legacy/NotificationPanel/Notification/styles.js.map +1 -0
  193. package/dist/legacy/NotificationPanel/NotificationPanel.d.ts +49 -0
  194. package/dist/legacy/NotificationPanel/NotificationPanel.js +182 -0
  195. package/dist/legacy/NotificationPanel/NotificationPanel.js.map +1 -0
  196. package/dist/legacy/NotificationPanel/Panel/Panel.js +166 -0
  197. package/dist/legacy/NotificationPanel/Panel/Panel.js.map +1 -0
  198. package/dist/legacy/NotificationPanel/Panel/index.js +7 -0
  199. package/dist/legacy/NotificationPanel/Panel/index.js.map +1 -0
  200. package/dist/legacy/NotificationPanel/Panel/styles.js +66 -0
  201. package/dist/legacy/NotificationPanel/Panel/styles.js.map +1 -0
  202. package/dist/legacy/NotificationPanel/index.d.ts +2 -0
  203. package/dist/legacy/NotificationPanel/index.js +2 -0
  204. package/dist/legacy/NotificationPanel/index.js.map +1 -0
  205. package/dist/legacy/NotificationPanel/styles.js +9 -0
  206. package/dist/legacy/NotificationPanel/styles.js.map +1 -0
  207. package/dist/legacy/Slider/KnobRing/KnobRing.js +15 -0
  208. package/dist/legacy/Slider/KnobRing/KnobRing.js.map +1 -0
  209. package/dist/legacy/Slider/KnobRing/index.js +5 -0
  210. package/dist/legacy/Slider/KnobRing/index.js.map +1 -0
  211. package/dist/legacy/Slider/KnobRing/styles.js +32 -0
  212. package/dist/legacy/Slider/KnobRing/styles.js.map +1 -0
  213. package/dist/legacy/Slider/Slider.d.ts +133 -0
  214. package/dist/legacy/Slider/Slider.js +583 -0
  215. package/dist/legacy/Slider/Slider.js.map +1 -0
  216. package/dist/legacy/Slider/index.d.ts +2 -0
  217. package/dist/legacy/Slider/index.js +2 -0
  218. package/dist/legacy/Slider/index.js.map +1 -0
  219. package/dist/legacy/Slider/styles.js +108 -0
  220. package/dist/legacy/Slider/styles.js.map +1 -0
  221. package/dist/legacy/TimePicker/PeriodPicker/PeriodPicker.js +110 -0
  222. package/dist/legacy/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
  223. package/dist/legacy/TimePicker/PeriodPicker/index.js +7 -0
  224. package/dist/legacy/TimePicker/PeriodPicker/index.js.map +1 -0
  225. package/dist/legacy/TimePicker/PeriodPicker/styles.js +46 -0
  226. package/dist/legacy/TimePicker/PeriodPicker/styles.js.map +1 -0
  227. package/dist/legacy/TimePicker/TimePicker.d.ts +77 -0
  228. package/dist/legacy/TimePicker/TimePicker.js +402 -0
  229. package/dist/legacy/TimePicker/TimePicker.js.map +1 -0
  230. package/dist/legacy/TimePicker/UnitTimePicker/UnitTimePicker.js +207 -0
  231. package/dist/legacy/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
  232. package/dist/legacy/TimePicker/UnitTimePicker/index.js +7 -0
  233. package/dist/legacy/TimePicker/UnitTimePicker/index.js.map +1 -0
  234. package/dist/legacy/TimePicker/UnitTimePicker/styles.js +63 -0
  235. package/dist/legacy/TimePicker/UnitTimePicker/styles.js.map +1 -0
  236. package/dist/legacy/TimePicker/enums.js +32 -0
  237. package/dist/legacy/TimePicker/enums.js.map +1 -0
  238. package/dist/legacy/TimePicker/index.d.ts +2 -0
  239. package/dist/legacy/TimePicker/index.js +2 -0
  240. package/dist/legacy/TimePicker/index.js.map +1 -0
  241. package/dist/legacy/TimePicker/styles.js +96 -0
  242. package/dist/legacy/TimePicker/styles.js.map +1 -0
  243. package/dist/legacy/TimePicker/timePickerConverter.js +71 -0
  244. package/dist/legacy/TimePicker/timePickerConverter.js.map +1 -0
  245. package/dist/legacy/TimePicker/timePickerFormatter.js +63 -0
  246. package/dist/legacy/TimePicker/timePickerFormatter.js.map +1 -0
  247. package/dist/legacy/TimePicker/timePickerUtils.js +27 -0
  248. package/dist/legacy/TimePicker/timePickerUtils.js.map +1 -0
  249. package/dist/legacy/index.d.ts +26 -0
  250. package/dist/legacy/index.js +11 -0
  251. package/dist/legacy/index.js.map +1 -0
  252. package/dist/legacy/withStyleProps/WithStyleProps.js +14 -0
  253. package/dist/legacy/withStyleProps/WithStyleProps.js.map +1 -0
  254. package/dist/legacy/withStyleProps/index.js +2 -0
  255. package/dist/legacy/withStyleProps/index.js.map +1 -0
  256. package/dist/modern/AppSwitcherPanel/Action/Action.d.ts +67 -0
  257. package/dist/modern/AppSwitcherPanel/Action/Action.js +177 -0
  258. package/dist/modern/AppSwitcherPanel/Action/Action.js.map +1 -0
  259. package/dist/modern/AppSwitcherPanel/Action/index.d.ts +2 -0
  260. package/dist/modern/AppSwitcherPanel/Action/index.js +7 -0
  261. package/dist/modern/AppSwitcherPanel/Action/index.js.map +1 -0
  262. package/dist/modern/AppSwitcherPanel/Action/styles.js +77 -0
  263. package/dist/modern/AppSwitcherPanel/Action/styles.js.map +1 -0
  264. package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.d.ts +50 -0
  265. package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.js +167 -0
  266. package/dist/modern/AppSwitcherPanel/AppSwitcherPanel.js.map +1 -0
  267. package/dist/modern/AppSwitcherPanel/index.d.ts +2 -0
  268. package/dist/modern/AppSwitcherPanel/index.js +7 -0
  269. package/dist/modern/AppSwitcherPanel/index.js.map +1 -0
  270. package/dist/modern/AppSwitcherPanel/styles.js +55 -0
  271. package/dist/modern/AppSwitcherPanel/styles.js.map +1 -0
  272. package/dist/modern/CodeEditor/CodeEditor.d.ts +14 -0
  273. package/dist/modern/CodeEditor/CodeEditor.js +109 -0
  274. package/dist/modern/CodeEditor/CodeEditor.js.map +1 -0
  275. package/dist/modern/CodeEditor/index.d.ts +2 -0
  276. package/dist/modern/CodeEditor/index.js +2 -0
  277. package/dist/modern/CodeEditor/index.js.map +1 -0
  278. package/dist/modern/CodeEditor/styles.js +43 -0
  279. package/dist/modern/CodeEditor/styles.js.map +1 -0
  280. package/dist/modern/Footer/Footer.d.ts +12 -0
  281. package/dist/modern/Footer/Footer.js +51 -0
  282. package/dist/modern/Footer/Footer.js.map +1 -0
  283. package/dist/modern/Footer/index.d.ts +2 -0
  284. package/dist/modern/Footer/index.js +2 -0
  285. package/dist/modern/Footer/index.js.map +1 -0
  286. package/dist/modern/Footer/styles.js +43 -0
  287. package/dist/modern/Footer/styles.js.map +1 -0
  288. package/dist/modern/FormComposer/FormComposer.d.ts +41 -0
  289. package/dist/modern/FormComposer/FormComposer.js +183 -0
  290. package/dist/modern/FormComposer/FormComposer.js.map +1 -0
  291. package/dist/modern/FormComposer/index.d.ts +2 -0
  292. package/dist/modern/FormComposer/index.js +2 -0
  293. package/dist/modern/FormComposer/index.js.map +1 -0
  294. package/dist/modern/FormComposer/styles.js +29 -0
  295. package/dist/modern/FormComposer/styles.js.map +1 -0
  296. package/dist/modern/Loading/Loading.d.ts +32 -0
  297. package/dist/modern/Loading/Loading.js +72 -0
  298. package/dist/modern/Loading/Loading.js.map +1 -0
  299. package/dist/modern/Loading/LoadingWithDelay.d.ts +12 -0
  300. package/dist/modern/Loading/LoadingWithDelay.js +92 -0
  301. package/dist/modern/Loading/LoadingWithDelay.js.map +1 -0
  302. package/dist/modern/Loading/index.d.ts +2 -0
  303. package/dist/modern/Loading/index.js +2 -0
  304. package/dist/modern/Loading/index.js.map +1 -0
  305. package/dist/modern/Loading/styles.js +76 -0
  306. package/dist/modern/Loading/styles.js.map +1 -0
  307. package/dist/modern/NavigationAnchors/NavigationAnchors.d.ts +46 -0
  308. package/dist/modern/NavigationAnchors/NavigationAnchors.js +243 -0
  309. package/dist/modern/NavigationAnchors/NavigationAnchors.js.map +1 -0
  310. package/dist/modern/NavigationAnchors/index.d.ts +2 -0
  311. package/dist/modern/NavigationAnchors/index.js +2 -0
  312. package/dist/modern/NavigationAnchors/index.js.map +1 -0
  313. package/dist/modern/NavigationAnchors/styles.js +61 -0
  314. package/dist/modern/NavigationAnchors/styles.js.map +1 -0
  315. package/dist/modern/NotificationPanel/Notification/Notification.js +90 -0
  316. package/dist/modern/NotificationPanel/Notification/Notification.js.map +1 -0
  317. package/dist/modern/NotificationPanel/Notification/index.js +7 -0
  318. package/dist/modern/NotificationPanel/Notification/index.js.map +1 -0
  319. package/dist/modern/NotificationPanel/Notification/styles.js +45 -0
  320. package/dist/modern/NotificationPanel/Notification/styles.js.map +1 -0
  321. package/dist/modern/NotificationPanel/NotificationPanel.d.ts +49 -0
  322. package/dist/modern/NotificationPanel/NotificationPanel.js +153 -0
  323. package/dist/modern/NotificationPanel/NotificationPanel.js.map +1 -0
  324. package/dist/modern/NotificationPanel/Panel/Panel.js +133 -0
  325. package/dist/modern/NotificationPanel/Panel/Panel.js.map +1 -0
  326. package/dist/modern/NotificationPanel/Panel/index.js +7 -0
  327. package/dist/modern/NotificationPanel/Panel/index.js.map +1 -0
  328. package/dist/modern/NotificationPanel/Panel/styles.js +56 -0
  329. package/dist/modern/NotificationPanel/Panel/styles.js.map +1 -0
  330. package/dist/modern/NotificationPanel/index.d.ts +2 -0
  331. package/dist/modern/NotificationPanel/index.js +2 -0
  332. package/dist/modern/NotificationPanel/index.js.map +1 -0
  333. package/dist/modern/NotificationPanel/styles.js +9 -0
  334. package/dist/modern/NotificationPanel/styles.js.map +1 -0
  335. package/dist/modern/Slider/KnobRing/KnobRing.js +17 -0
  336. package/dist/modern/Slider/KnobRing/KnobRing.js.map +1 -0
  337. package/dist/modern/Slider/KnobRing/index.js +5 -0
  338. package/dist/modern/Slider/KnobRing/index.js.map +1 -0
  339. package/dist/modern/Slider/KnobRing/styles.js +34 -0
  340. package/dist/modern/Slider/KnobRing/styles.js.map +1 -0
  341. package/dist/modern/Slider/Slider.d.ts +133 -0
  342. package/dist/modern/Slider/Slider.js +542 -0
  343. package/dist/modern/Slider/Slider.js.map +1 -0
  344. package/dist/modern/Slider/index.d.ts +2 -0
  345. package/dist/modern/Slider/index.js +2 -0
  346. package/dist/modern/Slider/index.js.map +1 -0
  347. package/dist/modern/Slider/styles.js +99 -0
  348. package/dist/modern/Slider/styles.js.map +1 -0
  349. package/dist/modern/TimePicker/PeriodPicker/PeriodPicker.js +88 -0
  350. package/dist/modern/TimePicker/PeriodPicker/PeriodPicker.js.map +1 -0
  351. package/dist/modern/TimePicker/PeriodPicker/index.js +7 -0
  352. package/dist/modern/TimePicker/PeriodPicker/index.js.map +1 -0
  353. package/dist/modern/TimePicker/PeriodPicker/styles.js +37 -0
  354. package/dist/modern/TimePicker/PeriodPicker/styles.js.map +1 -0
  355. package/dist/modern/TimePicker/TimePicker.d.ts +77 -0
  356. package/dist/modern/TimePicker/TimePicker.js +394 -0
  357. package/dist/modern/TimePicker/TimePicker.js.map +1 -0
  358. package/dist/modern/TimePicker/UnitTimePicker/UnitTimePicker.js +186 -0
  359. package/dist/modern/TimePicker/UnitTimePicker/UnitTimePicker.js.map +1 -0
  360. package/dist/modern/TimePicker/UnitTimePicker/index.js +7 -0
  361. package/dist/modern/TimePicker/UnitTimePicker/index.js.map +1 -0
  362. package/dist/modern/TimePicker/UnitTimePicker/styles.js +54 -0
  363. package/dist/modern/TimePicker/UnitTimePicker/styles.js.map +1 -0
  364. package/dist/modern/TimePicker/enums.js +32 -0
  365. package/dist/modern/TimePicker/enums.js.map +1 -0
  366. package/dist/modern/TimePicker/index.d.ts +2 -0
  367. package/dist/modern/TimePicker/index.js +2 -0
  368. package/dist/modern/TimePicker/index.js.map +1 -0
  369. package/dist/modern/TimePicker/styles.js +87 -0
  370. package/dist/modern/TimePicker/styles.js.map +1 -0
  371. package/dist/modern/TimePicker/timePickerConverter.js +66 -0
  372. package/dist/modern/TimePicker/timePickerConverter.js.map +1 -0
  373. package/dist/modern/TimePicker/timePickerFormatter.js +62 -0
  374. package/dist/modern/TimePicker/timePickerFormatter.js.map +1 -0
  375. package/dist/modern/TimePicker/timePickerUtils.js +26 -0
  376. package/dist/modern/TimePicker/timePickerUtils.js.map +1 -0
  377. package/dist/modern/index.d.ts +26 -0
  378. package/dist/modern/index.js +11 -0
  379. package/dist/modern/index.js.map +1 -0
  380. package/dist/modern/withStyleProps/WithStyleProps.js +10 -0
  381. package/dist/modern/withStyleProps/WithStyleProps.js.map +1 -0
  382. package/dist/modern/withStyleProps/index.js +2 -0
  383. package/dist/modern/withStyleProps/index.js.map +1 -0
  384. package/dist/withStyleProps/WithStyleProps.js +25 -0
  385. package/dist/withStyleProps/WithStyleProps.js.map +1 -0
  386. package/dist/withStyleProps/index.js +16 -0
  387. package/dist/withStyleProps/index.js.map +1 -0
  388. package/package.json +72 -0
@@ -0,0 +1,78 @@
1
+ var interval = 0.11;
2
+
3
+ var styles = function styles(theme) {
4
+ return {
5
+ loading: {
6
+ textAlign: "center"
7
+ },
8
+ centerPosition: {
9
+ width: "100%",
10
+ height: "100%",
11
+ display: "flex",
12
+ alignItems: "center",
13
+ justifyContent: "center"
14
+ },
15
+ inlinePosition: {
16
+ marginTop: "5px"
17
+ },
18
+ loadingBar: {
19
+ display: "inline-block",
20
+ backgroundColor: theme.hv.palette.accent.acce1,
21
+ "&.regular": {
22
+ animation: "$loading-regular 1s ease-in-out infinite",
23
+ width: "4px",
24
+ height: "14px",
25
+ margin: "3px",
26
+ "&:nth-child(1)": {
27
+ animationDelay: "0"
28
+ },
29
+ "&:nth-child(2)": {
30
+ animationDelay: "".concat(interval * 2, "s")
31
+ },
32
+ "&:nth-child(3)": {
33
+ animationDelay: "".concat(interval * 4, "s")
34
+ }
35
+ },
36
+ "&.small": {
37
+ animation: "$loading-small 1s ease-in-out infinite",
38
+ width: "2px",
39
+ height: "10px",
40
+ margin: "4px 2px 2px 2px",
41
+ "&:nth-child(1)": {
42
+ animationDelay: "0"
43
+ },
44
+ "&:nth-child(2)": {
45
+ animationDelay: "".concat(interval, "s")
46
+ },
47
+ "&:nth-child(3)": {
48
+ animationDelay: "".concat(interval * 2, "s")
49
+ }
50
+ }
51
+ },
52
+ "@keyframes loading-regular": {
53
+ "0%": {
54
+ transform: "scale(1)",
55
+ backgroundColor: theme.hv.palette.accent.acce1
56
+ },
57
+ "50%": {
58
+ transform: "scale(1, 1.9)",
59
+ backgroundColor: theme.hv.palette.accent.acce3
60
+ }
61
+ },
62
+ "@keyframes loading-small": {
63
+ "0%": {
64
+ transform: "scale(1)",
65
+ backgroundColor: theme.hv.palette.accent.acce1
66
+ },
67
+ "50%": {
68
+ transform: "scale(1, 1.9)"
69
+ }
70
+ },
71
+ loadingText: {
72
+ marginTop: "20px"
73
+ }
74
+ };
75
+ };
76
+
77
+ export default styles;
78
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["interval","styles","theme","loading","textAlign","centerPosition","width","height","display","alignItems","justifyContent","inlinePosition","marginTop","loadingBar","backgroundColor","hv","palette","accent","acce1","animation","margin","animationDelay","transform","acce3","loadingText"],"sources":["../../../src/Loading/styles.js"],"sourcesContent":["const interval = 0.11;\n\nconst styles = (theme) => ({\n loading: {\n textAlign: \"center\",\n },\n\n centerPosition: {\n width: \"100%\",\n height: \"100%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n\n inlinePosition: {\n marginTop: \"5px\",\n },\n\n loadingBar: {\n display: \"inline-block\",\n backgroundColor: theme.hv.palette.accent.acce1,\n\n \"&.regular\": {\n animation: \"$loading-regular 1s ease-in-out infinite\",\n width: \"4px\",\n height: \"14px\",\n margin: \"3px\",\n\n \"&:nth-child(1)\": {\n animationDelay: \"0\",\n },\n \"&:nth-child(2)\": {\n animationDelay: `${interval * 2}s`,\n },\n \"&:nth-child(3)\": {\n animationDelay: `${interval * 4}s`,\n },\n },\n\n \"&.small\": {\n animation: \"$loading-small 1s ease-in-out infinite\",\n width: \"2px\",\n height: \"10px\",\n margin: \"4px 2px 2px 2px\",\n\n \"&:nth-child(1)\": {\n animationDelay: \"0\",\n },\n \"&:nth-child(2)\": {\n animationDelay: `${interval}s`,\n },\n \"&:nth-child(3)\": {\n animationDelay: `${interval * 2}s`,\n },\n },\n },\n\n \"@keyframes loading-regular\": {\n \"0%\": {\n transform: \"scale(1)\",\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"50%\": {\n transform: \"scale(1, 1.9)\",\n backgroundColor: theme.hv.palette.accent.acce3,\n },\n },\n\n \"@keyframes loading-small\": {\n \"0%\": {\n transform: \"scale(1)\",\n backgroundColor: theme.hv.palette.accent.acce1,\n },\n \"50%\": {\n transform: \"scale(1, 1.9)\",\n },\n },\n\n loadingText: {\n marginTop: \"20px\",\n },\n});\n\nexport default styles;\n"],"mappings":"AAAA,IAAMA,QAAQ,GAAG,IAAjB;;AAEA,IAAMC,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,OAAO,EAAE;MACPC,SAAS,EAAE;IADJ,CADgB;IAKzBC,cAAc,EAAE;MACdC,KAAK,EAAE,MADO;MAEdC,MAAM,EAAE,MAFM;MAGdC,OAAO,EAAE,MAHK;MAIdC,UAAU,E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I,SAAS,EAAE;MADN;IALmB,CAnEH;IA6EzBE,WAAW,EAAE;MACXZ,SAAS,EAAE;IADA;EA7EY,CAAZ;AAAA,CAAf;;AAkFA,eAAeX,MAAf"}
@@ -0,0 +1,46 @@
1
+ import { StandardProps, DrawerProps } from "@material-ui/core";
2
+
3
+ interface Option {
4
+ key: string;
5
+ label: string;
6
+ value: string;
7
+ }
8
+
9
+ export type HvNavigationAnchorsClassKey =
10
+ | "drawer"
11
+ | "dense"
12
+ | "drawerPaper"
13
+ | "drawerPaperPositionInherit"
14
+ | "listRoot"
15
+ | "listDense"
16
+ | "listItemSelected"
17
+ | "listItemRoot"
18
+ | "listItemGutters"
19
+ | "listItemTextSelected"
20
+ | "listItemTextDense";
21
+
22
+ export interface HvNavigationAnchorsProps
23
+ extends StandardProps<DrawerProps, HvNavigationAnchorsClassKey> {
24
+ /**
25
+ * An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied
26
+ */
27
+ options: Option[];
28
+ /**
29
+ * True if the href location link should be applied. It will create an a element around every list item
30
+ */
31
+ href?: boolean;
32
+ /**
33
+ * Whether the anchors are always in a fixed position
34
+ */
35
+ floating?: boolean;
36
+ /**
37
+ * Currently selected index passed from the parent.
38
+ */
39
+ selectedIndex?: number;
40
+ /**
41
+ * The Id of the scrollable container containing displayed elements
42
+ */
43
+ scrollElementId?: string;
44
+ }
45
+
46
+ export default function HvNavigationAnchors(props: HvNavigationAnchorsProps): JSX.Element | null;
@@ -0,0 +1,275 @@
1
+ import "core-js/modules/es.object.to-string.js";
2
+ import "core-js/modules/es.reflect.construct.js";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
6
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
7
+ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
8
+ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
9
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
+ import "core-js/modules/es.regexp.exec.js";
11
+ import "core-js/modules/es.string.split.js";
12
+ import "core-js/modules/es.array.map.js";
13
+ import "core-js/modules/es.array.concat.js";
14
+
15
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
16
+
17
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
18
+
19
+ import React from "react";
20
+ import PropTypes from "prop-types";
21
+ import clsx from "clsx";
22
+ import { Drawer, List, ListItem, ListItemText, withStyles } from "@material-ui/core";
23
+ import styles from "./styles";
24
+ var RETRY_MAX = 5;
25
+ /**
26
+ * A navigation component to help in changing views, still in development
27
+ */
28
+
29
+ var NavigationAnchors = /*#__PURE__*/function (_React$Component) {
30
+ _inherits(NavigationAnchors, _React$Component);
31
+
32
+ var _super = _createSuper(NavigationAnchors);
33
+
34
+ function NavigationAnchors(props) {
35
+ var _this;
36
+
37
+ _classCallCheck(this, NavigationAnchors);
38
+
39
+ _this = _super.call(this, props);
40
+
41
+ _defineProperty(_assertThisInitialized(_this), "afterLoadScrollIntoView", function () {
42
+ var hashValue = document.location.hash.split("#")[1] || "";
43
+ var ele = document.getElementById(hashValue);
44
+ var retry = 0;
45
+ _this.checkRenderedInterval = setInterval(function () {
46
+ ele = document.getElementById(hashValue);
47
+
48
+ if (ele) {
49
+ ele.scrollIntoView({
50
+ behavior: "smooth"
51
+ });
52
+ clearInterval(_this.checkRenderedInterval);
53
+ } else {
54
+ retry += 1;
55
+
56
+ if (retry === RETRY_MAX) {
57
+ clearInterval(_this.checkRenderedInterval);
58
+ }
59
+ }
60
+ }, 1000);
61
+ });
62
+
63
+ _defineProperty(_assertThisInitialized(_this), "checkScroll", function () {
64
+ var throttle = _this.state.throttle;
65
+
66
+ if (!throttle) {
67
+ var selectedIndex = _this.hasScrolledIntoView();
68
+
69
+ if (selectedIndex > -1) {
70
+ _this.setState({
71
+ selectedIndex: selectedIndex
72
+ });
73
+ }
74
+
75
+ _this.setState({
76
+ throttle: true
77
+ });
78
+
79
+ setTimeout(function () {
80
+ _this.setState({
81
+ throttle: false
82
+ });
83
+ }, 100);
84
+ }
85
+ });
86
+
87
+ _defineProperty(_assertThisInitialized(_this), "hasScrolledIntoView", function () {
88
+ var _this$props = _this.props,
89
+ options = _this$props.options,
90
+ scrollElementId = _this$props.scrollElementId; // Select last nav item if user has scrolled to bottom of page
91
+
92
+ var page = document.getElementById(scrollElementId);
93
+
94
+ if (!!page && page.scrollHeight - page.scrollTop === page.offsetHeight) {
95
+ return options.length - 1;
96
+ }
97
+
98
+ var bounds = _this.scrollEle.getBoundingClientRect();
99
+
100
+ var midPoint = bounds.top + window.scrollY + bounds.height / 2; // Find index of element where top is between the top and mid point of container
101
+
102
+ for (var i = 0; i < options.length; i += 1) {
103
+ var ele = document.getElementById(options[i].value);
104
+
105
+ if (ele) {
106
+ var rect = ele.getBoundingClientRect();
107
+ var elemTop = rect.top + window.scrollY; // Bounding rectangle relative to the top left corner of the parent.
108
+
109
+ if (elemTop >= bounds.top + window.scrollY && elemTop <= midPoint) {
110
+ return i;
111
+ }
112
+ }
113
+ }
114
+
115
+ return -1;
116
+ });
117
+
118
+ _defineProperty(_assertThisInitialized(_this), "handleListItemClick", function (event, id, index) {
119
+ _this.setState({
120
+ selectedIndex: index
121
+ });
122
+
123
+ var ele = document.getElementById(id);
124
+
125
+ if (ele) {
126
+ ele.scrollIntoView({
127
+ behavior: "smooth"
128
+ });
129
+ }
130
+
131
+ var _this$props2 = _this.props,
132
+ href = _this$props2.href,
133
+ onClick = _this$props2.onClick,
134
+ options = _this$props2.options;
135
+
136
+ if (!href && onClick) {
137
+ onClick(event, index);
138
+ } else if (href) {
139
+ window.history.pushState({}, "", "#".concat(options[index].value));
140
+ }
141
+ });
142
+
143
+ _this.state = {
144
+ selectedIndex: props.selectedIndex || 0,
145
+ throttle: false
146
+ };
147
+ return _this;
148
+ }
149
+
150
+ _createClass(NavigationAnchors, [{
151
+ key: "componentDidMount",
152
+ value: function componentDidMount() {
153
+ var scrollElementId = this.props.scrollElementId;
154
+ this.afterLoadScrollIntoView(); // Check if scrolled
155
+
156
+ this.scrollEle = document.getElementById(scrollElementId);
157
+
158
+ if (this.scrollEle) {
159
+ this.scrollEle.addEventListener("wheel", this.checkScroll);
160
+ }
161
+ }
162
+ }, {
163
+ key: "componentWillUnmount",
164
+ value: function componentWillUnmount() {
165
+ if (this.scrollEle) {
166
+ this.scrollEle.removeEventListener("wheel", this.checkScroll);
167
+ }
168
+
169
+ clearInterval(this.checkRenderedInterval);
170
+ } // afterLoadScrollIntoView waits for the elements to be rendered on the page
171
+
172
+ }, {
173
+ key: "render",
174
+ value: function render() {
175
+ var _this2 = this;
176
+
177
+ var _this$props3 = this.props,
178
+ classes = _this$props3.classes,
179
+ options = _this$props3.options,
180
+ floating = _this$props3.floating;
181
+ var selectedIndex = this.state.selectedIndex;
182
+ return /*#__PURE__*/React.createElement(Drawer, {
183
+ className: clsx(classes.drawer, classes.dense),
184
+ variant: "persistent",
185
+ anchor: "left",
186
+ open: true,
187
+ classes: {
188
+ paper: clsx(classes.drawerPaper, !floating && classes.drawerPaperPositionInherit)
189
+ }
190
+ }, /*#__PURE__*/React.createElement(List, {
191
+ dense: true,
192
+ classes: {
193
+ root: classes.listRoot,
194
+ dense: classes.listDense
195
+ }
196
+ }, options.map(function (option, index) {
197
+ return /*#__PURE__*/React.createElement(ListItem, {
198
+ button: true,
199
+ classes: {
200
+ selected: classes.listItemSelected,
201
+ root: classes.listItemRoot,
202
+ gutters: classes.listItemGutters
203
+ },
204
+ key: option.key || option.label,
205
+ onClick: function onClick(event) {
206
+ return _this2.handleListItemClick(event, option.value, index);
207
+ },
208
+ selected: selectedIndex === index
209
+ }, /*#__PURE__*/React.createElement(ListItemText, {
210
+ classes: {
211
+ primary: clsx(selectedIndex === index && classes.listItemTextSelected),
212
+ dense: classes.listItemTextDense
213
+ },
214
+ primary: option.label
215
+ }));
216
+ })));
217
+ }
218
+ }]);
219
+
220
+ return NavigationAnchors;
221
+ }(React.Component);
222
+
223
+ process.env.NODE_ENV !== "production" ? NavigationAnchors.propTypes = {
224
+ /**
225
+ * Styles applied to the Drawer Paper element
226
+ */
227
+ classes: PropTypes.instanceOf(Object).isRequired,
228
+
229
+ /**
230
+ * An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied
231
+ */
232
+ options: PropTypes.arrayOf(function (propValue, key, componentName, location, propFullName) {
233
+ if (propValue[key].label === undefined || propValue[key].value === undefined) {
234
+ return new Error("Invalid prop \"".concat(propFullName, "\" supplied to \"").concat(componentName, "\". Validation Failed."));
235
+ }
236
+
237
+ return null;
238
+ }).isRequired,
239
+
240
+ /**
241
+ * True if the href location link should be applied. It will create an a element around every list item
242
+ */
243
+ href: PropTypes.bool,
244
+
245
+ /**
246
+ * A callback called on click of every list item, if the href is false
247
+ */
248
+ onClick: PropTypes.func,
249
+
250
+ /**
251
+ * Whether the anchors are always in a fixed position
252
+ */
253
+ floating: PropTypes.bool,
254
+
255
+ /**
256
+ * Currently selected index passed from the parent.
257
+ */
258
+ selectedIndex: PropTypes.number,
259
+
260
+ /**
261
+ * The Id of the scrollable container containing displayed elements
262
+ */
263
+ scrollElementId: PropTypes.string
264
+ } : void 0;
265
+ NavigationAnchors.defaultProps = {
266
+ href: true,
267
+ onClick: undefined,
268
+ floating: true,
269
+ selectedIndex: 0,
270
+ scrollElementId: ""
271
+ };
272
+ export default withStyles(styles, {
273
+ name: "HvNavigationAnchors"
274
+ })(NavigationAnchors);
275
+ //# sourceMappingURL=NavigationAnchors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NavigationAnchors.js","names":["React","PropTypes","clsx","Drawer","List","ListItem","ListItemText","withStyles","styles","RETRY_MAX","NavigationAnchors","props","hashValue","document","location","hash","split","ele","getElementById","retry","checkRenderedInterval","setInterval","scrollIntoView","behavior","clearInterval","throttle","state","selectedIndex","hasScrolledIntoView","setState","setTimeout","options","scrollElementId","page","scrollHeight","scrollTop","offsetHeight","length","bounds","scrollEle","getBoundingClientRect","midPoint","top","window","scrollY","height","i","value","rect","elemTop","event","id","index","href","onClick","history","pushState","afterLoadScrollIntoView","addEventListener","checkScroll","removeEventListener","classes","floating","drawer","dense","paper","drawerPaper","drawerPaperPositionInherit","root","listRoot","listDense","map","option","selected","listItemSelected","listItemRoot","gutters","listItemGutters","key","label","handleListItemClick","primary","listItemTextSelected","listItemTextDense","Component","propTypes","instanceOf","Object","isRequired","arrayOf","propValue","componentName","propFullName","undefined","Error","bool","func","number","string","defaultProps","name"],"sources":["../../../src/NavigationAnchors/NavigationAnchors.js"],"sourcesContent":["import React from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport { Drawer, List, ListItem, ListItemText, withStyles } from \"@material-ui/core\";\nimport styles from \"./styles\";\n\nconst RETRY_MAX = 5;\n\n/**\n * A navigation component to help in changing views, still in development\n */\nclass NavigationAnchors extends React.Component {\n constructor(props) {\n super(props);\n this.state = {\n selectedIndex: props.selectedIndex || 0,\n throttle: false,\n };\n }\n\n componentDidMount() {\n const { scrollElementId } = this.props;\n this.afterLoadScrollIntoView();\n // Check if scrolled\n this.scrollEle = document.getElementById(scrollElementId);\n if (this.scrollEle) {\n this.scrollEle.addEventListener(\"wheel\", this.checkScroll);\n }\n }\n\n componentWillUnmount() {\n if (this.scrollEle) {\n this.scrollEle.removeEventListener(\"wheel\", this.checkScroll);\n }\n clearInterval(this.checkRenderedInterval);\n }\n\n // afterLoadScrollIntoView waits for the elements to be rendered on the page\n afterLoadScrollIntoView = () => {\n const hashValue = document.location.hash.split(\"#\")[1] || \"\";\n let ele = document.getElementById(hashValue);\n\n let retry = 0;\n this.checkRenderedInterval = setInterval(() => {\n ele = document.getElementById(hashValue);\n if (ele) {\n ele.scrollIntoView({ behavior: \"smooth\" });\n clearInterval(this.checkRenderedInterval);\n } else {\n retry += 1;\n if (retry === RETRY_MAX) {\n clearInterval(this.checkRenderedInterval);\n }\n }\n }, 1000);\n };\n\n checkScroll = () => {\n const { throttle } = this.state;\n if (!throttle) {\n const selectedIndex = this.hasScrolledIntoView();\n if (selectedIndex > -1) {\n this.setState({ selectedIndex });\n }\n this.setState({\n throttle: true,\n });\n setTimeout(() => {\n this.setState({\n throttle: false,\n });\n }, 100);\n }\n };\n\n hasScrolledIntoView = () => {\n const { options, scrollElementId } = this.props;\n\n // Select last nav item if user has scrolled to bottom of page\n const page = document.getElementById(scrollElementId);\n if (!!page && page.scrollHeight - page.scrollTop === page.offsetHeight) {\n return options.length - 1;\n }\n\n const bounds = this.scrollEle.getBoundingClientRect();\n const midPoint = bounds.top + window.scrollY + bounds.height / 2;\n\n // Find index of element where top is between the top and mid point of container\n for (let i = 0; i < options.length; i += 1) {\n const ele = document.getElementById(options[i].value);\n if (ele) {\n const rect = ele.getBoundingClientRect();\n const elemTop = rect.top + window.scrollY;\n\n // Bounding rectangle relative to the top left corner of the parent.\n if (elemTop >= bounds.top + window.scrollY && elemTop <= midPoint) {\n return i;\n }\n }\n }\n return -1;\n };\n\n handleListItemClick = (event, id, index) => {\n this.setState({ selectedIndex: index });\n\n const ele = document.getElementById(id);\n if (ele) {\n ele.scrollIntoView({ behavior: \"smooth\" });\n }\n\n const { href, onClick, options } = this.props;\n if (!href && onClick) {\n onClick(event, index);\n } else if (href) {\n window.history.pushState({}, \"\", `#${options[index].value}`);\n }\n };\n\n render() {\n const { classes, options, floating } = this.props;\n const { selectedIndex } = this.state;\n\n return (\n <Drawer\n className={clsx(classes.drawer, classes.dense)}\n variant=\"persistent\"\n anchor=\"left\"\n open\n classes={{\n paper: clsx(classes.drawerPaper, {\n [classes.drawerPaperPositionInherit]: !floating,\n }),\n }}\n >\n <List\n dense\n classes={{\n root: classes.listRoot,\n dense: classes.listDense,\n }}\n >\n {options.map((option, index) => (\n <ListItem\n button\n classes={{\n selected: classes.listItemSelected,\n root: classes.listItemRoot,\n gutters: classes.listItemGutters,\n }}\n key={option.key || option.label}\n onClick={(event) => this.handleListItemClick(event, option.value, index)}\n selected={selectedIndex === index}\n >\n <ListItemText\n classes={{\n primary: clsx({\n [classes.listItemTextSelected]: selectedIndex === index,\n }),\n dense: classes.listItemTextDense,\n }}\n primary={option.label}\n />\n </ListItem>\n ))}\n </List>\n </Drawer>\n );\n }\n}\n\nNavigationAnchors.propTypes = {\n /**\n * Styles applied to the Drawer Paper element\n */\n classes: PropTypes.instanceOf(Object).isRequired,\n /**\n * An Array of Objects with Label and Value. Label is the displayed Element and Value is the local navigation location applied\n */\n options: PropTypes.arrayOf((propValue, key, componentName, location, propFullName) => {\n if (propValue[key].label === undefined || propValue[key].value === undefined) {\n return new Error(\n `Invalid prop \"${propFullName}\" supplied to \"${componentName}\". Validation Failed.`\n );\n }\n return null;\n }).isRequired,\n /**\n * True if the href location link should be applied. It will create an a element around every list item\n */\n href: PropTypes.bool,\n /**\n * A callback called on click of every list item, if the href is false\n */\n onClick: PropTypes.func,\n /**\n * Whether the anchors are always in a fixed position\n */\n floating: PropTypes.bool,\n /**\n * Currently selected index passed from the parent.\n */\n selectedIndex: PropTypes.number,\n /**\n * The Id of the scrollable container containing displayed elements\n */\n scrollElementId: PropTypes.string,\n};\n\nNavigationAnchors.defaultProps = {\n href: true,\n onClick: undefined,\n floating: true,\n selectedIndex: 0,\n scrollElementId: \"\",\n};\n\nexport default withStyles(styles, { name: \"HvNavigationAnchors\" })(NavigationAnchors);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,MAA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AAsCAxF,iBAAiB,CAACyF,YAAlB,GAAiC;EAC/B9C,IAAI,EAAE,IADyB;EAE/BC,OAAO,EAAEuC,SAFsB;EAG/B/B,QAAQ,EAAE,IAHqB;EAI/BnC,aAAa,EAAE,CAJgB;EAK/BK,eAAe,EAAE;AALc,CAAjC;AAQA,eAAezB,UAAU,CAACC,MAAD,EAAS;EAAE4F,IAAI,EAAE;AAAR,CAAT,CAAV,CAAoD1F,iBAApD,CAAf"}
@@ -0,0 +1,2 @@
1
+ export { default } from "./NavigationAnchors";
2
+ export * from "./NavigationAnchors";
@@ -0,0 +1,2 @@
1
+ export { default } from "./NavigationAnchors";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["default"],"sources":["../../../src/NavigationAnchors/index.js"],"sourcesContent":["export { default } from \"./NavigationAnchors\";\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,qBAAxB"}
@@ -0,0 +1,70 @@
1
+ import "core-js/modules/es.object.keys.js";
2
+ import "core-js/modules/es.symbol.js";
3
+ import "core-js/modules/es.array.filter.js";
4
+ import "core-js/modules/es.object.to-string.js";
5
+ import "core-js/modules/es.object.get-own-property-descriptor.js";
6
+ import "core-js/modules/web.dom-collections.for-each.js";
7
+ import "core-js/modules/es.object.get-own-property-descriptors.js";
8
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
9
+
10
+ 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; }
11
+
12
+ 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; }
13
+
14
+ var styles = function styles(theme) {
15
+ return {
16
+ drawerPaper: {
17
+ width: 200,
18
+ marginLeft: "".concat(theme.hv.spacing.xs, "px"),
19
+ background: "none",
20
+ borderRight: "none"
21
+ },
22
+ drawerPaperPositionInherit: {
23
+ position: "inherit"
24
+ },
25
+ listRoot: {
26
+ borderLeft: "1px solid ".concat(theme.hv.palette.atmosphere.atmo6)
27
+ },
28
+ listDense: {
29
+ paddingTop: 0,
30
+ paddingBottom: 0
31
+ },
32
+ listItemRoot: {
33
+ minHeight: 32,
34
+ background: "none",
35
+ marginBottom: "8px",
36
+ "&:last-child": {
37
+ marginBottom: "0"
38
+ },
39
+ "&:hover": {
40
+ backgroundColor: "".concat(theme.hv.palette.atmosphere.atmo4)
41
+ },
42
+ "&$listItemSelected": {
43
+ backgroundColor: "".concat(theme.hv.palette.atmosphere.atmo4)
44
+ },
45
+ "&$listItemSelected:hover": {
46
+ backgroundColor: "".concat(theme.hv.palette.atmosphere.atmo4)
47
+ }
48
+ },
49
+ listItemGutters: {
50
+ "@media (min-width: 600px)": {
51
+ padding: "0 ".concat(theme.hv.spacing.xs, "px")
52
+ }
53
+ },
54
+ listItemSelected: {
55
+ left: "-1px",
56
+ borderLeft: "4px solid ".concat(theme.hv.palette.accent.acce1),
57
+ "@media (min-width: 600px)": {
58
+ paddingLeft: 7
59
+ }
60
+ },
61
+ listItemTextDense: {
62
+ fontSize: theme.hv.typography.normalText.fontSize,
63
+ fontWeight: "inherit"
64
+ },
65
+ listItemTextSelected: _objectSpread({}, theme.hv.typography.highlightText)
66
+ };
67
+ };
68
+
69
+ export default styles;
70
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","names":["styles","theme","drawerPaper","width","marginLeft","hv","spacing","xs","background","borderRight","drawerPaperPositionInherit","position","listRoot","borderLeft","palette","atmosphere","atmo6","listDense","paddingTop","paddingBottom","listItemRoot","minHeight","marginBottom","backgroundColor","atmo4","listItemGutters","padding","listItemSelected","left","accent","acce1","paddingLeft","listItemTextDense","fontSize","typography","normalText","fontWeight","listItemTextSelected","highlightText"],"sources":["../../../src/NavigationAnchors/styles.js"],"sourcesContent":["const styles = (theme) => ({\n drawerPaper: {\n width: 200,\n marginLeft: `${theme.hv.spacing.xs}px`,\n background: \"none\",\n borderRight: \"none\",\n },\n drawerPaperPositionInherit: {\n position: \"inherit\",\n },\n listRoot: {\n borderLeft: `1px solid ${theme.hv.palette.atmosphere.atmo6}`,\n },\n listDense: {\n paddingTop: 0,\n paddingBottom: 0,\n },\n listItemRoot: {\n minHeight: 32,\n background: \"none\",\n marginBottom: \"8px\",\n \"&:last-child\": {\n marginBottom: \"0\",\n },\n \"&:hover\": {\n backgroundColor: `${theme.hv.palette.atmosphere.atmo4}`,\n },\n \"&$listItemSelected\": {\n backgroundColor: `${theme.hv.palette.atmosphere.atmo4}`,\n },\n \"&$listItemSelected:hover\": {\n backgroundColor: `${theme.hv.palette.atmosphere.atmo4}`,\n },\n },\n listItemGutters: {\n \"@media (min-width: 600px)\": {\n padding: `0 ${theme.hv.spacing.xs}px`,\n },\n },\n listItemSelected: {\n left: \"-1px\",\n borderLeft: `4px solid ${theme.hv.palette.accent.acce1}`,\n \"@media (min-width: 600px)\": {\n paddingLeft: 7,\n },\n },\n listItemTextDense: {\n fontSize: theme.hv.typography.normalText.fontSize,\n fontWeight: \"inherit\",\n },\n listItemTextSelected: {\n ...theme.hv.typography.highlightText,\n },\n});\n\nexport default styles;\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAMA,MAAM,GAAG,SAATA,MAAS,CAACC,KAAD;EAAA,OAAY;IACzBC,WAAW,EAAE;MACXC,KAAK,EAAE,GADI;MAEXC,UAAU,YAAKH,KAAK,CAACI,EAAN,CAASC,OAAT,CAAiBC,EAAtB,OAFC;MAGXC,UAAU,EAAE,MAHD;M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C,KAAK,CAACI,EAAN,CAAS6B,UAAT,CAAoBI,aADL;EAlDK,CAAZ;AAAA,CAAf;;AAuDA,eAAetC,MAAf"}
@@ -0,0 +1,119 @@
1
+ import "core-js/modules/es.object.to-string.js";
2
+ import "core-js/modules/es.reflect.construct.js";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
6
+ import _inherits from "@babel/runtime/helpers/esm/inherits";
7
+ import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
8
+ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
9
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
10
+ import "core-js/modules/es.array.concat.js";
11
+
12
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
13
+
14
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
15
+
16
+ import React, { Component } from "react";
17
+ import PropTypes from "prop-types";
18
+ import clsx from "clsx";
19
+ import moment from "moment/moment";
20
+
21
+ var Notification = /*#__PURE__*/function (_Component) {
22
+ _inherits(Notification, _Component);
23
+
24
+ var _super = _createSuper(Notification);
25
+
26
+ function Notification() {
27
+ var _this;
28
+
29
+ _classCallCheck(this, Notification);
30
+
31
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
+ args[_key] = arguments[_key];
33
+ }
34
+
35
+ _this = _super.call.apply(_super, [this].concat(args));
36
+
37
+ _defineProperty(_assertThisInitialized(_this), "getTime", function () {
38
+ var _this$props$notificat = _this.props.notification,
39
+ date = _this$props$notificat.date,
40
+ isRead = _this$props$notificat.isRead;
41
+
42
+ if (!isRead) {
43
+ return moment(date).fromNow();
44
+ }
45
+
46
+ var d = moment(date);
47
+ var format = "D MMMM YYYY, h:mm A";
48
+
49
+ if (d.isSame(Date.now(), "week")) {
50
+ format = "ddd, h:mm A";
51
+ }
52
+
53
+ return d.format(format);
54
+ });
55
+
56
+ return _this;
57
+ }
58
+
59
+ _createClass(Notification, [{
60
+ key: "render",
61
+ value: function render() {
62
+ var _this$props = this.props,
63
+ classes = _this$props.classes,
64
+ _this$props$notificat2 = _this$props.notification,
65
+ title = _this$props$notificat2.title,
66
+ isRead = _this$props$notificat2.isRead,
67
+ icon = _this$props$notificat2.icon;
68
+ return /*#__PURE__*/React.createElement("div", {
69
+ className: clsx(classes.root, isRead && classes.read)
70
+ }, /*#__PURE__*/React.createElement("div", {
71
+ className: classes.iconContainer
72
+ }, icon), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
73
+ className: clsx(classes.title, isRead && classes.read)
74
+ }, title), /*#__PURE__*/React.createElement("div", {
75
+ className: clsx(classes.timeContainer, isRead && classes.read)
76
+ }, /*#__PURE__*/React.createElement("div", {
77
+ className: clsx(classes.bullet, isRead && classes.hide)
78
+ }), /*#__PURE__*/React.createElement("div", {
79
+ className: classes.time
80
+ }, this.getTime()))));
81
+ }
82
+ }]);
83
+
84
+ return Notification;
85
+ }(Component);
86
+
87
+ export { Notification as default };
88
+ process.env.NODE_ENV !== "production" ? Notification.propTypes = {
89
+ /**
90
+ * A Jss Object used to override or extend the component styles.
91
+ */
92
+ classes: PropTypes.instanceOf(Object).isRequired,
93
+
94
+ /**
95
+ * Notification object to be rendered
96
+ */
97
+ notification: PropTypes.shape({
98
+ /**
99
+ * Title of the notification
100
+ */
101
+ title: PropTypes.string.isRequired,
102
+
103
+ /**
104
+ * 'true' if the notification has been read or 'false' if it has not been read
105
+ */
106
+ isRead: PropTypes.bool.isRequired,
107
+
108
+ /**
109
+ * date the notification was created
110
+ */
111
+ date: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).isRequired,
112
+
113
+ /**
114
+ * renderable icon that denotes the status of the notification
115
+ */
116
+ icon: PropTypes.element
117
+ }).isRequired
118
+ } : void 0;
119
+ //# sourceMappingURL=Notification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notification.js","names":["React","Component","PropTypes","clsx","moment","Notification","props","notification","date","isRead","fromNow","d","format","isSame","Date","now","classes","title","icon","root","read","iconContainer","timeContainer","bullet","hide","time","getTime","propTypes","instanceOf","Object","isRequired","shape","string","bool","oneOfType","number","object","element"],"sources":["../../../../src/NotificationPanel/Notification/Notification.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport PropTypes from \"prop-types\";\nimport clsx from \"clsx\";\nimport moment from \"moment/moment\";\n\nexport default class Notification extends Component {\n // TODO: figure out rules for how time should be presented\n getTime = () => {\n const {\n notification: { date, isRead },\n } = this.props;\n\n if (!isRead) {\n return moment(date).fromNow();\n }\n\n const d = moment(date);\n let format = \"D MMMM YYYY, h:mm A\";\n\n if (d.isSame(Date.now(), \"week\")) {\n format = \"ddd, h:mm A\";\n }\n\n return d.format(format);\n };\n\n render() {\n const {\n classes,\n notification: { title, isRead, icon },\n } = this.props;\n\n return (\n <div className={clsx(classes.root, { [classes.read]: isRead })}>\n <div className={classes.iconContainer}>{icon}</div>\n <div>\n <div className={clsx(classes.title, { [classes.read]: isRead })}>{title}</div>\n <div className={clsx(classes.timeContainer, { [classes.read]: isRead })}>\n <div className={clsx(classes.bullet, { [classes.hide]: isRead })} />\n <div className={classes.time}>{this.getTime()}</div>\n </div>\n </div>\n </div>\n );\n }\n}\n\nNotification.propTypes = {\n /**\n * A Jss Object used to override or extend the component styles.\n */\n classes: PropTypes.instanceOf(Object).isRequired,\n /**\n * Notification object to be rendered\n */\n notification: PropTypes.shape({\n /**\n * Title of the notification\n */\n title: PropTypes.string.isRequired,\n /**\n * 'true' if the notification has been read or 'false' if it has not been read\n */\n isRead: PropTypes.bool.isRequired,\n /**\n * date the notification was created\n */\n date: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object]).isRequired,\n /**\n * renderable icon that denotes the status of the notification\n */\n icon: PropTypes.element,\n }).isRequired,\n};\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,SAAhB,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,MAAjB;AACA,OAAOC,MAAP,MAAmB,eAAnB;;IAEqBC,Y;;;;;;;;;;;;;;;;8DAET,YAAM;MACd,4BAEI,MAAKC,KAFT,CACEC,YADF;MAAA,IACkBC,IADlB,yBACkBA,IADlB;MAAA,IACwBC,MADxB,yBACwBA,MADxB;;MAIA,IAAI,CAACA,MAAL,EAAa;QACX,OAAOL,MAAM,CAACI,IAAD,CAAN,CAAaE,OAAb,EAAP;MACD;;MAED,IAAMC,CAAC,GAAGP,MAAM,CAACI,IAAD,CAAhB;MACA,IAAII,MAAM,GAAG,qBAAb;;MAEA,IAAID,CAAC,CAACE,MAAF,CAASC,IAAI,CAACC,GAAL,EAAT,EAAqB,MAArB,CAAJ,EAAkC;QAChCH,MAAM,GAAG,aAAT;MACD;;MAED,OAAOD,CAAC,CAACC,MAAF,CAASA,MAAT,CAAP;IACD,C;;;;;;;WAED,kBAAS;MACP,kBAGI,KAAKN,KAHT;MAAA,IACEU,OADF,eACEA,OADF;MAAA,yCAEET,YAFF;MAAA,IAEkBU,KAFlB,0BAEkBA,KAFlB;MAAA,IAEyBR,MAFzB,0BAEyBA,MAFzB;MAAA,IAEiCS,IAFjC,0BAEiCA,IAFjC;MAKA,oBACE;QAAK,SAAS,EAAEf,IAAI,CAACa,OAAO,CAACG,IAAT,EAAiCV,MAAjC,IAAkBO,OAA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