@ably/ui 14.0.5 → 14.1.0-dev.30520a8

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 (305) hide show
  1. package/core/.DS_Store +0 -0
  2. package/core/Accordion/.DS_Store +0 -0
  3. package/core/Code/.DS_Store +0 -0
  4. package/core/ContactFooter/.DS_Store +0 -0
  5. package/core/CookieMessage/.DS_Store +0 -0
  6. package/core/CustomerLogos/.DS_Store +0 -0
  7. package/core/DropdownMenu/.DS_Store +0 -0
  8. package/core/FeaturedLink/.DS_Store +0 -0
  9. package/core/Flash/.DS_Store +0 -0
  10. package/core/Flash.js +1 -1
  11. package/core/Footer/.DS_Store +0 -0
  12. package/core/Icon/.DS_Store +0 -0
  13. package/core/Loader/.DS_Store +0 -0
  14. package/core/Logo/.DS_Store +0 -0
  15. package/core/Meganav/.DS_Store +0 -0
  16. package/core/MeganavBlogPostsList/.DS_Store +0 -0
  17. package/core/MeganavControl/.DS_Store +0 -0
  18. package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  19. package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  20. package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  21. package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  22. package/core/MeganavSearchSuggestions/.DS_Store +0 -0
  23. package/core/Notice/.DS_Store +0 -0
  24. package/core/Slider/.DS_Store +0 -0
  25. package/core/Table/.DS_Store +0 -0
  26. package/core/Tooltip/.DS_Store +0 -0
  27. package/core/styles/forms.css +24 -0
  28. package/package.json +6 -8
  29. package/src/core/Accordion/Accordion.stories.tsx +0 -39
  30. package/src/core/Accordion.tsx +0 -149
  31. package/src/core/Code/Code.stories.tsx +0 -71
  32. package/src/core/Code/component.css +0 -1
  33. package/src/core/Code/component.js +0 -27
  34. package/src/core/Code.tsx +0 -44
  35. package/src/core/ConnectStateWrapper.tsx +0 -43
  36. package/src/core/ContactFooter/ContactFooter.stories.tsx +0 -11
  37. package/src/core/ContactFooter/component.css +0 -11
  38. package/src/core/ContactFooter/component.js +0 -2
  39. package/src/core/ContactFooter.tsx +0 -91
  40. package/src/core/CookieMessage/CookieMessage.stories.tsx +0 -12
  41. package/src/core/CookieMessage/component.css +0 -15
  42. package/src/core/CookieMessage.tsx +0 -52
  43. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +0 -43
  44. package/src/core/CustomerLogos.tsx +0 -35
  45. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +0 -48
  46. package/src/core/DropdownMenu.tsx +0 -140
  47. package/src/core/Expander/Expander.stories.tsx +0 -132
  48. package/src/core/Expander.tsx +0 -63
  49. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +0 -43
  50. package/src/core/FeaturedLink.tsx +0 -93
  51. package/src/core/Flash/Flash.stories.tsx +0 -37
  52. package/src/core/Flash/component.css +0 -28
  53. package/src/core/Flash.tsx +0 -233
  54. package/src/core/Footer/Footer.stories.tsx +0 -26
  55. package/src/core/Footer/component.css +0 -33
  56. package/src/core/Footer.tsx +0 -535
  57. package/src/core/Icon/Icon.stories.tsx +0 -151
  58. package/src/core/Icon.tsx +0 -26
  59. package/src/core/Loader/Loader.stories.tsx +0 -21
  60. package/src/core/Loader.tsx +0 -52
  61. package/src/core/Logo/Logo.stories.tsx +0 -12
  62. package/src/core/Logo.tsx +0 -29
  63. package/src/core/Meganav/Meganav.stories.tsx +0 -86
  64. package/src/core/Meganav/component.css +0 -114
  65. package/src/core/Meganav/component.js +0 -150
  66. package/src/core/Meganav/component.json +0 -37
  67. package/src/core/Meganav.tsx +0 -225
  68. package/src/core/MeganavBlogPostsList/component.js +0 -43
  69. package/src/core/MeganavBlogPostsList.tsx +0 -41
  70. package/src/core/MeganavContentCompany.tsx +0 -166
  71. package/src/core/MeganavContentDevelopers.tsx +0 -210
  72. package/src/core/MeganavContentProducts.tsx +0 -163
  73. package/src/core/MeganavContentUseCases.tsx +0 -244
  74. package/src/core/MeganavControl/component.js +0 -117
  75. package/src/core/MeganavControl.tsx +0 -39
  76. package/src/core/MeganavControlMobileDropdown/component.js +0 -46
  77. package/src/core/MeganavControlMobileDropdown.tsx +0 -31
  78. package/src/core/MeganavControlMobilePanelClose/component.js +0 -36
  79. package/src/core/MeganavControlMobilePanelClose.tsx +0 -34
  80. package/src/core/MeganavControlMobilePanelOpen/component.js +0 -59
  81. package/src/core/MeganavControlMobilePanelOpen.tsx +0 -31
  82. package/src/core/MeganavItemsDesktop.tsx +0 -68
  83. package/src/core/MeganavItemsMobile.tsx +0 -197
  84. package/src/core/MeganavItemsSignedIn.tsx +0 -130
  85. package/src/core/MeganavSearch.tsx +0 -36
  86. package/src/core/MeganavSearchAutocomplete/component.js +0 -177
  87. package/src/core/MeganavSearchAutocomplete.tsx +0 -12
  88. package/src/core/MeganavSearchPanel.tsx +0 -52
  89. package/src/core/MeganavSearchSuggestions/component.js +0 -133
  90. package/src/core/MeganavSearchSuggestions.tsx +0 -62
  91. package/src/core/Notice/component.css +0 -7
  92. package/src/core/Notice/component.js +0 -154
  93. package/src/core/Notice.tsx +0 -102
  94. package/src/core/SignOutLink.tsx +0 -51
  95. package/src/core/Slider/Slider.stories.tsx +0 -98
  96. package/src/core/Slider/component.css +0 -40
  97. package/src/core/Slider/component.js +0 -105
  98. package/src/core/Slider.tsx +0 -224
  99. package/src/core/Table/Table.stories.tsx +0 -12
  100. package/src/core/Table/Table.tsx +0 -58
  101. package/src/core/Table/TableCell.tsx +0 -71
  102. package/src/core/Table/TableRow.tsx +0 -25
  103. package/src/core/Table/data.tsx +0 -133
  104. package/src/core/Table.tsx +0 -15
  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/buttons.css +0 -124
  282. package/src/core/styles/forms.css +0 -64
  283. package/src/core/styles/layout.css +0 -21
  284. package/src/core/styles/properties.css +0 -278
  285. package/src/core/styles/text.css +0 -168
  286. package/src/core/styles/toggles.css +0 -38
  287. package/src/core/styles.base.css +0 -1
  288. package/src/core/styles.components.css +0 -44
  289. package/src/core/styles.css +0 -2
  290. package/src/core/url-base.js +0 -7
  291. package/src/core/utils/syntax-highlighter-registry.js +0 -63
  292. package/src/core/utils/syntax-highlighter.css +0 -71
  293. package/src/core/utils/syntax-highlighter.js +0 -103
  294. package/src/pages/Buttons.mdx +0 -121
  295. package/src/pages/Chips.mdx +0 -136
  296. package/src/pages/Colour.mdx +0 -23
  297. package/src/pages/Forms.mdx +0 -219
  298. package/src/pages/Layout.mdx +0 -58
  299. package/src/pages/Toggles.mdx +0 -42
  300. package/src/pages/Typography.mdx +0 -206
  301. package/src/pages/utils.ts +0 -80
  302. package/src/reset/scripts.js +0 -1
  303. package/src/reset/styles/normalize.css +0 -353
  304. package/src/reset/styles/reset.css +0 -139
  305. package/src/reset/styles.css +0 -2
