@pagopa/io-app-design-system 6.0.4 → 6.0.6
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/badge/Badge.js +0 -4
- package/lib/commonjs/components/badge/Badge.js.map +1 -1
- package/lib/commonjs/components/banner/Banner.js +0 -4
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/buttons/IOButton/IOButton.js +0 -5
- package/lib/commonjs/components/buttons/IOButton/IOButton.js.map +1 -1
- package/lib/commonjs/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +7 -5
- package/lib/commonjs/components/headers/HeaderSecondLevel.js +0 -4
- package/lib/commonjs/components/headers/HeaderSecondLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +86 -26
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +6 -4
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js +30 -23
- package/lib/commonjs/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleIDP.js +0 -4
- package/lib/commonjs/components/modules/ModuleIDP.js.map +1 -1
- package/lib/commonjs/components/numberpad/NumberButton.js +0 -4
- package/lib/commonjs/components/numberpad/NumberButton.js.map +1 -1
- package/lib/commonjs/components/searchInput/SearchInput.js +0 -1
- package/lib/commonjs/components/searchInput/SearchInput.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +0 -4
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/tag/Tag.js +0 -4
- package/lib/commonjs/components/tag/Tag.js.map +1 -1
- package/lib/commonjs/components/typography/Body.js +1 -7
- package/lib/commonjs/components/typography/Body.js.map +1 -1
- package/lib/commonjs/components/typography/BodySmall.js +0 -7
- package/lib/commonjs/components/typography/BodySmall.js.map +1 -1
- package/lib/commonjs/components/typography/ButtonText.js +0 -7
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/Caption.js +0 -4
- package/lib/commonjs/components/typography/Caption.js.map +1 -1
- package/lib/commonjs/components/typography/H1.js +0 -4
- package/lib/commonjs/components/typography/H1.js.map +1 -1
- package/lib/commonjs/components/typography/H2.js +0 -4
- package/lib/commonjs/components/typography/H2.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +0 -4
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H4.js +0 -4
- package/lib/commonjs/components/typography/H4.js.map +1 -1
- package/lib/commonjs/components/typography/H5.js +0 -4
- package/lib/commonjs/components/typography/H5.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +0 -1
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/Hero.js +0 -4
- package/lib/commonjs/components/typography/Hero.js.map +1 -1
- package/lib/commonjs/components/typography/IOText.js +5 -1
- package/lib/commonjs/components/typography/IOText.js.map +1 -1
- package/lib/commonjs/components/typography/LabelMini.js +1 -8
- package/lib/commonjs/components/typography/LabelMini.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH1.js +0 -4
- package/lib/commonjs/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH2.js +0 -4
- package/lib/commonjs/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/commonjs/components/typography/markdown/MdH3.js +0 -4
- package/lib/commonjs/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/module/components/badge/Badge.js +1 -5
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/banner/Banner.js +1 -5
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/buttons/IOButton/IOButton.js +0 -5
- package/lib/module/components/buttons/IOButton/IOButton.js.map +1 -1
- package/lib/module/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +7 -5
- package/lib/module/components/headers/HeaderSecondLevel.js +1 -5
- package/lib/module/components/headers/HeaderSecondLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +87 -27
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +6 -4
- package/lib/module/components/loadingSpinner/LoadingSpinner.js +30 -24
- package/lib/module/components/loadingSpinner/LoadingSpinner.js.map +1 -1
- package/lib/module/components/modules/ModuleIDP.js +1 -5
- package/lib/module/components/modules/ModuleIDP.js.map +1 -1
- package/lib/module/components/numberpad/NumberButton.js +1 -5
- package/lib/module/components/numberpad/NumberButton.js.map +1 -1
- package/lib/module/components/searchInput/SearchInput.js +0 -1
- package/lib/module/components/searchInput/SearchInput.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +1 -5
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/tag/Tag.js +1 -5
- package/lib/module/components/tag/Tag.js.map +1 -1
- package/lib/module/components/typography/Body.js +2 -8
- package/lib/module/components/typography/Body.js.map +1 -1
- package/lib/module/components/typography/BodySmall.js +1 -8
- package/lib/module/components/typography/BodySmall.js.map +1 -1
- package/lib/module/components/typography/ButtonText.js +0 -7
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/Caption.js +1 -5
- package/lib/module/components/typography/Caption.js.map +1 -1
- package/lib/module/components/typography/H1.js +1 -5
- package/lib/module/components/typography/H1.js.map +1 -1
- package/lib/module/components/typography/H2.js +1 -5
- package/lib/module/components/typography/H2.js.map +1 -1
- package/lib/module/components/typography/H3.js +1 -5
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H4.js +1 -5
- package/lib/module/components/typography/H4.js.map +1 -1
- package/lib/module/components/typography/H5.js +1 -5
- package/lib/module/components/typography/H5.js.map +1 -1
- package/lib/module/components/typography/H6.js +0 -1
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/Hero.js +1 -5
- package/lib/module/components/typography/Hero.js.map +1 -1
- package/lib/module/components/typography/IOText.js +6 -2
- package/lib/module/components/typography/IOText.js.map +1 -1
- package/lib/module/components/typography/LabelMini.js +2 -9
- package/lib/module/components/typography/LabelMini.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH1.js +1 -5
- package/lib/module/components/typography/markdown/MdH1.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH2.js +1 -5
- package/lib/module/components/typography/markdown/MdH2.js.map +1 -1
- package/lib/module/components/typography/markdown/MdH3.js +1 -5
- package/lib/module/components/typography/markdown/MdH3.js.map +1 -1
- package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/buttons/IOButton/IOButton.d.ts.map +1 -1
- package/lib/typescript/components/headers/HeaderSecondLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemInfo.d.ts +29 -0
- package/lib/typescript/components/listitems/ListItemInfo.d.ts.map +1 -1
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts +2 -3
- package/lib/typescript/components/loadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleIDP.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/searchInput/SearchInput.d.ts.map +1 -1
- package/lib/typescript/components/tabs/TabItem.d.ts.map +1 -1
- package/lib/typescript/components/tag/Tag.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -1
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/Caption.d.ts.map +1 -1
- package/lib/typescript/components/typography/H1.d.ts.map +1 -1
- package/lib/typescript/components/typography/H2.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H4.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/Hero.d.ts.map +1 -1
- package/lib/typescript/components/typography/IOText.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH1.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH2.d.ts.map +1 -1
- package/lib/typescript/components/typography/markdown/MdH3.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/badge/Badge.tsx +1 -3
- package/src/components/banner/Banner.tsx +1 -3
- package/src/components/buttons/IOButton/IOButton.tsx +0 -3
- package/src/components/claimsSelector/__test__/__snapshots__/ClaimsSelector.test.tsx.snap +7 -5
- package/src/components/headers/HeaderSecondLevel.tsx +1 -4
- package/src/components/listitems/ListItemInfo.tsx +124 -49
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +6 -4
- package/src/components/loadingSpinner/LoadingSpinner.tsx +26 -33
- package/src/components/modules/ModuleIDP.tsx +1 -3
- package/src/components/numberpad/NumberButton.tsx +1 -3
- package/src/components/searchInput/SearchInput.tsx +0 -1
- package/src/components/tabs/TabItem.tsx +2 -8
- package/src/components/tag/Tag.tsx +1 -3
- package/src/components/typography/Body.tsx +3 -8
- package/src/components/typography/BodySmall.tsx +2 -7
- package/src/components/typography/ButtonText.tsx +2 -7
- package/src/components/typography/Caption.tsx +1 -3
- package/src/components/typography/H1.tsx +1 -3
- package/src/components/typography/H2.tsx +1 -3
- package/src/components/typography/H3.tsx +1 -3
- package/src/components/typography/H4.tsx +1 -3
- package/src/components/typography/H5.tsx +1 -3
- package/src/components/typography/H6.tsx +0 -1
- package/src/components/typography/Hero.tsx +1 -3
- package/src/components/typography/IOText.tsx +16 -3
- package/src/components/typography/LabelMini.tsx +3 -8
- package/src/components/typography/markdown/MdH1.tsx +1 -3
- package/src/components/typography/markdown/MdH2.tsx +1 -3
- package/src/components/typography/markdown/MdH3.tsx +1 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
4
|
import { IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
@@ -13,12 +13,10 @@ export const h1LineHeight = 42;
|
|
|
13
13
|
export const H1 = forwardRef<View, TypographicStyleProps>(
|
|
14
14
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
15
15
|
const theme = useIOTheme();
|
|
16
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
17
16
|
|
|
18
17
|
const H1Props: IOTextProps = {
|
|
19
18
|
...props,
|
|
20
19
|
dynamicTypeRamp: "largeTitle", // iOS only
|
|
21
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
22
20
|
weight: "Semibold",
|
|
23
21
|
size: h1FontSize,
|
|
24
22
|
lineHeight: h1LineHeight,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
4
|
import { IOFontSize, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
@@ -20,12 +20,10 @@ export const H2 = forwardRef<View, H2StyleProps>(
|
|
|
20
20
|
ref?: ForwardedRef<View>
|
|
21
21
|
) => {
|
|
22
22
|
const theme = useIOTheme();
|
|
23
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
24
23
|
|
|
25
24
|
const H2Props: IOTextProps = {
|
|
26
25
|
...props,
|
|
27
26
|
dynamicTypeRamp: "title1", // iOS only
|
|
28
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
29
27
|
weight: customWeight ?? "Semibold",
|
|
30
28
|
size: h2FontSize,
|
|
31
29
|
lineHeight: h2LineHeight,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
4
|
import { IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
@@ -14,12 +14,10 @@ export const h3LineHeight = 33;
|
|
|
14
14
|
export const H3 = forwardRef<View, TypographicStyleProps>(
|
|
15
15
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
16
16
|
const theme = useIOTheme();
|
|
17
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
18
17
|
|
|
19
18
|
const H3Props: IOTextProps = {
|
|
20
19
|
...props,
|
|
21
20
|
dynamicTypeRamp: "title2", // iOS only
|
|
22
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
23
21
|
weight: "Semibold",
|
|
24
22
|
size: h3FontSize,
|
|
25
23
|
lineHeight: h3LineHeight,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
4
|
import { IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
@@ -13,12 +13,10 @@ export const h4LineHeight = 24;
|
|
|
13
13
|
export const H4 = forwardRef<View, TypographicStyleProps>(
|
|
14
14
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
15
15
|
const theme = useIOTheme();
|
|
16
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
17
16
|
|
|
18
17
|
const H4Props: IOTextProps = {
|
|
19
18
|
...props,
|
|
20
19
|
dynamicTypeRamp: "title3", // iOS only
|
|
21
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
22
20
|
weight: "Semibold",
|
|
23
21
|
size: h4FontSize,
|
|
24
22
|
lineHeight: h4LineHeight,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
4
|
import { IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
@@ -13,12 +13,10 @@ export const h5LineHeight = 16;
|
|
|
13
13
|
export const H5 = forwardRef<View, TypographicStyleProps>(
|
|
14
14
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
15
15
|
const theme = useIOTheme();
|
|
16
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
17
16
|
|
|
18
17
|
const H5Props: IOTextProps = {
|
|
19
18
|
...props,
|
|
20
19
|
dynamicTypeRamp: "subheadline", // iOS only
|
|
21
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
22
20
|
weight: "Semibold",
|
|
23
21
|
size: h5FontSize,
|
|
24
22
|
lineHeight: h5LineHeight,
|
|
@@ -21,7 +21,6 @@ export const H6 = forwardRef<View, TypographicStyleProps>(
|
|
|
21
21
|
const H6Props: IOTextProps = {
|
|
22
22
|
...props,
|
|
23
23
|
dynamicTypeRamp: "headline", // iOS only
|
|
24
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
25
24
|
weight: "Semibold",
|
|
26
25
|
size: newTypefaceEnabled ? h6FontSize : legacyFontSize,
|
|
27
26
|
lineHeight: h6LineHeight,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
4
|
import { IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
@@ -13,11 +13,9 @@ export const heroLineHeight = 48;
|
|
|
13
13
|
export const Hero = forwardRef<View, TypographicStyleProps>(
|
|
14
14
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
15
15
|
const theme = useIOTheme();
|
|
16
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
17
16
|
|
|
18
17
|
const HeroProps: IOTextProps = {
|
|
19
18
|
...props,
|
|
20
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
21
19
|
weight: "Semibold",
|
|
22
20
|
size: 32,
|
|
23
21
|
lineHeight: 48,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
View
|
|
9
9
|
} from "react-native";
|
|
10
10
|
import Animated from "react-native-reanimated";
|
|
11
|
-
import { useIOTheme } from "../../context";
|
|
11
|
+
import { useIONewTypeface, useIOTheme } from "../../context";
|
|
12
12
|
import { IOColors } from "../../core";
|
|
13
13
|
import { useBoldTextEnabled } from "../../utils/accessibility";
|
|
14
14
|
import {
|
|
@@ -108,19 +108,32 @@ export const IOText = forwardRef<View, IOTextProps>(
|
|
|
108
108
|
) => {
|
|
109
109
|
const theme = useIOTheme();
|
|
110
110
|
const boldEnabled = useBoldTextEnabled();
|
|
111
|
+
const { newTypefaceEnabled } = useIONewTypeface();
|
|
112
|
+
|
|
113
|
+
const computedFont =
|
|
114
|
+
font || (newTypefaceEnabled ? "Titillio" : "TitilliumSansPro");
|
|
111
115
|
|
|
112
116
|
const computedStyleObj = useMemo(
|
|
113
117
|
() =>
|
|
114
118
|
calculateTextStyle(
|
|
115
119
|
color ?? theme["textBody-default"],
|
|
116
120
|
size,
|
|
117
|
-
|
|
121
|
+
computedFont,
|
|
118
122
|
lineHeight,
|
|
119
123
|
weight,
|
|
120
124
|
fontStyle,
|
|
121
125
|
boldEnabled
|
|
122
126
|
),
|
|
123
|
-
[
|
|
127
|
+
[
|
|
128
|
+
color,
|
|
129
|
+
theme,
|
|
130
|
+
size,
|
|
131
|
+
computedFont,
|
|
132
|
+
lineHeight,
|
|
133
|
+
weight,
|
|
134
|
+
fontStyle,
|
|
135
|
+
boldEnabled
|
|
136
|
+
]
|
|
124
137
|
);
|
|
125
138
|
|
|
126
139
|
/* In some cases, for example when we use color transitions with
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { Pressable, View } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../context";
|
|
4
|
+
import { IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import {
|
|
6
6
|
IOText,
|
|
7
7
|
IOTextProps,
|
|
@@ -13,9 +13,6 @@ type LabelMiniProps = TypographicStyleProps & {
|
|
|
13
13
|
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
|
-
const fontName: IOFontFamily = "Titillio";
|
|
17
|
-
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
18
|
-
|
|
19
16
|
/**
|
|
20
17
|
* `LabelMini` typographic style
|
|
21
18
|
*/
|
|
@@ -33,7 +30,6 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
|
33
30
|
ref?: ForwardedRef<View>
|
|
34
31
|
) => {
|
|
35
32
|
const theme = useIOTheme();
|
|
36
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
37
33
|
|
|
38
34
|
const defaultColor = asLink
|
|
39
35
|
? theme["interactiveElem-default"]
|
|
@@ -42,8 +38,7 @@ export const LabelMini = forwardRef<View, LabelMiniProps>(
|
|
|
42
38
|
const LabelMiniProps: IOTextProps = {
|
|
43
39
|
...props,
|
|
44
40
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
45
|
-
|
|
46
|
-
weight: customWeight ? customWeight : "Semibold",
|
|
41
|
+
weight: customWeight || "Semibold",
|
|
47
42
|
size: 12,
|
|
48
43
|
lineHeight: 18,
|
|
49
44
|
color: customColor ?? defaultColor,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../../context";
|
|
4
4
|
import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -9,11 +9,9 @@ import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
|
|
|
9
9
|
export const MdH1 = forwardRef<View, TypographicStyleProps>(
|
|
10
10
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
11
11
|
const theme = useIOTheme();
|
|
12
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
13
12
|
|
|
14
13
|
const MdH1Props: IOTextProps = {
|
|
15
14
|
...props,
|
|
16
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
17
15
|
weight: "Semibold",
|
|
18
16
|
size: 20,
|
|
19
17
|
lineHeight: 24,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../../context";
|
|
4
4
|
import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -9,11 +9,9 @@ import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
|
|
|
9
9
|
export const MdH2 = forwardRef<View, TypographicStyleProps>(
|
|
10
10
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
11
11
|
const theme = useIOTheme();
|
|
12
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
13
12
|
|
|
14
13
|
const MdH2Props: IOTextProps = {
|
|
15
14
|
...props,
|
|
16
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
17
15
|
weight: "Semibold",
|
|
18
16
|
size: 18,
|
|
19
17
|
lineHeight: 24,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOTheme } from "../../../context";
|
|
4
4
|
import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -9,11 +9,9 @@ import { IOText, IOTextProps, TypographicStyleProps } from "../IOText";
|
|
|
9
9
|
export const MdH3 = forwardRef<View, TypographicStyleProps>(
|
|
10
10
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
11
11
|
const theme = useIOTheme();
|
|
12
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
13
12
|
|
|
14
13
|
const MdH3Props: IOTextProps = {
|
|
15
14
|
...props,
|
|
16
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
17
15
|
weight: "Semibold",
|
|
18
16
|
size: 16,
|
|
19
17
|
lineHeight: 24,
|