@ledgerhq/react-ui 0.37.0-nightly.3 → 0.38.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/MarketPercentIndicator/MarketPercentIndicator.js +85 -0
- package/lib/cjs/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.js.map +7 -0
- package/lib/cjs/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.js +47 -0
- package/lib/cjs/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.js +77 -0
- package/lib/cjs/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.js.map +7 -0
- package/lib/cjs/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.js +47 -0
- package/lib/cjs/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.js.map +7 -0
- package/lib/cjs/pre-ldls/components/Search/Search.js +4 -1
- package/lib/cjs/pre-ldls/components/Search/Search.js.map +2 -2
- package/lib/cjs/pre-ldls/components/index.js +2 -0
- package/lib/cjs/pre-ldls/components/index.js.map +2 -2
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.d.ts +5 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.d.ts.map +1 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.js +34 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.js.map +1 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.d.ts +10 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.d.ts.map +1 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.js +20 -0
- package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.js.map +1 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.d.ts +6 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.d.ts.map +1 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.js +32 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.js.map +1 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.d.ts +10 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.d.ts.map +1 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.js +20 -0
- package/lib/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.js.map +1 -0
- package/lib/pre-ldls/components/Search/Search.d.ts.map +1 -1
- package/lib/pre-ldls/components/Search/Search.js +4 -1
- package/lib/pre-ldls/components/Search/Search.js.map +1 -1
- package/lib/pre-ldls/components/index.d.ts +2 -0
- package/lib/pre-ldls/components/index.d.ts.map +1 -1
- package/lib/pre-ldls/components/index.js +2 -0
- package/lib/pre-ldls/components/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,85 @@
|
|
|
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 MarketPercentIndicator_exports = {};
|
|
30
|
+
__export(MarketPercentIndicator_exports, {
|
|
31
|
+
MarketPercentIndicator: () => MarketPercentIndicator
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(MarketPercentIndicator_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_components = require("../../../components");
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
var import_libs = require("../../libs");
|
|
38
|
+
const Wrapper = (0, import_styled_components.default)(import_components.Flex)`
|
|
39
|
+
${(0, import_libs.withTokens)(
|
|
40
|
+
"colors-surface-status-success-default",
|
|
41
|
+
"colors-surface-status-success-strong-default",
|
|
42
|
+
"colors-surface-status-error-default",
|
|
43
|
+
"colors-surface-status-error-strong-default",
|
|
44
|
+
"colors-surface-transparent-hover",
|
|
45
|
+
"colors-content-default-default"
|
|
46
|
+
)}
|
|
47
|
+
`;
|
|
48
|
+
const getPercentageDisplay = (percent) => {
|
|
49
|
+
if (percent > 0) {
|
|
50
|
+
return {
|
|
51
|
+
backgroundColor: "var(--colors-surface-status-success-default)",
|
|
52
|
+
color: "var(--colors-surface-status-success-strong-default)",
|
|
53
|
+
text: `+${percent}%`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
if (percent < 0) {
|
|
57
|
+
return {
|
|
58
|
+
backgroundColor: "var(--colors-surface-status-error-default)",
|
|
59
|
+
color: "var(--colors-surface-status-error-strong-default)",
|
|
60
|
+
text: `-${Math.abs(percent)}%`
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
backgroundColor: "var(--colors-surface-transparent-hover)",
|
|
65
|
+
color: "var(--colors-content-default-default)",
|
|
66
|
+
text: `${percent}%`
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
const MarketPercentIndicator = ({ percent }) => {
|
|
70
|
+
const percentageDisplay = getPercentageDisplay(percent);
|
|
71
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
72
|
+
Wrapper,
|
|
73
|
+
{
|
|
74
|
+
"data-testid": "market-percent-indicator",
|
|
75
|
+
flexDirection: "column",
|
|
76
|
+
alignItems: "flex-end",
|
|
77
|
+
width: "fit-content",
|
|
78
|
+
p: "4px",
|
|
79
|
+
borderRadius: "4px",
|
|
80
|
+
backgroundColor: percentageDisplay.backgroundColor
|
|
81
|
+
},
|
|
82
|
+
/* @__PURE__ */ import_react.default.createElement(import_components.Text, { color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=MarketPercentIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport { Flex, Text } from \"../../../components\";\nimport styled from \"styled-components\";\nimport { withTokens } from \"../../libs\";\n\nconst Wrapper = styled(Flex)`\n ${withTokens(\n \"colors-surface-status-success-default\",\n \"colors-surface-status-success-strong-default\",\n \"colors-surface-status-error-default\",\n \"colors-surface-status-error-strong-default\",\n \"colors-surface-transparent-hover\",\n \"colors-content-default-default\",\n )}\n`;\n\nconst getPercentageDisplay = (percent: number) => {\n if (percent > 0) {\n return {\n backgroundColor: \"var(--colors-surface-status-success-default)\",\n color: \"var(--colors-surface-status-success-strong-default)\",\n text: `+${percent}%`,\n };\n }\n if (percent < 0) {\n return {\n backgroundColor: \"var(--colors-surface-status-error-default)\",\n color: \"var(--colors-surface-status-error-strong-default)\",\n text: `-${Math.abs(percent)}%`,\n };\n }\n return {\n backgroundColor: \"var(--colors-surface-transparent-hover)\",\n color: \"var(--colors-content-default-default)\",\n text: `${percent}%`,\n };\n};\n\nexport const MarketPercentIndicator = ({ percent }: { percent: number }) => {\n const percentageDisplay = getPercentageDisplay(percent);\n\n return (\n <Wrapper\n data-testid=\"market-percent-indicator\"\n flexDirection=\"column\"\n alignItems=\"flex-end\"\n width=\"fit-content\"\n p=\"4px\"\n borderRadius=\"4px\"\n backgroundColor={percentageDisplay.backgroundColor}\n >\n <Text color={percentageDisplay.color} fontSize=\"12px\">\n {percentageDisplay.text}\n </Text>\n </Wrapper>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,wBAA2B;AAC3B,+BAAmB;AACnB,kBAA2B;AAE3B,MAAM,cAAU,yBAAAA,SAAO,sBAAI;AAAA,QACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAAA;AAGH,MAAM,uBAAuB,CAAC,YAAoB;AAChD,MAAI,UAAU,GAAG;AACf,WAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,MAAM,IAAI,OAAO;AAAA,IACnB;AAAA,EACF;AACA,MAAI,UAAU,GAAG;AACf,WAAO;AAAA,MACL,iBAAiB;AAAA,MACjB,OAAO;AAAA,MACP,MAAM,IAAI,KAAK,IAAI,OAAO,CAAC;AAAA,IAC7B;AAAA,EACF;AACA,SAAO;AAAA,IACL,iBAAiB;AAAA,IACjB,OAAO;AAAA,IACP,MAAM,GAAG,OAAO;AAAA,EAClB;AACF;AAEO,MAAM,yBAAyB,CAAC,EAAE,QAAQ,MAA2B;AAC1E,QAAM,oBAAoB,qBAAqB,OAAO;AAEtD,SACE,6BAAAC,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,eAAc;AAAA,MACd,YAAW;AAAA,MACX,OAAM;AAAA,MACN,GAAE;AAAA,MACF,cAAa;AAAA,MACb,iBAAiB,kBAAkB;AAAA;AAAA,IAEnC,6BAAAA,QAAA,cAAC,0BAAK,OAAO,kBAAkB,OAAO,UAAS,UAC5C,kBAAkB,IACrB;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["styled", "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 MarketPercentIndicator_stories_exports = {};
|
|
20
|
+
__export(MarketPercentIndicator_stories_exports, {
|
|
21
|
+
Negative: () => Negative,
|
|
22
|
+
Positive: () => Positive,
|
|
23
|
+
TestMarketPercentIndicator: () => TestMarketPercentIndicator,
|
|
24
|
+
Zero: () => Zero,
|
|
25
|
+
default: () => MarketPercentIndicator_stories_default
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(MarketPercentIndicator_stories_exports);
|
|
28
|
+
var import_MarketPercentIndicator = require("./MarketPercentIndicator");
|
|
29
|
+
var import_test = require("@storybook/test");
|
|
30
|
+
const meta = {
|
|
31
|
+
component: import_MarketPercentIndicator.MarketPercentIndicator,
|
|
32
|
+
title: "PreLdls/Components/MarketPercentIndicator",
|
|
33
|
+
tags: ["autodocs"],
|
|
34
|
+
args: { percent: 30 }
|
|
35
|
+
};
|
|
36
|
+
var MarketPercentIndicator_stories_default = meta;
|
|
37
|
+
const Positive = { args: { percent: 30 } };
|
|
38
|
+
const Negative = { args: { percent: -30 } };
|
|
39
|
+
const Zero = { args: { percent: 0 } };
|
|
40
|
+
const TestMarketPercentIndicator = {
|
|
41
|
+
play: async ({ canvasElement }) => {
|
|
42
|
+
const canvas = (0, import_test.within)(canvasElement);
|
|
43
|
+
const input = canvas.getByTestId("market-percent-indicator");
|
|
44
|
+
await (0, import_test.expect)(input).toHaveTextContent("+30%");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=MarketPercentIndicator.stories.js.map
|
package/lib/cjs/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.js.map
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { MarketPercentIndicator } from \"./MarketPercentIndicator\";\nimport { expect, within } from \"@storybook/test\";\n\nconst meta: Meta<typeof MarketPercentIndicator> = {\n component: MarketPercentIndicator,\n title: \"PreLdls/Components/MarketPercentIndicator\",\n tags: [\"autodocs\"],\n args: { percent: 30 },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof MarketPercentIndicator>;\n\nexport const Positive: Story = { args: { percent: 30 } };\nexport const Negative: Story = { args: { percent: -30 } };\nexport const Zero: Story = { args: { percent: 0 } };\n\nexport const TestMarketPercentIndicator: Story = {\n play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {\n const canvas = within(canvasElement);\n const input = canvas.getByTestId(\"market-percent-indicator\");\n await expect(input).toHaveTextContent(\"+30%\");\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,oCAAuC;AACvC,kBAA+B;AAE/B,MAAM,OAA4C;AAAA,EAChD,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM,EAAE,SAAS,GAAG;AACtB;AACA,IAAO,yCAAQ;AAIR,MAAM,WAAkB,EAAE,MAAM,EAAE,SAAS,GAAG,EAAE;AAChD,MAAM,WAAkB,EAAE,MAAM,EAAE,SAAS,IAAI,EAAE;AACjD,MAAM,OAAc,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE;AAE3C,MAAM,6BAAoC;AAAA,EAC/C,MAAM,OAAO,EAAE,cAAc,MAAsC;AACjE,UAAM,aAAS,oBAAO,aAAa;AACnC,UAAM,QAAQ,OAAO,YAAY,0BAA0B;AAC3D,cAAM,oBAAO,KAAK,EAAE,kBAAkB,MAAM;AAAA,EAC9C;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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 MarketPriceIndicator_exports = {};
|
|
30
|
+
__export(MarketPriceIndicator_exports, {
|
|
31
|
+
MarketPriceIndicator: () => MarketPriceIndicator
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(MarketPriceIndicator_exports);
|
|
34
|
+
var import_react = __toESM(require("react"));
|
|
35
|
+
var import_components = require("../../../components");
|
|
36
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
37
|
+
var import_libs = require("../../libs");
|
|
38
|
+
const Wrapper = (0, import_styled_components.default)(import_components.Flex)`
|
|
39
|
+
${(0, import_libs.withTokens)(
|
|
40
|
+
"colors-surface-status-success-strong-default",
|
|
41
|
+
"colors-surface-status-error-strong-default",
|
|
42
|
+
"colors-content-default-default"
|
|
43
|
+
)}
|
|
44
|
+
`;
|
|
45
|
+
const getPercentageDisplay = (percent) => {
|
|
46
|
+
if (percent > 0) {
|
|
47
|
+
return {
|
|
48
|
+
color: "var(--colors-surface-status-success-strong-default)",
|
|
49
|
+
text: `+${percent}%`
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
if (percent < 0) {
|
|
53
|
+
return {
|
|
54
|
+
color: "var(--colors-surface-status-error-strong-default)",
|
|
55
|
+
text: `-${percent}%`
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
color: "var(--colors-content-default-default)",
|
|
60
|
+
text: `${percent}%`
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const MarketPriceIndicator = ({ percent, price }) => {
|
|
64
|
+
const percentageDisplay = getPercentageDisplay(percent);
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
Wrapper,
|
|
67
|
+
{
|
|
68
|
+
"data-testid": "market-price-indicator",
|
|
69
|
+
flexDirection: "column",
|
|
70
|
+
alignItems: "flex-end",
|
|
71
|
+
width: "fit-content"
|
|
72
|
+
},
|
|
73
|
+
/* @__PURE__ */ import_react.default.createElement(import_components.Text, { variant: "body", fontWeight: "semiBold", mb: "4px" }, price),
|
|
74
|
+
/* @__PURE__ */ import_react.default.createElement(import_components.Text, { color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
//# sourceMappingURL=MarketPriceIndicator.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.tsx"],
|
|
4
|
+
"sourcesContent": ["import React from \"react\";\nimport { Flex, Text } from \"../../../components\";\nimport styled from \"styled-components\";\nimport { withTokens } from \"../../libs\";\n\nconst Wrapper = styled(Flex)`\n ${withTokens(\n \"colors-surface-status-success-strong-default\",\n \"colors-surface-status-error-strong-default\",\n \"colors-content-default-default\",\n )}\n`;\n\nconst getPercentageDisplay = (percent: number) => {\n if (percent > 0) {\n return {\n color: \"var(--colors-surface-status-success-strong-default)\",\n text: `+${percent}%`,\n };\n }\n if (percent < 0) {\n return {\n color: \"var(--colors-surface-status-error-strong-default)\",\n text: `-${percent}%`,\n };\n }\n return {\n color: \"var(--colors-content-default-default)\",\n text: `${percent}%`,\n };\n};\n\nexport const MarketPriceIndicator = ({ percent, price }: { percent: number; price: string }) => {\n const percentageDisplay = getPercentageDisplay(percent);\n\n return (\n <Wrapper\n data-testid=\"market-price-indicator\"\n flexDirection=\"column\"\n alignItems=\"flex-end\"\n width=\"fit-content\"\n >\n <Text variant=\"body\" fontWeight=\"semiBold\" mb=\"4px\">\n {price}\n </Text>\n <Text color={percentageDisplay.color} fontSize=\"12px\">\n {percentageDisplay.text}\n </Text>\n </Wrapper>\n );\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,wBAA2B;AAC3B,+BAAmB;AACnB,kBAA2B;AAE3B,MAAM,cAAU,yBAAAA,SAAO,sBAAI;AAAA,QACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAAA;AAGH,MAAM,uBAAuB,CAAC,YAAoB;AAChD,MAAI,UAAU,GAAG;AACf,WAAO;AAAA,MACL,OAAO;AAAA,MACP,MAAM,IAAI,OAAO;AAAA,IACnB;AAAA,EACF;AACA,MAAI,UAAU,GAAG;AACf,WAAO;AAAA,MACL,OAAO;AAAA,MACP,MAAM,IAAI,OAAO;AAAA,IACnB;AAAA,EACF;AACA,SAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM,GAAG,OAAO;AAAA,EAClB;AACF;AAEO,MAAM,uBAAuB,CAAC,EAAE,SAAS,MAAM,MAA0C;AAC9F,QAAM,oBAAoB,qBAAqB,OAAO;AAEtD,SACE,6BAAAC,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,eAAc;AAAA,MACd,YAAW;AAAA,MACX,OAAM;AAAA;AAAA,IAEN,6BAAAA,QAAA,cAAC,0BAAK,SAAQ,QAAO,YAAW,YAAW,IAAG,SAC3C,KACH;AAAA,IACA,6BAAAA,QAAA,cAAC,0BAAK,OAAO,kBAAkB,OAAO,UAAS,UAC5C,kBAAkB,IACrB;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["styled", "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 MarketPriceIndicator_stories_exports = {};
|
|
20
|
+
__export(MarketPriceIndicator_stories_exports, {
|
|
21
|
+
Negative: () => Negative,
|
|
22
|
+
Positive: () => Positive,
|
|
23
|
+
TestMarketPriceIndicator: () => TestMarketPriceIndicator,
|
|
24
|
+
Zero: () => Zero,
|
|
25
|
+
default: () => MarketPriceIndicator_stories_default
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(MarketPriceIndicator_stories_exports);
|
|
28
|
+
var import_MarketPriceIndicator = require("./MarketPriceIndicator");
|
|
29
|
+
var import_test = require("@storybook/test");
|
|
30
|
+
const meta = {
|
|
31
|
+
component: import_MarketPriceIndicator.MarketPriceIndicator,
|
|
32
|
+
title: "PreLdls/Components/MarketPriceIndicator",
|
|
33
|
+
tags: ["autodocs"],
|
|
34
|
+
args: { percent: 30, price: "$100,000.00" }
|
|
35
|
+
};
|
|
36
|
+
var MarketPriceIndicator_stories_default = meta;
|
|
37
|
+
const Positive = { args: { percent: 30, price: "$100,000.00" } };
|
|
38
|
+
const Negative = { args: { percent: -30, price: "$100,000.00" } };
|
|
39
|
+
const Zero = { args: { percent: 0, price: "$100,000.00" } };
|
|
40
|
+
const TestMarketPriceIndicator = {
|
|
41
|
+
play: async ({ canvasElement }) => {
|
|
42
|
+
const canvas = (0, import_test.within)(canvasElement);
|
|
43
|
+
const input = canvas.getByTestId("market-price-indicator");
|
|
44
|
+
await (0, import_test.expect)(input).toHaveTextContent("$100,000.00");
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=MarketPriceIndicator.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.ts"],
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from \"@storybook/react\";\nimport { MarketPriceIndicator } from \"./MarketPriceIndicator\";\nimport { expect, within } from \"@storybook/test\";\n\nconst meta: Meta<typeof MarketPriceIndicator> = {\n component: MarketPriceIndicator,\n title: \"PreLdls/Components/MarketPriceIndicator\",\n tags: [\"autodocs\"],\n args: { percent: 30, price: \"$100,000.00\" },\n};\nexport default meta;\n\ntype Story = StoryObj<typeof MarketPriceIndicator>;\n\nexport const Positive: Story = { args: { percent: 30, price: \"$100,000.00\" } };\nexport const Negative: Story = { args: { percent: -30, price: \"$100,000.00\" } };\nexport const Zero: Story = { args: { percent: 0, price: \"$100,000.00\" } };\n\nexport const TestMarketPriceIndicator: Story = {\n play: async ({ canvasElement }: { canvasElement: HTMLElement }) => {\n const canvas = within(canvasElement);\n const input = canvas.getByTestId(\"market-price-indicator\");\n await expect(input).toHaveTextContent(\"$100,000.00\");\n },\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAAqC;AACrC,kBAA+B;AAE/B,MAAM,OAA0C;AAAA,EAC9C,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM,CAAC,UAAU;AAAA,EACjB,MAAM,EAAE,SAAS,IAAI,OAAO,cAAc;AAC5C;AACA,IAAO,uCAAQ;AAIR,MAAM,WAAkB,EAAE,MAAM,EAAE,SAAS,IAAI,OAAO,cAAc,EAAE;AACtE,MAAM,WAAkB,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,cAAc,EAAE;AACvE,MAAM,OAAc,EAAE,MAAM,EAAE,SAAS,GAAG,OAAO,cAAc,EAAE;AAEjE,MAAM,2BAAkC;AAAA,EAC7C,MAAM,OAAO,EAAE,cAAc,MAAsC;AACjE,UAAM,aAAS,oBAAO,aAAa;AACnC,UAAM,QAAQ,OAAO,YAAY,wBAAwB;AACzD,cAAM,oBAAO,KAAK,EAAE,kBAAkB,aAAa;AAAA,EACrD;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -47,7 +47,10 @@ function Search({
|
|
|
47
47
|
const searchInputRef = (0, import_react.useRef)(null);
|
|
48
48
|
(0, import_react.useEffect)(() => {
|
|
49
49
|
if (autoFocus && searchInputRef.current) {
|
|
50
|
-
|
|
50
|
+
setTimeout(() => {
|
|
51
|
+
var _a;
|
|
52
|
+
(_a = searchInputRef.current) == null ? void 0 : _a.focus({ preventScroll: true });
|
|
53
|
+
}, 0);
|
|
51
54
|
}
|
|
52
55
|
}, [autoFocus]);
|
|
53
56
|
const handleDebouncedChange = (0, import_hooks.useDebouncedCallback)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/pre-ldls/components/Search/Search.tsx"],
|
|
4
|
-
"sourcesContent": ["import React, { ChangeEvent, useEffect, useMemo, useRef } from \"react\";\nimport { Icons } from \"../../../assets\";\nimport { useDebouncedCallback } from \"../../hooks\";\nimport { Input } from \"..\";\n\ntype InputProps = React.ComponentProps<\"input\">;\ntype Props = Readonly<\n InputProps & {\n onDebouncedChange?: (current: string, prev: string) => void;\n debounceTime?: number;\n autoFocus?: boolean;\n }\n>;\n\nexport function Search({\n onDebouncedChange,\n debounceTime = 500,\n onChange,\n autoFocus = true,\n ...props\n}: Props) {\n const initialValue = props.value ?? props.defaultValue ?? \"\";\n const prevValue = useRef(String(initialValue));\n const searchInputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (autoFocus && searchInputRef.current) {\n searchInputRef.current
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+D;AAC/D,oBAAsB;AACtB,mBAAqC;AACrC,eAAsB;AAWf,SAAS,OAAO;AAAA,EACrB;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,GAAG;AACL,GAAU;AACR,QAAM,eAAe,MAAM,SAAS,MAAM,gBAAgB;AAC1D,QAAM,gBAAY,qBAAO,OAAO,YAAY,CAAC;AAC7C,QAAM,qBAAiB,qBAAyB,IAAI;AAEpD,8BAAU,MAAM;AACd,QAAI,aAAa,eAAe,SAAS;
|
|
4
|
+
"sourcesContent": ["import React, { ChangeEvent, useEffect, useMemo, useRef } from \"react\";\nimport { Icons } from \"../../../assets\";\nimport { useDebouncedCallback } from \"../../hooks\";\nimport { Input } from \"..\";\n\ntype InputProps = React.ComponentProps<\"input\">;\ntype Props = Readonly<\n InputProps & {\n onDebouncedChange?: (current: string, prev: string) => void;\n debounceTime?: number;\n autoFocus?: boolean;\n }\n>;\n\nexport function Search({\n onDebouncedChange,\n debounceTime = 500,\n onChange,\n autoFocus = true,\n ...props\n}: Props) {\n const initialValue = props.value ?? props.defaultValue ?? \"\";\n const prevValue = useRef(String(initialValue));\n const searchInputRef = useRef<HTMLInputElement>(null);\n\n useEffect(() => {\n if (autoFocus && searchInputRef.current) {\n // Delay focus to prevent layout shifts\n setTimeout(() => {\n searchInputRef.current?.focus({ preventScroll: true });\n }, 0);\n }\n }, [autoFocus]);\n\n const handleDebouncedChange = useDebouncedCallback(\n useMemo(() => {\n if (!onDebouncedChange) return;\n return (event: ChangeEvent<HTMLInputElement>) => {\n const current = event.target.value;\n onDebouncedChange(current, prevValue.current);\n prevValue.current = current;\n };\n }, [onDebouncedChange]),\n debounceTime,\n );\n\n const handleChange = useMemo(() => {\n if (!handleDebouncedChange && !onChange) return;\n return (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event);\n handleDebouncedChange?.(event);\n };\n }, [handleDebouncedChange, onChange]);\n\n return (\n <Input\n {...props}\n ref={searchInputRef}\n icon={<Icons.Search size=\"S\" />}\n onChange={handleChange}\n />\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA+D;AAC/D,oBAAsB;AACtB,mBAAqC;AACrC,eAAsB;AAWf,SAAS,OAAO;AAAA,EACrB;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ,GAAG;AACL,GAAU;AACR,QAAM,eAAe,MAAM,SAAS,MAAM,gBAAgB;AAC1D,QAAM,gBAAY,qBAAO,OAAO,YAAY,CAAC;AAC7C,QAAM,qBAAiB,qBAAyB,IAAI;AAEpD,8BAAU,MAAM;AACd,QAAI,aAAa,eAAe,SAAS;AAEvC,iBAAW,MAAM;AA5BvB;AA6BQ,6BAAe,YAAf,mBAAwB,MAAM,EAAE,eAAe,KAAK;AAAA,MACtD,GAAG,CAAC;AAAA,IACN;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAEd,QAAM,4BAAwB;AAAA,QAC5B,sBAAQ,MAAM;AACZ,UAAI,CAAC;AAAmB;AACxB,aAAO,CAAC,UAAyC;AAC/C,cAAM,UAAU,MAAM,OAAO;AAC7B,0BAAkB,SAAS,UAAU,OAAO;AAC5C,kBAAU,UAAU;AAAA,MACtB;AAAA,IACF,GAAG,CAAC,iBAAiB,CAAC;AAAA,IACtB;AAAA,EACF;AAEA,QAAM,mBAAe,sBAAQ,MAAM;AACjC,QAAI,CAAC,yBAAyB,CAAC;AAAU;AACzC,WAAO,CAAC,UAAyC;AAC/C,2CAAW;AACX,qEAAwB;AAAA,IAC1B;AAAA,EACF,GAAG,CAAC,uBAAuB,QAAQ,CAAC;AAEpC,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,KAAK;AAAA,MACL,MAAM,6BAAAA,QAAA,cAAC,oBAAM,QAAN,EAAa,MAAK,KAAI;AAAA,MAC7B,UAAU;AAAA;AAAA,EACZ;AAEJ;",
|
|
6
6
|
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -22,6 +22,8 @@ __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
24
|
__reExport(components_exports, require("./ApyIndicator/ApyIndicator"), module.exports);
|
|
25
|
+
__reExport(components_exports, require("./MarketPriceIndicator/MarketPriceIndicator"), module.exports);
|
|
26
|
+
__reExport(components_exports, require("./MarketPercentIndicator/MarketPercentIndicator"), module.exports);
|
|
25
27
|
__reExport(components_exports, require("./Input/Input"), module.exports);
|
|
26
28
|
__reExport(components_exports, require("./NetworkItem/NetworkItem"), module.exports);
|
|
27
29
|
__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 \"./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,
|
|
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 \"./MarketPriceIndicator/MarketPriceIndicator\";\nexport * from \"./MarketPercentIndicator/MarketPercentIndicator\";\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,wDAPd;AAQA,+BAAc,4DARd;AASA,+BAAc,0BATd;AAUA,+BAAc,sCAVd;AAWA,+BAAc,sCAXd;AAYA,+BAAc,4BAZd;AAaA,+BAAc,sBAbd;AAcA,+BAAc,kCAdd;AAeA,+BAAc,sCAfd;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPercentIndicator.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAsC1B,eAAO,MAAM,sBAAsB;aAA4B,MAAM;uBAkBpE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex, Text } from "../../../components";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { withTokens } from "../../libs";
|
|
5
|
+
const Wrapper = styled(Flex) `
|
|
6
|
+
${withTokens("colors-surface-status-success-default", "colors-surface-status-success-strong-default", "colors-surface-status-error-default", "colors-surface-status-error-strong-default", "colors-surface-transparent-hover", "colors-content-default-default")}
|
|
7
|
+
`;
|
|
8
|
+
const getPercentageDisplay = (percent) => {
|
|
9
|
+
if (percent > 0) {
|
|
10
|
+
return {
|
|
11
|
+
backgroundColor: "var(--colors-surface-status-success-default)",
|
|
12
|
+
color: "var(--colors-surface-status-success-strong-default)",
|
|
13
|
+
text: `+${percent}%`,
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
if (percent < 0) {
|
|
17
|
+
return {
|
|
18
|
+
backgroundColor: "var(--colors-surface-status-error-default)",
|
|
19
|
+
color: "var(--colors-surface-status-error-strong-default)",
|
|
20
|
+
text: `-${Math.abs(percent)}%`,
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
return {
|
|
24
|
+
backgroundColor: "var(--colors-surface-transparent-hover)",
|
|
25
|
+
color: "var(--colors-content-default-default)",
|
|
26
|
+
text: `${percent}%`,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export const MarketPercentIndicator = ({ percent }) => {
|
|
30
|
+
const percentageDisplay = getPercentageDisplay(percent);
|
|
31
|
+
return (React.createElement(Wrapper, { "data-testid": "market-percent-indicator", flexDirection: "column", alignItems: "flex-end", width: "fit-content", p: "4px", borderRadius: "4px", backgroundColor: percentageDisplay.backgroundColor },
|
|
32
|
+
React.createElement(Text, { color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)));
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=MarketPercentIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPercentIndicator.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IACxB,UAAU,CACV,uCAAuC,EACvC,8CAA8C,EAC9C,qCAAqC,EACrC,4CAA4C,EAC5C,kCAAkC,EAClC,gCAAgC,CACjC;CACF,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAE,EAAE;IAC/C,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO;YACL,eAAe,EAAE,8CAA8C;YAC/D,KAAK,EAAE,qDAAqD;YAC5D,IAAI,EAAE,IAAI,OAAO,GAAG;SACrB,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO;YACL,eAAe,EAAE,4CAA4C;YAC7D,KAAK,EAAE,mDAAmD;YAC1D,IAAI,EAAE,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG;SAC/B,CAAC;IACJ,CAAC;IACD,OAAO;QACL,eAAe,EAAE,yCAAyC;QAC1D,KAAK,EAAE,uCAAuC;QAC9C,IAAI,EAAE,GAAG,OAAO,GAAG;KACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EAAE,OAAO,EAAuB,EAAE,EAAE;IACzE,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAExD,OAAO,CACL,oBAAC,OAAO,mBACM,0BAA0B,EACtC,aAAa,EAAC,QAAQ,EACtB,UAAU,EAAC,UAAU,EACrB,KAAK,EAAC,aAAa,EACnB,CAAC,EAAC,KAAK,EACP,YAAY,EAAC,KAAK,EAClB,eAAe,EAAE,iBAAiB,CAAC,eAAe;QAElD,oBAAC,IAAI,IAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,IAClD,iBAAiB,CAAC,IAAI,CAClB,CACC,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { MarketPercentIndicator } from "./MarketPercentIndicator";
|
|
3
|
+
declare const meta: Meta<typeof MarketPercentIndicator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MarketPercentIndicator>;
|
|
6
|
+
export declare const Positive: Story;
|
|
7
|
+
export declare const Negative: Story;
|
|
8
|
+
export declare const Zero: Story;
|
|
9
|
+
export declare const TestMarketPercentIndicator: Story;
|
|
10
|
+
//# sourceMappingURL=MarketPercentIndicator.stories.d.ts.map
|
package/lib/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPercentIndicator.stories.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,sBAAsB,CAK7C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAErD,eAAO,MAAM,QAAQ,EAAE,KAAiC,CAAC;AACzD,eAAO,MAAM,QAAQ,EAAE,KAAkC,CAAC;AAC1D,eAAO,MAAM,IAAI,EAAE,KAAgC,CAAC;AAEpD,eAAO,MAAM,0BAA0B,EAAE,KAMxC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MarketPercentIndicator } from "./MarketPercentIndicator";
|
|
2
|
+
import { expect, within } from "@storybook/test";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: MarketPercentIndicator,
|
|
5
|
+
title: "PreLdls/Components/MarketPercentIndicator",
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
args: { percent: 30 },
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const Positive = { args: { percent: 30 } };
|
|
11
|
+
export const Negative = { args: { percent: -30 } };
|
|
12
|
+
export const Zero = { args: { percent: 0 } };
|
|
13
|
+
export const TestMarketPercentIndicator = {
|
|
14
|
+
play: async ({ canvasElement }) => {
|
|
15
|
+
const canvas = within(canvasElement);
|
|
16
|
+
const input = canvas.getByTestId("market-percent-indicator");
|
|
17
|
+
await expect(input).toHaveTextContent("+30%");
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=MarketPercentIndicator.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPercentIndicator.stories.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPercentIndicator/MarketPercentIndicator.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,IAAI,GAAwC;IAChD,SAAS,EAAE,sBAAsB;IACjC,KAAK,EAAE,2CAA2C;IAClD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE;CACtB,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,QAAQ,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,CAAC;AACzD,MAAM,CAAC,MAAM,QAAQ,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;AAC1D,MAAM,CAAC,MAAM,IAAI,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC;AAEpD,MAAM,CAAC,MAAM,0BAA0B,GAAU;IAC/C,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,0BAA0B,CAAC,CAAC;QAC7D,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAChD,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPriceIndicator.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgC1B,eAAO,MAAM,oBAAoB;aAAmC,MAAM;WAAS,MAAM;uBAkBxF,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex, Text } from "../../../components";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { withTokens } from "../../libs";
|
|
5
|
+
const Wrapper = styled(Flex) `
|
|
6
|
+
${withTokens("colors-surface-status-success-strong-default", "colors-surface-status-error-strong-default", "colors-content-default-default")}
|
|
7
|
+
`;
|
|
8
|
+
const getPercentageDisplay = (percent) => {
|
|
9
|
+
if (percent > 0) {
|
|
10
|
+
return {
|
|
11
|
+
color: "var(--colors-surface-status-success-strong-default)",
|
|
12
|
+
text: `+${percent}%`,
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
if (percent < 0) {
|
|
16
|
+
return {
|
|
17
|
+
color: "var(--colors-surface-status-error-strong-default)",
|
|
18
|
+
text: `-${percent}%`,
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
color: "var(--colors-content-default-default)",
|
|
23
|
+
text: `${percent}%`,
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
export const MarketPriceIndicator = ({ percent, price }) => {
|
|
27
|
+
const percentageDisplay = getPercentageDisplay(percent);
|
|
28
|
+
return (React.createElement(Wrapper, { "data-testid": "market-price-indicator", flexDirection: "column", alignItems: "flex-end", width: "fit-content" },
|
|
29
|
+
React.createElement(Text, { variant: "body", fontWeight: "semiBold", mb: "4px" }, price),
|
|
30
|
+
React.createElement(Text, { color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)));
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=MarketPriceIndicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPriceIndicator.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,CAAA;IACxB,UAAU,CACV,8CAA8C,EAC9C,4CAA4C,EAC5C,gCAAgC,CACjC;CACF,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAAC,OAAe,EAAE,EAAE;IAC/C,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO;YACL,KAAK,EAAE,qDAAqD;YAC5D,IAAI,EAAE,IAAI,OAAO,GAAG;SACrB,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO;YACL,KAAK,EAAE,mDAAmD;YAC1D,IAAI,EAAE,IAAI,OAAO,GAAG;SACrB,CAAC;IACJ,CAAC;IACD,OAAO;QACL,KAAK,EAAE,uCAAuC;QAC9C,IAAI,EAAE,GAAG,OAAO,GAAG;KACpB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAsC,EAAE,EAAE;IAC7F,MAAM,iBAAiB,GAAG,oBAAoB,CAAC,OAAO,CAAC,CAAC;IAExD,OAAO,CACL,oBAAC,OAAO,mBACM,wBAAwB,EACpC,aAAa,EAAC,QAAQ,EACtB,UAAU,EAAC,UAAU,EACrB,KAAK,EAAC,aAAa;QAEnB,oBAAC,IAAI,IAAC,OAAO,EAAC,MAAM,EAAC,UAAU,EAAC,UAAU,EAAC,EAAE,EAAC,KAAK,IAChD,KAAK,CACD;QACP,oBAAC,IAAI,IAAC,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAAE,QAAQ,EAAC,MAAM,IAClD,iBAAiB,CAAC,IAAI,CAClB,CACC,CACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { MarketPriceIndicator } from "./MarketPriceIndicator";
|
|
3
|
+
declare const meta: Meta<typeof MarketPriceIndicator>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MarketPriceIndicator>;
|
|
6
|
+
export declare const Positive: Story;
|
|
7
|
+
export declare const Negative: Story;
|
|
8
|
+
export declare const Zero: Story;
|
|
9
|
+
export declare const TestMarketPriceIndicator: Story;
|
|
10
|
+
//# sourceMappingURL=MarketPriceIndicator.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPriceIndicator.stories.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,oBAAoB,CAK3C,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnD,eAAO,MAAM,QAAQ,EAAE,KAAuD,CAAC;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAAwD,CAAC;AAChF,eAAO,MAAM,IAAI,EAAE,KAAsD,CAAC;AAE1E,eAAO,MAAM,wBAAwB,EAAE,KAMtC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { MarketPriceIndicator } from "./MarketPriceIndicator";
|
|
2
|
+
import { expect, within } from "@storybook/test";
|
|
3
|
+
const meta = {
|
|
4
|
+
component: MarketPriceIndicator,
|
|
5
|
+
title: "PreLdls/Components/MarketPriceIndicator",
|
|
6
|
+
tags: ["autodocs"],
|
|
7
|
+
args: { percent: 30, price: "$100,000.00" },
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
export const Positive = { args: { percent: 30, price: "$100,000.00" } };
|
|
11
|
+
export const Negative = { args: { percent: -30, price: "$100,000.00" } };
|
|
12
|
+
export const Zero = { args: { percent: 0, price: "$100,000.00" } };
|
|
13
|
+
export const TestMarketPriceIndicator = {
|
|
14
|
+
play: async ({ canvasElement }) => {
|
|
15
|
+
const canvas = within(canvasElement);
|
|
16
|
+
const input = canvas.getByTestId("market-price-indicator");
|
|
17
|
+
await expect(input).toHaveTextContent("$100,000.00");
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=MarketPriceIndicator.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MarketPriceIndicator.stories.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/MarketPriceIndicator/MarketPriceIndicator.stories.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,IAAI,GAAsC;IAC9C,SAAS,EAAE,oBAAoB;IAC/B,KAAK,EAAE,yCAAyC;IAChD,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE;CAC5C,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,CAAC,MAAM,QAAQ,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC;AAC/E,MAAM,CAAC,MAAM,QAAQ,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC;AAChF,MAAM,CAAC,MAAM,IAAI,GAAU,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,EAAE,CAAC;AAE1E,MAAM,CAAC,MAAM,wBAAwB,GAAU;IAC7C,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,wBAAwB,CAAC,CAAC;QAC3D,MAAM,MAAM,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;IACvD,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAChD,KAAK,KAAK,GAAG,QAAQ,CACnB,UAAU,GAAG;IACX,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CACF,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,iBAAiB,EACjB,YAAkB,EAClB,QAAQ,EACR,SAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAKvE,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;AAChD,KAAK,KAAK,GAAG,QAAQ,CACnB,UAAU,GAAG;IACX,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CACF,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,iBAAiB,EACjB,YAAkB,EAClB,QAAQ,EACR,SAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,qBA0CP"}
|
|
@@ -8,7 +8,10 @@ export function Search({ onDebouncedChange, debounceTime = 500, onChange, autoFo
|
|
|
8
8
|
const searchInputRef = useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
10
10
|
if (autoFocus && searchInputRef.current) {
|
|
11
|
-
|
|
11
|
+
// Delay focus to prevent layout shifts
|
|
12
|
+
setTimeout(() => {
|
|
13
|
+
searchInputRef.current?.focus({ preventScroll: true });
|
|
14
|
+
}, 0);
|
|
12
15
|
}
|
|
13
16
|
}, [autoFocus]);
|
|
14
17
|
const handleDebouncedChange = useDebouncedCallback(useMemo(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAe,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAW3B,MAAM,UAAU,MAAM,CAAC,EACrB,iBAAiB,EACjB,YAAY,GAAG,GAAG,EAClB,QAAQ,EACR,SAAS,GAAG,IAAI,EAChB,GAAG,KAAK,EACF;IACN,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC;IAC7D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC;YACxC,cAAc,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"Search.js","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAe,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC;AAW3B,MAAM,UAAU,MAAM,CAAC,EACrB,iBAAiB,EACjB,YAAY,GAAG,GAAG,EAClB,QAAQ,EACR,SAAS,GAAG,IAAI,EAChB,GAAG,KAAK,EACF;IACN,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,YAAY,IAAI,EAAE,CAAC;IAC7D,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/C,MAAM,cAAc,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAEtD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,SAAS,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC;YACxC,uCAAuC;YACvC,UAAU,CAAC,GAAG,EAAE;gBACd,cAAc,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;YACzD,CAAC,EAAE,CAAC,CAAC,CAAC;QACR,CAAC;IACH,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;IAEhB,MAAM,qBAAqB,GAAG,oBAAoB,CAChD,OAAO,CAAC,GAAG,EAAE;QACX,IAAI,CAAC,iBAAiB;YAAE,OAAO;QAC/B,OAAO,CAAC,KAAoC,EAAE,EAAE;YAC9C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC;YACnC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;YAC9C,SAAS,CAAC,OAAO,GAAG,OAAO,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,iBAAiB,CAAC,CAAC,EACvB,YAAY,CACb,CAAC;IAEF,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,IAAI,CAAC,qBAAqB,IAAI,CAAC,QAAQ;YAAE,OAAO;QAChD,OAAO,CAAC,KAAoC,EAAE,EAAE;YAC9C,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;YAClB,qBAAqB,EAAE,CAAC,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,qBAAqB,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEtC,OAAO,CACL,oBAAC,KAAK,OACA,KAAK,EACT,GAAG,EAAE,cAAc,EACnB,IAAI,EAAE,oBAAC,KAAK,CAAC,MAAM,IAAC,IAAI,EAAC,GAAG,GAAG,EAC/B,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -5,6 +5,8 @@ export * from "./AssetItem/AssetItem";
|
|
|
5
5
|
export * from "./AssetList/AssetList";
|
|
6
6
|
export * from "./CardButton/CardButton";
|
|
7
7
|
export * from "./ApyIndicator/ApyIndicator";
|
|
8
|
+
export * from "./MarketPriceIndicator/MarketPriceIndicator";
|
|
9
|
+
export * from "./MarketPercentIndicator/MarketPercentIndicator";
|
|
8
10
|
export * from "./Input/Input";
|
|
9
11
|
export * from "./NetworkItem/NetworkItem";
|
|
10
12
|
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,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"}
|
|
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,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,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"}
|
|
@@ -5,6 +5,8 @@ export * from "./AssetItem/AssetItem";
|
|
|
5
5
|
export * from "./AssetList/AssetList";
|
|
6
6
|
export * from "./CardButton/CardButton";
|
|
7
7
|
export * from "./ApyIndicator/ApyIndicator";
|
|
8
|
+
export * from "./MarketPriceIndicator/MarketPriceIndicator";
|
|
9
|
+
export * from "./MarketPercentIndicator/MarketPercentIndicator";
|
|
8
10
|
export * from "./Input/Input";
|
|
9
11
|
export * from "./NetworkItem/NetworkItem";
|
|
10
12
|
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,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"}
|
|
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,6CAA6C,CAAC;AAC5D,cAAc,iDAAiD,CAAC;AAChE,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.
|
|
3
|
+
"version": "0.38.0-nightly.0",
|
|
4
4
|
"description": "Ledger Live - Desktop UI",
|
|
5
5
|
"author": "Ledger Live Team <team-live@ledger.fr>",
|
|
6
6
|
"repository": {
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"react-window": "^1.8.6",
|
|
77
77
|
"styled-system": "^5.1.5",
|
|
78
78
|
"@ledgerhq/crypto-icons-ui": "^1.19.0-nightly.1",
|
|
79
|
-
"@ledgerhq/icons-ui": "^0.
|
|
80
|
-
"@ledgerhq/ui-shared": "^0.4.0
|
|
79
|
+
"@ledgerhq/icons-ui": "^0.14.0-nightly.0",
|
|
80
|
+
"@ledgerhq/ui-shared": "^0.4.0"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"react": ">=17.0.2",
|