@ledgerhq/react-ui 0.35.2-nightly.0 → 0.36.0-nightly.2

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.
Files changed (24) hide show
  1. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.js +39 -0
  2. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.js.map +7 -0
  3. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js +47 -0
  4. package/lib/cjs/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js.map +7 -0
  5. package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.js +28 -21
  6. package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.js.map +2 -2
  7. package/lib/cjs/pre-ldls/components/index.js +1 -0
  8. package/lib/cjs/pre-ldls/components/index.js.map +2 -2
  9. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.d.ts +6 -0
  10. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.d.ts.map +1 -0
  11. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.js +6 -0
  12. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.js.map +1 -0
  13. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.d.ts +10 -0
  14. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.d.ts.map +1 -0
  15. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js +20 -0
  16. package/lib/pre-ldls/components/ApyIndicator/ApyIndicator.stories.js.map +1 -0
  17. package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts.map +1 -1
  18. package/lib/pre-ldls/components/VirtualList/VirtualList.js +16 -12
  19. package/lib/pre-ldls/components/VirtualList/VirtualList.js.map +1 -1
  20. package/lib/pre-ldls/components/index.d.ts +1 -0
  21. package/lib/pre-ldls/components/index.d.ts.map +1 -1
  22. package/lib/pre-ldls/components/index.js +1 -0
  23. package/lib/pre-ldls/components/index.js.map +1 -1
  24. package/package.json +1 -1
@@ -0,0 +1,39 @@
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 ApyIndicator_exports = {};
30
+ __export(ApyIndicator_exports, {
31
+ ApyIndicator: () => ApyIndicator
32
+ });
33
+ module.exports = __toCommonJS(ApyIndicator_exports);
34
+ var import_Tag = require("../Tag/Tag");
35
+ var import_react = __toESM(require("react"));
36
+ const ApyIndicator = ({ value, type }) => {
37
+ return /* @__PURE__ */ import_react.default.createElement(import_Tag.Tag, { spacing: "md" }, `~ ${value}% ${type}`);
38
+ };
39
+ //# sourceMappingURL=ApyIndicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/pre-ldls/components/ApyIndicator/ApyIndicator.tsx"],
4
+ "sourcesContent": ["import { Tag } from \"../Tag/Tag\";\nimport React from \"react\";\n\nexport const ApyIndicator = ({ value, type }: { value: number; type: \"NRR\" | \"APY\" | \"APR\" }) => {\n return <Tag spacing=\"md\">{`~ ${value}% ${type}`}</Tag>;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoB;AACpB,mBAAkB;AAEX,MAAM,eAAe,CAAC,EAAE,OAAO,KAAK,MAAsD;AAC/F,SAAO,6BAAAA,QAAA,cAAC,kBAAI,SAAQ,QAAM,KAAK,KAAK,KAAK,IAAI,EAAG;AAClD;",
6
+ "names": ["React"]
7
+ }
@@ -0,0 +1,47 @@
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 ApyIndicator_stories_exports = {};
20
+ __export(ApyIndicator_stories_exports, {
21
+ APR: () => APR,
22
+ APY: () => APY,
23
+ NRR: () => NRR,
24
+ TestApyIndicator: () => TestApyIndicator,
25
+ default: () => ApyIndicator_stories_default
26
+ });
27
+ module.exports = __toCommonJS(ApyIndicator_stories_exports);
28
+ var import_ApyIndicator = require("./ApyIndicator");
29
+ var import_test = require("@storybook/test");
30
+ const meta = {
31
+ component: import_ApyIndicator.ApyIndicator,
32
+ title: "PreLdls/Components/ApyIndicator",
33
+ tags: ["autodocs"],
34
+ args: { value: 30, type: "APY" }
35
+ };
36
+ var ApyIndicator_stories_default = meta;
37
+ const APY = { args: { value: 30, type: "APY" } };
38
+ const APR = { args: { value: 30, type: "APR" } };
39
+ const NRR = { args: { value: 30, type: "NRR" } };
40
+ const TestApyIndicator = {
41
+ play: async ({ canvasElement }) => {
42
+ const canvas = (0, import_test.within)(canvasElement);
43
+ const input = canvas.getByTestId("tag");
44
+ await (0, import_test.expect)(input).toHaveTextContent("~ 30% APY");
45
+ }
46
+ };
47
+ //# sourceMappingURL=ApyIndicator.stories.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../src/pre-ldls/components/ApyIndicator/ApyIndicator.stories.ts"],
4
+ "sourcesContent": ["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { ApyIndicator } from \"./ApyIndicator\";\nimport { expect, within } from \"@storybook/test\";\n\nconst meta: Meta<typeof ApyIndicator> = {\n component: ApyIndicator,\n title: \"PreLdls/Components/ApyIndicator\",\n tags: [\"autodocs\"],\n args: { value: 30, type: \"APY\" },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof ApyIndicator>;\n\nexport const APY: Story = { args: { value: 30, type: \"APY\" } };\nexport const APR: Story = { args: { value: 30, type: \"APR\" } };\nexport const NRR: Story = { args: { value: 30, type: \"NRR\" } };\n\nexport const TestApyIndicator: Story = {\n play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {\n const canvas = within(canvasElement);\n const input = canvas.getByTestId(\"tag\");\n await expect(input).toHaveTextContent(\"~ 30% APY\");\n },\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAA6B;AAC7B,kBAA+B;AAE/B,MAAM,OAAkC;AAAA,EACtC,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM,EAAE,OAAO,IAAI,MAAM,MAAM;AACjC;AACA,IAAO,+BAAQ;AAIR,MAAM,MAAa,EAAE,MAAM,EAAE,OAAO,IAAI,MAAM,MAAM,EAAE;AACtD,MAAM,MAAa,EAAE,MAAM,EAAE,OAAO,IAAI,MAAM,MAAM,EAAE;AACtD,MAAM,MAAa,EAAE,MAAM,EAAE,OAAO,IAAI,MAAM,MAAM,EAAE;AAEtD,MAAM,mBAA0B;AAAA,EACrC,MAAM,OAAO,EAAE,cAAc,MAAsC;AACjE,UAAM,aAAS,oBAAO,aAAa;AACnC,UAAM,QAAQ,OAAO,YAAY,KAAK;AACtC,cAAM,oBAAO,KAAK,EAAE,kBAAkB,WAAW;AAAA,EACnD;AACF;",
6
+ "names": []
7
+ }
@@ -87,21 +87,25 @@ const VirtualList = ({
87
87
  estimateSize: () => itemHeight,
88
88
  scrollToFn
89
89
  });