package/core/.DS_Store ADDED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/core/Flash.js CHANGED
@@ -1 +1 @@
1
- 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";import Icon from"./Icon";const REDUCER_KEY="flashes";const FLASH_DATA_ID="ui-flashes";const initialState={items:[]};const reducerFlashes={[REDUCER_KEY]:(state=initialState,action)=>{switch(action.type){case"flash/push":{const flashes=Array.isArray(action.payload)?action.payload:[action.payload];return{items:[...state.items,...flashes]}}default:return state}}};const selectFlashes=store=>store.getState()[REDUCER_KEY];const FLASH_BG_COLOR={error:"bg-gui-error",success:"bg-zingy-green",notice:"bg-electric-cyan",info:"bg-electric-cyan",alert:"bg-active-orange"};const FLASH_TEXT_COLOR={error:"text-white",success:"text-cool-black",notice:"text-cool-black",info:"text-cool-black",alert:"text-white"};const AUTO_HIDE=["success","info","notice"];const AUTO_HIDE_TIME=8e3;const useAutoHide=(type,closeFlash)=>{const timeoutId=useRef(null);useEffect(()=>{if(AUTO_HIDE.includes(type)){timeoutId.current=setTimeout(()=>{closeFlash()},AUTO_HIDE_TIME)}return()=>{if(timeoutId.current){clearTimeout(timeoutId.current)}}},[])};const Flash=({id,type,content,removeFlash})=>{const ref=useRef(null);const[closed,setClosed]=useState(false);const[flashHeight,setFlashHeight]=useState(0);const[triggerEntryAnimation,setTriggerEntryAnimation]=useState(false);const closeFlash=()=>{if(ref.current){setFlashHeight(ref.current.getBoundingClientRect().height)}setClosed(true);setTimeout(()=>{id&&removeFlash(id)},100)};useEffect(()=>setTriggerEntryAnimation(true),[]);useAutoHide(type,closeFlash);const animateEntry=triggerEntryAnimation&&!closed;let style;if(flashHeight&&!closed){style={height:`${flashHeight}px`}}else if(closed){style={height:0,marginTop:0,zIndex:-1}}else{style={}}const safeContent=DOMPurify.sanitize(content,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","data-method","rel"]});const withIcons={notice:"icon-gui-ably-badge",success:"icon-gui-tick",error:"icon-gui-warning",alert:"icon-gui-warning"};const 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 ${animateEntry?"ui-flash-message-enter":""}`,style:style,ref:ref,"data-id":"ui-flash"},React.createElement("div",{className:`${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 ${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"}))))};const Flashes=({flashes})=>{const[flashesWithIds,setFlashesWithIds]=useState([]);const removeFlash=flashId=>setFlashesWithIds(items=>items.filter(item=>item.id!==flashId));useEffect(()=>{setFlashesWithIds(state=>{return[...state,...(flashes===null||flashes===void 0?void 0:flashes.items).map(flash=>({...flash,id:nanoid(),removed:false}))]})},[flashes]);return React.createElement("div",{className:"ui-flash","data-id":FLASH_DATA_ID},flashesWithIds.filter(item=>!item.removed).map(flash=>React.createElement(Flash,{key:flash.id,...flash,removeFlash:removeFlash})))};const BackendFlashes=({flashes})=>{useEffect(()=>{const transformedFlashes=flashes.map(flash=>{const[type,content]=flash;return{type,content}})||[];if(transformedFlashes.length>0){const store=getRemoteDataStore();store.dispatch({type:"flash/push",payload:transformedFlashes})}},[]);const WrappedFlashes=ConnectStateWrapper(Flashes,{flashes:selectFlashes});return React.createElement(WrappedFlashes,null)};export{reducerFlashes,FLASH_DATA_ID,Flashes};export default BackendFlashes;
1
+ 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";import Icon from"./Icon";const REDUCER_KEY="flashes";const FLASH_DATA_ID="ui-flashes";const initialState={items:[]};const reducerFlashes={[REDUCER_KEY]:(state=initialState,action)=>{switch(action.type){case"flash/push":{const flashes=Array.isArray(action.payload)?action.payload:[action.payload];return{items:[...state.items,...flashes]}}default:return state}}};const selectFlashes=store=>store.getState()[REDUCER_KEY];const FLASH_BG_COLOR={error:"bg-gui-error",success:"bg-zingy-green",notice:"bg-electric-cyan",info:"bg-electric-cyan",alert:"bg-active-orange"};const FLASH_TEXT_COLOR={error:"text-white",success:"text-cool-black",notice:"text-cool-black",info:"text-cool-black",alert:"text-white"};const AUTO_HIDE=["success","info","notice"];const AUTO_HIDE_TIME=8e3;const useAutoHide=(type,closeFlash)=>{const timeoutId=useRef(null);useEffect(()=>{if(AUTO_HIDE.includes(type)){timeoutId.current=setTimeout(()=>{closeFlash()},AUTO_HIDE_TIME)}return()=>{if(timeoutId.current){clearTimeout(timeoutId.current)}}},[])};const Flash=({id,type,content,removeFlash})=>{const ref=useRef(null);const[closed,setClosed]=useState(false);const[flashHeight,setFlashHeight]=useState(0);const[triggerEntryAnimation,setTriggerEntryAnimation]=useState(false);const closeFlash=()=>{if(ref.current){setFlashHeight(ref.current.getBoundingClientRect().height)}setClosed(true);setTimeout(()=>{id&&removeFlash(id)},100)};useEffect(()=>setTriggerEntryAnimation(true),[]);useAutoHide(type,closeFlash);const animateEntry=triggerEntryAnimation&&!closed;let style;if(flashHeight&&!closed){style={height:`${flashHeight}px`}}else if(closed){style={height:0,marginTop:0,zIndex:-1}}else{style={}}const safeContent=DOMPurify.sanitize(content,{ALLOWED_TAGS:["a"],ALLOWED_ATTR:["href","data-method","rel"]});const withIcons={notice:"icon-gui-ably-badge",success:"icon-gui-tick",error:"icon-gui-warning",alert:"icon-gui-warning"};const 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 ${animateEntry?"ui-flash-message-enter":""}`,style:style,ref:ref,"data-id":"ui-flash"},React.createElement("div",{className:`${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 ${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"}))))};const Flashes=({flashes})=>{const[flashesWithIds,setFlashesWithIds]=useState([]);const removeFlash=flashId=>setFlashesWithIds(items=>items.filter(item=>item.id!==flashId));useEffect(()=>{setFlashesWithIds(state=>{var _flashes_items;return[...state,...((_flashes_items=flashes===null||flashes===void 0?void 0:flashes.items)!==null&&_flashes_items!==void 0?_flashes_items:[]).map(flash=>({...flash,id:nanoid(),removed:false}))]})},[flashes]);return React.createElement("div",{className:"ui-flash","data-id":FLASH_DATA_ID},flashesWithIds.filter(item=>!item.removed).map(flash=>React.createElement(Flash,{key:flash.id,...flash,removeFlash:removeFlash})))};const BackendFlashes=({flashes})=>{useEffect(()=>{const transformedFlashes=flashes.map(flash=>{const[type,content]=flash;return{type,content}})||[];if(transformedFlashes.length>0){const store=getRemoteDataStore();store.dispatch({type:"flash/push",payload:transformedFlashes})}},[]);const WrappedFlashes=ConnectStateWrapper(Flashes,{flashes:selectFlashes});return React.createElement(WrappedFlashes,null)};export{reducerFlashes,FLASH_DATA_ID,Flashes};export default BackendFlashes;
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -61,4 +61,28 @@
61
61
  /* color: var(--text-dark-grey); */
