@ledgerhq/react-ui 0.38.0-nightly.2 → 0.38.0-nightly.3

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.
@@ -79,7 +79,15 @@ const MarketPercentIndicator = ({ percent }) => {
79
79
  borderRadius: "4px",
80
80
  backgroundColor: percentageDisplay.backgroundColor
81
81
  },
82
- /* @__PURE__ */ import_react.default.createElement(import_components.Text, { color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)
82
+ /* @__PURE__ */ import_react.default.createElement(
83
+ import_components.Text,
84
+ {
85
+ "data-testid": "market-percent-indicator-value",
86
+ color: percentageDisplay.color,
87
+ fontSize: "12px"
88
+ },
89
+ percentageDisplay.text
90
+ )
83
91
  );
84
92
  };
85
93
  //# sourceMappingURL=MarketPercentIndicator.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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;",
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\n data-testid=\"market-percent-indicator-value\"\n color={percentageDisplay.color}\n fontSize=\"12px\"\n >\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;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACZ,OAAO,kBAAkB;AAAA,QACzB,UAAS;AAAA;AAAA,MAER,kBAAkB;AAAA,IACrB;AAAA,EACF;AAEJ;",
6
6
  "names": ["styled", "React"]
7
7
  }
@@ -52,7 +52,7 @@ const getPercentageDisplay = (percent) => {
52
52
  if (percent < 0) {
53
53
  return {
54
54
  color: "var(--colors-surface-status-error-strong-default)",
55
- text: `-${percent}%`
55
+ text: `-${Math.abs(percent)}%`
56
56
  };
57
57
  }
58
58
  return {
@@ -70,8 +70,25 @@ const MarketPriceIndicator = ({ percent, price }) => {
70
70
  alignItems: "flex-end",
71
71
  width: "fit-content"
72
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)
73
+ /* @__PURE__ */ import_react.default.createElement(
74
+ import_components.Text,
75
+ {
76
+ "data-testid": "market-price-indicator-value",
77
+ variant: "body",
78
+ fontWeight: "semiBold",
79
+ mb: "4px"
80
+ },
81
+ price
82
+ ),
83
+ /* @__PURE__ */ import_react.default.createElement(
84
+ import_components.Text,
85
+ {
86
+ "data-testid": "market-price-indicator-percent",
87
+ color: percentageDisplay.color,
88
+ fontSize: "12px"
89
+ },
90
+ percentageDisplay.text
91
+ )
75
92
  );
76
93
  };
77
94
  //# sourceMappingURL=MarketPriceIndicator.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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;",
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: `-${Math.abs(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\n data-testid=\"market-price-indicator-value\"\n variant=\"body\"\n fontWeight=\"semiBold\"\n mb=\"4px\"\n >\n {price}\n </Text>\n <Text\n data-testid=\"market-price-indicator-percent\"\n color={percentageDisplay.color}\n fontSize=\"12px\"\n >\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,KAAK,IAAI,OAAO,CAAC;AAAA,IAC7B;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;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACZ,SAAQ;AAAA,QACR,YAAW;AAAA,QACX,IAAG;AAAA;AAAA,MAEF;AAAA,IACH;AAAA,IACA,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAY;AAAA,QACZ,OAAO,kBAAkB;AAAA,QACzB,UAAS;AAAA;AAAA,MAER,kBAAkB;AAAA,IACrB;AAAA,EACF;AAEJ;",
6
6
  "names": ["styled", "React"]
7
7
  }
@@ -1 +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"}
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;uBAsBpE,CAAC"}
@@ -29,6 +29,6 @@ const getPercentageDisplay = (percent) => {
29
29
  export const MarketPercentIndicator = ({ percent }) => {
30
30
  const percentageDisplay = getPercentageDisplay(percent);
31
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)));
32
+ React.createElement(Text, { "data-testid": "market-percent-indicator-value", color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)));
33
33
  };
34
34
  //# sourceMappingURL=MarketPercentIndicator.js.map
@@ -1 +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"}
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,mBACS,gCAAgC,EAC5C,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAC9B,QAAQ,EAAC,MAAM,IAEd,iBAAiB,CAAC,IAAI,CAClB,CACC,CACX,CAAC;AACJ,CAAC,CAAC"}
@@ -1 +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"}
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;uBA2BxF,CAAC"}
@@ -15,7 +15,7 @@ const getPercentageDisplay = (percent) => {
15
15
  if (percent < 0) {
16
16
  return {
17
17
  color: "var(--colors-surface-status-error-strong-default)",
18
- text: `-${percent}%`,
18
+ text: `-${Math.abs(percent)}%`,
19
19
  };
20
20
  }
21
21
  return {
@@ -26,7 +26,7 @@ const getPercentageDisplay = (percent) => {
26
26
  export const MarketPriceIndicator = ({ percent, price }) => {
27
27
  const percentageDisplay = getPercentageDisplay(percent);
28
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)));
29
+ React.createElement(Text, { "data-testid": "market-price-indicator-value", variant: "body", fontWeight: "semiBold", mb: "4px" }, price),
30
+ React.createElement(Text, { "data-testid": "market-price-indicator-percent", color: percentageDisplay.color, fontSize: "12px" }, percentageDisplay.text)));
31
31
  };
32
32
  //# sourceMappingURL=MarketPriceIndicator.js.map
@@ -1 +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"}
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,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG;SAC/B,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,mBACS,8BAA8B,EAC1C,OAAO,EAAC,MAAM,EACd,UAAU,EAAC,UAAU,EACrB,EAAE,EAAC,KAAK,IAEP,KAAK,CACD;QACP,oBAAC,IAAI,mBACS,gCAAgC,EAC5C,KAAK,EAAE,iBAAiB,CAAC,KAAK,EAC9B,QAAQ,EAAC,MAAM,IAEd,iBAAiB,CAAC,IAAI,CAClB,CACC,CACX,CAAC;AACJ,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/react-ui",
3
- "version": "0.38.0-nightly.2",
3
+ "version": "0.38.0-nightly.3",
4
4
  "description": "Ledger Live - Desktop UI",
5
5
  "author": "Ledger Live Team <team-live@ledger.fr>",
6
6
  "repository": {
@@ -75,9 +75,9 @@
75
75
  "react-transition-group": "^4.4.2",
76
76
  "react-window": "^1.8.6",
77
77
  "styled-system": "^5.1.5",
78
+ "@ledgerhq/ui-shared": "^0.4.0",
78
79
  "@ledgerhq/crypto-icons-ui": "^1.19.0-nightly.1",
79
- "@ledgerhq/icons-ui": "^0.14.0-nightly.0",
80
- "@ledgerhq/ui-shared": "^0.4.0"
80
+ "@ledgerhq/icons-ui": "^0.14.0-nightly.0"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "react": ">=17.0.2",