@ably/ui 14.1.0-dev.76621d8 → 14.1.0-dev.f3a3c90

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 (306) hide show
  1. package/core/styles/forms.css +15 -2
  2. package/package.json +1 -2
  3. package/src/.DS_Store +0 -0
  4. package/src/core/.DS_Store +0 -0
  5. package/src/core/Accordion/.DS_Store +0 -0
  6. package/src/core/Accordion/Accordion.stories.tsx +0 -39
  7. package/src/core/Accordion.tsx +0 -149
  8. package/src/core/Code/.DS_Store +0 -0
  9. package/src/core/Code/Code.stories.tsx +0 -71
  10. package/src/core/Code/component.css +0 -1
  11. package/src/core/Code/component.js +0 -27
  12. package/src/core/Code.tsx +0 -44
  13. package/src/core/ConnectStateWrapper.tsx +0 -43
  14. package/src/core/ContactFooter/.DS_Store +0 -0
  15. package/src/core/ContactFooter/ContactFooter.stories.tsx +0 -11
  16. package/src/core/ContactFooter/component.css +0 -11
  17. package/src/core/ContactFooter/component.js +0 -2
  18. package/src/core/ContactFooter.tsx +0 -91
  19. package/src/core/CookieMessage/.DS_Store +0 -0
  20. package/src/core/CookieMessage/CookieMessage.stories.tsx +0 -12
  21. package/src/core/CookieMessage/component.css +0 -15
  22. package/src/core/CookieMessage.tsx +0 -52
  23. package/src/core/CustomerLogos/.DS_Store +0 -0
  24. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +0 -43
  25. package/src/core/CustomerLogos.tsx +0 -35
  26. package/src/core/DropdownMenu/.DS_Store +0 -0
  27. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +0 -48
  28. package/src/core/DropdownMenu.tsx +0 -140
  29. package/src/core/Expander/Expander.stories.tsx +0 -132
  30. package/src/core/Expander.tsx +0 -63
  31. package/src/core/FeaturedLink/.DS_Store +0 -0
  32. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +0 -43
  33. package/src/core/FeaturedLink.tsx +0 -93
  34. package/src/core/Flash/.DS_Store +0 -0
  35. package/src/core/Flash/Flash.stories.tsx +0 -37
  36. package/src/core/Flash/component.css +0 -28
  37. package/src/core/Flash.tsx +0 -233
  38. package/src/core/Footer/.DS_Store +0 -0
  39. package/src/core/Footer/Footer.stories.tsx +0 -26
  40. package/src/core/Footer/component.css +0 -33
  41. package/src/core/Footer.tsx +0 -535
  42. package/src/core/Icon/.DS_Store +0 -0
  43. package/src/core/Icon/Icon.stories.tsx +0 -151
  44. package/src/core/Icon.tsx +0 -26
  45. package/src/core/Loader/.DS_Store +0 -0
  46. package/src/core/Loader/Loader.stories.tsx +0 -21
  47. package/src/core/Loader.tsx +0 -52
  48. package/src/core/Logo/.DS_Store +0 -0
  49. package/src/core/Logo/Logo.stories.tsx +0 -12
  50. package/src/core/Logo.tsx +0 -29
  51. package/src/core/Meganav/.DS_Store +0 -0
  52. package/src/core/Meganav/Meganav.stories.tsx +0 -86
  53. package/src/core/Meganav/component.css +0 -114
  54. package/src/core/Meganav/component.js +0 -150
  55. package/src/core/Meganav/component.json +0 -37
  56. package/src/core/Meganav.tsx +0 -225
  57. package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
  58. package/src/core/MeganavBlogPostsList/component.js +0 -43
  59. package/src/core/MeganavBlogPostsList.tsx +0 -41
  60. package/src/core/MeganavContentCompany.tsx +0 -166
  61. package/src/core/MeganavContentDevelopers.tsx +0 -210
  62. package/src/core/MeganavContentProducts.tsx +0 -163
  63. package/src/core/MeganavContentUseCases.tsx +0 -244
  64. package/src/core/MeganavControl/.DS_Store +0 -0
  65. package/src/core/MeganavControl/component.js +0 -117
  66. package/src/core/MeganavControl.tsx +0 -39
  67. package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  68. package/src/core/MeganavControlMobileDropdown/component.js +0 -46
  69. package/src/core/MeganavControlMobileDropdown.tsx +0 -31
  70. package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  71. package/src/core/MeganavControlMobilePanelClose/component.js +0 -36
  72. package/src/core/MeganavControlMobilePanelClose.tsx +0 -34
  73. package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  74. package/src/core/MeganavControlMobilePanelOpen/component.js +0 -59
  75. package/src/core/MeganavControlMobilePanelOpen.tsx +0 -31
  76. package/src/core/MeganavItemsDesktop.tsx +0 -68
  77. package/src/core/MeganavItemsMobile.tsx +0 -197
  78. package/src/core/MeganavItemsSignedIn.tsx +0 -130
  79. package/src/core/MeganavSearch.tsx +0 -36
  80. package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  81. package/src/core/MeganavSearchAutocomplete/component.js +0 -177
  82. package/src/core/MeganavSearchAutocomplete.tsx +0 -12
  83. package/src/core/MeganavSearchPanel.tsx +0 -52
  84. package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
  85. package/src/core/MeganavSearchSuggestions/component.js +0 -133
  86. package/src/core/MeganavSearchSuggestions.tsx +0 -62
  87. package/src/core/Notice/.DS_Store +0 -0
  88. package/src/core/Notice/component.css +0 -7
  89. package/src/core/Notice/component.js +0 -154
  90. package/src/core/Notice.tsx +0 -102
  91. package/src/core/SignOutLink.tsx +0 -51
  92. package/src/core/Slider/.DS_Store +0 -0
  93. package/src/core/Slider/Slider.stories.tsx +0 -98
  94. package/src/core/Slider/component.css +0 -40
  95. package/src/core/Slider/component.js +0 -105
  96. package/src/core/Slider.tsx +0 -224
  97. package/src/core/Table/.DS_Store +0 -0
  98. package/src/core/Table/Table.stories.tsx +0 -12
  99. package/src/core/Table/Table.tsx +0 -58
  100. package/src/core/Table/TableCell.tsx +0 -71
  101. package/src/core/Table/TableRow.tsx +0 -25
  102. package/src/core/Table/data.tsx +0 -133
  103. package/src/core/Table.tsx +0 -15
  104. package/src/core/Tooltip/.DS_Store +0 -0
  105. package/src/core/Tooltip/Tooltip.stories.tsx +0 -27
  106. package/src/core/Tooltip.tsx +0 -88
  107. package/src/core/css.js +0 -3
  108. package/src/core/dom-query.js +0 -5
  109. package/src/core/fonts/NEXT-Book-Light-Italic.eot +0 -0
  110. package/src/core/fonts/NEXT-Book-Light-Italic.otf +0 -0
  111. package/src/core/fonts/NEXT-Book-Light-Italic.woff +0 -0
  112. package/src/core/fonts/NEXT-Book-Light-Italic.woff2 +0 -0
  113. package/src/core/fonts/NEXT-Book-Light.eot +0 -0
  114. package/src/core/fonts/NEXT-Book-Light.otf +0 -0
  115. package/src/core/fonts/NEXT-Book-Light.woff +0 -0
  116. package/src/core/fonts/NEXT-Book-Light.woff2 +0 -0
  117. package/src/core/fonts/NEXT-Book-Medium-Italic.eot +0 -0
  118. package/src/core/fonts/NEXT-Book-Medium-Italic.otf +0 -0
  119. package/src/core/fonts/NEXT-Book-Medium-Italic.woff +0 -0
  120. package/src/core/fonts/NEXT-Book-Medium-Italic.woff2 +0 -0
  121. package/src/core/fonts/NEXT-Book-Medium.eot +0 -0
  122. package/src/core/fonts/NEXT-Book-Medium.otf +0 -0
  123. package/src/core/fonts/NEXT-Book-Medium.woff +0 -0
  124. package/src/core/fonts/NEXT-Book-Medium.woff2 +0 -0
  125. package/src/core/fonts/jetBrains-mono.css +0 -3
  126. package/src/core/fonts/manrope.css +0 -3
  127. package/src/core/fonts/next.css +0 -63
  128. package/src/core/fonts/source-code-pro.css +0 -3
  129. package/src/core/hubspot-chat-toggle.js +0 -67
  130. package/src/core/icons/discord.svg +0 -10
  131. package/src/core/icons/facebook.svg +0 -4
  132. package/src/core/icons/github.svg +0 -3
  133. package/src/core/icons/glassdoor.svg +0 -3
  134. package/src/core/icons/google.svg +0 -3
  135. package/src/core/icons/icon-display-48hrs.svg +0 -3
  136. package/src/core/icons/icon-display-about-ably-col.svg +0 -4
  137. package/src/core/icons/icon-display-api-keys.svg +0 -3
  138. package/src/core/icons/icon-display-api.svg +0 -3
  139. package/src/core/icons/icon-display-asset-tracking-col.svg +0 -18
  140. package/src/core/icons/icon-display-browser.svg +0 -10
  141. package/src/core/icons/icon-display-calendar.svg +0 -3
  142. package/src/core/icons/icon-display-call-mobile.svg +0 -3
  143. package/src/core/icons/icon-display-careers-col.svg +0 -9
  144. package/src/core/icons/icon-display-case-studies-col.svg +0 -5
  145. package/src/core/icons/icon-display-chat-col.svg +0 -4
  146. package/src/core/icons/icon-display-chat-stack-col.svg +0 -4
  147. package/src/core/icons/icon-display-chat-stack.svg +0 -4
  148. package/src/core/icons/icon-display-cloud-servers.svg +0 -3
  149. package/src/core/icons/icon-display-compare-tech-col.svg +0 -9
  150. package/src/core/icons/icon-display-customers-col.svg +0 -15
  151. package/src/core/icons/icon-display-data-broadcast-col.svg +0 -26
  152. package/src/core/icons/icon-display-data-synchronization-col.svg +0 -14
  153. package/src/core/icons/icon-display-docs-col.svg +0 -7
  154. package/src/core/icons/icon-display-documentation.svg +0 -3
  155. package/src/core/icons/icon-display-events-col.svg +0 -13
  156. package/src/core/icons/icon-display-examples-col.svg +0 -11
  157. package/src/core/icons/icon-display-gdpr.svg +0 -3
  158. package/src/core/icons/icon-display-general-comms.svg +0 -3
  159. package/src/core/icons/icon-display-hipaa.svg +0 -10
  160. package/src/core/icons/icon-display-integrations-col.svg +0 -8
  161. package/src/core/icons/icon-display-it-support-access.svg +0 -3
  162. package/src/core/icons/icon-display-it-support-helpdesk.svg +0 -3
  163. package/src/core/icons/icon-display-kafka-at-the-edge-col.svg +0 -8
  164. package/src/core/icons/icon-display-laptop.svg +0 -10
  165. package/src/core/icons/icon-display-lightbulb-col.svg +0 -10
  166. package/src/core/icons/icon-display-live-chat.svg +0 -3
  167. package/src/core/icons/icon-display-map-pin.svg +0 -3
  168. package/src/core/icons/icon-display-message.svg +0 -3
  169. package/src/core/icons/icon-display-padlock-closed.svg +0 -3
  170. package/src/core/icons/icon-display-platform.svg +0 -22
  171. package/src/core/icons/icon-display-play.svg +0 -3
  172. package/src/core/icons/icon-display-privacy-shield-framework.svg +0 -7
  173. package/src/core/icons/icon-display-push-notifications-col.svg +0 -6
  174. package/src/core/icons/icon-display-quickstart-guides-col.svg +0 -8
  175. package/src/core/icons/icon-display-resources-col.svg +0 -21
  176. package/src/core/icons/icon-display-sdks-col.svg +0 -11
  177. package/src/core/icons/icon-display-servers.svg +0 -3
  178. package/src/core/icons/icon-display-shopping-cart.svg +0 -10
  179. package/src/core/icons/icon-display-sla.svg +0 -3
  180. package/src/core/icons/icon-display-soc2-type2.svg +0 -3
  181. package/src/core/icons/icon-display-tech-account-comms.svg +0 -3
  182. package/src/core/icons/icon-display-tutorials-demos-col.svg +0 -25
  183. package/src/core/icons/icon-display-virtual-events-col.svg +0 -12
  184. package/src/core/icons/icon-display-virtual-events.svg +0 -12
  185. package/src/core/icons/icon-gui-ably-badge.svg +0 -3
  186. package/src/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +0 -3
  187. package/src/core/icons/icon-gui-arrow-bidirectional-vertical.svg +0 -3
  188. package/src/core/icons/icon-gui-arrow-down.svg +0 -3
  189. package/src/core/icons/icon-gui-arrow-left.svg +0 -3
  190. package/src/core/icons/icon-gui-arrow-right.svg +0 -3
  191. package/src/core/icons/icon-gui-arrow-up.svg +0 -3
  192. package/src/core/icons/icon-gui-burger-menu.svg +0 -5
  193. package/src/core/icons/icon-gui-check-circled-fill-black.svg +0 -4
  194. package/src/core/icons/icon-gui-check-circled-fill.svg +0 -4
  195. package/src/core/icons/icon-gui-check-circled.svg +0 -3
  196. package/src/core/icons/icon-gui-checklist-checked.svg +0 -3
  197. package/src/core/icons/icon-gui-clock.svg +0 -3
  198. package/src/core/icons/icon-gui-close.svg +0 -3
  199. package/src/core/icons/icon-gui-copy.svg +0 -10
  200. package/src/core/icons/icon-gui-cross-circled-fill.svg +0 -4
  201. package/src/core/icons/icon-gui-cross-circled.svg +0 -3
  202. package/src/core/icons/icon-gui-dash-circled.svg +0 -3
  203. package/src/core/icons/icon-gui-disclosure-arrow.svg +0 -3
  204. package/src/core/icons/icon-gui-document-generic.svg +0 -3
  205. package/src/core/icons/icon-gui-enlarge.svg +0 -3
  206. package/src/core/icons/icon-gui-external-link.svg +0 -3
  207. package/src/core/icons/icon-gui-filter-flow-step-1.svg +0 -5
  208. package/src/core/icons/icon-gui-filter-flow-step-2.svg +0 -5
  209. package/src/core/icons/icon-gui-filter-flow-step-3.svg +0 -5
  210. package/src/core/icons/icon-gui-history.svg +0 -3
  211. package/src/core/icons/icon-gui-info.svg +0 -3
  212. package/src/core/icons/icon-gui-link-arrow.svg +0 -3
  213. package/src/core/icons/icon-gui-link.svg +0 -4
  214. package/src/core/icons/icon-gui-live-chat.svg +0 -3
  215. package/src/core/icons/icon-gui-minus.svg +0 -3
  216. package/src/core/icons/icon-gui-partial.svg +0 -4
  217. package/src/core/icons/icon-gui-plus.svg +0 -3
  218. package/src/core/icons/icon-gui-quote-marks-solid.svg +0 -3
  219. package/src/core/icons/icon-gui-refresh.svg +0 -10
  220. package/src/core/icons/icon-gui-resources.svg +0 -3
  221. package/src/core/icons/icon-gui-search.svg +0 -3
  222. package/src/core/icons/icon-gui-tick.svg +0 -3
  223. package/src/core/icons/icon-gui-warning.svg +0 -5
  224. package/src/core/icons/icon-live-updates-results-metrics-col.svg +0 -26
  225. package/src/core/icons/icon-multi-user-spaces-col.svg +0 -13
  226. package/src/core/icons/icon-social-x.svg +0 -3
  227. package/src/core/icons/icon-tech-apachekafka.svg +0 -3
  228. package/src/core/icons/linkedin.svg +0 -3
  229. package/src/core/icons/quote.svg +0 -3
  230. package/src/core/icons/stackoverflow.svg +0 -3
  231. package/src/core/icons/twitter.svg +0 -3
  232. package/src/core/icons/youtube.svg +0 -11
  233. package/src/core/icons.js +0 -6
  234. package/src/core/images/ably-logo.png +0 -0
  235. package/src/core/images/ably-logo.svg +0 -15
  236. package/src/core/images/ably-stack.svg +0 -14
  237. package/src/core/images/best-support-2023.svg +0 -1
  238. package/src/core/images/cust-logo-ao-col-pos.png +0 -0
  239. package/src/core/images/cust-logo-ao-col-pos@2x.png +0 -0
  240. package/src/core/images/cust-logo-ausopen-col-pos.png +0 -0
  241. package/src/core/images/cust-logo-ausopen-col-pos@2x.png +0 -0
  242. package/src/core/images/cust-logo-ausopen-mono-pos.svg +0 -5
  243. package/src/core/images/cust-logo-bloomberg-mono-pos.svg +0 -11
  244. package/src/core/images/cust-logo-hopin-mono-pos.svg +0 -4
  245. package/src/core/images/cust-logo-hubspot-col-pos.png +0 -0
  246. package/src/core/images/cust-logo-hubspot-col-pos@2x.png +0 -0
  247. package/src/core/images/cust-logo-hubspot-mono-pos.svg +0 -4
  248. package/src/core/images/cust-logo-lightspeed-col-pos.png +0 -0
  249. package/src/core/images/cust-logo-lightspeed-col-pos@2x.png +0 -0
  250. package/src/core/images/cust-logo-lightspeed-syst-col-pos.png +0 -0
  251. package/src/core/images/cust-logo-lightspeed-syst-col-pos@2x.png +0 -0
  252. package/src/core/images/cust-logo-mentimeter-mono-pos.svg +0 -17
  253. package/src/core/images/cust-logo-split-col-pos.png +0 -0
  254. package/src/core/images/cust-logo-split-col-pos@2x.png +0 -0
  255. package/src/core/images/cust-logo-split-mono-pos.svg +0 -9
  256. package/src/core/images/cust-logo-toyota-mono-pos.svg +0 -18
  257. package/src/core/images/cust-logo-vitac-col-pos.png +0 -0
  258. package/src/core/images/cust-logo-vitac-col-pos@2x.png +0 -0
  259. package/src/core/images/cust-logo-webflow-col-pos.svg +0 -3
  260. package/src/core/images/cust-photo-hubspot-max-freiert.jpg +0 -0
  261. package/src/core/images/cust-photo-split-pato-echague.jpg +0 -0
  262. package/src/core/images/cust-photo-vitac-joe-antonio.jpg +0 -0
  263. package/src/core/images/fastest-implementation-2023.svg +0 -1
  264. package/src/core/images/flexible-companies.png +0 -0
  265. package/src/core/images/high-performer-2022.png +0 -0
  266. package/src/core/images/high-performer-2023.svg +0 -1
  267. package/src/core/images/highest-user-adoption-2022.png +0 -0
  268. package/src/core/images/highest-user-adoption-2023.svg +0 -1
  269. package/src/core/images/icon-tech-aws.svg +0 -4
  270. package/src/core/images/rocket-list-2021.png +0 -0
  271. package/src/core/images/scale-motif-open-empathetic.svg +0 -1
  272. package/src/core/images/technical-support-01-800x533.jpg +0 -0
  273. package/src/core/images/users-love-us-2022.png +0 -0
  274. package/src/core/load-sprites.js +0 -11
  275. package/src/core/react-renderer.tsx +0 -29
  276. package/src/core/remote-blogs-posts.js +0 -42
  277. package/src/core/remote-data-store.js +0 -34
  278. package/src/core/remote-data-util.js +0 -4
  279. package/src/core/remote-session-data.js +0 -58
  280. package/src/core/scripts.js +0 -10
  281. package/src/core/styles/Dropdown.stories.tsx +0 -49
  282. package/src/core/styles/Toggle.stories.tsx +0 -41
  283. package/src/core/styles/buttons.css +0 -124
  284. package/src/core/styles/forms.css +0 -83
  285. package/src/core/styles/layout.css +0 -21
  286. package/src/core/styles/properties.css +0 -278
  287. package/src/core/styles/text.css +0 -168
  288. package/src/core/styles/toggles.css +0 -38
  289. package/src/core/styles.base.css +0 -1
  290. package/src/core/styles.components.css +0 -44
  291. package/src/core/styles.css +0 -2
  292. package/src/core/url-base.js +0 -7
  293. package/src/core/utils/syntax-highlighter-registry.js +0 -63
  294. package/src/core/utils/syntax-highlighter.css +0 -71
  295. package/src/core/utils/syntax-highlighter.js +0 -103
  296. package/src/pages/Buttons.mdx +0 -121
  297. package/src/pages/Chips.mdx +0 -136
  298. package/src/pages/Colour.mdx +0 -23
  299. package/src/pages/Forms.mdx +0 -219
  300. package/src/pages/Layout.mdx +0 -58
  301. package/src/pages/Typography.mdx +0 -206
  302. package/src/pages/utils.ts +0 -80
  303. package/src/reset/scripts.js +0 -1
  304. package/src/reset/styles/normalize.css +0 -353
  305. package/src/reset/styles/reset.css +0 -139
  306. package/src/reset/styles.css +0 -2
