@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
|
@@ -1,27 +1,56 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import T from "prop-types";
|
|
3
2
|
|
|
4
|
-
import MeganavControl from "../MeganavControl/component.
|
|
5
|
-
import SignOutLink from "../SignOutLink/component.
|
|
6
|
-
import MeganavSearch from "../MeganavSearch/component.
|
|
3
|
+
import MeganavControl from "../MeganavControl/component.tsx";
|
|
4
|
+
import SignOutLink from "../SignOutLink/component.tsx";
|
|
5
|
+
import MeganavSearch from "../MeganavSearch/component.tsx";
|
|
6
|
+
import {
|
|
7
|
+
AbsUrl,
|
|
8
|
+
MeganavSessionState,
|
|
9
|
+
MeganavTheme,
|
|
10
|
+
} from "../Meganav/component.tsx";
|
|
11
|
+
|
|
12
|
+
type MeganavItemsSignedIn = {
|
|
13
|
+
sessionState: MeganavSessionState;
|
|
14
|
+
theme: MeganavTheme;
|
|
15
|
+
absUrl: AbsUrl;
|
|
16
|
+
};
|
|
7
17
|
|
|
8
18
|
const truncate = (string, length) => {
|
|
9
|
-
return string?.length && string.length > length
|
|
19
|
+
return string?.length && string.length > length
|
|
20
|
+
? `${string.slice(0, length - 1)}…`
|
|
21
|
+
: string;
|
|
10
22
|
};
|
|
11
23
|
|
|
12
|
-
const MeganavItemsSignedIn = ({
|
|
13
|
-
|
|
24
|
+
const MeganavItemsSignedIn = ({
|
|
25
|
+
sessionState,
|
|
26
|
+
theme,
|
|
27
|
+
absUrl,
|
|
28
|
+
}: MeganavItemsSignedIn) => {
|
|
29
|
+
const links = sessionState.account
|
|
30
|
+
? Object.keys(sessionState.account.links).map(
|
|
31
|
+
(key) => sessionState.account.links[key]
|
|
32
|
+
)
|
|
33
|
+
: [];
|
|
14
34
|
const accountName = truncate(sessionState.accountName, 20);
|
|
15
35
|
const preferredEmail = truncate(sessionState.preferredEmail, 20);
|
|
16
36
|
|
|
17
37
|
return (
|
|
18
38
|
<ul className="hidden md:flex items-center">
|
|
19
39
|
<li className="ui-meganav-item relative">
|
|
20
|
-
<MeganavControl
|
|
40
|
+
<MeganavControl
|
|
41
|
+
ariaControls="account-panel"
|
|
42
|
+
ariaLabel="Account"
|
|
43
|
+
theme={theme}
|
|
44
|
+
additionalCSS="mr-0"
|
|
45
|
+
>
|
|
21
46
|
{accountName}
|
|
22
47
|
</MeganavControl>
|
|
23
48
|
|
|
24
|
-
<div
|
|
49
|
+
<div
|
|
50
|
+
className="ui-meganav-panel-account invisible"
|
|
51
|
+
id="account-panel"
|
|
52
|
+
data-id="meganav-panel"
|
|
53
|
+
>
|
|
25
54
|
{/* Users exist without accounts in which case there is no links here */}
|
|
26
55
|
{sessionState.account && (
|
|
27
56
|
<>
|
|
@@ -29,7 +58,10 @@ const MeganavItemsSignedIn = ({ sessionState, theme, absUrl }) => {
|
|
|
29
58
|
<ul className="mb-16 mx-16">
|
|
30
59
|
{links.map((item) => (
|
|
31
60
|
<li key={item.href}>
|
|
32
|
-
<a
|
|
61
|
+
<a
|
|
62
|
+
className="ui-meganav-account-link"
|
|
63
|
+
href={absUrl(item.href)}
|
|
64
|
+
>
|
|
33
65
|
{item.text}
|
|
34
66
|
</a>
|
|
35
67
|
</li>
|
|
@@ -41,13 +73,19 @@ const MeganavItemsSignedIn = ({ sessionState, theme, absUrl }) => {
|
|
|
41
73
|
<p className="ui-meganav-overline mx-16">{preferredEmail}</p>
|
|
42
74
|
<ul className="mb-8 mx-16">
|
|
43
75
|
<li>
|
|
44
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href={absUrl(sessionState.mySettings.href)}
|
|
78
|
+
className="ui-meganav-account-link"
|
|
79
|
+
>
|
|
45
80
|
{sessionState.mySettings.text}
|
|
46
81
|
</a>
|
|
47
82
|
</li>
|
|
48
83
|
{sessionState.myAccessTokens && (
|
|
49
84
|
<li>
|
|
50
|
-
<a
|
|
85
|
+
<a
|
|
86
|
+
href={absUrl(sessionState.myAccessTokens.href)}
|
|
87
|
+
className="ui-meganav-account-link"
|
|
88
|
+
>
|
|
51
89
|
{sessionState.myAccessTokens.text}
|
|
52
90
|
<span className="ui-version-tag">preview</span>
|
|
53
91
|
</a>
|
|
@@ -61,7 +99,11 @@ const MeganavItemsSignedIn = ({ sessionState, theme, absUrl }) => {
|
|
|
61
99
|
<div className="mb-16 px-16">
|
|
62
100
|
<SignOutLink absUrl={absUrl} {...sessionState.logOut}>
|
|
63
101
|
{({ text, href, onClick }) => (
|
|
64
|
-
<a
|
|
102
|
+
<a
|
|
103
|
+
onClick={onClick}
|
|
104
|
+
href={absUrl(href)}
|
|
105
|
+
className="ui-meganav-account-link"
|
|
106
|
+
>
|
|
65
107
|
{text}
|
|
66
108
|
</a>
|
|
67
109
|
)}
|
|
@@ -77,7 +119,10 @@ const MeganavItemsSignedIn = ({ sessionState, theme, absUrl }) => {
|
|
|
77
119
|
|
|
78
120
|
{sessionState.account && (
|
|
79
121
|
<li>
|
|
80
|
-
<a
|
|
122
|
+
<a
|
|
123
|
+
href={absUrl(sessionState.account.links.dashboard.href)}
|
|
124
|
+
className="ui-btn-secondary p-btn-small"
|
|
125
|
+
>
|
|
81
126
|
Dashboard
|
|
82
127
|
</a>
|
|
83
128
|
</li>
|
|
@@ -86,13 +131,4 @@ const MeganavItemsSignedIn = ({ sessionState, theme, absUrl }) => {
|
|
|
86
131
|
);
|
|
87
132
|
};
|
|
88
133
|
|
|
89
|
-
MeganavItemsSignedIn.propTypes = {
|
|
90
|
-
sessionState: T.object,
|
|
91
|
-
paths: T.shape({
|
|
92
|
-
iconSprites: T.string,
|
|
93
|
-
}),
|
|
94
|
-
theme: T.object,
|
|
95
|
-
absUrl: T.func,
|
|
96
|
-
};
|
|
97
|
-
|
|
98
134
|
export default MeganavItemsSignedIn;
|
|
Binary file
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import Icon from "../Icon/component.tsx";
|
|
4
|
+
import MeganavSearchPanel from "../MeganavSearchPanel/component.tsx";
|
|
5
|
+
import { AbsUrl } from "../Meganav/component.tsx";
|
|
6
|
+
|
|
7
|
+
const MeganavSearch = ({ absUrl }: { absUrl: AbsUrl }) => (
|
|
8
|
+
<>
|
|
9
|
+
<button
|
|
10
|
+
type="button"
|
|
11
|
+
data-id="meganav-control"
|
|
12
|
+
data-control="search"
|
|
13
|
+
className="h-64 w-24 px-24 pr-48 py-20 group focus:outline-none"
|
|
14
|
+
aria-expanded="false"
|
|
15
|
+
aria-controls="panel-search"
|
|
16
|
+
aria-label={`Show Search Panel`}
|
|
17
|
+
>
|
|
18
|
+
<Icon
|
|
19
|
+
name="icon-gui-search"
|
|
20
|
+
color="text-cool-black"
|
|
21
|
+
size="1.5rem"
|
|
22
|
+
additionalCSS="group-hover:text-gui-hover group-focus:text-gui-focus"
|
|
23
|
+
/>
|
|
24
|
+
</button>
|
|
25
|
+
|
|
26
|
+
<div
|
|
27
|
+
className="ui-meganav-panel invisible"
|
|
28
|
+
id="panel-search"
|
|
29
|
+
data-id="meganav-panel"
|
|
30
|
+
>
|
|
31
|
+
<MeganavSearchPanel absUrl={absUrl} />
|
|
32
|
+
</div>
|
|
33
|
+
</>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export default MeganavSearch;
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
const MeganavSearchAutocomplete = () => (
|
|
4
|
+
<div
|
|
5
|
+
className="absolute w-full mt-8 z-10 hidden shadow-container rounded-lg bg-white border border-mid-grey"
|
|
6
|
+
data-id="meganav-search-autocomplete-container"
|
|
7
|
+
>
|
|
8
|
+
<ol className="m-16" data-id="meganav-search-autocomplete-list"></ol>
|
|
9
|
+
</div>
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
export default MeganavSearchAutocomplete;
|
|
Binary file
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import Icon from "../Icon/component.tsx";
|
|
4
|
+
import MeganavSearchSuggestions from "../MeganavSearchSuggestions/component.tsx";
|
|
5
|
+
import MeganavSearchAutocomplete from "../MeganavSearchAutocomplete/component.tsx";
|
|
6
|
+
import { AbsUrl } from "../Meganav/component.tsx";
|
|
7
|
+
|
|
8
|
+
const MeganavSearchPanel = ({ absUrl }: { absUrl: AbsUrl }) => (
|
|
9
|
+
<section className="ui-meganav-content grid-cols-12">
|
|
10
|
+
<div className="col-span-8">
|
|
11
|
+
<div className="mb-32">
|
|
12
|
+
<form
|
|
13
|
+
className="flex items-start"
|
|
14
|
+
action={absUrl("/search")}
|
|
15
|
+
method="get"
|
|
16
|
+
>
|
|
17
|
+
<div className="relative w-full">
|
|
18
|
+
<Icon
|
|
19
|
+
name="icon-gui-search"
|
|
20
|
+
color="text-cool-black"
|
|
21
|
+
size="1.5rem"
|
|
22
|
+
additionalCSS="absolute top-12 left-16"
|
|
23
|
+
/>
|
|
24
|
+
<input
|
|
25
|
+
type="search"
|
|
26
|
+
name="q"
|
|
27
|
+
className="ui-input pl-48 h-48"
|
|
28
|
+
placeholder="Search"
|
|
29
|
+
autoComplete="off"
|
|
30
|
+
data-id="meganav-search-input"
|
|
31
|
+
/>
|
|
32
|
+
|
|
33
|
+
<MeganavSearchAutocomplete />
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<button
|
|
37
|
+
type="submit"
|
|
38
|
+
className="ui-btn-secondary flex-shrink-0 ml-8 sm:ml-16 md:ml-24 xl:ml-32"
|
|
39
|
+
>
|
|
40
|
+
Search
|
|
41
|
+
</button>
|
|
42
|
+
</form>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div className="col-span-12">
|
|
47
|
+
<MeganavSearchSuggestions displaySupportLink={true} absUrl={absUrl} />
|
|
48
|
+
</div>
|
|
49
|
+
</section>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
export default MeganavSearchPanel;
|
|
Binary file
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import FeaturedLink from "../FeaturedLink/component.tsx";
|
|
4
|
+
import { AbsUrl } from "../Meganav/component.tsx";
|
|
5
|
+
|
|
6
|
+
type MeganavSearchSuggestionsProps = {
|
|
7
|
+
absUrl: AbsUrl;
|
|
8
|
+
displaySupportLink: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const MeganavSearchSuggestions = ({
|
|
12
|
+
absUrl,
|
|
13
|
+
displaySupportLink,
|
|
14
|
+
}: MeganavSearchSuggestionsProps) => (
|
|
15
|
+
<>
|
|
16
|
+
<p className="ui-text-overline2 text-cool-black py-12">Popular pages</p>
|
|
17
|
+
|
|
18
|
+
<div className="flex justify-between items-center overflow-hidden">
|
|
19
|
+
<ul className="flex transition-transform">
|
|
20
|
+
<li className="py-12 pr-8 flex-shrink-0">
|
|
21
|
+
<a
|
|
22
|
+
href={absUrl("/docs/how-ably-works")}
|
|
23
|
+
className="ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus"
|
|
24
|
+
>
|
|
25
|
+
How does Ably work?
|
|
26
|
+
</a>
|
|
27
|
+
</li>
|
|
28
|
+
<li className="py-12 px-8 flex-shrink-0">
|
|
29
|
+
<a
|
|
30
|
+
href={absUrl("/docs/quick-start-guide")}
|
|
31
|
+
className="ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus"
|
|
32
|
+
>
|
|
33
|
+
Quickstart guide
|
|
34
|
+
</a>
|
|
35
|
+
</li>
|
|
36
|
+
<li className="py-12 px-8 flex-shrink-0">
|
|
37
|
+
<a
|
|
38
|
+
href={absUrl("/docs/core-features/pubsub")}
|
|
39
|
+
className="ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus"
|
|
40
|
+
>
|
|
41
|
+
Publish/Subscribe Messaging
|
|
42
|
+
</a>
|
|
43
|
+
</li>
|
|
44
|
+
<li className="py-12 pl-8 flex-shrink-0">
|
|
45
|
+
<a
|
|
46
|
+
href={absUrl("/platform")}
|
|
47
|
+
className="ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus"
|
|
48
|
+
>
|
|
49
|
+
Platform
|
|
50
|
+
</a>
|
|
51
|
+
</li>
|
|
52
|
+
</ul>
|
|
53
|
+
{displaySupportLink ? (
|
|
54
|
+
<FeaturedLink url={absUrl("/support")} textSize="text-p2">
|
|
55
|
+
Support
|
|
56
|
+
</FeaturedLink>
|
|
57
|
+
) : null}
|
|
58
|
+
</div>
|
|
59
|
+
</>
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export default MeganavSearchSuggestions;
|
|
Binary file
|
|
@@ -3,7 +3,7 @@ import Cookie from "js-cookie";
|
|
|
3
3
|
import throttle from "lodash.throttle";
|
|
4
4
|
|
|
5
5
|
import { queryId } from "../dom-query";
|
|
6
|
-
import { FLASH_DATA_ID } from "../Flash/component.
|
|
6
|
+
import { FLASH_DATA_ID } from "../Flash/component.tsx";
|
|
7
7
|
|
|
8
8
|
const COOKIE_EXPIRY = 90;
|
|
9
9
|
const COLLAPSE_TRIGGER_DISTANCE = 5;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect } from "react";
|
|
2
|
+
|
|
3
|
+
import NoticeScripts from "./component.js";
|
|
4
|
+
import "./component.css";
|
|
5
|
+
import Icon from "../Icon/component.tsx";
|
|
6
|
+
|
|
7
|
+
type ContentWrapperProps = {
|
|
8
|
+
buttonLink: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
// TODO(jamiehenson):
|
|
13
|
+
// This type is a bit messed up currently due to the NoticeScripts import being interpreted as NoticeProps.
|
|
14
|
+
// Plan is to TS-ify the JS assets too, so this can be rectified then. The NoticeScripts-oriented props are
|
|
15
|
+
// the ones after the line break.
|
|
16
|
+
type NoticeProps = {
|
|
17
|
+
buttonLink?: string;
|
|
18
|
+
buttonLabel?: string;
|
|
19
|
+
bodyText?: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
closeBtn?: boolean;
|
|
22
|
+
config?: {
|
|
23
|
+
collapse: boolean;
|
|
24
|
+
noticeId: string;
|
|
25
|
+
cookieId: string;
|
|
26
|
+
};
|
|
27
|
+
bgColor?: string;
|
|
28
|
+
textColor?: string;
|
|
29
|
+
|
|
30
|
+
bannerContainer?: Element | null;
|
|
31
|
+
cookieId?: string;
|
|
32
|
+
noticeId?: string;
|
|
33
|
+
options?: { collapse: boolean };
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const contentWrapperClasses = "w-full pr-8 ui-text-p3 self-center";
|
|
37
|
+
|
|
38
|
+
const ContentWrapper = ({ buttonLink, children }: ContentWrapperProps) =>
|
|
39
|
+
buttonLink ? (
|
|
40
|
+
<a href={buttonLink} className={contentWrapperClasses}>
|
|
41
|
+
{children}
|
|
42
|
+
</a>
|
|
43
|
+
) : (
|
|
44
|
+
<div className={contentWrapperClasses}>{children}</div>
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
const Notice = ({
|
|
48
|
+
buttonLink,
|
|
49
|
+
buttonLabel,
|
|
50
|
+
bodyText,
|
|
51
|
+
title,
|
|
52
|
+
config,
|
|
53
|
+
closeBtn,
|
|
54
|
+
bgColor = "bg-gradient-active-orange",
|
|
55
|
+
textColor = "text-white",
|
|
56
|
+
}: NoticeProps) => {
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
NoticeScripts({
|
|
59
|
+
bannerContainer: document.querySelector('[data-id="ui-notice"]'),
|
|
60
|
+
cookieId: config?.cookieId,
|
|
61
|
+
noticeId: config?.noticeId,
|
|
62
|
+
options: {
|
|
63
|
+
collapse: config?.collapse || false,
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
const wrapperClasses = ["ui-announcement", bgColor, textColor].join(" ");
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<div
|
|
72
|
+
className={wrapperClasses}
|
|
73
|
+
data-id="ui-notice"
|
|
74
|
+
style={{ maxHeight: 0, overflow: "hidden" }}
|
|
75
|
+
>
|
|
76
|
+
<div className="ui-grid-px py-16 max-w-screen-xl mx-auto flex items-start">
|
|
77
|
+
<ContentWrapper buttonLink={buttonLink ?? "#"}>
|
|
78
|
+
<strong className="font-bold whitespace-nowrap pr-4">{title}</strong>
|
|
79
|
+
<span className="pr-4">{bodyText}</span>
|
|
80
|
+
{buttonLabel && (
|
|
81
|
+
<span className="underline cursor-pointer whitespace-nowrap">
|
|
82
|
+
{buttonLabel}
|
|
83
|
+
</span>
|
|
84
|
+
)}
|
|
85
|
+
</ContentWrapper>
|
|
86
|
+
|
|
87
|
+
{closeBtn && (
|
|
88
|
+
<button
|
|
89
|
+
type="button"
|
|
90
|
+
className="ml-auto h-20 w-20 border-none bg-none self-baseline"
|
|
91
|
+
>
|
|
92
|
+
<Icon
|
|
93
|
+
name="icon-gui-close"
|
|
94
|
+
size="1.25rem"
|
|
95
|
+
color="text-cool-black"
|
|
96
|
+
/>
|
|
97
|
+
</button>
|
|
98
|
+
)}
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export default Notice;
|
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { MouseEventHandler, ReactNode, useRef } from "react";
|
|
2
|
+
import { AbsUrl } from "../Meganav/component.tsx";
|
|
3
|
+
|
|
4
|
+
type SignOutLinkProps = {
|
|
5
|
+
token: string;
|
|
6
|
+
href: string;
|
|
7
|
+
text: string;
|
|
8
|
+
children: ({
|
|
9
|
+
href,
|
|
10
|
+
text,
|
|
11
|
+
onClick,
|
|
12
|
+
}: {
|
|
13
|
+
href: string;
|
|
14
|
+
text: string;
|
|
15
|
+
onClick: MouseEventHandler<HTMLAnchorElement>;
|
|
16
|
+
}) => ReactNode;
|
|
17
|
+
absUrl: AbsUrl;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const SignOutLink = ({
|
|
21
|
+
token,
|
|
22
|
+
href,
|
|
23
|
+
text,
|
|
24
|
+
children,
|
|
25
|
+
absUrl,
|
|
26
|
+
}: SignOutLinkProps) => {
|
|
27
|
+
const formRef = useRef<HTMLFormElement>(null);
|
|
28
|
+
|
|
29
|
+
const onClick = (e) => {
|
|
30
|
+
formRef.current?.submit();
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<form
|
|
37
|
+
ref={formRef}
|
|
38
|
+
method="post"
|
|
39
|
+
action={absUrl(href)}
|
|
40
|
+
className="hidden"
|
|
41
|
+
>
|
|
42
|
+
<input name="_method" value="delete" type="hidden" />
|
|
43
|
+
<input name="authenticity_token" value={token} type="hidden" />
|
|
44
|
+
</form>
|
|
45
|
+
|
|
46
|
+
{children({ href, text, onClick })}
|
|
47
|
+
</>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default SignOutLink;
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import Slider from "./component.tsx";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Slider",
|
|
6
|
+
component: Slider,
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: "fullscreen",
|
|
9
|
+
},
|
|
10
|
+
tags: ["autodocs"],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const Slide = ({ children }: { children: ReactNode }) => (
|
|
14
|
+
<div className="h-full p-24 bg-white rounded">
|
|
15
|
+
<p className="ui-text-p2 text-center">{children}</p>
|
|
16
|
+
</div>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
const slides = [
|
|
20
|
+
<Slide key="1">
|
|
21
|
+
Powers live chat, updates, analytics, and composition for millions of users.
|
|
22
|
+
</Slide>,
|
|
23
|
+
<Slide key="2">
|
|
24
|
+
Powers virtual venues for millions of event attendees around the world.
|
|
25
|
+
</Slide>,
|
|
26
|
+
<Slide key="3">
|
|
27
|
+
Provides 5 million daily users with live financial commentary and stock
|
|
28
|
+
tickers.
|
|
29
|
+
</Slide>,
|
|
30
|
+
<Slide key="4">Monitors live car performance data across the USA.</Slide>,
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export const SliderOnAllBreakpoints = {
|
|
34
|
+
args: {
|
|
35
|
+
slides,
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const SliderOnSmallBreakpointOnly = {
|
|
40
|
+
args: {
|
|
41
|
+
slides,
|
|
42
|
+
classes: `sm:grid-cols-${slides.length / 2} md:grid-cols-${slides.length}`,
|
|
43
|
+
mqEnableThreshold: () => !window.matchMedia("(min-width: 48rem)").matches,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import React, { CSSProperties, ReactNode, useEffect, useRef } from "react";
|
|
2
|
+
|
|
3
|
+
import Icon from "../Icon/component.tsx";
|
|
4
|
+
import SliderScripts from "./component.js";
|
|
5
|
+
import "./component.css";
|
|
6
|
+
|
|
7
|
+
type SliderProps = {
|
|
8
|
+
slides?: ReactNode[];
|
|
9
|
+
classes?: string;
|
|
10
|
+
slideClasses?: string;
|
|
11
|
+
slideMinWidth?: string;
|
|
12
|
+
slideMaxWidth?: string;
|
|
13
|
+
mqEnableThreshold?: () => boolean;
|
|
14
|
+
|
|
15
|
+
container?: HTMLDivElement | null;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const Slider = ({
|
|
19
|
+
slides = [],
|
|
20
|
+
classes = "",
|
|
21
|
+
slideClasses = "",
|
|
22
|
+
slideMinWidth = "16.875rem",
|
|
23
|
+
slideMaxWidth = "1fr",
|
|
24
|
+
mqEnableThreshold = () => true,
|
|
25
|
+
...props
|
|
26
|
+
}: SliderProps) => {
|
|
27
|
+
const containerRef = useRef<HTMLDivElement>(null);
|
|
28
|
+
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
SliderScripts({
|
|
31
|
+
container: containerRef.current,
|
|
32
|
+
mqEnableThreshold,
|
|
33
|
+
});
|
|
34
|
+
}, []);
|
|
35
|
+
|
|
36
|
+
if (slides.length === 0) return;
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
className="w-full overflow-x-hidden"
|
|
41
|
+
data-id="slider"
|
|
42
|
+
style={
|
|
43
|
+
{
|
|
44
|
+
"--dynamic-grid-columns-count": slides.length,
|
|
45
|
+
"--dynamic-grid-column-min-width": slideMinWidth,
|
|
46
|
+
"--dynamic-grid-column-max-width": slideMaxWidth,
|
|
47
|
+
} as CSSProperties
|
|
48
|
+
}
|
|
49
|
+
ref={containerRef}
|
|
50
|
+
>
|
|
51
|
+
<ol
|
|
52
|
+
className={`grid ui-grid-gap grid-cols-dynamic transform transition-transform ${classes}`}
|
|
53
|
+
data-id="slider-strip"
|
|
54
|
+
{...props}
|
|
55
|
+
>
|
|
56
|
+
{slides.map((slide, i) => (
|
|
57
|
+
<li key={i} className={slideClasses} data-id="slider-slide">
|
|
58
|
+
{slide}
|
|
59
|
+
</li>
|
|
60
|
+
))}
|
|
61
|
+
</ol>
|
|
62
|
+
|
|
63
|
+
<div
|
|
64
|
+
className="justify-center items-center my-24 hidden"
|
|
65
|
+
data-id="slider-controls"
|
|
66
|
+
>
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
className="p-0 w-24 h-24 flex items-center focus:outline-gui-focus"
|
|
70
|
+
data-id="slider-previous"
|
|
71
|
+
>
|
|
72
|
+
<Icon
|
|
73
|
+
name="icon-gui-disclosure-arrow"
|
|
74
|
+
size="1.5rem"
|
|
75
|
+
color="text-cool-black"
|
|
76
|
+
additionalCSS="transform rotate-180"
|
|
77
|
+
data-id="meganav-control-mobile-dropdown-menu"
|
|
78
|
+
/>
|
|
79
|
+
</button>
|
|
80
|
+
|
|
81
|
+
<ul className="flex justify-center items-center mx-32 relative h-24">
|
|
82
|
+
{slides.map((_, i) => (
|
|
83
|
+
<li key={i}>
|
|
84
|
+
<span
|
|
85
|
+
className="ui-slider-marker text-cool-black"
|
|
86
|
+
data-id="slider-marker"
|
|
87
|
+
>
|
|
88
|
+
⬤
|
|
89
|
+
</span>{" "}
|
|
90
|
+
{/* ⬤ */}
|
|
91
|
+
</li>
|
|
92
|
+
))}
|
|
93
|
+
</ul>
|
|
94
|
+
|
|
95
|
+
<button
|
|
96
|
+
type="button"
|
|
97
|
+
className="p-0 w-24 h-24 flex items-center focus:outline-gui-focus"
|
|
98
|
+
data-id="slider-next"
|
|
99
|
+
>
|
|
100
|
+
<Icon
|
|
101
|
+
name="icon-gui-disclosure-arrow"
|
|
102
|
+
size="1.5rem"
|
|
103
|
+
color="text-cool-black"
|
|
104
|
+
data-id="meganav-control-mobile-dropdown-menu"
|
|
105
|
+
/>
|
|
106
|
+
</button>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export default Slider;
|
|
Binary file
|