@pagopa/io-app-design-system 1.17.2 → 1.18.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/checkbox/CheckboxLabel.js +6 -29
- package/lib/commonjs/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/commonjs/components/codeInput/CodeInput.js +10 -25
- package/lib/commonjs/components/codeInput/CodeInput.js.map +1 -1
- package/lib/commonjs/components/icons/Icon.js +52 -48
- package/lib/commonjs/components/icons/Icon.js.map +1 -1
- package/lib/commonjs/components/icons/svg/IconSystemPermissionsAndroid.js +34 -0
- package/lib/commonjs/components/icons/svg/IconSystemPermissionsAndroid.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/listitems/ListItemTransaction.js +6 -3
- package/lib/commonjs/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/commonjs/components/otpInput/BoxedInput.js +72 -0
- package/lib/commonjs/components/otpInput/BoxedInput.js.map +1 -0
- package/lib/commonjs/components/otpInput/OTPInput.js +131 -0
- package/lib/commonjs/components/otpInput/OTPInput.js.map +1 -0
- package/lib/commonjs/components/otpInput/index.js +17 -0
- package/lib/commonjs/components/otpInput/index.js.map +1 -0
- package/lib/commonjs/components/pictograms/Pictogram.js +74 -68
- package/lib/commonjs/components/pictograms/Pictogram.js.map +1 -1
- package/lib/commonjs/components/pictograms/svg/PictogramComunicationProblem.js +85 -0
- package/lib/commonjs/components/pictograms/svg/PictogramComunicationProblem.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEventClose.js +40 -0
- package/lib/commonjs/components/pictograms/svg/PictogramEventClose.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/PictogramHello.js +61 -0
- package/lib/commonjs/components/pictograms/svg/PictogramHello.js.map +1 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramComunicationProblem.svg +91 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramEventClose.svg +34 -0
- package/lib/commonjs/components/pictograms/svg/originals/PictogramHello.svg +46 -0
- package/lib/commonjs/components/radio/RadioButtonLabel.js +70 -0
- package/lib/commonjs/components/radio/RadioButtonLabel.js.map +1 -0
- package/lib/commonjs/components/radio/index.js +11 -0
- package/lib/commonjs/components/radio/index.js.map +1 -1
- package/lib/commonjs/utils/hooks/useErrorShakeAnimation.js +44 -0
- package/lib/commonjs/utils/hooks/useErrorShakeAnimation.js.map +1 -0
- package/lib/module/components/checkbox/CheckboxLabel.js +7 -30
- package/lib/module/components/checkbox/CheckboxLabel.js.map +1 -1
- package/lib/module/components/codeInput/CodeInput.js +9 -25
- package/lib/module/components/codeInput/CodeInput.js.map +1 -1
- package/lib/module/components/icons/Icon.js +52 -48
- package/lib/module/components/icons/Icon.js.map +1 -1
- package/lib/module/components/icons/svg/IconSystemPermissionsAndroid.js +26 -0
- package/lib/module/components/icons/svg/IconSystemPermissionsAndroid.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/listitems/ListItemTransaction.js +6 -3
- package/lib/module/components/listitems/ListItemTransaction.js.map +1 -1
- package/lib/module/components/otpInput/BoxedInput.js +64 -0
- package/lib/module/components/otpInput/BoxedInput.js.map +1 -0
- package/lib/module/components/otpInput/OTPInput.js +121 -0
- package/lib/module/components/otpInput/OTPInput.js.map +1 -0
- package/lib/module/components/otpInput/index.js +2 -0
- package/lib/module/components/otpInput/index.js.map +1 -0
- package/lib/module/components/pictograms/Pictogram.js +74 -68
- package/lib/module/components/pictograms/Pictogram.js.map +1 -1
- package/lib/module/components/pictograms/svg/PictogramComunicationProblem.js +77 -0
- package/lib/module/components/pictograms/svg/PictogramComunicationProblem.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramEventClose.js +32 -0
- package/lib/module/components/pictograms/svg/PictogramEventClose.js.map +1 -0
- package/lib/module/components/pictograms/svg/PictogramHello.js +53 -0
- package/lib/module/components/pictograms/svg/PictogramHello.js.map +1 -0
- package/lib/module/components/pictograms/svg/originals/PictogramComunicationProblem.svg +91 -0
- package/lib/module/components/pictograms/svg/originals/PictogramEventClose.svg +34 -0
- package/lib/module/components/pictograms/svg/originals/PictogramHello.svg +46 -0
- package/lib/module/components/radio/RadioButtonLabel.js +62 -0
- package/lib/module/components/radio/RadioButtonLabel.js.map +1 -0
- package/lib/module/components/radio/index.js +1 -0
- package/lib/module/components/radio/index.js.map +1 -1
- package/lib/module/utils/hooks/useErrorShakeAnimation.js +37 -0
- package/lib/module/utils/hooks/useErrorShakeAnimation.js.map +1 -0
- package/lib/typescript/components/checkbox/CheckboxLabel.d.ts.map +1 -1
- package/lib/typescript/components/codeInput/CodeInput.d.ts.map +1 -1
- package/lib/typescript/components/icons/Icon.d.ts +2 -0
- package/lib/typescript/components/icons/Icon.d.ts.map +1 -1
- package/lib/typescript/components/icons/svg/IconSystemPermissionsAndroid.d.ts +5 -0
- package/lib/typescript/components/icons/svg/IconSystemPermissionsAndroid.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts +6 -1
- package/lib/typescript/components/listitems/ListItemTransaction.d.ts.map +1 -1
- package/lib/typescript/components/otpInput/BoxedInput.d.ts +9 -0
- package/lib/typescript/components/otpInput/BoxedInput.d.ts.map +1 -0
- package/lib/typescript/components/otpInput/OTPInput.d.ts +26 -0
- package/lib/typescript/components/otpInput/OTPInput.d.ts.map +1 -0
- package/lib/typescript/components/otpInput/index.d.ts +2 -0
- package/lib/typescript/components/otpInput/index.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/Pictogram.d.ts +3 -0
- package/lib/typescript/components/pictograms/Pictogram.d.ts.map +1 -1
- package/lib/typescript/components/pictograms/svg/PictogramComunicationProblem.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramComunicationProblem.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramEventClose.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramEventClose.d.ts.map +1 -0
- package/lib/typescript/components/pictograms/svg/PictogramHello.d.ts +5 -0
- package/lib/typescript/components/pictograms/svg/PictogramHello.d.ts.map +1 -0
- package/lib/typescript/components/radio/RadioButtonLabel.d.ts +18 -0
- package/lib/typescript/components/radio/RadioButtonLabel.d.ts.map +1 -0
- package/lib/typescript/components/radio/index.d.ts +1 -0
- package/lib/typescript/components/radio/index.d.ts.map +1 -1
- package/lib/typescript/utils/hooks/useErrorShakeAnimation.d.ts +11 -0
- package/lib/typescript/utils/hooks/useErrorShakeAnimation.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/components/checkbox/CheckboxLabel.tsx +4 -31
- package/src/components/codeInput/CodeInput.tsx +5 -33
- package/src/components/icons/Icon.tsx +52 -48
- package/src/components/icons/svg/IconSystemPermissionsAndroid.tsx +19 -0
- package/src/components/index.tsx +1 -0
- package/src/components/listitems/ListItemTransaction.tsx +12 -1
- package/src/components/otpInput/BoxedInput.tsx +67 -0
- package/src/components/otpInput/OTPInput.tsx +135 -0
- package/src/components/otpInput/index.tsx +1 -0
- package/src/components/pictograms/Pictogram.tsx +74 -68
- package/src/components/pictograms/svg/PictogramComunicationProblem.tsx +94 -0
- package/src/components/pictograms/svg/PictogramEventClose.tsx +34 -0
- package/src/components/pictograms/svg/PictogramHello.tsx +54 -0
- package/src/components/pictograms/svg/originals/PictogramComunicationProblem.svg +91 -0
- package/src/components/pictograms/svg/originals/PictogramEventClose.svg +34 -0
- package/src/components/pictograms/svg/originals/PictogramHello.svg +46 -0
- package/src/components/radio/RadioButtonLabel.tsx +73 -0
- package/src/components/radio/index.tsx +1 -0
- package/src/utils/hooks/useErrorShakeAnimation.ts +43 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButtonLabel.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/RadioButtonLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAQ,MAAM,cAAc,CAAC;AAK/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,CAAC;IAEd,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,CAAC;AAMF,KAAK,QAAQ,GAAG,KAAK,GACnB,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,GACxE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC;AAE1D;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,gDAK1B,QAAQ,sBAqCV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/radio/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react-native-reanimated" />
|
|
2
|
+
export declare const useErrorShakeAnimation: () => {
|
|
3
|
+
translate: import("react-native-reanimated").SharedValue<number>;
|
|
4
|
+
animatedStyle: {
|
|
5
|
+
transform: {
|
|
6
|
+
translateX: number;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
shakeAnimation: () => number;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useErrorShakeAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useErrorShakeAnimation.d.ts","sourceRoot":"","sources":["../../../../src/utils/hooks/useErrorShakeAnimation.ts"],"names":[],"mappings":";AAYA,eAAO,MAAM,sBAAsB;;;;;;;;CA8BlC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-app-design-system",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.18.0",
|
|
4
4
|
"description": "The library defining the core components of the design system of @pagopa/io-app",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -37,6 +37,8 @@
|
|
|
37
37
|
"bootstrap": "yarn example && yarn install",
|
|
38
38
|
"storybook": "storybook dev -p 6006",
|
|
39
39
|
"build-storybook": "storybook build",
|
|
40
|
+
"predeploy": "yarn build-storybook",
|
|
41
|
+
"deploy-storybook": "gh-pages -d storybook-static",
|
|
40
42
|
"generate:icons": "node scripts/generateNewIcons.js",
|
|
41
43
|
"generate:pictograms": "node scripts/generateNewPictograms.js",
|
|
42
44
|
"generate": "npm-run-all generate:*"
|
|
@@ -52,7 +54,7 @@
|
|
|
52
54
|
"bugs": {
|
|
53
55
|
"url": "https://github.com/pagopa/io-app-design-system/issues"
|
|
54
56
|
},
|
|
55
|
-
"homepage": "https://github.
|
|
57
|
+
"homepage": "https://pagopa.github.io/io-app-design-system",
|
|
56
58
|
"devDependencies": {
|
|
57
59
|
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
58
60
|
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useState } from "react";
|
|
3
|
-
import { Pressable,
|
|
4
|
-
import { IOColors, useIOExperimentalDesign } from "../../core";
|
|
3
|
+
import { Pressable, View } from "react-native";
|
|
5
4
|
import { IOStyles } from "../../core/IOStyles";
|
|
6
5
|
import { triggerHaptic } from "../../functions/haptic-feedback/hapticFeedback";
|
|
7
|
-
import { makeFontStyleObject } from "../../utils/fonts";
|
|
8
6
|
import { HSpacer } from "../spacer/Spacer";
|
|
9
7
|
import { H6 } from "../typography/H6";
|
|
10
8
|
import { AnimatedCheckbox } from "./AnimatedCheckbox";
|
|
@@ -23,17 +21,6 @@ type OwnProps = Props &
|
|
|
23
21
|
Pick<React.ComponentProps<typeof AnimatedCheckbox>, "disabled" | "checked"> &
|
|
24
22
|
Pick<React.ComponentProps<typeof Pressable>, "onPress">;
|
|
25
23
|
|
|
26
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
27
|
-
const styles = StyleSheet.create({
|
|
28
|
-
legacyTextValue: {
|
|
29
|
-
fontSize: 16,
|
|
30
|
-
lineHeight: 24,
|
|
31
|
-
color: IOColors.bluegreyDark,
|
|
32
|
-
flexShrink: 1,
|
|
33
|
-
...makeFontStyleObject("SemiBold", undefined, "TitilliumWeb")
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
24
|
/**
|
|
38
25
|
* A checkbox with the automatic state management that uses a {@link AnimatedCheckBox}
|
|
39
26
|
* The toggleValue change when a `onPress` event is received and dispatch the `onValueChange`.
|
|
@@ -49,22 +36,6 @@ export const CheckboxLabel = ({
|
|
|
49
36
|
}: OwnProps) => {
|
|
50
37
|
const [toggleValue, setToggleValue] = useState(checked ?? false);
|
|
51
38
|
|
|
52
|
-
const { isExperimental } = useIOExperimentalDesign();
|
|
53
|
-
const checkboxLabelText = (
|
|
54
|
-
<H6 style={{ flexShrink: 1 }} color={"black"}>
|
|
55
|
-
{label}
|
|
56
|
-
</H6>
|
|
57
|
-
);
|
|
58
|
-
|
|
59
|
-
// TODO: Remove this when legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
60
|
-
const legacyCheckboxlabelText = (
|
|
61
|
-
<Text style={styles.legacyTextValue}>{label}</Text>
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
const checkboxLabelTextComponent = isExperimental
|
|
65
|
-
? checkboxLabelText
|
|
66
|
-
: legacyCheckboxlabelText;
|
|
67
|
-
|
|
68
39
|
const toggleCheckbox = () => {
|
|
69
40
|
triggerHaptic("impactLight");
|
|
70
41
|
setToggleValue(!toggleValue);
|
|
@@ -96,7 +67,9 @@ export const CheckboxLabel = ({
|
|
|
96
67
|
<AnimatedCheckbox checked={checked ?? toggleValue} />
|
|
97
68
|
</View>
|
|
98
69
|
<HSpacer size={8} />
|
|
99
|
-
{
|
|
70
|
+
<H6 style={{ flexShrink: 1 }} color={"black"}>
|
|
71
|
+
{label}
|
|
72
|
+
</H6>
|
|
100
73
|
</View>
|
|
101
74
|
</Pressable>
|
|
102
75
|
);
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
import React, { useEffect, useMemo } from "react";
|
|
2
2
|
import { StyleSheet, View } from "react-native";
|
|
3
|
-
import Animated
|
|
4
|
-
Easing,
|
|
5
|
-
useAnimatedStyle,
|
|
6
|
-
useSharedValue,
|
|
7
|
-
withSequence,
|
|
8
|
-
withTiming
|
|
9
|
-
} from "react-native-reanimated";
|
|
3
|
+
import Animated from "react-native-reanimated";
|
|
10
4
|
import { IOColors, IOStyles } from "../../core";
|
|
11
5
|
import { triggerHaptic } from "../../functions";
|
|
12
6
|
import { HSpacer } from "../spacer";
|
|
7
|
+
import { useErrorShakeAnimation } from "../../utils/hooks/useErrorShakeAnimation";
|
|
13
8
|
|
|
14
9
|
type CodeInputProps = {
|
|
15
10
|
value: string;
|
|
@@ -56,12 +51,7 @@ export const CodeInput = ({
|
|
|
56
51
|
}: CodeInputProps) => {
|
|
57
52
|
const [status, setStatus] = React.useState<"default" | "error">("default");
|
|
58
53
|
|
|
59
|
-
const translate =
|
|
60
|
-
const shakeOffset: number = 8;
|
|
61
|
-
|
|
62
|
-
const animatedStyle = useAnimatedStyle(() => ({
|
|
63
|
-
transform: [{ translateX: translate.value }]
|
|
64
|
-
}));
|
|
54
|
+
const { translate, animatedStyle, shakeAnimation } = useErrorShakeAnimation();
|
|
65
55
|
|
|
66
56
|
const fillColor = useMemo(
|
|
67
57
|
() =>
|
|
@@ -82,25 +72,7 @@ export const CodeInput = ({
|
|
|
82
72
|
triggerHaptic("notificationError");
|
|
83
73
|
|
|
84
74
|
// eslint-disable-next-line functional/immutable-data
|
|
85
|
-
translate.value =
|
|
86
|
-
withTiming(shakeOffset, {
|
|
87
|
-
duration: 75,
|
|
88
|
-
easing: Easing.inOut(Easing.cubic)
|
|
89
|
-
}),
|
|
90
|
-
withTiming(-shakeOffset, {
|
|
91
|
-
duration: 75,
|
|
92
|
-
easing: Easing.inOut(Easing.cubic)
|
|
93
|
-
}),
|
|
94
|
-
withTiming(shakeOffset / 2, {
|
|
95
|
-
duration: 75,
|
|
96
|
-
easing: Easing.inOut(Easing.cubic)
|
|
97
|
-
}),
|
|
98
|
-
withTiming(-shakeOffset / 2, {
|
|
99
|
-
duration: 75,
|
|
100
|
-
easing: Easing.inOut(Easing.cubic)
|
|
101
|
-
}),
|
|
102
|
-
withTiming(0, { duration: 75, easing: Easing.inOut(Easing.cubic) })
|
|
103
|
-
);
|
|
75
|
+
translate.value = shakeAnimation();
|
|
104
76
|
|
|
105
77
|
const timer = setTimeout(() => {
|
|
106
78
|
setStatus("default");
|
|
@@ -110,7 +82,7 @@ export const CodeInput = ({
|
|
|
110
82
|
}
|
|
111
83
|
}
|
|
112
84
|
return;
|
|
113
|
-
}, [value, onValidate, length, onValueChange, translate]);
|
|
85
|
+
}, [value, onValidate, length, onValueChange, translate, shakeAnimation]);
|
|
114
86
|
|
|
115
87
|
return (
|
|
116
88
|
<Animated.View style={[IOStyles.row, styles.wrapper, animatedStyle]}>
|
|
@@ -5,10 +5,12 @@ import { IOColors } from "../../core/IOColors";
|
|
|
5
5
|
/* Icons */
|
|
6
6
|
import IconAbacus from "./svg/IconAbacus";
|
|
7
7
|
import IconAdd from "./svg/IconAdd";
|
|
8
|
+
import IconAddSmall from "./svg/IconAddSmall";
|
|
8
9
|
import IconAgreement from "./svg/IconAgreement";
|
|
9
10
|
import IconAmount from "./svg/IconAmount";
|
|
10
11
|
import IconAnalytics from "./svg/IconAnalytics";
|
|
11
12
|
import IconArchive from "./svg/IconArchive";
|
|
13
|
+
import IconArchiveFilled from "./svg/IconArchiveFilled";
|
|
12
14
|
import IconArrowBottom from "./svg/IconArrowBottom";
|
|
13
15
|
import IconArrowLeft from "./svg/IconArrowLeft";
|
|
14
16
|
import IconArrowRight from "./svg/IconArrowRight";
|
|
@@ -37,6 +39,7 @@ import IconCategSustainability from "./svg/IconCategSustainability";
|
|
|
37
39
|
import IconCategTelco from "./svg/IconCategTelco";
|
|
38
40
|
import IconCategTravel from "./svg/IconCategTravel";
|
|
39
41
|
import IconCategWellness from "./svg/IconCategWellness";
|
|
42
|
+
import IconChange from "./svg/IconChange";
|
|
40
43
|
import IconChat from "./svg/IconChat";
|
|
41
44
|
import IconCheckTick from "./svg/IconCheckTick";
|
|
42
45
|
import IconCheckTickBig from "./svg/IconCheckTickBig";
|
|
@@ -49,35 +52,63 @@ import IconCie from "./svg/IconCie";
|
|
|
49
52
|
import IconCloseLarge from "./svg/IconCloseLarge";
|
|
50
53
|
import IconCloseMedium from "./svg/IconCloseMedium";
|
|
51
54
|
import IconCloseSmall from "./svg/IconCloseSmall";
|
|
55
|
+
import IconCode from "./svg/IconCode";
|
|
52
56
|
import IconCoggle from "./svg/IconCoggle";
|
|
57
|
+
import IconCompare from "./svg/IconCompare";
|
|
58
|
+
import IconContactless from "./svg/IconContactless";
|
|
53
59
|
import IconCopy from "./svg/IconCopy";
|
|
54
60
|
import IconCreditCard from "./svg/IconCreditCard";
|
|
61
|
+
import IconCreditCardOff from "./svg/IconCreditCardOff";
|
|
55
62
|
import IconDevice from "./svg/IconDevice";
|
|
63
|
+
import IconDeviceVibration from "./svg/IconDeviceVibration";
|
|
64
|
+
import IconDisabilityCard from "./svg/IconDisabilityCard";
|
|
65
|
+
import IconDocGiacenza from "./svg/IconDocGiacenza";
|
|
66
|
+
import IconDocPaymentCode from "./svg/IconDocPaymentCode";
|
|
67
|
+
import IconDocPaymentTitle from "./svg/IconDocPaymentTitle";
|
|
56
68
|
import IconDocument from "./svg/IconDocument";
|
|
57
69
|
import IconDocumentAttachment from "./svg/IconDocumentAttachment";
|
|
58
70
|
import IconDocumentAttachmentPDF from "./svg/IconDocumentAttachmentPDF";
|
|
59
71
|
import IconDocumentSign from "./svg/IconDocumentSign";
|
|
60
72
|
import IconDotMenu from "./svg/IconDotMenu";
|
|
73
|
+
import IconDriverLicense from "./svg/IconDriverLicense";
|
|
61
74
|
import IconEdit from "./svg/IconEdit";
|
|
62
75
|
import IconEmail from "./svg/IconEmail";
|
|
63
76
|
import IconEmailFill from "./svg/IconEmailFill";
|
|
64
77
|
import IconEmojiHappy from "./svg/IconEmojiHappy";
|
|
65
78
|
import IconEmojiSad from "./svg/IconEmojiSad";
|
|
79
|
+
import IconEntityCode from "./svg/IconEntityCode";
|
|
66
80
|
import IconErrorFilled from "./svg/IconErrorFilled";
|
|
67
81
|
import IconExternalLink from "./svg/IconExternalLink";
|
|
82
|
+
import IconExternalLinkSmall from "./svg/IconExternalLinkSmall";
|
|
68
83
|
import IconEyeHide from "./svg/IconEyeHide";
|
|
69
84
|
import IconEyeShow from "./svg/IconEyeShow";
|
|
85
|
+
import IconFamilySharing from "./svg/IconFamilySharing";
|
|
86
|
+
import IconFilterAndroid from "./svg/IconFilterAndroid";
|
|
87
|
+
import IconFilterOffiOS from "./svg/IconFilterOffiOS";
|
|
88
|
+
import IconFilterOniOS from "./svg/IconFilterOniOS";
|
|
89
|
+
import IconFingerprint from "./svg/IconFingerprint";
|
|
70
90
|
import IconFiscalCodeIndividual from "./svg/IconFiscalCodeIndividual";
|
|
91
|
+
import IconFolder from "./svg/IconFolder";
|
|
71
92
|
import IconFornitori from "./svg/IconFornitori";
|
|
93
|
+
import IconForward from "./svg/IconForward";
|
|
72
94
|
import IconGallery from "./svg/IconGallery";
|
|
95
|
+
import IconHealthCard from "./svg/IconHealthCard";
|
|
96
|
+
import IconHearthEmpty from "./svg/IconHearthEmpty";
|
|
97
|
+
import IconHearthFilled from "./svg/IconHearthFilled";
|
|
73
98
|
import IconHistory from "./svg/IconHistory";
|
|
74
99
|
import IconHome from "./svg/IconHome";
|
|
75
100
|
import IconHomeFill from "./svg/IconHomeFill";
|
|
76
101
|
import IconHourglass from "./svg/IconHourglass";
|
|
102
|
+
import IconInboxEmpty from "./svg/IconInboxEmpty";
|
|
103
|
+
import IconInboxFilled from "./svg/IconInboxFilled";
|
|
77
104
|
import IconInfo from "./svg/IconInfo";
|
|
78
105
|
import IconInfoFilled from "./svg/IconInfoFilled";
|
|
79
106
|
import IconInitiatives from "./svg/IconInitiatives";
|
|
80
107
|
import IconInstitution from "./svg/IconInstitution";
|
|
108
|
+
import IconInstruction from "./svg/IconInstruction";
|
|
109
|
+
import IconKey from "./svg/IconKey";
|
|
110
|
+
import IconKeyboard from "./svg/IconKeyboard";
|
|
111
|
+
import IconKeyboardDown from "./svg/IconKeyboardDown";
|
|
81
112
|
import IconLadybug from "./svg/IconLadybug";
|
|
82
113
|
import IconLegalValue from "./svg/IconLegalValue";
|
|
83
114
|
import IconLight from "./svg/IconLight";
|
|
@@ -91,6 +122,7 @@ import IconLockOn from "./svg/IconLockOn";
|
|
|
91
122
|
import IconLogin from "./svg/IconLogin";
|
|
92
123
|
import IconLogout from "./svg/IconLogout";
|
|
93
124
|
import IconMagicWand from "./svg/IconMagicWand";
|
|
125
|
+
import IconMapPin from "./svg/IconMapPin";
|
|
94
126
|
import IconMerchant from "./svg/IconMerchant";
|
|
95
127
|
import IconMessage from "./svg/IconMessage";
|
|
96
128
|
import IconMessageLegal from "./svg/IconMessageLegal";
|
|
@@ -103,14 +135,19 @@ import IconNavServices from "./svg/IconNavServices";
|
|
|
103
135
|
import IconNavServicesFocused from "./svg/IconNavServicesFocused";
|
|
104
136
|
import IconNavWallet from "./svg/IconNavWallet";
|
|
105
137
|
import IconNavWalletFocused from "./svg/IconNavWalletFocused";
|
|
138
|
+
import IconNotes from "./svg/IconNotes";
|
|
106
139
|
import IconNotice from "./svg/IconNotice";
|
|
107
140
|
import IconNoticeFilled from "./svg/IconNoticeFilled";
|
|
141
|
+
import IconNoticePlain from "./svg/IconNoticePlain";
|
|
142
|
+
import IconNotification from "./svg/IconNotification";
|
|
108
143
|
import IconOk from "./svg/IconOk";
|
|
144
|
+
import IconOption from "./svg/IconOption";
|
|
109
145
|
import IconPEC from "./svg/IconPEC";
|
|
110
146
|
import IconPSP from "./svg/IconPSP";
|
|
111
147
|
import IconPhone from "./svg/IconPhone";
|
|
112
148
|
import IconPinOff from "./svg/IconPinOff";
|
|
113
149
|
import IconPinOn from "./svg/IconPinOn";
|
|
150
|
+
import IconPrint from "./svg/IconPrint";
|
|
114
151
|
import IconProductIOApp from "./svg/IconProductIOApp";
|
|
115
152
|
import IconProductIOAppBlueBg from "./svg/IconProductIOAppBlueBg";
|
|
116
153
|
import IconProductPagoPA from "./svg/IconProductPagoPA";
|
|
@@ -119,6 +156,9 @@ import IconProfileAlt from "./svg/IconProfileAlt";
|
|
|
119
156
|
import IconProfileFilled from "./svg/IconProfileFilled";
|
|
120
157
|
import IconQrCode from "./svg/IconQrCode";
|
|
121
158
|
import IconQuestion from "./svg/IconQuestion";
|
|
159
|
+
import IconRead from "./svg/IconRead";
|
|
160
|
+
import IconReceiptOff from "./svg/IconReceiptOff";
|
|
161
|
+
import IconReceiptOn from "./svg/IconReceiptOn";
|
|
122
162
|
import IconRefund from "./svg/IconRefund";
|
|
123
163
|
import IconReload from "./svg/IconReload";
|
|
124
164
|
import IconSave from "./svg/IconSave";
|
|
@@ -127,6 +167,8 @@ import IconSecurity from "./svg/IconSecurity";
|
|
|
127
167
|
import IconSelfCertification from "./svg/IconSelfCertification";
|
|
128
168
|
import IconShareAndroid from "./svg/IconShareAndroid";
|
|
129
169
|
import IconShareiOs from "./svg/IconShareiOs";
|
|
170
|
+
import IconSignal from "./svg/IconSignal";
|
|
171
|
+
import IconSparkles from "./svg/IconSparkles";
|
|
130
172
|
import IconSpid from "./svg/IconSpid";
|
|
131
173
|
import IconStarEmpty from "./svg/IconStarEmpty";
|
|
132
174
|
import IconStarFilled from "./svg/IconStarFilled";
|
|
@@ -134,63 +176,22 @@ import IconSuccess from "./svg/IconSuccess";
|
|
|
134
176
|
import IconSwitchOff from "./svg/IconSwitchOff";
|
|
135
177
|
import IconSystemAppsAndroid from "./svg/IconSystemAppsAndroid";
|
|
136
178
|
import IconSystemNotificationsInstructions from "./svg/IconSystemNotificationsInstructions";
|
|
179
|
+
import IconSystemPermissionsAndroid from "./svg/IconSystemPermissionsAndroid";
|
|
137
180
|
import IconSystemSettingsAndroid from "./svg/IconSystemSettingsAndroid";
|
|
138
181
|
import IconSystemSettingsiOS from "./svg/IconSystemSettingsiOS";
|
|
139
182
|
import IconSystemToggleInstructions from "./svg/IconSystemToggleInstructions";
|
|
140
183
|
import IconTag from "./svg/IconTag";
|
|
141
|
-
import
|
|
184
|
+
import IconTerms from "./svg/IconTerms";
|
|
185
|
+
import IconTouch from "./svg/IconTouch";
|
|
142
186
|
import IconTransactions from "./svg/IconTransactions";
|
|
187
|
+
import IconTransactionsBoxed from "./svg/IconTransactionsBoxed";
|
|
143
188
|
import IconTrashcan from "./svg/IconTrashcan";
|
|
144
189
|
import IconWarningFilled from "./svg/IconWarningFilled";
|
|
145
190
|
import IconWebsite from "./svg/IconWebsite";
|
|
146
|
-
import IconOption from "./svg/IconOption";
|
|
147
|
-
import IconKey from "./svg/IconKey";
|
|
148
|
-
import IconNotification from "./svg/IconNotification";
|
|
149
|
-
import IconChange from "./svg/IconChange";
|
|
150
191
|
import LegIconCheckOff from "./svg/LegIconCheckOff";
|
|
151
192
|
import LegIconCheckOn from "./svg/LegIconCheckOn";
|
|
152
193
|
import LegIconRadioOff from "./svg/LegIconRadioOff";
|
|
153
194
|
import LegIconRadioOn from "./svg/LegIconRadioOn";
|
|
154
|
-
import IconKeyboard from "./svg/IconKeyboard";
|
|
155
|
-
import IconContactless from "./svg/IconContactless";
|
|
156
|
-
import IconDisabilityCard from "./svg/IconDisabilityCard";
|
|
157
|
-
import IconDriverLicense from "./svg/IconDriverLicense";
|
|
158
|
-
import IconHealthCard from "./svg/IconHealthCard";
|
|
159
|
-
import IconDocPaymentCode from "./svg/IconDocPaymentCode";
|
|
160
|
-
import IconNotes from "./svg/IconNotes";
|
|
161
|
-
import IconEntityCode from "./svg/IconEntityCode";
|
|
162
|
-
import IconFolder from "./svg/IconFolder";
|
|
163
|
-
import IconReceiptOn from "./svg/IconReceiptOn";
|
|
164
|
-
import IconFingerprint from "./svg/IconFingerprint";
|
|
165
|
-
import IconAddSmall from "./svg/IconAddSmall";
|
|
166
|
-
import IconArchiveFilled from "./svg/IconArchiveFilled";
|
|
167
|
-
import IconCode from "./svg/IconCode";
|
|
168
|
-
import IconCompare from "./svg/IconCompare";
|
|
169
|
-
import IconCreditCardOff from "./svg/IconCreditCardOff";
|
|
170
|
-
import IconDeviceVibration from "./svg/IconDeviceVibration";
|
|
171
|
-
import IconDocPaymentTitle from "./svg/IconDocPaymentTitle";
|
|
172
|
-
import IconDocGiacenza from "./svg/IconDocGiacenza";
|
|
173
|
-
import IconExternalLinkSmall from "./svg/IconExternalLinkSmall";
|
|
174
|
-
import IconFamilySharing from "./svg/IconFamilySharing";
|
|
175
|
-
import IconFilterOniOS from "./svg/IconFilterOniOS";
|
|
176
|
-
import IconFilterOffiOS from "./svg/IconFilterOffiOS";
|
|
177
|
-
import IconFilterAndroid from "./svg/IconFilterAndroid";
|
|
178
|
-
import IconForward from "./svg/IconForward";
|
|
179
|
-
import IconHearthEmpty from "./svg/IconHearthEmpty";
|
|
180
|
-
import IconHearthFilled from "./svg/IconHearthFilled";
|
|
181
|
-
import IconInboxEmpty from "./svg/IconInboxEmpty";
|
|
182
|
-
import IconInboxFilled from "./svg/IconInboxFilled";
|
|
183
|
-
import IconInstruction from "./svg/IconInstruction";
|
|
184
|
-
import IconTerms from "./svg/IconTerms";
|
|
185
|
-
import IconKeyboardDown from "./svg/IconKeyboardDown";
|
|
186
|
-
import IconMapPin from "./svg/IconMapPin";
|
|
187
|
-
import IconNoticePlain from "./svg/IconNoticePlain";
|
|
188
|
-
import IconPrint from "./svg/IconPrint";
|
|
189
|
-
import IconRead from "./svg/IconRead";
|
|
190
|
-
import IconReceiptOff from "./svg/IconReceiptOff";
|
|
191
|
-
import IconSignal from "./svg/IconSignal";
|
|
192
|
-
import IconTouch from "./svg/IconTouch";
|
|
193
|
-
import IconSparkles from "./svg/IconSparkles";
|
|
194
195
|
|
|
195
196
|
export const IOIcons = {
|
|
196
197
|
spid: IconSpid,
|
|
@@ -381,7 +382,8 @@ export const IOIcons = {
|
|
|
381
382
|
systemSettingsiOS: IconSystemSettingsiOS,
|
|
382
383
|
systemToggleInstructions: IconSystemToggleInstructions,
|
|
383
384
|
systemAppsAndroid: IconSystemAppsAndroid,
|
|
384
|
-
systemNotificationsInstructions: IconSystemNotificationsInstructions
|
|
385
|
+
systemNotificationsInstructions: IconSystemNotificationsInstructions,
|
|
386
|
+
systemPermissionsAndroid: IconSystemPermissionsAndroid
|
|
385
387
|
} as const;
|
|
386
388
|
|
|
387
389
|
export type IOIcons = keyof typeof IOIcons;
|
|
@@ -649,7 +651,8 @@ const {
|
|
|
649
651
|
systemSettingsiOS,
|
|
650
652
|
systemToggleInstructions,
|
|
651
653
|
systemAppsAndroid,
|
|
652
|
-
systemNotificationsInstructions
|
|
654
|
+
systemNotificationsInstructions,
|
|
655
|
+
systemPermissionsAndroid
|
|
653
656
|
} = IOIcons;
|
|
654
657
|
|
|
655
658
|
export const IOSystemIcons = {
|
|
@@ -657,7 +660,8 @@ export const IOSystemIcons = {
|
|
|
657
660
|
systemSettingsiOS,
|
|
658
661
|
systemToggleInstructions,
|
|
659
662
|
systemAppsAndroid,
|
|
660
|
-
systemNotificationsInstructions
|
|
663
|
+
systemNotificationsInstructions,
|
|
664
|
+
systemPermissionsAndroid
|
|
661
665
|
} as const;
|
|
662
666
|
|
|
663
667
|
export type IOSystemIcons = keyof typeof IOSystemIcons;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Path, Rect, Svg } from "react-native-svg";
|
|
3
|
+
import { SVGIconProps } from "../Icon";
|
|
4
|
+
|
|
5
|
+
const IconSystemPermissionsAndroid = ({
|
|
6
|
+
size,
|
|
7
|
+
style,
|
|
8
|
+
...props
|
|
9
|
+
}: SVGIconProps) => (
|
|
10
|
+
<Svg width={size} height={size} viewBox="0 0 24 24" style={style} {...props}>
|
|
11
|
+
<Rect width={size} height={size} fill="#636B82" rx="8" />
|
|
12
|
+
<Path
|
|
13
|
+
d="M12 15.75C12.825 15.75 13.5 15.075 13.5 14.25C13.5 13.425 12.825 12.75 12 12.75C11.175 12.75 10.5 13.425 10.5 14.25C10.5 15.075 11.175 15.75 12 15.75ZM16.5 9H15.75V7.5C15.75 5.43 14.07 3.75 12 3.75C9.93 3.75 8.25 5.43 8.25 7.5H9.675C9.675 6.2175 10.7175 5.175 12 5.175C13.2825 5.175 14.325 6.2175 14.325 7.5V9H7.5C6.675 9 6 9.675 6 10.5V18C6 18.825 6.675 19.5 7.5 19.5H16.5C17.325 19.5 18 18.825 18 18V10.5C18 9.675 17.325 9 16.5 9ZM16.5 18H7.5V10.5H16.5V18Z"
|
|
14
|
+
fill="#FFFFFF"
|
|
15
|
+
/>
|
|
16
|
+
</Svg>
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export default IconSystemPermissionsAndroid;
|
package/src/components/index.tsx
CHANGED
|
@@ -65,6 +65,11 @@ export type ListItemTransaction = WithTestID<
|
|
|
65
65
|
paymentLogoIcon?: ListItemTransactionLogo;
|
|
66
66
|
subtitle: string;
|
|
67
67
|
title: string;
|
|
68
|
+
/**
|
|
69
|
+
* The maximum number of lines to display for the title.
|
|
70
|
+
* @default 2
|
|
71
|
+
*/
|
|
72
|
+
numberOfLines?: number;
|
|
68
73
|
accessible?: boolean;
|
|
69
74
|
} & (
|
|
70
75
|
| {
|
|
@@ -117,6 +122,7 @@ export const ListItemTransaction = ({
|
|
|
117
122
|
transactionAmount,
|
|
118
123
|
badgeText,
|
|
119
124
|
transactionStatus = "success",
|
|
125
|
+
numberOfLines = 2,
|
|
120
126
|
accessible
|
|
121
127
|
}: ListItemTransaction) => {
|
|
122
128
|
const { isExperimental } = useIOExperimentalDesign();
|
|
@@ -144,6 +150,7 @@ export const ListItemTransaction = ({
|
|
|
144
150
|
<H6
|
|
145
151
|
accessibilityLabel={getAccessibleAmountText(transactionAmount)}
|
|
146
152
|
color={hasChevronRight ? interactiveColor : "black"}
|
|
153
|
+
numberOfLines={numberOfLines}
|
|
147
154
|
>
|
|
148
155
|
{transactionAmount || ""}
|
|
149
156
|
</H6>
|
|
@@ -153,6 +160,7 @@ export const ListItemTransaction = ({
|
|
|
153
160
|
<H6
|
|
154
161
|
accessibilityLabel={getAccessibleAmountText(transactionAmount)}
|
|
155
162
|
color={hasChevronRight ? interactiveColor : "success-700"}
|
|
163
|
+
numberOfLines={numberOfLines}
|
|
156
164
|
>
|
|
157
165
|
{transactionAmount || ""}
|
|
158
166
|
</H6>
|
|
@@ -181,7 +189,10 @@ export const ListItemTransaction = ({
|
|
|
181
189
|
</View>
|
|
182
190
|
)}
|
|
183
191
|
<View style={IOStyles.flex}>
|
|
184
|
-
<LabelSmallAlt
|
|
192
|
+
<LabelSmallAlt
|
|
193
|
+
numberOfLines={numberOfLines}
|
|
194
|
+
color={theme["textBody-default"]}
|
|
195
|
+
>
|
|
185
196
|
{title}
|
|
186
197
|
</LabelSmallAlt>
|
|
187
198
|
<LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { View, StyleSheet } from "react-native";
|
|
4
|
+
import { IOColors } from "../../core";
|
|
5
|
+
import { BaseTypography, H6 } from "../typography";
|
|
6
|
+
|
|
7
|
+
type Props = {
|
|
8
|
+
status: "default" | "focus" | "error";
|
|
9
|
+
secret?: boolean;
|
|
10
|
+
value?: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const styles = StyleSheet.create({
|
|
14
|
+
baseBox: {
|
|
15
|
+
alignItems: "center",
|
|
16
|
+
justifyContent: "center",
|
|
17
|
+
width: 35,
|
|
18
|
+
height: 60,
|
|
19
|
+
borderRadius: 8
|
|
20
|
+
},
|
|
21
|
+
defaultBox: {
|
|
22
|
+
borderWidth: 1,
|
|
23
|
+
borderColor: IOColors["grey-200"]
|
|
24
|
+
},
|
|
25
|
+
focusedBox: {
|
|
26
|
+
borderWidth: 2,
|
|
27
|
+
borderColor: IOColors["blueIO-500"]
|
|
28
|
+
},
|
|
29
|
+
errorBox: {
|
|
30
|
+
borderWidth: 1,
|
|
31
|
+
borderColor: IOColors["error-850"],
|
|
32
|
+
backgroundColor: IOColors["error-100"]
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// FIXME Replace this component with H3 once the legacy look is deprecated https://pagopa.atlassian.net/browse/IOPLT-153
|
|
37
|
+
const SecretValue = () => (
|
|
38
|
+
<BaseTypography
|
|
39
|
+
font="DMMono"
|
|
40
|
+
weight="SemiBold"
|
|
41
|
+
color="bluegreyDark"
|
|
42
|
+
fontStyle={{ fontSize: 22, lineHeight: 33 }}
|
|
43
|
+
accessible={false}
|
|
44
|
+
>
|
|
45
|
+
{"•"}
|
|
46
|
+
</BaseTypography>
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
export const BoxedInput = ({ status, value, secret }: Props) => {
|
|
50
|
+
const derivedStyle = useMemo(() => {
|
|
51
|
+
switch (status) {
|
|
52
|
+
case "error":
|
|
53
|
+
return styles.errorBox;
|
|
54
|
+
case "focus":
|
|
55
|
+
return styles.focusedBox;
|
|
56
|
+
case "default":
|
|
57
|
+
default:
|
|
58
|
+
return styles.defaultBox;
|
|
59
|
+
}
|
|
60
|
+
}, [status]);
|
|
61
|
+
return (
|
|
62
|
+
<View style={[styles.baseBox, derivedStyle]} accessible={false}>
|
|
63
|
+
{value &&
|
|
64
|
+
(secret ? <SecretValue /> : <H6 accessible={false}>{value}</H6>)}
|
|
65
|
+
</View>
|
|
66
|
+
);
|
|
67
|
+
};
|