@learningpool/ui 1.6.0-beta.9 → 1.6.1

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 (439) hide show
  1. package/.eslintrc.js +40 -0
  2. package/.github/pull_request_template.md +23 -0
  3. package/.github/renovate.json +57 -0
  4. package/.github/workflows/integration.yml +53 -0
  5. package/.github/workflows/wss.yml +22 -0
  6. package/.jest-test-results.json +1 -0
  7. package/.releaserc +32 -0
  8. package/.storybook/learningpoolTheme.js +39 -0
  9. package/.storybook/main.js +21 -0
  10. package/.storybook/manager-head.html +175 -0
  11. package/.storybook/manager.js +34 -0
  12. package/.storybook/preview-head.html +212 -0
  13. package/.storybook/preview.js +120 -0
  14. package/.storybook/storybook-sort.js +54 -0
  15. package/CHANGELOG.md +6 -0
  16. package/amplify.yml +16 -0
  17. package/babel.config.json +14 -0
  18. package/{assets → dist/assets}/Images.d.ts +0 -0
  19. package/{assets → dist/assets}/Images.js +0 -0
  20. package/{components → dist/components}/atoms/Autocomplete/Autocomplete.d.ts +0 -0
  21. package/{components → dist/components}/atoms/Autocomplete/Autocomplete.js +0 -0
  22. package/{components → dist/components}/atoms/Button/Button.d.ts +0 -0
  23. package/{components → dist/components}/atoms/Button/Button.js +0 -0
  24. package/{components → dist/components}/atoms/Checkbox/Checkbox.d.ts +0 -0
  25. package/{components → dist/components}/atoms/Checkbox/Checkbox.js +0 -0
  26. package/{components → dist/components}/atoms/IconButton/IconButton.d.ts +0 -0
  27. package/{components → dist/components}/atoms/IconButton/IconButton.js +0 -0
  28. package/{components → dist/components}/atoms/Radio/Radio.d.ts +0 -0
  29. package/{components → dist/components}/atoms/Radio/Radio.js +0 -0
  30. package/{components → dist/components}/atoms/Select/Select.d.ts +0 -0
  31. package/{components → dist/components}/atoms/Select/Select.js +0 -0
  32. package/{components → dist/components}/atoms/Slider/Slider.d.ts +0 -0
  33. package/{components → dist/components}/atoms/Slider/Slider.js +0 -0
  34. package/{components → dist/components}/atoms/Switch/Switch.d.ts +0 -0
  35. package/{components → dist/components}/atoms/Switch/Switch.js +0 -0
  36. package/{components → dist/components}/atoms/TextField/TextField.d.ts +0 -0
  37. package/{components → dist/components}/atoms/TextField/TextField.js +0 -0
  38. package/{components → dist/components}/atoms/ToggleButton/ToggleButton.d.ts +0 -0
  39. package/{components → dist/components}/atoms/ToggleButton/ToggleButton.js +0 -0
  40. package/{components → dist/components}/datadisplay/Avatar/Avatar.d.ts +0 -0
  41. package/{components → dist/components}/datadisplay/Avatar/Avatar.js +0 -0
  42. package/{components → dist/components}/datadisplay/Chip/Chip.d.ts +0 -0
  43. package/{components → dist/components}/datadisplay/Chip/Chip.js +0 -0
  44. package/{components → dist/components}/datadisplay/List/List.d.ts +0 -0
  45. package/{components → dist/components}/datadisplay/List/List.js +0 -0
  46. package/{components → dist/components}/datadisplay/Tooltip/Tooltip.d.ts +0 -0
  47. package/{components → dist/components}/datadisplay/Tooltip/Tooltip.js +0 -0
  48. package/{components → dist/components}/feedback/Alert/Alert.d.ts +0 -0
  49. package/{components → dist/components}/feedback/Alert/Alert.js +0 -0
  50. package/dist/components/landmarks/Header/Header.d.ts +26 -0
  51. package/dist/components/landmarks/Header/Header.js +75 -0
  52. package/dist/components/landmarks/Header/HeaderActionButtons.d.ts +3 -0
  53. package/dist/components/landmarks/Header/HeaderActionButtons.js +66 -0
  54. package/dist/components/landmarks/Header/HeaderStyles.d.ts +55 -0
  55. package/dist/components/landmarks/Header/HeaderStyles.js +13 -0
  56. package/{components → dist/components}/navigation/Drawer/Drawer.d.ts +0 -0
  57. package/{components → dist/components}/navigation/Drawer/Drawer.js +0 -0
  58. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigation.d.ts +1 -2
  59. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigation.js +56 -86
  60. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatar.d.ts +1 -1
  61. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatar.js +45 -23
  62. package/dist/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +3296 -0
  63. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationAvatarStyles.js +4 -4
  64. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationDrawer.d.ts +0 -0
  65. package/dist/components/navigation/MobileNavigation/MobileNavigationDrawer.js +71 -0
  66. package/dist/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +1215 -0
  67. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationDrawerStyles.js +2 -2
  68. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.d.ts +0 -0
  69. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.js +0 -0
  70. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.d.ts +0 -0
  71. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.js +0 -0
  72. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.d.ts +1 -1
  73. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.js +0 -0
  74. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.d.ts +1 -1
  75. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.js +0 -0
  76. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationMotion.d.ts +0 -0
  77. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationMotion.js +0 -0
  78. package/dist/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.d.ts +3 -0
  79. package/dist/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.js +19 -0
  80. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearch.d.ts +0 -0
  81. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearch.js +8 -6
  82. package/dist/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +1080 -0
  83. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationSearchStyles.js +2 -2
  84. package/{components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts → dist/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts} +66 -3
  85. package/{components → dist/components}/navigation/MobileNavigation/MobileNavigationStyles.js +19 -24
  86. package/dist/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +3 -0
  87. package/dist/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +28 -0
  88. package/dist/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +3 -0
  89. package/dist/components/navigation/MobileNavigation/MobileNavigationToggleX.js +28 -0
  90. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.d.ts +3 -3
  91. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigation.js +22 -25
  92. package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatar.d.ts +4 -0
  93. package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +79 -0
  94. package/dist/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +3296 -0
  95. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.js +5 -5
  96. package/dist/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +4 -0
  97. package/dist/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +99 -0
  98. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.d.ts +1 -1
  99. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.js +1 -1
  100. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.d.ts +1 -1
  101. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.js +0 -0
  102. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.d.ts +1 -3
  103. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.js +3 -5
  104. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationMotion.d.ts +0 -0
  105. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationMotion.js +0 -0
  106. package/dist/components/navigation/VerticalNavigation/VerticalNavigationStyles.d.ts +1163 -0
  107. package/{components → dist/components}/navigation/VerticalNavigation/VerticalNavigationStyles.js +5 -4
  108. package/{components → dist/components}/pages/ErrorPage/ErrorPage.d.ts +0 -0
  109. package/{components → dist/components}/pages/ErrorPage/ErrorPage.js +0 -0
  110. package/{components → dist/components}/pages/ErrorPage/ErrorPageStyles.d.ts +0 -0
  111. package/{components → dist/components}/pages/ErrorPage/ErrorPageStyles.js +0 -0
  112. package/{components → dist/components}/pages/SideInSide/SideInSide.d.ts +0 -0
  113. package/{components → dist/components}/pages/SideInSide/SideInSide.js +0 -0
  114. package/{components → dist/components}/pages/SideInSide/SideInSideStyles.d.ts +0 -0
  115. package/{components → dist/components}/pages/SideInSide/SideInSideStyles.js +0 -0
  116. package/{components → dist/components}/stream/AppSwitcher/AppSwitcher.d.ts +1 -9
  117. package/{components → dist/components}/stream/AppSwitcher/AppSwitcher.js +6 -6
  118. package/{components → dist/components}/stream/AppSwitcher/AppSwitcherItem.d.ts +0 -0
  119. package/{components → dist/components}/stream/AppSwitcher/AppSwitcherItem.js +0 -0
  120. package/{components → dist/components}/stream/AppSwitcher/AppSwitcherStyles.d.ts +2 -2
  121. package/{components → dist/components}/stream/AppSwitcher/AppSwitcherStyles.js +16 -16
  122. package/{components → dist/components}/stream/AppSwitcher/constants.d.ts +0 -0
  123. package/{components → dist/components}/stream/AppSwitcher/constants.js +2 -2
  124. package/{index.d.ts → dist/index.d.ts} +1 -0
  125. package/{index.js → dist/index.js} +1 -0
  126. package/{lang → dist/lang}/en-us.d.ts +0 -0
  127. package/{lang → dist/lang}/en-us.js +0 -0
  128. package/dist/package.json +41 -0
  129. package/dist/types/components/navigation/VerticalNavigation.d.ts +49 -0
  130. package/dist/types/components/navigation/VerticalNavigation.js +1 -0
  131. package/{components/navigation/VerticalNavigation → dist/types/components/navigation}/VerticalNavigationAvatar.d.ts +3 -4
  132. package/dist/types/components/navigation/VerticalNavigationAvatar.js +1 -0
  133. package/dist/types/components/stream/AppSwitcher.d.ts +9 -0
  134. package/dist/types/components/stream/AppSwitcher.js +1 -0
  135. package/dist/types/index.d.ts +3 -0
  136. package/dist/types/index.js +3 -0
  137. package/{utils → dist/utils}/constants.d.ts +1 -0
  138. package/dist/utils/constants.js +9 -0
  139. package/dist/utils/helpers.d.ts +21 -0
  140. package/dist/utils/helpers.js +64 -0
  141. package/{utils → dist/utils}/hooks.d.ts +0 -0
  142. package/{utils → dist/utils}/hooks.js +0 -0
  143. package/{utils → dist/utils}/index.d.ts +0 -0
  144. package/{utils → dist/utils}/index.js +0 -0
  145. package/{utils → dist/utils}/theme.d.ts +2 -2
  146. package/{utils → dist/utils}/theme.js +3 -3
  147. package/jest.config.ts +11 -0
  148. package/jest.setup.ts +5 -0
  149. package/{LICENSE → license} +0 -0
  150. package/merge.js +27 -0
  151. package/package.json +72 -5
  152. package/public/android-chrome-192x192.png +0 -0
  153. package/public/android-chrome-512x512.png +0 -0
  154. package/public/apple-touch-icon.png +0 -0
  155. package/public/assets/atoms.svg +5 -0
  156. package/public/assets/automation.svg +1 -0
  157. package/public/assets/avatar-1.jpg +0 -0
  158. package/public/assets/avatar-2.jpg +0 -0
  159. package/public/assets/avatar-3.jpg +0 -0
  160. package/public/assets/flux/icon-dark.svg +6 -0
  161. package/public/assets/flux/icon-light.svg +1 -0
  162. package/public/assets/flux/icon-white.svg +6 -0
  163. package/public/assets/flux/icon.svg +6 -0
  164. package/public/assets/flux/logo-dark.svg +22 -0
  165. package/public/assets/flux/logo-light.svg +1 -0
  166. package/public/assets/flux/logo-white.svg +22 -0
  167. package/public/assets/flux/logo.svg +22 -0
  168. package/public/assets/iPhone6.jpg +0 -0
  169. package/public/assets/iPhone6Plus.jpg +0 -0
  170. package/public/assets/lp-logo.png +0 -0
  171. package/public/assets/lplogo.svg +1 -0
  172. package/public/assets/molecules.svg +8 -0
  173. package/public/assets/organisms.svg +21 -0
  174. package/public/assets/pages.svg +4 -0
  175. package/public/assets/particles.svg +3 -0
  176. package/public/assets/stream-dark.png +0 -0
  177. package/public/assets/stream-suite-logo.svg +38 -0
  178. package/public/assets/stream-white.png +0 -0
  179. package/public/assets/stream.png +0 -0
  180. package/public/assets/templates.svg +3 -0
  181. package/public/favicon-16x16.png +0 -0
  182. package/public/favicon-32x32.png +0 -0
  183. package/public/favicon.ico +0 -0
  184. package/public/index.html +43 -0
  185. package/public/logo192.png +0 -0
  186. package/public/logo512.png +0 -0
  187. package/public/manifest.json +25 -0
  188. package/public/robots.txt +3 -0
  189. package/public/site.webmanifest +1 -0
  190. package/{README.md → readme.md} +0 -0
  191. package/src/docs.tsx +167 -0
  192. package/src/lib/assets/Images.tsx +47 -0
  193. package/src/lib/assets/stream-suite-logo.svg +38 -0
  194. package/src/lib/components/atoms/Autocomplete/Autocomplete.test.tsx +179 -0
  195. package/src/lib/components/atoms/Autocomplete/Autocomplete.tsx +14 -0
  196. package/src/lib/components/atoms/Button/Button.test.tsx +166 -0
  197. package/src/lib/components/atoms/Button/Button.tsx +16 -0
  198. package/src/lib/components/atoms/Checkbox/Checkbox.test.tsx +85 -0
  199. package/src/lib/components/atoms/Checkbox/Checkbox.tsx +10 -0
  200. package/src/lib/components/atoms/IconButton/IconButton.test.tsx +60 -0
  201. package/src/lib/components/atoms/IconButton/IconButton.tsx +9 -0
  202. package/src/lib/components/atoms/Radio/Radio.test.tsx +136 -0
  203. package/src/lib/components/atoms/Radio/Radio.tsx +10 -0
  204. package/src/lib/components/atoms/Select/Select.test.tsx +158 -0
  205. package/src/lib/components/atoms/Select/Select.tsx +12 -0
  206. package/src/lib/components/atoms/Slider/Slider.test.tsx +103 -0
  207. package/src/lib/components/atoms/Slider/Slider.tsx +10 -0
  208. package/src/lib/components/atoms/Switch/Switch.test.tsx +96 -0
  209. package/src/lib/components/atoms/Switch/Switch.tsx +10 -0
  210. package/src/lib/components/atoms/TextField/TextField.test.tsx +131 -0
  211. package/src/lib/components/atoms/TextField/TextField.tsx +31 -0
  212. package/src/lib/components/atoms/ToggleButton/ToggleButton.test.tsx +122 -0
  213. package/src/lib/components/atoms/ToggleButton/ToggleButton.tsx +10 -0
  214. package/src/lib/components/datadisplay/Avatar/Avatar.test.tsx +187 -0
  215. package/src/lib/components/datadisplay/Avatar/Avatar.tsx +35 -0
  216. package/src/lib/components/datadisplay/Avatar/avatar-1.jpg +0 -0
  217. package/src/lib/components/datadisplay/Chip/Chip.test.tsx +82 -0
  218. package/src/lib/components/datadisplay/Chip/Chip.tsx +11 -0
  219. package/src/lib/components/datadisplay/List/List.test.tsx +168 -0
  220. package/src/lib/components/datadisplay/List/List.tsx +8 -0
  221. package/src/lib/components/datadisplay/Tooltip/Tooltip.test.tsx +98 -0
  222. package/src/lib/components/datadisplay/Tooltip/Tooltip.tsx +9 -0
  223. package/src/lib/components/feedback/Alert/Alert.test.tsx +139 -0
  224. package/src/lib/components/feedback/Alert/Alert.tsx +10 -0
  225. package/src/lib/components/landmarks/Header/Header.tsx +140 -0
  226. package/src/lib/components/landmarks/Header/HeaderActionButtons.tsx +117 -0
  227. package/src/lib/components/landmarks/Header/HeaderStyles.tsx +62 -0
  228. package/src/lib/components/navigation/Drawer/Drawer.test.tsx +95 -0
  229. package/src/lib/components/navigation/Drawer/Drawer.tsx +21 -0
  230. package/src/lib/components/navigation/MobileNavigation/MobileNavigation.tsx +276 -0
  231. package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatar.tsx +334 -0
  232. package/src/lib/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.tsx +77 -0
  233. package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawer.tsx +197 -0
  234. package/src/lib/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.tsx +143 -0
  235. package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItem.tsx +192 -0
  236. package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenu.tsx +67 -0
  237. package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemFlyoutMenuStyles.tsx +192 -0
  238. package/src/lib/components/navigation/MobileNavigation/MobileNavigationItem/MobileNavigationItemStyles.tsx +217 -0
  239. package/src/lib/components/navigation/MobileNavigation/MobileNavigationMotion.tsx +119 -0
  240. package/src/lib/components/navigation/MobileNavigation/MobileNavigationNotchIndicator.tsx +35 -0
  241. package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearch.tsx +114 -0
  242. package/src/lib/components/navigation/MobileNavigation/MobileNavigationSearchStyles.tsx +47 -0
  243. package/src/lib/components/navigation/MobileNavigation/MobileNavigationStyles.tsx +320 -0
  244. package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.tsx +59 -0
  245. package/src/lib/components/navigation/MobileNavigation/MobileNavigationToggleX.tsx +51 -0
  246. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigation.tsx +467 -0
  247. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatar.tsx +208 -0
  248. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.tsx +75 -0
  249. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.tsx +196 -0
  250. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenu.tsx +94 -0
  251. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemFlyoutMenuStyles.tsx +212 -0
  252. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItemStyles.tsx +240 -0
  253. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationMotion.tsx +119 -0
  254. package/src/lib/components/navigation/VerticalNavigation/VerticalNavigationStyles.tsx +303 -0
  255. package/src/lib/components/pages/ErrorPage/ErrorPage.test.tsx +78 -0
  256. package/src/lib/components/pages/ErrorPage/ErrorPage.tsx +50 -0
  257. package/src/lib/components/pages/ErrorPage/ErrorPageStyles.tsx +30 -0
  258. package/src/lib/components/pages/SideInSide/SideInSide.tsx +100 -0
  259. package/src/lib/components/pages/SideInSide/SideInSideStyles.tsx +62 -0
  260. package/src/lib/components/stream/AppSwitcher/AppSwitcher.tsx +392 -0
  261. package/src/lib/components/stream/AppSwitcher/AppSwitcherItem.tsx +83 -0
  262. package/src/lib/components/stream/AppSwitcher/AppSwitcherStyles.tsx +325 -0
  263. package/src/lib/components/stream/AppSwitcher/constants.tsx +28 -0
  264. package/src/lib/index.tsx +148 -0
  265. package/src/lib/lang/en-us.js +6 -0
  266. package/src/lib/types/components/navigation/VerticalNavigation.ts +52 -0
  267. package/src/lib/types/components/navigation/VerticalNavigationAvatar.ts +26 -0
  268. package/src/lib/types/components/stream/AppSwitcher.ts +10 -0
  269. package/src/lib/types/index.ts +9 -0
  270. package/src/lib/utils/constants.tsx +11 -0
  271. package/src/lib/utils/helpers.tsx +77 -0
  272. package/src/lib/utils/hooks.tsx +33 -0
  273. package/src/lib/utils/index.tsx +4 -0
  274. package/src/lib/utils/theme.tsx +79 -0
  275. package/src/react-app-env.d.ts +1 -0
  276. package/src/setupTests.ts +5 -0
  277. package/src/stories/Components/DataDisplay/Avatar/Accessibility.stories.mdx +34 -0
  278. package/src/stories/Components/DataDisplay/Avatar/AllCombinations.tsx +56 -0
  279. package/src/stories/Components/DataDisplay/Avatar/Avatar.stories.tsx +19 -0
  280. package/src/stories/Components/DataDisplay/Avatar/Examples.stories.tsx +278 -0
  281. package/src/stories/Components/DataDisplay/Avatar/Overview.stories.mdx +47 -0
  282. package/src/stories/Components/DataDisplay/Chip/Accessibility.stories.mdx +29 -0
  283. package/src/stories/Components/DataDisplay/Chip/AllCombinations.tsx +58 -0
  284. package/src/stories/Components/DataDisplay/Chip/Chip.stories.tsx +21 -0
  285. package/src/stories/Components/DataDisplay/Chip/Examples.stories.tsx +126 -0
  286. package/src/stories/Components/DataDisplay/Chip/Overview.stories.mdx +57 -0
  287. package/src/stories/Components/DataDisplay/List/Accessibility.stories.mdx +54 -0
  288. package/src/stories/Components/DataDisplay/List/AllCombinations.tsx +396 -0
  289. package/src/stories/Components/DataDisplay/List/Examples.stories.tsx +501 -0
  290. package/src/stories/Components/DataDisplay/List/List.stories.tsx +35 -0
  291. package/src/stories/Components/DataDisplay/List/Overview.stories.mdx +69 -0
  292. package/src/stories/Components/DataDisplay/Table/Overview.stories.mdx +70 -0
  293. package/src/stories/Components/DataDisplay/Tooltip/Accessibility.stories.mdx +39 -0
  294. package/src/stories/Components/DataDisplay/Tooltip/AllCombinations.tsx +134 -0
  295. package/src/stories/Components/DataDisplay/Tooltip/Examples.stories.tsx +237 -0
  296. package/src/stories/Components/DataDisplay/Tooltip/Overview.stories.mdx +58 -0
  297. package/src/stories/Components/DataDisplay/Tooltip/Tooltip.stories.tsx +22 -0
  298. package/src/stories/Components/Feedback/Alert/Accessibility.stories.mdx +25 -0
  299. package/src/stories/Components/Feedback/Alert/Alert.stories.tsx +22 -0
  300. package/src/stories/Components/Feedback/Alert/AllCombinations.tsx +37 -0
  301. package/src/stories/Components/Feedback/Alert/Examples.stories.tsx +137 -0
  302. package/src/stories/Components/Feedback/Alert/Overview.stories.mdx +62 -0
  303. package/src/stories/Components/Inputs/Autocomplete/Accessibility.stories.mdx +31 -0
  304. package/src/stories/Components/Inputs/Autocomplete/AllCombinations.tsx +182 -0
  305. package/src/stories/Components/Inputs/Autocomplete/Autocomplete.stories.tsx +31 -0
  306. package/src/stories/Components/Inputs/Autocomplete/Examples.stories.tsx +233 -0
  307. package/src/stories/Components/Inputs/Autocomplete/Overview.stories.mdx +52 -0
  308. package/src/stories/Components/Inputs/Button/Accessibility.stories.mdx +52 -0
  309. package/src/stories/Components/Inputs/Button/AllCombinations.tsx +53 -0
  310. package/src/stories/Components/Inputs/Button/Button.stories.tsx +23 -0
  311. package/src/stories/Components/Inputs/Button/Examples.stories.tsx +190 -0
  312. package/src/stories/Components/Inputs/Button/Overview.stories.mdx +52 -0
  313. package/src/stories/Components/Inputs/Checkbox/Accessibility.stories.mdx +38 -0
  314. package/src/stories/Components/Inputs/Checkbox/AllCombinations.tsx +55 -0
  315. package/src/stories/Components/Inputs/Checkbox/Checkbox.stories.tsx +22 -0
  316. package/src/stories/Components/Inputs/Checkbox/Examples.stories.tsx +363 -0
  317. package/src/stories/Components/Inputs/Checkbox/Overview.stories.mdx +63 -0
  318. package/src/stories/Components/Inputs/IconButton/Examples.stories.tsx +24 -0
  319. package/src/stories/Components/Inputs/IconButton/IconButton.stories.tsx +26 -0
  320. package/src/stories/Components/Inputs/Radio/Accessibility.stories.mdx +61 -0
  321. package/src/stories/Components/Inputs/Radio/AllCombinations.tsx +75 -0
  322. package/src/stories/Components/Inputs/Radio/Examples.stories.tsx +333 -0
  323. package/src/stories/Components/Inputs/Radio/Overview.stories.mdx +74 -0
  324. package/src/stories/Components/Inputs/Radio/Radio.stories.tsx +22 -0
  325. package/src/stories/Components/Inputs/Select/Accessibility.stories.mdx +51 -0
  326. package/src/stories/Components/Inputs/Select/AllCombinations.tsx +63 -0
  327. package/src/stories/Components/Inputs/Select/Examples.stories.tsx +803 -0
  328. package/src/stories/Components/Inputs/Select/Overview.stories.mdx +73 -0
  329. package/src/stories/Components/Inputs/Select/Select.stories.tsx +22 -0
  330. package/src/stories/Components/Inputs/Slider/Accessibility.stories.mdx +43 -0
  331. package/src/stories/Components/Inputs/Slider/AllCombinations.tsx +30 -0
  332. package/src/stories/Components/Inputs/Slider/Examples.stories.tsx +146 -0
  333. package/src/stories/Components/Inputs/Slider/Overview.stories.mdx +59 -0
  334. package/src/stories/Components/Inputs/Slider/Slider.stories.tsx +27 -0
  335. package/src/stories/Components/Inputs/Switch/Accessibility.stories.mdx +34 -0
  336. package/src/stories/Components/Inputs/Switch/AllCombinations.tsx +45 -0
  337. package/src/stories/Components/Inputs/Switch/Examples.stories.tsx +213 -0
  338. package/src/stories/Components/Inputs/Switch/Overview.stories.mdx +62 -0
  339. package/src/stories/Components/Inputs/Switch/Switch.stories.tsx +22 -0
  340. package/src/stories/Components/Inputs/TextField/Accessibility.stories.mdx +29 -0
  341. package/src/stories/Components/Inputs/TextField/AllCombinations.tsx +57 -0
  342. package/src/stories/Components/Inputs/TextField/Examples.stories.tsx +127 -0
  343. package/src/stories/Components/Inputs/TextField/Overview.stories.mdx +60 -0
  344. package/src/stories/Components/Inputs/TextField/TextField.stories.tsx +261 -0
  345. package/src/stories/Components/Inputs/ToggleButton/Accessibility.stories.mdx +32 -0
  346. package/src/stories/Components/Inputs/ToggleButton/AllCombinations.tsx +113 -0
  347. package/src/stories/Components/Inputs/ToggleButton/Examples.stories.tsx +339 -0
  348. package/src/stories/Components/Inputs/ToggleButton/Overview.stories.mdx +55 -0
  349. package/src/stories/Components/Inputs/ToggleButton/ToggleButton.stories.tsx +19 -0
  350. package/src/stories/Components/Landmarks/Header/Examples.stories.tsx +197 -0
  351. package/src/stories/Components/Landmarks/Header/Header.stories.tsx +34 -0
  352. package/src/stories/Components/Landmarks/Header/Overview.stories.mdx +44 -0
  353. package/src/stories/Components/Navigation/Drawer/Accessibility.stories.mdx +13 -0
  354. package/src/stories/Components/Navigation/Drawer/Drawer.stories.tsx +80 -0
  355. package/src/stories/Components/Navigation/Drawer/Examples.stories.tsx +440 -0
  356. package/src/stories/Components/Navigation/Drawer/Overview.stories.mdx +43 -0
  357. package/src/stories/Components/Navigation/MobileNavigation/Accessibility.stories.mdx +14 -0
  358. package/src/stories/Components/Navigation/MobileNavigation/Examples.stories.tsx +384 -0
  359. package/src/stories/Components/Navigation/MobileNavigation/MobileNavigation.stories.tsx +24 -0
  360. package/src/stories/Components/Navigation/MobileNavigation/Overview.stories.mdx +47 -0
  361. package/src/stories/Components/Navigation/VerticalNavigation/Accessibility.stories.mdx +14 -0
  362. package/src/stories/Components/Navigation/VerticalNavigation/Examples.stories.tsx +307 -0
  363. package/src/stories/Components/Navigation/VerticalNavigation/Overview.stories.mdx +47 -0
  364. package/src/stories/Components/Navigation/VerticalNavigation/VerticalNavigation.stories.tsx +24 -0
  365. package/src/stories/ContactUs.stories.mdx +21 -0
  366. package/src/stories/Experimental/Test.stories.mdx +46 -0
  367. package/src/stories/GettingStarted/Designer.stories.mdx +86 -0
  368. package/src/stories/GettingStarted/Developer.stories.mdx +134 -0
  369. package/src/stories/Guidelines/Accessibility/AssistiveTechnology.stories.mdx +70 -0
  370. package/src/stories/Guidelines/Accessibility/ColorAndContrast.stories.mdx +109 -0
  371. package/src/stories/Guidelines/Accessibility/Hierarchy.stories.mdx +119 -0
  372. package/src/stories/Guidelines/Accessibility/Imagery.stories.mdx +136 -0
  373. package/src/stories/Guidelines/Accessibility/Overview.stories.mdx +44 -0
  374. package/src/stories/Guidelines/Accessibility/Principles.stories.mdx +156 -0
  375. package/src/stories/Guidelines/Accessibility/SoundAndMotion.stories.mdx +59 -0
  376. package/src/stories/Guidelines/Accessibility/Typography.stories.mdx +69 -0
  377. package/src/stories/Guidelines/Accessibility/Writing.stories.mdx +188 -0
  378. package/src/stories/Guidelines/Styleguide/ColorSwatch.tsx +53 -0
  379. package/src/stories/Guidelines/Styleguide/Colors.stories.mdx +118 -0
  380. package/src/stories/Guidelines/Styleguide/Typography.stories.mdx +84 -0
  381. package/src/stories/Introduction.stories.mdx +65 -0
  382. package/src/stories/Pages/ErrorPage.stories.tsx +30 -0
  383. package/src/stories/Pages/SideInSide.stories.tsx +195 -0
  384. package/src/stories/Roadmap.stories.mdx +19 -0
  385. package/src/stories/Templates/Login.stories.mdx +46 -0
  386. package/src/stories/assets/Atomic_Design_Icons-Dark.svg +24 -0
  387. package/src/stories/assets/Atomic_Design_Icons-Light.svg +25 -0
  388. package/src/stories/assets/accessibility-1.png +0 -0
  389. package/src/stories/assets/accessibility-2.png +0 -0
  390. package/src/stories/assets/accessibility-3.png +0 -0
  391. package/src/stories/assets/accessibility-banner.png +0 -0
  392. package/src/stories/assets/atoms.svg +6 -0
  393. package/src/stories/assets/design_system_2022-02-11_12.22pm.png +0 -0
  394. package/src/stories/assets/figma-tokens.png +0 -0
  395. package/src/stories/assets/hierarchy-1.jpg +0 -0
  396. package/src/stories/assets/hierarchy-2.jpg +0 -0
  397. package/src/stories/assets/hierarchy-3.jpg +0 -0
  398. package/src/stories/assets/icon-contrast-1.jpg +0 -0
  399. package/src/stories/assets/icon-contrast-2.jpg +0 -0
  400. package/src/stories/assets/imagery-1.png +0 -0
  401. package/src/stories/assets/imagery-2.png +0 -0
  402. package/src/stories/assets/imagery-3.png +0 -0
  403. package/src/stories/assets/imagery-4.jpg +0 -0
  404. package/src/stories/assets/molecules.svg +9 -0
  405. package/src/stories/assets/organisms.svg +22 -0
  406. package/src/stories/assets/pages.svg +5 -0
  407. package/src/stories/assets/particles.svg +4 -0
  408. package/src/stories/assets/templates.svg +4 -0
  409. package/src/stories/assets/testData.tsx +102 -0
  410. package/src/stories/assets/text-contrast-1.jpg +0 -0
  411. package/src/stories/assets/text-contrast-2.jpg +0 -0
  412. package/src/stories/assets/typography-1.png +0 -0
  413. package/src/stories/assets/visual-clues-1.png +0 -0
  414. package/src/stories/assets/visual-clues-2.png +0 -0
  415. package/src/stories/assets/writing-1.jpg +0 -0
  416. package/src/stories/assets/writing-2.png +0 -0
  417. package/src/stories/assets/writing-3.png +0 -0
  418. package/src/stories/assets/writing-4.png +0 -0
  419. package/src/stories/utils/CustomIcons.tsx +44 -0
  420. package/tsconfig.eslint.json +16 -0
  421. package/tsconfig.json +50 -0
  422. package/components/navigation/MobileNavigation/MobileNavigationAvatarStyles.d.ts +0 -827
  423. package/components/navigation/MobileNavigation/MobileNavigationDrawer.js +0 -148
  424. package/components/navigation/MobileNavigation/MobileNavigationDrawerStyles.d.ts +0 -392
  425. package/components/navigation/MobileNavigation/MobileNavigationSearchStyles.d.ts +0 -257
  426. package/components/navigation/MobileNavigation/MobileNavigationStyles.d.ts +0 -405
  427. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.d.ts +0 -2
  428. package/components/navigation/MobileNavigation/MobileNavigationToggleSearchX.js +0 -32
  429. package/components/navigation/MobileNavigation/MobileNavigationToggleX.d.ts +0 -2
  430. package/components/navigation/MobileNavigation/MobileNavigationToggleX.js +0 -26
  431. package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.d.ts +0 -36
  432. package/components/navigation/MobileNavigation/MobileNavigationToggleXStyles.js +0 -10
  433. package/components/navigation/VerticalNavigation/VerticalNavigationAvatar.js +0 -84
  434. package/components/navigation/VerticalNavigation/VerticalNavigationAvatarStyles.d.ts +0 -827
  435. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.d.ts +0 -19
  436. package/components/navigation/VerticalNavigation/VerticalNavigationItem/VerticalNavigationItem.js +0 -91
  437. package/utils/constants.js +0 -6
  438. package/utils/helpers.d.ts +0 -6
  439. package/utils/helpers.js +0 -17
