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

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.
@@ -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
+ }
@@ -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"}
@@ -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.1",
4
4
  "description": "Ledger Live - Desktop UI",
5
5
  "author": "Ledger Live Team <team-live@ledger.fr>",
6
6
  "repository": {