@ably/ui 14.1.0-dev.30520a8 → 14.1.0-dev.708de27
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/core/icons/icon-gui-dropdown-arrow.svg +3 -0
- package/core/sprites.svg +1 -1
- package/core/styles/forms.css +3 -8
- package/package.json +2 -1
- 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 +149 -0
- package/src/core/Code/.DS_Store +0 -0
- package/src/core/Code/Code.stories.tsx +71 -0
- package/src/core/Code/component.css +1 -0
- package/src/core/Code/component.js +27 -0
- package/src/core/Code.tsx +44 -0
- package/src/core/ConnectStateWrapper.tsx +43 -0
- package/src/core/ContactFooter/.DS_Store +0 -0
- package/src/core/ContactFooter/ContactFooter.stories.tsx +11 -0
- package/src/core/ContactFooter/component.css +11 -0
- package/src/core/ContactFooter/component.js +2 -0
- package/src/core/ContactFooter.tsx +91 -0
- package/src/core/CookieMessage/.DS_Store +0 -0
- package/src/core/CookieMessage/CookieMessage.stories.tsx +12 -0
- package/src/core/CookieMessage/component.css +15 -0
- package/src/core/CookieMessage.tsx +52 -0
- 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.tsx +140 -0
- package/src/core/Expander/Expander.stories.tsx +132 -0
- package/src/core/Expander.tsx +63 -0
- package/src/core/FeaturedLink/.DS_Store +0 -0
- package/src/core/FeaturedLink/FeaturedLink.stories.tsx +43 -0
- package/src/core/FeaturedLink.tsx +93 -0
- package/src/core/Flash/.DS_Store +0 -0
- package/src/core/Flash/Flash.stories.tsx +37 -0
- package/src/core/Flash/component.css +28 -0
- package/src/core/Flash.tsx +233 -0
- package/src/core/Footer/.DS_Store +0 -0
- package/src/core/Footer/Footer.stories.tsx +26 -0
- package/src/core/Footer/component.css +33 -0
- package/src/core/Footer.tsx +535 -0
- package/src/core/Icon/.DS_Store +0 -0
- package/src/core/Icon/Icon.stories.tsx +151 -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.tsx +52 -0
- 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 +114 -0
- package/src/core/Meganav/component.js +150 -0
- package/src/core/Meganav/component.json +37 -0
- package/src/core/Meganav.tsx +225 -0
- package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/src/core/MeganavBlogPostsList/component.js +43 -0
- package/src/core/MeganavBlogPostsList.tsx +41 -0
- package/src/core/MeganavContentCompany.tsx +166 -0
- package/src/core/MeganavContentDevelopers.tsx +210 -0
- package/src/core/MeganavContentProducts.tsx +163 -0
- package/src/core/MeganavContentUseCases.tsx +244 -0
- package/src/core/MeganavControl/.DS_Store +0 -0
- package/src/core/MeganavControl/component.js +117 -0
- package/src/core/MeganavControl.tsx +39 -0
- package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/src/core/MeganavControlMobileDropdown/component.js +46 -0
- package/src/core/MeganavControlMobileDropdown.tsx +31 -0
- package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/src/core/MeganavControlMobilePanelClose/component.js +36 -0
- package/src/core/MeganavControlMobilePanelClose.tsx +34 -0
- package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/src/core/MeganavControlMobilePanelOpen/component.js +59 -0
- package/src/core/MeganavControlMobilePanelOpen.tsx +31 -0
- package/src/core/MeganavItemsDesktop.tsx +68 -0
- package/src/core/MeganavItemsMobile.tsx +197 -0
- package/src/core/MeganavItemsSignedIn.tsx +130 -0
- package/src/core/MeganavSearch.tsx +36 -0
- package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/src/core/MeganavSearchAutocomplete/component.js +177 -0
- package/src/core/MeganavSearchAutocomplete.tsx +12 -0
- package/src/core/MeganavSearchPanel.tsx +52 -0
- package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/src/core/MeganavSearchSuggestions/component.js +133 -0
- package/src/core/MeganavSearchSuggestions.tsx +62 -0
- package/src/core/Notice/.DS_Store +0 -0
- package/src/core/Notice/component.css +7 -0
- package/src/core/Notice/component.js +154 -0
- package/src/core/Notice.tsx +102 -0
- package/src/core/SignOutLink.tsx +51 -0
- package/src/core/Slider/.DS_Store +0 -0
- package/src/core/Slider/Slider.stories.tsx +98 -0
- package/src/core/Slider/component.css +40 -0
- package/src/core/Slider/component.js +105 -0
- package/src/core/Slider.tsx +224 -0
- package/src/core/Table/.DS_Store +0 -0
- package/src/core/Table/Table.stories.tsx +12 -0
- package/src/core/Table/Table.tsx +58 -0
- package/src/core/Table/TableCell.tsx +71 -0
- package/src/core/Table/TableRow.tsx +25 -0
- package/src/core/Table/data.tsx +133 -0
- package/src/core/Table.tsx +15 -0
- package/src/core/Tooltip/.DS_Store +0 -0
- package/src/core/Tooltip/Tooltip.stories.tsx +27 -0
- package/src/core/Tooltip.tsx +88 -0
- package/src/core/css.js +3 -0
- package/src/core/dom-query.js +5 -0
- package/src/core/fonts/NEXT-Book-Light-Italic.eot +0 -0
- package/src/core/fonts/NEXT-Book-Light-Italic.otf +0 -0
- package/src/core/fonts/NEXT-Book-Light-Italic.woff +0 -0
- package/src/core/fonts/NEXT-Book-Light-Italic.woff2 +0 -0
- package/src/core/fonts/NEXT-Book-Light.eot +0 -0
- package/src/core/fonts/NEXT-Book-Light.otf +0 -0
- package/src/core/fonts/NEXT-Book-Light.woff +0 -0
- package/src/core/fonts/NEXT-Book-Light.woff2 +0 -0
- package/src/core/fonts/NEXT-Book-Medium-Italic.eot +0 -0
- package/src/core/fonts/NEXT-Book-Medium-Italic.otf +0 -0
- package/src/core/fonts/NEXT-Book-Medium-Italic.woff +0 -0
- package/src/core/fonts/NEXT-Book-Medium-Italic.woff2 +0 -0
- package/src/core/fonts/NEXT-Book-Medium.eot +0 -0
- package/src/core/fonts/NEXT-Book-Medium.otf +0 -0
- package/src/core/fonts/NEXT-Book-Medium.woff +0 -0
- package/src/core/fonts/NEXT-Book-Medium.woff2 +0 -0
- package/src/core/fonts/jetBrains-mono.css +3 -0
- package/src/core/fonts/manrope.css +3 -0
- package/src/core/fonts/next.css +63 -0
- package/src/core/fonts/source-code-pro.css +3 -0
- package/src/core/hubspot-chat-toggle.js +67 -0
- package/src/core/icons/discord.svg +10 -0
- package/src/core/icons/facebook.svg +4 -0
- package/src/core/icons/github.svg +3 -0
- package/src/core/icons/glassdoor.svg +3 -0
- package/src/core/icons/google.svg +3 -0
- package/src/core/icons/icon-display-48hrs.svg +3 -0
- package/src/core/icons/icon-display-about-ably-col.svg +4 -0
- package/src/core/icons/icon-display-api-keys.svg +3 -0
- package/src/core/icons/icon-display-api.svg +3 -0
- package/src/core/icons/icon-display-asset-tracking-col.svg +18 -0
- package/src/core/icons/icon-display-browser.svg +10 -0
- package/src/core/icons/icon-display-calendar.svg +3 -0
- package/src/core/icons/icon-display-call-mobile.svg +3 -0
- package/src/core/icons/icon-display-careers-col.svg +9 -0
- package/src/core/icons/icon-display-case-studies-col.svg +5 -0
- package/src/core/icons/icon-display-chat-col.svg +4 -0
- package/src/core/icons/icon-display-chat-stack-col.svg +4 -0
- package/src/core/icons/icon-display-chat-stack.svg +4 -0
- package/src/core/icons/icon-display-cloud-servers.svg +3 -0
- package/src/core/icons/icon-display-compare-tech-col.svg +9 -0
- package/src/core/icons/icon-display-customers-col.svg +15 -0
- package/src/core/icons/icon-display-data-broadcast-col.svg +26 -0
- package/src/core/icons/icon-display-data-synchronization-col.svg +14 -0
- package/src/core/icons/icon-display-docs-col.svg +7 -0
- package/src/core/icons/icon-display-documentation.svg +3 -0
- package/src/core/icons/icon-display-events-col.svg +13 -0
- package/src/core/icons/icon-display-examples-col.svg +11 -0
- package/src/core/icons/icon-display-gdpr.svg +3 -0
- package/src/core/icons/icon-display-general-comms.svg +3 -0
- package/src/core/icons/icon-display-hipaa.svg +10 -0
- package/src/core/icons/icon-display-integrations-col.svg +8 -0
- package/src/core/icons/icon-display-it-support-access.svg +3 -0
- package/src/core/icons/icon-display-it-support-helpdesk.svg +3 -0
- package/src/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
- package/src/core/icons/icon-display-laptop.svg +10 -0
- package/src/core/icons/icon-display-lightbulb-col.svg +10 -0
- package/src/core/icons/icon-display-live-chat.svg +3 -0
- package/src/core/icons/icon-display-map-pin.svg +3 -0
- package/src/core/icons/icon-display-message.svg +3 -0
- package/src/core/icons/icon-display-padlock-closed.svg +3 -0
- package/src/core/icons/icon-display-platform.svg +22 -0
- package/src/core/icons/icon-display-play.svg +3 -0
- package/src/core/icons/icon-display-privacy-shield-framework.svg +7 -0
- package/src/core/icons/icon-display-push-notifications-col.svg +6 -0
- package/src/core/icons/icon-display-quickstart-guides-col.svg +8 -0
- package/src/core/icons/icon-display-resources-col.svg +21 -0
- package/src/core/icons/icon-display-sdks-col.svg +11 -0
- package/src/core/icons/icon-display-servers.svg +3 -0
- package/src/core/icons/icon-display-shopping-cart.svg +10 -0
- package/src/core/icons/icon-display-sla.svg +3 -0
- package/src/core/icons/icon-display-soc2-type2.svg +3 -0
- package/src/core/icons/icon-display-tech-account-comms.svg +3 -0
- package/src/core/icons/icon-display-tutorials-demos-col.svg +25 -0
- package/src/core/icons/icon-display-virtual-events-col.svg +12 -0
- package/src/core/icons/icon-display-virtual-events.svg +12 -0
- package/src/core/icons/icon-gui-ably-badge.svg +3 -0
- package/src/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +3 -0
- package/src/core/icons/icon-gui-arrow-bidirectional-vertical.svg +3 -0
- package/src/core/icons/icon-gui-arrow-down.svg +3 -0
- package/src/core/icons/icon-gui-arrow-left.svg +3 -0
- package/src/core/icons/icon-gui-arrow-right.svg +3 -0
- package/src/core/icons/icon-gui-arrow-up.svg +3 -0
- package/src/core/icons/icon-gui-burger-menu.svg +5 -0
- package/src/core/icons/icon-gui-check-circled-fill-black.svg +4 -0
- package/src/core/icons/icon-gui-check-circled-fill.svg +4 -0
- package/src/core/icons/icon-gui-check-circled.svg +3 -0
- package/src/core/icons/icon-gui-checklist-checked.svg +3 -0
- package/src/core/icons/icon-gui-clock.svg +3 -0
- package/src/core/icons/icon-gui-close.svg +3 -0
- package/src/core/icons/icon-gui-copy.svg +10 -0
- package/src/core/icons/icon-gui-cross-circled-fill.svg +4 -0
- package/src/core/icons/icon-gui-cross-circled.svg +3 -0
- package/src/core/icons/icon-gui-dash-circled.svg +3 -0
- package/src/core/icons/icon-gui-disclosure-arrow.svg +3 -0
- package/src/core/icons/icon-gui-document-generic.svg +3 -0
- package/src/core/icons/icon-gui-dropdown-arrow.svg +3 -0
- package/src/core/icons/icon-gui-enlarge.svg +3 -0
- package/src/core/icons/icon-gui-external-link.svg +3 -0
- package/src/core/icons/icon-gui-filter-flow-step-1.svg +5 -0
- package/src/core/icons/icon-gui-filter-flow-step-2.svg +5 -0
- package/src/core/icons/icon-gui-filter-flow-step-3.svg +5 -0
- package/src/core/icons/icon-gui-history.svg +3 -0
- package/src/core/icons/icon-gui-info.svg +3 -0
- package/src/core/icons/icon-gui-link-arrow.svg +3 -0
- package/src/core/icons/icon-gui-link.svg +4 -0
- package/src/core/icons/icon-gui-live-chat.svg +3 -0
- package/src/core/icons/icon-gui-minus.svg +3 -0
- package/src/core/icons/icon-gui-partial.svg +4 -0
- package/src/core/icons/icon-gui-plus.svg +3 -0
- package/src/core/icons/icon-gui-quote-marks-solid.svg +3 -0
- package/src/core/icons/icon-gui-refresh.svg +10 -0
- package/src/core/icons/icon-gui-resources.svg +3 -0
- package/src/core/icons/icon-gui-search.svg +3 -0
- package/src/core/icons/icon-gui-tick.svg +3 -0
- package/src/core/icons/icon-gui-warning.svg +5 -0
- package/src/core/icons/icon-live-updates-results-metrics-col.svg +26 -0
- package/src/core/icons/icon-multi-user-spaces-col.svg +13 -0
- package/src/core/icons/icon-social-x.svg +3 -0
- package/src/core/icons/icon-tech-apachekafka.svg +3 -0
- package/src/core/icons/linkedin.svg +3 -0
- package/src/core/icons/quote.svg +3 -0
- package/src/core/icons/stackoverflow.svg +3 -0
- package/src/core/icons/twitter.svg +3 -0
- package/src/core/icons/youtube.svg +11 -0
- package/src/core/icons.js +6 -0
- package/src/core/images/ably-logo.png +0 -0
- package/src/core/images/ably-logo.svg +15 -0
- package/src/core/images/ably-stack.svg +14 -0
- package/src/core/images/best-support-2023.svg +1 -0
- package/src/core/images/cust-logo-ao-col-pos.png +0 -0
- package/src/core/images/cust-logo-ao-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-ausopen-col-pos.png +0 -0
- package/src/core/images/cust-logo-ausopen-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-ausopen-mono-pos.svg +5 -0
- package/src/core/images/cust-logo-bloomberg-mono-pos.svg +11 -0
- package/src/core/images/cust-logo-hopin-mono-pos.svg +4 -0
- package/src/core/images/cust-logo-hubspot-col-pos.png +0 -0
- package/src/core/images/cust-logo-hubspot-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-hubspot-mono-pos.svg +4 -0
- package/src/core/images/cust-logo-lightspeed-col-pos.png +0 -0
- package/src/core/images/cust-logo-lightspeed-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-lightspeed-syst-col-pos.png +0 -0
- package/src/core/images/cust-logo-lightspeed-syst-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-mentimeter-mono-pos.svg +17 -0
- package/src/core/images/cust-logo-split-col-pos.png +0 -0
- package/src/core/images/cust-logo-split-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-split-mono-pos.svg +9 -0
- package/src/core/images/cust-logo-toyota-mono-pos.svg +18 -0
- package/src/core/images/cust-logo-vitac-col-pos.png +0 -0
- package/src/core/images/cust-logo-vitac-col-pos@2x.png +0 -0
- package/src/core/images/cust-logo-webflow-col-pos.svg +3 -0
- package/src/core/images/cust-photo-hubspot-max-freiert.jpg +0 -0
- package/src/core/images/cust-photo-split-pato-echague.jpg +0 -0
- package/src/core/images/cust-photo-vitac-joe-antonio.jpg +0 -0
- package/src/core/images/fastest-implementation-2023.svg +1 -0
- package/src/core/images/flexible-companies.png +0 -0
- package/src/core/images/high-performer-2022.png +0 -0
- package/src/core/images/high-performer-2023.svg +1 -0
- package/src/core/images/highest-user-adoption-2022.png +0 -0
- package/src/core/images/highest-user-adoption-2023.svg +1 -0
- package/src/core/images/icon-tech-aws.svg +4 -0
- package/src/core/images/rocket-list-2021.png +0 -0
- package/src/core/images/scale-motif-open-empathetic.svg +1 -0
- package/src/core/images/technical-support-01-800x533.jpg +0 -0
- package/src/core/images/users-love-us-2022.png +0 -0
- package/src/core/load-sprites.js +11 -0
- package/src/core/react-renderer.tsx +29 -0
- package/src/core/remote-blogs-posts.js +42 -0
- package/src/core/remote-data-store.js +34 -0
- package/src/core/remote-data-util.js +4 -0
- package/src/core/remote-session-data.js +58 -0
- package/src/core/scripts.js +10 -0
- package/src/core/styles/Dropdown.stories.tsx +49 -0
- package/src/core/styles/Toggle.stories.tsx +41 -0
- package/src/core/styles/buttons.css +124 -0
- package/src/core/styles/forms.css +83 -0
- package/src/core/styles/layout.css +21 -0
- package/src/core/styles/properties.css +278 -0
- package/src/core/styles/text.css +168 -0
- package/src/core/styles/toggles.css +38 -0
- package/src/core/styles.base.css +1 -0
- package/src/core/styles.components.css +44 -0
- package/src/core/styles.css +2 -0
- package/src/core/url-base.js +7 -0
- package/src/core/utils/syntax-highlighter-registry.js +63 -0
- package/src/core/utils/syntax-highlighter.css +71 -0
- package/src/core/utils/syntax-highlighter.js +103 -0
- 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 +219 -0
- package/src/pages/Layout.mdx +58 -0
- package/src/pages/Typography.mdx +206 -0
- package/src/pages/utils.ts +80 -0
- package/src/reset/scripts.js +1 -0
- package/src/reset/styles/normalize.css +353 -0
- package/src/reset/styles/reset.css +139 -0
- package/src/reset/styles.css +2 -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 "../Loader";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
title: "JS 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
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
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) => (
|
|
14
|
+
<svg
|
|
15
|
+
className={`${ringColor} ${additionalCSS}`}
|
|
16
|
+
style={{ width: size, height: size }}
|
|
17
|
+
height="24"
|
|
18
|
+
viewBox="0 0 24 24"
|
|
19
|
+
width="24"
|
|
20
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
21
|
+
>
|
|
22
|
+
<style
|
|
23
|
+
dangerouslySetInnerHTML={{
|
|
24
|
+
__html: `
|
|
25
|
+
@keyframes chunk-animation {
|
|
26
|
+
to {
|
|
27
|
+
transform: rotate(360deg);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.chunk {
|
|
32
|
+
transform: rotate(0deg);
|
|
33
|
+
transform-origin: center;
|
|
34
|
+
animation: chunk-animation 0.6s cubic-bezier(.44,.15,.66,.98) forwards infinite;
|
|
35
|
+
}
|
|
36
|
+
`,
|
|
37
|
+
}}
|
|
38
|
+
></style>
|
|
39
|
+
<path
|
|
40
|
+
fill="currentColor"
|
|
41
|
+
d="m12 1.99976c-1.9778 0-3.91121.58649-5.5557 1.6853s-2.92621 2.6606-3.68309 4.48786c-.75688 1.82728-.95491 3.83788-.56906 5.77778.38585 1.9398 1.33826 3.7216 2.73679 5.1201 1.39852 1.3985 3.18035 2.351 5.12016 2.7368 1.9398.3859 3.9505.1878 5.7777-.569 1.8273-.7569 3.3891-2.0387 4.4879-3.6831 1.0988-1.6445 1.6853-3.5779 1.6853-5.5557 0-1.3133-.2587-2.61362-.7612-3.82688-.5025-1.21325-1.2391-2.31565-2.1677-3.24423-.9286-.92859-2.031-1.66518-3.2443-2.16773-1.2132-.50255-2.5136-.7612-3.8268-.7612zm0 18.00004c-1.5822 0-3.12896-.4692-4.44456-1.3483-1.31559-.879-2.34097-2.1285-2.94647-3.5903s-.76393-3.0703-.45525-4.6222c.30868-1.55181 1.07061-2.97728 2.18943-4.0961s2.54428-1.88074 4.09615-2.18943c1.5518-.30868 3.1604-.15025 4.6222.45525s2.7112 1.63088 3.5903 2.94647c.879 1.3156 1.3482 2.86231 1.3482 4.44461 0 2.1217-.8428 4.1565-2.3431 5.6568s-3.5352 2.3432-5.6569 2.3432z"
|
|
42
|
+
opacity=".5"
|
|
43
|
+
/>
|
|
44
|
+
<path
|
|
45
|
+
className="chunk"
|
|
46
|
+
d="m20 11.9998h2c0-1.3133-.2587-2.61362-.7612-3.82688-.5026-1.21325-1.2391-2.31565-2.1677-3.24423-.9286-.92859-2.031-1.66518-3.2443-2.16773-1.2132-.50255-2.5136-.7612-3.8268-.7612v2c2.1217 0 4.1566.84285 5.6569 2.34314 1.5002 1.50029 2.3431 3.53512 2.3431 5.6569z"
|
|
47
|
+
fill="#ff5416"
|
|
48
|
+
/>
|
|
49
|
+
</svg>
|
|
50
|
+
);
|
|
51
|
+
|
|
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 { http, HttpResponse } from "msw";
|
|
3
|
+
|
|
4
|
+
import Meganav from "../Meganav";
|
|
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: "JS Components/Meganav",
|
|
23
|
+
component: Meganav,
|
|
24
|
+
parameters: {
|
|
25
|
+
layout: "fullscreen",
|
|
26
|
+
msw: {
|
|
27
|
+
handlers: [
|
|
28
|
+
http.get("/api/me", () => {
|
|
29
|
+
return HttpResponse.json({});
|
|
30
|
+
}),
|
|
31
|
+
http.get("/api/blog", () => {
|
|
32
|
+
return HttpResponse.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
|
+
};
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-meganav-wrapper {
|
|
3
|
+
/* Define values for new stacking context defined by position: fixed */
|
|
4
|
+
--stacking-context-meganav-dropdown: 10;
|
|
5
|
+
--stacking-context-meganav-mobile-panel: 20;
|
|
6
|
+
|
|
7
|
+
z-index: var(--stacking-context-page-meganav);
|
|
8
|
+
|
|
9
|
+
@apply fixed top-0 w-full;
|
|
10
|
+
@apply antialiased font-sans transition-colors;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ui-meganav {
|
|
14
|
+
height: var(--ui-meganav-height);
|
|
15
|
+
|
|
16
|
+
@apply flex justify-between items-center max-w-screen-xl mx-auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui-meganav-panel,
|
|
20
|
+
.ui-meganav-mobile-dropdown,
|
|
21
|
+
.ui-meganav-panel-account {
|
|
22
|
+
z-index: var(--stacking-context-meganav-dropdown);
|
|
23
|
+
|
|
24
|
+
@apply absolute left-0 right-0;
|
|
25
|
+
@apply border-mid-grey border-t shadow-container;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ui-meganav-panel {
|
|
29
|
+
@apply bg-white;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ui-meganav-panel-mobile {
|
|
33
|
+
z-index: var(--stacking-context-meganav-mobile-panel);
|
|
34
|
+
|
|
35
|
+
/* Prevents momentum-based scrolling https://devdocs.io/css/-webkit-overflow-scrolling */
|
|
36
|
+
-webkit-overflow-scrolling: auto;
|
|
37
|
+
|
|
38
|
+
@apply bg-white pt-16 border-0;
|
|
39
|
+
@apply border-mid-grey border-t shadow-container;
|
|
40
|
+
@apply fixed top-64 left-0 right-0 overflow-y-auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ui-meganav-panel-account {
|
|
44
|
+
left: auto;
|
|
45
|
+
min-width: 20rem;
|
|
46
|
+
@apply bg-white rounded-t-none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ui-meganav-panel-split-bg {
|
|
50
|
+
background: linear-gradient(to right, #fafafb 33%, white 33%, white 100%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ui-meganav-link {
|
|
54
|
+
@apply text-menu2 font-bold font-sans;
|
|
55
|
+
@apply mr-12 lg:mr-24 px-0 py-20;
|
|
56
|
+
@apply hover:text-gui-hover focus:text-gui-focus focus:outline-none;
|
|
57
|
+
@apply transition-colors;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ui-meganav-item {
|
|
61
|
+
flex: 1 0 auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ui-meganav-mobile-link {
|
|
65
|
+
@apply p-menu-row relative -left-8 w-extend-8;
|
|
66
|
+
@apply text-menu2 font-mono font-medium block text-cool-black text-left;
|
|
67
|
+
@apply flex items-center;
|
|
68
|
+
@apply focus:text-gui-focus focus:outline-none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ui-meganav-account-link {
|
|
72
|
+
@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;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ui-meganav-content {
|
|
76
|
+
@apply max-w-screen-xl py-24 lg:py-32 mx-auto;
|
|
77
|
+
@apply grid grid-cols-1;
|
|
78
|
+
@apply px-24 md:px-32 lg:px-32 xl:px-64;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* This is implemented not as padding so we can change the color of just this space, while keeping the grid
|
|
82
|
+
as close to the designs as possible */
|
|
83
|
+
.ui-meganav-content-spacer {
|
|
84
|
+
@apply hidden md:block md:w-32 lg:w-32 xl:w-64 self-stretch flex-shrink-0 flex-grow-0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.ui-meganav-media {
|
|
88
|
+
@apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.ui-meganav-media-with-image {
|
|
92
|
+
grid-template-columns: max-content 1fr;
|
|
93
|
+
grid-template-rows: min-content 1fr;
|
|
94
|
+
|
|
95
|
+
@apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
|
|
96
|
+
@apply grid gap-x-16;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ui-meganav-media-heading {
|
|
100
|
+
@apply text-menu3 text-cool-black font-bold font-sans group-hover:text-gui-hover group-focus:text-gui-focus leading-normal;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.ui-meganav-media-copy {
|
|
104
|
+
@apply text-p3 font-sans font-medium text-dark-grey leading-normal;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ui-meganav-overline {
|
|
108
|
+
@apply text-overline2 text-cool-black uppercase font-medium font-mono tracking-widen-0.16 p-overline;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.ui-meganav-hr {
|
|
112
|
+
@apply my-0 text-mid-grey;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import throttle from "lodash.throttle";
|
|
2
|
+
|
|
3
|
+
// Glossary:
|
|
4
|
+
// item - is the element which contains both the control and the panel - these are adjacent
|
|
5
|
+
// control - interactive element that controls showing and hiding of dropdown or panel
|
|
6
|
+
// panel - container for meganav content
|
|
7
|
+
// dropdown - container for top level items on mobile
|
|
8
|
+
// clear - return to initial state
|
|
9
|
+
// teardown - remove all event listeners (for example when removing nodes)
|
|
10
|
+
|
|
11
|
+
import { queryId, queryIdAll } from "../dom-query";
|
|
12
|
+
|
|
13
|
+
import MeganavControl from "../MeganavControl/component.js";
|
|
14
|
+
import MeganavControlMobileDropdown from "../MeganavControlMobileDropdown/component.js";
|
|
15
|
+
import MobilePanelOpenClick from "../MeganavControlMobilePanelOpen/component.js";
|
|
16
|
+
import MobilePanelCloseClick from "../MeganavControlMobilePanelClose/component.js";
|
|
17
|
+
import MeganavSearchAutocomplete from "../MeganavSearchAutocomplete/component.js";
|
|
18
|
+
import MeganavSearchSuggestions from "../MeganavSearchSuggestions/component.js";
|
|
19
|
+
|
|
20
|
+
// Close menu when user clicks outside of viewport
|
|
21
|
+
const windowOnBlur = (closeAll) => {
|
|
22
|
+
window.onblur = () => closeAll();
|
|
23
|
+
return { teardown: () => (window.onblur = null) };
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
// Close menu when click/tap outside of nav
|
|
27
|
+
const documentClick = (closeAll) => {
|
|
28
|
+
const meganav = queryId("meganav");
|
|
29
|
+
|
|
30
|
+
const clickHandler = (e) => {
|
|
31
|
+
if (meganav.contains(e.target)) return;
|
|
32
|
+
closeAll();
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
document.addEventListener("click", clickHandler);
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
teardown: () => document.removeEventListener("click", clickHandler),
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
// Invert from transparent to white
|
|
43
|
+
const documentScroll = (themeName) => {
|
|
44
|
+
if (themeName !== "transparentToWhite") return { teardown: () => {} };
|
|
45
|
+
|
|
46
|
+
const meganav = queryId("meganav");
|
|
47
|
+
const navItems = queryIdAll("meganav-link");
|
|
48
|
+
const controlMobileDropdownMenu = queryId(
|
|
49
|
+
"meganav-control-mobile-dropdown-menu",
|
|
50
|
+
);
|
|
51
|
+
const controlMobileDropdownClose = queryId(
|
|
52
|
+
"meganav-control-mobile-dropdown-close",
|
|
53
|
+
);
|
|
54
|
+
const controls = queryIdAll("meganav-control");
|
|
55
|
+
const signUpBtn = queryId("meganav-sign-up-btn");
|
|
56
|
+
|
|
57
|
+
const invertTextCollection = [
|
|
58
|
+
...Array.from(controls),
|
|
59
|
+
...Array.from(navItems),
|
|
60
|
+
queryId("meganav-logo"),
|
|
61
|
+
];
|
|
62
|
+
|
|
63
|
+
const invertMobleDropdownColor = (invert) => {
|
|
64
|
+
const whiteToBlack = ["ui-icon-white", "ui-icon-cool-black"];
|
|
65
|
+
const blackToWhite = [...whiteToBlack].reverse();
|
|
66
|
+
|
|
67
|
+
if (invert) {
|
|
68
|
+
controlMobileDropdownMenu?.classList.replace(...whiteToBlack);
|
|
69
|
+
controlMobileDropdownClose?.classList.replace(...whiteToBlack);
|
|
70
|
+
} else {
|
|
71
|
+
controlMobileDropdownMenu?.classList.replace(...blackToWhite);
|
|
72
|
+
controlMobileDropdownClose?.classList.replace(...blackToWhite);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
const inverSignupBtnColors = (invert) => {
|
|
77
|
+
if (invert) {
|
|
78
|
+
signUpBtn?.classList.replace("bg-white", "bg-cool-black");
|
|
79
|
+
signUpBtn?.classList.replace("text-cool-black", "text-white");
|
|
80
|
+
} else {
|
|
81
|
+
signUpBtn?.classList.replace("bg-cool-black", "bg-white");
|
|
82
|
+
signUpBtn?.classList.replace("text-white", "text-cool-black");
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
const scrollHandler = throttle(() => {
|
|
87
|
+
if (window.scrollY > 5) {
|
|
88
|
+
meganav.classList.replace("bg-transparent", "bg-white");
|
|
89
|
+
inverSignupBtnColors(true);
|
|
90
|
+
invertMobleDropdownColor(true);
|
|
91
|
+
|
|
92
|
+
invertTextCollection.forEach((n) =>
|
|
93
|
+
n.classList.replace("text-white", "text-cool-black"),
|
|
94
|
+
);
|
|
95
|
+
} else {
|
|
96
|
+
meganav.classList.replace("bg-white", "bg-transparent");
|
|
97
|
+
inverSignupBtnColors(false);
|
|
98
|
+
invertMobleDropdownColor(false);
|
|
99
|
+
|
|
100
|
+
invertTextCollection.forEach((n) =>
|
|
101
|
+
n.classList.replace("text-cool-black", "text-white"),
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
}, 150);
|
|
105
|
+
|
|
106
|
+
document.addEventListener("scroll", scrollHandler);
|
|
107
|
+
|
|
108
|
+
return {
|
|
109
|
+
teardown: () => document.removeEventListener("scroll", scrollHandler),
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
export default function Meganav(
|
|
114
|
+
{ themeName, addSearchApiKey } = { themeName: null },
|
|
115
|
+
) {
|
|
116
|
+
const controls = MeganavControl();
|
|
117
|
+
const panelOpenControls = MobilePanelOpenClick();
|
|
118
|
+
const panelCloseControls = MobilePanelCloseClick();
|
|
119
|
+
const search = MeganavSearchAutocomplete(addSearchApiKey);
|
|
120
|
+
const searchSuggestions = MeganavSearchSuggestions();
|
|
121
|
+
|
|
122
|
+
const mobileDropdownControl = MeganavControlMobileDropdown({
|
|
123
|
+
clearPanels: () =>
|
|
124
|
+
[...panelOpenControls, ...panelCloseControls].forEach((i) => i.clear()),
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const closeAll = () =>
|
|
128
|
+
[
|
|
129
|
+
mobileDropdownControl,
|
|
130
|
+
searchSuggestions,
|
|
131
|
+
...panelOpenControls,
|
|
132
|
+
...panelCloseControls,
|
|
133
|
+
...controls,
|
|
134
|
+
...search,
|
|
135
|
+
].forEach((i) => i.clear());
|
|
136
|
+
|
|
137
|
+
const teardowns = [
|
|
138
|
+
documentScroll(themeName),
|
|
139
|
+
documentClick(closeAll),
|
|
140
|
+
windowOnBlur(closeAll),
|
|
141
|
+
mobileDropdownControl,
|
|
142
|
+
searchSuggestions,
|
|
143
|
+
...controls,
|
|
144
|
+
...panelOpenControls,
|
|
145
|
+
...panelCloseControls,
|
|
146
|
+
...search,
|
|
147
|
+
].map((i) => i.teardown);
|
|
148
|
+
|
|
149
|
+
return () => teardowns.forEach((teardown) => teardown());
|
|
150
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"themes": {
|
|
3
|
+
"white": {
|
|
4
|
+
"backgroundColor": "bg-white",
|
|
5
|
+
"textColor": "text-cool-black",
|
|
6
|
+
"buttonBackgroundColor": "",
|
|
7
|
+
"buttonTextColor": "",
|
|
8
|
+
"mobileMenuColor": "text-cool-black",
|
|
9
|
+
"logoTextColor": "text-cool-black",
|
|
10
|
+
"barShadow": "shadow-subtle"
|
|
11
|
+
},
|
|
12
|
+
"black": {
|
|
13
|
+
"backgroundColor": "bg-cool-black",
|
|
14
|
+
"textColor": "text-white",
|
|
15
|
+
"buttonBackgroundColor": "bg-white",
|
|
16
|
+
"buttonTextColor": "text-cool-black",
|
|
17
|
+
"mobileMenuColor": "text-white",
|
|
18
|
+
"logoTextColor": "text-white",
|
|
19
|
+
"barShadow": ""
|
|
20
|
+
},
|
|
21
|
+
"transparentToWhite": {
|
|
22
|
+
"backgroundColor": "bg-transparent",
|
|
23
|
+
"textColor": "text-white",
|
|
24
|
+
"buttonBackgroundColor": "bg-white",
|
|
25
|
+
"buttonTextColor": "text-cool-black",
|
|
26
|
+
"mobileMenuColor": "text-white",
|
|
27
|
+
"logoTextColor": "text-white",
|
|
28
|
+
"barShadow": ""
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"panels": [
|
|
32
|
+
{ "label": "Products", "shortLabel": "Products", "id": "products-panel", "component": "MeganavContentProducts" },
|
|
33
|
+
{ "label": "Solutions", "shortLabel": "Solutions", "id": "use-cases-panel", "component": "MeganavContentUseCases" },
|
|
34
|
+
{ "label": "Company", "shortLabel": "Company", "id": "company-panel", "component": "MeganavContentCompany" },
|
|
35
|
+
{ "label": "Developers", "shortLabel": "Developers", "id": "developers-panel", "component": "MeganavContentDevelopers" }
|
|
36
|
+
]
|
|
37
|
+
}
|