@ledgerhq/react-ui 0.19.1 → 0.20.0-nightly.0
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/lib/cjs/components/asorted/Icon/NotificationIcon.js +106 -0
- package/lib/cjs/components/asorted/Icon/NotificationIcon.js.map +7 -0
- package/lib/cjs/components/asorted/Icon/NotificationIcon.stories.js +58 -0
- package/lib/cjs/components/asorted/Icon/NotificationIcon.stories.js.map +7 -0
- package/lib/cjs/components/asorted/Icon/index.js +2 -0
- package/lib/cjs/components/asorted/Icon/index.js.map +2 -2
- package/lib/cjs/components/asorted/index.js +1 -0
- package/lib/cjs/components/asorted/index.js.map +2 -2
- package/lib/cjs/components/layout/Banner/BannerCard/BannerCard.stories.js +8 -14
- package/lib/cjs/components/layout/Banner/BannerCard/BannerCard.stories.js.map +2 -2
- package/lib/cjs/components/layout/Banner/BannerCard/index.js +5 -12
- package/lib/cjs/components/layout/Banner/BannerCard/index.js.map +3 -3
- package/lib/cjs/components/layout/Banner/NotificationCard/NotificationCard.stories.js +9 -6
- package/lib/cjs/components/layout/Banner/NotificationCard/NotificationCard.stories.js.map +3 -3
- package/lib/cjs/components/layout/Banner/NotificationCard/index.js +8 -45
- package/lib/cjs/components/layout/Banner/NotificationCard/index.js.map +3 -3
- package/lib/cjs/components/layout/Carousel/index.js +19 -4
- package/lib/cjs/components/layout/Carousel/index.js.map +3 -3
- package/lib/cjs/components/layout/Carousel/types.js.map +1 -1
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/index.js +2 -1
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/index.js.map +2 -2
- package/lib/components/asorted/Icon/NotificationIcon.d.ts +11 -0
- package/lib/components/asorted/Icon/NotificationIcon.d.ts.map +1 -0
- package/lib/components/asorted/Icon/NotificationIcon.js +73 -0
- package/lib/components/asorted/Icon/NotificationIcon.js.map +1 -0
- package/lib/components/asorted/Icon/index.d.ts +1 -0
- package/lib/components/asorted/Icon/index.d.ts.map +1 -1
- package/lib/components/asorted/Icon/index.js +1 -0
- package/lib/components/asorted/Icon/index.js.map +1 -1
- package/lib/components/asorted/index.d.ts +1 -1
- package/lib/components/asorted/index.d.ts.map +1 -1
- package/lib/components/asorted/index.js +1 -1
- package/lib/components/asorted/index.js.map +1 -1
- package/lib/components/layout/Banner/BannerCard/index.d.ts +4 -5
- package/lib/components/layout/Banner/BannerCard/index.d.ts.map +1 -1
- package/lib/components/layout/Banner/BannerCard/index.js +6 -14
- package/lib/components/layout/Banner/BannerCard/index.js.map +1 -1
- package/lib/components/layout/Banner/NotificationCard/index.d.ts +4 -4
- package/lib/components/layout/Banner/NotificationCard/index.d.ts.map +1 -1
- package/lib/components/layout/Banner/NotificationCard/index.js +10 -49
- package/lib/components/layout/Banner/NotificationCard/index.js.map +1 -1
- package/lib/components/layout/Carousel/index.d.ts +1 -1
- package/lib/components/layout/Carousel/index.d.ts.map +1 -1
- package/lib/components/layout/Carousel/index.js +11 -3
- package/lib/components/layout/Carousel/index.js.map +1 -1
- package/lib/components/layout/Carousel/types.d.ts +1 -0
- package/lib/components/layout/Carousel/types.d.ts.map +1 -1
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.d.ts.map +1 -1
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.js +2 -1
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -60,12 +60,27 @@ const CarouselContainer = import_styled_components.default.div`
|
|
|
60
60
|
--hover-transition: 1;
|
|
61
61
|
}
|
|
62
62
|
`;
|
|
63
|
-
const Carousel = ({
|
|
63
|
+
const Carousel = ({
|
|
64
|
+
children,
|
|
65
|
+
variant = "default",
|
|
66
|
+
initialDelay = 0,
|
|
67
|
+
autoPlay = 0,
|
|
68
|
+
onNext,
|
|
69
|
+
onPrev
|
|
70
|
+
}) => {
|
|
64
71
|
const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0);
|
|
65
|
-
const [
|
|
66
|
-
|
|
67
|
-
autoPlay ? [(0, import_embla_carousel_autoplay.default)({ delay: autoPlay, ...AutoplayFlags })] : []
|
|
72
|
+
const [autoplayEnabled, setAutoplayEnabled] = (0, import_react.useState)(false);
|
|
73
|
+
const plugins = (0, import_react.useMemo)(
|
|
74
|
+
() => autoplayEnabled && autoPlay ? [(0, import_embla_carousel_autoplay.default)({ delay: autoPlay, ...AutoplayFlags })] : [],
|
|
75
|
+
[autoplayEnabled, autoPlay]
|
|
68
76
|
);
|
|
77
|
+
const [emblaRef, emblaApi] = (0, import_embla_carousel_react.default)({ loop: true }, plugins);
|
|
78
|
+
(0, import_react.useEffect)(() => {
|
|
79
|
+
if (autoPlay) {
|
|
80
|
+
const timer = setTimeout(() => setAutoplayEnabled(true), initialDelay);
|
|
81
|
+
return () => clearTimeout(timer);
|
|
82
|
+
}
|
|
83
|
+
}, [autoPlay]);
|
|
69
84
|
const updateIndex = (0, import_react.useCallback)(() => {
|
|
70
85
|
if (!emblaApi)
|
|
71
86
|
return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/layout/Carousel/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { EmblaCarouselType, EmblaEventType } from \"embla-carousel\";\nimport Autoplay from \"embla-carousel-autoplay\";\nimport useEmblaCarousel from \"embla-carousel-react\";\nimport debounce from \"lodash/debounce\";\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport Footer from \"./Footer\";\nimport { Props } from \"./types\";\nimport { ChevronArrow } from \"./ChevronArrow\";\n\nconst Embla = styled.div`\n overflow: hidden;\n`;\n\nconst EmblaContainer = styled.div`\n display: flex;\n`;\n\nconst EmblaSlide = styled.div`\n display: flex;\n flex: 0 0 100%;\n min-width: 0;\n > * {\n flex-basis: 100%;\n }\n`;\n\nconst CarouselContainer = styled.div<Pick<Props, \"variant\">>`\n position: relative;\n\n --hover-transition: 0;\n &:hover {\n --hover-transition: 1;\n }\n`;\n\n/**\n * This component uses the https://github.com/davidjerleke/embla-carousel library.\n */\nconst Carousel = ({
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qCAAqB;AACrB,kCAA6B;AAC7B,sBAAqB;AACrB,
|
|
6
|
-
"names": ["styled", "
|
|
4
|
+
"sourcesContent": ["import type { EmblaCarouselType, EmblaEventType } from \"embla-carousel\";\nimport Autoplay from \"embla-carousel-autoplay\";\nimport useEmblaCarousel from \"embla-carousel-react\";\nimport debounce from \"lodash/debounce\";\nimport React, { useCallback, useEffect, useMemo, useState } from \"react\";\nimport styled from \"styled-components\";\nimport Footer from \"./Footer\";\nimport { Props } from \"./types\";\nimport { ChevronArrow } from \"./ChevronArrow\";\n\nconst Embla = styled.div`\n overflow: hidden;\n`;\n\nconst EmblaContainer = styled.div`\n display: flex;\n`;\n\nconst EmblaSlide = styled.div`\n display: flex;\n flex: 0 0 100%;\n min-width: 0;\n > * {\n flex-basis: 100%;\n }\n`;\n\nconst CarouselContainer = styled.div<Pick<Props, \"variant\">>`\n position: relative;\n\n --hover-transition: 0;\n &:hover {\n --hover-transition: 1;\n }\n`;\n\n/**\n * This component uses the https://github.com/davidjerleke/embla-carousel library.\n */\nconst Carousel = ({\n children,\n variant = \"default\",\n initialDelay = 0,\n autoPlay = 0,\n onNext,\n onPrev,\n}: Props) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [autoplayEnabled, setAutoplayEnabled] = useState<boolean>(false);\n\n const plugins = useMemo(\n () => (autoplayEnabled && autoPlay ? [Autoplay({ delay: autoPlay, ...AutoplayFlags })] : []),\n [autoplayEnabled, autoPlay],\n );\n\n const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true }, plugins);\n\n useEffect(() => {\n if (autoPlay) {\n const timer = setTimeout(() => setAutoplayEnabled(true), initialDelay);\n return () => clearTimeout(timer);\n }\n }, [autoPlay]);\n\n const updateIndex = useCallback(() => {\n if (!emblaApi) return;\n\n const newIndex = emblaApi.selectedScrollSnap();\n setCurrentIndex(newIndex);\n emblaApi.scrollTo(newIndex);\n }, [emblaApi]);\n\n useEffect(() => {\n if (!emblaApi) return;\n\n // Initial call to update carousel index\n updateIndex();\n\n const dragX = watchDragX(emblaApi);\n\n // When the selected scroll snap changes\n const handleAnySelect = debounce((mightBeASwipe: boolean) => {\n updateIndex();\n if (!mightBeASwipe || variant !== \"default\") return; // onNext/onPrev events are not supported for content-card variant ATM\n if (dragX.value > 0) return onPrev?.();\n if (dragX.value < 0) return onNext?.();\n }, 0); // all events are fired on the same tick so no need to wait past the next tick\n\n emblaApi.on(\"select\", handleSelect);\n emblaApi.on(\"autoplay:select\" as EmblaEventType, handleAutoPlaySelect);\n emblaApi.on(\"button:prev\" as EmblaEventType, handlePrevButton);\n emblaApi.on(\"button:next\" as EmblaEventType, handleNextButton);\n\n // When `reInit` is called or when window is resized\n emblaApi.on(\"reInit\", updateIndex);\n\n return () => {\n dragX.clean();\n emblaApi.off(\"select\", handleSelect);\n emblaApi.off(\"autoplay:select\" as EmblaEventType, handleAutoPlaySelect);\n emblaApi.off(\"button:prev\" as EmblaEventType, handlePrevButton);\n emblaApi.off(\"button:next\" as EmblaEventType, handleNextButton);\n emblaApi.off(\"reInit\", updateIndex);\n };\n\n function handleSelect() {\n handleAnySelect(true); // This could be a swipe action. As this runs first the debounce will override the value otherwise\n }\n function handleAutoPlaySelect() {\n handleAnySelect(false);\n }\n function handlePrevButton() {\n emblaApi?.scrollPrev();\n onPrev?.();\n handleAnySelect(false);\n }\n function handleNextButton() {\n emblaApi?.scrollNext();\n onNext?.();\n handleAnySelect(false);\n }\n }, [emblaApi, updateIndex, variant]);\n\n if (!children.length) return null;\n\n const handleGotoPrevSlide = () => emblaApi?.emit(\"button:prev\" as EmblaEventType);\n const handleGotoNextSlide = () => emblaApi?.emit(\"button:next\" as EmblaEventType);\n\n return (\n <div>\n <CarouselContainer variant={variant}>\n {variant === \"default\" && children.length > 1 && (\n <>\n <ChevronArrow\n data-testid=\"carousel-arrow-prev\"\n direction=\"left\"\n onClick={handleGotoPrevSlide}\n />\n <ChevronArrow\n data-testid=\"carousel-arrow-next\"\n direction=\"right\"\n onClick={handleGotoNextSlide}\n />\n </>\n )}\n\n <Embla ref={emblaRef}>\n <EmblaContainer>\n {children.map(child => (\n <EmblaSlide key={child.key}>{child}</EmblaSlide>\n ))}\n </EmblaContainer>\n </Embla>\n </CarouselContainer>\n\n <Footer\n children={children}\n variant={variant}\n emblaApi={emblaApi}\n currentIndex={currentIndex}\n />\n </div>\n );\n};\n\nexport default Carousel;\n\nconst AutoplayFlags = {\n play: true,\n stopOnMouseEnter: true,\n stopOnInteraction: false,\n};\n\nfunction watchDragX(emblaApi: EmblaCarouselType) {\n emblaApi.on(\"pointerDown\", watchMouse);\n\n let start: number | undefined;\n let end: number | undefined;\n\n return {\n get value() {\n return typeof start === \"undefined\" || typeof end === \"undefined\" ? 0 : end - start;\n },\n clean: () => {\n emblaApi.off(\"pointerDown\", watchMouse);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n },\n };\n\n function watchMouse() {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n }\n function handleMouseMove(event: MouseEvent) {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n start = event.clientX;\n end = undefined;\n }\n function handleMouseUp(event: MouseEvent) {\n document.removeEventListener(\"mouseup\", handleMouseUp);\n end = event.clientX;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qCAAqB;AACrB,kCAA6B;AAC7B,sBAAqB;AACrB,mBAAiE;AACjE,+BAAmB;AACnB,oBAAmB;AAEnB,0BAA6B;AAE7B,MAAM,QAAQ,yBAAAA,QAAO;AAAA;AAAA;AAIrB,MAAM,iBAAiB,yBAAAA,QAAO;AAAA;A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AAAA,QAAA,cAAC,sBACE,SAAS,IAAI,WACZ,6BAAAA,QAAA,cAAC,cAAW,KAAK,MAAM,OAAM,KAAM,CACpC,CACH,CACF,CACF,GAEA,6BAAAA,QAAA;AAAA,IAAC,cAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF,CACF;AAEJ;AAEA,IAAO,mBAAQ;AAEf,MAAM,gBAAgB;AAAA,EACpB,MAAM;AAAA,EACN,kBAAkB;AAAA,EAClB,mBAAmB;AACrB;AAEA,SAAS,WAAW,UAA6B;AAC/C,WAAS,GAAG,eAAe,UAAU;AAErC,MAAI;AACJ,MAAI;AAEJ,SAAO;AAAA,IACL,IAAI,QAAQ;AACV,aAAO,OAAO,UAAU,eAAe,OAAO,QAAQ,cAAc,IAAI,MAAM;AAAA,IAChF;AAAA,IACA,OAAO,MAAM;AACX,eAAS,IAAI,eAAe,UAAU;AACtC,eAAS,oBAAoB,WAAW,aAAa;AAAA,IACvD;AAAA,EACF;AAEA,WAAS,aAAa;AACpB,aAAS,iBAAiB,aAAa,eAAe;AACtD,aAAS,iBAAiB,WAAW,aAAa;AAAA,EACpD;AACA,WAAS,gBAAgB,OAAmB;AAC1C,aAAS,oBAAoB,aAAa,eAAe;AACzD,YAAQ,MAAM;AACd,UAAM;AAAA,EACR;AACA,WAAS,cAAc,OAAmB;AACxC,aAAS,oBAAoB,WAAW,aAAa;AACrD,UAAM,MAAM;AAAA,EACd;AACF;",
|
|
6
|
+
"names": ["styled", "Autoplay", "useEmblaCarousel", "debounce", "React", "Footer"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/components/layout/Carousel/types.ts"],
|
|
4
|
-
"sourcesContent": ["import { ReactElement } from \"react\";\nimport { UseEmblaCarouselType } from \"embla-carousel-react\";\n\nexport type Variant = \"content-card\" | \"default\";\n\nexport type Props = {\n children: ReactElement[];\n autoPlay?: number;\n variant?: Variant;\n onPrev?: () => void;\n onNext?: () => void;\n};\n\n/**\n * Carousel's sub props to be passed to any component used by the carousel..\n */\nexport type SubProps = Required<Pick<Props, \"children\" | \"variant\">> & {\n emblaApi: UseEmblaCarouselType[1];\n currentIndex: number;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { ReactElement } from \"react\";\nimport { UseEmblaCarouselType } from \"embla-carousel-react\";\n\nexport type Variant = \"content-card\" | \"default\";\n\nexport type Props = {\n children: ReactElement[];\n initialDelay?: number;\n autoPlay?: number;\n variant?: Variant;\n onPrev?: () => void;\n onNext?: () => void;\n};\n\n/**\n * Carousel's sub props to be passed to any component used by the carousel..\n */\nexport type SubProps = Required<Pick<Props, \"children\" | \"variant\">> & {\n emblaApi: UseEmblaCarouselType[1];\n currentIndex: number;\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,6 +32,7 @@ __export(PortfolioContentCard_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(PortfolioContentCard_exports);
|
|
34
34
|
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_cta = require("../../../cta");
|
|
35
36
|
var import_BannerCard = __toESM(require("../../Banner/BannerCard"));
|
|
36
37
|
function PortfolioContentCard({
|
|
37
38
|
title,
|
|
@@ -46,7 +47,7 @@ function PortfolioContentCard({
|
|
|
46
47
|
import_BannerCard.default,
|
|
47
48
|
{
|
|
48
49
|
title,
|
|
49
|
-
cta,
|
|
50
|
+
cta: cta && /* @__PURE__ */ import_react.default.createElement(import_cta.Button, { variant: "main", outline: false }, cta),
|
|
50
51
|
description,
|
|
51
52
|
tag,
|
|
52
53
|
image,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../src/components/layout/ContentCard/PortfolioContentCard/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { type ReactEventHandler } from \"react\";\n\nimport BannerCard from \"../../Banner/BannerCard\";\n\nexport type PortfolioContentCardProps = {\n title: string;\n cta?: string;\n description?: string;\n tag?: string;\n image?: string;\n\n onClick: ReactEventHandler;\n onClose: ReactEventHandler;\n};\n\nexport default function PortfolioContentCard({\n title,\n cta,\n description,\n tag,\n image,\n onClick,\n onClose,\n}: PortfolioContentCardProps) {\n return (\n <BannerCard\n title={title}\n cta={cta}\n description={description}\n tag={tag}\n image={image}\n onClick={onClick}\n onClose={onClose}\n />\n );\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8C;AAE9C,wBAAuB;AAaR,SAAR,qBAAsC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAC5B,SACE,6BAAAA,QAAA;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,
|
|
4
|
+
"sourcesContent": ["import React, { type ReactEventHandler } from \"react\";\n\nimport { Button } from \"../../../cta\";\nimport BannerCard from \"../../Banner/BannerCard\";\n\nexport type PortfolioContentCardProps = {\n title: string;\n cta?: string;\n description?: string;\n tag?: string;\n image?: string;\n\n onClick: ReactEventHandler;\n onClose: ReactEventHandler;\n};\n\nexport default function PortfolioContentCard({\n title,\n cta,\n description,\n tag,\n image,\n onClick,\n onClose,\n}: PortfolioContentCardProps) {\n return (\n <BannerCard\n title={title}\n cta={\n cta && (\n <Button variant=\"main\" outline={false}>\n {cta}\n </Button>\n )\n }\n description={description}\n tag={tag}\n image={image}\n onClick={onClick}\n onClose={onClose}\n />\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8C;AAE9C,iBAAuB;AACvB,wBAAuB;AAaR,SAAR,qBAAsC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAC5B,SACE,6BAAAA,QAAA;AAAA,IAAC,kBAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,KACE,OACE,6BAAAD,QAAA,cAAC,qBAAO,SAAQ,QAAO,SAAS,SAC7B,GACH;AAAA,MAGJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
6
|
"names": ["React", "BannerCard"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as Icons from "@ledgerhq/icons-ui/react";
|
|
3
|
+
type IconKey = keyof typeof Icons;
|
|
4
|
+
type WrapperType = "round" | "square";
|
|
5
|
+
type Props = Readonly<{
|
|
6
|
+
icon: IconKey;
|
|
7
|
+
variant: WrapperType;
|
|
8
|
+
}>;
|
|
9
|
+
export default function NotificationIcon({ icon, variant }: Props): React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=NotificationIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationIcon.d.ts","sourceRoot":"","sources":["../../../../src/components/asorted/Icon/NotificationIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAIlD,KAAK,OAAO,GAAG,MAAM,OAAO,KAAK,CAAC;AAClC,KAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAwBtC,KAAK,KAAK,GAAG,QAAQ,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,WAAW,CAAC;CACtB,CAAC,CAAC;AAEH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,IAAI,EAAE,OAAiB,EAAE,EAAE,KAAK,qBAa1E"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled, { css, useTheme } from "styled-components";
|
|
3
|
+
import * as Icons from "@ledgerhq/icons-ui/react";
|
|
4
|
+
import { Box } from "../../layout";
|
|
5
|
+
import { rgba } from "../../../styles";
|
|
6
|
+
function getColorsByIcon(colors) {
|
|
7
|
+
const { warning } = colors;
|
|
8
|
+
return {
|
|
9
|
+
Warning: {
|
|
10
|
+
round: { fg: warning.c80, bg: warning.c30 },
|
|
11
|
+
square: { fg: warning.c80, bg: warning.c30 },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function getDefaultDefaultColors({ primary }) {
|
|
16
|
+
return {
|
|
17
|
+
round: { fg: primary.c90, bg: primary.c30 },
|
|
18
|
+
square: { fg: primary.c80, bg: rgba(primary.c80, 0.08) },
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export default function NotificationIcon({ icon, variant = "round" }) {
|
|
22
|
+
const { colors } = useTheme();
|
|
23
|
+
const defaultColors = getDefaultDefaultColors(colors)[variant];
|
|
24
|
+
const safeIcon = icon in Icons ? icon : "Information";
|
|
25
|
+
const Icon = Icons[safeIcon];
|
|
26
|
+
const { fg: iconColor = defaultColors.fg, bg: iconBgColor = defaultColors.bg } = getColorsByIcon(colors)[safeIcon]?.[variant] ?? {};
|
|
27
|
+
return (React.createElement(Wrapper, { backgroundColor: iconBgColor, variant: variant },
|
|
28
|
+
React.createElement(Icon, { color: iconColor })));
|
|
29
|
+
}
|
|
30
|
+
const Wrapper = styled(Box) `
|
|
31
|
+
display: inline-flex;
|
|
32
|
+
padding: 8px;
|
|
33
|
+
${p => (p.variant === "square" ? squareWrapper : roundWrapper)}
|
|
34
|
+
`;
|
|
35
|
+
const roundWrapper = css `
|
|
36
|
+
border-radius: 50%;
|
|
37
|
+
`;
|
|
38
|
+
const squareWrapper = css `
|
|
39
|
+
border-radius: 13.5px;
|
|
40
|
+
background-clip: padding-box;
|
|
41
|
+
border-width: 7px;
|
|
42
|
+
border-style: solid;
|
|
43
|
+
border-color: transparent;
|
|
44
|
+
position: relative;
|
|
45
|
+
|
|
46
|
+
${p => css `
|
|
47
|
+
&::before,
|
|
48
|
+
&::after {
|
|
49
|
+
content: "";
|
|
50
|
+
position: absolute;
|
|
51
|
+
inset: -7px;
|
|
52
|
+
border-radius: 13.5px;
|
|
53
|
+
rotate: ${p.theme.colors.type === "dark" ? "0deg" : "180deg"};
|
|
54
|
+
}
|
|
55
|
+
&::before {
|
|
56
|
+
background: linear-gradient(
|
|
57
|
+
${p.theme.colors.type === "dark" ? "rgba(255, 255, 255, 0.05)" : "rgba(29, 28, 31, 0.05)"}
|
|
58
|
+
0%,
|
|
59
|
+
rgba(29, 28, 31, 0) 100%
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
&::after {
|
|
63
|
+
content: ${p.theme.colors.type};
|
|
64
|
+
border: solid 0.5px ${p.theme.colors.type === "dark" ? "#fff" : "rgba(0, 0, 0, 0.5)"};
|
|
65
|
+
mask-image: linear-gradient(
|
|
66
|
+
rgba(255, 255, 255, 0.15) 0%,
|
|
67
|
+
rgba(255, 255, 255, 0.01) 60%,
|
|
68
|
+
rgba(255, 255, 255, 0) 100%
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
`};
|
|
72
|
+
`;
|
|
73
|
+
//# sourceMappingURL=NotificationIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationIcon.js","sourceRoot":"","sources":["../../../../src/components/asorted/Icon/NotificationIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,G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CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;IAErD,OAAO,CACL,oBAAC,OAAO,IAAC,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO;QACrD,oBAAC,IAAI,IAAC,KAAK,EAAE,SAAS,GAAI,CAClB,CACX,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,CAA0B;;;IAGjD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC;CAC/D,CAAC;AAEF,MAAM,YAAY,GAAG,GAAG,CAAA;;CAEvB,CAAC;AAEF,MAAM,aAAa,GAAG,GAAG,CAAA;;;;;;;;IAQrB,CAAC,CAAC,EAAE,CAAC,GAAG,CAAA;;;;;;;gBAOI,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ;;;;UAIxD,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,2BAA2B,CAAC,CAAC,CAAC,wBAAwB;;;;;;iBAMhF,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;4BACR,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB;;;;;;;GAOvF;CACF,CAAC"}
|
|
@@ -3,4 +3,5 @@ import BoxedIcon, { IconBox } from "./BoxedIcon";
|
|
|
3
3
|
export { BoxedIcon, IconBox };
|
|
4
4
|
export type { Props } from "./Icon";
|
|
5
5
|
export { default as CryptoIcon } from "./CryptoIcon";
|
|
6
|
+
export { default as NotificationIcon } from "./NotificationIcon";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/asorted/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAC9B,YAAY,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/asorted/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAC9B,YAAY,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -2,4 +2,5 @@ export { default, iconNames } from "./Icon";
|
|
|
2
2
|
import BoxedIcon, { IconBox } from "./BoxedIcon";
|
|
3
3
|
export { BoxedIcon, IconBox };
|
|
4
4
|
export { default as CryptoIcon } from "./CryptoIcon";
|
|
5
|
+
export { default as NotificationIcon } from "./NotificationIcon";
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/asorted/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAE9B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/asorted/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC;AAE9B,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Divider } from "./Divider";
|
|
2
|
-
export { default as Icon, IconBox, BoxedIcon, CryptoIcon } from "./Icon";
|
|
2
|
+
export { default as Icon, IconBox, BoxedIcon, CryptoIcon, NotificationIcon } from "./Icon";
|
|
3
3
|
export { default as Text } from "./Text";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/asorted/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/asorted/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Divider } from "./Divider";
|
|
2
|
-
export { default as Icon, IconBox, BoxedIcon, CryptoIcon } from "./Icon";
|
|
2
|
+
export { default as Icon, IconBox, BoxedIcon, CryptoIcon, NotificationIcon } from "./Icon";
|
|
3
3
|
export { default as Text } from "./Text";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/asorted/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/asorted/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
import React, { type ReactEventHandler, type ReactNode } from "react";
|
|
2
2
|
import type { FlexBoxProps } from "../../Flex";
|
|
3
|
-
|
|
3
|
+
type Props = FlexBoxProps & {
|
|
4
4
|
title: string;
|
|
5
|
-
cta?:
|
|
6
|
-
linkText?: string;
|
|
5
|
+
cta?: ReactNode;
|
|
7
6
|
description?: ReactNode;
|
|
8
7
|
descriptionWidth?: number;
|
|
9
8
|
tag?: string;
|
|
10
9
|
image?: string;
|
|
11
10
|
onClick: ReactEventHandler;
|
|
12
|
-
onLinkClick?: ReactEventHandler;
|
|
13
11
|
onClose?: ReactEventHandler;
|
|
14
12
|
};
|
|
15
|
-
export default function BannerCard({ title, cta,
|
|
13
|
+
export default function BannerCard({ title, cta, description, descriptionWidth, tag, image, onClick, onClose, ...boxProps }: Props): React.JSX.Element;
|
|
14
|
+
export {};
|
|
16
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/BannerCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/BannerCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAQtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,KAAK,KAAK,GAAG,YAAY,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,GAAG,EACH,WAAW,EACX,gBAAgB,EAChB,GAAG,EACH,KAAK,EACL,OAAO,EACP,OAAO,EACP,GAAG,QAAQ,EACZ,EAAE,KAAK,qBAuBP"}
|
|
@@ -2,31 +2,24 @@ import React from "react";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { StyleProvider } from "../../../../styles";
|
|
4
4
|
import { Icons } from "../../../../assets";
|
|
5
|
-
import
|
|
6
|
-
import { Button
|
|
5
|
+
import Text from "../../../asorted/Text";
|
|
6
|
+
import { Button } from "../../../cta";
|
|
7
7
|
import Tag from "../../../Tag";
|
|
8
8
|
import { Flex } from "../..";
|
|
9
|
-
export default function BannerCard({ title, cta,
|
|
9
|
+
export default function BannerCard({ title, cta, description, descriptionWidth, tag, image, onClick, onClose, ...boxProps }) {
|
|
10
10
|
const handleClose = event => {
|
|
11
11
|
event.stopPropagation();
|
|
12
12
|
onClose?.(event);
|
|
13
13
|
};
|
|
14
|
-
const
|
|
14
|
+
const handleClick = event => {
|
|
15
15
|
event.stopPropagation();
|
|
16
16
|
onClick(event);
|
|
17
17
|
};
|
|
18
|
-
|
|
19
|
-
event.stopPropagation();
|
|
20
|
-
onLinkClick?.(event);
|
|
21
|
-
};
|
|
22
|
-
return (React.createElement(Wrapper, { ...boxProps, image: image, tag: tag, onClick: handleCTAClick },
|
|
18
|
+
return (React.createElement(Wrapper, { ...boxProps, image: image, tag: tag, onClick: handleClick },
|
|
23
19
|
tag && React.createElement(StyledTag, null, tag),
|
|
24
20
|
React.createElement(Title, null, title),
|
|
25
21
|
description && React.createElement(Desc, { maxWidth: descriptionWidth }, description),
|
|
26
|
-
React.createElement(Flex, { columnGap: 5 },
|
|
27
|
-
cta && (React.createElement(Button, { variant: "main", outline: false, onClick: handleCTAClick }, cta)),
|
|
28
|
-
linkText && (React.createElement(Link, { onClick: handleLinkClick },
|
|
29
|
-
React.createElement(Text, { variant: "body", fontSize: 14, flexShrink: 1 }, linkText)))),
|
|
22
|
+
React.createElement(Flex, { columnGap: 5 }, cta),
|
|
30
23
|
onClose && (React.createElement(StyleProvider, { selectedPalette: "dark" },
|
|
31
24
|
React.createElement(CloseButton, { "data-testid": "portfolio-card-close-button", onClick: handleClose })))));
|
|
32
25
|
}
|
|
@@ -57,7 +50,6 @@ const Wrapper = styled(Flex) `
|
|
|
57
50
|
padding: 16px;
|
|
58
51
|
padding-top: ${p => (p.tag ? "16px" : "24px")};
|
|
59
52
|
padding-right: 50%;
|
|
60
|
-
flex-basis: 100%;
|
|
61
53
|
|
|
62
54
|
position: relative;
|
|
63
55
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/BannerCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/BannerCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,GAAG,MAAM,cAAc,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAc7B,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,KAAK,EACL,GAAG,EACH,WAAW,EACX,gBAAgB,EAChB,GAAG,EACH,KAAK,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MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAA;;;;;;CAM1E,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAA8B;sBACpC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI;sBACnC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;;iBAOlD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;;;;CAQ9C,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;IACvC,IAAI,EAAE,oBAAC,KAAK,CAAC,KAAK,IAAC,IAAI,EAAC,IAAI,GAAG;IAC/B,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;CACd,CAAC,CAAA;sBACoB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG;;;;;;;;;;CAUpD,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React, { type ReactEventHandler, type ReactNode } from "react";
|
|
2
|
-
import
|
|
2
|
+
import * as Icons from "@ledgerhq/icons-ui/react";
|
|
3
3
|
import type { Props as GridBoxProps } from "../../Grid";
|
|
4
4
|
type IconKey = keyof typeof Icons;
|
|
5
|
-
|
|
5
|
+
type Props = GridBoxProps & {
|
|
6
6
|
title?: string;
|
|
7
|
-
cta?:
|
|
7
|
+
cta?: ReactNode;
|
|
8
8
|
description?: ReactNode;
|
|
9
9
|
icon: IconKey;
|
|
10
10
|
isHighlighted?: boolean;
|
|
11
11
|
onClick: ReactEventHandler;
|
|
12
12
|
};
|
|
13
|
-
export default function NotificationCard({ title, cta, icon, description, isHighlighted, onClick, ...boxProps }:
|
|
13
|
+
export default function NotificationCard({ title, cta, icon, description, isHighlighted, onClick, ...boxProps }: Props): React.JSX.Element;
|
|
14
14
|
export {};
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/NotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/NotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAGlD,OAAO,KAAK,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AAGxD,KAAK,OAAO,GAAG,MAAM,OAAO,KAAK,CAAC;AAElC,KAAK,KAAK,GAAG,YAAY,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,SAAS,CAAC;IAChB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,KAAK,EACL,GAAG,EACH,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,EACP,GAAG,QAAQ,EACZ,EAAE,KAAK,qBAsBP"}
|
|
@@ -1,34 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import styled
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import { Link } from "../../../cta";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { NotificationIcon } from "../../../asorted";
|
|
4
|
+
import Text from "../../../asorted/Text";
|
|
6
5
|
import { Grid, Flex } from "../..";
|
|
7
|
-
const colorsByIcon = {
|
|
8
|
-
Warning: {
|
|
9
|
-
icon: "warning.c80",
|
|
10
|
-
iconBg: "warning.c30",
|
|
11
|
-
cta: "warning.c80",
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
6
|
export default function NotificationCard({ title, cta, icon, description, isHighlighted, onClick, ...boxProps }) {
|
|
15
7
|
const handleCTAClick = event => {
|
|
16
8
|
event.stopPropagation();
|
|
17
9
|
onClick(event);
|
|
18
10
|
};
|
|
19
|
-
const safeIcon = icon in Icons ? icon : "Information";
|
|
20
|
-
const Icon = Icons[safeIcon];
|
|
21
|
-
const colors = colorsByIcon[safeIcon];
|
|
22
|
-
const ctaColor = isHighlighted ? colors?.cta ?? "primary.c80" : "neutral.c100";
|
|
23
|
-
const iconColor = colors?.icon ?? "primary.c80";
|
|
24
|
-
const iconBgColor = colors?.iconBg ?? "opacityPurple.c10";
|
|
25
11
|
return (React.createElement(Wrapper, { ...boxProps, isHighlighted: isHighlighted, onClick: handleCTAClick },
|
|
26
|
-
React.createElement(
|
|
27
|
-
React.createElement(Icon, { color: iconColor })),
|
|
12
|
+
React.createElement(NotificationIcon, { icon: icon, variant: isHighlighted ? "square" : "round" }),
|
|
28
13
|
React.createElement(Flex, { flexDirection: "column", rowGap: isHighlighted ? "4px" : "8px" },
|
|
29
14
|
title && (React.createElement(Text, { variant: "h4Inter", fontSize: 16 }, title)),
|
|
30
15
|
description && (React.createElement(Desc, { color: isHighlighted ? "neutral.c100" : "neutral.c80" }, description)),
|
|
31
|
-
cta
|
|
16
|
+
cta)));
|
|
32
17
|
}
|
|
33
18
|
const Desc = styled(Text).attrs({ variant: "small" }) `
|
|
34
19
|
font-family: Inter;
|
|
@@ -36,36 +21,12 @@ const Desc = styled(Text).attrs({ variant: "small" }) `
|
|
|
36
21
|
font-style: normal;
|
|
37
22
|
font-weight: 500;
|
|
38
23
|
`;
|
|
39
|
-
const Cta = styled(Link).attrs({ alignSelf: "start" }) `
|
|
40
|
-
font-size: 13px;
|
|
41
|
-
`;
|
|
42
|
-
const IconWrapper = styled(Flex) `
|
|
43
|
-
border-radius: ${p => (p.isHighlighted ? "13.5px" : "50%")};
|
|
44
|
-
padding: 8px;
|
|
45
|
-
${p => p.isHighlighted &&
|
|
46
|
-
css `
|
|
47
|
-
background-clip: padding-box;
|
|
48
|
-
border-width: 7px;
|
|
49
|
-
border-style: solid;
|
|
50
|
-
border-color: transparent;
|
|
51
|
-
position: relative;
|
|
52
|
-
&::before {
|
|
53
|
-
content: "";
|
|
54
|
-
position: absolute;
|
|
55
|
-
inset: -7px;
|
|
56
|
-
border-radius: 13.5px;
|
|
57
|
-
background: linear-gradient(
|
|
58
|
-
180deg,
|
|
59
|
-
${p.theme.colors.opacityDefault.c05} 0%,
|
|
60
|
-
rgba(29, 28, 31, 0) 100%
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
`}
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
24
|
const Wrapper = styled(Grid) `
|
|
68
|
-
background-color: ${
|
|
25
|
+
background-color: ${({ isHighlighted, theme: { colors } }) => {
|
|
26
|
+
if (!isHighlighted)
|
|
27
|
+
return "transparent";
|
|
28
|
+
return colors.type === "dark" ? colors.opacityDefault.c05 : colors.neutral.c00;
|
|
29
|
+
}};
|
|
69
30
|
|
|
70
31
|
cursor: pointer;
|
|
71
32
|
padding: 12px;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/NotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/Banner/NotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAEzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAcnC,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,KAAK,EACL,GAAG,EACH,IAAI,EACJ,WAAW,EACX,aAAa,EACb,OAAO,EACP,GAAG,QAAQ,EACL;IACN,MAAM,cAAc,GAAsB,KAAK,CAAC,EAAE;QAChD,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,CAAC,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,OAAO,OAAK,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,OAAO,EAAE,cAAc;QAC1E,oBAAC,gBAAgB,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,GAAI;QAC7E,oBAAC,IAAI,IAAC,aAAa,EAAC,QAAQ,EAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;YAC/D,KAAK,IAAI,CACR,oBAAC,IAAI,IAAC,OAAO,EAAC,SAAS,EAAC,QAAQ,EAAE,EAAE,IACjC,KAAK,CACD,CACR;YACA,WAAW,IAAI,CACd,oBAAC,IAAI,IAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,aAAa,IAAG,WAAW,CAAQ,CAClF;YACA,GAAG,CACC,CACC,CACX,CAAC;AACJ,CAAC;AAED,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAA;;;;;CAKpD,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAA8B;sBACpC,CAAC,EAAE,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE;IAC3D,IAAI,CAAC,aAAa;QAAE,OAAO,aAAa,CAAC;IACzC,OAAO,MAAM,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC;AACjF,CAAC;;;;;SAKM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;;;;;CAKhD,CAAC"}
|
|
@@ -3,6 +3,6 @@ import { Props } from "./types";
|
|
|
3
3
|
/**
|
|
4
4
|
* This component uses the https://github.com/davidjerleke/embla-carousel library.
|
|
5
5
|
*/
|
|
6
|
-
declare const Carousel: ({ children, variant, autoPlay, onNext, onPrev }: Props) => React.JSX.Element | null;
|
|
6
|
+
declare const Carousel: ({ children, variant, initialDelay, autoPlay, onNext, onPrev, }: Props) => React.JSX.Element | null;
|
|
7
7
|
export default Carousel;
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/index.tsx"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA6BhC;;GAEG;AACH,QAAA,MAAM,QAAQ,mEAOX,KAAK,6BAqHP,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Autoplay from "embla-carousel-autoplay";
|
|
2
2
|
import useEmblaCarousel from "embla-carousel-react";
|
|
3
3
|
import debounce from "lodash/debounce";
|
|
4
|
-
import React, { useCallback, useEffect, useState } from "react";
|
|
4
|
+
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
|
5
5
|
import styled from "styled-components";
|
|
6
6
|
import Footer from "./Footer";
|
|
7
7
|
import { ChevronArrow } from "./ChevronArrow";
|
|
@@ -30,9 +30,17 @@ const CarouselContainer = styled.div `
|
|
|
30
30
|
/**
|
|
31
31
|
* This component uses the https://github.com/davidjerleke/embla-carousel library.
|
|
32
32
|
*/
|
|
33
|
-
const Carousel = ({ children, variant = "default", autoPlay = 0, onNext, onPrev }) => {
|
|
33
|
+
const Carousel = ({ children, variant = "default", initialDelay = 0, autoPlay = 0, onNext, onPrev, }) => {
|
|
34
34
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
35
|
-
const [
|
|
35
|
+
const [autoplayEnabled, setAutoplayEnabled] = useState(false);
|
|
36
|
+
const plugins = useMemo(() => (autoplayEnabled && autoPlay ? [Autoplay({ delay: autoPlay, ...AutoplayFlags })] : []), [autoplayEnabled, autoPlay]);
|
|
37
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true }, plugins);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (autoPlay) {
|
|
40
|
+
const timer = setTimeout(() => setAutoplayEnabled(true), initialDelay);
|
|
41
|
+
return () => clearTimeout(timer);
|
|
42
|
+
}
|
|
43
|
+
}, [autoPlay]);
|
|
36
44
|
const updateIndex = useCallback(() => {
|
|
37
45
|
if (!emblaApi)
|
|
38
46
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/index.tsx"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/index.tsx"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,MAAM,MAAM,UAAU,CAAC;AAE9B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEvB,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAAA;;CAEhC,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;CAO5B,CAAC;AAEF,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,CAAwB;;;;;;;CAO3D,CAAC;AAEF;;GAEG;AACH,MAAM,QAAQ,GAAG,CAAC,EAChB,QAAQ,EACR,OAAO,GAAG,SAAS,EACnB,YAAY,GAAG,CAAC,EAChB,QAAQ,GAAG,CAAC,EACZ,MAAM,EACN,MAAM,GACA,EAAE,EAAE;IACV,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAA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layout/Carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC,GAAG;IACrE,QAAQ,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;AAEjD,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC,GAAG;IACrE,QAAQ,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;IAClC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/ContentCard/PortfolioContentCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/ContentCard/PortfolioContentCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKtD,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,OAAO,EAAE,iBAAiB,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;CAC5B,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,oBAAoB,CAAC,EAC3C,KAAK,EACL,GAAG,EACH,WAAW,EACX,GAAG,EACH,KAAK,EACL,OAAO,EACP,OAAO,GACR,EAAE,yBAAyB,qBAkB3B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { Button } from "../../../cta";
|
|
2
3
|
import BannerCard from "../../Banner/BannerCard";
|
|
3
4
|
export default function PortfolioContentCard({ title, cta, description, tag, image, onClick, onClose, }) {
|
|
4
|
-
return (React.createElement(BannerCard, { title: title, cta: cta, description: description, tag: tag, image: image, onClick: onClick, onClose: onClose }));
|
|
5
|
+
return (React.createElement(BannerCard, { title: title, cta: cta && (React.createElement(Button, { variant: "main", outline: false }, cta)), description: description, tag: tag, image: image, onClick: onClick, onClose: onClose }));
|
|
5
6
|
}
|
|
6
7
|
//# sourceMappingURL=index.js.map
|