62
62
  color: #76767c;
63
63
  }
64
+
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 text-p2 flex;
67
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KCTxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBmaWxsPSIjNjY3MDg1IiBkPSJNMTIuOTA0NiAxMkw5LjAwNjcxIDE2LjMzMUwxMC40OTMzIDE3LjY2OUwxNC45OTMzIDEyLjY2OUwxNC45OTMzIDExLjMzMUwxMC40OTMzIDYuMzMxMDVMOS4wMDY3MSA3LjY2ODk4TDEyLjkwNDYgMTJaIiB0cmFuc2Zvcm09InJvdGF0ZSg5MCAxMiAxMikiLz4KPC9zdmc+Cg==");
68
+ background-repeat: no-repeat;
69
+ background-position: center right 16px;
70
+ }
71
+
72
+ .ui-dropdown-base option:disabled {
73
+ @apply text-neutral-800;
74
+ }
75
+
76
+ .ui-dropdown {
77
+ @apply ui-dropdown-base py-12;
78
+ }
79
+
80
+ .ui-dropdown-small {
81
+ @apply ui-dropdown-base py-[9px];
82
+ }
83
+
84
+ /* Special wrapper for overriding default Select2 functionality */
85
+ .ui-dropdown-select2-wrapper .select2-selection__arrow {
86
+ display: none;
87
+ }
64
88
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ably/ui",
3
- "version": "14.0.5",
3
+ "version": "14.1.0-dev.30520a8",
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",
@@ -30,10 +29,9 @@
30
29
  "@vitejs/plugin-react": "^4.2.1",