@@ -5,6 +5,7 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
5
5
  import Drawer from '@mui/material/Drawer';
6
6
  import { Box, IconButton } from '../../../index';
7
7
  import { styled } from '@mui/material/styles';
8
+ import { animated } from '@react-spring/web';
8
9
  export var DRAWER_WIDTH = {
9
10
  Collapsed: 60,
10
11
  Expanded: 300
@@ -13,7 +14,7 @@ var ICON = {
13
14
  Height: 40,
14
15
  Width: 57
15
16
  };
16
- export var DrawerHeader = styled('div', {
17
+ export var DrawerHeader = styled(animated.div, {
17
18
  shouldForwardProp: function (prop) { return prop !== 'isDrawerOpen'; }
18
19
  })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n justify-content: flex-start;\n overflow: hidden;\n min-height: 56px !important;\n padding: ", " 10px 0;\n transition: ", "\n 250ms;\n\n /* Testing secondary nav fix ups */\n width: ", ";\n\n @media (min-width: ", ") {\n min-height: 64px !important;\n width: ", ";\n };\n\n .MuiListItemIcon-root {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root {\n align-items: center !important;\n color: ", ";\n display: flex;\n min-height: ", "px;\n max-height: ", ";\n text-decoration: none;\n text-dransform: none;\n transition: max-height\n ", "ms\n ", ";\n padding: 0;\n width: 100%;\n\n [theme.breakpoints.up('sm')] {\n max-height: ", ";\n }\n }\n\n .MuiListItemText-root .MuiTypography-root {\n white-space: normal;\n }\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex: 1 auto;\n justify-content: flex-start;\n overflow: hidden;\n min-height: 56px !important;\n padding: ", " 10px 0;\n transition: ", "\n 250ms;\n\n /* Testing secondary nav fix ups */\n width: ", ";\n\n @media (min-width: ", ") {\n min-height: 64px !important;\n width: ", ";\n };\n\n .MuiListItemIcon-root {\n margin: ", " 0 0;\n }\n\n .MuiListItemText-root {\n align-items: center !important;\n color: ", ";\n display: flex;\n min-height: ", "px;\n max-height: ", ";\n text-decoration: none;\n text-dransform: none;\n transition: max-height\n ", "ms\n ", ";\n padding: 0;\n width: 100%;\n\n [theme.breakpoints.up('sm')] {\n max-height: ", ";\n }\n }\n\n .MuiListItemText-root .MuiTypography-root {\n white-space: normal;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
19
20
  ? props.theme.palette.primary.main
@@ -24,7 +25,7 @@ export var DrawerHeader = styled('div', {
24
25
  ? props.theme.palette.primary.contrastText
25
26
  : props.theme.palette.getContrastText(props.theme.palette.background.paper);
26
27
  }, ICON.Height + 8, function (props) { return props.isDrawerOpen ? '200px' : "".concat(ICON.Height + 8, "px"); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.isDrawerOpen ? '200px' : "".concat(ICON.Height + 8, "px"); });
27
- export var DrawerToggle = styled(IconButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transform: translate(22px, calc(50% - 5.5px));\n transition: all\n ", "ms\n ", ";\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"], ["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transform: translate(22px, calc(50% - 5.5px));\n transition: all\n ", "ms\n ", ";\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"])), function (props) { return props.theme.spacing(2); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.theme.spacing(2.5); });
28
+ export var DrawerToggle = styled(IconButton)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transition: all\n ", "ms\n ", ";\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"], ["\n background: transparent;\n height: 44px;\n padding: 0 ", " !important;\n position: absolute;\n transition: all\n ", "ms\n ", ";\n width: 44px;\n z-index: 10;\n\n @media (min-width: ", ") {\n padding: 0 ", " !important;\n }\n"])), function (props) { return props.theme.spacing(2); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return props.theme.spacing(2.5); });
28
29
  export var DrawerToggleHitboxContent = styled('span')(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 50%;\n box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);\n box-sizing: content-box;\n height: 1.75rem;\n padding: ", ";\n width: 1.75rem;\n"], ["\n background-color: ", ";\n border-radius: 50%;\n box-shadow: 5px 0 15px 0 rgb(0 0 0 / 10%);\n box-sizing: content-box;\n height: 1.75rem;\n padding: ", ";\n width: 1.75rem;\n"])), function (props) { return props.theme.palette.mode === 'dark'
29
30
  ? props.theme.palette.primary.main
30
31
  : props.theme.palette.background.paper; }, function (props) { return props.theme.spacing(0.5); });
@@ -81,9 +82,9 @@ export var NotchSeemMask = styled(Box)(templateObject_12 || (templateObject_12 =
81
82
  : props.theme.palette.background.paper; });
82
83
  export var StyledDrawer = styled(Drawer, {
83
84
  shouldForwardProp: function (prop) { return prop !== 'open'; }
84
- })(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n white-space: nowrap;\n width: ", ";\n transition: width\n ", "ms\n ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width\n ", "ms\n ", ";\n visibility: visible !important;\n width: ", ";\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n white-space: nowrap;\n width: ", ";\n transition: width\n ", "ms\n ", ";\n\n @media (min-width: ", ") {\n width: ", ";\n }\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width\n ", "ms\n ", ";\n visibility: visible !important;\n width: ", ";\n [theme.breakpoints.up('sm')] {\n width: ", ";\n }\n }\n"])), function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return props.theme.breakpoints.values.sm; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) {
85
+ })(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width\n ", "ms\n ", ";\n white-space: nowrap;\n width: ", ";\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width\n ", "ms\n ", ";\n visibility: visible !important;\n width: ", ";\n }\n"], ["\n box-shadow: none;\n box-sizing: border-box;\n flexshrink: 0;\n overflow-x: visible;\n transition: width\n ", "ms\n ", ";\n white-space: nowrap;\n width: ", ";\n\n .MuiDrawer-paper {\n background: transparent none;\n border: 0;\n box-shadow: none;\n color: ", ";\n overflow: visible !important;\n overflow-x: visible;\n transform: translateX(0) !important;\n transition: width\n ", "ms\n ", ";\n visibility: visible !important;\n width: ", ";\n }\n"])), function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) {
85
86
  return props.theme.palette.mode === 'dark'
86
87
  ? props.theme.palette.primary.contrastText
87
88
  : props.theme.palette.getContrastText(props.theme.palette.background.paper);
88
- }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(8), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
89
+ }, function (props) { return props.theme.transitions.duration.enteringScreen; }, function (props) { return props.theme.transitions.easing.easeOut; }, function (props) { return !props.open ? "calc(".concat(props.theme.spacing(7), " + 1px)") : "".concat(DRAWER_WIDTH.Expanded, "px"); });
89
90
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13;
@@ -1,14 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import PropTypes from 'prop-types';
3
- export interface IApplication {
4
- applicationId: number;
5
- applicationName: string;
6
- shortName: string;
7
- internalName: string;
8
- customName?: string;
9
- url: string;
10
- children?: object[];
11
- }
3
+ import { IApplication } from '../../../types';
12
4
  interface IProps {
13
5
  userId?: string;
14
6
  layout?: string;
@@ -140,7 +140,7 @@ var AppSwitcher = function (props) {
140
140
  return __generator(this, function (_a) {
141
141
  switch (_a.label) {
142
142
  case 0:
143
- if (!(typeof token === 'string' && token !== window.localStorage.getItem(Constants.LocalStorageKey.Token))) return [3 /*break*/, 3];
143
+ if (!(token && typeof token === 'string' && token !== window.localStorage.getItem(Constants.LocalStorageKey.Token))) return [3 /*break*/, 3];
144
144
  if (!userId) {
145
145
  decodedToken = jwtDecode(token);
146
146
  userId = decodedToken[Constants.HomeAttributes.UserId];
@@ -190,11 +190,11 @@ var AppSwitcher = function (props) {
190
190
  userApplications = [];
191
191
  if (!token) {
192
192
  parsedQueryString = queryString.parse(window.location.search);
193
- if (parsedQueryString.accessToken && typeof parsedQueryString.accessToken === 'string') {
194
- token = parsedQueryString.accessToken;
193
+ if (parsedQueryString.token && typeof parsedQueryString.token === 'string') {
194
+ token = parsedQueryString.token;
195
195
  }
196
196
  }
197
- if (!!props.applications) return [3 /*break*/, 2];
197
+ if (!(!props.applications || props.applications.length === 0)) return [3 /*break*/, 2];
198
198
  return [4 /*yield*/, getApplicationsForUser()];
199
199
  case 1:
200
200
  applicationInstances = _a.sent();
@@ -272,7 +272,7 @@ var AppSwitcher = function (props) {
272
272
  return (_jsxs(AppSwitcherPanel, __assign({ id: "app-switcher-menu", style: {
273
273
  display: isAppSwitcherOpen ? 'block' : 'none',
274
274
  left: isDrawerOpen ? DRAWER_WIDTH.Expanded : DRAWER_WIDTH.Collapsed - 3
275
- }, role: 'dialog', onKeyDown: handleKeyDown }, { children: [activeTab === Constants.Tabs.ListApplications
275
+ }, role: 'dialog', "aria-label": "App Switcher", onKeyDown: handleKeyDown }, { children: [activeTab === Constants.Tabs.ListApplications
276
276
  ? (_jsxs("div", { children: [_jsxs(AppListHeader, { children: [_jsx("svg", { children: _jsx("image", { xlinkHref: "".concat(Constants.AssetsUrl, "suite/logo/latest/icon.svg"), width: "24", height: "24" }) }), messages['your-apps']] }), _jsx(MenuContent, __assign({ style: {
277
277
  display: activeTab === 1 ? 'flex' : 'none'
278
278
  } }, { children: applications.map(function (_a) {
@@ -285,7 +285,7 @@ var AppSwitcher = function (props) {
285
285
  } }, { children: [_jsxs(BackButton, __assign({ onClick: function () {
286
286
  setActiveTab(Constants.Tabs.ListApplications);
287
287
  setSearchString('');
288
- } }, { children: [_jsx(StyledSVG, __assign({ className: "MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "ChevronLeftIcon" }, { children: _jsx("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })), messages['back-to']] })), _jsxs(SelectedOrganisation, { children: [renderApplicationLogo(activeApplication === null || activeApplication === void 0 ? void 0 : activeApplication.internalName, LogoVariants.Solid), _jsx("h6", { children: activeApplication ? activeApplication.applicationName : '' })] }), _jsx(SearchBox, { id: "app-switcher-search-org", type: 'text', value: searchString, onChange: handleSearchChange, placeholder: messages.search }), _jsx(OrganisationList, { children: filteredOrgs === null || filteredOrgs === void 0 ? void 0 : filteredOrgs.filter(function (o) { return o.name.toLowerCase().includes(searchString.toLowerCase()); }).map(function (org, i) { return (_jsxs(OrganisationLink, __assign({ href: org.url, target: "_blank" }, { children: [org.name, _jsx(StyledSVG, __assign({ className: "MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "ChevronRightIcon" }, { children: _jsx("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) }))] }), i)); }) })] })))
288
+ } }, { children: [_jsx(StyledSVG, __assign({ className: "MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "ChevronLeftIcon" }, { children: _jsx("path", { d: "M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z" }) })), messages['back-to']] })), _jsxs(SelectedOrganisation, { children: [renderApplicationLogo(activeApplication === null || activeApplication === void 0 ? void 0 : activeApplication.internalName, LogoVariants.Solid), _jsx("span", { children: activeApplication ? activeApplication.applicationName : '' })] }), _jsx(SearchBox, { id: "app-switcher-search-org", type: 'text', value: searchString, onChange: handleSearchChange, placeholder: messages.search }), _jsx(OrganisationList, { children: filteredOrgs === null || filteredOrgs === void 0 ? void 0 : filteredOrgs.filter(function (o) { return o.name.toLowerCase().includes(searchString.toLowerCase()); }).map(function (org, i) { return (_jsxs(OrganisationLink, __assign({ href: org.url, target: "_blank" }, { children: [org.name, _jsx(StyledSVG, __assign({ className: "MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc", focusable: "false", "aria-hidden": "true", viewBox: "0 0 24 24", "data-testid": "ChevronRightIcon" }, { children: _jsx("path", { d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z" }) }))] }), i)); }) })] })))
289
289
  : null] })));
