@ably/ui 14.0.0-dev.58ef698 → 14.0.0-dev.64a4085

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 (227) hide show
  1. package/README.md +8 -10
  2. package/core/.DS_Store +0 -0
  3. package/core/Accordion/.DS_Store +0 -0
  4. package/core/Accordion.js +1 -0
  5. package/core/Code/.DS_Store +0 -0
  6. package/core/Code/component.js +1 -1
  7. package/core/Code.js +1 -0
  8. package/core/ConnectStateWrapper.js +1 -0
  9. package/core/ContactFooter/.DS_Store +0 -0
  10. package/core/ContactFooter/component.js +1 -1
  11. package/core/ContactFooter.js +1 -0
  12. package/core/CookieMessage/.DS_Store +0 -0
  13. package/core/CookieMessage.js +1 -0
  14. package/core/CustomerLogos/.DS_Store +0 -0
  15. package/core/CustomerLogos.js +1 -0
  16. package/core/DropdownMenu/.DS_Store +0 -0
  17. package/core/DropdownMenu.js +1 -0
  18. package/core/Expander.js +1 -0
  19. package/core/FeaturedLink/.DS_Store +0 -0
  20. package/core/FeaturedLink.js +1 -0
  21. package/core/Flash/.DS_Store +0 -0
  22. package/core/Flash.js +1 -0
  23. package/core/Footer/.DS_Store +0 -0
  24. package/core/Footer.js +1 -0
  25. package/core/Icon/.DS_Store +0 -0
  26. package/core/Icon.js +1 -0
  27. package/core/Loader/.DS_Store +0 -0
  28. package/core/Loader.js +13 -0
  29. package/core/Logo/.DS_Store +0 -0
  30. package/core/Logo.js +1 -0
  31. package/core/Meganav/component.js +1 -1
  32. package/core/Meganav.js +1 -0
  33. package/core/MeganavBlogPostsList/.DS_Store +0 -0
  34. package/core/MeganavBlogPostsList/component.js +1 -1
  35. package/core/MeganavBlogPostsList.js +1 -0
  36. package/core/MeganavContentCompany.js +1 -0
  37. package/core/MeganavContentDevelopers.js +1 -0
  38. package/core/MeganavContentProducts.js +1 -0
  39. package/core/MeganavContentUseCases.js +1 -0
  40. package/core/MeganavControl/.DS_Store +0 -0
  41. package/core/MeganavControl/component.js +1 -1
  42. package/core/MeganavControl.js +1 -0
  43. package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  44. package/core/MeganavControlMobileDropdown/component.js +1 -1
  45. package/core/MeganavControlMobileDropdown.js +1 -0
  46. package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  47. package/core/MeganavControlMobilePanelClose/component.js +1 -1
  48. package/core/MeganavControlMobilePanelClose.js +1 -0
  49. package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  50. package/core/MeganavControlMobilePanelOpen/component.js +1 -1
  51. package/core/MeganavControlMobilePanelOpen.js +1 -0
  52. package/core/MeganavItemsDesktop.js +1 -0
  53. package/core/MeganavItemsMobile.js +1 -0
  54. package/core/MeganavItemsSignedIn.js +1 -0
  55. package/core/MeganavSearch.js +1 -0
  56. package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  57. package/core/MeganavSearchAutocomplete/component.js +1 -1
  58. package/core/MeganavSearchAutocomplete.js +1 -0
  59. package/core/MeganavSearchPanel.js +1 -0
  60. package/core/MeganavSearchSuggestions/.DS_Store +0 -0
  61. package/core/MeganavSearchSuggestions/component.js +1 -1
  62. package/core/MeganavSearchSuggestions.js +1 -0
  63. package/core/Notice/.DS_Store +0 -0
  64. package/core/Notice/component.js +1 -1
  65. package/core/Notice.js +1 -0
  66. package/core/SignOutLink.js +1 -0
  67. package/core/Slider/.DS_Store +0 -0
  68. package/core/Slider/component.css +32 -0
  69. package/core/Slider/component.js +1 -1
  70. package/core/Slider.js +1 -0
  71. package/core/Table/.DS_Store +0 -0
  72. package/core/Table/Table.js +1 -1
  73. package/core/Table/TableCell.js +7 -1
  74. package/core/Table/TableRow.js +1 -1
  75. package/core/Table/data.js +1 -0
  76. package/core/Table.js +1 -0
  77. package/core/Tooltip/.DS_Store +0 -0
  78. package/core/Tooltip.js +1 -0
  79. package/core/css.js +1 -1
  80. package/core/dom-query.js +1 -1
  81. package/core/hubspot-chat-toggle.js +1 -1
  82. package/core/icons/icon-gui-partial.svg +4 -0
  83. package/core/icons.js +1 -1
  84. package/core/load-sprites.js +1 -1
  85. package/core/react-renderer.js +1 -1
  86. package/core/remote-blogs-posts.js +1 -1
  87. package/core/remote-data-store.js +1 -1
  88. package/core/remote-data-util.js +1 -1
  89. package/core/remote-session-data.js +1 -1
  90. package/core/sprites.svg +1 -1
  91. package/core/url-base.js +1 -1
  92. package/core/utils/syntax-highlighter-registry.js +1 -1
  93. package/core/utils/syntax-highlighter.js +1 -1
  94. package/package.json +2 -3
  95. package/src/.DS_Store +0 -0
  96. package/src/core/.DS_Store +0 -0
  97. package/src/core/Accordion/.DS_Store +0 -0
  98. package/src/core/Accordion/Accordion.stories.tsx +1 -1
  99. package/src/core/{Accordion/component.tsx → Accordion.tsx} +6 -6
  100. package/src/core/Code/.DS_Store +0 -0
  101. package/src/core/Code/Code.stories.tsx +1 -1
  102. package/src/core/{Code/component.tsx → Code.tsx} +3 -3
  103. package/src/core/{ConnectStateWrapper/component.tsx → ConnectStateWrapper.tsx} +1 -1
  104. package/src/core/ContactFooter/.DS_Store +0 -0
  105. package/src/core/ContactFooter/ContactFooter.stories.tsx +1 -1
  106. package/src/core/{ContactFooter/component.tsx → ContactFooter.tsx} +4 -4
  107. package/src/core/CookieMessage/.DS_Store +0 -0
  108. package/src/core/CookieMessage/CookieMessage.stories.tsx +1 -1
  109. package/src/core/{CookieMessage/component.tsx → CookieMessage.tsx} +2 -2
  110. package/src/core/CustomerLogos/.DS_Store +0 -0
  111. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +1 -1
  112. package/src/core/DropdownMenu/.DS_Store +0 -0
  113. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +2 -2
  114. package/src/core/{DropdownMenu/component.tsx → DropdownMenu.tsx} +1 -1
  115. package/src/core/Expander/Expander.stories.tsx +118 -0
  116. package/src/core/Expander.tsx +46 -0
  117. package/src/core/FeaturedLink/.DS_Store +0 -0
  118. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +1 -1
  119. package/src/core/{FeaturedLink/component.tsx → FeaturedLink.tsx} +1 -1
  120. package/src/core/Flash/.DS_Store +0 -0
  121. package/src/core/Flash/Flash.stories.tsx +1 -1
  122. package/src/core/{Flash/component.tsx → Flash.tsx} +4 -4
  123. package/src/core/Footer/.DS_Store +0 -0
  124. package/src/core/Footer/Footer.stories.tsx +1 -1
  125. package/src/core/{Footer/component.tsx → Footer.tsx} +3 -3
  126. package/src/core/Icon/.DS_Store +0 -0
  127. package/src/core/Icon/Icon.stories.tsx +2 -1
  128. package/src/core/Loader/.DS_Store +0 -0
  129. package/src/core/Loader/Loader.stories.tsx +1 -1
  130. package/src/core/Logo/.DS_Store +0 -0
  131. package/src/core/Logo/Logo.stories.tsx +1 -1
  132. package/src/core/Meganav/Meganav.stories.tsx +1 -1
  133. package/src/core/{Meganav/component.tsx → Meganav.tsx} +17 -19
  134. package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
  135. package/src/core/{MeganavBlogPostsList/component.tsx → MeganavBlogPostsList.tsx} +2 -2
  136. package/src/core/{MeganavContentCompany/component.tsx → MeganavContentCompany.tsx} +5 -5
  137. package/src/core/{MeganavContentDevelopers/component.tsx → MeganavContentDevelopers.tsx} +2 -2
  138. package/src/core/{MeganavContentProducts/component.tsx → MeganavContentProducts.tsx} +2 -2
  139. package/src/core/{MeganavContentUseCases/component.tsx → MeganavContentUseCases.tsx} +2 -2
  140. package/src/core/MeganavControl/.DS_Store +0 -0
  141. package/src/core/{MeganavControl/component.tsx → MeganavControl.tsx} +2 -2
  142. package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  143. package/src/core/{MeganavControlMobileDropdown/component.tsx → MeganavControlMobileDropdown.tsx} +2 -2
  144. package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  145. package/src/core/{MeganavControlMobilePanelClose/component.tsx → MeganavControlMobilePanelClose.tsx} +1 -2
  146. package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  147. package/src/core/{MeganavControlMobilePanelOpen/component.tsx → MeganavControlMobilePanelOpen.tsx} +1 -2
  148. package/src/core/{MeganavItemsDesktop/component.tsx → MeganavItemsDesktop.tsx} +3 -3
  149. package/src/core/{MeganavItemsMobile/component.tsx → MeganavItemsMobile.tsx} +9 -9
  150. package/src/core/{MeganavItemsSignedIn/component.tsx → MeganavItemsSignedIn.tsx} +4 -8
  151. package/src/core/{MeganavSearch/component.tsx → MeganavSearch.tsx} +3 -3
  152. package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  153. package/src/core/{MeganavSearchPanel/component.tsx → MeganavSearchPanel.tsx} +4 -4
  154. package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
  155. package/src/core/{MeganavSearchSuggestions/component.tsx → MeganavSearchSuggestions.tsx} +2 -2
  156. package/src/core/Notice/.DS_Store +0 -0
  157. package/src/core/Notice/component.js +1 -1
  158. package/src/core/{Notice/component.tsx → Notice.tsx} +3 -4
  159. package/src/core/{SignOutLink/component.tsx → SignOutLink.tsx} +1 -1
  160. package/src/core/Slider/.DS_Store +0 -0
  161. package/src/core/Slider/Slider.stories.tsx +83 -30
  162. package/src/core/Slider/component.css +32 -0
  163. package/src/core/Slider.tsx +193 -0
  164. package/src/core/Table/.DS_Store +0 -0
  165. package/src/core/Table/Table.tsx +38 -9
  166. package/src/core/Table/TableCell.tsx +31 -6
  167. package/src/core/Table/{stories/data.tsx → data.tsx} +3 -3
  168. package/src/core/{Table/index.ts → Table.tsx} +5 -3
  169. package/src/core/Tooltip/.DS_Store +0 -0
  170. package/src/core/Tooltip/Tooltip.stories.tsx +1 -1
  171. package/src/core/{Tooltip/component.tsx → Tooltip.tsx} +34 -6
  172. package/src/core/icons/icon-gui-partial.svg +4 -0
  173. package/src/pages/Buttons.mdx +1 -1
  174. package/src/pages/Chips.mdx +1 -1
  175. package/src/pages/Forms.mdx +2 -2
  176. package/core/Accordion/component.js +0 -1
  177. package/core/ConnectStateWrapper/component.js +0 -1
  178. package/core/CookieMessage/component.js +0 -1
  179. package/core/CustomerLogos/component.js +0 -1
  180. package/core/DropdownMenu/component.js +0 -1
  181. package/core/FeaturedLink/component.js +0 -1
  182. package/core/Flash/component.js +0 -1
  183. package/core/Footer/component.js +0 -1
  184. package/core/Icon/component.js +0 -1
  185. package/core/Loader/component.js +0 -1
  186. package/core/Logo/component.js +0 -1
  187. package/core/MeganavContentCompany/component.js +0 -1
  188. package/core/MeganavContentDevelopers/component.js +0 -1
  189. package/core/MeganavContentProducts/component.js +0 -1
  190. package/core/MeganavContentUseCases/component.js +0 -1
  191. package/core/MeganavItemsDesktop/component.js +0 -1
  192. package/core/MeganavItemsMobile/component.js +0 -1
  193. package/core/MeganavItemsSignedIn/component.js +0 -1
  194. package/core/MeganavSearch/component.js +0 -1
  195. package/core/MeganavSearchPanel/component.js +0 -1
  196. package/core/SignOutLink/component.js +0 -1
  197. package/core/Table/index.js +0 -1
  198. package/core/Table/stories/data.js +0 -1
  199. package/core/Tooltip/component.js +0 -1
  200. package/src/core/Accordion/component.js +0 -0
  201. package/src/core/ConnectStateWrapper/component.js +0 -0
  202. package/src/core/CookieMessage/component.js +0 -1
  203. package/src/core/CustomerLogos/component.js +0 -0
  204. package/src/core/DropdownMenu/component.js +0 -0
  205. package/src/core/FeaturedLink/component.js +0 -0
  206. package/src/core/Flash/component.js +0 -1
  207. package/src/core/Footer/component.js +0 -1
  208. package/src/core/Icon/component.js +0 -0
  209. package/src/core/Loader/component.js +0 -0
  210. package/src/core/Logo/component.js +0 -0
  211. package/src/core/MeganavContentCompany/component.js +0 -0
  212. package/src/core/MeganavContentDevelopers/component.js +0 -0
  213. package/src/core/MeganavContentProducts/component.js +0 -0
  214. package/src/core/MeganavContentUseCases/component.js +0 -1
  215. package/src/core/MeganavItemsDesktop/component.js +0 -0
  216. package/src/core/MeganavItemsMobile/component.js +0 -0
  217. package/src/core/MeganavItemsSignedIn/component.js +0 -0
  218. package/src/core/MeganavSearch/component.js +0 -0
  219. package/src/core/MeganavSearchPanel/component.js +0 -0
  220. package/src/core/SignOutLink/component.js +0 -0
  221. package/src/core/Slider/component.tsx +0 -112
  222. /package/src/core/{CustomerLogos/component.tsx → CustomerLogos.tsx} +0 -0
  223. /package/src/core/{Icon/component.tsx → Icon.tsx} +0 -0
  224. /package/src/core/{Loader/component.tsx → Loader.tsx} +0 -0
  225. /package/src/core/{Logo/component.tsx → Logo.tsx} +0 -0
  226. /package/src/core/{MeganavSearchAutocomplete/component.tsx → MeganavSearchAutocomplete.tsx} +0 -0
  227. /package/src/core/Table/{stories/Table.stories.tsx → Table.stories.tsx} +0 -0