90
- const virtualItems = rowVirtualizer.getVirtualItems();
91
90
  (0, import_react.useEffect)(() => {
92
91
  if (scrollToTop && parentRef.current) {
93
92
  scrollToFn(0, { behavior: "smooth" }, { scrollElement: parentRef.current });
94
93
  }
95
94
  }, [scrollToTop, scrollToFn]);
95
+ const virtualItems = rowVirtualizer.getVirtualItems();
96
96
  (0, import_react.useEffect)(() => {
97
97
  if (!virtualItems.length)
98
98
  return;
99
99
  const lastItem = virtualItems[virtualItems.length - 1];
100
- if (lastItem.index >= virtualItems.length - 1 - threshold && hasNextPage && !isLoading && onVisibleItemsScrollEnd) {
100
+ if (lastItem.index >= items.length - 1 - threshold && hasNextPage && !isLoading && onVisibleItemsScrollEnd) {
101
101
  onVisibleItemsScrollEnd();
102
102
  }
103
- }, [hasNextPage, onVisibleItemsScrollEnd, isLoading, threshold, virtualItems]);
103
+ }, [hasNextPage, onVisibleItemsScrollEnd, items.length, isLoading, threshold, virtualItems]);
104
104
  const showCustomLoadingComponent = !!LoadingComponent;
