@cdek-it/react-native-ui-kit 1.0.0-beta.1 → 1.0.0-beta.2
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/README.md +7 -6
- package/dist/components/Typography/Anchor.js +1 -1
- package/dist/components/Typography/Body.js +4 -4
- package/dist/components/Typography/Caption.js +1 -1
- package/dist/components/Typography/Subtitle.js +1 -1
- package/dist/components/Typography/Title.js +10 -10
- package/dist/theme/darkTheme.js +1 -1
- package/dist/theme/lightTheme.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,8 +38,8 @@ UI kit использует следующие виды шрифтов.
|
|
|
38
38
|
|
|
39
39
|
| Тип шрифта | Используемые начертания | Рекомендуемый шрифт | Рекомендуемый аналог |
|
|
40
40
|
| ----------- | ---------------------------------------------- | ------------------- | -------------------- |
|
|
41
|
-
| `primary` | – regular<br/>– demibold<br/>– demibold italic | TT Fellows |
|
|
42
|
-
| `secondary` | – regular<br/>– bold
|
|
41
|
+
| `primary` | – regular<br/>– demibold<br/>– demibold italic | TT Fellows | Noto Sans |
|
|
42
|
+
| `secondary` | – regular<br/>– medium<br/>– bold | Noto Sans | — |
|
|
43
43
|
|
|
44
44
|
Исходники шрифтов не поставляются вместе с пакетом, их требуется подключать
|
|
45
45
|
отдельно. После подключения шрифтов в проект, необходимо указать их в
|
|
@@ -84,10 +84,11 @@ UI kit использует следующие виды шрифтов.
|
|
|
84
84
|
],
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
fontFamily: '
|
|
87
|
+
fontFamily: 'Noto Sans',
|
|
88
88
|
fontDefinitions: [
|
|
89
|
-
{ path: './assets/
|
|
90
|
-
{ path: './assets/
|
|
89
|
+
{ path: './assets/NotoSans-Bold.ttf', weight: 700 },
|
|
90
|
+
{ path: './assets/NotoSans-Medium.ttf', weight: 500 },
|
|
91
|
+
{ path: './assets/NotoSans-Regular.ttf', weight: 400 },
|
|
91
92
|
],
|
|
92
93
|
},
|
|
93
94
|
],
|
|
@@ -130,7 +131,7 @@ UI kit использует следующие виды шрифтов.
|
|
|
130
131
|
|
|
131
132
|
//подключение шрифтов
|
|
132
133
|
ReactFontManager.getInstance().addCustomFont(this, "TT Fellows", R.font.xml_tt_fellows)
|
|
133
|
-
ReactFontManager.getInstance().addCustomFont(this, "
|
|
134
|
+
ReactFontManager.getInstance().addCustomFont(this, "Noto Sans", R.font.xml_noto_sans)
|
|
134
135
|
|
|
135
136
|
// остальной код...
|
|
136
137
|
}
|
|
@@ -49,7 +49,7 @@ const styles = StyleSheet.create(({ spacing, typography, fonts }) => ({
|
|
|
49
49
|
container: { flexDirection: 'row', alignItems: 'center' },
|
|
50
50
|
text: {
|
|
51
51
|
flexShrink: 1,
|
|
52
|
-
fontSize: typography.Size['text-
|
|
52
|
+
fontSize: typography.Size['text-xs'],
|
|
53
53
|
includeFontPadding: false,
|
|
54
54
|
verticalAlign: 'middle',
|
|
55
55
|
color: typography.Color.Service['text-info'],
|
|
@@ -13,7 +13,7 @@ export const Body = ({ base, color = 'default', disabled, paragraph, weight = 'r
|
|
|
13
13
|
};
|
|
14
14
|
const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
|
|
15
15
|
text: {
|
|
16
|
-
fontSize: typography.Size['text-
|
|
16
|
+
fontSize: typography.Size['text-base'],
|
|
17
17
|
includeFontPadding: false,
|
|
18
18
|
verticalAlign: 'middle',
|
|
19
19
|
fontFamily: fonts.secondary,
|
|
@@ -24,8 +24,8 @@ const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
|
|
|
24
24
|
default: { color: theme.General.textColor },
|
|
25
25
|
primary: { color: theme.General.primaryColor },
|
|
26
26
|
secondary: { color: theme.General.textSecondaryColor },
|
|
27
|
-
base: { fontSize: typography.Size['text-
|
|
28
|
-
paragraph: {
|
|
29
|
-
paragraphBase: {
|
|
27
|
+
base: { fontSize: typography.Size['text-sm'] },
|
|
28
|
+
paragraph: { lineHeight: 24 },
|
|
29
|
+
paragraphBase: { lineHeight: 21 },
|
|
30
30
|
disabled: { opacity: 0.6 },
|
|
31
31
|
}));
|
|
@@ -26,7 +26,7 @@ export const Caption = ({ color = 'default', disabled, style, Icon, ...other })
|
|
|
26
26
|
const CaptionTestId = { text: 'CaptionText', icon: 'CaptionIcon' };
|
|
27
27
|
const styles = StyleSheet.create(({ theme, spacing, typography, fonts }) => ({
|
|
28
28
|
text: {
|
|
29
|
-
fontSize: typography.Size['text-
|
|
29
|
+
fontSize: typography.Size['text-xs'],
|
|
30
30
|
includeFontPadding: false,
|
|
31
31
|
verticalAlign: 'middle',
|
|
32
32
|
fontFamily: fonts.primary,
|
|
@@ -9,7 +9,7 @@ export const Subtitle = memo(({ base = false, color = 'default', style, ...other
|
|
|
9
9
|
const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
|
|
10
10
|
text: {
|
|
11
11
|
fontSize: typography.Size['text-sm'],
|
|
12
|
-
fontWeight:
|
|
12
|
+
fontWeight: 500,
|
|
13
13
|
textTransform: 'uppercase',
|
|
14
14
|
fontFamily: fonts.primary,
|
|
15
15
|
},
|
|
@@ -3,19 +3,19 @@ import { StyleSheet } from 'react-native-unistyles';
|
|
|
3
3
|
export const Title = ({ level, style, ...other }) => (<Text style={[styles.text, styles[level], style]} testID='Title' {...other}/>);
|
|
4
4
|
const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
|
|
5
5
|
text: {
|
|
6
|
-
color: theme.General.
|
|
6
|
+
color: theme.General.secondaryColor,
|
|
7
7
|
fontFamily: fonts.primary,
|
|
8
8
|
fontWeight: 700,
|
|
9
9
|
includeFontPadding: false,
|
|
10
10
|
verticalAlign: 'middle',
|
|
11
11
|
},
|
|
12
|
-
d1: { fontSize: typography.Size['text-
|
|
13
|
-
d2: { fontSize: typography.Size['text-
|
|
14
|
-
d3: { fontSize: typography.Size['text-
|
|
15
|
-
h1: { fontSize: typography.Size['text-
|
|
16
|
-
h2: { fontSize: typography.Size['text-
|
|
17
|
-
h3: { fontSize: typography.Size['text-
|
|
18
|
-
h4: { fontSize: typography.Size['text-
|
|
19
|
-
h5: { fontSize: typography.Size['text-
|
|
20
|
-
h6: { fontSize: typography.Size['text-
|
|
12
|
+
d1: { fontSize: typography.Size['text-5xl'] },
|
|
13
|
+
d2: { fontSize: typography.Size['text-4xl'] },
|
|
14
|
+
d3: { fontSize: typography.Size['text-3xl'] },
|
|
15
|
+
h1: { fontSize: typography.Size['text-2xl'] },
|
|
16
|
+
h2: { fontSize: typography.Size['text-xl'] },
|
|
17
|
+
h3: { fontSize: typography.Size['text-lg'] },
|
|
18
|
+
h4: { fontSize: typography.Size['text-base'] },
|
|
19
|
+
h5: { fontSize: typography.Size['text-sm'] },
|
|
20
|
+
h6: { fontSize: typography.Size['text-xs'], lineHeight: 12 },
|
|
21
21
|
}));
|
package/dist/theme/darkTheme.js
CHANGED
|
@@ -6,5 +6,5 @@ import { commonTheme } from './commonTheme';
|
|
|
6
6
|
export const darkTheme = {
|
|
7
7
|
theme: { ...darkThemeAssets, InputSize, ModalSize, custom: customDark },
|
|
8
8
|
...commonTheme,
|
|
9
|
-
fonts: { primary: 'TT Fellows', secondary: '
|
|
9
|
+
fonts: { primary: 'TT Fellows', secondary: 'Noto Sans' },
|
|
10
10
|
};
|
package/dist/theme/lightTheme.js
CHANGED
|
@@ -6,5 +6,5 @@ import { commonTheme } from './commonTheme';
|
|
|
6
6
|
export const lightTheme = {
|
|
7
7
|
theme: { ...lightThemeAssets, InputSize, ModalSize, custom: customLight },
|
|
8
8
|
...commonTheme,
|
|
9
|
-
fonts: { primary: 'TT Fellows', secondary: '
|
|
9
|
+
fonts: { primary: 'TT Fellows', secondary: 'Noto Sans' },
|
|
10
10
|
};
|
package/package.json
CHANGED