@ably/ui 13.3.0 → 14.0.0-dev.3f64b93

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 (510) 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 +7 -10
  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 +10 -13
  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 +19 -22
  26. package/core/Flash.js +1 -0
  27. package/core/Footer/.DS_Store +0 -0
  28. package/core/Footer/component.css +22 -25
  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 +103 -106
  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 +4 -7
  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 +34 -5
  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 +122 -0
  203. package/core/styles/forms.css +62 -0
  204. package/core/styles/layout.css +19 -0
  205. package/core/styles/properties.css +276 -0
  206. package/core/styles/text.css +166 -0
  207. package/core/styles.base.css +1 -0
  208. package/core/styles.components.css +33 -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 +67 -0
  213. package/core/utils/syntax-highlighter.js +1 -0
  214. package/package.json +38 -34
  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.css +7 -9
  231. package/src/core/ContactFooter.tsx +92 -0
  232. package/src/core/CookieMessage/.DS_Store +0 -0
  233. package/src/core/CookieMessage/CookieMessage.stories.tsx +12 -0
  234. package/src/core/CookieMessage/component.css +10 -12
  235. package/src/core/{CookieMessage/component.jsx → CookieMessage.tsx} +16 -11
  236. package/src/core/CustomerLogos/.DS_Store +0 -0
  237. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +43 -0
  238. package/src/core/CustomerLogos.tsx +35 -0
  239. package/src/core/DropdownMenu/.DS_Store +0 -0
  240. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +48 -0
  241. package/src/core/{DropdownMenu/component.jsx → DropdownMenu.tsx} +64 -36
  242. package/src/core/Expander/Expander.stories.tsx +132 -0
  243. package/src/core/Expander.tsx +54 -0
  244. package/src/core/FeaturedLink/.DS_Store +0 -0
  245. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +43 -0
  246. package/src/core/{FeaturedLink/component.jsx → FeaturedLink.tsx} +26 -18
  247. package/src/core/Flash/.DS_Store +0 -0
  248. package/src/core/Flash/Flash.stories.tsx +37 -0
  249. package/src/core/Flash/component.css +19 -21
  250. package/src/core/{Flash/component.jsx → Flash.tsx} +78 -39
  251. package/src/core/Footer/.DS_Store +0 -0
  252. package/src/core/Footer/Footer.stories.tsx +26 -0
  253. package/src/core/Footer/component.css +22 -24
  254. package/src/core/{Footer/component.jsx → Footer.tsx} +237 -70
  255. package/src/core/Icon/.DS_Store +0 -0
  256. package/src/core/Icon/Icon.stories.tsx +151 -0
  257. package/src/core/Icon.tsx +26 -0
  258. package/src/core/Loader/.DS_Store +0 -0
  259. package/src/core/Loader/Loader.stories.tsx +21 -0
  260. package/src/core/{Loader/component.jsx → Loader.tsx} +11 -8
  261. package/src/core/Logo/.DS_Store +0 -0
  262. package/src/core/Logo/Logo.stories.tsx +12 -0
  263. package/src/core/Logo.tsx +29 -0
  264. package/src/core/Meganav/.DS_Store +0 -0
  265. package/src/core/Meganav/Meganav.stories.tsx +86 -0
  266. package/src/core/Meganav/component.css +103 -105
  267. package/src/core/Meganav/component.js +6 -7
  268. package/src/core/Meganav.tsx +226 -0
  269. package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
  270. package/src/core/{MeganavBlogPostsList/component.jsx → MeganavBlogPostsList.tsx} +15 -14
  271. package/src/core/{MeganavContentCompany/component.jsx → MeganavContentCompany.tsx} +82 -33
  272. package/src/core/{MeganavContentDevelopers/component.jsx → MeganavContentDevelopers.tsx} +98 -34
  273. package/src/core/MeganavContentProducts.tsx +165 -0
  274. package/src/core/MeganavContentUseCases.tsx +244 -0
  275. package/src/core/MeganavControl/.DS_Store +0 -0
  276. package/src/core/{MeganavControl/component.jsx → MeganavControl.tsx} +18 -12
  277. package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  278. package/src/core/{MeganavControlMobileDropdown/component.jsx → MeganavControlMobileDropdown.tsx} +3 -7
  279. package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  280. package/src/core/{MeganavControlMobilePanelClose/component.jsx → MeganavControlMobilePanelClose.tsx} +15 -9
  281. package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  282. package/src/core/MeganavControlMobilePanelOpen.tsx +31 -0
  283. package/src/core/MeganavItemsDesktop.tsx +68 -0
  284. package/src/core/MeganavItemsMobile.tsx +197 -0
  285. package/src/core/{MeganavItemsSignedIn/component.jsx → MeganavItemsSignedIn.tsx} +55 -23
  286. package/src/core/MeganavSearch.tsx +36 -0
  287. package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  288. package/src/core/MeganavSearchAutocomplete.tsx +12 -0
  289. package/src/core/MeganavSearchPanel.tsx +52 -0
  290. package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
  291. package/src/core/MeganavSearchSuggestions.tsx +62 -0
  292. package/src/core/Notice/.DS_Store +0 -0
  293. package/src/core/Notice/component.css +4 -6
  294. package/src/core/Notice/component.js +1 -1
  295. package/src/core/Notice.tsx +103 -0
  296. package/src/core/SignOutLink.tsx +51 -0
  297. package/src/core/Slider/.DS_Store +0 -0
  298. package/src/core/Slider/Slider.stories.tsx +98 -0
  299. package/src/core/Slider/component.css +35 -5
  300. package/src/core/Slider.tsx +193 -0
  301. package/src/core/Table/.DS_Store +0 -0
  302. package/src/core/Table/Table.stories.tsx +12 -0
  303. package/src/core/Table/Table.tsx +59 -0
  304. package/src/core/Table/TableCell.tsx +109 -0
  305. package/src/core/Table/TableRow.tsx +25 -0
  306. package/src/core/Table/data.tsx +113 -0
  307. package/src/core/Table.tsx +26 -0
  308. package/src/core/Tooltip/.DS_Store +0 -0
  309. package/src/core/Tooltip/Tooltip.stories.tsx +27 -0
  310. package/src/core/Tooltip.tsx +88 -0
  311. package/src/core/icons/icon-gui-partial.svg +4 -0
  312. package/src/core/icons.js +6 -0
  313. package/src/core/{react-renderer.js → react-renderer.tsx} +9 -7
  314. package/src/core/styles/buttons.css +121 -123
  315. package/src/core/styles/forms.css +49 -51
  316. package/src/core/styles/layout.css +14 -16
  317. package/src/core/styles/properties.css +250 -259
  318. package/src/core/styles/text.css +165 -167
  319. package/src/core/styles.components.css +22 -24
  320. package/src/core/utils/syntax-highlighter.css +55 -59
  321. package/src/pages/Buttons.mdx +121 -0
  322. package/src/pages/Chips.mdx +136 -0
  323. package/src/pages/Colour.mdx +23 -0
  324. package/src/pages/Forms.mdx +173 -0
  325. package/src/pages/Layout.mdx +58 -0
  326. package/src/pages/Typography.mdx +206 -0
  327. package/src/pages/utils.ts +70 -0
  328. package/tailwind.config.js +1 -7
  329. package/tailwind.extend.js +1 -1
  330. package/core/.gitignore +0 -1
  331. package/core/Code.jsx +0 -684
  332. package/core/CompanyAutocomplete/component.css +0 -46
  333. package/core/CompanyAutocomplete/component.js +0 -2
  334. package/core/CompanyAutocomplete/component.js.LICENSE.txt +0 -1
  335. package/core/ConnectStateWrapper/component.js +0 -1
  336. package/core/ConnectStateWrapper.jsx +0 -222
  337. package/core/ContactFooter.jsx +0 -342
  338. package/core/CookieMessage/component.js +0 -1
  339. package/core/CookieMessage.jsx +0 -204
  340. package/core/CustomerLogos/component.js +0 -1
  341. package/core/CustomerLogos.jsx +0 -144
  342. package/core/DropdownMenu/component.js +0 -1
  343. package/core/DropdownMenu.jsx +0 -313
  344. package/core/FeatureFooter/component.css +0 -13
  345. package/core/FeatureFooter/component.js +0 -1
  346. package/core/FeaturedLink/component.js +0 -1
  347. package/core/FeaturedLink.jsx +0 -241
  348. package/core/Flash/component.js +0 -1
  349. package/core/Flash.jsx +0 -622
  350. package/core/Footer/component.js +0 -1
  351. package/core/Footer.jsx +0 -587
  352. package/core/Icon/component.js +0 -1
  353. package/core/Icon.jsx +0 -152
  354. package/core/Loader/component.js +0 -1
  355. package/core/Loader.jsx +0 -154
  356. package/core/Logo/component.js +0 -1
  357. package/core/Logo.jsx +0 -147
  358. package/core/Meganav.jsx +0 -4151
  359. package/core/MeganavBlogPostsList/component.js.LICENSE.txt +0 -1
  360. package/core/MeganavBlogPostsList.jsx +0 -296
  361. package/core/MeganavContentCompany/component.js +0 -1
  362. package/core/MeganavContentCompany.jsx +0 -1058
  363. package/core/MeganavContentDevelopers/component.js +0 -1
  364. package/core/MeganavContentDevelopers.jsx +0 -334
  365. package/core/MeganavContentProducts/component.js +0 -1
  366. package/core/MeganavContentProducts.jsx +0 -373
  367. package/core/MeganavContentUseCases/component.js +0 -1
  368. package/core/MeganavContentUseCases.jsx +0 -341
  369. package/core/MeganavControl.jsx +0 -199
  370. package/core/MeganavControlMobileDropdown.jsx +0 -197
  371. package/core/MeganavControlMobilePanelClose.jsx +0 -198
  372. package/core/MeganavControlMobilePanelOpen.jsx +0 -193
  373. package/core/MeganavItemsDesktop/component.js +0 -1
  374. package/core/MeganavItemsDesktop.jsx +0 -279
  375. package/core/MeganavItemsMobile/component.js +0 -1
  376. package/core/MeganavItemsMobile.jsx +0 -689
  377. package/core/MeganavItemsSignedIn/component.js +0 -1
  378. package/core/MeganavItemsSignedIn.jsx +0 -643
  379. package/core/MeganavSearch/component.js +0 -1
  380. package/core/MeganavSearch.jsx +0 -434
  381. package/core/MeganavSearchAutocomplete.jsx +0 -117
  382. package/core/MeganavSearchPanel/component.js +0 -1
  383. package/core/MeganavSearchPanel.jsx +0 -386
  384. package/core/MeganavSearchSuggestions.jsx +0 -299
  385. package/core/Notice.jsx +0 -914
  386. package/core/Showcase/component.css +0 -31
  387. package/core/Showcase/component.js +0 -1
  388. package/core/Showcase.jsx +0 -17
  389. package/core/SignOutLink/component.js +0 -1
  390. package/core/SignOutLink.jsx +0 -157
  391. package/core/Slider.jsx +0 -400
  392. package/core/Uptime/component.css +0 -128
  393. package/core/Uptime/component.js +0 -1
  394. package/core/Uptime.jsx +0 -895
  395. package/core/scripts.js.LICENSE.txt +0 -1
  396. package/preview/log/.keep +0 -0
  397. package/preview/tmp/.keep +0 -0
  398. package/preview/tmp/pids/.keep +0 -0
  399. package/reset/.gitignore +0 -1
  400. package/src/core/Code/component.html.erb +0 -3
  401. package/src/core/Code/component.jsx +0 -31
  402. package/src/core/Code/component.rb +0 -12
  403. package/src/core/CompanyAutocomplete/component.css +0 -45
  404. package/src/core/CompanyAutocomplete/component.js +0 -204
  405. package/src/core/ConnectStateWrapper/component.js +0 -0
  406. package/src/core/ContactFooter/component.html.erb +0 -32
  407. package/src/core/ContactFooter/component.jsx +0 -66
  408. package/src/core/ContactFooter/component.rb +0 -13
  409. package/src/core/CookieMessage/component.js +0 -1
  410. package/src/core/CustomerLogos/component.html.erb +0 -9
  411. package/src/core/CustomerLogos/component.js +0 -0
  412. package/src/core/CustomerLogos/component.jsx +0 -28
  413. package/src/core/CustomerLogos/component.rb +0 -14
  414. package/src/core/DropdownMenu/component.js +0 -0
  415. package/src/core/FeatureFooter/component.css +0 -12
  416. package/src/core/FeatureFooter/component.html.erb +0 -54
  417. package/src/core/FeatureFooter/component.js +0 -7
  418. package/src/core/FeatureFooter/component.rb +0 -30
  419. package/src/core/FeaturedLink/component.html.erb +0 -15
  420. package/src/core/FeaturedLink/component.js +0 -0
  421. package/src/core/FeaturedLink/component.rb +0 -21
  422. package/src/core/Flash/component.js +0 -1
  423. package/src/core/Footer/component.html.erb +0 -256
  424. package/src/core/Footer/component.js +0 -1
  425. package/src/core/Footer/component.rb +0 -14
  426. package/src/core/Icon/component.html.erb +0 -3
  427. package/src/core/Icon/component.js +0 -0
  428. package/src/core/Icon/component.jsx +0 -19
  429. package/src/core/Icon/component.rb +0 -25
  430. package/src/core/Loader/component.html.erb +0 -18
  431. package/src/core/Loader/component.js +0 -0
  432. package/src/core/Loader/component.rb +0 -19
  433. package/src/core/Logo/component.html.erb +0 -3
  434. package/src/core/Logo/component.js +0 -0
  435. package/src/core/Logo/component.jsx +0 -20
  436. package/src/core/Logo/component.rb +0 -31
  437. package/src/core/Meganav/component.html.erb +0 -31
  438. package/src/core/Meganav/component.jsx +0 -123
  439. package/src/core/Meganav/component.rb +0 -60
  440. package/src/core/MeganavBlogPostsList/component.html.erb +0 -5
  441. package/src/core/MeganavBlogPostsList/component.rb +0 -13
  442. package/src/core/MeganavContentCompany/component.html.erb +0 -90
  443. package/src/core/MeganavContentCompany/component.js +0 -0
  444. package/src/core/MeganavContentCompany/component.rb +0 -14
  445. package/src/core/MeganavContentDevelopers/component.html.erb +0 -129
  446. package/src/core/MeganavContentDevelopers/component.js +0 -0
  447. package/src/core/MeganavContentDevelopers/component.rb +0 -13
  448. package/src/core/MeganavContentProducts/component.html.erb +0 -83
  449. package/src/core/MeganavContentProducts/component.js +0 -0
  450. package/src/core/MeganavContentProducts/component.jsx +0 -105
  451. package/src/core/MeganavContentProducts/component.rb +0 -14
  452. package/src/core/MeganavContentUseCases/component.html.erb +0 -135
  453. package/src/core/MeganavContentUseCases/component.js +0 -1
  454. package/src/core/MeganavContentUseCases/component.jsx +0 -147
  455. package/src/core/MeganavContentUseCases/component.rb +0 -13
  456. package/src/core/MeganavControl/component.html.erb +0 -6
  457. package/src/core/MeganavControl/component.rb +0 -20
  458. package/src/core/MeganavControlMobileDropdown/component.html.erb +0 -7
  459. package/src/core/MeganavControlMobileDropdown/component.rb +0 -11
  460. package/src/core/MeganavControlMobilePanelClose/component.html.erb +0 -12
  461. package/src/core/MeganavControlMobilePanelClose/component.rb +0 -12
  462. package/src/core/MeganavControlMobilePanelOpen/component.html.erb +0 -7
  463. package/src/core/MeganavControlMobilePanelOpen/component.jsx +0 -25
  464. package/src/core/MeganavControlMobilePanelOpen/component.rb +0 -9
  465. package/src/core/MeganavItemsDesktop/component.html.erb +0 -17
  466. package/src/core/MeganavItemsDesktop/component.js +0 -0
  467. package/src/core/MeganavItemsDesktop/component.jsx +0 -49
  468. package/src/core/MeganavItemsDesktop/component.rb +0 -23
  469. package/src/core/MeganavItemsMobile/component.html.erb +0 -75
  470. package/src/core/MeganavItemsMobile/component.js +0 -0
  471. package/src/core/MeganavItemsMobile/component.jsx +0 -137
  472. package/src/core/MeganavItemsMobile/component.rb +0 -21
  473. package/src/core/MeganavItemsSignedIn/component.html.erb +0 -53
  474. package/src/core/MeganavItemsSignedIn/component.js +0 -0
  475. package/src/core/MeganavItemsSignedIn/component.rb +0 -33
  476. package/src/core/MeganavSearch/component.html.erb +0 -15
  477. package/src/core/MeganavSearch/component.js +0 -0
  478. package/src/core/MeganavSearch/component.jsx +0 -33
  479. package/src/core/MeganavSearch/component.rb +0 -13
  480. package/src/core/MeganavSearchAutocomplete/component.html.erb +0 -6
  481. package/src/core/MeganavSearchAutocomplete/component.jsx +0 -14
  482. package/src/core/MeganavSearchAutocomplete/component.rb +0 -6
  483. package/src/core/MeganavSearchPanel/component.html.erb +0 -22
  484. package/src/core/MeganavSearchPanel/component.js +0 -0
  485. package/src/core/MeganavSearchPanel/component.jsx +0 -39
  486. package/src/core/MeganavSearchPanel/component.rb +0 -13
  487. package/src/core/MeganavSearchSuggestions/component.html.erb +0 -22
  488. package/src/core/MeganavSearchSuggestions/component.jsx +0 -49
  489. package/src/core/MeganavSearchSuggestions/component.rb +0 -18
  490. package/src/core/Notice/component.html.erb +0 -16
  491. package/src/core/Notice/component.jsx +0 -71
  492. package/src/core/Notice/component.rb +0 -29
  493. package/src/core/Showcase/component.css +0 -30
  494. package/src/core/Showcase/component.html.erb +0 -76
  495. package/src/core/Showcase/component.js +0 -180
  496. package/src/core/Showcase/component.jsx +0 -0
  497. package/src/core/Showcase/component.rb +0 -190
  498. package/src/core/SignOutLink/component.html.erb +0 -1
  499. package/src/core/SignOutLink/component.js +0 -0
  500. package/src/core/SignOutLink/component.jsx +0 -32
  501. package/src/core/SignOutLink/component.rb +0 -17
  502. package/src/core/Slider/component.html.erb +0 -28
  503. package/src/core/Slider/component.jsx +0 -86
  504. package/src/core/Slider/component.rb +0 -38
  505. package/src/core/Uptime/component.css +0 -127
  506. package/src/core/Uptime/component.html.erb +0 -0
  507. package/src/core/Uptime/component.js +0 -1
  508. package/src/core/Uptime/component.jsx +0 -183
  509. package/src/core/Uptime/component.rb +0 -7
  510. package/src/core/core.rb +0 -81
