@pagopa/io-app-design-system 6.0.5 → 6.0.7
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/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +3 -3
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
- package/lib/commonjs/components/headers/HeaderSecondLevel.js +0 -4
- package/lib/commonjs/components/headers/HeaderSecondLevel.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/otpInput/OTPInput.js +41 -26
- package/lib/commonjs/components/otpInput/OTPInput.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/toast/ToastProvider.js +3 -3
- package/lib/commonjs/components/toast/ToastProvider.js.map +1 -1
- package/lib/commonjs/components/tooltip/Tooltip.js +3 -3
- package/lib/commonjs/components/tooltip/Tooltip.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 +6 -3
- 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/commonjs/utils/throttle.js +19 -0
- package/lib/commonjs/utils/throttle.js.map +1 -0
- 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/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +3 -3
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
- package/lib/module/components/headers/HeaderSecondLevel.js +1 -5
- package/lib/module/components/headers/HeaderSecondLevel.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/otpInput/OTPInput.js +42 -27
- package/lib/module/components/otpInput/OTPInput.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/toast/ToastProvider.js +1 -1
- package/lib/module/components/toast/ToastProvider.js.map +1 -1
- package/lib/module/components/tooltip/Tooltip.js +3 -3
- package/lib/module/components/tooltip/Tooltip.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 +7 -4
- 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/module/utils/throttle.js +14 -0
- package/lib/module/utils/throttle.js.map +1 -0
- 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/modules/ModuleIDP.d.ts.map +1 -1
- package/lib/typescript/components/numberpad/NumberButton.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/OTPInput.d.ts +4 -0
- package/lib/typescript/components/otpInput/OTPInput.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/toast/ToastProvider.d.ts.map +1 -1
- package/lib/typescript/components/tooltip/Tooltip.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/lib/typescript/utils/throttle.d.ts +2 -0
- package/lib/typescript/utils/throttle.d.ts.map +1 -0
- package/package.json +1 -3
- 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/buttons/IOButton/__test__/__snapshots__/IOButton.test.tsx.snap +3 -3
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +6 -6
- package/src/components/headers/HeaderSecondLevel.tsx +1 -4
- package/src/components/modules/ModuleIDP.tsx +1 -3
- package/src/components/numberpad/NumberButton.tsx +1 -3
- package/src/components/otpInput/OTPInput.tsx +57 -32
- 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/toast/ToastProvider.tsx +1 -1
- package/src/components/tooltip/Tooltip.tsx +4 -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 +10 -7
- 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
- package/src/utils/throttle.ts +15 -0
|
@@ -8,10 +8,11 @@ import {
|
|
|
8
8
|
} from "react";
|
|
9
9
|
import {
|
|
10
10
|
AccessibilityInfo,
|
|
11
|
-
|
|
11
|
+
Platform,
|
|
12
12
|
Pressable,
|
|
13
|
+
StyleSheet,
|
|
13
14
|
TextInput,
|
|
14
|
-
|
|
15
|
+
TextInputKeyPressEvent,
|
|
15
16
|
View
|
|
16
17
|
} from "react-native";
|
|
17
18
|
import Animated from "react-native-reanimated";
|
|
@@ -35,6 +36,10 @@ type Props = {
|
|
|
35
36
|
accessibilityLabel?: string;
|
|
36
37
|
deleteButtonAccessibilityLabel?: string;
|
|
37
38
|
accessibilityHint?: string;
|
|
39
|
+
accessibilityValueText?: (params: {
|
|
40
|
+
valueLength: number;
|
|
41
|
+
length: number;
|
|
42
|
+
}) => string;
|
|
38
43
|
inputAccessoryViewID?: string;
|
|
39
44
|
autoFocus?: boolean;
|
|
40
45
|
};
|
|
@@ -60,6 +65,7 @@ export const OTPInput = forwardRef<View, Props>(
|
|
|
60
65
|
length,
|
|
61
66
|
accessibilityLabel,
|
|
62
67
|
accessibilityHint,
|
|
68
|
+
accessibilityValueText,
|
|
63
69
|
onValidate,
|
|
64
70
|
errorMessage = "",
|
|
65
71
|
secret = false,
|
|
@@ -120,10 +126,8 @@ export const OTPInput = forwardRef<View, Props>(
|
|
|
120
126
|
handleValidate(value);
|
|
121
127
|
};
|
|
122
128
|
|
|
123
|
-
const handleKeyPress = ({
|
|
124
|
-
nativeEvent
|
|
125
|
-
}: NativeSyntheticEvent<TextInputKeyPressEventData>) => {
|
|
126
|
-
switch (nativeEvent.key) {
|
|
129
|
+
const handleKeyPress = (e: TextInputKeyPressEvent) => {
|
|
130
|
+
switch (e.nativeEvent.key) {
|
|
127
131
|
case "Backspace":
|
|
128
132
|
if (deleteButtonAccessibilityLabel && value.length > 0) {
|
|
129
133
|
AccessibilityInfo.announceForAccessibility(
|
|
@@ -132,7 +136,7 @@ export const OTPInput = forwardRef<View, Props>(
|
|
|
132
136
|
}
|
|
133
137
|
break;
|
|
134
138
|
default:
|
|
135
|
-
AccessibilityInfo.announceForAccessibility(nativeEvent.key);
|
|
139
|
+
AccessibilityInfo.announceForAccessibility(e.nativeEvent.key);
|
|
136
140
|
break;
|
|
137
141
|
}
|
|
138
142
|
};
|
|
@@ -147,21 +151,20 @@ export const OTPInput = forwardRef<View, Props>(
|
|
|
147
151
|
setHasFocus(true);
|
|
148
152
|
}}
|
|
149
153
|
ref={ref}
|
|
150
|
-
|
|
151
|
-
flexDirection: "row",
|
|
152
|
-
justifyContent: "space-between",
|
|
153
|
-
columnGap: OTP_ITEMS_GAP
|
|
154
|
-
}}
|
|
155
|
-
accessible={true}
|
|
156
|
-
accessibilityLabel={accessibilityLabel}
|
|
157
|
-
accessibilityHint={accessibilityHint}
|
|
158
|
-
accessibilityValue={{ text: value }}
|
|
154
|
+
accessible={false}
|
|
159
155
|
>
|
|
160
156
|
<TextInput
|
|
161
157
|
value={value}
|
|
162
158
|
onChangeText={handleChange}
|
|
163
159
|
onKeyPress={handleKeyPress}
|
|
164
|
-
|
|
160
|
+
caretHidden={Platform.OS === "ios"}
|
|
161
|
+
style={[
|
|
162
|
+
StyleSheet.absoluteFillObject,
|
|
163
|
+
Platform.select({
|
|
164
|
+
ios: { opacity: 0.01 },
|
|
165
|
+
android: { opacity: 0 }
|
|
166
|
+
})
|
|
167
|
+
]}
|
|
165
168
|
maxLength={length}
|
|
166
169
|
ref={inputRef}
|
|
167
170
|
onBlur={() => setHasFocus(false)}
|
|
@@ -172,23 +175,45 @@ export const OTPInput = forwardRef<View, Props>(
|
|
|
172
175
|
autoComplete={autocomplete ? "sms-otp" : undefined}
|
|
173
176
|
inputAccessoryViewID={inputAccessoryViewID}
|
|
174
177
|
accessible={true}
|
|
178
|
+
accessibilityLabel={accessibilityLabel}
|
|
179
|
+
accessibilityHint={accessibilityHint}
|
|
180
|
+
// Ensure the screen reader pronounces the code digit by digit
|
|
181
|
+
accessibilityValue={{
|
|
182
|
+
text:
|
|
183
|
+
accessibilityValueText?.({
|
|
184
|
+
valueLength: value.length,
|
|
185
|
+
length
|
|
186
|
+
}) ?? value.split("").join(" ")
|
|
187
|
+
}}
|
|
175
188
|
autoFocus={autoFocus}
|
|
176
|
-
secureTextEntry={
|
|
189
|
+
secureTextEntry={secret}
|
|
177
190
|
/>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
191
|
+
<View
|
|
192
|
+
style={{
|
|
193
|
+
flexDirection: "row",
|
|
194
|
+
justifyContent: "space-between",
|
|
195
|
+
columnGap: OTP_ITEMS_GAP,
|
|
196
|
+
flexGrow: 1,
|
|
197
|
+
zIndex: 10
|
|
198
|
+
}}
|
|
199
|
+
accessibilityElementsHidden={true}
|
|
200
|
+
importantForAccessibility="no-hide-descendants"
|
|
201
|
+
>
|
|
202
|
+
{cells.map((_, i) => (
|
|
203
|
+
<BoxedInput
|
|
204
|
+
key={i}
|
|
205
|
+
status={
|
|
206
|
+
hasError
|
|
207
|
+
? "error"
|
|
208
|
+
: hasFocus && value.length === i
|
|
209
|
+
? "focus"
|
|
210
|
+
: "default"
|
|
211
|
+
}
|
|
212
|
+
secret={secret}
|
|
213
|
+
value={value[i]}
|
|
214
|
+
/>
|
|
215
|
+
))}
|
|
216
|
+
</View>
|
|
192
217
|
</Pressable>
|
|
193
218
|
<VSpacer size={4} />
|
|
194
219
|
{hasError && errorMessage && (
|
|
@@ -307,7 +307,6 @@ export const SearchInput = forwardRef<SearchInputRef, SearchInputProps>(
|
|
|
307
307
|
>
|
|
308
308
|
<IOText
|
|
309
309
|
color={theme["interactiveElem-default"]}
|
|
310
|
-
font={newTypefaceEnabled ? "Titillio" : "TitilliumSansPro"}
|
|
311
310
|
weight={"Semibold"}
|
|
312
311
|
size={buttonTextFontSize}
|
|
313
312
|
lineHeight={buttonTextLineHeight}
|
|
@@ -13,7 +13,7 @@ import Animated, {
|
|
|
13
13
|
useReducedMotion,
|
|
14
14
|
withSpring
|
|
15
15
|
} from "react-native-reanimated";
|
|
16
|
-
import {
|
|
16
|
+
import { useIOTheme } from "../../context";
|
|
17
17
|
import { IOColors, IOSpringValues, hexToRgba } from "../../core";
|
|
18
18
|
import { useScaleAnimation } from "../../hooks";
|
|
19
19
|
import { WithTestID } from "../../utils/types";
|
|
@@ -77,7 +77,6 @@ const TabItem = forwardRef(
|
|
|
77
77
|
useScaleAnimation("medium");
|
|
78
78
|
const theme = useIOTheme();
|
|
79
79
|
const reducedMotion = useReducedMotion();
|
|
80
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
81
80
|
|
|
82
81
|
const mapColorStates: Record<
|
|
83
82
|
NonNullable<TabItem["color"]>,
|
|
@@ -199,12 +198,7 @@ const TabItem = forwardRef(
|
|
|
199
198
|
{activeIcon && (
|
|
200
199
|
<Icon name={activeIcon} color={foregroundColor} size={16} />
|
|
201
200
|
)}
|
|
202
|
-
<IOText
|
|
203
|
-
size={14}
|
|
204
|
-
font={newTypefaceEnabled ? "Titillio" : "TitilliumSansPro"}
|
|
205
|
-
weight="Semibold"
|
|
206
|
-
color={foregroundColor}
|
|
207
|
-
>
|
|
201
|
+
<IOText size={14} weight="Semibold" color={foregroundColor}>
|
|
208
202
|
{label}
|
|
209
203
|
</IOText>
|
|
210
204
|
</Animated.View>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform, StyleSheet, View, ViewStyle } from "react-native";
|
|
2
|
-
import {
|
|
2
|
+
import { useIOTheme } from "../../context";
|
|
3
3
|
import {
|
|
4
4
|
IOColors,
|
|
5
5
|
IOSpacingScale,
|
|
@@ -155,7 +155,6 @@ export const Tag = ({
|
|
|
155
155
|
forceLightMode = false
|
|
156
156
|
}: Tag) => {
|
|
157
157
|
const theme = useIOTheme();
|
|
158
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
159
158
|
const { dynamicFontScale, spacingScaleMultiplier } = useIOFontDynamicScale();
|
|
160
159
|
|
|
161
160
|
const variantProps = getVariantProps(variant, icon);
|
|
@@ -203,7 +202,6 @@ export const Tag = ({
|
|
|
203
202
|
{text && (
|
|
204
203
|
<IOText
|
|
205
204
|
allowFontScaling={allowFontScaling}
|
|
206
|
-
font={newTypefaceEnabled ? "Titillio" : "TitilliumSansPro"}
|
|
207
205
|
weight={"Semibold"}
|
|
208
206
|
size={12}
|
|
209
207
|
lineHeight={16}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { throttle } from "lodash";
|
|
2
1
|
import { ReactNode, useCallback, useMemo, useRef, useState } from "react";
|
|
3
2
|
import { AccessibilityInfo, StyleSheet, View } from "react-native";
|
|
4
3
|
import Animated, {
|
|
@@ -10,6 +9,7 @@ import Animated, {
|
|
|
10
9
|
import { SafeAreaView } from "react-native-safe-area-context";
|
|
11
10
|
import { IOVisualCostants } from "../../core";
|
|
12
11
|
import { triggerHaptic } from "../../functions";
|
|
12
|
+
import { throttle } from "../../utils/throttle";
|
|
13
13
|
import { Dismissable } from "../templates";
|
|
14
14
|
import { ToastNotification } from "./ToastNotification";
|
|
15
15
|
import { ToastContext } from "./context";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { every, some } from "lodash";
|
|
2
1
|
import {
|
|
3
2
|
JSXElementConstructor,
|
|
4
3
|
PropsWithChildren,
|
|
@@ -194,8 +193,10 @@ export const Tooltip = ({
|
|
|
194
193
|
() => ARROWS_BY_PLACEMENT[currentPlacement],
|
|
195
194
|
[currentPlacement]
|
|
196
195
|
);
|
|
196
|
+
const childrenCoordsValues = Object.values(childrenCoords);
|
|
197
197
|
const isChildrenMeasurementFinished =
|
|
198
|
-
every(
|
|
198
|
+
childrenCoordsValues.every(isDefined) &&
|
|
199
|
+
childrenCoordsValues.some(isNotZero);
|
|
199
200
|
const isTooltipMeasurementCompleted = isDefined(tooltipLayout);
|
|
200
201
|
const tooltipVisibility = { opacity: isTooltipMeasurementCompleted ? 1 : 0 };
|
|
201
202
|
|
|
@@ -211,7 +212,7 @@ export const Tooltip = ({
|
|
|
211
212
|
width,
|
|
212
213
|
height
|
|
213
214
|
};
|
|
214
|
-
if (every(
|
|
215
|
+
if (Object.values(coords).every(isDefined)) {
|
|
215
216
|
setChildrenCoords(coords);
|
|
216
217
|
}
|
|
217
218
|
});
|
|
@@ -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,
|
|
@@ -16,9 +16,6 @@ type BodyStyleProps = TypographicStyleProps & {
|
|
|
16
16
|
export const bodyFontSize = 16;
|
|
17
17
|
export const bodyLineHeight = 24;
|
|
18
18
|
|
|
19
|
-
const fontName: IOFontFamily = "Titillio";
|
|
20
|
-
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
21
|
-
|
|
22
19
|
/**
|
|
23
20
|
* `Body` typographic style
|
|
24
21
|
*/
|
|
@@ -37,7 +34,6 @@ export const Body = forwardRef<View, BodyStyleProps>(
|
|
|
37
34
|
ref?: ForwardedRef<View>
|
|
38
35
|
) => {
|
|
39
36
|
const theme = useIOTheme();
|
|
40
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
41
37
|
|
|
42
38
|
const defaultColor = asLink
|
|
43
39
|
? theme["interactiveElem-default"]
|
|
@@ -46,8 +42,7 @@ export const Body = forwardRef<View, BodyStyleProps>(
|
|
|
46
42
|
const BodyProps: IOTextProps = {
|
|
47
43
|
...props,
|
|
48
44
|
dynamicTypeRamp: "body", // iOS only
|
|
49
|
-
|
|
50
|
-
weight: customWeight ? customWeight : "Regular",
|
|
45
|
+
weight: customWeight || "Regular",
|
|
51
46
|
size: bodyFontSize,
|
|
52
47
|
lineHeight: bodyLineHeight,
|
|
53
48
|
color: customColor ?? defaultColor,
|
|
@@ -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 BodySmallProps = 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
|
* `BodySmall` typographic style
|
|
21
18
|
*/
|
|
@@ -34,7 +31,6 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
|
|
|
34
31
|
ref?: ForwardedRef<View>
|
|
35
32
|
) => {
|
|
36
33
|
const theme = useIOTheme();
|
|
37
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
38
34
|
|
|
39
35
|
const defaultColor = asLink
|
|
40
36
|
? theme["interactiveElem-default"]
|
|
@@ -43,7 +39,6 @@ export const BodySmall = forwardRef<View, BodySmallProps>(
|
|
|
43
39
|
const BodySmallProps: IOTextProps = {
|
|
44
40
|
...props,
|
|
45
41
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
46
|
-
font: newTypefaceEnabled ? fontName : legacyFontName,
|
|
47
42
|
weight: customWeight ?? "Regular",
|
|
48
43
|
size: 14,
|
|
49
44
|
lineHeight: 21,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import { IOColors } from "../../core";
|
|
5
|
-
import {
|
|
5
|
+
import { IOFontSize } from "../../utils/fonts";
|
|
6
6
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
7
7
|
|
|
8
8
|
export const buttonTextFontSize: IOFontSize = 16;
|
|
@@ -11,19 +11,14 @@ export const buttonTextLineHeight = 20;
|
|
|
11
11
|
/* Needed to render `ButtonOutline` and`ButtonLink` because they use
|
|
12
12
|
`AnimatedText` for color transition through Reanimated */
|
|
13
13
|
const defaultColor: IOColors = "white";
|
|
14
|
-
const fontName: IOFontFamily = "Titillio";
|
|
15
|
-
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
16
14
|
|
|
17
15
|
/**
|
|
18
16
|
* `ButtonText` typographic style
|
|
19
17
|
*/
|
|
20
18
|
export const ButtonText = forwardRef<View, TypographicStyleProps>(
|
|
21
19
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
22
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
23
|
-
|
|
24
20
|
const ButtonTextProps: IOTextProps = {
|
|
25
21
|
...props,
|
|
26
|
-
font: newTypefaceEnabled ? fontName : legacyFontName,
|
|
27
22
|
weight: "Semibold",
|
|
28
23
|
size: buttonTextFontSize,
|
|
29
24
|
lineHeight: buttonTextLineHeight,
|
|
@@ -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
|
|
|
@@ -12,12 +12,10 @@ export const captionFontSize: IOFontSize = 12;
|
|
|
12
12
|
export const Caption = forwardRef<View, TypographicStyleProps>(
|
|
13
13
|
({ color: customColor, ...props }, ref?: ForwardedRef<View>) => {
|
|
14
14
|
const theme = useIOTheme();
|
|
15
|
-
const { newTypefaceEnabled } = useIONewTypeface();
|
|
16
15
|
|
|
17
16
|
const CaptionProps: IOTextProps = {
|
|
18
17
|
...props,
|
|
19
18
|
dynamicTypeRamp: "caption1", // iOS only
|
|
20
|
-
font: newTypefaceEnabled ? "Titillio" : "TitilliumSansPro",
|
|
21
19
|
weight: "Regular",
|
|
22
20
|
size: captionFontSize,
|
|
23
21
|
color: customColor ?? theme["textBody-default"],
|
|
@@ -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 {
|
|
11
|
+
import { useIONewTypeface } from "../../context";
|
|
12
12
|
import { IOColors } from "../../core";
|
|
13
13
|
import { useBoldTextEnabled } from "../../utils/accessibility";
|
|
14
14
|
import {
|
|
@@ -74,11 +74,11 @@ export type TypographicStyleAsLinkProps =
|
|
|
74
74
|
* @param args the args of the function {@link makeFontStyleObject}
|
|
75
75
|
*/
|
|
76
76
|
const calculateTextStyle = (
|
|
77
|
-
color
|
|
77
|
+
color?: IOColors,
|
|
78
78
|
...args: Parameters<typeof makeFontStyleObject>
|
|
79
79
|
) => ({
|
|
80
80
|
...makeFontStyleObject(...args),
|
|
81
|
-
color: IOColors[color]
|
|
81
|
+
color: color ? IOColors[color] : undefined
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -106,21 +106,24 @@ export const IOText = forwardRef<View, IOTextProps>(
|
|
|
106
106
|
},
|
|
107
107
|
ref
|
|
108
108
|
) => {
|
|
109
|
-
const theme = useIOTheme();
|
|
110
109
|
const boldEnabled = useBoldTextEnabled();
|
|
110
|
+
const { newTypefaceEnabled } = useIONewTypeface();
|
|
111
|
+
|
|
112
|
+
const computedFont =
|
|
113
|
+
font || (newTypefaceEnabled ? "Titillio" : "TitilliumSansPro");
|
|
111
114
|
|
|
112
115
|
const computedStyleObj = useMemo(
|
|
113
116
|
() =>
|
|
114
117
|
calculateTextStyle(
|
|
115
|
-
color
|
|
118
|
+
color,
|
|
116
119
|
size,
|
|
117
|
-
|
|
120
|
+
computedFont,
|
|
118
121
|
lineHeight,
|
|
119
122
|
weight,
|
|
120
123
|
fontStyle,
|
|
121
124
|
boldEnabled
|
|
122
125
|
),
|
|
123
|
-
[color,
|
|
126
|
+
[color, size, computedFont, lineHeight, weight, fontStyle, boldEnabled]
|
|
124
127
|
);
|
|
125
128
|
|
|
126
129
|
/* 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,
|