@pagopa/io-app-design-system 1.3.2 → 1.4.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.
Files changed (123) hide show
  1. package/README.md +1 -0
  2. package/lib/commonjs/components/accordion/AccordionItem.js +137 -0
  3. package/lib/commonjs/components/accordion/AccordionItem.js.map +1 -0
  4. package/lib/commonjs/components/accordion/index.js +4 -4
  5. package/lib/commonjs/components/accordion/index.js.map +1 -1
  6. package/lib/commonjs/components/common/LogoPaymentWithFallback.js +49 -0
  7. package/lib/commonjs/components/common/LogoPaymentWithFallback.js.map +1 -0
  8. package/lib/commonjs/components/index.js +11 -0
  9. package/lib/commonjs/components/index.js.map +1 -1
  10. package/lib/commonjs/components/listitems/ListItemTransaction.js +47 -29
  11. package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
  12. package/lib/commonjs/components/{accordion/IOAccordion.js → textInput/TextInput.js} +5 -27
  13. package/lib/commonjs/components/textInput/TextInput.js.map +1 -0
  14. package/lib/commonjs/components/textInput/TextInputBase.js +233 -0
  15. package/lib/commonjs/components/textInput/TextInputBase.js.map +1 -0
  16. package/lib/commonjs/components/textInput/TextInputPassword.js +36 -0
  17. package/lib/commonjs/components/textInput/TextInputPassword.js.map +1 -0
  18. package/lib/commonjs/components/textInput/TextInputValidation.js +57 -0
  19. package/lib/commonjs/components/textInput/TextInputValidation.js.map +1 -0
  20. package/lib/commonjs/components/textInput/index.js +39 -0
  21. package/lib/commonjs/components/textInput/index.js.map +1 -0
  22. package/lib/commonjs/core/IOAnimations.js +5 -0
  23. package/lib/commonjs/core/IOAnimations.js.map +1 -1
  24. package/lib/commonjs/core/IOShapes.js +3 -1
  25. package/lib/commonjs/core/IOShapes.js.map +1 -1
  26. package/lib/commonjs/utils/accessibility.js +19 -0
  27. package/lib/commonjs/utils/accessibility.js.map +1 -0
  28. package/lib/commonjs/utils/object.js +16 -0
  29. package/lib/commonjs/utils/object.js.map +1 -0
  30. package/lib/commonjs/utils/textInput/index.js +24 -0
  31. package/lib/commonjs/utils/textInput/index.js.map +1 -0
  32. package/lib/commonjs/utils/url.js +14 -0
  33. package/lib/commonjs/utils/url.js.map +1 -0
  34. package/lib/module/components/accordion/AccordionItem.js +126 -0
  35. package/lib/module/components/accordion/AccordionItem.js.map +1 -0
  36. package/lib/module/components/accordion/index.js +1 -1
  37. package/lib/module/components/accordion/index.js.map +1 -1
  38. package/lib/module/components/common/LogoPaymentWithFallback.js +40 -0
  39. package/lib/module/components/common/LogoPaymentWithFallback.js.map +1 -0
  40. package/lib/module/components/index.js +1 -0
  41. package/lib/module/components/index.js.map +1 -1
  42. package/lib/module/components/listitems/ListItemTransaction.js +48 -30
  43. package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
  44. package/lib/module/components/textInput/TextInput.js +4 -0
  45. package/lib/module/components/textInput/TextInput.js.map +1 -0
  46. package/lib/module/components/textInput/TextInputBase.js +225 -0
  47. package/lib/module/components/textInput/TextInputBase.js.map +1 -0
  48. package/lib/module/components/textInput/TextInputPassword.js +27 -0
  49. package/lib/module/components/textInput/TextInputPassword.js.map +1 -0
  50. package/lib/module/components/textInput/TextInputValidation.js +47 -0
  51. package/lib/module/components/textInput/TextInputValidation.js.map +1 -0
  52. package/lib/module/components/textInput/index.js +4 -0
  53. package/lib/module/components/textInput/index.js.map +1 -0
  54. package/lib/module/core/IOAnimations.js +5 -0
  55. package/lib/module/core/IOAnimations.js.map +1 -1
  56. package/lib/module/core/IOShapes.js +1 -0
  57. package/lib/module/core/IOShapes.js.map +1 -1
  58. package/lib/module/utils/accessibility.js +10 -0
  59. package/lib/module/utils/accessibility.js.map +1 -0
  60. package/lib/module/utils/object.js +7 -0
  61. package/lib/module/utils/object.js.map +1 -0
  62. package/lib/module/utils/textInput/index.js +17 -0
  63. package/lib/module/utils/textInput/index.js.map +1 -0
  64. package/lib/module/utils/url.js +7 -0
  65. package/lib/module/utils/url.js.map +1 -0
  66. package/lib/typescript/components/accordion/AccordionItem.d.ts +14 -0
  67. package/lib/typescript/components/accordion/AccordionItem.d.ts.map +1 -0
  68. package/lib/typescript/components/accordion/index.d.ts +1 -1
  69. package/lib/typescript/components/accordion/index.d.ts.map +1 -1
  70. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts +27 -0
  71. package/lib/typescript/components/common/LogoPaymentWithFallback.d.ts.map +1 -0
  72. package/lib/typescript/components/index.d.ts +1 -0
  73. package/lib/typescript/components/index.d.ts.map +1 -1
  74. package/lib/typescript/components/listitems/ListItemTransaction.d.ts +13 -5
  75. package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
  76. package/lib/typescript/components/textInput/TextInput.d.ts +6 -0
  77. package/lib/typescript/components/textInput/TextInput.d.ts.map +1 -0
  78. package/lib/typescript/components/textInput/TextInputBase.d.ts +28 -0
  79. package/lib/typescript/components/textInput/TextInputBase.d.ts.map +1 -0
  80. package/lib/typescript/components/textInput/TextInputPassword.d.ts +6 -0
  81. package/lib/typescript/components/textInput/TextInputPassword.d.ts.map +1 -0
  82. package/lib/typescript/components/textInput/TextInputValidation.d.ts +9 -0
  83. package/lib/typescript/components/textInput/TextInputValidation.d.ts.map +1 -0
  84. package/lib/typescript/components/textInput/index.d.ts +4 -0
  85. package/lib/typescript/components/textInput/index.d.ts.map +1 -0
  86. package/lib/typescript/core/IOAnimations.d.ts +5 -0
  87. package/lib/typescript/core/IOAnimations.d.ts.map +1 -1
  88. package/lib/typescript/core/IOShapes.d.ts +1 -0
  89. package/lib/typescript/core/IOShapes.d.ts.map +1 -1
  90. package/lib/typescript/utils/accessibility.d.ts +6 -0
  91. package/lib/typescript/utils/accessibility.d.ts.map +1 -0
  92. package/lib/typescript/utils/object.d.ts +5 -0
  93. package/lib/typescript/utils/object.d.ts.map +1 -0
  94. package/lib/typescript/utils/textInput/index.d.ts +9 -0
  95. package/lib/typescript/utils/textInput/index.d.ts.map +1 -0
  96. package/lib/typescript/utils/types.d.ts +1 -0
  97. package/lib/typescript/utils/types.d.ts.map +1 -1
  98. package/lib/typescript/utils/url.d.ts +8 -0
  99. package/lib/typescript/utils/url.d.ts.map +1 -0
  100. package/package.json +1 -1
  101. package/src/components/accordion/AccordionItem.tsx +165 -0
  102. package/src/components/accordion/index.tsx +1 -1
  103. package/src/components/common/LogoPaymentWithFallback.tsx +60 -0
  104. package/src/components/index.tsx +1 -0
  105. package/src/components/listitems/ListItemTransaction.tsx +86 -39
  106. package/src/components/textInput/TextInput.tsx +15 -0
  107. package/src/components/textInput/TextInputBase.tsx +327 -0
  108. package/src/components/textInput/TextInputPassword.tsx +36 -0
  109. package/src/components/textInput/TextInputValidation.tsx +71 -0
  110. package/src/components/textInput/index.tsx +3 -0
  111. package/src/core/IOAnimations.ts +5 -0
  112. package/src/core/IOShapes.ts +1 -0
  113. package/src/utils/accessibility.ts +17 -0
  114. package/src/utils/object.ts +12 -0
  115. package/src/utils/textInput/index.ts +29 -0
  116. package/src/utils/types.ts +2 -0
  117. package/src/utils/url.ts +9 -0
  118. package/lib/commonjs/components/accordion/IOAccordion.js.map +0 -1
  119. package/lib/module/components/accordion/IOAccordion.js +0 -26
  120. package/lib/module/components/accordion/IOAccordion.js.map +0 -1
  121. package/lib/typescript/components/accordion/IOAccordion.d.ts +0 -13
  122. package/lib/typescript/components/accordion/IOAccordion.d.ts.map +0 -1
  123. package/src/components/accordion/IOAccordion.tsx +0 -35