@@ -63,7 +63,7 @@
63
63
  }
64
64
 
65
65
  .ui-dropdown-base {
66
- @apply rounded-lg border border-neutral-500 pl-16 pr-[56px] appearance-none select-none focus:outline-gui-focus focus:outline-4 leading-snug;
66
+ @apply rounded-lg border border-neutral-500 pl-16 pr-[56px] appearance-none select-none focus:outline-gui-focus focus:outline-4 text-p2 flex;
67
67
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjNjY3MDg1IiBkPSJNMTIuOTA0NiAxMkw5LjAwNjcxIDE2LjMzMUwxMC40OTMzIDE3LjY2OUwxNC45OTMzIDEyLjY2OUwxNC45OTMzIDExLjMzMUwxMC40OTMzIDYuMzMxMDVMOS4wMDY3MSA3LjY2ODk4TDEyLjkwNDYgMTJaIiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAxMiAxMikiLz4KPC9zdmc+Cg==");
68
68
  background-repeat: no-repeat;
69
69
  background-position: center right 16px;
@@ -78,6 +78,19 @@
78
78
  }
79
79
 
80
80
  .ui-dropdown-small {
81
- @apply ui-dropdown-base py-8;
81
+ @apply ui-dropdown-base py-[10px] text-[14px];
82
+ }
83
+
84
+ /* Special wrapper styles for overriding default Select2 functionality */
85
+ .ui-dropdown-select2-wrapper .select2 {
86
+ @apply w-full;
87
+ }
88
+
89
+ .ui-dropdown-select2-wrapper .select2-selection {
90
+ @apply ui-dropdown-small;
91
+ }
92
+
93
+ .ui-dropdown-select2-wrapper .select2-selection__arrow {
94
+ @apply hidden;
82
95
  }