290
290
  };
291
291
  AppSwitcher.propTypes = {
@@ -3,12 +3,12 @@ export declare const AppSwitcherPanel: import("@emotion/styled").StyledComponent
3
3
  export declare const List: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, {}>;
4
4
  export declare const MenuContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
5
5
  export declare const SearchContent: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
- export declare const AppListHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
6
+ export declare const AppListHeader: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
7
7
  export declare const AppListItem: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
8
8
  export declare const AppLink: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, {}>;
9
+ export declare const AppName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
10
  export declare const BackButton: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, {}>;
10
11
  export declare const SearchBox: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
11
- export declare const AppName: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, {}>;
12
12
  export declare const AppOrganisationCount: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
13
13
  export declare const SelectedOrganisation: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
14
14
  export declare const StyledSVG: import("@emotion/styled").StyledComponent<import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, import("react").SVGProps<SVGSVGElement>, {}>;
@@ -3,41 +3,41 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
3
3
  return cooked;
4
4
  };
5
5
  import { styled } from '@mui/material/styles';
6
- export var AppSwitcherPanel = styled('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: 5px 7px 8px -10px rgb(0 0 0 / 20%), 5px 12px 17px -10px rgb(0 0 0 / 14%), 5px 5px 22px -10px rgb(0 0 0 / 12%);\n box-sizing: border-box;\n font-family: 'Roboto';\n height: 450px;\n left: 57px;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n"], ["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: 5px 7px 8px -10px rgb(0 0 0 / 20%), 5px 12px 17px -10px rgb(0 0 0 / 14%), 5px 5px 22px -10px rgb(0 0 0 / 12%);\n box-sizing: border-box;\n font-family: 'Roboto';\n height: 450px;\n left: 57px;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n"])), function (props) { return props.theme.palette.mode === 'dark'
6
+ export var AppSwitcherPanel = styled('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: 5px 7px 8px -10px rgb(0 0 0 / 20%), 5px 12px 17px -10px rgb(0 0 0 / 14%), 5px 5px 22px -10px rgb(0 0 0 / 12%);\n box-sizing: border-box;\n font-family: 'Roboto';\n height: 450px;\n left: 57px;\n overflow: auto;\n overflow-x: hidden;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n\n & > div {\n padding-bottom: 3rem;\n }\n"], ["\n background-color: ", ";\n border-radius: 0 4px 4px 0;\n bottom: 0;\n box-shadow: 5px 7px 8px -10px rgb(0 0 0 / 20%), 5px 12px 17px -10px rgb(0 0 0 / 14%), 5px 5px 22px -10px rgb(0 0 0 / 12%);\n box-sizing: border-box;\n font-family: 'Roboto';\n height: 450px;\n left: 57px;\n overflow: auto;\n overflow-x: hidden;\n padding: 1rem 1.5rem;\n position: fixed;\n width: 360px;\n z-index: 1;\n\n & > div {\n padding-bottom: 3rem;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
7
7
  ? props.theme.palette.primary.dark
8
8
  : '#E6EAF0'; });
