@ledgerhq/native-ui 0.12.1 → 0.12.2-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/logos/LedgerLiveAltRegular.d.ts +1 -1
- package/lib/assets/logos/LedgerLiveRegular.d.ts +1 -1
- package/lib/components/Carousel/index.d.ts +1 -1
- package/lib/components/Form/Checkbox/index.d.ts +1 -1
- package/lib/components/Form/Input/BaseInput/index.d.ts +2 -2
- package/lib/components/Form/SelectableList.d.ts +3 -3
- package/lib/components/Form/Slider/index.native.d.ts +1 -1
- package/lib/components/Form/Switch/index.d.ts +1 -1
- package/lib/components/Form/Toggle/index.d.ts +1 -1
- package/lib/components/Icon/BoxedIcon.d.ts +3 -3
- package/lib/components/Icon/CryptoIcon.d.ts +1 -1
- package/lib/components/Icon/CryptoIcon.js +2 -2
- package/lib/components/Icon/Icon.d.ts +1 -1
- package/lib/components/Icon/IconBox/index.d.ts +1 -1
- package/lib/components/Icon/type.d.ts +3 -3
- package/lib/components/Layout/Box/index.d.ts +1 -1
- package/lib/components/Layout/Collapse/Accordion/index.d.ts +1 -1
- package/lib/components/Layout/Flex/index.d.ts +2 -2
- package/lib/components/Layout/List/IconBoxList/index.d.ts +2 -2
- package/lib/components/Layout/List/List/index.d.ts +2 -2
- package/lib/components/Layout/List/NumberedList/index.d.ts +2 -2
- package/lib/components/Layout/List/TipList/index.d.ts +2 -2
- package/lib/components/Layout/List/VerticalTimeline/TimelineIndicator.d.ts +1 -1
- package/lib/components/Layout/List/VerticalTimeline/TimelineItem.d.ts +1 -1
- package/lib/components/Layout/List/VerticalTimeline/TimelineItem.js +2 -2
- package/lib/components/Layout/List/VerticalTimeline/index.d.ts +2 -2
- package/lib/components/Layout/Modals/BaseModal/index.d.ts +1 -1
- package/lib/components/Layout/ScrollContainer/index.d.ts +1 -1
- package/lib/components/Layout/ScrollContainerHeader/Header.d.ts +1 -1
- package/lib/components/Layout/ScrollContainerHeader/index.d.ts +1 -1
- package/lib/components/Layout/types.d.ts +1 -1
- package/lib/components/Loader/InfiniteLoader/index.d.ts +1 -1
- package/lib/components/Loader/ProgressLoader/index.d.ts +1 -1
- package/lib/components/Navigation/SlideIndicator/index.d.ts +1 -1
- package/lib/components/Navigation/Stepper/index.d.ts +1 -1
- package/lib/components/Tabs/Graph/index.d.ts +3 -3
- package/lib/components/Tabs/Graph/index.js +3 -3
- package/lib/components/Tabs/TemplateTabs/index.d.ts +3 -3
- package/lib/components/Text/getTextStyle.d.ts +1 -1
- package/lib/components/chart/index.d.ts +1 -1
- package/lib/components/chart/types.d.ts +1 -1
- package/lib/components/cta/Button/index.d.ts +1 -1
- package/lib/components/cta/Link/index.d.ts +1 -1
- package/lib/components/cta/QuickAction/QuickActionButton/index.d.ts +1 -1
- package/lib/components/cta/QuickAction/QuickActionList/index.d.ts +1 -1
- package/lib/components/message/Alert/index.d.ts +3 -3
- package/lib/components/message/Log/Brackets.d.ts +2 -2
- package/lib/components/message/Log/index.d.ts +1 -1
- package/lib/components/message/Notification/index.d.ts +2 -2
- package/lib/components/styled.d.ts +1 -1
- package/lib/components/tags/Badge/index.d.ts +1 -1
- package/lib/components/transitions/types.d.ts +1 -1
- package/lib/icons/Close.d.ts +1 -1
- package/lib/icons/Info.d.ts +1 -1
- package/lib/styles/StyleProvider.d.ts +1 -1
- package/lib/styles/theme.d.ts +3 -3
- package/package.json +7 -7
|
@@ -5,7 +5,7 @@ import type { Props as FlexboxProps } from "../Layout/Flex";
|
|
|
5
5
|
declare const HorizontalScrollView: import("styled-components").StyledComponent<typeof ScrollView, import("styled-components").DefaultTheme, {
|
|
6
6
|
horizontal: true;
|
|
7
7
|
}, "horizontal">;
|
|
8
|
-
export
|
|
8
|
+
export type Props = React.PropsWithChildren<{
|
|
9
9
|
/**
|
|
10
10
|
* Forces the selection of a specific item of the carousel.
|
|
11
11
|
*/
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { TextInput, TextInputProps, StyleProp, ViewStyle } from "react-native";
|
|
4
|
-
export
|
|
4
|
+
export type CommonProps = TextInputProps & {
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
error?: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type InputProps<T = string> = Omit<CommonProps, "value" | "onChange"> & {
|
|
9
9
|
/**
|
|
10
10
|
* The value of the input.
|
|
11
11
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ComponentType } from "react";
|
|
2
2
|
import { GestureResponderEvent } from "react-native";
|
|
3
3
|
import { IconType } from "../Icon/type";
|
|
4
|
-
|
|
4
|
+
type BaseElementProps<V> = {
|
|
5
5
|
first?: boolean;
|
|
6
6
|
selected?: boolean;
|
|
7
7
|
disabled?: boolean;
|
|
@@ -9,13 +9,13 @@ declare type BaseElementProps<V> = {
|
|
|
9
9
|
onPress?: ((event: GestureResponderEvent) => void) | undefined;
|
|
10
10
|
Icon?: IconType;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type ElementProps<V> = React.PropsWithChildren<BaseElementProps<V> & {
|
|
13
13
|
/**
|
|
14
14
|
* A function that will render some content on the right side of the input.
|
|
15
15
|
*/
|
|
16
16
|
renderRight?: ComponentType<BaseElementProps<V>> | React.ReactElement;
|
|
17
17
|
}>;
|
|
18
|
-
export
|
|
18
|
+
export type Props<V> = React.PropsWithChildren<{
|
|
19
19
|
currentValue?: V;
|
|
20
20
|
onChange: (newValue: V) => void;
|
|
21
21
|
}>;
|
|
@@ -3,8 +3,8 @@ import { IconOrElementType, IconType } from "./type";
|
|
|
3
3
|
export declare const DEFAULT_BOX_SIZE = 40;
|
|
4
4
|
export declare const DEFAULT_ICON_SIZE = 16;
|
|
5
5
|
export declare const DEFAULT_BADGE_SIZE = 20;
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type Variant = "square" | "circle";
|
|
7
|
+
export type IconBoxProps = {
|
|
8
8
|
/**
|
|
9
9
|
* Component that takes `{size?: number; color?: string}` as props. Will be rendered at the top right with the size provided in `badgeSize` or a default size.
|
|
10
10
|
*/
|
|
@@ -35,7 +35,7 @@ export declare type IconBoxProps = {
|
|
|
35
35
|
*/
|
|
36
36
|
variant?: Variant;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type BoxedIconProps = IconBoxProps & {
|
|
39
39
|
/**
|
|
40
40
|
* Component that takes `{size?: number; color?: string}` as props. Will be rendered at the top right with the size provided in `iconSize` or a default size.
|
|
41
41
|
*/
|
|
@@ -23,7 +23,7 @@ const Circle = styled(Flex).attrs((p) => ({
|
|
|
23
23
|
alignItems: "center",
|
|
24
24
|
justifyContent: "center",
|
|
25
25
|
position: "relative",
|
|
26
|
-
borderRadius:
|
|
26
|
+
borderRadius: 50.0,
|
|
27
27
|
backgroundColor: p.backgroundColor,
|
|
28
28
|
})) ``;
|
|
29
29
|
const TokenContainer = styled(Flex).attrs((p) => ({
|
|
@@ -34,7 +34,7 @@ const TokenContainer = styled(Flex).attrs((p) => ({
|
|
|
34
34
|
justifyContent: "center",
|
|
35
35
|
heigth: p.size,
|
|
36
36
|
width: p.size,
|
|
37
|
-
borderRadius:
|
|
37
|
+
borderRadius: 50.0,
|
|
38
38
|
border: `2px solid ${p.borderColor}`,
|
|
39
39
|
backgroundColor: p.backgroundColor,
|
|
40
40
|
zIndex: 0,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
export
|
|
2
|
+
export type IconProps = {
|
|
3
3
|
size?: number;
|
|
4
4
|
color?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type IconType = React.ComponentType<IconProps>;
|
|
7
|
+
export type IconOrElementType = IconType | React.ReactElement;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseStyledProps } from "../../styled";
|
|
2
|
-
export
|
|
2
|
+
export type BoxProps = BaseStyledProps;
|
|
3
3
|
declare const Box: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> & {
|
|
4
4
|
columnGap?: string | number | undefined;
|
|
5
5
|
rowGap?: string | number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseStyledProps } from "../../styled";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
2
|
+
export type FlexBoxProps = BaseStyledProps;
|
|
3
|
+
export type Props = FlexBoxProps;
|
|
4
4
|
declare const FlexBox: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("styled-system").SpaceProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").FlexboxProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").PositionProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").ColorProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, string | number | symbol> & import("styled-system").LayoutProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").OverflowProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>> & import("styled-system").BorderProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Border<import("styled-system").TLengthStyledSystem>> & import("styled-system").BackgroundProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Background<import("styled-system").TLengthStyledSystem>> & {
|
|
5
5
|
columnGap?: string | number | undefined;
|
|
6
6
|
rowGap?: string | number | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseListItemProps, BaseListProps } from "../List";
|
|
3
3
|
import { IconOrElementType } from "src/components/Icon/type";
|
|
4
|
-
export
|
|
4
|
+
export type IconBoxListItemProps = Omit<BaseListItemProps, "bullet"> & {
|
|
5
5
|
Icon: IconOrElementType;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type IconBoxListProps = Omit<BaseListProps, "items"> & {
|
|
8
8
|
items: IconBoxListItemProps[];
|
|
9
9
|
iconVariants?: "outlined" | "plain";
|
|
10
10
|
iconShapes?: "square" | "circle";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { FlexBoxProps } from "../../Flex";
|
|
3
3
|
import { BaseStyledProps } from "../../../styled";
|
|
4
|
-
export
|
|
4
|
+
export type BaseListItemProps = {
|
|
5
5
|
title?: React.ReactNode;
|
|
6
6
|
description?: React.ReactNode;
|
|
7
7
|
bullet?: React.ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type BaseListProps = {
|
|
10
10
|
items: BaseListItemProps[];
|
|
11
11
|
itemContainerProps?: BaseStyledProps;
|
|
12
12
|
} & Partial<FlexBoxProps>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseListItemProps, BaseListProps } from "../List";
|
|
3
|
-
export
|
|
3
|
+
export type NumberedListItemProps = Omit<BaseListItemProps, "bullet"> & {
|
|
4
4
|
number?: number;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type NumberedListProps = Omit<BaseListProps, "items"> & {
|
|
7
7
|
items: NumberedListItemProps[];
|
|
8
8
|
};
|
|
9
9
|
export default function NumberedList({ items, ...props }: NumberedListProps): React.ReactElement;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseListItemProps, BaseListProps } from "../List";
|
|
3
|
-
export
|
|
3
|
+
export type TipListItemProps = Omit<BaseListItemProps, "bullet"> & {
|
|
4
4
|
isPositive: boolean;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type TipListProps = Omit<BaseListProps, "items"> & {
|
|
7
7
|
items: TipListItemProps[];
|
|
8
8
|
};
|
|
9
9
|
export default function TipList({ items, ...props }: TipListProps): React.ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Props as FlexProps } from "../../Flex";
|
|
3
3
|
import { ItemStatus } from ".";
|
|
4
|
-
export
|
|
4
|
+
export type Props = FlexProps & {
|
|
5
5
|
status: ItemStatus;
|
|
6
6
|
isFirstItem?: boolean;
|
|
7
7
|
isLastItem?: boolean;
|
|
@@ -70,7 +70,7 @@ export default function TimelineItem({ item, formatEstimatedTime, isFirstItem, i
|
|
|
70
70
|
React.createElement(TimelineIndicator, { status: item.status, isFirstItem: isFirstItem, isLastItem: isLastItem, mr: 4 }),
|
|
71
71
|
React.createElement(Container, { status: item.status, isLastItem: isLastItem, mb: 4 },
|
|
72
72
|
React.createElement(Flex, { flexDirection: "row", justifyContent: "space-between" },
|
|
73
|
-
React.createElement(Text, { variant: "body", color: item.status === "inactive"
|
|
73
|
+
React.createElement(Text, { variant: "body", flexShrink: 1, color: item.status === "inactive"
|
|
74
74
|
? "neutral.c80"
|
|
75
75
|
: isLastItem
|
|
76
76
|
? "success.c100"
|
|
@@ -78,6 +78,6 @@ export default function TimelineItem({ item, formatEstimatedTime, isFirstItem, i
|
|
|
78
78
|
(item === null || item === void 0 ? void 0 : item.estimatedTime) && item.status === "active" && (React.createElement(Tag, null, formatEstimatedTime
|
|
79
79
|
? formatEstimatedTime(item.estimatedTime)
|
|
80
80
|
: `${item.estimatedTime / 60} min`))),
|
|
81
|
-
React.createElement(Animated.ScrollView, { style: animatedStyle },
|
|
81
|
+
React.createElement(Animated.ScrollView, { style: animatedStyle, showsVerticalScrollIndicator: false },
|
|
82
82
|
React.createElement(Animated.View, { onLayout: handleLayout }, item.renderBody && item.status === "active" ? (React.createElement(Flex, { pt: 6 }, item.renderBody(true))) : null))))));
|
|
83
83
|
}
|
|
@@ -5,13 +5,13 @@ export declare enum ItemStatus {
|
|
|
5
5
|
active = "active",
|
|
6
6
|
completed = "completed"
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type Item = {
|
|
9
9
|
status: ItemStatus;
|
|
10
10
|
title: string;
|
|
11
11
|
estimatedTime?: number;
|
|
12
12
|
renderBody?: (isDisplayed?: boolean) => ReactNode;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type Props = BaseStyledProps & {
|
|
15
15
|
steps?: Item[];
|
|
16
16
|
formatEstimatedTime?: (_: number) => string;
|
|
17
17
|
setActiveIndex?: (arg0: number) => void;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { ModalProps } from "react-native-modal";
|
|
3
3
|
import { StyleProp, ViewStyle } from "react-native";
|
|
4
4
|
import { IconOrElementType } from "../../../Icon/type";
|
|
5
|
-
export
|
|
5
|
+
export type BaseModalProps = {
|
|
6
6
|
isOpen?: boolean;
|
|
7
7
|
onClose?: () => void;
|
|
8
8
|
modalStyle?: StyleProp<ViewStyle>;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
3
|
import { BaseStyledProps } from "../../styled";
|
|
4
4
|
import type { NativeSyntheticEvent, NativeScrollEvent, ScrollViewProps } from "react-native";
|
|
5
|
-
|
|
5
|
+
type ScrollContainerProps = BaseStyledProps & ScrollViewProps & SpaceProps & {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
onScroll?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
8
8
|
horizontal?: boolean;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { FlatListProps } from "react-native";
|
|
3
3
|
import type { HeaderProps } from "./Header";
|
|
4
4
|
import { BaseStyledProps } from "../../styled";
|
|
5
|
-
|
|
5
|
+
type ScrollContainerHeaderProps = BaseStyledProps & Omit<HeaderProps, "currentPositionY"> & Omit<FlatListProps<any>, "onScroll" | "data" | "renderItem"> & {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
onScroll?: (y: number) => void;
|
|
8
8
|
containerProps?: BaseStyledProps;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { SizeProps } from "styled-system";
|
|
4
4
|
declare const Loader: import("styled-components").StyledComponent<React.ComponentClass<import("react-native-svg").SvgProps, any>, import("styled-components").DefaultTheme, SizeProps<Required<import("styled-system").Theme<import("styled-system").TLengthStyledSystem>>, import("csstype").Property.Height<import("styled-system").TLengthStyledSystem>>, never>;
|
|
5
|
-
export
|
|
5
|
+
export type Props = React.ComponentProps<typeof Loader> & {
|
|
6
6
|
color?: string;
|
|
7
7
|
};
|
|
8
8
|
export default function InfiniteLoader({ size, color, ...extraProps }: Props): JSX.Element;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseTabsProps, TabItemProps } from "../TemplateTabs";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type GraphTabSize = "small" | "medium";
|
|
4
|
+
type GraphTabsProps = BaseTabsProps & {
|
|
5
5
|
size?: GraphTabSize;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type GraphTabItemProps = TabItemProps & {
|
|
8
8
|
size?: GraphTabSize;
|
|
9
9
|
};
|
|
10
10
|
export declare const GraphTab: ({ onPress, isActive, label, activeColor, activeBg, size, disabled, }: GraphTabItemProps) => React.ReactElement;
|
|
@@ -4,10 +4,10 @@ import Text from "../../Text";
|
|
|
4
4
|
import TemplateTabs from "../TemplateTabs";
|
|
5
5
|
const TabBox = styled.TouchableOpacity `
|
|
6
6
|
text-align: center;
|
|
7
|
-
border-radius:
|
|
7
|
+
border-radius: ${(p) => p.theme.radii[1]}px;
|
|
8
8
|
box-sizing: border-box;
|
|
9
9
|
overflow: hidden;
|
|
10
|
-
margin-left:
|
|
10
|
+
margin-left: ${(p) => p.theme.space[1]}px;
|
|
11
11
|
`;
|
|
12
12
|
const TabText = styled(Text).attrs((p) => ({
|
|
13
13
|
// Avoid conflict with styled-system's size property by nulling size and renaming it
|
|
@@ -22,7 +22,7 @@ const StyledTabs = styled(TemplateTabs) `
|
|
|
22
22
|
justify-content: center;
|
|
23
23
|
`;
|
|
24
24
|
export const GraphTab = ({ onPress, isActive, label, activeColor = "neutral.c100", activeBg = "neutral.c30", size = "medium", disabled, }) => {
|
|
25
|
-
return (React.createElement(TabBox, { onPress: onPress, disabled: disabled }, isActive ? (React.createElement(TabText, { variant: "small", size: size, bg: activeBg, color: disabled ? "neutral.c70" : activeColor, fontWeight: "semiBold", uppercase: true }, label)) : (React.createElement(TabText, { variant: "small", size: size, color: disabled ? "neutral.
|
|
25
|
+
return (React.createElement(TabBox, { onPress: onPress, disabled: disabled }, isActive ? (React.createElement(TabText, { variant: "small", size: size, bg: activeBg, color: disabled ? "neutral.c70" : activeColor, fontWeight: "semiBold", uppercase: true }, label)) : (React.createElement(TabText, { variant: "small", size: size, color: disabled ? "neutral.c40" : "neutral.c70", fontWeight: "semiBold", uppercase: true }, label))));
|
|
26
26
|
};
|
|
27
27
|
const GraphTabs = (props) => (React.createElement(StyledTabs, Object.assign({}, props, { Item: GraphTab })));
|
|
28
28
|
export default GraphTabs;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
export
|
|
3
|
+
export type BaseTabsProps = {
|
|
4
4
|
labels: string[];
|
|
5
5
|
activeIndex?: number;
|
|
6
6
|
onChange: (newIndex: number) => void;
|
|
@@ -8,7 +8,7 @@ export declare type BaseTabsProps = {
|
|
|
8
8
|
activeBg?: string;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type TabItemProps = Partial<BaseTabsProps> & {
|
|
12
12
|
label: string;
|
|
13
13
|
isActive: boolean;
|
|
14
14
|
index: number;
|
|
@@ -17,7 +17,7 @@ export declare type TabItemProps = Partial<BaseTabsProps> & {
|
|
|
17
17
|
activeBg?: string;
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type TabsProps = BaseTabsProps & {
|
|
21
21
|
Item: (props: TabItemProps) => React.ReactElement;
|
|
22
22
|
activeColor?: string;
|
|
23
23
|
activeBg?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TextVariants } from "../../styles/theme";
|
|
2
2
|
import { BaseTextProps } from "./index";
|
|
3
|
-
export
|
|
3
|
+
export type FontWeightTypes = "medium" | "semiBold" | "bold";
|
|
4
4
|
export declare const fontWeightTypes: FontWeightTypes[];
|
|
5
5
|
export declare function getBracketSize({ variant }: {
|
|
6
6
|
variant?: TextVariants;
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
import { TouchableOpacity, TouchableOpacityProps } from "react-native";
|
|
4
4
|
import { BaseStyledProps } from "../../styled";
|
|
5
5
|
import { IconType } from "../../Icon/type";
|
|
6
|
-
export
|
|
6
|
+
export type ButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
7
7
|
Icon?: IconType;
|
|
8
8
|
iconName?: string;
|
|
9
9
|
type?: "main" | "shade" | "error" | "color" | "default";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { TouchableOpacity, TouchableOpacityProps } from "react-native";
|
|
4
|
-
export
|
|
4
|
+
export type LinkProps = TouchableOpacityProps & {
|
|
5
5
|
Icon?: React.ComponentType<{
|
|
6
6
|
size: number;
|
|
7
7
|
color: string;
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { TouchableOpacity, TouchableOpacityProps } from "react-native";
|
|
3
3
|
import { IconType } from "src/components/Icon/type";
|
|
4
4
|
import { BaseStyledProps } from "../../../styled";
|
|
5
|
-
export
|
|
5
|
+
export type QuickActionButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
6
6
|
Icon: IconType;
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
onPressWhenDisabled?: TouchableOpacityProps["onPress"];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FlatListProps } from "react-native";
|
|
3
3
|
import { QuickActionButtonProps } from "../QuickActionButton";
|
|
4
|
-
export
|
|
4
|
+
export type QuickActionListProps = Omit<FlatListProps<QuickActionButtonProps>, "renderItem">;
|
|
5
5
|
declare const QuickActionList: ({ numColumns, data, ...otherProps }: QuickActionListProps) => React.ReactElement;
|
|
6
6
|
export default QuickActionList;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
export
|
|
2
|
+
type AlertType = "info" | "warning" | "error";
|
|
3
|
+
export type IconProps = {
|
|
4
4
|
size?: number;
|
|
5
5
|
color?: string;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type IconType = React.ComponentType<IconProps>;
|
|
8
8
|
export interface AlertProps {
|
|
9
9
|
type?: AlertType;
|
|
10
10
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { FlexBoxProps } from "../../Layout/Flex";
|
|
3
3
|
import { ViewStyle } from "react-native";
|
|
4
|
-
|
|
4
|
+
type BracketProps = {
|
|
5
5
|
color: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type BaseBracketProps = FlexBoxProps & BracketProps & {
|
|
8
8
|
style?: ViewStyle;
|
|
9
9
|
};
|
|
10
10
|
export declare const Bracket: ({ color, style, mb, mt }: BaseBracketProps) => React.ReactElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { BaseTextProps as TextProps } from "../../Text";
|
|
3
3
|
import { FlexBoxProps } from "../../Layout/Flex";
|
|
4
|
-
export
|
|
4
|
+
export type Props = React.PropsWithChildren<FlexBoxProps & {
|
|
5
5
|
extraTextProps?: Omit<TextProps, "children">;
|
|
6
6
|
}>;
|
|
7
7
|
declare function Log({ children, extraTextProps }: Props): JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { TextProps, TouchableOpacityProps } from "react-native";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type NotificationVariant = "primary" | "secondary" | "success" | "warning" | "error" | "plain" | string;
|
|
4
|
+
type Props = {
|
|
5
5
|
Icon?: React.ComponentType<{
|
|
6
6
|
size: number;
|
|
7
7
|
color?: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ReactNativeStyledInterface, DefaultTheme } from "styled-components/native";
|
|
3
3
|
import { FlexboxProps, SpaceProps, PositionProps, ColorProps, LayoutProps, OverflowProps, BorderProps, BackgroundProps } from "styled-system";
|
|
4
4
|
import { InterpolationFunction } from "styled-components";
|
|
5
|
-
export
|
|
5
|
+
export type BaseStyledProps = SpaceProps & FlexboxProps & PositionProps & ColorProps & LayoutProps & OverflowProps & BorderProps & BackgroundProps & {
|
|
6
6
|
columnGap?: string | number;
|
|
7
7
|
rowGap?: string | number;
|
|
8
8
|
color?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StyleProp, ViewStyle } from "react-native";
|
|
3
|
-
export
|
|
3
|
+
export type TransitionStatus = "entering" | "entered" | "exiting" | "exited";
|
|
4
4
|
export interface TransitionProps {
|
|
5
5
|
/**
|
|
6
6
|
* The status of the transition, either "entered", "entering", "exiting" or "exited".
|
package/lib/icons/Close.d.ts
CHANGED
package/lib/icons/Info.d.ts
CHANGED
package/lib/styles/theme.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ColorPalette } from "@ledgerhq/ui-shared";
|
|
2
2
|
export declare const space: number[];
|
|
3
3
|
export declare const textVariants: readonly ["h1", "h1Inter", "h2", "h3", "h4", "h5", "large", "largeLineHeight", "body", "bodyLineHeight", "paragraph", "paragraphLineHeight", "small", "subtitle", "tiny"];
|
|
4
|
-
export
|
|
5
|
-
export
|
|
4
|
+
export type TextVariants = typeof textVariants[number];
|
|
5
|
+
export type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;
|
|
6
6
|
export declare const fontSizes: ThemeScale<number, "h1" | "h1Inter" | "h2" | "h3" | "h4" | "h5" | "large" | "largeLineHeight" | "body" | "bodyLineHeight" | "paragraph" | "paragraphLineHeight" | "small" | "subtitle" | "tiny">;
|
|
7
7
|
export declare const radii: number[];
|
|
8
8
|
export declare const zIndexes: number[];
|
|
9
|
-
export
|
|
9
|
+
export type Theme = {
|
|
10
10
|
theme: "light" | "dark";
|
|
11
11
|
sizes: {
|
|
12
12
|
topBarHeight: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/native-ui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.2-nightly.0",
|
|
4
4
|
"description": "Ledger Live - Mobile UI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,9 +32,6 @@
|
|
|
32
32
|
"lib/**/*"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@ledgerhq/crypto-icons-ui": "^0.2.1",
|
|
36
|
-
"@ledgerhq/icons-ui": "^0.3.0",
|
|
37
|
-
"@ledgerhq/ui-shared": "^0.1.10",
|
|
38
35
|
"@types/color": "^3.0.3",
|
|
39
36
|
"@types/styled-system": "^5.1.13",
|
|
40
37
|
"color": "^3.1.3",
|
|
@@ -43,7 +40,10 @@
|
|
|
43
40
|
"react-native-modal": "^13.0.0",
|
|
44
41
|
"rn-range-slider": "^2.1.1",
|
|
45
42
|
"styled-system": "^5.1.5",
|
|
46
|
-
"victory-native": "^35.5.5"
|
|
43
|
+
"victory-native": "^35.5.5",
|
|
44
|
+
"@ledgerhq/crypto-icons-ui": "^0.2.1",
|
|
45
|
+
"@ledgerhq/icons-ui": "^0.3.1-nightly.0",
|
|
46
|
+
"@ledgerhq/ui-shared": "^0.1.10"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@types/react": "*",
|
|
@@ -118,7 +118,6 @@
|
|
|
118
118
|
"glob": "^7.2.0",
|
|
119
119
|
"metro": "^0.67.0",
|
|
120
120
|
"metro-config": "^0.67.0",
|
|
121
|
-
"metro-extra-config": "1.0.0",
|
|
122
121
|
"metro-minify-uglify": "^0.67.0",
|
|
123
122
|
"metro-react-native-babel-preset": "^0.67.0",
|
|
124
123
|
"metro-resolver": "^0.67.0",
|
|
@@ -143,7 +142,8 @@
|
|
|
143
142
|
"stylelint-processor-styled-components": "^1.10.0",
|
|
144
143
|
"typescript": "^4.8.3",
|
|
145
144
|
"victory": "^35.5.5",
|
|
146
|
-
"webpack": "^4.46.0"
|
|
145
|
+
"webpack": "^4.46.0",
|
|
146
|
+
"metro-extra-config": "1.0.0"
|
|
147
147
|
},
|
|
148
148
|
"scripts": {
|
|
149
149
|
"android": "expo start --android",
|