105
+ const Loading = (0, import_react.useCallback)(
106
+ () => showCustomLoadingComponent ? LoadingComponent : /* @__PURE__ */ import_react.default.createElement(DefaultLoadingComponent, null),
107
+ [showCustomLoadingComponent, LoadingComponent]
108
+ );
105
109
  return /* @__PURE__ */ import_react.default.createElement(
106
110
  "div",
107
111
  {
@@ -119,23 +123,26 @@ const VirtualList = ({
119
123
  position: "relative"
120
124
  }
121
125
  },
122
- rowVirtualizer.getVirtualItems().map((virtualRow) => /* @__PURE__ */ import_react.default.createElement(
123
- "div",
124
- {
125
- key: virtualRow.index,
126
- "data-index": virtualRow.index,
127
- ref: rowVirtualizer.measureElement,
128
- style: {
129
- position: "absolute",
130
- top: 0,
131
- left: 0,
132
- transform: `translateY(${virtualRow.start}px)`,
133
- height: `${itemHeight}px`,
134
- width: "100%"
135
- }
136
- },
137
- renderItem(items[virtualRow.index])
138
- )),
126
+ rowVirtualizer.getVirtualItems().map((virtualRow) => {
127
+ const item = items[virtualRow.index];
128
+ return /* @__PURE__ */ import_react.default.createElement(
129
+ "div",
130
+ {
131
+ key: virtualRow.index,
132
+ "data-index": virtualRow.index,
133
+ ref: rowVirtualizer.measureElement,
134
+ style: {
135
+ position: "absolute",
136
+ top: 0,
137
+ left: 0,
138
+ transform: `translateY(${virtualRow.start}px)`,
139
+ height: `${itemHeight}px`,
140
+ width: "100%"
141
+ }
142
+ },
143
+ item ? renderItem(item) : /* @__PURE__ */ import_react.default.createElement(Loading, null)
144
+ );
145
+ }),
139
146
  bottomComponent && /* @__PURE__ */ import_react.default.createElement(
140
147
  "div",
141
148
  {
@@ -149,7 +156,7 @@ const VirtualList = ({
149
156
  bottomComponent
150
157
  )
151
158
  ),
152
- isLoading && (showCustomLoadingComponent ? LoadingComponent : /* @__PURE__ */ import_react.default.createElement(DefaultLoadingComponent, null))
159
+ isLoading && /* @__PURE__ */ import_react.default.createElement(Loading, null)
153
160
  );
154
161
  };
155
162
  //# sourceMappingURL=VirtualList.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],
4
- "sourcesContent": ["import React, { useEffect, useRef, useCallback } from \"react\";\nimport { useVirtualizer } from \"@tanstack/react-virtual\";\nimport { Flex, InfiniteLoader } from \"../../../components\";\n\ninterface VirtualItem {\n key: string | number | bigint;\n index: number;\n start: number;\n end: number;\n size: number;\n}\n\n/**\n * Props for the VirtualList component, which efficiently renders large lists\n * by virtualizing DOM nodes to improve performance.\n */\ntype VirtualListProps<T> = {\n /**\n * Gap between items in the list.\n */\n gap?: number;\n /**\n * Height of each item in the list.\n * This is used to calculate the total height of the list and the position of each item.\n */\n itemHeight: number;\n /**\n * Number of extra items to render outside the visible viewport for smoother scrolling.\n * Defaults to 5.\n */\n overscan?: number;\n /**\n * React component or node to display when the list is loading additional items.\n * If not provided, a default loading spinner will be used.\n */\n LoadingComponent?: React.ReactNode;\n /**\n * Indicates whether new items are currently being loaded.\n */\n isLoading?: boolean;\n /**\n * Indicates if there are more items to load.\n */\n hasNextPage?: boolean;\n /**\n * Number of items to check before the end of the list to trigger loading more items.\n * Defaults to 5.\n */\n threshold?: number;\n /**\n * Callback function to be called when the user scrolls to the end of the visible items.\n * This can be used to load more items when the user reaches the end of the list.\n */\n onVisibleItemsScrollEnd?: () => void;\n /**\n * Function to render each item in the list.\n * Receives a single value from the items array as an argument and should return a React node.\n */\n renderItem: (item: T) => React.ReactNode;\n /**\n * The array of items which will be rendered\n */\n items: T[];\n /**\n * When set to true, the list will scroll to the top\n */\n scrollToTop?: boolean;\n /**\n * React component or node to display at the bottom of the list, after all items.\n */\n bottomComponent?: React.ReactNode;\n};\n\nconst DefaultLoadingComponent = () => (\n <Flex justifyContent=\"center\" alignItems=\"center\" height=\"76px\">\n <InfiniteLoader />\n </Flex>\n);\n\nfunction easeInOutCubic(t: number) {\n return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;\n}\n\nexport const VirtualList = <T,>({\n gap,\n hasNextPage = false,\n isLoading,\n itemHeight,\n items,\n LoadingComponent,\n onVisibleItemsScrollEnd,\n overscan = 5,\n renderItem,\n scrollToTop = false,\n bottomComponent,\n threshold = 5,\n}: VirtualListProps<T>) => {\n const parentRef = useRef<HTMLDivElement>(null);\n\n const scrollToFn = useCallback(\n (\n offset: number,\n options: { adjustments?: number; behavior?: \"auto\" | \"smooth\" },\n instance: { scrollElement: HTMLElement | null },\n ) => {\n const element = instance.scrollElement;\n if (!element) return;\n\n const duration = options.behavior === \"smooth\" ? 100 : 0;\n\n if (duration === 0) {\n element.scrollTop = offset;\n return;\n }\n\n const startTime = performance.now();\n const startTop = element.scrollTop;\n const distanceToScroll = offset - startTop;\n\n const scrollStep = (currentTime: number) => {\n const elapsed = currentTime - startTime;\n const progress = Math.min(elapsed / duration, 1);\n\n const easedProgress = easeInOutCubic(progress);\n\n element.scrollTop = startTop + distanceToScroll * easedProgress;\n\n if (progress < 1) {\n requestAnimationFrame(scrollStep);\n }\n };\n\n requestAnimationFrame(scrollStep);\n },\n [],\n );\n\n const rowVirtualizer = useVirtualizer({\n gap,\n count: hasNextPage ? items.length + 1 : items.length,\n overscan,\n getScrollElement: () => parentRef.current,\n estimateSize: () => itemHeight,\n scrollToFn,\n });\n\n const virtualItems = rowVirtualizer.getVirtualItems();\n\n useEffect(() => {\n if (scrollToTop && parentRef.current) {\n scrollToFn(0, { behavior: \"smooth\" }, { scrollElement: parentRef.current });\n }\n }, [scrollToTop, scrollToFn]);\n\n useEffect(() => {\n if (!virtualItems.length) return;\n const lastItem = virtualItems[virtualItems.length - 1];\n\n if (\n lastItem.index >= virtualItems.length - 1 - threshold &&\n hasNextPage &&\n !isLoading &&\n onVisibleItemsScrollEnd\n ) {\n onVisibleItemsScrollEnd();\n }\n }, [hasNextPage, onVisibleItemsScrollEnd, isLoading, threshold, virtualItems]);\n\n const showCustomLoadingComponent = !!LoadingComponent;\n\n return (\n <div\n ref={parentRef}\n style={{ width: \"100%\", height: \"100%\", overflow: \"auto\", scrollbarWidth: \"none\" }}\n >\n <div\n style={{\n height: `${rowVirtualizer.getTotalSize()}px`,\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n position: \"relative\",\n }}\n >\n {rowVirtualizer.getVirtualItems().map((virtualRow: VirtualItem) => (\n <div\n key={virtualRow.index}\n data-index={virtualRow.index}\n ref={rowVirtualizer.measureElement}\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n transform: `translateY(${virtualRow.start}px)`,\n height: `${itemHeight}px`,\n width: \"100%\",\n }}\n >\n {renderItem(items[virtualRow.index])}\n </div>\n ))}\n {bottomComponent && (\n <div\n style={{\n position: \"absolute\",\n top: `${rowVirtualizer.getTotalSize()}px`,\n left: 0,\n width: \"100%\",\n }}\n >\n {bottomComponent}\n </div>\n )}\n </div>\n {isLoading && (showCustomLoadingComponent ? LoadingComponent : <DefaultLoadingComponent />)}\n </div>\n );\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsD;AACtD,2BAA+B;AAC/B,wBAAqC;AAuErC,MAAM,0BAA0B,MAC9B,6BAAAA,QAAA,cAAC,0BAAK,gBAAe,UAAS,YAAW,UAAS,QAAO,UACvD,6BAAAA,QAAA,cAAC,sCAAe,CAClB;AAGF,SAAS,eAAe,GAAW;AACjC,SAAO,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,CAAC,IAAI;AACjE;AAEO,MAAM,cAAc,CAAK;AAAA,EAC9B;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,YAAY;AACd,MAA2B;AACzB,QAAM,gBAAY,qBAAuB,IAAI;AAE7C,QAAM,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AAM,6BAA6B,CAAC,CAAC;AAErC,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,KAAK;AAAA,MACL,OAAO,EAAE,OAAO,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,gBAAgB,OAAO;AAAA;AAAA,IAEjF,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL,QAAQ,GAAG,eAAe,aAAa,CAAC;AAAA,UACxC,OAAO;AAAA,UACP,SAAS;AAAA,UACT,eAAe;AAAA,UACf,UAAU;AAAA,QACZ;AAAA;AAAA,MAEC,eAAe,gBAAgB,EAAE,IAAI,CAAC,eACrC,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,KAAK,WAAW;AAAA,UAChB,cAAY,WAAW;AAAA,UACvB,KAAK,eAAe;AAAA,UACpB,OAAO;AAAA,YACL,UAAU;AAAA,YACV,KAAK;AAAA,YACL,MAAM;AAAA,YACN,WAAW,cAAc,WAAW,KAAK;AAAA,YACzC,QAAQ,GAAG,UAAU;AAAA,YACrB,OAAO;AAAA,UACT;AAAA;AAAA,QAEC,WAAW,MAAM,WAAW,KAAK,CAAC;AAAA,MACrC,CACD;AAAA,MACA,mBACC,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,UAAU;AAAA,YACV,KAAK,GAAG,eAAe,aAAa,CAAC;AAAA,YACrC,MAAM;AAAA,YACN,OAAO;AAAA,UACT;AAAA;AAAA,QAEC;AAAA,MACH;AAAA,IAEJ;AAAA,IACC,cAAc,6BAA6B,mBAAmB,6BAAAA,QAAA,cAAC,6BAAwB;AAAA,EAC1F;AAEJ;",
4
+ "sourcesContent": ["import React, { useEffect, useRef, useCallback } from \"react\";\nimport { useVirtualizer } from \"@tanstack/react-virtual\";\nimport { Flex, InfiniteLoader } from \"../../../components\";\n\ninterface VirtualItem {\n key: string | number | bigint;\n index: number;\n start: number;\n end: number;\n size: number;\n}\n\n/**\n * Props for the VirtualList component, which efficiently renders large lists\n * by virtualizing DOM nodes to improve performance.\n */\ntype VirtualListProps<T> = {\n /**\n * Gap between items in the list.\n */\n gap?: number;\n /**\n * Height of each item in the list.\n * This is used to calculate the total height of the list and the position of each item.\n */\n itemHeight: number;\n /**\n * Number of extra items to render outside the visible viewport for smoother scrolling.\n * Defaults to 5.\n */\n overscan?: number;\n /**\n * React component or node to display when the list is loading additional items.\n * If not provided, a default loading spinner will be used.\n */\n LoadingComponent?: React.ReactNode;\n /**\n * Indicates whether new items are currently being loaded.\n */\n isLoading?: boolean;\n /**\n * Indicates if there are more items to load.\n */\n hasNextPage?: boolean;\n /**\n * Number of items to check before the end of the list to trigger loading more items.\n * Defaults to 5.\n */\n threshold?: number;\n /**\n * Callback function to be called when the user scrolls to the end of the visible items.\n * This can be used to load more items when the user reaches the end of the list.\n */\n onVisibleItemsScrollEnd?: () => void;\n /**\n * Function to render each item in the list.\n * Receives a single value from the items array as an argument and should return a React node.\n */\n renderItem: (item: T) => React.ReactNode;\n /**\n * The array of items which will be rendered\n */\n items: T[];\n /**\n * When set to true, the list will scroll to the top\n */\n scrollToTop?: boolean;\n /**\n * React component or node to display at the bottom of the list, after all items.\n */\n bottomComponent?: React.ReactNode;\n};\n\nconst DefaultLoadingComponent = () => (\n <Flex justifyContent=\"center\" alignItems=\"center\" height=\"76px\">\n <InfiniteLoader />\n </Flex>\n);\n\nfunction easeInOutCubic(t: number) {\n return t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2;\n}\n\nexport const VirtualList = <T,>({\n gap,\n hasNextPage = false,\n isLoading,\n itemHeight,\n items,\n LoadingComponent,\n onVisibleItemsScrollEnd,\n overscan = 5,\n renderItem,\n scrollToTop = false,\n bottomComponent,\n threshold = 5,\n}: VirtualListProps<T>) => {\n const parentRef = useRef<HTMLDivElement>(null);\n\n const scrollToFn = useCallback(\n (\n offset: number,\n options: { adjustments?: number; behavior?: \"auto\" | \"smooth\" },\n instance: { scrollElement: HTMLElement | null },\n ) => {\n const element = instance.scrollElement;\n if (!element) return;\n\n const duration = options.behavior === \"smooth\" ? 100 : 0;\n\n if (duration === 0) {\n element.scrollTop = offset;\n return;\n }\n\n const startTime = performance.now();\n const startTop = element.scrollTop;\n const distanceToScroll = offset - startTop;\n\n const scrollStep = (currentTime: number) => {\n const elapsed = currentTime - startTime;\n const progress = Math.min(elapsed / duration, 1);\n\n const easedProgress = easeInOutCubic(progress);\n\n element.scrollTop = startTop + distanceToScroll * easedProgress;\n\n if (progress < 1) {\n requestAnimationFrame(scrollStep);\n }\n };\n\n requestAnimationFrame(scrollStep);\n },\n [],\n );\n\n const rowVirtualizer = useVirtualizer({\n gap,\n count: hasNextPage ? items.length + 1 : items.length,\n overscan,\n getScrollElement: () => parentRef.current,\n estimateSize: () => itemHeight,\n scrollToFn,\n });\n\n useEffect(() => {\n if (scrollToTop && parentRef.current) {\n scrollToFn(0, { behavior: \"smooth\" }, { scrollElement: parentRef.current });\n }\n }, [scrollToTop, scrollToFn]);\n\n const virtualItems = rowVirtualizer.getVirtualItems();\n\n useEffect(() => {\n if (!virtualItems.length) return;\n const lastItem = virtualItems[virtualItems.length - 1];\n\n if (\n lastItem.index >= items.length - 1 - threshold &&\n hasNextPage &&\n !isLoading &&\n onVisibleItemsScrollEnd\n ) {\n onVisibleItemsScrollEnd();\n }\n }, [hasNextPage, onVisibleItemsScrollEnd, items.length, isLoading, threshold, virtualItems]);\n\n const showCustomLoadingComponent = !!LoadingComponent;\n\n const Loading = useCallback(\n () => (showCustomLoadingComponent ? LoadingComponent : <DefaultLoadingComponent />),\n [showCustomLoadingComponent, LoadingComponent],\n );\n\n return (\n <div\n ref={parentRef}\n style={{ width: \"100%\", height: \"100%\", overflow: \"auto\", scrollbarWidth: \"none\" }}\n >\n <div\n style={{\n height: `${rowVirtualizer.getTotalSize()}px`,\n width: \"100%\",\n display: \"flex\",\n flexDirection: \"column\",\n position: \"relative\",\n }}\n >\n {rowVirtualizer.getVirtualItems().map((virtualRow: VirtualItem) => {\n const item = items[virtualRow.index];\n\n return (\n <div\n key={virtualRow.index}\n data-index={virtualRow.index}\n ref={rowVirtualizer.measureElement}\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n transform: `translateY(${virtualRow.start}px)`,\n height: `${itemHeight}px`,\n width: \"100%\",\n }}\n >\n {item ? renderItem(item) : <Loading />}\n </div>\n );\n })}\n {bottomComponent && (\n <div\n style={{\n position: \"absolute\",\n top: `${rowVirtualizer.getTotalSize()}px`,\n left: 0,\n width: \"100%\",\n }}\n >\n {bottomComponent}\n </div>\n )}\n </div>\n {isLoading && <Loading />}\n </div>\n );\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAsD;AACtD,2BAA+B;AAC/B,wBAAqC;AAuErC,MAAM,0BAA0B,MAC9B,6BAAAA,QAAA,cAAC,0BAAK,gBAAe,UAAS,YAAW,UAAS,QAAO,UACvD,6BAAAA,QAAA,cAAC,sCAAe,CAClB;AAGF,SAAS,eAAe,GAAW;AACjC,SAAO,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,IAAI,KAAK,IAAI,KAAK,IAAI,GAAG,CAAC,IAAI;AACjE;AAEO,MAAM,cAAc,CAAK;AAAA,EAC9B;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,YAAY;AACd,MAA2B;AACzB,QAAM,gBAAY,qBAAuB,IAAI;AAE7C,QAAM,iBAAa;AAAA,IACjB,CACE,QACA,SACA,aACG;AACH,YAAM,UAAU,SAAS;AACzB,UAAI,CAAC;AAAS;AAEd,YAAM,WAAW,QAAQ,aAAa,WAAW,MAAM;AAEvD,UAAI,aAAa,GAAG;AAClB,gBAAQ,YAAY;AACpB;AAAA,MACF;AAEA,YAAM,YAAY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;AAAA,MACC,KAAK;AAAA,MACL,OAAO,EAAE,OAAO,QAAQ,QAAQ,QAAQ,UAAU,QAAQ,gBAAgB,OAAO;AAAA;AAAA,IAEjF,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO;AAAA,UACL,QAAQ,GAAG,eAAe,aAAa,CAAC;AAAA,UACxC,OAAO;AAAA,UACP,SAAS;AAAA,UACT,eAAe;AAAA,UACf,UAAU;AAAA,QACZ;AAAA;AAAA,MAEC,eAAe,gBAAgB,EAAE,IAAI,CAAC,eAA4B;AACjE,cAAM,OAAO,MAAM,WAAW,KAAK;AAEnC,eACE,6BAAAA,QAAA;AAAA,UAAC;AAAA;AAAA,YACC,KAAK,WAAW;AAAA,YAChB,cAAY,WAAW;AAAA,YACvB,KAAK,eAAe;AAAA,YACpB,OAAO;AAAA,cACL,UAAU;AAAA,cACV,KAAK;AAAA,cACL,MAAM;AAAA,cACN,WAAW,cAAc,WAAW,KAAK;AAAA,cACzC,QAAQ,GAAG,UAAU;AAAA,cACrB,OAAO;AAAA,YACT;AAAA;AAAA,UAEC,OAAO,WAAW,IAAI,IAAI,6BAAAA,QAAA,cAAC,aAAQ;AAAA,QACtC;AAAA,MAEJ,CAAC;AAAA,MACA,mBACC,6BAAAA,QAAA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO;AAAA,YACL,UAAU;AAAA,YACV,KAAK,GAAG,eAAe,aAAa,CAAC;AAAA,YACrC,MAAM;AAAA,YACN,OAAO;AAAA,UACT;AAAA;AAAA,QAEC;AAAA,MACH;AAAA,IAEJ;AAAA,IACC,aAAa,6BAAAA,QAAA,cAAC,aAAQ;AAAA,EACzB;AAEJ;",
6
6
  "names": ["React"]
7
7
  }
@@ -21,6 +21,7 @@ __reExport(components_exports, require("./Address/Address"), module.exports);
21
21
  __reExport(components_exports, require("./AssetItem/AssetItem"), module.exports);
22
22
  __reExport(components_exports, require("./AssetList/AssetList"), module.exports);
23
23
  __reExport(components_exports, require("./CardButton/CardButton"), module.exports);
24
+ __reExport(components_exports, require("./ApyIndicator/ApyIndicator"), module.exports);
24
25
  __reExport(components_exports, require("./Input/Input"), module.exports);
25
26
  __reExport(components_exports, require("./NetworkItem/NetworkItem"), module.exports);
26
27
  __reExport(components_exports, require("./NetworkList/NetworkList"), module.exports);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/pre-ldls/components/index.ts"],
4
- "sourcesContent": ["export * from \"./AccountItem/AccountItem\";\nexport * from \"./AccountList/AccountList\";\nexport * from \"./Address/Address\";\nexport * from \"./AssetItem/AssetItem\";\nexport * from \"./AssetList/AssetList\";\nexport * from \"./CardButton/CardButton\";\nexport * from \"./Input/Input\";\nexport * from \"./NetworkItem/NetworkItem\";\nexport * from \"./NetworkList/NetworkList\";\nexport * from \"./Search/Search\";\nexport * from \"./Tag/Tag\";\nexport * from \"./TextInput/TextInput\";\nexport * from \"./VirtualList/VirtualList\";\n"],
5
- "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,sCAAd;AACA,+BAAc,sCADd;AAEA,+BAAc,8BAFd;AAGA,+BAAc,kCAHd;AAIA,+BAAc,kCAJd;AAKA,+BAAc,oCALd;AAMA,+BAAc,0BANd;AAOA,+BAAc,sCAPd;AAQA,+BAAc,sCARd;AASA,+BAAc,4BATd;AAUA,+BAAc,sBAVd;AAWA,+BAAc,kCAXd;AAYA,+BAAc,sCAZd;",
4
+ "sourcesContent": ["export * from \"./AccountItem/AccountItem\";\nexport * from \"./AccountList/AccountList\";\nexport * from \"./Address/Address\";\nexport * from \"./AssetItem/AssetItem\";\nexport * from \"./AssetList/AssetList\";\nexport * from \"./CardButton/CardButton\";\nexport * from \"./ApyIndicator/ApyIndicator\";\nexport * from \"./Input/Input\";\nexport * from \"./NetworkItem/NetworkItem\";\nexport * from \"./NetworkList/NetworkList\";\nexport * from \"./Search/Search\";\nexport * from \"./Tag/Tag\";\nexport * from \"./TextInput/TextInput\";\nexport * from \"./VirtualList/VirtualList\";\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA,+BAAc,sCAAd;AACA,+BAAc,sCADd;AAEA,+BAAc,8BAFd;AAGA,+BAAc,kCAHd;AAIA,+BAAc,kCAJd;AAKA,+BAAc,oCALd;AAMA,+BAAc,wCANd;AAOA,+BAAc,0BAPd;AAQA,+BAAc,sCARd;AASA,+BAAc,sCATd;AAUA,+BAAc,4BAVd;AAWA,+BAAc,sBAXd;AAYA,+BAAc,kCAZd;AAaA,+BAAc,sCAbd;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ export declare const ApyIndicator: ({ value, type }: {
3
+ value: number;
4
+ type: "NRR" | "APY" | "APR";
5
+ }) => React.JSX.Element;
6
+ //# sourceMappingURL=ApyIndicator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApyIndicator.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/ApyIndicator/ApyIndicator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,eAAO,MAAM,YAAY;WAA8B,MAAM;UAAQ,KAAK,GAAG,KAAK,GAAG,KAAK;uBAEzF,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { Tag } from "../Tag/Tag";
2
+ import React from "react";
3
+ export const ApyIndicator = ({ value, type }) => {
4
+ return React.createElement(Tag, { spacing: "md" }, `~ ${value}% ${type}`);
5
+ };
6
+ //# sourceMappingURL=ApyIndicator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApyIndicator.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/ApyIndicator/ApyIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAkD,EAAE,EAAE;IAC9F,OAAO,oBAAC,GAAG,IAAC,OAAO,EAAC,IAAI,IAAE,KAAK,KAAK,KAAK,IAAI,EAAE,CAAO,CAAC;AACzD,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { ApyIndicator } from "./ApyIndicator";
3
+ declare const meta: Meta<typeof ApyIndicator>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof ApyIndicator>;
6
+ export declare const APY: Story;
7
+ export declare const APR: Story;
8
+ export declare const NRR: Story;
9
+ export declare const TestApyIndicator: Story;
10
+ //# sourceMappingURL=ApyIndicator.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApyIndicator.stories.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/ApyIndicator/ApyIndicator.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAKnC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,YAAY,CAAC,CAAC;AAE3C,eAAO,MAAM,GAAG,EAAE,KAA4C,CAAC;AAC/D,eAAO,MAAM,GAAG,EAAE,KAA4C,CAAC;AAC/D,eAAO,MAAM,GAAG,EAAE,KAA4C,CAAC;AAE/D,eAAO,MAAM,gBAAgB,EAAE,KAM9B,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { ApyIndicator } from "./ApyIndicator";
2
+ import { expect, within } from "@storybook/test";
3
+ const meta = {
4
+ component: ApyIndicator,
5
+ title: "PreLdls/Components/ApyIndicator",
6
+ tags: ["autodocs"],
7
+ args: { value: 30, type: "APY" },
8
+ };
9
+ export default meta;
10
+ export const APY = { args: { value: 30, type: "APY" } };
11
+ export const APR = { args: { value: 30, type: "APR" } };
12
+ export const NRR = { args: { value: 30, type: "NRR" } };
13
+ export const TestApyIndicator = {
14
+ play: async ({ canvasElement }) => {
15
+ const canvas = within(canvasElement);
16
+ const input = canvas.getByTestId("tag");
17
+ await expect(input).toHaveTextContent("~ 30% APY");
18
+ },
19
+ };
20
+ //# sourceMappingURL=ApyIndicator.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApyIndicator.stories.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/ApyIndicator/ApyIndicator.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,IAAI,GAA8B;IACtC,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,iCAAiC;IACxC,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;CACjC,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,GAAG,GAAU,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,GAAG,GAAU,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;AAC/D,MAAM,CAAC,MAAM,GAAG,GAAU,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;AAE/D,MAAM,CAAC,MAAM,gBAAgB,GAAU;IACrC,IAAI,EAAE,KAAK,EAAE,EAAE,aAAa,EAAkC,EAAE,EAAE;QAChE,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;QACrC,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACxC,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC;IACrD,CAAC;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VirtualList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAY9D;;;GAGG;AACH,KAAK,gBAAgB,CAAC,CAAC,IAAI;IACzB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;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;IACX;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC,CAAC;AAYF,eAAO,MAAM,WAAW,qKAarB,iBAAiB,CAAC,CAAC,sBAyHrB,CAAC"}
1
+ {"version":3,"file":"VirtualList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/VirtualList/VirtualList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAY9D;;;GAGG;AACH,KAAK,gBAAgB,CAAC,CAAC,IAAI;IACzB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;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;IACX;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACnC,CAAC;AAYF,eAAO,MAAM,WAAW,qKAarB,iBAAiB,CAAC,CAAC,sBAkIrB,CAAC"}
@@ -39,24 +39,25 @@ export const VirtualList = ({ gap, hasNextPage = false, isLoading, itemHeight, i
39
39
  estimateSize: () => itemHeight,
40
40
  scrollToFn,
41
41
  });
42
- const virtualItems = rowVirtualizer.getVirtualItems();
43
42
  useEffect(() => {
44
43
  if (scrollToTop && parentRef.current) {
45
44
  scrollToFn(0, { behavior: "smooth" }, { scrollElement: parentRef.current });
46
45
  }
47
46
  }, [scrollToTop, scrollToFn]);
47
+ const virtualItems = rowVirtualizer.getVirtualItems();
48
48
  useEffect(() => {
49
49
  if (!virtualItems.length)
50
50
  return;
51
51
  const lastItem = virtualItems[virtualItems.length - 1];
52
- if (lastItem.index >= virtualItems.length - 1 - threshold &&
52
+ if (lastItem.index >= items.length - 1 - threshold &&
53
53
  hasNextPage &&
54
54
  !isLoading &&
55
55
  onVisibleItemsScrollEnd) {
56
56
  onVisibleItemsScrollEnd();
57
57
  }
58
- }, [hasNextPage, onVisibleItemsScrollEnd, isLoading, threshold, virtualItems]);
58
+ }, [hasNextPage, onVisibleItemsScrollEnd, items.length, isLoading, threshold, virtualItems]);
59
59
  const showCustomLoadingComponent = !!LoadingComponent;
60
+ const Loading = useCallback(() => (showCustomLoadingComponent ? LoadingComponent : React.createElement(DefaultLoadingComponent, null)), [showCustomLoadingComponent, LoadingComponent]);
60
61
  return (React.createElement("div", { ref: parentRef, style: { width: "100%", height: "100%", overflow: "auto", scrollbarWidth: "none" } },
61
62
  React.createElement("div", { style: {
62
63
  height: `${rowVirtualizer.getTotalSize()}px`,
@@ -65,20 +66,23 @@ export const VirtualList = ({ gap, hasNextPage = false, isLoading, itemHeight, i
65
66
  flexDirection: "column",
66
67
  position: "relative",
67
68
  } },
68
- rowVirtualizer.getVirtualItems().map((virtualRow) => (React.createElement("div", { key: virtualRow.index, "data-index": virtualRow.index, ref: rowVirtualizer.measureElement, style: {
69
- position: "absolute",
70
- top: 0,
71
- left: 0,
72
- transform: `translateY(${virtualRow.start}px)`,
73
- height: `${itemHeight}px`,
74
- width: "100%",
75
- } }, renderItem(items[virtualRow.index])))),
69
+ rowVirtualizer.getVirtualItems().map((virtualRow) => {
70
+ const item = items[virtualRow.index];
71
+ return (React.createElement("div", { key: virtualRow.index, "data-index": virtualRow.index, ref: rowVirtualizer.measureElement, style: {
72
+ position: "absolute",
73
+ top: 0,
74
+ left: 0,
75
+ transform: `translateY(${virtualRow.start}px)`,
76
+ height: `${itemHeight}px`,
77
+ width: "100%",
78
+ } }, item ? renderItem(item) : React.createElement(Loading, null)));
79
+ }),
76
80
  bottomComponent && (React.createElement("div", { style: {
77
81
  position: "absolute",
78
82
  top: `${rowVirtualizer.getTotalSize()}px`,
79
83
  left: 0,
80
84
  width: "100%",
81
85
  } }, bottomComponent))),
82
- isLoading && (showCustomLoadingComponent ? LoadingComponent : React.createElement(DefaultLoadingComponent, null))));
86
+ isLoading && React.createElement(Loading, null)));
83
87
  };
