@ably/ui 13.3.0 → 14.0.0-dev.1939f45

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 (501) hide show
  1. package/README.md +26 -155
  2. package/core/.DS_Store +0 -0
  3. package/core/Accordion/.DS_Store +0 -0
  4. package/core/Accordion.js +1 -0
  5. package/core/Code/.DS_Store +0 -0
  6. package/core/Code/component.css +1 -72
  7. package/core/Code/component.js +1 -1
  8. package/core/Code.js +1 -0
  9. package/core/ConnectStateWrapper.js +1 -0
  10. package/core/ContactFooter/.DS_Store +0 -0
  11. package/core/ContactFooter/component.css +0 -1
  12. package/core/ContactFooter/component.js +1 -1
  13. package/core/ContactFooter.js +1 -0
  14. package/core/CookieMessage/.DS_Store +0 -0
  15. package/core/CookieMessage/component.css +0 -1
  16. package/core/CookieMessage.js +1 -0
  17. package/core/CustomerLogos/.DS_Store +0 -0
  18. package/core/CustomerLogos.js +1 -0
  19. package/core/DropdownMenu/.DS_Store +0 -0
  20. package/core/DropdownMenu.js +1 -0
  21. package/core/Expander.js +1 -0
  22. package/core/FeaturedLink/.DS_Store +0 -0
  23. package/core/FeaturedLink.js +1 -0
  24. package/core/Flash/.DS_Store +0 -0
  25. package/core/Flash/component.css +0 -1
  26. package/core/Flash.js +1 -0
  27. package/core/Footer/.DS_Store +0 -0
  28. package/core/Footer/component.css +0 -1
  29. package/core/Footer.js +1 -0
  30. package/core/Icon/.DS_Store +0 -0
  31. package/core/Icon.js +1 -0
  32. package/core/Loader/.DS_Store +0 -0
  33. package/core/Loader.js +13 -0
  34. package/core/Logo/.DS_Store +0 -0
  35. package/core/Logo.js +1 -0
  36. package/core/Meganav/.DS_Store +0 -0
  37. package/core/Meganav/component.css +2 -3
  38. package/core/Meganav/component.js +1 -1
  39. package/core/Meganav.js +1 -0
  40. package/core/MeganavBlogPostsList/.DS_Store +0 -0
  41. package/core/MeganavBlogPostsList/component.js +1 -2
  42. package/core/MeganavBlogPostsList.js +1 -0
  43. package/core/MeganavContentCompany.js +1 -0
  44. package/core/MeganavContentDevelopers.js +1 -0
  45. package/core/MeganavContentProducts.js +1 -0
  46. package/core/MeganavContentUseCases.js +1 -0
  47. package/core/MeganavControl/.DS_Store +0 -0
  48. package/core/MeganavControl/component.js +1 -1
  49. package/core/MeganavControl.js +1 -0
  50. package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  51. package/core/MeganavControlMobileDropdown/component.js +1 -1
  52. package/core/MeganavControlMobileDropdown.js +1 -0
  53. package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  54. package/core/MeganavControlMobilePanelClose/component.js +1 -1
  55. package/core/MeganavControlMobilePanelClose.js +1 -0
  56. package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  57. package/core/MeganavControlMobilePanelOpen/component.js +1 -1
  58. package/core/MeganavControlMobilePanelOpen.js +1 -0
  59. package/core/MeganavItemsDesktop.js +1 -0
  60. package/core/MeganavItemsMobile.js +1 -0
  61. package/core/MeganavItemsSignedIn.js +1 -0
  62. package/core/MeganavSearch.js +1 -0
  63. package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  64. package/core/MeganavSearchAutocomplete/component.js +1 -1
  65. package/core/MeganavSearchAutocomplete.js +1 -0
  66. package/core/MeganavSearchPanel.js +1 -0
  67. package/core/MeganavSearchSuggestions/.DS_Store +0 -0
  68. package/core/MeganavSearchSuggestions/component.js +1 -1
  69. package/core/MeganavSearchSuggestions.js +1 -0
  70. package/core/Notice/.DS_Store +0 -0
  71. package/core/Notice/component.css +0 -1
  72. package/core/Notice/component.js +1 -1
  73. package/core/Notice.js +1 -0
  74. package/core/SignOutLink.js +1 -0
  75. package/core/Slider/.DS_Store +0 -0
  76. package/core/Slider/component.css +32 -1
  77. package/core/Slider/component.js +1 -1
  78. package/core/Slider.js +1 -0
  79. package/core/Table/.DS_Store +0 -0
  80. package/core/Table/Table.js +1 -0
  81. package/core/Table/TableCell.js +7 -0
  82. package/core/Table/TableRow.js +1 -0
  83. package/core/Table/data.js +1 -0
  84. package/core/Table.js +1 -0
  85. package/core/Tooltip/.DS_Store +0 -0
  86. package/core/Tooltip.js +1 -0
  87. package/core/css.js +1 -0
  88. package/core/dom-query.js +1 -0
  89. package/core/hubspot-chat-toggle.js +1 -0
  90. package/core/icons/discord.svg +10 -0
  91. package/core/icons/facebook.svg +4 -0
  92. package/core/icons/github.svg +3 -0
  93. package/core/icons/glassdoor.svg +3 -0
  94. package/core/icons/google.svg +3 -0
  95. package/core/icons/icon-display-48hrs.svg +3 -0
  96. package/core/icons/icon-display-about-ably-col.svg +4 -0
  97. package/core/icons/icon-display-api-keys.svg +3 -0
  98. package/core/icons/icon-display-api.svg +3 -0
  99. package/core/icons/icon-display-asset-tracking-col.svg +18 -0
  100. package/core/icons/icon-display-browser.svg +10 -0
  101. package/core/icons/icon-display-calendar.svg +3 -0
  102. package/core/icons/icon-display-call-mobile.svg +3 -0
  103. package/core/icons/icon-display-careers-col.svg +9 -0
  104. package/core/icons/icon-display-case-studies-col.svg +5 -0
  105. package/core/icons/icon-display-chat-col.svg +4 -0
  106. package/core/icons/icon-display-chat-stack-col.svg +4 -0
  107. package/core/icons/icon-display-chat-stack.svg +4 -0
  108. package/core/icons/icon-display-cloud-servers.svg +3 -0
  109. package/core/icons/icon-display-compare-tech-col.svg +9 -0
  110. package/core/icons/icon-display-customers-col.svg +15 -0
  111. package/core/icons/icon-display-data-broadcast-col.svg +26 -0
  112. package/core/icons/icon-display-data-synchronization-col.svg +14 -0
  113. package/core/icons/icon-display-docs-col.svg +7 -0
  114. package/core/icons/icon-display-documentation.svg +3 -0
  115. package/core/icons/icon-display-events-col.svg +13 -0
  116. package/core/icons/icon-display-examples-col.svg +11 -0
  117. package/core/icons/icon-display-gdpr.svg +3 -0
  118. package/core/icons/icon-display-general-comms.svg +3 -0
  119. package/core/icons/icon-display-hipaa.svg +10 -0
  120. package/core/icons/icon-display-integrations-col.svg +8 -0
  121. package/core/icons/icon-display-it-support-access.svg +3 -0
  122. package/core/icons/icon-display-it-support-helpdesk.svg +3 -0
  123. package/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
  124. package/core/icons/icon-display-laptop.svg +10 -0
  125. package/core/icons/icon-display-lightbulb-col.svg +10 -0
  126. package/core/icons/icon-display-live-chat.svg +3 -0
  127. package/core/icons/icon-display-map-pin.svg +3 -0
  128. package/core/icons/icon-display-message.svg +3 -0
  129. package/core/icons/icon-display-padlock-closed.svg +3 -0
  130. package/core/icons/icon-display-platform.svg +22 -0
  131. package/core/icons/icon-display-play.svg +3 -0
  132. package/core/icons/icon-display-privacy-shield-framework.svg +7 -0
  133. package/core/icons/icon-display-push-notifications-col.svg +6 -0
  134. package/core/icons/icon-display-quickstart-guides-col.svg +8 -0
  135. package/core/icons/icon-display-resources-col.svg +21 -0
  136. package/core/icons/icon-display-sdks-col.svg +11 -0
  137. package/core/icons/icon-display-servers.svg +3 -0
  138. package/core/icons/icon-display-shopping-cart.svg +10 -0
  139. package/core/icons/icon-display-sla.svg +3 -0
  140. package/core/icons/icon-display-soc2-type2.svg +3 -0
  141. package/core/icons/icon-display-tech-account-comms.svg +3 -0
  142. package/core/icons/icon-display-tutorials-demos-col.svg +25 -0
  143. package/core/icons/icon-display-virtual-events-col.svg +12 -0
  144. package/core/icons/icon-display-virtual-events.svg +12 -0
  145. package/core/icons/icon-gui-ably-badge.svg +3 -0
  146. package/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +3 -0
  147. package/core/icons/icon-gui-arrow-bidirectional-vertical.svg +3 -0
  148. package/core/icons/icon-gui-arrow-down.svg +3 -0
  149. package/core/icons/icon-gui-arrow-left.svg +3 -0
  150. package/core/icons/icon-gui-arrow-right.svg +3 -0
  151. package/core/icons/icon-gui-arrow-up.svg +3 -0
  152. package/core/icons/icon-gui-burger-menu.svg +5 -0
  153. package/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
  154. package/core/icons/icon-gui-check-circled-fill.svg +4 -0
  155. package/core/icons/icon-gui-check-circled.svg +3 -0
  156. package/core/icons/icon-gui-checklist-checked.svg +3 -0
  157. package/core/icons/icon-gui-clock.svg +3 -0
  158. package/core/icons/icon-gui-close.svg +3 -0
  159. package/core/icons/icon-gui-copy.svg +10 -0
  160. package/core/icons/icon-gui-cross-circled-fill.svg +4 -0
  161. package/core/icons/icon-gui-cross-circled.svg +3 -0
  162. package/core/icons/icon-gui-dash-circled.svg +3 -0
  163. package/core/icons/icon-gui-disclosure-arrow.svg +3 -0
  164. package/core/icons/icon-gui-document-generic.svg +3 -0
  165. package/core/icons/icon-gui-enlarge.svg +3 -0
  166. package/core/icons/icon-gui-external-link.svg +3 -0
  167. package/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
  168. package/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
  169. package/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
  170. package/core/icons/icon-gui-history.svg +3 -0
  171. package/core/icons/icon-gui-info.svg +3 -0
  172. package/core/icons/icon-gui-link-arrow.svg +3 -0
  173. package/core/icons/icon-gui-link.svg +4 -0
  174. package/core/icons/icon-gui-live-chat.svg +3 -0
  175. package/core/icons/icon-gui-minus.svg +3 -0
  176. package/core/icons/icon-gui-partial.svg +4 -0
  177. package/core/icons/icon-gui-plus.svg +3 -0
  178. package/core/icons/icon-gui-quote-marks-solid.svg +3 -0
  179. package/core/icons/icon-gui-refresh.svg +10 -0
  180. package/core/icons/icon-gui-resources.svg +3 -0
  181. package/core/icons/icon-gui-search.svg +3 -0
  182. package/core/icons/icon-gui-tick.svg +3 -0
  183. package/core/icons/icon-gui-warning.svg +5 -0
  184. package/core/icons/icon-live-updates-results-metrics-col.svg +26 -0
  185. package/core/icons/icon-multi-user-spaces-col.svg +13 -0
  186. package/core/icons/icon-social-x.svg +3 -0
  187. package/core/icons/icon-tech-apachekafka.svg +3 -0
  188. package/core/icons/linkedin.svg +3 -0
  189. package/core/icons/quote.svg +3 -0
  190. package/core/icons/stackoverflow.svg +3 -0
  191. package/core/icons/twitter.svg +3 -0
  192. package/core/icons/youtube.svg +11 -0
  193. package/core/icons.js +1 -0
  194. package/core/load-sprites.js +1 -0
  195. package/core/react-renderer.js +1 -0
  196. package/core/remote-blogs-posts.js +1 -0
  197. package/core/remote-data-store.js +1 -0
  198. package/core/remote-data-util.js +1 -0
  199. package/core/remote-session-data.js +1 -0
  200. package/core/scripts.js +1 -2
  201. package/core/sprites.svg +1 -525
  202. package/core/styles/buttons.css +124 -0
  203. package/core/styles/forms.css +64 -0
  204. package/core/styles/layout.css +21 -0
  205. package/core/styles/properties.css +278 -0
  206. package/core/styles/text.css +168 -0
  207. package/core/styles.base.css +1 -0
  208. package/core/styles.components.css +35 -0
  209. package/core/styles.css +2 -699
  210. package/core/url-base.js +1 -0
  211. package/core/utils/syntax-highlighter-registry.js +1 -0
  212. package/core/utils/syntax-highlighter.css +74 -0
  213. package/core/utils/syntax-highlighter.js +1 -0
  214. package/package.json +39 -35
  215. package/reset/scripts.js +1 -1
  216. package/reset/styles/normalize.css +353 -0
  217. package/reset/styles/reset.css +129 -0
  218. package/reset/styles.css +2 -477
  219. package/src/.DS_Store +0 -0
  220. package/src/core/.DS_Store +0 -0
  221. package/src/core/Accordion/.DS_Store +0 -0
  222. package/src/core/Accordion/Accordion.stories.tsx +39 -0
  223. package/src/core/Accordion.tsx +147 -0
  224. package/src/core/Code/.DS_Store +0 -0
  225. package/src/core/Code/Code.stories.tsx +71 -0
  226. package/src/core/Code.tsx +45 -0
  227. package/src/core/{ConnectStateWrapper/component.jsx → ConnectStateWrapper.tsx} +8 -4
  228. package/src/core/ContactFooter/.DS_Store +0 -0
  229. package/src/core/ContactFooter/ContactFooter.stories.tsx +11 -0
  230. package/src/core/{ContactFooter/component.jsx → ContactFooter.tsx} +44 -19
  231. package/src/core/CookieMessage/.DS_Store +0 -0
  232. package/src/core/CookieMessage/CookieMessage.stories.tsx +12 -0
  233. package/src/core/{CookieMessage/component.jsx → CookieMessage.tsx} +15 -11
  234. package/src/core/CustomerLogos/.DS_Store +0 -0
  235. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +43 -0
  236. package/src/core/CustomerLogos.tsx +35 -0
  237. package/src/core/DropdownMenu/.DS_Store +0 -0
  238. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +48 -0
  239. package/src/core/{DropdownMenu/component.jsx → DropdownMenu.tsx} +64 -36
  240. package/src/core/Expander/Expander.stories.tsx +132 -0
  241. package/src/core/Expander.tsx +54 -0
  242. package/src/core/FeaturedLink/.DS_Store +0 -0
  243. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +43 -0
  244. package/src/core/{FeaturedLink/component.jsx → FeaturedLink.tsx} +26 -18
  245. package/src/core/Flash/.DS_Store +0 -0
  246. package/src/core/Flash/Flash.stories.tsx +37 -0
  247. package/src/core/{Flash/component.jsx → Flash.tsx} +77 -39
  248. package/src/core/Footer/.DS_Store +0 -0
  249. package/src/core/Footer/Footer.stories.tsx +26 -0
  250. package/src/core/{Footer/component.jsx → Footer.tsx} +236 -70
  251. package/src/core/Icon/.DS_Store +0 -0
  252. package/src/core/Icon/Icon.stories.tsx +151 -0
  253. package/src/core/Icon.tsx +26 -0
  254. package/src/core/Loader/.DS_Store +0 -0
  255. package/src/core/Loader/Loader.stories.tsx +21 -0
  256. package/src/core/{Loader/component.jsx → Loader.tsx} +11 -8
  257. package/src/core/Logo/.DS_Store +0 -0
  258. package/src/core/Logo/Logo.stories.tsx +12 -0
  259. package/src/core/Logo.tsx +29 -0
  260. package/src/core/Meganav/.DS_Store +0 -0
  261. package/src/core/Meganav/Meganav.stories.tsx +86 -0
  262. package/src/core/Meganav/component.css +2 -2
  263. package/src/core/Meganav/component.js +6 -9
  264. package/src/core/Meganav.tsx +225 -0
  265. package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
  266. package/src/core/{MeganavBlogPostsList/component.jsx → MeganavBlogPostsList.tsx} +15 -14
  267. package/src/core/{MeganavContentCompany/component.jsx → MeganavContentCompany.tsx} +82 -33
  268. package/src/core/{MeganavContentDevelopers/component.jsx → MeganavContentDevelopers.tsx} +98 -34
  269. package/src/core/MeganavContentProducts.tsx +165 -0
  270. package/src/core/MeganavContentUseCases.tsx +244 -0
  271. package/src/core/MeganavControl/.DS_Store +0 -0
  272. package/src/core/{MeganavControl/component.jsx → MeganavControl.tsx} +18 -12
  273. package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  274. package/src/core/{MeganavControlMobileDropdown/component.jsx → MeganavControlMobileDropdown.tsx} +3 -7
  275. package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  276. package/src/core/{MeganavControlMobilePanelClose/component.jsx → MeganavControlMobilePanelClose.tsx} +15 -9
  277. package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  278. package/src/core/MeganavControlMobilePanelOpen.tsx +31 -0
  279. package/src/core/MeganavItemsDesktop.tsx +68 -0
  280. package/src/core/MeganavItemsMobile.tsx +197 -0
  281. package/src/core/{MeganavItemsSignedIn/component.jsx → MeganavItemsSignedIn.tsx} +55 -23
  282. package/src/core/MeganavSearch.tsx +36 -0
  283. package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  284. package/src/core/MeganavSearchAutocomplete.tsx +12 -0
  285. package/src/core/MeganavSearchPanel.tsx +52 -0
  286. package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
  287. package/src/core/MeganavSearchSuggestions.tsx +62 -0
  288. package/src/core/Notice/.DS_Store +0 -0
  289. package/src/core/Notice/component.js +1 -2
  290. package/src/core/Notice.tsx +102 -0
  291. package/src/core/SignOutLink.tsx +51 -0
  292. package/src/core/Slider/.DS_Store +0 -0
  293. package/src/core/Slider/Slider.stories.tsx +98 -0
  294. package/src/core/Slider/component.css +32 -0
  295. package/src/core/Slider/component.js +0 -2
  296. package/src/core/Slider.tsx +192 -0
  297. package/src/core/Table/.DS_Store +0 -0
  298. package/src/core/Table/Table.stories.tsx +12 -0
  299. package/src/core/Table/Table.tsx +59 -0
  300. package/src/core/Table/TableCell.tsx +109 -0
  301. package/src/core/Table/TableRow.tsx +25 -0
  302. package/src/core/Table/data.tsx +113 -0
  303. package/src/core/Table.tsx +26 -0
  304. package/src/core/Tooltip/.DS_Store +0 -0
  305. package/src/core/Tooltip/Tooltip.stories.tsx +27 -0
  306. package/src/core/Tooltip.tsx +88 -0
  307. package/src/core/icons/icon-gui-partial.svg +4 -0
  308. package/src/core/icons.js +6 -0
  309. package/src/core/{react-renderer.js → react-renderer.tsx} +9 -7
  310. package/src/core/scripts.js +0 -2
  311. package/src/core/styles/properties.css +0 -7
  312. package/src/core/utils/syntax-highlighter.css +3 -0
  313. package/src/pages/Buttons.mdx +121 -0
  314. package/src/pages/Chips.mdx +136 -0
  315. package/src/pages/Colour.mdx +23 -0
  316. package/src/pages/Forms.mdx +173 -0
  317. package/src/pages/Layout.mdx +58 -0
  318. package/src/pages/Typography.mdx +206 -0
  319. package/src/pages/utils.ts +70 -0
  320. package/tailwind.config.js +1 -7
  321. package/tailwind.extend.js +1 -1
  322. package/core/.gitignore +0 -1
  323. package/core/Code.jsx +0 -684
  324. package/core/CompanyAutocomplete/component.css +0 -46
  325. package/core/CompanyAutocomplete/component.js +0 -2
  326. package/core/CompanyAutocomplete/component.js.LICENSE.txt +0 -1
  327. package/core/ConnectStateWrapper/component.js +0 -1
  328. package/core/ConnectStateWrapper.jsx +0 -222
  329. package/core/ContactFooter.jsx +0 -342
  330. package/core/CookieMessage/component.js +0 -1
  331. package/core/CookieMessage.jsx +0 -204
  332. package/core/CustomerLogos/component.js +0 -1
  333. package/core/CustomerLogos.jsx +0 -144
  334. package/core/DropdownMenu/component.js +0 -1
  335. package/core/DropdownMenu.jsx +0 -313
  336. package/core/FeatureFooter/component.css +0 -13
  337. package/core/FeatureFooter/component.js +0 -1
  338. package/core/FeaturedLink/component.js +0 -1
  339. package/core/FeaturedLink.jsx +0 -241
  340. package/core/Flash/component.js +0 -1
  341. package/core/Flash.jsx +0 -622
  342. package/core/Footer/component.js +0 -1
  343. package/core/Footer.jsx +0 -587
  344. package/core/Icon/component.js +0 -1
  345. package/core/Icon.jsx +0 -152
  346. package/core/Loader/component.js +0 -1
  347. package/core/Loader.jsx +0 -154
  348. package/core/Logo/component.js +0 -1
  349. package/core/Logo.jsx +0 -147
  350. package/core/Meganav.jsx +0 -4151
  351. package/core/MeganavBlogPostsList/component.js.LICENSE.txt +0 -1
  352. package/core/MeganavBlogPostsList.jsx +0 -296
  353. package/core/MeganavContentCompany/component.js +0 -1
  354. package/core/MeganavContentCompany.jsx +0 -1058
  355. package/core/MeganavContentDevelopers/component.js +0 -1
  356. package/core/MeganavContentDevelopers.jsx +0 -334
  357. package/core/MeganavContentProducts/component.js +0 -1
  358. package/core/MeganavContentProducts.jsx +0 -373
  359. package/core/MeganavContentUseCases/component.js +0 -1
  360. package/core/MeganavContentUseCases.jsx +0 -341
  361. package/core/MeganavControl.jsx +0 -199
  362. package/core/MeganavControlMobileDropdown.jsx +0 -197
  363. package/core/MeganavControlMobilePanelClose.jsx +0 -198
  364. package/core/MeganavControlMobilePanelOpen.jsx +0 -193
  365. package/core/MeganavItemsDesktop/component.js +0 -1
  366. package/core/MeganavItemsDesktop.jsx +0 -279
  367. package/core/MeganavItemsMobile/component.js +0 -1
  368. package/core/MeganavItemsMobile.jsx +0 -689
  369. package/core/MeganavItemsSignedIn/component.js +0 -1
  370. package/core/MeganavItemsSignedIn.jsx +0 -643
  371. package/core/MeganavSearch/component.js +0 -1
  372. package/core/MeganavSearch.jsx +0 -434
  373. package/core/MeganavSearchAutocomplete.jsx +0 -117
  374. package/core/MeganavSearchPanel/component.js +0 -1
  375. package/core/MeganavSearchPanel.jsx +0 -386
  376. package/core/MeganavSearchSuggestions.jsx +0 -299
  377. package/core/Notice.jsx +0 -914
  378. package/core/Showcase/component.css +0 -31
  379. package/core/Showcase/component.js +0 -1
  380. package/core/Showcase.jsx +0 -17
  381. package/core/SignOutLink/component.js +0 -1
  382. package/core/SignOutLink.jsx +0 -157
  383. package/core/Slider.jsx +0 -400
  384. package/core/Uptime/component.css +0 -128
  385. package/core/Uptime/component.js +0 -1
  386. package/core/Uptime.jsx +0 -895
  387. package/core/scripts.js.LICENSE.txt +0 -1
  388. package/preview/log/.keep +0 -0
  389. package/preview/tmp/.keep +0 -0
  390. package/preview/tmp/pids/.keep +0 -0
  391. package/reset/.gitignore +0 -1
  392. package/src/core/Code/component.html.erb +0 -3
  393. package/src/core/Code/component.jsx +0 -31
  394. package/src/core/Code/component.rb +0 -12
  395. package/src/core/CompanyAutocomplete/component.css +0 -45
  396. package/src/core/CompanyAutocomplete/component.js +0 -204
  397. package/src/core/ConnectStateWrapper/component.js +0 -0
  398. package/src/core/ContactFooter/component.html.erb +0 -32
  399. package/src/core/ContactFooter/component.rb +0 -13
  400. package/src/core/CookieMessage/component.js +0 -1
  401. package/src/core/CustomerLogos/component.html.erb +0 -9
  402. package/src/core/CustomerLogos/component.js +0 -0
  403. package/src/core/CustomerLogos/component.jsx +0 -28
  404. package/src/core/CustomerLogos/component.rb +0 -14
  405. package/src/core/DropdownMenu/component.js +0 -0
  406. package/src/core/FeatureFooter/component.css +0 -12
  407. package/src/core/FeatureFooter/component.html.erb +0 -54
  408. package/src/core/FeatureFooter/component.js +0 -7
  409. package/src/core/FeatureFooter/component.rb +0 -30
  410. package/src/core/FeaturedLink/component.html.erb +0 -15
  411. package/src/core/FeaturedLink/component.js +0 -0
  412. package/src/core/FeaturedLink/component.rb +0 -21
  413. package/src/core/Flash/component.js +0 -1
  414. package/src/core/Footer/component.html.erb +0 -256
  415. package/src/core/Footer/component.js +0 -1
  416. package/src/core/Footer/component.rb +0 -14
  417. package/src/core/Icon/component.html.erb +0 -3
  418. package/src/core/Icon/component.js +0 -0
  419. package/src/core/Icon/component.jsx +0 -19
  420. package/src/core/Icon/component.rb +0 -25
  421. package/src/core/Loader/component.html.erb +0 -18
  422. package/src/core/Loader/component.js +0 -0
  423. package/src/core/Loader/component.rb +0 -19
  424. package/src/core/Logo/component.html.erb +0 -3
  425. package/src/core/Logo/component.js +0 -0
  426. package/src/core/Logo/component.jsx +0 -20
  427. package/src/core/Logo/component.rb +0 -31
  428. package/src/core/Meganav/component.html.erb +0 -31
  429. package/src/core/Meganav/component.jsx +0 -123
  430. package/src/core/Meganav/component.rb +0 -60
  431. package/src/core/MeganavBlogPostsList/component.html.erb +0 -5
  432. package/src/core/MeganavBlogPostsList/component.rb +0 -13
  433. package/src/core/MeganavContentCompany/component.html.erb +0 -90
  434. package/src/core/MeganavContentCompany/component.js +0 -0
  435. package/src/core/MeganavContentCompany/component.rb +0 -14
  436. package/src/core/MeganavContentDevelopers/component.html.erb +0 -129
  437. package/src/core/MeganavContentDevelopers/component.js +0 -0
  438. package/src/core/MeganavContentDevelopers/component.rb +0 -13
  439. package/src/core/MeganavContentProducts/component.html.erb +0 -83
  440. package/src/core/MeganavContentProducts/component.js +0 -0
  441. package/src/core/MeganavContentProducts/component.jsx +0 -105
  442. package/src/core/MeganavContentProducts/component.rb +0 -14
  443. package/src/core/MeganavContentUseCases/component.html.erb +0 -135
  444. package/src/core/MeganavContentUseCases/component.js +0 -1
  445. package/src/core/MeganavContentUseCases/component.jsx +0 -147
  446. package/src/core/MeganavContentUseCases/component.rb +0 -13
  447. package/src/core/MeganavControl/component.html.erb +0 -6
  448. package/src/core/MeganavControl/component.rb +0 -20
  449. package/src/core/MeganavControlMobileDropdown/component.html.erb +0 -7
  450. package/src/core/MeganavControlMobileDropdown/component.rb +0 -11
  451. package/src/core/MeganavControlMobilePanelClose/component.html.erb +0 -12
  452. package/src/core/MeganavControlMobilePanelClose/component.rb +0 -12
  453. package/src/core/MeganavControlMobilePanelOpen/component.html.erb +0 -7
  454. package/src/core/MeganavControlMobilePanelOpen/component.jsx +0 -25
  455. package/src/core/MeganavControlMobilePanelOpen/component.rb +0 -9
  456. package/src/core/MeganavItemsDesktop/component.html.erb +0 -17
  457. package/src/core/MeganavItemsDesktop/component.js +0 -0
  458. package/src/core/MeganavItemsDesktop/component.jsx +0 -49
  459. package/src/core/MeganavItemsDesktop/component.rb +0 -23
  460. package/src/core/MeganavItemsMobile/component.html.erb +0 -75
  461. package/src/core/MeganavItemsMobile/component.js +0 -0
  462. package/src/core/MeganavItemsMobile/component.jsx +0 -137
  463. package/src/core/MeganavItemsMobile/component.rb +0 -21
  464. package/src/core/MeganavItemsSignedIn/component.html.erb +0 -53
  465. package/src/core/MeganavItemsSignedIn/component.js +0 -0
  466. package/src/core/MeganavItemsSignedIn/component.rb +0 -33
  467. package/src/core/MeganavSearch/component.html.erb +0 -15
  468. package/src/core/MeganavSearch/component.js +0 -0
  469. package/src/core/MeganavSearch/component.jsx +0 -33
  470. package/src/core/MeganavSearch/component.rb +0 -13
  471. package/src/core/MeganavSearchAutocomplete/component.html.erb +0 -6
  472. package/src/core/MeganavSearchAutocomplete/component.jsx +0 -14
  473. package/src/core/MeganavSearchAutocomplete/component.rb +0 -6
  474. package/src/core/MeganavSearchPanel/component.html.erb +0 -22
  475. package/src/core/MeganavSearchPanel/component.js +0 -0
  476. package/src/core/MeganavSearchPanel/component.jsx +0 -39
  477. package/src/core/MeganavSearchPanel/component.rb +0 -13
  478. package/src/core/MeganavSearchSuggestions/component.html.erb +0 -22
  479. package/src/core/MeganavSearchSuggestions/component.jsx +0 -49
  480. package/src/core/MeganavSearchSuggestions/component.rb +0 -18
  481. package/src/core/Notice/component.html.erb +0 -16
  482. package/src/core/Notice/component.jsx +0 -71
  483. package/src/core/Notice/component.rb +0 -29
  484. package/src/core/Showcase/component.css +0 -30
  485. package/src/core/Showcase/component.html.erb +0 -76
  486. package/src/core/Showcase/component.js +0 -180
  487. package/src/core/Showcase/component.jsx +0 -0
  488. package/src/core/Showcase/component.rb +0 -190
  489. package/src/core/SignOutLink/component.html.erb +0 -1
  490. package/src/core/SignOutLink/component.js +0 -0
  491. package/src/core/SignOutLink/component.jsx +0 -32
  492. package/src/core/SignOutLink/component.rb +0 -17
  493. package/src/core/Slider/component.html.erb +0 -28
  494. package/src/core/Slider/component.jsx +0 -86
  495. package/src/core/Slider/component.rb +0 -38
  496. package/src/core/Uptime/component.css +0 -127
  497. package/src/core/Uptime/component.html.erb +0 -0
  498. package/src/core/Uptime/component.js +0 -1
  499. package/src/core/Uptime/component.jsx +0 -183
  500. package/src/core/Uptime/component.rb +0 -7
  501. package/src/core/core.rb +0 -81
