@ledgerhq/native-ui 0.7.12 → 0.7.15
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.
|
@@ -10,10 +10,10 @@ const ElementContainer = styled(Flex).attrs({
|
|
|
10
10
|
function Element(props) {
|
|
11
11
|
const { first, value, selected, disabled, onPress, children, Icon, renderRight: RenderRight, } = props;
|
|
12
12
|
return (React.createElement(TouchableOpacity, { onPress: onPress, disabled: disabled },
|
|
13
|
-
React.createElement(ElementContainer, { p: 6, mt: first ? 0 : 4, backgroundColor: selected ? "primary.c20" : "
|
|
13
|
+
React.createElement(ElementContainer, { p: 6, mt: first ? 0 : 4, backgroundColor: selected ? "primary.c20" : "transparent", border: "1px solid", borderColor: selected ? "primary.c50" : "neutral.c40", borderRadius: 1, flexDirection: "row", alignItems: "center" },
|
|
14
14
|
Icon && (React.createElement(Flex, { mr: 6, flexShrink: 0 },
|
|
15
|
-
React.createElement(Icon, { size: 24, color: disabled ? "neutral.c50" : "neutral.c100" }))),
|
|
16
|
-
React.createElement(Text, { variant: "large", flex: 1, color: disabled ? "neutral.c50" : "neutral.c100" }, children || value),
|
|
15
|
+
React.createElement(Icon, { size: 24, color: disabled ? "neutral.c50" : selected ? "primary.c90" : "neutral.c100" }))),
|
|
16
|
+
React.createElement(Text, { variant: "large", flex: 1, color: disabled ? "neutral.c50" : selected ? "primary.c90" : "neutral.c100" }, children || value),
|
|
17
17
|
RenderRight && (React.createElement(Flex, { pl: 6, flexShrink: 0 }, React.isValidElement(RenderRight) ? RenderRight : React.createElement(RenderRight, Object.assign({}, props)))))));
|
|
18
18
|
}
|
|
19
19
|
function SelectableList({ currentValue, onChange, children }) {
|
|
@@ -3,6 +3,7 @@ const bracketSizes = {
|
|
|
3
3
|
h2: 28,
|
|
4
4
|
h3: 20,
|
|
5
5
|
h4: 18,
|
|
6
|
+
h5: 18,
|
|
6
7
|
large: 20,
|
|
7
8
|
body: 20,
|
|
8
9
|
bodyLineHeight: 20,
|
|
@@ -37,7 +38,9 @@ export function getTextTypeStyle({ bracket }) {
|
|
|
37
38
|
},
|
|
38
39
|
h4: {
|
|
39
40
|
fontFamily: "Inter",
|
|
40
|
-
|
|
41
|
+
},
|
|
42
|
+
h5: {
|
|
43
|
+
fontFamily: "Inter",
|
|
41
44
|
},
|
|
42
45
|
large: {
|
|
43
46
|
fontFamily: "Inter",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/native-ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
4
4
|
"description": "Ledger Live - React Native UI",
|
|
5
5
|
"repository": "https://github.com/LedgerHQ/ui",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"index.js"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@ledgerhq/icons-ui": "^0.2.
|
|
18
|
+
"@ledgerhq/icons-ui": "^0.2.4",
|
|
19
19
|
"@ledgerhq/ui-shared": "^0.1.6",
|
|
20
20
|
"@types/color": "^3.0.2",
|
|
21
21
|
"@types/react": "^17.0.37",
|
package/styles/theme.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ColorPalette } from "@ledgerhq/ui-shared";
|
|
2
2
|
export declare const space: number[];
|
|
3
|
-
export declare type TextVariants = "h1" | "h2" | "h3" | "h4" | "large" | "body" | "bodyLineHeight" | "paragraph" | "paragraphLineHeight" | "small" | "subtitle" | "tiny";
|
|
3
|
+
export declare type TextVariants = "h1" | "h2" | "h3" | "h4" | "h5" | "large" | "body" | "bodyLineHeight" | "paragraph" | "paragraphLineHeight" | "small" | "subtitle" | "tiny";
|
|
4
4
|
export declare type ThemeScale<Type, Aliases extends string> = Array<Type> & Record<Aliases, Type>;
|
|
5
5
|
export declare const fontSizes: ThemeScale<number, TextVariants>;
|
|
6
6
|
export declare const radii: number[];
|
package/styles/theme.js
CHANGED
|
@@ -16,7 +16,8 @@ export const fontSizes = [10, 11, 12, 13, 14, 16, 18, 24, 28];
|
|
|
16
16
|
] = fontSizes;
|
|
17
17
|
fontSizes.bodyLineHeight = fontSizes.body;
|
|
18
18
|
fontSizes.paragraphLineHeight = fontSizes.paragraph;
|
|
19
|
-
fontSizes.h4 = fontSizes.
|
|
19
|
+
fontSizes.h4 = fontSizes.h2;
|
|
20
|
+
fontSizes.h5 = fontSizes.h3;
|
|
20
21
|
export const radii = [0, 4, 8];
|
|
21
22
|
export const zIndexes = [-1, 0, 1, 9, 10, 90, 100, 900, 1000];
|
|
22
23
|
const theme = {
|