@@ -1 +1 @@
1
- import bash from"highlight.js/lib/languages/bash";import cpp from"highlight.js/lib/languages/cpp";import csharp from"highlight.js/lib/languages/csharp";import css from"highlight.js/lib/languages/css";import dart from"highlight.js/lib/languages/dart";import dos from"highlight.js/lib/languages/dos";import diff from"highlight.js/lib/languages/diff";import erlang from"highlight.js/lib/languages/erlang";import elixir from"highlight.js/lib/languages/elixir";import plaintext from"highlight.js/lib/languages/plaintext";import go from"highlight.js/lib/languages/go";import http from"highlight.js/lib/languages/http";import java from"highlight.js/lib/languages/java";import javascript from"highlight.js/lib/languages/javascript";import typescript from"highlight.js/lib/languages/typescript";import json from"highlight.js/lib/languages/json";import objectivec from"highlight.js/lib/languages/objectivec";import php from"highlight.js/lib/languages/php";import python from"highlight.js/lib/languages/python";import ruby from"highlight.js/lib/languages/ruby";import swift from"highlight.js/lib/languages/swift";import kotlin from"highlight.js/lib/languages/kotlin";import sql from"highlight.js/lib/languages/sql";import xml from"highlight.js/lib/languages/xml";import yaml from"highlight.js/lib/languages/yaml";import curl from"highlightjs-curl/src/languages/curl";var registry=[{label:"Text",key:"text",module:plaintext},{label:"JS",key:"javascript",module:javascript},{label:"TS",key:"typescript",module:typescript},{label:"Java",key:"java",module:java},{label:"Ruby",key:"ruby",module:ruby},{label:"Python",key:"python",module:python},{label:"PHP",key:"php",module:php},{label:"Shell",key:"bash",module:bash},{label:"C#",key:"cs",module:csharp},{label:"CSS",key:"css",module:css},{label:"Go",key:"go",module:go},{label:"HTML",key:"xml",module:xml},{label:"HTTP",key:"http",module:http},{label:"C++",key:"cpp",module:cpp},{label:"Dart",key:"dart",module:dart},{label:"Swift",key:"swift",module:swift},{label:"Kotlin",key:"kotlin",module:kotlin},{label:"Objective C",key:"objectivec",module:objectivec},{label:"Node.js",key:"javascript",module:javascript},{label:"JSON",key:"json",module:json},{label:"DOS",key:"dos",module:dos},{label:"YAML",key:"yaml",module:yaml},{label:"Erlang",key:"erlang",module:erlang},{label:"Elixir",key:"elixir",module:elixir},{label:"Diff",key:"diff",module:diff},{label:"SQL",key:"sql",module:sql},{label:"cURL",key:"curl",module:curl},{label:"HTML",key:"html",module:xml},{label:"XML",key:"xml",module:xml}];export default registry;
1
+ import bash from"highlight.js/lib/languages/bash";import cpp from"highlight.js/lib/languages/cpp";import csharp from"highlight.js/lib/languages/csharp";import css from"highlight.js/lib/languages/css";import dart from"highlight.js/lib/languages/dart";import dos from"highlight.js/lib/languages/dos";import diff from"highlight.js/lib/languages/diff";import erlang from"highlight.js/lib/languages/erlang";import elixir from"highlight.js/lib/languages/elixir";import plaintext from"highlight.js/lib/languages/plaintext";import go from"highlight.js/lib/languages/go";import http from"highlight.js/lib/languages/http";import java from"highlight.js/lib/languages/java";import javascript from"highlight.js/lib/languages/javascript";import typescript from"highlight.js/lib/languages/typescript";import json from"highlight.js/lib/languages/json";import objectivec from"highlight.js/lib/languages/objectivec";import php from"highlight.js/lib/languages/php";import python from"highlight.js/lib/languages/python";import ruby from"highlight.js/lib/languages/ruby";import swift from"highlight.js/lib/languages/swift";import kotlin from"highlight.js/lib/languages/kotlin";import sql from"highlight.js/lib/languages/sql";import xml from"highlight.js/lib/languages/xml";import yaml from"highlight.js/lib/languages/yaml";import curl from"highlightjs-curl/src/languages/curl";const registry=[{label:"Text",key:"text",module:plaintext},{label:"JS",key:"javascript",module:javascript},{label:"TS",key:"typescript",module:typescript},{label:"Java",key:"java",module:java},{label:"Ruby",key:"ruby",module:ruby},{label:"Python",key:"python",module:python},{label:"PHP",key:"php",module:php},{label:"Shell",key:"bash",module:bash},{label:"C#",key:"cs",module:csharp},{label:"CSS",key:"css",module:css},{label:"Go",key:"go",module:go},{label:"HTML",key:"xml",module:xml},{label:"HTTP",key:"http",module:http},{label:"C++",key:"cpp",module:cpp},{label:"Dart",key:"dart",module:dart},{label:"Swift",key:"swift",module:swift},{label:"Kotlin",key:"kotlin",module:kotlin},{label:"Objective C",key:"objectivec",module:objectivec},{label:"Node.js",key:"javascript",module:javascript},{label:"JSON",key:"json",module:json},{label:"DOS",key:"dos",module:dos},{label:"YAML",key:"yaml",module:yaml},{label:"Erlang",key:"erlang",module:erlang},{label:"Elixir",key:"elixir",module:elixir},{label:"Diff",key:"diff",module:diff},{label:"SQL",key:"sql",module:sql},{label:"cURL",key:"curl",module:curl},{label:"HTML",key:"html",module:xml},{label:"XML",key:"xml",module:xml}];export default registry;
@@ -1 +1 @@
1
- import hljs from"highlight.js/lib/core";var languageToHighlightKey=function(lang){var id;if(!lang){lang="text"}switch(lang.toLowerCase()){case"android":id="java";break;case".net":case"net":case"dotnet":case"csharp":case"c#":id="cs";break;case"objc":case"objective c":id="objectivec";break;case"laravel":id="php";break;case"flutter":id="dart";break;case"node.js":case"js":id="javascript";break;case"ts":id="typescript";break;case"kotlin":case"kt":id="kotlin";break;case"shell":case"fh":case"sh":id="bash";break;case"https":case"http":case"txt":case"plaintext":id="text";break;case"cmd":case"bat":id="dos";break;case"yml":id="yaml";break;case"erl":id="erlang";break;case"patch":id="diff";break;case"svg":id="xml";break;default:break}return id||lang};var registerDefaultLanguages=function(register){register.forEach(function(param){var key=param.key,module=param.module;return hljs.registerLanguage(key,module)})};var highlightSnippet=function(languageKeyword,snippet){var language=languageToHighlightKey(languageKeyword);if(typeof snippet!=="string"||!snippet||!language)return;return hljs.highlight(snippet,{language:language}).value};export{highlightSnippet,languageToHighlightKey,registerDefaultLanguages};
1
+ import hljs from"highlight.js/lib/core";const languageToHighlightKey=lang=>{let id;if(!lang){lang="text"}switch(lang.toLowerCase()){case"android":id="java";break;case".net":case"net":case"dotnet":case"csharp":case"c#":id="cs";break;case"objc":case"objective c":id="objectivec";break;case"laravel":id="php";break;case"flutter":id="dart";break;case"node.js":case"js":id="javascript";break;case"ts":id="typescript";break;case"kotlin":case"kt":id="kotlin";break;case"shell":case"fh":case"sh":id="bash";break;case"https":case"http":case"txt":case"plaintext":id="text";break;case"cmd":case"bat":id="dos";break;case"yml":id="yaml";break;case"erl":id="erlang";break;case"patch":id="diff";break;case"svg":id="xml";break;default:break}return id||lang};const registerDefaultLanguages=register=>{register.forEach(({key,module})=>hljs.registerLanguage(key,module))};const highlightSnippet=(languageKeyword,snippet)=>{const language=languageToHighlightKey(languageKeyword);if(typeof snippet!=="string"||!snippet||!language)return;return hljs.highlight(snippet,{language}).value};export{highlightSnippet,languageToHighlightKey,registerDefaultLanguages};
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@ably/ui",
3
- "version": "14.0.0-dev.58ef698",
3
+ "version": "14.0.0-dev.64a4085",
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
- "type": "module",
6
5
  "repository": {
7
6
  "type": "git",
8
7
  "url": "git+ssh://git@github.com/ably/ably-ui.git"
@@ -47,7 +46,7 @@
47
46
  "vite": "^4.5.2"
48
47
  },