@@ -0,0 +1,165 @@
1
+ import React, { useState } from "react";
2
+ import {
3
+ Text,
4
+ View,
5
+ StyleSheet,
6
+ TouchableWithoutFeedback,
7
+ LayoutChangeEvent
8
+ } from "react-native";
9
+ import Animated, {
10
+ useAnimatedStyle,
11
+ withSpring
12
+ } from "react-native-reanimated";
13
+ import LinearGradient from "react-native-linear-gradient";
14
+ import { IOAccordionRadius, type IOSpacingScale } from "../../core";
15
+ import { makeFontStyleObject } from "../../utils/fonts";
16
+ import { IOColors, hexToRgba } from "../../core/IOColors";
17
+ import { H6 } from "../typography";
18
+ import { IOSpringValues } from "../../core/IOAnimations";
19
+ import { Icon } from "../icons/Icon";
20
+
21
+ export type AccordionItem = {
22
+ id: number;
23
+ title: string;
24
+ body: string | React.ReactNode;
25
+ };
26
+
27
+ type AccordionBody = {
28
+ children: React.ReactNode;
29
+ expanded: boolean;
30
+ };
31
+
32
+ const accordionBodySpacing: IOSpacingScale = 16;
33
+ const accordionIconMargin: IOSpacingScale = 8;
34
+ const accordionBorder: IOColors = "grey-200";
35
+ const accordionBackground: IOColors = "white";
36
+
37
+ /* The code below is a re-adaptation of Dima Portenko's code:
38
+ https://github.com/dimaportenko/reanimated-collapsable-card-tutorial
39
+ */
40
+ export const AccordionBody = ({ children, expanded }: AccordionBody) => {
41
+ const [height, setHeight] = useState(0);
42
+
43
+ const onLayout = (event: LayoutChangeEvent) => {
44
+ const { height: onLayoutHeight } = event.nativeEvent.layout;
45
+
46
+ if (onLayoutHeight > 0 && height !== onLayoutHeight) {
47
+ setHeight(onLayoutHeight);
48
+ }
49
+ };
50
+
51
+ const animatedHeightStyle = useAnimatedStyle(
52
+ () => ({
53
+ height: expanded
54
+ ? withSpring(height, IOSpringValues.accordion)
55
+ : withSpring(0, IOSpringValues.accordion)
56
+ }),
57
+ [expanded]
58
+ );
59
+
60
+ return (
61
+ <Animated.View
62
+ style={[animatedHeightStyle, styles.accordionCollapsableContainer]}
63
+ >
64
+ <View style={styles.accordionBodyContainer} onLayout={onLayout}>
65
+ {children}
66
+ </View>
67
+ </Animated.View>
68
+ );
69
+ };
70
+
71
+ export const AccordionItem = ({ title, body }: AccordionItem) => {
72
+ const [expanded, setExpanded] = useState(false);
73
+
74
+ const onItemPress = () => {
75
+ setExpanded(!expanded);
76
+ };
77
+
78
+ const animatedChevron = useAnimatedStyle(
79
+ () => ({
80
+ transform: [
81
+ {
82
+ rotate: expanded
83
+ ? withSpring(`180deg`, IOSpringValues.accordion)
84
+ : withSpring(`0deg`, IOSpringValues.accordion)
85
+ }
86
+ ]
87
+ }),
88
+ [expanded]
89
+ );
90
+
91
+ return (
92
+ <View style={styles.accordionWrapper}>
93
+ <TouchableWithoutFeedback
94
+ accessible={true}
95
+ accessibilityRole="button"
96
+ accessibilityState={{ expanded }}
97
+ onPress={onItemPress}
98
+ >
99
+ <View style={styles.textContainer}>
100
+ <View style={{ flexShrink: 1, marginRight: accordionIconMargin }}>
101
+ <H6 color="black">{title}</H6>
102
+ </View>
103
+ <Animated.View style={animatedChevron}>
104
+ <Icon name="chevronBottom" color="blueIO-500" />
105
+ </Animated.View>
106
+ </View>
107
+ </TouchableWithoutFeedback>
108
+
109
+ <AccordionBody expanded={expanded}>
110
+ {typeof body === "string" ? (
111
+ <Text style={styles.accordionBodyText}>{body}</Text>
112
+ ) : (
113
+ body
114
+ )}
115
+ </AccordionBody>
116
+ {/* This gradient adds a smooth end to the content. If it is missing,
117
+ the content will be cut sharply during the height transition. */}
118
+ <LinearGradient
119
+ style={{
120
+ height: accordionBodySpacing,
121
+ position: "absolute",
122
+ // Place at the bottom
123
+ bottom: 0,
124
+ // Avoid gradient overlaps with border radius
125
+ left: accordionBodySpacing,
126
+ right: accordionBodySpacing
127
+ }}
128
+ colors={[
129
+ hexToRgba(IOColors[accordionBackground], 0),
130
+ IOColors[accordionBackground]
131
+ ]}
132
+ />
133
+ </View>
134
+ );
135
+ };
136
+
137
+ const styles = StyleSheet.create({
138
+ accordionWrapper: {
139
+ borderColor: IOColors[accordionBorder],
140
+ borderWidth: 1,
141
+ borderRadius: IOAccordionRadius,
142
+ backgroundColor: IOColors[accordionBackground]
143
+ },
144
+ accordionCollapsableContainer: {
145
+ overflow: "hidden"
146
+ },
147
+ accordionBodyContainer: {
148
+ position: "absolute",
149
+ padding: accordionBodySpacing,
150
+ paddingTop: 0
151
+ },
152
+ accordionBodyText: {
153
+ fontSize: 14,
154
+ lineHeight: 21,
155
+ color: IOColors["grey-700"],
156
+ ...makeFontStyleObject("Regular", undefined, "TitilliumWeb")
157
+ },
158
+ textContainer: {
159
+ padding: accordionBodySpacing,
160
+ flexGrow: 1,
161
+ flexDirection: "row",
162
+ alignItems: "center",
163
+ justifyContent: "space-between"
164
+ }
165
+ });
@@ -1,2 +1,2 @@
1
1
  export * from "./RawAccordion";
