parousya-shared 1.0.2 → 1.0.3
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.
|
@@ -15,4 +15,8 @@ export declare const Button: ({ children, mode, style, disabled, loading, contai
|
|
|
15
15
|
containerProps?: IViewProps;
|
|
16
16
|
textProps?: Omit<TextProps, "children">;
|
|
17
17
|
iconSize?: number;
|
|
18
|
+
testID?: string;
|
|
19
|
+
accessibilityLabel?: string;
|
|
20
|
+
labelStyle?: any;
|
|
21
|
+
[key: string]: any;
|
|
18
22
|
}) => React.JSX.Element;
|
|
@@ -23,30 +23,59 @@ const Text = ({ children, txOptions, style, allowFontScaling = false, color, siz
|
|
|
23
23
|
width && textStyle.push({ width: themes_1.Platform.SizeScale(width) });
|
|
24
24
|
underline && textStyle.push({ textDecorationLine: 'underline' });
|
|
25
25
|
/* font weight */
|
|
26
|
-
if (
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
26
|
+
if (themes_1.Platform.isIOS) {
|
|
27
|
+
if (regular) {
|
|
28
|
+
textStyle.push({
|
|
29
|
+
fontWeight: '400',
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else if (bold) {
|
|
33
|
+
textStyle.push({
|
|
34
|
+
fontWeight: '700',
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
else if (medium) {
|
|
38
|
+
textStyle.push({
|
|
39
|
+
fontWeight: '500',
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else if (semibold) {
|
|
43
|
+
textStyle.push({
|
|
44
|
+
fontWeight: '600',
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
textStyle.push({
|
|
49
|
+
fontWeight: '500',
|
|
50
|
+
});
|
|
51
|
+
}
|
|
45
52
|
}
|
|
46
53
|
else {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
54
|
+
if (regular) {
|
|
55
|
+
textStyle.push({
|
|
56
|
+
fontFamily: themes_1.Platform.fontNames.regular,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
else if (bold) {
|
|
60
|
+
textStyle.push({
|
|
61
|
+
fontFamily: themes_1.Platform.fontNames.bold,
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
else if (medium) {
|
|
65
|
+
textStyle.push({
|
|
66
|
+
fontFamily: themes_1.Platform.fontNames.medium,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else if (semibold) {
|
|
70
|
+
textStyle.push({
|
|
71
|
+
fontFamily: themes_1.Platform.fontNames.medium,
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
textStyle.push({
|
|
76
|
+
fontFamily: themes_1.Platform.fontNames.medium,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
50
79
|
}
|
|
51
80
|
if (lineHeight) {
|
|
52
81
|
textStyle.push({ lineHeight: themes_1.Platform.SizeScale(lineHeight) });
|
|
@@ -11,7 +11,7 @@ const themes_1 = require("../../themes");
|
|
|
11
11
|
const ThemeProvider = ({ children, themeConfig: config }) => {
|
|
12
12
|
const isLightTheme = true;
|
|
13
13
|
const themeConfig = isLightTheme ? themes_1.DefaultTheme : themes_1.DarkTheme;
|
|
14
|
-
return (react_1.default.createElement(react_native_paper_1.
|
|
14
|
+
return (react_1.default.createElement(react_native_paper_1.PaperProvider, { theme: (config || themeConfig) },
|
|
15
15
|
react_1.default.createElement(react_native_1.StatusBar, { barStyle: "dark-content", translucent: true, backgroundColor: "transparent" }),
|
|
16
16
|
children));
|
|
17
17
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FlexAlignType, StyleProp, ViewProps, ViewStyle } from 'react-native
|
|
1
|
+
import { FlexAlignType, StyleProp, ViewProps, ViewStyle } from 'react-native';
|
|
2
2
|
import { Colors } from '../../themes';
|
|
3
3
|
export interface IViewProps extends ViewProps {
|
|
4
4
|
children?: React.ReactNode;
|
package/dist/themes/fonts.js
CHANGED
|
@@ -20,15 +20,15 @@ const fontConfig = {
|
|
|
20
20
|
},
|
|
21
21
|
ios: {
|
|
22
22
|
regular: {
|
|
23
|
-
fontFamily:
|
|
24
|
-
fontWeight: '
|
|
23
|
+
fontFamily: 'System',
|
|
24
|
+
fontWeight: '400',
|
|
25
25
|
},
|
|
26
26
|
medium: {
|
|
27
|
-
fontFamily:
|
|
28
|
-
fontWeight: '
|
|
27
|
+
fontFamily: 'System',
|
|
28
|
+
fontWeight: '500',
|
|
29
29
|
},
|
|
30
30
|
bold: {
|
|
31
|
-
fontFamily:
|
|
31
|
+
fontFamily: 'System',
|
|
32
32
|
fontWeight: '700',
|
|
33
33
|
},
|
|
34
34
|
},
|
package/dist/themes/platform.js
CHANGED
|
@@ -63,10 +63,10 @@ class PBase {
|
|
|
63
63
|
this.headerHeight = this.SizeScale(50);
|
|
64
64
|
this.version = react_native_1.Platform.Version;
|
|
65
65
|
this.fontNames = {
|
|
66
|
-
bold: 'SFProDisplay-Bold',
|
|
67
|
-
medium: 'SFProDisplay-Medium',
|
|
68
|
-
regular: 'SFProDisplay-Regular',
|
|
69
|
-
light: 'SFProDisplay-Light',
|
|
66
|
+
bold: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Bold',
|
|
67
|
+
medium: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Medium',
|
|
68
|
+
regular: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Regular',
|
|
69
|
+
light: react_native_1.Platform.OS === 'ios' ? 'System' : 'SFProDisplay-Light',
|
|
70
70
|
};
|
|
71
71
|
this.textBase = {
|
|
72
72
|
fontSize: this.SizeScale(),
|