49
48
  "scripts": {
50
- "build:prebuild": "rm -r core reset",
49
+ "build:prebuild": "rm -rf core reset",
51
50
  "build:swc": "swc src/core src/reset -d dist --copy-files --include-dotfiles --strip-leading-paths",
52
51
  "build:sprites": "svg-sprite -C .svgrc src/core/icons/*.svg",
53
52
  "build:cleanup": "mv dist/* . && rm -r dist",
package/src/.DS_Store CHANGED
Binary file
Binary file
Binary file
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import Accordion, { AccordionProps } from "./component.tsx";
2
+ import Accordion, { AccordionProps } from "../Accordion";
3
3
 
4
4
  export default {
5
5
  title: "Components/Accordion",
@@ -1,5 +1,5 @@
1
1
  import React, { useState, ReactNode, JSX } from "react";
2
- import Icon from "../Icon/component.tsx";
2
+ import Icon from "./Icon";
3
3
 
4
4
  type AccordionData = {
5
5
  name: string;
@@ -7,14 +7,14 @@ type AccordionData = {
7
7
  };
8
8
 
9
9
  type AccordionRowProps = {
10
- bottomBorder: boolean;
11
- topBorder: boolean;
10
+ bottomBorder?: boolean;
11
+ topBorder?: boolean;
12
12
  active: boolean;
13
13
  last: boolean;
14
14
  name: string;
15
15
  index;
16
16
  children: ReactNode;
17
- arrowIcon: boolean;
17
+ arrowIcon?: boolean;
18
18
  setActiveIndex: (index: number) => void;
19
19
  };
20
20
 
@@ -80,7 +80,7 @@ const AccordionRow = ({
80
80
  onClick={handleSetIndex}
81
81
  className={`flex w-full px-0 focus:outline-none py-20`}
82
82
  >
83
- <span className="ui-text-p1 font-bold text-left mr-8">{name}</span>
83
+ <span className="ui-text-p1 !font-bold text-left mr-8">{name}</span>
84
84
  <span className="ml-auto">{active ? iconActive : iconInactive}</span>
85
85
  </button>
86
86
 
@@ -105,7 +105,7 @@ const Accordion = ({
105
105
  arrowIcon,
106
106
  autoClose,
107
107
  }: AccordionProps) => {
108
- const [activeIndexes, setActiveIndexes] = useState([]);
108
+ const [activeIndexes, setActiveIndexes] = useState<number[]>([]);
109
109
 
110
110
  const handleSetIndex = (index: number) => {
111
111
  const currentIndexIsActive = activeIndexes.includes(index);
Binary file
@@ -1,4 +1,4 @@
1
- import Code from "./component.tsx";
1
+ import Code from "../Code";
2
2
 
3
3
  export default {
4
4
  title: "Components/Code",
@@ -1,11 +1,11 @@
1
1
  import React from "react";
2
2
 
3
- import "../utils/syntax-highlighter.css";
3
+ import "./utils/syntax-highlighter.css";
4
4
  import {
5
5
  highlightSnippet,
6
6
  registerDefaultLanguages,
7
- } from "../utils/syntax-highlighter";
8
- import languagesRegistry from "../utils/syntax-highlighter-registry";
7
+ } from "./utils/syntax-highlighter";
8
+ import languagesRegistry from "./utils/syntax-highlighter-registry";
9
9
 
10
10
  registerDefaultLanguages(languagesRegistry);
11
11
 
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
 
3
- import { connectState, getRemoteDataStore } from "../remote-data-store";
3
+ import { connectState, getRemoteDataStore } from "./remote-data-store";
4
4
 
5
5
  /*
6
6
  Connect a react component to a global store.
Binary file
@@ -1,4 +1,4 @@
1
- import ContactFooter from "./component.tsx";
1
+ import ContactFooter from "../ContactFooter";
2
2
 
3
3
  export default {
4
4
  title: "Components/Contact Footer",
@@ -1,9 +1,9 @@
1
1
  import React, { useEffect } from "react";
2
2
 
3
- import Icon from "../Icon/component.tsx";
4
- import _absUrl from "../url-base.js";
5
- import toggleChatWidget from "../hubspot-chat-toggle";
6
- import "./component.css";
3
+ import Icon from "./Icon";
4
+ import _absUrl from "./url-base.js";
5
+ import toggleChatWidget from "./hubspot-chat-toggle";
6
+ import "./ContactFooter/component.css";
7
7
 
8
8
  type ContactFooterProps = {
9
9
  urlBase: string;
Binary file
@@ -1,4 +1,4 @@
1
- import CookieMessage from "./component.tsx";
1
+ import CookieMessage from "../CookieMessage";
2
2
 
3
3
  export default {
4
4
  title: "Components/Cookie Message",
@@ -1,8 +1,8 @@
1
1
  import React, { useRef, useEffect, useState } from "react";
2
2
  import Cookie from "js-cookie";
3
- import "./component.css";
4
3
 
5
- import _absUrl from "../url-base";
4
+ import "./CookieMessage/component.css";
5
+ import _absUrl from "./url-base";
6
6
 
7
7
  const COOKIE_EXPIRY = 365;
8
8
 
Binary file
@@ -1,4 +1,4 @@
1
- import CustomerLogos from "./component.tsx";
1
+ import CustomerLogos from "../CustomerLogos";
2
2
 
3
3
  import hubspot from "../images/cust-logo-hubspot-mono-pos.svg";
4
4
  import webflow from "../images/cust-logo-webflow-col-pos.svg";
Binary file
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import Icon from "../Icon/component.tsx";
3
- import DropdownMenu from "./component.tsx";
2
+ import Icon from "../Icon";
3
+ import DropdownMenu from "../DropdownMenu";
4
4
 
5
5
  export default {
6
6
  title: "Components/Dropdown Menu",
@@ -7,7 +7,7 @@ import React, {
7
7
  ReactNode,
8
8
  Dispatch,
9
9
  } from "react";
10
- import Icon from "../Icon/component.tsx";
10
+ import Icon from "./Icon";
11
11
 
12
12
  const DropdownMenuContext = createContext<{
13
13
  isOpen: boolean;
@@ -0,0 +1,118 @@
1
+ import React from "react";
2
+ import Expander from "../Expander";
3
+
4
+ export default {
5
+ title: "Components/Expander",
6
+ component: Expander,
7
+ tags: ["autodocs"],
8
+ args: {
9
+ height: 200,
10
+ },
11
+ argTypes: {
12
+ height: {
13
+ control: {
14
+ type: "number",
15
+ },
16
+ },
17
+ },
18
+ };
19
+
20
+ export const LongContent = {
21
+ render: () => (
22
+ <Expander>
23
+ <div>
24
+ <p>Ipsum</p>
25
+ <ul className="mb-16 list-inside list-disc">
26
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
27
+ <li>
28
+ Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.
29
+ </li>
30
+ <li>Mauris molestie felis et scelerisque ullamcorper.</li>
31
+ <li>Maecenas congue ligula ut commodo tristique.</li>
32
+ <li>
33
+ Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
34
+ venenatis.
35
+ </li>
36
+ <li>Donec nec turpis vel urna egestas fringilla.</li>
37
+ </ul>
38
+ <p>Ipsum</p>
39
+ <ul className="mb-16 list-inside list-disc">
40
+ <li>Mauris ut nibh vel metus cursus semper.</li>
41
+ <li>Ut mattis tortor eu urna accumsan gravida.</li>
42
+ <li>Nunc pellentesque neque at elit pretium tempor.</li>
43
+ <li>Curabitur finibus magna vitae nunc varius fermentum.</li>
44
+ </ul>
45
+ <ul className="mb-16 list-inside list-disc">
46
+ <li>
47
+ Curabitur vehicula mi iaculis, luctus augue eu, venenatis quam.
48
+ </li>
49
+ <li>Praesent in eros efficitur, consequat ante eu, faucibus arcu.</li>
50
+ <li>Nulla laoreet nibh a odio interdum, non molestie diam auctor.</li>
51
+ </ul>
52
+ <p>Ipsum</p>
53
+ <ul className="mb-16 list-inside list-disc">
54
+ <li>
55
+ Praesent aliquam diam tincidunt, sollicitudin tortor eget, vulputate
56
+ lacus.
57
+ </li>
58
+ <li>Quisque in mi sed ex vulputate varius in a leo.</li>
59
+ <li>Etiam posuere dolor at tortor aliquam imperdiet.</li>
60
+ <li>
61
+ Maecenas quis neque consequat, ultricies est sit amet, congue est.
62
+ </li>
63
+ <li>Aenean a elit sed nibh pretium lacinia sed convallis sapien.</li>
64
+ </ul>
65
+ <p>Ipsum</p>
66
+ <ul className="mb-16 list-inside list-disc">
67
+ <li>
68
+ Nulla malesuada libero id dolor aliquam, non sagittis mi
69
+ scelerisque.
70
+ </li>
71
+ <li>
72
+ Etiam tincidunt lacus eu diam laoreet consectetur sit amet non est.
73
+ </li>
74
+ <li>In porta arcu nec purus tincidunt vulputate.</li>
75
+ </ul>
76
+ </div>
77
+ </Expander>
78
+ ),
79
+ parameters: {
80
+ docs: {
81
+ description: {
82
+ story:
83
+ "A larger amount of content that exceeds the height cut-off, controls shown.",
84
+ },
85
+ },
86
+ },
87
+ };
88
+
89
+ export const ShortContent = {
90
+ render: () => (
91
+ <Expander>
92
+ <div>
93
+ <p>Ipsum</p>
94
+ <ul className="mb-16 list-inside list-disc">
95
+ <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
96
+ <li>
97
+ Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.
98
+ </li>
99
+ <li>Mauris molestie felis et scelerisque ullamcorper.</li>
100
+ <li>Maecenas congue ligula ut commodo tristique.</li>
101
+ <li>
102
+ Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
103
+ venenatis.
104
+ </li>
105
+ <li>Donec nec turpis vel urna egestas fringilla.</li>
106
+ </ul>
107
+ </div>
108
+ </Expander>
109
+ ),
110
+ parameters: {
111
+ docs: {
112
+ description: {
113
+ story:
114
+ "A smaller amount of content that doesn't exceed the height cut-off, therefore no controls shown.",
115
+ },
116
+ },
117
+ },
118
+ };
@@ -0,0 +1,46 @@
1
+ import React, { PropsWithChildren, useEffect, useRef, useState } from "react";
2
+
3
+ type ExpanderProps = {
4
+ height?: number;
5
+ };
6
+
7
+ const Expander = ({
8
+ height = 200,
9
+ children,
10
+ }: PropsWithChildren<ExpanderProps>) => {
11
+ const innerRef = useRef<HTMLDivElement>(null);
12
+ const [contentHeight, setContentHeight] = useState(height);
13
+ const [expanded, setExpanded] = useState(false);
14
+
15
+ useEffect(() => {
16
+ setContentHeight(innerRef.current?.clientHeight ?? height);
17
+ }, [height, expanded]);
18
+
19
+ const showControls = contentHeight > height;
20
+
21
+ return (
22
+ <>
23
+ <div
24
+ style={{ height: expanded ? contentHeight : height }}
25
+ className="overflow-hidden transition-all relative"
26
+ >
27
+ {showControls && !expanded && (
28
+ <div className="h-64 w-full bg-gradient-to-t from-white to-transparent absolute bottom-0"></div>
29
+ )}
30
+ <div ref={innerRef}>{children}</div>
31
+ </div>
32
+ {showControls && (
33
+ <div
34
+ onClick={() => setExpanded(!expanded)}
35
+ onKeyDown={(e) => e.key === "Enter" && setExpanded(!expanded)}
36
+ tabIndex={0}
37
+ className="mt-16 cursor-pointer font-bold text-gui-blue-default-light hover:text-gui-blue-hover-light active:text-gui-blue-active-light focus:text-gui-blue-focus"
38
+ >
39
+ {expanded ? "View less -" : "View all +"}
40
+ </div>
41
+ )}
42
+ </>
43
+ );
44
+ };
45
+
46
+ export default Expander;
Binary file
@@ -1,4 +1,4 @@
1
- import FeaturedLink from "./component.tsx";
1
+ import FeaturedLink from "../FeaturedLink";
2
2
 
3
3
  export default {
4
4
  title: "Components/Featured Link",
@@ -1,6 +1,6 @@
1
1
  import React, { CSSProperties, ReactNode } from "react";
2
2
 
3
- import Icon from "../Icon/component.tsx";
3
+ import Icon from "./Icon";
4
4
 
5
5
  type FeaturedLinkProps = {
6
6
  url: string;
Binary file
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import Flash, { reducerFlashes } from "./component.tsx";
2
+ import Flash, { reducerFlashes } from "../Flash";
3
3
 
4
4
  import {
5
5
  attachStoreToWindow,
@@ -2,10 +2,10 @@ import React, { useEffect, useState, useRef } from "react";
2
2
  import DOMPurify from "dompurify";
3
3
  import { nanoid } from "nanoid/non-secure";
4
4
 
5
- import { getRemoteDataStore } from "../remote-data-store.js";
6
- import ConnectStateWrapper from "../ConnectStateWrapper/component.tsx";
7
- import Icon from "../Icon/component.tsx";
8
- import "./component.css";
5
+ import { getRemoteDataStore } from "./remote-data-store.js";
6
+ import ConnectStateWrapper from "./ConnectStateWrapper";
7
+ import Icon from "./Icon";
8
+ import "./Flash/component.css";
9
9
 
10
10
  type FlashProps = {
11
11
  id: string;
Binary file
@@ -1,4 +1,4 @@
1
- import Footer from "./component.tsx";
1
+ import Footer from "../Footer";
2
2
 
3
3
  import ablyStack from "../images/ably-stack.svg";
4
4
  import highestPerformer from "../images/high-performer-2023.svg";
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
 
3
- import Icon from "../Icon/component.tsx";
4
- import _absUrl from "../url-base.js";
5
- import "./component.css";
3
+ import Icon from "./Icon";
4
+ import _absUrl from "./url-base.js";
5
+ import "./Footer/component.css";
6
6
 
7
7
  type FooterProps = {
8
8
  paths: {
Binary file
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import Icon from "./component.tsx";
2
+ import Icon from "../Icon";
3
3
 
4
4
  export default {
5
5
  title: "Components/Icon",
@@ -38,6 +38,7 @@ const coreIcons = [
38
38
  "icon-gui-link-arrow",
39
39
  "icon-gui-live-chat",
40
40
  "icon-gui-minus",
41
+ "icon-gui-partial",
41
42
  "icon-gui-plus",
42
43
  "icon-gui-quote-marks-solid",
43
44
  "icon-gui-refresh",
Binary file
@@ -1,4 +1,4 @@
1
- import Loader from "./component.tsx";
1
+ import Loader from "../Loader";
2
2
 
3
3
  export default {
4
4
  title: "Components/Loader",
Binary file
@@ -1,4 +1,4 @@
1
- import Logo from "./component.tsx";
1
+ import Logo from "../Logo";
2
2
  import logoUrl from "../images/ably-logo.png";
3
3
 
4
4
  export default {
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect } from "react";
2
2
  import { rest } from "msw";
3
3
 
4
- import Meganav from "./component.tsx";
4
+ import Meganav from "../Meganav";
5
5
  import loadIcons from "../icons.js";
6
6
  import logo from "../images/ably-logo.png";
7
7
  import ablyStack from "../images/ably-stack.svg";
@@ -1,24 +1,22 @@
1
1
  import React, { ReactNode, useEffect, useState } from "react";
2
2
 
3
- import { connectState } from "../remote-data-store.js";
4
- import { selectSessionData } from "../remote-session-data.js";
5
-
6
- import Logo from "../Logo/component.tsx";
7
- import "./component.css";
8
-
9
- import MeganavScripts from "./component.js";
10
- import MeganavItemsDesktop from "../MeganavItemsDesktop/component.tsx";
11
- import MeganavItemsSignedIn from "../MeganavItemsSignedIn/component.tsx";
12
- import MeganavItemsMobile from "../MeganavItemsMobile/component.tsx";
13
- import Notice from "../Notice/component.tsx";
14
- import MeganavData from "./component.json";
15
- import _absUrl from "../url-base.js";
16
-
17
- import MeganavContentProducts from "../MeganavContentProducts/component.tsx";
18
- import MeganavContentUseCases from "../MeganavContentUseCases/component.tsx";
19
- import MeganavContentCompany from "../MeganavContentCompany/component.tsx";
20
- import MeganavContentDevelopers from "../MeganavContentDevelopers/component.tsx";
21
- import MeganavSearch from "../MeganavSearch/component.tsx";
3
+ import { connectState } from "./remote-data-store.js";
4
+ import { selectSessionData } from "./remote-session-data.js";
5
+
6
+ import Logo from "./Logo";
7
+ import "./Meganav/component.css";
8
+ import MeganavData from "./Meganav/component.json";
9
+ import MeganavScripts from "./Meganav/component.js";
10
+ import MeganavItemsDesktop from "./MeganavItemsDesktop";
11
+ import MeganavItemsSignedIn from "./MeganavItemsSignedIn";
12
+ import MeganavItemsMobile from "./MeganavItemsMobile";
13
+ import Notice from "./Notice";
14
+ import _absUrl from "./url-base.js";
15
+ import MeganavContentProducts from "./MeganavContentProducts";
16
+ import MeganavContentUseCases from "./MeganavContentUseCases";
17
+ import MeganavContentCompany from "./MeganavContentCompany";
18
+ import MeganavContentDevelopers from "./MeganavContentDevelopers";
19
+ import MeganavSearch from "./MeganavSearch";
22
20
 
23
21
  export type MeganavTheme = {
24
22
  backgroundColor?: string;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
- import FeaturedLink from "../FeaturedLink/component.tsx";
4
- import { AbsUrl } from "../Meganav/component.tsx";
3
+ import FeaturedLink from "./FeaturedLink";
4
+ import { AbsUrl } from "./Meganav";
5
5
 
6
6
  type MeganavBlogPostsListProps = {
7
7
  recentBlogPosts: {
@@ -1,10 +1,10 @@
1
1
  import React from "react";
2
2
 
3
- import MeganavBlogPostsList from "../MeganavBlogPostsList/component.tsx";
4
- import ConnectStateWrapper from "../ConnectStateWrapper/component.tsx";
5
- import { selectRecentBlogPosts } from "../remote-blogs-posts.js";
6
- import Icon from "../Icon/component.tsx";
7
- import { AbsUrl } from "../Meganav/component.tsx";
3
+ import MeganavBlogPostsList from "./MeganavBlogPostsList";
4
+ import ConnectStateWrapper from "./ConnectStateWrapper";
5
+ import { selectRecentBlogPosts } from "./remote-blogs-posts.js";
6
+ import Icon from "./Icon";
7
+ import { AbsUrl } from "./Meganav";
8
8
 
9
9
  type MeganavContentCompanyProps = {
10
10
  absUrl: AbsUrl;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
- import Icon from "../Icon/component.tsx";
4
- import { AbsUrl } from "../Meganav/component.tsx";
3
+ import Icon from "./Icon";
4
+ import { AbsUrl } from "./Meganav";
5
5
 
6
6
  const MeganavContentDevelopers = ({ absUrl }: { absUrl: AbsUrl }) => (
7
7
  <div className="flex max-w-screen-xl mx-auto">
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
- import FeaturedLink from "../FeaturedLink/component.tsx";
4
- import { AbsUrl } from "../Meganav/component.tsx";
3
+ import FeaturedLink from "./FeaturedLink";
4
+ import { AbsUrl } from "./Meganav";
5
5
 
6
6
  type MeganavContentProductsProps = {
7
7
  paths: {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
- import Icon from "../Icon/component.tsx";
4
- import { AbsUrl } from "../Meganav/component.tsx";
3
+ import Icon from "./Icon";
4
+ import { AbsUrl } from "./Meganav";
5
5
 
6
6
  const MeganavContentUseCases = ({ absUrl }: { absUrl: AbsUrl }) => (
7
7
  <div className="flex max-w-screen-xl mx-auto">
@@ -1,7 +1,7 @@
1
1
  import React, { ReactNode } from "react";
2
2
 
3
- import Icon from "../Icon/component.tsx";
4
- import { MeganavTheme } from "../Meganav/component.tsx";
3
+ import Icon from "./Icon";
4
+ import { MeganavTheme } from "./Meganav";
5
5
 
6
6
  type MeganavControlProps = {
7
7
  ariaControls: string;