@ledgerhq/native-ui 0.44.1-nightly.1 → 0.45.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.
@@ -32,6 +32,7 @@ export type AccountItemProps = {
32
32
  rightElement?: RightElement;
33
33
  showIcon?: boolean;
34
34
  backgroundColor?: string;
35
+ cryptoIconBackgroundColor: string;
35
36
  };
36
- export declare const AccountItem: ({ onClick, account, rightElement, showIcon, backgroundColor, }: AccountItemProps) => React.JSX.Element;
37
+ export declare const AccountItem: ({ onClick, account, rightElement, showIcon, backgroundColor, cryptoIconBackgroundColor, }: AccountItemProps) => React.JSX.Element;
37
38
  //# sourceMappingURL=AccountItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AccountItem.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AccountItem/AccountItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,OAAO,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;CAC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C;KACpB,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,gBAAgB,CAAC;AAEvF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yBAAyB,EAAE,MAAM,CAAC;CACnC,CAAC;AAkGF,eAAO,MAAM,WAAW,8FAOrB,gBAAgB,sBA8FlB,CAAC"}
@@ -70,7 +70,7 @@ const RightElementRenderer = ({ rightElement, tokens, onEditPress }) => {
70
70
  rightElement.type === "edit" && (React.createElement(IconButton, { onPress: onEditPress, testID: "right-element-edit-icon" },
71
71
  React.createElement(PenMedium, { size: 16, color: String(tokens["colors-content-default-default"]) })))));
72
72
  };
73
- export const AccountItem = ({ onClick, account, rightElement, showIcon = true, backgroundColor, }) => {
73
+ export const AccountItem = ({ onClick, account, rightElement, showIcon = true, backgroundColor, cryptoIconBackgroundColor, }) => {
74
74
  const theme = useTheme();
75
75
  const colorType = theme.colors.type === "dark" ? "dark" : "light";
76
76
  const tokens = useTokens(colorType, [
@@ -106,7 +106,7 @@ export const AccountItem = ({ onClick, account, rightElement, showIcon = true, b
106
106
  React.createElement(Text, { variant: "largeLineHeight", fontWeight: "semiBold", color: String(tokens["colors-content-default-default"]), fontSize: "18px", numberOfLines: 1, ellipsizeMode: "tail" }, name)),
107
107
  protocol && (React.createElement(TagWrapper, { style: { marginLeft: Number(tokens["spacing-xs"]) } },
108
108
  React.createElement(Tag, { textTransform: "uppercase" }, protocol)))),
109
- React.createElement(Address, { address: address, cryptoId: cryptoId, ticker: ticker, parentId: parentId, showIcon: showIcon })),
109
+ React.createElement(Address, { address: address, cryptoId: cryptoId, ticker: ticker, parentId: parentId, showIcon: showIcon, backgroundColor: cryptoIconBackgroundColor })),
110
110
  React.createElement(BalanceContainer, { style: { gap: Number(tokens["spacing-xxxs"]) } },
111
111
  fiatValue && (React.createElement(Text, { fontSize: "18px", color: String(tokens["colors-content-default-default"]) }, fiatValue)),
112
112
  balance && (React.createElement(Text, { fontSize: "14px", color: String(tokens["colors-content-subdued-default-default"]) }, balance))),
@@ -1 +1 @@
1
- {"version":3,"file":"AccountItem.stories.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AccountItem/AccountItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAwBlC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAczB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAajC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAYpC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoB9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAc3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAgB1B,CAAC"}
1
+ {"version":3,"file":"AccountItem.stories.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AccountItem/AccountItem.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAI5C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAyBlC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,WAAW,EAAE,KAezB,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAcjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,KAapC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAqB9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAe3B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAiB1B,CAAC"}
@@ -14,6 +14,7 @@ const meta = {
14
14
  id: "12345",
15
15
  name: "Main BTC",
16
16
  ticker: "btc",
17
+ cryptoIconBackgroundColor: "red",
17
18
  },
18
19
  },
19
20
  parameters: {
@@ -38,6 +39,7 @@ export const TestAccount = {
38
39
  name: "Main BTC",
39
40
  protocol: "Native Segwit",
40
41
  ticker: "btc",
42
+ cryptoIconBackgroundColor: "red",
41
43
  },
42
44
  },
43
45
  };
