@pagopa/io-app-design-system 3.1.0 → 4.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/alert/Alert.js +1 -2
- package/lib/commonjs/components/alert/Alert.js.map +1 -1
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js +2 -2
- package/lib/commonjs/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/commonjs/components/banner/Banner.js +1 -1
- package/lib/commonjs/components/banner/Banner.js.map +1 -1
- package/lib/commonjs/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
- package/lib/commonjs/components/buttons/ButtonLink.js +1 -1
- package/lib/commonjs/components/buttons/ButtonLink.js.map +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js +1 -1
- package/lib/commonjs/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/commonjs/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
- package/lib/commonjs/components/featureInfo/FeatureInfo.js +3 -2
- package/lib/commonjs/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/commonjs/components/layout/HeaderFirstLevel.js +1 -0
- package/lib/commonjs/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js +1 -1
- package/lib/commonjs/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js +1 -1
- package/lib/commonjs/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNav.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js +1 -1
- package/lib/commonjs/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js +1 -1
- package/lib/commonjs/components/listitems/ListItemRadio.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js +2 -2
- package/lib/commonjs/components/listitems/ListItemRadioWithAmount.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js +1 -1
- package/lib/commonjs/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +2 -2
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
- package/lib/commonjs/components/modules/ModuleAttachment.js +1 -1
- package/lib/commonjs/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js +1 -1
- package/lib/commonjs/components/modules/ModuleCheckout.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js +1 -1
- package/lib/commonjs/components/modules/ModuleCredential.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleNavigation.js +3 -2
- package/lib/commonjs/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/commonjs/components/modules/ModulePaymentNotice.js +2 -2
- package/lib/commonjs/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/commonjs/components/modules/ModuleSummary.js +1 -1
- package/lib/commonjs/components/modules/ModuleSummary.js.map +1 -1
- package/lib/commonjs/components/otpInput/BoxedInput.js +4 -6
- package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -1
- package/lib/commonjs/components/otpInput/OTPInput.js +5 -4
- package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -1
- package/lib/commonjs/components/tabs/TabItem.js +1 -1
- package/lib/commonjs/components/tabs/TabItem.js.map +1 -1
- package/lib/commonjs/components/textInput/TextInputBase.js +2 -2
- package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -1
- package/lib/commonjs/components/typography/{LabelSmall.js → BodySmall.js} +8 -10
- package/lib/commonjs/components/typography/BodySmall.js.map +1 -0
- package/lib/commonjs/components/typography/ButtonText.js +1 -3
- package/lib/commonjs/components/typography/ButtonText.js.map +1 -1
- package/lib/commonjs/components/typography/H3.js +3 -6
- package/lib/commonjs/components/typography/H3.js.map +1 -1
- package/lib/commonjs/components/typography/H6.js +4 -5
- package/lib/commonjs/components/typography/H6.js.map +1 -1
- package/lib/commonjs/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
- package/lib/commonjs/components/typography/__test__/typography.test.js +6 -18
- package/lib/commonjs/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/commonjs/components/typography/index.js +28 -72
- package/lib/commonjs/components/typography/index.js.map +1 -1
- package/lib/module/components/alert/Alert.js +2 -3
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/alert/AlertEdgeToEdge.js +2 -2
- package/lib/module/components/alert/AlertEdgeToEdge.js.map +1 -1
- package/lib/module/components/banner/Banner.js +2 -2
- package/lib/module/components/banner/Banner.js.map +1 -1
- package/lib/module/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
- package/lib/module/components/buttons/ButtonLink.js +1 -1
- package/lib/module/components/buttons/ButtonLink.js.map +1 -1
- package/lib/module/components/buttons/ButtonOutline.js +1 -1
- package/lib/module/components/buttons/ButtonOutline.js.map +1 -1
- package/lib/module/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
- package/lib/module/components/featureInfo/FeatureInfo.js +4 -3
- package/lib/module/components/featureInfo/FeatureInfo.js.map +1 -1
- package/lib/module/components/layout/HeaderFirstLevel.js +1 -0
- package/lib/module/components/layout/HeaderFirstLevel.js.map +1 -1
- package/lib/module/components/listitems/ListItemCheckbox.js +2 -2
- package/lib/module/components/listitems/ListItemCheckbox.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfo.js +2 -2
- package/lib/module/components/listitems/ListItemInfo.js.map +1 -1
- package/lib/module/components/listitems/ListItemInfoCopy.js +2 -2
- package/lib/module/components/listitems/ListItemInfoCopy.js.map +1 -1
- package/lib/module/components/listitems/ListItemNav.js +2 -2
- package/lib/module/components/listitems/ListItemNav.js.map +1 -1
- package/lib/module/components/listitems/ListItemNavAlert.js +2 -2
- package/lib/module/components/listitems/ListItemNavAlert.js.map +1 -1
- package/lib/module/components/listitems/ListItemRadio.js +2 -2
- package/lib/module/components/listitems/ListItemRadio.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/ListItemSwitch.js +2 -2
- package/lib/module/components/listitems/ListItemSwitch.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +3 -3
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
- package/lib/module/components/modules/ModuleAttachment.js +2 -2
- package/lib/module/components/modules/ModuleAttachment.js.map +1 -1
- package/lib/module/components/modules/ModuleCheckout.js +2 -2
- package/lib/module/components/modules/ModuleCheckout.js.map +1 -1
- package/lib/module/components/modules/ModuleCredential.js +2 -2
- package/lib/module/components/modules/ModuleCredential.js.map +1 -1
- package/lib/module/components/modules/ModuleNavigation.js +4 -3
- package/lib/module/components/modules/ModuleNavigation.js.map +1 -1
- package/lib/module/components/modules/ModulePaymentNotice.js +3 -3
- package/lib/module/components/modules/ModulePaymentNotice.js.map +1 -1
- package/lib/module/components/modules/ModuleSummary.js +2 -2
- package/lib/module/components/modules/ModuleSummary.js.map +1 -1
- package/lib/module/components/otpInput/BoxedInput.js +5 -7
- package/lib/module/components/otpInput/BoxedInput.js.map +1 -1
- package/lib/module/components/otpInput/OTPInput.js +5 -4
- package/lib/module/components/otpInput/OTPInput.js.map +1 -1
- package/lib/module/components/tabs/TabItem.js +2 -2
- package/lib/module/components/tabs/TabItem.js.map +1 -1
- package/lib/module/components/textInput/TextInputBase.js +3 -3
- package/lib/module/components/textInput/TextInputBase.js.map +1 -1
- package/lib/module/components/typography/{LabelSmall.js → BodySmall.js} +6 -8
- package/lib/module/components/typography/BodySmall.js.map +1 -0
- package/lib/module/components/typography/ButtonText.js +1 -3
- package/lib/module/components/typography/ButtonText.js.map +1 -1
- package/lib/module/components/typography/H3.js +3 -6
- package/lib/module/components/typography/H3.js.map +1 -1
- package/lib/module/components/typography/H6.js +4 -5
- package/lib/module/components/typography/H6.js.map +1 -1
- package/lib/module/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
- package/lib/module/components/typography/__test__/typography.test.js +6 -18
- package/lib/module/components/typography/__test__/typography.test.js.map +1 -1
- package/lib/module/components/typography/index.js +6 -10
- package/lib/module/components/typography/index.js.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/banner/Banner.d.ts +1 -1
- package/lib/typescript/components/banner/Banner.d.ts.map +1 -1
- package/lib/typescript/components/featureInfo/FeatureInfo.d.ts.map +1 -1
- package/lib/typescript/components/layout/HeaderFirstLevel.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemSwitch.d.ts.map +1 -1
- package/lib/typescript/components/modules/ModuleNavigation.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -1
- package/lib/typescript/components/typography/Body.d.ts +1 -1
- package/lib/typescript/components/typography/Body.d.ts.map +1 -1
- package/lib/typescript/components/typography/BodySmall.d.ts +13 -0
- package/lib/typescript/components/typography/BodySmall.d.ts.map +1 -0
- package/lib/typescript/components/typography/ButtonText.d.ts.map +1 -1
- package/lib/typescript/components/typography/H3.d.ts +2 -0
- package/lib/typescript/components/typography/H3.d.ts.map +1 -1
- package/lib/typescript/components/typography/H6.d.ts.map +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts +1 -1
- package/lib/typescript/components/typography/LabelMini.d.ts.map +1 -1
- package/lib/typescript/components/typography/index.d.ts +6 -10
- package/lib/typescript/components/typography/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/alert/Alert.tsx +3 -4
- package/src/components/alert/AlertEdgeToEdge.tsx +3 -3
- package/src/components/banner/Banner.tsx +7 -5
- package/src/components/banner/__test__/__snapshots__/banner.test.tsx.snap +2 -2
- package/src/components/buttons/ButtonLink.tsx +1 -1
- package/src/components/buttons/ButtonOutline.tsx +1 -1
- package/src/components/buttons/__test__/__snapshots__/button.test.tsx.snap +3 -3
- package/src/components/featureInfo/FeatureInfo.tsx +6 -6
- package/src/components/layout/HeaderFirstLevel.tsx +1 -0
- package/src/components/listitems/ListItemCheckbox.tsx +3 -3
- package/src/components/listitems/ListItemInfo.tsx +3 -3
- package/src/components/listitems/ListItemInfoCopy.tsx +3 -3
- package/src/components/listitems/ListItemNav.tsx +3 -3
- package/src/components/listitems/ListItemNavAlert.tsx +3 -3
- package/src/components/listitems/ListItemRadio.tsx +3 -3
- package/src/components/listitems/ListItemRadioWithAmount.tsx +5 -5
- package/src/components/listitems/ListItemSwitch.tsx +4 -4
- package/src/components/listitems/ListItemTransaction.tsx +5 -5
- package/src/components/listitems/__test__/__snapshots__/listitem.test.tsx.snap +7 -7
- package/src/components/modules/ModuleAttachment.tsx +3 -3
- package/src/components/modules/ModuleCheckout.tsx +3 -3
- package/src/components/modules/ModuleCredential.tsx +3 -3
- package/src/components/modules/ModuleNavigation.tsx +6 -4
- package/src/components/modules/ModulePaymentNotice.tsx +5 -5
- package/src/components/modules/ModuleSummary.tsx +3 -3
- package/src/components/otpInput/BoxedInput.tsx +6 -5
- package/src/components/otpInput/OTPInput.tsx +23 -8
- package/src/components/tabs/TabItem.tsx +3 -3
- package/src/components/textInput/TextInputBase.tsx +5 -5
- package/src/components/typography/Body.tsx +1 -1
- package/src/components/typography/{LabelSmall.tsx → BodySmall.tsx} +7 -14
- package/src/components/typography/ButtonText.tsx +2 -4
- package/src/components/typography/H3.tsx +11 -8
- package/src/components/typography/H6.tsx +5 -6
- package/src/components/typography/LabelMini.tsx +1 -1
- package/src/components/typography/__test__/__snapshots__/typography.test.tsx.snap +118 -161
- package/src/components/typography/__test__/typography.test.tsx +8 -24
- package/src/components/typography/index.tsx +6 -10
- package/lib/commonjs/components/typography/BaseTypography.js +0 -52
- package/lib/commonjs/components/typography/BaseTypography.js.map +0 -1
- package/lib/commonjs/components/typography/Chip.js +0 -41
- package/lib/commonjs/components/typography/Chip.js.map +0 -1
- package/lib/commonjs/components/typography/Factory.js +0 -62
- package/lib/commonjs/components/typography/Factory.js.map +0 -1
- package/lib/commonjs/components/typography/Label.js +0 -51
- package/lib/commonjs/components/typography/Label.js.map +0 -1
- package/lib/commonjs/components/typography/LabelSmall.js.map +0 -1
- package/lib/module/components/typography/BaseTypography.js +0 -44
- package/lib/module/components/typography/BaseTypography.js.map +0 -1
- package/lib/module/components/typography/Chip.js +0 -32
- package/lib/module/components/typography/Chip.js.map +0 -1
- package/lib/module/components/typography/Factory.js +0 -55
- package/lib/module/components/typography/Factory.js.map +0 -1
- package/lib/module/components/typography/Label.js +0 -42
- package/lib/module/components/typography/Label.js.map +0 -1
- package/lib/module/components/typography/LabelSmall.js.map +0 -1
- package/lib/typescript/components/typography/BaseTypography.d.ts +0 -29
- package/lib/typescript/components/typography/BaseTypography.d.ts.map +0 -1
- package/lib/typescript/components/typography/Chip.d.ts +0 -13
- package/lib/typescript/components/typography/Chip.d.ts.map +0 -1
- package/lib/typescript/components/typography/Factory.d.ts +0 -43
- package/lib/typescript/components/typography/Factory.d.ts.map +0 -1
- package/lib/typescript/components/typography/Label.d.ts +0 -13
- package/lib/typescript/components/typography/Label.d.ts.map +0 -1
- package/lib/typescript/components/typography/LabelSmall.d.ts +0 -13
- package/lib/typescript/components/typography/LabelSmall.d.ts.map +0 -1
- package/src/components/typography/BaseTypography.tsx +0 -71
- package/src/components/typography/Chip.tsx +0 -33
- package/src/components/typography/Factory.tsx +0 -98
- package/src/components/typography/Label.tsx +0 -62
|
@@ -6,7 +6,7 @@ import { WithTestID } from "../../utils/types";
|
|
|
6
6
|
import { Badge } from "../badge";
|
|
7
7
|
import { Icon } from "../icons";
|
|
8
8
|
import { HStack, VStack } from "../stack";
|
|
9
|
-
import {
|
|
9
|
+
import { Body, H6, BodySmall } from "../typography";
|
|
10
10
|
import { ModuleStatic } from "./ModuleStatic";
|
|
11
11
|
import { PressableModuleBase } from "./PressableModuleBase";
|
|
12
12
|
|
|
@@ -93,22 +93,22 @@ const ModulePaymentNoticeContent = ({
|
|
|
93
93
|
<HStack space={IOListItemVisualParams.iconMargin as IOSpacer}>
|
|
94
94
|
<View style={{ flexGrow: 1, flexShrink: 1 }}>
|
|
95
95
|
{title && (
|
|
96
|
-
<
|
|
96
|
+
<BodySmall
|
|
97
97
|
numberOfLines={1}
|
|
98
98
|
weight="Regular"
|
|
99
99
|
color={theme["textBody-tertiary"]}
|
|
100
100
|
>
|
|
101
101
|
{title}
|
|
102
|
-
</
|
|
102
|
+
</BodySmall>
|
|
103
103
|
)}
|
|
104
104
|
{subtitle && (
|
|
105
|
-
<
|
|
105
|
+
<Body
|
|
106
106
|
color={theme["interactiveElem-default"]}
|
|
107
107
|
numberOfLines={2}
|
|
108
108
|
weight="Semibold"
|
|
109
109
|
>
|
|
110
110
|
{subtitle}
|
|
111
|
-
</
|
|
111
|
+
</Body>
|
|
112
112
|
)}
|
|
113
113
|
</View>
|
|
114
114
|
<View style={styles.endBlock}>
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useIOTheme } from "../../core";
|
|
4
4
|
import { IOIcons, Icon } from "../icons";
|
|
5
|
-
import { H6,
|
|
5
|
+
import { H6, BodySmall } from "../typography";
|
|
6
6
|
import {
|
|
7
7
|
PressableModuleBase,
|
|
8
8
|
PressableModuleBaseProps
|
|
@@ -28,9 +28,9 @@ export const ModuleSummary = ({
|
|
|
28
28
|
<View style={{ flexGrow: 1, flexShrink: 1 }}>
|
|
29
29
|
<H6 color={theme["textBody-default"]}>{label}</H6>
|
|
30
30
|
{description && (
|
|
31
|
-
<
|
|
31
|
+
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
32
32
|
{description}
|
|
33
|
-
</
|
|
33
|
+
</BodySmall>
|
|
34
34
|
)}
|
|
35
35
|
</View>
|
|
36
36
|
<View style={{ marginLeft: 8 }}>
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { useMemo } from "react";
|
|
3
3
|
import { StyleSheet, View } from "react-native";
|
|
4
4
|
import { IOColors } from "../../core";
|
|
5
|
-
import {
|
|
5
|
+
import { H6, IOText } from "../typography";
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
8
|
status: "default" | "focus" | "error";
|
|
@@ -36,15 +36,16 @@ const styles = StyleSheet.create({
|
|
|
36
36
|
|
|
37
37
|
// FIXME Replace this component with H3 once the legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
38
38
|
const SecretValue = () => (
|
|
39
|
-
<
|
|
39
|
+
<IOText
|
|
40
40
|
font="DMMono"
|
|
41
41
|
weight="Semibold"
|
|
42
|
-
color="
|
|
43
|
-
|
|
42
|
+
color="grey-850"
|
|
43
|
+
size={22}
|
|
44
|
+
lineHeight={33}
|
|
44
45
|
accessible={false}
|
|
45
46
|
>
|
|
46
47
|
{"•"}
|
|
47
|
-
</
|
|
48
|
+
</IOText>
|
|
48
49
|
);
|
|
49
50
|
|
|
50
51
|
export const BoxedInput = ({ status, value, secret }: Props) => {
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
AccessibilityInfo,
|
|
4
|
+
NativeSyntheticEvent,
|
|
5
|
+
Pressable,
|
|
6
|
+
TextInput,
|
|
7
|
+
TextInputKeyPressEventData,
|
|
8
|
+
View
|
|
9
|
+
} from "react-native";
|
|
3
10
|
import Animated from "react-native-reanimated";
|
|
4
11
|
import { IOStyles } from "../../core/IOStyles";
|
|
5
|
-
import { LabelSmall } from "../typography";
|
|
6
12
|
import { triggerHaptic } from "../../functions";
|
|
7
|
-
import { VSpacer } from "../spacer";
|
|
8
13
|
import { useErrorShakeAnimation } from "../../utils/hooks/useErrorShakeAnimation";
|
|
14
|
+
import { VSpacer } from "../spacer";
|
|
15
|
+
import { BodySmall } from "../typography";
|
|
9
16
|
import { BoxedInput } from "./BoxedInput";
|
|
10
17
|
|
|
11
18
|
type Props = {
|
|
@@ -95,11 +102,15 @@ export const OTPInput = React.forwardRef<View, Props>(
|
|
|
95
102
|
handleValidate(value);
|
|
96
103
|
};
|
|
97
104
|
|
|
98
|
-
const handleKeyPress = ({
|
|
105
|
+
const handleKeyPress = ({
|
|
106
|
+
nativeEvent
|
|
107
|
+
}: NativeSyntheticEvent<TextInputKeyPressEventData>) => {
|
|
99
108
|
switch (nativeEvent.key) {
|
|
100
|
-
case
|
|
109
|
+
case "Backspace":
|
|
101
110
|
if (deleteButtonAccessibilityLabel && value.length > 0) {
|
|
102
|
-
AccessibilityInfo.announceForAccessibility(
|
|
111
|
+
AccessibilityInfo.announceForAccessibility(
|
|
112
|
+
deleteButtonAccessibilityLabel
|
|
113
|
+
);
|
|
103
114
|
}
|
|
104
115
|
break;
|
|
105
116
|
default:
|
|
@@ -156,9 +167,13 @@ export const OTPInput = React.forwardRef<View, Props>(
|
|
|
156
167
|
</Pressable>
|
|
157
168
|
<VSpacer size={4} />
|
|
158
169
|
{hasError && errorMessage && (
|
|
159
|
-
<
|
|
170
|
+
<BodySmall
|
|
171
|
+
weight="Semibold"
|
|
172
|
+
color="error-850"
|
|
173
|
+
style={{ textAlign: "center" }}
|
|
174
|
+
>
|
|
160
175
|
{errorMessage}
|
|
161
|
-
</
|
|
176
|
+
</BodySmall>
|
|
162
177
|
)}
|
|
163
178
|
</Animated.View>
|
|
164
179
|
);
|
|
@@ -20,7 +20,7 @@ import { useSpringPressProgressValue } from "../../utils/hooks/useSpringPressPro
|
|
|
20
20
|
import { WithTestID } from "../../utils/types";
|
|
21
21
|
import { IOIcons, Icon } from "../icons";
|
|
22
22
|
import { HSpacer } from "../spacer";
|
|
23
|
-
import {
|
|
23
|
+
import { BodySmall } from "../typography";
|
|
24
24
|
|
|
25
25
|
type ColorMode = "light" | "dark";
|
|
26
26
|
|
|
@@ -257,9 +257,9 @@ const TabItem = ({
|
|
|
257
257
|
<HSpacer size={4} />
|
|
258
258
|
</>
|
|
259
259
|
)}
|
|
260
|
-
<
|
|
260
|
+
<BodySmall weight="Semibold" color={foregroundColor}>
|
|
261
261
|
{label}
|
|
262
|
-
</
|
|
262
|
+
</BodySmall>
|
|
263
263
|
</Animated.View>
|
|
264
264
|
</Pressable>
|
|
265
265
|
);
|
|
@@ -31,7 +31,7 @@ import { RNTextInputProps, getInputPropsByType } from "../../utils/textInput";
|
|
|
31
31
|
import { InputType, WithTestID } from "../../utils/types";
|
|
32
32
|
import { IOIconSizeScale, IOIcons, Icon } from "../icons";
|
|
33
33
|
import { HSpacer } from "../spacer";
|
|
34
|
-
import {
|
|
34
|
+
import { BodySmall } from "../typography";
|
|
35
35
|
|
|
36
36
|
type InputStatus = "initial" | "focused" | "disabled" | "error";
|
|
37
37
|
|
|
@@ -186,15 +186,15 @@ const HelperRow = ({
|
|
|
186
186
|
}
|
|
187
187
|
>
|
|
188
188
|
{bottomMessage && (
|
|
189
|
-
<
|
|
189
|
+
<BodySmall weight="Regular" color={bottomMessageColor}>
|
|
190
190
|
{bottomMessage}
|
|
191
|
-
</
|
|
191
|
+
</BodySmall>
|
|
192
192
|
)}
|
|
193
193
|
{counterLimit && (
|
|
194
|
-
<
|
|
194
|
+
<BodySmall
|
|
195
195
|
weight="Regular"
|
|
196
196
|
color="grey-700"
|
|
197
|
-
>{`${valueCount} / ${counterLimit}`}</
|
|
197
|
+
>{`${valueCount} / ${counterLimit}`}</BodySmall>
|
|
198
198
|
)}
|
|
199
199
|
</View>
|
|
200
200
|
);
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./IOText";
|
|
11
11
|
|
|
12
12
|
type BodyStyleProps = TypographicStyleProps & {
|
|
13
|
-
weight?: Extract<IOFontWeight, "Regular" | "Semibold"
|
|
13
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
16
|
export const bodyFontSize = 16;
|
|
@@ -9,20 +9,17 @@ import {
|
|
|
9
9
|
TypographicStyleProps
|
|
10
10
|
} from "./IOText";
|
|
11
11
|
|
|
12
|
-
type
|
|
13
|
-
weight?: Extract<IOFontWeight, "Regular" | "Semibold"
|
|
12
|
+
type BodySmallProps = TypographicStyleProps & {
|
|
13
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
16
|
const fontName: IOFontFamily = "Titillio";
|
|
17
|
-
const fontWeight: IOFontWeight = "Semibold";
|
|
18
|
-
|
|
19
17
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
20
|
-
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
21
18
|
|
|
22
19
|
/**
|
|
23
|
-
* `
|
|
20
|
+
* `BodySmall` typographic style
|
|
24
21
|
*/
|
|
25
|
-
export const
|
|
22
|
+
export const BodySmall = forwardRef<View, BodySmallProps>(
|
|
26
23
|
(
|
|
27
24
|
{ weight: customWeight, color: customColor, asLink, ...props },
|
|
28
25
|
ref?: ForwardedRef<View>
|
|
@@ -34,15 +31,11 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
|
|
|
34
31
|
? theme["interactiveElem-default"]
|
|
35
32
|
: theme["textBody-tertiary"];
|
|
36
33
|
|
|
37
|
-
const
|
|
34
|
+
const BodySmallProps: IOTextProps = {
|
|
38
35
|
...props,
|
|
39
36
|
dynamicTypeRamp: "footnote" /* iOS only */,
|
|
40
37
|
font: isExperimental ? fontName : legacyFontName,
|
|
41
|
-
weight: customWeight
|
|
42
|
-
? customWeight
|
|
43
|
-
: isExperimental
|
|
44
|
-
? fontWeight
|
|
45
|
-
: legacyFontWeight,
|
|
38
|
+
weight: customWeight ?? "Regular",
|
|
46
39
|
size: 14,
|
|
47
40
|
lineHeight: 21,
|
|
48
41
|
color: customColor ?? defaultColor,
|
|
@@ -55,7 +48,7 @@ export const LabelSmall = forwardRef<View, LabelSmallProps>(
|
|
|
55
48
|
};
|
|
56
49
|
|
|
57
50
|
return (
|
|
58
|
-
<IOText ref={ref} {...
|
|
51
|
+
<IOText ref={ref} {...BodySmallProps}>
|
|
59
52
|
{props.children}
|
|
60
53
|
</IOText>
|
|
61
54
|
);
|
|
@@ -2,7 +2,7 @@ import React, { ForwardedRef, forwardRef } from "react";
|
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { useIOExperimentalDesign } from "../../core";
|
|
4
4
|
import { IOColors } from "../../core/IOColors";
|
|
5
|
-
import { IOFontFamily, IOFontSize
|
|
5
|
+
import { IOFontFamily, IOFontSize } from "../../utils/fonts";
|
|
6
6
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
7
7
|
|
|
8
8
|
export const buttonTextFontSize: IOFontSize = 16;
|
|
@@ -10,11 +10,9 @@ export const buttonTextFontSize: IOFontSize = 16;
|
|
|
10
10
|
`AnimatedText` for color transition through Reanimated */
|
|
11
11
|
const defaultColor: IOColors = "white";
|
|
12
12
|
const fontName: IOFontFamily = "Titillio";
|
|
13
|
-
const fontWeight: IOFontWeight = "Semibold";
|
|
14
13
|
|
|
15
14
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
16
15
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
17
|
-
const legacyFontWeight: IOFontWeight = "Bold";
|
|
18
16
|
|
|
19
17
|
/**
|
|
20
18
|
* `ButtonText` typographic style
|
|
@@ -26,7 +24,7 @@ export const ButtonText = forwardRef<View, TypographicStyleProps>(
|
|
|
26
24
|
const ButtonTextProps: IOTextProps = {
|
|
27
25
|
...props,
|
|
28
26
|
font: isExperimental ? fontName : legacyFontName,
|
|
29
|
-
weight:
|
|
27
|
+
weight: "Semibold",
|
|
30
28
|
size: buttonTextFontSize,
|
|
31
29
|
lineHeight: 20,
|
|
32
30
|
color: customColor ?? defaultColor
|
|
@@ -1,26 +1,29 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
|
-
import {
|
|
3
|
+
import { useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
4
|
import { IOFontFamily, IOFontSize, IOFontWeight } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
type H3StyleProps = TypographicStyleProps & {
|
|
8
|
+
weight?: Extract<IOFontWeight, "Semibold" | "Bold">;
|
|
9
|
+
};
|
|
8
10
|
|
|
9
11
|
/* Common typographic styles */
|
|
10
12
|
export const h3FontSize: IOFontSize = 22;
|
|
11
13
|
export const h3LineHeight = 33;
|
|
12
14
|
const fontName: IOFontFamily = "Titillio";
|
|
13
|
-
const fontWeight: IOFontWeight = "Semibold";
|
|
14
15
|
|
|
15
16
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
16
17
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
17
|
-
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* `H3` typographic style
|
|
21
21
|
*/
|
|
22
|
-
export const H3 = forwardRef<View,
|
|
23
|
-
(
|
|
22
|
+
export const H3 = forwardRef<View, H3StyleProps>(
|
|
23
|
+
(
|
|
24
|
+
{ weight: customWeight, color: customColor, ...props },
|
|
25
|
+
ref?: ForwardedRef<View>
|
|
26
|
+
) => {
|
|
24
27
|
const theme = useIOTheme();
|
|
25
28
|
const { isExperimental } = useIOExperimentalDesign();
|
|
26
29
|
|
|
@@ -28,10 +31,10 @@ export const H3 = forwardRef<View, TypographicStyleProps>(
|
|
|
28
31
|
...props,
|
|
29
32
|
dynamicTypeRamp: "title2", // iOS only
|
|
30
33
|
font: isExperimental ? fontName : legacyFontName,
|
|
31
|
-
weight:
|
|
34
|
+
weight: customWeight ?? "Semibold",
|
|
32
35
|
size: h3FontSize,
|
|
33
36
|
lineHeight: h3LineHeight,
|
|
34
|
-
color: customColor ?? theme[
|
|
37
|
+
color: customColor ?? theme["textHeading-default"]
|
|
35
38
|
};
|
|
36
39
|
|
|
37
40
|
return (
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
import React, { ForwardedRef, forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import { IOTheme, useIOExperimentalDesign, useIOTheme } from "../../core";
|
|
4
|
-
import { IOFontFamily, IOFontSize
|
|
4
|
+
import { IOFontFamily, IOFontSize } from "../../utils/fonts";
|
|
5
5
|
import { IOText, IOTextProps, TypographicStyleProps } from "./IOText";
|
|
6
6
|
|
|
7
7
|
const defaultColor: keyof IOTheme = "textHeading-default";
|
|
8
8
|
|
|
9
|
-
export const h6FontSize: IOFontSize =
|
|
9
|
+
export const h6FontSize: IOFontSize = 16;
|
|
10
10
|
export const h6LineHeight = 24;
|
|
11
11
|
const fontName: IOFontFamily = "Titillio";
|
|
12
|
-
const fontWeight: IOFontWeight = "Semibold";
|
|
13
12
|
|
|
14
13
|
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
14
|
+
const legacyFontSize: IOFontSize = 18;
|
|
15
15
|
const legacyFontName: IOFontFamily = "TitilliumSansPro";
|
|
16
|
-
const legacyFontWeight: IOFontWeight = "Semibold";
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* `H6` typographic style
|
|
@@ -27,9 +26,9 @@ export const H6 = forwardRef<View, TypographicStyleProps>(
|
|
|
27
26
|
...props,
|
|
28
27
|
dynamicTypeRamp: "headline", // iOS only
|
|
29
28
|
font: isExperimental ? fontName : legacyFontName,
|
|
30
|
-
size: h6FontSize,
|
|
29
|
+
size: isExperimental ? h6FontSize : legacyFontSize,
|
|
31
30
|
lineHeight: h6LineHeight,
|
|
32
|
-
weight:
|
|
31
|
+
weight: "Semibold",
|
|
33
32
|
color: customColor ?? theme[defaultColor]
|
|
34
33
|
};
|
|
35
34
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./IOText";
|
|
11
11
|
|
|
12
12
|
type LabelMiniProps = TypographicStyleProps & {
|
|
13
|
-
weight?: Extract<IOFontWeight, "Regular" | "Semibold"
|
|
13
|
+
weight?: Extract<IOFontWeight, "Regular" | "Semibold">;
|
|
14
14
|
} & TypographicStyleAsLinkProps;
|
|
15
15
|
|
|
16
16
|
const fontName: IOFontFamily = "Titillio";
|