31
30
  "autoprefixer": "^10.0.2",
32
31
  "cypress": "^13.3.1",
33
- "eslint": "^7.12.1",
32
+ "eslint": "^8.57.0",
34
33
  "eslint-config-prettier": "^9.1.0",
35
- "eslint-plugin-cypress": "^3.2.0",
36
- "eslint-plugin-react": "^7.21.5",
34
+ "eslint-plugin-react": "^7.34.3",
37
35
  "eslint-plugin-storybook": "^0.8.0",
38
36
  "msw": "2.3.1",
39
37
  "msw-storybook-addon": "^2.0.2",
@@ -51,9 +49,9 @@
51
49
  "build:cleanup": "mv dist/* . && rm -r dist",
52
50
  "build": "yarn build:prebuild && yarn build:swc && yarn build:sprites && yarn build:cleanup",
53
51
  "watch": "yarn build:swc -w",
54
- "format:check": "prettier -c *.{js,ts} src/**/*.{js,ts,tsx} cypress",
55
- "format:write": "prettier -w *.{js,ts} src/**/*.{js,ts,tsx} cypress",
56
- "lint": "eslint *.{js,ts} src/**/*.{js,ts,tsx} cypress",
52
+ "format:check": "prettier -c *.{js,ts} src/**/*.{js,ts,tsx}",
53
+ "format:write": "prettier -w *.{js,ts} src/**/*.{js,ts,tsx}",
54
+ "lint": "eslint *.{js,ts} src/**/*.{js,ts,tsx}",
57
55
  "cy:open": "cypress open",
58
56
  "cy:headless": "cypress run --quiet",
59
57
  "update:all": "./scripts/update-dependents.sh",
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- import Accordion, { AccordionProps } from "../Accordion";
3
-
4
- export default {
5
- title: "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;
@@ -1,71 +0,0 @@
1
- import Code from "../Code";
2
-
3
- export default {
4
- title: "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;
@@ -1,11 +0,0 @@
1
- import ContactFooter from "../ContactFooter";
2
-
3
- export default {
4
- title: "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;
@@ -1,12 +0,0 @@
1
- import CookieMessage from "../CookieMessage";
2
-
3
- export default {
4
- title: "Components/Cookie Message",
5
- component: CookieMessage,
6
- args: {
7
- cookieId: "cookie-namespace",
8
- noticeId: "cookie-message",
9
- },
10
- };
11
-
12
- export const Default = {};