@ledgerhq/lumen-ui-rnative 0.0.70 → 0.0.72
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/.storybook/preview.tsx +4 -0
- package/dist/package.json +4 -4
- package/dist/src/i18n/locales/de.json +3 -0
- package/dist/src/i18n/locales/en.json +3 -0
- package/dist/src/i18n/locales/es.json +3 -0
- package/dist/src/i18n/locales/fr.json +3 -0
- package/dist/src/i18n/locales/ja.json +3 -0
- package/dist/src/i18n/locales/ko.json +3 -0
- package/dist/src/i18n/locales/pt.json +3 -0
- package/dist/src/i18n/locales/ru.json +3 -0
- package/dist/src/i18n/locales/th.json +3 -0
- package/dist/src/i18n/locales/tr.json +3 -0
- package/dist/src/i18n/locales/zh.json +3 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1 -0
- package/dist/src/lib/Animations/Pulse/Pulse.d.ts +3 -0
- package/dist/src/lib/Animations/Pulse/Pulse.d.ts.map +1 -0
- package/dist/src/lib/Animations/Pulse/Pulse.js +46 -0
- package/dist/src/lib/Animations/Pulse/Pulse.stories.d.ts +9 -0
- package/dist/src/lib/Animations/Pulse/Pulse.stories.d.ts.map +1 -0
- package/dist/src/lib/Animations/Pulse/Pulse.stories.js +38 -0
- package/dist/src/lib/Animations/Pulse/index.d.ts +3 -0
- package/dist/src/lib/Animations/Pulse/index.d.ts.map +1 -0
- package/dist/src/lib/Animations/Pulse/index.js +2 -0
- package/dist/src/lib/Animations/Pulse/types.d.ts +18 -0
- package/dist/src/lib/Animations/Pulse/types.d.ts.map +1 -0
- package/dist/src/lib/Animations/Pulse/types.js +1 -0
- package/dist/src/lib/Animations/Spin/Spin.d.ts +3 -0
- package/dist/src/lib/Animations/Spin/Spin.d.ts.map +1 -0
- package/dist/src/lib/Animations/Spin/Spin.js +23 -0
- package/dist/src/lib/Animations/Spin/Spin.stories.d.ts +9 -0
- package/dist/src/lib/Animations/Spin/Spin.stories.d.ts.map +1 -0
- package/dist/src/lib/Animations/Spin/Spin.stories.js +27 -0
- package/dist/src/lib/Animations/Spin/index.d.ts +3 -0
- package/dist/src/lib/Animations/Spin/index.d.ts.map +1 -0
- package/dist/src/lib/Animations/Spin/index.js +2 -0
- package/dist/src/lib/Animations/Spin/types.d.ts +14 -0
- package/dist/src/lib/Animations/Spin/types.d.ts.map +1 -0
- package/dist/src/lib/Animations/Spin/types.js +1 -0
- package/dist/src/lib/Animations/index.d.ts +4 -0
- package/dist/src/lib/Animations/index.d.ts.map +1 -0
- package/dist/src/lib/Animations/index.js +3 -0
- package/dist/src/lib/Animations/types.d.ts +2 -0
- package/dist/src/lib/Animations/types.d.ts.map +1 -0
- package/dist/src/lib/Animations/types.js +1 -0
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.d.ts +5 -7
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.js +7 -6
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.d.ts +1 -0
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.d.ts.map +1 -1
- package/dist/src/lib/Components/AmountDisplay/AmountDisplay.stories.js +5 -0
- package/dist/src/lib/Components/AmountDisplay/types.d.ts +7 -1
- package/dist/src/lib/Components/AmountDisplay/types.d.ts.map +1 -1
- package/dist/src/lib/Components/Skeleton/Skeleton.d.ts +21 -0
- package/dist/src/lib/Components/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/src/lib/Components/Skeleton/Skeleton.js +81 -0
- package/dist/src/lib/Components/Skeleton/Skeleton.stories.d.ts +11 -0
- package/dist/src/lib/Components/Skeleton/Skeleton.stories.d.ts.map +1 -0
- package/dist/src/lib/Components/Skeleton/Skeleton.stories.js +49 -0
- package/dist/src/lib/Components/Skeleton/index.d.ts +3 -0
- package/dist/src/lib/Components/Skeleton/index.d.ts.map +1 -0
- package/dist/src/lib/Components/Skeleton/index.js +2 -0
- package/dist/src/lib/Components/Skeleton/types.d.ts +10 -0
- package/dist/src/lib/Components/Skeleton/types.d.ts.map +1 -0
- package/dist/src/lib/Components/Skeleton/types.js +1 -0
- package/dist/src/lib/Components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/src/lib/Components/Spinner/Spinner.js +2 -23
- package/dist/src/lib/Components/Stepper/Stepper.d.ts +16 -0
- package/dist/src/lib/Components/Stepper/Stepper.d.ts.map +1 -0
- package/dist/src/lib/Components/Stepper/Stepper.js +74 -0
- package/dist/src/lib/Components/Stepper/Stepper.stories.d.ts +9 -0
- package/dist/src/lib/Components/Stepper/Stepper.stories.d.ts.map +1 -0
- package/dist/src/lib/Components/Stepper/Stepper.stories.js +35 -0
- package/dist/src/lib/Components/Stepper/index.d.ts +3 -0
- package/dist/src/lib/Components/Stepper/index.d.ts.map +1 -0
- package/dist/src/lib/Components/Stepper/index.js +2 -0
- package/dist/src/lib/Components/Stepper/types.d.ts +21 -0
- package/dist/src/lib/Components/Stepper/types.d.ts.map +1 -0
- package/dist/src/lib/Components/Stepper/types.js +1 -0
- package/dist/src/lib/Components/TabBar/TabBar.d.ts +1 -0
- package/dist/src/lib/Components/TabBar/TabBar.d.ts.map +1 -1
- package/dist/src/lib/Components/TabBar/TabBar.js +2 -1
- package/dist/src/lib/Components/TabBar/index.d.ts +1 -1
- package/dist/src/lib/Components/TabBar/index.d.ts.map +1 -1
- package/dist/src/lib/Components/TabBar/index.js +1 -1
- package/dist/src/lib/Components/TileButton/TileButton.d.ts +4 -3
- package/dist/src/lib/Components/TileButton/TileButton.d.ts.map +1 -1
- package/dist/src/lib/Components/TileButton/TileButton.js +3 -4
- package/dist/src/lib/Components/index.d.ts +3 -0
- package/dist/src/lib/Components/index.d.ts.map +1 -1
- package/dist/src/lib/Components/index.js +3 -0
- package/dist/src/styles/types/factories.types.d.ts +1 -1
- package/dist/src/styles/types/factories.types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/i18n/locales/de.json +3 -0
- package/src/i18n/locales/en.json +3 -0
- package/src/i18n/locales/es.json +3 -0
- package/src/i18n/locales/fr.json +3 -0
- package/src/i18n/locales/ja.json +3 -0
- package/src/i18n/locales/ko.json +3 -0
- package/src/i18n/locales/pt.json +3 -0
- package/src/i18n/locales/ru.json +3 -0
- package/src/i18n/locales/th.json +3 -0
- package/src/i18n/locales/tr.json +3 -0
- package/src/i18n/locales/zh.json +3 -0
- package/src/index.ts +1 -0
- package/src/lib/Animations/Pulse/Pulse.mdx +86 -0
- package/src/lib/Animations/Pulse/Pulse.stories.tsx +90 -0
- package/src/lib/Animations/Pulse/Pulse.tsx +55 -0
- package/src/lib/Animations/Pulse/index.ts +2 -0
- package/src/lib/Animations/Pulse/types.ts +18 -0
- package/src/lib/Animations/Spin/Spin.mdx +85 -0
- package/src/lib/Animations/Spin/Spin.stories.tsx +72 -0
- package/src/lib/Animations/Spin/Spin.tsx +34 -0
- package/src/lib/Animations/Spin/index.ts +2 -0
- package/src/lib/Animations/Spin/types.ts +14 -0
- package/src/lib/Animations/index.ts +3 -0
- package/src/lib/Animations/types.ts +11 -0
- package/src/lib/Components/AmountDisplay/AmountDisplay.mdx +6 -0
- package/src/lib/Components/AmountDisplay/AmountDisplay.stories.tsx +12 -0
- package/src/lib/Components/AmountDisplay/AmountDisplay.test.tsx +13 -0
- package/src/lib/Components/AmountDisplay/AmountDisplay.tsx +39 -35
- package/src/lib/Components/AmountDisplay/types.ts +7 -1
- package/src/lib/Components/Skeleton/Skeleton.mdx +200 -0
- package/src/lib/Components/Skeleton/Skeleton.stories.tsx +89 -0
- package/src/lib/Components/Skeleton/Skeleton.test.tsx +54 -0
- package/src/lib/Components/Skeleton/Skeleton.tsx +137 -0
- package/src/lib/Components/Skeleton/index.ts +2 -0
- package/src/lib/Components/Skeleton/types.ts +10 -0
- package/src/lib/Components/Spinner/Spinner.tsx +3 -35
- package/src/lib/Components/Stepper/Stepper.mdx +217 -0
- package/src/lib/Components/Stepper/Stepper.stories.tsx +62 -0
- package/src/lib/Components/Stepper/Stepper.test.tsx +132 -0
- package/src/lib/Components/Stepper/Stepper.tsx +159 -0
- package/src/lib/Components/Stepper/index.ts +2 -0
- package/src/lib/Components/Stepper/types.ts +21 -0
- package/src/lib/Components/TabBar/TabBar.tsx +2 -1
- package/src/lib/Components/TabBar/index.ts +1 -1
- package/src/lib/Components/TileButton/TileButton.tsx +35 -44
- package/src/lib/Components/index.ts +3 -0
- package/src/styles/types/factories.types.ts +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isTextChildren } from '@ledgerhq/lumen-utils-shared';
|
|
2
|
-
import
|
|
2
|
+
import { FC, PropsWithChildren } from 'react';
|
|
3
3
|
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import { useStyleSheet } from '../../../styles';
|
|
5
5
|
import { IconSize } from '../Icon';
|
|
@@ -74,50 +74,41 @@ const useStyles = ({
|
|
|
74
74
|
* Settings
|
|
75
75
|
* </TileButton>
|
|
76
76
|
*/
|
|
77
|
-
export const TileButton =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
isFull = false,
|
|
89
|
-
numberOfLines = 2,
|
|
90
|
-
...props
|
|
91
|
-
},
|
|
92
|
-
ref,
|
|
93
|
-
) => {
|
|
94
|
-
const rootStyles = useRootStyles({ isFull });
|
|
77
|
+
export const TileButton = ({
|
|
78
|
+
lx,
|
|
79
|
+
style,
|
|
80
|
+
icon: IconProp,
|
|
81
|
+
children,
|
|
82
|
+
disabled = false,
|
|
83
|
+
isFull = false,
|
|
84
|
+
numberOfLines = 2,
|
|
85
|
+
...props
|
|
86
|
+
}: TileButtonProps) => {
|
|
87
|
+
const rootStyles = useRootStyles({ isFull });
|
|
95
88
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
},
|
|
120
|
-
);
|
|
89
|
+
return (
|
|
90
|
+
<Pressable
|
|
91
|
+
lx={lx}
|
|
92
|
+
style={StyleSheet.flatten([style, rootStyles.root])}
|
|
93
|
+
disabled={disabled}
|
|
94
|
+
accessibilityRole='button'
|
|
95
|
+
accessibilityState={{ disabled }}
|
|
96
|
+
{...props}
|
|
97
|
+
>
|
|
98
|
+
{({ pressed }) => (
|
|
99
|
+
<TileButtonContent
|
|
100
|
+
disabled={disabled}
|
|
101
|
+
pressed={pressed}
|
|
102
|
+
isFull={isFull}
|
|
103
|
+
IconProp={IconProp}
|
|
104
|
+
numberOfLines={numberOfLines}
|
|
105
|
+
>
|
|
106
|
+
{children}
|
|
107
|
+
</TileButtonContent>
|
|
108
|
+
)}
|
|
109
|
+
</Pressable>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
121
112
|
|
|
122
113
|
type TileButtonContentProps = PropsWithChildren<{
|
|
123
114
|
disabled: boolean;
|
|
@@ -17,7 +17,10 @@ export * from './NavBar';
|
|
|
17
17
|
export * from './PageIndicator';
|
|
18
18
|
export * from './SearchInput';
|
|
19
19
|
export * from './Select';
|
|
20
|
+
export * from './Skeleton';
|
|
21
|
+
export * from './Spinner';
|
|
20
22
|
export * from './Spot';
|
|
23
|
+
export * from './Stepper';
|
|
21
24
|
export * from './Subheader';
|
|
22
25
|
export * from './Switch';
|
|
23
26
|
export * from './TabBar';
|