@ledgerhq/native-ui 0.26.1 → 0.27.0-next.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/components/Cards/BannerCard/index.d.ts +3 -3
- package/lib/components/Cards/BannerCard/index.d.ts.map +1 -1
- package/lib/components/Cards/NotificationCard/index.d.ts +2 -2
- package/lib/components/Cards/NotificationCard/index.d.ts.map +1 -1
- package/lib/components/Cards/SideImageCard/index.d.ts +3 -3
- package/lib/components/Cards/SideImageCard/index.d.ts.map +1 -1
- package/lib/components/Form/DrawerTabSelector/index.d.ts +12 -0
- package/lib/components/Form/DrawerTabSelector/index.d.ts.map +1 -0
- package/lib/components/Form/DrawerTabSelector/index.js +61 -0
- package/lib/components/Form/TabSelector/index.d.ts +5 -9
- package/lib/components/Form/TabSelector/index.d.ts.map +1 -1
- package/lib/components/Form/TabSelector/index.js +44 -50
- package/lib/components/Form/index.d.ts +1 -0
- package/lib/components/Form/index.d.ts.map +1 -1
- package/lib/components/Form/index.js +1 -0
- package/lib/components/Loader/InfiniteLoader/index.d.ts +1 -1
- package/lib/components/Loader/InfiniteLoader/index.d.ts.map +1 -1
- package/lib/components/Loader/InfiniteLoader/index.js +2 -2
- package/lib/components/cta/Button/index.d.ts +2 -2
- package/lib/components/cta/Button/index.d.ts.map +1 -1
- package/lib/components/cta/Link/index.d.ts +2 -2
- package/lib/components/cta/Link/index.d.ts.map +1 -1
- package/lib/components/cta/QuickAction/QuickActionButton/index.d.ts +3 -3
- package/lib/components/cta/QuickAction/QuickActionButton/index.d.ts.map +1 -1
- package/lib/components/cta/QuickAction/QuickActionButton/index.js +2 -2
- package/lib/components/cta/QuickAction/QuickActionList/index.d.ts +2 -1
- package/lib/components/cta/QuickAction/QuickActionList/index.d.ts.map +1 -1
- package/lib/components/cta/QuickAction/QuickActionList/index.js +2 -2
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { TouchableOpacityProps
|
|
3
|
+
import { TouchableOpacityProps } from "react-native";
|
|
4
4
|
export type CardProps = TouchableOpacityProps & {
|
|
5
5
|
title?: string;
|
|
6
6
|
onPressDismiss?: () => void;
|
|
@@ -11,8 +11,8 @@ export type CardProps = TouchableOpacityProps & {
|
|
|
11
11
|
type CloseProps = {
|
|
12
12
|
onPressDismiss?: () => void;
|
|
13
13
|
};
|
|
14
|
-
export declare const Container: import("styled-components").StyledComponent<
|
|
15
|
-
export declare const CloseContainer: import("styled-components").StyledComponent<
|
|
14
|
+
export declare const Container: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const CloseContainer: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
16
|
export declare const ChevronContainer: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("../../styled").BaseStyledProps, never>;
|
|
17
17
|
export declare const CloseButton: ({ onPressDismiss }: CloseProps) => React.JSX.Element;
|
|
18
18
|
declare const BannerCard: (props: CardProps) => React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cards/BannerCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cards/BannerCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAoB,MAAM,cAAc,CAAC;AAMvE,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAC1B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,EAAE,OAAO,GAAG,OAAO,CAAC;CACpC,CAAC;AAEF,KAAK,UAAU,GAAG;IAChB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,SAAS,6MAUrB,CAAC;AAEF,eAAO,MAAM,cAAc,6MAQ1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,0KAM5B,CAAC;AAEF,eAAO,MAAM,WAAW,uBAAwB,UAAU,sBAOzD,CAAC;AAsCF,QAAA,MAAM,UAAU,UAAW,SAAS,KAAG,MAAM,YAE5C,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { TouchableOpacityProps
|
|
3
|
+
import { TouchableOpacityProps } from "react-native";
|
|
4
4
|
export type CardProps = TouchableOpacityProps & {
|
|
5
5
|
tag?: string;
|
|
6
6
|
description?: string;
|
|
@@ -13,6 +13,6 @@ export type CardProps = TouchableOpacityProps & {
|
|
|
13
13
|
viewed: boolean;
|
|
14
14
|
};
|
|
15
15
|
declare const NotificationCard: (props: CardProps) => React.ReactElement;
|
|
16
|
-
export declare const Base: import("styled-components").StyledComponent<
|
|
16
|
+
export declare const Base: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, {}, never>;
|
|
17
17
|
export default NotificationCard;
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cards/NotificationCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cards/NotificationCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,OAAO,EAAE,qBAAqB,EAAoB,MAAM,cAAc,CAAC;AAEvE,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AA0BF,QAAA,MAAM,gBAAgB,UAAW,SAAS,KAAG,MAAM,YAkElD,CAAC;AAEF,eAAO,MAAM,IAAI,6MAA6B,CAAC;AAM/C,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { TouchableOpacityProps,
|
|
3
|
+
import { TouchableOpacityProps, Image } from "react-native";
|
|
4
4
|
export type CardProps = TouchableOpacityProps & {
|
|
5
5
|
tag?: string;
|
|
6
6
|
title?: string;
|
|
@@ -8,11 +8,11 @@ export type CardProps = TouchableOpacityProps & {
|
|
|
8
8
|
imageUrl?: string;
|
|
9
9
|
onPressDismiss?: () => void;
|
|
10
10
|
};
|
|
11
|
-
export declare const Base: import("styled-components").StyledComponent<
|
|
11
|
+
export declare const Base: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, {}, never>;
|
|
12
12
|
export declare const Container: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("../../styled").BaseStyledProps, never>;
|
|
13
13
|
export declare const ImageContainer: import("styled-components").StyledComponent<typeof import("react-native").View, import("styled-components").DefaultTheme, import("../../styled").BaseStyledProps, never>;
|
|
14
14
|
export declare const ImageContent: import("styled-components").StyledComponent<typeof Image, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
-
export declare const CloseContainer: import("styled-components").StyledComponent<
|
|
15
|
+
export declare const CloseContainer: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, {}, never>;
|
|
16
16
|
export declare const CloseButton: (props: CardProps) => React.JSX.Element;
|
|
17
17
|
declare const SideImageCard: (props: CardProps) => React.ReactElement;
|
|
18
18
|
export default SideImageCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cards/SideImageCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Cards/SideImageCard/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAoB,KAAK,EAAE,MAAM,cAAc,CAAC;AAQ9E,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,IAAI,6MAEhB,CAAC;AAEF,eAAO,MAAM,SAAS,0KAIrB,CAAC;AAEF,eAAO,MAAM,cAAc,0KAI1B,CAAC;AACF,eAAO,MAAM,YAAY,gHAIxB,CAAC;AAEF,eAAO,MAAM,cAAc,6MAW1B,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,SAAS,sBAO3C,CAAC;AAiEF,QAAA,MAAM,aAAa,UAAW,SAAS,KAAG,MAAM,YAM/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TabSelectorProps<T extends string | number> {
|
|
3
|
+
options: T[];
|
|
4
|
+
selectedOption: T;
|
|
5
|
+
handleSelectOption: (option: T) => void;
|
|
6
|
+
labels: {
|
|
7
|
+
[key in T]: string;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export default function DrawerTabSelector<T extends string | number>({ options, selectedOption, handleSelectOption, labels, }: TabSelectorProps<T>): JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/DrawerTabSelector/index.tsx"],"names":[],"mappings":";AAwDA,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAClD,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,cAAc,EAAE,CAAC,CAAC;IAClB,kBAAkB,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE;SAAG,GAAG,IAAI,CAAC,GAAG,MAAM;KAAE,CAAC;CAChC;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACnE,OAAO,EACP,cAAc,EACd,kBAAkB,EAClB,MAAM,GACP,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA4DnC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import Text from "../../Text";
|
|
3
|
+
import Flex from "../../Layout/Flex";
|
|
4
|
+
import styled, { useTheme } from "styled-components/native";
|
|
5
|
+
import { TouchableOpacity } from "react-native";
|
|
6
|
+
import Animated, { useSharedValue, useAnimatedStyle, withSpring } from "react-native-reanimated";
|
|
7
|
+
const StyledTouchableOpacity = styled(TouchableOpacity) `
|
|
8
|
+
width: ${(p) => p.width}px;
|
|
9
|
+
flex: 1;
|
|
10
|
+
height: 100%;
|
|
11
|
+
`;
|
|
12
|
+
const StyledFlex = styled(Flex) `
|
|
13
|
+
height: 100%;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
align-items: center;
|
|
16
|
+
`;
|
|
17
|
+
const StyledText = styled(Text) `
|
|
18
|
+
line-height: 14.52px;
|
|
19
|
+
overflow: visible;
|
|
20
|
+
text-align: center;
|
|
21
|
+
font-size: 12px;
|
|
22
|
+
color: ${(p) => p.isSelected ? p.theme.colors.constant.black : p.theme.colors.opacityDefault.c50};
|
|
23
|
+
`;
|
|
24
|
+
const OptionButton = ({ option, selectedOption, handleSelectOption, label, width, }) => {
|
|
25
|
+
const isSelected = selectedOption === option;
|
|
26
|
+
return (React.createElement(StyledTouchableOpacity, { width: width, onPress: () => handleSelectOption(option) },
|
|
27
|
+
React.createElement(StyledFlex, { isSelected: isSelected },
|
|
28
|
+
React.createElement(StyledText, { fontWeight: "semiBold", isSelected: isSelected, numberOfLines: 1 }, label))));
|
|
29
|
+
};
|
|
30
|
+
export default function DrawerTabSelector({ options, selectedOption, handleSelectOption, labels, }) {
|
|
31
|
+
const { colors } = useTheme();
|
|
32
|
+
const longuestLabel = labels[options[0]].length > labels[options[1]].length ? options[0] : options[1];
|
|
33
|
+
const widthFactor = 8;
|
|
34
|
+
const margin = 20;
|
|
35
|
+
const width = labels[longuestLabel].length * widthFactor + margin;
|
|
36
|
+
const semiWidth = width / 2;
|
|
37
|
+
const translateX = useSharedValue(-semiWidth);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
translateX.value = withSpring(selectedOption === options[0] ? -semiWidth : semiWidth, {
|
|
40
|
+
damping: 30,
|
|
41
|
+
stiffness: 80,
|
|
42
|
+
});
|
|
43
|
+
}, [selectedOption, translateX, options]);
|
|
44
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
45
|
+
return {
|
|
46
|
+
transform: [{ translateX: translateX.value }],
|
|
47
|
+
};
|
|
48
|
+
});
|
|
49
|
+
return (React.createElement(Flex, { flexDirection: "row", justifyContent: "center", alignItems: "center", width: width * 2 + 4, height: "35px", borderRadius: "40px", bg: colors.opacityDefault.c05, position: "relative" },
|
|
50
|
+
React.createElement(Animated.View, { style: [
|
|
51
|
+
{
|
|
52
|
+
position: "absolute",
|
|
53
|
+
width: width - 2,
|
|
54
|
+
height: "90%",
|
|
55
|
+
backgroundColor: colors.primary.c80,
|
|
56
|
+
borderRadius: 40,
|
|
57
|
+
},
|
|
58
|
+
animatedStyle,
|
|
59
|
+
] }),
|
|
60
|
+
options.map((option) => (React.createElement(OptionButton, { width: width, key: option, option: option, selectedOption: selectedOption, handleSelectOption: handleSelectOption, label: labels[option] })))));
|
|
61
|
+
}
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
[key in T]: string;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
export default function TabSelector<T extends string | number>({ options, selectedOption, handleSelectOption, labels, }: TabSelectorProps<T>): JSX.Element;
|
|
2
|
+
type TabSelectorProps = {
|
|
3
|
+
labels: string[];
|
|
4
|
+
onToggle: (value: string) => void;
|
|
5
|
+
};
|
|
6
|
+
export default function TabSelector({ labels, onToggle }: TabSelectorProps): JSX.Element;
|
|
11
7
|
export {};
|
|
12
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/TabSelector/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/TabSelector/index.tsx"],"names":[],"mappings":";AA8BA,KAAK,gBAAgB,GAAG;IACtB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAqDvF"}
|
|
@@ -1,61 +1,55 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Pressable } from "react-native";
|
|
3
|
+
import Animated, { useSharedValue, useAnimatedStyle, withTiming } from "react-native-reanimated";
|
|
4
|
+
import styled from "styled-components/native";
|
|
3
5
|
import Flex from "../../Layout/Flex";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const StyledTouchableOpacity = styled(TouchableOpacity) `
|
|
8
|
-
width: ${(p) => p.width}px;
|
|
9
|
-
flex: 1;
|
|
6
|
+
import Text from "../../Text";
|
|
7
|
+
import Box from "../../Layout/Box";
|
|
8
|
+
const Container = styled(Flex) `
|
|
10
9
|
height: 100%;
|
|
10
|
+
justify-content: space-between;
|
|
11
|
+
flex-direction: row;
|
|
12
|
+
position: relative;
|
|
11
13
|
`;
|
|
12
|
-
const
|
|
14
|
+
const AnimatedBackground = styled(Animated.View) `
|
|
15
|
+
position: absolute;
|
|
13
16
|
height: 100%;
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
background-color: ${({ theme }) => theme.colors.opacityDefault.c05};
|
|
16
19
|
`;
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
const Tab = styled(Flex) `
|
|
21
|
+
flex: 1;
|
|
22
|
+
padding: 4px;
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
23
26
|
`;
|
|
24
|
-
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
useEffect(() => {
|
|
39
|
-
translateX.value = withSpring(selectedOption === options[0] ? -semiWidth : semiWidth, {
|
|
40
|
-
damping: 30,
|
|
41
|
-
stiffness: 80,
|
|
42
|
-
});
|
|
43
|
-
}, [selectedOption, translateX, options]);
|
|
27
|
+
export default function TabSelector({ labels, onToggle }) {
|
|
28
|
+
const translateX = useSharedValue(0);
|
|
29
|
+
const [containerWidth, setContainerWidth] = useState(0);
|
|
30
|
+
const [selectedIndex, setSelectedIndex] = useState(0);
|
|
31
|
+
const handlePress = (value, index) => {
|
|
32
|
+
setSelectedIndex(index);
|
|
33
|
+
translateX.value = (containerWidth / labels.length) * index;
|
|
34
|
+
if (selectedIndex !== index)
|
|
35
|
+
onToggle(value);
|
|
36
|
+
};
|
|
37
|
+
const handleLayout = (event) => {
|
|
38
|
+
const { width } = event.nativeEvent.layout;
|
|
39
|
+
setContainerWidth(width);
|
|
40
|
+
};
|
|
44
41
|
const animatedStyle = useAnimatedStyle(() => {
|
|
45
42
|
return {
|
|
46
|
-
transform: [{ translateX: translateX.value }],
|
|
43
|
+
transform: [{ translateX: withTiming(translateX.value, { duration: 250 }) }],
|
|
44
|
+
width: containerWidth / labels.length,
|
|
47
45
|
};
|
|
48
46
|
});
|
|
49
|
-
return (React.createElement(
|
|
50
|
-
React.createElement(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
animatedStyle,
|
|
59
|
-
] }),
|
|
60
|
-
options.map((option) => (React.createElement(OptionButton, { width: width, key: option, option: option, selectedOption: selectedOption, handleSelectOption: handleSelectOption, label: labels[option] })))));
|
|
47
|
+
return (React.createElement(Box, { height: "100%", width: "100%", borderRadius: 12, border: 1, borderColor: "opacityDefault.c10", p: 2 },
|
|
48
|
+
React.createElement(Container, { onLayout: handleLayout },
|
|
49
|
+
React.createElement(AnimatedBackground, { style: animatedStyle }),
|
|
50
|
+
labels.map((label, index) => (React.createElement(Pressable, { hitSlop: 6, key: label, onPress: () => handlePress(label, index), style: ({ pressed }) => [
|
|
51
|
+
{ opacity: pressed && selectedIndex !== index ? 0.5 : 1, flex: 1 },
|
|
52
|
+
] },
|
|
53
|
+
React.createElement(Tab, null,
|
|
54
|
+
React.createElement(Text, { fontSize: 14, fontWeight: "semiBold", flexShrink: 1, numberOfLines: 1 }, label))))))));
|
|
61
55
|
}
|
|
@@ -4,5 +4,6 @@ export { default as Slider } from "./Slider";
|
|
|
4
4
|
export { default as Switch } from "./Switch";
|
|
5
5
|
export { default as Toggle } from "./Toggle";
|
|
6
6
|
export { default as SelectableList } from "./SelectableList";
|
|
7
|
+
export { default as DrawerTabSelector } from "./DrawerTabSelector";
|
|
7
8
|
export { default as TabSelector } from "./TabSelector";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Form/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -4,4 +4,5 @@ export { default as Slider } from "./Slider";
|
|
|
4
4
|
export { default as Switch } from "./Switch";
|
|
5
5
|
export { default as Toggle } from "./Toggle";
|
|
6
6
|
export { default as SelectableList } from "./SelectableList";
|
|
7
|
+
export { default as DrawerTabSelector } from "./DrawerTabSelector";
|
|
7
8
|
export { default as TabSelector } from "./TabSelector";
|
|
@@ -6,6 +6,6 @@ declare const Loader: import("styled-components").StyledComponent<typeof Svg, im
|
|
|
6
6
|
export type Props = React.ComponentProps<typeof Loader> & {
|
|
7
7
|
color?: string;
|
|
8
8
|
};
|
|
9
|
-
export default function InfiniteLoader({ size, color, mock, ...extraProps }: Props): JSX.Element;
|
|
9
|
+
export default function InfiniteLoader({ size, color, mock, testID, ...extraProps }: Props): JSX.Element;
|
|
10
10
|
export {};
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/InfiniteLoader/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,GAA+C,MAAM,kBAAkB,CAAC;AAE/E,OAAO,EAAgB,SAAS,EAAE,MAAM,eAAe,CAAC;AAgBxD,QAAA,MAAM,MAAM,2RAIX,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAAS,EACT,KAAqB,EACrB,IAAY,EACZ,GAAG,UAAU,EACd,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Loader/InfiniteLoader/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,GAA+C,MAAM,kBAAkB,CAAC;AAE/E,OAAO,EAAgB,SAAS,EAAE,MAAM,eAAe,CAAC;AAgBxD,QAAA,MAAM,MAAM,2RAIX,CAAC;AAEF,MAAM,MAAM,KAAK,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAAS,EACT,KAAqB,EACrB,IAAY,EACZ,MAAW,EACX,GAAG,UAAU,EACd,EAAE,KAAK,GAAG,GAAG,CAAC,OAAO,CAmFrB"}
|
|
@@ -24,7 +24,7 @@ const Loader = styled(Svg).attrs((props) => (Object.assign({}, strokeSystem(prop
|
|
|
24
24
|
${size}
|
|
25
25
|
`;
|
|
26
26
|
export default function InfiniteLoader(_a) {
|
|
27
|
-
var { size = 38, color = "primary.c50", mock = false } = _a, extraProps = __rest(_a, ["size", "color", "mock"]);
|
|
27
|
+
var { size = 38, color = "primary.c50", mock = false, testID = "" } = _a, extraProps = __rest(_a, ["size", "color", "mock", "testID"]);
|
|
28
28
|
const rotation = useSharedValue(0);
|
|
29
29
|
const animatedStyles = useAnimatedStyle(() => {
|
|
30
30
|
return {
|
|
@@ -43,7 +43,7 @@ export default function InfiniteLoader(_a) {
|
|
|
43
43
|
return () => cancelAnimation(rotation);
|
|
44
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
45
|
}, []);
|
|
46
|
-
return (React.createElement(Animated.View, { style: [{ display: "flex", justifyContent: "center", alignItems: "center" }, animatedStyles] },
|
|
46
|
+
return (React.createElement(Animated.View, { style: [{ display: "flex", justifyContent: "center", alignItems: "center" }, animatedStyles], testID: testID },
|
|
47
47
|
React.createElement(Loader, Object.assign({ size: size, stroke: color, viewBox: "0 0 38 38", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, extraProps),
|
|
48
48
|
React.createElement(LinearGradient, { id: "gradient-start", gradientUnits: "userSpaceOnUse", gradientTransform: "rotate(-20)" },
|
|
49
49
|
React.createElement(Stop, { offset: 0, stopColor: "white", stopOpacity: 0.5 }),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { TouchableOpacityProps, View } from "react-native";
|
|
4
4
|
import { BaseStyledProps } from "../../styled";
|
|
5
5
|
import { IconType } from "../../Icon/type";
|
|
6
6
|
export type ButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
@@ -19,7 +19,7 @@ export type ButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
|
19
19
|
isNewIcon?: boolean;
|
|
20
20
|
Icon?: IconType | JSX.Element;
|
|
21
21
|
};
|
|
22
|
-
export declare const Base: import("styled-components").StyledComponent<
|
|
22
|
+
export declare const Base: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<View>>, import("styled-components").DefaultTheme, {
|
|
23
23
|
iconButton?: boolean | undefined;
|
|
24
24
|
sizeVariant?: ButtonProps["size"];
|
|
25
25
|
} & Omit<ButtonProps, "size">, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/cta/Button/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/cta/Button/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,EAKL,qBAAqB,EACrB,IAAI,EACL,MAAM,cAAc,CAAC;AAKtB,OAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG,qBAAqB,GAC7C,eAAe,GAAG;IAChB,mBAAmB,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;IACnE,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CAAC;CAC/B,CAAC;AAUJ,eAAO,MAAM,IAAI;;kBAiBC,WAAW,CAAC,MAAM,CAAC;qCAiBpC,CAAC;AA0FF,QAAA,MAAM,MAAM,UAAW,WAAW,KAAG,MAAM,YAgC1C,CAAC;AAEF,eAAO,MAAM,gBAAgB,UAAW,WAAW,KAAG,MAAM,YAmC3D,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="styled-components-react-native" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import {
|
|
3
|
+
import { TouchableOpacityProps } from "react-native";
|
|
4
4
|
export type LinkProps = TouchableOpacityProps & {
|
|
5
5
|
Icon?: React.ComponentType<{
|
|
6
6
|
size: number;
|
|
@@ -14,7 +14,7 @@ export type LinkProps = TouchableOpacityProps & {
|
|
|
14
14
|
children?: React.ReactNode;
|
|
15
15
|
numberOfLines?: number;
|
|
16
16
|
};
|
|
17
|
-
export declare const Base: import("styled-components").StyledComponent<
|
|
17
|
+
export declare const Base: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, {}, never>;
|
|
18
18
|
declare const Link: (props: LinkProps) => React.ReactElement;
|
|
19
19
|
export default Link;
|
|
20
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/cta/Link/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/cta/Link/index.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAMvE,MAAM,MAAM,SAAS,GAAG,qBAAqB,GAAG;IAC9C,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC5D,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAUF,eAAO,MAAM,IAAI,6MAKhB,CAAC;AAgDF,QAAA,MAAM,IAAI,UAAW,SAAS,KAAG,MAAM,YAOtC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { TouchableOpacityProps } from "react-native";
|
|
3
3
|
import { IconType } from "src/components/Icon/type";
|
|
4
4
|
import { BaseStyledProps } from "../../../styled";
|
|
5
5
|
import { TextVariants } from "../../../../styles/theme";
|
|
@@ -12,10 +12,10 @@ export type QuickActionButtonProps = TouchableOpacityProps & BaseStyledProps & {
|
|
|
12
12
|
variant?: Variant;
|
|
13
13
|
};
|
|
14
14
|
export declare const StyledText: import("styled-components").StyledComponent<({ children, bracket, textAlign, testID, ...props }: import("../../../Text").BaseTextProps) => React.JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
-
export declare const Base: import("styled-components").StyledComponent<
|
|
15
|
+
export declare const Base: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<TouchableOpacityProps & React.RefAttributes<import("react-native").View>>, import("styled-components").DefaultTheme, TouchableOpacityProps & {
|
|
16
16
|
visuallyDisabled?: boolean | undefined;
|
|
17
17
|
variant: Variant;
|
|
18
18
|
}, never>;
|
|
19
|
-
declare const QuickActionButton: ({ Icon, children, disabled, onPress, onPressWhenDisabled, textVariant, variant, ...otherProps }: QuickActionButtonProps) => React.ReactElement;
|
|
19
|
+
declare const QuickActionButton: ({ Icon, children, disabled, onPress, onPressWhenDisabled, textVariant, variant, testID, ...otherProps }: QuickActionButtonProps) => React.ReactElement;
|
|
20
20
|
export default QuickActionButton;
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/QuickAction/QuickActionButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/QuickAction/QuickActionButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoB,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAmB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,KAAK,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjC,MAAM,MAAM,sBAAsB,GAAG,qBAAqB,GACxD,eAAe,GAAG;IAChB,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mBAAmB,CAAC,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACvD,WAAW,CAAC,EAAE,YAAY,CAAC;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEJ,eAAO,MAAM,UAAU,oNAGtB,CAAC;AAEF,eAAO,MAAM,IAAI;;aACgD,OAAO;SAcvE,CAAC;AAEF,QAAA,MAAM,iBAAiB,4GAUpB,sBAAsB,KAAG,MAAM,YAyBjC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -30,8 +30,8 @@ export const Base = baseStyled(TouchableOpacity) `
|
|
|
30
30
|
: `background-color: ${theme.colors.neutral.c20};`}
|
|
31
31
|
`;
|
|
32
32
|
const QuickActionButton = (_a) => {
|
|
33
|
-
var { Icon, children, disabled, onPress, onPressWhenDisabled, textVariant = "body", variant = "large" } = _a, otherProps = __rest(_a, ["Icon", "children", "disabled", "onPress", "onPressWhenDisabled", "textVariant", "variant"]);
|
|
34
|
-
return (React.createElement(Base, Object.assign({ disabled: onPressWhenDisabled ? false : disabled, onPress: disabled ? onPressWhenDisabled : onPress, visuallyDisabled: disabled, variant: variant }, otherProps),
|
|
33
|
+
var { Icon, children, disabled, onPress, onPressWhenDisabled, textVariant = "body", variant = "large", testID } = _a, otherProps = __rest(_a, ["Icon", "children", "disabled", "onPress", "onPressWhenDisabled", "textVariant", "variant", "testID"]);
|
|
34
|
+
return (React.createElement(Base, Object.assign({ disabled: onPressWhenDisabled ? false : disabled, onPress: disabled ? onPressWhenDisabled : onPress, visuallyDisabled: disabled, variant: variant }, otherProps, { testID: `${testID}-${children}` }),
|
|
35
35
|
React.createElement(Icon, { size: variant === "small" ? 20 : 24, color: disabled ? "neutral.c50" : "neutral.c100" }),
|
|
36
36
|
React.createElement(StyledText, { numberOfLines: 1, variant: textVariant, fontWeight: "semiBold", color: disabled ? "neutral.c50" : "neutral.c100", mt: 2 }, children)));
|
|
37
37
|
};
|
|
@@ -3,7 +3,8 @@ import { FlatListProps } from "react-native";
|
|
|
3
3
|
import { QuickActionButtonProps } from "../QuickActionButton";
|
|
4
4
|
export type QuickActionListProps = Omit<FlatListProps<QuickActionButtonProps>, "renderItem"> & {
|
|
5
5
|
id: string;
|
|
6
|
+
testID?: string;
|
|
6
7
|
};
|
|
7
|
-
declare const QuickActionList: ({ numColumns, data, id, ...otherProps }: QuickActionListProps) => React.ReactElement;
|
|
8
|
+
declare const QuickActionList: ({ numColumns, data, id, testID, ...otherProps }: QuickActionListProps) => React.ReactElement;
|
|
8
9
|
export default QuickActionList;
|
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/QuickAction/QuickActionList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAY,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,OAA0B,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,YAAY,CAAC,GAAG;IAC7F,EAAE,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/cta/QuickAction/QuickActionList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAY,aAAa,EAAE,MAAM,cAAc,CAAC;AAEvD,OAA0B,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEjF,MAAM,MAAM,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC,sBAAsB,CAAC,EAAE,YAAY,CAAC,GAAG;IAC7F,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,QAAA,MAAM,eAAe,oDAMlB,oBAAoB,KAAG,MAAM,YA0B/B,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -13,9 +13,9 @@ import React, { useCallback } from "react";
|
|
|
13
13
|
import { FlatList } from "react-native";
|
|
14
14
|
import QuickActionButton from "../QuickActionButton";
|
|
15
15
|
const QuickActionList = (_a) => {
|
|
16
|
-
var { numColumns = 3, data, id } = _a, otherProps = __rest(_a, ["numColumns", "data", "id"]);
|
|
16
|
+
var { numColumns = 3, data, id, testID } = _a, otherProps = __rest(_a, ["numColumns", "data", "id", "testID"]);
|
|
17
17
|
const renderItem = useCallback(({ item, index }) => {
|
|
18
|
-
return (React.createElement(QuickActionButton, Object.assign({}, item, { flex: 1, mr: (index + 1) % numColumns > 0 && data && index !== data.length - 1 ? 4 : 0, mb: (data === null || data === void 0 ? void 0 : data.length) && index + numColumns < data.length ? 4 : 0 })));
|
|
18
|
+
return (React.createElement(QuickActionButton, Object.assign({}, item, { flex: 1, mr: (index + 1) % numColumns > 0 && data && index !== data.length - 1 ? 4 : 0, mb: (data === null || data === void 0 ? void 0 : data.length) && index + numColumns < data.length ? 4 : 0, testID: testID })));
|
|
19
19
|
}, []);
|
|
20
20
|
return (React.createElement(FlatList, Object.assign({}, otherProps, { data: data, keyExtractor: (_item, index) => `${id}${index}`, horizontal: false, renderItem: renderItem, numColumns: numColumns })));
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/native-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.27.0-next.0",
|
|
4
4
|
"description": "Ledger Live - Mobile UI",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"react-native-modal": "^13.0.0",
|
|
41
41
|
"rn-range-slider": "2.1.1",
|
|
42
42
|
"styled-system": "^5.1.5",
|
|
43
|
-
"@ledgerhq/crypto-icons-ui": "^1.
|
|
43
|
+
"@ledgerhq/crypto-icons-ui": "^1.7.0-next.0",
|
|
44
44
|
"@ledgerhq/icons-ui": "^0.8.1",
|
|
45
45
|
"@ledgerhq/ui-shared": "^0.3.0"
|
|
46
46
|
},
|
|
@@ -108,11 +108,11 @@
|
|
|
108
108
|
"eslint-plugin-react": "^7.33.2",
|
|
109
109
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
110
110
|
"eslint-plugin-storybook": "^0.6.15",
|
|
111
|
-
"expo": "
|
|
111
|
+
"expo": "51.0.39",
|
|
112
112
|
"expo-asset": "8.10.1",
|
|
113
113
|
"expo-constants": "^14.4.2",
|
|
114
114
|
"expo-font": "^11.4.0",
|
|
115
|
-
"expo-modules-core": "1.
|
|
115
|
+
"expo-modules-core": "1.12.26",
|
|
116
116
|
"fs-extra": "^10.0.1",
|
|
117
117
|
"glob": "^7.2.0",
|
|
118
118
|
"metro": "^0.80.12",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"react": "^18.2.0",
|
|
131
131
|
"react-dom": "^18.2.0",
|
|
132
132
|
"react-is": "^18",
|
|
133
|
-
"react-native": "0.
|
|
133
|
+
"react-native": "0.75.4",
|
|
134
134
|
"react-native-reanimated": "3.16.1",
|
|
135
135
|
"react-native-safe-area-context": "^4.10.9",
|
|
136
136
|
"react-native-svg": "13.14.0",
|