@ably/ui 14.0.4 → 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/core/styles/forms.css +4 -4
- package/core/styles/toggles.css +38 -0
- package/core/styles.components.css +1 -0
- package/package.json +15 -18
- package/tailwind.config.js +3 -0
- 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.base.css +0 -1
- package/src/core/styles.components.css +0 -43
- 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 -173
- package/src/pages/Layout.mdx +0 -58
- package/src/pages/Typography.mdx +0 -206
- package/src/pages/utils.ts +0 -70
- 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
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
@layer components {
|
|
2
|
-
.ui-cookie-message {
|
|
3
|
-
@apply rounded-lg bg-white font-sans;
|
|
4
|
-
@apply justify-between items-center;
|
|
5
|
-
@apply opacity-100 z-50 bottom-0 fixed sm:flex;
|
|
6
|
-
@apply p-16 mb-16 ml-16;
|
|
7
|
-
max-width: 70vw;
|
|
8
|
-
box-shadow: 0px 24px 32px 0px #0000000d;
|
|
9
|
-
border: 1px solid var(--color-mid-grey);
|
|
10
|
-
border-left: 0.5rem solid var(--color-electric-cyan);
|
|
11
|
-
transition:
|
|
12
|
-
bottom 250ms ease-out,
|
|
13
|
-
opacity 150ms ease-out;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useEffect, useState } from "react";
|
|
2
|
-
import Cookie from "js-cookie";
|
|
3
|
-
|
|
4
|
-
import _absUrl from "./url-base";
|
|
5
|
-
|
|
6
|
-
const COOKIE_EXPIRY = 365;
|
|
7
|
-
|
|
8
|
-
type CookieMessageProps = {
|
|
9
|
-
cookieId: string;
|
|
10
|
-
urlBase: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const CookieMessage = ({ cookieId, urlBase }: CookieMessageProps) => {
|
|
14
|
-
const ref = useRef<HTMLDivElement>(null);
|
|
15
|
-
const [hideCookieMessage, setHideCookieMessage] = useState(true);
|
|
16
|
-
|
|
17
|
-
useEffect(() => {
|
|
18
|
-
const isCookieSet = Cookie.get(cookieId) ? true : false;
|
|
19
|
-
setHideCookieMessage(isCookieSet);
|
|
20
|
-
}, []);
|
|
21
|
-
|
|
22
|
-
const handleClose = () => {
|
|
23
|
-
Cookie.set(cookieId, "1", { expires: COOKIE_EXPIRY });
|
|
24
|
-
|
|
25
|
-
ref.current?.classList.add("bottom-1", "opacity-0");
|
|
26
|
-
setTimeout(() => setHideCookieMessage(true), 500);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const absUrl = (path) => _absUrl(path, urlBase);
|
|
30
|
-
|
|
31
|
-
// Presume the message is hidden by default
|
|
32
|
-
if (hideCookieMessage) return null;
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<div className="ui-cookie-message" ref={ref}>
|
|
36
|
-
<p className="ui-text-p2 pr-32">
|
|
37
|
-
<a href={absUrl("/privacy")} className="underline">
|
|
38
|
-
How we use cookies
|
|
39
|
-
</a>{" "}
|
|
40
|
-
to improve your experience.
|
|
41
|
-
</p>
|
|
42
|
-
<button
|
|
43
|
-
className="ui-btn-secondary mt-12 sm:mt-0 whitespace-nowrap"
|
|
44
|
-
onClick={handleClose}
|
|
45
|
-
>
|
|
46
|
-
Accept and close
|
|
47
|
-
</button>
|
|
48
|
-
</div>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
51
|
-
|
|
52
|
-
export default CookieMessage;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import CustomerLogos from "../CustomerLogos";
|
|
2
|
-
|
|
3
|
-
import hubspot from "../images/cust-logo-hubspot-mono-pos.svg";
|
|
4
|
-
import webflow from "../images/cust-logo-webflow-col-pos.svg";
|
|
5
|
-
import mentimeter from "../images/cust-logo-mentimeter-mono-pos.svg";
|
|
6
|
-
import toyota from "../images/cust-logo-toyota-mono-pos.svg";
|
|
7
|
-
import split from "../images/cust-logo-split-mono-pos.svg";
|
|
8
|
-
import australian from "../images/cust-logo-ausopen-mono-pos.svg";
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
title: "Components/Customer Logos",
|
|
12
|
-
component: CustomerLogos,
|
|
13
|
-
args: {
|
|
14
|
-
companies: [
|
|
15
|
-
{
|
|
16
|
-
label: "Hubspot",
|
|
17
|
-
logo: hubspot,
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
label: "Webflow",
|
|
21
|
-
logo: webflow,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: "Mentimeter",
|
|
25
|
-
logo: mentimeter,
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
label: "Toyota",
|
|
29
|
-
logo: toyota,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: "Split",
|
|
33
|
-
logo: split,
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: "Australian Open",
|
|
37
|
-
logo: australian,
|
|
38
|
-
},
|
|
39
|
-
],
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
export const Default = {};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
|
-
type CompanyEntity = {
|
|
4
|
-
label: string;
|
|
5
|
-
logo: string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
type CustomerLogosProps = {
|
|
9
|
-
companies: CompanyEntity[];
|
|
10
|
-
additionalCss?: string;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const CustomerLogos = ({
|
|
14
|
-
companies,
|
|
15
|
-
additionalCss = "",
|
|
16
|
-
}: CustomerLogosProps) => {
|
|
17
|
-
return (
|
|
18
|
-
<section className="w-full bg-white">
|
|
19
|
-
<ul
|
|
20
|
-
className={`py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center ${additionalCss}`}
|
|
21
|
-
>
|
|
22
|
-
{companies.map((company) => (
|
|
23
|
-
<li
|
|
24
|
-
key={company.label}
|
|
25
|
-
className="flex-auto text-center sm:w-1/3 w-1/2"
|
|
26
|
-
>
|
|
27
|
-
<img alt={company.label} src={company.logo} className="mx-auto" />
|
|
28
|
-
</li>
|
|
29
|
-
))}
|
|
30
|
-
</ul>
|
|
31
|
-
</section>
|
|
32
|
-
);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
export default CustomerLogos;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Icon from "../Icon";
|
|
3
|
-
import DropdownMenu from "../DropdownMenu";
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
title: "Components/Dropdown Menu",
|
|
7
|
-
component: DropdownMenu,
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export const Default = {
|
|
11
|
-
render: () => (
|
|
12
|
-
<DropdownMenu>
|
|
13
|
-
<DropdownMenu.Trigger additionalTriggerCSS="ui-text-h3">
|
|
14
|
-
Dropdown Menu Trigger
|
|
15
|
-
</DropdownMenu.Trigger>
|
|
16
|
-
<DropdownMenu.Content anchorPosition="left">
|
|
17
|
-
<DropdownMenu.Link
|
|
18
|
-
url="https://ably.com/"
|
|
19
|
-
title="Using DropdownMenuLink Component"
|
|
20
|
-
subtitle="This is using the inbuilt component which takes props for title, subtitle, icon name & children."
|
|
21
|
-
iconName="icon-gui-link-arrow"
|
|
22
|
-
>
|
|
23
|
-
<p className="ui-text-p3">I am a child! 🐣</p>
|
|
24
|
-
</DropdownMenu.Link>
|
|
25
|
-
<DropdownMenu.Link
|
|
26
|
-
url="https://ably.com/"
|
|
27
|
-
title="Using DropdownMenuLink Component - no icon, subtitle or children"
|
|
28
|
-
/>
|
|
29
|
-
<a
|
|
30
|
-
href="https://ably.com/docs"
|
|
31
|
-
target="_blank"
|
|
32
|
-
rel="noreferrer"
|
|
33
|
-
className="group block p-8 hover:bg-light-grey hover:text-cool-black rounded"
|
|
34
|
-
>
|
|
35
|
-
<p className="ui-featured-link group-hover:text-gui-hover font-light text-cool-black">
|
|
36
|
-
Using plain HTML
|
|
37
|
-
<Icon
|
|
38
|
-
name="icon-gui-link-arrow"
|
|
39
|
-
size="1rem"
|
|
40
|
-
color="text-cool-black"
|
|
41
|
-
additionalCSS="ui-featured-link-icon group-hover:text-gui-hover group-active:text-gui-active group-focus:text-gui-focus"
|
|
42
|
-
/>
|
|
43
|
-
</p>
|
|
44
|
-
</a>
|
|
45
|
-
</DropdownMenu.Content>
|
|
46
|
-
</DropdownMenu>
|
|
47
|
-
),
|
|
48
|
-
};
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
createContext,
|
|
3
|
-
useContext,
|
|
4
|
-
useState,
|
|
5
|
-
useEffect,
|
|
6
|
-
useRef,
|
|
7
|
-
ReactNode,
|
|
8
|
-
Dispatch,
|
|
9
|
-
} from "react";
|
|
10
|
-
import Icon from "./Icon";
|
|
11
|
-
|
|
12
|
-
const DropdownMenuContext = createContext<{
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
setOpen: Dispatch<React.SetStateAction<boolean>>;
|
|
15
|
-
}>({
|
|
16
|
-
isOpen: false,
|
|
17
|
-
setOpen: () => {},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
type DropdownMenuProps = {
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
type TriggerProps = {
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
additionalTriggerCSS?: string;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
type ContentProps = {
|
|
30
|
-
children: ReactNode;
|
|
31
|
-
anchorPosition?: string;
|
|
32
|
-
additionalContentCSS?: string;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type LinkProps = {
|
|
36
|
-
url: string;
|
|
37
|
-
title: string;
|
|
38
|
-
subtitle: string;
|
|
39
|
-
iconName: string;
|
|
40
|
-
children: ReactNode;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const DropdownMenu = ({ children }: DropdownMenuProps) => {
|
|
44
|
-
const [isOpen, setOpen] = useState(false);
|
|
45
|
-
const ref = useRef<HTMLDivElement>(null);
|
|
46
|
-
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
const clickHandler = (e) => {
|
|
49
|
-
if (ref.current?.contains(e.target)) return;
|
|
50
|
-
setOpen(false);
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
document.addEventListener("click", clickHandler);
|
|
54
|
-
|
|
55
|
-
return () => {
|
|
56
|
-
document.removeEventListener("click", clickHandler);
|
|
57
|
-
};
|
|
58
|
-
}, []);
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<DropdownMenuContext.Provider value={{ isOpen, setOpen }}>
|
|
62
|
-
<div id="dropdown-menu" className="relative" ref={ref}>
|
|
63
|
-
{children}
|
|
64
|
-
</div>
|
|
65
|
-
</DropdownMenuContext.Provider>
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const Trigger = ({ children, additionalTriggerCSS = "" }: TriggerProps) => {
|
|
70
|
-
const { isOpen, setOpen } = useContext(DropdownMenuContext);
|
|
71
|
-
|
|
72
|
-
return (
|
|
73
|
-
<button
|
|
74
|
-
id="menu-trigger"
|
|
75
|
-
onClick={() => setOpen(!isOpen)}
|
|
76
|
-
className={`${additionalTriggerCSS} flex items-center p-8 ml-8 group hover:text-gui-hover hover:bg-light-grey active:text-gui-active focus:text-gui-focus focus:outline-none rounded-lg`}
|
|
77
|
-
>
|
|
78
|
-
<span className="leading-normal">{children}</span>
|
|
79
|
-
<Icon
|
|
80
|
-
name="icon-gui-disclosure-arrow"
|
|
81
|
-
color="text-cool-black"
|
|
82
|
-
size="1.25rem"
|
|
83
|
-
additionalCSS="transform rotate-90 group-hover:text-gui-hover group-active:text-gui-active group-focus:text-gui-focus"
|
|
84
|
-
/>
|
|
85
|
-
</button>
|
|
86
|
-
);
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const Content = ({
|
|
90
|
-
children,
|
|
91
|
-
anchorPosition = "right",
|
|
92
|
-
additionalContentCSS,
|
|
93
|
-
}: ContentProps) => {
|
|
94
|
-
const { isOpen } = useContext(DropdownMenuContext);
|
|
95
|
-
|
|
96
|
-
if (!isOpen) {
|
|
97
|
-
return null;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
const anchorPositionClasses =
|
|
101
|
-
anchorPosition === "right" ? "right-0" : "left-0";
|
|
102
|
-
|
|
103
|
-
return (
|
|
104
|
-
<div
|
|
105
|
-
id="menu-content"
|
|
106
|
-
className={`${additionalContentCSS} absolute p-8 z-10 border border-mid-grey bg-white rounded shadow-container ${anchorPositionClasses}`}
|
|
107
|
-
style={{ minWidth: 275, top: 44 }}
|
|
108
|
-
>
|
|
109
|
-
{children}
|
|
110
|
-
</div>
|
|
111
|
-
);
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
const Link = ({ url, title, subtitle, iconName, children }: LinkProps) => {
|
|
115
|
-
return (
|
|
116
|
-
<a
|
|
117
|
-
href={url}
|
|
118
|
-
className="menu-link group block p-8 hover:bg-light-grey hover:text-cool-black rounded"
|
|
119
|
-
>
|
|
120
|
-
<p className="mb-4">
|
|
121
|
-
{title}
|
|
122
|
-
{iconName ? (
|
|
123
|
-
<Icon
|
|
124
|
-
name={iconName}
|
|
125
|
-
size="1rem"
|
|
126
|
-
color="text-cool-black"
|
|
127
|
-
additionalCSS="align-middle ml-8 relative -top-1 -left-4"
|
|
128
|
-
/>
|
|
129
|
-
) : null}
|
|
130
|
-
</p>
|
|
131
|
-
{subtitle ? <p className="ui-text-p3 mb-16">{subtitle}</p> : null}
|
|
132
|
-
{children}
|
|
133
|
-
</a>
|
|
134
|
-
);
|
|
135
|
-
};
|
|
136
|
-
|
|
137
|
-
DropdownMenu.Trigger = Trigger;
|
|
138
|
-
DropdownMenu.Content = Content;
|
|
139
|
-
DropdownMenu.Link = Link;
|
|
140
|
-
export default DropdownMenu;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import Expander from "../Expander";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
title: "Components/Expander",
|
|
6
|
-
component: Expander,
|
|
7
|
-
tags: ["autodocs"],
|
|
8
|
-
args: {
|
|
9
|
-
height: 200,
|
|
10
|
-
},
|
|
11
|
-
argTypes: {
|
|
12
|
-
height: {
|
|
13
|
-
control: {
|
|
14
|
-
type: "number",
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const longContentInner = (
|
|
21
|
-
<div>
|
|
22
|
-
<p>Ipsum</p>
|
|
23
|
-
<ul className="mb-16 list-inside list-disc">
|
|
24
|
-
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
|
|
25
|
-
<li>Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.</li>
|
|
26
|
-
<li>Mauris molestie felis et scelerisque ullamcorper.</li>
|
|
27
|
-
<li>Maecenas congue ligula ut commodo tristique.</li>
|
|
28
|
-
<li>
|
|
29
|
-
Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
|
|
30
|
-
venenatis.
|
|
31
|
-
</li>
|
|
32
|
-
<li>Donec nec turpis vel urna egestas fringilla.</li>
|
|
33
|
-
</ul>
|
|
34
|
-
<p>Ipsum</p>
|
|
35
|
-
<ul className="mb-16 list-inside list-disc">
|
|
36
|
-
<li>Mauris ut nibh vel metus cursus semper.</li>
|
|
37
|
-
<li>Ut mattis tortor eu urna accumsan gravida.</li>
|
|
38
|
-
<li>Nunc pellentesque neque at elit pretium tempor.</li>
|
|
39
|
-
<li>Curabitur finibus magna vitae nunc varius fermentum.</li>
|
|
40
|
-
</ul>
|
|
41
|
-
<ul className="mb-16 list-inside list-disc">
|
|
42
|
-
<li>Curabitur vehicula mi iaculis, luctus augue eu, venenatis quam.</li>
|
|
43
|
-
<li>Praesent in eros efficitur, consequat ante eu, faucibus arcu.</li>
|
|
44
|
-
<li>Nulla laoreet nibh a odio interdum, non molestie diam auctor.</li>
|
|
45
|
-
</ul>
|
|
46
|
-
<p>Ipsum</p>
|
|
47
|
-
<ul className="mb-16 list-inside list-disc">
|
|
48
|
-
<li>
|
|
49
|
-
Praesent aliquam diam tincidunt, sollicitudin tortor eget, vulputate
|
|
50
|
-
lacus.
|
|
51
|
-
</li>
|
|
52
|
-
<li>Quisque in mi sed ex vulputate varius in a leo.</li>
|
|
53
|
-
<li>Etiam posuere dolor at tortor aliquam imperdiet.</li>
|
|
54
|
-
<li>
|
|
55
|
-
Maecenas quis neque consequat, ultricies est sit amet, congue est.
|
|
56
|
-
</li>
|
|
57
|
-
<li>Aenean a elit sed nibh pretium lacinia sed convallis sapien.</li>
|
|
58
|
-
</ul>
|
|
59
|
-
<p>Ipsum</p>
|
|
60
|
-
<ul className="mb-16 list-inside list-disc">
|
|
61
|
-
<li>
|
|
62
|
-
Nulla malesuada libero id dolor aliquam, non sagittis mi scelerisque.
|
|
63
|
-
</li>
|
|
64
|
-
<li>
|
|
65
|
-
Etiam tincidunt lacus eu diam laoreet consectetur sit amet non est.
|
|
66
|
-
</li>
|
|
67
|
-
<li>In porta arcu nec purus tincidunt vulputate.</li>
|
|
68
|
-
</ul>
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
export const LongContent = {
|
|
73
|
-
render: () => <Expander>{longContentInner}</Expander>,
|
|
74
|
-
parameters: {
|
|
75
|
-
docs: {
|
|
76
|
-
description: {
|
|
77
|
-
story:
|
|
78
|
-
"A larger amount of content that exceeds the height cut-off, controls shown.",
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
export const ShortContent = {
|
|
85
|
-
render: () => (
|
|
86
|
-
<Expander>
|
|
87
|
-
<div>
|
|
88
|
-
<p>Ipsum</p>
|
|
89
|
-
<ul className="mb-16 list-inside list-disc">
|
|
90
|
-
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
|
|
91
|
-
<li>
|
|
92
|
-
Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.
|
|
93
|
-
</li>
|
|
94
|
-
<li>Mauris molestie felis et scelerisque ullamcorper.</li>
|
|
95
|
-
<li>Maecenas congue ligula ut commodo tristique.</li>
|
|
96
|
-
<li>
|
|
97
|
-
Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
|
|
98
|
-
venenatis.
|
|
99
|
-
</li>
|
|
100
|
-
<li>Donec nec turpis vel urna egestas fringilla.</li>
|
|
101
|
-
</ul>
|
|
102
|
-
</div>
|
|
103
|
-
</Expander>
|
|
104
|
-
),
|
|
105
|
-
parameters: {
|
|
106
|
-
docs: {
|
|
107
|
-
description: {
|
|
108
|
-
story:
|
|
109
|
-
"A smaller amount of content that doesn't exceed the height cut-off, therefore no controls shown.",
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
},
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export const OverriddenStyles = {
|
|
116
|
-
render: () => (
|
|
117
|
-
<Expander
|
|
118
|
-
className="bg-neutral-400 p-16 rounded-lg"
|
|
119
|
-
fadeClassName="from-neutral-800"
|
|
120
|
-
>
|
|
121
|
-
{longContentInner}
|
|
122
|
-
</Expander>
|
|
123
|
-
),
|
|
124
|
-
parameters: {
|
|
125
|
-
docs: {
|
|
126
|
-
description: {
|
|
127
|
-
story:
|
|
128
|
-
"A larger amount of content, with overridden styles for the content wrapper and fader.",
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
};
|
package/src/core/Expander.tsx
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import React, { PropsWithChildren, useEffect, useRef, useState } from "react";
|
|
2
|
-
|
|
3
|
-
type ExpanderProps = {
|
|
4
|
-
heightThreshold?: number;
|
|
5
|
-
className?: string;
|
|
6
|
-
fadeClassName?: string;
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const Expander = ({
|
|
10
|
-
heightThreshold = 200,
|
|
11
|
-
className,
|
|
12
|
-
fadeClassName,
|
|
13
|
-
children,
|
|
14
|
-
}: PropsWithChildren<ExpanderProps>) => {
|
|
15
|
-
const innerRef = useRef<HTMLDivElement>(null);
|
|
16
|
-
const [showControls, setShowControls] = useState(false);
|
|
17
|
-
const [height, setHeight] = useState<number | "auto">(heightThreshold);
|
|
18
|
-
const [expanded, setExpanded] = useState(false);
|
|
19
|
-
|
|
20
|
-
useEffect(() => {
|
|
21
|
-
const contentHeight = innerRef.current?.clientHeight ?? heightThreshold;
|
|
22
|
-
|
|
23
|
-
if (contentHeight < heightThreshold) {
|
|
24
|
-
setHeight("auto");
|
|
25
|
-
} else if (expanded) {
|
|
26
|
-
setHeight(contentHeight);
|
|
27
|
-
} else {
|
|
28
|
-
setHeight(heightThreshold);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
setShowControls(contentHeight >= heightThreshold);
|
|
32
|
-
}, [heightThreshold, expanded]);
|
|
33
|
-
|
|
34
|
-
return (
|
|
35
|
-
<>
|
|
36
|
-
<div
|
|
37
|
-
style={{ height }}
|
|
38
|
-
className={`overflow-hidden transition-all relative ${className ?? ""}`}
|
|
39
|
-
>
|
|
40
|
-
{showControls && !expanded && (
|
|
41
|
-
<div
|
|
42
|
-
className={`h-64 w-full bg-gradient-to-t from-white to-transparent absolute bottom-0 left-0 right-0 ${
|
|
43
|
-
fadeClassName ?? ""
|
|
44
|
-
}`}
|
|
45
|
-
></div>
|
|
46
|
-
)}
|
|
47
|
-
<div ref={innerRef}>{children}</div>
|
|
48
|
-
</div>
|
|
49
|
-
{showControls && (
|
|
50
|
-
<div
|
|
51
|
-
onClick={() => setExpanded(!expanded)}
|
|
52
|
-
onKeyDown={(e) => e.key === "Enter" && setExpanded(!expanded)}
|
|
53
|
-
tabIndex={0}
|
|
54
|
-
className="mt-16 cursor-pointer font-bold text-gui-blue-default-light hover:text-gui-blue-hover-light"
|
|
55
|
-
>
|
|
56
|
-
{expanded ? "View less -" : "View all +"}
|
|
57
|
-
</div>
|
|
58
|
-
)}
|
|
59
|
-
</>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default Expander;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import FeaturedLink from "../FeaturedLink";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
title: "Components/Featured Link",
|
|
5
|
-
component: FeaturedLink,
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: "centered",
|
|
8
|
-
},
|
|
9
|
-
tags: ["autodocs"],
|
|
10
|
-
args: {
|
|
11
|
-
url: "#",
|
|
12
|
-
children: "Featured link",
|
|
13
|
-
},
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const Default = {
|
|
17
|
-
args: {},
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const Reverse = {
|
|
21
|
-
args: {
|
|
22
|
-
reverse: true,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export const Large = {
|
|
27
|
-
args: {
|
|
28
|
-
textSize: "text-p1",
|
|
29
|
-
},
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export const Small = {
|
|
33
|
-
args: {
|
|
34
|
-
textSize: "text-p3",
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const Pink = {
|
|
39
|
-
args: {
|
|
40
|
-
iconColor: "text-pink-500",
|
|
41
|
-
additionalCSS: "text-pink-800",
|
|
42
|
-
},
|
|
43
|
-
};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties, ReactNode } from "react";
|
|
2
|
-
|
|
3
|
-
import Icon from "./Icon";
|
|
4
|
-
|
|
5
|
-
type FeaturedLinkProps = {
|
|
6
|
-
url: string;
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
textSize?: string;
|
|
9
|
-
iconColor?: string;
|
|
10
|
-
flush?: boolean;
|
|
11
|
-
reverse?: boolean;
|
|
12
|
-
additionalCSS?: string;
|
|
13
|
-
newWindow?: boolean;
|
|
14
|
-
onClick?: () => void;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type TargetProps = { target?: string; rel?: string };
|
|
18
|
-
|
|
19
|
-
// When generating links with target=_blank, we only add `noreferrer` to
|
|
20
|
-
// links that don't start with `/`, so we can continue tracking referrers
|
|
21
|
-
// across our own domains
|
|
22
|
-
const buildTargetAndRel = (url, newWindow) => {
|
|
23
|
-
const props: TargetProps = {};
|
|
24
|
-
|
|
25
|
-
if (newWindow) {
|
|
26
|
-
props.target = "_blank";
|
|
27
|
-
|
|
28
|
-
if (url.startsWith("/") && !url.startsWith("//")) {
|
|
29
|
-
props.rel = "noopener";
|
|
30
|
-
} else {
|
|
31
|
-
props.rel = "noopenner noreferrer";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
return props;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
const FeaturedLink = ({
|
|
39
|
-
url,
|
|
40
|
-
textSize = "text-p2",
|
|
41
|
-
iconColor = "text-cool-black",
|
|
42
|
-
flush = false,
|
|
43
|
-
reverse = false,
|
|
44
|
-
additionalCSS = "",
|
|
45
|
-
newWindow = false,
|
|
46
|
-
onClick = undefined,
|
|
47
|
-
children,
|
|
48
|
-
}: FeaturedLinkProps) => {
|
|
49
|
-
const targetAndRel = buildTargetAndRel(url, newWindow);
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<a
|
|
53
|
-
href={url}
|
|
54
|
-
className={`font-sans font-bold block text-gui-default hover:text-gui-hover focus:text-gui-focus focus:outline-gui-focus group ui-${textSize} ${
|
|
55
|
-
flush ? "" : "py-8"
|
|
56
|
-
} ${additionalCSS}`}
|
|
57
|
-
style={
|
|
58
|
-
{
|
|
59
|
-
"--featured-link-icon-size": `var(${textSize.replace(
|
|
60
|
-
"text",
|
|
61
|
-
"--fs",
|
|
62
|
-
)})`,
|
|
63
|
-
} as CSSProperties
|
|
64
|
-
}
|
|
65
|
-
{...targetAndRel}
|
|
66
|
-
onClick={onClick}
|
|
67
|
-
>
|
|
68
|
-
{reverse ? (
|
|
69
|
-
<>
|
|
70
|
-
<Icon
|
|
71
|
-
name="icon-gui-link-arrow"
|
|
72
|
-
size={`calc(var(--featured-link-icon-size) * 1.25)`}
|
|
73
|
-
color={iconColor}
|
|
74
|
-
additionalCSS="align-middle mr-8 relative -top-1 -right-4 transition-all group-hover:right-0 transform rotate-180"
|
|
75
|
-
/>
|
|
76
|
-
{children}
|
|
77
|
-
</>
|
|
78
|
-
) : (
|
|
79
|
-
<>
|
|
80
|
-
{children}
|
|
81
|
-
<Icon
|
|
82
|
-
name="icon-gui-link-arrow"
|
|
83
|
-
size={`calc(var(--featured-link-icon-size) * 1.25)`}
|
|
84
|
-
color={iconColor}
|
|
85
|
-
additionalCSS="align-middle ml-8 relative -top-1 -left-4 transition-all group-hover:left-0"
|
|
86
|
-
/>
|
|
87
|
-
</>
|
|
88
|
-
)}
|
|
89
|
-
</a>
|
|
90
|
-
);
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
export default FeaturedLink;
|