@ledgerhq/react-ui 0.14.14 → 0.14.15-new-wc-test.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/CryptoIcons.stories.js +2 -4
- package/lib/cjs/components/asorted/Icon/CryptoIcons.stories.js.map +2 -2
- package/lib/cjs/components/asorted/Icon/Icons.stories.js +2 -48
- package/lib/cjs/components/asorted/Icon/Icons.stories.js.map +2 -2
- 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 +8 -3
- 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
|
@@ -0,0 +1,47 @@
|
|
|
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 variantDefault_exports = {};
|
|
30
|
+
__export(variantDefault_exports, {
|
|
31
|
+
default: () => variantDefault_default
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(variantDefault_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
+
var import_Pagination = __toESM(require("./Pagination"));
|
|
37
|
+
const FooterContainer = import_styled_components.default.div`
|
|
38
|
+
height: 32px;
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
align-items: center;
|
|
42
|
+
`;
|
|
43
|
+
const FooterDefault = (props) => {
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement(FooterContainer, null, /* @__PURE__ */ import_react.default.createElement(import_Pagination.default, { ...props }));
|
|
45
|
+
};
|
|
46
|
+
var variantDefault_default = FooterDefault;
|
|
47
|
+
//# sourceMappingURL=variantDefault.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/components/layout/Carousel/Footer/variantDefault.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport styled from \"styled-components\";\nimport Pagination from \"./Pagination\";\nimport { SubProps } from \"../types\";\n\nconst FooterContainer = styled.div`\n height: 32px;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nconst FooterDefault = (props: SubProps) => {\n return (\n <FooterContainer>\n <Pagination {...props} />\n </FooterContainer>\n );\n};\n\nexport default FooterDefault;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,+BAAmB;AACnB,wBAAuB;AAGvB,MAAM,kBAAkB,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAO/B,MAAM,gBAAgB,CAAC,UAAoB;AACzC,SACE,6BAAAC,QAAA,cAAC,uBACC,6BAAAA,QAAA,cAAC,kBAAAC,SAAA,EAAY,GAAG,OAAO,CACzB;AAEJ;AAEA,IAAO,yBAAQ;",
|
|
6
|
+
"names": ["styled", "React", "Pagination"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
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_embla_carousel_react = __toESM(require("embla-carousel-react"));
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
var import_Footer = __toESM(require("./Footer"));
|
|
38
|
+
const Embla = import_styled_components.default.div`
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
`;
|
|
41
|
+
const EmblaContainer = import_styled_components.default.div`
|
|
42
|
+
display: flex;
|
|
43
|
+
`;
|
|
44
|
+
const EmblaSlide = import_styled_components.default.div`
|
|
45
|
+
flex: 0 0 100%;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
`;
|
|
48
|
+
const Carousel = ({ children, variant = "default" }) => {
|
|
49
|
+
const [currentIndex, setCurrentIndex] = (0, import_react.useState)(0);
|
|
50
|
+
const [emblaRef, emblaApi] = (0, import_embla_carousel_react.default)({ loop: true });
|
|
51
|
+
const updateIndex = (0, import_react.useCallback)(() => {
|
|
52
|
+
if (!emblaApi)
|
|
53
|
+
return;
|
|
54
|
+
const newIndex = emblaApi.selectedScrollSnap();
|
|
55
|
+
setCurrentIndex(newIndex);
|
|
56
|
+
emblaApi.scrollTo(newIndex);
|
|
57
|
+
}, [emblaApi]);
|
|
58
|
+
(0, import_react.useEffect)(() => {
|
|
59
|
+
if (!emblaApi)
|
|
60
|
+
return;
|
|
61
|
+
updateIndex();
|
|
62
|
+
emblaApi.on("select", updateIndex);
|
|
63
|
+
emblaApi.on("reInit", updateIndex);
|
|
64
|
+
}, [emblaApi, updateIndex]);
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement("div", null, /* @__PURE__ */ import_react.default.createElement(Embla, { ref: emblaRef }, /* @__PURE__ */ import_react.default.createElement(EmblaContainer, null, children.map((child) => /* @__PURE__ */ import_react.default.createElement(EmblaSlide, { key: child.key }, child)))), /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_Footer.default,
|
|
67
|
+
{
|
|
68
|
+
children,
|
|
69
|
+
variant,
|
|
70
|
+
emblaApi,
|
|
71
|
+
currentIndex
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
};
|
|
75
|
+
var Carousel_default = Carousel;
|
|
76
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/layout/Carousel/index.tsx"],
|
|
4
|
+
"sourcesContent": ["import useEmblaCarousel from \"embla-carousel-react\";\nimport React, { useCallback, useEffect, useState } from \"react\";\nimport styled from \"styled-components\";\nimport Footer from \"./Footer\";\nimport { Props } from \"./types\";\n\nconst Embla = styled.div`\n overflow: hidden;\n`;\n\nconst EmblaContainer = styled.div`\n display: flex;\n`;\n\nconst EmblaSlide = styled.div`\n flex: 0 0 100%;\n min-width: 0;\n`;\n\n/**\n * This component uses the https://github.com/davidjerleke/embla-carousel library.\n */\nconst Carousel = ({ children, variant = \"default\" }: Props) => {\n const [currentIndex, setCurrentIndex] = useState(0);\n const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true });\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 // When the selected scroll snap changes\n emblaApi.on(\"select\", updateIndex);\n\n // When `reInit` is called or when window is resized\n emblaApi.on(\"reInit\", updateIndex);\n }, [emblaApi, updateIndex]);\n\n return (\n <div>\n <Embla ref={emblaRef}>\n <EmblaContainer>\n {children.map(child => (\n <EmblaSlide key={child.key}>{child}</EmblaSlide>\n ))}\n </EmblaContainer>\n </Embla>\n\n <Footer\n children={children}\n variant={variant}\n emblaApi={emblaApi}\n currentIndex={currentIndex}\n />\n </div>\n );\n};\nexport default Carousel;\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAA6B;AAC7B,mBAAwD;AACxD,+BAAmB;AACnB,oBAAmB;AAGnB,MAAM,QAAQ,yBAAAA,QAAO;AAAA;AAAA;AAIrB,MAAM,iBAAiB,yBAAAA,QAAO;AAAA;AAAA;AAI9B,MAAM,aAAa,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAQ1B,MAAM,WAAW,CAAC,EAAE,UAAU,UAAU,UAAU,MAAa;AAC7D,QAAM,CAAC,cAAc,eAAe,QAAI,uBAAS,CAAC;AAClD,QAAM,CAAC,UAAU,QAAQ,QAAI,4BAAAC,SAAiB,EAAE,MAAM,KAAK,CAAC;AAE5D,QAAM,kBAAc,0BAAY,MAAM;AACpC,QAAI,CAAC;AAAU;AAEf,UAAM,WAAW,SAAS,mBAAmB;AAC7C,oBAAgB,QAAQ;AACxB,aAAS,SAAS,QAAQ;AAAA,EAC5B,GAAG,CAAC,QAAQ,CAAC;AAEb,8BAAU,MAAM;AACd,QAAI,CAAC;AAAU;AAGf,gBAAY;AAGZ,aAAS,GAAG,UAAU,WAAW;AAGjC,aAAS,GAAG,UAAU,WAAW;AAAA,EACnC,GAAG,CAAC,UAAU,WAAW,CAAC;AAE1B,SACE,6BAAAC,QAAA,cAAC,aACC,6BAAAA,QAAA,cAAC,SAAM,KAAK,YACV,6BAAAA,QAAA,cAAC,sBACE,SAAS,IAAI,WACZ,6BAAAA,QAAA,cAAC,cAAW,KAAK,MAAM,OAAM,KAAM,CACpC,CACH,CACF,GAEA,6BAAAA,QAAA;AAAA,IAAC,cAAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA;AAAA,EACF,CACF;AAEJ;AACA,IAAO,mBAAQ;",
|
|
6
|
+
"names": ["styled", "useEmblaCarousel", "React", "Footer"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/components/layout/Carousel/types.tsx"],
|
|
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 variant?: Variant;\n};\n\n/**\n * Carousel's sub props to be passed to any component used by the carousel..\n */\nexport type SubProps = Required<Props> & {\n emblaApi: UseEmblaCarouselType[1];\n currentIndex: number;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
var layout_exports = {};
|
|
30
30
|
__export(layout_exports, {
|
|
31
31
|
Box: () => import_Box.default,
|
|
32
|
+
Carousel: () => import_Carousel.default,
|
|
32
33
|
Drawer: () => import_Drawer.default,
|
|
33
34
|
Flex: () => import_Flex.default,
|
|
34
35
|
Grid: () => import_Grid.default,
|
|
@@ -43,5 +44,6 @@ var import_Grid = __toESM(require("./Grid"));
|
|
|
43
44
|
var import_Popin = __toESM(require("./Popin"));
|
|
44
45
|
var import_Side = __toESM(require("./Side"));
|
|
45
46
|
var import_Drawer = __toESM(require("./Drawer"));
|
|
47
|
+
var import_Carousel = __toESM(require("./Carousel"));
|
|
46
48
|
var import_VerticalTimeline = __toESM(require("./List/VerticalTimeline"));
|
|
47
49
|
//# 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 VerticalTimeline } from \"./List/VerticalTimeline\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;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,8BAA4C;",
|
|
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\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;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;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { animated, useSpring } from "react-spring";
|
|
3
|
+
import { useTheme } from "styled-components";
|
|
4
|
+
import { ItemStatus } from "./types";
|
|
5
|
+
const defaultBulletStyle = {
|
|
6
|
+
height: "6px",
|
|
7
|
+
borderRadius: "1000px",
|
|
8
|
+
marginRight: "4px",
|
|
9
|
+
opacity: 1,
|
|
10
|
+
};
|
|
11
|
+
const useBulletStyles = () => {
|
|
12
|
+
const { colors } = useTheme();
|
|
13
|
+
const BulletStyle = {
|
|
14
|
+
[ItemStatus.active]: Object.assign(Object.assign({}, defaultBulletStyle), { width: "16px", backgroundColor: colors.opacityDefault.c80 }),
|
|
15
|
+
[ItemStatus.nearby]: Object.assign(Object.assign({}, defaultBulletStyle), { width: "8px", backgroundColor: colors.opacityDefault.c30 }),
|
|
16
|
+
[ItemStatus.far]: Object.assign(Object.assign({}, defaultBulletStyle), { width: "4px", backgroundColor: colors.opacityDefault.c10 }),
|
|
17
|
+
[ItemStatus.none]: Object.assign(Object.assign({}, defaultBulletStyle), { width: "0px", opacity: 0, backgroundColor: colors.opacityDefault.c10, marginRight: "0px" }),
|
|
18
|
+
};
|
|
19
|
+
return BulletStyle;
|
|
20
|
+
};
|
|
21
|
+
const Bullet = ({ type }) => {
|
|
22
|
+
return React.createElement(animated.div, { style: useSpring(useBulletStyles()[type]) });
|
|
23
|
+
};
|
|
24
|
+
export default Bullet;
|
|
25
|
+
//# sourceMappingURL=bullets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bullets.js","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/bullets.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE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|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import Bullet from "./bullets";
|
|
4
|
+
import { getItemStatus } from "./utils";
|
|
5
|
+
const FooterCarouselBullets = styled.div `
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
`;
|
|
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) })))));
|
|
11
|
+
};
|
|
12
|
+
export default Pagination;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,CACrE,CAAC,CACoB,CACzB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var ItemStatus;
|
|
2
|
+
(function (ItemStatus) {
|
|
3
|
+
ItemStatus[ItemStatus["active"] = 0] = "active";
|
|
4
|
+
ItemStatus[ItemStatus["nearby"] = 1] = "nearby";
|
|
5
|
+
ItemStatus[ItemStatus["far"] = 2] = "far";
|
|
6
|
+
ItemStatus[ItemStatus["none"] = 3] = "none";
|
|
7
|
+
})(ItemStatus || (ItemStatus = {}));
|
|
8
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/components/layout/Carousel/Footer/Pagination/types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAKX;AALD,WAAY,UAAU;IACpB,+CAAQ,CAAA;IACR,+CAAQ,CAAA;IACR,yCAAK,CAAA;IACL,2CAAM,CAAA;AACR,CAAC,EALW,UAAU,KAAV,UAAU,QAKrB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ItemStatus } from "./types";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the status of an indexed item from the carousel index.
|
|
4
|
+
*/
|
|
5
|
+
export const getItemStatus = (itemIndex, activeIndex) => {
|
|
6
|
+
const itemDistanceFromActiveIndex = Math.abs(itemIndex - activeIndex);
|
|
7
|
+
switch (itemDistanceFromActiveIndex) {
|
|
8
|
+
case 0:
|
|
9
|
+
return ItemStatus.active;
|
|
10
|
+
case 1:
|
|
11
|
+
return ItemStatus.nearby;
|
|
12
|
+
case 2:
|
|
13
|
+
return ItemStatus.far;
|
|
14
|
+
default:
|
|
15
|
+
return ItemStatus.none;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +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;IACtE,MAAM,2BAA2B,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,GAAG,WAAW,CAAC,CAAC;IAEtE,QAAQ,2BAA2B,EAAE;QACnC,KAAK,CAAC;YACJ,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,KAAK,CAAC;YACJ,OAAO,UAAU,CAAC,MAAM,CAAC;QAC3B,KAAK,CAAC;YACJ,OAAO,UAAU,CAAC,GAAG,CAAC;QACxB;YACE,OAAO,UAAU,CAAC,IAAI,CAAC;KAC1B;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import FooterContentCard from "./variantContentCard";
|
|
3
|
+
import FooterDefault from "./variantDefault";
|
|
4
|
+
const Footers = {
|
|
5
|
+
"content-card": FooterContentCard,
|
|
6
|
+
default: FooterDefault,
|
|
7
|
+
};
|
|
8
|
+
const Footer = (props) => {
|
|
9
|
+
const Component = Footers[props.variant];
|
|
10
|
+
return React.createElement(Component, Object.assign({}, props));
|
|
11
|
+
};
|
|
12
|
+
export default Footer;
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ArrowLeft, ArrowRight } from "@ledgerhq/icons-ui/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import Pagination from "./Pagination";
|
|
5
|
+
const FooterContainer = styled.div `
|
|
6
|
+
height: 32px;
|
|
7
|
+
border-top: 1px solid ${p => p.theme.colors.opacityDefault.c10};
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
padding: 6px 16px 6px 16px;
|
|
11
|
+
`;
|
|
12
|
+
const FooterArrowsContainer = styled.div `
|
|
13
|
+
display: flex;
|
|
14
|
+
gap: 8px;
|
|
15
|
+
align-items: center;
|
|
16
|
+
`;
|
|
17
|
+
const FooterArrowContainer = styled.div `
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
`;
|
|
22
|
+
const FooterContentCard = ({ children, emblaApi, currentIndex, variant }) => {
|
|
23
|
+
if (children.length === 1)
|
|
24
|
+
return null;
|
|
25
|
+
return (React.createElement(FooterContainer, null,
|
|
26
|
+
React.createElement(Pagination, { variant: variant, children: children, emblaApi: emblaApi, currentIndex: currentIndex }),
|
|
27
|
+
React.createElement(FooterArrowsContainer, null,
|
|
28
|
+
React.createElement(FooterArrowContainer, { onClick: () => emblaApi === null || emblaApi === void 0 ? void 0 : emblaApi.scrollPrev() },
|
|
29
|
+
React.createElement(ArrowLeft, { size: "S" })),
|
|
30
|
+
React.createElement(FooterArrowContainer, { onClick: () => emblaApi === null || emblaApi === void 0 ? void 0 : emblaApi.scrollNext() },
|
|
31
|
+
React.createElement(ArrowRight, { size: "S" })))));
|
|
32
|
+
};
|
|
33
|
+
export default FooterContentCard;
|
|
34
|
+
//# sourceMappingURL=variantContentCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variantContentCard.js","sourceRoot":"","sources":["../../../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,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import Pagination from "./Pagination";
|
|
4
|
+
const FooterContainer = styled.div `
|
|
5
|
+
height: 32px;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
`;
|
|
10
|
+
const FooterDefault = (props) => {
|
|
11
|
+
return (React.createElement(FooterContainer, null,
|
|
12
|
+
React.createElement(Pagination, Object.assign({}, props))));
|
|
13
|
+
};
|
|
14
|
+
export default FooterDefault;
|
|
15
|
+
//# sourceMappingURL=variantDefault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"variantDefault.js","sourceRoot":"","sources":["../../../../../src/components/layout/Carousel/Footer/variantDefault.tsx"],"names":[],"mappings":"AAAA,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;;;;;CAKjC,CAAC;AAEF,MAAM,aAAa,GAAG,CAAC,KAAe,EAAE,EAAE;IACxC,OAAO,CACL,oBAAC,eAAe;QACd,oBAAC,UAAU,oBAAK,KAAK,EAAI,CACT,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import useEmblaCarousel from "embla-carousel-react";
|
|
2
|
+
import React, { useCallback, useEffect, useState } from "react";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import Footer from "./Footer";
|
|
5
|
+
const Embla = styled.div `
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
`;
|
|
8
|
+
const EmblaContainer = styled.div `
|
|
9
|
+
display: flex;
|
|
10
|
+
`;
|
|
11
|
+
const EmblaSlide = styled.div `
|
|
12
|
+
flex: 0 0 100%;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
`;
|
|
15
|
+
/**
|
|
16
|
+
* This component uses the https://github.com/davidjerleke/embla-carousel library.
|
|
17
|
+
*/
|
|
18
|
+
const Carousel = ({ children, variant = "default" }) => {
|
|
19
|
+
const [currentIndex, setCurrentIndex] = useState(0);
|
|
20
|
+
const [emblaRef, emblaApi] = useEmblaCarousel({ loop: true });
|
|
21
|
+
const updateIndex = useCallback(() => {
|
|
22
|
+
if (!emblaApi)
|
|
23
|
+
return;
|
|
24
|
+
const newIndex = emblaApi.selectedScrollSnap();
|
|
25
|
+
setCurrentIndex(newIndex);
|
|
26
|
+
emblaApi.scrollTo(newIndex);
|
|
27
|
+
}, [emblaApi]);
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!emblaApi)
|
|
30
|
+
return;
|
|
31
|
+
// Initial call to update carousel index
|
|
32
|
+
updateIndex();
|
|
33
|
+
// When the selected scroll snap changes
|
|
34
|
+
emblaApi.on("select", updateIndex);
|
|
35
|
+
// When `reInit` is called or when window is resized
|
|
36
|
+
emblaApi.on("reInit", updateIndex);
|
|
37
|
+
}, [emblaApi, updateIndex]);
|
|
38
|
+
return (React.createElement("div", null,
|
|
39
|
+
React.createElement(Embla, { ref: emblaRef },
|
|
40
|
+
React.createElement(EmblaContainer, null, children.map(child => (React.createElement(EmblaSlide, { key: child.key }, child))))),
|
|
41
|
+
React.createElement(Footer, { children: children, variant: variant, emblaApi: emblaApi, currentIndex: currentIndex })));
|
|
42
|
+
};
|
|
43
|
+
export default Carousel;
|
|
44
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,OA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;YAClB,oBAAC,cAAc,QACZ,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CACrB,oBAAC,UAAU,IAAC,GAAG,EAAE,KAAK,CAAC,GAAG,IAAG,KAAK,CAAc,CACjD,CAAC,CACa,CACX;QAER,oBAAC,MAAM,IACL,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,GAC1B,CACE,CACP,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { UseEmblaCarouselType } from "embla-carousel-react";
|
|
3
|
+
export type Variant = "content-card" | "default";
|
|
4
|
+
export type Props = {
|
|
5
|
+
children: ReactElement[];
|
|
6
|
+
variant?: Variant;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Carousel's sub props to be passed to any component used by the carousel..
|
|
10
|
+
*/
|
|
11
|
+
export type SubProps = Required<Props> & {
|
|
12
|
+
emblaApi: UseEmblaCarouselType[1];
|
|
13
|
+
currentIndex: number;
|
|
14
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/layout/Carousel/types.tsx"],"names":[],"mappings":""}
|
|
@@ -4,4 +4,5 @@ export { default as Grid } from "./Grid";
|
|
|
4
4
|
export { default as Popin } from "./Popin";
|
|
5
5
|
export { default as Side } from "./Side";
|
|
6
6
|
export { default as Drawer } from "./Drawer";
|
|
7
|
+
export { default as Carousel } from "./Carousel";
|
|
7
8
|
export { default as VerticalTimeline } from "./List/VerticalTimeline";
|
|
@@ -4,5 +4,6 @@ export { default as Grid } from "./Grid";
|
|
|
4
4
|
export { default as Popin } from "./Popin";
|
|
5
5
|
export { default as Side } from "./Side";
|
|
6
6
|
export { default as Drawer } from "./Drawer";
|
|
7
|
+
export { default as Carousel } from "./Carousel";
|
|
7
8
|
export { default as VerticalTimeline } from "./List/VerticalTimeline";
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/layout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,GAAG,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,yBAAyB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/react-ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.15-new-wc-test.0",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Live Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": {
|
|
@@ -61,15 +61,17 @@
|
|
|
61
61
|
"chart.js": "^3.5.1",
|
|
62
62
|
"chartjs-adapter-moment": "^1.0.0",
|
|
63
63
|
"color": "^4.0.0",
|
|
64
|
+
"embla-carousel-react": "8.0.0-rc17",
|
|
64
65
|
"moment": "^2.29.1",
|
|
65
66
|
"react-chartjs-2": "^3.3.0",
|
|
66
67
|
"react-is": "^17.0.2",
|
|
67
68
|
"react-select": "^5.2.1",
|
|
69
|
+
"react-spring": "8.0.27",
|
|
68
70
|
"react-transition-group": "^4.4.2",
|
|
69
71
|
"react-window": "^1.8.6",
|
|
70
72
|
"styled-system": "^5.1.5",
|
|
71
|
-
"@ledgerhq/crypto-icons-ui": "^1.0.
|
|
72
|
-
"@ledgerhq/icons-ui": "^0.6.
|
|
73
|
+
"@ledgerhq/crypto-icons-ui": "^1.1.0-new-wc-test.0",
|
|
74
|
+
"@ledgerhq/icons-ui": "^0.6.3-new-wc-test.0",
|
|
73
75
|
"@ledgerhq/ui-shared": "^0.2.1"
|
|
74
76
|
},
|
|
75
77
|
"peerDependencies": {
|
|
@@ -87,6 +89,8 @@
|
|
|
87
89
|
"@storybook/addon-links": "^7.5.3",
|
|
88
90
|
"@storybook/react": "^7.5.3",
|
|
89
91
|
"@storybook/react-webpack5": "^7.5.3",
|
|
92
|
+
"@storybook/blocks": "^7.5.3",
|
|
93
|
+
"@storybook/manager-api": "7.5.3",
|
|
90
94
|
"@svgr/core": "^5.5.0",
|
|
91
95
|
"@svgr/plugin-svgo": "*",
|
|
92
96
|
"@types/color": "^3.0.2",
|
|
@@ -100,6 +104,7 @@
|
|
|
100
104
|
"@types/styled-system": "^5.1.12",
|
|
101
105
|
"babel-loader": "^8.0.0",
|
|
102
106
|
"csstype": "^3.0.11",
|
|
107
|
+
"embla-carousel": "8.0.0-rc17",
|
|
103
108
|
"esbuild": "^0.19.0",
|
|
104
109
|
"eslint-plugin-react": "^7.33.2",
|
|
105
110
|
"eslint-plugin-react-hooks": "^4.6.0",
|