9
9
  export var List = styled('ul')(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n"], ["\n"])));
10
10
  export var MenuContent = styled('div')(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 1rem;\n"], ["\n align-items: flex-start;\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-start;\n margin-top: 1rem;\n"])));
11
11
  export var SearchContent = styled('div')(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: flex-start;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: flex-start;\n padding: 1rem 1rem 2rem;\n"], ["\n align-items: flex-start;\n box-sizing: border-box;\n flex-direction: column;\n justify-content: flex-start;\n padding: 1rem 1rem 2rem;\n"])));
12
- export var AppListHeader = styled('p')(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n color: ", ";\n display: flex;\n font-weight: normal;\n justify-content: flex-start;\n padding: 0.5rem 1.25rem 0;\n text-transform: uppercase;\n\n & svg {\n height: 24px;\n margin-right: 0.5rem;\n width: 24px;\n }\n"], ["\n align-items: center;\n color: ", ";\n display: flex;\n font-weight: normal;\n justify-content: flex-start;\n padding: 0.5rem 1.25rem 0;\n text-transform: uppercase;\n\n & svg {\n height: 24px;\n margin-right: 0.5rem;\n width: 24px;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
12
+ export var AppListHeader = styled('div')(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n color: ", ";\n display: flex;\n font-size: 1.2rem;\n font-weight: normal;\n justify-content: flex-start;\n padding: 1rem 1.25rem 0;\n\n & svg {\n height: 24px;\n margin-right: 0.5rem;\n width: 24px;\n }\n"], ["\n align-items: center;\n color: ", ";\n display: flex;\n font-size: 1.2rem;\n font-weight: normal;\n justify-content: flex-start;\n padding: 1rem 1.25rem 0;\n\n & svg {\n height: 24px;\n margin-right: 0.5rem;\n width: 24px;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
13
13
  ? props.theme.palette.primary.contrastText
14
- : '#757575'; });
15
- export var AppListItem = styled('div')(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n align-self: stretch;\n box-sizing: border-box;\n flex-direction: column;\n flex: 0 0 ", "%;\n overflow: visible;\n padding: 0.25rem;\n position: relative;\n\n &:hover {\n background-color: transparent;\n }\n"], ["\n align-items: center;\n align-self: stretch;\n box-sizing: border-box;\n flex-direction: column;\n flex: 0 0 ", "%;\n overflow: visible;\n padding: 0.25rem;\n position: relative;\n\n &:hover {\n background-color: transparent;\n }\n"])), 100 / 3);
16
- export var AppLink = styled('a')(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n font-size: 0.85rem;\n justify-content: center;\n overflow: hidden;\n padding: 1rem 0 0.5rem;\n position: relative;\n text-align: center;\n text-decoration: none;\n transition: all 200ms ease;\n width: 100%;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:hover,\n &:focus {\n background-color: ", ";\n text-decoration: none;\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & svg {\n height: 60px;\n width: 60px;\n }\n\n &:hover + span,\n &:focus + span {\n opacity: 1;\n }\n\n &:hover svg,\n &:focus svg {\n background-color: ", ";\n border-color: ", ";\n }\n"], ["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n font-size: 0.85rem;\n justify-content: center;\n overflow: hidden;\n padding: 1rem 0 0.5rem;\n position: relative;\n text-align: center;\n text-decoration: none;\n transition: all 200ms ease;\n width: 100%;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:hover,\n &:focus {\n background-color: ", ";\n text-decoration: none;\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & svg {\n height: 60px;\n width: 60px;\n }\n\n &:hover + span,\n &:focus + span {\n opacity: 1;\n }\n\n &:hover svg,\n &:focus svg {\n background-color: ", ";\n border-color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
14
+ : '#555'; });
15
+ export var AppListItem = styled('div')(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n align-self: stretch;\n box-sizing: border-box;\n flex-direction: column;\n flex: 0 0 ", "%;\n height: 104px;\n overflow: visible;\n padding: 0.25rem;\n position: relative;\n\n &:hover {\n background-color: transparent;\n }\n"], ["\n align-items: center;\n align-self: stretch;\n box-sizing: border-box;\n flex-direction: column;\n flex: 0 0 ", "%;\n height: 104px;\n overflow: visible;\n padding: 0.25rem;\n position: relative;\n\n &:hover {\n background-color: transparent;\n }\n"])), 100 / 3);
16
+ export var AppLink = styled('a')(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n font-size: 0.85rem;\n justify-content: center;\n overflow: hidden;\n padding: 1rem 0 0.5rem;\n position: absolute;\n text-align: center;\n text-decoration: none;\n width: 100%;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:hover,\n &:focus {\n background-color: ", ";\n text-decoration: none;\n z-index: 2;\n }\n\n &:active {\n background-color: #f1f1f1;\n z-index: 2;\n }\n\n & svg {\n height: 60px;\n width: 60px;\n }\n\n &:hover + span,\n &:focus + span {\n opacity: 1;\n }\n\n &:hover svg,\n &:focus svg {\n background-color: ", ";\n border-color: ", ";\n }\n\n // Show full app name on hover\n &:hover div,\n &:focus div {\n white-space: normal;\n word-wrap: break-word;\n }\n"], ["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n font-size: 0.85rem;\n justify-content: center;\n overflow: hidden;\n padding: 1rem 0 0.5rem;\n position: absolute;\n text-align: center;\n text-decoration: none;\n width: 100%;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:hover,\n &:focus {\n background-color: ", ";\n text-decoration: none;\n z-index: 2;\n }\n\n &:active {\n background-color: #f1f1f1;\n z-index: 2;\n }\n\n & svg {\n height: 60px;\n width: 60px;\n }\n\n &:hover + span,\n &:focus + span {\n opacity: 1;\n }\n\n &:hover svg,\n &:focus svg {\n background-color: ", ";\n border-color: ", ";\n }\n\n // Show full app name on hover\n &:hover div,\n &:focus div {\n white-space: normal;\n word-wrap: break-word;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
17
17
  ? 'rgba(22, 92, 141, 1)'
18
18
  : '#ebf2fc'; }, function (props) { return props.theme.palette.mode === 'dark'
19
19
  ? 'rgba(22, 92, 141, 1)'
20
20
  : '#ebf2fc'; }, function (props) { return props.theme.palette.mode === 'dark'
21
21
  ? 'rgba(22, 92, 141, 1)'
22
22
  : '#ebf2fc'; });
23
- export var BackButton = styled('button')(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n background: transparent;\n border: 0;\n color: ", ";\n cursor: pointer;\n display: flex;\n padding: 0.25rem 0;\n text-align: left;\n width: 100%;\n\n &:focus,\n &:hover {\n background-color: ", ";\n }\n"], ["\n align-items: center;\n background: transparent;\n border: 0;\n color: ", ";\n cursor: pointer;\n display: flex;\n padding: 0.25rem 0;\n text-align: left;\n width: 100%;\n\n &:focus,\n &:hover {\n background-color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
23
+ export var AppName = styled('div')(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n color: ", ";\n font-weight: normal;\n margin: 0.5rem 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 90px;\n"], ["\n color: ", ";\n font-weight: normal;\n margin: 0.5rem 0 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 90px;\n"])), function (props) { return props.theme.palette.mode === 'dark'
24
24
  ? props.theme.palette.primary.contrastText
25
- : '#757575'; }, function (props) { return props.theme.palette.mode === 'dark'
25
+ : '#555'; });
26
+ export var BackButton = styled('button')(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n align-items: center;\n background: transparent;\n border: 0;\n color: ", ";\n cursor: pointer;\n display: flex;\n padding: 0.25rem 0;\n text-align: left;\n width: 100%;\n\n &:focus,\n &:hover {\n background-color: ", ";\n }\n"], ["\n align-items: center;\n background: transparent;\n border: 0;\n color: ", ";\n cursor: pointer;\n display: flex;\n padding: 0.25rem 0;\n text-align: left;\n width: 100%;\n\n &:focus,\n &:hover {\n background-color: ", ";\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
27
+ ? props.theme.palette.primary.contrastText
28
+ : '#555'; }, function (props) { return props.theme.palette.mode === 'dark'
26
29
  ? 'rgba(255, 255, 255, 0.1)'
27
30
  : 'rgba(0, 0, 0, 0.1)'; });
28
- export var SearchBox = styled('input')(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n background: #f4f4f4;\n border: thin solid #888;\n box-sizing: border-box;\n color: #777;\n padding: 0.5rem;\n width: 100%;\n\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #888;\n }\n\n & .MuiOutlinedInput-root {\n border-radius: 0;\n color: #777;\n padding: 0;\n }\n\n & .MuiOutlinedInput-input {\n padding: 0.5rem;\n }\n\n & ::placeholder {\n opacity: 0.75;\n }\n"], ["\n background: #f4f4f4;\n border: thin solid #888;\n box-sizing: border-box;\n color: #777;\n padding: 0.5rem;\n width: 100%;\n\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #888;\n }\n\n & .MuiOutlinedInput-root {\n border-radius: 0;\n color: #777;\n padding: 0;\n }\n\n & .MuiOutlinedInput-input {\n padding: 0.5rem;\n }\n\n & ::placeholder {\n opacity: 0.75;\n }\n"])));
29
- export var AppName = styled('p')(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n color: ", ";\n font-weight: normal;\n margin: 0.5rem 0 0;\n white-space: nowrap;\n"], ["\n color: ", ";\n font-weight: normal;\n margin: 0.5rem 0 0;\n white-space: nowrap;\n"])), function (props) { return props.theme.palette.mode === 'dark'
30
- ? props.theme.palette.primary.contrastText
31
- : '#757575'; });
32
- export var AppOrganisationCount = styled('span')(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: #00497D;\n border-color: #616161;\n border-radius: 4px;\n border: none;\n color: white;\n font-size: 1rem;\n font-weight: bold;\n height: 50px;\n left: 50%;\n line-height: 50px;\n margin-top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n text-align: center;\n top: 43%;\n transform: translate(-50%, -50%);\n width: 50px;\n z-index: 1;\n"], ["\n background: #00497D;\n border-color: #616161;\n border-radius: 4px;\n border: none;\n color: white;\n font-size: 1rem;\n font-weight: bold;\n height: 50px;\n left: 50%;\n line-height: 50px;\n margin-top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n text-align: center;\n top: 43%;\n transform: translate(-50%, -50%);\n width: 50px;\n z-index: 1;\n"])));
33
- export var SelectedOrganisation = styled('div')(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n color: ", ";\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n padding: 1.5rem 0;\n text-transform: uppercase;\n width: 100%;\n\n & svg,\n & svg image {\n height: 24px;\n width: 24px;\n }\n\n & h6 {\n font-size: 1.2rem;\n font-weight: 600;\n margin: 0 0 0 1rem;\n }\n"], ["\n align-items: center;\n color: ", ";\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n padding: 1.5rem 0;\n text-transform: uppercase;\n width: 100%;\n\n & svg,\n & svg image {\n height: 24px;\n width: 24px;\n }\n\n & h6 {\n font-size: 1.2rem;\n font-weight: 600;\n margin: 0 0 0 1rem;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
31
+ export var SearchBox = styled('input')(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n background: #f4f4f4;\n border: thin solid #888;\n box-sizing: border-box;\n color: #777;\n padding: 0.5rem;\n width: 100%;\n\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #888;\n }\n\n & .MuiOutlinedInput-root {\n border-radius: 0;\n color: #777;\n padding: 0;\n }\n\n & .MuiOutlinedInput-input {\n padding: 0.5rem;\n }\n\n & ::placeholder {\n opacity: 0.75;\n }\n"], ["\n background: #f4f4f4;\n border: thin solid #888;\n box-sizing: border-box;\n color: #777;\n padding: 0.5rem;\n width: 100%;\n\n &:hover .MuiOutlinedInput-notchedOutline {\n border-color: #888;\n }\n\n & .MuiOutlinedInput-root {\n border-radius: 0;\n color: #777;\n padding: 0;\n }\n\n & .MuiOutlinedInput-input {\n padding: 0.5rem;\n }\n\n & ::placeholder {\n opacity: 0.75;\n }\n"])));
32
+ export var AppOrganisationCount = styled('span')(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n background: #00497D;\n border-color: #616161;\n border-radius: 4px;\n border: none;\n color: white;\n font-size: 1rem;\n font-weight: bold;\n height: 48%;\n left: 54%;\n line-height: 50px;\n margin-top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n text-align: center;\n top: 49%;\n transform: translate(-50%, -50%);\n width: 50%;\n z-index: 3;\n"], ["\n background: #00497D;\n border-color: #616161;\n border-radius: 4px;\n border: none;\n color: white;\n font-size: 1rem;\n font-weight: bold;\n height: 48%;\n left: 54%;\n line-height: 50px;\n margin-top: 0;\n opacity: 0;\n pointer-events: none;\n position: absolute;\n text-align: center;\n top: 49%;\n transform: translate(-50%, -50%);\n width: 50%;\n z-index: 3;\n"])));
33
+ export var SelectedOrganisation = styled('div')(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n color: ", ";\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n padding: 1.5rem 0;\n width: 100%;\n\n & svg,\n & svg image {\n height: 24px;\n width: 24px;\n }\n\n & span {\n font-size: 1.2rem;\n font-weight: normal;\n margin: 0 0 0 .5rem;\n }\n"], ["\n align-items: center;\n color: ", ";\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n padding: 1.5rem 0;\n width: 100%;\n\n & svg,\n & svg image {\n height: 24px;\n width: 24px;\n }\n\n & span {\n font-size: 1.2rem;\n font-weight: normal;\n margin: 0 0 0 .5rem;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
34
34
  ? props.theme.palette.primary.contrastText
35
- : '#757575'; });
35
+ : '#555'; });
36
36
  export var StyledSVG = styled('svg')(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n box-sizing: content-box;\n display: inline-block;\n fill: currentcolor;\n flex-shrink: 0;\n font-size: 1.5rem;\n height: 1em;\n margin: 4px;\n padding: 0;\n user-select: none;\n width: 1em;\n"], ["\n box-sizing: content-box;\n display: inline-block;\n fill: currentcolor;\n flex-shrink: 0;\n font-size: 1.5rem;\n height: 1em;\n margin: 4px;\n padding: 0;\n user-select: none;\n width: 1em;\n"])));
37
37
  export var OrganisationList = styled('div')(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n height: 300px;\n overflow: auto;\n padding-top: 0.5rem;\n width: 100%;\n"], ["\n height: 300px;\n overflow: auto;\n padding-top: 0.5rem;\n width: 100%;\n"])));
38
- export var OrganisationLink = styled('a')(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n color: ", ";\n display: flex;\n font-size: 1rem;\n justify-content: space-between;\n margin: 0 0.125rem;\n padding: 0.5rem;\n text-decoration: none;\n transition: all 200ms ease;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:focus,\n &:hover {\n background-color: ", ";\n\n & svg {\n visibility: visible;\n }\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & .MuiLink-root {\n align-items: center;\n color: #777;\n display: flex;\n justify-content: space-between;\n text-decoration: none;\n width: 100%;\n }\n\n & svg {\n visibility: hidden;\n }\n"], ["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n color: ", ";\n display: flex;\n font-size: 1rem;\n justify-content: space-between;\n margin: 0 0.125rem;\n padding: 0.5rem;\n text-decoration: none;\n transition: all 200ms ease;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:focus,\n &:hover {\n background-color: ", ";\n\n & svg {\n visibility: visible;\n }\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & .MuiLink-root {\n align-items: center;\n color: #777;\n display: flex;\n justify-content: space-between;\n text-decoration: none;\n width: 100%;\n }\n\n & svg {\n visibility: hidden;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
38
+ export var OrganisationLink = styled('a')(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n color: ", ";\n display: flex;\n font-size: 1rem;\n justify-content: space-between;\n margin: 0 0.125rem;\n padding: 0.5rem;\n text-decoration: none;\n transition: all 200ms ease;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:focus,\n &:hover {\n background-color: ", ";\n\n & svg {\n visibility: visible;\n }\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & .MuiLink-root {\n align-items: center;\n color: #555;\n display: flex;\n justify-content: space-between;\n text-decoration: none;\n width: 100%;\n }\n\n & svg {\n visibility: hidden;\n }\n"], ["\n align-items: center;\n border-radius: 4px;\n box-shadow: none;\n color: ", ";\n display: flex;\n font-size: 1rem;\n justify-content: space-between;\n margin: 0 0.125rem;\n padding: 0.5rem;\n text-decoration: none;\n transition: all 200ms ease;\n\n & .MuiTouchRipple-rippleVisible {\n color: #004071;\n opacity: 0.25;\n }\n\n &:focus,\n &:hover {\n background-color: ", ";\n\n & svg {\n visibility: visible;\n }\n }\n\n &:active {\n background-color: #f1f1f1;\n }\n\n & .MuiLink-root {\n align-items: center;\n color: #555;\n display: flex;\n justify-content: space-between;\n text-decoration: none;\n width: 100%;\n }\n\n & svg {\n visibility: hidden;\n }\n"])), function (props) { return props.theme.palette.mode === 'dark'
39
39
  ? props.theme.palette.primary.contrastText
40
- : '#757575'; }, function (props) { return props.theme.palette.mode === 'dark'
40
+ : '#555'; }, function (props) { return props.theme.palette.mode === 'dark'
41
41
  ? 'rgba(255, 255, 255, 0.1)'
42
42
  : 'rgba(0, 0, 0, 0.1)'; });
43
43
  export var StyledLogoSVG = styled('svg')(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n background-color: ", ";\n border: thin solid ", ";\n position: relative;\n z-index: 1;\n"], ["\n background-color: ", ";\n border: thin solid ", ";\n position: relative;\n z-index: 1;\n"])), function (props) { return props.theme.palette.mode === 'dark'
@@ -19,8 +19,8 @@ export var Constants = Object.freeze({
19
19
  });
20
20
  export var applications = [
21
21
  { applicationId: 1, applicationName: 'Stream LXP', shortName: 'LXP', internalName: 'stream', url: 'https://learningpool.com' },
22
- { applicationId: 2, applicationName: 'Stream Analytics', shortName: 'Analytics', internalName: 'analytics', url: 'https://learningpool.com' },
23
- { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Automation', internalName: 'automation', customName: 'Waves 1', url: 'https://learningpool.com' },
22
+ { applicationId: 2, applicationName: 'Stream Analytics', shortName: 'Long Wrapping Test Stream Analytics', internalName: 'analytics', url: 'https://learningpool.com' },
23
+ { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Event Management', internalName: 'automation', customName: 'Waves 1', url: 'https://learningpool.com' },
24
24
  { applicationId: 3, applicationName: 'Stream Automation', shortName: 'Automation', internalName: 'automation', customName: 'Waves 2', url: 'https://learningpool.com' },
25
25
  { applicationId: 7, applicationName: 'Stream LMS', shortName: 'LMS', internalName: 'lms', customName: '', url: 'https://learningpool.com' },
26
26
  { applicationId: 4, applicationName: 'Stream Authoring', shortName: 'Authoring', internalName: 'authoring', customName: '', url: 'https://learningpool.com' }
@@ -128,5 +128,6 @@ export { default as List } from './components/datadisplay/List/List';
128
128
  export { default as Tooltip } from './components/datadisplay/Tooltip/Tooltip';
129
129
  export { default as SideInSide } from './components/pages/SideInSide/SideInSide';
130
130
  export { default as ErrorPage } from './components/pages/ErrorPage/ErrorPage';
131
+ export { default as Header } from './components/landmarks/Header/Header';
131
132
  export { default as MobileNavigation } from './components/navigation/MobileNavigation/MobileNavigation';
132
133
  export { default as VerticalNavigation } from './components/navigation/VerticalNavigation/VerticalNavigation';
@@ -140,5 +140,6 @@ export { default as Tooltip } from './components/datadisplay/Tooltip/Tooltip';
140
140
  export { default as SideInSide } from './components/pages/SideInSide/SideInSide';
141
141
  export { default as ErrorPage } from './components/pages/ErrorPage/ErrorPage';
142
142
  // Stream Suite components
143
+ export { default as Header } from './components/landmarks/Header/Header';
143
144
  export { default as MobileNavigation } from './components/navigation/MobileNavigation/MobileNavigation';
144
145
  export { default as VerticalNavigation } from './components/navigation/VerticalNavigation/VerticalNavigation';
File without changes
File without changes
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@learningpool/ui",
3
+ "author": "Learning Pool",
4
+ "description": "UI library for use on modern Learning Pool projects, built on top of MUI.",
5
+ "license": "MIT",
6
+ "keywords": [
7
+ "learning-pool",
8
+ "react",
9
+ "components",
10
+ "ui"
11
+ ],
12
+ "version": "1.0.0",
13
+ "private": false,
14
+ "main": "index.js",
15
+ "module": "index.js",
16
+ "dependencies": {
17
+ "@emotion/react": "^11.7.1",
18
+ "@emotion/styled": "^11.6.0",
19
+ "@learningpool/design-tokens": "^1.1.0-beta.7",
20
+ "@mui/icons-material": "^5.8.4",
21
+ "@mui/material": "^5.8.5",
22
+ "@mui/x-data-grid": "^5.12.3",
23
+ "@react-spring/web": "^9.6.1",
24
+ "@types/jest": "^27.4.0",
25
+ "@types/node": "^16.11.45",
26
+ "@types/react": "^17.0.48",
27
+ "@types/react-dom": "^17.0.18",
28
+ "@typescript-eslint/parser": "^5.31.0",
29
+ "anysort": "^2.0.0",
30
+ "eslint-plugin-n": "^15.2.4",
31
+ "focus-trap-react": "^8.11.0",
32
+ "jwt-decode": "^3.1.2",
33
+ "query-string": "^7.1.1",
34
+ "tss-react": "^3.3.6",
35
+ "typescript": "^4.6.2",
36
+ "web-vitals": "^2.1.4"
37
+ },
38
+ "publishConfig": {
39
+ "access": "public"
40
+ }
41
+ }
@@ -0,0 +1,49 @@
1
+ /// <reference types="react" />
2
+ import { IApplication } from '../stream/AppSwitcher';
3
+ import { IAvatarMenuItemProps } from './VerticalNavigationAvatar';
4
+ export interface IVerticalNavigationItemProps {
5
+ label: string;
6
+ icon?: JSX.Element;
7
+ onClick?: any;
8
+ isActive?: boolean;
9
+ children?: IVerticalNavigationItemProps[];
10
+ isDrawerOpen?: boolean;
11
+ index?: number;
12
+ isSecondary?: boolean;
13
+ hasFlyout?: boolean;
14
+ fullHeightFlyout?: boolean;
15
+ content?: JSX.Element;
16
+ style?: any;
17
+ open?: boolean;
18
+ hasCustomContent?: boolean;
19
+ }
20
+ export interface IVerticalNavigationProps {
21
+ logo?: string;
22
+ logoText?: string;
23
+ logoOnClick?: any;
24
+ items?: IVerticalNavigationItemProps[];
25
+ secondaryItems?: IVerticalNavigationItemProps[];
26
+ hasStreamHome?: boolean;
27
+ streamHomeAccessToken?: string;
28
+ streamHomeBaseUrl?: string;
29
+ streamHomeApiKey?: string;
30
+ streamHomeApplications?: IApplication[];
31
+ avatarName?: string;
32
+ isDrawerOpen?: boolean;
33
+ isPersistent?: boolean;
34
+ setIsPersistent?: any;
35
+ appRootID?: string;
36
+ hasAvatar?: boolean;
37
+ avatarPanelLogoutString?: string;
38
+ avatarPanelOnClickSwitchDirection?: any;
39
+ avatarPanelOnClickLogout?: any;
40
+ avatarPanelOnClickViewProfile?: any;
41
+ avatarPanelViewProfileString?: string;
42
+ avatarPanelOnClickEditProfile?: any;
43
+ avatarPanelEditProfileString?: string;
44
+ avatarPanelMenuItems?: Array<IAvatarMenuItemProps>;
45
+ avatarPanelOnClickMainAction?: any;
46
+ avatarPanelMainActionString?: string;
47
+ avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
48
+ avatarPanelFootnote?: any;
49
+ }
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  export interface IAvatarMenuItemProps {
3
2
  label: string;
4
3
  icon: any;
@@ -7,7 +6,8 @@ export interface IAvatarMenuItemProps {
7
6
  export interface IAvatarPanelProps {
8
7
  avatarName: string;
9
8
  editProfileText?: string;
10
- logoutText?: string;
9
+ isAvatarOpen: boolean;
10
+ avatarPanelLogoutString?: string;
11
11
  avatarPanelOnClickSwitchDirection?: any;
12
12
  avatarPanelOnClickLogout?: any;
13
13
  avatarPanelOnClickViewProfile?: any;
@@ -19,6 +19,5 @@ export interface IAvatarPanelProps {
19
19
  avatarPanelMainActionString?: string;
20
20
  avatarPanelSettingItems?: Array<IAvatarMenuItemProps>;
21
21
  avatarPanelInvertNavString?: string;
22
+ avatarPanelFootnote?: any;
22
23
  }
23
- declare const AvatarPanel: (props: IAvatarPanelProps) => React.ReactElement;
24
- export default AvatarPanel;
@@ -0,0 +1,9 @@
1
+ export interface IApplication {
2
+ applicationId: number;
3
+ applicationName: string;
4
+ shortName: string;
5
+ internalName: string;
6
+ customName?: string;
7
+ url: string;
8
+ children?: object[];
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ export type { IVerticalNavigationItemProps, IVerticalNavigationProps } from './components/navigation/VerticalNavigation';
2
+ export type { IAvatarMenuItemProps, IAvatarPanelProps } from './components/navigation/VerticalNavigationAvatar';
3
+ export type { IApplication } from './components/stream/AppSwitcher';
@@ -0,0 +1,3 @@
1
+ // https://www.typescriptlang.org/play#example/types-vs-interfaces
2
+ // https://stackoverflow.com/questions/56018167/typescript-does-not-copy-d-ts-files-to-build
3
+ export {};
@@ -4,3 +4,4 @@ export declare const MOBILE_NAV_PANEL_TYPES: {
4
4
  SEARCH: string;
5
5
  AVATAR: string;
6
6
  };
7
+ export declare const DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
@@ -0,0 +1,9 @@
1
+ export var DEFAULT_REACT_APP_ID = 'root';
2
+ export var MOBILE_NAV_PANEL_TYPES = {
3
+ DRAWER: 'drawer',
4
+ SEARCH: 'search',
5
+ AVATAR: 'avatar'
6
+ };
7
+ // 50 seems a reasonable default limit
8
+ // https://m2.material.io/design/typography/understanding-typography.html#readability
9
+ export var DEFAULT_MAX_CHARACTERS_PER_LINE = 50;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Accepts a string and returns 2 characters (max) as initials e.g. AN from Avatar Name
3
+ * @param avatarName string - Expected full name but accepts any string
4
+ * @returns string
5
+ */
6
+ export declare const handleAvatarInitials: (avatarName: string) => string;
7
+ /**
8
+ * Accepts a number and returns a react-spring style object from useSpring
9
+ * @param trigger boolean - Trigger to reverse the animation from main component
10
+ * @param animationCount number - Count tracking items from main component
11
+ * @param incrementAnimationCount Function - Function to increment animationCount from main component
12
+ * @returns Object
13
+ */
14
+ export declare const useStaggerAnimation: (trigger: boolean, animationCount: number, incrementAnimationCount: Function) => Object;
15
+ /**
16
+ * Accepts a number and returns a react-spring style object from useSpring
17
+ * @param animationCount number - Count tracking items from main component
18
+ * @param incrementAnimationCount Function - Function to increment animationCount from main component
19
+ * @returns Object
20
+ */
21
+ export declare const useFadeIn: (animationCount: number, incrementAnimationCount: Function) => Object;
@@ -0,0 +1,64 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { useSpring, config } from '@react-spring/web';
13
+ /**
14
+ * Accepts a string and returns 2 characters (max) as initials e.g. AN from Avatar Name
15
+ * @param avatarName string - Expected full name but accepts any string
16
+ * @returns string
17
+ */
18
+ export var handleAvatarInitials = function (avatarName) {
19
+ var _a, _b;
20
+ var firstInitial = avatarName.split('')[0] || '';
21
+ var secondInitial = '';
22
+ if (((_a = avatarName.split(' ')) === null || _a === void 0 ? void 0 : _a.length) > 1) {
23
+ firstInitial = avatarName.split(' ')[0][0];
24
+ if (((_b = avatarName.split(' ')[1]) === null || _b === void 0 ? void 0 : _b.length) > 0) {
25
+ secondInitial = avatarName === null || avatarName === void 0 ? void 0 : avatarName.split(' ')[1][0];
26
+ }
27
+ }
28
+ return "".concat(firstInitial).concat(secondInitial);
29
+ };
30
+ var STAGGER_ITEMS_DELAY = 70;
31
+ /**
32
+ * Accepts a number and returns a react-spring style object from useSpring
33
+ * @param trigger boolean - Trigger to reverse the animation from main component
34
+ * @param animationCount number - Count tracking items from main component
35
+ * @param incrementAnimationCount Function - Function to increment animationCount from main component
36
+ * @returns Object
37
+ */
38
+ export var useStaggerAnimation = function (trigger, animationCount, incrementAnimationCount) {
39
+ var defaultAnimationConfig = {
40
+ from: { opacity: 0, y: 10 },
41
+ to: { opacity: 1, y: 0 },
42
+ reverse: !trigger,
43
+ config: __assign(__assign({}, config.default), { mass: 1 })
44
+ };
45
+ var staggerAnimation = useSpring(__assign(__assign({}, defaultAnimationConfig), { delay: trigger ? STAGGER_ITEMS_DELAY * (animationCount + 1) : 0 }));
46
+ incrementAnimationCount();
47
+ return staggerAnimation;
48
+ };
49
+ /**
50
+ * Accepts a number and returns a react-spring style object from useSpring
51
+ * @param animationCount number - Count tracking items from main component
52
+ * @param incrementAnimationCount Function - Function to increment animationCount from main component
53
+ * @returns Object
54
+ */
55
+ export var useFadeIn = function (animationCount, incrementAnimationCount) {
56
+ var defaultAnimationConfig = {
57
+ from: { opacity: 0 },
58
+ to: { opacity: 1 },
59
+ config: __assign(__assign({}, config.default), { mass: 1 })
60
+ };
61
+ var staggerFadeInUpAnimation = useSpring(__assign(__assign({}, defaultAnimationConfig), { delay: STAGGER_ITEMS_DELAY * (animationCount + 1) }));
62
+ incrementAnimationCount();
63
+ return staggerFadeInUpAnimation;
64
+ };
File without changes
File without changes
File without changes
File without changes
@@ -53,7 +53,7 @@ export declare const lightTheme: {
53
53
  };
54
54
  divider: string;
55
55
  text: {
56
- primary: "#000";
56
+ primary: string;
57
57
  };
58
58
  };
59
59
  };
@@ -77,7 +77,7 @@ export declare const darkTheme: {
77
77
  };
78
78
  divider: string;
79
79
  text: {
80
- primary: "#fff";
80
+ primary: string;
81
81
  };
82
82
  };
83
83
  };