2
- export * from "./IOAccordion";
2
+ export * from "./AccordionItem";
@@ -0,0 +1,60 @@
1
+ import * as O from "fp-ts/lib/Option";
2
+ import { pipe } from "fp-ts/lib/function";
3
+ import * as React from "react";
4
+ import { findFirstCaseInsensitive } from "../../utils/object";
5
+ import { IOColors } from "../../core";
6
+ import { IOIconSizeScale, Icon } from "../icons";
7
+ import {
8
+ IOLogoPaymentExtType,
9
+ IOLogoPaymentType,
10
+ IOPaymentExtLogos,
11
+ IOPaymentLogos,
12
+ LogoPayment,
13
+ LogoPaymentExt
14
+ } from "../logos";
15
+
16
+ export type LogoPaymentWithFallback = {
17
+ brand?: string;
18
+ fallbackIconColor?: IOColors;
19
+ size?: IOIconSizeScale;
20
+ isExtended?: boolean;
21
+ };
22
+ export type LogoPaymentExtOrDefaultIconProps = {
23
+ cardIcon?: IOLogoPaymentExtType;
24
+ fallbackIconColor?: IOColors;
25
+ size?: IOIconSizeScale;
26
+ };
27
+ /**
28
+ * This component renders either
29
+ * - a LogoPayment/LogoPaymentExt component
30
+ * - a default credit card icon
31
+ * @param cardIcon: IOLogoPaymentType icon
32
+ * @param size: the size of the icon (standard is 24/48)
33
+ * @param fallbackIconColor: default icon color (standard is grey-700)
34
+ * @param isExtended: if true, renders a LogoPaymentExt component
35
+ * @returns a LogoPayment/LogopaymentExt component if the cardIcon is supported, a default credit card icon otherwise
36
+ */
37
+ export const LogoPaymentWithFallback = ({
38
+ brand,
39
+ fallbackIconColor = "grey-700",
40
+ isExtended = false,
41
+ size = isExtended ? 48 : 24
42
+ }: LogoPaymentWithFallback) => {
43
+ const logos = isExtended ? IOPaymentExtLogos : IOPaymentLogos;
44
+
45
+ return pipe(
46
+ brand,
47
+ O.fromNullable,
48
+ O.chain(findFirstCaseInsensitive(logos)),
49
+ O.map(([brand]) => brand),
50
+ O.fold(
51
+ () => <Icon name="creditCard" size={size} color={fallbackIconColor} />,
52
+ brand =>
53
+ isExtended ? (
54
+ <LogoPaymentExt name={brand as IOLogoPaymentExtType} size={size} />
55
+ ) : (
56
+ <LogoPayment name={brand as IOLogoPaymentType} size={size} />
57
+ )
58
+ )
59
+ );
60
+ };
@@ -17,3 +17,4 @@ export * from "./switch";
17
17
  export * from "./tag";
