@ledgerhq/react-ui 0.14.15-start-exchange.0 → 0.14.15
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/index.js +0 -1
- package/lib/cjs/components/index.js.map +2 -2
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js +78 -0
- package/lib/cjs/components/layout/Carousel/Carousel.stories.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/bullets.js +76 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/bullets.js.map +7 -0
- package/lib/cjs/components/{cards/Carousel/Slide.js → layout/Carousel/Footer/Pagination/index.js} +13 -20
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/index.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/types.js +31 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/types.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js +38 -0
- package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js.map +7 -0
- package/lib/cjs/components/{cards → layout/Carousel/Footer}/index.js +16 -5
- package/lib/cjs/components/layout/Carousel/Footer/index.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js +69 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantDefault.js +47 -0
- package/lib/cjs/components/layout/Carousel/Footer/variantDefault.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/index.js +76 -0
- package/lib/cjs/components/layout/Carousel/index.js.map +7 -0
- package/lib/cjs/components/layout/Carousel/types.js +17 -0
- package/lib/cjs/components/layout/Carousel/types.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/index.d.ts +0 -1
- package/lib/components/index.js +0 -1
- package/lib/components/index.js.map +1 -1
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.d.ts +6 -0
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.js +25 -0
- package/lib/components/layout/Carousel/Footer/Pagination/bullets.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.js +13 -0
- package/lib/components/layout/Carousel/Footer/Pagination/index.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/types.d.ts +6 -0
- package/lib/components/layout/Carousel/Footer/Pagination/types.js +8 -0
- package/lib/components/layout/Carousel/Footer/Pagination/types.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/Pagination/utils.d.ts +5 -0
- package/lib/components/layout/Carousel/Footer/Pagination/utils.js +18 -0
- package/lib/components/layout/Carousel/Footer/Pagination/utils.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/index.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/index.js +13 -0
- package/lib/components/layout/Carousel/Footer/index.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/variantContentCard.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/variantContentCard.js +34 -0
- package/lib/components/layout/Carousel/Footer/variantContentCard.js.map +1 -0
- package/lib/components/layout/Carousel/Footer/variantDefault.d.ts +4 -0
- package/lib/components/layout/Carousel/Footer/variantDefault.js +15 -0
- package/lib/components/layout/Carousel/Footer/variantDefault.js.map +1 -0
- package/lib/components/layout/Carousel/index.d.ts +7 -0
- package/lib/components/layout/Carousel/index.js +44 -0
- package/lib/components/layout/Carousel/index.js.map +1 -0
- package/lib/components/layout/Carousel/types.d.ts +14 -0
- package/lib/components/layout/Carousel/types.js +2 -0
- package/lib/components/layout/Carousel/types.js.map +1 -0
- package/lib/components/layout/index.d.ts +1 -0
- package/lib/components/layout/index.js +1 -0
- package/lib/components/layout/index.js.map +1 -1
- package/package.json +5 -2
- package/lib/cjs/components/cards/Carousel/Carousel.stories.js +0 -106
- package/lib/cjs/components/cards/Carousel/Carousel.stories.js.map +0 -7
- package/lib/cjs/components/cards/Carousel/Slide.js.map +0 -7
- package/lib/cjs/components/cards/Carousel/index.js +0 -187
- package/lib/cjs/components/cards/Carousel/index.js.map +0 -7
- package/lib/cjs/components/cards/index.js.map +0 -7
- package/lib/components/cards/Carousel/Slide.d.ts +0 -9
- package/lib/components/cards/Carousel/Slide.js +0 -22
- package/lib/components/cards/Carousel/Slide.js.map +0 -1
- package/lib/components/cards/Carousel/index.d.ts +0 -13
- package/lib/components/cards/Carousel/index.js +0 -144
- package/lib/components/cards/Carousel/index.js.map +0 -1
- package/lib/components/cards/index.d.ts +0 -1
- package/lib/components/cards/index.js +0 -2
- package/lib/components/cards/index.js.map +0 -1
|
@@ -1,187 +0,0 @@
|
|
|
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 Carousel_exports = {};
|
|
30
|
-
__export(Carousel_exports, {
|
|
31
|
-
default: () => Carousel_default
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(Carousel_exports);
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
-
var import_react_transition_group = require("react-transition-group");
|
|
37
|
-
var import_TransitionSlide = __toESM(require("../../transitions/TransitionSlide"));
|
|
38
|
-
var import_Button = __toESM(require("../../cta/Button"));
|
|
39
|
-
var import_Text = __toESM(require("../../asorted/Text"));
|
|
40
|
-
var import_Flex = __toESM(require("../../layout/Flex"));
|
|
41
|
-
var import_Slide = __toESM(require("./Slide"));
|
|
42
|
-
var import_ArrowLeftMedium = __toESM(require("@ledgerhq/icons-ui/reactLegacy/ArrowLeftMedium"));
|
|
43
|
-
var import_ArrowRightMedium = __toESM(require("@ledgerhq/icons-ui/reactLegacy/ArrowRightMedium"));
|
|
44
|
-
var import_CloseMedium = __toESM(require("@ledgerhq/icons-ui/reactLegacy/CloseMedium"));
|
|
45
|
-
const CarouselWrapper = import_styled_components.default.div`
|
|
46
|
-
width: 100%;
|
|
47
|
-
height: 180px;
|
|
48
|
-
border-radius: 8px;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
cursor: pointer;
|
|
51
|
-
position: relative;
|
|
52
|
-
flex: 1;
|
|
53
|
-
background: ${(p) => p.theme.colors.neutral.c100};
|
|
54
|
-
`;
|
|
55
|
-
const Controllers = (0, import_styled_components.default)(import_Flex.default)`
|
|
56
|
-
position: absolute;
|
|
57
|
-
flex-direction: row;
|
|
58
|
-
right: ${(p) => p.theme.space[5]}px;
|
|
59
|
-
bottom: ${(p) => p.theme.space[4]}px;
|
|
60
|
-
column-gap: ${(p) => p.theme.space[4]}px;
|
|
61
|
-
color: ${(p) => p.theme.colors.neutral.c00};
|
|
62
|
-
|
|
63
|
-
> div {
|
|
64
|
-
&:hover {
|
|
65
|
-
opacity: 0.5;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
`;
|
|
69
|
-
const Bullets = import_styled_components.default.div`
|
|
70
|
-
position: absolute;
|
|
71
|
-
display: flex;
|
|
72
|
-
left: ${(p) => p.theme.space[10]}px;
|
|
73
|
-
bottom: ${(p) => p.theme.space[8]}px;
|
|
74
|
-
column-gap: ${(p) => p.theme.space[2]}px;
|
|
75
|
-
flex-direction: row;
|
|
76
|
-
|
|
77
|
-
> div {
|
|
78
|
-
position: relative;
|
|
79
|
-
height: ${(p) => p.theme.space[1]}px;
|
|
80
|
-
width: ${(p) => p.theme.space[8]}px;
|
|
81
|
-
background: ${(p) => p.theme.colors.neutral.c00};
|
|
82
|
-
opacity: 0.5;
|
|
83
|
-
&:hover {
|
|
84
|
-
opacity: 0.75;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
&:nth-child(${(p) => p.active}) {
|
|
88
|
-
opacity: 1;
|
|
89
|
-
&:hover {
|
|
90
|
-
opacity: 0.75;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
::after {
|
|
95
|
-
content: "";
|
|
96
|
-
position: absolute;
|
|
97
|
-
top: -${(p) => p.theme.space[4]}px;
|
|
98
|
-
height: ${(p) => p.theme.space[7]}px;
|
|
99
|
-
width: 100%;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
`;
|
|
103
|
-
const Close = import_styled_components.default.div`
|
|
104
|
-
position: absolute;
|
|
105
|
-
top: ${(p) => p.theme.space[7]}px;
|
|
106
|
-
right: ${(p) => p.theme.space[5]}px;
|
|
107
|
-
color: ${(p) => p.theme.colors.neutral.c00};
|
|
108
|
-
&:hover {
|
|
109
|
-
opacity: 0.5;
|
|
110
|
-
}
|
|
111
|
-
`;
|
|
112
|
-
const DismissWrapper = import_styled_components.default.div`
|
|
113
|
-
color: white;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
display: flex;
|
|
117
|
-
flex-direction: column;
|
|
118
|
-
padding: ${(p) => p.theme.space[13]}px;
|
|
119
|
-
row-gap: ${(p) => p.theme.space[7]}px;
|
|
120
|
-
`;
|
|
121
|
-
const DEFAULT_TIMEOUT = 7e3;
|
|
122
|
-
const Carousel = ({
|
|
123
|
-
timeout = DEFAULT_TIMEOUT,
|
|
124
|
-
queue,
|
|
125
|
-
isDismissed,
|
|
126
|
-
onDismiss,
|
|
127
|
-
dismissText = "This banner will not show up again until there is a new announcement",
|
|
128
|
-
dismissConfirmText = "Confirm",
|
|
129
|
-
dismissCancelText = "Show again"
|
|
130
|
-
}) => {
|
|
131
|
-
const intervalRef = (0, import_react.useRef)();
|
|
132
|
-
const [direction, setDirection] = (0, import_react.useState)("right");
|
|
133
|
-
const [index, setIndex] = (0, import_react.useState)(0);
|
|
134
|
-
const [wantToDismiss, setWantToDismiss] = (0, import_react.useState)(false);
|
|
135
|
-
const [paused, setPaused] = (0, import_react.useState)(false);
|
|
136
|
-
const childFactory = (0, import_react.useCallback)(
|
|
137
|
-
(child) => import_react.default.cloneElement(child, { direction }),
|
|
138
|
-
[direction]
|
|
139
|
-
);
|
|
140
|
-
const wrappedSetIndex = (0, import_react.useCallback)(
|
|
141
|
-
(newIndex) => {
|
|
142
|
-
setDirection(newIndex > index ? "left" : "right");
|
|
143
|
-
setIndex(newIndex);
|
|
144
|
-
},
|
|
145
|
-
[index]
|
|
146
|
-
);
|
|
147
|
-
const onSlide = (0, import_react.useCallback)(
|
|
148
|
-
(direction2 = "left") => {
|
|
149
|
-
setDirection(direction2);
|
|
150
|
-
const i = index + (direction2 === "right" ? -1 : 1);
|
|
151
|
-
setIndex(i < 0 ? queue.length - 1 : i >= queue.length ? 0 : i);
|
|
152
|
-
},
|
|
153
|
-
[index, queue]
|
|
154
|
-
);
|
|
155
|
-
const onPrevious = (0, import_react.useCallback)(() => onSlide("right"), [onSlide]);
|
|
156
|
-
const onNext = (0, import_react.useCallback)(() => onSlide("left"), [onSlide]);
|
|
157
|
-
const onWantToDismiss = () => setWantToDismiss(true);
|
|
158
|
-
const onCancelDismiss = () => setWantToDismiss(false);
|
|
159
|
-
const onMouseEnter = () => setPaused(true);
|
|
160
|
-
const onMouseLeave = () => setPaused(false);
|
|
161
|
-
(0, import_react.useEffect)(() => {
|
|
162
|
-
const _timeout = timeout < 1e3 ? DEFAULT_TIMEOUT : timeout;
|
|
163
|
-
if (intervalRef.current)
|
|
164
|
-
clearInterval(intervalRef.current);
|
|
165
|
-
if (!paused)
|
|
166
|
-
intervalRef.current = setInterval(onSlide, _timeout);
|
|
167
|
-
}, [onSlide, paused, timeout]);
|
|
168
|
-
(0, import_react.useEffect)(() => {
|
|
169
|
-
if (isDismissed)
|
|
170
|
-
setWantToDismiss(false);
|
|
171
|
-
}, [isDismissed]);
|
|
172
|
-
if (!(queue == null ? void 0 : queue.length) || isDismissed)
|
|
173
|
-
return null;
|
|
174
|
-
return /* @__PURE__ */ import_react.default.createElement(CarouselWrapper, { id: "carousel", onMouseEnter, onMouseLeave }, wantToDismiss ? /* @__PURE__ */ import_react.default.createElement(DismissWrapper, null, /* @__PURE__ */ import_react.default.createElement(import_Text.default, { color: "neutral.c00", fontWeight: "medium", variant: "paragraph" }, dismissText), /* @__PURE__ */ import_react.default.createElement(import_Flex.default, { columnGap: 5 }, /* @__PURE__ */ import_react.default.createElement(import_Button.default, { color: "neutral.c100", backgroundColor: "neutral.c00", onClick: onDismiss }, dismissConfirmText), /* @__PURE__ */ import_react.default.createElement(
|
|
175
|
-
import_Button.default,
|
|
176
|
-
{
|
|
177
|
-
outline: true,
|
|
178
|
-
color: "neutral.c00",
|
|
179
|
-
backgroundColor: "neutral.c100",
|
|
180
|
-
borderColor: "neutral.c00",
|
|
181
|
-
onClick: onCancelDismiss
|
|
182
|
-
},
|
|
183
|
-
dismissCancelText
|
|
184
|
-
))) : /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(import_react_transition_group.TransitionGroup, { component: null, childFactory }, /* @__PURE__ */ import_react.default.createElement(import_TransitionSlide.default, { key: index, direction }, /* @__PURE__ */ import_react.default.createElement(import_Slide.default, { ...queue[index] }))), /* @__PURE__ */ import_react.default.createElement(Close, { id: "carousel-dismiss", onClick: onWantToDismiss }, /* @__PURE__ */ import_react.default.createElement(import_CloseMedium.default, { size: 18 })), /* @__PURE__ */ import_react.default.createElement(Bullets, { active: index + 1 }, queue.map((_, i) => /* @__PURE__ */ import_react.default.createElement("div", { key: `bullet_${i}`, onClick: () => wrappedSetIndex(i) }))), /* @__PURE__ */ import_react.default.createElement(Controllers, null, /* @__PURE__ */ import_react.default.createElement("div", { onClick: onPrevious }, /* @__PURE__ */ import_react.default.createElement(import_ArrowLeftMedium.default, { size: 20 })), /* @__PURE__ */ import_react.default.createElement("div", { onClick: onNext }, /* @__PURE__ */ import_react.default.createElement(import_ArrowRightMedium.default, { size: 20 })))));
|
|
185
|
-
};
|
|
186
|
-
var Carousel_default = Carousel;
|
|
187
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/components/cards/Carousel/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { useRef, useCallback, useState, useEffect } from \"react\";\nimport styled from \"styled-components\";\nimport { TransitionGroup } from \"react-transition-group\";\nimport TransitionSlide from \"../../transitions/TransitionSlide\";\n\nimport Button from \"../../cta/Button\";\nimport Text from \"../../asorted/Text\";\nimport Flex from \"../../layout/Flex\";\nimport Slide, { Props as SlideProps } from \"./Slide\";\n\nimport IconLeft from \"@ledgerhq/icons-ui/reactLegacy/ArrowLeftMedium\";\nimport IconRight from \"@ledgerhq/icons-ui/reactLegacy/ArrowRightMedium\";\nimport IconClose from \"@ledgerhq/icons-ui/reactLegacy/CloseMedium\";\n\nconst CarouselWrapper = styled.div`\n width: 100%;\n height: 180px;\n border-radius: 8px;\n overflow: hidden;\n cursor: pointer;\n position: relative;\n flex: 1;\n background: ${p => p.theme.colors.neutral.c100};\n`;\n\nconst Controllers = styled(Flex)`\n position: absolute;\n flex-direction: row;\n right: ${p => p.theme.space[5]}px;\n bottom: ${p => p.theme.space[4]}px;\n column-gap: ${p => p.theme.space[4]}px;\n color: ${p => p.theme.colors.neutral.c00};\n\n > div {\n &:hover {\n opacity: 0.5;\n }\n }\n`;\n\nconst Bullets = styled.div<{ active?: number }>`\n position: absolute;\n display: flex;\n left: ${p => p.theme.space[10]}px;\n bottom: ${p => p.theme.space[8]}px;\n column-gap: ${p => p.theme.space[2]}px;\n flex-direction: row;\n\n > div {\n position: relative;\n height: ${p => p.theme.space[1]}px;\n width: ${p => p.theme.space[8]}px;\n background: ${p => p.theme.colors.neutral.c00};\n opacity: 0.5;\n &:hover {\n opacity: 0.75;\n }\n\n &:nth-child(${p => p.active}) {\n opacity: 1;\n &:hover {\n opacity: 0.75;\n }\n }\n\n ::after {\n content: \"\";\n position: absolute;\n top: -${p => p.theme.space[4]}px;\n height: ${p => p.theme.space[7]}px;\n width: 100%;\n }\n }\n`;\n\nconst Close = styled.div`\n position: absolute;\n top: ${p => p.theme.space[7]}px;\n right: ${p => p.theme.space[5]}px;\n color: ${p => p.theme.colors.neutral.c00};\n &:hover {\n opacity: 0.5;\n }\n`;\n\nconst DismissWrapper = styled.div`\n color: white;\n align-items: center;\n justify-content: center;\n display: flex;\n flex-direction: column;\n padding: ${p => p.theme.space[13]}px;\n row-gap: ${p => p.theme.space[7]}px;\n`;\n\nexport type Props = {\n timeout?: number;\n queue: SlideProps[];\n isDismissed: boolean;\n onDismiss: () => void;\n dismissText?: React.ReactNode;\n dismissConfirmText?: React.ReactNode;\n dismissCancelText?: React.ReactNode;\n};\n\nconst DEFAULT_TIMEOUT = 7000;\nconst Carousel = ({\n timeout = DEFAULT_TIMEOUT,\n queue,\n isDismissed,\n onDismiss,\n dismissText = \"This banner will not show up again until there is a new announcement\",\n dismissConfirmText = \"Confirm\",\n dismissCancelText = \"Show again\",\n}: Props): React.ReactElement | null => {\n const intervalRef = useRef<ReturnType<typeof setInterval>>();\n\n const [direction, setDirection] = useState(\"right\");\n const [index, setIndex] = useState(0);\n const [wantToDismiss, setWantToDismiss] = useState(false);\n const [paused, setPaused] = useState(false);\n const childFactory = useCallback(\n (child: any) => React.cloneElement(child, { direction }),\n [direction],\n );\n\n const wrappedSetIndex = useCallback(\n (newIndex: number) => {\n setDirection(newIndex > index ? \"left\" : \"right\");\n setIndex(newIndex);\n },\n [index],\n );\n\n const onSlide = useCallback(\n (direction = \"left\") => {\n setDirection(direction);\n const i = index + (direction === \"right\" ? -1 : 1);\n setIndex(i < 0 ? queue.length - 1 : i >= queue.length ? 0 : i);\n },\n [index, queue],\n );\n const onPrevious = useCallback(() => onSlide(\"right\"), [onSlide]);\n const onNext = useCallback(() => onSlide(\"left\"), [onSlide]);\n\n const onWantToDismiss = () => setWantToDismiss(true);\n const onCancelDismiss = () => setWantToDismiss(false);\n\n const onMouseEnter = () => setPaused(true);\n const onMouseLeave = () => setPaused(false);\n\n useEffect(() => {\n // Nb we pause automatic transitions when the mouse is within the carousel.\n // Override passed timeout if lower than 1000ms\n const _timeout = timeout < 1000 ? DEFAULT_TIMEOUT : timeout;\n if (intervalRef.current) clearInterval(intervalRef.current);\n if (!paused) intervalRef.current = setInterval(onSlide, _timeout);\n }, [onSlide, paused, timeout]);\n\n useEffect(() => {\n if (isDismissed) setWantToDismiss(false);\n }, [isDismissed]);\n\n if (!queue?.length || isDismissed) return null;\n\n return (\n <CarouselWrapper id={\"carousel\"} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n {wantToDismiss ? (\n <DismissWrapper>\n <Text color=\"neutral.c00\" fontWeight=\"medium\" variant={\"paragraph\"}>\n {dismissText}\n </Text>\n <Flex columnGap={5}>\n <Button color=\"neutral.c100\" backgroundColor=\"neutral.c00\" onClick={onDismiss}>\n {dismissConfirmText}\n </Button>\n <Button\n outline\n color=\"neutral.c00\"\n backgroundColor=\"neutral.c100\"\n borderColor=\"neutral.c00\"\n onClick={onCancelDismiss}\n >\n {dismissCancelText}\n </Button>\n </Flex>\n </DismissWrapper>\n ) : (\n <div>\n <TransitionGroup component={null} childFactory={childFactory}>\n <TransitionSlide key={index} direction={direction}>\n <Slide {...queue[index]} />\n </TransitionSlide>\n </TransitionGroup>\n\n <Close id={\"carousel-dismiss\"} onClick={onWantToDismiss}>\n <IconClose size={18} />\n </Close>\n\n <Bullets active={index + 1}>\n {queue.map((_, i) => (\n <div key={`bullet_${i}`} onClick={() => wrappedSetIndex(i)} />\n ))}\n </Bullets>\n\n <Controllers>\n <div onClick={onPrevious}>\n <IconLeft size={20} />\n </div>\n <div onClick={onNext}>\n <IconRight size={20} />\n </div>\n </Controllers>\n </div>\n )}\n </CarouselWrapper>\n );\n};\n\nexport default Carousel;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAgE;AAChE,+BAAmB;AACnB,oCAAgC;AAChC,6BAA4B;AAE5B,oBAAmB;AACnB,kBAAiB;AACjB,kBAAiB;AACjB,mBAA2C;AAE3C,6BAAqB;AACrB,8BAAsB;AACtB,yBAAsB;AAEtB,MAAM,kBAAkB,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQf,OAAK,EAAE,MAAM,OAAO,QAAQ,IAAI;AAAA;AAGhD,MAAM,kBAAc,yBAAAA,SAAO,YAAAC,OAAI;AAAA;AAAA;AAAA,WAGpB,OAAK,EAAE,MAA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C,IAAI,SAAS,MAAM,gBAAgB,CAAC,GAAG,CAC7D,CACH,GAEA,6BAAAA,QAAA,cAAC,mBACC,6BAAAA,QAAA,cAAC,SAAI,SAAS,cACZ,6BAAAA,QAAA,cAAC,uBAAAO,SAAA,EAAS,MAAM,IAAI,CACtB,GACA,6BAAAP,QAAA,cAAC,SAAI,SAAS,UACZ,6BAAAA,QAAA,cAAC,wBAAAQ,SAAA,EAAU,MAAM,IAAI,CACvB,CACF,CACF,CAEJ;AAEJ;AAEA,IAAO,mBAAQ;",
|
|
6
|
-
"names": ["styled", "Flex", "React", "direction", "Text", "Button", "TransitionSlide", "Slide", "IconClose", "IconLeft", "IconRight"]
|
|
7
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import Text from "../../asorted/Text";
|
|
4
|
-
import Flex from "../../layout/Flex";
|
|
5
|
-
const Wrapper = styled(Flex) `
|
|
6
|
-
width: 100%;
|
|
7
|
-
height: 100%;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
padding: ${p => p.theme.space[8]}px ${p => p.theme.space[10]}px;
|
|
10
|
-
padding-right: 280px; /* Nb gives air to not overlap the illustration */
|
|
11
|
-
z-index: ${p => p.theme.zIndexes[8]};
|
|
12
|
-
background: url(${p => p.image}) no-repeat ${p => p.theme.colors.neutral.c100};
|
|
13
|
-
background-size: contain;
|
|
14
|
-
background-position: right 60px bottom;
|
|
15
|
-
`;
|
|
16
|
-
const Slide = ({ title, description, image, onClick }) => {
|
|
17
|
-
return (React.createElement(Wrapper, { key: "key", image: image, onClick: onClick },
|
|
18
|
-
React.createElement(Text, { variant: "tiny", color: "neutral.c00", fontWeight: "regular" }, title),
|
|
19
|
-
React.createElement(Text, { variant: "h5", color: "neutral.c00", textTransform: "uppercase" }, description)));
|
|
20
|
-
};
|
|
21
|
-
export default Slide;
|
|
22
|
-
//# sourceMappingURL=Slide.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Slide.js","sourceRoot":"","sources":["../../../../src/components/cards/Carousel/Slide.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,IAAI,MAAM,mBAAmB,CAAC;AAErC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAoB;;;;aAInC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;;aAEjD,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;oBACjB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI;;;CAG9E,CAAC;AASF,MAAM,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAS,EAAsB,EAAE;IAClF,OAAO,CACL,oBAAC,OAAO,IAAC,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO;QACjD,oBAAC,IAAI,IAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAC,aAAa,EAAC,UAAU,EAAC,SAAS,IAC5D,KAAK,CACD;QACP,oBAAC,IAAI,IAAC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAC,aAAa,EAAC,aAAa,EAAC,WAAW,IAC/D,WAAW,CACP,CACC,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Props as SlideProps } from "./Slide";
|
|
3
|
-
export type Props = {
|
|
4
|
-
timeout?: number;
|
|
5
|
-
queue: SlideProps[];
|
|
6
|
-
isDismissed: boolean;
|
|
7
|
-
onDismiss: () => void;
|
|
8
|
-
dismissText?: React.ReactNode;
|
|
9
|
-
dismissConfirmText?: React.ReactNode;
|
|
10
|
-
dismissCancelText?: React.ReactNode;
|
|
11
|
-
};
|
|
12
|
-
declare const Carousel: ({ timeout, queue, isDismissed, onDismiss, dismissText, dismissConfirmText, dismissCancelText, }: Props) => React.ReactElement | null;
|
|
13
|
-
export default Carousel;
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import React, { useRef, useCallback, useState, useEffect } from "react";
|
|
2
|
-
import styled from "styled-components";
|
|
3
|
-
import { TransitionGroup } from "react-transition-group";
|
|
4
|
-
import TransitionSlide from "../../transitions/TransitionSlide";
|
|
5
|
-
import Button from "../../cta/Button";
|
|
6
|
-
import Text from "../../asorted/Text";
|
|
7
|
-
import Flex from "../../layout/Flex";
|
|
8
|
-
import Slide from "./Slide";
|
|
9
|
-
import IconLeft from "@ledgerhq/icons-ui/reactLegacy/ArrowLeftMedium";
|
|
10
|
-
import IconRight from "@ledgerhq/icons-ui/reactLegacy/ArrowRightMedium";
|
|
11
|
-
import IconClose from "@ledgerhq/icons-ui/reactLegacy/CloseMedium";
|
|
12
|
-
const CarouselWrapper = styled.div `
|
|
13
|
-
width: 100%;
|
|
14
|
-
height: 180px;
|
|
15
|
-
border-radius: 8px;
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
cursor: pointer;
|
|
18
|
-
position: relative;
|
|
19
|
-
flex: 1;
|
|
20
|
-
background: ${p => p.theme.colors.neutral.c100};
|
|
21
|
-
`;
|
|
22
|
-
const Controllers = styled(Flex) `
|
|
23
|
-
position: absolute;
|
|
24
|
-
flex-direction: row;
|
|
25
|
-
right: ${p => p.theme.space[5]}px;
|
|
26
|
-
bottom: ${p => p.theme.space[4]}px;
|
|
27
|
-
column-gap: ${p => p.theme.space[4]}px;
|
|
28
|
-
color: ${p => p.theme.colors.neutral.c00};
|
|
29
|
-
|
|
30
|
-
> div {
|
|
31
|
-
&:hover {
|
|
32
|
-
opacity: 0.5;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
36
|
-
const Bullets = styled.div `
|
|
37
|
-
position: absolute;
|
|
38
|
-
display: flex;
|
|
39
|
-
left: ${p => p.theme.space[10]}px;
|
|
40
|
-
bottom: ${p => p.theme.space[8]}px;
|
|
41
|
-
column-gap: ${p => p.theme.space[2]}px;
|
|
42
|
-
flex-direction: row;
|
|
43
|
-
|
|
44
|
-
> div {
|
|
45
|
-
position: relative;
|
|
46
|
-
height: ${p => p.theme.space[1]}px;
|
|
47
|
-
width: ${p => p.theme.space[8]}px;
|
|
48
|
-
background: ${p => p.theme.colors.neutral.c00};
|
|
49
|
-
opacity: 0.5;
|
|
50
|
-
&:hover {
|
|
51
|
-
opacity: 0.75;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&:nth-child(${p => p.active}) {
|
|
55
|
-
opacity: 1;
|
|
56
|
-
&:hover {
|
|
57
|
-
opacity: 0.75;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
::after {
|
|
62
|
-
content: "";
|
|
63
|
-
position: absolute;
|
|
64
|
-
top: -${p => p.theme.space[4]}px;
|
|
65
|
-
height: ${p => p.theme.space[7]}px;
|
|
66
|
-
width: 100%;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
const Close = styled.div `
|
|
71
|
-
position: absolute;
|
|
72
|
-
top: ${p => p.theme.space[7]}px;
|
|
73
|
-
right: ${p => p.theme.space[5]}px;
|
|
74
|
-
color: ${p => p.theme.colors.neutral.c00};
|
|
75
|
-
&:hover {
|
|
76
|
-
opacity: 0.5;
|
|
77
|
-
}
|
|
78
|
-
`;
|
|
79
|
-
const DismissWrapper = styled.div `
|
|
80
|
-
color: white;
|
|
81
|
-
align-items: center;
|
|
82
|
-
justify-content: center;
|
|
83
|
-
display: flex;
|
|
84
|
-
flex-direction: column;
|
|
85
|
-
padding: ${p => p.theme.space[13]}px;
|
|
86
|
-
row-gap: ${p => p.theme.space[7]}px;
|
|
87
|
-
`;
|
|
88
|
-
const DEFAULT_TIMEOUT = 7000;
|
|
89
|
-
const Carousel = ({ timeout = DEFAULT_TIMEOUT, queue, isDismissed, onDismiss, dismissText = "This banner will not show up again until there is a new announcement", dismissConfirmText = "Confirm", dismissCancelText = "Show again", }) => {
|
|
90
|
-
const intervalRef = useRef();
|
|
91
|
-
const [direction, setDirection] = useState("right");
|
|
92
|
-
const [index, setIndex] = useState(0);
|
|
93
|
-
const [wantToDismiss, setWantToDismiss] = useState(false);
|
|
94
|
-
const [paused, setPaused] = useState(false);
|
|
95
|
-
const childFactory = useCallback((child) => React.cloneElement(child, { direction }), [direction]);
|
|
96
|
-
const wrappedSetIndex = useCallback((newIndex) => {
|
|
97
|
-
setDirection(newIndex > index ? "left" : "right");
|
|
98
|
-
setIndex(newIndex);
|
|
99
|
-
}, [index]);
|
|
100
|
-
const onSlide = useCallback((direction = "left") => {
|
|
101
|
-
setDirection(direction);
|
|
102
|
-
const i = index + (direction === "right" ? -1 : 1);
|
|
103
|
-
setIndex(i < 0 ? queue.length - 1 : i >= queue.length ? 0 : i);
|
|
104
|
-
}, [index, queue]);
|
|
105
|
-
const onPrevious = useCallback(() => onSlide("right"), [onSlide]);
|
|
106
|
-
const onNext = useCallback(() => onSlide("left"), [onSlide]);
|
|
107
|
-
const onWantToDismiss = () => setWantToDismiss(true);
|
|
108
|
-
const onCancelDismiss = () => setWantToDismiss(false);
|
|
109
|
-
const onMouseEnter = () => setPaused(true);
|
|
110
|
-
const onMouseLeave = () => setPaused(false);
|
|
111
|
-
useEffect(() => {
|
|
112
|
-
// Nb we pause automatic transitions when the mouse is within the carousel.
|
|
113
|
-
// Override passed timeout if lower than 1000ms
|
|
114
|
-
const _timeout = timeout < 1000 ? DEFAULT_TIMEOUT : timeout;
|
|
115
|
-
if (intervalRef.current)
|
|
116
|
-
clearInterval(intervalRef.current);
|
|
117
|
-
if (!paused)
|
|
118
|
-
intervalRef.current = setInterval(onSlide, _timeout);
|
|
119
|
-
}, [onSlide, paused, timeout]);
|
|
120
|
-
useEffect(() => {
|
|
121
|
-
if (isDismissed)
|
|
122
|
-
setWantToDismiss(false);
|
|
123
|
-
}, [isDismissed]);
|
|
124
|
-
if (!(queue === null || queue === void 0 ? void 0 : queue.length) || isDismissed)
|
|
125
|
-
return null;
|
|
126
|
-
return (React.createElement(CarouselWrapper, { id: "carousel", onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave }, wantToDismiss ? (React.createElement(DismissWrapper, null,
|
|
127
|
-
React.createElement(Text, { color: "neutral.c00", fontWeight: "medium", variant: "paragraph" }, dismissText),
|
|
128
|
-
React.createElement(Flex, { columnGap: 5 },
|
|
129
|
-
React.createElement(Button, { color: "neutral.c100", backgroundColor: "neutral.c00", onClick: onDismiss }, dismissConfirmText),
|
|
130
|
-
React.createElement(Button, { outline: true, color: "neutral.c00", backgroundColor: "neutral.c100", borderColor: "neutral.c00", onClick: onCancelDismiss }, dismissCancelText)))) : (React.createElement("div", null,
|
|
131
|
-
React.createElement(TransitionGroup, { component: null, childFactory: childFactory },
|
|
132
|
-
React.createElement(TransitionSlide, { key: index, direction: direction },
|
|
133
|
-
React.createElement(Slide, Object.assign({}, queue[index])))),
|
|
134
|
-
React.createElement(Close, { id: "carousel-dismiss", onClick: onWantToDismiss },
|
|
135
|
-
React.createElement(IconClose, { size: 18 })),
|
|
136
|
-
React.createElement(Bullets, { active: index + 1 }, queue.map((_, i) => (React.createElement("div", { key: `bullet_${i}`, onClick: () => wrappedSetIndex(i) })))),
|
|
137
|
-
React.createElement(Controllers, null,
|
|
138
|
-
React.createElement("div", { onClick: onPrevious },
|
|
139
|
-
React.createElement(IconLeft, { size: 20 })),
|
|
140
|
-
React.createElement("div", { onClick: onNext },
|
|
141
|
-
React.createElement(IconRight, { size: 20 })))))));
|
|
142
|
-
};
|
|
143
|
-
export default Carousel;
|
|
144
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/cards/Carousel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAEhE,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,IAAI,MAAM,mBAAmB,CAAC;AACrC,OAAO,KAA8B,MAAM,SAAS,CAAC;AAErD,OAAO,QAAQ,MAAM,gDAAgD,CAAC;AACtE,OAAO,SAAS,MAAM,iDAAiD,CAAC;AACxE,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;gBAQlB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI;CAC/C,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;;;WAGrB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;YACpB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;gBACjB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;WAC1B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAA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E,EAAE,GAAI,CACjB;QAER,oBAAC,OAAO,IAAC,MAAM,EAAE,KAAK,GAAG,CAAC,IACvB,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACnB,6BAAK,GAAG,EAAE,UAAU,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,GAAI,CAC/D,CAAC,CACM;QAEV,oBAAC,WAAW;YACV,6BAAK,OAAO,EAAE,UAAU;gBACtB,oBAAC,QAAQ,IAAC,IAAI,EAAE,EAAE,GAAI,CAClB;YACN,6BAAK,OAAO,EAAE,MAAM;gBAClB,oBAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,CACnB,CACM,CACV,CACP,CACe,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as Carousel } from "./Carousel";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|