@ledgerhq/native-ui 0.20.2 → 0.20.3-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/assets/icons.d.ts +1 -0
- package/lib/assets/icons.js +1 -0
- package/lib/assets/index.d.ts +1 -0
- package/lib/assets/index.js +2 -0
- package/lib/components/Cards/NotificationCard/index.js +1 -1
- package/lib/components/Cards/SideImageCard/index.js +1 -1
- package/lib/components/Form/Checkbox/index.js +1 -1
- package/lib/components/Form/Input/QrCodeInput/index.js +1 -1
- package/lib/components/Form/Input/SearchInput/index.js +1 -1
- package/lib/components/Form/Slider/components.js +1 -1
- package/lib/components/Icon/Icon.js +1 -1
- package/lib/components/Icon/IconBadge.d.ts +6 -1
- package/lib/components/Icon/IconBadge.js +3 -2
- package/lib/components/Layout/Collapse/Accordion/index.js +1 -1
- package/lib/components/Layout/List/TipList/index.js +2 -2
- package/lib/components/Layout/List/VerticalStepper/StepperItem.js +1 -1
- package/lib/components/Layout/List/VerticalTimeline/TimelineIndicator.js +1 -1
- package/lib/components/Layout/Modals/BaseModal/index.js +2 -2
- package/lib/components/Navigation/Stepper/index.js +2 -2
- package/lib/components/cta/Button/index.d.ts +1 -1
- package/lib/components/cta/Button/index.js +2 -2
- package/lib/components/message/Alert/index.js +4 -4
- package/lib/components/message/Notification/index.js +2 -2
- package/package.json +4 -4
package/lib/assets/icons.d.ts
CHANGED
package/lib/assets/icons.js
CHANGED
package/lib/assets/index.d.ts
CHANGED
package/lib/assets/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
|
-
import { ExternalLinkMedium } from "@ledgerhq/icons-ui/
|
|
2
|
+
import { ExternalLinkMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
3
3
|
import Text from "../../Text";
|
|
4
4
|
import Flex from "../../Layout/Flex";
|
|
5
5
|
import Box from "../../Layout/Box";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ArrowRightMedium, CloseMedium } from "@ledgerhq/icons-ui/
|
|
2
|
+
import { ArrowRightMedium, CloseMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
3
3
|
import { TouchableOpacity, Image } from "react-native";
|
|
4
4
|
import styled, { useTheme } from "styled-components/native";
|
|
5
5
|
import Text from "../../Text";
|
|
@@ -3,7 +3,7 @@ import { Pressable } from "react-native";
|
|
|
3
3
|
import styled, { useTheme } from "styled-components/native";
|
|
4
4
|
import Text from "../../Text";
|
|
5
5
|
import Flex from "../../Layout/Flex";
|
|
6
|
-
import CheckAlone from "@ledgerhq/icons-ui/
|
|
6
|
+
import CheckAlone from "@ledgerhq/icons-ui/nativeLegacy/CheckAloneMedium";
|
|
7
7
|
const Square = styled(Flex).attrs({
|
|
8
8
|
justifyContent: "center",
|
|
9
9
|
alignItems: "center",
|
|
@@ -14,7 +14,7 @@ import { TouchableOpacity } from "react-native";
|
|
|
14
14
|
import styled from "styled-components/native";
|
|
15
15
|
import Input from "../BaseInput";
|
|
16
16
|
import FlexBox from "../../../Layout/Flex";
|
|
17
|
-
import QrCodeMedium from "@ledgerhq/icons-ui/
|
|
17
|
+
import QrCodeMedium from "@ledgerhq/icons-ui/nativeLegacy/QrCodeMedium";
|
|
18
18
|
const QrCodeButton = styled(TouchableOpacity) `
|
|
19
19
|
background-color: ${(p) => p.theme.colors.neutral.c100};
|
|
20
20
|
display: flex;
|
|
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React, { useCallback } from "react";
|
|
13
13
|
import styled from "styled-components/native";
|
|
14
14
|
import Input, { InputRenderLeftContainer } from "../BaseInput";
|
|
15
|
-
import SearchMedium from "@ledgerhq/icons-ui/
|
|
15
|
+
import SearchMedium from "@ledgerhq/icons-ui/nativeLegacy/SearchMedium";
|
|
16
16
|
import Button from "../../../cta/Button";
|
|
17
17
|
const Icon = styled(SearchMedium).attrs((p) => ({
|
|
18
18
|
color: p.theme.colors.neutral.c70,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled, { useTheme } from "styled-components/native";
|
|
3
3
|
import Text from "../../Text";
|
|
4
|
-
import { ArrowsHMedium } from "@ledgerhq/icons-ui/
|
|
4
|
+
import { ArrowsHMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
5
5
|
export const MinMaxTextContainer = styled.View `
|
|
6
6
|
flex-direction: row;
|
|
7
7
|
justify-content: space-between;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FlexBoxProps } from "../Layout/Flex";
|
|
3
3
|
import { IconOrElementType } from "./type";
|
|
4
4
|
export declare const DEFAULT_ICON_SIZE = 16;
|
|
5
|
+
export declare const DEFAULT_BACKGROUND_COLOR = "neutral.c40";
|
|
5
6
|
export type IconBadgeProps = FlexBoxProps & {
|
|
6
7
|
/**
|
|
7
8
|
* Component that takes `{size?: number; color?: string}` as props.
|
|
@@ -16,6 +17,10 @@ export type IconBadgeProps = FlexBoxProps & {
|
|
|
16
17
|
* Icon color, will be applied to the component provided in the `Icon` prop
|
|
17
18
|
*/
|
|
18
19
|
iconColor?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Background color, will define the color of the round background part of the badge
|
|
22
|
+
*/
|
|
23
|
+
backgroundColor?: string;
|
|
19
24
|
};
|
|
20
|
-
declare const IconBadge: ({ Icon, iconSize, iconColor, ...rest }: IconBadgeProps) => JSX.Element;
|
|
25
|
+
declare const IconBadge: ({ Icon, iconSize, backgroundColor, iconColor, ...rest }: IconBadgeProps) => JSX.Element;
|
|
21
26
|
export default IconBadge;
|
|
@@ -12,10 +12,11 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
12
12
|
import React from "react";
|
|
13
13
|
import Flex from "../Layout/Flex";
|
|
14
14
|
export const DEFAULT_ICON_SIZE = 16;
|
|
15
|
+
export const DEFAULT_BACKGROUND_COLOR = "neutral.c40";
|
|
15
16
|
const BORDER_RADIUS = 999999;
|
|
16
17
|
const IconBadge = (_a) => {
|
|
17
|
-
var { Icon, iconSize = DEFAULT_ICON_SIZE, iconColor } = _a, rest = __rest(_a, ["Icon", "iconSize", "iconColor"]);
|
|
18
|
-
return (React.createElement(Flex, Object.assign({ height: iconSize * 2, width: iconSize * 2, backgroundColor:
|
|
18
|
+
var { Icon, iconSize = DEFAULT_ICON_SIZE, backgroundColor = DEFAULT_BACKGROUND_COLOR, iconColor } = _a, rest = __rest(_a, ["Icon", "iconSize", "backgroundColor", "iconColor"]);
|
|
19
|
+
return (React.createElement(Flex, Object.assign({ height: iconSize * 2, width: iconSize * 2, backgroundColor: backgroundColor, borderRadius: BORDER_RADIUS, alignItems: "center", justifyContent: "center" }, rest), React.isValidElement(Icon) ? (Icon) : (
|
|
19
20
|
/* @ts-expect-error TS 5 can't seem to be able to prove this is a react comopnent here */
|
|
20
21
|
React.createElement(Icon, { size: iconSize, color: iconColor }))));
|
|
21
22
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
2
|
import Animated, { useSharedValue, withTiming, useAnimatedStyle, Easing, } from "react-native-reanimated";
|
|
3
3
|
import Link from "../../../cta/Link";
|
|
4
|
-
import { ChevronBottomMedium, ChevronTopMedium } from "@ledgerhq/icons-ui/
|
|
4
|
+
import { ChevronBottomMedium, ChevronTopMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
5
5
|
import { View } from "react-native";
|
|
6
6
|
const Accordion = ({ collapsed = false, children, title, onPress, }) => {
|
|
7
7
|
const animationHeight = useSharedValue(collapsed ? "0%" : "100%");
|
|
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React, { useMemo } from "react";
|
|
13
13
|
import List from "../List";
|
|
14
|
-
import Check from "@ledgerhq/icons-ui/
|
|
15
|
-
import Close from "@ledgerhq/icons-ui/
|
|
14
|
+
import Check from "@ledgerhq/icons-ui/nativeLegacy/CheckAloneMedium";
|
|
15
|
+
import Close from "@ledgerhq/icons-ui/nativeLegacy/CloseMedium";
|
|
16
16
|
export default function TipList(_a) {
|
|
17
17
|
var { items } = _a, props = __rest(_a, ["items"]);
|
|
18
18
|
const tipItems = useMemo(() => items.map((item) => (Object.assign(Object.assign({}, item), { bullet: item.isPositive ? (React.createElement(Check, { size: 20, color: "success.c50" })) : (React.createElement(Close, { size: 20, color: "error.c50" })) }))), [items]);
|
|
@@ -2,7 +2,7 @@ import React, { useCallback } from "react";
|
|
|
2
2
|
import { Pressable } from "react-native";
|
|
3
3
|
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from "react-native-reanimated";
|
|
4
4
|
import styled from "styled-components/native";
|
|
5
|
-
import { CheckAloneMedium } from "@ledgerhq/icons-ui/
|
|
5
|
+
import { CheckAloneMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
6
6
|
import Flex from "../../Flex";
|
|
7
7
|
import Text from "../../../Text";
|
|
8
8
|
import ProgressLoader from "../../../Loader/ProgressLoader";
|
|
@@ -11,7 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
11
11
|
};
|
|
12
12
|
import React from "react";
|
|
13
13
|
import { Dimensions, PixelRatio, Platform, StyleSheet } from "react-native";
|
|
14
|
-
import { CircledCheckSolidMedium } from "@ledgerhq/icons-ui/
|
|
14
|
+
import { CircledCheckSolidMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
15
15
|
import styled, { useTheme } from "styled-components/native";
|
|
16
16
|
import Svg, { Line } from "react-native-svg";
|
|
17
17
|
import Flex from "../../Flex";
|
|
@@ -17,7 +17,7 @@ import Text from "../../../Text";
|
|
|
17
17
|
import { BoxedIcon } from "../../../Icon";
|
|
18
18
|
import { Flex } from "../../index";
|
|
19
19
|
import { space } from "styled-system";
|
|
20
|
-
import {
|
|
20
|
+
import { Close } from "@ledgerhq/icons-ui/native";
|
|
21
21
|
const { width, height } = sizes;
|
|
22
22
|
const SafeContainer = styled.SafeAreaView `
|
|
23
23
|
background-color: ${(p) => p.theme.colors.background.drawer};
|
|
@@ -72,7 +72,7 @@ export function ModalHeader({ Icon, iconColor, title, description, subtitle, })
|
|
|
72
72
|
export function ModalHeaderCloseButton({ onClose, }) {
|
|
73
73
|
return (React.createElement(CloseContainer, null,
|
|
74
74
|
React.createElement(ClosePressableExtendedBounds, { onPress: onClose },
|
|
75
|
-
React.createElement(
|
|
75
|
+
React.createElement(Close, { color: "neutral.c100", size: "S" }))));
|
|
76
76
|
}
|
|
77
77
|
export default function BaseModal(_a) {
|
|
78
78
|
var { isOpen, onClose = () => { }, noCloseButton, safeContainerStyle = {}, containerStyle = {}, modalStyle = {}, preventBackdropClick, Icon, iconColor, title, description, subtitle, children, onModalHide, CustomHeader } = _a, rest = __rest(_a, ["isOpen", "onClose", "noCloseButton", "safeContainerStyle", "containerStyle", "modalStyle", "preventBackdropClick", "Icon", "iconColor", "title", "description", "subtitle", "children", "onModalHide", "CustomHeader"]);
|
|
@@ -13,8 +13,8 @@ import React, { useMemo } from "react";
|
|
|
13
13
|
import styled, { useTheme } from "styled-components/native";
|
|
14
14
|
import { space, color } from "styled-system";
|
|
15
15
|
import Text from "../../Text";
|
|
16
|
-
import CheckAlone from "@ledgerhq/icons-ui/
|
|
17
|
-
import CloseMedium from "@ledgerhq/icons-ui/
|
|
16
|
+
import CheckAlone from "@ledgerhq/icons-ui/nativeLegacy/CheckAloneMedium";
|
|
17
|
+
import CloseMedium from "@ledgerhq/icons-ui/nativeLegacy/CloseMedium";
|
|
18
18
|
import Animated, { useAnimatedStyle, withTiming, withDelay, Easing } from "react-native-reanimated";
|
|
19
19
|
const Separator = styled.View `
|
|
20
20
|
flex: 1;
|
|
@@ -15,7 +15,7 @@ export type ButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
pending?: boolean;
|
|
17
17
|
displayContentWhenPending?: boolean;
|
|
18
|
-
|
|
18
|
+
buttonTestId?: string;
|
|
19
19
|
};
|
|
20
20
|
export declare const Base: import("styled-components").StyledComponent<typeof TouchableOpacity, import("styled-components").DefaultTheme, {
|
|
21
21
|
iconButton?: boolean | undefined;
|
|
@@ -55,14 +55,14 @@ const SpinnerContainer = styled.View `
|
|
|
55
55
|
justify-content: center;
|
|
56
56
|
`;
|
|
57
57
|
const ButtonContainer = (props) => {
|
|
58
|
-
const { Icon, iconPosition = "right", children, hide = false, size = "medium", iconName, pending, displayContentWhenPending, } = props;
|
|
58
|
+
const { Icon, iconPosition = "right", children, hide = false, size = "medium", iconName, pending, displayContentWhenPending, buttonTestId, } = props;
|
|
59
59
|
const theme = useTheme();
|
|
60
60
|
const { text } = getButtonColorStyle(theme.colors, props);
|
|
61
61
|
const IconNode = useMemo(() => (iconName && React.createElement(IconComponent, { name: iconName, size: ctaIconSize[size], color: text.color })) ||
|
|
62
62
|
(Icon && React.createElement(Icon, { size: ctaIconSize[size], color: text.color })), [iconName, size, Icon, text.color]);
|
|
63
63
|
const textColor = useMemo(() => (pending ? theme.colors.neutral.c50 : text.color), [pending, theme.colors.neutral.c50, text.color]);
|
|
64
64
|
return (React.createElement(Container, { hide: hide },
|
|
65
|
-
iconPosition === "right" && children ? (React.createElement(Text, { variant: ctaTextType[size], fontWeight: "semiBold", color: textColor }, children)) : null,
|
|
65
|
+
iconPosition === "right" && children ? (React.createElement(Text, { testID: buttonTestId, variant: ctaTextType[size], fontWeight: "semiBold", color: textColor }, children)) : null,
|
|
66
66
|
pending && displayContentWhenPending ? (React.createElement(IconContainer, { iconPosition: iconPosition },
|
|
67
67
|
React.createElement(SpinnerContainer, { displayContentWhenPending: true },
|
|
68
68
|
React.createElement(ActivityIndicator, { color: theme.colors.neutral.c50, animating: true })))) : IconNode ? (React.createElement(IconContainer, { iconButton: !children, iconPosition: iconPosition }, IconNode)) : null,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled, { useTheme } from "styled-components/native";
|
|
3
|
-
import InfoAltFillMedium from "@ledgerhq/icons-ui/
|
|
4
|
-
import CircledCheckSolidMedium from "@ledgerhq/icons-ui/
|
|
5
|
-
import WarningSolidMedium from "@ledgerhq/icons-ui/
|
|
6
|
-
import CircledCrossSolidMedium from "@ledgerhq/icons-ui/
|
|
3
|
+
import InfoAltFillMedium from "@ledgerhq/icons-ui/nativeLegacy/InfoAltFillMedium";
|
|
4
|
+
import CircledCheckSolidMedium from "@ledgerhq/icons-ui/nativeLegacy/CircledCheckSolidMedium";
|
|
5
|
+
import WarningSolidMedium from "@ledgerhq/icons-ui/nativeLegacy/WarningSolidMedium";
|
|
6
|
+
import CircledCrossSolidMedium from "@ledgerhq/icons-ui/nativeLegacy/CircledCrossSolidMedium";
|
|
7
7
|
import Text from "../../Text";
|
|
8
8
|
import FlexBox from "../../Layout/Flex";
|
|
9
9
|
import { getColor } from "../../../styles";
|
|
@@ -3,10 +3,10 @@ import styled, { useTheme } from "styled-components/native";
|
|
|
3
3
|
import FlexBox from "../../Layout/Flex";
|
|
4
4
|
import { TouchableOpacity } from "react-native";
|
|
5
5
|
import Text from "../../Text";
|
|
6
|
-
import CloseMedium from "@ledgerhq/icons-ui/
|
|
6
|
+
import CloseMedium from "@ledgerhq/icons-ui/nativeLegacy/CloseMedium";
|
|
7
7
|
import { Flex } from "../../Layout";
|
|
8
8
|
import { space } from "styled-system";
|
|
9
|
-
import { ExternalLinkMedium } from "@ledgerhq/icons-ui/
|
|
9
|
+
import { ExternalLinkMedium } from "@ledgerhq/icons-ui/nativeLegacy";
|
|
10
10
|
const variantProps = {
|
|
11
11
|
primary: {
|
|
12
12
|
bg: "primary.c90",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/native-ui",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.3-nightly.0",
|
|
4
4
|
"description": "Ledger Live - Mobile UI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"styled-system": "^5.1.5",
|
|
48
48
|
"victory-native": "^35.5.5",
|
|
49
49
|
"@ledgerhq/crypto-icons-ui": "^0.4.0",
|
|
50
|
-
"@ledgerhq/icons-ui": "^0.4.
|
|
50
|
+
"@ledgerhq/icons-ui": "^0.4.2-nightly.0",
|
|
51
51
|
"@ledgerhq/ui-shared": "^0.2.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"styled-components": "^5.3.3"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@babel/core": "^7.
|
|
64
|
+
"@babel/core": "^7.22.8",
|
|
65
65
|
"@babel/generator": "^7.17.2",
|
|
66
66
|
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
67
67
|
"@babel/plugin-proposal-export-namespace-from": "^7.16.0",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@emotion/native": "^10.0.27",
|
|
77
77
|
"@expo/metro-config": "^0.7.1",
|
|
78
78
|
"@expo/webpack-config": "^18.0.1",
|
|
79
|
-
"@react-native-async-storage/async-storage": "1.17.
|
|
79
|
+
"@react-native-async-storage/async-storage": "1.17.12",
|
|
80
80
|
"@react-native-community/cli-server-api": "^7.0.3",
|
|
81
81
|
"@react-native-community/datetimepicker": "6.7.3",
|
|
82
82
|
"@react-native-community/slider": "^4.4.2",
|