@cdek-it/react-native-ui-kit 1.0.0-beta.3 → 1.0.0-beta.4
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 +6 -7
- package/dist/components/Button/utils/ButtonContainer.js +9 -0
- 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 +9 -9
- 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/>–
|
|
41
|
+
| `primary` | – regular<br/>– demibold<br/>– demibold italic | TT Fellows | PT Sans |
|
|
42
|
+
| `secondary` | – regular<br/>– bold | PT Sans | — |
|
|
43
43
|
|
|
44
44
|
Исходники шрифтов не поставляются вместе с пакетом, их требуется подключать
|
|
45
45
|
отдельно. После подключения шрифтов в проект, необходимо указать их в
|
|
@@ -84,11 +84,10 @@ UI kit использует следующие виды шрифтов.
|
|
|
84
84
|
],
|
|
85
85
|
},
|
|
86
86
|
{
|
|
87
|
-
fontFamily: '
|
|
87
|
+
fontFamily: 'PT Sans',
|
|
88
88
|
fontDefinitions: [
|
|
89
|
-
{ path: './assets/
|
|
90
|
-
{ path: './assets/
|
|
91
|
-
{ path: './assets/NotoSans-Regular.ttf', weight: 400 },
|
|
89
|
+
{ path: './assets/fonts/PTSans-Bold.ttf', weight: 700 },
|
|
90
|
+
{ path: './assets/fonts/PTSans-Regular.ttf', weight: 400 },
|
|
92
91
|
],
|
|
93
92
|
},
|
|
94
93
|
],
|
|
@@ -131,7 +130,7 @@ UI kit использует следующие виды шрифтов.
|
|
|
131
130
|
|
|
132
131
|
//подключение шрифтов
|
|
133
132
|
ReactFontManager.getInstance().addCustomFont(this, "TT Fellows", R.font.xml_tt_fellows)
|
|
134
|
-
ReactFontManager.getInstance().addCustomFont(this, "
|
|
133
|
+
ReactFontManager.getInstance().addCustomFont(this, "PT Sans", R.font.xml_pt_sans)
|
|
135
134
|
|
|
136
135
|
// остальной код...
|
|
137
136
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable max-lines, max-lines-per-function */
|
|
1
2
|
import { useContext } from 'react';
|
|
2
3
|
import { Pressable } from 'react-native';
|
|
3
4
|
import { StyleSheet } from 'react-native-unistyles';
|
|
@@ -160,6 +161,14 @@ const buttonContainerStyles = StyleSheet.create(({ theme, border, spacing, sizin
|
|
|
160
161
|
backgroundColor: theme.Button.Text.textButtonHoverBg,
|
|
161
162
|
},
|
|
162
163
|
},
|
|
164
|
+
{
|
|
165
|
+
variant: 'link',
|
|
166
|
+
disabled: 'true',
|
|
167
|
+
styles: {
|
|
168
|
+
borderColor: theme.Button.Brand.buttonBorderColor,
|
|
169
|
+
backgroundColor: theme.Button.Text.textButtonBg,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
163
172
|
// severity container (override placeholder variant styles)
|
|
164
173
|
{
|
|
165
174
|
variant: 'basic',
|
|
@@ -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-sm'],
|
|
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-lg'],
|
|
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-base'] },
|
|
28
|
+
paragraph: { fontSize: typography.Size['text-lg'] },
|
|
29
|
+
paragraphBase: { fontSize: typography.Size['text-base'] },
|
|
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-sm'],
|
|
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: 700,
|
|
13
13
|
textTransform: 'uppercase',
|
|
14
14
|
fontFamily: fonts.primary,
|
|
15
15
|
},
|
|
@@ -9,13 +9,13 @@ const styles = StyleSheet.create(({ theme, typography, fonts }) => ({
|
|
|
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-6xl'] },
|
|
13
|
+
d2: { fontSize: typography.Size['text-5xl'] },
|
|
14
|
+
d3: { fontSize: typography.Size['text-4xl'] },
|
|
15
|
+
h1: { fontSize: typography.Size['text-3xl'] },
|
|
16
|
+
h2: { fontSize: typography.Size['text-2xl'] },
|
|
17
|
+
h3: { fontSize: typography.Size['text-xl'] },
|
|
18
|
+
h4: { fontSize: typography.Size['text-lg'] },
|
|
19
|
+
h5: { fontSize: typography.Size['text-base'] },
|
|
20
|
+
h6: { fontSize: typography.Size['text-sm'] },
|
|
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: 'PT 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: 'PT Sans' },
|
|
10
10
|
};
|
package/package.json
CHANGED