18
18
  export * from "./tabs";
19
19
  export * from "./typography";
20
+ export * from "./textInput";
@@ -3,19 +3,25 @@ import { pipe } from "fp-ts/lib/function";
3
3
  import React from "react";
4
4
  import { ImageURISource, StyleSheet, View } from "react-native";
5
5
  import Placeholder from "rn-placeholder";
6
+
6
7
  import {
7
8
  IOColors,
9
+ IOListItemLogoMargin,
8
10
  IOListItemStyles,
9
11
  IOListItemVisualParams,
10
12
  IOStyles,
11
13
  IOVisualCostants,
12
14
  useIOTheme
13
15
  } from "../../core";
16
+
17
+ import { LogoPaymentWithFallback } from "../common/LogoPaymentWithFallback";
18
+ import { isImageUri } from "../../utils/url";
14
19
  import { WithTestID } from "../../utils/types";
20
+ import { getAccessibleAmountText } from "../../utils/accessibility";
15
21
  import { Avatar } from "../avatar/Avatar";
16
22
  import { Badge } from "../badge/Badge";
17
- import { Icon } from "../icons";
18
- import { IOLogoPaymentType, LogoPayment } from "../logos";
23
+ import { IOIconSizeScale, Icon } from "../icons";
24
+ import { IOLogoPaymentType } from "../logos";
19
25
  import { VSpacer } from "../spacer";
20
26
  import { H6, LabelSmall } from "../typography";
21
27
  import {
@@ -23,103 +29,144 @@ import {
23
29
  PressableListItemBase
24
30
  } from "./PressableListItemsBase";
25
31
 
26
- type LogoNameOrUri = IOLogoPaymentType | ImageURISource;
32
+ export type ListItemTransactionStatus =
33
+ | "success"
34
+ | "failure"
35
+ | "pending"
36
+ | "cancelled"
37
+ | "refunded"
38
+ | "reversal";
39
+
40
+ type PaymentLogoIcon = IOLogoPaymentType | ImageURISource | React.ReactNode;
41
+
27
42
  export type ListItemTransaction = WithTestID<
28
43
  PressableBaseProps & {
29
44
  hasChevronRight?: boolean;
30
45
  isLoading?: boolean;
31
- paymentLogoOrUrl?: LogoNameOrUri;
46
+ /**
47
+ * A logo that will be displayed on the left of the list item.
48
+ *
49
+ * Must be a {@link IOLogoPaymentType} or an {@link ImageURISource} or an {@link Icon}.
50
+ */
51
+ paymentLogoIcon?: PaymentLogoIcon;
32
52
  subtitle: string;
33
53
  title: string;
34
54
  } & (
35
55
  | {
36
- transactionStatus: "success";
56
+ transactionStatus: "success" | "refunded";
57
+ badgeText?: string;
37
58
  transactionAmount: string;
38
59
  }
39
60
  | {
40
- transactionStatus: "failure" | "pending";
61
+ transactionStatus: "failure" | "pending" | "cancelled" | "reversal";
62
+ badgeText: string;
41
63
  transactionAmount?: string;
42
64
  }
43
65
  )
44
66
  >;
45
67
 
46
68
  type LeftComponentProps = {
47
- logoNameOrUrl: LogoNameOrUri;
69
+ logoIcon: PaymentLogoIcon;
48
70
  };
49
71
 
50
- const isImageUrI = (
51
- value: IOLogoPaymentType | ImageURISource
52
- ): value is ImageURISource =>
53
- typeof value === "object" && value.uri !== undefined;
72
+ const CARD_LOGO_SIZE: IOIconSizeScale = 24;
73
+ const MUNICIPALITY_LOGO_SIZE = 44;
74
+ // this is the <Avatar/>'s "small" size,
75
+ // since it is bigger than the card logos, we use
76
+ // it as a base size for homogeneous sizing via container size.
54
77
 
55
- const LeftComponent = ({ logoNameOrUrl }: LeftComponentProps) => {
56
- if (isImageUrI(logoNameOrUrl)) {
57
- return <Avatar shape="circle" size="small" logoUri={[logoNameOrUrl]} />;
58
- } else {
59
- return (
60
- <View
61
- style={{
62
- width: IOVisualCostants.avatarSizeSmall,
63
- height: IOVisualCostants.avatarSizeSmall,
64
- alignItems: "center",
65
- justifyContent: "center"
66
- }}
67
- >
68
- <LogoPayment name={logoNameOrUrl} />
69
- </View>
70
- );
78
+ const LeftComponent = ({ logoIcon }: LeftComponentProps) => {
79
+ if (isImageUri(logoIcon)) {
80
+ return <Avatar logoUri={[logoIcon]} size="small" shape="circle" />;
71
81
  }
82
+ if (React.isValidElement(logoIcon)) {
83
+ return <>{logoIcon}</>;
84
+ }
85
+ return (
86
+ <LogoPaymentWithFallback
87
+ brand={logoIcon as IOLogoPaymentType}
88
+ size={CARD_LOGO_SIZE}
89
+ />
90
+ );
72
91
  };
73
92
 
74
93
  export const ListItemTransaction = ({
75
94
  accessibilityLabel,
76
95
  hasChevronRight = false,
77
96
  isLoading = false,
78
- paymentLogoOrUrl,
97
+ paymentLogoIcon,
79
98
  onPress,
80
99
  subtitle,
81
100
  testID,
82
101
  title,
83
102
  transactionAmount,
103
+ badgeText,
84
104
  transactionStatus = "success"
85
105
  }: ListItemTransaction) => {
86
106
  const theme = useIOTheme();
87
107
 
108
+ const maybeBadgeText = pipe(
109
+ badgeText,
110
+ O.fromNullable,
111
+ O.getOrElse(() => "-")
112
+ );
113
+
88
114
  if (isLoading) {
89
115
  return <SkeletonComponent />;
90
116
  }
91
117
 
92
- const designSystemBlue: IOColors = "blue";
118
+ const designSystemBlue: IOColors = "blueIO-500";
93
119
  const ListItemTransactionContent = () => {
94
120
  const TransactionAmountOrBadgeComponent = () => {
95
121
  switch (transactionStatus) {
96
122
  case "success":
97
123
  return (
98
- <H6 color={hasChevronRight ? designSystemBlue : "black"}>
99
- {transactionAmount || "-"}
124
+ <H6
125
+ accessibilityLabel={getAccessibleAmountText(transactionAmount)}
126
+ color={hasChevronRight ? designSystemBlue : "black"}
127
+ >
128
+ {transactionAmount || ""}
129
+ </H6>
130
+ );
131
+ case "refunded":
132
+ return (
133
+ <H6
134
+ accessibilityLabel={getAccessibleAmountText(transactionAmount)}
135
+ color={hasChevronRight ? designSystemBlue : "success-700"}
136
+ >
137
+ {transactionAmount || ""}
100
138
  </H6>
101
139
  );
102
-
103
140
  case "failure":
104
- return <Badge variant="error" text={"Failed"} />;
141
+ case "cancelled":
142
+ return <Badge variant="error" text={maybeBadgeText} />;
143
+ case "reversal":
144
+ return <Badge variant="lightBlue" text={maybeBadgeText} />;
105
145
  case "pending":
106
- return <Badge variant="info" text={"Cancelled"} />;
146
+ return <Badge variant="info" text={maybeBadgeText} />;
107
147
  }
108
148
  };
109
149
 
110
150
  return (
111
151
  <>
112
- {paymentLogoOrUrl && (
113
- <View style={{ marginRight: IOListItemVisualParams.iconMargin }}>
114
- <LeftComponent logoNameOrUrl={paymentLogoOrUrl} />
152
+ {paymentLogoIcon && (
153
+ <View
154
+ style={{
155
+ marginRight: IOListItemLogoMargin,
156
+ width: MUNICIPALITY_LOGO_SIZE,
157
+ alignItems: "center"
158
+ }}
159
+ >
160
+ <LeftComponent logoIcon={paymentLogoIcon} />
115
161
  </View>
116
162
  )}
117
163
  <View style={IOStyles.flex}>
118
- <H6 color={theme["textBody-default"]}>{title}</H6>
164
+ <LabelSmall numberOfLines={2} color={theme["textBody-default"]}>
165
+ {title}
166
+ </LabelSmall>
119
167
  <LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
120
168
  {subtitle}
121
169
  </LabelSmall>
122
- <VSpacer size={4} />
123
170
  </View>
124
171
  <View style={Styles.rightSection}>
125
172
  <TransactionAmountOrBadgeComponent />
@@ -0,0 +1,15 @@
1
+ import * as React from "react";
2
+ import { TextInputBase } from "./TextInputBase";
3
+
4
+ type TextInputProps = Omit<
5
+ React.ComponentProps<typeof TextInputBase>,
6
+ | "rightElement"
7
+ | "status"
8
+ | "bottomMessageColor"
9
+ | "isPassword"
10
+ | "errorMessage"
11
+ >;
12
+
13
+ export const TextInput = (props: TextInputProps) => (
14
+ <TextInputBase {...props} />
15
+ );