@ledgerhq/react-ui 0.23.0 → 0.23.1-nightly.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.js +100 -0
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.stories.js +45 -0
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.js +50 -0
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.stories.js +62 -0
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.js +54 -0
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.js.map +7 -0
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js +70 -0
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/index.js +3 -0
- package/lib/cjs/pre-ldls/components/index.js.map +2 -2
- package/lib/cjs/pre-ldls/libs/index.js +13 -3
- package/lib/cjs/pre-ldls/libs/index.js.map +2 -2
- package/lib/pre-ldls/components/AssetItem/AssetItem.d.ts +11 -0
- package/lib/pre-ldls/components/AssetItem/AssetItem.d.ts.map +1 -0
- package/lib/pre-ldls/components/AssetItem/AssetItem.js +43 -0
- package/lib/pre-ldls/components/AssetItem/AssetItem.js.map +1 -0
- package/lib/pre-ldls/components/AssetList/AssetList.d.ts +7 -0
- package/lib/pre-ldls/components/AssetList/AssetList.d.ts.map +1 -0
- package/lib/pre-ldls/components/AssetList/AssetList.js +7 -0
- package/lib/pre-ldls/components/AssetList/AssetList.js.map +1 -0
- package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts +7 -0
- package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts.map +1 -0
- package/lib/pre-ldls/components/VirtualList/VirtualList.js +7 -0
- package/lib/pre-ldls/components/VirtualList/VirtualList.js.map +1 -0
- package/lib/pre-ldls/components/index.d.ts +3 -0
- package/lib/pre-ldls/components/index.d.ts.map +1 -1
- package/lib/pre-ldls/components/index.js +3 -0
- package/lib/pre-ldls/components/index.js.map +1 -1
- package/lib/pre-ldls/libs/index.d.ts +2 -2
- package/lib/pre-ldls/libs/index.d.ts.map +1 -1
- package/lib/pre-ldls/libs/index.js +14 -3
- package/lib/pre-ldls/libs/index.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,100 @@
|
|
|
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 AssetItem_exports = {};
|
|
30
|
+
__export(AssetItem_exports, {
|
|
31
|
+
AssetItem: () => AssetItem
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(AssetItem_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
36
|
+
var import_libs = require("../../libs");
|
|
37
|
+
var import_components = require("../../../components");
|
|
38
|
+
const TempAssetBadge = () => (
|
|
39
|
+
// TODO: To be replaced with LIVE-18221
|
|
40
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex", alignItems: "center" } }, /* @__PURE__ */ import_react.default.createElement(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
style: {
|
|
44
|
+
height: 48,
|
|
45
|
+
width: 48,
|
|
46
|
+
borderRadius: 48,
|
|
47
|
+
backgroundColor: "grey",
|
|
48
|
+
display: "inline-block"
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
))
|
|
52
|
+
);
|
|
53
|
+
const Wrapper = import_styled_components.default.div`
|
|
54
|
+
${(0, import_libs.withTokens)(
|
|
55
|
+
"spacing-xs",
|
|
56
|
+
"marging-s",
|
|
57
|
+
"colors-content-subdued-default-default",
|
|
58
|
+
"colors-content-default-default",
|
|
59
|
+
"colors-surface-transparent-hover",
|
|
60
|
+
"colors-surface-transparent-pressed"
|
|
61
|
+
)}
|
|
62
|
+
|
|
63
|
+
display: flex;
|
|
64
|
+
padding: var(--spacing-xs);
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
|
|
67
|
+
:hover {
|
|
68
|
+
background-color: var(--colors-surface-transparent-hover);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:active {
|
|
72
|
+
background-color: var(--colors-surface-transparent-pressed);
|
|
73
|
+
}
|
|
74
|
+
`;
|
|
75
|
+
const InfoWrapper = import_styled_components.default.div`
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
margin-left: var(--marging-s);
|
|
80
|
+
`;
|
|
81
|
+
const AssetItem = ({ name, ticker, onClick }) => {
|
|
82
|
+
return /* @__PURE__ */ import_react.default.createElement(Wrapper, { onClick: () => onClick({ name, ticker }) }, /* @__PURE__ */ import_react.default.createElement(TempAssetBadge, null), /* @__PURE__ */ import_react.default.createElement(InfoWrapper, null, /* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
import_components.Text,
|
|
84
|
+
{
|
|
85
|
+
variant: "largeLineHeight",
|
|
86
|
+
fontWeight: "semiBold",
|
|
87
|
+
color: "var(--colors-content-default-default)"
|
|
88
|
+
},
|
|
89
|
+
name
|
|
90
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
91
|
+
import_components.Text,
|
|
92
|
+
{
|
|
93
|
+
variant: "bodyLineHeight",
|
|
94
|
+
fontWeight: "semiBold",
|
|
95
|
+
color: "var(--colors-content-subdued-default-default)"
|
|
96
|
+
},
|
|
97
|
+
ticker
|
|
98
|
+
)));
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=AssetItem.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/AssetItem/AssetItem.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport styled from \"styled-components\";\nimport { withTokens } from \"../../libs\";\nimport { Text } from \"../../../components\";\n\nexport type AssetType = {\n name: string;\n ticker: string;\n};\n\ntype AssetItemProps = AssetType & {\n onClick: (asset: AssetType) => void;\n};\n\nconst TempAssetBadge = () => (\n // TODO: To be replaced with LIVE-18221\n <div style={{ display: \"flex\", alignItems: \"center\" }}>\n <span\n style={{\n height: 48,\n width: 48,\n borderRadius: 48,\n backgroundColor: \"grey\",\n display: \"inline-block\",\n }}\n />\n </div>\n);\n\nconst Wrapper = styled.div`\n ${withTokens(\n \"spacing-xs\",\n \"marging-s\",\n \"colors-content-subdued-default-default\",\n \"colors-content-default-default\",\n \"colors-surface-transparent-hover\",\n \"colors-surface-transparent-pressed\",\n )}\n\n display: flex;\n padding: var(--spacing-xs);\n cursor: pointer;\n\n :hover {\n background-color: var(--colors-surface-transparent-hover);\n }\n\n :active {\n background-color: var(--colors-surface-transparent-pressed);\n }\n`;\n\nconst InfoWrapper = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin-left: var(--marging-s);\n`;\n\nexport const AssetItem = ({ name, ticker, onClick }: AssetItemProps) => {\n return (\n <Wrapper onClick={() => onClick({ name, ticker })}>\n <TempAssetBadge />\n <InfoWrapper>\n <Text\n variant=\"largeLineHeight\"\n fontWeight=\"semiBold\"\n color=\"var(--colors-content-default-default)\"\n >\n {name}\n </Text>\n <Text\n variant=\"bodyLineHeight\"\n fontWeight=\"semiBold\"\n color=\"var(--colors-content-subdued-default-default)\"\n >\n {ticker}\n </Text>\n </InfoWrapper>\n </Wrapper>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,+BAAmB;AACnB,kBAA2B;AAC3B,wBAAqB;AAWrB,MAAM,iBAAiB;AAAA;AAAA,EAErB,6BAAAA,QAAA,cAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,YAAY,SAAS,KAClD,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,OAAO;AAAA,QACP,cAAc;AAAA,QACd,iBAAiB;AAAA,QACjB,SAAS;AAAA,MACX;AAAA;AAAA,EACF,CACF;AAAA;AAGF,MAAM,UAAU,yBAAAC,QAAO;AAAA,QACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeH,MAAM,cAAc,yBAAAA,QAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAOpB,MAAM,YAAY,CAAC,EAAE,MAAM,QAAQ,QAAQ,MAAsB;AACtE,SACE,6BAAAD,QAAA,cAAC,WAAQ,SAAS,MAAM,QAAQ,EAAE,MAAM,OAAO,CAAC,KAC9C,6BAAAA,QAAA,cAAC,oBAAe,GAChB,6BAAAA,QAAA,cAAC,mBACC,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,YAAW;AAAA,MACX,OAAM;AAAA;AAAA,IAEL;AAAA,EACH,GACA,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,YAAW;AAAA,MACX,OAAM;AAAA;AAAA,IAEL;AAAA,EACH,CACF,CACF;AAEJ;",
|
|
6
|
+
"names": ["React", "styled"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var AssetItem_stories_exports = {};
|
|
20
|
+
__export(AssetItem_stories_exports, {
|
|
21
|
+
Default: () => Default,
|
|
22
|
+
TestAssetItem: () => TestAssetItem,
|
|
23
|
+
default: () => AssetItem_stories_default
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(AssetItem_stories_exports);
|
|
26
|
+
var import_AssetItem = require("./AssetItem");
|
|
27
|
+
var import_test = require("@storybook/test");
|
|
28
|
+
const meta = {
|
|
29
|
+
component: import_AssetItem.AssetItem,
|
|
30
|
+
title: "PreLdls/Components/AssetItem",
|
|
31
|
+
tags: ["autodocs"],
|
|
32
|
+
args: { name: "Bitcoin", ticker: "BTC" }
|
|
33
|
+
};
|
|
34
|
+
var AssetItem_stories_default = meta;
|
|
35
|
+
const Default = {};
|
|
36
|
+
const TestAssetItem = {
|
|
37
|
+
play: async ({ canvasElement }) => {
|
|
38
|
+
const canvas = (0, import_test.within)(canvasElement);
|
|
39
|
+
const name = canvas.getByText("Bitcoin");
|
|
40
|
+
const ticker = canvas.getByText("BTC");
|
|
41
|
+
await (0, import_test.expect)(name).toBeInTheDocument();
|
|
42
|
+
await (0, import_test.expect)(ticker).toBeInTheDocument();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=AssetItem.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/AssetItem/AssetItem.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { AssetItem } from \"./AssetItem\";\nimport { expect, within } from \"@storybook/test\";\n\nconst meta: Meta<typeof AssetItem> = {\n component: AssetItem,\n title: \"PreLdls/Components/AssetItem\",\n tags: [\"autodocs\"],\n args: { name: \"Bitcoin\", ticker: \"BTC\" },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof AssetItem>;\n\nexport const Default: Story = {};\n\nexport const TestAssetItem: Story = {\n play: async ({ canvasElement }) => {\n const canvas = within(canvasElement);\n\n const name = canvas.getByText(\"Bitcoin\");\n const ticker = canvas.getByText(\"BTC\");\n\n await expect(name).toBeInTheDocument();\n await expect(ticker).toBeInTheDocument();\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAA0B;AAC1B,kBAA+B;AAE/B,MAAM,OAA+B;AAAA,EACnC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM,EAAE,MAAM,WAAW,QAAQ,MAAM;AACzC;AACA,IAAO,4BAAQ;AAIR,MAAM,UAAiB,CAAC;AAExB,MAAM,gBAAuB;AAAA,EAClC,MAAM,OAAO,EAAE,cAAc,MAAM;AACjC,UAAM,aAAS,oBAAO,aAAa;AAEnC,UAAM,OAAO,OAAO,UAAU,SAAS;AACvC,UAAM,SAAS,OAAO,UAAU,KAAK;AAErC,cAAM,oBAAO,IAAI,EAAE,kBAAkB;AACrC,cAAM,oBAAO,MAAM,EAAE,kBAAkB;AAAA,EACzC;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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 AssetList_exports = {};
|
|
30
|
+
__export(AssetList_exports, {
|
|
31
|
+
AssetList: () => AssetList
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(AssetList_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_AssetItem = require("../AssetItem/AssetItem");
|
|
36
|
+
var import_VirtualList = require("../VirtualList/VirtualList");
|
|
37
|
+
const AssetList = ({
|
|
38
|
+
assets,
|
|
39
|
+
onClick
|
|
40
|
+
}) => {
|
|
41
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
42
|
+
import_VirtualList.VirtualList,
|
|
43
|
+
{
|
|
44
|
+
itemHeight: 64,
|
|
45
|
+
count: assets.length,
|
|
46
|
+
renderItem: (i) => /* @__PURE__ */ import_react.default.createElement(import_AssetItem.AssetItem, { name: assets[i].name, ticker: assets[i].ticker, onClick })
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=AssetList.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport { AssetItem, AssetType } from \"../AssetItem/AssetItem\";\nimport { VirtualList } from \"../VirtualList/VirtualList\";\n\nexport const AssetList = ({\n assets,\n onClick,\n}: {\n assets: AssetType[];\n onClick: (asset: AssetType) => void;\n}) => {\n return (\n <VirtualList\n itemHeight={64}\n count={assets.length}\n renderItem={(i: number) => (\n <AssetItem name={assets[i].name} ticker={assets[i].ticker} onClick={onClick} />\n )}\n />\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,uBAAqC;AACrC,yBAA4B;AAErB,MAAM,YAAY,CAAC;AAAA,EACxB;AAAA,EACA;AACF,MAGM;AACJ,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,YAAY;AAAA,MACZ,OAAO,OAAO;AAAA,MACd,YAAY,CAAC,MACX,6BAAAA,QAAA,cAAC,8BAAU,MAAM,OAAO,CAAC,EAAE,MAAM,QAAQ,OAAO,CAAC,EAAE,QAAQ,SAAkB;AAAA;AAAA,EAEjF;AAEJ;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
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 AssetList_stories_exports = {};
|
|
30
|
+
__export(AssetList_stories_exports, {
|
|
31
|
+
Default: () => Default,
|
|
32
|
+
TestAssetClick: () => TestAssetClick,
|
|
33
|
+
default: () => AssetList_stories_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(AssetList_stories_exports);
|
|
36
|
+
var import_AssetList = require("./AssetList");
|
|
37
|
+
var import_test = require("@storybook/test");
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
const testFn = (0, import_test.fn)();
|
|
40
|
+
const meta = {
|
|
41
|
+
component: import_AssetList.AssetList,
|
|
42
|
+
decorators: [
|
|
43
|
+
(Story) => /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "400px" } }, /* @__PURE__ */ import_react.default.createElement(Story, null))
|
|
44
|
+
],
|
|
45
|
+
title: "PreLdls/Components/AssetList",
|
|
46
|
+
tags: ["autodocs"],
|
|
47
|
+
args: {
|
|
48
|
+
assets: Array.from({ length: 50 }).map((_, i) => ({ name: `Bitcoin ${i}`, ticker: "BTC" })),
|
|
49
|
+
onClick: testFn
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var AssetList_stories_default = meta;
|
|
53
|
+
const Default = {};
|
|
54
|
+
const TestAssetClick = {
|
|
55
|
+
play: async ({ canvasElement }) => {
|
|
56
|
+
const canvas = (0, import_test.within)(canvasElement);
|
|
57
|
+
const input = canvas.getByText("Bitcoin 1");
|
|
58
|
+
await import_test.userEvent.click(input);
|
|
59
|
+
await (0, import_test.expect)(testFn).toHaveBeenCalledWith({ name: "Bitcoin 1", ticker: "BTC" });
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=AssetList.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/AssetList/AssetList.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { AssetList } from \"./AssetList\";\nimport { expect, fn, userEvent, within } from \"@storybook/test\";\nimport React from \"react\";\n\nconst testFn = fn();\n\nconst meta: Meta<typeof AssetList> = {\n component: AssetList,\n decorators: [\n Story => (\n <div style={{ height: \"400px\" }}>\n <Story />\n </div>\n ),\n ],\n title: \"PreLdls/Components/AssetList\",\n tags: [\"autodocs\"],\n args: {\n assets: Array.from({ length: 50 }).map((_, i) => ({ name: `Bitcoin ${i}`, ticker: \"BTC\" })),\n onClick: testFn,\n },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof AssetList>;\n\nexport const Default: Story = {};\n\nexport const TestAssetClick: Story = {\n play: async ({ canvasElement }) => {\n const canvas = within(canvasElement);\n const input = canvas.getByText(\"Bitcoin 1\");\n await userEvent.click(input);\n await expect(testFn).toHaveBeenCalledWith({ name: \"Bitcoin 1\", ticker: \"BTC\" });\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,uBAA0B;AAC1B,kBAA8C;AAC9C,mBAAkB;AAElB,MAAM,aAAS,gBAAG;AAElB,MAAM,OAA+B;AAAA,EACnC,WAAW;AAAA,EACX,YAAY;AAAA,IACV,WACE,6BAAAA,QAAA,cAAC,SAAI,OAAO,EAAE,QAAQ,QAAQ,KAC5B,6BAAAA,QAAA,cAAC,WAAM,CACT;AAAA,EAEJ;AAAA,EACA,OAAO;AAAA,EACP,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM;AAAA,IACJ,QAAQ,MAAM,KAAK,EAAE,QAAQ,GAAG,CAAC,EAAE,IAAI,CAAC,GAAG,OAAO,EAAE,MAAM,WAAW,CAAC,IAAI,QAAQ,MAAM,EAAE;AAAA,IAC1F,SAAS;AAAA,EACX;AACF;AACA,IAAO,4BAAQ;AAIR,MAAM,UAAiB,CAAC;AAExB,MAAM,iBAAwB;AAAA,EACnC,MAAM,OAAO,EAAE,cAAc,MAAM;AACjC,UAAM,aAAS,oBAAO,aAAa;AACnC,UAAM,QAAQ,OAAO,UAAU,WAAW;AAC1C,UAAM,sBAAU,MAAM,KAAK;AAC3B,cAAM,oBAAO,MAAM,EAAE,qBAAqB,EAAE,MAAM,aAAa,QAAQ,MAAM,CAAC;AAAA,EAChF;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 VirtualList_exports = {};
|
|
30
|
+
__export(VirtualList_exports, {
|
|
31
|
+
VirtualList: () => VirtualList
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(VirtualList_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_react_window = require("react-window");
|
|
36
|
+
var import_react_virtualized_auto_sizer = __toESM(require("react-virtualized-auto-sizer"));
|
|
37
|
+
const VirtualList = ({
|
|
38
|
+
count,
|
|
39
|
+
itemHeight,
|
|
40
|
+
renderItem
|
|
41
|
+
}) => {
|
|
42
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react_virtualized_auto_sizer.default, { style: { height: "100%", width: "100%" } }, ({ height }) => /* @__PURE__ */ import_react.default.createElement(
|
|
43
|
+
import_react_window.FixedSizeList,
|
|
44
|
+
{
|
|
45
|
+
height,
|
|
46
|
+
itemCount: count,
|
|
47
|
+
itemSize: itemHeight,
|
|
48
|
+
layout: "vertical",
|
|
49
|
+
width: "100%"
|
|
50
|
+
},
|
|
51
|
+
({ index, style }) => /* @__PURE__ */ import_react.default.createElement("div", { style }, renderItem(index))
|
|
52
|
+
));
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=VirtualList.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],
|
|
4
|
+
"sourcesContent": ["import React, { ReactNode } from \"react\";\nimport { FixedSizeList as List } from \"react-window\";\nimport AutoSizer from \"react-virtualized-auto-sizer\";\n\nexport const VirtualList = ({\n count,\n itemHeight,\n renderItem,\n}: {\n count: number;\n itemHeight: number;\n renderItem: (index: number) => ReactNode;\n}) => {\n return (\n <AutoSizer style={{ height: \"100%\", width: \"100%\" }}>\n {({ height }: { height: number }) => (\n <List\n height={height}\n itemCount={count}\n itemSize={itemHeight}\n layout=\"vertical\"\n width=\"100%\"\n >\n {({ index, style }) => <div style={style}>{renderItem(index)}</div>}\n </List>\n )}\n </AutoSizer>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAiC;AACjC,0BAAsC;AACtC,0CAAsB;AAEf,MAAM,cAAc,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,SACE,6BAAAA,QAAA,cAAC,oCAAAC,SAAA,EAAU,OAAO,EAAE,QAAQ,QAAQ,OAAO,OAAO,KAC/C,CAAC,EAAE,OAAO,MACT,6BAAAD,QAAA;AAAA,IAAC,oBAAAE;AAAA,IAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,MACX,UAAU;AAAA,MACV,QAAO;AAAA,MACP,OAAM;AAAA;AAAA,IAEL,CAAC,EAAE,OAAO,MAAM,MAAM,6BAAAF,QAAA,cAAC,SAAI,SAAe,WAAW,KAAK,CAAE;AAAA,EAC/D,CAEJ;AAEJ;",
|
|
6
|
+
"names": ["React", "AutoSizer", "List"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
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 VirtualList_stories_exports = {};
|
|
30
|
+
__export(VirtualList_stories_exports, {
|
|
31
|
+
Default: () => Default,
|
|
32
|
+
TestVirtualList: () => TestVirtualList,
|
|
33
|
+
default: () => VirtualList_stories_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(VirtualList_stories_exports);
|
|
36
|
+
var import_react = __toESM(require("react"));
|
|
37
|
+
var import_VirtualList = require("./VirtualList");
|
|
38
|
+
var import_test = require("@storybook/test");
|
|
39
|
+
const meta = {
|
|
40
|
+
component: import_VirtualList.VirtualList,
|
|
41
|
+
decorators: [
|
|
42
|
+
(Story) => /* @__PURE__ */ import_react.default.createElement("div", { style: { height: "400px" } }, /* @__PURE__ */ import_react.default.createElement(Story, null))
|
|
43
|
+
],
|
|
44
|
+
title: "PreLdls/Components/VirtualList",
|
|
45
|
+
tags: ["autodocs"],
|
|
46
|
+
args: {
|
|
47
|
+
itemHeight: 64,
|
|
48
|
+
count: 50,
|
|
49
|
+
renderItem: (i) => /* @__PURE__ */ import_react.default.createElement("h1", { tabIndex: i }, "Item #", i)
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
var VirtualList_stories_default = meta;
|
|
53
|
+
const Default = {};
|
|
54
|
+
const TestVirtualList = {
|
|
55
|
+
play: async ({ canvasElement }) => {
|
|
56
|
+
const canvas = (0, import_test.within)(canvasElement);
|
|
57
|
+
const visible = canvas.getAllByText(/Item #/i);
|
|
58
|
+
const firstVisible = visible[0];
|
|
59
|
+
const lastVisible = visible[visible.length - 1];
|
|
60
|
+
await (0, import_test.expect)(visible.length).toBeLessThanOrEqual(10);
|
|
61
|
+
await (0, import_test.expect)(firstVisible).toBeInTheDocument();
|
|
62
|
+
await import_test.userEvent.pointer([
|
|
63
|
+
{ keys: "[TouchA>]", target: lastVisible },
|
|
64
|
+
{ target: firstVisible },
|
|
65
|
+
{ keys: "[/TouchA]" }
|
|
66
|
+
]);
|
|
67
|
+
await (0, import_test.waitFor)(() => (0, import_test.expect)(firstVisible).not.toBeInTheDocument());
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
//# sourceMappingURL=VirtualList.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/VirtualList/VirtualList.stories.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { VirtualList } from \"./VirtualList\";\nimport { expect, userEvent, waitFor, within } from \"@storybook/test\";\n\nconst meta: Meta<typeof VirtualList> = {\n component: VirtualList,\n decorators: [\n Story => (\n <div style={{ height: \"400px\" }}>\n <Story />\n </div>\n ),\n ],\n title: \"PreLdls/Components/VirtualList\",\n tags: [\"autodocs\"],\n args: {\n itemHeight: 64,\n count: 50,\n renderItem: (i: number) => <h1 tabIndex={i}>Item #{i}</h1>,\n },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof VirtualList>;\n\nexport const Default: Story = {};\n\nexport const TestVirtualList: Story = {\n play: async ({ canvasElement }) => {\n const canvas = within(canvasElement);\n\n const visible = canvas.getAllByText(/Item #/i);\n const firstVisible = visible[0];\n const lastVisible = visible[visible.length - 1];\n\n await expect(visible.length).toBeLessThanOrEqual(10);\n\n await expect(firstVisible).toBeInTheDocument();\n await userEvent.pointer([\n { keys: \"[TouchA>]\", target: lastVisible },\n { target: firstVisible },\n { keys: \"[/TouchA]\" },\n ]);\n await waitFor(() => expect(firstVisible).not.toBeInTheDocument());\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,yBAA4B;AAC5B,kBAAmD;AAEnD,MAAM,OAAiC;AAAA,EACrC,WAAW;AAAA,EACX,YAAY;AAAA,IACV,WACE,6BAAAA,QAAA,cAAC,SAAI,OAAO,EAAE,QAAQ,QAAQ,KAC5B,6BAAAA,QAAA,cAAC,WAAM,CACT;AAAA,EAEJ;AAAA,EACA,OAAO;AAAA,EACP,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM;AAAA,IACJ,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,YAAY,CAAC,MAAc,6BAAAA,QAAA,cAAC,QAAG,UAAU,KAAG,UAAO,CAAE;AAAA,EACvD;AACF;AACA,IAAO,8BAAQ;AAIR,MAAM,UAAiB,CAAC;AAExB,MAAM,kBAAyB;AAAA,EACpC,MAAM,OAAO,EAAE,cAAc,MAAM;AACjC,UAAM,aAAS,oBAAO,aAAa;AAEnC,UAAM,UAAU,OAAO,aAAa,SAAS;AAC7C,UAAM,eAAe,QAAQ,CAAC;AAC9B,UAAM,cAAc,QAAQ,QAAQ,SAAS,CAAC;AAE9C,cAAM,oBAAO,QAAQ,MAAM,EAAE,oBAAoB,EAAE;AAEnD,cAAM,oBAAO,YAAY,EAAE,kBAAkB;AAC7C,UAAM,sBAAU,QAAQ;AAAA,MACtB,EAAE,MAAM,aAAa,QAAQ,YAAY;AAAA,MACzC,EAAE,QAAQ,aAAa;AAAA,MACvB,EAAE,MAAM,YAAY;AAAA,IACtB,CAAC;AACD,cAAM,qBAAQ,UAAM,oBAAO,YAAY,EAAE,IAAI,kBAAkB,CAAC;AAAA,EAClE;AACF;",
|
|
6
|
+
"names": ["React"]
|
|
7
|
+
}
|
|
@@ -15,6 +15,9 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
|
|
|
15
15
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
16
16
|
var components_exports = {};
|
|
17
17
|
module.exports = __toCommonJS(components_exports);
|
|
18
|
+
__reExport(components_exports, require("./AssetItem/AssetItem"), module.exports);
|
|
19
|
+
__reExport(components_exports, require("./AssetList/AssetList"), module.exports);
|
|
18
20
|
__reExport(components_exports, require("./Input/Input"), module.exports);
|
|
19
21
|
__reExport(components_exports, require("./Search/Search"), module.exports);
|
|
22
|
+
__reExport(components_exports, require("./VirtualList/VirtualList"), module.exports);
|
|
20
23
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/pre-ldls/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export * from \"./Input/Input\";\nexport * from \"./Search/Search\";\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,
|
|
4
|
+
"sourcesContent": ["export * from \"./AssetItem/AssetItem\";\nexport * from \"./AssetList/AssetList\";\nexport * from \"./Input/Input\";\nexport * from \"./Search/Search\";\nexport * from \"./VirtualList/VirtualList\";\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,kCAAd;AACA,+BAAc,kCADd;AAEA,+BAAc,0BAFd;AAGA,+BAAc,4BAHd;AAIA,+BAAc,sCAJd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -34,19 +34,29 @@ module.exports = __toCommonJS(libs_exports);
|
|
|
34
34
|
var import_memoize = __toESM(require("lodash/memoize"));
|
|
35
35
|
var import_styled_components = require("styled-components");
|
|
36
36
|
var import_design_tokens = require("./design-tokens");
|
|
37
|
-
const
|
|
37
|
+
const extraOther = {
|
|
38
38
|
"radius-s": "8px"
|
|
39
39
|
};
|
|
40
|
+
const overrideColor = {
|
|
41
|
+
light: {
|
|
42
|
+
"surface-transparent-hover": "#0000000D",
|
|
43
|
+
"surface-transparent-pressed": "#0000001A"
|
|
44
|
+
},
|
|
45
|
+
dark: {}
|
|
46
|
+
};
|
|
40
47
|
const withTokens = (...usedTokens) => {
|
|
41
48
|
const filterTokens = (0, import_memoize.default)((theme) => {
|
|
42
|
-
const colors = {
|
|
49
|
+
const colors = {
|
|
50
|
+
dark: { ...import_design_tokens.dark, ...overrideColor.dark },
|
|
51
|
+
light: { ...import_design_tokens.light, ...overrideColor.light }
|
|
52
|
+
}[theme];
|
|
43
53
|
const colorEntries = Object.entries(colors).flatMap(([key, value]) => {
|
|
44
54
|
const color = `colors-${key}`;
|
|
45
55
|
if (!usedTokens.includes(color))
|
|
46
56
|
return [];
|
|
47
57
|
return [[`--${color}`, value]];
|
|
48
58
|
});
|
|
49
|
-
const otherEntries = [import_design_tokens.spacing,
|
|
59
|
+
const otherEntries = [import_design_tokens.spacing, extraOther].flatMap(Object.entries).flatMap(([key, value]) => {
|
|
50
60
|
if (!usedTokens.includes(key))
|
|
51
61
|
return [];
|
|
52
62
|
return [[`--${key}`, value]];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/pre-ldls/libs/index.ts"],
|
|
4
|
-
"sourcesContent": ["import memoize from \"lodash/memoize\";\nimport { css, DefaultTheme } from \"styled-components\";\nimport { dark, light, ModeColors, spacing, SpacingScale } from \"./design-tokens\";\n\n// Add temporarily missing tokens here\nconst
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AACpB,+BAAkC;AAClC,2BAA+D;AAG/D,MAAM,
|
|
4
|
+
"sourcesContent": ["import memoize from \"lodash/memoize\";\nimport { css, DefaultTheme } from \"styled-components\";\nimport { dark, light, ModeColors, spacing, SpacingScale } from \"./design-tokens\";\n\n// Add temporarily missing tokens here\nconst extraOther = {\n \"radius-s\": \"8px\",\n} as const;\n\n// override colours based on Figma differing from design-tokens.ts\nconst overrideColor = {\n light: {\n \"surface-transparent-hover\": \"#0000000D\",\n \"surface-transparent-pressed\": \"#0000001A\",\n },\n dark: {},\n} as const;\n\ntype ColorToken = `colors-${keyof ModeColors}`;\ntype OtherToken = keyof (SpacingScale & typeof extraOther);\n\nexport const withTokens = (...usedTokens: Array<ColorToken | OtherToken>) => {\n const filterTokens = memoize((theme: DefaultTheme[\"theme\"]) => {\n const colors = {\n dark: { ...dark, ...overrideColor.dark },\n light: { ...light, ...overrideColor.light },\n }[theme];\n\n const colorEntries = Object.entries(colors).flatMap(([key, value]) => {\n const color = `colors-${key}` as ColorToken;\n if (!usedTokens.includes(color)) return [];\n return [[`--${color}`, value]];\n });\n const otherEntries = [spacing, extraOther].flatMap(Object.entries).flatMap(([key, value]) => {\n if (!usedTokens.includes(key as OtherToken)) return [];\n return [[`--${key}`, value]];\n });\n\n return Object.fromEntries([...colorEntries, ...otherEntries]);\n });\n\n return css(({ theme }) => filterTokens(theme.colors.type as DefaultTheme[\"theme\"]));\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AACpB,+BAAkC;AAClC,2BAA+D;AAG/D,MAAM,aAAa;AAAA,EACjB,YAAY;AACd;AAGA,MAAM,gBAAgB;AAAA,EACpB,OAAO;AAAA,IACL,6BAA6B;AAAA,IAC7B,+BAA+B;AAAA,EACjC;AAAA,EACA,MAAM,CAAC;AACT;AAKO,MAAM,aAAa,IAAI,eAA+C;AAC3E,QAAM,mBAAe,eAAAA,SAAQ,CAAC,UAAiC;AAC7D,UAAM,SAAS;AAAA,MACb,MAAM,EAAE,GAAG,2BAAM,GAAG,cAAc,KAAK;AAAA,MACvC,OAAO,EAAE,GAAG,4BAAO,GAAG,cAAc,MAAM;AAAA,IAC5C,EAAE,KAAK;AAEP,UAAM,eAAe,OAAO,QAAQ,MAAM,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AACpE,YAAM,QAAQ,UAAU,GAAG;AAC3B,UAAI,CAAC,WAAW,SAAS,KAAK;AAAG,eAAO,CAAC;AACzC,aAAO,CAAC,CAAC,KAAK,KAAK,IAAI,KAAK,CAAC;AAAA,IAC/B,CAAC;AACD,UAAM,eAAe,CAAC,8BAAS,UAAU,EAAE,QAAQ,OAAO,OAAO,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC3F,UAAI,CAAC,WAAW,SAAS,GAAiB;AAAG,eAAO,CAAC;AACrD,aAAO,CAAC,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC;AAAA,IAC7B,CAAC;AAED,WAAO,OAAO,YAAY,CAAC,GAAG,cAAc,GAAG,YAAY,CAAC;AAAA,EAC9D,CAAC;AAED,aAAO,8BAAI,CAAC,EAAE,MAAM,MAAM,aAAa,MAAM,OAAO,IAA6B,CAAC;AACpF;",
|
|
6
6
|
"names": ["memoize"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type AssetType = {
|
|
3
|
+
name: string;
|
|
4
|
+
ticker: string;
|
|
5
|
+
};
|
|
6
|
+
type AssetItemProps = AssetType & {
|
|
7
|
+
onClick: (asset: AssetType) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const AssetItem: ({ name, ticker, onClick }: AssetItemProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=AssetItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetItem.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetItem/AssetItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,cAAc,GAAG,SAAS,GAAG;IAChC,OAAO,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAC;CACrC,CAAC;AA+CF,eAAO,MAAM,SAAS,8BAA+B,cAAc,sBAsBlE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { withTokens } from "../../libs";
|
|
4
|
+
import { Text } from "../../../components";
|
|
5
|
+
const TempAssetBadge = () => (
|
|
6
|
+
// TODO: To be replaced with LIVE-18221
|
|
7
|
+
React.createElement("div", { style: { display: "flex", alignItems: "center" } },
|
|
8
|
+
React.createElement("span", { style: {
|
|
9
|
+
height: 48,
|
|
10
|
+
width: 48,
|
|
11
|
+
borderRadius: 48,
|
|
12
|
+
backgroundColor: "grey",
|
|
13
|
+
display: "inline-block",
|
|
14
|
+
} })));
|
|
15
|
+
const Wrapper = styled.div `
|
|
16
|
+
${withTokens("spacing-xs", "marging-s", "colors-content-subdued-default-default", "colors-content-default-default", "colors-surface-transparent-hover", "colors-surface-transparent-pressed")}
|
|
17
|
+
|
|
18
|
+
display: flex;
|
|
19
|
+
padding: var(--spacing-xs);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
|
|
22
|
+
:hover {
|
|
23
|
+
background-color: var(--colors-surface-transparent-hover);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
:active {
|
|
27
|
+
background-color: var(--colors-surface-transparent-pressed);
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
const InfoWrapper = styled.div `
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
margin-left: var(--marging-s);
|
|
35
|
+
`;
|
|
36
|
+
export const AssetItem = ({ name, ticker, onClick }) => {
|
|
37
|
+
return (React.createElement(Wrapper, { onClick: () => onClick({ name, ticker }) },
|
|
38
|
+
React.createElement(TempAssetBadge, null),
|
|
39
|
+
React.createElement(InfoWrapper, null,
|
|
40
|
+
React.createElement(Text, { variant: "largeLineHeight", fontWeight: "semiBold", color: "var(--colors-content-default-default)" }, name),
|
|
41
|
+
React.createElement(Text, { variant: "bodyLineHeight", fontWeight: "semiBold", color: "var(--colors-content-subdued-default-default)" }, ticker))));
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=AssetItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetItem.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetItem/AssetItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAW3C,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC;AAC3B,uCAAuC;AACvC,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE;IACnD,8BACE,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,EAAE;YACT,YAAY,EAAE,EAAE;YAChB,eAAe,EAAE,MAAM;YACvB,OAAO,EAAE,cAAc;SACxB,GACD,CACE,CACP,CAAC;AAEF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,UAAU,CACV,YAAY,EACZ,WAAW,EACX,wCAAwC,EACxC,gCAAgC,EAChC,kCAAkC,EAClC,oCAAoC,CACrC;;;;;;;;;;;;;CAaF,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK7B,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAkB,EAAE,EAAE;IACrE,OAAO,CACL,oBAAC,OAAO,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;QAC/C,oBAAC,cAAc,OAAG;QAClB,oBAAC,WAAW;YACV,oBAAC,IAAI,IACH,OAAO,EAAC,iBAAiB,EACzB,UAAU,EAAC,UAAU,EACrB,KAAK,EAAC,uCAAuC,IAE5C,IAAI,CACA;YACP,oBAAC,IAAI,IACH,OAAO,EAAC,gBAAgB,EACxB,UAAU,EAAC,UAAU,EACrB,KAAK,EAAC,+CAA+C,IAEpD,MAAM,CACF,CACK,CACN,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AssetType } from "../AssetItem/AssetItem";
|
|
3
|
+
export declare const AssetList: ({ assets, onClick, }: {
|
|
4
|
+
assets: AssetType[];
|
|
5
|
+
onClick: (asset: AssetType) => void;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AssetList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,SAAS;YAIZ,SAAS,EAAE;qBACF,SAAS,KAAK,IAAI;uBAWpC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AssetItem } from "../AssetItem/AssetItem";
|
|
3
|
+
import { VirtualList } from "../VirtualList/VirtualList";
|
|
4
|
+
export const AssetList = ({ assets, onClick, }) => {
|
|
5
|
+
return (React.createElement(VirtualList, { itemHeight: 64, count: assets.length, renderItem: (i) => (React.createElement(AssetItem, { name: assets[i].name, ticker: assets[i].ticker, onClick: onClick })) }));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=AssetList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AssetList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAa,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,EACxB,MAAM,EACN,OAAO,GAIR,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,WAAW,IACV,UAAU,EAAE,EAAE,EACd,KAAK,EAAE,MAAM,CAAC,MAAM,EACpB,UAAU,EAAE,CAAC,CAAS,EAAE,EAAE,CAAC,CACzB,oBAAC,SAAS,IAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,CAChF,GACD,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export declare const VirtualList: ({ count, itemHeight, renderItem, }: {
|
|
3
|
+
count: number;
|
|
4
|
+
itemHeight: number;
|
|
5
|
+
renderItem: (index: number) => ReactNode;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=VirtualList.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,eAAO,MAAM,WAAW;WAKf,MAAM;gBACD,MAAM;wBACE,MAAM,KAAK,SAAS;uBAiBzC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FixedSizeList as List } from "react-window";
|
|
3
|
+
import AutoSizer from "react-virtualized-auto-sizer";
|
|
4
|
+
export const VirtualList = ({ count, itemHeight, renderItem, }) => {
|
|
5
|
+
return (React.createElement(AutoSizer, { style: { height: "100%", width: "100%" } }, ({ height }) => (React.createElement(List, { height: height, itemCount: count, itemSize: itemHeight, layout: "vertical", width: "100%" }, ({ index, style }) => React.createElement("div", { style: style }, renderItem(index))))));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=VirtualList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VirtualList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,SAAS,MAAM,8BAA8B,CAAC;AAErD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,KAAK,EACL,UAAU,EACV,UAAU,GAKX,EAAE,EAAE;IACH,OAAO,CACL,oBAAC,SAAS,IAAC,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAChD,CAAC,EAAE,MAAM,EAAsB,EAAE,EAAE,CAAC,CACnC,oBAAC,IAAI,IACH,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,KAAK,EAChB,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAC,UAAU,EACjB,KAAK,EAAC,MAAM,IAEX,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,6BAAK,KAAK,EAAE,KAAK,IAAG,UAAU,CAAC,KAAK,CAAC,CAAO,CAC9D,CACR,CACS,CACb,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { DefaultTheme } from "styled-components";
|
|
2
2
|
import { ModeColors, SpacingScale } from "./design-tokens";
|
|
3
|
-
declare const
|
|
3
|
+
declare const extraOther: {
|
|
4
4
|
readonly "radius-s": "8px";
|
|
5
5
|
};
|
|
6
6
|
type ColorToken = `colors-${keyof ModeColors}`;
|
|
7
|
-
type OtherToken = keyof (SpacingScale & typeof
|
|
7
|
+
type OtherToken = keyof (SpacingScale & typeof extraOther);
|
|
8
8
|
export declare const withTokens: (...usedTokens: Array<ColorToken | OtherToken>) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<DefaultTheme>>;
|
|
9
9
|
export {};
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/libs/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAe,UAAU,EAAW,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGjF,QAAA,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/libs/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAe,UAAU,EAAW,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGjF,QAAA,MAAM,UAAU;;CAEN,CAAC;AAWX,KAAK,UAAU,GAAG,UAAU,MAAM,UAAU,EAAE,CAAC;AAC/C,KAAK,UAAU,GAAG,MAAM,CAAC,YAAY,GAAG,OAAO,UAAU,CAAC,CAAC;AAE3D,eAAO,MAAM,UAAU,kBAAmB,MAAM,UAAU,GAAG,UAAU,CAAC,2GAqBvE,CAAC"}
|
|
@@ -2,19 +2,30 @@ import memoize from "lodash/memoize";
|
|
|
2
2
|
import { css } from "styled-components";
|
|
3
3
|
import { dark, light, spacing } from "./design-tokens";
|
|
4
4
|
// Add temporarily missing tokens here
|
|
5
|
-
const
|
|
5
|
+
const extraOther = {
|
|
6
6
|
"radius-s": "8px",
|
|
7
7
|
};
|
|
8
|
+
// override colours based on Figma differing from design-tokens.ts
|
|
9
|
+
const overrideColor = {
|
|
10
|
+
light: {
|
|
11
|
+
"surface-transparent-hover": "#0000000D",
|
|
12
|
+
"surface-transparent-pressed": "#0000001A",
|
|
13
|
+
},
|
|
14
|
+
dark: {},
|
|
15
|
+
};
|
|
8
16
|
export const withTokens = (...usedTokens) => {
|
|
9
17
|
const filterTokens = memoize((theme) => {
|
|
10
|
-
const colors = {
|
|
18
|
+
const colors = {
|
|
19
|
+
dark: { ...dark, ...overrideColor.dark },
|
|
20
|
+
light: { ...light, ...overrideColor.light },
|
|
21
|
+
}[theme];
|
|
11
22
|
const colorEntries = Object.entries(colors).flatMap(([key, value]) => {
|
|
12
23
|
const color = `colors-${key}`;
|
|
13
24
|
if (!usedTokens.includes(color))
|
|
14
25
|
return [];
|
|
15
26
|
return [[`--${color}`, value]];
|
|
16
27
|
});
|
|
17
|
-
const otherEntries = [spacing,
|
|
28
|
+
const otherEntries = [spacing, extraOther].flatMap(Object.entries).flatMap(([key, value]) => {
|
|
18
29
|
if (!usedTokens.includes(key))
|
|
19
30
|
return [];
|
|
20
31
|
return [[`--${key}`, value]];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAc,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAEjF,sCAAsC;AACtC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/libs/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AACrC,OAAO,EAAE,GAAG,EAAgB,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAc,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAEjF,sCAAsC;AACtC,MAAM,UAAU,GAAG;IACjB,UAAU,EAAE,KAAK;CACT,CAAC;AAEX,kEAAkE;AAClE,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE;QACL,2BAA2B,EAAE,WAAW;QACxC,6BAA6B,EAAE,WAAW;KAC3C;IACD,IAAI,EAAE,EAAE;CACA,CAAC;AAKX,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,GAAG,UAA0C,EAAE,EAAE;IAC1E,MAAM,YAAY,GAAG,OAAO,CAAC,CAAC,KAA4B,EAAE,EAAE;QAC5D,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,GAAG,aAAa,CAAC,IAAI,EAAE;YACxC,KAAK,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,aAAa,CAAC,KAAK,EAAE;SAC5C,CAAC,KAAK,CAAC,CAAC;QAET,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACnE,MAAM,KAAK,GAAG,UAAU,GAAG,EAAgB,CAAC;YAC5C,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,CAAC;gBAAE,OAAO,EAAE,CAAC;YAC3C,OAAO,CAAC,CAAC,KAAK,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;QACH,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YAC1F,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAiB,CAAC;gBAAE,OAAO,EAAE,CAAC;YACvD,OAAO,CAAC,CAAC,KAAK,GAAG,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC,WAAW,CAAC,CAAC,GAAG,YAAY,EAAE,GAAG,YAAY,CAAC,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,IAA6B,CAAC,CAAC,CAAC;AACtF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/react-ui",
|
|
3
|
-
"version": "0.23.0",
|
|
3
|
+
"version": "0.23.1-nightly.0",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Live Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": {
|
|
@@ -71,10 +71,11 @@
|
|
|
71
71
|
"react-select": "^5.2.1",
|
|
72
72
|
"react-spring": "8.0.27",
|
|
73
73
|
"react-transition-group": "^4.4.2",
|
|
74
|
+
"react-virtualized-auto-sizer": "1.0.24",
|
|
74
75
|
"react-window": "^1.8.6",
|
|
75
76
|
"styled-system": "^5.1.5",
|
|
76
|
-
"@ledgerhq/icons-ui": "^0.9.0",
|
|
77
77
|
"@ledgerhq/crypto-icons-ui": "^1.12.0",
|
|
78
|
+
"@ledgerhq/icons-ui": "^0.10.0-nightly.0",
|
|
78
79
|
"@ledgerhq/ui-shared": "^0.3.0"
|
|
79
80
|
},
|
|
80
81
|
"peerDependencies": {
|