@janiscommerce/ui-native 1.13.3 → 1.14.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/dist/components/atoms/Collapsible/index.d.ts +19 -0
- package/dist/components/atoms/Collapsible/index.js +63 -0
- package/dist/components/atoms/Typography/index.d.ts +2 -1
- package/dist/components/atoms/Typography/index.js +2 -2
- package/dist/components/atoms/Typography/utils/getStyleByTypography/index.d.ts +2 -11
- package/dist/components/atoms/Typography/utils/getStyleByTypography/index.js +15 -50
- package/dist/components/molecules/Button/utils/getButtonStyles/utils/styleConfigs/index.js +9 -9
- package/dist/components/molecules/Input/index.d.ts +1 -0
- package/dist/components/molecules/Input/index.js +27 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/theme/typography.d.ts +6 -4
- package/dist/theme/typography.js +80 -15
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewStyle } from 'react-native';
|
|
3
|
+
interface CollapsibleProps<HeaderProps = {}, ContentProps = {}> {
|
|
4
|
+
header: React.ComponentType<HeaderProps>;
|
|
5
|
+
content: React.ComponentType<ContentProps & {
|
|
6
|
+
index: number;
|
|
7
|
+
}>;
|
|
8
|
+
data?: Record<string, any>[];
|
|
9
|
+
pressableComponent?: React.ComponentType;
|
|
10
|
+
duration?: number;
|
|
11
|
+
onPressCallback?: null | (() => void);
|
|
12
|
+
wrapperStyle?: ViewStyle;
|
|
13
|
+
}
|
|
14
|
+
declare const Collapsible: React.FC<CollapsibleProps<{
|
|
15
|
+
isOpen: boolean;
|
|
16
|
+
}, {
|
|
17
|
+
isOpen?: boolean;
|
|
18
|
+
}>>;
|
|
19
|
+
export default Collapsible;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import List from '../List';
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { StyleSheet, View, Pressable } from 'react-native';
|
|
4
|
+
import Animated, { useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
5
|
+
const Collapsible = ({ header: Header, content: Content, data = [], onPressCallback = null, pressableComponent: PressableComponent = Pressable, duration = 500, wrapperStyle = {}, }) => {
|
|
6
|
+
const isOpen = useSharedValue(false);
|
|
7
|
+
const [measuredHeight, setMeasuredHeight] = useState(0);
|
|
8
|
+
const contentHeight = useSharedValue(0);
|
|
9
|
+
const hasHeightBeenMeasured = !!measuredHeight;
|
|
10
|
+
const handleOpen = () => {
|
|
11
|
+
// istanbul ignore next
|
|
12
|
+
if (!isOpen.value && measuredHeight > 0) {
|
|
13
|
+
contentHeight.value = measuredHeight;
|
|
14
|
+
}
|
|
15
|
+
isOpen.value = !isOpen.value;
|
|
16
|
+
if (onPressCallback) {
|
|
17
|
+
onPressCallback();
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const handleContentLayout = (e) => {
|
|
21
|
+
// istanbul ignore next
|
|
22
|
+
if (measuredHeight === 0) {
|
|
23
|
+
const newHeight = e.nativeEvent.layout.height;
|
|
24
|
+
setMeasuredHeight(newHeight);
|
|
25
|
+
contentHeight.value = newHeight;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
// istanbul ignore next
|
|
29
|
+
const bodyStyle = useAnimatedStyle(() => ({
|
|
30
|
+
maxHeight: withTiming(isOpen.value ? contentHeight.value : 0, { duration }),
|
|
31
|
+
overflow: 'hidden',
|
|
32
|
+
}));
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
wrapperView: {
|
|
35
|
+
flex: 1,
|
|
36
|
+
width: '100%',
|
|
37
|
+
},
|
|
38
|
+
animatedView: {
|
|
39
|
+
overflow: 'hidden',
|
|
40
|
+
width: '100%',
|
|
41
|
+
},
|
|
42
|
+
contentWrapper: {
|
|
43
|
+
position: 'absolute',
|
|
44
|
+
opacity: 0,
|
|
45
|
+
},
|
|
46
|
+
});
|
|
47
|
+
const renderContent = (contentData) => {
|
|
48
|
+
const { item, index } = contentData;
|
|
49
|
+
return <Content {...item} index={index} isOpen={isOpen}/>;
|
|
50
|
+
};
|
|
51
|
+
return (<View style={[wrapperStyle, styles.wrapperView]}>
|
|
52
|
+
<PressableComponent onPress={handleOpen}>
|
|
53
|
+
<Header isOpen={isOpen.value}/>
|
|
54
|
+
</PressableComponent>
|
|
55
|
+
{!hasHeightBeenMeasured && (<View style={styles.contentWrapper} onLayout={handleContentLayout}>
|
|
56
|
+
<List data={data} renderComponent={renderContent} keyExtractor={(_, index) => String(index)} showsVerticalScrollIndicator={false}/>
|
|
57
|
+
</View>)}
|
|
58
|
+
<Animated.View style={[styles.animatedView, bodyStyle]}>
|
|
59
|
+
<List data={data} renderComponent={renderContent} keyExtractor={(_, index) => String(index)} showsVerticalScrollIndicator={false}/>
|
|
60
|
+
</Animated.View>
|
|
61
|
+
</View>);
|
|
62
|
+
};
|
|
63
|
+
export default Collapsible;
|
|
@@ -7,6 +7,7 @@ interface TypographyProps extends TextProps {
|
|
|
7
7
|
style?: StyleProp<TextStyle>;
|
|
8
8
|
type?: TypographyType;
|
|
9
9
|
size?: TypographySize;
|
|
10
|
+
color?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const Typography: ({ children, style, type, size, ...props }: TypographyProps) => React.JSX.Element | null;
|
|
12
|
+
declare const Typography: ({ children, style, type, size, color, ...props }: TypographyProps) => React.JSX.Element | null;
|
|
12
13
|
export default Typography;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Text } from 'react-native';
|
|
3
3
|
import getStyleByTypography from './utils/getStyleByTypography';
|
|
4
|
-
const Typography = ({ children, style, type, size, ...props }) => {
|
|
4
|
+
const Typography = ({ children, style, type, size, color, ...props }) => {
|
|
5
5
|
if (!children) {
|
|
6
6
|
return null;
|
|
7
7
|
}
|
|
8
|
-
const typographyStyles = getStyleByTypography(type, size);
|
|
8
|
+
const typographyStyles = getStyleByTypography(type, size, color);
|
|
9
9
|
return (<Text style={[style, typographyStyles.typography]} {...props}>
|
|
10
10
|
{children}
|
|
11
11
|
</Text>);
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import { TextStyle } from 'react-native';
|
|
2
|
-
import { Typography } from '../../../../../theme/typography';
|
|
2
|
+
import typography, { Typography } from '../../../../../theme/typography';
|
|
3
3
|
type TypographyType = keyof Typography;
|
|
4
4
|
type TypographySize = 'large' | 'medium' | 'small';
|
|
5
|
-
|
|
5
|
+
declare const getStyleByTypography: (type?: TypographyType | string, size?: TypographySize | string, color?: string) => {
|
|
6
6
|
typography: TextStyle;
|
|
7
7
|
};
|
|
8
|
-
declare const getStyleByTypography: (type: TypographyType | string, size: TypographySize | string) => {
|
|
9
|
-
typography: TextStyle;
|
|
10
|
-
} | {
|
|
11
|
-
typography: {
|
|
12
|
-
fontWeight: "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
13
|
-
fontSize: number;
|
|
14
|
-
lineHeight: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
8
|
export default getStyleByTypography;
|
|
@@ -1,54 +1,19 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
import typography from '../../../../../theme/typography';
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
const typographySize = size;
|
|
19
|
-
if (typographyType === 'display') {
|
|
20
|
-
return StyleSheet.create({
|
|
21
|
-
typography: {
|
|
22
|
-
fontWeight: typography.display.weight,
|
|
23
|
-
fontSize: typography.display.size,
|
|
24
|
-
lineHeight: typography.display.lineHeight,
|
|
25
|
-
},
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
if (typographyType === 'overline' && typographySize === 'medium') {
|
|
29
|
-
return StyleSheet.create({
|
|
30
|
-
typography: {
|
|
31
|
-
fontWeight: typography.overline.large.weight,
|
|
32
|
-
fontSize: typography.overline.large.size,
|
|
33
|
-
lineHeight: typography.overline.large.lineHeight,
|
|
34
|
-
letterSpacing: typography.overline.large.spacing,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
const typographyObject = typography[typographyType];
|
|
39
|
-
// istanbul ignore next
|
|
40
|
-
if (typographyObject && typographySize in typographyObject) {
|
|
41
|
-
const typographyStyle = typographyObject[typographySize];
|
|
42
|
-
return StyleSheet.create({
|
|
43
|
-
typography: {
|
|
44
|
-
fontWeight: typographyStyle.weight,
|
|
45
|
-
fontSize: typographyStyle.size,
|
|
46
|
-
lineHeight: typographyStyle.lineHeight,
|
|
47
|
-
letterSpacing: typographyStyle.spacing,
|
|
48
|
-
},
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
// istanbul ignore next
|
|
52
|
-
return defaultStyles;
|
|
3
|
+
const getStyleByTypography = (type = 'body', size = 'medium', color) => {
|
|
4
|
+
const validType = Object.keys(typography).includes(type)
|
|
5
|
+
? type
|
|
6
|
+
: 'body';
|
|
7
|
+
const typographyCategory = typography[validType];
|
|
8
|
+
const validSize = Object.keys(typographyCategory).includes(size)
|
|
9
|
+
? size
|
|
10
|
+
: 'medium';
|
|
11
|
+
const typographyStyle = typographyCategory[validSize];
|
|
12
|
+
return StyleSheet.create({
|
|
13
|
+
typography: {
|
|
14
|
+
...typographyStyle,
|
|
15
|
+
...(color && { color }),
|
|
16
|
+
},
|
|
17
|
+
});
|
|
53
18
|
};
|
|
54
19
|
export default getStyleByTypography;
|
|
@@ -53,31 +53,31 @@ export const colorConfig = (selectedColor) => {
|
|
|
53
53
|
disabled: {
|
|
54
54
|
background: {
|
|
55
55
|
contained: grey[200],
|
|
56
|
-
outlined:
|
|
56
|
+
outlined: base.white,
|
|
57
57
|
text: 'transparent',
|
|
58
58
|
},
|
|
59
59
|
border: {
|
|
60
60
|
main: {
|
|
61
61
|
contained: 'transparent',
|
|
62
|
-
outlined:
|
|
62
|
+
outlined: grey[200],
|
|
63
63
|
text: 'transparent',
|
|
64
64
|
},
|
|
65
65
|
secondary: {
|
|
66
66
|
contained: 'transparent',
|
|
67
|
-
outlined: grey[
|
|
67
|
+
outlined: grey[200],
|
|
68
68
|
text: 'transparent',
|
|
69
69
|
},
|
|
70
70
|
},
|
|
71
71
|
text: {
|
|
72
72
|
main: {
|
|
73
|
-
contained:
|
|
74
|
-
outlined: grey[
|
|
75
|
-
text: grey[
|
|
73
|
+
contained: base.white,
|
|
74
|
+
outlined: grey[200],
|
|
75
|
+
text: grey[200],
|
|
76
76
|
},
|
|
77
77
|
secondary: {
|
|
78
|
-
contained:
|
|
79
|
-
outlined: grey[
|
|
80
|
-
text: grey[
|
|
78
|
+
contained: base.white,
|
|
79
|
+
outlined: grey[200],
|
|
80
|
+
text: grey[200],
|
|
81
81
|
},
|
|
82
82
|
},
|
|
83
83
|
},
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { forwardRef, useState, useRef } from 'react';
|
|
2
|
-
import { StyleSheet, View, TouchableWithoutFeedback, Keyboard } from 'react-native';
|
|
2
|
+
import { StyleSheet, View, TouchableWithoutFeedback, Keyboard, Platform, } from 'react-native';
|
|
3
3
|
import BaseInput from '../../atoms/BaseInput';
|
|
4
4
|
import { palette } from '../../../theme/palette';
|
|
5
5
|
import { moderateScale, scaledForDevice } from '../../../scale';
|
|
6
6
|
import handleChangeText from './utils/handleChangeText';
|
|
7
7
|
import Typography from '../../atoms/Typography';
|
|
8
|
+
const isWeb = Platform.OS === 'web';
|
|
8
9
|
var InputType;
|
|
9
10
|
(function (InputType) {
|
|
10
11
|
InputType["currency"] = "numeric";
|
|
@@ -17,8 +18,9 @@ var InputType;
|
|
|
17
18
|
InputType["amountTotal"] = "numeric";
|
|
18
19
|
InputType["numeric"] = "numeric";
|
|
19
20
|
})(InputType || (InputType = {}));
|
|
20
|
-
const Input = forwardRef(({ style, type, variant = 'default', totalValue, onChangeText, ...props }, ref) => {
|
|
21
|
+
const Input = forwardRef(({ style, type, variant = 'default', totalValue, placeholder, onChangeText, ...props }, ref) => {
|
|
21
22
|
const [value, setValue] = useState('');
|
|
23
|
+
const isPlaceholderBeingShown = !value;
|
|
22
24
|
const isAmountTotalVariant = variant === 'amountTotal';
|
|
23
25
|
const internalRef = useRef(null);
|
|
24
26
|
const inputRef = ref ?? internalRef;
|
|
@@ -36,14 +38,26 @@ const Input = forwardRef(({ style, type, variant = 'default', totalValue, onChan
|
|
|
36
38
|
justifyContent: 'center',
|
|
37
39
|
alignItems: 'center',
|
|
38
40
|
flexDirection: 'row',
|
|
41
|
+
position: 'relative',
|
|
39
42
|
},
|
|
40
43
|
input: {
|
|
41
44
|
color: palette.black.main,
|
|
42
45
|
fontSize: scaledForDevice(42, moderateScale),
|
|
46
|
+
height: '100%',
|
|
47
|
+
textAlign: 'center',
|
|
48
|
+
textAlignVertical: 'center',
|
|
49
|
+
includeFontPadding: false,
|
|
50
|
+
paddingVertical: 0,
|
|
51
|
+
...(isPlaceholderBeingShown && { marginLeft: scaledForDevice(-12, moderateScale) }),
|
|
52
|
+
...(isWeb && { flex: 1, maxWidth: isPlaceholderBeingShown ? '1%' : undefined }),
|
|
43
53
|
},
|
|
44
54
|
totalValue: {
|
|
45
55
|
color: palette.primary.main,
|
|
46
56
|
},
|
|
57
|
+
placeholder: {
|
|
58
|
+
color: '#A8AAAC',
|
|
59
|
+
marginLeft: scaledForDevice(-12, moderateScale),
|
|
60
|
+
},
|
|
47
61
|
});
|
|
48
62
|
const changeTextCb = (text) => {
|
|
49
63
|
const transformedText = handleChangeText(text, variant);
|
|
@@ -68,10 +82,19 @@ const Input = forwardRef(({ style, type, variant = 'default', totalValue, onChan
|
|
|
68
82
|
}
|
|
69
83
|
return InputType.default;
|
|
70
84
|
})();
|
|
85
|
+
const renderPlaceholder = () => {
|
|
86
|
+
if (value.length > 0) {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
return (<Typography type="display" style={styles.placeholder}>
|
|
90
|
+
{placeholder}
|
|
91
|
+
</Typography>);
|
|
92
|
+
};
|
|
71
93
|
return (<TouchableWithoutFeedback onPress={handlePress}>
|
|
72
94
|
<View style={styles.container}>
|
|
73
|
-
<BaseInput style={[styles.input, style]} ref={inputRef} value={value} keyboardType={resolvedKeyboardType} onChangeText={changeTextCb} {...props}/>
|
|
74
|
-
{
|
|
95
|
+
<BaseInput testID="input" style={[styles.input, style].filter(Boolean)} ref={inputRef} value={value} keyboardType={resolvedKeyboardType} onChangeText={changeTextCb} {...props}/>
|
|
96
|
+
{renderPlaceholder()}
|
|
97
|
+
{isAmountTotalVariant && (<Typography style={styles.totalValue} type="display">
|
|
75
98
|
{`/${totalValue?.toString()}`}
|
|
76
99
|
</Typography>)}
|
|
77
100
|
</View>
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { SwipeUpFlatList, SwipeUpScrollView, SwipeUpView } from './components/at
|
|
|
12
12
|
import Text from './components/atoms/Text';
|
|
13
13
|
import BaseInput from './components/atoms/BaseInput';
|
|
14
14
|
import Typography from './components/atoms/Typography';
|
|
15
|
+
import Collapsible from './components/atoms/Collapsible';
|
|
15
16
|
import Avatar from './components/molecules/Avatar';
|
|
16
17
|
import Button from './components/molecules/Button';
|
|
17
18
|
import Carousel from './components/molecules/Carousel';
|
|
@@ -29,4 +30,4 @@ import FullScreenMessage from './components/organisms/FullScreenMessage';
|
|
|
29
30
|
import SwipeItemSelectionList from './components/organisms/SwipeItemSelectionList';
|
|
30
31
|
import { palette } from './theme/palette';
|
|
31
32
|
import * as getScale from './scale';
|
|
32
|
-
export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, };
|
|
33
|
+
export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, Collapsible, };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ import { SwipeUpFlatList, SwipeUpScrollView, SwipeUpView } from './components/at
|
|
|
13
13
|
import Text from './components/atoms/Text';
|
|
14
14
|
import BaseInput from './components/atoms/BaseInput';
|
|
15
15
|
import Typography from './components/atoms/Typography';
|
|
16
|
+
import Collapsible from './components/atoms/Collapsible';
|
|
16
17
|
// Molecules
|
|
17
18
|
import Avatar from './components/molecules/Avatar';
|
|
18
19
|
import Button from './components/molecules/Button';
|
|
@@ -33,4 +34,4 @@ import SwipeItemSelectionList from './components/organisms/SwipeItemSelectionLis
|
|
|
33
34
|
// Misc
|
|
34
35
|
import { palette } from './theme/palette';
|
|
35
36
|
import * as getScale from './scale';
|
|
36
|
-
export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, };
|
|
37
|
+
export { Text, Avatar, CheckBox, Icon, Image, Input, Loading, Svg, StatusChip, palette, LoadingFullScreen, RadioButton, Select, SwipeUp, SwipeUpFlatList, SwipeUpScrollView, SwipeUpView, Carousel, ProgressBar, List, BaseButton, Button, getScale, LayoutWithBottomButtons, FullScreenMessage, Toast, configToast, SwipeList, ItemSelectionButton, SwipeItemSelectionList, MainCardList, BaseInput, Typography, Collapsible, };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export type TypographyItem = {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
fontWeight: '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900';
|
|
3
|
+
fontSize: number;
|
|
4
4
|
lineHeight: number;
|
|
5
|
-
|
|
5
|
+
letterSpacing?: number;
|
|
6
6
|
};
|
|
7
7
|
export type Typography = {
|
|
8
|
-
display:
|
|
8
|
+
display: {
|
|
9
|
+
medium: TypographyItem;
|
|
10
|
+
};
|
|
9
11
|
heading: {
|
|
10
12
|
large: TypographyItem;
|
|
11
13
|
medium: TypographyItem;
|
package/dist/theme/typography.js
CHANGED
|
@@ -1,29 +1,94 @@
|
|
|
1
1
|
import { moderateScale, scaledForDevice } from '../scale';
|
|
2
|
+
const scaleSize = (size) => scaledForDevice(size, moderateScale);
|
|
2
3
|
const typography = {
|
|
3
|
-
display: {
|
|
4
|
+
display: {
|
|
5
|
+
medium: {
|
|
6
|
+
fontSize: scaleSize(42),
|
|
7
|
+
fontWeight: '400',
|
|
8
|
+
lineHeight: 50,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
4
11
|
heading: {
|
|
5
|
-
large: {
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
large: {
|
|
13
|
+
fontSize: scaleSize(34),
|
|
14
|
+
fontWeight: '500',
|
|
15
|
+
lineHeight: 40,
|
|
16
|
+
},
|
|
17
|
+
medium: {
|
|
18
|
+
fontSize: scaleSize(26),
|
|
19
|
+
fontWeight: '500',
|
|
20
|
+
lineHeight: 32,
|
|
21
|
+
},
|
|
22
|
+
small: {
|
|
23
|
+
fontSize: scaleSize(24),
|
|
24
|
+
fontWeight: '400',
|
|
25
|
+
lineHeight: 28,
|
|
26
|
+
},
|
|
8
27
|
},
|
|
9
28
|
title: {
|
|
10
|
-
large: {
|
|
11
|
-
|
|
12
|
-
|
|
29
|
+
large: {
|
|
30
|
+
fontSize: scaleSize(20),
|
|
31
|
+
fontWeight: '400',
|
|
32
|
+
lineHeight: 24,
|
|
33
|
+
},
|
|
34
|
+
medium: {
|
|
35
|
+
fontSize: scaleSize(18),
|
|
36
|
+
fontWeight: '700',
|
|
37
|
+
lineHeight: 22,
|
|
38
|
+
},
|
|
39
|
+
small: {
|
|
40
|
+
fontSize: scaleSize(14),
|
|
41
|
+
fontWeight: '700',
|
|
42
|
+
lineHeight: 16,
|
|
43
|
+
},
|
|
13
44
|
},
|
|
14
45
|
label: {
|
|
15
|
-
large: {
|
|
16
|
-
|
|
17
|
-
|
|
46
|
+
large: {
|
|
47
|
+
fontSize: scaleSize(16),
|
|
48
|
+
fontWeight: '500',
|
|
49
|
+
lineHeight: 18,
|
|
50
|
+
},
|
|
51
|
+
medium: {
|
|
52
|
+
fontSize: scaleSize(14),
|
|
53
|
+
fontWeight: '500',
|
|
54
|
+
lineHeight: 16,
|
|
55
|
+
},
|
|
56
|
+
small: {
|
|
57
|
+
fontSize: scaleSize(12),
|
|
58
|
+
fontWeight: '500',
|
|
59
|
+
lineHeight: 14,
|
|
60
|
+
},
|
|
18
61
|
},
|
|
19
62
|
body: {
|
|
20
|
-
large: {
|
|
21
|
-
|
|
22
|
-
|
|
63
|
+
large: {
|
|
64
|
+
fontSize: scaleSize(16),
|
|
65
|
+
fontWeight: '400',
|
|
66
|
+
lineHeight: 20,
|
|
67
|
+
},
|
|
68
|
+
medium: {
|
|
69
|
+
fontSize: scaleSize(14),
|
|
70
|
+
fontWeight: '400',
|
|
71
|
+
lineHeight: 18,
|
|
72
|
+
},
|
|
73
|
+
small: {
|
|
74
|
+
fontSize: scaleSize(12),
|
|
75
|
+
fontWeight: '400',
|
|
76
|
+
lineHeight: 16,
|
|
77
|
+
},
|
|
23
78
|
},
|
|
24
79
|
overline: {
|
|
25
|
-
large: {
|
|
26
|
-
|
|
80
|
+
large: {
|
|
81
|
+
fontSize: scaleSize(14),
|
|
82
|
+
fontWeight: '500',
|
|
83
|
+
lineHeight: 16,
|
|
84
|
+
letterSpacing: 1,
|
|
85
|
+
},
|
|
86
|
+
small: {
|
|
87
|
+
fontSize: scaleSize(12),
|
|
88
|
+
fontWeight: '500',
|
|
89
|
+
lineHeight: 14,
|
|
90
|
+
letterSpacing: 0.7,
|
|
91
|
+
},
|
|
27
92
|
},
|
|
28
93
|
};
|
|
29
94
|
export default typography;
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED