@ably/ui 13.2.2 → 14.0.0-dev.fbce38f

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 (402) hide show
  1. package/README.md +25 -152
  2. package/core/Accordion/component.js +1 -0
  3. package/core/Code/component.css +1 -72
  4. package/core/Code/component.js +1 -1
  5. package/core/ConnectStateWrapper/component.js +1 -1
  6. package/core/ContactFooter/component.css +7 -10
  7. package/core/ContactFooter/component.js +1 -1
  8. package/core/CookieMessage/component.css +10 -13
  9. package/core/CookieMessage/component.js +1 -1
  10. package/core/CustomerLogos/component.js +1 -1
  11. package/core/DropdownMenu/component.js +1 -1
  12. package/core/FeaturedLink/component.js +1 -1
  13. package/core/Flash/component.css +19 -22
  14. package/core/Flash/component.js +1 -1
  15. package/core/Footer/component.css +22 -25
  16. package/core/Footer/component.js +1 -1
  17. package/core/Icon/component.js +1 -1
  18. package/core/Loader/component.js +1 -1
  19. package/core/Logo/component.js +1 -1
  20. package/core/Meganav/component.css +103 -106
  21. package/core/Meganav/component.js +1 -1
  22. package/core/MeganavBlogPostsList/component.js +1 -2
  23. package/core/MeganavContentCompany/component.js +1 -1
  24. package/core/MeganavContentDevelopers/component.js +1 -1
  25. package/core/MeganavContentProducts/component.js +1 -1
  26. package/core/MeganavContentUseCases/component.js +1 -1
  27. package/core/MeganavControl/component.js +1 -1
  28. package/core/MeganavControlMobileDropdown/component.js +1 -1
  29. package/core/MeganavControlMobilePanelClose/component.js +1 -1
  30. package/core/MeganavControlMobilePanelOpen/component.js +1 -1
  31. package/core/MeganavItemsDesktop/component.js +1 -1
  32. package/core/MeganavItemsMobile/component.js +1 -1
  33. package/core/MeganavItemsSignedIn/component.js +1 -1
  34. package/core/MeganavSearch/component.js +1 -1
  35. package/core/MeganavSearchAutocomplete/component.js +1 -1
  36. package/core/MeganavSearchPanel/component.js +1 -1
  37. package/core/MeganavSearchSuggestions/component.js +1 -1
  38. package/core/Notice/component.css +4 -7
  39. package/core/Notice/component.js +1 -1
  40. package/core/SignOutLink/component.js +1 -1
  41. package/core/Slider/component.css +4 -7
  42. package/core/Slider/component.js +1 -1
  43. package/core/Table/Table.js +1 -0
  44. package/core/Table/TableCell.js +1 -0
  45. package/core/Table/TableRow.js +1 -0
  46. package/core/Table/index.js +1 -0
  47. package/core/Table/stories/data.js +1 -0
  48. package/core/Tooltip/component.js +1 -0
  49. package/core/css.js +1 -0
  50. package/core/dom-query.js +1 -0
  51. package/core/hubspot-chat-toggle.js +1 -0
  52. package/core/icons/discord.svg +10 -0
  53. package/core/icons/facebook.svg +4 -0
  54. package/core/icons/github.svg +3 -0
  55. package/core/icons/glassdoor.svg +3 -0
  56. package/core/icons/google.svg +3 -0
  57. package/core/icons/icon-display-48hrs.svg +3 -0
  58. package/core/icons/icon-display-about-ably-col.svg +4 -0
  59. package/core/icons/icon-display-api-keys.svg +3 -0
  60. package/core/icons/icon-display-api.svg +3 -0
  61. package/core/icons/icon-display-asset-tracking-col.svg +18 -0
  62. package/core/icons/icon-display-browser.svg +10 -0
  63. package/core/icons/icon-display-calendar.svg +3 -0
  64. package/core/icons/icon-display-call-mobile.svg +3 -0
  65. package/core/icons/icon-display-careers-col.svg +9 -0
  66. package/core/icons/icon-display-case-studies-col.svg +5 -0
  67. package/core/icons/icon-display-chat-col.svg +4 -0
  68. package/core/icons/icon-display-chat-stack-col.svg +4 -0
  69. package/core/icons/icon-display-chat-stack.svg +4 -0
  70. package/core/icons/icon-display-cloud-servers.svg +3 -0
  71. package/core/icons/icon-display-compare-tech-col.svg +9 -0
  72. package/core/icons/icon-display-customers-col.svg +15 -0
  73. package/core/icons/icon-display-data-broadcast-col.svg +26 -0
  74. package/core/icons/icon-display-data-synchronization-col.svg +14 -0
  75. package/core/icons/icon-display-docs-col.svg +7 -0
  76. package/core/icons/icon-display-documentation.svg +3 -0
  77. package/core/icons/icon-display-events-col.svg +13 -0
  78. package/core/icons/icon-display-examples-col.svg +11 -0
  79. package/core/icons/icon-display-gdpr.svg +3 -0
  80. package/core/icons/icon-display-general-comms.svg +3 -0
  81. package/core/icons/icon-display-hipaa.svg +10 -0
  82. package/core/icons/icon-display-integrations-col.svg +8 -0
  83. package/core/icons/icon-display-it-support-access.svg +3 -0
  84. package/core/icons/icon-display-it-support-helpdesk.svg +3 -0
  85. package/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
  86. package/core/icons/icon-display-laptop.svg +10 -0
  87. package/core/icons/icon-display-lightbulb-col.svg +10 -0
  88. package/core/icons/icon-display-live-chat.svg +3 -0
  89. package/core/icons/icon-display-map-pin.svg +3 -0
  90. package/core/icons/icon-display-message.svg +3 -0
  91. package/core/icons/icon-display-padlock-closed.svg +3 -0
  92. package/core/icons/icon-display-platform.svg +22 -0
  93. package/core/icons/icon-display-play.svg +3 -0
  94. package/core/icons/icon-display-privacy-shield-framework.svg +7 -0
  95. package/core/icons/icon-display-push-notifications-col.svg +6 -0
  96. package/core/icons/icon-display-quickstart-guides-col.svg +8 -0
  97. package/core/icons/icon-display-resources-col.svg +21 -0
  98. package/core/icons/icon-display-sdks-col.svg +11 -0
  99. package/core/icons/icon-display-servers.svg +3 -0
  100. package/core/icons/icon-display-shopping-cart.svg +10 -0
  101. package/core/icons/icon-display-sla.svg +3 -0
  102. package/core/icons/icon-display-soc2-type2.svg +3 -0
  103. package/core/icons/icon-display-tech-account-comms.svg +3 -0
  104. package/core/icons/icon-display-tutorials-demos-col.svg +25 -0
  105. package/core/icons/icon-display-virtual-events-col.svg +12 -0
  106. package/core/icons/icon-display-virtual-events.svg +12 -0
  107. package/core/icons/icon-gui-ably-badge.svg +3 -0
  108. package/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +3 -0
  109. package/core/icons/icon-gui-arrow-bidirectional-vertical.svg +3 -0
  110. package/core/icons/icon-gui-arrow-down.svg +3 -0
  111. package/core/icons/icon-gui-arrow-left.svg +3 -0
  112. package/core/icons/icon-gui-arrow-right.svg +3 -0
  113. package/core/icons/icon-gui-arrow-up.svg +3 -0
  114. package/core/icons/icon-gui-burger-menu.svg +5 -0
  115. package/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
  116. package/core/icons/icon-gui-check-circled-fill.svg +4 -0
  117. package/core/icons/icon-gui-check-circled.svg +3 -0
  118. package/core/icons/icon-gui-checklist-checked.svg +3 -0
  119. package/core/icons/icon-gui-clock.svg +3 -0
  120. package/core/icons/icon-gui-close.svg +3 -0
  121. package/core/icons/icon-gui-copy.svg +10 -0
  122. package/core/icons/icon-gui-cross-circled-fill.svg +4 -0
  123. package/core/icons/icon-gui-cross-circled.svg +3 -0
  124. package/core/icons/icon-gui-dash-circled.svg +3 -0
  125. package/core/icons/icon-gui-disclosure-arrow.svg +3 -0
  126. package/core/icons/icon-gui-document-generic.svg +3 -0
  127. package/core/icons/icon-gui-enlarge.svg +3 -0
  128. package/core/icons/icon-gui-external-link.svg +3 -0
  129. package/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
  130. package/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
  131. package/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
  132. package/core/icons/icon-gui-history.svg +3 -0
  133. package/core/icons/icon-gui-info.svg +3 -0
  134. package/core/icons/icon-gui-link-arrow.svg +3 -0
  135. package/core/icons/icon-gui-link.svg +4 -0
  136. package/core/icons/icon-gui-live-chat.svg +3 -0
  137. package/core/icons/icon-gui-minus.svg +3 -0
  138. package/core/icons/icon-gui-plus.svg +3 -0
  139. package/core/icons/icon-gui-quote-marks-solid.svg +3 -0
  140. package/core/icons/icon-gui-refresh.svg +10 -0
  141. package/core/icons/icon-gui-resources.svg +3 -0
  142. package/core/icons/icon-gui-search.svg +3 -0
  143. package/core/icons/icon-gui-tick.svg +3 -0
  144. package/core/icons/icon-gui-warning.svg +5 -0
  145. package/core/icons/icon-live-updates-results-metrics-col.svg +26 -0
  146. package/core/icons/icon-multi-user-spaces-col.svg +13 -0
  147. package/core/icons/icon-social-x.svg +3 -0
  148. package/core/icons/icon-tech-apachekafka.svg +3 -0
  149. package/core/icons/linkedin.svg +3 -0
  150. package/core/icons/quote.svg +3 -0
  151. package/core/icons/stackoverflow.svg +3 -0
  152. package/core/icons/twitter.svg +3 -0
  153. package/core/icons/youtube.svg +11 -0
  154. package/core/icons.js +1 -0
  155. package/core/load-sprites.js +1 -0
  156. package/core/react-renderer.js +1 -0
  157. package/core/remote-blogs-posts.js +1 -0
  158. package/core/remote-data-store.js +1 -0
  159. package/core/remote-data-util.js +1 -0
  160. package/core/remote-session-data.js +1 -0
  161. package/core/scripts.js +1 -2
  162. package/core/sprites.svg +1 -525
  163. package/core/styles/buttons.css +122 -0
  164. package/core/styles/forms.css +62 -0
  165. package/core/styles/layout.css +19 -0
  166. package/core/styles/properties.css +276 -0
  167. package/core/styles/text.css +166 -0
  168. package/core/styles.base.css +1 -0
  169. package/core/styles.components.css +33 -0
  170. package/core/styles.css +2 -699
  171. package/core/url-base.js +1 -0
  172. package/core/utils/syntax-highlighter-registry.js +1 -0
  173. package/core/utils/syntax-highlighter.css +67 -0
  174. package/core/utils/syntax-highlighter.js +1 -0
  175. package/package.json +39 -34
  176. package/reset/scripts.js +1 -1
  177. package/reset/styles/normalize.css +353 -0
  178. package/reset/styles/reset.css +129 -0
  179. package/reset/styles.css +2 -477
  180. package/src/core/Accordion/Accordion.stories.tsx +39 -0
  181. package/src/core/Accordion/component.tsx +147 -0
  182. package/src/core/Code/Code.stories.tsx +71 -0
  183. package/src/core/Code/component.tsx +45 -0
  184. package/src/core/ConnectStateWrapper/{component.jsx → component.tsx} +7 -3
  185. package/src/core/ContactFooter/ContactFooter.stories.tsx +11 -0
  186. package/src/core/ContactFooter/component.css +7 -9
  187. package/src/core/ContactFooter/component.tsx +92 -0
  188. package/src/core/CookieMessage/CookieMessage.stories.tsx +12 -0
  189. package/src/core/CookieMessage/component.css +10 -12
  190. package/src/core/CookieMessage/{component.jsx → component.tsx} +15 -10
  191. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +43 -0
  192. package/src/core/CustomerLogos/component.tsx +35 -0
  193. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +48 -0
  194. package/src/core/DropdownMenu/{component.jsx → component.tsx} +64 -36
  195. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +43 -0
  196. package/src/core/FeaturedLink/{component.jsx → component.tsx} +28 -17
  197. package/src/core/Flash/Flash.stories.tsx +37 -0
  198. package/src/core/Flash/component.css +19 -21
  199. package/src/core/Flash/{component.jsx → component.tsx} +78 -39
  200. package/src/core/Footer/Footer.stories.tsx +26 -0
  201. package/src/core/Footer/component.css +22 -24
  202. package/src/core/Footer/{component.jsx → component.tsx} +237 -70
  203. package/src/core/Icon/Icon.stories.tsx +150 -0
  204. package/src/core/Icon/component.tsx +26 -0
  205. package/src/core/Loader/Loader.stories.tsx +21 -0
  206. package/src/core/Loader/{component.jsx → component.tsx} +11 -8
  207. package/src/core/Logo/Logo.stories.tsx +12 -0
  208. package/src/core/Logo/component.tsx +29 -0
  209. package/src/core/Meganav/Meganav.stories.tsx +86 -0
  210. package/src/core/Meganav/component.css +103 -105
  211. package/src/core/Meganav/component.js +6 -7
  212. package/src/core/Meganav/component.tsx +228 -0
  213. package/src/core/MeganavBlogPostsList/{component.jsx → component.tsx} +15 -14
  214. package/src/core/MeganavContentCompany/{component.jsx → component.tsx} +82 -33
  215. package/src/core/MeganavContentDevelopers/{component.jsx → component.tsx} +98 -34
  216. package/src/core/MeganavContentProducts/component.tsx +165 -0
  217. package/src/core/MeganavContentUseCases/component.tsx +244 -0
  218. package/src/core/MeganavControl/{component.jsx → component.tsx} +18 -12
  219. package/src/core/MeganavControlMobileDropdown/{component.jsx → component.tsx} +3 -7
  220. package/src/core/MeganavControlMobilePanelClose/{component.jsx → component.tsx} +16 -9
  221. package/src/core/MeganavControlMobilePanelOpen/component.tsx +32 -0
  222. package/src/core/MeganavItemsDesktop/component.tsx +68 -0
  223. package/src/core/MeganavItemsMobile/component.tsx +197 -0
  224. package/src/core/MeganavItemsSignedIn/{component.jsx → component.tsx} +59 -23
  225. package/src/core/MeganavSearch/component.tsx +36 -0
  226. package/src/core/MeganavSearchAutocomplete/component.tsx +12 -0
  227. package/src/core/MeganavSearchPanel/component.tsx +52 -0
  228. package/src/core/MeganavSearchSuggestions/component.tsx +62 -0
  229. package/src/core/Notice/component.css +4 -6
  230. package/src/core/Notice/component.js +1 -1
  231. package/src/core/Notice/component.tsx +104 -0
  232. package/src/core/SignOutLink/component.tsx +51 -0
  233. package/src/core/Slider/Slider.stories.tsx +45 -0
  234. package/src/core/Slider/component.css +4 -6
  235. package/src/core/Slider/component.tsx +112 -0
  236. package/src/core/Table/Table.tsx +30 -0
  237. package/src/core/Table/TableCell.tsx +84 -0
  238. package/src/core/Table/TableRow.tsx +25 -0
  239. package/src/core/Table/index.ts +24 -0
  240. package/src/core/Table/stories/Table.stories.tsx +12 -0
  241. package/src/core/Table/stories/data.tsx +113 -0
  242. package/src/core/Tooltip/Tooltip.stories.tsx +27 -0
  243. package/src/core/Tooltip/component.tsx +60 -0
  244. package/src/core/icons.js +6 -0
  245. package/src/core/{react-renderer.js → react-renderer.tsx} +9 -7
  246. package/src/core/styles/buttons.css +121 -123
  247. package/src/core/styles/forms.css +49 -51
  248. package/src/core/styles/layout.css +14 -16
  249. package/src/core/styles/properties.css +250 -259
  250. package/src/core/styles/text.css +165 -167
  251. package/src/core/styles.components.css +22 -24
  252. package/src/core/utils/syntax-highlighter.css +55 -59
  253. package/src/pages/Buttons.mdx +121 -0
  254. package/src/pages/Chips.mdx +136 -0
  255. package/src/pages/Colour.mdx +23 -0
  256. package/src/pages/Forms.mdx +173 -0
  257. package/src/pages/Layout.mdx +58 -0
  258. package/src/pages/Typography.mdx +206 -0
  259. package/src/pages/utils.ts +70 -0
  260. package/tailwind.config.js +1 -7
  261. package/tailwind.extend.js +1 -1
  262. package/core/.gitignore +0 -1
  263. package/core/Code.jsx +0 -684
  264. package/core/CompanyAutocomplete/component.css +0 -46
  265. package/core/CompanyAutocomplete/component.js +0 -2
  266. package/core/CompanyAutocomplete/component.js.LICENSE.txt +0 -1
  267. package/core/ConnectStateWrapper.jsx +0 -222
  268. package/core/ContactFooter.jsx +0 -342
  269. package/core/CookieMessage.jsx +0 -204
  270. package/core/CustomerLogos.jsx +0 -144
  271. package/core/DropdownMenu.jsx +0 -313
  272. package/core/FeatureFooter/component.css +0 -13
  273. package/core/FeatureFooter/component.js +0 -1
  274. package/core/FeaturedLink.jsx +0 -236
  275. package/core/Flash.jsx +0 -622
  276. package/core/Footer.jsx +0 -587
  277. package/core/Icon.jsx +0 -152
  278. package/core/Loader.jsx +0 -154
  279. package/core/Logo.jsx +0 -147
  280. package/core/Meganav.jsx +0 -4146
  281. package/core/MeganavBlogPostsList/component.js.LICENSE.txt +0 -1
  282. package/core/MeganavBlogPostsList.jsx +0 -291
  283. package/core/MeganavContentCompany.jsx +0 -1053
  284. package/core/MeganavContentDevelopers.jsx +0 -334
  285. package/core/MeganavContentProducts.jsx +0 -368
  286. package/core/MeganavContentUseCases.jsx +0 -341
  287. package/core/MeganavControl.jsx +0 -199
  288. package/core/MeganavControlMobileDropdown.jsx +0 -197
  289. package/core/MeganavControlMobilePanelClose.jsx +0 -198
  290. package/core/MeganavControlMobilePanelOpen.jsx +0 -193
  291. package/core/MeganavItemsDesktop.jsx +0 -279
  292. package/core/MeganavItemsMobile.jsx +0 -684
  293. package/core/MeganavItemsSignedIn.jsx +0 -638
  294. package/core/MeganavSearch.jsx +0 -429
  295. package/core/MeganavSearchAutocomplete.jsx +0 -117
  296. package/core/MeganavSearchPanel.jsx +0 -381
  297. package/core/MeganavSearchSuggestions.jsx +0 -294
  298. package/core/Notice.jsx +0 -914
  299. package/core/Showcase/component.css +0 -31
  300. package/core/Showcase/component.js +0 -1
  301. package/core/Showcase.jsx +0 -17
  302. package/core/SignOutLink.jsx +0 -157
  303. package/core/Slider.jsx +0 -400
  304. package/core/Uptime/component.css +0 -128
  305. package/core/Uptime/component.js +0 -1
  306. package/core/Uptime.jsx +0 -890
  307. package/core/scripts.js.LICENSE.txt +0 -1
  308. package/preview/tmp/.keep +0 -0
  309. package/preview/tmp/pids/.keep +0 -0
  310. package/reset/.gitignore +0 -1
  311. package/src/core/Code/component.html.erb +0 -3
  312. package/src/core/Code/component.jsx +0 -31
  313. package/src/core/Code/component.rb +0 -12
  314. package/src/core/CompanyAutocomplete/component.css +0 -45
  315. package/src/core/CompanyAutocomplete/component.js +0 -204
  316. package/src/core/ContactFooter/component.html.erb +0 -32
  317. package/src/core/ContactFooter/component.jsx +0 -66
  318. package/src/core/ContactFooter/component.rb +0 -13
  319. package/src/core/CustomerLogos/component.html.erb +0 -9
  320. package/src/core/CustomerLogos/component.jsx +0 -28
  321. package/src/core/CustomerLogos/component.rb +0 -14
  322. package/src/core/FeatureFooter/component.css +0 -12
  323. package/src/core/FeatureFooter/component.html.erb +0 -54
  324. package/src/core/FeatureFooter/component.js +0 -7
  325. package/src/core/FeatureFooter/component.rb +0 -30
  326. package/src/core/FeaturedLink/component.html.erb +0 -15
  327. package/src/core/FeaturedLink/component.rb +0 -21
  328. package/src/core/Footer/component.html.erb +0 -256
  329. package/src/core/Footer/component.rb +0 -14
  330. package/src/core/Icon/component.html.erb +0 -3
  331. package/src/core/Icon/component.jsx +0 -19
  332. package/src/core/Icon/component.rb +0 -25
  333. package/src/core/Loader/component.html.erb +0 -18
  334. package/src/core/Loader/component.rb +0 -19
  335. package/src/core/Logo/component.html.erb +0 -3
  336. package/src/core/Logo/component.jsx +0 -20
  337. package/src/core/Logo/component.rb +0 -31
  338. package/src/core/Meganav/component.html.erb +0 -31
  339. package/src/core/Meganav/component.jsx +0 -123
  340. package/src/core/Meganav/component.rb +0 -60
  341. package/src/core/MeganavBlogPostsList/component.html.erb +0 -5
  342. package/src/core/MeganavBlogPostsList/component.rb +0 -13
  343. package/src/core/MeganavContentCompany/component.html.erb +0 -90
  344. package/src/core/MeganavContentCompany/component.rb +0 -14
  345. package/src/core/MeganavContentDevelopers/component.html.erb +0 -129
  346. package/src/core/MeganavContentDevelopers/component.rb +0 -13
  347. package/src/core/MeganavContentProducts/component.html.erb +0 -83
  348. package/src/core/MeganavContentProducts/component.jsx +0 -105
  349. package/src/core/MeganavContentProducts/component.rb +0 -14
  350. package/src/core/MeganavContentUseCases/component.html.erb +0 -135
  351. package/src/core/MeganavContentUseCases/component.jsx +0 -147
  352. package/src/core/MeganavContentUseCases/component.rb +0 -13
  353. package/src/core/MeganavControl/component.html.erb +0 -6
  354. package/src/core/MeganavControl/component.rb +0 -20
  355. package/src/core/MeganavControlMobileDropdown/component.html.erb +0 -7
  356. package/src/core/MeganavControlMobileDropdown/component.rb +0 -11
  357. package/src/core/MeganavControlMobilePanelClose/component.html.erb +0 -12
  358. package/src/core/MeganavControlMobilePanelClose/component.rb +0 -12
  359. package/src/core/MeganavControlMobilePanelOpen/component.html.erb +0 -7
  360. package/src/core/MeganavControlMobilePanelOpen/component.jsx +0 -25
  361. package/src/core/MeganavControlMobilePanelOpen/component.rb +0 -9
  362. package/src/core/MeganavItemsDesktop/component.html.erb +0 -17
  363. package/src/core/MeganavItemsDesktop/component.jsx +0 -49
  364. package/src/core/MeganavItemsDesktop/component.rb +0 -23
  365. package/src/core/MeganavItemsMobile/component.html.erb +0 -75
  366. package/src/core/MeganavItemsMobile/component.jsx +0 -137
  367. package/src/core/MeganavItemsMobile/component.rb +0 -21
  368. package/src/core/MeganavItemsSignedIn/component.html.erb +0 -53
  369. package/src/core/MeganavItemsSignedIn/component.rb +0 -33
  370. package/src/core/MeganavSearch/component.html.erb +0 -15
  371. package/src/core/MeganavSearch/component.jsx +0 -33
  372. package/src/core/MeganavSearch/component.rb +0 -13
  373. package/src/core/MeganavSearchAutocomplete/component.html.erb +0 -6
  374. package/src/core/MeganavSearchAutocomplete/component.jsx +0 -14
  375. package/src/core/MeganavSearchAutocomplete/component.rb +0 -6
  376. package/src/core/MeganavSearchPanel/component.html.erb +0 -22
  377. package/src/core/MeganavSearchPanel/component.jsx +0 -39
  378. package/src/core/MeganavSearchPanel/component.rb +0 -13
  379. package/src/core/MeganavSearchSuggestions/component.html.erb +0 -22
  380. package/src/core/MeganavSearchSuggestions/component.jsx +0 -49
  381. package/src/core/MeganavSearchSuggestions/component.rb +0 -18
  382. package/src/core/Notice/component.html.erb +0 -16
  383. package/src/core/Notice/component.jsx +0 -71
  384. package/src/core/Notice/component.rb +0 -29
  385. package/src/core/Showcase/component.css +0 -30
  386. package/src/core/Showcase/component.html.erb +0 -76
  387. package/src/core/Showcase/component.js +0 -180
  388. package/src/core/Showcase/component.jsx +0 -0
  389. package/src/core/Showcase/component.rb +0 -190
  390. package/src/core/SignOutLink/component.html.erb +0 -1
  391. package/src/core/SignOutLink/component.jsx +0 -32
  392. package/src/core/SignOutLink/component.rb +0 -17
  393. package/src/core/Slider/component.html.erb +0 -28
  394. package/src/core/Slider/component.jsx +0 -86
  395. package/src/core/Slider/component.rb +0 -38
  396. package/src/core/Uptime/component.css +0 -127
  397. package/src/core/Uptime/component.html.erb +0 -0
  398. package/src/core/Uptime/component.js +0 -1
  399. package/src/core/Uptime/component.jsx +0 -183
  400. package/src/core/Uptime/component.rb +0 -7
  401. package/src/core/core.rb +0 -81
  402. /package/{preview/log/.keep → src/core/Accordion/component.js} +0 -0
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- **_Note:_** some features are still in development and their documentation might be incomplete. Lookout for the ⚠️ icon.
2
-
3
1
  # ably-ui
