@ably/ui 14.0.5 → 14.0.6
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/Flash.js +1 -1
- package/package.json +7 -9
- package/src/core/Accordion/Accordion.stories.tsx +0 -39
- package/src/core/Accordion.tsx +0 -149
- package/src/core/Code/Code.stories.tsx +0 -71
- package/src/core/Code/component.css +0 -1
- package/src/core/Code/component.js +0 -27
- package/src/core/Code.tsx +0 -44
- package/src/core/ConnectStateWrapper.tsx +0 -43
- package/src/core/ContactFooter/ContactFooter.stories.tsx +0 -11
- package/src/core/ContactFooter/component.css +0 -11
- package/src/core/ContactFooter/component.js +0 -2
- package/src/core/ContactFooter.tsx +0 -91
- package/src/core/CookieMessage/CookieMessage.stories.tsx +0 -12
- package/src/core/CookieMessage/component.css +0 -15
- package/src/core/CookieMessage.tsx +0 -52
- package/src/core/CustomerLogos/CustomerLogos.stories.tsx +0 -43
- package/src/core/CustomerLogos.tsx +0 -35
- package/src/core/DropdownMenu/DropdownMenu.stories.tsx +0 -48
- package/src/core/DropdownMenu.tsx +0 -140
- package/src/core/Expander/Expander.stories.tsx +0 -132
- package/src/core/Expander.tsx +0 -63
- package/src/core/FeaturedLink/FeaturedLink.stories.tsx +0 -43
- package/src/core/FeaturedLink.tsx +0 -93
- package/src/core/Flash/Flash.stories.tsx +0 -37
- package/src/core/Flash/component.css +0 -28
- package/src/core/Flash.tsx +0 -233
- package/src/core/Footer/Footer.stories.tsx +0 -26
- package/src/core/Footer/component.css +0 -33
- package/src/core/Footer.tsx +0 -535
- package/src/core/Icon/Icon.stories.tsx +0 -151
- package/src/core/Icon.tsx +0 -26
- package/src/core/Loader/Loader.stories.tsx +0 -21
- package/src/core/Loader.tsx +0 -52
- package/src/core/Logo/Logo.stories.tsx +0 -12
- package/src/core/Logo.tsx +0 -29
- package/src/core/Meganav/Meganav.stories.tsx +0 -86
- package/src/core/Meganav/component.css +0 -114
- package/src/core/Meganav/component.js +0 -150
- package/src/core/Meganav/component.json +0 -37
- package/src/core/Meganav.tsx +0 -225
- package/src/core/MeganavBlogPostsList/component.js +0 -43
- package/src/core/MeganavBlogPostsList.tsx +0 -41
- package/src/core/MeganavContentCompany.tsx +0 -166
- package/src/core/MeganavContentDevelopers.tsx +0 -210
- package/src/core/MeganavContentProducts.tsx +0 -163
- package/src/core/MeganavContentUseCases.tsx +0 -244
- package/src/core/MeganavControl/component.js +0 -117
- package/src/core/MeganavControl.tsx +0 -39
- package/src/core/MeganavControlMobileDropdown/component.js +0 -46
- package/src/core/MeganavControlMobileDropdown.tsx +0 -31
- package/src/core/MeganavControlMobilePanelClose/component.js +0 -36
- package/src/core/MeganavControlMobilePanelClose.tsx +0 -34
- package/src/core/MeganavControlMobilePanelOpen/component.js +0 -59
- package/src/core/MeganavControlMobilePanelOpen.tsx +0 -31
- package/src/core/MeganavItemsDesktop.tsx +0 -68
- package/src/core/MeganavItemsMobile.tsx +0 -197
- package/src/core/MeganavItemsSignedIn.tsx +0 -130
- package/src/core/MeganavSearch.tsx +0 -36
- package/src/core/MeganavSearchAutocomplete/component.js +0 -177
- package/src/core/MeganavSearchAutocomplete.tsx +0 -12
- package/src/core/MeganavSearchPanel.tsx +0 -52
- package/src/core/MeganavSearchSuggestions/component.js +0 -133
- package/src/core/MeganavSearchSuggestions.tsx +0 -62
- package/src/core/Notice/component.css +0 -7
- package/src/core/Notice/component.js +0 -154
- package/src/core/Notice.tsx +0 -102
- package/src/core/SignOutLink.tsx +0 -51
- package/src/core/Slider/Slider.stories.tsx +0 -98
- package/src/core/Slider/component.css +0 -40
- package/src/core/Slider/component.js +0 -105
- package/src/core/Slider.tsx +0 -224
- package/src/core/Table/Table.stories.tsx +0 -12
- package/src/core/Table/Table.tsx +0 -58
- package/src/core/Table/TableCell.tsx +0 -71
- package/src/core/Table/TableRow.tsx +0 -25
- package/src/core/Table/data.tsx +0 -133
- package/src/core/Table.tsx +0 -15
- package/src/core/Tooltip/Tooltip.stories.tsx +0 -27
- package/src/core/Tooltip.tsx +0 -88
- package/src/core/css.js +0 -3
- package/src/core/dom-query.js +0 -5
- 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 +0 -3
- package/src/core/fonts/manrope.css +0 -3
- package/src/core/fonts/next.css +0 -63
- package/src/core/fonts/source-code-pro.css +0 -3
- package/src/core/hubspot-chat-toggle.js +0 -67
- package/src/core/icons/discord.svg +0 -10
- package/src/core/icons/facebook.svg +0 -4
- package/src/core/icons/github.svg +0 -3
- package/src/core/icons/glassdoor.svg +0 -3
- package/src/core/icons/google.svg +0 -3
- package/src/core/icons/icon-display-48hrs.svg +0 -3
- package/src/core/icons/icon-display-about-ably-col.svg +0 -4
- package/src/core/icons/icon-display-api-keys.svg +0 -3
- package/src/core/icons/icon-display-api.svg +0 -3
- package/src/core/icons/icon-display-asset-tracking-col.svg +0 -18
- package/src/core/icons/icon-display-browser.svg +0 -10
- package/src/core/icons/icon-display-calendar.svg +0 -3
- package/src/core/icons/icon-display-call-mobile.svg +0 -3
- package/src/core/icons/icon-display-careers-col.svg +0 -9
- package/src/core/icons/icon-display-case-studies-col.svg +0 -5
- package/src/core/icons/icon-display-chat-col.svg +0 -4
- package/src/core/icons/icon-display-chat-stack-col.svg +0 -4
- package/src/core/icons/icon-display-chat-stack.svg +0 -4
- package/src/core/icons/icon-display-cloud-servers.svg +0 -3
- package/src/core/icons/icon-display-compare-tech-col.svg +0 -9
- package/src/core/icons/icon-display-customers-col.svg +0 -15
- package/src/core/icons/icon-display-data-broadcast-col.svg +0 -26
- package/src/core/icons/icon-display-data-synchronization-col.svg +0 -14
- package/src/core/icons/icon-display-docs-col.svg +0 -7
- package/src/core/icons/icon-display-documentation.svg +0 -3
- package/src/core/icons/icon-display-events-col.svg +0 -13
- package/src/core/icons/icon-display-examples-col.svg +0 -11
- package/src/core/icons/icon-display-gdpr.svg +0 -3
- package/src/core/icons/icon-display-general-comms.svg +0 -3
- package/src/core/icons/icon-display-hipaa.svg +0 -10
- package/src/core/icons/icon-display-integrations-col.svg +0 -8
- package/src/core/icons/icon-display-it-support-access.svg +0 -3
- package/src/core/icons/icon-display-it-support-helpdesk.svg +0 -3
- package/src/core/icons/icon-display-kafka-at-the-edge-col.svg +0 -8
- package/src/core/icons/icon-display-laptop.svg +0 -10
- package/src/core/icons/icon-display-lightbulb-col.svg +0 -10
- package/src/core/icons/icon-display-live-chat.svg +0 -3
- package/src/core/icons/icon-display-map-pin.svg +0 -3
- package/src/core/icons/icon-display-message.svg +0 -3
- package/src/core/icons/icon-display-padlock-closed.svg +0 -3
- package/src/core/icons/icon-display-platform.svg +0 -22
- package/src/core/icons/icon-display-play.svg +0 -3
- package/src/core/icons/icon-display-privacy-shield-framework.svg +0 -7
- package/src/core/icons/icon-display-push-notifications-col.svg +0 -6
- package/src/core/icons/icon-display-quickstart-guides-col.svg +0 -8
- package/src/core/icons/icon-display-resources-col.svg +0 -21
- package/src/core/icons/icon-display-sdks-col.svg +0 -11
- package/src/core/icons/icon-display-servers.svg +0 -3
- package/src/core/icons/icon-display-shopping-cart.svg +0 -10
- package/src/core/icons/icon-display-sla.svg +0 -3
- package/src/core/icons/icon-display-soc2-type2.svg +0 -3
- package/src/core/icons/icon-display-tech-account-comms.svg +0 -3
- package/src/core/icons/icon-display-tutorials-demos-col.svg +0 -25
- package/src/core/icons/icon-display-virtual-events-col.svg +0 -12
- package/src/core/icons/icon-display-virtual-events.svg +0 -12
- package/src/core/icons/icon-gui-ably-badge.svg +0 -3
- package/src/core/icons/icon-gui-arrow-bidirectional-horizontal.svg +0 -3
- package/src/core/icons/icon-gui-arrow-bidirectional-vertical.svg +0 -3
- package/src/core/icons/icon-gui-arrow-down.svg +0 -3
- package/src/core/icons/icon-gui-arrow-left.svg +0 -3
- package/src/core/icons/icon-gui-arrow-right.svg +0 -3
- package/src/core/icons/icon-gui-arrow-up.svg +0 -3
- package/src/core/icons/icon-gui-burger-menu.svg +0 -5
- package/src/core/icons/icon-gui-check-circled-fill-black.svg +0 -4
- package/src/core/icons/icon-gui-check-circled-fill.svg +0 -4
- package/src/core/icons/icon-gui-check-circled.svg +0 -3
- package/src/core/icons/icon-gui-checklist-checked.svg +0 -3
- package/src/core/icons/icon-gui-clock.svg +0 -3
- package/src/core/icons/icon-gui-close.svg +0 -3
- package/src/core/icons/icon-gui-copy.svg +0 -10
- package/src/core/icons/icon-gui-cross-circled-fill.svg +0 -4
- package/src/core/icons/icon-gui-cross-circled.svg +0 -3
- package/src/core/icons/icon-gui-dash-circled.svg +0 -3
- package/src/core/icons/icon-gui-disclosure-arrow.svg +0 -3
- package/src/core/icons/icon-gui-document-generic.svg +0 -3
- package/src/core/icons/icon-gui-enlarge.svg +0 -3
- package/src/core/icons/icon-gui-external-link.svg +0 -3
- package/src/core/icons/icon-gui-filter-flow-step-1.svg +0 -5
- package/src/core/icons/icon-gui-filter-flow-step-2.svg +0 -5
- package/src/core/icons/icon-gui-filter-flow-step-3.svg +0 -5
- package/src/core/icons/icon-gui-history.svg +0 -3
- package/src/core/icons/icon-gui-info.svg +0 -3
- package/src/core/icons/icon-gui-link-arrow.svg +0 -3
- package/src/core/icons/icon-gui-link.svg +0 -4
- package/src/core/icons/icon-gui-live-chat.svg +0 -3
- package/src/core/icons/icon-gui-minus.svg +0 -3
- package/src/core/icons/icon-gui-partial.svg +0 -4
- package/src/core/icons/icon-gui-plus.svg +0 -3
- package/src/core/icons/icon-gui-quote-marks-solid.svg +0 -3
- package/src/core/icons/icon-gui-refresh.svg +0 -10
- package/src/core/icons/icon-gui-resources.svg +0 -3
- package/src/core/icons/icon-gui-search.svg +0 -3
- package/src/core/icons/icon-gui-tick.svg +0 -3
- package/src/core/icons/icon-gui-warning.svg +0 -5
- package/src/core/icons/icon-live-updates-results-metrics-col.svg +0 -26
- package/src/core/icons/icon-multi-user-spaces-col.svg +0 -13
- package/src/core/icons/icon-social-x.svg +0 -3
- package/src/core/icons/icon-tech-apachekafka.svg +0 -3
- package/src/core/icons/linkedin.svg +0 -3
- package/src/core/icons/quote.svg +0 -3
- package/src/core/icons/stackoverflow.svg +0 -3
- package/src/core/icons/twitter.svg +0 -3
- package/src/core/icons/youtube.svg +0 -11
- package/src/core/icons.js +0 -6
- package/src/core/images/ably-logo.png +0 -0
- package/src/core/images/ably-logo.svg +0 -15
- package/src/core/images/ably-stack.svg +0 -14
- package/src/core/images/best-support-2023.svg +0 -1
- 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 +0 -5
- package/src/core/images/cust-logo-bloomberg-mono-pos.svg +0 -11
- package/src/core/images/cust-logo-hopin-mono-pos.svg +0 -4
- 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 +0 -4
- 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 +0 -17
- 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 +0 -9
- package/src/core/images/cust-logo-toyota-mono-pos.svg +0 -18
- 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 +0 -3
- 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 +0 -1
- 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 +0 -1
- package/src/core/images/highest-user-adoption-2022.png +0 -0
- package/src/core/images/highest-user-adoption-2023.svg +0 -1
- package/src/core/images/icon-tech-aws.svg +0 -4
- package/src/core/images/rocket-list-2021.png +0 -0
- package/src/core/images/scale-motif-open-empathetic.svg +0 -1
- 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 +0 -11
- package/src/core/react-renderer.tsx +0 -29
- package/src/core/remote-blogs-posts.js +0 -42
- package/src/core/remote-data-store.js +0 -34
- package/src/core/remote-data-util.js +0 -4
- package/src/core/remote-session-data.js +0 -58
- package/src/core/scripts.js +0 -10
- package/src/core/styles/buttons.css +0 -124
- package/src/core/styles/forms.css +0 -64
- package/src/core/styles/layout.css +0 -21
- package/src/core/styles/properties.css +0 -278
- package/src/core/styles/text.css +0 -168
- package/src/core/styles/toggles.css +0 -38
- package/src/core/styles.base.css +0 -1
- package/src/core/styles.components.css +0 -44
- package/src/core/styles.css +0 -2
- package/src/core/url-base.js +0 -7
- package/src/core/utils/syntax-highlighter-registry.js +0 -63
- package/src/core/utils/syntax-highlighter.css +0 -71
- package/src/core/utils/syntax-highlighter.js +0 -103
- package/src/pages/Buttons.mdx +0 -121
- package/src/pages/Chips.mdx +0 -136
- package/src/pages/Colour.mdx +0 -23
- package/src/pages/Forms.mdx +0 -219
- package/src/pages/Layout.mdx +0 -58
- package/src/pages/Toggles.mdx +0 -42
- package/src/pages/Typography.mdx +0 -206
- package/src/pages/utils.ts +0 -80
- package/src/reset/scripts.js +0 -1
- package/src/reset/styles/normalize.css +0 -353
- package/src/reset/styles/reset.css +0 -139
- package/src/reset/styles.css +0 -2
package/src/core/Icon.tsx
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
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;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import Loader from "../Loader";
|
|
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
|
-
};
|
package/src/core/Loader.tsx
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
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;
|
package/src/core/Logo.tsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
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);
|
|
@@ -1,86 +0,0 @@
|
|
|
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: "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
|
-
};
|
|
@@ -1,114 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,150 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
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
|
-
}
|