83
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ably/ui",
3
- "version": "14.1.0-dev.76621d8",
3
+ "version": "14.1.0-dev.f3a3c90",
4
4
  "description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -8,7 +8,6 @@
8
8
  },
9
9
  "license": "Apache-2.0",
10
10
  "files": [
11
- "src",
12
11
  "core",
13
12
  "reset",
14
13
  "tailwind.config.js",
package/src/.DS_Store DELETED
Binary file
Binary file
Binary file
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- import Accordion, { AccordionProps } from "../Accordion";
3
-
4
- export default {
5
- title: "JS Components/Accordion",
6
- component: Accordion,
7
- args: {
8
- data: [
9
- {
10
- name: "Item 1",
11
- content: "Content 1",
12
- },
13
- {
14
- name: "Item 2",
15
- content: "Content 2",
16
- },
17
- {
18
- name: "Item 3",
19
- content: "Content 3",
20
- },
21
- {
22
- name: "Item 4",
23
- content: "Content 4",
24
- },
25
- ],
26
- autoClose: false,
27
- topBorder: false,
28
- bottomBorder: false,
29
- arrowIcon: false,
30
- },
31
- };
32
-
33
- export const Default = {};
34
-
35
- export const AutoClose = {
36
- render: (args: AccordionProps) => (
37
- <Accordion data={args.data} autoClose={true} />
38
- ),
39
- };
@@ -1,149 +0,0 @@
1
- import React, { useState, ReactNode, JSX } from "react";
2
- import Icon from "./Icon";
3
-
4
- type AccordionData = {
5
- name: string;
6
- content: ReactNode;
7
- };
8
-
9
- type AccordionRowProps = {
10
- bottomBorder?: boolean;
11
- topBorder?: boolean;
12
- active: boolean;
13
- last: boolean;
14
- name: string;
15
- index;
16
- children: ReactNode;
17
- arrowIcon?: boolean;
18
- setActiveIndex: (index: number) => void;
19
- };
20
-
21
- export type AccordionProps = {
22
- data: AccordionData[];
23
- arrowIcon?: boolean;
24
- topBorder?: boolean;
25
- bottomBorder?: boolean;
26
- id?: string;
27
- autoClose?: boolean;
28
- className?: string;
29
- };
30
-
31
- const AccordionRow = ({
32
- name,
33
- children,
34
- index,
35
- setActiveIndex,
36
- active,
37
- topBorder,
38
- bottomBorder,
39
- last,
40
- arrowIcon,
41
- }: AccordionRowProps) => {
42
- let iconActive: JSX.Element, iconInactive: JSX.Element;
43
- const handleSetIndex = () => {
44
- setActiveIndex(index);
45
- };
46
-
47
- if (arrowIcon) {
48
- iconActive = (
49
- <Icon
50
- name="icon-gui-disclosure-arrow"
51
- color="text-dark-grey"
52
- size="1.5rem"
53
- additionalCSS="-rotate-90"
54
- />
55
- );
56
- iconInactive = (
57
- <Icon
58
- name="icon-gui-disclosure-arrow"
59
- color="text-dark-grey"
60
- size="1.5rem"
61
- additionalCSS="rotate-90"
62
- />
63
- );
64
- } else {
65
- iconActive = (
66
- <Icon name="icon-gui-minus" color="text-dark-grey" size="1.5rem" />
67
- );
68
- iconInactive = (
69
- <Icon name="icon-gui-plus" color="text-dark-grey" size="1.5rem" />
70
- );
71
- }
72
-
73
- return (
74
- <div
75
- className={`border-mid-grey ${last && !bottomBorder ? "" : "border-b"} ${
76
- topBorder ? "border-t" : ""
77
- }`}
78
- >
79
- <button
80
- type="button"
81
- onClick={handleSetIndex}
82
- className={`flex w-full px-0 focus:outline-none py-20`}
83
- >
84
- <span className="ui-text-p1 font-bold text-left mr-8">{name}</span>
85
- <span className="ml-auto">{active ? iconActive : iconInactive}</span>
86
- </button>
87
-
88
- <section
89
- className="ui-text-p2 transition-all overflow-hidden"
90
- style={{
91
- maxHeight: active ? "500px" : "0",
92
- paddingBottom: active ? "1.5rem" : "0",
93
- }}
94
- >
95
- {children}
96
- </section>
97
- </div>
98
- );
99
- };
100
-
101
- const Accordion = ({
102
- data,
103
- id = "id-accordion",
104
- topBorder,
105
- bottomBorder,
106
- arrowIcon,
107
- autoClose,
108
- className,
109
- }: AccordionProps) => {
110
- const [activeIndexes, setActiveIndexes] = useState<number[]>([]);
111
-
112
- const handleSetIndex = (index: number) => {
113
- const currentIndexIsActive = activeIndexes.includes(index);
114
-
115
- if (autoClose) {
116
- setActiveIndexes(currentIndexIsActive ? [] : [index]);
117
- } else {
118
- setActiveIndexes(
119
- currentIndexIsActive
120
- ? activeIndexes.filter((i) => i !== index)
121
- : [...activeIndexes, index],
122
- );
123
- }
124
- };
125
-
126
- return (
127
- <div className={className} id={id}>
128
- {data.map((item, currentIndex) => {
129
- return (
130
- <AccordionRow
131
- key={item.name}
132
- name={item.name}
133
- arrowIcon={arrowIcon}
134
- index={currentIndex}
135
- last={data.length === currentIndex + 1}
136
- topBorder={topBorder && currentIndex === 0}
137
- bottomBorder={bottomBorder && data.length === currentIndex + 1}
138
- active={activeIndexes.includes(currentIndex)}
139
- setActiveIndex={handleSetIndex}
140
- >
141
- {item.content}
142
- </AccordionRow>
143
- );
144
- })}
145
- </div>
146
- );
147
- };
148
-
149
- export default Accordion;
Binary file
@@ -1,71 +0,0 @@
1
- import Code from "../Code";
2
-
3
- export default {
4
- title: "JS Components/Code",
5
- component: Code,
6
- tags: ["autodocs"],
7
- };
8
-
9
- export const Javascript = {
10
- args: {
11
- language: "javascript",
12
- snippet: `var ably = new Ably.Realtime('1WChTA.mc0Biw:kNfiYG4KiPgmHHgH');
13
- var channel = ably.channels.get('web-pal');
14
-
15
- // Subscribe to messages on channel
16
- channel.subscribe('greeting', function(message) {
17
- alert(message.data);
18
- });`,
19
- },
20
- };
21
-
22
- export const Swift = {
23
- args: {
24
- language: "swift",
25
- snippet: `let ably = ARTRealtime(key: "1WChTA.mc0Biw:kNfiYG4KiPgmHHgH")
26
- let channel = ably.channels.get("web-pal")
27
-
28
- // Subscribe to messages on channel
29
- channel.subscribe("greeting") { message in
30
- print("\\(message.data)")
31
- }`,
32
- },
33
- };
34
-
35
- export const Java = {
36
- args: {
37
- language: "java",
38
- snippet: `AblyRealtime ably = new AblyRealtime("1WChTA.mc0Biw:kNfiYG4KiPgmHHgH");
39
- Channel channel = ably.channels.get("web-pal");
40
-
41
- /* Subscribe to messages on channel */
42
-
43
- MessageListener listener;
44
- listener = new MessageListener() {
45
- @Override
46
- public void onMessage(Message message) {
47
- System.out.print(message.data);
48
- };
49
- };
50
- channel.subscribe("greeting", listener);`,
51
- },
52
- };
53
-
54
- export const Kotlin = {
55
- args: {
56
- language: "kotlin",
57
- snippet: `var ably = new Ably.Realtime('1WChTA.mc0Biw:kNfiYG4KiPgmHHgH');
58
- val exampleConstraints = DefaultResolutionConstraints(
59
- DefaultResolutionSet( // this constructor provides one Resolution for all states
60
- Resolution(
61
- accuracy = Accuracy.BALANCED,
62
- desiredInterval = 1000L,
63
- minimumDisplacement = 1.0
64
- )
65
- ),
66
- proximityThreshold = DefaultProximity(spatial = 1.0),
67
- batteryLevelThreshold = 10.0f,
68
- lowBatteryMultiplier = 2.0f
69
- )`,
70
- },
71
- };
@@ -1 +0,0 @@
1
- @import "../utils/syntax-highlighter.css";
@@ -1,27 +0,0 @@
1
- // Note: importing syntax-highlighter here means the component.js file will include
2
- // all the language dependecies, creating a large a bundle. Prefer using the highlighter serverside.
3
- import {
4
- highlightSnippet,
5
- registerDefaultLanguages,
6
- } from "../utils/syntax-highlighter";
7
-
8
- import languagesRegistry from "../utils/syntax-highlighter-registry";
9
-
10
- registerDefaultLanguages(languagesRegistry);
11
-
12
- function highlightEl(el) {
13
- if (!el) throw "Missing code element";
14
-
15
- const pre = el.querySelector("pre");
16
- const code = el.querySelector("code");
17
- const language = pre.getAttribute("lang");
18
-
19
- if (!code || !pre || !language) throw "Malformed code element";
20
-
21
- const { innerHTML } = code;
22
- const html = highlightSnippet(language, innerHTML);
23
-
24
- code.innerHTML = html;
25
- }
26
-
27
- export default highlightEl;
package/src/core/Code.tsx DELETED
@@ -1,44 +0,0 @@
1
- import React from "react";
2
-
3
- import {
4
- highlightSnippet,
5
- registerDefaultLanguages,
6
- } from "./utils/syntax-highlighter";
7
- import languagesRegistry from "./utils/syntax-highlighter-registry";
8
-
9
- registerDefaultLanguages(languagesRegistry);
10
-
11
- type CodeProps = {
12
- language: string;
13
- snippet: string;
14
- textSize?: string;
15
- padding?: string;
16
- additionalCSS?: string;
17
- };
18
-
19
- const Code = ({
20
- language,
21
- snippet,
22
- textSize = "ui-text-code",
23
- padding = "p-32",
24
- additionalCSS = "",
25
- }: CodeProps) => {
26
- const HTMLraw = highlightSnippet(language, `${snippet}`.trim()) ?? "";
27
- const className = `language-${language} ${textSize}`;
28
-
29
- return (
30
- <div
31
- className={`hljs overflow-auto ${padding} ${additionalCSS}`}
32
- data-id="code"
33
- >
34
- <pre lang={language}>
35
- <code
36
- className={className}
37
- dangerouslySetInnerHTML={{ __html: HTMLraw }}
38
- />
39
- </pre>
40
- </div>
41
- );
42
- };
43
-
44
- export default Code;
@@ -1,43 +0,0 @@
1
- import React, { useEffect, useState } from "react";
2
-
3
- import { connectState, getRemoteDataStore } from "./remote-data-store";
4
-
5
- /*
6
- Connect a react component to a global store.
7
- This is similar to what react-redux does but uses our global store so
8
- can share state with other React mount points or anything that uses the
9
- store.
10
- - selectors is an object where keys are your prop names and values are your select
11
- functions that work on the store to retrieve the state you are interested in
12
- - initial state is set in useEffect so the wrapped component needs to handle it's props set to undefined initially
13
- */
14
-
15
- const ConnectStateWrapper = (Component, selectors) => {
16
- const [state, setState] = useState({});
17
-
18
- const setStateForKey = (key) => (storeState) =>
19
- setState(() => ({ [key]: storeState }));
20
-
21
- useEffect(() => {
22
- const store = getRemoteDataStore();
23
- const resolvedState = Object.keys(selectors).reduce(
24
- (acc, key) => ({ ...acc, [key]: selectors[key](store) }),
25
- {},
26
- );
27
-
28
- // Set initial state
29
- setState(resolvedState);
30
-
31
- // Create a store subscription for each selector. Depending on your use case, this can be inefficient.
32
- // When optimising for renders, look for wins with selectors better for your use and using connectState directly.
33
- Object.keys(selectors).forEach((key) => {
34
- connectState(selectors[key], setStateForKey(key));
35
- });
36
- }, []);
37
-
38
- const WrappedComponent = (props) => <Component {...props} {...state} />;
39
-
40
- return WrappedComponent;
41
- };
42
-
43
- export default ConnectStateWrapper;
Binary file
@@ -1,11 +0,0 @@
1
- import ContactFooter from "../ContactFooter";
2
-
3
- export default {
4
- title: "JS Components/Contact Footer",
5
- component: ContactFooter,
6
- parameters: {
7
- layout: "fullscreen",
8
- },
9
- };
10
-
11
- export const Default = {};
@@ -1,11 +0,0 @@
1
- @layer components {
2
- .ui-contact-footer {
3
- background-size: 100% 100%;
4
- background-position: right center;
5
- @apply w-full bg-gradient-active-orange;
6
- }
7
-
8
- .ui-contact-footer-box {
9
- @apply p-24 sm:p-32 xl:p-40 bg-white flex flex-col justify-between rounded-sm;
10
- }
11
- }
@@ -1,2 +0,0 @@
1
- import toggleChatWidget from "../hubspot-chat-toggle";
2
- export default () => toggleChatWidget({ dataId: "contact-footer" });
@@ -1,91 +0,0 @@
1
- import React, { useEffect } from "react";
2
-
3
- import Icon from "./Icon";
4
- import _absUrl from "./url-base.js";
5
- import toggleChatWidget from "./hubspot-chat-toggle";
6
-
7
- type ContactFooterProps = {
8
- urlBase: string;
9
- };
10
-
11
- const ContactFooter = ({ urlBase }: ContactFooterProps) => {
12
- useEffect(() => toggleChatWidget({ dataId: "contact-footer" }), []);
13
- const absUrl = (path) => _absUrl(path, urlBase);
14
-
15
- return (
16
- <div
17
- className="ui-contact-footer font-sans antialiased"
18
- data-id="contact-footer"
19
- >
20
- <div className="w-full bp-lg max-w-screen-xl mx-auto py-64 grid grid-cols-1 md:grid-cols-3 ui-grid-gap ui-grid-px">
21
- <div className="ui-contact-footer-box">
22
- <Icon
23
- name="icon-display-live-chat"
24
- size="3rem"
25
- additionalCSS="block mb-16"
26
- />
27
- <div>
28
- <div className="ui-text-h3 mb-24">Live Chat</div>
29
- <p className="ui-text-p1">
30
- Reach out team of experts over chat powered by Ably.
31
- </p>
32
- </div>
33
- <button
34
- type="button"
35
- className="ui-btn-secondary self-start mt-16"
36
- disabled
37
- data-id="open-chat-widget"
38
- data-enabled-label="Start a live chat"
39
- data-disabled-label="Live chat unavailable"
40
- >
41
- Live chat unavailable
42
- </button>
43
- </div>
44
-
45
- <div className="ui-contact-footer-box">
46
- <Icon
47
- name="icon-display-call-mobile"
48
- size="3rem"
49
- additionalCSS="block mb-16"
50
- />
51
- <div className="flex-grow">
52
- <div className="ui-text-h3 mb-24">Call us</div>
53
- <p className="ui-text-p1">
54
- <span className="block">
55
- <strong className="font-bold">+1 877 434 5287</strong> (USA,
56
- toll free)
57
- </span>
58
- <span className="block">
59
- <strong className="font-bold">+44 20 3318 4689</strong> (UK)
60
- </span>
61
- </p>
62
- </div>
63
- </div>
64
-
65
- <div className="ui-contact-footer-box">
66
- <Icon
67
- name="icon-display-tech-account-comms"
68
- size="3rem"
69
- additionalCSS="block mb-16"
70
- />
71
- <div>
72
- <div className="ui-text-h3 mb-24">
73
- Technical and account support
74
- </div>
75
- <p className="ui-text-p1">
76
- We&apos;re standing by to help with any questions or code.
77
- </p>
78
- </div>
79
- <a
80
- className="ui-btn-secondary self-start p-btn mt-16"
81
- href={absUrl("/support")}
82
- >
83
- Get support now
84
- </a>
85
- </div>
86
- </div>
87
- </div>
88
- );
89
- };
90
-
91
- export default ContactFooter;
Binary file
@@ -1,12 +0,0 @@
1
- import CookieMessage from "../CookieMessage";
2
-
3
- export default {
4
- title: "JS Components/Cookie Message",
5
- component: CookieMessage,
6
- args: {
7
- cookieId: "cookie-namespace",
8
- noticeId: "cookie-message",
9
- },
10
- };
11
-
12
- export const Default = {};
@@ -1,15 +0,0 @@
1
- @layer components {
2
- .ui-cookie-message {
3
- @apply rounded-lg bg-white font-sans;
4
- @apply justify-between items-center;
5
- @apply opacity-100 z-50 bottom-0 fixed sm:flex;
6
- @apply p-16 mb-16 ml-16;
7
- max-width: 70vw;
8
- box-shadow: 0px 24px 32px 0px #0000000d;
9
- border: 1px solid var(--color-mid-grey);
10
- border-left: 0.5rem solid var(--color-electric-cyan);
11
- transition:
12
- bottom 250ms ease-out,
13
- opacity 150ms ease-out;
14
- }
15
- }
@@ -1,52 +0,0 @@
1
- import React, { useRef, useEffect, useState } from "react";
2
- import Cookie from "js-cookie";
3
-
4
- import _absUrl from "./url-base";
5
-
6
- const COOKIE_EXPIRY = 365;
7
-
8
- type CookieMessageProps = {
9
- cookieId: string;
10
- urlBase: string;
11
- };
12
-
13
- const CookieMessage = ({ cookieId, urlBase }: CookieMessageProps) => {
14
- const ref = useRef<HTMLDivElement>(null);
15
- const [hideCookieMessage, setHideCookieMessage] = useState(true);
16
-
17
- useEffect(() => {
18
- const isCookieSet = Cookie.get(cookieId) ? true : false;
19
- setHideCookieMessage(isCookieSet);
20
- }, []);
21
-
22
- const handleClose = () => {
23
- Cookie.set(cookieId, "1", { expires: COOKIE_EXPIRY });
24
-
25
- ref.current?.classList.add("bottom-1", "opacity-0");
26
- setTimeout(() => setHideCookieMessage(true), 500);
27
- };
28
-
29
- const absUrl = (path) => _absUrl(path, urlBase);
30
-
31
- // Presume the message is hidden by default
32
- if (hideCookieMessage) return null;
33
-
34
- return (
35
- <div className="ui-cookie-message" ref={ref}>
36
- <p className="ui-text-p2 pr-32">
37
- <a href={absUrl("/privacy")} className="underline">
38
- How we use cookies
39
- </a>{" "}
40
- to improve your experience.
41
- </p>
42
- <button
43
- className="ui-btn-secondary mt-12 sm:mt-0 whitespace-nowrap"
44
- onClick={handleClose}
45
- >
46
- Accept and close
47
- </button>
48
- </div>
49
- );
50
- };
51
-
52
- export default CookieMessage;
Binary file
@@ -1,43 +0,0 @@
1
- import CustomerLogos from "../CustomerLogos";
2
-
3
- import hubspot from "../images/cust-logo-hubspot-mono-pos.svg";
4
- import webflow from "../images/cust-logo-webflow-col-pos.svg";
5
- import mentimeter from "../images/cust-logo-mentimeter-mono-pos.svg";
6
- import toyota from "../images/cust-logo-toyota-mono-pos.svg";
7
- import split from "../images/cust-logo-split-mono-pos.svg";
8
- import australian from "../images/cust-logo-ausopen-mono-pos.svg";
9
-
10
- export default {
11
- title: "JS Components/Customer Logos",
12
- component: CustomerLogos,
13
- args: {
14
- companies: [
15
- {
16
- label: "Hubspot",
17
- logo: hubspot,
18
- },
19
- {
20
- label: "Webflow",
21
- logo: webflow,
22
- },
23
- {
24
- label: "Mentimeter",
25
- logo: mentimeter,
26
- },
27
- {
28
- label: "Toyota",
29
- logo: toyota,
30
- },
31
- {
32
- label: "Split",
33
- logo: split,
34
- },
35
- {
36
- label: "Australian Open",
37
- logo: australian,
38
- },
39
- ],
40
- },
41
- };
42
-
43
- export const Default = {};