@pagopa/io-app-design-system 2.0.2 → 2.1.0-0
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/lib/commonjs/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
- package/lib/commonjs/components/badge/Badge.js +2 -2
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/lib/commonjs/components/buttons/ButtonLink.js +2 -2
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +2 -2
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
- package/lib/commonjs/components/layout/HeaderSecondLevel.js +2 -2
- package/lib/commonjs/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +3 -3
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +7 -4
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +37 -37
- package/lib/commonjs/components/modules/ModuleAttachment.js +2 -1
- package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js +2 -1
- package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleIDP.js +2 -2
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js +2 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +3 -2
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +2 -2
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +10 -3
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +2 -2
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/Caption.js +1 -1
- package/lib/commonjs/components/typography/Caption.js.map +1 -1
- package/lib/commonjs/components/typography/Chip.js +1 -1
- package/lib/commonjs/components/typography/Chip.js.map +1 -1
- package/lib/commonjs/components/typography/H1.js +4 -6
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +2 -2
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +2 -2
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +2 -2
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +9 -2
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +4 -6
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +2 -2
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/Label.js +10 -2
- package/lib/commonjs/components/typography/Label.js.map +1 -1
- package/lib/commonjs/components/typography/LabelMini.js +10 -2
- package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
- package/lib/commonjs/components/typography/LabelSmall.js +10 -2
- package/lib/commonjs/components/typography/LabelSmall.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +6 -6
- package/lib/commonjs/components/typography/index.js +0 -11
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH1.js +2 -2
- package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH2.js +3 -5
- package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH3.js +2 -2
- package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/commonjs/core/IOColors.js +3 -1
- package/lib/commonjs/core/IOColors.js.map +1 -1
- package/lib/commonjs/utils/fonts.js +10 -8
- package/lib/commonjs/utils/fonts.js.map +1 -1
- package/lib/module/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
- package/lib/module/components/badge/Badge.js +2 -2
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/lib/module/components/buttons/ButtonLink.js +2 -2
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +2 -2
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
- package/lib/module/components/layout/HeaderSecondLevel.js +2 -2
- package/lib/module/components/layout/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadioWithAmount.js +3 -3
- package/lib/module/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +8 -5
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +37 -37
- package/lib/module/components/modules/ModuleAttachment.js +3 -2
- package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/module/components/modules/ModuleCredential.js +3 -2
- package/lib/module/components/modules/ModuleCredential.js.map +1 -1
- package/lib/module/components/modules/ModuleIDP.js +2 -2
- package/lib/module/components/modules/ModuleIDP.js.map +1 -1
- package/lib/module/components/modules/ModuleNavigation.js +3 -2
- package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js +4 -3
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/searchInput/SearchInput.js +1 -1
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/tag/Tag.js +2 -2
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +1 -1
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/typography/Body.js +10 -3
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +2 -2
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/Caption.js +1 -1
- package/lib/module/components/typography/Caption.js.map +1 -1
- package/lib/module/components/typography/Chip.js +1 -1
- package/lib/module/components/typography/Chip.js.map +1 -1
- package/lib/module/components/typography/H1.js +4 -6
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +2 -2
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +2 -2
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +2 -2
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +10 -3
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +4 -6
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +2 -2
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/Label.js +11 -3
- package/lib/module/components/typography/Label.js.map +1 -1
- package/lib/module/components/typography/LabelMini.js +11 -3
- package/lib/module/components/typography/LabelMini.js.map +1 -1
- package/lib/module/components/typography/LabelSmall.js +11 -3
- package/lib/module/components/typography/LabelSmall.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +6 -6
- package/lib/module/components/typography/index.js +0 -1
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH1.js +2 -2
- package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH2.js +3 -5
- package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH3.js +2 -2
- package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/module/core/IOColors.js +3 -1
- package/lib/module/core/IOColors.js.map +1 -1
- package/lib/module/utils/fonts.js +10 -8
- package/lib/module/utils/fonts.js.map +1 -1
- package/lib/typescript/components/listitems/ListItemRadioWithAmount.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleAttachment.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleCredential.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModulePaymentNotice.d.ts.map +1 -1
- package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H5.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/Label.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/index.d.ts +0 -1
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH2.d.ts.map +1 -1
- package/lib/typescript/core/IOColors.d.ts +1 -1
- package/lib/typescript/core/IOColors.d.ts.map +1 -1
- package/lib/typescript/utils/fonts.d.ts +8 -8
- package/lib/typescript/utils/fonts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Advice/__test__/__snapshots__/advice.test.tsx.snap +1 -1
- package/src/components/badge/Badge.tsx +2 -2
- package/src/components/badge/__test__/__snapshots__/badge.test.tsx.snap +2 -2
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +6 -6
- package/src/components/buttons/ButtonLink.tsx +2 -2
- package/src/components/buttons/ButtonOutline.tsx +2 -2
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
- package/src/components/layout/HeaderSecondLevel.tsx +2 -2
- package/src/components/listitems/ListItemRadioWithAmount.tsx +7 -4
- package/src/components/listitems/ListItemTransaction.tsx +9 -5
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +37 -37
- package/src/components/modules/ModuleAttachment.tsx +4 -3
- package/src/components/modules/ModuleCredential.tsx +4 -3
- package/src/components/modules/ModuleIDP.tsx +2 -2
- package/src/components/modules/ModuleNavigation.tsx +4 -3
- package/src/components/modules/ModulePaymentNotice.tsx +4 -3
- package/src/components/searchInput/SearchInput.tsx +1 -1
- package/src/components/tag/Tag.tsx +2 -2
- package/src/components/textInput/TextInputBase.tsx +1 -6
- package/src/components/typography/Body.tsx +15 -4
- package/src/components/typography/ButtonText.tsx +2 -2
- package/src/components/typography/Caption.tsx +1 -1
- package/src/components/typography/Chip.tsx +1 -1
- package/src/components/typography/H1.tsx +4 -6
- package/src/components/typography/H2.tsx +2 -2
- package/src/components/typography/H3.tsx +2 -2
- package/src/components/typography/H4.tsx +2 -2
- package/src/components/typography/H5.tsx +11 -4
- package/src/components/typography/H6.tsx +4 -6
- package/src/components/typography/Hero.tsx +2 -2
- package/src/components/typography/Label.tsx +15 -4
- package/src/components/typography/LabelMini.tsx +15 -4
- package/src/components/typography/LabelSmall.tsx +15 -4
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +6 -6
- package/src/components/typography/index.tsx +0 -1
- package/src/components/typography/markdown/MdH1.tsx +2 -2
- package/src/components/typography/markdown/MdH2.tsx +3 -5
- package/src/components/typography/markdown/MdH3.tsx +2 -2
- package/src/core/IOColors.ts +3 -0
- package/src/utils/fonts.ts +20 -10
- package/lib/commonjs/components/typography/LabelSmallAlt.js +0 -48
- package/lib/commonjs/components/typography/LabelSmallAlt.js.map +0 -1
- package/lib/module/components/typography/LabelSmallAlt.js +0 -39
- package/lib/module/components/typography/LabelSmallAlt.js.map +0 -1
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts +0 -13
- package/lib/typescript/components/typography/LabelSmallAlt.d.ts.map +0 -1
- package/src/components/typography/LabelSmallAlt.tsx +0 -41
|
@@ -18,7 +18,7 @@ import { WithTestID } from "../../utils/types";
|
|
|
18
18
|
import { Badge } from "../badge";
|
|
19
19
|
import { IOIcons, Icon } from "../icons";
|
|
20
20
|
import { HStack, VStack } from "../stack";
|
|
21
|
-
import { Chip,
|
|
21
|
+
import { Chip, LabelSmall } from "../typography";
|
|
22
22
|
import { ModuleStatic } from "./ModuleStatic";
|
|
23
23
|
import {
|
|
24
24
|
PressableModuleBase,
|
|
@@ -79,14 +79,15 @@ export const ModuleNavigation = (props: WithTestID<ModuleNavigationProps>) => {
|
|
|
79
79
|
{iconComponent ?? imageComponent}
|
|
80
80
|
|
|
81
81
|
<View style={{ flexShrink: 1 }}>
|
|
82
|
-
<
|
|
82
|
+
<LabelSmall
|
|
83
83
|
color={theme["interactiveElem-default"]}
|
|
84
|
+
weight="Semibold"
|
|
84
85
|
numberOfLines={2}
|
|
85
86
|
lineBreakMode="middle"
|
|
86
87
|
style={{ flexShrink: 1 }}
|
|
87
88
|
>
|
|
88
89
|
{title}
|
|
89
|
-
</
|
|
90
|
+
</LabelSmall>
|
|
90
91
|
{subtitle && (
|
|
91
92
|
<Chip color={theme["textBody-tertiary"]}>{subtitle}</Chip>
|
|
92
93
|
)}
|
|
@@ -7,7 +7,7 @@ import { WithTestID } from "../../utils/types";
|
|
|
7
7
|
import { Badge } from "../badge";
|
|
8
8
|
import { Icon } from "../icons";
|
|
9
9
|
import { HStack, VStack } from "../stack";
|
|
10
|
-
import { H6, LabelSmall
|
|
10
|
+
import { H6, LabelSmall } from "../typography";
|
|
11
11
|
import { ModuleStatic } from "./ModuleStatic";
|
|
12
12
|
import { PressableModuleBase } from "./PressableModuleBase";
|
|
13
13
|
|
|
@@ -98,12 +98,13 @@ const ModulePaymentNoticeContent = ({
|
|
|
98
98
|
</LabelSmall>
|
|
99
99
|
)}
|
|
100
100
|
{subtitle && (
|
|
101
|
-
<
|
|
101
|
+
<LabelSmall
|
|
102
102
|
color={theme["interactiveElem-default"]}
|
|
103
103
|
numberOfLines={2}
|
|
104
|
+
weight="Semibold"
|
|
104
105
|
>
|
|
105
106
|
{subtitle}
|
|
106
|
-
</
|
|
107
|
+
</LabelSmall>
|
|
107
108
|
)}
|
|
108
109
|
</View>
|
|
109
110
|
<View style={styles.endBlock}>
|
|
@@ -169,8 +169,8 @@ export const Tag = ({
|
|
|
169
169
|
{variantProps && text && <View style={styles.spacer} />}
|
|
170
170
|
{text && (
|
|
171
171
|
<IOText
|
|
172
|
-
font={isExperimental ? "
|
|
173
|
-
weight={
|
|
172
|
+
font={isExperimental ? "Titillio" : "TitilliumSansPro"}
|
|
173
|
+
weight={"Semibold"}
|
|
174
174
|
size={12}
|
|
175
175
|
lineHeight={16}
|
|
176
176
|
color={theme["textBody-tertiary"]}
|
|
@@ -107,12 +107,7 @@ const styles = StyleSheet.create({
|
|
|
107
107
|
...(Platform.OS === "android" && { marginLeft: -4 })
|
|
108
108
|
},
|
|
109
109
|
textInputStyleFont: {
|
|
110
|
-
...makeFontStyleObject(
|
|
111
|
-
inputLabelFontSize,
|
|
112
|
-
"ReadexPro",
|
|
113
|
-
undefined,
|
|
114
|
-
"Regular"
|
|
115
|
-
)
|
|
110
|
+
...makeFontStyleObject(inputLabelFontSize, "Titillio", undefined, "Regular")
|
|
116
111
|
},
|
|
117
112
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
118
113
|
textInputStyleLegacyFont: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { useIOTheme } from "../../core";
|
|
4
|
-
import { IOFontWeight } from "../../utils/fonts";
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import {
|
|
6
6
|
IOText,
|
|
7
7
|
IOTextProps,
|
|
@@ -16,6 +16,12 @@ type BodyStyleProps = TypographicStyleProps & {
|
|
|
16
16
|
export const bodyFontSize = 16;
|
|
17
17
|
export const bodyLineHeight = 24;
|
|
18
18
|
|
|
19
|
+
const fontName: IOFontFamily = "Titillio";
|
|
20
|
+
const fontWeight: IOFontWeight = "Regular";
|
|
21
|
+
|
|
22
|
+
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
23
|
+
const legacyFontWeight: IOFontWeight = "Regular";
|
|
24
|
+
|
|
19
25
|
/**
|
|
20
26
|
* `Body` typographic style
|
|
21
27
|
*/
|
|
@@ -25,6 +31,7 @@ export const Body = forwardRef<View, BodyStyleProps>(
|
|
|
25
31
|
ref?: ForwardedRef<View>
|
|
26
32
|
) => {
|
|
27
33
|
const theme = useIOTheme();
|
|
34
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
28
35
|
|
|
29
36
|
const defaultColor = asLink
|
|
30
37
|
? theme["interactiveElem-default"]
|
|
@@ -33,8 +40,12 @@ export const Body = forwardRef<View, BodyStyleProps>(
|
|
|
33
40
|
const BodyProps: IOTextProps = {
|
|
34
41
|
...props,
|
|
35
42
|
dynamicTypeRamp: "body", // iOS only
|
|
36
|
-
font:
|
|
37
|
-
weight: customWeight
|
|
43
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
44
|
+
weight: customWeight
|
|
45
|
+
? customWeight
|
|
46
|
+
: isExperimental
|
|
47
|
+
? fontWeight
|
|
48
|
+
: legacyFontWeight,
|
|
38
49
|
size: bodyFontSize,
|
|
39
50
|
lineHeight: bodyLineHeight,
|
|
40
51
|
color: customColor ?? defaultColor,
|
|
@@ -9,8 +9,8 @@ export const buttonTextFontSize: IOFontSize = 16;
|
|
|
9
9
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
10
10
|
`AnimatedText` for color transition through Reanimated */
|
|
11
11
|
const defaultColor: IOColors = "white";
|
|
12
|
-
const fontName: IOFontFamily = "
|
|
13
|
-
const fontWeight: IOFontWeight = "
|
|
12
|
+
const fontName: IOFontFamily = "Titillio";
|
|
13
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
14
14
|
|
|
15
15
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
16
16
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
@@ -7,7 +7,7 @@ import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
|
7
7
|
const defaultColor: keyof IOTheme = "textBody-default";
|
|
8
8
|
|
|
9
9
|
export const captionFontSize: IOFontSize = 12;
|
|
10
|
-
const fontName: IOFontFamily = "
|
|
10
|
+
const fontName: IOFontFamily = "Titillio";
|
|
11
11
|
const fontWeight: IOFontWeight = "Regular";
|
|
12
12
|
|
|
13
13
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
@@ -4,7 +4,7 @@ import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
|
4
4
|
import { IOFontFamily } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
7
|
-
const fontName: IOFontFamily = "
|
|
7
|
+
const fontName: IOFontFamily = "Titillio";
|
|
8
8
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
9
9
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
10
10
|
/**
|
|
@@ -8,12 +8,10 @@ const defaultColor: keyof IOTheme = "textHeading-default";
|
|
|
8
8
|
|
|
9
9
|
export const h1FontSize: IOFontSize = 28;
|
|
10
10
|
export const h1LineHeight = 42;
|
|
11
|
-
const fontName: IOFontFamily = "
|
|
12
|
-
const fontWeight: IOFontWeight = "
|
|
11
|
+
const fontName: IOFontFamily = "Titillio";
|
|
12
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
13
13
|
|
|
14
14
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
15
|
-
const legacyH1FontSize: IOFontSize = 31;
|
|
16
|
-
const legacyH1LineHeight = 43;
|
|
17
15
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
18
16
|
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
19
17
|
|
|
@@ -30,8 +28,8 @@ export const H1 = forwardRef<View, TypographicStyleProps>(
|
|
|
30
28
|
dynamicTypeRamp: "largeTitle", // iOS only
|
|
31
29
|
font: isExperimental ? fontName : legacyFontName,
|
|
32
30
|
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
33
|
-
size:
|
|
34
|
-
lineHeight:
|
|
31
|
+
size: h1FontSize,
|
|
32
|
+
lineHeight: h1LineHeight,
|
|
35
33
|
color: customColor ?? theme[defaultColor]
|
|
36
34
|
};
|
|
37
35
|
|
|
@@ -8,8 +8,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
|
|
|
8
8
|
|
|
9
9
|
export const h2FontSize: IOFontSize = 26;
|
|
10
10
|
export const h2LineHeight = 39;
|
|
11
|
-
const fontName: IOFontFamily = "
|
|
12
|
-
const fontWeight: IOFontWeight = "
|
|
11
|
+
const fontName: IOFontFamily = "Titillio";
|
|
12
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
13
13
|
|
|
14
14
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
15
15
|
const legacyH2FontSize: IOFontSize = 28;
|
|
@@ -9,8 +9,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
|
|
|
9
9
|
/* Common typographic styles */
|
|
10
10
|
export const h3FontSize: IOFontSize = 22;
|
|
11
11
|
export const h3LineHeight = 33;
|
|
12
|
-
const fontName: IOFontFamily = "
|
|
13
|
-
const fontWeight: IOFontWeight = "
|
|
12
|
+
const fontName: IOFontFamily = "Titillio";
|
|
13
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
14
14
|
|
|
15
15
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
16
16
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
@@ -8,8 +8,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
|
|
|
8
8
|
|
|
9
9
|
export const h4FontSize: IOFontSize = 20;
|
|
10
10
|
export const h4LineHeight = 24;
|
|
11
|
-
const fontName: IOFontFamily = "
|
|
12
|
-
const fontWeight: IOFontWeight = "
|
|
11
|
+
const fontName: IOFontFamily = "Titillio";
|
|
12
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
13
13
|
|
|
14
14
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
15
15
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { IOTheme, useIOTheme } from "../../core";
|
|
4
|
-
import { IOFontSize } from "../../utils/fonts";
|
|
3
|
+
import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
7
7
|
const defaultColor: keyof IOTheme = "textHeading-default";
|
|
8
8
|
|
|
9
|
+
const fontName: IOFontFamily = "Titillio";
|
|
10
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
11
|
+
|
|
12
|
+
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
13
|
+
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
14
|
+
|
|
9
15
|
export const h5FontSize: IOFontSize = 14;
|
|
10
16
|
export const h5LineHeight = 16;
|
|
11
17
|
|
|
@@ -15,12 +21,13 @@ export const h5LineHeight = 16;
|
|
|
15
21
|
export const H5 = forwardRef<View, TypographicStyleProps>(
|
|
16
22
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
17
23
|
const theme = useIOTheme();
|
|
24
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
18
25
|
|
|
19
26
|
const H5Props: IOTextProps = {
|
|
20
27
|
...props,
|
|
21
28
|
dynamicTypeRamp: "subheadline", // iOS only
|
|
22
|
-
font:
|
|
23
|
-
weight:
|
|
29
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
30
|
+
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
24
31
|
size: h5FontSize,
|
|
25
32
|
lineHeight: h5LineHeight,
|
|
26
33
|
color: customColor ?? theme[defaultColor],
|
|
@@ -8,12 +8,10 @@ const defaultColor: keyof IOTheme = "textHeading-default";
|
|
|
8
8
|
|
|
9
9
|
export const h6FontSize: IOFontSize = 16;
|
|
10
10
|
export const h6LineHeight = 24;
|
|
11
|
-
const fontName: IOFontFamily = "
|
|
12
|
-
const fontWeight: IOFontWeight = "
|
|
11
|
+
const fontName: IOFontFamily = "Titillio";
|
|
12
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
13
13
|
|
|
14
14
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
15
|
-
const legacyFontSize: IOFontSize = 18;
|
|
16
|
-
const legacyLineHeight = 25;
|
|
17
15
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
18
16
|
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
19
17
|
|
|
@@ -29,8 +27,8 @@ export const H6 = forwardRef<View, TypographicStyleProps>(
|
|
|
29
27
|
...props,
|
|
30
28
|
dynamicTypeRamp: "headline", // iOS only
|
|
31
29
|
font: isExperimental ? fontName : legacyFontName,
|
|
32
|
-
size:
|
|
33
|
-
lineHeight:
|
|
30
|
+
size: h6FontSize,
|
|
31
|
+
lineHeight: h6LineHeight,
|
|
34
32
|
weight: isExperimental ? fontWeight : legacyFontWeight,
|
|
35
33
|
color: customColor ?? theme[defaultColor]
|
|
36
34
|
};
|
|
@@ -8,8 +8,8 @@ const defaultColor: keyof IOTheme = "textHeading-default";
|
|
|
8
8
|
|
|
9
9
|
export const heroFontSize: IOFontSize = 32;
|
|
10
10
|
export const heroLineHeight = 48;
|
|
11
|
-
const fontName: IOFontFamily = "
|
|
12
|
-
const fontWeight: IOFontWeight = "
|
|
11
|
+
const fontName: IOFontFamily = "Titillio";
|
|
12
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
13
13
|
|
|
14
14
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
15
15
|
const legacyHeroFontSize: IOFontSize = 35;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { useIOTheme } from "../../core";
|
|
4
|
-
import { IOFontWeight } from "../../utils/fonts";
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import {
|
|
6
6
|
IOText,
|
|
7
7
|
IOTextProps,
|
|
@@ -13,6 +13,12 @@ type LabelProps = TypographicStyleProps & {
|
|
|
13
13
|
weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
|
+
const fontName: IOFontFamily = "Titillio";
|
|
17
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
18
|
+
|
|
19
|
+
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
20
|
+
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* `LabelSmall` typographic style
|
|
18
24
|
*/
|
|
@@ -22,6 +28,7 @@ export const Label = forwardRef<View, LabelProps>(
|
|
|
22
28
|
ref?: ForwardedRef<View>
|
|
23
29
|
) => {
|
|
24
30
|
const theme = useIOTheme();
|
|
31
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
25
32
|
|
|
26
33
|
const defaultColor = asLink
|
|
27
34
|
? theme["interactiveElem-default"]
|
|
@@ -29,8 +36,12 @@ export const Label = forwardRef<View, LabelProps>(
|
|
|
29
36
|
|
|
30
37
|
const LabelProps: IOTextProps = {
|
|
31
38
|
...props,
|
|
32
|
-
font:
|
|
33
|
-
weight: customWeight
|
|
39
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
40
|
+
weight: customWeight
|
|
41
|
+
? customWeight
|
|
42
|
+
: isExperimental
|
|
43
|
+
? fontWeight
|
|
44
|
+
: legacyFontWeight,
|
|
34
45
|
size: 16,
|
|
35
46
|
lineHeight: 24,
|
|
36
47
|
color: customColor ?? defaultColor,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { useIOTheme } from "../../core";
|
|
4
|
-
import { IOFontWeight } from "../../utils/fonts";
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import {
|
|
6
6
|
IOText,
|
|
7
7
|
IOTextProps,
|
|
@@ -13,6 +13,12 @@ type LabelMiniProps = TypographicStyleProps & {
|
|
|
13
13
|
weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
|
+
const fontName: IOFontFamily = "Titillio";
|
|
17
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
18
|
+
|
|
19
|
+
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
20
|
+
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* `LabelMini` typographic style
|
|
18
24
|
*/
|
|
@@ -22,6 +28,7 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
|
22
28
|
ref?: ForwardedRef<View>
|
|
23
29
|
) => {
|
|
24
30
|
const theme = useIOTheme();
|
|
31
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
25
32
|
|
|
26
33
|
const defaultColor = asLink
|
|
27
34
|
? theme["interactiveElem-default"]
|
|
@@ -30,8 +37,12 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
|
30
37
|
const LabelMiniProps: IOTextProps = {
|
|
31
38
|
...props,
|
|
32
39
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
33
|
-
font:
|
|
34
|
-
weight: customWeight
|
|
40
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
41
|
+
weight: customWeight
|
|
42
|
+
? customWeight
|
|
43
|
+
: isExperimental
|
|
44
|
+
? fontWeight
|
|
45
|
+
: legacyFontWeight,
|
|
35
46
|
size: 12,
|
|
36
47
|
lineHeight: 18,
|
|
37
48
|
color: customColor ?? defaultColor,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import { useIOTheme } from "../../core";
|
|
4
|
-
import { IOFontWeight } from "../../utils/fonts";
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
+
import { IOFontFamily, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import {
|
|
6
6
|
IOText,
|
|
7
7
|
IOTextProps,
|
|
@@ -13,6 +13,12 @@ type LabelSmallProps = TypographicStyleProps & {
|
|
|
13
13
|
weight?: Extract<IOFontWeight, "Regular" | "Semibold" | "Bold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
|
+
const fontName: IOFontFamily = "Titillio";
|
|
17
|
+
const fontWeight: IOFontWeight = "Semibold";
|
|
18
|
+
|
|
19
|
+
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
20
|
+
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
21
|
+
|
|
16
22
|
/**
|
|
17
23
|
* `LabelSmall` typographic style
|
|
18
24
|
*/
|
|
@@ -22,6 +28,7 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
|
|
|
22
28
|
ref?: ForwardedRef<View>
|
|
23
29
|
) => {
|
|
24
30
|
const theme = useIOTheme();
|
|
31
|
+
const { isExperimental } = useIOExperimentalDesign();
|
|
25
32
|
|
|
26
33
|
const defaultColor = asLink
|
|
27
34
|
? theme["interactiveElem-default"]
|
|
@@ -30,8 +37,12 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
|
|
|
30
37
|
const LabelSmallProps: IOTextProps = {
|
|
31
38
|
...props,
|
|
32
39
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
33
|
-
font:
|
|
34
|
-
weight: customWeight
|
|
40
|
+
font: isExperimental ? fontName : legacyFontName,
|
|
41
|
+
weight: customWeight
|
|
42
|
+
? customWeight
|
|
43
|
+
: isExperimental
|
|
44
|
+
? fontWeight
|
|
45
|
+
: legacyFontWeight,
|
|
35
46
|
size: 14,
|
|
36
47
|
lineHeight: 21,
|
|
37
48
|
color: customColor ?? defaultColor,
|
|
@@ -81,10 +81,10 @@ exports[`Test Typography Components H1 Snapshot 1`] = `
|
|
|
81
81
|
{
|
|
82
82
|
"color": "#0E0F13",
|
|
83
83
|
"fontFamily": "Titillium Sans Pro",
|
|
84
|
-
"fontSize":
|
|
84
|
+
"fontSize": 28,
|
|
85
85
|
"fontStyle": "normal",
|
|
86
86
|
"fontWeight": "600",
|
|
87
|
-
"lineHeight":
|
|
87
|
+
"lineHeight": 42,
|
|
88
88
|
},
|
|
89
89
|
]
|
|
90
90
|
}
|
|
@@ -104,10 +104,10 @@ exports[`Test Typography Components H1 Snapshot 2`] = `
|
|
|
104
104
|
{
|
|
105
105
|
"color": "#FFFFFF",
|
|
106
106
|
"fontFamily": "Titillium Sans Pro",
|
|
107
|
-
"fontSize":
|
|
107
|
+
"fontSize": 28,
|
|
108
108
|
"fontStyle": "normal",
|
|
109
109
|
"fontWeight": "600",
|
|
110
|
-
"lineHeight":
|
|
110
|
+
"lineHeight": 42,
|
|
111
111
|
},
|
|
112
112
|
]
|
|
113
113
|
}
|
|
@@ -438,10 +438,10 @@ exports[`Test Typography Components H6 Snapshot 1`] = `
|
|
|
438
438
|
{
|
|
439
439
|
"color": "#0E0F13",
|
|
440
440
|
"fontFamily": "Titillium Sans Pro",
|
|
441
|
-
"fontSize":
|
|
441
|
+
"fontSize": 16,
|
|
442
442
|
"fontStyle": "normal",
|
|
443
443
|
"fontWeight": "600",
|
|
444
|
-
"lineHeight":
|
|
444
|
+
"lineHeight": 24,
|
|
445
445
|
},
|
|
446
446
|
]
|
|
447
447
|
}
|
|
@@ -14,8 +14,8 @@ export const MdH1 = forwardRef<View, TypographicStyleProps>(
|
|
|
14
14
|
|
|
15
15
|
const MdH1Props: IOTextProps = {
|
|
16
16
|
...props,
|
|
17
|
-
font: isExperimental ? "
|
|
18
|
-
weight:
|
|
17
|
+
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
18
|
+
weight: "Semibold",
|
|
19
19
|
size: 20,
|
|
20
20
|
lineHeight: 24,
|
|
21
21
|
color: customColor ?? theme["textHeading-tertiary"]
|
|
@@ -13,11 +13,9 @@ export const MdH2 = forwardRef<View, TypographicStyleProps>(
|
|
|
13
13
|
|
|
14
14
|
const MdH2Props: IOTextProps = {
|
|
15
15
|
...props,
|
|
16
|
-
font: isExperimental ? "
|
|
17
|
-
weight:
|
|
18
|
-
|
|
19
|
-
It should be 16 with `SemiBold` font weight. */
|
|
20
|
-
size: 18,
|
|
16
|
+
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
17
|
+
weight: "Semibold",
|
|
18
|
+
size: 16,
|
|
21
19
|
lineHeight: 24,
|
|
22
20
|
color: customColor ?? theme["textHeading-tertiary"]
|
|
23
21
|
};
|
|
@@ -13,8 +13,8 @@ export const MdH3 = forwardRef<View, TypographicStyleProps>(
|
|
|
13
13
|
|
|
14
14
|
const MdH3Props: IOTextProps = {
|
|
15
15
|
...props,
|
|
16
|
-
font: isExperimental ? "
|
|
17
|
-
weight:
|
|
16
|
+
font: isExperimental ? "Titillio" : "TitilliumSansPro",
|
|
17
|
+
weight: "Regular",
|
|
18
18
|
size: 16,
|
|
19
19
|
lineHeight: 24,
|
|
20
20
|
color: customColor ?? theme["textHeading-tertiary"]
|
package/src/core/IOColors.ts
CHANGED
|
@@ -283,6 +283,7 @@ const themeKeys = [
|
|
|
283
283
|
// Status
|
|
284
284
|
"errorIcon",
|
|
285
285
|
"errorText",
|
|
286
|
+
"successText",
|
|
286
287
|
// Pictograms
|
|
287
288
|
"pictogram-hands",
|
|
288
289
|
"pictogram-tint-main",
|
|
@@ -321,6 +322,7 @@ export const IOThemeLight: IOTheme = {
|
|
|
321
322
|
// Status
|
|
322
323
|
errorIcon: "error-600",
|
|
323
324
|
errorText: "error-600",
|
|
325
|
+
successText: "success-700",
|
|
324
326
|
// Pictograms
|
|
325
327
|
"pictogram-hands": "blueIO-500",
|
|
326
328
|
"pictogram-tint-main": "turquoise-150",
|
|
@@ -361,6 +363,7 @@ export const IOThemeDark: IOTheme = {
|
|
|
361
363
|
// Status
|
|
362
364
|
errorIcon: "error-400",
|
|
363
365
|
errorText: "error-400",
|
|
366
|
+
successText: "success-400",
|
|
364
367
|
// Pictograms
|
|
365
368
|
"pictogram-hands": "white",
|
|
366
369
|
"pictogram-tint-main": "turquoise-150",
|
package/src/utils/fonts.ts
CHANGED
|
@@ -16,11 +16,11 @@ const fonts = {
|
|
|
16
16
|
ios: "Titillium Sans Pro",
|
|
17
17
|
default: "TitilliumSansPro"
|
|
18
18
|
}),
|
|
19
|
-
|
|
20
|
-
android: "
|
|
21
|
-
web: "
|
|
22
|
-
ios: "
|
|
23
|
-
default: "
|
|
19
|
+
Titillio: Platform.select({
|
|
20
|
+
android: "Titillio",
|
|
21
|
+
web: "Titillio",
|
|
22
|
+
ios: "Titillio",
|
|
23
|
+
default: "Titillio"
|
|
24
24
|
}),
|
|
25
25
|
DMMono: Platform.select({
|
|
26
26
|
android: "DMMono",
|
|
@@ -28,7 +28,7 @@ const fonts = {
|
|
|
28
28
|
ios: "DM Mono",
|
|
29
29
|
default: "DMMono"
|
|
30
30
|
})
|
|
31
|
-
};
|
|
31
|
+
} as const;
|
|
32
32
|
|
|
33
33
|
export type IOFontFamily = keyof typeof fonts;
|
|
34
34
|
|
|
@@ -44,10 +44,18 @@ export type IOFontSize = (typeof allFontSizes)[number];
|
|
|
44
44
|
* Font Weights
|
|
45
45
|
*/
|
|
46
46
|
|
|
47
|
-
const weights = [
|
|
47
|
+
const weights = [
|
|
48
|
+
"Thin",
|
|
49
|
+
"Light",
|
|
50
|
+
"Regular",
|
|
51
|
+
"Medium",
|
|
52
|
+
"Semibold",
|
|
53
|
+
"Bold",
|
|
54
|
+
"Black"
|
|
55
|
+
] as const;
|
|
48
56
|
export type IOFontWeight = (typeof weights)[number];
|
|
49
57
|
|
|
50
|
-
const weightValues = ["300", "400", "500", "600", "700"] as const;
|
|
58
|
+
const weightValues = ["200", "300", "400", "500", "600", "700", "900"] as const;
|
|
51
59
|
export type IOFontWeightNumeric = (typeof weightValues)[number];
|
|
52
60
|
|
|
53
61
|
/**
|
|
@@ -55,11 +63,13 @@ export type IOFontWeightNumeric = (typeof weightValues)[number];
|
|
|
55
63
|
* used on iOS
|
|
56
64
|
*/
|
|
57
65
|
export const fontWeights: Record<IOFontWeight, IOFontWeightNumeric> = {
|
|
66
|
+
Thin: "200",
|
|
58
67
|
Light: "300",
|
|
59
68
|
Regular: "400",
|
|
60
69
|
Medium: "500",
|
|
61
70
|
Semibold: "600",
|
|
62
|
-
Bold: "700"
|
|
71
|
+
Bold: "700",
|
|
72
|
+
Black: "900"
|
|
63
73
|
};
|
|
64
74
|
|
|
65
75
|
type FontStyleObject = {
|
|
@@ -96,7 +106,7 @@ export const makeFontFamilyName = (
|
|
|
96
106
|
font: IOFontFamily,
|
|
97
107
|
weight: IOFontWeight = defaultWeight,
|
|
98
108
|
fontStyle: TextStyle["fontStyle"] = "normal"
|
|
99
|
-
):
|
|
109
|
+
): string =>
|
|
100
110
|
Platform.select({
|
|
101
111
|
web: fonts[font],
|
|
102
112
|
android: `${fonts[font]}-${weight || "Regular"}${
|