@@ -52,6 +54,7 @@ export const TestWithoutProtocol = {
52
54
  id: "21345",
53
55
  name: "Main BTC",
54
56
  ticker: "btc",
57
+ cryptoIconBackgroundColor: "red",
55
58
  },
56
59
  },
57
60
  };
@@ -64,6 +67,7 @@ export const TestWithoutAddressIcon = {
64
67
  fiatValue: "$5,969.83",
65
68
  id: "bitcoin",
66
69
  name: "Main BTC",
70
+ cryptoIconBackgroundColor: "red",
67
71
  },
68
72
  showIcon: false,
69
73
  },
@@ -78,6 +82,7 @@ export const TestWithCheckbox = {
78
82
  id: "12345",
79
83
  name: "Main BTC",
80
84
  ticker: "btc",
85
+ cryptoIconBackgroundColor: "red",
81
86
  },
82
87
  onClick: onClick,
83
88
  rightElement: {
@@ -98,6 +103,7 @@ export const TestWithArrow = {
98
103
  id: "12345",
99
104
  name: "Main BTC",
100
105
  ticker: "btc",
106
+ cryptoIconBackgroundColor: "red",
101
107
  },
102
108
  rightElement: {
103
109
  type: "arrow",
@@ -113,6 +119,7 @@ export const TestWithEdit = {
113
119
  id: "12345",
114
120
  name: "Main BTC",
115
121
  ticker: "btc",
122
+ cryptoIconBackgroundColor: "red",
116
123
  },
117
124
  onClick: undefined,
118
125
  rightElement: {
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
- export declare const Address: ({ address, showIcon, cryptoId, ticker, parentId, }: {
2
+ export declare const Address: ({ address, showIcon, cryptoId, ticker, parentId, backgroundColor, }: {
3
3
  address: string;
4
4
  showIcon: boolean;
5
5
  cryptoId?: string | undefined;
6
6
  ticker?: string | undefined;
7
7
  parentId?: string | undefined;
8
+ backgroundColor: string;
8
9
  }) => React.JSX.Element;
9
10
  //# sourceMappingURL=Address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Address/Address.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAO,MAAM,OAAO;aAOT,MAAM;cACL,OAAO;;;;uBAqBlB,CAAC"}
1
+ {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Address/Address.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,eAAO,MAAM,OAAO;aAQT,MAAM;cACL,OAAO;;;;qBAIA,MAAM;uBA2BxB,CAAC"}
@@ -8,11 +8,11 @@ const Wrapper = styled(View) `
8
8
  flex-direction: row;
9
9
  align-items: center;
10
10
  `;
11
- export const Address = ({ address, showIcon, cryptoId, ticker, parentId, }) => {
11
+ export const Address = ({ address, showIcon, cryptoId, ticker, parentId, backgroundColor, }) => {
12
12
  const { theme } = useTheme();
13
13
  const colorType = theme;
14
14
  const tokens = useTokens(colorType, ["spacing-xxxs", "colors-content-subdued-default-default"]);
15
15
  return (React.createElement(Wrapper, null,
16
16
  React.createElement(Text, { fontSize: "14px", color: String(tokens["colors-content-subdued-default-default"]), marginRight: showIcon ? Number(tokens["spacing-xxxs"]) : 0 }, address),
17
- showIcon && React.createElement(CryptoIcon, { ledgerId: cryptoId, network: parentId, ticker: ticker, size: 20 })));
17
+ showIcon && (React.createElement(CryptoIcon, { ledgerId: cryptoId, network: parentId, ticker: ticker, size: 20, theme: theme, backgroundColor: backgroundColor }))));
18
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/native-ui",
3
- "version": "0.44.1-nightly.1",
3
+ "version": "0.45.0-nightly.2",
4
4
  "description": "Ledger Live - Mobile UI",
5
5
  "repository": {
6
6
  "type": "git",