@ably/ui 13.3.0 → 14.0.0-dev.0ed6be7
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.
- package/README.md +25 -152
- package/core/.DS_Store +0 -0
- package/core/Accordion/.DS_Store +0 -0
- package/core/Accordion.js +1 -0
- package/core/Code/.DS_Store +0 -0
- package/core/Code/component.css +1 -72
- package/core/Code/component.js +1 -1
- package/core/Code.js +1 -0
- package/core/ConnectStateWrapper/component.js +0 -1
- package/core/ConnectStateWrapper.js +1 -0
- package/core/ContactFooter/.DS_Store +0 -0
- package/core/ContactFooter/component.css +7 -10
- package/core/ContactFooter/component.js +1 -1
- package/core/ContactFooter.js +1 -0
- package/core/CookieMessage/.DS_Store +0 -0
- package/core/CookieMessage/component.css +10 -13
- package/core/CookieMessage/component.js +1 -1
- package/core/CookieMessage.js +1 -0
- package/core/CustomerLogos/.DS_Store +0 -0
- package/core/CustomerLogos/component.js +0 -1
- package/core/CustomerLogos.js +1 -0
- package/core/DropdownMenu/.DS_Store +0 -0
- package/core/DropdownMenu/component.js +0 -1
- package/core/DropdownMenu.js +1 -0
- package/core/FeaturedLink/.DS_Store +0 -0
- package/core/FeaturedLink/component.js +0 -1
- package/core/FeaturedLink.js +1 -0
- package/core/Flash/.DS_Store +0 -0
- package/core/Flash/component.css +19 -22
- package/core/Flash/component.js +1 -1
- package/core/Flash.js +1 -0
- package/core/Footer/.DS_Store +0 -0
- package/core/Footer/component.css +22 -25
- package/core/Footer/component.js +1 -1
- package/core/Footer.js +1 -0
- package/core/Icon/.DS_Store +0 -0
- package/core/Icon/component.js +0 -1
- package/core/Icon.js +1 -0
- package/core/Loader/.DS_Store +0 -0
- package/core/Loader/component.js +0 -1
- package/core/Loader.js +13 -0
- package/core/Logo/.DS_Store +0 -0
- package/core/Logo/component.js +0 -1
- package/core/Logo.js +1 -0
- package/core/Meganav/.DS_Store +0 -0
- package/core/Meganav/component.css +103 -106
- package/core/Meganav/component.js +1 -1
- package/core/Meganav.js +1 -0
- package/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/core/MeganavBlogPostsList/component.js +1 -2
- package/core/MeganavBlogPostsList.js +1 -0
- package/core/MeganavContentCompany/.DS_Store +0 -0
- package/core/MeganavContentCompany/component.js +0 -1
- package/core/MeganavContentCompany.js +1 -0
- package/core/MeganavContentDevelopers/.DS_Store +0 -0
- package/core/MeganavContentDevelopers/component.js +0 -1
- package/core/MeganavContentDevelopers.js +1 -0
- package/core/MeganavContentProducts/.DS_Store +0 -0
- package/core/MeganavContentProducts/component.js +0 -1
- package/core/MeganavContentProducts.js +1 -0
- package/core/MeganavContentUseCases/.DS_Store +0 -0
- package/core/MeganavContentUseCases/component.js +0 -1
- package/core/MeganavContentUseCases.js +1 -0
- package/core/MeganavControl/.DS_Store +0 -0
- package/core/MeganavControl/component.js +1 -1
- package/core/MeganavControl.js +1 -0
- package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/core/MeganavControlMobileDropdown/component.js +1 -1
- package/core/MeganavControlMobileDropdown.js +1 -0
- package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelClose/component.js +1 -1
- package/core/MeganavControlMobilePanelClose.js +1 -0
- package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelOpen/component.js +1 -1
- package/core/MeganavControlMobilePanelOpen.js +1 -0
- package/core/MeganavItemsDesktop/.DS_Store +0 -0
- package/core/MeganavItemsDesktop/component.js +0 -1
- package/core/MeganavItemsDesktop.js +1 -0
- package/core/MeganavItemsMobile/.DS_Store +0 -0
- package/core/MeganavItemsMobile/component.js +0 -1
- package/core/MeganavItemsMobile.js +1 -0
- package/core/MeganavItemsSignedIn/.DS_Store +0 -0
- package/core/MeganavItemsSignedIn/component.js +0 -1
- package/core/MeganavItemsSignedIn.js +1 -0
- package/core/MeganavSearch/.DS_Store +0 -0
- package/core/MeganavSearch/component.js +0 -1
- package/core/MeganavSearch.js +1 -0
- package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/core/MeganavSearchAutocomplete/component.js +1 -1
- package/core/MeganavSearchAutocomplete.js +1 -0
- package/core/MeganavSearchPanel/.DS_Store +0 -0
- package/core/MeganavSearchPanel/component.js +0 -1
- package/core/MeganavSearchPanel.js +1 -0
- package/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/core/MeganavSearchSuggestions/component.js +1 -1
- package/core/MeganavSearchSuggestions.js +1 -0
- package/core/Notice/.DS_Store +0 -0
- package/core/Notice/component.css +4 -7
- package/core/Notice/component.js +1 -1
- package/core/Notice.js +1 -0
- package/core/SignOutLink/.DS_Store +0 -0
- package/core/SignOutLink/component.js +0 -1
- package/core/SignOutLink.js +1 -0
- package/core/Slider/.DS_Store +0 -0
- package/core/Slider/component.css +4 -7
- package/core/Slider/component.js +1 -1
- package/core/Slider.js +1 -0
- package/core/Table/.DS_Store +0 -0
- package/core/Table/Table.js +1 -0
- package/core/Table/TableCell.js +7 -0
- package/core/Table/TableRow.js +1 -0
- package/core/Table/data.js +1 -0
- package/core/Table.js +1 -0
- package/core/Tooltip.js +1 -0
- package/core/css.js +1 -0
- package/core/dom-query.js +1 -0
- package/core/hubspot-chat-toggle.js +1 -0
- package/core/icons/discord.svg +10 -0
- package/core/icons/facebook.svg +4 -0
- package/core/icons/github.svg +3 -0
- package/core/icons/glassdoor.svg +3 -0
- package/core/icons/google.svg +3 -0
- package/core/icons/icon-display-48hrs.svg +3 -0
- package/core/icons/icon-display-about-ably-col.svg +4 -0
- package/core/icons/icon-display-api-keys.svg +3 -0
- package/core/icons/icon-display-api.svg +3 -0
- package/core/icons/icon-display-asset-tracking-col.svg +18 -0
- package/core/icons/icon-display-browser.svg +10 -0
- package/core/icons/icon-display-calendar.svg +3 -0
- package/core/icons/icon-display-call-mobile.svg +3 -0
- package/core/icons/icon-display-careers-col.svg +9 -0
- package/core/icons/icon-display-case-studies-col.svg +5 -0
- package/core/icons/icon-display-chat-col.svg +4 -0
- package/core/icons/icon-display-chat-stack-col.svg +4 -0
- package/core/icons/icon-display-chat-stack.svg +4 -0
- package/core/icons/icon-display-cloud-servers.svg +3 -0
- package/core/icons/icon-display-compare-tech-col.svg +9 -0
- package/core/icons/icon-display-customers-col.svg +15 -0
- package/core/icons/icon-display-data-broadcast-col.svg +26 -0
- package/core/icons/icon-display-data-synchronization-col.svg +14 -0
- package/core/icons/icon-display-docs-col.svg +7 -0
- package/core/icons/icon-display-documentation.svg +3 -0
- package/core/icons/icon-display-events-col.svg +13 -0
- package/core/icons/icon-display-examples-col.svg +11 -0
- package/core/icons/icon-display-gdpr.svg +3 -0
- package/core/icons/icon-display-general-comms.svg +3 -0
- package/core/icons/icon-display-hipaa.svg +10 -0
- package/core/icons/icon-display-integrations-col.svg +8 -0
- package/core/icons/icon-display-it-support-access.svg +3 -0
- package/core/icons/icon-display-it-support-helpdesk.svg +3 -0
- package/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
- package/core/icons/icon-display-laptop.svg +10 -0
- package/core/icons/icon-display-lightbulb-col.svg +10 -0
- package/core/icons/icon-display-live-chat.svg +3 -0
- package/core/icons/icon-display-map-pin.svg +3 -0
- package/core/icons/icon-display-message.svg +3 -0
- package/core/icons/icon-display-padlock-closed.svg +3 -0
- package/core/icons/icon-display-platform.svg +22 -0
- package/core/icons/icon-display-play.svg +3 -0
- package/core/icons/icon-display-privacy-shield-framework.svg +7 -0
- package/core/icons/icon-display-push-notifications-col.svg +6 -0
- package/core/icons/icon-display-quickstart-guides-col.svg +8 -0
- package/core/icons/icon-display-resources-col.svg +21 -0
- package/core/icons/icon-display-sdks-col.svg +11 -0
- package/core/icons/icon-display-servers.svg +3 -0
- package/core/icons/icon-display-shopping-cart.svg +10 -0
- package/core/icons/icon-display-sla.svg +3 -0
- package/core/icons/icon-display-soc2-type2.svg +3 -0
- package/core/icons/icon-display-tech-account-comms.svg +3 -0
- package/core/icons/icon-display-tutorials-demos-col.svg +25 -0
- package/core/icons/icon-display-virtual-events-col.svg +12 -0
- package/core/icons/icon-display-virtual-events.svg +12 -0
- package/core/icons/icon-gui-ably-badge.svg +3 -0
- package/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +3 -0
- package/core/icons/icon-gui-arrow-bidirectional-vertical.svg +3 -0
- package/core/icons/icon-gui-arrow-down.svg +3 -0
- package/core/icons/icon-gui-arrow-left.svg +3 -0
- package/core/icons/icon-gui-arrow-right.svg +3 -0
- package/core/icons/icon-gui-arrow-up.svg +3 -0
- package/core/icons/icon-gui-burger-menu.svg +5 -0
- package/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
- package/core/icons/icon-gui-check-circled-fill.svg +4 -0
- package/core/icons/icon-gui-check-circled.svg +3 -0
- package/core/icons/icon-gui-checklist-checked.svg +3 -0
- package/core/icons/icon-gui-clock.svg +3 -0
- package/core/icons/icon-gui-close.svg +3 -0
- package/core/icons/icon-gui-copy.svg +10 -0
- package/core/icons/icon-gui-cross-circled-fill.svg +4 -0
- package/core/icons/icon-gui-cross-circled.svg +3 -0
- package/core/icons/icon-gui-dash-circled.svg +3 -0
- package/core/icons/icon-gui-disclosure-arrow.svg +3 -0
- package/core/icons/icon-gui-document-generic.svg +3 -0
- package/core/icons/icon-gui-enlarge.svg +3 -0
- package/core/icons/icon-gui-external-link.svg +3 -0
- package/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
- package/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
- package/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
- package/core/icons/icon-gui-history.svg +3 -0
- package/core/icons/icon-gui-info.svg +3 -0
- package/core/icons/icon-gui-link-arrow.svg +3 -0
- package/core/icons/icon-gui-link.svg +4 -0
- package/core/icons/icon-gui-live-chat.svg +3 -0
- package/core/icons/icon-gui-minus.svg +3 -0
- package/core/icons/icon-gui-plus.svg +3 -0
- package/core/icons/icon-gui-quote-marks-solid.svg +3 -0
- package/core/icons/icon-gui-refresh.svg +10 -0
- package/core/icons/icon-gui-resources.svg +3 -0
- package/core/icons/icon-gui-search.svg +3 -0
- package/core/icons/icon-gui-tick.svg +3 -0
- package/core/icons/icon-gui-warning.svg +5 -0
- package/core/icons/icon-live-updates-results-metrics-col.svg +26 -0
- package/core/icons/icon-multi-user-spaces-col.svg +13 -0
- package/core/icons/icon-social-x.svg +3 -0
- package/core/icons/icon-tech-apachekafka.svg +3 -0
- package/core/icons/linkedin.svg +3 -0
- package/core/icons/quote.svg +3 -0
- package/core/icons/stackoverflow.svg +3 -0
- package/core/icons/twitter.svg +3 -0
- package/core/icons/youtube.svg +11 -0
- package/core/icons.js +1 -0
- package/core/load-sprites.js +1 -0
- package/core/react-renderer.js +1 -0
- package/core/remote-blogs-posts.js +1 -0
- package/core/remote-data-store.js +1 -0
- package/core/remote-data-util.js +1 -0
- package/core/remote-session-data.js +1 -0
- package/core/scripts.js +1 -2
- package/core/sprites.svg +1 -525
- package/core/styles/buttons.css +122 -0
- package/core/styles/forms.css +62 -0
- package/core/styles/layout.css +19 -0
- package/core/styles/properties.css +276 -0
- package/core/styles/text.css +166 -0
- package/core/styles.base.css +1 -0
- package/core/styles.components.css +33 -0
- package/core/styles.css +2 -699
- package/core/url-base.js +1 -0
- package/core/utils/syntax-highlighter-registry.js +1 -0
- package/core/utils/syntax-highlighter.css +67 -0
- package/core/utils/syntax-highlighter.js +1 -0
- package/package.json +38 -34
- package/reset/scripts.js +1 -1
- package/reset/styles/normalize.css +353 -0
- package/reset/styles/reset.css +129 -0
- package/reset/styles.css +2 -477
- package/src/.DS_Store +0 -0
- package/src/core/.DS_Store +0 -0
- package/src/core/Accordion/.DS_Store +0 -0
- package/src/core/Accordion/Accordion.stories.tsx +39 -0
- package/src/core/Accordion.tsx +147 -0
- package/src/core/Code/.DS_Store +0 -0
- package/src/core/Code/Code.stories.tsx +71 -0
- package/src/core/Code.tsx +45 -0
- package/src/core/{ConnectStateWrapper/component.jsx → ConnectStateWrapper.tsx} +7 -3
- package/src/core/ContactFooter/.DS_Store +0 -0
- package/src/core/ContactFooter/ContactFooter.stories.tsx +11 -0
- package/src/core/ContactFooter/component.css +7 -9
- package/src/core/ContactFooter.tsx +92 -0
- package/src/core/CookieMessage/.DS_Store +0 -0
- package/src/core/CookieMessage/CookieMessage.stories.tsx +12 -0
- package/src/core/CookieMessage/component.css +10 -12
- package/src/core/{CookieMessage/component.jsx → CookieMessage.tsx} +15 -10
- package/src/core/CustomerLogos/.DS_Store +0 -0
- package/src/core/CustomerLogos/CustomerLogos.stories.tsx +43 -0
- package/src/core/CustomerLogos.tsx +35 -0
- package/src/core/DropdownMenu/.DS_Store +0 -0
- package/src/core/DropdownMenu/DropdownMenu.stories.tsx +48 -0
- package/src/core/{DropdownMenu/component.jsx → DropdownMenu.tsx} +64 -36
- package/src/core/FeaturedLink/.DS_Store +0 -0
- package/src/core/FeaturedLink/FeaturedLink.stories.tsx +43 -0
- package/src/core/{FeaturedLink/component.jsx → FeaturedLink.tsx} +26 -18
- package/src/core/Flash/.DS_Store +0 -0
- package/src/core/Flash/Flash.stories.tsx +37 -0
- package/src/core/Flash/component.css +19 -21
- package/src/core/{Flash/component.jsx → Flash.tsx} +78 -39
- package/src/core/Footer/.DS_Store +0 -0
- package/src/core/Footer/Footer.stories.tsx +26 -0
- package/src/core/Footer/component.css +22 -24
- package/src/core/{Footer/component.jsx → Footer.tsx} +237 -70
- package/src/core/Icon/.DS_Store +0 -0
- package/src/core/Icon/Icon.stories.tsx +150 -0
- package/src/core/Icon.tsx +26 -0
- package/src/core/Loader/.DS_Store +0 -0
- package/src/core/Loader/Loader.stories.tsx +21 -0
- package/src/core/{Loader/component.jsx → Loader.tsx} +11 -8
- package/src/core/Logo/.DS_Store +0 -0
- package/src/core/Logo/Logo.stories.tsx +12 -0
- package/src/core/Logo.tsx +29 -0
- package/src/core/Meganav/.DS_Store +0 -0
- package/src/core/Meganav/Meganav.stories.tsx +86 -0
- package/src/core/Meganav/component.css +103 -105
- package/src/core/Meganav/component.js +6 -7
- package/src/core/Meganav.tsx +228 -0
- package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/src/core/{MeganavBlogPostsList/component.jsx → MeganavBlogPostsList.tsx} +15 -14
- package/src/core/MeganavContentCompany/.DS_Store +0 -0
- package/src/core/{MeganavContentCompany/component.jsx → MeganavContentCompany.tsx} +82 -33
- package/src/core/MeganavContentDevelopers/.DS_Store +0 -0
- package/src/core/{MeganavContentDevelopers/component.jsx → MeganavContentDevelopers.tsx} +98 -34
- package/src/core/MeganavContentProducts/.DS_Store +0 -0
- package/src/core/MeganavContentProducts.tsx +165 -0
- package/src/core/MeganavContentUseCases/.DS_Store +0 -0
- package/src/core/MeganavContentUseCases.tsx +244 -0
- package/src/core/MeganavControl/.DS_Store +0 -0
- package/src/core/{MeganavControl/component.jsx → MeganavControl.tsx} +18 -12
- package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/src/core/{MeganavControlMobileDropdown/component.jsx → MeganavControlMobileDropdown.tsx} +3 -7
- package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/src/core/{MeganavControlMobilePanelClose/component.jsx → MeganavControlMobilePanelClose.tsx} +16 -9
- package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/src/core/MeganavControlMobilePanelOpen.tsx +32 -0
- package/src/core/MeganavItemsDesktop/.DS_Store +0 -0
- package/src/core/MeganavItemsDesktop.tsx +68 -0
- package/src/core/MeganavItemsMobile/.DS_Store +0 -0
- package/src/core/MeganavItemsMobile.tsx +197 -0
- package/src/core/MeganavItemsSignedIn/.DS_Store +0 -0
- package/src/core/{MeganavItemsSignedIn/component.jsx → MeganavItemsSignedIn.tsx} +59 -23
- package/src/core/MeganavSearch/.DS_Store +0 -0
- package/src/core/MeganavSearch.tsx +36 -0
- package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/src/core/MeganavSearchAutocomplete.tsx +12 -0
- package/src/core/MeganavSearchPanel/.DS_Store +0 -0
- package/src/core/MeganavSearchPanel.tsx +52 -0
- package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/src/core/MeganavSearchSuggestions.tsx +62 -0
- package/src/core/Notice/.DS_Store +0 -0
- package/src/core/Notice/component.css +4 -6
- package/src/core/Notice/component.js +1 -1
- package/src/core/Notice.tsx +104 -0
- package/src/core/SignOutLink/.DS_Store +0 -0
- package/src/core/SignOutLink.tsx +51 -0
- package/src/core/Slider/.DS_Store +0 -0
- package/src/core/Slider/Slider.stories.tsx +45 -0
- package/src/core/Slider/component.css +4 -6
- package/src/core/Slider.tsx +112 -0
- package/src/core/Table/.DS_Store +0 -0
- package/src/core/Table/Table.stories.tsx +12 -0
- package/src/core/Table/Table.tsx +30 -0
- package/src/core/Table/TableCell.tsx +84 -0
- package/src/core/Table/TableRow.tsx +25 -0
- package/src/core/Table/data.tsx +113 -0
- package/src/core/Table.tsx +24 -0
- package/src/core/Tooltip/Tooltip.stories.tsx +27 -0
- package/src/core/Tooltip.tsx +60 -0
- package/src/core/icons.js +6 -0
- package/src/core/{react-renderer.js → react-renderer.tsx} +9 -7
- package/src/core/styles/buttons.css +121 -123
- package/src/core/styles/forms.css +49 -51
- package/src/core/styles/layout.css +14 -16
- package/src/core/styles/properties.css +250 -259
- package/src/core/styles/text.css +165 -167
- package/src/core/styles.components.css +22 -24
- package/src/core/utils/syntax-highlighter.css +55 -59
- package/src/pages/Buttons.mdx +121 -0
- package/src/pages/Chips.mdx +136 -0
- package/src/pages/Colour.mdx +23 -0
- package/src/pages/Forms.mdx +173 -0
- package/src/pages/Layout.mdx +58 -0
- package/src/pages/Typography.mdx +206 -0
- package/src/pages/utils.ts +70 -0
- package/tailwind.config.js +1 -7
- package/tailwind.extend.js +1 -1
- package/core/.gitignore +0 -1
- package/core/Code.jsx +0 -684
- package/core/CompanyAutocomplete/component.css +0 -46
- package/core/CompanyAutocomplete/component.js +0 -2
- package/core/CompanyAutocomplete/component.js.LICENSE.txt +0 -1
- package/core/ConnectStateWrapper.jsx +0 -222
- package/core/ContactFooter.jsx +0 -342
- package/core/CookieMessage.jsx +0 -204
- package/core/CustomerLogos.jsx +0 -144
- package/core/DropdownMenu.jsx +0 -313
- package/core/FeatureFooter/component.css +0 -13
- package/core/FeatureFooter/component.js +0 -1
- package/core/FeaturedLink.jsx +0 -241
- package/core/Flash.jsx +0 -622
- package/core/Footer.jsx +0 -587
- package/core/Icon.jsx +0 -152
- package/core/Loader.jsx +0 -154
- package/core/Logo.jsx +0 -147
- package/core/Meganav.jsx +0 -4151
- package/core/MeganavBlogPostsList/component.js.LICENSE.txt +0 -1
- package/core/MeganavBlogPostsList.jsx +0 -296
- package/core/MeganavContentCompany.jsx +0 -1058
- package/core/MeganavContentDevelopers.jsx +0 -334
- package/core/MeganavContentProducts.jsx +0 -373
- package/core/MeganavContentUseCases.jsx +0 -341
- package/core/MeganavControl.jsx +0 -199
- package/core/MeganavControlMobileDropdown.jsx +0 -197
- package/core/MeganavControlMobilePanelClose.jsx +0 -198
- package/core/MeganavControlMobilePanelOpen.jsx +0 -193
- package/core/MeganavItemsDesktop.jsx +0 -279
- package/core/MeganavItemsMobile.jsx +0 -689
- package/core/MeganavItemsSignedIn.jsx +0 -643
- package/core/MeganavSearch.jsx +0 -434
- package/core/MeganavSearchAutocomplete.jsx +0 -117
- package/core/MeganavSearchPanel.jsx +0 -386
- package/core/MeganavSearchSuggestions.jsx +0 -299
- package/core/Notice.jsx +0 -914
- package/core/Showcase/component.css +0 -31
- package/core/Showcase/component.js +0 -1
- package/core/Showcase.jsx +0 -17
- package/core/SignOutLink.jsx +0 -157
- package/core/Slider.jsx +0 -400
- package/core/Uptime/component.css +0 -128
- package/core/Uptime/component.js +0 -1
- package/core/Uptime.jsx +0 -895
- package/core/scripts.js.LICENSE.txt +0 -1
- package/preview/tmp/pids/.keep +0 -0
- package/reset/.gitignore +0 -1
- package/src/core/Code/component.html.erb +0 -3
- package/src/core/Code/component.jsx +0 -31
- package/src/core/Code/component.rb +0 -12
- package/src/core/CompanyAutocomplete/component.css +0 -45
- package/src/core/CompanyAutocomplete/component.js +0 -204
- package/src/core/ContactFooter/component.html.erb +0 -32
- package/src/core/ContactFooter/component.jsx +0 -66
- package/src/core/ContactFooter/component.rb +0 -13
- package/src/core/CustomerLogos/component.html.erb +0 -9
- package/src/core/CustomerLogos/component.jsx +0 -28
- package/src/core/CustomerLogos/component.rb +0 -14
- package/src/core/FeatureFooter/component.css +0 -12
- package/src/core/FeatureFooter/component.html.erb +0 -54
- package/src/core/FeatureFooter/component.js +0 -7
- package/src/core/FeatureFooter/component.rb +0 -30
- package/src/core/FeaturedLink/component.html.erb +0 -15
- package/src/core/FeaturedLink/component.rb +0 -21
- package/src/core/Footer/component.html.erb +0 -256
- package/src/core/Footer/component.rb +0 -14
- package/src/core/Icon/component.html.erb +0 -3
- package/src/core/Icon/component.jsx +0 -19
- package/src/core/Icon/component.rb +0 -25
- package/src/core/Loader/component.html.erb +0 -18
- package/src/core/Loader/component.rb +0 -19
- package/src/core/Logo/component.html.erb +0 -3
- package/src/core/Logo/component.jsx +0 -20
- package/src/core/Logo/component.rb +0 -31
- package/src/core/Meganav/component.html.erb +0 -31
- package/src/core/Meganav/component.jsx +0 -123
- package/src/core/Meganav/component.rb +0 -60
- package/src/core/MeganavBlogPostsList/component.html.erb +0 -5
- package/src/core/MeganavBlogPostsList/component.rb +0 -13
- package/src/core/MeganavContentCompany/component.html.erb +0 -90
- package/src/core/MeganavContentCompany/component.rb +0 -14
- package/src/core/MeganavContentDevelopers/component.html.erb +0 -129
- package/src/core/MeganavContentDevelopers/component.rb +0 -13
- package/src/core/MeganavContentProducts/component.html.erb +0 -83
- package/src/core/MeganavContentProducts/component.jsx +0 -105
- package/src/core/MeganavContentProducts/component.rb +0 -14
- package/src/core/MeganavContentUseCases/component.html.erb +0 -135
- package/src/core/MeganavContentUseCases/component.jsx +0 -147
- package/src/core/MeganavContentUseCases/component.rb +0 -13
- package/src/core/MeganavControl/component.html.erb +0 -6
- package/src/core/MeganavControl/component.rb +0 -20
- package/src/core/MeganavControlMobileDropdown/component.html.erb +0 -7
- package/src/core/MeganavControlMobileDropdown/component.rb +0 -11
- package/src/core/MeganavControlMobilePanelClose/component.html.erb +0 -12
- package/src/core/MeganavControlMobilePanelClose/component.rb +0 -12
- package/src/core/MeganavControlMobilePanelOpen/component.html.erb +0 -7
- package/src/core/MeganavControlMobilePanelOpen/component.jsx +0 -25
- package/src/core/MeganavControlMobilePanelOpen/component.rb +0 -9
- package/src/core/MeganavItemsDesktop/component.html.erb +0 -17
- package/src/core/MeganavItemsDesktop/component.jsx +0 -49
- package/src/core/MeganavItemsDesktop/component.rb +0 -23
- package/src/core/MeganavItemsMobile/component.html.erb +0 -75
- package/src/core/MeganavItemsMobile/component.jsx +0 -137
- package/src/core/MeganavItemsMobile/component.rb +0 -21
- package/src/core/MeganavItemsSignedIn/component.html.erb +0 -53
- package/src/core/MeganavItemsSignedIn/component.rb +0 -33
- package/src/core/MeganavSearch/component.html.erb +0 -15
- package/src/core/MeganavSearch/component.jsx +0 -33
- package/src/core/MeganavSearch/component.rb +0 -13
- package/src/core/MeganavSearchAutocomplete/component.html.erb +0 -6
- package/src/core/MeganavSearchAutocomplete/component.jsx +0 -14
- package/src/core/MeganavSearchAutocomplete/component.rb +0 -6
- package/src/core/MeganavSearchPanel/component.html.erb +0 -22
- package/src/core/MeganavSearchPanel/component.jsx +0 -39
- package/src/core/MeganavSearchPanel/component.rb +0 -13
- package/src/core/MeganavSearchSuggestions/component.html.erb +0 -22
- package/src/core/MeganavSearchSuggestions/component.jsx +0 -49
- package/src/core/MeganavSearchSuggestions/component.rb +0 -18
- package/src/core/Notice/component.html.erb +0 -16
- package/src/core/Notice/component.jsx +0 -71
- package/src/core/Notice/component.rb +0 -29
- package/src/core/Showcase/component.css +0 -30
- package/src/core/Showcase/component.html.erb +0 -76
- package/src/core/Showcase/component.js +0 -180
- package/src/core/Showcase/component.jsx +0 -0
- package/src/core/Showcase/component.rb +0 -190
- package/src/core/SignOutLink/component.html.erb +0 -1
- package/src/core/SignOutLink/component.jsx +0 -32
- package/src/core/SignOutLink/component.rb +0 -17
- package/src/core/Slider/component.html.erb +0 -28
- package/src/core/Slider/component.jsx +0 -86
- package/src/core/Slider/component.rb +0 -38
- package/src/core/Uptime/component.css +0 -127
- package/src/core/Uptime/component.html.erb +0 -0
- package/src/core/Uptime/component.js +0 -1
- package/src/core/Uptime/component.jsx +0 -183
- package/src/core/Uptime/component.rb +0 -7
- package/src/core/core.rb +0 -81
- /package/{preview/log/.keep → core/Accordion/component.js} +0 -0
- /package/{preview/tmp/.keep → src/core/Accordion/component.js} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type IconProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
size?: string;
|
|
6
|
+
color?: string;
|
|
7
|
+
additionalCSS?: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const Icon = ({
|
|
11
|
+
name,
|
|
12
|
+
size = "0.75rem",
|
|
13
|
+
color = "",
|
|
14
|
+
additionalCSS = "",
|
|
15
|
+
...additionalAttributes
|
|
16
|
+
}: IconProps) => (
|
|
17
|
+
<svg
|
|
18
|
+
className={`${color} ${additionalCSS}`}
|
|
19
|
+
style={{ width: size, height: size }}
|
|
20
|
+
{...additionalAttributes}
|
|
21
|
+
>
|
|
22
|
+
<use xlinkHref={`#sprite-${name}`} />
|
|
23
|
+
</svg>
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
export default Icon;
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import Loader from "./component.tsx";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "Components/Loader",
|
|
5
|
+
component: Loader,
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const Default = {};
|
|
10
|
+
|
|
11
|
+
export const ChangedRingColor = {
|
|
12
|
+
args: {
|
|
13
|
+
ringColor: "text-light-grey",
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const HalfSize = {
|
|
18
|
+
args: {
|
|
19
|
+
size: "0.75em",
|
|
20
|
+
},
|
|
21
|
+
};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import T from "prop-types";
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
type LoaderProps = {
|
|
4
|
+
size?: string;
|
|
5
|
+
ringColor?: string;
|
|
6
|
+
additionalCSS?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Loader = ({
|
|
10
|
+
ringColor = "text-dark-grey",
|
|
11
|
+
size = "1.5rem",
|
|
12
|
+
additionalCSS = "",
|
|
13
|
+
}: LoaderProps) => (
|
|
5
14
|
<svg
|
|
6
15
|
className={`${ringColor} ${additionalCSS}`}
|
|
7
16
|
style={{ width: size, height: size }}
|
|
@@ -40,10 +49,4 @@ const Loader = ({ ringColor = "text-dark-grey", size = "1.5rem", additionalCSS =
|
|
|
40
49
|
</svg>
|
|
41
50
|
);
|
|
42
51
|
|
|
43
|
-
Loader.propTypes = {
|
|
44
|
-
size: T.string,
|
|
45
|
-
ringColor: T.string,
|
|
46
|
-
additionalCSS: T.string,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
52
|
export default Loader;
|
|
Binary file
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type LogoProps = {
|
|
4
|
+
dataId: string;
|
|
5
|
+
logoUrl: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
additionalImgAttrs?: object;
|
|
8
|
+
additionalLinkAttrs?: object;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const Logo = ({
|
|
12
|
+
dataId,
|
|
13
|
+
logoUrl,
|
|
14
|
+
href = "/",
|
|
15
|
+
additionalImgAttrs,
|
|
16
|
+
additionalLinkAttrs,
|
|
17
|
+
}: LogoProps) => (
|
|
18
|
+
<a
|
|
19
|
+
href={href}
|
|
20
|
+
data-id={dataId}
|
|
21
|
+
className="block"
|
|
22
|
+
style={{ height: "2.125rem" }}
|
|
23
|
+
{...additionalLinkAttrs}
|
|
24
|
+
>
|
|
25
|
+
<img src={logoUrl} width="108px" alt="Ably logo" {...additionalImgAttrs} />
|
|
26
|
+
</a>
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
export default React.memo(Logo);
|
|
Binary file
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import { rest } from "msw";
|
|
3
|
+
|
|
4
|
+
import Meganav from "./component.tsx";
|
|
5
|
+
import loadIcons from "../icons.js";
|
|
6
|
+
import logo from "../images/ably-logo.png";
|
|
7
|
+
import ablyStack from "../images/ably-stack.svg";
|
|
8
|
+
import awsLogo from "../images/icon-tech-aws.svg";
|
|
9
|
+
|
|
10
|
+
import {
|
|
11
|
+
attachStoreToWindow,
|
|
12
|
+
createRemoteDataStore,
|
|
13
|
+
getRemoteDataStore,
|
|
14
|
+
} from "../remote-data-store.js";
|
|
15
|
+
import { reducerBlogPosts, fetchBlogPosts } from "../remote-blogs-posts.js";
|
|
16
|
+
import {
|
|
17
|
+
reducerSessionData,
|
|
18
|
+
fetchSessionData,
|
|
19
|
+
} from "../remote-session-data.js";
|
|
20
|
+
|
|
21
|
+
export default {
|
|
22
|
+
title: "Components/Meganav",
|
|
23
|
+
component: Meganav,
|
|
24
|
+
parameters: {
|
|
25
|
+
layout: "fullscreen",
|
|
26
|
+
msw: [
|
|
27
|
+
rest.get("/api/me", (_req, res, ctx) => {
|
|
28
|
+
return res(ctx.json({}));
|
|
29
|
+
}),
|
|
30
|
+
rest.get("/api/blog", (_req, res, ctx) => {
|
|
31
|
+
return res(
|
|
32
|
+
ctx.json([
|
|
33
|
+
{
|
|
34
|
+
title: "Achieving exactly-once delivery with Ably",
|
|
35
|
+
link: "https://ably.com/blog/achieving-exactly-once-message-processing-with-ably",
|
|
36
|
+
pubDate: "Nov 17, 2020",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
title:
|
|
40
|
+
"Why Ably integrates with functions instead of delivering them",
|
|
41
|
+
link: "https://ably.com/blog/why-we-dont-offer-functions",
|
|
42
|
+
pubDate: "Jul 28, 2020",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
title: "Adventures in BEAM optimization with our MQTT adapter",
|
|
46
|
+
link: "https://ably.com/blog/beam-optimization-mqtt",
|
|
47
|
+
pubDate: "Jul 17, 2020",
|
|
48
|
+
},
|
|
49
|
+
])
|
|
50
|
+
);
|
|
51
|
+
}),
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
attachStoreToWindow(
|
|
57
|
+
createRemoteDataStore({
|
|
58
|
+
...reducerBlogPosts,
|
|
59
|
+
...reducerSessionData,
|
|
60
|
+
})
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
const Page = () => {
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
loadIcons();
|
|
66
|
+
|
|
67
|
+
const store = getRemoteDataStore();
|
|
68
|
+
|
|
69
|
+
fetchSessionData(store, "/api/me");
|
|
70
|
+
fetchBlogPosts(store, "/api/blog");
|
|
71
|
+
}, []);
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<Meganav
|
|
75
|
+
paths={{
|
|
76
|
+
logo,
|
|
77
|
+
ablyStack,
|
|
78
|
+
awsLogo,
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const Default = {
|
|
85
|
+
render: () => <Page />,
|
|
86
|
+
};
|
|
@@ -1,114 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
/* This is implemented not as padding so we can change the color of just this space, while keeping the grid
|
|
1
|
+
.ui-meganav-wrapper {
|
|
2
|
+
/* Define values for new stacking context defined by position: fixed */
|
|
3
|
+
--stacking-context-meganav-dropdown: 10;
|
|
4
|
+
--stacking-context-meganav-mobile-panel: 20;
|
|
5
|
+
|
|
6
|
+
z-index: var(--stacking-context-page-meganav);
|
|
7
|
+
|
|
8
|
+
@apply fixed top-0 w-full;
|
|
9
|
+
@apply antialiased font-sans transition-colors;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.ui-meganav {
|
|
13
|
+
height: var(--ui-meganav-height);
|
|
14
|
+
|
|
15
|
+
@apply flex justify-between items-center max-w-screen-xl mx-auto;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ui-meganav-panel,
|
|
19
|
+
.ui-meganav-mobile-dropdown,
|
|
20
|
+
.ui-meganav-panel-account {
|
|
21
|
+
z-index: var(--stacking-context-meganav-dropdown);
|
|
22
|
+
|
|
23
|
+
@apply absolute left-0 right-0;
|
|
24
|
+
@apply border-mid-grey border-t shadow-container;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ui-meganav-panel {
|
|
28
|
+
@apply bg-white;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ui-meganav-panel-mobile {
|
|
32
|
+
z-index: var(--stacking-context-meganav-mobile-panel);
|
|
33
|
+
|
|
34
|
+
/* Prevents momentum-based scrolling https://devdocs.io/css/-webkit-overflow-scrolling */
|
|
35
|
+
-webkit-overflow-scrolling: auto;
|
|
36
|
+
|
|
37
|
+
@apply bg-white pt-16 border-0;
|
|
38
|
+
@apply border-mid-grey border-t shadow-container;
|
|
39
|
+
@apply fixed top-64 left-0 right-0 overflow-y-auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.ui-meganav-panel-account {
|
|
43
|
+
left: auto;
|
|
44
|
+
min-width: 20rem;
|
|
45
|
+
@apply bg-white rounded-t-none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ui-meganav-panel-split-bg {
|
|
49
|
+
background: linear-gradient(to right, #fafafb 33%, white 33%, white 100%);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ui-meganav-link {
|
|
53
|
+
@apply text-menu2 font-bold font-sans;
|
|
54
|
+
@apply mr-12 lg:mr-24 px-0 py-20;
|
|
55
|
+
@apply hover:text-gui-hover focus:text-gui-focus focus:outline-none;
|
|
56
|
+
@apply transition-colors;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ui-meganav-item {
|
|
60
|
+
flex: 1 0 auto;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.ui-meganav-mobile-link {
|
|
64
|
+
@apply p-menu-row relative -left-8 w-extend-8;
|
|
65
|
+
@apply text-menu2 font-mono font-medium block text-cool-black text-left;
|
|
66
|
+
@apply flex items-center;
|
|
67
|
+
@apply focus:text-gui-focus focus:outline-none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ui-meganav-account-link {
|
|
71
|
+
@apply block px-8 py-8 hover:bg-light-grey hover:text-gui-hover rounded relative -left-8 text-menu3 w-extend-8 font-bold font-mono;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ui-meganav-content {
|
|
75
|
+
@apply max-w-screen-xl py-24 lg:py-32 mx-auto;
|
|
76
|
+
@apply grid grid-cols-1;
|
|
77
|
+
@apply px-24 md:px-32 lg:px-32 xl:px-64;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* This is implemented not as padding so we can change the color of just this space, while keeping the grid
|
|
82
81
|
as close to the designs as possible */
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
.ui-meganav-content-spacer {
|
|
83
|
+
@apply hidden md:block md:w-32 lg:w-32 xl:w-64 self-stretch flex-shrink-0 flex-grow-0;
|
|
84
|
+
}
|
|
86
85
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
.ui-meganav-media {
|
|
87
|
+
@apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
|
|
88
|
+
}
|
|
90
89
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
.ui-meganav-media-with-image {
|
|
91
|
+
grid-template-columns: max-content 1fr;
|
|
92
|
+
grid-template-rows: min-content 1fr;
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
@apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
|
|
95
|
+
@apply grid gap-x-16;
|
|
96
|
+
}
|
|
98
97
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
.ui-meganav-media-heading {
|
|
99
|
+
@apply text-menu3 text-cool-black font-bold font-sans group-hover:text-gui-hover group-focus:text-gui-focus leading-normal;
|
|
100
|
+
}
|
|
102
101
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
.ui-meganav-media-copy {
|
|
103
|
+
@apply text-p3 font-sans font-medium text-dark-grey leading-normal;
|
|
104
|
+
}
|
|
106
105
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
106
|
+
.ui-meganav-overline {
|
|
107
|
+
@apply text-overline2 text-cool-black uppercase font-medium font-mono tracking-widen-0.16 p-overline;
|
|
108
|
+
}
|
|
110
109
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
}
|
|
110
|
+
.ui-meganav-hr {
|
|
111
|
+
@apply my-0 text-mid-grey;
|
|
114
112
|
}
|
|
@@ -12,13 +12,12 @@ import "./component.css";
|
|
|
12
12
|
|
|
13
13
|
import { queryId, queryIdAll } from "../dom-query";
|
|
14
14
|
|
|
15
|
-
import MeganavControl from "../MeganavControl/component";
|
|
16
|
-
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import MeganavSearchSuggestions from "../MeganavSearchSuggestions/component";
|
|
15
|
+
import MeganavControl from "../MeganavControl/component.js";
|
|
16
|
+
import MeganavControlMobileDropdown from "../MeganavControlMobileDropdown/component.js";
|
|
17
|
+
import MobilePanelOpenClick from "../MeganavControlMobilePanelOpen/component.js";
|
|
18
|
+
import MobilePanelCloseClick from "../MeganavControlMobilePanelClose/component.js";
|
|
19
|
+
import MeganavSearchAutocomplete from "../MeganavSearchAutocomplete/component.js";
|
|
20
|
+
import MeganavSearchSuggestions from "../MeganavSearchSuggestions/component.js";
|
|
22
21
|
|
|
23
22
|
// Close menu when user clicks outside of viewport
|
|
24
23
|
const windowOnBlur = (closeAll) => {
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect, useState } from "react";
|
|
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";
|
|
22
|
+
|
|
23
|
+
export type MeganavTheme = {
|
|
24
|
+
backgroundColor?: string;
|
|
25
|
+
textColor?: string;
|
|
26
|
+
buttonBackgroundColor?: string;
|
|
27
|
+
buttonTextColor?: string;
|
|
28
|
+
mobileMenuColor?: string;
|
|
29
|
+
logoTextColor?: string;
|
|
30
|
+
barShadow?: string;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type AbsUrl = (path: string) => string;
|
|
34
|
+
|
|
35
|
+
export type MeganavPanels = {
|
|
36
|
+
[index: string]: ({ paths, absUrl }) => ReactNode;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type MeganavSessionState = {
|
|
40
|
+
signedIn: boolean;
|
|
41
|
+
logOut: {
|
|
42
|
+
token: string;
|
|
43
|
+
href: string;
|
|
44
|
+
text: string;
|
|
45
|
+
};
|
|
46
|
+
accountName: string;
|
|
47
|
+
preferredEmail: string;
|
|
48
|
+
account: {
|
|
49
|
+
links: {
|
|
50
|
+
dashboard: {
|
|
51
|
+
href: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
mySettings: {
|
|
56
|
+
text: string;
|
|
57
|
+
href: string;
|
|
58
|
+
};
|
|
59
|
+
myAccessTokens: {
|
|
60
|
+
text: string;
|
|
61
|
+
href: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
type SignInProps = {
|
|
66
|
+
sessionState: MeganavSessionState;
|
|
67
|
+
theme: MeganavTheme;
|
|
68
|
+
loginLink: string;
|
|
69
|
+
absUrl: AbsUrl;
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
type MeganavProps = {
|
|
73
|
+
paths?: {
|
|
74
|
+
logo: string;
|
|
75
|
+
iconSprites: string;
|
|
76
|
+
ablyStack: string;
|
|
77
|
+
blogThumb1: string;
|
|
78
|
+
blogThumb2: string;
|
|
79
|
+
blogThumb3: string;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
themeName: "white" | "black" | "transparentToWhite";
|
|
83
|
+
notice?: {
|
|
84
|
+
props: {
|
|
85
|
+
title: string;
|
|
86
|
+
bodyText: string;
|
|
87
|
+
buttonLink: string;
|
|
88
|
+
buttonLabel: string;
|
|
89
|
+
closeBtn: boolean;
|
|
90
|
+
};
|
|
91
|
+
config: {
|
|
92
|
+
cookieId: string;
|
|
93
|
+
noticeId: string;
|
|
94
|
+
collapse: boolean;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
loginLink?: string;
|
|
98
|
+
urlBase?: string;
|
|
99
|
+
addSearchApiKey: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
const SignIn = ({ sessionState, theme, loginLink, absUrl }: SignInProps) => {
|
|
103
|
+
return sessionState.signedIn ? (
|
|
104
|
+
<MeganavItemsSignedIn
|
|
105
|
+
absUrl={absUrl}
|
|
106
|
+
sessionState={sessionState}
|
|
107
|
+
theme={theme}
|
|
108
|
+
/>
|
|
109
|
+
) : (
|
|
110
|
+
<ul className="hidden md:flex items-center">
|
|
111
|
+
<li className="ui-meganav-item">
|
|
112
|
+
<a
|
|
113
|
+
href={absUrl("/contact")}
|
|
114
|
+
className={`ui-meganav-link ${theme.textColor}`}
|
|
115
|
+
data-id="meganav-link"
|
|
116
|
+
>
|
|
117
|
+
Contact us
|
|
118
|
+
</a>
|
|
119
|
+
</li>
|
|
120
|
+
<li className="ui-meganav-item">
|
|
121
|
+
<a
|
|
122
|
+
href={absUrl(loginLink)}
|
|
123
|
+
className={`ui-meganav-link mr-0 ${theme.textColor}`}
|
|
124
|
+
data-id="meganav-link"
|
|
125
|
+
>
|
|
126
|
+
Login
|
|
127
|
+
</a>
|
|
128
|
+
</li>
|
|
129
|
+
<li className="ui-meganav-item">
|
|
130
|
+
<MeganavSearch absUrl={absUrl} />
|
|
131
|
+
</li>
|
|
132
|
+
<li className="ui-meganav-item">
|
|
133
|
+
<a
|
|
134
|
+
href={absUrl("/sign-up")}
|
|
135
|
+
data-id="meganav-sign-up-btn"
|
|
136
|
+
className={`ui-btn p-btn-small ${theme.buttonBackgroundColor} ${theme.buttonTextColor}`}
|
|
137
|
+
>
|
|
138
|
+
Sign up free
|
|
139
|
+
</a>
|
|
140
|
+
</li>
|
|
141
|
+
</ul>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
const SignInPlaceholder = () => <div />;
|
|
146
|
+
|
|
147
|
+
const panels = {
|
|
148
|
+
MeganavContentProducts,
|
|
149
|
+
MeganavContentUseCases,
|
|
150
|
+
MeganavContentCompany,
|
|
151
|
+
MeganavContentDevelopers,
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
const Meganav = ({
|
|
155
|
+
paths,
|
|
156
|
+
themeName = "white",
|
|
157
|
+
notice,
|
|
158
|
+
loginLink = "/login",
|
|
159
|
+
urlBase,
|
|
160
|
+
addSearchApiKey,
|
|
161
|
+
}: MeganavProps) => {
|
|
162
|
+
const [sessionState, setSessionState] = useState<MeganavSessionState>();
|
|
163
|
+
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
// Note if state is never updated, sessionState stays null and never removes the placeholder.
|
|
166
|
+
// This makes SSR consistent (ie. we always show the placeholder)
|
|
167
|
+
connectState(selectSessionData, setSessionState);
|
|
168
|
+
}, []);
|
|
169
|
+
|
|
170
|
+
useEffect(() => {
|
|
171
|
+
const teardown = MeganavScripts({ themeName, addSearchApiKey });
|
|
172
|
+
// TODO(jamiehenson): update this when JS assets are converted to TS
|
|
173
|
+
// @ts-expect-error: teardown parsed as Element from JS file, cannot be coerced into Function form
|
|
174
|
+
return () => teardown();
|
|
175
|
+
}, [sessionState]);
|
|
176
|
+
|
|
177
|
+
const theme = MeganavData.themes[themeName];
|
|
178
|
+
const absUrl = (path) => _absUrl(path, urlBase);
|
|
179
|
+
|
|
180
|
+
return (
|
|
181
|
+
<nav
|
|
182
|
+
className={`ui-meganav-wrapper ${theme.backgroundColor} ${theme.barShadow}`}
|
|
183
|
+
data-id="meganav"
|
|
184
|
+
aria-label="Main"
|
|
185
|
+
>
|
|
186
|
+
{notice && <Notice {...notice.props} config={notice.config} />}
|
|
187
|
+
<div className="ui-meganav ui-grid-px">
|
|
188
|
+
<div className="mr-24">
|
|
189
|
+
<Logo
|
|
190
|
+
dataId="meganav-logo"
|
|
191
|
+
href={urlBase}
|
|
192
|
+
logoUrl={paths?.logo ?? ""}
|
|
193
|
+
/>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<MeganavItemsDesktop
|
|
197
|
+
panels={panels}
|
|
198
|
+
paths={paths}
|
|
199
|
+
theme={theme}
|
|
200
|
+
absUrl={absUrl}
|
|
201
|
+
/>
|
|
202
|
+
|
|
203
|
+
{/* Because we load the session state through fetch, we display a placeholder until fetch returns */}
|
|
204
|
+
{sessionState ? (
|
|
205
|
+
<SignIn
|
|
206
|
+
sessionState={sessionState}
|
|
207
|
+
theme={theme}
|
|
208
|
+
loginLink={loginLink}
|
|
209
|
+
absUrl={absUrl}
|
|
210
|
+
/>
|
|
211
|
+
) : (
|
|
212
|
+
<SignInPlaceholder />
|
|
213
|
+
)}
|
|
214
|
+
|
|
215
|
+
<MeganavItemsMobile
|
|
216
|
+
panels={panels}
|
|
217
|
+
sessionState={sessionState}
|
|
218
|
+
paths={paths}
|
|
219
|
+
theme={theme}
|
|
220
|
+
loginLink={loginLink}
|
|
221
|
+
absUrl={absUrl}
|
|
222
|
+
/>
|
|
223
|
+
</div>
|
|
224
|
+
</nav>
|
|
225
|
+
);
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export default Meganav;
|
|
Binary file
|