@ledgerhq/native-ui 0.41.0 → 0.42.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.
Files changed (34) hide show
  1. package/lib/components/Layout/Modals/BaseModal/index.d.ts.map +1 -1
  2. package/lib/components/Layout/Modals/BaseModal/index.js +2 -3
  3. package/lib/pre-ldls/components/AccountItem/AccountItem.d.ts +37 -0
  4. package/lib/pre-ldls/components/AccountItem/AccountItem.d.ts.map +1 -0
  5. package/lib/pre-ldls/components/AccountItem/AccountItem.js +114 -0
  6. package/lib/pre-ldls/components/AccountItem/AccountItem.stories.d.ts +13 -0
  7. package/lib/pre-ldls/components/AccountItem/AccountItem.stories.d.ts.map +1 -0
  8. package/lib/pre-ldls/components/AccountItem/AccountItem.stories.js +123 -0
  9. package/lib/pre-ldls/components/AddAccountButton/AddAccountButton.d.ts +7 -0
  10. package/lib/pre-ldls/components/AddAccountButton/AddAccountButton.d.ts.map +1 -0
  11. package/lib/pre-ldls/components/AddAccountButton/AddAccountButton.js +31 -0
  12. package/lib/pre-ldls/components/AddAccountButton/AddAccountButton.stories.d.ts +7 -0
  13. package/lib/pre-ldls/components/AddAccountButton/AddAccountButton.stories.d.ts.map +1 -0
  14. package/lib/pre-ldls/components/AddAccountButton/AddAccountButton.stories.js +19 -0
  15. package/lib/pre-ldls/components/Address/Address.d.ts +9 -0
  16. package/lib/pre-ldls/components/Address/Address.d.ts.map +1 -0
  17. package/lib/pre-ldls/components/Address/Address.js +18 -0
  18. package/lib/pre-ldls/components/AssetItem/AssetItem.js +1 -1
  19. package/lib/pre-ldls/components/AssetTypeList/AssetList.d.ts +3 -1
  20. package/lib/pre-ldls/components/AssetTypeList/AssetList.d.ts.map +1 -1
  21. package/lib/pre-ldls/components/AssetTypeList/AssetList.js +14 -1
  22. package/lib/pre-ldls/components/Input/Input.d.ts.map +1 -1
  23. package/lib/pre-ldls/components/Input/Input.js +18 -5
  24. package/lib/pre-ldls/components/NetworkItem/NetworkItem.js +1 -1
  25. package/lib/pre-ldls/components/Search/Search.d.ts +2 -1
  26. package/lib/pre-ldls/components/Search/Search.d.ts.map +1 -1
  27. package/lib/pre-ldls/components/Search/Search.js +2 -2
  28. package/lib/pre-ldls/components/index.d.ts +3 -0
  29. package/lib/pre-ldls/components/index.d.ts.map +1 -1
  30. package/lib/pre-ldls/components/index.js +3 -0
  31. package/lib/pre-ldls/libs/index.d.ts +2 -0
  32. package/lib/pre-ldls/libs/index.d.ts.map +1 -1
  33. package/lib/pre-ldls/libs/index.js +2 -0
  34. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/Modals/BaseModal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AACtD,OAAyB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAItE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AASvD,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CAC9D,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AA0DxB,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,GACT,EAAE,IAAI,CACL,cAAc,EACd,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAC5D,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAsB5B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,GACR,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAUtD;AAED,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,GACP,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,YAAY,CAUrD;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,OAAkB,EAClB,MAAiB,EACjB,aAAa,EACb,aAAa,EACb,kBAAuB,EACvB,cAAmB,EACnB,UAAe,EACf,oBAAoB,EACpB,IAAI,EACJ,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,GAAG,IAAI,EACR,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAkErC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Layout/Modals/BaseModal/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AACtD,OAAyB,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAElE,OAAO,EAAE,SAAS,EAAoB,SAAS,EAAE,MAAM,cAAc,CAAC;AAItE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AASvD,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAClC,kBAAkB,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;CAC9D,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AA0DxB,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,GACT,EAAE,IAAI,CACL,cAAc,EACd,MAAM,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,UAAU,CAC5D,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAsB5B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,GACR,EAAE,IAAI,CAAC,cAAc,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,YAAY,CAUtD;AAED,wBAAgB,qBAAqB,CAAC,EACpC,MAAM,GACP,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,YAAY,CAUrD;AAED,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,MAAM,EACN,OAAkB,EAClB,MAAiB,EACjB,aAAa,EACb,aAAa,EACb,kBAAuB,EACvB,cAAmB,EACnB,UAAe,EACf,oBAAoB,EACpB,IAAI,EACJ,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,GAAG,IAAI,EACR,EAAE,cAAc,GAAG,KAAK,CAAC,YAAY,CAiErC"}