@@ -0,0 +1,132 @@
1
+ import React from "react";
2
+ import Expander from "../Expander";
3
+
4
+ export default {
5
+ title: "Components/Expander",
6
+ component: Expander,
7
+ tags: ["autodocs"],
8
+ args: {
9
+ height: 200,
10
+ },
11
+ argTypes: {
12
+ height: {
13
+ control: {
14
+ type: "number",
15
+ },
16
+ },
17
+ },
18
+ };
19
+
20
+ const longContentInner = (
21
+ <div>
22
+ <p>Ipsum</p>
23
+ <ul className="mb-16 list-inside list-disc">
24
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
25
+ <li>Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.</li>
26
+ <li>Mauris molestie felis et scelerisque ullamcorper.</li>
27
+ <li>Maecenas congue ligula ut commodo tristique.</li>
28
+ <li>
29
+ Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
30
+ venenatis.
31
+ </li>
32
+ <li>Donec nec turpis vel urna egestas fringilla.</li>
33
+ </ul>
34
+ <p>Ipsum</p>
35
+ <ul className="mb-16 list-inside list-disc">
36
+ <li>Mauris ut nibh vel metus cursus semper.</li>
37
+ <li>Ut mattis tortor eu urna accumsan gravida.</li>
38
+ <li>Nunc pellentesque neque at elit pretium tempor.</li>
39
+ <li>Curabitur finibus magna vitae nunc varius fermentum.</li>
40
+ </ul>
41
+ <ul className="mb-16 list-inside list-disc">
42
+ <li>Curabitur vehicula mi iaculis, luctus augue eu, venenatis quam.</li>
43
+ <li>Praesent in eros efficitur, consequat ante eu, faucibus arcu.</li>
44
+ <li>Nulla laoreet nibh a odio interdum, non molestie diam auctor.</li>
45
+ </ul>
46
+ <p>Ipsum</p>
47
+ <ul className="mb-16 list-inside list-disc">
48
+ <li>
49
+ Praesent aliquam diam tincidunt, sollicitudin tortor eget, vulputate
50
+ lacus.
51
+ </li>
52
+ <li>Quisque in mi sed ex vulputate varius in a leo.</li>
53
+ <li>Etiam posuere dolor at tortor aliquam imperdiet.</li>
54
+ <li>
55
+ Maecenas quis neque consequat, ultricies est sit amet, congue est.
56
+ </li>
57
+ <li>Aenean a elit sed nibh pretium lacinia sed convallis sapien.</li>
58
+ </ul>
59
+ <p>Ipsum</p>
60
+ <ul className="mb-16 list-inside list-disc">
61
+ <li>
62
+ Nulla malesuada libero id dolor aliquam, non sagittis mi scelerisque.
63
+ </li>
64
+ <li>
65
+ Etiam tincidunt lacus eu diam laoreet consectetur sit amet non est.
66
+ </li>
67
+ <li>In porta arcu nec purus tincidunt vulputate.</li>
68
+ </ul>
69
+ </div>
70
+ );
71
+
72
+ export const LongContent = {
73
+ render: () => <Expander>{longContentInner}</Expander>,
74
+ parameters: {
75
+ docs: {
76
+ description: {
77
+ story:
78
+ "A larger amount of content that exceeds the height cut-off, controls shown.",
79
+ },
80
+ },
81
+ },
82
+ };
83
+
84
+ export const ShortContent = {
85
+ render: () => (
86
+ <Expander>
87
+ <div>
88
+ <p>Ipsum</p>
89
+ <ul className="mb-16 list-inside list-disc">
90
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
91
+ <li>
92
+ Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.
93
+ </li>
94
+ <li>Mauris molestie felis et scelerisque ullamcorper.</li>
95
+ <li>Maecenas congue ligula ut commodo tristique.</li>
96
+ <li>
97
+ Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
98
+ venenatis.
99
+ </li>
100
+ <li>Donec nec turpis vel urna egestas fringilla.</li>
101
+ </ul>
102
+ </div>
103
+ </Expander>
104
+ ),
105
+ parameters: {
106
+ docs: {
107
+ description: {
108
+ story:
109
+ "A smaller amount of content that doesn't exceed the height cut-off, therefore no controls shown.",
110
+ },
111
+ },
112
+ },
113
+ };
114
+
115
+ export const OverriddenStyles = {
116
+ render: () => (
117
+ <Expander
118
+ className="bg-neutral-400 p-16 rounded-lg"
119
+ fadeClassName="from-neutral-800"
120
+ >
121
+ {longContentInner}
122
+ </Expander>
123
+ ),
124
+ parameters: {
125
+ docs: {
126
+ description: {
127
+ story:
128
+ "A larger amount of content, with overridden styles for the content wrapper and fader.",
129
+ },
130
+ },
131
+ },
132
+ };
@@ -0,0 +1,54 @@
1
+ import React, { PropsWithChildren, useEffect, useRef, useState } from "react";
2
+
3
+ type ExpanderProps = {
4
+ height?: number;
5
+ className?: string;
6
+ fadeClassName?: string;
7
+ };
8
+
9
+ const Expander = ({
10
+ height = 200,
11
+ className,
12
+ fadeClassName,
13
+ children,
14
+ }: PropsWithChildren<ExpanderProps>) => {
15
+ const innerRef = useRef<HTMLDivElement>(null);
16
+ const [contentHeight, setContentHeight] = useState(height);
17
+ const [expanded, setExpanded] = useState(false);
18
+
19
+ useEffect(() => {
20
+ setContentHeight(innerRef.current?.clientHeight ?? height);
21
+ }, [height, expanded]);
22
+
23
+ const showControls = contentHeight > height;
24
+
25
+ return (
26
+ <>
27
+ <div
28
+ style={{ height: expanded ? contentHeight : height }}
29
+ className={`overflow-hidden transition-all relative ${className ?? ""}`}
30
+ >
31
+ {showControls && !expanded && (
32
+ <div
33
+ className={`h-64 w-full bg-gradient-to-t from-white to-transparent absolute bottom-0 left-0 right-0 ${
34
+ fadeClassName ?? ""
35
+ }`}
36
+ ></div>
37
+ )}
38
+ <div ref={innerRef}>{children}</div>
39
+ </div>
40
+ {showControls && (
41
+ <div
42
+ onClick={() => setExpanded(!expanded)}
43
+ onKeyDown={(e) => e.key === "Enter" && setExpanded(!expanded)}
44
+ tabIndex={0}
45
+ className="mt-16 cursor-pointer font-bold text-gui-blue-default-light hover:text-gui-blue-hover-light active:text-gui-blue-active-light focus:text-gui-blue-focus"
46
+ >
47
+ {expanded ? "View less -" : "View all +"}
48
+ </div>
49
+ )}
50
+ </>
51
+ );
52
+ };
53
+
54
+ export default Expander;
Binary file
@@ -0,0 +1,43 @@
1
+ import FeaturedLink from "../FeaturedLink";
2
+
3
+ export default {
4
+ title: "Components/Featured Link",
5
+ component: FeaturedLink,
6
+ parameters: {
7
+ layout: "centered",
8
+ },
9
+ tags: ["autodocs"],
10
+ args: {
11
+ url: "#",
12
+ children: "Featured link",
13
+ },
14
+ };
15
+
16
+ export const Default = {
17
+ args: {},
18
+ };
19
+
20
+ export const Reverse = {
21
+ args: {
22
+ reverse: true,
23
+ },
24
+ };
25
+
26
+ export const Large = {
27
+ args: {
28
+ textSize: "text-p1",
29
+ },
30
+ };
31
+
32
+ export const Small = {
33
+ args: {
34
+ textSize: "text-p3",
35
+ },
36
+ };
37
+
38
+ export const Pink = {
39
+ args: {
40
+ iconColor: "text-pink-500",
41
+ additionalCSS: "text-pink-800",
42
+ },
43
+ };
@@ -1,13 +1,26 @@
1
- import React from "react";
2
- import T from "prop-types";
1
+ import React, { CSSProperties, ReactNode } from "react";
3
2
 