@@ -0,0 +1,193 @@
1
+ import React, { useState, useEffect, useRef, ReactNode } from "react";
2
+ import Icon from "./Icon";
3
+ import "./Slider/component.css";
4
+
5
+ interface SliderProps {
6
+ children: ReactNode[];
7
+ options?: {
8
+ interval?: number;
9
+ controlPosition?: "inline" | "floating";
10
+ intervalIndicator?: boolean;
11
+ };
12
+ }
13
+
14
+ interface SliderIndicatorProps {
15
+ numSlides: number;
16
+ activeIndex: number;
17
+ interval: number;
18
+ intervalIndicator?: boolean;
19
+ isInline?: boolean;
20
+ }
21
+
22
+ const SlideIndicator = ({
23
+ numSlides,
24
+ activeIndex,
25
+ interval,
26
+ intervalIndicator,
27
+ isInline,
28
+ }: SliderIndicatorProps) => {
29
+ return (
30
+ <ul
31
+ className={`flex gap-4 left-1/2 ${
32
+ isInline ? "bottom-0" : "absolute -bottom-40 transform -translate-x-1/2"
33
+ }`}
34
+ >
35
+ {Array.from({ length: numSlides }, (_, i) =>
36
+ intervalIndicator ? (
37
+ <li
38
+ key={i}
39
+ className="relative w-40 h-4 mx-1 rounded-full bg-neutral-500"
40
+ >
41
+ {i === activeIndex && (
42
+ <span
43
+ className="absolute inset-0 rounded-full bg-active-orange"
44
+ style={{
45
+ animation: `fillAnimation ${interval}ms linear`,
46
+ }}
47
+ ></span>
48
+ )}
49
+ </li>
50
+ ) : (
51
+ <li key={i}>
52
+ <span
53
+ className={`ui-slider-marker ${
54
+ i === activeIndex ? "text-active-orange" : "text-cool-black"
55
+ }`}
56
+ data-id="slider-marker"
57
+ >
58
+ &#x2b24;
59
+ </span>
60
+ </li>
61
+ )
62
+ )}
63
+ </ul>
64
+ );
65
+ };
66
+
67
+ const Slider = ({ children, options }: SliderProps) => {
68
+ const [activeIndex, setActiveIndex] = useState(0);
69
+ const [touchStartX, setTouchStartX] = useState(0);
70
+ const [touchEndX, setTouchEndX] = useState(0);
71
+ const timerRef = useRef<NodeJS.Timeout | null>(null);
72
+
73
+ const isInline = options?.controlPosition === "inline";
74
+
75
+ const next = () => {
76
+ setActiveIndex((prevIndex) => (prevIndex + 1) % children.length);
77
+ resetInterval();
78
+ };
79
+
80
+ const prev = () => {
81
+ setActiveIndex((prevIndex) =>
82
+ prevIndex > 0 ? prevIndex - 1 : children.length - 1
83
+ );
84
+ resetInterval();
85
+ };
86
+
87
+ const resetInterval = () => {
88
+ if (timerRef.current) clearInterval(timerRef.current);
89
+ timerRef.current = setInterval(next, options?.interval ?? 10000);
90
+ };
91
+
92
+ const handleTouchStart = (e) => {
93
+ setTouchStartX(e.touches[0].clientX);
94
+ };
95
+
96
+ const handleTouchMove = (e) => {
97
+ setTouchEndX(e.touches[0].clientX);
98
+ };
99
+
100
+ const handleTouchEnd = () => {
101
+ if (touchStartX - touchEndX > 50) {
102
+ next();
103
+ }
104
+ if (touchStartX - touchEndX < -50) {
105
+ prev();
106
+ }
107
+ };
108
+
109
+ useEffect(() => {
110
+ resetInterval();
111
+ return () => {
112
+ if (timerRef.current) clearInterval(timerRef.current);
113
+ };
114
+ }, [children.length, options?.interval]);
115
+
116
+ return (
117
+ <div
118
+ className="relative"
119
+ onTouchStart={handleTouchStart}
120
+ onTouchMove={handleTouchMove}
121
+ onTouchEnd={handleTouchEnd}
122
+ >
123
+ <div className="overflow-hidden w-full py-40">
124
+ <div
125
+ className="flex items-center transition-transform ease-in-out duration-500"
126
+ style={{ transform: `translateX(-${activeIndex * 100}%)` }}
127
+ >
128
+ {children.map((child, index) => (
129
+ <div
130
+ key={index}
131
+ className="w-full flex-shrink-0 flex justify-center sm:px-60 transition-opacity ease-in delay-500 duration-500"
132
+ style={{
133
+ opacity: activeIndex === index ? 1 : 0.1,
134
+ }}
135
+ >
136
+ {child}
137
+ </div>
138
+ ))}
139
+ </div>
140
+ </div>
141
+
142
+ <div
143
+ className={`flex items-center pointer-events-none ${
144
+ isInline
145
+ ? "ui-standard-container justify-center gap-24"
146
+ : "sm:flex sm:absolute inset-0 justify-between"
147
+ }`}
148
+ >
149
+ <button
150
+ className={`${
151
+ isInline ? "w-32 h-32" : "hidden sm:flex w-48 h-48"
152
+ } pointer-events-auto rounded border border-mid-grey hover:border-active-orange flex justify-center items-center ui-icon-cta ui-icon-cta-left`}
153
+ onClick={prev}
154
+ >
155
+ <div className="ui-icon-cta-holder flex gap-4">
156
+ <div className="w-full h-full flex-shrink-0 flex items-center justify-center">
157
+ <Icon name="icon-gui-arrow-left" size="1.5rem" />
158
+ </div>
159
+ <div className="w-full h-full flex-shrink-0 flex items-center justify-center">
160
+ <Icon name="icon-gui-arrow-left" size="1.5rem" />
161
+ </div>
162
+ </div>
163
+ </button>
164
+
165
+ <SlideIndicator
166
+ numSlides={children.length}
167
+ activeIndex={activeIndex}
168
+ interval={options?.interval ?? 10000}
169
+ intervalIndicator={options?.intervalIndicator}
170
+ isInline={isInline}
171
+ />
172
+
173
+ <button
174
+ className={`${
175
+ isInline ? "w-32 h-32" : "hidden sm:flex w-48 h-48"
176
+ } pointer-events-auto rounded border border-mid-grey hover:border-active-orange justify-center items-center ui-icon-cta ui-icon-cta-right`}
177
+ onClick={next}
178
+ >
179
+ <div className="ui-icon-cta-holder flex gap-4">
180
+ <div className="w-full h-full flex-shrink-0 flex items-center justify-center">
181
+ <Icon name="icon-gui-arrow-right" size="1.5rem" />
182
+ </div>
183
+ <div className="w-full h-full flex-shrink-0 flex items-center justify-center">
184
+ <Icon name="icon-gui-arrow-right" size="1.5rem" />
185
+ </div>
186
+ </div>
187
+ </button>
188
+ </div>
189
+ </div>
190
+ );
191
+ };
192
+
193
+ export default Slider;
Binary file
@@ -0,0 +1,12 @@
1
+ import { PricingPageTable } from "./data";
2
+
3
+ export default {
4
+ title: "Components/Table",
5
+ component: PricingPageTable,
6
+ tags: ["autodocs"],
7
+ parameters: {
8
+ layout: "fullscreen",
9
+ },
10
+ };
11
+
12
+ export const PricingPage = {};
@@ -0,0 +1,59 @@
1
+ import React, {
2
+ PropsWithChildren,
3
+ ReactElement,
4
+ TableHTMLAttributes,
5
+ cloneElement,
6
+ } from "react";
7
+
8
+ type TableProps = {
9
+ id?: string;
10
+ };
11
+
12
+ export const Table = ({
13
+ id,
14
+ children,
15
+ ...rest
16
+ }: PropsWithChildren<TableProps & TableHTMLAttributes<HTMLTableElement>>) => (
17
+ <table
18
+ id={id}
19
+ {...rest}
20
+ className={`ui-standard-container mb-4 sm:table-fixed ${
21
+ rest?.className ?? ""
22
+ }`}
23
+ >
24
+ {children}
25
+ </table>
26
+ );
27
+
28
+ export const TableBody = ({
29
+ children,
30
+ ...rest
31
+ }: PropsWithChildren<TableHTMLAttributes<HTMLTableSectionElement>>) => (
32
+ <tbody {...rest}>{children}</tbody>
33
+ );
34
+
35
+ export const TableHeader = ({
36
+ children,
37
+ ...rest
38
+ }: PropsWithChildren<TableHTMLAttributes<HTMLTableSectionElement>>) => (
39
+ <thead
40
+ {...rest}
41
+ className={`sticky bg-white z-10 top-0 ${rest?.className ?? ""}`}
42
+ >
43
+ {cloneElement(children as ReactElement, { isHeader: true })}
44
+ </thead>
45
+ );
46
+
47
+ export const TableRowHeader = ({
48
+ children,
49
+ ...rest
50
+ }: PropsWithChildren<TableHTMLAttributes<HTMLTableRowElement>>) => (
51
+ <tr
52
+ className={`-ml-24 mt-8 sm:ml-0 sm:mt-0 bg-light-grey sm:sticky z-10 ${
53
+ rest?.className ?? ""
54
+ }`}
55
+ style={{ top: "4rem" }}
56
+ >
57
+ {cloneElement(children as ReactElement, { isRowHeader: true })}
58
+ </tr>
59
+ );
@@ -0,0 +1,109 @@
1
+ import React, { PropsWithChildren } from "react";
2
+ import Icon from "../Icon";
3
+
4
+ type TableCellProps = {
5
+ isRowHeader?: boolean;
6
+ } & React.TdHTMLAttributes<HTMLTableCellElement>;
7
+
8
+ const Supported = () => (
9
+ <Icon
10
+ name="icon-gui-check-circled-fill"
11
+ size="1.5rem"
12
+ color="text-gui-success"
13
+ additionalCSS="flex-grow-0 flex-shrink-0"
14
+ data-testid="supported-icon"
15
+ />
16
+ );
17
+
18
+ const Unsupported = () => (
19
+ <Icon
20
+ name="icon-gui-cross-circled-fill"
21
+ size="1.5rem"
22
+ color="text-gui-error"
23
+ additionalCSS="flex-grow-0 flex-shrink-0"
24
+ data-testid="unsupported-icon"
25
+ />
26
+ );
27
+
28
+ const Partial = () => (
29
+ <Icon
30
+ name="icon-gui-partial"
31
+ size="1.5rem"
32
+ additionalCSS="flex-grow-0 flex-shrink-0"
33
+ data-testid="partial-icon"
34
+ />
35
+ );
36
+
37
+ const LabelCell = ({
38
+ children,
39
+ ...rest
40
+ }: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => {
41
+ const classes = `
42
+ ui-text-p1 !font-bold pt-24 pb-8 border-light-grey sm:p-24 sm:relative sm:top-2 flex sm:table-cell ${
43
+ rest?.className ?? ""
44
+ }
45
+ `;
46
+
47
+ return (
48
+ <td {...rest} className={classes}>
49
+ {children}
50
+ </td>
51
+ );
52
+ };
53
+
54
+ const TableCell = ({
55
+ children,
56
+ isRowHeader,
57
+ ...rest
58
+ }: PropsWithChildren<TableCellProps>) => (
59
+ <td
60
+ {...rest}
61
+ className={`
62
+ border-light-grey sm:p-24 leading-none flex sm:table-cell
63
+ ${
64
+ isRowHeader
65
+ ? "rounded-l-none rounded-r sm:rounded-lg py-20 px-24"
66
+ : "py-6"
67
+ }
68
+ ${rest?.className ?? ""}
69
+ `}
70
+ >
71
+ {children}
72
+ </td>
73
+ );
74
+
75
+ const HeaderCell = ({
76
+ children,
77
+ ...rest
78
+ }: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => (
79
+ <td
80
+ {...rest}
81
+ className={`ui-text-h3 px-24 py-24 hidden sm:table-cell ${
82
+ rest?.className ?? ""
83
+ }`}
84
+ >
85
+ {children}
86
+ </td>
87
+ );
88
+
89
+ const CtaCell = ({
90
+ children,
91
+ ...rest
92
+ }: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => (
93
+ <td
94
+ {...rest}
95
+ className={`pt-24 hidden sm:table-cell ${rest?.className ?? ""}`}
96
+ >
97
+ {children}
98
+ </td>
99
+ );
100
+
101
+ export {
102
+ TableCell,
103
+ LabelCell,
104
+ HeaderCell,
105
+ CtaCell,
106
+ Supported,
107
+ Unsupported,
108
+ Partial,
109
+ };
@@ -0,0 +1,25 @@
1
+ import React, { PropsWithChildren } from "react";
2
+
3
+ const CtaRow = ({ children }: PropsWithChildren) => (
4
+ <tr>
5
+ <td className="hidden sm:block"></td>
6
+ {children}
7
+ </tr>
8
+ );
9
+
10
+ type RowProps = {
11
+ isHeader?: boolean;
12
+ } & React.HTMLAttributes<HTMLTableRowElement>;
13
+
14
+ const TableRow = ({
15
+ children,
16
+ isHeader,
17
+ ...rest
18
+ }: PropsWithChildren<RowProps>) => (
19
+ <tr {...rest}>
20
+ {isHeader && <td className="bg-white" />}
21
+ {children}
22
+ </tr>
23
+ );
24
+
25
+ export { TableRow, CtaRow };
@@ -0,0 +1,113 @@
1
+ import React, { Fragment } from "react";
2
+
3
+ import Tooltip from "../Tooltip";
4
+ import { Supported, Unsupported } from "./TableCell";
5
+ import Table from "../Table";
6
+
7
+ const testRow = (index) => ({
8
+ label: `Label ${index + 1}`,
9
+ cells: [
10
+ { label: "text", content: "Cell content", column: "Free" },
11
+ {
12
+ label: "yes",
13
+ content: (
14
+ <div className="flex items-center sm:flex-col sm:items-start">
15
+ <span className="sm:order-1 px-6 sm:py-6 sm:px-0">Supported</span>
16
+ <span className="sm:order-0">
17
+ <Supported />
18
+ </span>
19
+ </div>
20
+ ),
21
+ column: "PAYG",
22
+ },
23
+ {
24
+ label: "no",
25
+ content: (
26
+ <div className="flex items-center sm:flex-col sm:items-start">
27
+ <span className="sm:order-1 px-6 sm:py-6 sm:px-0">Unsupported</span>
28
+ <span className="sm:order-0">
29
+ <Unsupported />
30
+ </span>
31
+ </div>
32
+ ),
33
+ column: "Custom",
34
+ },
35
+ ],
36
+ });
37
+
38
+ const sections = ["Features", "Support", "Technical Support"].map((label) => ({
39
+ label,
40
+ rows: [...Array(5)].map((_, i) => testRow(i)),
41
+ }));
42
+
43
+ export const PricingPageTable = () => {
44
+ return (
45
+ <div className="ui-standard-container">
46
+ <h2 className="ui-text-h2 text-center m-32">Pricing Page Table</h2>
47
+ <p className="text-center m-32">Example content</p>
48
+ <Table.Root>
49
+ <Table.Header>
50
+ <Table.Row>
51
+ <Table.Cell>
52
+ <span className="ui-text-h3 hidden sm:block">Free</span>
53
+ </Table.Cell>
54
+ <Table.Cell>
55
+ <span className="ui-text-h3 hidden sm:block">PAYG</span>
56
+ </Table.Cell>
57
+ <Table.Cell>
58
+ <span className="ui-text-h3 hidden sm:block">Custom</span>
59
+ </Table.Cell>
60
+ </Table.Row>
61
+ </Table.Header>
62
+ <Table.Body>
63
+ {sections.map((section) => (
64
+ <Fragment key={section.label}>
65
+ <Table.RowHeader>
66
+ <Table.Cell colSpan={4}>{section.label}</Table.Cell>
67
+ </Table.RowHeader>
68
+ {section.rows.map((row) => (
69
+ <Table.Row key={row.label}>
70
+ <Table.LabelCell
71
+ key={row.label}
72
+ className="border-t border-light-grey"
73
+ >
74
+ <a className="ui-link" href="#">
75
+ {row.label}
76
+ </a>
77
+ <Tooltip>Example tooltip</Tooltip>
78
+ </Table.LabelCell>
79
+ {row.cells.map((cell) => (
80
+ <Table.Cell key={cell.label} className="last:mb-16 sm:mb-0">
81
+ <div className="flex-1 sm:hidden !text-dark-grey ui-text-overline2">
82
+ {cell.column}
83
+ </div>
84
+ {cell.content}
85
+ </Table.Cell>
86
+ ))}
87
+ </Table.Row>
88
+ ))}
89
+ </Fragment>
90
+ ))}
91
+ <Table.Row>
92
+ <Table.Cell></Table.Cell>
93
+ <Table.CtaCell>
94
+ <a href="#" className="ui-btn-secondary">
95
+ Get started
96
+ </a>
97
+ </Table.CtaCell>
98
+ <Table.CtaCell>
99
+ <a href="#" className="ui-btn-secondary">
100
+ Get started
101
+ </a>
102
+ </Table.CtaCell>
103
+ <Table.CtaCell>
104
+ <a href="#" className="ui-btn">
105
+ Contact sales
106
+ </a>
107
+ </Table.CtaCell>
108
+ </Table.Row>
109
+ </Table.Body>
110
+ </Table.Root>
111
+ </div>
112
+ );
113
+ };
@@ -0,0 +1,26 @@
1
+ import { Table, TableRowHeader, TableHeader, TableBody } from "./Table/Table";
2
+ import { TableRow } from "./Table/TableRow";
3
+ import {
4
+ TableCell,
5
+ LabelCell,
6
+ HeaderCell,
7
+ CtaCell,
8
+ Supported,
9
+ Unsupported,
10
+ Partial,
11
+ } from "./Table/TableCell";
12
+
13
+ export default {
14
+ Root: Table,
15
+ Row: TableRow,
16
+ Cell: TableCell,
17
+ LabelCell,
18
+ HeaderCell,
19
+ CtaCell,
20
+ RowHeader: TableRowHeader,
21
+ Body: TableBody,
22
+ Header: TableHeader,
23
+ Supported,
24
+ Unsupported,
25
+ Partial,
26
+ };
Binary file
@@ -0,0 +1,27 @@
1
+ import React from "react";
2
+ import Tooltip from "../Tooltip";
3
+
4
+ export default {
5
+ title: "Components/Tooltip",
6
+ component: Tooltip,
7
+ tags: ["autodocs"],
8
+ args: {
9
+ children: "Example content",
10
+ },
11
+ };
12
+
13
+ export const Central = {
14
+ render: (args) => (
15
+ <div className="w-256 h-256 flex items-center justify-center m-24 border">
16
+ <Tooltip>{args.children}</Tooltip>
17
+ </div>
18
+ ),
19
+ };
20
+
21
+ export const LeftBound = {
22
+ render: (args) => (
23
+ <div className="w-256 h-256 flex items-center m-24 border">
24
+ <Tooltip>{args.children}</Tooltip>
25
+ </div>
26
+ ),
27
+ };
@@ -0,0 +1,88 @@
1
+ import React, {
2
+ ButtonHTMLAttributes,
3
+ HTMLAttributes,
4
+ PropsWithChildren,
5
+ useEffect,
6
+ useRef,
7
+ useState,
8
+ } from "react";
9
+ import Icon from "./Icon";
10
+
11
+ type TooltipProps = {
12
+ triggerProps?: ButtonHTMLAttributes<HTMLButtonElement>;
13
+ tooltipProps?: HTMLAttributes<HTMLDivElement>;
14
+ } & HTMLAttributes<HTMLDivElement>;
15
+
16
+ const Tooltip = ({
17
+ children,
18
+ triggerProps,
19
+ tooltipProps,
20
+ ...rest
21
+ }: PropsWithChildren<TooltipProps>) => {
22
+ const [open, setOpen] = useState(false);
23
+ const [position, setPosition] = useState({ x: 0, y: 0 });
24
+ const offset = 8;
25
+ const reference = useRef<HTMLButtonElement>(null);
26
+ const floating = useRef<HTMLDivElement>(null);
27
+
28
+ useEffect(() => {
29
+ if (open) {
30
+ const floatingRect = floating.current?.getBoundingClientRect();
31
+ const referenceRect = reference.current?.getBoundingClientRect();
32
+
33
+ if (floatingRect && referenceRect) {
34
+ setPosition({
35
+ x:
36
+ Math.min(floatingRect.width / 2, floatingRect.left) -
37
+ referenceRect.width / 2,
38
+ y: Math.min(floatingRect.height, floatingRect.top) + offset,
39
+ });
40
+ }
41
+ } else {
42
+ setPosition({ x: 0, y: 0 });
43
+ }
44
+ }, [open]);
45
+
46
+ return (
47
+ <div
48
+ {...rest}
49
+ className={`relative inline-block align-top h-16 ${
50
+ rest?.className ?? ""
51
+ }`}
52
+ >
53
+ <button
54
+ onMouseEnter={() => setOpen(true)}
55
+ onMouseLeave={() => setOpen(false)}
56
+ type="button"
57
+ ref={reference}
58
+ aria-describedby="tooltip"
59
+ {...triggerProps}
60
+ className={`ml-8 p-0 relative top-1 focus:outline-none ${
61
+ triggerProps?.className ?? ""
62
+ }`}
63
+ >
64
+ <Icon name="icon-gui-info" size="1rem" />
65
+ </button>
66
+
67
+ {open ? (
68
+ <div
69
+ role="tooltip"
70
+ ref={floating}
71
+ style={{
72
+ top: -position.y,
73
+ left: -position.x,
74
+ boxShadow: "4px 4px 15px rgba(0, 0, 0, 0.2)",
75
+ }}
76
+ {...tooltipProps}
77
+ className={`bg-light-grey p-12 rounded pointer-events-none absolute z-20 ${
78
+ tooltipProps?.className ?? ""
79
+ }`}
80
+ >
81
+ <div className="w-256">{children}</div>
82
+ </div>
83
+ ) : null}
84
+ </div>
85
+ );
86
+ };
87
+
88
+ export default Tooltip;
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 12C1.5 17.799 6.20101 22.5 12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12ZM1.2779e-06 12C9.30272e-07 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 -1.95703e-07 12 -4.37114e-07C5.37259 -6.78525e-07 1.62554e-06 5.37258 1.2779e-06 12Z" fill="#03020D"/>
3
+ <path d="M11.5833 23.576C5.37903 23.3566 0.416667 18.2578 0.416667 12C0.416668 5.74218 5.37903 0.643381 11.5833 0.424021L11.5833 23.576Z" fill="#03020D" stroke="#03020D" stroke-width="0.833333"/>
4
+ </svg>
@@ -0,0 +1,6 @@
1
+ import { loadSprites } from "./scripts";
2
+ import sprites from "../../core/sprites.svg";
3
+
4
+ const loadIcons = () => loadSprites(sprites);
5
+
6
+ export default loadIcons;