@@ -90,9 +90,8 @@ export default function BaseModal({ isOpen, onClose = () => { }, onBack = () =>
90
90
  // The real fix would be to have onModalHide={onModalHide} and make sure every usage on onClose in the consumers of this component
91
91
  // expect the correct behavior
92
92
  const onModalHideWithClose = useCallback(() => {
93
- onClose();
94
- onModalHide && onModalHide();
95
- }, [onClose, onModalHide]);
93
+ onModalHide?.();
94
+ }, [onModalHide]);
96
95
  return (React.createElement(ReactNativeModal, { ...backDropProps, ...rest, isVisible: !!isOpen, deviceWidth: width, deviceHeight: height, useNativeDriver: true, useNativeDriverForBackdrop: true, hideModalContentWhileAnimating: true, onModalHide: onModalHideWithClose, style: [defaultModalStyle, modalStyle] },
97
96
  React.createElement(SafeContainer, { style: safeContainerStyle },
98
97
  CustomHeader && (React.createElement(CustomHeader, null, !noCloseButton && React.createElement(ModalHeaderCloseButton, { onClose: onClose }))),
@@ -0,0 +1,37 @@
1
+ import React from "react";
2
+ export type AccountUI = {
3
+ address: string;
4
+ balance?: string;
5
+ cryptoId?: string;
6
+ fiatValue?: string;
7
+ id: string;
8
+ name: string;
9
+ parentId?: string;
10
+ protocol?: string;
11
+ ticker?: string;
12
+ };
13
+ export type RightElementArrow = {
14
+ type: "arrow";
15
+ };
16
+ export type RightElementCheckbox = {
17
+ type: "checkbox";
18
+ checkbox: {
19
+ checked: boolean;
20
+ onChange?: () => void;
21
+ disabled?: boolean;
22
+ };
23
+ };
24
+ export type RightElementEdit = {
25
+ type: "edit";
26
+ onClick: () => void;
27
+ };
28
+ export type RightElement = RightElementArrow | RightElementCheckbox | RightElementEdit;
29
+ export type AccountItemProps = {
30
+ onClick?: () => void;
31
+ account: AccountUI;
32
+ rightElement?: RightElement;
33
+ showIcon?: boolean;
34
+ backgroundColor?: string;
35
+ };
36
+ export declare const AccountItem: ({ onClick, account, rightElement, showIcon, backgroundColor, }: AccountItemProps) => React.JSX.Element;
37
+ //# sourceMappingURL=AccountItem.d.ts.map
@@ -0,0 +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;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;CAC1B,CAAC;AAkGF,eAAO,MAAM,WAAW,mEAMrB,gBAAgB,sBA6FlB,CAAC"}
@@ -0,0 +1,114 @@
1
+ import React from "react";
2
+ import { Pressable, View } from "react-native";
3
+ import styled, { useTheme } from "styled-components/native";
4
+ import { ChevronRightMedium, PenMedium } from "@ledgerhq/icons-ui/nativeLegacy";
5
+ import Text from "../../../components/Text";
6
+ import { Address } from "../Address/Address";
7
+ import { Tag } from "../Tag/Tag";
8
+ import Checkbox from "../../../components/Form/Checkbox";
9
+ import { useTokens } from "../../libs";
10
+ const ICON_BUTTONS_SIZE = 32;
11
+ const IconButton = styled(Pressable) `
12
+ align-items: center;
13
+ justify-content: center;
14
+ height: ${ICON_BUTTONS_SIZE}px;
15
+ width: ${ICON_BUTTONS_SIZE}px;
16
+ `;
17
+ const Wrapper = styled(Pressable) `
18
+ flex-direction: row;
19
+ justify-content: space-between;
20
+ align-items: center;
21
+ width: 100%;
22
+ overflow: hidden;
23
+ ${(props) => props.backgroundColor && `background-color: ${props.backgroundColor};`}
24
+ `;
25
+ const ContentContainer = styled(View) `
26
+ align-items: center;
27
+ flex-direction: row;
28
+ flex: 1;
29
+ justify-content: space-between;
30
+ min-width: 0;
31
+ overflow: hidden;
32
+ width: 100%;
33
+ `;
34
+ const AccountInfoContainer = styled(View) `
35
+ flex-direction: column;
36
+ justify-content: center;
37
+ min-width: 0;
38
+ flex: 1;
39
+ overflow: hidden;
40
+ `;
41
+ const NameRow = styled(View) `
42
+ flex-direction: row;
43
+ align-items: center;
44
+ min-width: 0;
45
+ width: 100%;
46
+ `;
47
+ const NameWrapper = styled(View) `
48
+ min-width: 0;
49
+ flex-shrink: 1;
50
+ `;
51
+ const TagWrapper = styled(View) `
52
+ flex-shrink: 0;
53
+ align-items: flex-start;
54
+ `;
55
+ const BalanceContainer = styled(View) `
56
+ flex-direction: column;
57
+ flex-shrink: 0;
58
+ align-items: flex-end;
59
+ `;
60
+ const RightElementContainer = styled(View) `
61
+ align-items: center;
62
+ justify-content: center;
63
+ `;
64
+ const RightElementRenderer = ({ rightElement, tokens, onEditPress }) => {
65
+ return (React.createElement(RightElementContainer, { style: { marginLeft: Number(tokens["spacing-xs"]) } },
66
+ rightElement.type === "checkbox" && (React.createElement(View, { testID: "right-element-checkbox" },
67
+ React.createElement(Checkbox, { checked: rightElement.checkbox.checked, onChange: rightElement.checkbox.onChange, disabled: rightElement.checkbox.disabled }))),
68
+ rightElement.type === "arrow" && (React.createElement(View, { testID: "right-element-arrow-icon" },
69
+ React.createElement(ChevronRightMedium, { size: 24, color: String(tokens["colors-content-default-default"]) }))),
70
+ rightElement.type === "edit" && (React.createElement(IconButton, { onPress: onEditPress, testID: "right-element-edit-icon" },
71
+ React.createElement(PenMedium, { size: 16, color: String(tokens["colors-content-default-default"]) })))));
72
+ };
73
+ export const AccountItem = ({ onClick, account, rightElement, showIcon = true, backgroundColor, }) => {
74
+ const theme = useTheme();
75
+ const colorType = theme.colors.type === "dark" ? "dark" : "light";
76
+ const tokens = useTokens(colorType, [
77
+ "spacing-xxxs",
78
+ "spacing-xs",
79
+ "margin-s",
80
+ "radius-s",
81
+ "colors-content-default-default",
82
+ "colors-content-subdued-default-default",
83
+ "colors-surface-transparent-hover",
84
+ "colors-surface-transparent-pressed",
85
+ ]);
86
+ const { name, balance, fiatValue, protocol, address, ticker, cryptoId, parentId } = account;
87
+ const handlePress = () => {
88
+ if (onClick) {
89
+ onClick();
90
+ }
91
+ };
92
+ const handleEditPress = () => {
93
+ if (rightElement?.type === "edit") {
94
+ rightElement.onClick();
95
+ }
96
+ };
97
+ return (React.createElement(Wrapper, { backgroundColor: backgroundColor, isClickable: Boolean(onClick), onPress: handlePress, style: ({ pressed }) => ({
98
+ paddingTop: onClick ? Number(tokens["margin-s"]) : 0,
99
+ borderRadius: onClick ? Number(tokens["radius-s"]) : 0,
100
+ opacity: pressed && onClick ? 0.7 : 1,
101
+ }), testID: "account-item" },
102
+ React.createElement(ContentContainer, null,
103
+ React.createElement(AccountInfoContainer, null,
104
+ React.createElement(NameRow, { style: { marginBottom: Number(tokens["spacing-xxxs"]) } },
105
+ React.createElement(NameWrapper, null,
106
+ React.createElement(Text, { variant: "largeLineHeight", fontWeight: "semiBold", color: String(tokens["colors-content-default-default"]), fontSize: "18px", numberOfLines: 1, ellipsizeMode: "tail" }, name)),
107
+ protocol && (React.createElement(TagWrapper, { style: { marginLeft: Number(tokens["spacing-xs"]) } },
108
+ React.createElement(Tag, { textTransform: "uppercase" }, protocol)))),
109
+ React.createElement(Address, { address: address, cryptoId: cryptoId, ticker: ticker, parentId: parentId, showIcon: showIcon })),
110
+ React.createElement(BalanceContainer, { style: { gap: Number(tokens["spacing-xxxs"]) } },
111
+ fiatValue && (React.createElement(Text, { fontSize: "18px", color: String(tokens["colors-content-default-default"]) }, fiatValue)),
112
+ balance && (React.createElement(Text, { fontSize: "14px", color: String(tokens["colors-content-subdued-default-default"]) }, balance))),
113
+ rightElement && (React.createElement(RightElementRenderer, { rightElement: rightElement, tokens: tokens, onEditPress: handleEditPress })))));
114
+ };
@@ -0,0 +1,13 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { AccountItem } from "./AccountItem";
3
+ declare const meta: Meta<typeof AccountItem>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AccountItem>;
6
+ export declare const Default: Story;
7
+ export declare const TestAccount: Story;
8
+ export declare const TestWithoutProtocol: Story;
9
+ export declare const TestWithoutAddressIcon: Story;
10
+ export declare const TestWithCheckbox: Story;
11
+ export declare const TestWithArrow: Story;
12
+ export declare const TestWithEdit: Story;
13
+ //# sourceMappingURL=AccountItem.stories.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,123 @@
1
+ import { AccountItem } from "./AccountItem";
2
+ const onClick = () => console.log("Account clicked");
3
+ const meta = {
4
+ component: AccountItem,
5
+ title: "PreLdls/Components/AccountItem",
6
+ tags: ["autodocs"],
7
+ args: {
8
+ onClick: onClick,
9
+ account: {
10
+ address: "n4A9...Zgty",
11
+ balance: "0.118 ETH",
12
+ cryptoId: "bitcoin",
13
+ fiatValue: "$5,969.83",
14
+ id: "12345",
15
+ name: "Main BTC",
16
+ ticker: "btc",
17
+ },
18
+ },
19
+ parameters: {
20
+ docs: {
21
+ description: {
22
+ component: "AccountItem displays an account with its name, address, balance, and fiat value. Use it to represent selectable accounts in lists.",
23
+ },
24
+ },
25
+ },
26
+ };
27
+ export default meta;
28
+ export const Default = {};
29
+ export const TestAccount = {
30
+ args: {
31
+ onClick: onClick,
32
+ account: {
33
+ address: "n4A9...Zgty",
34
+ balance: "0.118 BTC",
35
+ cryptoId: "bitcoin",
36
+ fiatValue: "$5,969.83",
37
+ id: "12345",
38
+ name: "Main BTC",
39
+ protocol: "Native Segwit",
40
+ ticker: "btc",
41
+ },
42
+ },
43
+ };
44
+ export const TestWithoutProtocol = {
45
+ args: {
46
+ onClick: onClick,
47
+ account: {
48
+ address: "n4A9...Zgty",
49
+ balance: "0.118 BTC",
50
+ cryptoId: "bitcoin",
51
+ fiatValue: "$5,969.83",
52
+ id: "21345",
53
+ name: "Main BTC",
54
+ ticker: "btc",
55
+ },
56
+ },
57
+ };
58
+ export const TestWithoutAddressIcon = {
59
+ args: {
60
+ onClick: onClick,
61
+ account: {
62
+ address: "n4A9...Zgty",
63
+ balance: "0.118 BTC",
64
+ fiatValue: "$5,969.83",
65
+ id: "bitcoin",
66
+ name: "Main BTC",
67
+ },
68
+ showIcon: false,
69
+ },
70
+ };
71
+ export const TestWithCheckbox = {
72
+ args: {
73
+ account: {
74
+ address: "n4A9...Zgty",
75
+ balance: "0.118",
76
+ cryptoId: "bitcoin",
77
+ fiatValue: "$5,969.83",
78
+ id: "12345",
79
+ name: "Main BTC",
80
+ ticker: "btc",
81
+ },
82
+ onClick: onClick,
83
+ rightElement: {
84
+ type: "checkbox",
85
+ checkbox: {
86
+ checked: false,
87
+ onChange: () => { },
88
+ },
89
+ },
90
+ },
91
+ };
92
+ export const TestWithArrow = {
93
+ args: {
94
+ account: {
95
+ address: "n4A9...Zgty",
96
+ cryptoId: "bitcoin",
97
+ fiatValue: "$5,969.83",
98
+ id: "12345",
99
+ name: "Main BTC",
100
+ ticker: "btc",
101
+ },
102
+ rightElement: {
103
+ type: "arrow",
104
+ },
105
+ },
106
+ };
107
+ export const TestWithEdit = {
108
+ args: {
109
+ account: {
110
+ address: "n4A9...Zgty",
111
+ cryptoId: "bitcoin",
112
+ fiatValue: "$5,969.83",
113
+ id: "12345",
114
+ name: "Main BTC",
115
+ ticker: "btc",
116
+ },
117
+ onClick: undefined,
118
+ rightElement: {
119
+ type: "edit",
120
+ onClick: onClick,
121
+ },
122
+ },
123
+ };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ export declare const AddAccountButton: ({ label, onClick, disabled, }: {
3
+ onClick: () => void;
4
+ disabled?: boolean | undefined;
5
+ label: string;
6
+ }) => React.JSX.Element;
7
+ //# sourceMappingURL=AddAccountButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddAccountButton.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AddAccountButton/AddAccountButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAmB1B,eAAO,MAAM,gBAAgB;aAKlB,MAAM,IAAI;;WAEZ,MAAM;uBAuBd,CAAC"}
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import styled, { useTheme } from "styled-components/native";
3
+ import { Pressable } from "react-native";
4
+ import Text from "../../../components/Text";
5
+ import { Icon } from "../../../components/Icon";
6
+ const StyledPressable = styled(Pressable) `
7
+ border-width: 1px;
8
+ border-style: dotted;
9
+ padding: 16px;
10
+ margin-vertical: 8px;
11
+ border-radius: 12px;
12
+ display: flex;
13
+ flex-direction: row;
14
+ align-items: center;
15
+ justify-content: space-between;
16
+ column-gap: 12px;
17
+ `;
18
+ export const AddAccountButton = ({ label, onClick, disabled = false, }) => {
19
+ const theme = useTheme();
20
+ return (React.createElement(StyledPressable, { disabled: disabled, style: ({ pressed }) => [
21
+ {
22
+ opacity: pressed ? 0.5 : 1.0,
23
+ marginVertical: 12,
24
+ width: "100%",
25
+ borderColor: theme.colors.opacityDefault.c10,
26
+ },
27
+ disabled && { opacity: 0.5 },
28
+ ], hitSlop: 6, onPress: () => onClick(), testID: "add-new-account-button" },
29
+ React.createElement(Text, { variant: "large" }, label),
30
+ React.createElement(Icon, { name: "Plus", size: 20, color: "neutral.c100" })));
31
+ };
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { AddAccountButton } from "./AddAccountButton";
3
+ declare const meta: Meta<typeof AddAccountButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof AddAccountButton>;
6
+ export declare const Default: Story;
7
+ //# sourceMappingURL=AddAccountButton.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AddAccountButton.stories.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AddAccountButton/AddAccountButton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAgBvC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE/C,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import { AddAccountButton } from "./AddAccountButton";
4
+ const meta = {
5
+ component: AddAccountButton,
6
+ decorators: [
7
+ (Story) => (React.createElement(View, { style: { height: 400, width: 400 } },
8
+ React.createElement(Story, null))),
9
+ ],
10
+ title: "PreLdls/Components/AddAccountButton",
11
+ tags: ["autodocs"],
12
+ args: {
13
+ t: (key) => key,
14
+ onClick: () => { },
15
+ label: "Add new or existing account",
16
+ },
17
+ };
18
+ export default meta;
19
+ export const Default = {};
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export declare const Address: ({ address, showIcon, cryptoId, ticker, parentId, }: {
3
+ address: string;
4
+ showIcon: boolean;
5
+ cryptoId?: string | undefined;
6
+ ticker?: string | undefined;
7
+ parentId?: string | undefined;
8
+ }) => React.JSX.Element;
9
+ //# sourceMappingURL=Address.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,18 @@
1
+ import React from "react";
2
+ import { View } from "react-native";
3
+ import styled, { useTheme } from "styled-components/native";
4
+ import Text from "../../../components/Text";
5
+ import { CryptoIcon } from "../CryptoIcon/CryptoIcon";
6
+ import { useTokens } from "../../libs";
7
+ const Wrapper = styled(View) `
8
+ flex-direction: row;
9
+ align-items: center;
10
+ `;
11
+ export const Address = ({ address, showIcon, cryptoId, ticker, parentId, }) => {
12
+ const { theme } = useTheme();
13
+ const colorType = theme;
14
+ const tokens = useTokens(colorType, ["spacing-xxxs", "colors-content-subdued-default-default"]);
15
+ return (React.createElement(Wrapper, null,
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 })));
18
+ };
@@ -35,7 +35,7 @@ export const AssetItem = ({ name, ticker, id, onClick, leftElement, rightElement
35
35
  "colors-surface-transparent-default",
36
36
  ]);
37
37
  return (React.createElement(Wrapper, { onPress: () => onClick({ name, ticker, id }), style: ({ pressed }) => ({
38
- padding: Number(tokens["spacing-xxs"]),
38
+ paddingVertical: Number(tokens["spacing-xxs"]),
39
39
  borderRadius: Number(tokens["radius-s"]),
40
40
  backgroundColor: String(tokens["colors-surface-transparent-default"]),
41
41
  opacity: pressed ? 0.7 : 1,
@@ -1,9 +1,11 @@
1
1
  import React from "react";
2
2
  import { AssetType } from "../AssetItem/AssetItem";
3
- export declare const AssetList: ({ assets, onClick, onVisibleItemsScrollEnd, scrollToTop, hasNextPage, }: {
3
+ export declare const AssetList: ({ assets, onClick, onVisibleItemsScrollEnd, onScrollDown, onScrollUp, scrollToTop, hasNextPage, }: {
4
4
  assets: AssetType[];
5
5
  onClick: (asset: AssetType) => void;
6
6
  onVisibleItemsScrollEnd?: (() => void) | undefined;
7
+ onScrollDown?: (() => void) | undefined;
8
+ onScrollUp?: (() => void) | undefined;
7
9
  scrollToTop?: boolean | undefined;
8
10
  hasNextPage?: boolean | undefined;
9
11
  }) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"AssetList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetTypeList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAa,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAK9D,eAAO,MAAM,SAAS;YAOZ,SAAS,EAAE;qBACF,SAAS,KAAK,IAAI;qCACH,IAAI;;;uBA0CrC,CAAC"}
1
+ {"version":3,"file":"AssetList.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/AssetTypeList/AssetList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAa,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAK9D,eAAO,MAAM,SAAS;YASZ,SAAS,EAAE;qBACF,SAAS,KAAK,IAAI;qCACH,IAAI;0BACf,IAAI;wBACN,IAAI;;;uBA+DxB,CAAC"}
@@ -3,7 +3,7 @@ import { FlatList } from "react-native";
3
3
  import { AssetItem } from "../AssetItem/AssetItem";
4
4
  const ITEM_PADDING = 8;
5
5
  const ITEM_HEIGHT = 48 + ITEM_PADDING * 2;
6
- export const AssetList = ({ assets, onClick, onVisibleItemsScrollEnd, scrollToTop, hasNextPage, }) => {
6
+ export const AssetList = ({ assets, onClick, onVisibleItemsScrollEnd, onScrollDown, onScrollUp, scrollToTop, hasNextPage, }) => {
7
7
  const flatListRef = useRef(null);
8
8
  const renderAssetItem = useCallback(({ item }) => React.createElement(AssetItem, { ...item, onClick: onClick }), [onClick]);
9
9
  const keyExtractor = useCallback((item, index) => `${item.id}-${index}`, []);
@@ -17,6 +17,18 @@ export const AssetList = ({ assets, onClick, onVisibleItemsScrollEnd, scrollToTo
17
17
  onVisibleItemsScrollEnd();
18
18
  }
19
19
  }, [hasNextPage, onVisibleItemsScrollEnd]);
20
+ const handleViewableItemsChanged = useCallback((info) => {
21
+ if (info.changed.length === 0)
22
+ return;
23
+ const isScrollingDown = info.changed[0].index > info.changed[info.changed.length - 1].index;
24
+ const isScrollingUp = info.changed[0].index < info.changed[info.changed.length - 1].index;
25
+ if (onScrollDown && isScrollingDown) {
26
+ onScrollDown();
27
+ }
28
+ if (onScrollUp && isScrollingUp) {
29
+ onScrollUp();
30
+ }
31
+ }, [onScrollUp, onScrollDown]);
20
32
  const flatListProps = {
21
33
  data: assets,
22
34
  renderItem: renderAssetItem,
@@ -31,6 +43,7 @@ export const AssetList = ({ assets, onClick, onVisibleItemsScrollEnd, scrollToTo
31
43
  onEndReached: handleEndReached,
32
44
  onEndReachedThreshold: 0.1,
33
45
  }),
46
+ onViewableItemsChanged: handleViewableItemsChanged,
34
47
  };
35
48
  return React.createElement(FlatList, { ref: flatListRef, ...flatListProps });
36
49
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAI/C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAkCF,eAAO,MAAM,KAAK;uBA/BE,SAAS,KAAK,WAAW;mCA2C3C,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAI/C,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,KAAK,CAAC;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAyCF,eAAO,MAAM,KAAK;uBAtCE,SAAS,KAAK,WAAW;mCAsE5C,CAAC"}
@@ -1,11 +1,12 @@
1
- import React, { useContext } from "react";
1
+ import React, { useContext, useState } from "react";
2
2
  import { TextInput, View } from "react-native";
3
3
  import styled, { ThemeContext } from "styled-components/native";
4
4
  import { useTokens } from "../../libs";
5
5
  const Wrapper = styled(View) `
6
6
  height: 40px;
7
7
  min-width: 328px;
8
- padding-horizontal: ${({ tokens }) => tokens["spacing-s"]}px;
8
+ padding-left: ${({ isFocused, tokens }) => isFocused ? Number(tokens["spacing-s"]) - 2 : Number(tokens["spacing-s"])}px;
9
+ padding-right: ${({ isFocused, tokens }) => isFocused ? Number(tokens["spacing-s"]) - 2 : Number(tokens["spacing-s"])}px;
9
10
  align-items: center;
10
11
  flex-direction: row;
11
12
  gap: ${({ tokens }) => tokens["spacing-xxs"]}px;
@@ -13,6 +14,8 @@ const Wrapper = styled(View) `
13
14
  background-color: ${({ tokens }) => tokens["colors-surface-transparent-subdued-default"]};
14
15
  overflow: hidden;
15
16
  color: ${({ tokens }) => tokens["colors-content-subdued-default-default"]};
17
+ border-width: ${({ isFocused }) => (isFocused ? "2px" : "0px")};
18
+ border-color: ${({ isFocused, tokens }) => isFocused ? tokens["colors-border-active"] : "transparent"};
16
19
  `;
17
20
  const StyledInput = styled(TextInput) `
18
21
  flex: 1;
@@ -26,13 +29,23 @@ const TOKEN_KEYS = [
26
29
  "radius-s",
27
30
  "colors-surface-transparent-subdued-default",
28
31
  "colors-content-subdued-default-default",
32
+ "colors-border-active",
29
33
  ];
30
- export const Input = React.forwardRef(({ icon: Icon, ...props }, ref) => {
34
+ export const Input = React.forwardRef(({ icon: Icon, onFocus, onBlur, ...props }, ref) => {
35
+ const [isFocused, setIsFocused] = useState(false);
31
36
  const theme = useContext(ThemeContext);
32
37
  const themeType = theme?.colors?.type ?? "light";
33
38
  const tokens = useTokens(themeType, [...TOKEN_KEYS]);
34
- return (React.createElement(Wrapper, { tokens: tokens },
39
+ const handleFocus = (e) => {
40
+ setIsFocused(true);
41
+ onFocus?.(e);
42
+ };
43
+ const handleBlur = (e) => {
44
+ setIsFocused(false);
45
+ onBlur?.(e);
46
+ };
47
+ return (React.createElement(Wrapper, { tokens: tokens, isFocused: isFocused },
35
48
  !!Icon && React.createElement(Icon, { color: String(tokens["colors-content-subdued-default-default"]) }),
36
- React.createElement(StyledInput, { ...props, ref: ref, tokens: tokens })));
49
+ React.createElement(StyledInput, { ...props, ref: ref, tokens: tokens, onFocus: handleFocus, onBlur: handleBlur, placeholderTextColor: String(tokens["colors-content-subdued-default-default"]) })));
37
50
  });
38
51
  Input.displayName = "Input";
@@ -6,7 +6,7 @@ import Text from "../../../components/Text";
6
6
  import { CryptoIcon } from "../CryptoIcon/CryptoIcon";
7
7
  const Wrapper = styled(Pressable) `
8
8
  flex-direction: row;
9
- padding: ${({ tokens }) => tokens["spacing-xxs"]}px;
9
+ padding-vertical: ${({ tokens }) => tokens["spacing-xxs"]}px;
10
10
  border-radius: ${({ tokens }) => tokens["radius-s"]}px;
11
11
  align-items: center;
12
12
  width: 100%;
@@ -3,7 +3,8 @@ import { TextInputProps } from "react-native";
3
3
  type Props = Readonly<TextInputProps & {
4
4
  onDebouncedChange?: (current: string, prev: string) => void;
5
5
  debounceTime?: number;
6
+ onPressIn?: () => void;
6
7
  }>;
7
- export declare function Search({ onDebouncedChange, debounceTime, onChange, ...props }: Props): React.JSX.Element;
8
+ export declare function Search({ onDebouncedChange, debounceTime, onChange, onPressIn, ...props }: Props): React.JSX.Element;
8
9
  export {};
9
10
  //# sourceMappingURL=Search.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAkD,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9F,KAAK,KAAK,GAAG,QAAQ,CACnB,cAAc,GAAG;IACf,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CACF,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,iBAAiB,EAAE,YAAkB,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,qBAyB1F"}
1
+ {"version":3,"file":"Search.d.ts","sourceRoot":"","sources":["../../../../src/pre-ldls/components/Search/Search.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,OAAO,CAAC;AAI/C,OAAO,EAAkD,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9F,KAAK,KAAK,GAAG,QAAQ,CACnB,cAAc,GAAG;IACf,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB,CACF,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,iBAAiB,EACjB,YAAkB,EAClB,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,qBAiCP"}
@@ -2,7 +2,7 @@ import React, { useMemo, useRef } from "react";
2
2
  import { Icons } from "../../../assets";
3
3
  import { useDebouncedCallback } from "../../hooks";
4
4
  import { Input } from "..";
5
- export function Search({ onDebouncedChange, debounceTime = 500, onChange, ...props }) {
5
+ export function Search({ onDebouncedChange, debounceTime = 500, onChange, onPressIn, ...props }) {
6
6
  const initialValue = props.value ?? props.defaultValue ?? "";
7
7
  const prevValue = useRef(String(initialValue));
8
8
  const handleDebouncedChange = useDebouncedCallback(useMemo(() => {
@@ -22,5 +22,5 @@ export function Search({ onDebouncedChange, debounceTime = 500, onChange, ...pro
22
22
  handleDebouncedChange?.(current);
23
23
  };
24
24
  }, [handleDebouncedChange, onChange]);
25
- return React.createElement(Input, { ...props, icon: Icons.Search, onChange: handleChange });
25
+ return (React.createElement(Input, { ...props, style: { height: "100%" }, icon: Icons.Search, onChange: handleChange, onPressIn: onPressIn }));
26
26
  }
@@ -5,4 +5,7 @@ export * from "./NetworkItem/NetworkItem";
5
5
  export * from "./NetworkList/NetworkList";
6
6
  export * from "./Tag/Tag";
7
7
  export * from "./Search/Search";
8
+ export * from "./AccountItem/AccountItem";
9
+ export * from "./Address/Address";
10
+ export * from "./AddAccountButton/AddAccountButton";
8
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,qCAAqC,CAAC"}
@@ -5,3 +5,6 @@ export * from "./NetworkItem/NetworkItem";
5
5
  export * from "./NetworkList/NetworkList";
6
6
  export * from "./Tag/Tag";
7
7
  export * from "./Search/Search";
8
+ export * from "./AccountItem/AccountItem";
9
+ export * from "./Address/Address";
10
+ export * from "./AddAccountButton/AddAccountButton";
@@ -18,9 +18,11 @@ declare const overrideColor: {
18
18
  readonly "surface-transparent-pressed": "#0000001A";
19
19
  readonly "border-subdued-default-hover": "#D5D5D5";
20
20
  readonly "border-subdued-default-pressed": "#C1C1C1";
21
+ readonly "border-active": "#D4A0FF";
21
22
  };
22
23
  readonly dark: {
23
24
  readonly "opacity-default-10": "#FFFFFF1A";
25
+ readonly "border-active": "#D4A0FF";
24
26
  };
25
27
  };
26
28
  export type Tokens = Record<string, string | number>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/libs/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAe,UAAU,EAAW,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGjF,QAAA,MAAM,aAAa;;;;;;;;;;;CAWT,CAAC;AAEX,QAAA,MAAM,aAAa;;;;;;;;;;CAUT,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AACrD,KAAK,UAAU,GACX,UAAU,MAAM,UAAU,EAAE,GAC5B,UAAU,MAAM,OAAO,aAAa,CAAC,KAAK,EAAE,GAC5C,UAAU,MAAM,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;AAEhD,KAAK,UAAU,GAAG,MAAM,CAAC,YAAY,GAAG,OAAO,aAAa,CAAC,CAAC;AAC9D,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAY9B,eAAO,MAAM,SAAS,WACZ,KAAK,cAAc,MAAM,UAAU,GAAG,UAAU,CAAC,gDA2B1D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/pre-ldls/libs/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAe,UAAU,EAAW,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGjF,QAAA,MAAM,aAAa;;;;;;;;;;;CAWT,CAAC;AAEX,QAAA,MAAM,aAAa;;;;;;;;;;;;CAYT,CAAC;AAEX,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AACrD,KAAK,UAAU,GACX,UAAU,MAAM,UAAU,EAAE,GAC5B,UAAU,MAAM,OAAO,aAAa,CAAC,KAAK,EAAE,GAC5C,UAAU,MAAM,OAAO,aAAa,CAAC,IAAI,EAAE,CAAC;AAEhD,KAAK,UAAU,GAAG,MAAM,CAAC,YAAY,GAAG,OAAO,aAAa,CAAC,CAAC;AAC9D,KAAK,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;AAY9B,eAAO,MAAM,SAAS,WACZ,KAAK,cAAc,MAAM,UAAU,GAAG,UAAU,CAAC,gDA2B1D,CAAC"}
@@ -19,9 +19,11 @@ const overrideColor = {
19
19
  "surface-transparent-pressed": "#0000001A",
20
20
  "border-subdued-default-hover": "#D5D5D5",
21
21
  "border-subdued-default-pressed": "#C1C1C1",
22
+ "border-active": "#D4A0FF",
22
23
  },
23
24
  dark: {
24
25
  "opacity-default-10": "#FFFFFF1A",
26
+ "border-active": "#D4A0FF",
25
27
  },
26
28
  };
27
29
  function pxToNumber(value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/native-ui",
3
- "version": "0.41.0",
3
+ "version": "0.42.0-nightly.0",
4
4
  "description": "Ledger Live - Mobile UI",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,12 +35,12 @@
35
35
  "lib/**/*"
36
36
  ],
37
37
  "dependencies": {
38
- "@ledgerhq/crypto-icons": "1.1.2",
38
+ "@ledgerhq/crypto-icons": "1.1.3",
39
39
  "color": "^4.0.0",
40
40
  "react-native-modal": "14.0.0-rc.1",
41
41
  "rn-range-slider": "2.1.1",
42
42
  "styled-system": "^5.1.5",
43
- "@ledgerhq/crypto-icons-ui": "^1.16.0",
43
+ "@ledgerhq/crypto-icons-ui": "^1.17.0-nightly.0",
44
44
  "@ledgerhq/icons-ui": "^0.13.0",
45
45
  "@ledgerhq/ui-shared": "^0.3.0"
46
46
  },