4
- import Icon from "../Icon/component.jsx";
3
+ import Icon from "./Icon";
4
+
5
+ type FeaturedLinkProps = {
6
+ url: string;
7
+ children: ReactNode;
8
+ textSize?: string;
9
+ iconColor?: string;
10
+ flush?: boolean;
11
+ reverse?: boolean;
12
+ additionalCSS?: string;
13
+ newWindow?: boolean;
14
+ onClick?: () => void;
15
+ };
16
+
17
+ type TargetProps = { target?: string; rel?: string };
5
18
 
6
19
  // When generating links with target=_blank, we only add `noreferrer` to
7
20
  // links that don't start with `/`, so we can continue tracking referrers
8
21
  // across our own domains
9
22
  const buildTargetAndRel = (url, newWindow) => {
10
- const props = {};
23
+ const props: TargetProps = {};
11
24
 
12
25
  if (newWindow) {
13
26
  props.target = "_blank";
@@ -32,7 +45,7 @@ const FeaturedLink = ({
32
45
  newWindow = false,
33
46
  onClick = undefined,
34
47
  children,
35
- }) => {
48
+ }: FeaturedLinkProps) => {
36
49
  const targetAndRel = buildTargetAndRel(url, newWindow);
37
50
 
38
51
  return (
@@ -41,7 +54,14 @@ const FeaturedLink = ({
41
54
  className={`font-sans font-bold block text-gui-default hover:text-gui-hover focus:text-gui-focus focus:outline-gui-focus group ui-${textSize} ${
42
55
  flush ? "" : "py-8"
43
56
  } ${additionalCSS}`}
44
- style={{ "--featured-link-icon-size": `var(${textSize.replace("text", "--fs")})` }}
57
+ style={
58
+ {
59
+ "--featured-link-icon-size": `var(${textSize.replace(
60
+ "text",
61
+ "--fs"
62
+ )})`,
63
+ } as CSSProperties
64
+ }
45
65
  {...targetAndRel}
46
66
  onClick={onClick}
47
67
  >
@@ -70,16 +90,4 @@ const FeaturedLink = ({
70
90
  );
71
91
  };
72
92
 
73
- FeaturedLink.propTypes = {
74
- url: T.string,
75
- children: T.node,
76
- textSize: T.string,
77
- iconColor: T.string,
78
- flush: T.bool,
79
- reverse: T.bool,
80
- additionalCSS: T.string,
81
- newWindow: T.bool,
82
- onClick: T.func,
83
- };
84
-
85
93
  export default FeaturedLink;
Binary file
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ import Flash, { reducerFlashes } from "../Flash";
3
+
4
+ import {
5
+ attachStoreToWindow,
6
+ createRemoteDataStore,
7
+ } from "../remote-data-store.js";
8
+ import { reducerBlogPosts } from "../remote-blogs-posts.js";
9
+ import { reducerSessionData } from "../remote-session-data.js";
10
+
11
+ export default {
12
+ title: "Components/Flash",
13
+ component: Flash,
14
+ args: {
15
+ flashes: [
16
+ ["success", "Congratulations! You've won the Oscar"],
17
+ ["notice", "This is a notice"],
18
+ ["error", "This is an error, very bad"],
19
+ ["alert", "This is an alert"],
20
+ ["info", "Some useful information, you are welcome"],
21
+ ],
22
+ },
23
+ };
24
+
25
+ export const Default = {
26
+ render: (args) => {
27
+ const store = createRemoteDataStore({
28
+ ...reducerBlogPosts,
29
+ ...reducerSessionData,
30
+ ...reducerFlashes,
31
+ });
32
+
33
+ attachStoreToWindow(store);
34
+
35
+ return <Flash {...args} />;
36
+ },
37
+ };
@@ -1,11 +1,26 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
2
2
  import DOMPurify from "dompurify";
3
- import T from "prop-types";
4
3
  import { nanoid } from "nanoid/non-secure";
5
4
 
6
- import { getRemoteDataStore } from "../remote-data-store";
7
- import ConnectStateWrapper from "../ConnectStateWrapper/component.jsx";
8
- import Icon from "../Icon/component.jsx";
5
+ import { getRemoteDataStore } from "./remote-data-store.js";
6
+ import ConnectStateWrapper from "./ConnectStateWrapper";
7
+ import Icon from "./Icon";
8
+
9
+ type FlashProps = {
10
+ id: string;
11
+ removed: boolean;
12
+ type: "error" | "success" | "notice" | "info" | "alert";
13
+ content: string;
14
+ removeFlash: (id: string) => void;
15
+ };
16
+
17
+ type FlashesProps = {
18
+ flashes: { items: FlashProps[] };
19
+ };
20
+
21
+ type BackendFlashesProps = {
22
+ flashes: string[][];
23
+ };
9
24
 
10
25
  const REDUCER_KEY = "flashes";
11
26
  const FLASH_DATA_ID = "ui-flashes";
@@ -16,7 +31,9 @@ const reducerFlashes = {
16
31
  [REDUCER_KEY]: (state = initialState, action) => {
17
32
  switch (action.type) {
18
33
  case "flash/push": {
19
- const flashes = Array.isArray(action.payload) ? action.payload : [action.payload];
34
+ const flashes = Array.isArray(action.payload)
35
+ ? action.payload
36
+ : [action.payload];
20
37
  return { items: [...state.items, ...flashes] };
21
38
  }
22
39
  default:
@@ -27,11 +44,6 @@ const reducerFlashes = {
27
44
 
28
45
  const selectFlashes = (store) => store.getState()[REDUCER_KEY];
29
46
 
30
- const FlashT = {
31
- type: T.oneOf(["error", "success", "notice", "info", "alert"]),
32
- content: T.string,
33
- };
34
-
35
47
  const FLASH_BG_COLOR = {
36
48
  error: "bg-gui-error",
37
49
  success: "bg-zingy-green",
@@ -52,7 +64,7 @@ const AUTO_HIDE = ["success", "info", "notice"];
52
64
  const AUTO_HIDE_TIME = 8000;
53
65
 
54
66
  const useAutoHide = (type, closeFlash) => {
55
- const timeoutId = useRef(null);
67
+ const timeoutId = useRef<ReturnType<typeof setTimeout> | null>(null);
56
68
 
57
69
  useEffect(() => {
58
70
  if (AUTO_HIDE.includes(type)) {
@@ -69,8 +81,8 @@ const useAutoHide = (type, closeFlash) => {
69
81
  }, []);
70
82
  };
71
83
 
72
- const Flash = ({ id, type, content, removeFlash }) => {
73
- const ref = useRef(null);
84
+ const Flash = ({ id, type, content, removeFlash }: FlashProps) => {
85
+ const ref = useRef<HTMLDivElement>(null);
74
86
  const [closed, setClosed] = useState(false);
75
87
  const [flashHeight, setFlashHeight] = useState(0);
76
88
  const [triggerEntryAnimation, setTriggerEntryAnimation] = useState(false);
@@ -83,7 +95,7 @@ const Flash = ({ id, type, content, removeFlash }) => {
83
95
  setClosed(true);
84
96
 
85
97
  setTimeout(() => {
86
- removeFlash(id);
98
+ id && removeFlash(id);
87
99
  }, 100);
88
100
  };
89
101
 
@@ -122,30 +134,62 @@ const Flash = ({ id, type, content, removeFlash }) => {
122
134
  };
123
135
 
124
136
  return (
125
- <div className={`ui-flash-message ui-grid-px ${animateEntry ? "ui-flash-message-enter" : ""}`} style={style} ref={ref} data-id="ui-flash">
126
- <div className={`${FLASH_BG_COLOR[type]} p-32 flex align-center rounded shadow-container-subtle`}>
127
- {withIcons[type] && <Icon name={withIcons[type]} color={iconColor[type]} size="1.5rem" additionalCSS="mr-16 self-baseline" />}
128
- <p className={`ui-text-p1 mr-16 ${FLASH_TEXT_COLOR[type]}`} dangerouslySetInnerHTML={{ __html: safeContent }} />
129
- <button type="button" className="p-0 ml-auto self-start focus:outline-none" onClick={closeFlash}>
130
- <Icon name="icon-gui-close" color={iconColor[type]} size="1.5rem" additionalCSS="transition-colors" />
137
+ <div
138
+ className={`ui-flash-message ui-grid-px ${
139
+ animateEntry ? "ui-flash-message-enter" : ""
140
+ }`}
141
+ style={style}
142
+ ref={ref}
143
+ data-id="ui-flash"
144
+ >
145
+ <div
146
+ className={`${FLASH_BG_COLOR[type]} p-32 flex align-center rounded shadow-container-subtle`}
147
+ >
148
+ {withIcons[type] && (
149
+ <Icon
150
+ name={withIcons[type]}
151
+ color={iconColor[type]}
152
+ size="1.5rem"
153
+ additionalCSS="mr-16 self-baseline"
154
+ />
155
+ )}
156
+ <p
157
+ className={`ui-text-p1 mr-16 ${FLASH_TEXT_COLOR[type]}`}
158
+ dangerouslySetInnerHTML={{ __html: safeContent }}
159
+ />
160
+ <button
161
+ type="button"
162
+ className="p-0 ml-auto self-start focus:outline-none"
163
+ onClick={closeFlash}
164
+ >
165
+ <Icon
166
+ name="icon-gui-close"
167
+ color={iconColor[type]}
168
+ size="1.5rem"
169
+ additionalCSS="transition-colors"
170
+ />
131
171
  </button>
132
172
  </div>
133
173
  </div>
134
174
  );
135
175
  };
136
176
 
137
- Flash.propTypes = {
138
- ...FlashT,
139
- };
140
-
141
- const Flashes = ({ flashes }) => {
142
- const [flashesWithIds, setFlashesWithIds] = useState([]);
177
+ const Flashes = ({ flashes }: FlashesProps) => {
178
+ const [flashesWithIds, setFlashesWithIds] = useState<FlashProps[]>([]);
143
179
 
144
- const removeFlash = (flashId) => setFlashesWithIds((items) => items.filter((item) => item.id !== flashId));
180
+ const removeFlash = (flashId) =>
181
+ setFlashesWithIds((items) => items.filter((item) => item.id !== flashId));
145
182
 
146
183
  useEffect(() => {
147
184
  setFlashesWithIds((state) => {
148
- return [...state, ...(flashes?.items || []).map((flash) => ({ ...flash, id: nanoid(), removed: false }))];
185
+ return [
186
+ ...state,
187
+ ...(flashes?.items).map((flash) => ({
188
+ ...flash,
189
+ id: nanoid(),
190
+ removed: false,
191
+ })),
192
+ ];
149
193
  });
150
194
  }, [flashes]);
151
195
 
@@ -154,17 +198,13 @@ const Flashes = ({ flashes }) => {
154
198
  {flashesWithIds
155
199
  .filter((item) => !item.removed)
156
200
  .map((flash) => (
157
- <Flash removeFlash={removeFlash} key={flash.id} {...flash} />
201
+ <Flash key={flash.id} {...flash} removeFlash={removeFlash} />
158
202
  ))}
159
203
  </div>
160
204
  );
161
205
  };
162
206
 
163
- Flashes.propTypes = {
164
- flashes: T.shape({ items: T.arrayOf(T.shape(FlashT)) }),
165
- };
166
-
167
- const BackendFlashes = ({ flashes }) => {
207
+ const BackendFlashes = ({ flashes }: BackendFlashesProps) => {
168
208
  useEffect(() => {
169
209
  const transformedFlashes =
170
210
  flashes.map((flash) => {
@@ -182,14 +222,12 @@ const BackendFlashes = ({ flashes }) => {
182
222
  }
183
223
  }, []);
184
224
 
185
- const WrappedFlashes = ConnectStateWrapper(Flashes, { flashes: selectFlashes });
225
+ const WrappedFlashes = ConnectStateWrapper(Flashes, {
226
+ flashes: selectFlashes,
227
+ });
186
228
 
187
229
  return <WrappedFlashes />;
188
230
  };
189
231
 
190
- BackendFlashes.propTypes = {
191
- flashes: T.arrayOf(T.arrayOf(T.string)),
192
- };
193
-
194
232
  export { reducerFlashes, FLASH_DATA_ID, Flashes };
195
233
  export default BackendFlashes;
Binary file
@@ -0,0 +1,26 @@
1
+ import Footer from "../Footer";
2
+
3
+ import ablyStack from "../images/ably-stack.svg";
4
+ import highestPerformer from "../images/high-performer-2023.svg";
5
+ import bestSupport from "../images/best-support-2023.svg";
6
+ import fastestImplementation from "../images/fastest-implementation-2023.svg";
7
+ import highestUserAdoption from "../images/highest-user-adoption-2023.svg";
8
+
9
+ export default {
10
+ title: "Components/Footer",
11
+ component: Footer,
12
+ parameters: {
13
+ layout: "fullscreen",
14
+ },
15
+ args: {
16
+ paths: {
17
+ ablyStack,
18
+ highestPerformer,
19
+ bestSupport,
20
+ fastestImplementation,
21
+ highestUserAdoption,
22
+ },
23
+ },
24
+ };
25
+
26
+ export const Default = {};