@ledgerhq/react-ui 0.16.5 → 0.17.0-next.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/cta/Button/index.js +7 -1
- package/lib/cjs/components/cta/Button/index.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js +56 -20
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js.map +3 -3
- package/lib/cjs/components/layout/Carousel/ChevronArrow.js +90 -0
- package/lib/cjs/components/layout/Carousel/ChevronArrow.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/index.js +1 -1
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/index.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js +10 -11
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/Footer/index.js +2 -0
- package/lib/cjs/components/layout/Carousel/Footer/index.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js +0 -2
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/index.js +19 -3
- package/lib/cjs/components/layout/Carousel/index.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/types.js.map +1 -1
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js +78 -0
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js.map +7 -0
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/index.js +107 -0
- package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/index.js.map +7 -0
- package/lib/cjs/components/layout/index.js +2 -0
- package/lib/cjs/components/layout/index.js.map +2 -2
- package/lib/components/cta/Button/index.d.ts +1 -1
- package/lib/components/cta/Button/index.d.ts.map +1 -1
- package/lib/components/cta/Button/index.js +7 -1
- package/lib/components/cta/Button/index.js.map +1 -1
- package/lib/components/layout/Carousel/ChevronArrow.d.ts +10 -0
- package/lib/components/layout/Carousel/ChevronArrow.d.ts.map +1 -0
- package/lib/components/layout/Carousel/ChevronArrow.js +58 -0
- package/lib/components/layout/Carousel/ChevronArrow.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.js +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/index.js.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/utils.d.ts +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/utils.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/utils.js +10 -11
- package/lib/components/layout/Carousel/Footer/Pagination/utils.js.map +1 -1
- package/lib/components/layout/Carousel/Footer/index.d.ts +1 -1
- package/lib/components/layout/Carousel/Footer/index.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/index.js +2 -0
- package/lib/components/layout/Carousel/Footer/index.js.map +1 -1
- package/lib/components/layout/Carousel/Footer/variantContentCard.d.ts +1 -1
- package/lib/components/layout/Carousel/Footer/variantContentCard.d.ts.map +1 -1
- package/lib/components/layout/Carousel/Footer/variantContentCard.js +0 -2
- package/lib/components/layout/Carousel/Footer/variantContentCard.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 +24 -4
- package/lib/components/layout/Carousel/index.js.map +1 -1
- package/lib/components/layout/Carousel/types.d.ts +2 -1
- package/lib/components/layout/Carousel/types.d.ts.map +1 -1
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.d.ts +12 -0
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.d.ts.map +1 -0
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.js +72 -0
- package/lib/components/layout/ContentCard/PortfolioContentCard/index.js.map +1 -0
- package/lib/components/layout/index.d.ts +1 -0
- package/lib/components/layout/index.d.ts.map +1 -1
- package/lib/components/layout/index.js +1 -0
- package/lib/components/layout/index.js.map +1 -1
- package/package.json +2 -2
package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var PortfolioContentCard_stories_exports = {};
|
|
30
|
+
__export(PortfolioContentCard_stories_exports, {
|
|
31
|
+
WithCta: () => WithCta,
|
|
32
|
+
WithTag: () => WithTag,
|
|
33
|
+
WithoutCta: () => WithoutCta,
|
|
34
|
+
default: () => PortfolioContentCard_stories_default
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(PortfolioContentCard_stories_exports);
|
|
37
|
+
var import__ = __toESM(require("."));
|
|
38
|
+
var PortfolioContentCard_stories_default = {
|
|
39
|
+
title: "Layout/ContentCard/PortfolioContentCard",
|
|
40
|
+
component: import__.default,
|
|
41
|
+
argTypes: {
|
|
42
|
+
title: {
|
|
43
|
+
description: "Title of the card."
|
|
44
|
+
},
|
|
45
|
+
cta: {
|
|
46
|
+
description: "Call to action text."
|
|
47
|
+
},
|
|
48
|
+
description: {
|
|
49
|
+
description: "Description of the card."
|
|
50
|
+
},
|
|
51
|
+
tag: {
|
|
52
|
+
description: "Tag to be displayed on top of the card."
|
|
53
|
+
},
|
|
54
|
+
image: {
|
|
55
|
+
description: "Image to be displayed on the right of the card."
|
|
56
|
+
},
|
|
57
|
+
onClick: {
|
|
58
|
+
description: "Function to be called when the card is clicked."
|
|
59
|
+
},
|
|
60
|
+
onClose: {
|
|
61
|
+
description: "Function to be called when the close button is clicked."
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
args: {
|
|
65
|
+
title: "Ledger Recover",
|
|
66
|
+
description: "Get peace of mind and start your free trial.",
|
|
67
|
+
cta: "Start my free trial",
|
|
68
|
+
image: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='450' height='526' viewBox='0 0 450 526'><defs><linearGradient id='g' x0='0' y0='0' x1='1' y1='1'><stop stop-color='%23000' offset='0%' /><stop stop-color='%23FFF' offset='100%' /></linearGradient></defs><path d='M0,0 H450 V526 Q0,526 0,0 z' fill='url(%23g)' /></svg>"
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const WithCta = {};
|
|
72
|
+
const WithoutCta = {
|
|
73
|
+
args: { cta: void 0 }
|
|
74
|
+
};
|
|
75
|
+
const WithTag = {
|
|
76
|
+
args: { tag: "New" }
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=PortfolioContentCard.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from \"@storybook/react\";\nimport PortfolioContentCard, { PortfolioContentCardProps } from \".\";\n\nexport default {\n title: \"Layout/ContentCard/PortfolioContentCard\",\n component: PortfolioContentCard,\n argTypes: {\n title: {\n description: \"Title of the card.\",\n },\n cta: {\n description: \"Call to action text.\",\n },\n description: {\n description: \"Description of the card.\",\n },\n tag: {\n description: \"Tag to be displayed on top of the card.\",\n },\n image: {\n description: \"Image to be displayed on the right of the card.\",\n },\n onClick: {\n description: \"Function to be called when the card is clicked.\",\n },\n onClose: {\n description: \"Function to be called when the close button is clicked.\",\n },\n },\n args: {\n title: \"Ledger Recover\",\n description: \"Get peace of mind and start your free trial.\",\n cta: \"Start my free trial\",\n image:\n \"data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='450' height='526' viewBox='0 0 450 526'><defs><linearGradient id='g' x0='0' y0='0' x1='1' y1='1'><stop stop-color='%23000' offset='0%' /><stop stop-color='%23FFF' offset='100%' /></linearGradient></defs><path d='M0,0 H450 V526 Q0,526 0,0 z' fill='url(%23g)' /></svg>\",\n },\n} satisfies Meta<PortfolioContentCardProps>;\n\nexport const WithCta: StoryObj<PortfolioContentCardProps> = {};\n\nexport const WithoutCta: StoryObj<PortfolioContentCardProps> = {\n args: { cta: undefined },\n};\n\nexport const WithTag: StoryObj<PortfolioContentCardProps> = {\n args: { tag: \"New\" },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,eAAgE;AAEhE,IAAO,uCAAQ;AAAA,EACb,OAAO;AAAA,EACP,WAAW,SAAAA;AAAA,EACX,UAAU;AAAA,IACR,OAAO;AAAA,MACL,aAAa;AAAA,IACf;AAAA,IACA,KAAK;AAAA,MACH,aAAa;AAAA,IACf;AAAA,IACA,aAAa;AAAA,MACX,aAAa;AAAA,IACf;AAAA,IACA,KAAK;AAAA,MACH,aAAa;AAAA,IACf;AAAA,IACA,OAAO;AAAA,MACL,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,aAAa;AAAA,IACf;AAAA,IACA,SAAS;AAAA,MACP,aAAa;AAAA,IACf;AAAA,EACF;AAAA,EACA,MAAM;AAAA,IACJ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,KAAK;AAAA,IACL,OACE;AAAA,EACJ;AACF;AAEO,MAAM,UAA+C,CAAC;AAEtD,MAAM,aAAkD;AAAA,EAC7D,MAAM,EAAE,KAAK,OAAU;AACzB;AAEO,MAAM,UAA+C;AAAA,EAC1D,MAAM,EAAE,KAAK,MAAM;AACrB;",
|
|
6
|
+
"names": ["PortfolioContentCard"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var PortfolioContentCard_exports = {};
|
|
30
|
+
__export(PortfolioContentCard_exports, {
|
|
31
|
+
default: () => PortfolioContentCard
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(PortfolioContentCard_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
+
var import_styles = require("../../../../styles");
|
|
37
|
+
var import_assets = require("../../../../assets");
|
|
38
|
+
var import_asorted = require("../../../asorted");
|
|
39
|
+
var import_cta = require("../../../cta");
|
|
40
|
+
var import_Tag = __toESM(require("../../../Tag"));
|
|
41
|
+
function PortfolioContentCard({
|
|
42
|
+
title,
|
|
43
|
+
cta,
|
|
44
|
+
description,
|
|
45
|
+
tag,
|
|
46
|
+
image,
|
|
47
|
+
onClick,
|
|
48
|
+
onClose
|
|
49
|
+
}) {
|
|
50
|
+
const handleClose = (event) => {
|
|
51
|
+
event.stopPropagation();
|
|
52
|
+
onClose(event);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ import_react.default.createElement(Wrapper, { image, tag, onClick }, tag && /* @__PURE__ */ import_react.default.createElement(StyledTag, null, tag), /* @__PURE__ */ import_react.default.createElement(Title, null, title), description && /* @__PURE__ */ import_react.default.createElement(Desc, null, description), cta && /* @__PURE__ */ import_react.default.createElement(import_cta.Button, { variant: "main", outline: false, onClick }, cta), /* @__PURE__ */ import_react.default.createElement(import_styles.StyleProvider, { selectedPalette: "dark" }, /* @__PURE__ */ import_react.default.createElement(CloseButton, { onClick: handleClose })));
|
|
55
|
+
}
|
|
56
|
+
const StyledTag = (0, import_styled_components.default)(import_Tag.default).attrs({ size: "medium", type: "plain", active: true })`
|
|
57
|
+
font-size: 11px;
|
|
58
|
+
background-color: ${(p) => p.theme.colors.primary.c80};
|
|
59
|
+
`;
|
|
60
|
+
const Title = (0, import_styled_components.default)(import_asorted.Text).attrs({ variant: "h4Inter" })`
|
|
61
|
+
font-family: Inter;
|
|
62
|
+
font-size: 24px;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
`;
|
|
65
|
+
const Desc = (0, import_styled_components.default)(import_asorted.Text).attrs({ variant: "small", color: "neutral.c70" })`
|
|
66
|
+
font-family: Inter;
|
|
67
|
+
font-size: 13px;
|
|
68
|
+
font-style: normal;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
padding-bottom: 8px;
|
|
71
|
+
`;
|
|
72
|
+
const Wrapper = import_styled_components.default.div`
|
|
73
|
+
background-color: ${(p) => p.theme.colors.background.card};
|
|
74
|
+
background-image: ${(p) => p.image ? `url("${p.image}")` : "none"};
|
|
75
|
+
background-position: right center;
|
|
76
|
+
background-repeat: no-repeat;
|
|
77
|
+
background-size: 50% auto;
|
|
78
|
+
|
|
79
|
+
cursor: pointer;
|
|
80
|
+
padding: 16px;
|
|
81
|
+
padding-top: ${(p) => p.tag ? "16px" : "24px"};
|
|
82
|
+
padding-right: 50%;
|
|
83
|
+
|
|
84
|
+
position: relative;
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
justify-content: flex-end;
|
|
88
|
+
align-items: flex-start;
|
|
89
|
+
gap: 4px;
|
|
90
|
+
`;
|
|
91
|
+
const CloseButton = (0, import_styled_components.default)(import_cta.Button).attrs({
|
|
92
|
+
Icon: /* @__PURE__ */ import_react.default.createElement(import_assets.Icons.Close, { size: "XS" }),
|
|
93
|
+
iconButton: true,
|
|
94
|
+
outline: true
|
|
95
|
+
})`
|
|
96
|
+
background-color: ${(p) => p.theme.colors.neutral.c30};
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 10px;
|
|
99
|
+
right: 10px;
|
|
100
|
+
width: 24px;
|
|
101
|
+
height: 24px;
|
|
102
|
+
svg {
|
|
103
|
+
width: 12px;
|
|
104
|
+
height: 12px;
|
|
105
|
+
}
|
|
106
|
+
`;
|
|
107
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/ContentCard/PortfolioContentCard/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { type ReactEventHandler } from \"react\";\nimport styled from \"styled-components\";\n\nimport { StyleProvider } from \"../../../../styles\";\nimport { Icons } from \"../../../../assets\";\nimport { Text } from \"../../../asorted\";\nimport { Button } from \"../../../cta\";\nimport Tag from \"../../../Tag\";\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 const handleClose: ReactEventHandler = event => {\n event.stopPropagation();\n onClose(event);\n };\n\n return (\n <Wrapper image={image} tag={tag} onClick={onClick}>\n {tag && <StyledTag>{tag}</StyledTag>}\n <Title>{title}</Title>\n {description && <Desc>{description}</Desc>}\n {cta && (\n <Button variant=\"main\" outline={false} onClick={onClick}>\n {cta}\n </Button>\n )}\n <StyleProvider selectedPalette=\"dark\">\n <CloseButton onClick={handleClose} />\n </StyleProvider>\n </Wrapper>\n );\n}\n\nconst StyledTag = styled(Tag).attrs({ size: \"medium\", type: \"plain\", active: true })`\n font-size: 11px;\n background-color: ${p => p.theme.colors.primary.c80};\n`;\n\nconst Title = styled(Text).attrs({ variant: \"h4Inter\" })`\n font-family: Inter;\n font-size: 24px;\n font-weight: 600;\n`;\n\nconst Desc = styled(Text).attrs({ variant: \"small\", color: \"neutral.c70\" })`\n font-family: Inter;\n font-size: 13px;\n font-style: normal;\n font-weight: 500;\n padding-bottom: 8px;\n`;\n\nconst Wrapper = styled.div<Pick<PortfolioContentCardProps, \"image\" | \"tag\" | \"onClick\">>`\n background-color: ${p => p.theme.colors.background.card};\n background-image: ${p => (p.image ? `url(\"${p.image}\")` : \"none\")};\n background-position: right center;\n background-repeat: no-repeat;\n background-size: 50% auto;\n\n cursor: pointer;\n padding: 16px;\n padding-top: ${p => (p.tag ? \"16px\" : \"24px\")};\n padding-right: 50%;\n\n position: relative;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n align-items: flex-start;\n gap: 4px;\n`;\n\nconst CloseButton = styled(Button).attrs({\n Icon: <Icons.Close size=\"XS\" />,\n iconButton: true,\n outline: true,\n})`\n background-color: ${p => p.theme.colors.neutral.c30};\n position: absolute;\n top: 10px;\n right: 10px;\n width: 24px;\n height: 24px;\n svg {\n width: 12px;\n height: 12px;\n }\n`;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA8C;AAC9C,+BAAmB;AAEnB,oBAA8B;AAC9B,oBAAsB;AACtB,qBAAqB;AACrB,iBAAuB;AACvB,iBAAgB;AAaD,SAAR,qBAAsC;AAAA,EAC3C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAC5B,QAAM,cAAiC,WAAS;AAC9C,UAAM,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,SAAS;AACX,CAAC;AAAA,sBACqB,OAAK,EAAE,MAAM,OAAO,QAAQ,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
|
|
6
|
+
"names": ["React", "styled", "Tag"]
|
|
7
|
+
}
|
|
@@ -35,6 +35,7 @@ __export(layout_exports, {
|
|
|
35
35
|
Grid: () => import_Grid.default,
|
|
36
36
|
NumberedList: () => import_NumberedList.default,
|
|
37
37
|
Popin: () => import_Popin.default,
|
|
38
|
+
PortfolioContentCard: () => import_PortfolioContentCard.default,
|
|
38
39
|
Side: () => import_Side.default,
|
|
39
40
|
VerticalTimeline: () => import_VerticalTimeline.default
|
|
40
41
|
});
|
|
@@ -48,4 +49,5 @@ var import_Drawer = __toESM(require("./Drawer"));
|
|
|
48
49
|
var import_Carousel = __toESM(require("./Carousel"));
|
|
49
50
|
var import_VerticalTimeline = __toESM(require("./List/VerticalTimeline"));
|
|
50
51
|
var import_NumberedList = __toESM(require("./List/NumberedList"));
|
|
52
|
+
var import_PortfolioContentCard = __toESM(require("./ContentCard/PortfolioContentCard"));
|
|
51
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/components/layout/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as Flex } from \"./Flex\";\nexport { default as Box } from \"./Box\";\nexport { default as Grid } from \"./Grid\";\nexport { default as Popin } from \"./Popin\";\nexport { default as Side } from \"./Side\";\nexport { default as Drawer } from \"./Drawer\";\nexport { default as Carousel } from \"./Carousel\";\nexport { default as VerticalTimeline } from \"./List/VerticalTimeline\";\nexport { default as NumberedList } from \"./List/NumberedList\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgC;AAChC,iBAA+B;AAC/B,kBAAgC;AAChC,mBAAiC;AACjC,kBAAgC;AAChC,oBAAkC;AAClC,sBAAoC;AACpC,8BAA4C;AAC5C,0BAAwC;",
|
|
4
|
+
"sourcesContent": ["export { default as Flex } from \"./Flex\";\nexport { default as Box } from \"./Box\";\nexport { default as Grid } from \"./Grid\";\nexport { default as Popin } from \"./Popin\";\nexport { default as Side } from \"./Side\";\nexport { default as Drawer } from \"./Drawer\";\nexport { default as Carousel } from \"./Carousel\";\nexport { default as VerticalTimeline } from \"./List/VerticalTimeline\";\nexport { default as NumberedList } from \"./List/NumberedList\";\nexport { default as PortfolioContentCard } from \"./ContentCard/PortfolioContentCard\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAgC;AAChC,iBAA+B;AAC/B,kBAAgC;AAChC,mBAAiC;AACjC,kBAAgC;AAChC,oBAAkC;AAClC,sBAAoC;AACpC,8BAA4C;AAC5C,0BAAwC;AACxC,kCAAgD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -17,7 +17,7 @@ interface BaseProps extends BaseStyledProps, BordersProps {
|
|
|
17
17
|
whiteSpace?: string;
|
|
18
18
|
}
|
|
19
19
|
export interface ButtonProps extends BaseProps, React.RefAttributes<HTMLButtonElement> {
|
|
20
|
-
Icon?: React.ComponentType<{
|
|
20
|
+
Icon?: React.ReactElement | React.ComponentType<{
|
|
21
21
|
size: number;
|
|
22
22
|
color?: string;
|
|
23
23
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/cta/Button/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAEjD,OAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC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G,KAAK,CAAC,iBAAiB,CACrD,WAAW,GAAG;IACZ,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CACF,CAAC;AAWF,wBAAgB,YAAY,CAC1B,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,EAClD,GAAG,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,GAC1C,KAAK,CAAC,YAAY,CAcpB;AAED,eAAO,MAAM,eAAe,EAAE;IAC5B,CAAC,KAAK,EAAE,MAAM,GAAG;QACf,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CAkBH,CAAC;AAMF,eAAe,aAAa,CAAC"}
|
|
@@ -212,7 +212,13 @@ const Button = (_a, ref) => {
|
|
|
212
212
|
var _b;
|
|
213
213
|
var { Icon, iconPosition = "right", iconSize = 16, children, onClick } = _a, props = __rest(_a, ["Icon", "iconPosition", "iconSize", "children", "onClick"]);
|
|
214
214
|
const iconNodeSize = iconSize || fontSizes[(_b = props.fontSize) !== null && _b !== void 0 ? _b : 4];
|
|
215
|
-
const IconNode = useMemo(() =>
|
|
215
|
+
const IconNode = useMemo(() => {
|
|
216
|
+
if (!Icon)
|
|
217
|
+
return null;
|
|
218
|
+
if (typeof Icon === "object")
|
|
219
|
+
return Icon;
|
|
220
|
+
return React.createElement(Icon, { size: iconNodeSize });
|
|
221
|
+
}, [iconNodeSize, Icon]);
|
|
216
222
|
return (React.createElement(Base, Object.assign({}, props, { ref: ref, iconButton: !(Icon == null) && !children, onClick: onClick }),
|
|
217
223
|
iconPosition === "right" ? React.createElement(ContentContainer, null, children) : null,
|
|
218
224
|
IconNode && React.createElement(IconContainer, { iconPosition: iconPosition }, IconNode),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/cta/Button/index.tsx"],"names":[],"mappings":";;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AAe,GAKxB;IACF,EAAE,EAAE;QACF,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,MAAM;KACf;IACD,KAAK,EAAE;QACL,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,MAAM;KACf;IACD,MAAM,EAAE;QACN,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,MAAM;KACf;IACD,KAAK,EAAE;QACL,OAAO,EAAE,QAAQ;QACjB,MAAM,EAAE,MAAM;KACf;CACF,CAAC;AAEF,MAAM,CAAC,QAAQ,GAAG,cAAc,CAAC;AACjC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AAC/C,aAAa,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AACzC,aAAa,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;AACrC,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Props = ContainerProps & {
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
};
|
|
5
|
+
export declare function ChevronArrow(props: Props): React.JSX.Element;
|
|
6
|
+
type ContainerProps = {
|
|
7
|
+
direction: "left" | "right";
|
|
8
|
+
};
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=ChevronArrow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronArrow.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/ChevronArrow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,KAAK,KAAK,GAAG,cAAc,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,KAAK,qBAMxC;AAED,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { Icons } from "../../../assets";
|
|
4
|
+
export function ChevronArrow(props) {
|
|
5
|
+
return (React.createElement(ChevronArrowContainer, Object.assign({}, props),
|
|
6
|
+
React.createElement(Icons.ChevronLeft, null)));
|
|
7
|
+
}
|
|
8
|
+
const ChevronArrowContainer = styled.button `
|
|
9
|
+
display: inline-flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
width: 32px;
|
|
13
|
+
height: 32px;
|
|
14
|
+
|
|
15
|
+
position: absolute;
|
|
16
|
+
top: 50%;
|
|
17
|
+
left: ${({ direction }) => (direction === "left" ? "0" : "auto")};
|
|
18
|
+
right: ${({ direction }) => (direction === "left" ? "auto" : "0")};
|
|
19
|
+
z-index: 1;
|
|
20
|
+
|
|
21
|
+
--dir: ${({ direction }) => (direction === "left" ? "1" : "-1")};
|
|
22
|
+
scale: var(--dir) 1;
|
|
23
|
+
translate: calc(-50% * var(--dir)) -50%;
|
|
24
|
+
|
|
25
|
+
background-color: ${({ theme }) => theme.colors.background.default}; // Fake the transparent clip
|
|
26
|
+
border-radius: 100%;
|
|
27
|
+
border: none;
|
|
28
|
+
outline: none;
|
|
29
|
+
|
|
30
|
+
::before {
|
|
31
|
+
content: "";
|
|
32
|
+
display: block;
|
|
33
|
+
position: absolute;
|
|
34
|
+
z-index: -1;
|
|
35
|
+
inset: 3px;
|
|
36
|
+
background-color: ${({ theme }) => theme.colors.opacityDefault.c05};
|
|
37
|
+
border-color: ${({ theme }) => theme.colors.opacityDefault.c05};
|
|
38
|
+
border-radius: 100%;
|
|
39
|
+
border-style: solid;
|
|
40
|
+
border-width: 1px;
|
|
41
|
+
}
|
|
42
|
+
svg {
|
|
43
|
+
color: ${({ theme }) => theme.colors.primary.c100};
|
|
44
|
+
}
|
|
45
|
+
::before,
|
|
46
|
+
svg {
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
transition: opacity 0.2s ease-in-out;
|
|
51
|
+
opacity: var(--hover-transition);
|
|
52
|
+
::before,
|
|
53
|
+
svg {
|
|
54
|
+
transition: translate 0.2s ease-in-out;
|
|
55
|
+
translate: calc(-50% + 50% * var(--hover-transition)) 0;
|
|
56
|
+
}
|
|
57
|
+
`;
|
|
58
|
+
//# sourceMappingURL=ChevronArrow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChevronArrow.js","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/ChevronArrow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAMxC,MAAM,UAAU,YAAY,CAAC,KAAY;IACvC,OAAO,CACL,oBAAC,qBAAqB,oBAAK,KAAK;QAC9B,oBAAC,KAAK,CAAC,WAAW,OAAG,CACC,CACzB,CAAC;AACJ,CAAC;AAMD,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,CAAgB;;;;;;;;;UASjD,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC;WACvD,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;;;WAGxD,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;;;;sBAI3C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO;;;;;;;;;;;wBAW5C,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG;oBAClD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG;;;;;;aAMrD,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI;;;;;;;;;;;;;;CAcpD,CAAC"}
|
|
@@ -7,7 +7,7 @@ const FooterCarouselBullets = styled.div `
|
|
|
7
7
|
align-items: center;
|
|
8
8
|
`;
|
|
9
9
|
const Pagination = ({ children, currentIndex }) => {
|
|
10
|
-
return (React.createElement(FooterCarouselBullets, null, children.map((child, index) => (React.createElement(Bullet, { key: child.key, type: getItemStatus(index, currentIndex) })))));
|
|
10
|
+
return (React.createElement(FooterCarouselBullets, null, children.map((child, index) => (React.createElement(Bullet, { key: child.key, type: getItemStatus(index, currentIndex, children.length) })))));
|
|
11
11
|
};
|
|
12
12
|
export default Pagination;
|
|
13
13
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGvC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAY,EAAE,EAAE;IAC1D,OAAO,CACL,oBAAC,qBAAqB,QACnB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,oBAAC,MAAM,IAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,YAAY,CAAC,GAAI,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;CAGvC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAY,EAAE,EAAE;IAC1D,OAAO,CACL,oBAAC,qBAAqB,QACnB,QAAQ,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,oBAAC,MAAM,IAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAI,CACtF,CAAC,CACoB,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -2,5 +2,5 @@ import { ItemStatus } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Returns the status of an indexed item from the carousel index.
|
|
4
4
|
*/
|
|
5
|
-
export declare const getItemStatus: (itemIndex: number, activeIndex: number) => ItemStatus;
|
|
5
|
+
export declare const getItemStatus: (itemIndex: number, activeIndex: number, itemCount: number) => ItemStatus.active | ItemStatus.nearby | ItemStatus.far;
|
|
6
6
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,aAAa,cAAe,MAAM,eAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,aAAa,cAAe,MAAM,eAAe,MAAM,aAAa,MAAM,2DAatF,CAAC"}
|
|
@@ -2,17 +2,16 @@ import { ItemStatus } from "./types";
|
|
|
2
2
|
/**
|
|
3
3
|
* Returns the status of an indexed item from the carousel index.
|
|
4
4
|
*/
|
|
5
|
-
export const getItemStatus = (itemIndex, activeIndex) => {
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return ItemStatus.active;
|
|
10
|
-
case 1:
|
|
11
|
-
return ItemStatus.nearby;
|
|
12
|
-
case 2:
|
|
13
|
-
return ItemStatus.far;
|
|
14
|
-
default:
|
|
15
|
-
return ItemStatus.none;
|
|
5
|
+
export const getItemStatus = (itemIndex, activeIndex, itemCount) => {
|
|
6
|
+
const isActive = itemIndex === activeIndex;
|
|
7
|
+
if (isActive) {
|
|
8
|
+
return ItemStatus.active;
|
|
16
9
|
}
|
|
10
|
+
const isAdjacent = Math.abs(itemIndex - activeIndex) === 1;
|
|
11
|
+
if (isAdjacent) {
|
|
12
|
+
return ItemStatus.nearby;
|
|
13
|
+
}
|
|
14
|
+
const isEdge = itemIndex === 0 || itemIndex === itemCount - 1;
|
|
15
|
+
return isEdge ? ItemStatus.far : ItemStatus.nearby;
|
|
17
16
|
};
|
|
18
17
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,WAAmB,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAE,WAAmB,EAAE,SAAiB,EAAE,EAAE;IACzF,MAAM,QAAQ,GAAG,SAAS,KAAK,WAAW,CAAC;IAC3C,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,UAAU,CAAC,MAAM,CAAC;IAC3B,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3D,IAAI,UAAU,EAAE,CAAC;QACf,OAAO,UAAU,CAAC,MAAM,CAAC;IAC3B,CAAC;IAED,MAAM,MAAM,GAAG,SAAS,KAAK,CAAC,IAAI,SAAS,KAAK,SAAS,GAAG,CAAC,CAAC;IAC9D,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;AACrD,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAW,MAAM,UAAU,CAAC;AAS7C,QAAA,MAAM,MAAM,UAAW,QAAQ,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAW,MAAM,UAAU,CAAC;AAS7C,QAAA,MAAM,MAAM,UAAW,QAAQ,6BAK9B,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAElC,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,MAAM,OAAO,GAAuC;IAClD,cAAc,EAAE,iBAAiB;IACjC,OAAO,EAAE,aAAa;CACvB,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,KAAe,EAAE,EAAE;IACjC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC;AAClC,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAa,MAAM,OAAO,CAAC;AAElC,OAAO,iBAAiB,MAAM,sBAAsB,CAAC;AACrD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,MAAM,OAAO,GAAuC;IAClD,cAAc,EAAE,iBAAiB;IACjC,OAAO,EAAE,aAAa;CACvB,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,KAAe,EAAE,EAAE;IACjC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE7C,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACzC,OAAO,oBAAC,SAAS,oBAAK,KAAK,EAAI,CAAC;AAClC,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { SubProps } from "../types";
|
|
3
|
-
declare const FooterContentCard: ({ children, emblaApi, currentIndex, variant }: SubProps) => React.JSX.Element
|
|
3
|
+
declare const FooterContentCard: ({ children, emblaApi, currentIndex, variant }: SubProps) => React.JSX.Element;
|
|
4
4
|
export default FooterContentCard;
|
|
5
5
|
//# sourceMappingURL=variantContentCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variantContentCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/variantContentCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAsBpC,QAAA,MAAM,iBAAiB,kDAAmD,QAAQ,
|
|
1
|
+
{"version":3,"file":"variantContentCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/variantContentCard.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAsBpC,QAAA,MAAM,iBAAiB,kDAAmD,QAAQ,sBAoBjF,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -20,8 +20,6 @@ const FooterArrowContainer = styled.div `
|
|
|
20
20
|
cursor: pointer;
|
|
21
21
|
`;
|
|
22
22
|
const FooterContentCard = ({ children, emblaApi, currentIndex, variant }) => {
|
|
23
|
-
if (children.length === 1)
|
|
24
|
-
return null;
|
|
25
23
|
return (React.createElement(FooterContainer, null,
|
|
26
24
|
React.createElement(Pagination, { variant: variant, children: children, emblaApi: emblaApi, currentIndex: currentIndex }),
|
|
27
25
|
React.createElement(FooterArrowsContainer, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variantContentCard.js","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/variantContentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;0BAER,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG;;;;CAI/D,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIvC,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAItC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAY,EAAE,EAAE;IACpF,
|
|
1
|
+
{"version":3,"file":"variantContentCard.js","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/variantContentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,UAAU,MAAM,cAAc,CAAC;AAGtC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;0BAER,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,GAAG;;;;CAI/D,CAAC;AAEF,MAAM,qBAAqB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAIvC,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;CAItC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAY,EAAE,EAAE;IACpF,OAAO,CACL,oBAAC,eAAe;QACd,oBAAC,UAAU,IACT,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,GAC1B;QAEF,oBAAC,qBAAqB;YACpB,oBAAC,oBAAoB,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;gBACzD,oBAAC,SAAS,IAAC,IAAI,EAAC,GAAG,GAAG,CACD;YACvB,oBAAC,oBAAoB,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,EAAE;gBACzD,oBAAC,UAAU,IAAC,IAAI,EAAC,GAAG,GAAG,CACF,CACD,CACR,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iBAAiB,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 }: Props) => React.JSX.Element;
|
|
6
|
+
declare const Carousel: ({ children, variant, onChange }: Props) => React.JSX.Element;
|
|
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":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AA6BhC;;GAEG;AACH,QAAA,MAAM,QAAQ,oCAAiD,KAAK,sBAyDnE,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -2,6 +2,7 @@ import useEmblaCarousel from "embla-carousel-react";
|
|
|
2
2
|
import React, { useCallback, useEffect, useState } from "react";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
import Footer from "./Footer";
|
|
5
|
+
import { ChevronArrow } from "./ChevronArrow";
|
|
5
6
|
const Embla = styled.div `
|
|
6
7
|
overflow: hidden;
|
|
7
8
|
`;
|
|
@@ -9,13 +10,25 @@ const EmblaContainer = styled.div `
|
|
|
9
10
|
display: flex;
|
|
10
11
|
`;
|
|
11
12
|
const EmblaSlide = styled.div `
|
|
13
|
+
display: flex;
|
|
12
14
|
flex: 0 0 100%;
|
|
13
15
|
min-width: 0;
|
|
16
|
+
> * {
|
|
17
|
+
flex-basis: 100%;
|
|
18
|
+
}
|
|
19
|
+
`;
|
|
20
|
+
const CarouselContainer = styled.div `
|
|
21
|
+
position: relative;
|
|
22
|
+
|
|
23
|
+
--hover-transition: 0;
|
|
24
|
+
&:hover {
|
|
25
|
+
--hover-transition: 1;
|
|
26
|
+
}
|
|
14
27
|
`;
|
|
15
28
|
/**
|
|
16
29
|
* This component uses the https://github.com/davidjerleke/embla-carousel library.
|
|
17
30
|
*/
|
|
18
|
-
const Carousel = ({ children, variant = "default" }) => {
|
|
31
|
+
const Carousel = ({ children, variant = "default", onChange }) => {
|
|
19
32
|
const [currentIndex, setCurrentIndex] = useState(0);
|
|
20
33
|
const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true });
|
|
21
34
|
const updateIndex = useCallback(() => {
|
|
@@ -24,7 +37,8 @@ const Carousel = ({ children, variant = "default" }) => {
|
|
|
24
37
|
const newIndex = emblaApi.selectedScrollSnap();
|
|
25
38
|
setCurrentIndex(newIndex);
|
|
26
39
|
emblaApi.scrollTo(newIndex);
|
|
27
|
-
|
|
40
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(newIndex);
|
|
41
|
+
}, [emblaApi, onChange]);
|
|
28
42
|
useEffect(() => {
|
|
29
43
|
if (!emblaApi)
|
|
30
44
|
return;
|
|
@@ -35,9 +49,15 @@ const Carousel = ({ children, variant = "default" }) => {
|
|
|
35
49
|
// When `reInit` is called or when window is resized
|
|
36
50
|
emblaApi.on("reInit", updateIndex);
|
|
37
51
|
}, [emblaApi, updateIndex]);
|
|
52
|
+
const handleGotoPrevSlide = () => emblaApi === null || emblaApi === void 0 ? void 0 : emblaApi.scrollPrev();
|
|
53
|
+
const handleGotoNextSlide = () => emblaApi === null || emblaApi === void 0 ? void 0 : emblaApi.scrollNext();
|
|
38
54
|
return (React.createElement("div", null,
|
|
39
|
-
React.createElement(
|
|
40
|
-
|
|
55
|
+
React.createElement(CarouselContainer, { variant: variant },
|
|
56
|
+
variant === "default" && children.length > 1 && (React.createElement(React.Fragment, null,
|
|
57
|
+
React.createElement(ChevronArrow, { direction: "left", onClick: handleGotoPrevSlide }),
|
|
58
|
+
React.createElement(ChevronArrow, { direction: "right", onClick: handleGotoNextSlide }))),
|
|
59
|
+
React.createElement(Embla, { ref: emblaRef },
|
|
60
|
+
React.createElement(EmblaContainer, null, children.map(child => (React.createElement(EmblaSlide, { key: child.key }, child)))))),
|
|
41
61
|
React.createElement(Footer, { children: children, variant: variant, emblaApi: emblaApi, currentIndex: currentIndex })));
|
|
42
62
|
};
|
|
43
63
|
export default Carousel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,MAAM,MAAM,mBAAmB,CA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