diff --git a/docs/icomoon-font-export.png b/docs/icomoon-font-export.png
deleted file mode 100644
index 6b341251861..00000000000
Binary files a/docs/icomoon-font-export.png and /dev/null differ
diff --git a/img/assistance/battery.svg b/img/assistance/battery.svg
deleted file mode 100644
index 2d0f4219e91..00000000000
--- a/img/assistance/battery.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/img/assistance/card.svg b/img/assistance/card.svg
deleted file mode 100644
index fb1183a224f..00000000000
--- a/img/assistance/card.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/img/assistance/email.svg b/img/assistance/email.svg
deleted file mode 100644
index f0fa9ce3443..00000000000
--- a/img/assistance/email.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/assistance/gallery.svg b/img/assistance/gallery.svg
deleted file mode 100644
index 493bdd7448d..00000000000
--- a/img/assistance/gallery.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/assistance/giacenza.svg b/img/assistance/giacenza.svg
deleted file mode 100644
index c1e3c05cafa..00000000000
--- a/img/assistance/giacenza.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-
diff --git a/img/assistance/history.svg b/img/assistance/history.svg
deleted file mode 100644
index 35f891d04bb..00000000000
--- a/img/assistance/history.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
diff --git a/img/assistance/info.svg b/img/assistance/info.svg
deleted file mode 100644
index 5415e2a80d6..00000000000
--- a/img/assistance/info.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/assistance/login.svg b/img/assistance/login.svg
deleted file mode 100644
index 81de685001a..00000000000
--- a/img/assistance/login.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-
diff --git a/img/assistance/nameSurname.svg b/img/assistance/nameSurname.svg
deleted file mode 100644
index be23dbfd900..00000000000
--- a/img/assistance/nameSurname.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/assistance/telefonia.svg b/img/assistance/telefonia.svg
deleted file mode 100644
index 89e18837af3..00000000000
--- a/img/assistance/telefonia.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/assistance/website.svg b/img/assistance/website.svg
deleted file mode 100644
index 5dcddbeaacd..00000000000
--- a/img/assistance/website.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/icons/Eye.svg b/img/icons/Eye.svg
deleted file mode 100644
index 9ec691274da..00000000000
--- a/img/icons/Eye.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-
diff --git a/img/icons/openweburl.svg b/img/icons/openweburl.svg
deleted file mode 100644
index ee3c7fa72ab..00000000000
--- a/img/icons/openweburl.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/img/wallet/payment-methods/paypal/edit.svg b/img/wallet/payment-methods/paypal/edit.svg
deleted file mode 100644
index b250e12c3ac..00000000000
--- a/img/wallet/payment-methods/paypal/edit.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
diff --git a/img/wallet/payment-methods/paypal/label.svg b/img/wallet/payment-methods/paypal/label.svg
deleted file mode 100644
index 01ac294c9ab..00000000000
--- a/img/wallet/payment-methods/paypal/label.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-
diff --git a/img/wallet/payment-methods/paypal/money_down.svg b/img/wallet/payment-methods/paypal/money_down.svg
deleted file mode 100644
index e229312606e..00000000000
--- a/img/wallet/payment-methods/paypal/money_down.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-
diff --git a/ts/components/AdviceComponent.tsx b/ts/components/AdviceComponent.tsx
index 6a7e83e8741..dd6848d2671 100644
--- a/ts/components/AdviceComponent.tsx
+++ b/ts/components/AdviceComponent.tsx
@@ -1,17 +1,18 @@
import * as React from "react";
import { View, StyleSheet } from "react-native";
-import themeVariables from "../theme/variables";
-import { HSpacer } from "./core/spacer/Spacer";
+import { Icon, IOIcons } from "./core/icons";
+import type { IOColors } from "./core/variables/IOColors";
import { IOStyles } from "./core/variables/IOStyles";
-import IconFont from "./ui/IconFont";
+import { HSpacer } from "./core/spacer/Spacer";
import { Body } from "./core/typography/Body";
type Props = {
text: string;
- iconName?: string;
+ iconName?: IOIcons;
iconSize?: number;
- iconColor?: string;
+ iconColor?: IOColors;
};
+
const styles = StyleSheet.create({
icon: {
marginTop: 4
@@ -25,12 +26,13 @@ const defaultIconSize = 18;
*/
const AdviceComponent: React.FunctionComponent = (props: Props) => (
-
+
+
+
{props.text}
diff --git a/ts/components/CalendarsListContainer.tsx b/ts/components/CalendarsListContainer.tsx
index 6f63e41e40e..0e00faf88da 100644
--- a/ts/components/CalendarsListContainer.tsx
+++ b/ts/components/CalendarsListContainer.tsx
@@ -93,7 +93,7 @@ class CalendarsListContainer extends React.PureComponent {
title={convertLocalCalendarName(item.title)}
hideIcon={!isDefaultCalendar}
iconSize={12}
- iconName={isDefaultCalendar ? "io-tick-big" : undefined}
+ iconName={isDefaultCalendar ? "legCompleted" : undefined}
onPress={() =>
isDefaultCalendar && this.props.onCalendarRemove
? this.props.onCalendarRemove()
diff --git a/ts/components/ChooserListContainer.tsx b/ts/components/ChooserListContainer.tsx
index 1e5637e246a..bb6ed88e42e 100644
--- a/ts/components/ChooserListContainer.tsx
+++ b/ts/components/ChooserListContainer.tsx
@@ -27,7 +27,7 @@ import {
import { LabelledItem } from "./LabelledItem";
import AppHeader from "./ui/AppHeader";
import FooterWithButtons from "./ui/FooterWithButtons";
-import IconFont from "./ui/IconFont";
+import { Icon } from "./core/icons/Icon";
type OwnProps = {
items: ReadonlyArray;
@@ -153,8 +153,8 @@ class ChooserListContainer extends React.PureComponent, State> {
onPress={this.handleSearchPress}
transparent={true}
>
-
diff --git a/ts/components/ChooserListItem.tsx b/ts/components/ChooserListItem.tsx
index 8860c5c5bf9..416d89baf42 100644
--- a/ts/components/ChooserListItem.tsx
+++ b/ts/components/ChooserListItem.tsx
@@ -3,11 +3,11 @@ import { pipe } from "fp-ts/lib/function";
import * as React from "react";
import { View, StyleSheet } from "react-native";
import customVariables from "../theme/variables";
-import ButtonDefaultOpacity from "./ButtonDefaultOpacity";
import { VSpacer } from "./core/spacer/Spacer";
import { H3 } from "./core/typography/H3";
import TouchableDefaultOpacity from "./TouchableDefaultOpacity";
-import IconFont from "./ui/IconFont";
+import { IOColors } from "./core/variables/IOColors";
+import { IOIcons, Icon } from "./core/icons";
type Props = Readonly<{
itemTitle: string;
@@ -46,10 +46,8 @@ export default class ChooserListItem extends React.Component {
public render() {
const { isItemSelected, itemIconComponent, itemId, itemTitle } = this.props;
- const iconName = isItemSelected ? "io-checkbox-on" : "io-checkbox-off";
- const iconColor = isItemSelected
- ? customVariables.selectedColor
- : customVariables.unselectedColor;
+ const iconName: IOIcons = isItemSelected ? "legCheckOn" : "legCheckOff";
+ const iconColor: IOColors = isItemSelected ? "blue" : "bluegrey";
const icon = itemIconComponent
? pipe(
@@ -68,9 +66,9 @@ export default class ChooserListItem extends React.Component {
{itemTitle}
-
-
-
+
+
+
);
diff --git a/ts/components/ContextualInfo.tsx b/ts/components/ContextualInfo.tsx
index c765876b351..9b1300d5107 100644
--- a/ts/components/ContextualInfo.tsx
+++ b/ts/components/ContextualInfo.tsx
@@ -2,10 +2,10 @@ import { Body, Container, Content, Right } from "native-base";
import * as React from "react";
import { BackHandler, NativeEventSubscription, StyleSheet } from "react-native";
import themeVariables from "../theme/variables";
-import IconFont from "./ui/IconFont";
-import ButtonDefaultOpacity from "./ButtonDefaultOpacity";
import AppHeader from "./ui/AppHeader";
import { H1 } from "./core/typography/H1";
+import { Icon } from "./core/icons";
+import TouchableDefaultOpacity from "./TouchableDefaultOpacity";
type Props = Readonly<{
title: string;
@@ -50,12 +50,12 @@ export default class ContextualInfo extends React.Component {
- this.props.onClose()}
- transparent={true}
+ testID="contextualInfo_closeButton"
>
-
-
+
+
{
private getIconName = () =>
this.props.isSelectionModeEnabled
? this.props.isItemSelected
- ? "io-checkbox-on"
- : "io-checkbox-off"
- : "io-right";
+ ? "legCheckOn"
+ : "legCheckOff"
+ : "chevronRightListItem";
shouldComponentUpdate(nextProps: Readonly): boolean {
// assuming that:
@@ -158,11 +158,7 @@ export default class DetailedlistItemComponent extends React.Component {
/>
)}
-
+
{this.props.children}
diff --git a/ts/components/EmailReadComponent.tsx b/ts/components/EmailReadComponent.tsx
index 0f6eaae0deb..56f6c514b99 100644
--- a/ts/components/EmailReadComponent.tsx
+++ b/ts/components/EmailReadComponent.tsx
@@ -11,10 +11,10 @@ import TopScreenComponent from "./screens/TopScreenComponent";
import SectionStatusComponent from "./SectionStatus";
import { BlockButtonsProps } from "./ui/BlockButtons";
import FooterWithButtons from "./ui/FooterWithButtons";
-import IconFont from "./ui/IconFont";
import { Body } from "./core/typography/Body";
import { VSpacer } from "./core/spacer/Spacer";
import { H3 } from "./core/typography/H3";
+import { Icon } from "./core/icons/Icon";
const styles = StyleSheet.create({
flex: {
@@ -61,13 +61,14 @@ const EmailReadComponent = ({ handleGoBack, footerProps }: Props) => {
{I18n.t("email.insert.label")}
-
+
+
+
{O.isSome(optionEmail) && {optionEmail.value}
}
diff --git a/ts/components/FiscalCodeLandscapeOverlay.tsx b/ts/components/FiscalCodeLandscapeOverlay.tsx
index 8975b7aa074..1d1089f1415 100644
--- a/ts/components/FiscalCodeLandscapeOverlay.tsx
+++ b/ts/components/FiscalCodeLandscapeOverlay.tsx
@@ -13,7 +13,6 @@ import {
} from "react-native";
import { InitializedProfile } from "../../definitions/backend/InitializedProfile";
import { Municipality } from "../../definitions/content/Municipality";
-import IconFont from "../components/ui/IconFont";
import I18n from "../i18n";
import customVariables from "../theme/variables";
import { useMaxBrightness } from "../utils/brightness";
@@ -21,6 +20,7 @@ import FiscalCodeComponent from "./FiscalCodeComponent";
import AppHeader from "./ui/AppHeader";
import { IOColors } from "./core/variables/IOColors";
import { VSpacer } from "./core/spacer/Spacer";
+import { Icon } from "./core/icons/Icon";
export type Props = Readonly<{
onCancel: () => void;
@@ -94,7 +94,7 @@ const FiscalCodeLandscapeOverlay: React.FunctionComponent = (
accessibilityRole={"button"}
accessibilityLabel={I18n.t("global.buttons.close")}
>
-
+
diff --git a/ts/components/GoBackButton.tsx b/ts/components/GoBackButton.tsx
index 8077ffb46c7..57c5783018b 100644
--- a/ts/components/GoBackButton.tsx
+++ b/ts/components/GoBackButton.tsx
@@ -3,9 +3,8 @@ import * as React from "react";
import { BackHandler, NativeEventSubscription } from "react-native";
import I18n from "../i18n";
import NavigationService from "../navigation/NavigationService";
-import { IOColors } from "../components/core/variables/IOColors";
import ButtonDefaultOpacity from "./ButtonDefaultOpacity";
-import IconFont from "./ui/IconFont";
+import { Icon } from "./core/icons";
interface OwnProps {
[k: string]: any;
@@ -61,10 +60,7 @@ class GoBackButton extends React.PureComponent {
{...buttonProps}
accessibilityLabel={I18n.t("global.buttons.back")}
>
-
+
);
}
diff --git a/ts/components/IdpSuccessfulAuthentication.tsx b/ts/components/IdpSuccessfulAuthentication.tsx
index a037335e63a..39cf4eab3b8 100644
--- a/ts/components/IdpSuccessfulAuthentication.tsx
+++ b/ts/components/IdpSuccessfulAuthentication.tsx
@@ -5,8 +5,7 @@ import * as React from "react";
import { View, StatusBar, StyleSheet } from "react-native";
import variables from "../theme/variables";
-import IconFont from "./ui/IconFont";
-import { IOColors } from "./core/variables/IOColors";
+import { Icon } from "./core/icons";
const styles = StyleSheet.create({
container: {
@@ -17,7 +16,7 @@ const styles = StyleSheet.create({
}
});
-const tickSize = variables.iconSize6 * 2;
+const ICON_SIZE = 96;
export const IdpSuccessfulAuthentication = () => (
@@ -25,6 +24,6 @@ export const IdpSuccessfulAuthentication = () => (
barStyle="light-content"
backgroundColor={styles.container.backgroundColor}
/>
-
+
);
diff --git a/ts/components/LabelledItem/Icon.tsx b/ts/components/LabelledItem/Icon.tsx
index b5aafa2ae7b..227c6111bfa 100644
--- a/ts/components/LabelledItem/Icon.tsx
+++ b/ts/components/LabelledItem/Icon.tsx
@@ -8,7 +8,6 @@ import {
import { isString } from "lodash";
import { IconProps } from "react-native-vector-icons/Icon";
import IconFont from "../ui/IconFont";
-import variables from "../../theme/variables";
import ButtonDefaultOpacity from "../ButtonDefaultOpacity";
const styles = StyleSheet.create({
@@ -54,7 +53,7 @@ export const Icon: React.FC = ({
>
{isString(icon) ? (
{
const { color } = this.props;
return (
{
- public render() {
- const { backgroundColor, iconProps } = this.props;
- return (
-
-
-
-
- {this.props.children}
-
- );
- }
-}
-
-export default NoticeBox;
diff --git a/ts/components/PinCreationForm.tsx b/ts/components/PinCreationForm.tsx
index 208c055636d..407958ca076 100644
--- a/ts/components/PinCreationForm.tsx
+++ b/ts/components/PinCreationForm.tsx
@@ -179,7 +179,7 @@ export const PinCreationForm = ({ onSubmit }: Props) => {
-
+
diff --git a/ts/components/Pinpad/KeyPad.tsx b/ts/components/Pinpad/KeyPad.tsx
index 034ddb36559..22ace892f9c 100644
--- a/ts/components/Pinpad/KeyPad.tsx
+++ b/ts/components/Pinpad/KeyPad.tsx
@@ -3,18 +3,17 @@ import * as E from "fp-ts/lib/Either";
import { pipe } from "fp-ts/lib/function";
import { Col, Grid, Row, Text as NBButtonText } from "native-base";
import * as React from "react";
-import { Platform, StyleSheet } from "react-native";
+import { Platform, StyleSheet, View } from "react-native";
import { makeFontStyleObject } from "../../theme/fonts";
-import customVariables from "../../theme/variables";
import ButtonDefaultOpacity from "../ButtonDefaultOpacity";
import { hexToRgba, IOColors } from "../core/variables/IOColors";
-import StyledIconFont from "../ui/IconFont";
+import { IOIcons, Icon } from "../core/icons/Icon";
// left -> the string to represent as text
// right -> the icon to represent with name and size
export type DigitRpr = E.Either<
string,
- { name: string; size: number; accessibilityLabel: string }
+ { name: IOIcons; size: number; accessibilityLabel: string }
>;
type Digit = ITuple2 void> | undefined;
@@ -109,16 +108,13 @@ const renderPinCol = (
),
ic => (
-
+
+
+
)
)
)}
diff --git a/ts/components/Pinpad/index.tsx b/ts/components/Pinpad/index.tsx
index 7567d6b0e06..8eea622b6aa 100644
--- a/ts/components/Pinpad/index.tsx
+++ b/ts/components/Pinpad/index.tsx
@@ -53,7 +53,7 @@ const styles = StyleSheet.create({
}
});
-const SMALL_ICON_WIDTH = 17;
+const CANCEL_ICON_WIDTH = 24;
const ICON_WIDTH = 48;
const SHAKE_ANIMATION_DURATION = 600 as Millisecond;
const INPUT_MARGIN = 36;
@@ -77,7 +77,7 @@ class Pinpad extends React.PureComponent {
case "BIOMETRICS":
case "TOUCH_ID":
return E.right({
- name: "io-fingerprint",
+ name: "biomFingerprint",
size: ICON_WIDTH,
accessibilityLabel: I18n.t(
"identification.unlockCode.accessibility.fingerprint"
@@ -85,7 +85,7 @@ class Pinpad extends React.PureComponent {
});
case "FACE_ID":
return E.right({
- name: "io-face-id",
+ name: "biomFaceID",
size: ICON_WIDTH,
accessibilityLabel: I18n.t(
"identification.unlockCode.accessibility.faceId"
@@ -163,8 +163,8 @@ class Pinpad extends React.PureComponent {
),
Tuple2(
E.right({
- name: "io-cancel",
- size: SMALL_ICON_WIDTH,
+ name: "cancel",
+ size: CANCEL_ICON_WIDTH,
accessibilityLabel: I18n.t(
"identification.unlockCode.accessibility.delete"
)
diff --git a/ts/components/ProfileTabIcon.tsx b/ts/components/ProfileTabIcon.tsx
index d516d74935d..1e9d3a8caac 100644
--- a/ts/components/ProfileTabIcon.tsx
+++ b/ts/components/ProfileTabIcon.tsx
@@ -1,12 +1,13 @@
import React from "react";
import { connect } from "react-redux";
+import { ColorValue } from "react-native";
import { GlobalState } from "../store/reducers/types";
-import IconFont from "./ui/IconFont";
+import { AnimatedIcon } from "./core/icons/Icon";
type OwnProps = {
size?: number;
- color?: string;
+ color?: ColorValue;
};
type Props = OwnProps & ReturnType;
@@ -21,10 +22,12 @@ class ProfileTabIcon extends React.PureComponent {
// when new experimental features will be avaible, pick this flag from props
const isExperimentalFeaturesEnabled = false;
return (
-
);
}
diff --git a/ts/components/RegionServiceWebView.tsx b/ts/components/RegionServiceWebView.tsx
index e9c98efcf34..4dea5a2595a 100644
--- a/ts/components/RegionServiceWebView.tsx
+++ b/ts/components/RegionServiceWebView.tsx
@@ -1,7 +1,13 @@
import * as E from "fp-ts/lib/Either";
import { pipe } from "fp-ts/lib/function";
import * as O from "fp-ts/lib/Option";
-import { Body, Container, Content, Right } from "native-base";
+import {
+ Body,
+ Container,
+ Content,
+ Right,
+ Text as NBButtonText
+} from "native-base";
import * as React from "react";
import { View, Alert, Image, StyleSheet } from "react-native";
import WebView, { WebViewMessageEvent } from "react-native-webview";
@@ -12,7 +18,6 @@ import {
import URLParse from "url-parse";
import brokenLinkImage from "../../img/broken-link.png";
import I18n from "../i18n";
-import customVariables from "../theme/variables";
import { WebviewMessage } from "../types/WebviewMessage";
import { getRemoteLocale } from "../utils/messages";
import { showToast } from "../utils/showToast";
@@ -23,13 +28,13 @@ import {
} from "../utils/webview";
import ButtonDefaultOpacity from "./ButtonDefaultOpacity";
import { VSpacer } from "./core/spacer/Spacer";
-import { Body as BodyText } from "./core/typography/Body";
import { Label } from "./core/typography/Label";
import { withLightModalContext } from "./helpers/withLightModalContext";
import LoadingSpinnerOverlay from "./LoadingSpinnerOverlay";
import AppHeader from "./ui/AppHeader";
-import IconFont from "./ui/IconFont";
import { LightModalContextInterface } from "./ui/LightModal";
+import { Icon } from "./core/icons/Icon";
+import { IOStyles } from "./core/variables/IOStyles";
type Props = {
onWebviewClose: () => void;
@@ -39,8 +44,6 @@ type Props = {
const styles = StyleSheet.create({
itemsCenter: { alignItems: "center" },
- selfCenter: { alignSelf: "center" },
- flex1: { flex: 1 },
errorContainer: {
flex: 1,
alignItems: "center"
@@ -77,17 +80,14 @@ const RegionServiceWebView: React.FunctionComponent = (props: Props) => {
-
+
-
-
+
+
+
+
@@ -104,19 +104,15 @@ const RegionServiceWebView: React.FunctionComponent = (props: Props) => {
-
+
-
-
+
+
+
+
-
@@ -151,7 +147,7 @@ const RegionServiceWebView: React.FunctionComponent = (props: Props) => {
light={true}
bordered={true}
>
- {I18n.t("global.buttons.cancel")}
+ {I18n.t("global.buttons.cancel")}
{
@@ -218,15 +218,15 @@ class RemindEmailValidationOverlay extends React.PureComponent {
{I18n.t("global.actions.retry")}
- {
this.setState({ displayError: false });
}}
- color={IOColors.white}
accessible={true}
accessibilityLabel={I18n.t("global.buttons.close")}
- />
+ >
+
+
);
@@ -260,13 +260,13 @@ class RemindEmailValidationOverlay extends React.PureComponent {
accessibilityLabel={I18n.t("global.buttons.back")}
accessibilityRole={"button"}
>
-
+
);
private onMainProps: TopScreenComponentProps = {
customRightIcon: {
- iconName: "io-close",
+ iconName: "legClose",
onPress: this.props.navigateBack
}
};
@@ -356,9 +356,9 @@ class RemindEmailValidationOverlay extends React.PureComponent {
O.getOrElse(() => EMPTY_EMAIL)
);
- const icon = this.state.emailHasBeenValidate
- ? "io-email-validated"
- : "io-email-to-validate";
+ const illustration: IOPictograms = this.state.emailHasBeenValidate
+ ? "emailValidation"
+ : "emailToValidate";
const title = this.state.emailHasBeenValidate
? I18n.t("email.validate.validated")
@@ -374,12 +374,13 @@ class RemindEmailValidationOverlay extends React.PureComponent {
>
-
+
+
+
{title}
diff --git a/ts/components/SectionStatus/StatusContent.tsx b/ts/components/SectionStatus/StatusContent.tsx
index 922b88c957e..57b97742b1d 100644
--- a/ts/components/SectionStatus/StatusContent.tsx
+++ b/ts/components/SectionStatus/StatusContent.tsx
@@ -1,9 +1,9 @@
import { AccessibilityRole, StyleSheet, View } from "react-native";
import React, { ComponentProps } from "react";
import { WithTestID } from "../../types/WithTestID";
-import IconFont from "../ui/IconFont";
import { Label } from "../core/typography/Label";
import { IOColors } from "../core/variables/IOColors";
+import { IOIcons, Icon } from "../core/icons/Icon";
const iconSize = 24;
@@ -28,10 +28,9 @@ type Props = WithTestID<{
accessibilityLabel?: string;
accessibilityRole?: AccessibilityRole;
backgroundColor: IOColors;
- iconColor: string;
- iconName: string;
+ iconName: IOIcons;
viewRef: React.RefObject;
- labelColor: ComponentProps["color"];
+ foregroundColor: ComponentProps["color"];
labelPaddingVertical?: number;
}>;
@@ -42,10 +41,9 @@ const StatusContent: React.FC = ({
accessibilityRole,
backgroundColor,
children,
- iconColor,
iconName,
viewRef,
- labelColor,
+ foregroundColor,
labelPaddingVertical
}) => (
= ({
style={[styles.container, { backgroundColor: IOColors[backgroundColor] }]}
testID={"SectionStatusContent"}
>
-
+
+
+
= {
[LevelEnum.warning]: "orange"
};
-export const statusIconMap: Record = {
- [LevelEnum.normal]: "io-complete",
- [LevelEnum.critical]: "io-warning",
- [LevelEnum.warning]: "io-info"
+export const statusIconMap: Record = {
+ [LevelEnum.normal]: "ok",
+ [LevelEnum.critical]: "legWarning",
+ [LevelEnum.warning]: "info"
};
// map the text background color with the relative text color
-const textDefaultColor = "white";
export const getStatusTextColor = (
level: LevelEnum
): "bluegreyDark" | "white" =>
- level === LevelEnum.normal ? "bluegreyDark" : textDefaultColor;
+ level === LevelEnum.normal ? "bluegreyDark" : "white";
export const InnerSectionStatus = (
props: Omit & {
@@ -84,11 +84,10 @@ export const InnerSectionStatus = (
"global.accessibility.alert"
)}`}
backgroundColor={backgroundColor}
- iconColor={IOColors[color]}
iconName={iconName}
testID={"SectionStatusComponentContent"}
viewRef={viewRef}
- labelColor={color}
+ foregroundColor={color}
>
{`${sectionStatus.message[locale]} `}
@@ -109,10 +108,9 @@ export const InnerSectionStatus = (
// disable accessibility to prevent the override of the container
accessible={false}
backgroundColor={backgroundColor}
- iconColor={IOColors[color]}
iconName={iconName}
viewRef={viewRef}
- labelColor={color}
+ foregroundColor={color}
>
{`${sectionStatus.message[locale]} `}
{
public render() {
- return (
-
- );
+ return ;
}
}
diff --git a/ts/components/WalletTabIcon.tsx b/ts/components/WalletTabIcon.tsx
index f8d0dffcda5..474aec3932b 100644
--- a/ts/components/WalletTabIcon.tsx
+++ b/ts/components/WalletTabIcon.tsx
@@ -1,11 +1,12 @@
import React from "react";
import { connect } from "react-redux";
+import { ColorValue } from "react-native";
import { getSafeUnreadTransactionsNumSelector } from "../store/reducers/entities/readTransactions";
import { GlobalState } from "../store/reducers/types";
import TabIconComponent from "./ui/TabIconComponent";
type OwnProps = {
- color?: string;
+ color?: ColorValue;
};
type Props = OwnProps & ReturnType;
@@ -18,7 +19,7 @@ class WalletTabIcon extends React.PureComponent {
const { color, unreadTransactions } = this.props;
return (
diff --git a/ts/components/__tests__/ContextualInfo.test.tsx b/ts/components/__tests__/ContextualInfo.test.tsx
index c9e8fa4a364..c943e03904a 100644
--- a/ts/components/__tests__/ContextualInfo.test.tsx
+++ b/ts/components/__tests__/ContextualInfo.test.tsx
@@ -38,18 +38,20 @@ const options = {
};
describe("ContextualInfo component", () => {
- it("should render a button with the 'io-close' icon", () => {
+ it("should render a close button", () => {
const component = renderComponent(options);
- // ensure that the close icon is inside an accessible button
- expect(buttonByIconName("io-close", component)).toBeDefined();
+ expect(
+ component.queryByTestId("contextualInfo_closeButton")
+ ).not.toBeNull();
});
describe("when the close button is pressed", () => {
it("should call `onClose`", () => {
const onClose = jest.fn();
const component = renderComponent({ ...options, onClose });
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
- const closeButton = buttonByIconName("io-close", component)!;
+ const closeButton = component.queryByTestId(
+ "contextualInfo_closeButton"
+ )!;
fireEvent(closeButton, "onPress");
expect(onClose).toHaveBeenCalledTimes(1);
});
diff --git a/ts/components/bottomSheet/BottomSheetHeader.tsx b/ts/components/bottomSheet/BottomSheetHeader.tsx
index dda010ae087..181fa2011e7 100644
--- a/ts/components/bottomSheet/BottomSheetHeader.tsx
+++ b/ts/components/bottomSheet/BottomSheetHeader.tsx
@@ -5,10 +5,10 @@ import { Millisecond } from "@pagopa/ts-commons/lib/units";
import I18n from "../../i18n";
import ButtonDefaultOpacity from "../ButtonDefaultOpacity";
import { H3 } from "../core/typography/H3";
-import IconFont from "../ui/IconFont";
import { IOStyles } from "../core/variables/IOStyles";
import { IOColors } from "../core/variables/IOColors";
import { setAccessibilityFocus } from "../../utils/accessibility";
+import { Icon } from "../core/icons";
const styles = StyleSheet.create({
row: {
@@ -24,9 +24,6 @@ const styles = StyleSheet.create({
modalClose: {
paddingRight: 0,
justifyContent: "flex-end"
- },
- icon: {
- paddingRight: 0
}
});
@@ -68,7 +65,7 @@ export const BottomSheetHeader: React.FunctionComponent = ({
accessibilityRole={"button"}
accessibilityLabel={I18n.t("global.buttons.close")}
>
-
+
);
diff --git a/ts/components/box/InfoBox.tsx b/ts/components/box/InfoBox.tsx
index 19e0e6cfb5c..965cec62756 100644
--- a/ts/components/box/InfoBox.tsx
+++ b/ts/components/box/InfoBox.tsx
@@ -1,12 +1,12 @@
import * as React from "react";
import { View, StyleSheet } from "react-native";
-import IconFont from "../ui/IconFont";
import { IOColors } from "../core/variables/IOColors";
import { HSpacer } from "../core/spacer/Spacer";
+import { IOIcons, Icon } from "../core/icons";
type Props = {
- iconName?: string;
- iconColor?: string;
+ iconName?: IOIcons;
+ iconColor?: IOColors;
iconSize?: number;
alignedCentral?: boolean;
};
@@ -35,18 +35,15 @@ const ICON_SIZE = 32;
* @constructor
*/
export const InfoBox: React.FunctionComponent = props => {
- const iconName = props.iconName ?? "io-notice";
- const iconColor = props.iconColor ?? IOColors.blue;
+ const iconName = props.iconName ?? "notice";
+ const iconColor = props.iconColor ?? "blue";
const iconSize = props.iconSize ?? ICON_SIZE;
const centralAlignment = props.alignedCentral ? styles.alignedCentral : {};
return (
-
+
+
+
{props.children}
diff --git a/ts/components/cie/CieNotSupported.tsx b/ts/components/cie/CieNotSupported.tsx
index 468186994d3..ef965cda21d 100644
--- a/ts/components/cie/CieNotSupported.tsx
+++ b/ts/components/cie/CieNotSupported.tsx
@@ -1,12 +1,12 @@
import { Body, List, ListItem } from "native-base";
import * as React from "react";
import { useState } from "react";
-import { Platform } from "react-native";
+import { Platform, View } from "react-native";
import I18n from "../../i18n";
-import customVariables from "../../theme/variables";
import { VSpacer } from "../core/spacer/Spacer";
-import IconFont from "../ui/IconFont";
import Markdown from "../ui/Markdown";
+import { IOIcons, Icon } from "../core/icons";
+import { IOColors } from "../core/variables/IOColors";
type Props = {
hasCieApiLevelSupport: boolean;
@@ -14,10 +14,10 @@ type Props = {
};
const ICON_SIZE = 24;
-const okColor = customVariables.brandSuccess;
-const koColor = customVariables.brandDanger;
-const okIcon = "io-complete";
-const koIcon = "io-error";
+const okColor: IOColors = "green";
+const koColor: IOColors = "red";
+const okIcon: IOIcons = "ok";
+const koIcon: IOIcons = "legError";
const markDownElements = 2;
const CieNotSupported: React.FunctionComponent = props => {
const [markdownLoaded, setMarkdownLoaded] = useState(0);
@@ -38,9 +38,9 @@ const CieNotSupported: React.FunctionComponent = props => {
{markdownLoaded === markDownElements && (
-
@@ -50,12 +50,13 @@ const CieNotSupported: React.FunctionComponent = props => {
-
+
+
+
{I18n.t(
"authentication.landing.cie_unsupported.nfc_incompatible"
diff --git a/ts/components/cie/CieReadingCardAnimation.tsx b/ts/components/cie/CieReadingCardAnimation.tsx
index b69ca23d675..a3fc71df409 100644
--- a/ts/components/cie/CieReadingCardAnimation.tsx
+++ b/ts/components/cie/CieReadingCardAnimation.tsx
@@ -4,8 +4,8 @@ import { View, Animated, Easing, Image, StyleSheet } from "react-native";
import ProgressCircle from "react-native-progress-circle";
import customVariables from "../../theme/variables";
import AnimatedRing from "../animations/AnimatedRing";
-import IconFont from "../ui/IconFont";
import { IOColors } from "../core/variables/IOColors";
+import { Icon } from "../core/icons/Icon";
export enum ReadingState {
"reading" = "reading",
@@ -215,12 +215,9 @@ export default class CieReadingCardAnimation extends React.PureComponent<
/>
{this.props.readingState === ReadingState.completed && (
-
+
+
+
)}
diff --git a/ts/components/core/accordion/RawAccordion.tsx b/ts/components/core/accordion/RawAccordion.tsx
index a6070735232..1aa6bbf6e5a 100644
--- a/ts/components/core/accordion/RawAccordion.tsx
+++ b/ts/components/core/accordion/RawAccordion.tsx
@@ -13,8 +13,8 @@ import {
import I18n from "../../../i18n";
import customVariables from "../../../theme/variables";
import { isAndroid } from "../../../utils/platform";
-import IconFont from "../../ui/IconFont";
import { IOStyles } from "../variables/IOStyles";
+import { Icon } from "../icons/Icon";
// TODO: handle external initial open/closed state
type Props = {
@@ -65,7 +65,7 @@ export const RawAccordion: React.FunctionComponent = props => {
const arrowAngle = shouldAnimate
? animatedController.interpolate({
inputRange: [0, 1],
- outputRange: ["-90deg", "-270deg"]
+ outputRange: ["0deg", "-180deg"]
})
: getDegree(isOpen);
@@ -110,11 +110,7 @@ export const RawAccordion: React.FunctionComponent = props => {
transform: [{ rotateZ: arrowAngle }]
}}
>
-
+
diff --git a/ts/components/core/icons/Icon.tsx b/ts/components/core/icons/Icon.tsx
index 219f369f07c..3af82375ac0 100644
--- a/ts/components/core/icons/Icon.tsx
+++ b/ts/components/core/icons/Icon.tsx
@@ -40,6 +40,7 @@ import IconSave from "./svg/IconSave";
import IconCompleted from "./svg/IconCompleted";
import IconSuccess from "./svg/IconSuccess";
import IconOk from "./svg/IconOk";
+import IconFiscalCodeIndividual from "./svg/IconFiscalCodeIndividual";
import IconCreditCard from "./svg/IconCreditCard";
import IconBonus from "./svg/IconBonus";
import IconTransactions from "./svg/IconTransactions";
@@ -158,7 +159,6 @@ import LegIconCompleted from "./svg/LegIconCompleted";
import LegIconCreditCard from "./svg/LegIconCreditCard";
import LegIconBonus from "./svg/LegIconBonus";
import LegIconDocumentAttachment from "./svg/LegIconDocumentAttachment";
-import LegIconTransactions from "./svg/LegIconTransactions";
import LegIconAmount from "./svg/LegIconAmount";
import LegIconCoggle from "./svg/LegIconCoggle";
import LegIconLocation from "./svg/LegIconLocation";
@@ -166,7 +166,6 @@ import LegIconWarning from "./svg/LegIconWarning";
import LegIconNotice from "./svg/LegIconNotice";
import LegIconHistory from "./svg/LegIconHistory";
import LegIconEdit from "./svg/LegIconEdit";
-import LegIconBattery from "./svg/LegIconBattery";
import LegIconTrashcan from "./svg/LegIconTrashcan";
import LegIconCalendar from "./svg/LegIconCalendar";
import LegIconProfile from "./svg/LegIconProfile";
@@ -175,52 +174,52 @@ import LegIconMagicWand from "./svg/LegIconMagicWand";
import LegIconStarFilled from "./svg/LegIconStarFilled";
import LegIconStarEmpty from "./svg/LegIconStarEmpty";
import LegIconSwitchOff from "./svg/LegIconSwitchOff";
-import LegIconDotMenu from "./svg/LegIconDotMenu";
import LegIconBarcode from "./svg/LegIconBarcode";
import LegIconSave from "./svg/LegIconSave";
-import LegIconLogin from "./svg/LegIconLogin";
import LegIconLadybug from "./svg/LegIconLadybug";
import LegIconTag from "./svg/LegIconTag";
-import LegIconGallery from "./svg/LegIconGallery";
import LegIconExternalLink from "./svg/LegIconExternalLink";
import LegIconUnknownGdo from "./svg/LegIconUnknownGdo";
-import LegIconCancel from "./svg/LegIconCancel";
-import LegIconDevice from "./svg/LegIconDevice";
import LegIconQuestion from "./svg/LegIconQuestion";
import LegIconSearch from "./svg/LegIconSearch";
import LegIconClose from "./svg/LegIconClose";
import LegIconCloseSmall from "./svg/LegIconCloseSmall";
+import LegIconChevronLeft from "./svg/LegIconChevronLeft";
import LegIconGiacenza from "./svg/LegIconGiacenza";
import LegIconPSP from "./svg/LegIconPSP";
import LegIconError from "./svg/LegIconError";
+import LegIconRadioOn from "./svg/LegIconRadioOn";
+import LegIconRadioOff from "./svg/LegIconRadioOff";
+import LegIconCheckOn from "./svg/LegIconCheckOn";
+import LegIconCheckOff from "./svg/LegIconCheckOff";
export const IOIcons = {
spid: IconSpid,
cie: IconCie /* io-cie */,
qrCode: IconQrCode,
- legQrCode: LegIconQrCode /* io-qr */,
+ legQrCode: LegIconQrCode,
bell: IconBell,
website: IconWebsite,
legWebsite: LegIconWebsite,
abacus: IconAbacus,
- legAbacus: LegIconAbacus /* io-abacus */,
+ legAbacus: LegIconAbacus,
home: IconHome,
homeFill: IconHomeFill,
legHome: LegIconHome,
copy: IconCopy,
- legCopy: LegIconCopy /* io-copy */,
+ legCopy: LegIconCopy,
selfCert: IconSelfCertification,
institution: IconInstitution,
legInstitution: LegIconInstitution,
hourglass: IconHourglass,
- legHourglass: LegIconHourglass /* io-hourglass */,
+ legHourglass: LegIconHourglass,
shareiOs: IconShareiOs,
shareAndroid: IconShareAndroid,
- legShare: LegIconShare /* io-share */,
+ legShare: LegIconShare,
locked: IconLockOn,
unlocked: IconLockOff,
- legLocked: LegIconLockOn /* io-locker-closed */ /* io-lucchetto */,
- legUnlocked: LegIconLockOff /* io-locker-open */,
+ legLocked: LegIconLockOn /* io-lucchetto */,
+ legUnlocked: LegIconLockOff,
initiatives: IconInitiatives,
legInitiatives: LegIconInitiatives,
analytics: IconAnalytics,
@@ -237,8 +236,8 @@ export const IOIcons = {
legPinOn: LegIconPinOn,
emojiSad: IconEmojiSad,
emojiHappy: IconEmojiHappy,
- legEmojiSad: LegIconEmojiSad /* io-sad */,
- legEmojiHappy: LegIconEmojiHappy /* io-happy */,
+ legEmojiSad: LegIconEmojiSad,
+ legEmojiHappy: LegIconEmojiHappy,
phone: IconPhone,
legPhone: LegIconPhone /* io-phone */,
email: IconEmail,
@@ -249,7 +248,7 @@ export const IOIcons = {
messageLegal: IconMessageLegal,
legMessageLegal: LegIconMessageLegal,
message: IconMessage,
- legMessage: LegIconMessage /* io-send-message */,
+ legMessage: LegIconMessage,
chat: IconChat,
legChat: LegIconChat,
doc: IconDocument,
@@ -265,17 +264,17 @@ export const IOIcons = {
attachment: IconAttachment,
legAttachment: LegIconAttachment,
add: IconAdd,
- legAdd: LegIconAdd /* io-plus */,
+ legAdd: LegIconAdd,
completed: IconCompleted,
- legCompleted: LegIconCompleted /* io-tick-big */,
- success: IconSuccess /* io-success */,
- ok: IconOk /* io-complete */,
+ legCompleted: LegIconCompleted,
+ success: IconSuccess,
+ ok: IconOk,
+ fiscalCodeIndividual: IconFiscalCodeIndividual,
creditCard: IconCreditCard,
legCreditCard: LegIconCreditCard /* io-carta */,
bonus: IconBonus,
legBonus: LegIconBonus,
- transactions: IconTransactions /* io-transactions */,
- legTransactions: LegIconTransactions,
+ transactions: IconTransactions,
amount: IconAmount,
legAmount: LegIconAmount,
psp: IconPSP,
@@ -285,27 +284,26 @@ export const IOIcons = {
locationAndroid: IconLocationAndroid,
legLocation: LegIconLocation,
coggle: IconCoggle,
- legCoggle: LegIconCoggle /* io-coggle */ /* io-preferenze */,
+ legCoggle: LegIconCoggle,
warningFilled: IconWarningFilled,
legWarning: LegIconWarning /* io-warning */,
- notice: IconNotice /* io-notice */,
+ notice: IconNotice,
noticeFilled: IconNoticeFilled,
legNotice: LegIconNotice,
- info: IconInfo /* io-info */,
+ info: IconInfo,
infoFilled: IconInfoFilled,
canceled: IconCanceled,
- legError: LegIconError /* io-error */,
+ legError: LegIconError,
errorFilled: IconErrorFilled,
refund: IconRefund,
- reload: IconReload /* io-reload */,
+ reload: IconReload,
history: IconHistory,
legHistory: LegIconHistory,
edit: IconEdit,
- legEdit: LegIconEdit /* io-edit */,
+ legEdit: LegIconEdit,
battery: IconBattery,
- legBattery: LegIconBattery,
trashcan: IconTrashcan,
- legTrashcan: LegIconTrashcan /* io-trash */,
+ legTrashcan: LegIconTrashcan,
calendar: IconCalendar,
legCalendar: LegIconCalendar /* io-calendar */ /* io-calendario */,
profile: IconProfile,
@@ -313,48 +311,44 @@ export const IOIcons = {
profileAlt: IconProfileAlt /* io-titolare */,
legProfile: LegIconProfile,
profileExperiment: IconProfileExperiment,
- legProfileExperiment: LegIconProfileExperiment /* io-profilo-exp */,
+ legProfileExperiment: LegIconProfileExperiment,
magicWand: IconMagicWand,
legMagicWand: LegIconMagicWand,
starFilled: IconStarFilled,
starEmpty: IconStarEmpty,
- legStarFilled: LegIconStarFilled /* io-filled-star */,
- legStarEmpty: LegIconStarEmpty /* io-empty-star */,
+ legStarFilled: LegIconStarFilled,
+ legStarEmpty: LegIconStarEmpty,
switchOff: IconSwitchOff,
legSwitchOff: LegIconSwitchOff,
device: IconDevice,
- legDevice: LegIconDevice,
dotMenu: IconDotMenu,
- legDotMenu: LegIconDotMenu /* io-more */,
barcode: IconBarcode,
legBarcode: LegIconBarcode,
- save: IconSave /* io-save */,
- legSave: LegIconSave /* io-save */,
+ save: IconSave,
+ legSave: LegIconSave,
login: IconLogin,
logout: IconLogout,
- legLogin: LegIconLogin,
ladybug: IconLadybug,
legLadybug: LegIconLadybug,
tag: IconTag,
legTag: LegIconTag,
gallery: IconGallery,
- legGallery: LegIconGallery,
externalLink: IconExternalLink,
legExternalLink: LegIconExternalLink,
unknownGdo: IconUnknownGdo,
legUnknownGdo: LegIconUnknownGdo,
- cancel: IconCancel /* io-cancel */,
- legCancel: LegIconCancel /* io-cancel */,
- help: IconQuestion /* io-question */,
+ cancel: IconCancel,
+ help: IconQuestion,
legHelp: LegIconQuestion /* io-question */,
- search: IconSearch /* io-search */,
+ search: IconSearch,
legSearch: LegIconSearch /* io-search */,
- chevronRight: IconChevronRight /* io-right */,
- chevronLeft: IconChevronLeft /* io-back */,
+ chevronRight: IconChevronRight,
+ chevronLeft: IconChevronLeft,
chevronBottom: IconChevronBottom,
chevronTop: IconChevronTop,
chevronRightListItem: IconChevronRightListItem,
- close: IconClose /* io-close */,
+ legChevronLeft: LegIconChevronLeft,
+ close: IconClose,
legClose: LegIconClose /* io-close */,
closeSmall: IconCloseSmall,
legCloseSmall: LegIconCloseSmall,
@@ -364,11 +358,15 @@ export const IOIcons = {
arrowRight: IconArrowRight,
backiOS: IconBackiOS,
backAndroid: IconBackAndroid,
- navMessages: IconNavMessages /* io-messaggi */,
- navWallet: IconNavWallet /* io-portafoglio */,
+ legRadioOn: LegIconRadioOn,
+ legRadioOff: LegIconRadioOff,
+ legCheckOn: LegIconCheckOn,
+ legCheckOff: LegIconCheckOff,
+ navMessages: IconNavMessages,
+ navWallet: IconNavWallet,
navDocuments: IconNavDocuments,
navServices: IconNavServices,
- navProfile: IconNavProfile /* io-profilo */,
+ navProfile: IconNavProfile,
biomFingerprint: IconBiomFingerprint /* io-fingerprint */,
biomFaceID: IconBiomFaceID /* io-face-id */,
categCulture: IconCategCulture,
@@ -383,7 +381,7 @@ export const IOIcons = {
categJobOffers: IconCategJobOffers,
categShopping: IconCategShopping,
categSustainability: IconCategSustainability,
- productIOApp: IconProductIOApp /* io-logo */,
+ productIOApp: IconProductIOApp,
productPagoPA: IconProductPagoPA /* io-pagopa */
} as const;
@@ -393,11 +391,23 @@ export type IOIconsProps = {
name: IOIcons;
color?: IOColors;
size?: number | "100%";
+ testID?: string;
+ accessible?: boolean;
+ accessibilityLabel?: string;
};
export type SVGIconProps = {
size: number | "100%";
style: StyleProp;
+ accessible: boolean;
+ accessibilityElementsHidden: boolean;
+ accessibilityLabel: string;
+ importantForAccessibility:
+ | "auto"
+ | "yes"
+ | "no"
+ | "no-hide-descendants"
+ | undefined;
};
/*
@@ -408,11 +418,21 @@ export const Icon = ({
name,
color = "bluegrey",
size = 24,
+ accessible = false,
+ accessibilityLabel = "",
...props
}: IOIconsProps) => {
const IconElement = IOIcons[name];
return (
-
+
);
};
@@ -425,16 +445,28 @@ type IOAnimatedIconsProps = {
name: IOIcons;
color?: ColorValue;
size?: number | "100%";
+ accessible?: boolean;
};
export const AnimatedIcon = ({
name,
color = IOColors.bluegrey,
size = 24,
+ accessible = false,
...props
}: IOAnimatedIconsProps) => {
const IconElement = IOIcons[name];
- return ;
+ return (
+
+ );
};
/* Make component animatable. Reanimated supports class components only,
@@ -489,6 +521,7 @@ const {
attachment,
add,
completed,
+ fiscalCodeIndividual,
creditCard,
bonus,
transactions,
@@ -586,6 +619,7 @@ export const IOIconsNew = {
attachment,
add,
completed,
+ fiscalCodeIndividual,
creditCard,
bonus,
transactions,
diff --git a/ts/components/core/icons/svg/IconAbacus.tsx b/ts/components/core/icons/svg/IconAbacus.tsx
index c7ecaaea620..bd1d2b010e1 100644
--- a/ts/components/core/icons/svg/IconAbacus.tsx
+++ b/ts/components/core/icons/svg/IconAbacus.tsx
@@ -2,8 +2,8 @@ import React from "react";
import { Svg, Path } from "react-native-svg";
import { SVGIconProps } from "../Icon";
-const IconAbacus = ({ size, style }: SVGIconProps) => (
-