@ledgerhq/react-ui 0.24.0 → 0.25.0-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/AccountItem/AccountItem.js +102 -0
- package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.stories.js +113 -0
- package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AccountList/AccountList.js +47 -0
- package/lib/cjs/pre-ldls/components/AccountList/AccountList.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AccountList/AccountList.stories.js +73 -0
- package/lib/cjs/pre-ldls/components/AccountList/AccountList.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/Address/Address.js +79 -0
- package/lib/cjs/pre-ldls/components/Address/Address.js.map +7 -0
- package/lib/cjs/pre-ldls/components/Address/Address.stories.js +56 -0
- package/lib/cjs/pre-ldls/components/Address/Address.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.js +8 -6
- package/lib/cjs/pre-ldls/components/AssetItem/AssetItem.js.map +2 -2
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.js +9 -3
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.js.map +2 -2
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.stories.js +5 -1
- package/lib/cjs/pre-ldls/components/AssetList/AssetList.stories.js.map +2 -2
- package/lib/cjs/pre-ldls/components/Input/Input.js +4 -3
- package/lib/cjs/pre-ldls/components/Input/Input.js.map +2 -2
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.js +92 -0
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.js.map +7 -0
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.stories.js +43 -0
- package/lib/cjs/pre-ldls/components/NetworkItem/NetworkItem.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.js +47 -0
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.js.map +7 -0
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.stories.js +62 -0
- package/lib/cjs/pre-ldls/components/NetworkList/NetworkList.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/Tag/Tag.js +54 -0
- package/lib/cjs/pre-ldls/components/Tag/Tag.js.map +7 -0
- package/lib/cjs/pre-ldls/components/Tag/Tag.stories.js +43 -0
- package/lib/cjs/pre-ldls/components/Tag/Tag.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.js +58 -12
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.js.map +3 -3
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js +105 -11
- package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js.map +3 -3
- package/lib/cjs/pre-ldls/components/index.js +6 -0
- package/lib/cjs/pre-ldls/components/index.js.map +2 -2
- package/lib/cjs/pre-ldls/libs/index.js +18 -3
- package/lib/cjs/pre-ldls/libs/index.js.map +2 -2
- package/lib/pre-ldls/components/AccountItem/AccountItem.d.ts +19 -0
- package/lib/pre-ldls/components/AccountItem/AccountItem.d.ts.map +1 -0
- package/lib/pre-ldls/components/AccountItem/AccountItem.js +46 -0
- package/lib/pre-ldls/components/AccountItem/AccountItem.js.map +1 -0
- package/lib/pre-ldls/components/AccountList/AccountList.d.ts +7 -0
- package/lib/pre-ldls/components/AccountList/AccountList.d.ts.map +1 -0
- package/lib/pre-ldls/components/AccountList/AccountList.js +8 -0
- package/lib/pre-ldls/components/AccountList/AccountList.js.map +1 -0
- package/lib/pre-ldls/components/Address/Address.d.ts +8 -0
- package/lib/pre-ldls/components/Address/Address.d.ts.map +1 -0
- package/lib/pre-ldls/components/Address/Address.js +27 -0
- package/lib/pre-ldls/components/Address/Address.js.map +1 -0
- package/lib/pre-ldls/components/AssetItem/AssetItem.d.ts +2 -1
- package/lib/pre-ldls/components/AssetItem/AssetItem.d.ts.map +1 -1
- package/lib/pre-ldls/components/AssetItem/AssetItem.js +6 -5
- package/lib/pre-ldls/components/AssetItem/AssetItem.js.map +1 -1
- package/lib/pre-ldls/components/AssetList/AssetList.d.ts +2 -1
- package/lib/pre-ldls/components/AssetList/AssetList.d.ts.map +1 -1
- package/lib/pre-ldls/components/AssetList/AssetList.js +4 -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 +4 -3
- package/lib/pre-ldls/components/Input/Input.js.map +1 -1
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.d.ts +8 -0
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.d.ts.map +1 -0
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.js +42 -0
- package/lib/pre-ldls/components/NetworkItem/NetworkItem.js.map +1 -0
- package/lib/pre-ldls/components/NetworkList/NetworkList.d.ts +11 -0
- package/lib/pre-ldls/components/NetworkList/NetworkList.d.ts.map +1 -0
- package/lib/pre-ldls/components/NetworkList/NetworkList.js +8 -0
- package/lib/pre-ldls/components/NetworkList/NetworkList.js.map +1 -0
- package/lib/pre-ldls/components/Tag/Tag.d.ts +5 -0
- package/lib/pre-ldls/components/Tag/Tag.d.ts.map +1 -0
- package/lib/pre-ldls/components/Tag/Tag.js +17 -0
- package/lib/pre-ldls/components/Tag/Tag.js.map +1 -0
- package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts +50 -5
- package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/lib/pre-ldls/components/VirtualList/VirtualList.js +46 -5
- package/lib/pre-ldls/components/VirtualList/VirtualList.js.map +1 -1
- package/lib/pre-ldls/components/index.d.ts +6 -0
- package/lib/pre-ldls/components/index.d.ts.map +1 -1
- package/lib/pre-ldls/components/index.js +6 -0
- package/lib/pre-ldls/components/index.js.map +1 -1
- package/lib/pre-ldls/libs/index.d.ts +9 -2
- package/lib/pre-ldls/libs/index.d.ts.map +1 -1
- package/lib/pre-ldls/libs/index.js +13 -4
- package/lib/pre-ldls/libs/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +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;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,UAAU,EACV,gCAAgC,EAChC,kCAAkC,EAClC,oCAAoC,CACrC;;;;;;;;;;;;;CAaF,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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type Network = {
|
|
3
|
+
name: string;
|
|
4
|
+
id: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const NetworkList: ({ networks, onClick, }: {
|
|
7
|
+
networks: Network[];
|
|
8
|
+
onClick: (networkId: string) => void;
|
|
9
|
+
}) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=NetworkList.d.ts.map
|
|
@@ -0,0 +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;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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React, { useCallback } from "react";
|
|
2
|
+
import { NetworkItem } from "../NetworkItem/NetworkItem";
|
|
3
|
+
import { VirtualList } from "../VirtualList/VirtualList";
|
|
4
|
+
export const NetworkList = ({ networks, onClick, }) => {
|
|
5
|
+
const renderNetworkItem = useCallback(({ name, id }) => React.createElement(NetworkItem, { name: name, onClick: () => onClick(id) }), [onClick]);
|
|
6
|
+
return React.createElement(VirtualList, { items: networks, itemHeight: 64, renderItem: renderNetworkItem });
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=NetworkList.js.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAmBzC,eAAO,MAAM,GAAG;cAA8B,SAAS;uBAQtD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Text } from "../../../components";
|
|
3
|
+
import { withTokens } from "../../libs";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
const Wrapper = styled.div `
|
|
6
|
+
${withTokens("colors-surface-transparent-subdued-default", "colors-content-subdued-default-default", "radius-xs", "spacing-xxxs")}
|
|
7
|
+
|
|
8
|
+
padding: 1px var(--spacing-xxxs);
|
|
9
|
+
border-radius: var(--radius-xs);
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
background-color: var(--colors-surface-transparent-subdued-default);
|
|
12
|
+
`;
|
|
13
|
+
export const Tag = ({ children }) => {
|
|
14
|
+
return (React.createElement(Wrapper, { "data-testid": "tag" },
|
|
15
|
+
React.createElement(Text, { color: "var(--colors-content-subdued-default-default)", fontSize: "10px", lineHeight: "16px" }, children)));
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;IACtB,UAAU,CACV,4CAA4C,EAC5C,wCAAwC,EACxC,WAAW,EACX,cAAc,CACf;;;;;;CAMF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,EAAE,QAAQ,EAA2B,EAAE,EAAE;IAC3D,OAAO,CACL,oBAAC,OAAO,mBAAa,KAAK;QACxB,oBAAC,IAAI,IAAC,KAAK,EAAC,+CAA+C,EAAC,QAAQ,EAAC,MAAM,EAAC,UAAU,EAAC,MAAM,IAC1F,QAAQ,CACJ,CACC,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,7 +1,52 @@
|
|
|
1
|
-
import React
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the VirtualList component, which efficiently renders large lists
|
|
4
|
+
* by virtualizing DOM nodes to improve performance.
|
|
5
|
+
*/
|
|
6
|
+
type VirtualListProps<T> = {
|
|
7
|
+
/**
|
|
8
|
+
* Height of each item in the list.
|
|
9
|
+
* This is used to calculate the total height of the list and the position of each item.
|
|
10
|
+
*/
|
|
4
11
|
itemHeight: number;
|
|
5
|
-
|
|
6
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Number of extra items to render outside the visible viewport for smoother scrolling.
|
|
14
|
+
* Defaults to 5.
|
|
15
|
+
*/
|
|
16
|
+
overscan?: number;
|
|
17
|
+
/**
|
|
18
|
+
* React component or node to display when the list is loading additional items.
|
|
19
|
+
* If not provided, a default loading spinner will be used.
|
|
20
|
+
*/
|
|
21
|
+
LoadingComponent?: React.ReactNode;
|
|
22
|
+
/**
|
|
23
|
+
* Indicates whether new items are currently being loaded.
|
|
24
|
+
*/
|
|
25
|
+
isLoading?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Indicates if there are more items to load.
|
|
28
|
+
*/
|
|
29
|
+
hasNextPage?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Number of items to check before the end of the list to trigger loading more items.
|
|
32
|
+
* Defaults to 5.
|
|
33
|
+
*/
|
|
34
|
+
threshold?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Callback function to be called when the user scrolls to the end of the visible items.
|
|
37
|
+
* This can be used to load more items when the user reaches the end of the list.
|
|
38
|
+
*/
|
|
39
|
+
onVisibleItemsScrollEnd?: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Function to render each item in the list.
|
|
42
|
+
* Receives a single value from the items array as an argument and should return a React node.
|
|
43
|
+
*/
|
|
44
|
+
renderItem: (item: T) => React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* The array of items which will be rendered
|
|
47
|
+
*/
|
|
48
|
+
items: T[];
|
|
49
|
+
};
|
|
50
|
+
export declare const VirtualList: <T>({ itemHeight, overscan, LoadingComponent, isLoading, hasNextPage, threshold, onVisibleItemsScrollEnd, items, renderItem, }: VirtualListProps<T>) => React.JSX.Element;
|
|
51
|
+
export {};
|
|
7
52
|
//# sourceMappingURL=VirtualList.d.ts.map
|
|
@@ -1 +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,
|
|
1
|
+
{"version":3,"file":"VirtualList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAYjD;;;GAGG;AACH,KAAK,gBAAgB,CAAC,CAAC,IAAI;IACzB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC;;;OAGG;IACH,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACzC;;OAEG;IACH,KAAK,EAAE,CAAC,EAAE,CAAC;CACZ,CAAC;AAQF,eAAO,MAAM,WAAW,kIAUrB,iBAAiB,CAAC,CAAC,sBA+DrB,CAAC"}
|
|
@@ -1,7 +1,48 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
3
|
+
import { Flex, InfiniteLoader } from "../../../components";
|
|
4
|
+
const DefaultLoadingComponent = () => (React.createElement(Flex, { justifyContent: "center", alignItems: "center", height: "76px" },
|
|
5
|
+
React.createElement(InfiniteLoader, null)));
|
|
6
|
+
export const VirtualList = ({ itemHeight, overscan = 5, LoadingComponent, isLoading, hasNextPage = false, threshold = 5, onVisibleItemsScrollEnd, items, renderItem, }) => {
|
|
7
|
+
const parentRef = useRef(null);
|
|
8
|
+
const rowVirtualizer = useVirtualizer({
|
|
9
|
+
count: hasNextPage ? items.length + 1 : items.length,
|
|
10
|
+
getScrollElement: () => parentRef.current,
|
|
11
|
+
estimateSize: () => itemHeight,
|
|
12
|
+
overscan,
|
|
13
|
+
});
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
const items = rowVirtualizer.getVirtualItems();
|
|
16
|
+
if (!items.length)
|
|
17
|
+
return;
|
|
18
|
+
const lastItem = items[items.length - 1];
|
|
19
|
+
if (lastItem.index >= items.length - 1 - threshold &&
|
|
20
|
+
hasNextPage &&
|
|
21
|
+
!isLoading &&
|
|
22
|
+
onVisibleItemsScrollEnd) {
|
|
23
|
+
onVisibleItemsScrollEnd();
|
|
24
|
+
}
|
|
25
|
+
}, [
|
|
26
|
+
hasNextPage,
|
|
27
|
+
onVisibleItemsScrollEnd,
|
|
28
|
+
items.length,
|
|
29
|
+
isLoading,
|
|
30
|
+
rowVirtualizer.getVirtualItems(),
|
|
31
|
+
]);
|
|
32
|
+
const showCustomLoadingComponent = !!LoadingComponent;
|
|
33
|
+
return (React.createElement("div", { ref: parentRef, style: { width: "100%", height: "100%", overflow: "auto" } },
|
|
34
|
+
React.createElement("div", { style: {
|
|
35
|
+
height: `${rowVirtualizer.getTotalSize()}px`,
|
|
36
|
+
width: "100%",
|
|
37
|
+
position: "relative",
|
|
38
|
+
} }, rowVirtualizer.getVirtualItems().map((virtualRow) => (React.createElement("div", { key: virtualRow.index, "data-index": virtualRow.index, ref: rowVirtualizer.measureElement, style: {
|
|
39
|
+
position: "absolute",
|
|
40
|
+
top: 0,
|
|
41
|
+
left: 0,
|
|
42
|
+
transform: `translateY(${virtualRow.start}px)`,
|
|
43
|
+
height: `${itemHeight}px`,
|
|
44
|
+
width: "100%",
|
|
45
|
+
} }, renderItem(items[virtualRow.index]))))),
|
|
46
|
+
isLoading && (showCustomLoadingComponent ? LoadingComponent : React.createElement(DefaultLoadingComponent, null))));
|
|
6
47
|
};
|
|
7
48
|
//# sourceMappingURL=VirtualList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"VirtualList.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AA2D3D,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,CACpC,oBAAC,IAAI,IAAC,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM;IAC7D,oBAAC,cAAc,OAAG,CACb,CACR,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAK,EAC9B,UAAU,EACV,QAAQ,GAAG,CAAC,EACZ,gBAAgB,EAChB,SAAS,EACT,WAAW,GAAG,KAAK,EACnB,SAAS,GAAG,CAAC,EACb,uBAAuB,EACvB,KAAK,EACL,UAAU,GACU,EAAE,EAAE;IACxB,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/C,MAAM,cAAc,GAAG,cAAc,CAAC;QACpC,KAAK,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM;QACpD,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO;QACzC,YAAY,EAAE,GAAG,EAAE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AG,UAAU,IAAI;gBACzB,KAAK,EAAE,MAAM;aACd,IAEA,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAChC,CACP,CAAC,CACE;QACL,SAAS,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,oBAAC,uBAAuB,OAAG,CAAC,CACvF,CACP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
export * from "./AccountItem/AccountItem";
|
|
2
|
+
export * from "./AccountList/AccountList";
|
|
3
|
+
export * from "./Address/Address";
|
|
1
4
|
export * from "./AssetItem/AssetItem";
|
|
2
5
|
export * from "./AssetList/AssetList";
|
|
3
6
|
export * from "./Input/Input";
|
|
7
|
+
export * from "./NetworkItem/NetworkItem";
|
|
8
|
+
export * from "./NetworkList/NetworkList";
|
|
4
9
|
export * from "./Search/Search";
|
|
10
|
+
export * from "./Tag/Tag";
|
|
5
11
|
export * from "./VirtualList/VirtualList";
|
|
6
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
export * from "./AccountItem/AccountItem";
|
|
2
|
+
export * from "./AccountList/AccountList";
|
|
3
|
+
export * from "./Address/Address";
|
|
1
4
|
export * from "./AssetItem/AssetItem";
|
|
2
5
|
export * from "./AssetList/AssetList";
|
|
3
6
|
export * from "./Input/Input";
|
|
7
|
+
export * from "./NetworkItem/NetworkItem";
|
|
8
|
+
export * from "./NetworkList/NetworkList";
|
|
4
9
|
export * from "./Search/Search";
|
|
10
|
+
export * from "./Tag/Tag";
|
|
5
11
|
export * from "./VirtualList/VirtualList";
|
|
6
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { DefaultTheme } from "styled-components";
|
|
2
2
|
import { ModeColors, SpacingScale } from "./design-tokens";
|
|
3
|
-
declare const
|
|
3
|
+
declare const overrideOther: {
|
|
4
4
|
readonly "radius-s": "8px";
|
|
5
|
+
readonly "radius-xs": "4px";
|
|
6
|
+
readonly "margin-xs": "8px";
|
|
7
|
+
readonly "margin-s": "16px";
|
|
8
|
+
readonly "margin-m": "24px";
|
|
9
|
+
readonly "margin-l": "32px";
|
|
10
|
+
readonly "spacing-xs": "12px";
|
|
11
|
+
readonly "spacing-xxs": "8px";
|
|
5
12
|
};
|
|
6
13
|
type ColorToken = `colors-${keyof ModeColors}`;
|
|
7
|
-
type OtherToken = keyof (SpacingScale & typeof
|
|
14
|
+
type OtherToken = keyof (SpacingScale & typeof overrideOther);
|
|
8
15
|
export declare const withTokens: (...usedTokens: Array<ColorToken | OtherToken>) => import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<DefaultTheme>>;
|
|
9
16
|
export {};
|
|
10
17
|
//# 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,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"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import memoize from "lodash/memoize";
|
|
2
2
|
import { css } from "styled-components";
|
|
3
3
|
import { dark, light, spacing } from "./design-tokens";
|
|
4
|
-
// Add temporarily missing tokens here
|
|
5
|
-
const
|
|
6
|
-
"radius-s": "8px",
|
|
4
|
+
// Add temporarily missing and override incorrect tokens here
|
|
5
|
+
const overrideOther = {
|
|
6
|
+
"radius-s": "8px", // missing from tokens
|
|
7
|
+
"radius-xs": "4px", // missing from tokens
|
|
8
|
+
"margin-xs": "8px", // redefines marging-xs
|
|
9
|
+
"margin-s": "16px", // redefines marging-s
|
|
10
|
+
"margin-m": "24px", // redefines marging-m
|
|
11
|
+
"margin-l": "32px", // redefines marging-l
|
|
12
|
+
"spacing-xs": "12px", // override from "spacing-xxs": "12px"
|
|
13
|
+
"spacing-xxs": "8px", // override from "spacing-xs": "8px"
|
|
7
14
|
};
|
|
8
15
|
// override colours based on Figma differing from design-tokens.ts
|
|
9
16
|
const overrideColor = {
|
|
@@ -25,7 +32,9 @@ export const withTokens = (...usedTokens) => {
|
|
|
25
32
|
return [];
|
|
26
33
|
return [[`--${color}`, value]];
|
|
27
34
|
});
|
|
28
|
-
const otherEntries = [spacing,
|
|
35
|
+
const otherEntries = [spacing, overrideOther]
|
|
36
|
+
.flatMap(Object.entries)
|
|
37
|
+
.flatMap(([key, value]) => {
|
|
29
38
|
if (!usedTokens.includes(key))
|
|
30
39
|
return [];
|
|
31
40
|
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,
|
|
1
|
+
{"version":3,"file":"index.js","source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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.
|
|
3
|
+
"version": "0.25.0-nightly.0",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Live Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": {
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@floating-ui/react-dom": "^0.4.0",
|
|
64
|
+
"@tanstack/react-virtual": "3.13.6",
|
|
64
65
|
"@tippyjs/react": "^4.2.6",
|
|
65
66
|
"color": "^4.0.0",
|
|
66
67
|
"embla-carousel-autoplay": "8.4.0",
|
|
@@ -71,7 +72,6 @@
|
|
|
71
72
|
"react-select": "^5.2.1",
|
|
72
73
|
"react-spring": "8.0.27",
|
|
73
74
|
"react-transition-group": "^4.4.2",
|
|
74
|
-
"react-virtualized-auto-sizer": "1.0.24",
|
|
75
75
|
"react-window": "^1.8.6",
|
|
76
76
|
"styled-system": "^5.1.5",
|
|
77
77
|
"@ledgerhq/crypto-icons-ui": "^1.13.0",
|