84
88
  //# 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,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAuE3D,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,SAAS,cAAc,CAAC,CAAS;IAC/B,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAK,EAC9B,GAAG,EACH,WAAW,GAAG,KAAK,EACnB,SAAS,EACT,UAAU,EACV,KAAK,EACL,gBAAgB,EAChB,uBAAuB,EACvB,QAAQ,GAAG,CAAC,EACZ,UAAU,EACV,WAAW,GAAG,KAAK,EACnB,eAAe,EACf,SAAS,GAAG,CAAC,GACO,EAAE,EAAE;IACxB,MAAM,SAAS,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE/C,MAAM,UAAU,GAAG,WAAW,CAC5B,CACE,MAAc,EACd,OAA+D,EAC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C,eAAe,EAAE,CAAC,GAAG,CAAC,CAAC,UAAuB,EAAE,EAAE,CAAC,CACjE,6BACE,GAAG,EAAE,UAAU,CAAC,KAAK,gBACT,UAAU,CAAC,KAAK,EAC5B,GAAG,EAAE,cAAc,CAAC,cAAc,EAClC,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,GAAG,EAAE,CAAC;oBACN,IAAI,EAAE,CAAC;oBACP,SAAS,EAAE,cAAc,UAAU,CAAC,KAAK,KAAK;oBAC9C,MAAM,EAAE,GAAG,UAAU,IAAI;oBACzB,KAAK,EAAE,MAAM;iBACd,IAEA,UAAU,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAChC,CACP,CAAC;YACD,eAAe,IAAI,CAClB,6BACE,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,GAAG,EAAE,GAAG,cAAc,CAAC,YAAY,EAAE,IAAI;oBACzC,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,MAAM;iBACd,IAEA,eAAe,CACZ,CACP,CACG;QACL,SAAS,IAAI,CAAC,0BAA0B,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,oBAAC,uBAAuB,OAAG,CAAC,CACvF,CACP,CAAC;AACJ,CAAC,CAAC"}
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,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAuE3D,MAAM,uBAAuB,GAAG,GAAG,EAAE,CAAC,CACpC,oBAAC,IAAI,IAAC,cAAc,EAAC,QAAQ,EAAC,UAAU,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM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,SAAS,EAAE,cAAc,UAAU,CAAC,KAAK,KAAK;wBAC9C,MAAM,EAAE,GAAG,UAAU,IAAI;wBACzB,KAAK,EAAE,MAAM;qBACd,IAEA,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,OAAG,CAClC,CACP,CAAC;YACJ,CAAC,CAAC;YACD,eAAe,IAAI,CAClB,6BACE,KAAK,EAAE;oBACL,QAAQ,EAAE,UAAU;oBACpB,GAAG,EAAE,GAAG,cAAc,CAAC,YAAY,EAAE,IAAI;oBACzC,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,MAAM;iBACd,IAEA,eAAe,CACZ,CACP,CACG;QACL,SAAS,IAAI,oBAAC,OAAO,OAAG,CACrB,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -4,6 +4,7 @@ export * from "./Address/Address";
4
4
  export * from "./AssetItem/AssetItem";
5
5
  export * from "./AssetList/AssetList";
6
6
  export * from "./CardButton/CardButton";
7
+ export * from "./ApyIndicator/ApyIndicator";
7
8
  export * from "./Input/Input";
8
9
  export * from "./NetworkItem/NetworkItem";
9
10
  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,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,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,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
@@ -4,6 +4,7 @@ export * from "./Address/Address";
4
4
  export * from "./AssetItem/AssetItem";
5
5
  export * from "./AssetList/AssetList";
6
6
  export * from "./CardButton/CardButton";
7
+ export * from "./ApyIndicator/ApyIndicator";
7
8
  export * from "./Input/Input";
8
9
  export * from "./NetworkItem/NetworkItem";
9
10
  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,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,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,yBAAyB,CAAC;AACxC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/react-ui",
3
- "version": "0.35.2-nightly.0",
3
+ "version": "0.36.0-nightly.2",
4
4
  "description": "Ledger Live - Desktop UI",
5
5
  "author": "Ledger Live Team <team-live@ledger.fr>",
6
6
  "repository": {