4
2
 
5
3
  `ably-ui` is the of home of the Ably design system library ([https://ably-ui.herokuapp.com/](https://ably-ui.herokuapp.com/)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.
@@ -20,13 +18,13 @@ In some cases, this is impractical. Some components will be more specialized and
20
18
 
21
19
  ### Library structure
22
20
 
23
- The library is built out of modules, assets, JavaScript & ruby modules and components. A module is a container for all of those.
21
+ The library is built out of modules, assets, and JavaScript components. A module is a container for all of those.
24
22
 
25
- For example, the `core` module provides the most general elements one can build the “chrome” of a web-based interface — typography, colours, spacing (i.e., containers) etc. The components within the module support our most common needs to build that “chrome”, like navigation elements, footer, hero sections, code samples etc. Assets, JavaScript & ruby modules are all shared between the components in the module.
23
+ For example, the `core` module provides the most general elements one can build the “chrome” of a web-based interface — typography, colours, spacing (i.e., containers) etc. The components within the module support our most common needs to build that “chrome”, like navigation elements, footer, hero sections, code samples etc. Assets, and JavaScript are all shared between the components in the module.
26
24
 
27
25
  Components do not require assets directly — instead, it's up to the consumer to load the assets and pass them to the components. This ensures flexibility in terms of URLs.
28
26
 
29
- Each module, apart from components, exposes a `scripts.js`, `styles.css` and `MODULE_NAME.rb` files. `scripts.js` contains helper functions, `MODULE_NAME.rb` contains modules that components can include. `styles.css` contains CSS that does not belong to any module in particular.
27
+ Each module, apart from components, exposes a `scripts.js` and `styles.css`. `scripts.js` contains helper functions. `styles.css` contains CSS that does not belong to any module in particular.
30
28
 
31
29
  ### Installation
32
30
 
@@ -39,7 +37,7 @@ npm install @ably/ui
39
37
 
40
38
  # or
41
39
 
42
- yarn add @ably/ui
40
+ yarn add @ably/ui # Preferred
43
41
  ```
44
42
 
45
43
  To attach the imported JavaScript from the `Core` module to the `window` object:
@@ -121,24 +119,6 @@ Note that depending on the component, you might still need to include CSS & JS f
121
119
  import Meganav from "@ably/ui/core/Meganav";
122
120
  ```
123
121
 
124
- #### Importing ViewComponent (Rails) components
125
-
126
- To use `ably-ui` with [Ruby on Rails](https://rubyonrails.org/) add the `ably-ui` gem to your `Gemfile`:
127
-
128
- ```ruby
129
- gem 'ably-ui',
130
- '1.0.0',
131
- require: 'ably_ui'
132
- ```
133
-
134
- Components are exposed as [View Components](https://github.com/github/view_component) and should be available in any view:
135
-
136
- ```erb
137
- <%= render(AblyUi::Core::Meganav.new) %>
138
- ```
139
-
140
- Note that this loads neither CSS nor JS — these need to still be loaded by a bundler like webpack.
141
-
142
122
  ## Usage
143
123
 
144
124
  ### Icons
@@ -147,16 +127,10 @@ Putting SVG files inside a`src/MODULE_NAME/icons` folder will add them to a per-
147
127
 
148
128
  Usage with the `Icon` React component:
149
129
 
150
- ```jsx
130
+ ```tsx
151
131
  <Icon name="icon-display-live-chat" size="3rem" additionalCSS="block mb-16" />
152
132
  ```
153
133
 
154
- Usage with `Icon` VW component:
155
-
156
- ```rb
157
- <%= render(AblyUi::Core::Icon.new(name: "icon-gui-disclosure-arrow", size: "1rem", additional_css: "align-middle transform rotate-180 mr-4")) %>
158
- ```
159
-
160
134
  Usage without a component:
161
135
 
162
136
  ```html
@@ -168,7 +142,7 @@ Usage without a component:
168
142
 
169
143
  Usage without a component, in React, with hover states. Note the [group](https://tailwindcss.com/docs/hover-focus-and-other-states#group-hover) class:
170
144
 
171
- ```jsx
145
+ ```tsx
172
146
  <a
173
147
  href="{url}"
174
148
  className="text-gui-default hover:text-gui-hover focus:text-gui-focus group"
@@ -186,12 +160,6 @@ See https://ably-ui.herokuapp.com/components/icon for more details.
186
160
 
187
161
  Font assets are not included automagically but are part of the repo, together with an example of font-face file; see `src/core/fonts` for examples. Make sure to include the licence file declaration on usage.
188
162
 
189
- See `preview/app/javascript/styles/application.css` for an example when using webpacker/rails.
190
-
191
- #### Rails
192
-
193
- Because the gem directories are on the asset path (see [Importing ViewComponent (Rails) components](#user-content-importing-viewcomponent-rails-components) section), they will work with standard asset helpers (i.e., `asset_path`).
194
-
195
163
  ### Accessibility
196
164
 
197
165
  An important part of ably-ui is ensuring the produced UI is accessible to as wide range of users as possible. All components should adhere to at least AA accessibility standards. In most cases, this can be accomplished by following a few simple rules:
@@ -205,73 +173,19 @@ An important part of ably-ui is ensuring the produced UI is accessible to as wid
205
173
 
206
174
  ## Development
207
175
 
208
- The repository includes a “preview” app, which is serves both as a showcase and development environment.
209
-
210
- To use, first make sure you install dependencies both for the library and the “preview” app:
211
-
212
- ```bash
213
- yarn && bundle
214
- cd preview
215
- yarn && bundle
216
- ```
217
-
218
- Then, from the root of the repository, run:
219
-
220
- ```bash
221
- yarn dev
222
- ```
223
-
224
- This will run the app and use the published versions of the `ably-ui`, specified in `preview/Gemfile` and `preview/package.json` NPM package.
225
-
226
- ### Using the local ably-ui in the preview app
176
+ To visualise the assets in `ably-ui`, there is a Storybook instance, which serves as both a showcase and a development environment.
227
177
 
228
- It's possible to use the local version of ably-ui in the “preview” app. Enabling this, requires separate steps for the `npm` and `ruby` packages.
178
+ Firstly, ensure you have all of the required project dependencies by running `yarn` in the project root.
229
179
 
230
- For `npm`:
231
-
232
- ```bash
233
- # in the root directory
234
- yarn link
235
- # in the "preview" directory
236
- yarn link @ably/ui
237
- ```
180
+ Then, to run Storybook, run `yarn storybook` in the project root - it should open automatically in your browser.
238
181
 
239
- For `ruby`:
240
-
241
- In `preview/Gemfile` replace the Ably UI gem version number with `path: '../'` like this:
242
-
243
- ```bash
244
- # in preview
245
- gem 'ably-ui', path: '../', require: 'ably_ui'
246
- ```
247
-
248
- and run:
249
-
250
- ```bash
251
- # in preview
252
- bundle --no-cache
253
- ```
254
-
255
- Why not `bundle config set local.ably-ui ../`? Because that feature is built around the local gem being a separate repo, and works poorly with our config.
256
-
257
- A caveat of this approach is that the change `preview/Gemfile` should not be committed, as it will cause the remote app to not build.
258
-
259
- ### Using a deployed package of ably-ui in the preview app
260
-
261
- If at anytime you don't want to use the local NPM package and/or gems any more, you can do:
262
-
263
- ```bash
264
- # in "preview" directory
265
- yarn unlink @ably/ui
266
- ```
267
-
268
- Then change back `path` to source `source` in the `Gemfile`. If you need to update `Gemfile.lock` without installing gems, you can run `bundle lock`.
182
+ To build Storybook as if it was a statically built site (i.e. what it looks like when deployed), run `yarn build-storybook` from the project root, go to the generated directory with `cd preview`, and then run `npx http-server` (accepting the prompt to install that package if you haven't done already). The built site will be available at the listed local URL.
269
183
 
270
184
  #### Publishing pre-release packages for review apps
271
185
 
272
- Make sure you commit & push your work and remove the [development-specific config](#using-the-development-build-of-ably-ui-in-the-preview-app) before doing this.
186
+ Make sure you commit & push your work before doing this.
273
187
 
274
- You will need to authenticate with [npmjs](https://docs.npmjs.com/creating-and-viewing-access-tokens) and [Ruby Gems](https://guides.rubygems.org/api-key-scopes/) to publish.
188
+ You will need to authenticate with [npmjs](https://docs.npmjs.com/creating-and-viewing-access-tokens) to publish.
275
189
 
276
190
  After the above, you should have:
277
191
 
@@ -280,11 +194,6 @@ After the above, you should have:
280
194
  ```
281
195
  //registry.npmjs.org/:_authToken=${NPM_TOKEN}
282
196
  ```
283
- - a `~/.gem/credentials` file that has your Rubygems API key:
284
- ```
285
- ---
286
- :rubygems_api_key: REPLACE_THIS_WITH_YOUR_OWN_API_KEY
287
- ```
288
197
 
289
198
  To deploy a review app with your in-progress code, you can use the `pre-release` script:
290
199
 
@@ -298,11 +207,10 @@ This script is a combination of two scripts:
298
207
  1. Pre-Release:
299
208
 
300
209
  - update your local dependencies for ably-ui and run a production build
301
- - release a gem and a NPM package with the version built from your current SemVer but adding a pre-release tag based on a short SHA of your HEAD commit
210
+ - release an NPM package with the version built from your current SemVer but adding a pre-release tag based on a short SHA of your HEAD commit
302
211
 
303
212
  2. Update Pre-Release Version:
304
213
 
305
- - update the preview app
306
214
  - commit all the above and push to origin
307
215
 
308
216
  This will trigger a build of the review app.
@@ -318,8 +226,7 @@ All components live in `src` and follow a directory and filename convention:
318
226
  - component directory (TitleCase)
319
227
  - `component.js` - this is the entry file for a component and is the only required file
320
228
  - `components.css` - additional CSS
321
- - for ruby components, you need `component.rb` and `component.html.erb`
322
- - for react, `components.jsx`
229
+ - for react, `components.tsx`
323
230
 
324
231
  For example:
325
232
 
@@ -328,11 +235,9 @@ For example:
328
235
  - script.js
329
236
  - styles.css
330
237
  - Accordion
331
- - component.rb
332
- - component.html.erb
333
238
  - component.js
334
239
  - component.css
335
- - component.jsx
240
+ - component.tsx
336
241
  ```
337
242
 
338
243
  #### CSS
@@ -345,50 +250,19 @@ If using positioning any other than static, be mindful of creating stacking cont
345
250
 
346
251
  By default, [Prettier](https://prettier.io/) & [ESLint](https://eslint.org/) will handle most of the frontend files. You can use them through your editor (which should pick up the relevant config files) or on the command line (see `scripts` in package.json).
347
252
 
348
- Neither handles `erb` and `rb` files. The only config for those files is at the moment in `editorconfig`.
349
-
350
- #### Note
351
-
352
- Until we have set up formatting scripts for `erb` it's worth setting up [htmlbeautifier](https://github.com/threedaymonk/htmlbeautifier) for your editor (for example with https://github.com/aliariff/vscode-erb-beautify if you use VS Code) and tracking [this issue in Prettier](https://github.com/prettier/plugin-ruby/issues/371), as Prettier is much faster and hopefully will get support for `erb`.
353
-
354
253
  ### Adding a new component
355
254
 
356
255
  #### To add a new component:
357
256
 
358
- 1. Add it in `modules-config.js`
359
- 2. Create a folder in `src`, in the module of your choice. The folder name should be TitleCase.
360
- 3. Add a `component.js`
257
+ 1. Create a folder in `src`, in the module of your choice (i.e. `core`). The folder name should be TitleCase.
258
+ 2. Add a `component.tsx`
361
259
 
362
- - if the component has custom CSS, add a `component.css` file as well. Add `@layer components {}` to its contents. Import the CSS file in `component.js`
363
- - if you need a VW component, add `component.rb` and `component.html.erb`
364
- - if you need a React component, add a `components.jsx`
260
+ - also add an empty `component.js` file (current legacy requirement)
261
+ - if the component has custom CSS, add a `component.css` file as well.
365
262
 
366
- #### To see this component in the preview app:
263
+ #### To see this component in Storybook:
367
264
 
368
- ##### For React components:
369
-
370
- 1. Import the file into `preview/app/javascript/packs/application.js` and add as input to the `reactRenderer`
371
- 2. If it contains custom CSS, import it into `preview/app/javascript/styles/application.css`
372
- 3. Add a template in `preview/app/views/components`, with a `_react` suffix, i.e. `my_component_react.html.erb`
373
-
374
- ##### For VW components:
375
-
376
- 1. You will need to restart the server for Rails to load the component (this will also need to happen after any changes to `component.rb`)
377
- 1. If it contains custom CSS, import it into `preview/app/javascript/styles/application.css`
378
- 1. Add a template in `preview/app/views/components`, with a `_vw` suffix, i.e. `my_component_vw.html.erb`
379
- 1. If the component has any JavaScript, import it in the view (`preview/app/views/components/my_component_vw.html.erb`) and initialize:
380
-
381
- ```rb
382
- <% content_for :component do %>
383
- <%= javascript_include_tag 'ably_ui/core/my_component/component' %>
384
- <script type="text/javascript">
385
- document.addEventListener("DOMContentLoaded", () => {
386
- const container = document.querySelector("[data-id=my_component]");
387
- AblyUI.Core.MyComponent(container);
388
- });
389
- </script>
390
- <% end %>
391
- ```
265
+ Create a `[COMPONENT_NAME].stories.tsx` file alongside your `component` assets, following the examples of other Storybook stories, or their online documentation for guidance. When running Storybook, the story should be picked up and rendered in place automatically.
392
266
 
393
267
  ### Publishing
394
268
 
@@ -396,13 +270,13 @@ We use [Semantic Versioning 2.0.0](https://semver.org/) to version different lib
396
270
 
397
271
  Packages are published to the [GitHub private registry](https://github.com/features/packages).
398
272
 
399
- Publishing is done by tagging a release in GitHub. This triggers a GitHub action that pushes to the private NPM and gem registries as well as publishing new artefacts in the CDN, with the version taken from the tag of the GitHub release. ⚠️
273
+ Publishing is done by tagging a release in GitHub. This triggers a GitHub action that pushes to the private NPM registry as well as publishing new artefacts in the CDN, with the version taken from the tag of the GitHub release.
400
274
 
401
275
  This will trigger GitHub actions in supported apps (currently [Voltaire](http://github.com/ably/voltaire) & [Website](http://github.com/ably/website)) to create a PR with an ably-ui version update.
402
276
 
403
277
  **To trigger a release:**
404
278
 
405
- - Make sure you have run pre-release script `./pre-release.sh` (This updates the gem and the npm package version for ably-ui in the following files `Gemfile`, `package.json`, `version.rb`).
279
+ - Make sure you have run pre-release script `./pre-release.sh` (This updates the npm package version for ably-ui in `package.json`).
406
280
  - Merge your PR into `main` after it has been approved.
407
281
  - On the Github [Ably-UI](http://github.com/ably/ably-ui) repo, [create a new release](https://github.com/ably/ably-ui/releases/new) tag.
408
282
  - Create a new tag with the new version number for the release.
@@ -411,10 +285,9 @@ This will trigger GitHub actions in supported apps (currently [Voltaire](http://
411
285
  - Click on the Autogenerate release notes button.
412
286
  - Publish Release.
413
287
  - Check the Github `Actions` tab in the repo to make sure the release is green.
288
+ - Upon successful release, a compiled version of the Storybook site will be deployed to Github Pages.
414
289
 
415
- This will release the packages, update library & preview app and create & push the commit & tag, and also create corresponding PRs in Voltaire & Website.
416
-
417
- _Note: If the version number of the gem has been yanked you will need to increment the version number._
290
+ This will release the packages and update library and create & push the commit & tag, and also create corresponding PRs in Voltaire & Website. It will also deploy a new Storybook site to [https://ably.github.io/ably-ui/](https://ably.github.io/ably-ui/).
418
291
 
419
292
  ### Running tests
420
293
 
@@ -0,0 +1 @@
1
+ function _array_like_to_array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _iterable_to_array(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _iterable_to_array_limit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}import React,{useState}from"react";import Icon from"../Icon/component.tsx";var AccordionRow=function(param){var name=param.name,children=param.children,index=param.index,setActiveIndex=param.setActiveIndex,active=param.active,topBorder=param.topBorder,bottomBorder=param.bottomBorder,last=param.last,arrowIcon=param.arrowIcon;var iconActive,iconInactive;var handleSetIndex=function(){setActiveIndex(index)};if(arrowIcon){iconActive=React.createElement(Icon,{name:"icon-gui-disclosure-arrow",color:"text-dark-grey",size:"1.5rem",additionalCSS:"-rotate-90"});iconInactive=React.createElement(Icon,{name:"icon-gui-disclosure-arrow",color:"text-dark-grey",size:"1.5rem",additionalCSS:"rotate-90"})}else{iconActive=React.createElement(Icon,{name:"icon-gui-minus",color:"text-dark-grey",size:"1.5rem"});iconInactive=React.createElement(Icon,{name:"icon-gui-plus",color:"text-dark-grey",size:"1.5rem"})}return React.createElement("div",{className:"border-mid-grey ".concat(last&&!bottomBorder?"":"border-b"," ").concat(topBorder?"border-t":"")},React.createElement("button",{type:"button",onClick:handleSetIndex,className:"flex w-full px-0 focus:outline-none py-20"},React.createElement("span",{className:"ui-text-p1 font-bold text-left mr-8"},name),React.createElement("span",{className:"ml-auto"},active?iconActive:iconInactive)),React.createElement("section",{className:"ui-text-p2 transition-all overflow-hidden",style:{maxHeight:active?"500px":"0",paddingBottom:active?"1.5rem":"0"}},children))};var Accordion=function(param){var data=param.data,_param_id=param.id,id=_param_id===void 0?"id-accordion":_param_id,topBorder=param.topBorder,bottomBorder=param.bottomBorder,arrowIcon=param.arrowIcon,autoClose=param.autoClose;var _useState=_sliced_to_array(useState([]),2),activeIndexes=_useState[0],setActiveIndexes=_useState[1];var handleSetIndex=function(index){var currentIndexIsActive=activeIndexes.includes(index);if(autoClose){setActiveIndexes(currentIndexIsActive?[]:[index])}else{setActiveIndexes(currentIndexIsActive?activeIndexes.filter(function(i){return i!==index}):_to_consumable_array(activeIndexes).concat([index]))}};return React.createElement("div",{className:"ui-grid-mx max-w-screen-sm sm:mx-auto",id:id},data.map(function(item,currentIndex){return React.createElement(AccordionRow,{key:item.name,name:item.name,arrowIcon:arrowIcon,index:currentIndex,last:data.length===currentIndex+1,topBorder:topBorder&&currentIndex===0,bottomBorder:bottomBorder&&data.length===currentIndex+1,active:activeIndexes.includes(currentIndex),setActiveIndex:handleSetIndex},item.content)}))};export default Accordion;
@@ -1,72 +1 @@
1
- @layer base {
2
- @import url("https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,600;0,700;1,600;1,700&display=swap");
3
- @import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@100;200;300;400;500;600;700;800&display=swap");
4
- @import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200;300;400;500;600;700;800&display=swap");
5
- }
6
-
7
- @layer components {
8
- .hljs {
9
- background: var(--syntax-black);
10
- color: var(--syntax-light-grey);
11
- }
12
-
13
- .hljs-emphasis {
14
- @apply italic;
15
- }
16
-
17
- .hljs-strong {
18
- @apply font-bold;
19
- }
20
-
21
- .hljs-comment,
22
- .hljs-quote {
23
- color: var(--syntax-dark-grey);
24
- }
25
-
26
- .hljs-variable,
27
- .hljs-template-variable,
28
- .hljs-tag,
29
- .hljs-name,
30
- .hljs-selector-id,
31
- .hljs-selector-class,
32
- .hljs-regexp,
33
- .hljs-deletion {
34
- color: var(--syntax-red);
35
- }
36
-
37
- .hljs-number,
38
- .hljs-built_in,
39
- .hljs-literal,
40
- .hljs-type,
41
- .hljs-params,
42
- .hljs-meta,
43
- .hljs-link {
44
- color: var(--syntax-orange);
45
- }
46
-
47
- .hljs-attribute {
48
- color: var(--syntax-yellow);
49
- }
50
-
51
- .hljs-string,
52
- .hljs-symbol,
53
- .hljs-bullet,
54
- .hljs-addition {
55
- color: var(--syntax-green);
56
- }
57
-
58
- .hljs-title,
59
- .hljs-section {
60
- color: var(--syntax-blue);
61
- }
62
-
63
- .hljs-keyword,
64
- .hljs-selector-tag {
65
- color: var(--syntax-lilac);
66
- }
67
-
68
- .hljs-subst {
69
- color: var(--syntax-mid-grey);
70
- }
71
- }
72
-
1
+ @import "../utils/syntax-highlighter.css";
@@ -1 +1 @@
1
- !function(e,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(require("highlight.js/lib/core"),require("highlight.js/lib/languages/bash"),require("highlight.js/lib/languages/cpp"),require("highlight.js/lib/languages/csharp"),require("highlight.js/lib/languages/css"),require("highlight.js/lib/languages/dart"),require("highlight.js/lib/languages/diff"),require("highlight.js/lib/languages/dos"),require("highlight.js/lib/languages/elixir"),require("highlight.js/lib/languages/erlang"),require("highlight.js/lib/languages/go"),require("highlight.js/lib/languages/http"),require("highlight.js/lib/languages/java"),require("highlight.js/lib/languages/javascript"),require("highlight.js/lib/languages/json"),require("highlight.js/lib/languages/kotlin"),require("highlight.js/lib/languages/objectivec"),require("highlight.js/lib/languages/php"),require("highlight.js/lib/languages/plaintext"),require("highlight.js/lib/languages/python"),require("highlight.js/lib/languages/ruby"),require("highlight.js/lib/languages/sql"),require("highlight.js/lib/languages/swift"),require("highlight.js/lib/languages/typescript"),require("highlight.js/lib/languages/xml"),require("highlight.js/lib/languages/yaml"),require("highlightjs-curl/src/languages/curl")):"function"==typeof define&&define.amd?define([,,,,,,,,,,,,,,,,,,,,,,,,,,],i):"object"==typeof exports?exports.AblyUi=i(require("highlight.js/lib/core"),require("highlight.js/lib/languages/bash"),require("highlight.js/lib/languages/cpp"),require("highlight.js/lib/languages/csharp"),require("highlight.js/lib/languages/css"),require("highlight.js/lib/languages/dart"),require("highlight.js/lib/languages/diff"),require("highlight.js/lib/languages/dos"),require("highlight.js/lib/languages/elixir"),require("highlight.js/lib/languages/erlang"),require("highlight.js/lib/languages/go"),require("highlight.js/lib/languages/http"),require("highlight.js/lib/languages/java"),require("highlight.js/lib/languages/javascript"),require("highlight.js/lib/languages/json"),require("highlight.js/lib/languages/kotlin"),require("highlight.js/lib/languages/objectivec"),require("highlight.js/lib/languages/php"),require("highlight.js/lib/languages/plaintext"),require("highlight.js/lib/languages/python"),require("highlight.js/lib/languages/ruby"),require("highlight.js/lib/languages/sql"),require("highlight.js/lib/languages/swift"),require("highlight.js/lib/languages/typescript"),require("highlight.js/lib/languages/xml"),require("highlight.js/lib/languages/yaml"),require("highlightjs-curl/src/languages/curl")):(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Code=i(e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0],e[void 0]))}(this,((e,i,l,a,r,g,s,t,h,u,o,n,b,c,d,p,j,y,q,v,x,k,m,f,S,L,w)=>(()=>{"use strict";var C={9302:i=>{i.exports=e},497:e=>{e.exports=i},6736:e=>{e.exports=l},4260:e=>{e.exports=a},7892:e=>{e.exports=r},8673:e=>{e.exports=g},3523:e=>{e.exports=s},9857:e=>{e.exports=t},2870:e=>{e.exports=h},5964:e=>{e.exports=u},3345:e=>{e.exports=o},132:e=>{e.exports=n},314:e=>{e.exports=b},6257:e=>{e.exports=c},5114:e=>{e.exports=d},6482:e=>{e.exports=p},2519:e=>{e.exports=j},1703:e=>{e.exports=y},7420:e=>{e.exports=q},6941:e=>{e.exports=v},7684:e=>{e.exports=x},5501:e=>{e.exports=k},5098:e=>{e.exports=m},9937:e=>{e.exports=f},6630:e=>{e.exports=S},1469:e=>{e.exports=L},8488:e=>{e.exports=w}},M={};function A(e){var i=M[e];if(void 0!==i)return i.exports;var l=M[e]={exports:{}};return C[e](l,l.exports,A),l.exports}A.n=e=>{var i=e&&e.__esModule?()=>e.default:()=>e;return A.d(i,{a:i}),i},A.d=(e,i)=>{for(var l in i)A.o(i,l)&&!A.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:i[l]})},A.o=(e,i)=>Object.prototype.hasOwnProperty.call(e,i);var T={};return(()=>{A.d(T,{default:()=>le});var e=A(9302),i=A.n(e),l=A(497),a=A.n(l),r=A(6736),g=A.n(r),s=A(4260),t=A.n(s),h=A(7892),u=A.n(h),o=A(8673),n=A.n(o),b=A(9857),c=A.n(b),d=A(3523),p=A.n(d),j=A(5964),y=A.n(j),q=A(2870),v=A.n(q),x=A(7420),k=A.n(x),m=A(3345),f=A.n(m),S=A(132),L=A.n(S),w=A(314),C=A.n(w),M=A(6257),U=A.n(M),H=A(9937),O=A.n(H),P=A(5114),D=A.n(P),E=A(2519),J=A.n(E),N=A(1703),R=A.n(N),_=A(6941),G=A.n(_),K=A(7684),Q=A.n(K),X=A(5098),Y=A.n(X),z=A(6482),B=A.n(z),F=A(5501),I=A.n(F),V=A(6630),W=A.n(V),Z=A(1469),$=A.n(Z),ee=A(8488),ie=A.n(ee);[{label:"Text",key:"text",module:k()},{label:"JS",key:"javascript",module:U()},{label:"TS",key:"typescript",module:O()},{label:"Java",key:"java",module:C()},{label:"Ruby",key:"ruby",module:Q()},{label:"Python",key:"python",module:G()},{label:"PHP",key:"php",module:R()},{label:"Shell",key:"bash",module:a()},{label:"C#",key:"cs",module:t()},{label:"CSS",key:"css",module:u()},{label:"Go",key:"go",module:f()},{label:"HTML",key:"xml",module:W()},{label:"HTTP",key:"http",module:L()},{label:"C++",key:"cpp",module:g()},{label:"Dart",key:"dart",module:n()},{label:"Swift",key:"swift",module:Y()},{label:"Kotlin",key:"kotlin",module:B()},{label:"Objective C",key:"objectivec",module:J()},{label:"Node.js",key:"javascript",module:U()},{label:"JSON",key:"json",module:D()},{label:"DOS",key:"dos",module:c()},{label:"YAML",key:"yaml",module:$()},{label:"Erlang",key:"erlang",module:y()},{label:"Elixir",key:"elixir",module:v()},{label:"Diff",key:"diff",module:p()},{label:"SQL",key:"sql",module:I()},{label:"cURL",key:"curl",module:ie()},{label:"HTML",key:"html",module:W()},{label:"XML",key:"xml",module:W()}].forEach((function(e){var l=e.key,a=e.module;return i().registerLanguage(l,a)}));const le=function(e){if(!e)throw"Missing code element";var l=e.querySelector("pre"),a=e.querySelector("code"),r=l.getAttribute("lang");if(!a||!l||!r)throw"Malformed code element";var g=function(e,l){var a=function(e){var i;switch(e||(e="text"),e.toLowerCase()){case"android":i="java";break;case".net":case"net":case"dotnet":case"csharp":case"c#":i="cs";break;case"objc":case"objective c":i="objectivec";break;case"laravel":i="php";break;case"flutter":i="dart";break;case"node.js":case"js":i="javascript";break;case"ts":i="typescript";break;case"kotlin":case"kt":i="kotlin";break;case"shell":case"fh":case"sh":i="bash";break;case"https":case"http":case"txt":case"plaintext":i="text";break;case"cmd":case"bat":i="dos";break;case"yml":i="yaml";break;case"erl":i="erlang";break;case"patch":i="diff";break;case"svg":i="xml"}return i||e}(e);if("string"==typeof l&&l&&a)return i().highlight(l,{language:a}).value}(r,a.innerHTML);a.innerHTML=g}})(),T.default})()));
1
+ import React from"react";import"../utils/syntax-highlighter.css";import{highlightSnippet,registerDefaultLanguages}from"../utils/syntax-highlighter";import languagesRegistry from"../utils/syntax-highlighter-registry";registerDefaultLanguages(languagesRegistry);var Code=function(param){var language=param.language,snippet=param.snippet,_param_textSize=param.textSize,textSize=_param_textSize===void 0?"ui-text-code":_param_textSize,_param_padding=param.padding,padding=_param_padding===void 0?"p-32":_param_padding,_param_additionalCSS=param.additionalCSS,additionalCSS=_param_additionalCSS===void 0?"":_param_additionalCSS;var _highlightSnippet;var HTMLraw=(_highlightSnippet=highlightSnippet(language,"".concat(snippet).trim()))!==null&&_highlightSnippet!==void 0?_highlightSnippet:"";var className="language-".concat(language," ").concat(textSize);return React.createElement("div",{className:"hljs overflow-auto ".concat(padding," ").concat(additionalCSS),"data-id":"code"},React.createElement("pre",{lang:language},React.createElement("code",{className:className,dangerouslySetInnerHTML:{__html:HTMLraw}})))};export default Code;
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.ConnectStateWrapper=o())}(this,(()=>({}.default)));
1
+ function _array_like_to_array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _iterable_to_array_limit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==="function"){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))}ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})}keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){source=source!=null?source:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}import React,{useEffect,useState}from"react";import{connectState,getRemoteDataStore}from"../remote-data-store";var ConnectStateWrapper=function(Component,selectors){var _useState=_sliced_to_array(useState({}),2),state=_useState[0],setState=_useState[1];var setStateForKey=function(key){return function(storeState){return setState(function(){return _define_property({},key,storeState)})}};useEffect(function(){var store=getRemoteDataStore();var resolvedState=Object.keys(selectors).reduce(function(acc,key){return _object_spread_props(_object_spread({},acc),_define_property({},key,selectors[key](store)))},{});setState(resolvedState);Object.keys(selectors).forEach(function(key){connectState(selectors[key],setStateForKey(key))})},[]);var WrappedComponent=function(props){return React.createElement(Component,_object_spread({},props,state))};return WrappedComponent};export default ConnectStateWrapper;
@@ -1,12 +1,9 @@
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
- }
1
+ .ui-contact-footer {
2
+ background-size: 100% 100%;
3
+ background-position: right center;
4
+ @apply w-full bg-gradient-active-orange;
11
5
  }
12
6
 
7
+ .ui-contact-footer-box {
8
+ @apply p-24 sm:p-32 xl:p-40 bg-white flex flex-col justify-between rounded-sm;
9
+ }
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AblyUi=t():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.ContactFooter=t())}(this,(()=>(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{default:()=>r});var o=function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:document).querySelector("[data-id=".concat(e,"]"))};function n(e,t){e.disabled=!0,e.innerText=t}var i=30;const r=function(){return function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).dataId,t=o(e),r=o("open-chat-widget",t),a=r.dataset.enabledLabel,d=r.dataset.disabledLabel;if(e&&t){var c,u=o("open-chat-widget",t);return n(u,d),function e(t){var o,n,r,d,l=null===(o=window)||void 0===o||null===(n=o.HubSpotConversations)||void 0===n?void 0:n.widget,f=document.querySelector("#hubspot-messages-iframe-container");c=function(e){e.preventDefault(),l.open()},l&&f?(u.addEventListener("click",c),d=a,(r=u).disabled=!1,r.innerText=d):--i&&setTimeout((function(){return e(100)}),t)}(0),function(){n(u,d),u.removeEventListener("click",c)}}}({dataId:"contact-footer"})};return t.default})()));
1
+ import React,{useEffect}from"react";import Icon from"../Icon/component.tsx";import _absUrl from"../url-base.js";import toggleChatWidget from"../hubspot-chat-toggle";import"./component.css";var ContactFooter=function(param){var urlBase=param.urlBase;useEffect(function(){return toggleChatWidget({dataId:"contact-footer"})},[]);var absUrl=function(path){return _absUrl(path,urlBase)};return React.createElement("div",{className:"ui-contact-footer font-sans antialiased","data-id":"contact-footer"},React.createElement("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"},React.createElement("div",{className:"ui-contact-footer-box"},React.createElement(Icon,{name:"icon-display-live-chat",size:"3rem",additionalCSS:"block mb-16"}),React.createElement("div",null,React.createElement("div",{className:"ui-text-h3 mb-24"},"Live Chat"),React.createElement("p",{className:"ui-text-p1"},"Reach out team of experts over chat powered by Ably.")),React.createElement("button",{type:"button",className:"ui-btn-secondary self-start mt-16",disabled:true,"data-id":"open-chat-widget","data-enabled-label":"Start a live chat","data-disabled-label":"Live chat unavailable"},"Live chat unavailable")),React.createElement("div",{className:"ui-contact-footer-box"},React.createElement(Icon,{name:"icon-display-call-mobile",size:"3rem",additionalCSS:"block mb-16"}),React.createElement("div",{className:"flex-grow"},React.createElement("div",{className:"ui-text-h3 mb-24"},"Call us"),React.createElement("p",{className:"ui-text-p1"},React.createElement("span",{className:"block"},React.createElement("strong",{className:"font-bold"},"+1 877 434 5287")," (USA, toll free)"),React.createElement("span",{className:"block"},React.createElement("strong",{className:"font-bold"},"+44 20 3318 4689")," (UK)")))),React.createElement("div",{className:"ui-contact-footer-box"},React.createElement(Icon,{name:"icon-display-tech-account-comms",size:"3rem",additionalCSS:"block mb-16"}),React.createElement("div",null,React.createElement("div",{className:"ui-text-h3 mb-24"},"Technical and account support"),React.createElement("p",{className:"ui-text-p1"},"We're standing by to help with any questions or code.")),React.createElement("a",{className:"ui-btn-secondary self-start p-btn mt-16",href:absUrl("/support")},"Get support now"))))};export default ContactFooter;
@@ -1,14 +1,11 @@
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: bottom 250ms ease-out, opacity 150ms ease-out;
12
- }
1
+ .ui-cookie-message {
2
+ @apply rounded-lg bg-white font-sans;
3
+ @apply justify-between items-center;
4
+ @apply opacity-100 z-50 bottom-0 fixed sm:flex;
5
+ @apply p-16 mb-16 ml-16;
6
+ max-width: 70vw;
7
+ box-shadow: 0px 24px 32px 0px #0000000d;
8
+ border: 1px solid var(--color-mid-grey);
9
+ border-left: 0.5rem solid var(--color-electric-cyan);
10
+ transition: bottom 250ms ease-out, opacity 150ms ease-out;
13
11
  }
14
-
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.CookieMessage=o())}(this,(()=>(()=>{"use strict";var e={};return e.default})()));
1
+ import"./component.css";array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}import React,{useRef,useEffect,useState}from"react";import Cookie from"js-cookie";import"./component.css";import _absUrl from"../url-base";var COOKIE_EXPIRY=365;var CookieMessage=function(param){var cookieId=param.cookieId,urlBase=param.urlBase;var ref=useRef(null);var _useState=_sliced_to_array(useState(true),2),hideCookieMessage=_useState[0],setHideCookieMessage=_useState[1];useEffect(function(){var isCookieSet=Cookie.get(cookieId)?true:false;setHideCookieMessage(isCookieSet)},[]);var handleClose=function(){var _ref_current;Cookie.set(cookieId,"1",{expires:COOKIE_EXPIRY});(_ref_current=ref.current)===null||_ref_current===void 0?void 0:_ref_current.classList.add("bottom-1","opacity-0");setTimeout(function(){return setHideCookieMessage(true)},500)};var absUrl=function(path){return _absUrl(path,urlBase)};if(hideCookieMessage)return null;return React.createElement("div",{className:"ui-cookie-message",ref:ref},React.createElement("p",{className:"ui-text-p2 pr-32"},React.createElement("a",{href:absUrl("/privacy"),className:"underline"},"How we use cookies")," ","to improve your experience."),React.createElement("button",{className:"ui-btn-secondary mt-12 sm:mt-0 whitespace-nowrap",onClick:handleClose},"Accept and close"))};export default CookieMessage;
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.CustomerLogos=o())}(this,(()=>({}.default)));
1
+ import React from"react";var CustomerLogos=function(param){var companies=param.companies,_param_additionalCss=param.additionalCss,additionalCss=_param_additionalCss===void 0?"":_param_additionalCss;return React.createElement("section",{className:"w-full bg-white"},React.createElement("ul",{className:"py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center ".concat(additionalCss)},companies.map(function(company){return React.createElement("li",{key:company.label,className:"flex-auto text-center sm:w-1/3 w-1/2"},React.createElement("img",{alt:company.label,src:company.logo,className:"mx-auto"}))})))};export default CustomerLogos;
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.DropdownMenu=o())}(this,(()=>({}.default)));
1
+ function _array_like_to_array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _iterable_to_array_limit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}import React,{createContext,useContext,useState,useEffect,useRef}from"react";import Icon from"../Icon/component.tsx";var DropdownMenuContext=createContext({isOpen:false,setOpen:function(){}});var DropdownMenu=function(param){var children=param.children;var _useState=_sliced_to_array(useState(false),2),isOpen=_useState[0],setOpen=_useState[1];var ref=useRef(null);useEffect(function(){var clickHandler=function(e){var _ref_current;if((_ref_current=ref.current)===null||_ref_current===void 0?void 0:_ref_current.contains(e.target))return;setOpen(false)};document.addEventListener("click",clickHandler);return function(){document.removeEventListener("click",clickHandler)}},[]);return React.createElement(DropdownMenuContext.Provider,{value:{isOpen:isOpen,setOpen:setOpen}},React.createElement("div",{id:"dropdown-menu",className:"relative",ref:ref},children))};var Trigger=function(param){var children=param.children,_param_additionalTriggerCSS=param.additionalTriggerCSS,additionalTriggerCSS=_param_additionalTriggerCSS===void 0?"":_param_additionalTriggerCSS;var _useContext=useContext(DropdownMenuContext),isOpen=_useContext.isOpen,setOpen=_useContext.setOpen;return React.createElement("button",{id:"menu-trigger",onClick:function(){return setOpen(!isOpen)},className:"".concat(additionalTriggerCSS," flex items-center p-8 ml-8 group hover:text-gui-hover hover:bg-light-grey active:text-gui-active focus:text-gui-focus focus:outline-none rounded-lg")},React.createElement("span",{className:"leading-normal"},children),React.createElement(Icon,{name:"icon-gui-disclosure-arrow",color:"text-cool-black",size:"1.25rem",additionalCSS:"transform rotate-90 group-hover:text-gui-hover group-active:text-gui-active group-focus:text-gui-focus"}))};var Content=function(param){var children=param.children,_param_anchorPosition=param.anchorPosition,anchorPosition=_param_anchorPosition===void 0?"right":_param_anchorPosition,additionalContentCSS=param.additionalContentCSS;var isOpen=useContext(DropdownMenuContext).isOpen;if(!isOpen){return null}var anchorPositionClasses=anchorPosition==="right"?"right-0":"left-0";return React.createElement("div",{id:"menu-content",className:"".concat(additionalContentCSS," absolute p-8 z-10 border border-mid-grey bg-white rounded shadow-container ").concat(anchorPositionClasses),style:{minWidth:275,top:44}},children)};var Link=function(param){var url=param.url,title=param.title,subtitle=param.subtitle,iconName=param.iconName,children=param.children;return React.createElement("a",{href:url,className:"menu-link group block p-8 hover:bg-light-grey hover:text-cool-black rounded"},React.createElement("p",{className:"mb-4"},title,iconName?React.createElement(Icon,{name:iconName,size:"1rem",color:"text-cool-black",additionalCSS:"align-middle ml-8 relative -top-1 -left-4"}):null),subtitle?React.createElement("p",{className:"ui-text-p3 mb-16"},subtitle):null,children)};DropdownMenu.Trigger=Trigger;DropdownMenu.Content=Content;DropdownMenu.Link=Link;export default DropdownMenu;
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.FeaturedLink=o())}(this,(()=>({}.default)));
1
+ function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==="function"){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))}ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})}keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){source=source!=null?source:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}import React from"react";import Icon from"../Icon/component.tsx";var buildTargetAndRel=function(url,newWindow){var props={};if(newWindow){props.target="_blank";if(url.startsWith("/")&&!url.startsWith("//")){props.rel="noopener"}else{props.rel="noopenner noreferrer"}}return props};var FeaturedLink=function(param){var url=param.url,_param_textSize=param.textSize,textSize=_param_textSize===void 0?"text-p2":_param_textSize,_param_iconColor=param.iconColor,iconColor=_param_iconColor===void 0?"text-cool-black":_param_iconColor,_param_flush=param.flush,flush=_param_flush===void 0?false:_param_flush,_param_reverse=param.reverse,reverse=_param_reverse===void 0?false:_param_reverse,_param_additionalCSS=param.additionalCSS,additionalCSS=_param_additionalCSS===void 0?"":_param_additionalCSS,_param_newWindow=param.newWindow,newWindow=_param_newWindow===void 0?false:_param_newWindow,_param_onClick=param.onClick,onClick=_param_onClick===void 0?undefined:_param_onClick,children=param.children;var targetAndRel=buildTargetAndRel(url,newWindow);return React.createElement("a",_object_spread_props(_object_spread({href:url,className:"font-sans font-bold block text-gui-default hover:text-gui-hover focus:text-gui-focus focus:outline-gui-focus group ui-".concat(textSize," ").concat(flush?"":"py-8"," ").concat(additionalCSS),style:{"--featured-link-icon-size":"var(".concat(textSize.replace("text","--fs"),")")}},targetAndRel),{onClick:onClick}),reverse?React.createElement(React.Fragment,null,React.createElement(Icon,{name:"icon-gui-link-arrow",size:"calc(var(--featured-link-icon-size) * 1.25)",color:iconColor,additionalCSS:"align-middle mr-8 relative -top-1 -right-4 transition-all group-hover:right-0 transform rotate-180"}),children):React.createElement(React.Fragment,null,children,React.createElement(Icon,{name:"icon-gui-link-arrow",size:"calc(var(--featured-link-icon-size) * 1.25)",color:iconColor,additionalCSS:"align-middle ml-8 relative -top-1 -left-4 transition-all group-hover:left-0"})))};export default FeaturedLink;
@@ -1,26 +1,23 @@
1
- @layer components {
2
- .ui-flash {
3
- @apply w-full fixed;
4
- top: 5.5rem;
5
- z-index: calc(var(--stacking-context-page-meganav) - 10);
6
- transition: margin-top 200ms;
7
- }
8
-
9
- .ui-flash-message {
10
- @apply font-sans font-light antialiased max-w-screen-xl mx-auto mt-8 opacity-0 relative;
11
- transition: opacity 200ms, transform 200ms, height 200ms 200ms,
12
- margin-top 200ms 200ms;
13
- transform: translateY(-200%) rotateX(-90deg);
14
- }
1
+ .ui-flash {
2
+ @apply w-full fixed;
3
+ top: 5.5rem;
4
+ z-index: calc(var(--stacking-context-page-meganav) - 10);
5
+ transition: margin-top 200ms;
6
+ }
15
7
 
16
- /* dynamic content inside flash, can't add classes */
17
- .ui-flash-text a {
18
- @apply underline;
19
- }
8
+ .ui-flash-message {
9
+ @apply font-sans font-light antialiased max-w-screen-xl mx-auto mt-8 opacity-0 relative;
10
+ transition: opacity 200ms, transform 200ms, height 200ms 200ms,
11
+ margin-top 200ms 200ms;
12
+ transform: translateY(-200%) rotateX(-90deg);
13
+ }
20
14
 
21
- .ui-flash-message-enter {
22
- @apply opacity-100;
23
- transform: translateY(0) rotateX(0);
24
- }
15
+ /* dynamic content inside flash, can't add classes */
16
+ .ui-flash-text a {
17
+ @apply underline;
25
18
  }
26
19
 
20
+ .ui-flash-message-enter {
21
+ @apply opacity-100;
22
+ transform: translateY(0) rotateX(0);
23
+ }
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.Flash=o())}(this,(()=>(()=>{"use strict";var e={};return e.default})()));
1
+ function _array_like_to_array(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2}function _array_with_holes(arr){if(Array.isArray(arr))return arr}function _array_without_holes(arr){if(Array.isArray(arr))return _array_like_to_array(arr)}function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true})}else{obj[key]=value}return obj}function _iterable_to_array(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter)}function _iterable_to_array_limit(arr,i){var _i=arr==null?null:typeof Symbol!=="undefined"&&arr[Symbol.iterator]||arr["@@iterator"];if(_i==null)return;var _arr=[];var _n=true;var _d=false;var _s,_e;try{for(_i=_i.call(arr);!(_n=(_s=_i.next()).done);_n=true){_arr.push(_s.value);if(i&&_arr.length===i)break}}catch(err){_d=true;_e=err}finally{try{if(!_n&&_i["return"]!=null)_i["return"]()}finally{if(_d)throw _e}}return _arr}function _non_iterable_rest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _non_iterable_spread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _object_spread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==="function"){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable}))}ownKeys.forEach(function(key){_define_property(target,key,source[key])})}return target}function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly){symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable})}keys.push.apply(keys,symbols)}return keys}function _object_spread_props(target,source){source=source!=null?source:{};if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source))}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key))})}return target}function _sliced_to_array(arr,i){return _array_with_holes(arr)||_iterable_to_array_limit(arr,i)||_unsupported_iterable_to_array(arr,i)||_non_iterable_rest()}function _to_consumable_array(arr){return _array_without_holes(arr)||_iterable_to_array(arr)||_unsupported_iterable_to_array(arr)||_non_iterable_spread()}function _unsupported_iterable_to_array(o,minLen){if(!o)return;if(typeof o==="string")return _array_like_to_array(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _array_like_to_array(o,minLen)}import React,{useEffect,useState,useRef}from"react";import DOMPurify from"dompurify";import{nanoid}from"nanoid/non-secure";import{getRemoteDataStore}from"../remote-data-store.js";import ConnectStateWrapper from"../ConnectStateWrapper/component.tsx";import Icon from"../Icon/component.tsx";import"./component.css";var REDUCER_KEY="flashes";var FLASH_DATA_ID="ui-flashes";var initialState={items:[]};var reducerFlashes=_define_property({},REDUCER_KEY,function(){var state=arguments.length>0&&arguments[0]!==void 0?arguments[0]:initialState,action=arguments.length>1?arguments[1]:void 0;switch(action.type){case"flash/push":{var flashes=Array.isArray(action.payload)?action.payload:[action.payload];return{items:_to_consumable_array(state.items).concat(_to_consumable_array(flashes))}}default:return state}});var selectFlashes=function(store){return store.getState()[REDUCER_KEY]};var FLASH_BG_COLOR={error:"bg-gui-error",success:"bg-zingy-green",notice:"bg-electric-cyan",info:"bg-electric-cyan",alert:"bg-active-orange"};var FLASH_TEXT_COLOR={error:"text-white",success:"text-cool-black",notice:"text-cool-black",info:"text-cool-black",alert:"text-white"};var AUTO_HIDE=["success","info","notice"];var AUTO_HIDE_TIME=8e3;var useAutoHide=function(type,closeFlash){var timeoutId=useRef(null);useEffect(function(){if(AUTO_HIDE.includes(type)){timeoutId.current=setTimeout(function(){closeFlash()},AUTO_HIDE_TIME)}return function(){if(timeoutId.current){clearTimeout(timeoutId.current)}}},[])};var Flash=function(param){var id=param.id,type=param.type,content=param.content,removeFlash=param.removeFlash;var ref=useRef(null);var _useState=_sliced_to_array(useState(false),2),closed=_useState[0],setClosed=_useState[1];var _useState1=_sliced_to_array(useState(0),2),flashHeight=_useState1[0],setFlashHeight=_useState1[1];var _useState2=_sliced_to_array(useState(false),2),triggerEntryAnimation=_useState2[0],setTriggerEntryAnimation=_useState2[1];var closeFlash=function(){if(ref.current){setFlashHeight(ref.current.getBoundingClientRect().height)}setClosed(true);setTimeout(function(){id&&removeFlash(id)},100)};useEffect(function(){return setTriggerEntryAnimation(true)},[]);useAutoHide(type,closeFlash);var animateEntry=triggerEntryAnimation&&!closed;var style;if(flashHeight&&!closed){style={height:"".concat(flashHeight,"px")}}else if(closed){style={height:0,marginTop:0,zIndex:-1}}else{style={}}var safeContent=DOMPurify.sanitize(content,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","data-method","rel"]});var withIcons={notice:"icon-gui-ably-badge",success:"icon-gui-tick",error:"icon-gui-warning",alert:"icon-gui-warning"};var iconColor={notice:"text-cool-black",success:"text-cool-black",error:"text-white",alert:"text-white"};return React.createElement("div",{className:"ui-flash-message ui-grid-px ".concat(animateEntry?"ui-flash-message-enter":""),style:style,ref:ref,"data-id":"ui-flash"},React.createElement("div",{className:"".concat(FLASH_BG_COLOR[type]," p-32 flex align-center rounded shadow-container-subtle")},withIcons[type]&&React.createElement(Icon,{name:withIcons[type],color:iconColor[type],size:"1.5rem",additionalCSS:"mr-16 self-baseline"}),React.createElement("p",{className:"ui-text-p1 mr-16 ".concat(FLASH_TEXT_COLOR[type]),dangerouslySetInnerHTML:{__html:safeContent}}),React.createElement("button",{type:"button",className:"p-0 ml-auto self-start focus:outline-none",onClick:closeFlash},React.createElement(Icon,{name:"icon-gui-close",color:iconColor[type],size:"1.5rem",additionalCSS:"transition-colors"}))))};var Flashes=function(param){var flashes=param.flashes;var _useState=_sliced_to_array(useState([]),2),flashesWithIds=_useState[0],setFlashesWithIds=_useState[1];var removeFlash=function(flashId){return setFlashesWithIds(function(items){return items.filter(function(item){return item.id!==flashId})})};useEffect(function(){setFlashesWithIds(function(state){return _to_consumable_array(state).concat(_to_consumable_array((flashes===null||flashes===void 0?void 0:flashes.items).map(function(flash){return _object_spread_props(_object_spread({},flash),{id:nanoid(),removed:false})})))})},[flashes]);return React.createElement("div",{className:"ui-flash","data-id":FLASH_DATA_ID},flashesWithIds.filter(function(item){return!item.removed}).map(function(flash){return React.createElement(Flash,_object_spread_props(_object_spread({key:flash.id},flash),{removeFlash:removeFlash}))}))};var BackendFlashes=function(param){var flashes=param.flashes;useEffect(function(){var transformedFlashes=flashes.map(function(flash){var _flash=_sliced_to_array(flash,2),type=_flash[0],content=_flash[1];return{type:type,content:content}})||[];if(transformedFlashes.length>0){var store=getRemoteDataStore();store.dispatch({type:"flash/push",payload:transformedFlashes})}},[]);var WrappedFlashes=ConnectStateWrapper(Flashes,{flashes:selectFlashes});return React.createElement(WrappedFlashes,null)};export{reducerFlashes,FLASH_DATA_ID,Flashes};export default BackendFlashes;