@ledgerhq/react-ui 0.25.0-nightly.1 → 0.25.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/Address/Address.js +19 -2
- package/lib/cjs/pre-ldls/components/Address/Address.js.map +3 -3
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.js +17 -6
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.js.map +3 -3
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.stories.js +1 -1
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.stories.js.map +2 -2
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.js +3 -12
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.js.map +2 -2
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.stories.js +2 -6
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.stories.js.map +2 -2
- package/lib/cjs/pre-ldls/components/Input/Input.js +1 -2
- package/lib/cjs/pre-ldls/components/Input/Input.js.map +2 -2
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.js +17 -6
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.js.map +3 -3
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.stories.js +1 -1
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.stories.js.map +2 -2
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.js +1 -1
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.js.map +2 -2
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.stories.js +2 -6
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.stories.js.map +2 -2
- package/lib/cjs/pre-ldls/components/index.js +0 -1
- package/lib/cjs/pre-ldls/components/index.js.map +2 -2
- package/lib/cjs/pre-ldls/libs/index.js +2 -15
- package/lib/cjs/pre-ldls/libs/index.js.map +2 -2
- package/lib/pre-ldls/components/Address/Address.d.ts.map +1 -1
- package/lib/pre-ldls/components/Address/Address.js +11 -2
- package/lib/pre-ldls/components/Address/Address.js.map +1 -1
- package/lib/pre-ldls/components/AssetItem/AssetItem.d.ts +1 -2
- package/lib/pre-ldls/components/AssetItem/AssetItem.d.ts.map +1 -1
- package/lib/pre-ldls/components/AssetItem/AssetItem.js +14 -7
- package/lib/pre-ldls/components/AssetItem/AssetItem.js.map +1 -1
- package/lib/pre-ldls/components/AssetList/AssetList.d.ts +1 -2
- package/lib/pre-ldls/components/AssetList/AssetList.d.ts.map +1 -1
- package/lib/pre-ldls/components/AssetList/AssetList.js +3 -3
- package/lib/pre-ldls/components/AssetList/AssetList.js.map +1 -1
- package/lib/pre-ldls/components/Input/Input.d.ts.map +1 -1
- package/lib/pre-ldls/components/Input/Input.js +1 -2
- package/lib/pre-ldls/components/Input/Input.js.map +1 -1
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.d.ts +2 -6
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.d.ts.map +1 -1
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.js +13 -6
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.js.map +1 -1
- package/lib/pre-ldls/components/NetworkList/NetworkList.d.ts +5 -1
- package/lib/pre-ldls/components/NetworkList/NetworkList.d.ts.map +1 -1
- package/lib/pre-ldls/components/NetworkList/NetworkList.js +1 -1
- package/lib/pre-ldls/components/NetworkList/NetworkList.js.map +1 -1
- package/lib/pre-ldls/components/index.d.ts +0 -1
- package/lib/pre-ldls/components/index.d.ts.map +1 -1
- package/lib/pre-ldls/components/index.js +0 -1
- package/lib/pre-ldls/components/index.js.map +1 -1
- package/lib/pre-ldls/libs/index.d.ts +1 -14
- package/lib/pre-ldls/libs/index.d.ts.map +1 -1
- package/lib/pre-ldls/libs/index.js +4 -10
- package/lib/pre-ldls/libs/index.js.map +1 -1
- package/package.json +1 -2
- package/lib/cjs/pre-ldls/components/CardButton/CardButton.js +0 -91
- package/lib/cjs/pre-ldls/components/CardButton/CardButton.js.map +0 -7
- package/lib/cjs/pre-ldls/components/CardButton/CardButton.stories.js +0 -84
- package/lib/cjs/pre-ldls/components/CardButton/CardButton.stories.js.map +0 -7
- package/lib/cjs/pre-ldls/components/CryptoIcon/CryptoIcon.js +0 -39
- package/lib/cjs/pre-ldls/components/CryptoIcon/CryptoIcon.js.map +0 -7
- package/lib/cjs/pre-ldls/components/CryptoIcon/CryptoIcon.stories.js +0 -47
- package/lib/cjs/pre-ldls/components/CryptoIcon/CryptoIcon.stories.js.map +0 -7
- package/lib/pre-ldls/components/CardButton/CardButton.d.ts +0 -8
- package/lib/pre-ldls/components/CardButton/CardButton.d.ts.map +0 -1
- package/lib/pre-ldls/components/CardButton/CardButton.js +0 -43
- package/lib/pre-ldls/components/CardButton/CardButton.js.map +0 -1
- package/lib/pre-ldls/components/CryptoIcon/CryptoIcon.d.ts +0 -4
- package/lib/pre-ldls/components/CryptoIcon/CryptoIcon.d.ts.map +0 -1
- package/lib/pre-ldls/components/CryptoIcon/CryptoIcon.js +0 -6
- package/lib/pre-ldls/components/CryptoIcon/CryptoIcon.js.map +0 -1
|
@@ -2,15 +2,22 @@ import React from "react";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { withTokens } from "../../libs";
|
|
4
4
|
import { Text } from "../../../components";
|
|
5
|
-
|
|
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
|
+
} })));
|
|
6
15
|
const Wrapper = styled.div `
|
|
7
|
-
${withTokens("spacing-xxs", "margin-s", "
|
|
16
|
+
${withTokens("spacing-xxs", "margin-s", "colors-content-subdued-default-default", "colors-content-default-default", "colors-surface-transparent-hover", "colors-surface-transparent-pressed")}
|
|
8
17
|
|
|
9
18
|
display: flex;
|
|
10
19
|
padding: var(--spacing-xxs);
|
|
11
20
|
cursor: pointer;
|
|
12
|
-
border-radius: var(--radius-s, 8px);
|
|
13
|
-
align-items: center;
|
|
14
21
|
|
|
15
22
|
:hover {
|
|
16
23
|
background-color: var(--colors-surface-transparent-hover);
|
|
@@ -26,9 +33,9 @@ const InfoWrapper = styled.div `
|
|
|
26
33
|
justify-content: center;
|
|
27
34
|
margin-left: var(--margin-s);
|
|
28
35
|
`;
|
|
29
|
-
export const AssetItem = ({ name, ticker,
|
|
30
|
-
return (React.createElement(Wrapper, { onClick: () => onClick({ name, ticker
|
|
31
|
-
React.createElement(
|
|
36
|
+
export const AssetItem = ({ name, ticker, onClick }) => {
|
|
37
|
+
return (React.createElement(Wrapper, { onClick: () => onClick({ name, ticker }) },
|
|
38
|
+
React.createElement(TempAssetBadge, null),
|
|
32
39
|
React.createElement(InfoWrapper, null,
|
|
33
40
|
React.createElement(Text, { variant: "largeLineHeight", fontWeight: "semiBold", color: "var(--colors-content-default-default)" }, name),
|
|
34
41
|
React.createElement(Text, { variant: "bodyLineHeight", fontWeight: "semiBold", color: "var(--colors-content-subdued-default-default)" }, ticker))));
|
|
@@ -1 +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;
|
|
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,aAAa,EACb,UAAU,EACV,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"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AssetType } from "../AssetItem/AssetItem";
|
|
3
|
-
export declare const AssetList: ({ assets, onClick,
|
|
3
|
+
export declare const AssetList: ({ assets, onClick, }: {
|
|
4
4
|
assets: AssetType[];
|
|
5
5
|
onClick: (asset: AssetType) => void;
|
|
6
|
-
onVisibleItemsScrollEnd?: (() => void) | undefined;
|
|
7
6
|
}) => React.JSX.Element;
|
|
8
7
|
//# sourceMappingURL=AssetList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAa,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,SAAS;
|
|
1
|
+
{"version":3,"file":"AssetList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAa,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,SAAS;YAIZ,SAAS,EAAE;qBACF,SAAS,KAAK,IAAI;uBAQpC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { AssetItem } from "../AssetItem/AssetItem";
|
|
3
3
|
import { VirtualList } from "../VirtualList/VirtualList";
|
|
4
|
-
export const AssetList = ({ assets, onClick,
|
|
5
|
-
const renderAssetItem = useCallback(({ name, ticker
|
|
6
|
-
return
|
|
4
|
+
export const AssetList = ({ assets, onClick, }) => {
|
|
5
|
+
const renderAssetItem = useCallback(({ name, ticker }) => React.createElement(AssetItem, { name: name, ticker: ticker, onClick: onClick }), [onClick]);
|
|
6
|
+
return React.createElement(VirtualList, { itemHeight: 64, items: assets, renderItem: renderAssetItem });
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=AssetList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AssetList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,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,
|
|
1
|
+
{"version":3,"file":"AssetList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,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,MAAM,eAAe,GAAG,WAAW,CACjC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAa,EAAE,EAAE,CAAC,oBAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAI,EAC5F,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,oBAAC,WAAW,IAAC,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,GAAI,CAAC;AACrF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAkC1B,eAAO,MAAM,KAAK;WA9B6C,MAAM,SAAS;mDAuC7E,CAAC"}
|
|
@@ -5,6 +5,7 @@ const Wrapper = styled.div `
|
|
|
5
5
|
${withTokens("spacing-s", "spacing-xxs", "radius-s", "colors-surface-transparent-subdued-default", "colors-content-subdued-default-default")}
|
|
6
6
|
|
|
7
7
|
display: flex;
|
|
8
|
+
width: 328px;
|
|
8
9
|
height: 40px;
|
|
9
10
|
min-width: 328px;
|
|
10
11
|
padding: 0px var(--spacing-s, 16px);
|
|
@@ -14,11 +15,9 @@ const Wrapper = styled.div `
|
|
|
14
15
|
border-radius: var(--radius-s, 8px);
|
|
15
16
|
background: var(--colors-surface-transparent-subdued-default, rgba(0, 0, 0, 0.03));
|
|
16
17
|
color: var(--colors-content-subdued-default-default);
|
|
17
|
-
overflow: hidden;
|
|
18
18
|
`;
|
|
19
19
|
const StyledInput = styled.input `
|
|
20
20
|
background: none;
|
|
21
|
-
cursor: text;
|
|
22
21
|
border: none;
|
|
23
22
|
width: 100%;
|
|
24
23
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,UAAU,CACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,4CAA4C,EAC5C,wCAAwC,CACzC;;;;;;;;;;;;;CAaF,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAA
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAIxC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,UAAU,CACV,WAAW,EACX,aAAa,EACb,UAAU,EACV,4CAA4C,EAC5C,wCAAwC,CACzC;;;;;;;;;;;;;CAaF,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,KAAK,CAAA;;;;CAI/B,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CACnC,CAAC,EAAE,IAAI,GAAG,MAAM,EAAE,IAAI,GAAG,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAChD,OAAO,CACL,oBAAC,OAAO;QACL,IAAI;QACL,oBAAC,WAAW,OAAK,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,CACxC,CACX,CAAC;AACJ,CAAC,CACF,CAAC;AACF,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
type NetworkItemProps = {
|
|
3
3
|
name: string;
|
|
4
|
-
id: string;
|
|
5
|
-
ticker: string;
|
|
6
|
-
};
|
|
7
|
-
type NetworkItemProps = Network & {
|
|
8
4
|
onClick: () => void;
|
|
9
5
|
};
|
|
10
|
-
export declare const NetworkItem: ({ name, onClick
|
|
6
|
+
export declare const NetworkItem: ({ name, onClick }: NetworkItemProps) => React.JSX.Element;
|
|
11
7
|
export {};
|
|
12
8
|
//# sourceMappingURL=NetworkItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkItem.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkItem/NetworkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkItem.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkItem/NetworkItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA6CF,eAAO,MAAM,WAAW,sBAAuB,gBAAgB,sBAe9D,CAAC"}
|
|
@@ -2,14 +2,21 @@ import React from "react";
|
|
|
2
2
|
import styled from "styled-components";
|
|
3
3
|
import { withTokens } from "../../libs";
|
|
4
4
|
import { Text } from "../../../components";
|
|
5
|
-
|
|
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
|
+
} })));
|
|
6
15
|
const Wrapper = styled.div `
|
|
7
|
-
${withTokens("spacing-xxs", "margin-s", "
|
|
16
|
+
${withTokens("spacing-xxs", "margin-s", "colors-content-default-default", "colors-surface-transparent-hover", "colors-surface-transparent-pressed")}
|
|
8
17
|
display: flex;
|
|
9
18
|
padding: var(--spacing-xxs);
|
|
10
19
|
cursor: pointer;
|
|
11
|
-
border-radius: var(--radius-s, 8px);
|
|
12
|
-
align-items: center;
|
|
13
20
|
|
|
14
21
|
:hover {
|
|
15
22
|
background-color: var(--colors-surface-transparent-hover);
|
|
@@ -25,9 +32,9 @@ const InfoWrapper = styled.div `
|
|
|
25
32
|
justify-content: center;
|
|
26
33
|
margin-left: var(--margin-s);
|
|
27
34
|
`;
|
|
28
|
-
export const NetworkItem = ({ name, onClick
|
|
35
|
+
export const NetworkItem = ({ name, onClick }) => {
|
|
29
36
|
return (React.createElement(Wrapper, { onClick: onClick },
|
|
30
|
-
React.createElement(
|
|
37
|
+
React.createElement(TempAssetBadge, null),
|
|
31
38
|
React.createElement(InfoWrapper, null,
|
|
32
39
|
React.createElement(Text, { variant: "largeLineHeight", fontWeight: "semiBold", color: "var(--colors-content-default-default)" }, name))));
|
|
33
40
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkItem.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkItem/NetworkItem.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;
|
|
1
|
+
{"version":3,"file":"NetworkItem.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkItem/NetworkItem.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;AAO3C,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,aAAa,EACb,UAAU,EACV,gCAAgC,EAChC,kCAAkC,EAClC,oCAAoC,CACrC;;;;;;;;;;;;CAYF,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAK7B,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,IAAI,EAAE,OAAO,EAAoB,EAAE,EAAE;IACjE,OAAO,CACL,oBAAC,OAAO,IAAC,OAAO,EAAE,OAAO;QACvB,oBAAC,cAAc,OAAG;QAClB,oBAAC,WAAW;YACV,oBAAC,IAAI,IACH,OAAO,EAAC,iBAAiB,EACzB,UAAU,EAAC,UAAU,EACrB,KAAK,EAAC,uCAAuC,IAE5C,IAAI,CACA,CACK,CACN,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
type Network = {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
3
6
|
export declare const NetworkList: ({ networks, onClick, }: {
|
|
4
7
|
networks: Network[];
|
|
5
8
|
onClick: (networkId: string) => void;
|
|
6
9
|
}) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
7
11
|
//# sourceMappingURL=NetworkList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkList/NetworkList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"NetworkList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkList/NetworkList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAI3C,KAAK,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAE5C,eAAO,MAAM,WAAW;cAIZ,OAAO,EAAE;yBACE,MAAM,KAAK,IAAI;uBAQrC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import React, { useCallback } from "react";
|
|
|
2
2
|
import { NetworkItem } from "../NetworkItem/NetworkItem";
|
|
3
3
|
import { VirtualList } from "../VirtualList/VirtualList";
|
|
4
4
|
export const NetworkList = ({ networks, onClick, }) => {
|
|
5
|
-
const renderNetworkItem = useCallback((
|
|
5
|
+
const renderNetworkItem = useCallback(({ name, id }) => React.createElement(NetworkItem, { name: name, onClick: () => onClick(id) }), [onClick]);
|
|
6
6
|
return React.createElement(VirtualList, { items: networks, itemHeight: 64, renderItem: renderNetworkItem });
|
|
7
7
|
};
|
|
8
8
|
//# sourceMappingURL=NetworkList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkList/NetworkList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,
|
|
1
|
+
{"version":3,"file":"NetworkList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/NetworkList/NetworkList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIzD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,QAAQ,EACR,OAAO,GAIR,EAAE,EAAE;IACH,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAW,EAAE,EAAE,CAAC,oBAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,GAAI,EAClF,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,oBAAC,WAAW,IAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,iBAAiB,GAAI,CAAC;AACzF,CAAC,CAAC"}
|
|
@@ -3,7 +3,6 @@ export * from "./AccountList/AccountList";
|
|
|
3
3
|
export * from "./Address/Address";
|
|
4
4
|
export * from "./AssetItem/AssetItem";
|
|
5
5
|
export * from "./AssetList/AssetList";
|
|
6
|
-
export * from "./CardButton/CardButton";
|
|
7
6
|
export * from "./Input/Input";
|
|
8
7
|
export * from "./NetworkItem/NetworkItem";
|
|
9
8
|
export * from "./NetworkList/NetworkList";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC"}
|
|
@@ -3,7 +3,6 @@ export * from "./AccountList/AccountList";
|
|
|
3
3
|
export * from "./Address/Address";
|
|
4
4
|
export * from "./AssetItem/AssetItem";
|
|
5
5
|
export * from "./AssetList/AssetList";
|
|
6
|
-
export * from "./CardButton/CardButton";
|
|
7
6
|
export * from "./Input/Input";
|
|
8
7
|
export * from "./NetworkItem/NetworkItem";
|
|
9
8
|
export * from "./NetworkList/NetworkList";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,2BAA2B,CAAC"}
|
|
@@ -3,8 +3,6 @@ import { ModeColors, SpacingScale } from "./design-tokens";
|
|
|
3
3
|
declare const overrideOther: {
|
|
4
4
|
readonly "radius-s": "8px";
|
|
5
5
|
readonly "radius-xs": "4px";
|
|
6
|
-
readonly "border-width-default": "1px";
|
|
7
|
-
readonly "border-width-focus": "2px";
|
|
8
6
|
readonly "margin-xs": "8px";
|
|
9
7
|
readonly "margin-s": "16px";
|
|
10
8
|
readonly "margin-m": "24px";
|
|
@@ -12,18 +10,7 @@ declare const overrideOther: {
|
|
|
12
10
|
readonly "spacing-xs": "12px";
|
|
13
11
|
readonly "spacing-xxs": "8px";
|
|
14
12
|
};
|
|
15
|
-
|
|
16
|
-
readonly light: {
|
|
17
|
-
readonly "surface-transparent-hover": "#0000000D";
|
|
18
|
-
readonly "surface-transparent-pressed": "#0000001A";
|
|
19
|
-
readonly "border-subdued-default-hover": "#D5D5D5";
|
|
20
|
-
readonly "border-subdued-default-pressed": "#C1C1C1";
|
|
21
|
-
};
|
|
22
|
-
readonly dark: {
|
|
23
|
-
readonly "opacity-default-10": "#FFFFFF1A";
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
type ColorToken = `colors-${keyof ModeColors}` | `colors-${keyof typeof overrideColor.light}` | `colors-${keyof typeof overrideColor.dark}`;
|
|
13
|
+
type ColorToken = `colors-${keyof ModeColors}`;
|
|
27
14
|
type OtherToken = keyof (SpacingScale & typeof overrideOther);
|
|
28
15
|
export declare const withTokens: (...usedTokens: Array<ColorToken | OtherToken>) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<DefaultTheme>>;
|
|
29
16
|
export {};
|
|
@@ -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,aAAa
|
|
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,aAAa;;;;;;;;;CAUT,CAAC;AAWX,KAAK,UAAU,GAAG,UAAU,MAAM,UAAU,EAAE,CAAC;AAC/C,KAAK,UAAU,GAAG,MAAM,CAAC,YAAY,GAAG,OAAO,aAAa,CAAC,CAAC;AAE9D,eAAO,MAAM,UAAU,kBAAmB,MAAM,UAAU,GAAG,UAAU,CAAC,2GAuBvE,CAAC"}
|
|
@@ -5,8 +5,6 @@ import { dark, light, spacing } from "./design-tokens";
|
|
|
5
5
|
const overrideOther = {
|
|
6
6
|
"radius-s": "8px", // missing from tokens
|
|
7
7
|
"radius-xs": "4px", // missing from tokens
|
|
8
|
-
"border-width-default": "1px", // missing from tokens
|
|
9
|
-
"border-width-focus": "2px", // missing from tokens
|
|
10
8
|
"margin-xs": "8px", // redefines marging-xs
|
|
11
9
|
"margin-s": "16px", // redefines marging-s
|
|
12
10
|
"margin-m": "24px", // redefines marging-m
|
|
@@ -14,17 +12,13 @@ const overrideOther = {
|
|
|
14
12
|
"spacing-xs": "12px", // override from "spacing-xxs": "12px"
|
|
15
13
|
"spacing-xxs": "8px", // override from "spacing-xs": "8px"
|
|
16
14
|
};
|
|
17
|
-
//
|
|
15
|
+
// override colours based on Figma differing from design-tokens.ts
|
|
18
16
|
const overrideColor = {
|
|
19
17
|
light: {
|
|
20
|
-
"surface-transparent-hover": "#0000000D",
|
|
21
|
-
"surface-transparent-pressed": "#0000001A",
|
|
22
|
-
"border-subdued-default-hover": "#D5D5D5", // override from colours
|
|
23
|
-
"border-subdued-default-pressed": "#C1C1C1", // missing from colours
|
|
24
|
-
},
|
|
25
|
-
dark: {
|
|
26
|
-
"opacity-default-10": "#FFFFFF1A", // missing from colours
|
|
18
|
+
"surface-transparent-hover": "#0000000D",
|
|
19
|
+
"surface-transparent-pressed": "#0000001A",
|
|
27
20
|
},
|
|
21
|
+
dark: {},
|
|
28
22
|
};
|
|
29
23
|
export const withTokens = (...usedTokens) => {
|
|
30
24
|
const filterTokens = memoize((theme) => {
|
|
@@ -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,6DAA6D;AAC7D,MAAM,aAAa,GAAG;IACpB,UAAU,EAAE,KAAK,EAAE,sBAAsB;IACzC,WAAW,EAAE,KAAK,EAAE,sBAAsB;IAC1C,
|
|
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,6DAA6D;AAC7D,MAAM,aAAa,GAAG;IACpB,UAAU,EAAE,KAAK,EAAE,sBAAsB;IACzC,WAAW,EAAE,KAAK,EAAE,sBAAsB;IAC1C,WAAW,EAAE,KAAK,EAAE,uBAAuB;IAC3C,UAAU,EAAE,MAAM,EAAE,sBAAsB;IAC1C,UAAU,EAAE,MAAM,EAAE,sBAAsB;IAC1C,UAAU,EAAE,MAAM,EAAE,sBAAsB;IAE1C,YAAY,EAAE,MAAM,EAAE,sCAAsC;IAC5D,aAAa,EAAE,KAAK,EAAE,oCAAoC;CAClD,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,aAAa,CAAC;aAC1C,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;aACvB,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACxB,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;QAEL,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.25.0
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Live Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": {
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@floating-ui/react-dom": "^0.4.0",
|
|
64
|
-
"@ledgerhq/crypto-icons": "1.1.0",
|
|
65
64
|
"@tanstack/react-virtual": "3.13.6",
|
|
66
65
|
"@tippyjs/react": "^4.2.6",
|
|
67
66
|
"color": "^4.0.0",
|
|
@@ -1,91 +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 CardButton_exports = {};
|
|
30
|
-
__export(CardButton_exports, {
|
|
31
|
-
CardButton: () => CardButton
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(CardButton_exports);
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_libs = require("../../libs");
|
|
36
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
-
const Button = import_styled_components.default.button`
|
|
38
|
-
${(0, import_libs.withTokens)(
|
|
39
|
-
"colors-content-default-default",
|
|
40
|
-
"colors-surface-transparent-hover",
|
|
41
|
-
"colors-surface-transparent-pressed",
|
|
42
|
-
"colors-border-light-default",
|
|
43
|
-
"colors-opacity-default-10",
|
|
44
|
-
"colors-border-subdued-default-hover",
|
|
45
|
-
"colors-border-subdued-default-pressed",
|
|
46
|
-
"colors-border-focus-default",
|
|
47
|
-
"radius-s",
|
|
48
|
-
"border-width-default",
|
|
49
|
-
"border-width-focus",
|
|
50
|
-
"spacing-xs"
|
|
51
|
-
)}
|
|
52
|
-
|
|
53
|
-
display: flex;
|
|
54
|
-
padding: var(--spacing-xs);
|
|
55
|
-
flex-grow: 1;
|
|
56
|
-
justify-content: space-between;
|
|
57
|
-
align-items: center;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
|
|
60
|
-
background-color: transparent;
|
|
61
|
-
color: var(--colors-content-default-default);
|
|
62
|
-
font-weight: 600;
|
|
63
|
-
|
|
64
|
-
border-width: var(--border-width-default);
|
|
65
|
-
border-radius: var(--radius-s);
|
|
66
|
-
border-color: ${({ theme: { theme } }) => theme === "light" ? "var(--colors-border-light-default);" : "var(--colors-opacity-default-10);"}
|
|
67
|
-
|
|
68
|
-
:hover {
|
|
69
|
-
background-color: var(--colors-surface-transparent-hover);
|
|
70
|
-
${({ theme: { theme } }) => theme === "light" && "border-color: var(--colors-border-subdued-default-hover);"}
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
:active {
|
|
74
|
-
background-color: var(--colors-surface-transparent-pressed);
|
|
75
|
-
${({ theme: { theme } }) => theme === "light" && "border-color: var(--colors-border-subdued-default-pressed);"}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
:focus-visible {
|
|
79
|
-
border-color: var(--colors-border-focus-default);
|
|
80
|
-
border-width: var(--border-width-focus);
|
|
81
|
-
}
|
|
82
|
-
`;
|
|
83
|
-
const CardButton = ({
|
|
84
|
-
onClick,
|
|
85
|
-
title,
|
|
86
|
-
iconRight,
|
|
87
|
-
variant = "default"
|
|
88
|
-
}) => {
|
|
89
|
-
return /* @__PURE__ */ import_react.default.createElement(Button, { onClick, style: { borderStyle: variant === "default" ? "solid" : "dashed" } }, title, " ", iconRight);
|
|
90
|
-
};
|
|
91
|
-
//# sourceMappingURL=CardButton.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/pre-ldls/components/CardButton/CardButton.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from \"react\";\nimport { withTokens } from \"../../libs\";\nimport styled from \"styled-components\";\n\nconst Button = styled.button`\n ${withTokens(\n \"colors-content-default-default\",\n \"colors-surface-transparent-hover\",\n \"colors-surface-transparent-pressed\",\n \"colors-border-light-default\",\n \"colors-opacity-default-10\",\n \"colors-border-subdued-default-hover\",\n \"colors-border-subdued-default-pressed\",\n \"colors-border-focus-default\",\n \"radius-s\",\n \"border-width-default\",\n \"border-width-focus\",\n \"spacing-xs\",\n )}\n\n display: flex;\n padding: var(--spacing-xs);\n flex-grow: 1;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n\n background-color: transparent;\n color: var(--colors-content-default-default);\n font-weight: 600;\n\n border-width: var(--border-width-default);\n border-radius: var(--radius-s);\n border-color: ${({ theme: { theme } }) =>\n theme === \"light\" ? \"var(--colors-border-light-default);\" : \"var(--colors-opacity-default-10);\"}\n\n :hover {\n background-color: var(--colors-surface-transparent-hover);\n ${({ theme: { theme } }) =>\n theme === \"light\" && \"border-color: var(--colors-border-subdued-default-hover);\"}\n }\n\n :active {\n background-color: var(--colors-surface-transparent-pressed);\n ${({ theme: { theme } }) => theme === \"light\" && \"border-color: var(--colors-border-subdued-default-pressed);\"}\n }\n\n :focus-visible {\n border-color: var(--colors-border-focus-default);\n border-width: var(--border-width-focus);\n }\n`;\n\nexport const CardButton = ({\n onClick,\n title,\n iconRight,\n variant = \"default\",\n}: {\n onClick: () => void;\n title: string;\n iconRight?: JSX.Element;\n variant?: \"default\" | \"dashed\";\n}) => {\n return (\n <Button onClick={onClick} style={{ borderStyle: variant === \"default\" ? \"solid\" : \"dashed\" }}>\n {title} {iconRight}\n </Button>\n );\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAA2B;AAC3B,+BAAmB;AAEnB,MAAM,SAAS,yBAAAA,QAAO;AAAA,QAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;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;AAAA;AAAA,kBAee,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAClC,UAAU,UAAU,wCAAwC,mCAAmC;AAAA;AAAA;AAAA;AAAA,MAI7F,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MACpB,UAAU,WAAW,2DAA2D;AAAA;AAAA;AAAA;AAAA;AAAA,MAKhF,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,WAAW,6DAA6D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS3G,MAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AACZ,MAKM;AACJ,SACE,6BAAAC,QAAA,cAAC,UAAO,SAAkB,OAAO,EAAE,aAAa,YAAY,YAAY,UAAU,SAAS,KACxF,OAAM,KAAE,SACX;AAEJ;",
|
|
6
|
-
"names": ["styled", "React"]
|
|
7
|
-
}
|
|
@@ -1,84 +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 CardButton_stories_exports = {};
|
|
30
|
-
__export(CardButton_stories_exports, {
|
|
31
|
-
Dashed: () => Dashed,
|
|
32
|
-
Default: () => Default,
|
|
33
|
-
IconRight: () => IconRight,
|
|
34
|
-
TestOnClick: () => TestOnClick,
|
|
35
|
-
default: () => CardButton_stories_default
|
|
36
|
-
});
|
|
37
|
-
module.exports = __toCommonJS(CardButton_stories_exports);
|
|
38
|
-
var import_react = __toESM(require("react"));
|
|
39
|
-
var import_CardButton = require("./CardButton");
|
|
40
|
-
var import_test = require("@storybook/test");
|
|
41
|
-
var import_assets = require("../../../assets");
|
|
42
|
-
const meta = {
|
|
43
|
-
component: import_CardButton.CardButton,
|
|
44
|
-
title: "PreLdls/Components/CardButton",
|
|
45
|
-
decorators: [
|
|
46
|
-
(Story) => /* @__PURE__ */ import_react.default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ import_react.default.createElement(Story, null))
|
|
47
|
-
],
|
|
48
|
-
tags: ["autodocs"],
|
|
49
|
-
args: {
|
|
50
|
-
onClick: () => null,
|
|
51
|
-
title: "Title",
|
|
52
|
-
variant: "default"
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
var CardButton_stories_default = meta;
|
|
56
|
-
const Default = {};
|
|
57
|
-
const Dashed = {
|
|
58
|
-
args: {
|
|
59
|
-
onClick: () => null,
|
|
60
|
-
title: "Title",
|
|
61
|
-
variant: "dashed"
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
const IconRight = {
|
|
65
|
-
args: {
|
|
66
|
-
onClick: () => null,
|
|
67
|
-
title: "Title",
|
|
68
|
-
iconRight: /* @__PURE__ */ import_react.default.createElement(import_assets.Icons.Plus, { size: "S" })
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const onClick = (0, import_test.fn)();
|
|
72
|
-
const TestOnClick = {
|
|
73
|
-
args: {
|
|
74
|
-
onClick,
|
|
75
|
-
title: "Title"
|
|
76
|
-
},
|
|
77
|
-
play: async ({ canvasElement }) => {
|
|
78
|
-
const canvas = (0, import_test.within)(canvasElement);
|
|
79
|
-
const button = canvas.getByText(/title/i);
|
|
80
|
-
await import_test.userEvent.click(button);
|
|
81
|
-
await (0, import_test.expect)(onClick).toHaveBeenCalled();
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=CardButton.stories.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/pre-ldls/components/CardButton/CardButton.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { CardButton } from \"./CardButton\";\nimport { expect, fn, userEvent, within } from \"@storybook/test\";\nimport { Icons } from \"../../../assets\";\n\nconst meta: Meta<typeof CardButton> = {\n component: CardButton,\n title: \"PreLdls/Components/CardButton\",\n decorators: [\n Story => (\n <div style={{ display: \"flex\" }}>\n <Story />\n </div>\n ),\n ],\n tags: [\"autodocs\"],\n args: {\n onClick: () => null,\n title: \"Title\",\n variant: \"default\",\n },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof CardButton>;\n\nexport const Default: Story = {};\n\nexport const Dashed: Story = {\n args: {\n onClick: () => null,\n title: \"Title\",\n variant: \"dashed\",\n },\n};\n\nexport const IconRight: Story = {\n args: {\n onClick: () => null,\n title: \"Title\",\n iconRight: <Icons.Plus size=\"S\" />,\n },\n};\n\nconst onClick = fn();\n\nexport const TestOnClick: Story = {\n args: {\n onClick,\n title: \"Title\",\n },\n play: async ({ canvasElement }) => {\n const canvas = within(canvasElement);\n const button = canvas.getByText(/title/i);\n\n await userEvent.click(button);\n\n await expect(onClick).toHaveBeenCalled();\n },\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAElB,wBAA2B;AAC3B,kBAA8C;AAC9C,oBAAsB;AAEtB,MAAM,OAAgC;AAAA,EACpC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,YAAY;AAAA,IACV,WACE,6BAAAA,QAAA,cAAC,SAAI,OAAO,EAAE,SAAS,OAAO,KAC5B,6BAAAA,QAAA,cAAC,WAAM,CACT;AAAA,EAEJ;AAAA,EACA,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM;AAAA,IACJ,SAAS,MAAM;AAAA,IACf,OAAO;AAAA,IACP,SAAS;AAAA,EACX;AACF;AACA,IAAO,6BAAQ;AAIR,MAAM,UAAiB,CAAC;AAExB,MAAM,SAAgB;AAAA,EAC3B,MAAM;AAAA,IACJ,SAAS,MAAM;AAAA,IACf,OAAO;AAAA,IACP,SAAS;AAAA,EACX;AACF;AAEO,MAAM,YAAmB;AAAA,EAC9B,MAAM;AAAA,IACJ,SAAS,MAAM;AAAA,IACf,OAAO;AAAA,IACP,WAAW,6BAAAA,QAAA,cAAC,oBAAM,MAAN,EAAW,MAAK,KAAI;AAAA,EAClC;AACF;AAEA,MAAM,cAAU,gBAAG;AAEZ,MAAM,cAAqB;AAAA,EAChC,MAAM;AAAA,IACJ;AAAA,IACA,OAAO;AAAA,EACT;AAAA,EACA,MAAM,OAAO,EAAE,cAAc,MAAM;AACjC,UAAM,aAAS,oBAAO,aAAa;AACnC,UAAM,SAAS,OAAO,UAAU,QAAQ;AAExC,UAAM,sBAAU,MAAM,MAAM;AAE5B,cAAM,oBAAO,OAAO,EAAE,iBAAiB;AAAA,EACzC;AACF;",
|
|
6
|
-
"names": ["React"]
|
|
7
|
-
}
|
|
@@ -1,39 +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 CryptoIcon_exports = {};
|
|
30
|
-
__export(CryptoIcon_exports, {
|
|
31
|
-
CryptoIcon: () => CryptoIcon
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(CryptoIcon_exports);
|
|
34
|
-
var import_react = __toESM(require("react"));
|
|
35
|
-
var import_crypto_icons = require("@ledgerhq/crypto-icons");
|
|
36
|
-
function CryptoIcon(props) {
|
|
37
|
-
return /* @__PURE__ */ import_react.default.createElement(import_crypto_icons.CryptoIcon, { ...props });
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=CryptoIcon.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/pre-ldls/components/CryptoIcon/CryptoIcon.tsx"],
|
|
4
|
-
"sourcesContent": ["import React from \"react\";\nimport { CryptoIcon as Icon } from \"@ledgerhq/crypto-icons\";\n\nexport function CryptoIcon(props: Parameters<typeof Icon>[0]) {\n return <Icon {...props} />;\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,0BAAmC;AAE5B,SAAS,WAAW,OAAmC;AAC5D,SAAO,6BAAAA,QAAA,cAAC,oBAAAC,YAAA,EAAM,GAAG,OAAO;AAC1B;",
|
|
6
|
-
"names": ["React", "Icon"]
|
|
7
|
-
}
|